nextcloud/apps/settings/js/vue-settings-personal-webau...

162 lines
400 KiB
JavaScript
Raw Normal View History

!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/js/",n(n.s=909)}([function(t,e,n){var r=n(1),o=n(211),i=n(11),a=n(213),s=n(214),c=n(297),u=o("wks"),f=r.Symbol,l=c?f:f&&f.withoutSetter||a;t.exports=function(t){return i(u,t)||(s&&i(f,t)?u[t]=f[t]:u[t]=l("Symbol."+t)),u[t]}},function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,n(4))},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(1),o=n(50).f,i=n(26),a=n(24),s=n(123),c=n(300),u=n(120);t.exports=function(t,e){var n,f,l,p,A,d=t.target,h=t.global,v=t.stat;if(n=h?r:v?r[d]||s(d,{}):(r[d]||{}).prototype)for(f in e){if(p=e[f],l=t.noTargetGet?(A=o(n,f))&&A.value:n[f],!u(h?f:d+(v?".":"#")+f,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;c(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),a(n,f,p,t)}}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,n(4))},function(t,e,n){var r=n(5),o=n(183),i=n(10),a=n(89),s=n(188),c=n(400),u=o("wks"),f=r.Symbol,l=c?f:f&&f.withoutSetter||a;t.exports=function(t){return i(u,t)||(s&&i(f,t)?u[t]=f[t]:u[t]=l("Symbol."+t)),u[t]}},function(t,e,n){"use strict";var r=n(152),o=Object.prototype.toString;function i(t){return"[object Array]"===o.call(t)}function a(t){return void 0===t}function s(t){return null!==t&&"object"==typeof t}function c(t){return"[object Function]"===o.call(t)}function u(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),i(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:i,isArrayBuffer:function(t){return"[object ArrayBuffer]"===o.call(t)},isBuffer:function(t){return null!==t&&!a(t)&&null!==t.constructor&&!a(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:s,isUndefined:a,isDate:function(t){return"[object Date]"===o.call(t)},isFile:function(t){return"[object File]"===o.call(t)},isBlob:function(t){return"[object Blob]"===o.call(t)},isFunction:c,isStream:function(t){return s(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:u,mer
/*!
* Vue.js v2.6.11
* (c) 2014-2019 Evan You
* Released under the MIT License.
*/
var r=Object.freeze({});function o(t){return null==t}function i(t){return null!=t}function a(t){return!0===t}function s(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function c(t){return null!==t&&"object"==typeof t}var u=Object.prototype.toString;function f(t){return"[object Object]"===u.call(t)}function l(t){return"[object RegExp]"===u.call(t)}function p(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function A(t){return i(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function d(t){return null==t?"":Array.isArray(t)||f(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function h(t){var e=parseFloat(t);return isNaN(e)?t:e}function v(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}v("slot,component",!0);var g=v("key,ref,slot,slot-scope,is");function m(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}var y=Object.prototype.hasOwnProperty;function b(t,e){return y.call(t,e)}function x(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var w=/-(\w)/g,E=x((function(t){return t.replace(w,(function(t,e){return e?e.toUpperCase():""}))})),_=x((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),O=/\B([A-Z])/g,I=x((function(t){return t.replace(O,"-$1").toLowerCase()}));var C=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function S(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function T(t,e){for(var n in e)t[n]=e[n];return t}function j(t){for(var e={},n=0;n<t.length;n++)t[n]&&T(e,t[n]);return e}function M(t,e,n){}var L=function(t,e,n){return!1},R=function(t){return t};function B(t,e){if(t===e)return!0;var n=c(t),r=c(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var o=Array.isArray(t),i=Array.isArray(e);if(o&&i)return t.length===e.length&&t.every((function(t,n){return B(t,e[n])}));if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(o||i)return!1;var a=Object.keys(t),s=Object.keys(e);return a.length===s.length&&a.every((function(n){return B(t[n],e[n])}))}catch(t){return!1}}function N(t,e){for(var n=0;n<t.length;n++)if(B(t[n],e))return n;return-1}function k(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}var D=["component","directive","filter"],P=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],U={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:L,isReservedAttr:L,isUnknownElement:L,getTagNamespace:M,parsePlatformTagName:R,mustUseProp:L,async:!0,_lifecycleHooks:P},F=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function $(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var G=new RegExp("[^"+F.source+".$_\\d]");var Q,z="__proto__"in{},W="undefined"!=typeof window,H="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,Y=H&&WXEnvironment.platform.toLowerCase(),V=W&&window.navigator.userAgent.toLowerCase(),X=V&&/msie|trident/.test(V),Z=V&&V.indexOf("msie 9.0")>0,q=V&&V.indexOf("edge/")>0,J=(V&&V.indexOf("android"),V&&/iphone|ipad|ipod|ios/.test(V)||"ios"===Y),K=(V&&/chrome\/\d+/.test(V),V&&/phantomjs/.test(V),V&&V.match(/firefox\/(\d+)/)),tt={}.watch,et=!1;if(W)try{var nt={};Object.defineProperty(nt,"passive",{get:function(){et=!0}}),window.addEventListener("test-passive",null,nt)}catch(t){}var rt=function(){return void 0===Q&&(Q=!W&&!H&&void 0!==t&&(t.process&&"server"===t.process.env.VUE_ENV)),Q},ot=W&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function it(t){return"function"==t
/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.15.0
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
var n="undefined"!=typeof window&&"undefined"!=typeof document,r=["Edge","Trident","Firefox"],o=0,i=0;i<r.length;i+=1)if(n&&navigator.userAgent.indexOf(r[i])>=0){o=1;break}var a=n&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),o))}};function s(t){return t&&"[object Function]"==={}.toString.call(t)}function c(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function u(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function f(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=c(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?t:f(u(t))}var l=n&&!(!window.MSInputMethodContext||!document.documentMode),p=n&&/MSIE 10/.test(navigator.userAgent);function A(t){return 11===t?l:10===t?p:l||p}function d(t){if(!t)return document.documentElement;for(var e=A(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===c(n,"position")?d(n):n:t?t.ownerDocument.documentElement:document.documentElement}function h(t){return null!==t.parentNode?h(t.parentNode):t}function v(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?t:e,o=n?e:t,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a,s,c=i.commonAncestorContainer;if(t!==c&&e!==c||r.contains(o))return"BODY"===(s=(a=c).nodeName)||"HTML"!==s&&d(a.firstElementChild)!==a?d(c):c;var u=h(t);return u.host?v(u.host,e):v(t,h(e).host)}function g(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===e?"scrollTop":"scrollLeft",r=t.nodeName;if("BODY"===r||"HTML"===r){var o=t.ownerDocument.documentElement,i=t.ownerDocument.scrollingElement||o;return i[n]}return t[n]}function m(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=g(e,"top"),o=g(e,"left"),i=n?-1:1;return t.top+=r*i,t.bottom+=r*i,t.left+=o*i,t.right+=o*i,t}function y(t,e){var n="x"===e?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"],10)+parseFloat(t["border"+r+"Width"],10)}function b(t,e,n,r){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],A(10)?parseInt(n["offset"+t])+parseInt(r["margin"+("Height"===t?"Top":"Left")])+parseInt(r["margin"+("Height"===t?"Bottom":"Right")]):0)}function x(t){var e=t.body,n=t.documentElement,r=A(10)&&getComputedStyle(n);return{height:b("Height",e,n,r),width:b("Width",e,n,r)}}var w=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},E=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),_=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},O=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function I(t){return O({},t,{right:t.left+t.width,bottom:t.top+t.height})}function C(t){var e={};try{if(A(10)){e=t.getBoundingClientRect();var n=g(t,"top"),r=g(t,"left");e.top+=n,e.left+=r,e.bottom+=n,e.right+=r}else e=t.getBoundingClientRect()}catch(t){}var o={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},i="HTML"===t.nodeName?x(t.ownerDocument):{},a=i.width||t.clientWidth||o.right-o.left,s=i.height||t.clientHeight||o.bottom-o.top,u=t.offsetWidth-a,f=t.offsetHeight-s;if(u||f){var l=c(t);u-=y(l,"x"),f-=y(l,"y"),o.width-=u,o.height-=f}return I(o)}function S(t,e){var n=arguments.length>2&&void 0!==a
/**
* @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/e.a={before:function(){this.$slots.default&&""!==this.text.trim()||(o.a.util.warn("".concat(this.$options.name," cannot be empty and requires a meaningful text content"),this),this.$destroy(),this.$el.remove())},beforeUpdate:function(){this.text=this.getText()},data:function(){return{text:this.getText()}},computed:{isLongText:function(){return this.text&&this.text.trim().length>20}},methods:{getText:function(){return this.$slots.default?this.$slots.default[0].text.trim():""}}}},16:function(t,e){t.exports=n(117)},17:function(t,e){t.exports=n(236)},18:function(t,e){t.exports=n(440)},2:function(t,e,n){"use strict";function r(t,e){for(var n=[],r={},o=0;o<e.length;o++){var i=e[o],a=i[0],s={id:t+":"+o,css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}n.r(e),n.d(e,"default",(function(){return A}));var o="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},a=o&&(document.head||document.getElementsByTagName("head")[0]),s=null,c=0,u=!1,f=function(){},l=null,p="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function A(t,e,n,o){u=n,l=o||{};var a=r(t,e);return d(a),function(e){for(var n=[],o=0;o<a.length;o++){var s=a[o];(c=i[s.id]).refs--,n.push(c)}for(e?d(a=r(t,e)):a=[],o=0;o<n.length;o++){var c;if(0===(c=n[o]).refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete i[c.id]}}}}function d(t){for(var e=0;e<t.length;e++){var n=t[e],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(v(n.parts[o]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(o=0;o<n.parts.length;o++)a.push(v(n.parts[o]));i[n.id]={id:n.id,refs:1,parts:a}}}}function h(){var t=document.createElement("style");return t.type="text/css",a.appendChild(t),t}function v(t){var e,n,r=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(r){if(u)return f;r.parentNode.removeChild(r)}if(p){var o=c++;r=s||(s=h()),e=y.bind(null,r,o,!1),n=y.bind(null,r,o,!0)}else r=h(),e=b.bind(null,r),n=function(){r.parentNode.removeChild(r)};return e(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;e(t=r)}else n()}}var g,m=(g=[],function(t,e){return g[t]=e,g.filter(Boolean).join("\n")});function y(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=m(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}function b(t,e){var n=e.css,r=e.media,o=e.sourceMap;if(r&&t.setAttribute("media",r),l.ssrId&&t.setAttribute("data-vue-ssr-id",e.id),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}},23:function(t,e){t.exports=n(443)},24:function(t,e){t.exports=n(444)},26:function(t,e,n){"use strict";n(16),n(3),n(17),n(18),n(23);var r=n(14),o=(n(6),function(t,e){for(var n=t.$parent;n;){if(n.$options.name===e)return n;n=n.$parent}});e.a={mixins:[r.a],props:{icon:{type:String,default:""},title:{type:String,default:""},closeAfterClick:{type:Boolean,default:!1}},computed:{isIconUrl:function(){try{return new URL(this.icon)}catch(t){return!1}}},methods:{onClick:function(t){if(this.$emit("click",t),this.closeAfterClick){var e=o(this,"Actions");e&&e.closeMenu&&e.closeMenu()}}}}},3:function(t,e){t.exports=n(434)},43:function(t,e,n){var r=n(116);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals),(0,n(2).default)("4a580912",r,!0,{})},5:function(t,e){t.exports=n(16)},51:function(t,e,n){"use strict";var r={name:"ActionButton",mixins:[n(26).a],props:{disabled:{type:Boolean,default:!1}},computed:{isFocusable:function(){return!this.disabled}}},o=(n(1
/**
* @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
e.default=r.a}})},function(t,e){t.exports={}},function(t,e,n){var r=n(540),o=n(671),i=o?function(t,e){return o.set(t,e),t}:r;t.exports=i},function(t,e,n){var r=n(672),o=r&&new r;t.exports=o},function(t,e,n){var r=n(431)(n(106),"WeakMap");t.exports=r},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(4))},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(676),o=n(677),i=n(759),a=n(548),s=n(678),c=n(685),u=n(776),f=n(651),l=n(106);t.exports=function t(e,n,p,A,d,h,v,g,m,y){var b=128&n,x=1&n,w=2&n,E=24&n,_=512&n,O=w?void 0:a(e);return function I(){for(var C=arguments.length,S=Array(C),T=C;T--;)S[T]=arguments[T];if(E)var j=c(I),M=i(S,j);if(A&&(S=r(S,A,d,E)),h&&(S=o(S,h,v,E)),C-=M,E&&C<y){var L=f(S,j);return s(e,n,t,I.placeholder,p,S,L,g,m,y-C)}var R=x?p:this,B=w?R[e]:e;return C=S.length,g?S=u(S,g):_&&C>1&&S.reverse(),b&&m<C&&(S.length=m),this&&this!==l&&this instanceof I&&(B=O||a(B)),B.apply(R,S)}}},function(t,e){var n=Math.max;t.exports=function(t,e,r,o){for(var i=-1,a=t.length,s=r.length,c=-1,u=e.length,f=n(a-s,0),l=Array(u+f),p=!o;++c<u;)l[c]=e[c];for(;++i<s;)(p||i<a)&&(l[r[i]]=t[i]);for(;f--;)l[c++]=t[i++];return l}},function(t,e){var n=Math.max;t.exports=function(t,e,r,o){for(var i=-1,a=t.length,s=-1,c=r.length,u=-1,f=e.length,l=n(a-c,0),p=Array(l+f),A=!o;++i<l;)p[i]=t[i];for(var d=i;++u<f;)p[d+u]=e[u];for(;++s<c;)(A||i<a)&&(p[d+r[s]]=t[i++]);return p}},function(t,e,n){var r=n(760),o=n(681),i=n(683);t.exports=function(t,e,n,a,s,c,u,f,l,p){var A=8&e;e|=A?32:64,4&(e&=~(A?64:32))||(e&=-4);var d=[t,e,s,A?c:void 0,A?u:void 0,A?void 0:c,A?void 0:u,f,l,p],h=n.apply(void 0,d);return r(t)&&o(h,d),h.placeholder=a,i(h,t,e)}},function(t,e,n){var r=n(671),o=n(761),i=r?function(t){return r.get(t)}:o;t.exports=i},function(t,e,n){var r=n(549),o=n(648);function i(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}i.prototype=r(o.prototype),i.prototype.constructor=i,t.exports=i},function(t,e,n){var r=n(670),o=n(682)(r);t.exports=o},function(t,e){var n=Date.now;t.exports=function(t){var e=0,r=0;return function(){var o=n(),i=16-(o-r);if(r=o,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(766),o=n(767),i=n(649),a=n(770);t.exports=function(t,e,n){var s=e+"";return i(t,o(s,a(r(s),n)))}},function(t,e,n){var r=n(431),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e){t.exports=function(t){return t.placeholder}},function(t,e,n){var r=n(779);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e,n){var r=n(552),o=n(541);t.exports=function(t,e){return t&&r(e,o(e),t)}},function(t,e,n){var r=n(689),o=n(553),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];i.call(t,e)&&o(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(684);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){var r=n(781),o=n(652),i=n(113),a=n(653),s=n(551),c=n(691),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),f=!n&&o(t),l=!n&&!f&&a(t),p=!n&&!f&&!l&&c(t),A=n||f||l||p,d=A?r(t.length,String):[],h=d.length;for(var v in t)!e&&!u.call(t,v)||A&&("length"==v||l&&("offset"==v||"parent"==v)||p&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,h))||d.push(v);return d}},function(t,e,n){var r=n(784),o=n(554),i=n(655),a=i&&i.isTypedArray,s=a?o(a):r;t.exports=s},function(t,e,n){var r=n(656),o=n(785),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){var r=n(657),o=n(650),i=n(688),a=n(687),s=n(809),c=n(812),u=n(550),f=n(813),l=n(815),p=n(698),A=n(816),d=n(543),h=n(820),v=n(821),g=n(826),m=n(113),y=n(
/**
* @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>
*
* @author Julius Härtl <jus@bitgrid.net>
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
r.VTooltip.options.defaultTemplate='<div class="vue-tooltip" role="tooltip" data-v-'.concat("2c44938",'><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'),r.VTooltip.options.defaultHtml=!1,e.default=r.VTooltip},,,function(t,e){t.exports=n(439)},,,,function(t,e){t.exports=n(237)},function(t,e){t.exports=n(441)},function(t,e){t.exports=n(442)},function(t,e,n){"use strict";n(3),n(19),n(21),n(28),e.a=function(t){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,t||5)}},,,,,function(t,e){t.exports=n(445)},function(t,e){t.exports=n(446)},,,,,,function(t,e,n){var r=n(80);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals),(0,n(2).default)("0a304400",r,!0,{})},,,,function(t,e,n){"use strict";n(27),n(52),n(20);var r=n(15),o=n(12),i=n(22),a=(n(77),function(t){var e=t.getBoundingClientRect(),n=document.documentElement.clientHeight,r=document.documentElement.clientWidth,o=Object.assign({});return o.top=e.top<0,o.left=e.left<0,o.bottom=e.bottom>n,o.right=e.right>r,o.any=o.top||o.left||o.bottom||o.right,o.all=o.top&&o.left&&o.bottom&&o.right,o.offsetY=o.top?e.top:o.bottom?e.bottom-n:0,o.offsetX=o.left?e.left:o.right?e.right-r:0,o}),s=(n(74),n(78),n(6),n(75),n(5)),c=n.n(s),u=function(t,e,n){void 0!==t&&t.forEach((function(r,o){var i=!r.componentOptions&&r.tag&&-1===e.indexOf(r.tag),a=!!r.componentOptions&&"string"==typeof r.componentOptions.tag&&-1===e.indexOf(r.componentOptions.tag);(i||a)&&(c.a.util.warn("".concat(i?r.tag:r.componentOptions.tag," is not allowed inside the ").concat(n.$options.name," component"),n),t.splice(o,1))}))},f=["ActionButton","ActionCheckbox","ActionInput","ActionLink","ActionRadio","ActionRouter","ActionSeparator","ActionText","ActionTextEditable"],l={name:"Actions",directives:{ClickOutside:r.directive,tooltip:o.default},props:{open:{type:Boolean,default:!1},forceMenu:{type:Boolean,default:!1},menuAlign:{type:String,default:"center",validator:function(t){return["left","center","right"].indexOf(t)>-1}},defaultIcon:{type:String,default:"action-item__menutoggle--default-icon"}},data:function(){return{actions:[],opened:this.open,focusIndex:0,randomId:"menu-"+Object(i.a)(),offsetX:0,offsetY:0,offsetYArrow:0,rotateArrow:!1,children:this.$children}},computed:{hasMultipleActions:function(){return this.actions.length>1},isValidSingleAction:function(){return 1===this.actions.length&&null!==this.firstActionElement},firstActionVNode:function(){return this.actions[0]},firstAction:function(){return this.children[0]?this.children[0]:{}},firstActionBinding:function(){if(this.firstActionVNode&&this.firstActionVNode.componentOptions){var t=this.firstActionVNode.componentOptions.tag;if("ActionLink"===t)return{is:"a",href:this.firstAction.href,target:this.firstAction.target};if("ActionRouter"===t)return{is:"router-link",to:this.firstAction.to,exact:this.firstAction.exact};if("ActionButton"===t)return{is:"button"}}return null},firstActionEvent:function(){return this.firstActionVNode&&this.firstActionVNode.componentOptions&&this.firstActionVNode.componentOptions.listeners&&this.firstActionVNode.componentOptions.listeners.click},firstActionEventBinding:function(){return this.firstActionEvent?"click":null},firstActionClass:function(){var t=this.firstActionVNode&&this.firstActionVNode.data.staticClass,e=this.firstActionVNode&&this.firstActionVNode.data.class;return"".concat(t," ").concat(e)}},watch:{open:function(t){var e=this;this.opened=t,this.opened&&this.$nextTick((function(){e.onOpen()}))}},beforeMount:function(){this.initActions(),u(this.$slots.default,f,this)},beforeUpdate:function(){this.initActions(),u(this.$slots.default,f,this)},methods:{toggleMenu:function(t){var e=this;this.opened=!this.opened,this.opened?(this.$nextTick((function(){e.onOpen(),e.focusFirstAction()})),this.$emit("open",t)):(this.offsetX=0,this.offsetY=0,this.offsetYArrow=0,this.rotateArrow=!1),this.$emit("update:open",this.opened)},closeMenu:function(t){this.opened&&(this.$emit("update:open",!1),this.$emit("close",t)),this.opened=!1,this.offsetX=0,this.offsetY=0,this.offsetYArrow=0,this.rotateArrow
/**
* @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
*
* @author John Molakvoæ <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
e.default=r.a},,,,,,,,,,,,,,,,function(t,e){t.exports=n(448)},function(t,e){t.exports=n(449)},,function(t,e){t.exports=n(450)},function(t,e){t.exports=n(451)},function(t,e,n){"use strict";var r=n(34);n.n(r).a},function(t,e,n){var r=n(1),o=n(7),i=n(8),a=n(9),s=n(10),c=n(11);e=r(!1);var u=o(i),f=o(a),l=o(s),p=o(c);e.push([t.i,'@font-face{font-family:"iconfont-vue-2c44938";src:url('+u+");src:url("+u+') format("embedded-opentype"),url('+f+') format("woff"),url('+l+') format("truetype"),url('+p+') format("svg")}.icon[data-v-5acb084b]{font-style:normal;font-weight:400}.icon.arrow-left-double[data-v-5acb084b]:before{font-family:"iconfont-vue-2c44938";content:""}.icon.arrow-left[data-v-5acb084b]:before{font-family:"iconfont-vue-2c44938";content:""}.icon.arrow-right-double[data-v-5acb084b]:before{font-family:"iconfont-vue-2c44938";content:""}.icon.arrow-right[data-v-5acb084b]:before{font-family:"iconfont-vue-2c44938";content:""}.icon.checkmark[data-v-5acb084b]:before{font-family:"iconfont-vue-2c44938";content:""}.icon.close[data-v-5acb084b]:before{font-family:"iconfont-vue-2c44938";content:""}.icon.confirm[data-v-5acb084b]:before{font-family:"iconfont-vue-2c44938";content:""}.icon.menu[data-v-5acb084b]:before{font-family:"iconfont-vue-2c44938";content:""}.icon.more[data-v-5acb084b]:before{font-family:"iconfont-vue-2c44938";content:""}.icon.pause[data-v-5acb084b]:before{font-family:"iconfont-vue-2c44938";content:""}.icon.play[data-v-5acb084b]:before{font-family:"iconfont-vue-2c44938";content:""}.icon.triangle-s[data-v-5acb084b]:before{font-family:"iconfont-vue-2c44938";content:""}.action-item[data-v-5acb084b]{position:relative;display:inline-block}.action-item--single[data-v-5acb084b]:hover,.action-item--single[data-v-5acb084b]:focus,.action-item--single[data-v-5acb084b]:active,.action-item__menutoggle[data-v-5acb084b]:hover,.action-item__menutoggle[data-v-5acb084b]:focus,.action-item__menutoggle[data-v-5acb084b]:active{border-radius:22px;background-color:rgba(127,127,127,0.25) !important;opacity:1}.action-item.action-item--open .action-item__menutoggle[data-v-5acb084b]{opacity:1;border-radius:22px;background-color:rgba(127,127,127,0.25)}.action-item--single[data-v-5acb084b],.action-item__menutoggle[data-v-5acb084b]{box-sizing:border-box;width:44px;height:44px;margin:0;padding:14px;cursor:pointer;border:none;background-color:transparent}.action-item__menutoggle[data-v-5acb084b]{display:flex;align-items:center;justify-content:center;opacity:.7}.action-item__menutoggle[data-v-5acb084b]:before{content:\'\'}.action-item__menutoggle--default-icon[data-v-5acb084b]{font-size:16px}.action-item__menutoggle--default-icon[data-v-5acb084b]:before{font-family:"iconfont-vue-2c44938";font-style:normal;font-weight:400;content:""}.action-item--single[data-v-5acb084b]{opacity:.7}.action-item--single[data-v-5acb084b]:hover,.action-item--single[data-v-5acb084b]:focus,.action-item--single[data-v-5acb084b]:active{opacity:1}.action-item--single>[hidden][data-v-5acb084b]{display:none}.action-item--multiple[data-v-5acb084b]{position:relative}.action-item__menu[data-v-5acb084b]{position:absolute;z-index:110;right:50%;display:none;margin-bottom:10px;margin-top:-5px;transform:translateX(50%);color:var(--color-main-text);border-radius:var(--border-radius);background-color:var(--color-main-background);filter:drop-shadow(0 1px 3px var(--color-box-shadow))}.action-item__menu ul[data-v-5acb084b]>:not(li){display:none}.action-item__menu.open[data-v-5acb084b]{display:block}.action-item__menu .action-item__menu_arrow[data-v-5acb084b]{position:absolute;right:50%;bottom:100%;width:0;height:0;margin-right:-9px;content:\' \';pointer-events:none;border:solid transparent;border-width:9px;border-bottom-color:var(--color-main-background)}.action-item__menu.menu-right[data-v-5acb084b]{right:0;left:auto;transform:none}.action-item__menu.menu-right .action-item__menu_arrow[data-v-5acb084b]{right:13px;margin-right:0}.action-item__menu.menu-left[data-v-5acb084b]{right:auto;left:0;transform:none}.action-item__menu.menu-left .action-item__me
/**
* @copyright 2020, Roeland Jago Douma <roeland@famdouma.nl>
*
* @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/function g(){return(g=v(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=Object(d.generateUrl)("/settings/api/personal/webauthn/registration"),t.next=3,A.a.get(e);case 3:return n=t.sent,t.abrupt("return",n.data);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function m(t,e){return y.apply(this,arguments)}function y(){return(y=v(regeneratorRuntime.mark((function t(e,n){var r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object(d.generateUrl)("/settings/api/personal/webauthn/registration"),t.next=3,A.a.post(r,{name:e,data:n});case 3:return o=t.sent,t.abrupt("return",o.data);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function b(t){return x.apply(this,arguments)}function x(){return(x=v(regeneratorRuntime.mark((function t(e){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object(d.generateUrl)("/settings/api/personal/webauthn/registration/".concat(e)),t.next=3,A.a.delete(n);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function w(t,e,n,r,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,o)}function E(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var O=function(t){return function(e){return l.debug(t),e}},I=Object.freeze({READY:1,REGISTRATION:2,NAMING:3,PERSIST:4}),C={name:"AddDevice",props:{httpWarning:Boolean,isHttps:{type:Boolean,default:!1}},data:function(){return{name:"",credential:{},RegistrationSteps:I,step:I.READY}},methods:{arrayToBase64String:function(t){return btoa(String.fromCharCode.apply(String,E(t)))},start:function(){var t=this;return this.step=I.REGISTRATION,console.debug("Starting WebAuthn registration"),s()().then(this.getRegistrationData).then(this.register.bind(this)).then((function(){t.step=I.NAMING})).catch((function(e){console.error(e.name,e.message),t.step=I.READY}))},getRegistrationData:function(){console.debug("Fetching webauthn registration data");return function(){return g.apply(this,arguments)}().then((function(t){return console.debug(t),t.challenge=Uint8Array.from(function(t){var e=(t=t.replace(/-/g,"+").replace(/_/g,"/")).length%4;if(e){if(1===e)throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");t+=new Array(5-e).join("=")}return window.atob(t)}(t.challenge),(function(t){return t.charCodeAt(0)})),t.user.id=Uint8Array.from(t.user.id,(function(t){return t.charCodeAt(0)})),t})).catch((function(e){throw console.error("Error getting webauthn registration data from server",e),new Error(t("settings","Server error while trying to add webauthn device"))}))},register:function(t){var e=this;return console.debug("starting webauthn registration"),navigator.credentials.create({publicKey:t}).then((function(t){e.credential={id:t.id,type:t.type,rawId:e.arrayToBase64String(new Uint8Array(t.rawId)),response:{clientDataJSON:e.arrayToBase64String(new Uint8Array(t.response.clientDataJSON)),attestationObject:e.arrayToBase64String(new Uint8Array(t.response.attestationObject))}}}))},submit:function(){var t=this;return this.step=I.PERSIST,s()().then(O("confirmed password")).then(this.saveRegistrationData).then(O("registration data saved")).then((function(){return t.reset()})).then(O("app reset")).catch(conso
/**
* @copyright 2020, Roeland Jago Douma <roeland@famdouma.nl>
*
* @author Roeland Jago Douma <roeland@famdouma.nl>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
r.nc=btoa(OC.requestToken),o.default.prototype.t=t,new(o.default.extend(P))({propsData:{initialDevices:Object(i.loadState)("settings","webauthn-devices"),isHttps:"https:"===window.location.protocol,hasPublicKeyCredential:void 0!==window.PublicKeyCredential}}).$mount("#security-webauthn")}]);
//# sourceMappingURL=vue-settings-personal-webauthn.js.map?v=d605c4ac4dd34bbca8c3