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

160 lines
449 KiB
JavaScript
Raw Normal View History

!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/js/",n(n.s=648)}([function(e,t,n){var r=n(2),o=n(93),i=n(4),a=n(59),s=n(94),u=n(178),c=o("wks"),l=r.Symbol,p=u?l:l&&l.withoutSetter||a;e.exports=function(e){return i(c,e)||(s&&i(l,e)?c[e]=l[e]:c[e]=p("Symbol."+e)),c[e]}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(10))},function(e,t,n){var r=n(2),o=n(31).f,i=n(15),a=n(13),s=n(75),u=n(175),c=n(57);e.exports=function(e,t){var n,l,p,f,d,A=e.target,m=e.global,h=e.stat;if(n=m?r:h?r[A]||s(A,{}):(r[A]||{}).prototype)for(l in t){if(f=t[l],p=e.noTargetGet?(d=o(n,l))&&d.value:n[l],!c(m?l:A+(h?".":"#")+l,e.forced)&&void 0!==p){if(typeof f==typeof p)continue;u(f,p)}(e.sham||p&&p.sham)&&i(f,"sham",!0),a(n,l,f,e)}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(1);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(6);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){"use strict";var r=n(144),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===o.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:a,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:u,isStream:function(e){return s(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:c,merge:function e(){var t={};function n(n,r){"object"==typeof t[r]&&"object"==typeof n?t[r]=e(t[r],n):t[r]=n}for(var r=0,o=arguments.length;r<o;r++)c(arguments[r],n);return t},deepMerge:function e(){var t={};fun
/*!
* Vue.js v2.6.11
* (c) 2014-2019 Evan You
* Released under the MIT License.
*/
var r=Object.freeze({});function o(e){return null==e}function i(e){return null!=e}function a(e){return!0===e}function s(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function u(e){return null!==e&&"object"==typeof e}var c=Object.prototype.toString;function l(e){return"[object Object]"===c.call(e)}function p(e){return"[object RegExp]"===c.call(e)}function f(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function d(e){return i(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function A(e){return null==e?"":Array.isArray(e)||l(e)&&e.toString===c?JSON.stringify(e,null,2):String(e)}function m(e){var t=parseFloat(e);return isNaN(t)?e:t}function h(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}h("slot,component",!0);var v=h("key,ref,slot,slot-scope,is");function g(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}var y=Object.prototype.hasOwnProperty;function b(e,t){return y.call(e,t)}function x(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var w=/-(\w)/g,T=x((function(e){return e.replace(w,(function(e,t){return t?t.toUpperCase():""}))})),_=x((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),E=/\B([A-Z])/g,M=x((function(e){return e.replace(E,"-$1").toLowerCase()}));var C=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function S(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function I(e,t){for(var n in t)e[n]=t[n];return e}function O(e){for(var t={},n=0;n<e.length;n++)e[n]&&I(t,e[n]);return t}function N(e,t,n){}var j=function(e,t,n){return!1},L=function(e){return e};function k(e,t){if(e===t)return!0;var n=u(e),r=u(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var o=Array.isArray(e),i=Array.isArray(t);if(o&&i)return e.length===t.length&&e.every((function(e,n){return k(e,t[n])}));if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(o||i)return!1;var a=Object.keys(e),s=Object.keys(t);return a.length===s.length&&a.every((function(n){return k(e[n],t[n])}))}catch(e){return!1}}function B(e,t){for(var n=0;n<e.length;n++)if(k(e[n],t))return n;return-1}function P(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var R=["component","directive","filter"],D=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],F={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:j,isReservedAttr:j,isUnknownElement:j,getTagNamespace:N,parsePlatformTagName:L,mustUseProp:j,async:!0,_lifecycleHooks:D},U=/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 $(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var G=new RegExp("[^"+U.source+".$_\\d]");var z,Q="__proto__"in{},W="undefined"!=typeof window,Y="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,H=Y&&WXEnvironment.platform.toLowerCase(),Z=W&&window.navigator.userAgent.toLowerCase(),V=Z&&/msie|trident/.test(Z),K=Z&&Z.indexOf("msie 9.0")>0,q=Z&&Z.indexOf("edge/")>0,X=(Z&&Z.indexOf("android"),Z&&/iphone|ipad|ipod|ios/.test(Z)||"ios"===H),J=(Z&&/chrome\/\d+/.test(Z),Z&&/phantomjs/.test(Z),Z&&Z.match(/firefox\/(\d+)/)),ee={}.watch,te=!1;if(W)try{var ne={};Object.defineProperty(ne,"passive",{get:function(){te=!0}}),window.addEventListener("test-passive",null,ne)}catch(e){}var re=function(){return void 0===z&&(z=!W&&!Y&&void 0!==e&&(e.process&&"server"===e.process.env.VUE_ENV)),z},oe=W&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ie(e){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(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),o))}};function s(e){return e&&"[object Function]"==={}.toString.call(e)}function u(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function c(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function l(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=u(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?e:l(c(e))}var p=n&&!(!window.MSInputMethodContext||!document.documentMode),f=n&&/MSIE 10/.test(navigator.userAgent);function d(e){return 11===e?p:10===e?f:p||f}function A(e){if(!e)return document.documentElement;for(var t=d(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===u(n,"position")?A(n):n:e?e.ownerDocument.documentElement:document.documentElement}function m(e){return null!==e.parentNode?m(e.parentNode):e}function h(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a,s,u=i.commonAncestorContainer;if(e!==u&&t!==u||r.contains(o))return"BODY"===(s=(a=u).nodeName)||"HTML"!==s&&A(a.firstElementChild)!==a?A(u):u;var c=m(e);return c.host?h(c.host,t):h(e,m(t).host)}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var o=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||o;return i[n]}return e[n]}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=v(t,"top"),o=v(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}function y(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+r+"Width"],10)}function b(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],d(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function x(e){var t=e.body,n=e.documentElement,r=d(10)&&getComputedStyle(n);return{height:b("Height",t,n,r),width:b("Width",t,n,r)}}var w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},T=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function M(e){return E({},e,{right:e.left+e.width,bottom:e.top+e.height})}function C(e){var t={};try{if(d(10)){t=e.getBoundingClientRect();var n=v(e,"top"),r=v(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?x(e.ownerDocument):{},a=i.width||e.clientWidth||o.right-o.left,s=i.height||e.clientHeight||o.bottom-o.top,c=e.offsetWidth-a,l=e.offsetHeight-s;if(c||l){var p=u(e);c-=y(p,"x"),l-=y(p,"y"),o.width-=c,o.height-=l}return M(o)}function S(e,t){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/>.
*
*/t.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():""}}}},18:function(e,t){e.exports=n(55)},19:function(e,t){e.exports=n(86)},2:function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},o=0;o<t.length;o++){var i=t[o],a=i[0],s={id:e+":"+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(t),n.d(t,"default",(function(){return d}));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,u=0,c=!1,l=function(){},p=null,f="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function d(e,t,n,o){c=n,p=o||{};var a=r(e,t);return A(a),function(t){for(var n=[],o=0;o<a.length;o++){var s=a[o];(u=i[s.id]).refs--,n.push(u)}for(t?A(a=r(e,t)):a=[],o=0;o<n.length;o++){var u;if(0===(u=n[o]).refs){for(var c=0;c<u.parts.length;c++)u.parts[c]();delete i[u.id]}}}}function A(e){for(var t=0;t<e.length;t++){var n=e[t],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(h(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(h(n.parts[o]));i[n.id]={id:n.id,refs:1,parts:a}}}}function m(){var e=document.createElement("style");return e.type="text/css",a.appendChild(e),e}function h(e){var t,n,r=document.querySelector('style[data-vue-ssr-id~="'+e.id+'"]');if(r){if(c)return l;r.parentNode.removeChild(r)}if(f){var o=u++;r=s||(s=m()),t=y.bind(null,r,o,!1),n=y.bind(null,r,o,!0)}else r=m(),t=b.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}var v,g=(v=[],function(e,t){return v[e]=t,v.filter(Boolean).join("\n")});function y(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=g(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function b(e,t){var n=t.css,r=t.media,o=t.sourceMap;if(r&&e.setAttribute("media",r),p.ssrId&&e.setAttribute("data-vue-ssr-id",t.id),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},20:function(e,t){e.exports=n(163)},24:function(e,t){e.exports=n(292)},26:function(e,t,n){"use strict";n(18),n(4),n(19),n(20),n(24);var r=n(16),o=(n(12),function(e,t){for(var n=e.$parent;n;){if(n.$options.name===t)return n;n=n.$parent}});t.a={mixins:[r.a],props:{icon:{type:String,default:""},title:{type:String,default:""},closeAfterClick:{type:Boolean,default:!1},ariaLabel:{type:String,default:""}},computed:{isIconUrl:function(){try{return new URL(this.icon)}catch(e){return!1}}},methods:{onClick:function(e){if(this.$emit("click",e),this.closeAfterClick){var t=o(this,"Actions");t&&t.closeMenu&&t.closeMenu()}}}}},28:function(e,t){e.exports=n(293)},4:function(e,t){e.exports=n(80)},47:function(e,t,n){var r=n(127);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals),(0,n(2).default)("75b9f902",r,!0,{})},5:function(e,t){e.exports=n(16)},54:function(e,t){},70:function(e,t,n){"use strict";var r={name:"ActionButton",mixins:[n(26).a],props:{disabled:{type:Boolean,default:!1}},computed:{i
/**
* @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/>.
*
*/t.default=r.a}})},function(e,t){e.exports={}},function(e,t,n){var r=n(315),o=n(410),i=o?function(e,t){return o.set(e,t),e}:r;e.exports=i},function(e,t,n){var r=n(411),o=r&&new r;e.exports=o},function(e,t,n){var r=n(281)(n(85),"WeakMap");e.exports=r},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(10))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(415),o=n(416),i=n(498),a=n(323),s=n(417),u=n(424),c=n(515),l=n(390),p=n(85);e.exports=function e(t,n,f,d,A,m,h,v,g,y){var b=128&n,x=1&n,w=2&n,T=24&n,_=512&n,E=w?void 0:a(t);return function M(){for(var C=arguments.length,S=Array(C),I=C;I--;)S[I]=arguments[I];if(T)var O=u(M),N=i(S,O);if(d&&(S=r(S,d,A,T)),m&&(S=o(S,m,h,T)),C-=N,T&&C<y){var j=l(S,O);return s(t,n,e,M.placeholder,f,S,j,v,g,y-C)}var L=x?f:this,k=w?L[t]:t;return C=S.length,v?S=c(S,v):_&&C>1&&S.reverse(),b&&g<C&&(S.length=g),this&&this!==p&&this instanceof M&&(k=E||a(k)),k.apply(L,S)}}},function(e,t){var n=Math.max;e.exports=function(e,t,r,o){for(var i=-1,a=e.length,s=r.length,u=-1,c=t.length,l=n(a-s,0),p=Array(c+l),f=!o;++u<c;)p[u]=t[u];for(;++i<s;)(f||i<a)&&(p[r[i]]=e[i]);for(;l--;)p[u++]=e[i++];return p}},function(e,t){var n=Math.max;e.exports=function(e,t,r,o){for(var i=-1,a=e.length,s=-1,u=r.length,c=-1,l=t.length,p=n(a-u,0),f=Array(p+l),d=!o;++i<p;)f[i]=e[i];for(var A=i;++c<l;)f[A+c]=t[c];for(;++s<u;)(d||i<a)&&(f[A+r[s]]=e[i++]);return f}},function(e,t,n){var r=n(499),o=n(420),i=n(422);e.exports=function(e,t,n,a,s,u,c,l,p,f){var d=8&t;t|=d?32:64,4&(t&=~(d?64:32))||(t&=-4);var A=[e,t,s,d?u:void 0,d?c:void 0,d?void 0:u,d?void 0:c,l,p,f],m=n.apply(void 0,A);return r(e)&&o(m,A),m.placeholder=a,i(m,e,t)}},function(e,t,n){var r=n(410),o=n(500),i=r?function(e){return r.get(e)}:o;e.exports=i},function(e,t,n){var r=n(324),o=n(387);function i(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}i.prototype=r(o.prototype),i.prototype.constructor=i,e.exports=i},function(e,t,n){var r=n(409),o=n(421)(r);e.exports=o},function(e,t){var n=Date.now;e.exports=function(e){var t=0,r=0;return function(){var o=n(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){var r=n(505),o=n(506),i=n(388),a=n(509);e.exports=function(e,t,n){var s=t+"";return i(e,o(s,a(r(s),n)))}},function(e,t,n){var r=n(281),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t){e.exports=function(e){return e.placeholder}},function(e,t,n){var r=n(518);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},function(e,t,n){var r=n(327),o=n(316);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(428),o=n(328),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(423);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(520),o=n(391),i=n(97),a=n(392),s=n(326),u=n(430),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),l=!n&&o(e),p=!n&&!l&&a(e),f=!n&&!l&&!p&&u(e),d=n||l||p||f,A=d?r(e.length,String):[],m=A.length;for(var h in e)!t&&!c.call(e,h)||d&&("length"==h||p&&("offset"==h||"parent"==h)||f&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||s(h,m))||A.push(h);return A}},function(e,t,n){var r=n(523),o=n(329),i=n(394),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(395),o=n(524),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(396),o=n(389),i=n(427),a=n(426),s=n(548),u=n(551),c=n(325),l=n(552),p=n(554),f=n(437),d=n(555),A=n(318),m=n(559),h=n(560),v=n(565),g=n(97),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("e1f55ce",'><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'),r.VTooltip.options.defaultHtml=!1,t.default=r.VTooltip},function(e,t){e.exports=n(288)},function(e,t){e.exports=n(291)},,function(e,t,n){"use strict";n(4),n(21),n(23),n(30),t.a=function(e){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,e||5)}},,,,function(e,t){e.exports=n(103)},function(e,t){e.exports=n(289)},function(e,t){e.exports=n(186)},,function(e,t){e.exports=n(87)},,function(e,t){e.exports=n(290)},,function(e,t,n){var r=n(67);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals),(0,n(2).default)("640a212a",r,!0,{})},function(e,t){e.exports=n(187)},function(e,t,n){"use strict";n(25),n(15),n(65),n(12);var r=n(5),o=n.n(r);t.a=function(e,t,n){if(void 0!==e)for(var r=e.length-1;r>=0;r--){var i=e[r],a=!i.componentOptions&&i.tag&&-1===t.indexOf(i.tag),s=!!i.componentOptions&&"string"==typeof i.componentOptions.tag,u=s&&-1===t.indexOf(i.componentOptions.tag);(a||!s||u)&&((a||u)&&o.a.util.warn("".concat(a?i.tag:i.componentOptions.tag," is not allowed inside the ").concat(n.$options.name," component"),n),e.splice(r,1))}}},,,,,,function(e,t){},function(e,t,n){"use strict";n.r(t);var r=n(43);
/**
* @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/>.
*
*/t.default=r.a},,function(e,t,n){var r=n(41);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals),(0,n(2).default)("941c791e",r,!0,{})},function(e,t,n){(t=n(1)(!1)).push([e.i,".vue-tooltip[data-v-e1f55ce]{position:absolute;z-index:100000;right:auto;left:auto;display:block;margin:0;margin-top:-3px;padding:10px 0;text-align:left;text-align:start;white-space:normal;text-decoration:none;letter-spacing:normal;word-spacing:normal;text-transform:none;word-wrap:normal;word-break:normal;opacity:0;text-shadow:none;font-family:'Nunito', 'Open Sans', Frutiger, Calibri, 'Myriad Pro', Myriad, sans-serif;font-size:12px;font-weight:normal;font-style:normal;line-height:1.6;line-break:auto;filter:drop-shadow(0 1px 10px var(--color-box-shadow))}.vue-tooltip[data-v-e1f55ce][x-placement^='top'] .tooltip-arrow{bottom:0;margin-top:0;margin-bottom:0;border-width:10px 10px 0 10px;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}.vue-tooltip[data-v-e1f55ce][x-placement^='bottom'] .tooltip-arrow{top:0;margin-top:0;margin-bottom:0;border-width:0 10px 10px 10px;border-top-color:transparent;border-right-color:transparent;border-left-color:transparent}.vue-tooltip[data-v-e1f55ce][x-placement^='right'] .tooltip-arrow{right:100%;margin-right:0;margin-left:0;border-width:10px 10px 10px 0;border-top-color:transparent;border-bottom-color:transparent;border-left-color:transparent}.vue-tooltip[data-v-e1f55ce][x-placement^='left'] .tooltip-arrow{left:100%;margin-right:0;margin-left:0;border-width:10px 0 10px 10px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent}.vue-tooltip[data-v-e1f55ce][aria-hidden='true']{visibility:hidden;transition:opacity .15s, visibility .15s;opacity:0}.vue-tooltip[data-v-e1f55ce][aria-hidden='false']{visibility:visible;transition:opacity .15s;opacity:1}.vue-tooltip[data-v-e1f55ce] .tooltip-inner{max-width:350px;padding:5px 8px;text-align:center;color:var(--color-main-text);border-radius:var(--border-radius);background-color:var(--color-main-background)}.vue-tooltip[data-v-e1f55ce] .tooltip-arrow{position:absolute;z-index:1;width:0;height:0;margin:0;border-style:solid;border-color:var(--color-main-background)}\n",""]),e.exports=t},,function(e,t,n){"use strict";n(25),n(46),n(15);var r=n(14),o=n(13),i=n(17),a=(n(64),function(e){var t=e.getBoundingClientRect(),n=document.documentElement.clientHeight,r=document.documentElement.clientWidth,o=Object.assign({});return o.top=t.top<0,o.left=t.left<0,o.bottom=t.bottom>n,o.right=t.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?t.top:o.bottom?t.bottom-n:0,o.offsetX=o.left?t.left:o.right?t.right-r:0,o}),s=n(31),u=n(6),c=["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(e){return["left","center","right"].indexOf(e)>-1}},defaultIcon:{type:String,default:"action-item__menutoggle--default-icon"},ariaLabel:{type:String,default:Object(u.b)("Actions")}},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 e=this.firstActionVNode.componentOptions.tag;if("ActionLink"===e)return{is:"a",href:this.firstAction.href,target:this.firstAction.target,"aria-label":this.firstAction.ariaLabel};if("ActionRouter"===e)return{is:"router-link",to:this.firstAction.to,exact:this.fi
/**
* @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 v(){return(v=h(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Object(A.generateUrl)("/settings/api/personal/webauthn/registration"),e.next=3,d.a.get(t);case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e,t){return y.apply(this,arguments)}function y(){return(y=h(regeneratorRuntime.mark((function e(t,n){var r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(A.generateUrl)("/settings/api/personal/webauthn/registration"),e.next=3,d.a.post(r,{name:t,data:n});case 3:return o=e.sent,e.abrupt("return",o.data);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return x.apply(this,arguments)}function x(){return(x=h(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(A.generateUrl)("/settings/api/personal/webauthn/registration/".concat(t)),e.next=3,d.a.delete(n);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function T(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _(e,t)}(e)||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 _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var E=function(e){return function(t){return p.debug(e),t}},M=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:M,step:M.READY}},methods:{arrayToBase64String:function(e){return btoa(String.fromCharCode.apply(String,T(e)))},start:function(){var e=this;return this.step=M.REGISTRATION,console.debug("Starting WebAuthn registration"),s()().then(this.getRegistrationData).then(this.register.bind(this)).then((function(){e.step=M.NAMING})).catch((function(t){console.error(t.name,t.message),e.step=M.READY}))},getRegistrationData:function(){console.debug("Fetching webauthn registration data");return function(){return v.apply(this,arguments)}().then((function(e){return console.debug(e),e.challenge=Uint8Array.from(function(e){var t=(e=e.replace(/-/g,"+").replace(/_/g,"/")).length%4;if(t){if(1===t)throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");e+=new Array(5-t).join("=")}return window.atob(e)}(e.challenge),(function(e){return e.charCodeAt(0)})),e.user.id=Uint8Array.from(e.user.id,(function(e){return e.charCodeAt(0)})),e})).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(e){var t=this;return console.debug("starting webauthn registration"),navigator.credentials.create({publicKey:e}).then((function(e){t.credential={id:e.id,type:e.type,rawId:t.arrayToBase64String(new Uint8Array(e.rawId)),response:{clientDataJSON:t.arrayToBase64String(new Uint8Array(e.response.clientDataJSON)),attestationObject:t.arrayToBase64String(new Uint8Array(e.response.attestationObject))}}}))},submit:function(){var e=this;return this.step=M.PERSIST,s()().then(E("confirmed password")).then(this.saveRegistrationData).then(E("registration data saved")).then((function(){return e.reset()})).then(E("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(D))({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=3d51d164bcd0ac6aea32