diff --git a/app/ecolyo.30775b7fee7a86845127.js b/app/ecolyo.7de989f53833d15d9716.js similarity index 99% rename from app/ecolyo.30775b7fee7a86845127.js rename to app/ecolyo.7de989f53833d15d9716.js index ca5c1bf0cba52bd9ac2ecc4f0c00ae859c8809f8..43fd7fa1b8b974104d6fcbddc0dc07c1b7c02341 100644 --- a/app/ecolyo.30775b7fee7a86845127.js +++ b/app/ecolyo.7de989f53833d15d9716.js @@ -610,6 +610,8 @@ var _cozyClient = _interopRequireWildcard(__webpack_require__("SH7X")); var _oauth = __webpack_require__("sDS3"); +var _cozyIntent = __webpack_require__("qvEe"); + var _I18n = __webpack_require__("buk/"); var _doctypes = _interopRequireDefault(__webpack_require__("D2hQ")); @@ -630,6 +632,8 @@ var _environment = _interopRequireDefault(__webpack_require__("X6DI")); var _store = _interopRequireDefault(__webpack_require__("BhN1")); +var _cozyBar = _interopRequireDefault(__webpack_require__("0mAb")); + var _logger = _interopRequireDefault(__webpack_require__("gjtA")); var _matomoTracker = _interopRequireDefault(__webpack_require__("vMBp")); @@ -670,7 +674,8 @@ var setupApp = (0, _lodash.memoize)(function () { var envService = new _environment.default(); var isLocal = envService.isLocal(); var development = envService.isDev(); - cozy.bar.init({ + + _cozyBar.default.init({ appName: data.app.name, appEditor: data.app.editor, cozyClient: client, @@ -678,8 +683,10 @@ var setupApp = (0, _lodash.memoize)(function () { lang: data.locale, replaceTitleOnMobile: false, appSlug: data.app.slug, - appNamePrefix: data.app.prefix + appNamePrefix: data.app.prefix, + isInvertedTheme: true }); + var tracker; if (window.Piwik) { @@ -731,7 +738,9 @@ var init = function init() { var App = __webpack_require__("w0Hc").default; - (0, _reactDom.render)( /*#__PURE__*/_react2.default.createElement(_reactRedux.Provider, { + (0, _reactDom.render)( /*#__PURE__*/_react2.default.createElement(_cozyIntent.WebviewIntentProvider, { + setBarContext: _cozyBar.default.setWebviewContext + }, /*#__PURE__*/_react2.default.createElement(_reactRedux.Provider, { store: store }, /*#__PURE__*/_react2.default.createElement(_cozyClient.CozyProvider, { client: client @@ -740,7 +749,7 @@ var init = function init() { polyglot: polyglot }, /*#__PURE__*/_react2.default.createElement(_reactRouterDom.HashRouter, history, /*#__PURE__*/_react2.default.createElement(App, { tracker: tracker - }))))), root); + })))))), root); }; // initial rendering of the application @@ -2498,6 +2507,76 @@ exports.default = _default; /***/ }), +/***/ "0mAb": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +__webpack_require__("lNS+"); + +var cozyBar = _interopRequireWildcard(__webpack_require__("9jFK")); + +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== "function") return null; + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} + +function _interopRequireWildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) { + return obj; + } + + if (obj === null || typeof obj !== "object" && typeof obj !== "function") { + return { + default: obj + }; + } + + var cache = _getRequireWildcardCache(nodeInterop); + + if (cache && cache.has(obj)) { + return cache.get(obj); + } + + var newObj = {}; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + + for (var key in obj) { + if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; + + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; + } + } + } + + newObj.default = obj; + + if (cache) { + cache.set(obj, newObj); + } + + return newObj; +} + +var _default = cozyBar; +exports.default = _default; + +/***/ }), + /***/ "0q55": /***/ (function(module, exports, __webpack_require__) { @@ -10422,6 +10501,8 @@ var _reactRouterDom = __webpack_require__("SOjZ"); var _modal = __webpack_require__("oKH6"); +var _cozyBar = _interopRequireDefault(__webpack_require__("0mAb")); + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } @@ -10439,10 +10520,9 @@ var CozyBar = function CozyBar(_ref) { var navigate = (0, _reactRouterDom.useNavigate)(); var dispatch = (0, _reactRedux.useDispatch)(); - var _cozy$bar = cozy.bar, - BarLeft = _cozy$bar.BarLeft, - BarCenter = _cozy$bar.BarCenter, - BarRight = _cozy$bar.BarRight; + var BarLeft = _cozyBar.default.BarLeft, + BarCenter = _cozyBar.default.BarCenter, + BarRight = _cozyBar.default.BarRight; var _useSelector = (0, _reactRedux.useSelector)(function (state) { return state.ecolyo.global; @@ -35527,6 +35607,8 @@ var _SplashRoot = _interopRequireDefault(__webpack_require__("00oi")); var _WelcomeModal = _interopRequireDefault(__webpack_require__("2s+2")); +var _cozyIntent = __webpack_require__("qvEe"); + var _Layout = __webpack_require__("Bh3+"); var _react = _interopRequireWildcard(__webpack_require__("q1tI")); @@ -35549,9 +35631,18 @@ var App = function App(_ref) { termsStatus = _useSelector.global.termsStatus, onboarding = _useSelector.profile.onboarding; + var webviewIntent = (0, _cozyIntent.useWebviewIntent)(); (0, _react.useEffect)(function () { tracker === null || tracker === void 0 ? void 0 : tracker.track(location); }, [tracker, location]); + (0, _react.useEffect)(function () { + webviewIntent === null || webviewIntent === void 0 ? void 0 : webviewIntent.call('setFlagshipUI', { + bottomBackground: '#32343d', + bottomTheme: 'light', + topBackground: '#1b1c22', + topTheme: 'light' + }); + }, [webviewIntent]); return /*#__PURE__*/_react.default.createElement(_Layout.Layout, null, /*#__PURE__*/_react.default.createElement(_SplashRoot.default, null, termsStatus.accepted && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_WelcomeModal.default, { open: !onboarding.isWelcomeSeen }), /*#__PURE__*/_react.default.createElement(_Navbar.default, null)), /*#__PURE__*/_react.default.createElement("main", { diff --git a/index.html b/index.html index 07d2bf293ef2c470a6ef3ffbff87c645412d2d23..5bde1a420d3c8590387c07534b08cb799e1f644a 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -<!DOCTYPE html><html lang="{{.Locale}}"><head><meta charset="utf-8"><title>Ecolyo</title><link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"><link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"><!-- PWA Manifest --><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#297EF2"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,viewport-fit=cover"><!-- PWA Chrome --><link rel="icon" sizes="192x192" href="/android-chrome-192x192.png"><link rel="icon" sizes="512x512" href="/android-chrome-512x512.png"><!-- PWA iOS --><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="apple-touch-startup-image" href="/apple-touch-icon.png"><meta name="apple-mobile-web-app-title" content="Ecolyo"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><!-- PWA Colors --><meta name="theme-color" content="#343641"><meta name="background-color" content="#121212">{{.ThemeCSS}} {{.CozyBar}}<script src="//{{.Domain}}/assets/js/piwik.js"></script></head><body><div role="application" class="application" data-cozy="{{.CozyData}}"><script src="vendors/ecolyo.18c101a0fa585f93c419.js"></script><script src="app/ecolyo.30775b7fee7a86845127.js"></script></div></body></html> \ No newline at end of file +<!DOCTYPE html><html lang="{{.Locale}}"><head><meta charset="utf-8"><title>Ecolyo</title><link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"><link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"><!-- PWA Manifest --><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#297EF2"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,viewport-fit=cover"><!-- PWA Chrome --><link rel="icon" sizes="192x192" href="/android-chrome-192x192.png"><link rel="icon" sizes="512x512" href="/android-chrome-512x512.png"><!-- PWA iOS --><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="apple-touch-startup-image" href="/apple-touch-icon.png"><meta name="apple-mobile-web-app-title" content="Ecolyo"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><!-- PWA Colors --><meta name="theme-color" content="#343641"><meta name="background-color" content="#121212">{{.ThemeCSS}} {{.CozyBar}}<script src="//{{.Domain}}/assets/js/piwik.js"></script></head><body><div role="application" class="application" data-cozy="{{.CozyData}}"><script src="vendors/ecolyo.69beab954af56959f24c.js"></script><script src="app/ecolyo.7de989f53833d15d9716.js"></script></div></body></html> \ No newline at end of file diff --git a/vendors/ecolyo.18c101a0fa585f93c419.js b/vendors/ecolyo.69beab954af56959f24c.js similarity index 95% rename from vendors/ecolyo.18c101a0fa585f93c419.js rename to vendors/ecolyo.69beab954af56959f24c.js index dcb69698ca2476cbce7a2c59ccb2796391b33d61..09f4831fdfb2aa52545a5249ec36abffe52a4682 100644 --- a/vendors/ecolyo.18c101a0fa585f93c419.js +++ b/vendors/ecolyo.69beab954af56959f24c.js @@ -2245,6 +2245,13 @@ __webpack_require__("jm62"); module.exports = __webpack_require__("g3g5").Object.getOwnPropertyDescriptors; +/***/ }), + +/***/ "+YbN": +/***/ (function(module) { + +module.exports = JSON.parse("{\"drawer\":\"Mostrar el menu lateral\",\"profile\":\"Perfil\",\"connectedDevices\":\"Aparatos conectados\",\"storage\":\"Espacio en el disco\",\"storage_phrase\":\"%{diskUsage} Go de %{diskQuota} Go\",\"view_offers\":\"Ver ofertas\",\"view_my_offer\":\"Mi oferta\",\"help\":\"Ayuda\",\"logout\":\"Desconectar\",\"soon\":\"pronto\",\"error_UnavailableStack\":\"Conexión a la stack imposible ( se agotó el tiempo para la conexión ).\",\"error_UnauthorizedStack\":\"Faltan algunos permisos, la aplicación no puede acceder a los recursos solicitados.\",\"no_apps\":\"No se han encontrado aplicaciones en su Cozy.\",\"menu\":{\"apps\":\"Aplicaciones\",\"settings\":\"Parámetros\",\"home_mobile\":\"Regresar a Inicio...\",\"home\":\"Regresar a Inicio\",\"home_title\":\"Inicio\"},\"Categories\":{\"cozy\":\"Aplicaciones Cozy\",\"partners\":\"Aplicaciones de asociados\",\"ptnb\":\"expPTNB\",\"others\":\"Otras aplicaciones\"},\"claudy\":{\"title\":\"¿Cómo utilizar su Cozy?\"},\"permsModal\":{\"title\":\"Acceder a su Cozy desde su aplicación\",\"description\":\"Autorizar a %{app} para mostrar sus aplicaciones Cozy en este aparato\",\"button\":\"Autorizar el acceso\"},\"comingSoon\":{\"store\":{\"title\":\"En breve, la aplicación Store estará disponible en su Cozy\",\"description\":\"Gracias a Cozy Store usted podrá instalar en su Cozy las aplicaciones que desee.\"}},\"banner\":{\"tos-updated\":{\"description\":\"Para cumplir con el RGPD, Cozy Cloud ha actualizado sus Condiciones de utilización que entraron en vigor desde el 25 de mayo de 2018.\",\"CTA\":\"Leerlo ahora\"}}}"); + /***/ }), /***/ "+auO": @@ -3016,6 +3023,78 @@ function property(path) { module.exports = property; +/***/ }), + +/***/ "+dCL": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +var ReactPropTypesSecret = __webpack_require__("WSXs"); + +function emptyFunction() {} +function emptyFunctionWithReset() {} +emptyFunctionWithReset.resetWarningCache = emptyFunction; + +module.exports = function() { + function shim(props, propName, componentName, location, propFullName, secret) { + if (secret === ReactPropTypesSecret) { + // It is still safe when called from React. + return; + } + var err = new Error( + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use PropTypes.checkPropTypes() to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + err.name = 'Invariant Violation'; + throw err; + }; + shim.isRequired = shim; + function getShim() { + return shim; + }; + // Important! + // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. + var ReactPropTypes = { + array: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, + + any: shim, + arrayOf: getShim, + element: shim, + elementType: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim, + exact: getShim, + + checkPropTypes: emptyFunctionWithReset, + resetWarningCache: emptyFunction + }; + + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; +}; + + /***/ }), /***/ "+f+M": @@ -16372,6 +16451,103 @@ __webpack_require__.r(__webpack_exports__); +/***/ }), + +/***/ "0HMc": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Subscription; }); +// encapsulates the subscription logic for connecting a component to the redux store, as +// well as nesting subscriptions of descendant components, so that we can ensure the +// ancestor components re-render before descendants +var CLEARED = null; +var nullListeners = { + notify: function notify() {} +}; + +function createListenerCollection() { + // the current/next pattern is copied from redux's createStore code. + // TODO: refactor+expose that code to be reusable here? + var current = []; + var next = []; + return { + clear: function clear() { + next = CLEARED; + current = CLEARED; + }, + notify: function notify() { + var listeners = current = next; + + for (var i = 0; i < listeners.length; i++) { + listeners[i](); + } + }, + get: function get() { + return next; + }, + subscribe: function subscribe(listener) { + var isSubscribed = true; + if (next === current) next = current.slice(); + next.push(listener); + return function unsubscribe() { + if (!isSubscribed || current === CLEARED) return; + isSubscribed = false; + if (next === current) next = current.slice(); + next.splice(next.indexOf(listener), 1); + }; + } + }; +} + +var Subscription = +/*#__PURE__*/ +function () { + function Subscription(store, parentSub, onStateChange) { + this.store = store; + this.parentSub = parentSub; + this.onStateChange = onStateChange; + this.unsubscribe = null; + this.listeners = nullListeners; + } + + var _proto = Subscription.prototype; + + _proto.addNestedSub = function addNestedSub(listener) { + this.trySubscribe(); + return this.listeners.subscribe(listener); + }; + + _proto.notifyNestedSubs = function notifyNestedSubs() { + this.listeners.notify(); + }; + + _proto.isSubscribed = function isSubscribed() { + return Boolean(this.unsubscribe); + }; + + _proto.trySubscribe = function trySubscribe() { + if (!this.unsubscribe) { + this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.onStateChange) : this.store.subscribe(this.onStateChange); + this.listeners = createListenerCollection(); + } + }; + + _proto.tryUnsubscribe = function tryUnsubscribe() { + if (this.unsubscribe) { + this.unsubscribe(); + this.unsubscribe = null; + this.listeners.clear(); + this.listeners = nullListeners; + } + }; + + return Subscription; +}(); + + + /***/ }), /***/ "0JQy": @@ -18089,6 +18265,38 @@ __webpack_require__.r(__webpack_exports__); +/***/ }), + +/***/ "0k3h": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "instanceReq", function() { return instanceReq; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "contextReq", function() { return contextReq; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "diskUsageReq", function() { return diskUsageReq; }); +/* harmony import */ var cozy_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("SH7X"); +/* harmony import */ var cozy_client__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cozy_client__WEBPACK_IMPORTED_MODULE_0__); + +var instanceReq = { + query: function query() { + return Object(cozy_client__WEBPACK_IMPORTED_MODULE_0__["Q"])('io.cozy.settings').getById('instance'); + }, + as: 'instanceQuery' +}; +var contextReq = { + query: function query() { + return Object(cozy_client__WEBPACK_IMPORTED_MODULE_0__["Q"])('io.cozy.settings').getById('context'); + }, + as: 'contextQuery' +}; +var diskUsageReq = { + query: function query() { + return Object(cozy_client__WEBPACK_IMPORTED_MODULE_0__["Q"])('io.cozy.settings').getById('disk-usage'); + }, + as: 'diskUsageQuery' +}; + /***/ }), /***/ "0l/t": @@ -24476,6 +24684,79 @@ else { //# sourceMappingURL=logger.js.map +/***/ }), + +/***/ "1XoH": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +var ReactPropTypesSecret = __webpack_require__("eq+D"); + +function emptyFunction() {} +function emptyFunctionWithReset() {} +emptyFunctionWithReset.resetWarningCache = emptyFunction; + +module.exports = function() { + function shim(props, propName, componentName, location, propFullName, secret) { + if (secret === ReactPropTypesSecret) { + // It is still safe when called from React. + return; + } + var err = new Error( + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use PropTypes.checkPropTypes() to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + err.name = 'Invariant Violation'; + throw err; + }; + shim.isRequired = shim; + function getShim() { + return shim; + }; + // Important! + // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. + var ReactPropTypes = { + array: shim, + bigint: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, + + any: shim, + arrayOf: getShim, + element: shim, + elementType: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim, + exact: getShim, + + checkPropTypes: emptyFunctionWithReset, + resetWarningCache: emptyFunction + }; + + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; +}; + + /***/ }), /***/ "1aU3": @@ -25981,6 +26262,30 @@ function size(collection) { module.exports = size; +/***/ }), + +/***/ "1iYv": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KEY_PREFIX", function() { return KEY_PREFIX; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FLUSH", function() { return FLUSH; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REHYDRATE", function() { return REHYDRATE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PAUSE", function() { return PAUSE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PERSIST", function() { return PERSIST; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PURGE", function() { return PURGE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REGISTER", function() { return REGISTER; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_VERSION", function() { return DEFAULT_VERSION; }); +var KEY_PREFIX = 'persist:'; +var FLUSH = 'persist/FLUSH'; +var REHYDRATE = 'persist/REHYDRATE'; +var PAUSE = 'persist/PAUSE'; +var PERSIST = 'persist/PERSIST'; +var PURGE = 'persist/PURGE'; +var REGISTER = 'persist/REGISTER'; +var DEFAULT_VERSION = -1; + /***/ }), /***/ "1ibS": @@ -26230,6 +26535,54 @@ module.exports = log; /***/ }), +/***/ "1mGG": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SET_LOCALE", function() { return SET_LOCALE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLocale", function() { return setLocale; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reducer", function() { return reducer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocale", function() { return getLocale; }); +var SET_LOCALE = 'SET_LOCALE'; // action creator + +var setLocale = function setLocale(lang) { + return { + type: SET_LOCALE, + lang: lang + }; +}; + +var getDefaultLang = function getDefaultLang() { + return document.documentElement.getAttribute('lang') || 'en'; +}; + +var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getDefaultLang(); + var action = arguments.length > 1 ? arguments[1] : undefined; + + if (action.type === SET_LOCALE) { + return action.lang; + } else { + return state; + } +}; // selector + +var getLocale = function getLocale(state) { + return state; +}; + +/***/ }), + +/***/ "1mXj": +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global) {!function(e,t){ true?t(exports):undefined}(this,function(e){"use strict";function t(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function r(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function n(e,t,r){n.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:r,enumerable:!0})}function o(e,t){o.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function i(e,t){i.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function a(e,t,r){a.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:r,enumerable:!0})}function f(e,t,r){var n=e.slice((r||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,n),e}function u(e){var t="undefined"==typeof e?"undefined":N(e);return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object"}function l(e,t,r,c,s,d,p){s=s||[],p=p||[];var g=s.slice(0);if("undefined"!=typeof d){if(c){if("function"==typeof c&&c(g,d))return;if("object"===("undefined"==typeof c?"undefined":N(c))){if(c.prefilter&&c.prefilter(g,d))return;if(c.normalize){var h=c.normalize(g,d,e,t);h&&(e=h[0],t=h[1])}}}g.push(d)}"regexp"===u(e)&&"regexp"===u(t)&&(e=e.toString(),t=t.toString());var y="undefined"==typeof e?"undefined":N(e),v="undefined"==typeof t?"undefined":N(t),b="undefined"!==y||p&&p[p.length-1].lhs&&p[p.length-1].lhs.hasOwnProperty(d),m="undefined"!==v||p&&p[p.length-1].rhs&&p[p.length-1].rhs.hasOwnProperty(d);if(!b&&m)r(new o(g,t));else if(!m&&b)r(new i(g,e));else if(u(e)!==u(t))r(new n(g,e,t));else if("date"===u(e)&&e-t!==0)r(new n(g,e,t));else if("object"===y&&null!==e&&null!==t)if(p.filter(function(t){return t.lhs===e}).length)e!==t&&r(new n(g,e,t));else{if(p.push({lhs:e,rhs:t}),Array.isArray(e)){var w;e.length;for(w=0;w<e.length;w++)w>=t.length?r(new a(g,w,new i(void 0,e[w]))):l(e[w],t[w],r,c,g,w,p);for(;w<t.length;)r(new a(g,w,new o(void 0,t[w++])))}else{var x=Object.keys(e),S=Object.keys(t);x.forEach(function(n,o){var i=S.indexOf(n);i>=0?(l(e[n],t[n],r,c,g,n,p),S=f(S,i)):l(e[n],void 0,r,c,g,n,p)}),S.forEach(function(e){l(void 0,t[e],r,c,g,e,p)})}p.length=p.length-1}else e!==t&&("number"===y&&isNaN(e)&&isNaN(t)||r(new n(g,e,t)))}function c(e,t,r,n){return n=n||[],l(e,t,function(e){e&&n.push(e)},r),n.length?n:void 0}function s(e,t,r){if(r.path&&r.path.length){var n,o=e[t],i=r.path.length-1;for(n=0;n<i;n++)o=o[r.path[n]];switch(r.kind){case"A":s(o[r.path[n]],r.index,r.item);break;case"D":delete o[r.path[n]];break;case"E":case"N":o[r.path[n]]=r.rhs}}else switch(r.kind){case"A":s(e[t],r.index,r.item);break;case"D":e=f(e,t);break;case"E":case"N":e[t]=r.rhs}return e}function d(e,t,r){if(e&&t&&r&&r.kind){for(var n=e,o=-1,i=r.path?r.path.length-1:0;++o<i;)"undefined"==typeof n[r.path[o]]&&(n[r.path[o]]="number"==typeof r.path[o]?[]:{}),n=n[r.path[o]];switch(r.kind){case"A":s(r.path?n[r.path[o]]:n,r.index,r.item);break;case"D":delete n[r.path[o]];break;case"E":case"N":n[r.path[o]]=r.rhs}}}function p(e,t,r){if(r.path&&r.path.length){var n,o=e[t],i=r.path.length-1;for(n=0;n<i;n++)o=o[r.path[n]];switch(r.kind){case"A":p(o[r.path[n]],r.index,r.item);break;case"D":o[r.path[n]]=r.lhs;break;case"E":o[r.path[n]]=r.lhs;break;case"N":delete o[r.path[n]]}}else switch(r.kind){case"A":p(e[t],r.index,r.item);break;case"D":e[t]=r.lhs;break;case"E":e[t]=r.lhs;break;case"N":e=f(e,t)}return e}function g(e,t,r){if(e&&t&&r&&r.kind){var n,o,i=e;for(o=r.path.length-1,n=0;n<o;n++)"undefined"==typeof i[r.path[n]]&&(i[r.path[n]]={}),i=i[r.path[n]];switch(r.kind){case"A":p(i[r.path[n]],r.index,r.item);break;case"D":i[r.path[n]]=r.lhs;break;case"E":i[r.path[n]]=r.lhs;break;case"N":delete i[r.path[n]]}}}function h(e,t,r){if(e&&t){var n=function(n){r&&!r(e,t,n)||d(e,t,n)};l(e,t,n)}}function y(e){return"color: "+F[e].color+"; font-weight: bold"}function v(e){var t=e.kind,r=e.path,n=e.lhs,o=e.rhs,i=e.index,a=e.item;switch(t){case"E":return[r.join("."),n,"→",o];case"N":return[r.join("."),o];case"D":return[r.join(".")];case"A":return[r.join(".")+"["+i+"]",a];default:return[]}}function b(e,t,r,n){var o=c(e,t);try{n?r.groupCollapsed("diff"):r.group("diff")}catch(e){r.log("diff")}o?o.forEach(function(e){var t=e.kind,n=v(e);r.log.apply(r,["%c "+F[t].text,y(t)].concat(P(n)))}):r.log("—— no diff ——");try{r.groupEnd()}catch(e){r.log("—— diff end —— ")}}function m(e,t,r,n){switch("undefined"==typeof e?"undefined":N(e)){case"object":return"function"==typeof e[n]?e[n].apply(e,P(r)):e[n];case"function":return e(t);default:return e}}function w(e){var t=e.timestamp,r=e.duration;return function(e,n,o){var i=["action"];return i.push("%c"+String(e.type)),t&&i.push("%c@ "+n),r&&i.push("%c(in "+o.toFixed(2)+" ms)"),i.join(" ")}}function x(e,t){var r=t.logger,n=t.actionTransformer,o=t.titleFormatter,i=void 0===o?w(t):o,a=t.collapsed,f=t.colors,u=t.level,l=t.diff,c="undefined"==typeof t.titleFormatter;e.forEach(function(o,s){var d=o.started,p=o.startedTime,g=o.action,h=o.prevState,y=o.error,v=o.took,w=o.nextState,x=e[s+1];x&&(w=x.prevState,v=x.started-d);var S=n(g),k="function"==typeof a?a(function(){return w},g,o):a,j=D(p),E=f.title?"color: "+f.title(S)+";":"",A=["color: gray; font-weight: lighter;"];A.push(E),t.timestamp&&A.push("color: gray; font-weight: lighter;"),t.duration&&A.push("color: gray; font-weight: lighter;");var O=i(S,j,v);try{k?f.title&&c?r.groupCollapsed.apply(r,["%c "+O].concat(A)):r.groupCollapsed(O):f.title&&c?r.group.apply(r,["%c "+O].concat(A)):r.group(O)}catch(e){r.log(O)}var N=m(u,S,[h],"prevState"),P=m(u,S,[S],"action"),C=m(u,S,[y,h],"error"),F=m(u,S,[w],"nextState");if(N)if(f.prevState){var L="color: "+f.prevState(h)+"; font-weight: bold";r[N]("%c prev state",L,h)}else r[N]("prev state",h);if(P)if(f.action){var T="color: "+f.action(S)+"; font-weight: bold";r[P]("%c action ",T,S)}else r[P]("action ",S);if(y&&C)if(f.error){var M="color: "+f.error(y,h)+"; font-weight: bold;";r[C]("%c error ",M,y)}else r[C]("error ",y);if(F)if(f.nextState){var _="color: "+f.nextState(w)+"; font-weight: bold";r[F]("%c next state",_,w)}else r[F]("next state",w);l&&b(h,w,r,k);try{r.groupEnd()}catch(e){r.log("—— log end ——")}})}function S(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},L,e),r=t.logger,n=t.stateTransformer,o=t.errorTransformer,i=t.predicate,a=t.logErrors,f=t.diffPredicate;if("undefined"==typeof r)return function(){return function(e){return function(t){return e(t)}}};if(e.getState&&e.dispatch)return console.error("[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:\n// Logger with default options\nimport { logger } from 'redux-logger'\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n// Or you can create your own logger with custom options http://bit.ly/redux-logger-options\nimport createLogger from 'redux-logger'\nconst logger = createLogger({\n // ...options\n});\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n"),function(){return function(e){return function(t){return e(t)}}};var u=[];return function(e){var r=e.getState;return function(e){return function(l){if("function"==typeof i&&!i(r,l))return e(l);var c={};u.push(c),c.started=O.now(),c.startedTime=new Date,c.prevState=n(r()),c.action=l;var s=void 0;if(a)try{s=e(l)}catch(e){c.error=o(e)}else s=e(l);c.took=O.now()-c.started,c.nextState=n(r());var d=t.diff&&"function"==typeof f?f(r,l):t.diff;if(x(u,Object.assign({},t,{diff:d})),u.length=0,c.error)throw c.error;return s}}}}var k,j,E=function(e,t){return new Array(t+1).join(e)},A=function(e,t){return E("0",t-e.toString().length)+e},D=function(e){return A(e.getHours(),2)+":"+A(e.getMinutes(),2)+":"+A(e.getSeconds(),2)+"."+A(e.getMilliseconds(),3)},O="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance:Date,N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},C=[];k="object"===("undefined"==typeof global?"undefined":N(global))&&global?global:"undefined"!=typeof window?window:{},j=k.DeepDiff,j&&C.push(function(){"undefined"!=typeof j&&k.DeepDiff===c&&(k.DeepDiff=j,j=void 0)}),t(n,r),t(o,r),t(i,r),t(a,r),Object.defineProperties(c,{diff:{value:c,enumerable:!0},observableDiff:{value:l,enumerable:!0},applyDiff:{value:h,enumerable:!0},applyChange:{value:d,enumerable:!0},revertChange:{value:g,enumerable:!0},isConflict:{value:function(){return"undefined"!=typeof j},enumerable:!0},noConflict:{value:function(){return C&&(C.forEach(function(e){e()}),C=null),c},enumerable:!0}});var F={E:{color:"#2196F3",text:"CHANGED:"},N:{color:"#4CAF50",text:"ADDED:"},D:{color:"#F44336",text:"DELETED:"},A:{color:"#2196F3",text:"ARRAY:"}},L={level:"log",logger:console,logErrors:!0,collapsed:void 0,predicate:void 0,duration:!1,timestamp:!0,stateTransformer:function(e){return e},actionTransformer:function(e){return e},errorTransformer:function(e){return e},colors:{title:function(){return"inherit"},prevState:function(){return"#9E9E9E"},action:function(){return"#03A9F4"},nextState:function(){return"#4CAF50"},error:function(){return"#F20404"}},diff:!1,diffPredicate:void 0,transformer:void 0},T=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.dispatch,r=e.getState;return"function"==typeof t||"function"==typeof r?S()({dispatch:t,getState:r}):void console.error("\n[redux-logger v3] BREAKING CHANGE\n[redux-logger v3] Since 3.0.0 redux-logger exports by default logger with default settings.\n[redux-logger v3] Change\n[redux-logger v3] import createLogger from 'redux-logger'\n[redux-logger v3] to\n[redux-logger v3] import { createLogger } from 'redux-logger'\n")};e.defaults=L,e.createLogger=S,e.logger=T,e.default=T,Object.defineProperty(e,"__esModule",{value:!0})}); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("yLpj"))) + +/***/ }), + /***/ "1nUc": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -33609,13 +33962,15 @@ Object.defineProperty(exports, "__esModule", { }); exports.WebviewMessenger = exports.DebugWebviewMessenger = void 0; +var _createClass2 = _interopRequireDefault(__webpack_require__("W8MJ")); + var _classCallCheck2 = _interopRequireDefault(__webpack_require__("lwsE")); var _defineProperty2 = _interopRequireDefault(__webpack_require__("lSNA")); var _postMe = __webpack_require__("c4kq"); -var WebviewMessenger = function WebviewMessenger(windowRef) { +var WebviewMessenger = /*#__PURE__*/(0, _createClass2.default)(function WebviewMessenger(windowRef) { var _this = this; (0, _classCallCheck2.default)(this, WebviewMessenger); @@ -33643,8 +33998,7 @@ var WebviewMessenger = function WebviewMessenger(windowRef) { return removeMessageListener; }); this.windowRef = windowRef; -}; - +}); exports.WebviewMessenger = WebviewMessenger; var DebugWebviewMessenger = function DebugWebviewMessenger(messenger) { @@ -33755,6 +34109,281 @@ __webpack_require__.r(__webpack_exports__); +/***/ }), + +/***/ "3kqD": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOG_OUT", function() { return LOG_OUT; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getStorageData", function() { return getStorageData; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSettingsAppURL", function() { return getSettingsAppURL; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSettingsBusy", function() { return isSettingsBusy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFetchingSettings", function() { return isFetchingSettings; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fetchSettingsData", function() { return fetchSettingsData; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logOut", function() { return logOut; }); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("MVZn"); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("o0o1"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("yXPU"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("g4K+"); + + + + +var FETCH_SETTINGS = 'FETCH_SETTINGS'; +var FETCH_SETTINGS_BUSY = 'FETCH_SETTINGS_BUSY'; +var FETCH_SETTINGS_SUCCESS = 'FETCH_SETTINGS_SUCCESS'; +var RECEIVE_NO_CONTEXT = 'RECEIVE_NO_CONTEXT'; +var RECEIVE_STORAGE = 'RECEIVE_STORAGE'; +var RECEIVE_SETTINGS_URL = 'RECEIVE_SETTINGS_URL'; +var LOG_OUT = 'LOG_OUT'; +var BUSY_DELAY = 450; // selectors + +var getStorageData = function getStorageData(state) { + return state.storageData; +}; +var getSettingsAppURL = function getSettingsAppURL(state) { + return state.settingsAppURL; +}; +var isSettingsBusy = function isSettingsBusy(state) { + return state.isBusy; +}; +var isFetchingSettings = function isFetchingSettings(state) { + return state.isFetching; +}; // actions + +var fetchStorageData = function fetchStorageData() { + return /*#__PURE__*/function () { + var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(dispatch) { + var storageData; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.prev = 0; + _context.next = 3; + return _stack__WEBPACK_IMPORTED_MODULE_3__["default"].get.storageData(); + + case 3: + storageData = _context.sent; + return _context.abrupt("return", dispatch({ + type: RECEIVE_STORAGE, + storageData: storageData + })); + + case 7: + _context.prev = 7; + _context.t0 = _context["catch"](0); + // eslint-disable-next-line no-console + console.warn && console.warn('Cannot get Cozy storage informations'); + return _context.abrupt("return", null); + + case 11: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[0, 7]]); + })); + + return function (_x) { + return _ref.apply(this, arguments); + }; + }(); +}; + +var fetchSettingsAppURL = function fetchSettingsAppURL() { + return /*#__PURE__*/function () { + var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee2(dispatch, getState) { + var settingsAppURL; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (!getState().settings.settingsAppURL) { + _context2.next = 2; + break; + } + + return _context2.abrupt("return", dispatch({ + type: RECEIVE_SETTINGS_URL, + settingsAppURL: getState().settings.settingsAppURL + })); + + case 2: + _context2.prev = 2; + _context2.next = 5; + return _stack__WEBPACK_IMPORTED_MODULE_3__["default"].get.settingsAppURL(); + + case 5: + settingsAppURL = _context2.sent; + return _context2.abrupt("return", dispatch({ + type: RECEIVE_SETTINGS_URL, + settingsAppURL: settingsAppURL + })); + + case 9: + _context2.prev = 9; + _context2.t0 = _context2["catch"](2); + // eslint-disable-next-line no-console + console.warn('Settings app is unavailable, settings links are disabled'); + return _context2.abrupt("return", null); + + case 13: + case "end": + return _context2.stop(); + } + } + }, _callee2, null, [[2, 9]]); + })); + + return function (_x2, _x3) { + return _ref2.apply(this, arguments); + }; + }(); +}; + +var fetchSettingsData = function fetchSettingsData() { + var displayBusy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + return /*#__PURE__*/function () { + var _ref3 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee3(dispatch) { + var busySpinner; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + dispatch({ + type: FETCH_SETTINGS + }); // put the busy status after BUSY_DELAY secs + + busySpinner = setTimeout(function () { + // we do not display the busy status in the drawer + if (displayBusy) dispatch({ + type: FETCH_SETTINGS_BUSY + }); + }, BUSY_DELAY); + _context3.next = 4; + return dispatch(fetchStorageData()); + + case 4: + _context3.next = 6; + return dispatch(fetchSettingsAppURL()); + + case 6: + clearTimeout(busySpinner); + dispatch({ + type: FETCH_SETTINGS_SUCCESS + }); + + case 8: + case "end": + return _context3.stop(); + } + } + }, _callee3); + })); + + return function (_x4) { + return _ref3.apply(this, arguments); + }; + }(); +}; +var logOut = function logOut() { + return /*#__PURE__*/function () { + var _ref4 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee4(dispatch) { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + dispatch({ + type: LOG_OUT + }); + _context4.prev = 1; + _context4.next = 4; + return _stack__WEBPACK_IMPORTED_MODULE_3__["default"].logout(); + + case 4: + _context4.next = 9; + break; + + case 6: + _context4.prev = 6; + _context4.t0 = _context4["catch"](1); + // eslint-disable-next-line no-console + console.warn('Error while logging out in the cozy-bar', _context4.t0); + + case 9: + case "end": + return _context4.stop(); + } + } + }, _callee4, null, [[1, 6]]); + })); + + return function (_x5) { + return _ref4.apply(this, arguments); + }; + }(); +}; // reducers + +var defaultState = { + contextNotExist: false, + isFetching: false, + isBusy: false, + settingsAppURL: null, + storageData: null +}; + +var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState; + var action = arguments.length > 1 ? arguments[1] : undefined; + + switch (action.type) { + case FETCH_SETTINGS: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + isFetching: true + }); + + case FETCH_SETTINGS_BUSY: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + isBusy: true + }); + + case FETCH_SETTINGS_SUCCESS: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + isFetching: false, + isBusy: false + }); + + case RECEIVE_NO_CONTEXT: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + contextNotExist: true + }); + + case RECEIVE_STORAGE: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + storageData: action.storageData + }); + + case RECEIVE_SETTINGS_URL: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + settingsAppURL: action.settingsAppURL + }); + + case LOG_OUT: + return defaultState; + + default: + return state; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (reducer); + /***/ }), /***/ "3oVi": @@ -37273,6 +37902,34 @@ __webpack_require__.r(__webpack_exports__); +/***/ }), + +/***/ "4JP3": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pVnL"); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); + + + +function SvgIconClaudy(props) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("svg", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({ + viewBox: "0 0 32 32" + }, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("path", { + d: "M22 12h-7c-.6 0-1 .4-1 1s.4 1 1 1h7c.6 0 1-.4 1-1s-.4-1-1-1zm3-5H15c-.5 0-1 .4-1 1s.4 1 1 1h10c.5 0 1-.4 1-1s-.4-1-1-1z", + fill: "none" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("path", { + fill: "#FFF", + d: "M31 1H9c-.6 0-1 .5-1 1v15c2.2 0 4.1 1.2 5.2 3H18v1.9c0 .6.4.7.8.4l3.3-2.3H31c.6 0 1-.5 1-1V2c0-.6-.4-1-1-1zm-9 13h-7c-.6 0-1-.4-1-1s.4-1 1-1h7c.6 0 1 .4 1 1s-.4 1-1 1zm3-5H15c-.6 0-1-.4-1-1s.5-1 1-1h10c.6 0 1 .4 1 1s-.5 1-1 1zM10.4 26.7c0 .1-.7 1.3-2.4 1.3-1.8 0-2.4-1.2-2.4-1.3-.1-.2 0-.5.2-.7.2-.1.5 0 .7.2 0 0 .4.7 1.6.7 1.1 0 1.5-.7 1.6-.7.1-.2.4-.3.7-.2.1.2.2.5 0 .7M12 23c0-2.2-1.8-4-4-4s-4 1.8-4 4c-2.2 0-4 1.8-4 4s1.8 4 4 4h8c2.2 0 4-1.8 4-4s-1.8-4-4-4" + })); +} + +/* harmony default export */ __webpack_exports__["default"] = (SvgIconClaudy); + /***/ }), /***/ "4JcG": @@ -41879,6 +42536,173 @@ var CardHeader = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](f /***/ }), +/***/ "53+s": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getIcon; }); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("o0o1"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("yXPU"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__); + + +var cache = {}; +var mimeTypes = { + gif: 'image/gif', + ico: 'image/vnd.microsoft.icon', + jpeg: 'image/jpeg', + jpg: 'image/jpeg', + png: 'image/png', + svg: 'image/svg+xml' +}; +/** + * Get an icon URL usable in the HTML page from it's stack path + * + * @function + * @private + * @param {function} iconFetcher - takes an icon path on the stack + * and returns a fetch response with the icon + * @param {object} app - app object with a `links.icon` attribute + * @param {boolean} useCache + * @returns {Promise} url string of an icon usable in the HTML page + * may be empty if the `app` object didn't have an icon path + */ + +function getIcon(_x) { + return _getIcon.apply(this, arguments); +} + +function _getIcon() { + _getIcon = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(iconFetcher) { + var app, + useCache, + url, + icon, + resp, + extension, + iconURL, + _args = arguments; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + app = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}; + useCache = _args.length > 2 && _args[2] !== undefined ? _args[2] : true; + + if (!(useCache && cache.icons && cache.icons[url])) { + _context.next = 4; + break; + } + + return _context.abrupt("return", cache.icons[url]); + + case 4: + url = app.links && app.links.icon; + + if (url) { + _context.next = 7; + break; + } + + return _context.abrupt("return", ''); + + case 7: + _context.prev = 7; + _context.next = 10; + return iconFetcher(url); + + case 10: + resp = _context.sent; + + if (resp.ok) { + _context.next = 13; + break; + } + + throw new Error("Error while fetching icon ".concat(resp.statusText, ": ").concat(url)); + + case 13: + _context.next = 15; + return resp.blob(); + + case 15: + icon = _context.sent; + _context.next = 21; + break; + + case 18: + _context.prev = 18; + _context.t0 = _context["catch"](7); + throw _context.t0; + + case 21: + if (icon.type) { + _context.next = 30; + break; + } + + if (app.icon) { + _context.next = 24; + break; + } + + throw new Error("".concat(app.name, ": Cannot detect mime type for icon ").concat(url)); + + case 24: + extension = app.icon.split('.').pop(); + + if (extension) { + _context.next = 27; + break; + } + + throw new Error("".concat(app.name, ": Unable to detect icon mime type from extension (").concat(app.icon, ")")); + + case 27: + if (mimeTypes[extension]) { + _context.next = 29; + break; + } + + throw new Error("".concat(app.name, ": 'Unexpected icon extension (").concat(app.icon, ")")); + + case 29: + icon = new Blob([icon], { + type: mimeTypes[extension] + }); + + case 30: + if (!icon.type.match(/^image\/.*$/)) { + _context.next = 34; + break; + } + + iconURL = URL.createObjectURL(icon); + + if (useCache) { + cache.icons = cache.icons || {}; + cache.icons[url] = iconURL; + } + + return _context.abrupt("return", iconURL); + + case 34: + throw new Error("".concat(app.name, ": icon ").concat(url, " is not an image.")); + + case 35: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[7, 18]]); + })); + return _getIcon.apply(this, arguments); +} + +/***/ }), + /***/ "54Wo": /***/ (function(module, exports, __webpack_require__) { @@ -48848,6 +49672,17 @@ function autoType(object) { // https://github.com/d3/d3-dsv/issues/45 const fixtz = new Date("2019-01-01T00:00").getHours() || new Date("2019-07-01T00:00").getHours(); +/***/ }), + +/***/ "6jB5": +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__("JPst")(false); +// Module +exports.push([module.i, "[role=banner] .coz-sep-flex {\n margin: 0;\n border: none;\n flex: 1 0;\n}\n\n[role=banner] .blurry {\n opacity: .5;\n filter: blur(5px);\n}\n\n[role=banner] [data-icon] {\n background-repeat: no-repeat;\n background-position: 0 50%;\n padding-left: calc(16px + .5em);\n}\n\n[role=banner] .u-flex-grow {\n display: flex;\n flex-grow: 1;\n}\n\n/* Spinner */\n@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(359deg);\n }\n}\n\n/* Progress bar */\n[role=banner] progress[value] {\n /* Reset the default appearance */\n appearance: none;\n background-color: var(--paleGrey);\n border: solid 1px var(--silver);\n border-radius: 2px;\n color: var(--dodgerBlue);\n}\n\n[role=banner] progress[value]::-webkit-progress-bar {\n background: var(--paleGrey);\n border-radius: 2px;\n}\n\n[role=banner] progress[value]::-webkit-progress-value {\n background: var(--dodgerBlue);\n border-radius: 1px;\n}\n\n[role=banner] progress[value]::-moz-progress-bar {\n background: var(--dodgerBlue);\n border-radius: 1px;\n}\n\n/* Errors */\n[role=banner] .coz-nav--error {\n margin: 0 0 .1em 0;\n font-weight: normal;\n font-size: .875em;\n color: var(--pomegranate);\n}\n\n/* Claudy loading */\n[role=banner] .coz-claudy [data-claudy-loading=true]::before {\n position: absolute;\n content: '';\n width: 100%;\n height: 100%;\n bottom: 0;\n right: 0;\n background: none;\n border-radius: 100%;\n border: .2em solid var(--scienceBlue);\n border-right: .2em solid white;\n box-sizing: border-box;\n animation: 1s linear infinite spin;\n}\n\n[role=banner] {\n position: fixed;\n top: 0;\n left: 0;\n z-index: var(--z-index-bar);\n display: flex;\n align-items: stretch;\n flex-shrink: 0;\n box-sizing: border-box;\n width: 100%;\n min-height: 3em;\n font-family: Lato, sans-serif;\n font-size: 1rem;\n}\n\n@media (min-width: 64rem) {\n [role=banner] {\n position: relative;\n }\n}\n\n[role=banner] .coz-bar-wrapper {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n[role=banner] .coz-bar-container {\n display: flex;\n height: 3rem;\n width: 100%;\n padding: 0 1.25em 0 1em;\n box-sizing: border-box;\n}\n\n@media (max-width: 48em) {\n [role=banner] .coz-bar-container {\n padding: 0 1em 0 0;\n }\n}\n\n[role=banner] .coz-bar-title {\n display: flex;\n margin: 0;\n align-items: center;\n min-width: 8em;\n font-size: 1.5em;\n font-weight: normal;\n color: var(--charcoalGrey);\n}\n\n@media (max-width: 48em) {\n [role=banner] .coz-bar-title {\n font-size: 1.25em\n }\n}\n\n[role=banner] .coz-bar-title img {\n margin-right: .45em;\n}\n\n[role=banner] .coz-bar-title span {\n margin-right: .25em;\n}\n\n[role=banner] .coz-bar-title strong {\n font-weight: bold;\n}\n\n@media (max-width: 30em) {\n [role=banner] .coz-bar-hide-sm {\n display: none;\n }\n\n [role=banner] .coz-bar-title strong {\n padding: 0;\n text-transform: capitalize;\n }\n}\n\n[role=banner] .coz-bar-btn {\n padding: 0;\n border: none;\n background-color: transparent;\n background-position: center;\n flex: 0 0 2.5rem;\n cursor: pointer;\n}\n\n[role=banner] .coz-bar-burger {\n margin-right: 0.25em;\n}\n\n@media (min-width: 48.0625em) {\n [role=banner] .coz-bar-burger,\n [role=banner] .coz-drawer-wrapper {\n display: none;\n }\n}\n\n\n@media (max-width: 48em) {\n [role=banner] .coz-bar-hide-sm {\n display: none;\n }\n}\n\n@media (max-width: 63.9375rem) {\n .has-banner [role=application] .o-layout-2panes:before {\n height: 6rem;\n }\n\n [role=banner] .coz-bar-banner {\n font-size: 14px;\n transition: none;\n transition-delay: none;\n }\n\n [role=banner] .coz-bar-banner-button {\n max-width: 7rem;\n }\n}\n\n@media (max-width: 30rem) {\n .has-banner [role=application] .o-layout-2panes:before {\n height: 7rem;\n }\n\n [role=banner] .coz-bar-banner {\n height: auto;\n font-size: 13px;\n }\n}\n\n@media (max-width: 18rem) {\n .has-banner [role=application] .o-layout-2panes:before {\n height: 8rem;\n }\n}\n\n[role=banner] .coz-bar-banner.unmounted {\n height: 0;\n}\n\n[role=banner] .coz-bar-banner {\n display: flex;\n background: var(--dodgerBlue);\n box-sizing: border-box;\n width: 100%;\n height: 3rem;\n padding: 0 1rem 0 1rem;\n justify-content: space-between;\n align-items: center;\n color: white;\n overflow: hidden;\n box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.12), 0 0 4px 0 rgba(0, 0, 0, 0.06);\n transition: height 1s;\n transition-delay: 1s;\n}\n\n[role=banner] .coz-bar-banner-button,\n[role=banner] .coz-bar-banner-button:hover,\n[role=banner] .coz-bar-banner-button:visited\n[role=banner] .coz-bar-banner-button:active\n[role=banner] .coz-bar-banner-button:focus {\n border-color: white!important;\n min-height: 2rem;\n height: 2rem;\n flex-shrink: 0;\n max-width: 10rem;\n}\n\n[role=banner] .coz-nav {\n display: flex;\n margin: 0;\n padding: 0;\n list-style-type: none;\n position: relative;\n}\n\n@media (max-width: 48em) {\n [role=banner] .coz-nav {\n display: none;\n }\n}\n\n[role=banner] [aria-controls][aria-busy]::after {\n position: relative;\n top: .12em;\n margin: 0 .355em;\n font-size: .875em;\n}\n\n[role=banner] [aria-controls][aria-busy=true] {\n padding-right: 0;\n}\n\n[role=banner] .coz-nav [aria-controls][data-icon] {\n padding-left: calc(1.25em + 16px + .5em);\n background-position: 1em calc(50% - 1px);\n}\n\n/* POP */\n[role=banner] .coz-nav-pop[aria-hidden=true] {\n display: flex;\n transform: scale(0);\n opacity: 0;\n transition: .2s transform ease-in, .1s opacity ease-in;\n}\n\n[role=banner] .coz-nav-pop {\n position: absolute;\n top: calc(100% - .25em);\n box-sizing: border-box;\n min-width: 100%;\n max-height: calc(100vh - 4rem);\n overflow-y: auto;\n background-color: #fff;\n border-radius: 8px;\n border: solid 1px rgba(50, 54, 63, 0.12);\n box-shadow: 0 1px 3px 0 rgba(50, 54, 63, 0.19), 0 6px 18px 0 rgba(50, 54, 63, 0.19);\n opacity: 1;\n transform: scale(1);\n transform-origin: 80% 0%;\n transition: .2s transform cubic-bezier(0.2, 0.75, 0.3, 1.15);\n /* hide scrollbars */\n -ms-overflow-style: none; /* IE 10+ */\n}\n\n[role=banner] .coz-nav-pop::-webkit-scrollbar {\n display: none; /* Safari and Chrome */\n}\n\n[role=banner] .coz-nav-pop-content .coz-nav-group {\n padding: 8px 0 8px 0;;\n margin: 0;\n}\n\n[role=banner] .coz-nav-pop-content .coz-nav-group:last-of-type {\n border-radius: 0 0 8px 8px;\n}\n\n[role=banner] .coz-nav-pop-content .coz-nav-group:first-of-type {\n border-radius: 8px 8px 0 0;\n}\n\n[role=banner] .coz-nav-pop .coz-nav-group {\n border-bottom: solid 1px var(--silver);\n}\n\n[role=banner] .coz-nav-pop .coz-nav-group:last-child {\n border: 0;\n}\n\n/* Force pointer on clickable elements*/\n[role=banner] a[role=menuitem],\n[role=banner] button[role=menuitem] {\n cursor: pointer;\n border-left: 4px solid transparent;\n}\n\n[role=banner] a[role=menuitem]:hover,\n[role=banner] a[role=menuitem]:focus,\n[role=banner] button[role=menuitem]:hover,\n[role=banner] button[role=menuitem]:focus {\n background-color: var(--paleGrey);\n}\n\n[role=banner] [role=menuitem][aria-busy=true]::after {\n right: 1.5em;\n top: .5em;\n}\n\n[role=banner] .coz-drawer-wrapper [role=menuitem][aria-busy=true]::after {\n top: .8em;\n}\n\n/* nav group */\n\n[role=banner] .coz-nav-group.coz-nav--error {\n padding: 0.75em;\n min-width: 20em;\n}\n\n[role=banner] div[role=menuitem]:not([data-icon]) {\n margin: 0;\n padding-left: 1.5em;\n}\n\n[role=banner] .coz-nav-apps-btns {\n display: flex;\n align-items: center;\n font-size: 1rem;\n text-decoration: none;\n border: none;\n background-color: transparent;\n line-height: 1rem;\n}\n\n[role=banner] .coz-nav-apps-btns-main {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 3rem;\n margin: 0 .75rem;\n padding: 0;\n background-color: transparent;\n border: none;\n color: black;\n font-size: 1rem;\n}\n\n[role=banner] .coz-nav-apps-btns-main:hover,\n[role=banner] .coz-nav-apps-btns-main:focus,\n[role=banner] .coz-nav-apps-btns-main:active {\n cursor: pointer;\n color: black;\n}\n\n[role=banner] .coz-nav-apps-btns-main[disabled]:hover,\n[role=banner] .coz-nav-apps-btns-main[disabled]:focus,\n[role=banner] .coz-nav-apps-btns-main[disabled]:active {\n cursor: default;\n}\n\n[role=banner] .coz-nav-app-name {\n margin: 0 .4rem;\n font-weight: bold;\n}\n\n[role=banner] .coz-nav-apps-btns-sep {\n height: 1.75rem;\n background-color: #d8d8d8;\n width: 1px;\n}\n\n[role=banner] .coz-nav-apps-btns-home {\n height: 2rem;\n margin-right: .75rem;\n}\n\n[role=banner] .coz-nav-apps-btns-home.--is-flagship {\n align-items: center;\n display: flex;\n flex-shrink: 0;\n height: 100%;\n justify-content: center;\n margin-right: .25rem;\n width: 3rem;\n}\n\n\n[role=banner] .coz-nav-apps-btns-home-svg {\n max-width: 2rem;\n max-height: 2rem;\n}\n\n[role=banner] .coz-nav-apps-btns-home,\n[role=banner] .coz-nav-apps-btns-home[href]:visited {\n color: var(--dodgerBlue);\n}\n\n[role=banner] .coz-nav-apps-btns-home[href]:hover,\n[role=banner] .coz-nav-apps-btns-home[href]:active,\n[role=banner] .coz-nav-apps-btns-home[href]:focus {\n color: var(--scienceBlue);\n}\n\n[role=banner] .coz-nav-apps-btns.--currentHome .coz-nav-apps-btns-main {\n margin-left: 0;\n}\n\n[role=banner] .coz-nav-apps-btns.--currentHome .coz-nav-apps-btns-home {\n margin-right: 0;\n}\n\n/* POP */\n[role=banner] .coz-nav-pop--apps {\n width: 20rem;\n max-height: 29.5rem;\n left: 3.5rem;\n transform-origin: 10% 0%;\n}\n\n[role=banner] .coz-nav .--currentHome+.coz-nav-pop--apps {\n left: 0;\n}\n\n/* POP CONTENT */\n\n[role=banner] .coz-nav-pop--apps .coz-nav-pop-content {\n display: flex;\n flex-direction: column;\n /* pop size less pop border size*/\n max-height: calc(29.5rem - 2px);\n width: 100%;\n}\n\n@media (max-height: 21rem) {\n [role=banner] .coz-nav-pop--apps {\n max-height: calc(100vh - 4rem)\n }\n\n [role=banner] .coz-nav-pop--apps .coz-nav-pop-content {\n max-height: calc(100vh - 4rem - 2px);\n }\n}\n\n\n[role=banner] .coz-nav-pop--apps .coz-nav-pop-content .coz-nav-group {\n flex-grow: 1;\n flex-shrink: 1;\n overflow-y: auto;\n}\n\n[role=banner] .coz-nav-apps-item {\n display: flex;\n}\n\n/* current app item */\n[role=banner] .coz-nav-apps-item.--current a[role=menuitem] {\n font-weight: bold;\n background-color: var(--paleGrey);\n border-left: 4px solid var(--dodgerBlue)\n}\n\n[role=banner] .coz-nav-apps-item [role=menuitem],\n[role=banner] [role=menuitem].coz-apps-home-btn {\n display: flex;\n box-sizing: border-box;\n justify-content: flex-start;\n flex-shrink: 0;\n align-items: center;\n width: 100%;\n height: 3rem;\n /* we remove the left border from the padding */\n padding: .5rem 1rem .5rem calc(1rem - 4px);\n color: var(--charcoalGrey);\n text-decoration: none;\n outline: none;\n}\n\n[role=banner] .coz-nav-apps-item:first-of-type [role=menuitem] {\n margin-top: .5rem;\n}\n\n[role=banner] .coz-nav-apps-item:last-of-type [role=menuitem] {\n margin-bottom: .5rem;\n}\n\n[role=banner] .coz-nav-apps-item-icon {\n margin-right: .5rem;\n height: 2rem;\n width: 2rem;\n /* force svg inline to be 2rem */\n min-width: 2rem;\n}\n\n[role=banner] .coz-nav-apps-item [role=menuitem] .coz-label {\n padding-right: .5rem;\n width: 100%;\n overflow-x: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n[role=banner] [role=menuitem].coz-apps-home-btn {\n display: flex;\n margin-top: 0;\n color: #5d6165;\n font-weight: bold;\n font-size: 14px;\n justify-content: center;\n align-items: center;\n}\n\n[role=banner] [role=menuitem].coz-apps-home-btn.--mobile>span {\n display: flex;\n justify-content: flex-start;\n}\n\n[role=banner] [role=menuitem].coz-apps-home-btn svg {\n width: 1rem;\n height: 1rem;\n margin-right: .5rem;\n}\n\n@keyframes barPlaceHolderShimmer {\n 0% {\n background-position: -20rem 0;\n }\n\n 80% {\n background-position: 20rem 0;\n }\n\n 80.1% {\n background-position: -20rem 0;\n }\n\n 100% {\n background-position: -20rem 0;\n }\n}\n\n[role=banner] .coz-loading-placeholder {\n display: inline-block;\n width: 100%;\n height: 100%;\n min-height: 1em;\n animation: barPlaceHolderShimmer 1s linear infinite;\n animation-delay: .1s;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n background-position: -20rem 0;\n background-image: linear-gradient(to right, var(--silver) 0, var(--paleGrey) 50%, var(--silver) 100%);\n background-size: 20rem 10rem;\n background-repeat: no-repeat;\n background-color: var(--silver);\n border-radius: .15rem;\n margin: .1rem 0;\n}\n\n\n[role=banner] .coz-nav-apps-item-icon.coz-loading-placeholder {\n width: 2rem;\n height: 2rem;\n margin: 0 1rem;\n display: block;\n}\n\n[role=banner] .coz-nav-apps-item [role=menuitem] .coz-label.coz-loading-placeholder {\n height: 1em;\n width: 7rem;\n}\n\n[role=banner] .coz-nav-apps-btns.--loading {\n width: 12rem;\n}\n\n[role=banner] .coz-nav-apps-btns-home.coz-loading-placeholder {\n height: 2rem;\n width: 2rem;\n border-radius: 2rem;\n background-color: var(--silver);\n flex-shrink: 0;\n}\n\n[role=banner] .coz-nav-apps-btns-main.coz-loading-placeholder {\n height: 1.5rem;\n margin: 0;\n background-color: var(--silver);\n}\n[role=banner] .coz-nav-settings-btn {\n color: var(--slateGrey);\n}\n[role=banner] .coz-nav-settings-btn:hover,\n[role=banner] .coz-nav-settings-btn:focus {\n background-color: var(--paleGrey);\n box-shadow: inset 0 -1px 0 0 var(--silver);\n color: var(--charcoalGrey);\n}\n\n[role=banner] .coz-nav-pop--settings {\n right: 0;\n}\n\n[role=banner] .coz-nav-settings-item [role=menuitem] {\n display: flex;\n box-sizing: border-box;\n margin: 0;\n width: 100%;\n padding: 0.8rem 16px;\n border: none;\n background-color: transparent;\n text-align: left;\n font-size: 1rem;\n white-space: nowrap;\n color: var(--charcoalGrey);\n text-decoration: none;\n outline: none;\n}\n\n[role=banner] .coz-nav-settings-item {\n display: flex;\n}\n\n[role=banner] .coz-nav-settings-item .coz-nav-settings-item-btn[role=menuitem] > span > span {\n margin-right: auto;\n}\n\n[role=banner] .coz-nav-settings-item .coz-nav-settings-item-btn-external-icon {\n margin-left: auto;\n padding-left: 16px;\n}\n[role=banner] [role=menuitem][data-icon=icon-storage] {\n background-position: 1.5em calc(.8em + 1px);\n}\n\n[role=banner] .coz-nav-storage {\n display: flex;\n flex-direction: column;\n align-items: left;\n padding-top: .5em;\n color: var(--coolGrey);\n}\n\n[role=banner] .coz-nav-storage-text {\n margin: 0 0 .1em 0;\n font-weight: normal;\n font-size: .875em;\n}\n\n[role=banner] .cozy-nav-storage-bar {\n height: .5em;\n margin: .2em 0 .1em 0;\n}\n\n[role=banner] .coz-drawer-wrapper {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100%;\n display: flex;\n}\n\n[role=banner] .coz-drawer-wrapper[aria-hidden=true] {\n pointer-events: none;\n}\n\n[role=banner] .coz-drawer-wrapper[aria-hidden=false] {\n pointer-events: auto;\n}\n\n[role=banner] .coz-drawer-wrapper::before {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: var(--charcoalGrey);\n opacity: 0;\n transition: opacity .2s ease-out .1s;\n}\n\n[role=banner] .coz-drawer-wrapper[aria-hidden=false]::before {\n opacity: .5;\n transition: opacity .2s ease-out;\n}\n\n[role=banner] .coz-drawer-wrapper aside {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 90%;\n max-width: 30em;\n height: 100%;\n display: flex;\n flex-direction: column;\n background-color: #fff;\n transform: translateX(-100%);\n transform-origin: 0% 0%;\n}\n\n[role=banner] .coz-drawer-wrapper aside.with-transition {\n transition: transform .2s ease-out;\n}\n\n[role=banner] .coz-drawer-wrapper[aria-hidden=false] aside {\n transform: translateX(0%);\n}\n\n[role=banner] .coz-drawer-wrapper[aria-hidden=false] aside.with-transition {\n transition: transform .3s cubic-bezier(0.2, 0.75, 0.3, 1.0);\n}\n\n[role=banner] .coz-drawer-wrapper ul {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n\n[role=banner] .coz-drawer-wrapper nav hr {\n margin: 0;\n border: none;\n border-bottom: solid 1px var(--silver);\n}\n\n[role=banner] .coz-drawer-wrapper .coz-nav-icon {\n margin-right: .5em;\n}\n\n[role=banner] .coz-drawer--apps {\n flex: 0 1 100%;\n /* IMPORTANT: on Chrome, the `overflow-y: scroll` property on .coz-drawer--apps prevented\n swipe events to be dispatched correctly ; the `touch-action: pan-y` fixes the problem\n see https://greensock.com/forums/topic/17546-draggable-text-elements-with-overflow/ */\n overflow-y: scroll;\n touch-action: pan-y;\n position: relative;\n overflow-x: hidden;\n}\n\n[role=banner] .coz-drawer--apps ul li {\n flex: 0 0 100%;\n max-width: 100%;\n}\n\n[role=banner] .coz-drawer--apps ul:last-of-type + hr {\n display: none;\n}\n\n[role=banner] .coz-drawer--apps [role=menuitem] {\n display: flex;\n flex-direction: row;\n padding: .3em .3em .3em 1.3em;\n height: 3rem;\n}\n\n[role=banner] .coz-drawer--apps .coz-nav-item img {\n width: 2rem;\n margin-right: .5rem;\n max-height: 2rem;\n}\n\n\n[role=banner] .coz-drawer--apps .coz-nav-category {\n font-size: 1em;\n padding: 2em 2em .5em;\n margin: 0;\n}\n\n[role=banner] .coz-drawer--settings {\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n/* /!\\ Trick to prevent application from scrolling in the background when the drawer is opened */\n[role=banner][data-drawer-visible=true] + [role=application] {\n position: fixed;\n width: 100%;\n}\n\n[role=banner] .coz-claudy {\n position: fixed;\n bottom: 5em;\n right: 2em;\n}\n\n@media (min-width: 64em) {\n [role=banner] .coz-claudy {\n bottom: 2em;\n }\n}\n\n[role=banner] .coz-claudy-icon {\n width: 3.5em;\n height: 3.5em;\n border-radius: 100%;\n border: none;\n background-color: var(--dodgerBlue);\n box-shadow: 0 1px 3px 0 rgba(50, 54, 63, 0.19), 0 6px 18px 0 rgba(50, 54, 63, 0.39);\n animation: none;\n cursor: pointer;\n opacity: .5;\n transition: all .2s ease-out;\n outline: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n[role=banner] .coz-claudy-icon:hover,\n[role=banner] .coz-claudy-icon:focus,\n[role=banner] .coz-claudy-icon:active,\n[role=banner] .coz-claudy [data-claudy-opened=true] {\n animation: none;\n transform: scale(1.1);\n opacity: 1;\n transition: all .2s ease-out;\n}\n\n[role=banner] .coz-claudy .coz-claudy-intent-wrapper {\n position: fixed;\n bottom: 9.5em;\n right: 2em;\n width: 25em;\n border-radius: .3em;\n background: white;\n transform-origin: 100% 100% 0;\n transform: scale(0) translateY(6em);\n filter: drop-shadow(0 4px 6px rgba(50, 54, 63, 0.5));\n opacity: 0;\n transition: .2s transform ease-in, .1s opacity ease-in;\n}\n\n[role=banner] .coz-claudy--opened .coz-claudy-intent-wrapper {\n transform: scale(1) translateY(0);\n opacity: 1;\n transition: .2s transform cubic-bezier(0.2, 0.75, 0.3, 1.15), .1s opacity ease-in;\n}\n\n[role=banner] .coz-claudy-intent-wrapper::after {\n position: fixed;\n content: '';\n right: 3em;\n width: 0;\n height: 0;\n /* Make it a bit taller to avoid browser spacing issue\n between it and the tooltip */\n border-bottom: .8em solid transparent;\n border-right: 1.5em solid white;\n bottom: -.6em;\n}\n\n[role=banner] .coz-claudy .coz-claudy-intent-wrapper .coz-intent{\n width: 100%;\n height: 100%;\n border: none;\n border-radius: .3em;\n}\n\n@media (min-width: 64em) {\n [role=banner] .coz-claudy .coz-claudy-intent-wrapper {\n bottom: 6.5em;\n }\n}\n\n@media (max-width: 48em) {\n [role=banner] .coz-claudy .coz-claudy-intent-wrapper {\n width: calc(100% - 2em);\n height: calc(100% - 2em)!important; /* overwritte intent setSize here */\n right: 1em;\n top: 1em;\n transform-origin: 50% 50% 0;\n }\n\n [role=banner] .coz-claudy-intent-wrapper::after {\n display: none;\n }\n}\n\n[role=banner] .coz-bar-wrapper {\n box-shadow: inset 0 -1px 0 0 var(--silver);\n --cozBarThemePrimaryColor: var(--primaryColor);\n --cozBarThemePrimaryContrastTextColor: var(--primaryContrastTextColor);\n}\n[role=banner] .coz-bar-wrapper .coz-nav-apps-btns {\n color: var(--slateGrey);\n}\n[role=banner] .coz-bar-wrapper .coz-bar-burger {\n color: var(--coolGrey);\n}\n@media (max-width: 64em) {\n [role=banner] .coz-bar-wrapper {\n background-color: var(--white);\n }\n}\n@media (max-width: 48em) {\n [role=banner] .coz-bar-wrapper.coz-theme-primary {\n box-shadow: inherit;\n background-color: var(--cozBarThemePrimaryColor);\n }\n [role=banner] .coz-bar-wrapper.coz-theme-primary .coz-nav-apps-btns,\n [role=banner] .coz-bar-wrapper.coz-theme-primary .coz-bar-burger {\n color: var(--cozBarThemePrimaryContrastTextColor);\n }\n}\n:root {\n --invertedBackgroundColor: #297ef2;\n --invertedContrastTextColor: #fff;\n}\n.CozyTheme--inverted {\n --primaryTextColor: #fff;\n --secondaryTextColor: rgba(255,255,255,0.64);\n --disabledTextColor: rgba(255,255,255,0.4);\n --hintTextColor: rgba(255,255,255,0.4);\n --iconTextColor: #fff;\n --actionColorActive: #fff;\n --actionColorHover: rgba(255,255,255,0.08);\n --actionColorSelected: rgba(255,255,255,0.16);\n --actionColorDisabled: rgba(255,255,255,0.32);\n --actionColorDisabledBackground: rgba(255,255,255,0.12);\n --actionColorFocus: rgba(255,255,255,0.24);\n --actionColorGhost: rgba(255,255,255,0.08);\n --actionColorHoverGhost: rgba(255,255,255,0.16);\n --dividerColor: rgba(255,255,255,0.16);\n --borderMainColor: rgba(255,255,255,0.24);\n --borderDisabledColor: rgba(255,255,255,0.12);\n --borderGhostColor: rgba(255,255,255,0.48);\n --borderGhostDisabledColor: rgba(255,255,255,0.24);\n --paperBackgroundColor: #297ef2;\n --defaultBackgroundColor: #579eff;\n --contrastBackgroundColor: rgba(255,255,255,0.12);\n --primaryColorLight: #fff;\n --primaryColor: #fff;\n --primaryColorDark: #eaf3ff;\n --primaryContrastTextColor: #297ef2;\n --secondaryColorLight: #f8eefd;\n --secondaryColor: #ecd7f7;\n --secondaryColorDark: #deb8f0;\n --secondaryContrastTextColor: rgba(29,33,42,0.9);\n --errorColorLight: #ffecec;\n --errorColor: #ffd3d3;\n --errorColorDark: #ffb9b9;\n --errorColorContrastText: rgba(29,33,42,0.9);\n --errorBackground: #d31f1f;\n --warningColorLight: #fff3dd;\n --warningColor: #ffe4b5;\n --warningColorDark: #ffd58b;\n --warningColorContrastText: rgba(29,33,42,0.9);\n --successColorLight: #e3ffe7;\n --successColor: #c0f4c6;\n --successColorDark: #97eca1;\n --successColorContrastText: rgba(29,33,42,0.9);\n --infoColorLight: #d4feff;\n --infoColor: #affdff;\n --infoColorDark: #86f5f7;\n --infoColorContrastText: rgba(29,33,42,0.9);\n/*\n The CSS variables below are historic and we should strive not to\n use them. Prefer to use directly semantic colors above.\n */\n --iconColor: currentColor;\n --textIconColor: #fff;\n --actionMenuIconColor: #fff;\n --barIconColor: #fff;\n --barIconColorDisabled: rgba(255,255,255,0.88);\n --spinnerColor: #fff;\n --linkColor: #fff;\n --linkColorActive: #fff;\n --linkTextDecoration: underline;\n --regularButtonPrimaryColor: #fff;\n --regularButtonSecondaryColor: #fff;\n --regularButtonActiveColor: rgba(255,255,255,0.88);\n --regularButtonConstrastColor: #297ef2;\n --secondaryButtonPrimaryColor: #297ef2;\n --secondaryButtonSecondaryColor: #fff;\n --secondaryButtonActiveColor: rgba(255,255,255,0.24);\n --secondaryButtonContrastColor: #fff;\n --dividerColor2: rgba(255,255,255,0.16);\n}\nhtml {\n/*\n Grey\n\n Stylus: grey0 - #FFFFFF, CSS: var(--grey0)\n Stylus: grey50 - #f9fafb, CSS: var(--grey50)\n Stylus: grey100 - #f4f5f6, CSS: var(--grey100)\n Stylus: grey200 - #eceff1, CSS: var(--grey200)\n Stylus: grey300 - #dde0e3, CSS: var(--grey300)\n Stylus: grey400 - #bfc3c7, CSS: var(--grey400)\n Stylus: grey500 - #9da2a6, CSS: var(--grey500)\n Stylus: grey600 - #7c8086, CSS: var(--grey600)\n Stylus: grey700 - #5d6169, CSS: var(--grey700)\n Stylus: grey800 - #3e424a, CSS: var(--grey800)\n Stylus: grey900 - #1d212a, CSS: var(--grey900)\n Stylus: greyA100 - #d3d6d8, CSS: var(--greyA100)\n Stylus: greyA200 - #a7abaf, CSS: var(--greyA200)\n Stylus: greyA400 - #2c3039, CSS: var(--greyA400)\n Stylus: greyA700 - #5d6169, CSS: var(--greyA700)\n Stylus: white - #FFFFFF, CSS: var(--white)\n Stylus: paleGrey - #F5F6F7, CSS: var(--paleGrey)\n Stylus: silver - #D6D8Da, CSS: var(--silver)\n Stylus: coolGrey - #95999D, CSS: var(--coolGrey)\n Stylus: slateGrey - #5D6165, CSS: var(--slateGrey)\n Stylus: charcoalGrey - #32363F, CSS: var(--charcoalGrey)\n Stylus: black - #000000, CSS: var(--black)\n\n Styleguide Settings.colors.grey\n */\n --grey0: #fff;\n --grey50: #f9fafb;\n --grey100: #f4f5f6;\n --grey200: #eceff1;\n --grey300: #dde0e3;\n --grey400: #bfc3c7;\n --grey500: #9da2a6;\n --grey600: #7c8086;\n --grey700: #5d6169;\n --grey800: #3e424a;\n --grey900: #1d212a;\n --greyA100: #d3d6d8;\n --greyA200: #a7abaf;\n --greyA400: #2c3039;\n --greyA700: #5d6169;\n --white: #fff;\n --paleGrey: #f5f6f7;\n --silver: #d6d8da;\n --coolGrey: #95999d;\n --slateGrey: #5d6165;\n --charcoalGrey: #32363f;\n --black: #000;\n --overlay: rgba(50,54,63,0.5);\n/*\n Blue\n\n Stylus: zircon - #F5FAFF, CSS: var(--zircon)\n Stylus: dodgerBlue - #297EF2, CSS: var(--dodgerBlue)\n Stylus: scienceBlue - #0B61D6, CSS: var(--scienceBlue)\n\n Styleguide Settings.colors.blue\n */\n --zircon: #f5faff;\n --dodgerBlue: #297ef2;\n --scienceBlue: #0b61d6;\n/*\n Green\n\n Stylus: weirdGreen - #40DE8E, CSS: var(--weirdGreen)\n Stylus: emerald - #35CE68, CSS: var(--emerald)\n Stylus: malachite - #08b442, CSS: var(--malachite)\n\n Styleguide Settings.colors.green\n */\n --weirdGreen: #40de8e;\n --emerald: #35ce68;\n --malachite: #08b442;\n/*\n Orange\n\n Stylus: mango - #FF962F, CSS: var(--mango)\n\n Styleguide Settings.colors.orange\n */\n --mango: #ff962f;\n/*\n Red\n\n Stylus: chablis - #FFF2F2, CSS: var(--chablis)\n Stylus: yourPink - #FDCBCB, CSS: var(--yourPink)\n Stylus: fuchsia - #FC4C83, CSS: var(--fuchsia)\n Stylus: pomegranate - #F52D2D, CSS: var(--pomegranate)\n Stylus: monza - #DD0505, CSS: var(--monza)\n\n Styleguide Settings.colors.red\n */\n --chablis: #fff2f2;\n --yourPink: #fdcbcb;\n --fuchsia: #fc4c83;\n --pomegranate: #f52d2d;\n --monza: #dd0505;\n}\nhtml,\n.CozyTheme--normal {\n/*\n Primary colors\n\n Stylus: primaryColorLightest - #B3D3FF, CSS: var(--primaryColorLightest)\n Stylus: primaryColorLight - #5C9DF5, CSS: var(--primaryColorLight)\n Stylus: primaryColor - #297EF2, CSS: var(--primaryColor)\n Stylus: primaryColorDark - #0B61D6, CSS: var(--primaryColorDark)\n Stylus: primaryContrastTextColor - #FFF, CSS: var(--primaryContrastTextColor)\n\n Styleguide Settings.theme.primary\n */\n --primaryColorLightest: #b3d3ff;\n --primaryColorLight: #579eff;\n --primaryColor: #297ef2;\n --primaryColorDark: #0f5cc7;\n --primaryContrastTextColor: #fff;\n/*\n Secondary colors\n\n Stylus: secondaryColorLightest - #FFD3D3, CSS: var(--secondaryColorLightest)\n Stylus: secondaryColorLight - #F96B6B, CSS: var(--secondaryColorLight)\n Stylus: secondaryColor - #EA3F3F, CSS: var(--secondaryColor)\n Stylus: secondaryColorDark - #D31F1F, CSS: var(--secondaryColorDark)\n Stylus: secondaryContrastTextColor - #FFF, CSS: var(--secondaryContrastTextColor)\n\n Styleguide Settings.theme.secondary\n */\n --secondaryColorLightest: #ffd3d3;\n --secondaryColorLight: #f96b6b;\n --secondaryColor: #ea3f3f;\n --secondaryColorDark: #d31f1f;\n --secondaryContrastTextColor: #fff;\n/*\n Background colors\n\n Stylus: primaryBackgroundLight - #F7FAFF, CSS: var(--primaryBackgroundLight)\n Stylus: paperBackgroundColor - #FFF, CSS: var(--paperBackgroundColor)\n Stylus: defaultBackgroundColor - #F4F5F6, CSS: var(--defaultBackgroundColor)\n Stylus: contrastBackgroundColor - #F5F5F6, CSS: var(--contrastBackgroundColor)\n\n Styleguide Settings.theme.background\n */\n --primaryBackgroundLight: #f7faff;\n --paperBackgroundColor: #fff;\n --defaultBackgroundColor: #f4f5f6;\n --contrastBackgroundColor: rgba(29,33,42,0.048);\n/*\n Text colors\n\n These colors use the alpha layer. Be careful to use the semantic variable.\n Hexadecimal colors are here only as an example on a white background.\n\n Stylus: primaryTextColor - #383B43, CSS: var(--primaryTextColor)\n Stylus: secondaryTextColor - #9D9EA1, CSS: var(--secondaryTextColor)\n Stylus: disabledTextColor - #BEBFC1, CSS: var(--disabledTextColor)\n Stylus: hintTextColor - #BEBFC1, CSS: var(--hintTextColor)\n Stylus: iconTextColor - #66686D, CSS: var(--iconTextColor)\n\n Styleguide Settings.theme.text\n */\n --primaryTextColor: rgba(29,33,42,0.9);\n --secondaryTextColor: rgba(29,33,42,0.48);\n --disabledTextColor: rgba(29,33,42,0.32);\n --hintTextColor: rgba(29,33,42,0.32);\n --iconTextColor: rgba(29,33,42,0.72);\n/*\n Action colors\n\n These colors use the alpha layer. Be careful to use the semantic variable.\n Hexadecimal colors are here only as an example on a white background.\n\n Stylus: actionColorActive - #8A8C90, CSS: var(--actionColorActive)\n Stylus: actionColorHover - #F7F7F7, CSS: var(--actionColorHover)\n Stylus: actionColorSelected - #EFEFF0, CSS: var(--actionColorSelected)\n Stylus: actionColorDisabled - #CFCFD1, CSS: var(--actionColorDisabled)\n Stylus: actionColorDisabledBackground - #E7E7E8, CSS: var(--actionColorDisabledBackground)\n Stylus: actionColorFocus - #E7E7E8, CSS: var(--actionColorFocus)\n Stylus: actionColorGhost - #EFEFF0, CSS: var(--actionColorGhost)\n Stylus: actionColorHoverGhost - #DFE0E0, CSS: var(--actionColorHoverGhost)\n\n Styleguide Settings.theme.action\n */\n --actionColorActive: rgba(29,33,42,0.56);\n --actionColorHover: rgba(29,33,42,0.04);\n --actionColorSelected: rgba(29,33,42,0.08);\n --actionColorDisabled: rgba(29,33,42,0.24);\n --actionColorDisabledBackground: rgba(29,33,42,0.12);\n --actionColorFocus: rgba(29,33,42,0.12);\n --actionColorGhost: rgba(29,33,42,0.08);\n --actionColorHoverGhost: rgba(29,33,42,0.16);\n/*\n Border colors\n\n These colors use the alpha layer. Be careful to use the semantic variable.\n Hexadecimal colors are here only as an example on a white background.\n\n Stylus: borderMainColor - #DFE0E0, CSS: var(--borderMainColor)\n Stylus: borderDisabledColor - #EFEFF0, CSS: var(--borderDisabledColor)\n Stylus: borderGhostColor - #9D9EA1, CSS: var(--borderGhostColor)\n Stylus: borderGhostDisabledColor - #DFE0E0, CSS: var(--borderGhostDisabledColor)\n\n Styleguide Settings.theme.border\n */\n --borderMainColor: rgba(29,33,42,0.16);\n --borderDisabledColor: rgba(29,33,42,0.08);\n --borderGhostColor: rgba(29,33,42,0.48);\n --borderGhostDisabledColor: rgba(29,33,42,0.16);\n/*\n Divider colors\n\n These colors use the alpha layer. Be careful to use the semantic variable.\n Hexadecimal colors are here only as an example on a white background.\n\n Stylus: dividerColor - #E3E4E5, CSS: var(--dividerColor)\n\n Styleguide Settings.theme.divider\n */\n --dividerColor: rgba(29,33,42,0.12);\n/*\n Success colors\n\n Stylus: successColorLight - #38C949, CSS: var(--successColorLight)\n Stylus: successColor - #09AE1C, CSS: var(--successColor)\n Stylus: successColorDark - #018711, CSS: var(--successColorDark)\n Stylus: successColorContrastText - #FFF, CSS: var(--successColorContrastText)\n\n Styleguide Settings.theme.success\n */\n --successColorLight: #38c949;\n --successColor: #09ae1c;\n --successColorDark: #018711;\n --successColorContrastText: #fff;\n/*\n Warning colors\n\n Stylus: warningColorLight - #EFA82F, CSS: var(--warningColorLight)\n Stylus: warningColor - #CB8100, CSS: var(--warningColor)\n Stylus: warningColorDark - #986100, CSS: var(--warningColorDark)\n Stylus: warningColorContrastText - #FFF, CSS: var(--warningColorContrastText)\n\n Styleguide Settings.theme.warning\n */\n --warningColorLight: #efa82d;\n --warningColor: #cb8100;\n --warningColorDark: #986100;\n --warningColorContrastText: #fff;\n/*\n Error colors\n\n Stylus: errorColorLightest - #FFECEC, CSS: var(--errorColorLightest)\n Stylus: errorColorLight - #F96B6B, CSS: var(--errorColorLight)\n Stylus: errorColor - #EA3F3F, CSS: var(--errorColor)\n Stylus: errorColorDark - #D31F1F, CSS: var(--errorColorDark)\n Stylus: errorBackground - #FFECEC, CSS: var(--errorBackground)\n Stylus: errorColorContrastText - #FFF, CSS: var(--errorColorContrastText)\n\n Styleguide Settings.theme.error\n */\n --errorColorLightest: #ffecec;\n --errorColorLight: #f96b6b;\n --errorColor: #ea3f3f;\n --errorColorDark: #d31f1f;\n --errorBackground: #ffecec;\n --errorColorContrastText: #fff;\n/*\n Info colors\n\n Stylus: infoColorLight - #0EC4C7, CSS: var(--infoColorLight)\n Stylus: infoColor - #009FA2, CSS: var(--infoColor)\n Stylus: infoColorDark - #007578, CSS: var(--infoColorDark)\n Stylus: infoColorContrastText - #FFF, CSS: var(--infoColorContrastText)\n\n Styleguide Settings.theme.info\n */\n --infoColorLight: #0ec4c7;\n --infoColor: #009fa2;\n --infoColorDark: #007578;\n --infoColorContrastText: #fff;\n/*\n ---------------------------------------------------------------------\n */\n/*\n The CSS variables below are historic and we should strive not to\n use them. Prefer to use directly semantic colors above.\n */\n --spinnerColor: var(--primaryColor);\n --linkColor: var(--primaryColor);\n --linkTextDecoration: none;\n --linkColorActive: var(--primaryColorDark);\n --invertedTabsActiveTextColor: var(--primaryContrastTextColor);\n --invertedTabsInactiveTextColor: var(--primaryContrastTextColor);\n --invertedTabsIndicatorColor: var(--primaryContrastTextColor);\n --invertedTabsBackgroundColor: var(--primaryColor);\n --regularButtonPrimaryColor: var(--primaryColor);\n --regularButtonSecondaryColor: var(--primaryColor);\n --regularButtonActiveColor: var(--primaryColorDark);\n --regularButtonConstrastColor: var(--primaryContrastTextColor);\n --secondaryButtonPrimaryColor: #fff;\n --secondaryButtonSecondaryColor: var(--silver);\n --secondaryButtonActiveColor: var(--silver);\n --secondaryButtonContrastColor: var(--black);\n --dividerColor2: var(--coolGrey);\n --iconColor: currentColor;\n --textIconColor: var(--charcoalGrey);\n --actionMenuIconColor: var(--slateGrey);\n --neutralBackground: var(--paleGrey);\n --buttonTextTransform: uppercase;\n --buttonBorderRadius: 0.125rem;\n --navTextColor: var(--slateGrey);\n --navTextActiveColor: var(--slateGrey);\n --navTextHoverColor: var(--charcoalGrey);\n --alertErrorColor: #fff;\n --alertErrorBackgroundColor: var(--errorColor);\n --alertSuccessColor: #fff;\n --alertSuccessBackgroundColor: var(--successColor);\n --alertInfoColor: #fff;\n --alertInfoBackgroundColor: var(--slateGrey);\n}\nhtml {\n --zIndex-below: -1;\n --zIndex-app: 0;\n --zIndex-low: 1;\n --zIndex-alertMobile: 10;\n --zIndex-nav: 20;\n --zIndex-bar: 21;\n --zIndex-selection: 30;\n --zIndex-popover: 40;\n --zIndex-overlay: 50;\n --zIndex-fileActionMenu: 60;\n --zIndex-drawer: 60;\n --zIndex-modal: 70;\n --zindex-alert: 80;\n}\n.u-visuallyhidden,\n.coz-bar-hidden {\n position: absolute !important;\n border: 0 !important;\n width: 0.063rem !important;\n height: 0.063rem !important;\n overflow: hidden !important;\n padding: 0 !important;\n white-space: nowrap !important;\n clip: rect(0.063rem, 0.063rem, 0.063rem, 0.063rem) !important;\n clip-path: inset(50%) !important;\n}\n.u-hide {\n display: none !important;\n visibility: hidden !important;\n}\n@media (max-width: 63.938rem) {\n .u-hide--mob {\n display: none !important;\n }\n}\n@media (min-width: 64rem) {\n .u-hide--tablet {\n display: none !important;\n }\n}\n@media (min-width: 48.063rem) {\n .u-hide--desk {\n display: none !important;\n }\n}\n.u-dn {\n display: none;\n}\n.u-di {\n display: inline;\n}\n.u-db {\n display: block;\n}\n.u-dib {\n display: inline-block;\n}\n.u-dit {\n display: inline-table;\n}\n.u-dt {\n display: table;\n}\n.u-dtc {\n display: table-cell;\n}\n.u-dt-row {\n display: table-row;\n}\n.u-dt-row-group {\n display: table-row-group;\n}\n.u-dt-column {\n display: table-column;\n}\n.u-dt-column-group {\n display: table-column-group;\n}\n@media (max-width: 30rem) {\n .u-dn-t {\n display: none;\n }\n .u-di-t {\n display: inline;\n }\n .u-db-t {\n display: block;\n }\n .u-dib-t {\n display: inline-block;\n }\n .u-dit-t {\n display: inline-table;\n }\n .u-dt-t {\n display: table;\n }\n .u-dtc-t {\n display: table-cell;\n }\n .u-dt-row-t {\n display: table-row;\n }\n .u-dt-row-group-t {\n display: table-row-group;\n }\n .u-dt-column-t {\n display: table-column;\n }\n .u-dt-column-group-t {\n display: table-column-group;\n }\n}\n@media (max-width: 48rem) {\n .u-dn-s {\n display: none;\n }\n .u-di-s {\n display: inline;\n }\n .u-db-s {\n display: block;\n }\n .u-dib-s {\n display: inline-block;\n }\n .u-dit-s {\n display: inline-table;\n }\n .u-dt-s {\n display: table;\n }\n .u-dtc-s {\n display: table-cell;\n }\n .u-dt-row-s {\n display: table-row;\n }\n .u-dt-row-group-s {\n display: table-row-group;\n }\n .u-dt-column-s {\n display: table-column;\n }\n .u-dt-column-group-s {\n display: table-column-group;\n }\n}\n@media (max-width: 63.938rem) {\n .u-dn-m {\n display: none;\n }\n .u-di-m {\n display: inline;\n }\n .u-db-m {\n display: block;\n }\n .u-dib-m {\n display: inline-block;\n }\n .u-dit-m {\n display: inline-table;\n }\n .u-dt-m {\n display: table;\n }\n .u-dtc-m {\n display: table-cell;\n }\n .u-dt-row-m {\n display: table-row;\n }\n .u-dt-row-group-m {\n display: table-row-group;\n }\n .u-dt-column-m {\n display: table-column;\n }\n .u-dt-column-group-m {\n display: table-column-group;\n }\n}\n.u-p-0 {\n padding: 0 !important;\n}\n.u-pt-0 {\n padding-top: 0 !important;\n}\n.u-pb-0 {\n padding-bottom: 0 !important;\n}\n.u-pl-0 {\n padding-left: 0 !important;\n}\n.u-pr-0 {\n padding-right: 0 !important;\n}\n.u-pv-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n}\n.u-ph-0 {\n padding-left: 0 !important;\n padding-right: 0 !important;\n}\n.u-p-1 {\n padding: 1rem !important;\n}\n.u-pt-1 {\n padding-top: 1rem !important;\n}\n.u-pb-1 {\n padding-bottom: 1rem !important;\n}\n.u-pl-1 {\n padding-left: 1rem !important;\n}\n.u-pr-1 {\n padding-right: 1rem !important;\n}\n.u-pv-1 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n}\n.u-ph-1 {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n}\n.u-p-2 {\n padding: 2rem !important;\n}\n.u-pt-2 {\n padding-top: 2rem !important;\n}\n.u-pb-2 {\n padding-bottom: 2rem !important;\n}\n.u-pl-2 {\n padding-left: 2rem !important;\n}\n.u-pr-2 {\n padding-right: 2rem !important;\n}\n.u-pv-2 {\n padding-top: 2rem !important;\n padding-bottom: 2rem !important;\n}\n.u-ph-2 {\n padding-left: 2rem !important;\n padding-right: 2rem !important;\n}\n.u-p-3 {\n padding: 3rem !important;\n}\n.u-pt-3 {\n padding-top: 3rem !important;\n}\n.u-pb-3 {\n padding-bottom: 3rem !important;\n}\n.u-pl-3 {\n padding-left: 3rem !important;\n}\n.u-pr-3 {\n padding-right: 3rem !important;\n}\n.u-pv-3 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n}\n.u-ph-3 {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n}\n.u-p-auto {\n padding: auto !important;\n}\n.u-pt-auto {\n padding-top: auto !important;\n}\n.u-pb-auto {\n padding-bottom: auto !important;\n}\n.u-pl-auto {\n padding-left: auto !important;\n}\n.u-pr-auto {\n padding-right: auto !important;\n}\n.u-pv-auto {\n padding-top: auto !important;\n padding-bottom: auto !important;\n}\n.u-ph-auto {\n padding-left: auto !important;\n padding-right: auto !important;\n}\n.u-p-half {\n padding: 0.5rem !important;\n}\n.u-pt-half {\n padding-top: 0.5rem !important;\n}\n.u-pb-half {\n padding-bottom: 0.5rem !important;\n}\n.u-pl-half {\n padding-left: 0.5rem !important;\n}\n.u-pr-half {\n padding-right: 0.5rem !important;\n}\n.u-pv-half {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n}\n.u-ph-half {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n}\n.u-p-1-half {\n padding: 1.5rem !important;\n}\n.u-pt-1-half {\n padding-top: 1.5rem !important;\n}\n.u-pb-1-half {\n padding-bottom: 1.5rem !important;\n}\n.u-pl-1-half {\n padding-left: 1.5rem !important;\n}\n.u-pr-1-half {\n padding-right: 1.5rem !important;\n}\n.u-pv-1-half {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n}\n.u-ph-1-half {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n}\n.u-p-2-half {\n padding: 2.5rem !important;\n}\n.u-pt-2-half {\n padding-top: 2.5rem !important;\n}\n.u-pb-2-half {\n padding-bottom: 2.5rem !important;\n}\n.u-pl-2-half {\n padding-left: 2.5rem !important;\n}\n.u-pr-2-half {\n padding-right: 2.5rem !important;\n}\n.u-pv-2-half {\n padding-top: 2.5rem !important;\n padding-bottom: 2.5rem !important;\n}\n.u-ph-2-half {\n padding-left: 2.5rem !important;\n padding-right: 2.5rem !important;\n}\n.u-m-0 {\n margin: 0 !important;\n}\n.u-mt-0 {\n margin-top: 0 !important;\n}\n.u-mb-0 {\n margin-bottom: 0 !important;\n}\n.u-ml-0 {\n margin-left: 0 !important;\n}\n.u-mr-0 {\n margin-right: 0 !important;\n}\n.u-mv-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n}\n.u-mh-0 {\n margin-left: 0 !important;\n margin-right: 0 !important;\n}\n.u-m-1 {\n margin: 1rem !important;\n}\n.u-mt-1 {\n margin-top: 1rem !important;\n}\n.u-mb-1 {\n margin-bottom: 1rem !important;\n}\n.u-ml-1 {\n margin-left: 1rem !important;\n}\n.u-mr-1 {\n margin-right: 1rem !important;\n}\n.u-mv-1 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n}\n.u-mh-1 {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n}\n.u-m-2 {\n margin: 2rem !important;\n}\n.u-mt-2 {\n margin-top: 2rem !important;\n}\n.u-mb-2 {\n margin-bottom: 2rem !important;\n}\n.u-ml-2 {\n margin-left: 2rem !important;\n}\n.u-mr-2 {\n margin-right: 2rem !important;\n}\n.u-mv-2 {\n margin-top: 2rem !important;\n margin-bottom: 2rem !important;\n}\n.u-mh-2 {\n margin-left: 2rem !important;\n margin-right: 2rem !important;\n}\n.u-m-3 {\n margin: 3rem !important;\n}\n.u-mt-3 {\n margin-top: 3rem !important;\n}\n.u-mb-3 {\n margin-bottom: 3rem !important;\n}\n.u-ml-3 {\n margin-left: 3rem !important;\n}\n.u-mr-3 {\n margin-right: 3rem !important;\n}\n.u-mv-3 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n}\n.u-mh-3 {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n}\n.u-m-auto {\n margin: auto !important;\n}\n.u-mt-auto {\n margin-top: auto !important;\n}\n.u-mb-auto {\n margin-bottom: auto !important;\n}\n.u-ml-auto {\n margin-left: auto !important;\n}\n.u-mr-auto {\n margin-right: auto !important;\n}\n.u-mv-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n}\n.u-mh-auto {\n margin-left: auto !important;\n margin-right: auto !important;\n}\n.u-m-half {\n margin: 0.5rem !important;\n}\n.u-mt-half {\n margin-top: 0.5rem !important;\n}\n.u-mb-half {\n margin-bottom: 0.5rem !important;\n}\n.u-ml-half {\n margin-left: 0.5rem !important;\n}\n.u-mr-half {\n margin-right: 0.5rem !important;\n}\n.u-mv-half {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n}\n.u-mh-half {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n}\n.u-m-1-half {\n margin: 1.5rem !important;\n}\n.u-mt-1-half {\n margin-top: 1.5rem !important;\n}\n.u-mb-1-half {\n margin-bottom: 1.5rem !important;\n}\n.u-ml-1-half {\n margin-left: 1.5rem !important;\n}\n.u-mr-1-half {\n margin-right: 1.5rem !important;\n}\n.u-mv-1-half {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n}\n.u-mh-1-half {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n}\n.u-m-2-half {\n margin: 2.5rem !important;\n}\n.u-mt-2-half {\n margin-top: 2.5rem !important;\n}\n.u-mb-2-half {\n margin-bottom: 2.5rem !important;\n}\n.u-ml-2-half {\n margin-left: 2.5rem !important;\n}\n.u-mr-2-half {\n margin-right: 2.5rem !important;\n}\n.u-mv-2-half {\n margin-top: 2.5rem !important;\n margin-bottom: 2.5rem !important;\n}\n.u-mh-2-half {\n margin-left: 2.5rem !important;\n margin-right: 2.5rem !important;\n}\n@media (max-width: 30rem) {\n .u-p-0-t {\n padding: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pt-0-t {\n padding-top: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pb-0-t {\n padding-bottom: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pl-0-t {\n padding-left: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pr-0-t {\n padding-right: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pv-0-t {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ph-0-t {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-p-1-t {\n padding: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pt-1-t {\n padding-top: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pb-1-t {\n padding-bottom: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pl-1-t {\n padding-left: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pr-1-t {\n padding-right: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pv-1-t {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ph-1-t {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-p-2-t {\n padding: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pt-2-t {\n padding-top: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pb-2-t {\n padding-bottom: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pl-2-t {\n padding-left: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pr-2-t {\n padding-right: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pv-2-t {\n padding-top: 2rem !important;\n padding-bottom: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ph-2-t {\n padding-left: 2rem !important;\n padding-right: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-p-3-t {\n padding: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pt-3-t {\n padding-top: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pb-3-t {\n padding-bottom: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pl-3-t {\n padding-left: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pr-3-t {\n padding-right: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pv-3-t {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ph-3-t {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-p-auto-t {\n padding: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pt-auto-t {\n padding-top: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pb-auto-t {\n padding-bottom: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pl-auto-t {\n padding-left: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pr-auto-t {\n padding-right: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pv-auto-t {\n padding-top: auto !important;\n padding-bottom: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ph-auto-t {\n padding-left: auto !important;\n padding-right: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-p-half-t {\n padding: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pt-half-t {\n padding-top: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pb-half-t {\n padding-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pl-half-t {\n padding-left: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pr-half-t {\n padding-right: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pv-half-t {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ph-half-t {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-p-1-half-t {\n padding: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pt-1-half-t {\n padding-top: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pb-1-half-t {\n padding-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pl-1-half-t {\n padding-left: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pr-1-half-t {\n padding-right: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pv-1-half-t {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ph-1-half-t {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-p-2-half-t {\n padding: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pt-2-half-t {\n padding-top: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pb-2-half-t {\n padding-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pl-2-half-t {\n padding-left: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pr-2-half-t {\n padding-right: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-pv-2-half-t {\n padding-top: 2.5rem !important;\n padding-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ph-2-half-t {\n padding-left: 2.5rem !important;\n padding-right: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-m-0-t {\n margin: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mt-0-t {\n margin-top: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mb-0-t {\n margin-bottom: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ml-0-t {\n margin-left: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mr-0-t {\n margin-right: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mv-0-t {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mh-0-t {\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n}\n@media (max-width: 30rem) {\n .u-m-1-t {\n margin: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mt-1-t {\n margin-top: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mb-1-t {\n margin-bottom: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ml-1-t {\n margin-left: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mr-1-t {\n margin-right: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mv-1-t {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mh-1-t {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-m-2-t {\n margin: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mt-2-t {\n margin-top: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mb-2-t {\n margin-bottom: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ml-2-t {\n margin-left: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mr-2-t {\n margin-right: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mv-2-t {\n margin-top: 2rem !important;\n margin-bottom: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mh-2-t {\n margin-left: 2rem !important;\n margin-right: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-m-3-t {\n margin: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mt-3-t {\n margin-top: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mb-3-t {\n margin-bottom: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ml-3-t {\n margin-left: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mr-3-t {\n margin-right: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mv-3-t {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mh-3-t {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-m-auto-t {\n margin: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mt-auto-t {\n margin-top: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mb-auto-t {\n margin-bottom: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ml-auto-t {\n margin-left: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mr-auto-t {\n margin-right: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mv-auto-t {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mh-auto-t {\n margin-left: auto !important;\n margin-right: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-m-half-t {\n margin: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mt-half-t {\n margin-top: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mb-half-t {\n margin-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ml-half-t {\n margin-left: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mr-half-t {\n margin-right: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mv-half-t {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mh-half-t {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-m-1-half-t {\n margin: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mt-1-half-t {\n margin-top: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mb-1-half-t {\n margin-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ml-1-half-t {\n margin-left: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mr-1-half-t {\n margin-right: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mv-1-half-t {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mh-1-half-t {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-m-2-half-t {\n margin: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mt-2-half-t {\n margin-top: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mb-2-half-t {\n margin-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-ml-2-half-t {\n margin-left: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mr-2-half-t {\n margin-right: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mv-2-half-t {\n margin-top: 2.5rem !important;\n margin-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mh-2-half-t {\n margin-left: 2.5rem !important;\n margin-right: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-p-0-s {\n padding: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pt-0-s {\n padding-top: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pb-0-s {\n padding-bottom: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pl-0-s {\n padding-left: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pr-0-s {\n padding-right: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pv-0-s {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ph-0-s {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-p-1-s {\n padding: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pt-1-s {\n padding-top: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pb-1-s {\n padding-bottom: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pl-1-s {\n padding-left: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pr-1-s {\n padding-right: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pv-1-s {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ph-1-s {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-p-2-s {\n padding: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pt-2-s {\n padding-top: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pb-2-s {\n padding-bottom: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pl-2-s {\n padding-left: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pr-2-s {\n padding-right: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pv-2-s {\n padding-top: 2rem !important;\n padding-bottom: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ph-2-s {\n padding-left: 2rem !important;\n padding-right: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-p-3-s {\n padding: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pt-3-s {\n padding-top: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pb-3-s {\n padding-bottom: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pl-3-s {\n padding-left: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pr-3-s {\n padding-right: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pv-3-s {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ph-3-s {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-p-auto-s {\n padding: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pt-auto-s {\n padding-top: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pb-auto-s {\n padding-bottom: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pl-auto-s {\n padding-left: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pr-auto-s {\n padding-right: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pv-auto-s {\n padding-top: auto !important;\n padding-bottom: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ph-auto-s {\n padding-left: auto !important;\n padding-right: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-p-half-s {\n padding: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pt-half-s {\n padding-top: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pb-half-s {\n padding-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pl-half-s {\n padding-left: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pr-half-s {\n padding-right: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pv-half-s {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ph-half-s {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-p-1-half-s {\n padding: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pt-1-half-s {\n padding-top: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pb-1-half-s {\n padding-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pl-1-half-s {\n padding-left: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pr-1-half-s {\n padding-right: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pv-1-half-s {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ph-1-half-s {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-p-2-half-s {\n padding: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pt-2-half-s {\n padding-top: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pb-2-half-s {\n padding-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pl-2-half-s {\n padding-left: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pr-2-half-s {\n padding-right: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-pv-2-half-s {\n padding-top: 2.5rem !important;\n padding-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ph-2-half-s {\n padding-left: 2.5rem !important;\n padding-right: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-m-0-s {\n margin: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mt-0-s {\n margin-top: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mb-0-s {\n margin-bottom: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ml-0-s {\n margin-left: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mr-0-s {\n margin-right: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mv-0-s {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mh-0-s {\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-m-1-s {\n margin: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mt-1-s {\n margin-top: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mb-1-s {\n margin-bottom: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ml-1-s {\n margin-left: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mr-1-s {\n margin-right: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mv-1-s {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mh-1-s {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-m-2-s {\n margin: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mt-2-s {\n margin-top: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mb-2-s {\n margin-bottom: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ml-2-s {\n margin-left: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mr-2-s {\n margin-right: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mv-2-s {\n margin-top: 2rem !important;\n margin-bottom: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mh-2-s {\n margin-left: 2rem !important;\n margin-right: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-m-3-s {\n margin: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mt-3-s {\n margin-top: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mb-3-s {\n margin-bottom: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ml-3-s {\n margin-left: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mr-3-s {\n margin-right: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mv-3-s {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mh-3-s {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-m-auto-s {\n margin: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mt-auto-s {\n margin-top: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mb-auto-s {\n margin-bottom: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ml-auto-s {\n margin-left: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mr-auto-s {\n margin-right: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mv-auto-s {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mh-auto-s {\n margin-left: auto !important;\n margin-right: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-m-half-s {\n margin: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mt-half-s {\n margin-top: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mb-half-s {\n margin-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ml-half-s {\n margin-left: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mr-half-s {\n margin-right: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mv-half-s {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mh-half-s {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-m-1-half-s {\n margin: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mt-1-half-s {\n margin-top: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mb-1-half-s {\n margin-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ml-1-half-s {\n margin-left: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mr-1-half-s {\n margin-right: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mv-1-half-s {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mh-1-half-s {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-m-2-half-s {\n margin: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mt-2-half-s {\n margin-top: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mb-2-half-s {\n margin-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ml-2-half-s {\n margin-left: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mr-2-half-s {\n margin-right: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mv-2-half-s {\n margin-top: 2.5rem !important;\n margin-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mh-2-half-s {\n margin-left: 2.5rem !important;\n margin-right: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-p-0-m {\n padding: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pt-0-m {\n padding-top: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pb-0-m {\n padding-bottom: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pl-0-m {\n padding-left: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pr-0-m {\n padding-right: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pv-0-m {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ph-0-m {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-p-1-m {\n padding: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pt-1-m {\n padding-top: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pb-1-m {\n padding-bottom: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pl-1-m {\n padding-left: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pr-1-m {\n padding-right: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pv-1-m {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ph-1-m {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-p-2-m {\n padding: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pt-2-m {\n padding-top: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pb-2-m {\n padding-bottom: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pl-2-m {\n padding-left: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pr-2-m {\n padding-right: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pv-2-m {\n padding-top: 2rem !important;\n padding-bottom: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ph-2-m {\n padding-left: 2rem !important;\n padding-right: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-p-3-m {\n padding: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pt-3-m {\n padding-top: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pb-3-m {\n padding-bottom: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pl-3-m {\n padding-left: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pr-3-m {\n padding-right: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pv-3-m {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ph-3-m {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-p-auto-m {\n padding: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pt-auto-m {\n padding-top: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pb-auto-m {\n padding-bottom: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pl-auto-m {\n padding-left: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pr-auto-m {\n padding-right: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pv-auto-m {\n padding-top: auto !important;\n padding-bottom: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ph-auto-m {\n padding-left: auto !important;\n padding-right: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-p-half-m {\n padding: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pt-half-m {\n padding-top: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pb-half-m {\n padding-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pl-half-m {\n padding-left: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pr-half-m {\n padding-right: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pv-half-m {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ph-half-m {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-p-1-half-m {\n padding: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pt-1-half-m {\n padding-top: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pb-1-half-m {\n padding-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pl-1-half-m {\n padding-left: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pr-1-half-m {\n padding-right: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pv-1-half-m {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ph-1-half-m {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-p-2-half-m {\n padding: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pt-2-half-m {\n padding-top: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pb-2-half-m {\n padding-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pl-2-half-m {\n padding-left: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pr-2-half-m {\n padding-right: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pv-2-half-m {\n padding-top: 2.5rem !important;\n padding-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ph-2-half-m {\n padding-left: 2.5rem !important;\n padding-right: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-m-0-m {\n margin: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mt-0-m {\n margin-top: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mb-0-m {\n margin-bottom: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ml-0-m {\n margin-left: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mr-0-m {\n margin-right: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mv-0-m {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mh-0-m {\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-m-1-m {\n margin: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mt-1-m {\n margin-top: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mb-1-m {\n margin-bottom: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ml-1-m {\n margin-left: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mr-1-m {\n margin-right: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mv-1-m {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mh-1-m {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-m-2-m {\n margin: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mt-2-m {\n margin-top: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mb-2-m {\n margin-bottom: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ml-2-m {\n margin-left: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mr-2-m {\n margin-right: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mv-2-m {\n margin-top: 2rem !important;\n margin-bottom: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mh-2-m {\n margin-left: 2rem !important;\n margin-right: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-m-3-m {\n margin: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mt-3-m {\n margin-top: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mb-3-m {\n margin-bottom: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ml-3-m {\n margin-left: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mr-3-m {\n margin-right: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mv-3-m {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mh-3-m {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-m-auto-m {\n margin: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mt-auto-m {\n margin-top: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mb-auto-m {\n margin-bottom: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ml-auto-m {\n margin-left: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mr-auto-m {\n margin-right: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mv-auto-m {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mh-auto-m {\n margin-left: auto !important;\n margin-right: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-m-half-m {\n margin: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mt-half-m {\n margin-top: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mb-half-m {\n margin-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ml-half-m {\n margin-left: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mr-half-m {\n margin-right: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mv-half-m {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mh-half-m {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-m-1-half-m {\n margin: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mt-1-half-m {\n margin-top: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mb-1-half-m {\n margin-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ml-1-half-m {\n margin-left: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mr-1-half-m {\n margin-right: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mv-1-half-m {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mh-1-half-m {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-m-2-half-m {\n margin: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mt-2-half-m {\n margin-top: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mb-2-half-m {\n margin-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ml-2-half-m {\n margin-left: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mr-2-half-m {\n margin-right: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mv-2-half-m {\n margin-top: 2.5rem !important;\n margin-bottom: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mh-2-half-m {\n margin-left: 2.5rem !important;\n margin-right: 2.5rem !important;\n }\n}\n.u-pos-absolute {\n position: absolute;\n}\n.u-pos-relative {\n position: relative;\n}\n.u-pos-fixed {\n position: fixed;\n}\n.u-pos-sticky {\n position: sticky;\n}\n.u-pos-static {\n position: static;\n}\n@media (max-width: 30rem) {\n .u-pos-absolute-t {\n position: absolute;\n }\n .u-pos-relative-t {\n position: relative;\n }\n .u-pos-fixed-t {\n position: fixed;\n }\n .u-pos-sticky-t {\n position: sticky;\n }\n .u-pos-static-t {\n position: static;\n }\n}\n@media (max-width: 48rem) {\n .u-pos-absolute-s {\n position: absolute;\n }\n .u-pos-relative-s {\n position: relative;\n }\n .u-pos-fixed-s {\n position: fixed;\n }\n .u-pos-sticky-s {\n position: sticky;\n }\n .u-pos-static-s {\n position: static;\n }\n}\n@media (max-width: 63.938rem) {\n .u-pos-absolute-m {\n position: absolute;\n }\n .u-pos-relative-m {\n position: relative;\n }\n .u-pos-fixed-m {\n position: fixed;\n }\n .u-pos-sticky-m {\n position: sticky;\n }\n .u-pos-static-m {\n position: static;\n }\n}\n.u-top-m {\n top: 1rem;\n}\n.u-top-xs {\n top: 0.5rem;\n}\n.u-top-s {\n top: 0.75rem;\n}\n.u-top-l {\n top: 1.5rem;\n}\n.u-top-xl {\n top: 2rem;\n}\n.u-top-xxl {\n top: 3rem;\n}\n.u-top-0 {\n top: 0;\n}\n.u-bottom-m {\n bottom: 1rem;\n}\n.u-bottom-xs {\n bottom: 0.5rem;\n}\n.u-bottom-s {\n bottom: 0.75rem;\n}\n.u-bottom-l {\n bottom: 1.5rem;\n}\n.u-bottom-xl {\n bottom: 2rem;\n}\n.u-bottom-xxl {\n bottom: 3rem;\n}\n.u-bottom-0 {\n bottom: 0;\n}\n.u-left-m {\n left: 1rem;\n}\n.u-left-xs {\n left: 0.5rem;\n}\n.u-left-s {\n left: 0.75rem;\n}\n.u-left-l {\n left: 1.5rem;\n}\n.u-left-xl {\n left: 2rem;\n}\n.u-left-xxl {\n left: 3rem;\n}\n.u-left-0 {\n left: 0;\n}\n.u-right-m {\n right: 1rem;\n}\n.u-right-xs {\n right: 0.5rem;\n}\n.u-right-s {\n right: 0.75rem;\n}\n.u-right-l {\n right: 1.5rem;\n}\n.u-right-xl {\n right: 2rem;\n}\n.u-right-xxl {\n right: 3rem;\n}\n.u-right-0 {\n right: 0;\n}\n.u-miw-1 {\n min-width: 1rem !important;\n}\n.u-maw-1 {\n max-width: 1rem !important;\n}\n.u-mih-1 {\n min-height: 1rem !important;\n}\n.u-mah-1 {\n max-height: 1rem !important;\n}\n.u-miw-2 {\n min-width: 2rem !important;\n}\n.u-maw-2 {\n max-width: 2rem !important;\n}\n.u-mih-2 {\n min-height: 2rem !important;\n}\n.u-mah-2 {\n max-height: 2rem !important;\n}\n.u-miw-3 {\n min-width: 4rem !important;\n}\n.u-maw-3 {\n max-width: 4rem !important;\n}\n.u-mih-3 {\n min-height: 4rem !important;\n}\n.u-mah-3 {\n max-height: 4rem !important;\n}\n.u-miw-4 {\n min-width: 8rem !important;\n}\n.u-maw-4 {\n max-width: 8rem !important;\n}\n.u-mih-4 {\n min-height: 8rem !important;\n}\n.u-mah-4 {\n max-height: 8rem !important;\n}\n.u-miw-5 {\n min-width: 16rem !important;\n}\n.u-maw-5 {\n max-width: 16rem !important;\n}\n.u-mih-5 {\n min-height: 16rem !important;\n}\n.u-mah-5 {\n max-height: 16rem !important;\n}\n.u-miw-6 {\n min-width: 32rem !important;\n}\n.u-maw-6 {\n max-width: 32rem !important;\n}\n.u-mih-6 {\n min-height: 32rem !important;\n}\n.u-mah-6 {\n max-height: 32rem !important;\n}\n.u-miw-7 {\n min-width: 48rem !important;\n}\n.u-maw-7 {\n max-width: 48rem !important;\n}\n.u-mih-7 {\n min-height: 48rem !important;\n}\n.u-mah-7 {\n max-height: 48rem !important;\n}\n.u-miw-8 {\n min-width: 64rem !important;\n}\n.u-maw-8 {\n max-width: 64rem !important;\n}\n.u-mih-8 {\n min-height: 64rem !important;\n}\n.u-mah-8 {\n max-height: 64rem !important;\n}\n.u-miw-9 {\n min-width: 96rem !important;\n}\n.u-maw-9 {\n max-width: 96rem !important;\n}\n.u-mih-9 {\n min-height: 96rem !important;\n}\n.u-mah-9 {\n max-height: 96rem !important;\n}\n.u-miw-100 {\n min-width: 100% !important;\n}\n.u-maw-100 {\n max-width: 100% !important;\n}\n.u-mih-100 {\n min-height: 100% !important;\n}\n.u-mah-100 {\n max-height: 100% !important;\n}\n.u-maw-none {\n max-width: none !important;\n}\n.u-mah-none {\n max-height: none !important;\n}\n.u-miw-auto {\n min-width: auto !important;\n}\n.u-mih-auto {\n min-height: auto !important;\n}\n.u-miw-half {\n min-width: 0.5rem !important;\n}\n.u-maw-half {\n max-width: 0.5rem !important;\n}\n.u-mih-half {\n min-height: 0.5rem !important;\n}\n.u-mah-half {\n max-height: 0.5rem !important;\n}\n.u-miw-1-half {\n min-width: 1.5rem !important;\n}\n.u-maw-1-half {\n max-width: 1.5rem !important;\n}\n.u-mih-1-half {\n min-height: 1.5rem !important;\n}\n.u-mah-1-half {\n max-height: 1.5rem !important;\n}\n.u-miw-2-half {\n min-width: 2.5rem !important;\n}\n.u-maw-2-half {\n max-width: 2.5rem !important;\n}\n.u-mih-2-half {\n min-height: 2.5rem !important;\n}\n.u-mah-2-half {\n max-height: 2.5rem !important;\n}\n@media (max-width: 30rem) {\n .u-miw-1-t {\n min-width: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-1-t {\n max-width: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-1-t {\n min-height: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-1-t {\n max-height: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-2-t {\n min-width: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-2-t {\n max-width: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-2-t {\n min-height: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-2-t {\n max-height: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-3-t {\n min-width: 4rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-3-t {\n max-width: 4rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-3-t {\n min-height: 4rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-3-t {\n max-height: 4rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-4-t {\n min-width: 8rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-4-t {\n max-width: 8rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-4-t {\n min-height: 8rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-4-t {\n max-height: 8rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-5-t {\n min-width: 16rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-5-t {\n max-width: 16rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-5-t {\n min-height: 16rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-5-t {\n max-height: 16rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-6-t {\n min-width: 32rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-6-t {\n max-width: 32rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-6-t {\n min-height: 32rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-6-t {\n max-height: 32rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-7-t {\n min-width: 48rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-7-t {\n max-width: 48rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-7-t {\n min-height: 48rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-7-t {\n max-height: 48rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-8-t {\n min-width: 64rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-8-t {\n max-width: 64rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-8-t {\n min-height: 64rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-8-t {\n max-height: 64rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-9-t {\n min-width: 96rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-9-t {\n max-width: 96rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-9-t {\n min-height: 96rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-9-t {\n max-height: 96rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-100-t {\n min-width: 100% !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-100-t {\n max-width: 100% !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-100-t {\n min-height: 100% !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-100-t {\n max-height: 100% !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-none-t {\n max-width: none !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-none-t {\n max-height: none !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-auto-t {\n min-width: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-auto-t {\n min-height: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-half-t {\n min-width: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-half-t {\n max-width: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-half-t {\n min-height: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-half-t {\n max-height: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-1-half-t {\n min-width: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-1-half-t {\n max-width: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-1-half-t {\n min-height: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-1-half-t {\n max-height: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-miw-2-half-t {\n min-width: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-maw-2-half-t {\n max-width: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mih-2-half-t {\n min-height: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-mah-2-half-t {\n max-height: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-1-s {\n min-width: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-1-s {\n max-width: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-1-s {\n min-height: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-1-s {\n max-height: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-2-s {\n min-width: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-2-s {\n max-width: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-2-s {\n min-height: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-2-s {\n max-height: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-3-s {\n min-width: 4rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-3-s {\n max-width: 4rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-3-s {\n min-height: 4rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-3-s {\n max-height: 4rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-4-s {\n min-width: 8rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-4-s {\n max-width: 8rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-4-s {\n min-height: 8rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-4-s {\n max-height: 8rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-5-s {\n min-width: 16rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-5-s {\n max-width: 16rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-5-s {\n min-height: 16rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-5-s {\n max-height: 16rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-6-s {\n min-width: 32rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-6-s {\n max-width: 32rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-6-s {\n min-height: 32rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-6-s {\n max-height: 32rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-7-s {\n min-width: 48rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-7-s {\n max-width: 48rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-7-s {\n min-height: 48rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-7-s {\n max-height: 48rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-8-s {\n min-width: 64rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-8-s {\n max-width: 64rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-8-s {\n min-height: 64rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-8-s {\n max-height: 64rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-9-s {\n min-width: 96rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-9-s {\n max-width: 96rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-9-s {\n min-height: 96rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-9-s {\n max-height: 96rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-100-s {\n min-width: 100% !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-100-s {\n max-width: 100% !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-100-s {\n min-height: 100% !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-100-s {\n max-height: 100% !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-none-s {\n max-width: none !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-none-s {\n max-height: none !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-auto-s {\n min-width: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-auto-s {\n min-height: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-half-s {\n min-width: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-half-s {\n max-width: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-half-s {\n min-height: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-half-s {\n max-height: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-1-half-s {\n min-width: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-1-half-s {\n max-width: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-1-half-s {\n min-height: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-1-half-s {\n max-height: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-miw-2-half-s {\n min-width: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-maw-2-half-s {\n max-width: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mih-2-half-s {\n min-height: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-mah-2-half-s {\n max-height: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-1-m {\n min-width: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-1-m {\n max-width: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-1-m {\n min-height: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-1-m {\n max-height: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-2-m {\n min-width: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-2-m {\n max-width: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-2-m {\n min-height: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-2-m {\n max-height: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-3-m {\n min-width: 4rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-3-m {\n max-width: 4rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-3-m {\n min-height: 4rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-3-m {\n max-height: 4rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-4-m {\n min-width: 8rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-4-m {\n max-width: 8rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-4-m {\n min-height: 8rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-4-m {\n max-height: 8rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-5-m {\n min-width: 16rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-5-m {\n max-width: 16rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-5-m {\n min-height: 16rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-5-m {\n max-height: 16rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-6-m {\n min-width: 32rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-6-m {\n max-width: 32rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-6-m {\n min-height: 32rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-6-m {\n max-height: 32rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-7-m {\n min-width: 48rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-7-m {\n max-width: 48rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-7-m {\n min-height: 48rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-7-m {\n max-height: 48rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-8-m {\n min-width: 64rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-8-m {\n max-width: 64rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-8-m {\n min-height: 64rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-8-m {\n max-height: 64rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-9-m {\n min-width: 96rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-9-m {\n max-width: 96rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-9-m {\n min-height: 96rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-9-m {\n max-height: 96rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-100-m {\n min-width: 100% !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-100-m {\n max-width: 100% !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-100-m {\n min-height: 100% !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-100-m {\n max-height: 100% !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-none-m {\n max-width: none !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-none-m {\n max-height: none !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-auto-m {\n min-width: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-auto-m {\n min-height: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-half-m {\n min-width: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-half-m {\n max-width: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-half-m {\n min-height: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-half-m {\n max-height: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-1-half-m {\n min-width: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-1-half-m {\n max-width: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-1-half-m {\n min-height: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-1-half-m {\n max-height: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-miw-2-half-m {\n min-width: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-maw-2-half-m {\n max-width: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mih-2-half-m {\n min-height: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-mah-2-half-m {\n max-height: 2.5rem !important;\n }\n}\n.u-w-1 {\n width: 1rem !important;\n}\n.u-h-1 {\n height: 1rem !important;\n}\n.u-w-2 {\n width: 2rem !important;\n}\n.u-h-2 {\n height: 2rem !important;\n}\n.u-w-3 {\n width: 4rem !important;\n}\n.u-h-3 {\n height: 4rem !important;\n}\n.u-w-4 {\n width: 8rem !important;\n}\n.u-h-4 {\n height: 8rem !important;\n}\n.u-w-5 {\n width: 16rem !important;\n}\n.u-h-5 {\n height: 16rem !important;\n}\n.u-w-6 {\n width: 32rem !important;\n}\n.u-h-6 {\n height: 32rem !important;\n}\n.u-w-7 {\n width: 48rem !important;\n}\n.u-h-7 {\n height: 48rem !important;\n}\n.u-w-8 {\n width: 64rem !important;\n}\n.u-h-8 {\n height: 64rem !important;\n}\n.u-w-9 {\n width: 96rem !important;\n}\n.u-h-9 {\n height: 96rem !important;\n}\n.u-w-100 {\n width: 100% !important;\n}\n.u-h-100 {\n height: 100% !important;\n}\n.u-w-auto {\n width: auto !important;\n}\n.u-h-auto {\n height: auto !important;\n}\n.u-w-half {\n width: 0.5rem !important;\n}\n.u-h-half {\n height: 0.5rem !important;\n}\n.u-w-1-half {\n width: 1.5rem !important;\n}\n.u-h-1-half {\n height: 1.5rem !important;\n}\n.u-w-2-half {\n width: 2.5rem !important;\n}\n.u-h-2-half {\n height: 2.5rem !important;\n}\n@media (max-width: 30rem) {\n .u-w-1-t {\n width: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-1-t {\n height: 1rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-2-t {\n width: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-2-t {\n height: 2rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-3-t {\n width: 4rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-3-t {\n height: 4rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-4-t {\n width: 8rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-4-t {\n height: 8rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-5-t {\n width: 16rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-5-t {\n height: 16rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-6-t {\n width: 32rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-6-t {\n height: 32rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-7-t {\n width: 48rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-7-t {\n height: 48rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-8-t {\n width: 64rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-8-t {\n height: 64rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-9-t {\n width: 96rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-9-t {\n height: 96rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-100-t {\n width: 100% !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-100-t {\n height: 100% !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-auto-t {\n width: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-auto-t {\n height: auto !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-half-t {\n width: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-half-t {\n height: 0.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-1-half-t {\n width: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-1-half-t {\n height: 1.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-w-2-half-t {\n width: 2.5rem !important;\n }\n}\n@media (max-width: 30rem) {\n .u-h-2-half-t {\n height: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-1-s {\n width: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-1-s {\n height: 1rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-2-s {\n width: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-2-s {\n height: 2rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-3-s {\n width: 4rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-3-s {\n height: 4rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-4-s {\n width: 8rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-4-s {\n height: 8rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-5-s {\n width: 16rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-5-s {\n height: 16rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-6-s {\n width: 32rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-6-s {\n height: 32rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-7-s {\n width: 48rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-7-s {\n height: 48rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-8-s {\n width: 64rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-8-s {\n height: 64rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-9-s {\n width: 96rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-9-s {\n height: 96rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-100-s {\n width: 100% !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-100-s {\n height: 100% !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-auto-s {\n width: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-auto-s {\n height: auto !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-half-s {\n width: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-half-s {\n height: 0.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-1-half-s {\n width: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-1-half-s {\n height: 1.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-w-2-half-s {\n width: 2.5rem !important;\n }\n}\n@media (max-width: 48rem) {\n .u-h-2-half-s {\n height: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-1-m {\n width: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-1-m {\n height: 1rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-2-m {\n width: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-2-m {\n height: 2rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-3-m {\n width: 4rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-3-m {\n height: 4rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-4-m {\n width: 8rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-4-m {\n height: 8rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-5-m {\n width: 16rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-5-m {\n height: 16rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-6-m {\n width: 32rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-6-m {\n height: 32rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-7-m {\n width: 48rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-7-m {\n height: 48rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-8-m {\n width: 64rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-8-m {\n height: 64rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-9-m {\n width: 96rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-9-m {\n height: 96rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-100-m {\n width: 100% !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-100-m {\n height: 100% !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-auto-m {\n width: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-auto-m {\n height: auto !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-half-m {\n width: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-half-m {\n height: 0.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-1-half-m {\n width: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-1-half-m {\n height: 1.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-w-2-half-m {\n width: 2.5rem !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-h-2-half-m {\n height: 2.5rem !important;\n }\n}\n@-moz-keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(359deg);\n }\n}\n@-webkit-keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(359deg);\n }\n}\n@-o-keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(359deg);\n }\n}\n@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(359deg);\n }\n}\n@-moz-keyframes shake {\n 10%, 90% {\n transform: translate3d(-1px, 0, 0);\n }\n 20%, 80% {\n transform: translate3d(2px, 0, 0);\n }\n 30%, 50%, 70% {\n transform: translate3d(-4px, 0, 0);\n }\n 40%, 60% {\n transform: translate3d(4px, 0, 0);\n }\n}\n@-webkit-keyframes shake {\n 10%, 90% {\n transform: translate3d(-1px, 0, 0);\n }\n 20%, 80% {\n transform: translate3d(2px, 0, 0);\n }\n 30%, 50%, 70% {\n transform: translate3d(-4px, 0, 0);\n }\n 40%, 60% {\n transform: translate3d(4px, 0, 0);\n }\n}\n@-o-keyframes shake {\n 10%, 90% {\n transform: translate3d(-1px, 0, 0);\n }\n 20%, 80% {\n transform: translate3d(2px, 0, 0);\n }\n 30%, 50%, 70% {\n transform: translate3d(-4px, 0, 0);\n }\n 40%, 60% {\n transform: translate3d(4px, 0, 0);\n }\n}\n@keyframes shake {\n 10%, 90% {\n transform: translate3d(-1px, 0, 0);\n }\n 20%, 80% {\n transform: translate3d(2px, 0, 0);\n }\n 30%, 50%, 70% {\n transform: translate3d(-4px, 0, 0);\n }\n 40%, 60% {\n transform: translate3d(4px, 0, 0);\n }\n}\n.u-visuallyhidden,\n.coz-bar-hidden {\n position: absolute !important;\n border: 0 !important;\n width: 0.063rem !important;\n height: 0.063rem !important;\n overflow: hidden !important;\n padding: 0 !important;\n white-space: nowrap !important;\n clip: rect(0.063rem, 0.063rem, 0.063rem, 0.063rem) !important;\n clip-path: inset(50%) !important;\n}\n.u-hide {\n display: none !important;\n visibility: hidden !important;\n}\n@media (max-width: 63.938rem) {\n .u-hide--mob {\n display: none !important;\n }\n}\n@media (min-width: 64rem) {\n .u-hide--tablet {\n display: none !important;\n }\n}\n@media (min-width: 48.063rem) {\n .u-hide--desk {\n display: none !important;\n }\n}\n.u-dn {\n display: none;\n}\n.u-di {\n display: inline;\n}\n.u-db {\n display: block;\n}\n.u-dib {\n display: inline-block;\n}\n.u-dit {\n display: inline-table;\n}\n.u-dt {\n display: table;\n}\n.u-dtc {\n display: table-cell;\n}\n.u-dt-row {\n display: table-row;\n}\n.u-dt-row-group {\n display: table-row-group;\n}\n.u-dt-column {\n display: table-column;\n}\n.u-dt-column-group {\n display: table-column-group;\n}\n@media (max-width: 30rem) {\n .u-dn-t {\n display: none;\n }\n .u-di-t {\n display: inline;\n }\n .u-db-t {\n display: block;\n }\n .u-dib-t {\n display: inline-block;\n }\n .u-dit-t {\n display: inline-table;\n }\n .u-dt-t {\n display: table;\n }\n .u-dtc-t {\n display: table-cell;\n }\n .u-dt-row-t {\n display: table-row;\n }\n .u-dt-row-group-t {\n display: table-row-group;\n }\n .u-dt-column-t {\n display: table-column;\n }\n .u-dt-column-group-t {\n display: table-column-group;\n }\n}\n@media (max-width: 48rem) {\n .u-dn-s {\n display: none;\n }\n .u-di-s {\n display: inline;\n }\n .u-db-s {\n display: block;\n }\n .u-dib-s {\n display: inline-block;\n }\n .u-dit-s {\n display: inline-table;\n }\n .u-dt-s {\n display: table;\n }\n .u-dtc-s {\n display: table-cell;\n }\n .u-dt-row-s {\n display: table-row;\n }\n .u-dt-row-group-s {\n display: table-row-group;\n }\n .u-dt-column-s {\n display: table-column;\n }\n .u-dt-column-group-s {\n display: table-column-group;\n }\n}\n@media (max-width: 63.938rem) {\n .u-dn-m {\n display: none;\n }\n .u-di-m {\n display: inline;\n }\n .u-db-m {\n display: block;\n }\n .u-dib-m {\n display: inline-block;\n }\n .u-dit-m {\n display: inline-table;\n }\n .u-dt-m {\n display: table;\n }\n .u-dtc-m {\n display: table-cell;\n }\n .u-dt-row-m {\n display: table-row;\n }\n .u-dt-row-group-m {\n display: table-row-group;\n }\n .u-dt-column-m {\n display: table-column;\n }\n .u-dt-column-group-m {\n display: table-column-group;\n }\n}\n.u-black {\n color: var(--black) !important;\n}\n.u-charcoalGrey {\n color: var(--charcoalGrey) !important;\n}\n.u-coolGrey {\n color: var(--coolGrey) !important;\n}\n.u-silver {\n color: var(--silver) !important;\n}\n.u-slateGrey {\n color: var(--slateGrey) !important;\n}\n.u-lightishPurple {\n color: #b449e7 !important;\n}\n.u-dodgerBlue {\n color: #297ef2 !important;\n}\n.u-overlay {\n color: var(--overlay) !important;\n}\n.u-paleGrey {\n color: var(--paleGrey) !important;\n}\n.u-monza {\n color: #dd0505 !important;\n}\n.u-pomegranate {\n color: #f52d2d !important;\n}\n.u-primaryBackgroundLight {\n color: var(--primaryBackgroundLight) !important;\n}\n.u-primaryColor {\n color: var(--primaryColor) !important;\n}\n.u-primaryColorLight {\n color: var(--primaryColorLight) !important;\n}\n.u-primaryContrastTextColor {\n color: var(--primaryContrastTextColor) !important;\n}\n.u-error {\n color: var(--errorColor) !important;\n}\n.u-errorBackground {\n color: var(--errorBackground) !important;\n}\n.u-success {\n color: var(--successColor) !important;\n}\n.u-warning {\n color: var(--warningColor) !important;\n}\n.u-info {\n color: var(--infoColor) !important;\n}\n.u-weirdGreen {\n color: #40de8e !important;\n}\n.u-white {\n color: var(--white) !important;\n}\n.u-breakword {\n word-break: break-word;\n}\n.u-ellipsis {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.u-spacellipsis {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n}\n@media (max-width: 30rem) {\n .u-spacellipsis-t {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n }\n}\n@media (max-width: 48rem) {\n .u-spacellipsis-s {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n }\n}\n@media (max-width: 63.938rem) {\n .u-spacellipsis-m {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n }\n}\n.u-midellipsis {\n display: flex;\n flex-wrap: nowrap;\n}\n.u-midellipsis > * {\n display: inline-block;\n max-width: 50%;\n overflow: hidden;\n white-space: pre;\n}\n.u-midellipsis > :first-child {\n text-overflow: ellipsis;\n}\n.u-midellipsis > :last-child {\n text-overflow: clip;\n direction: rtl;\n}\n@supports (text-overflow: '[...]') {\n .u-midellipsis > :first-child {\n text-overflow: '[...]';\n }\n}\n.u-link:link {\n color: var(--linkColor) !important;\n text-decoration: var(--linkTextDecoration) !important;\n}\n.u-link:visited,\n.u-link:active,\n.u-link:hover,\n.u-link:focus {\n color: var(--linkColorActive) !important;\n}\n.u-lh-tiny {\n line-height: 1 !important;\n}\n.u-lh-xsmall {\n line-height: 1.1 !important;\n}\n.u-lh-small {\n line-height: 1.2 !important;\n}\n.u-lh-medium {\n line-height: 1.3 !important;\n}\n.u-lh-large {\n line-height: 1.4 !important;\n}\n.u-lh-xlarge {\n line-height: 1.5 !important;\n}\n.u-fz-tiny {\n font-size: 0.75rem !important;\n line-height: 1.3 !important;\n}\n.u-fz-xsmall {\n font-size: 0.813rem !important;\n line-height: 1.4 !important;\n}\n.u-fz-small {\n font-size: 0.875rem !important;\n line-height: 1.4 !important;\n}\n.u-fz-medium {\n font-size: 1rem !important;\n line-height: 1.5 !important;\n}\n.u-fz-large {\n font-size: 1.125rem !important;\n line-height: 1.5 !important;\n}\n@media (max-width: 30rem) {\n .u-fz-tiny-t {\n font-size: 0.75rem !important;\n line-height: 1.3 !important;\n }\n .u-fz-xsmall-t {\n font-size: 0.813rem !important;\n line-height: 1.4 !important;\n }\n .u-fz-small-t {\n font-size: 0.875rem !important;\n line-height: 1.4 !important;\n }\n .u-fz-medium-t {\n font-size: 1rem !important;\n line-height: 1.5 !important;\n }\n .u-fz-large-t {\n font-size: 1.125rem !important;\n line-height: 1.5 !important;\n }\n}\n@media (max-width: 48rem) {\n .u-fz-tiny-s {\n font-size: 0.75rem !important;\n line-height: 1.3 !important;\n }\n .u-fz-xsmall-s {\n font-size: 0.813rem !important;\n line-height: 1.4 !important;\n }\n .u-fz-small-s {\n font-size: 0.875rem !important;\n line-height: 1.4 !important;\n }\n .u-fz-medium-s {\n font-size: 1rem !important;\n line-height: 1.5 !important;\n }\n .u-fz-large-s {\n font-size: 1.125rem !important;\n line-height: 1.5 !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-fz-tiny-m {\n font-size: 0.75rem !important;\n line-height: 1.3 !important;\n }\n .u-fz-xsmall-m {\n font-size: 0.813rem !important;\n line-height: 1.4 !important;\n }\n .u-fz-small-m {\n font-size: 0.875rem !important;\n line-height: 1.4 !important;\n }\n .u-fz-medium-m {\n font-size: 1rem !important;\n line-height: 1.5 !important;\n }\n .u-fz-large-m {\n font-size: 1.125rem !important;\n line-height: 1.5 !important;\n }\n}\n.u-ta-left {\n text-align: left !important;\n}\n.u-ta-right {\n text-align: right !important;\n}\n.u-ta-center {\n text-align: center !important;\n}\n.u-ta-justify {\n text-align: justify !important;\n}\n@media (max-width: 30rem) {\n .u-ta-left-t {\n text-align: left !important;\n }\n .u-ta-right-t {\n text-align: right !important;\n }\n .u-ta-center-t {\n text-align: center !important;\n }\n .u-ta-justify-t {\n text-align: justify !important;\n }\n}\n@media (max-width: 48rem) {\n .u-ta-left-s {\n text-align: left !important;\n }\n .u-ta-right-s {\n text-align: right !important;\n }\n .u-ta-center-s {\n text-align: center !important;\n }\n .u-ta-justify-s {\n text-align: justify !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-ta-left-m {\n text-align: left !important;\n }\n .u-ta-right-m {\n text-align: right !important;\n }\n .u-ta-center-m {\n text-align: center !important;\n }\n .u-ta-justify-m {\n text-align: justify !important;\n }\n}\n.u-fs-normal {\n font-style: normal !important;\n}\n.u-fs-italic {\n font-style: italic !important;\n}\n@media (max-width: 30rem) {\n .u-fs-normal-t {\n font-style: normal !important;\n }\n .u-fs-italic-t {\n font-style: italic !important;\n }\n}\n@media (max-width: 48rem) {\n .u-fs-normal-s {\n font-style: normal !important;\n }\n .u-fs-italic-s {\n font-style: italic !important;\n }\n}\n@media (max-width: 63.938rem) {\n .u-fs-normal-m {\n font-style: normal !important;\n }\n .u-fs-italic-m {\n font-style: italic !important;\n }\n}\n.u-fw-normal {\n font-weight: normal;\n}\n.u-fw-bold {\n font-weight: bold;\n}\n@media (max-width: 30rem) {\n .u-fw-normal-t {\n font-weight: normal;\n }\n .u-fw-bold-t {\n font-weight: bold;\n }\n}\n@media (max-width: 48rem) {\n .u-fw-normal-s {\n font-weight: normal;\n }\n .u-fw-bold-s {\n font-weight: bold;\n }\n}\n@media (max-width: 63.938rem) {\n .u-fw-normal-m {\n font-weight: normal;\n }\n .u-fw-bold-m {\n font-weight: bold;\n }\n}\n@media (pointer: coarse) {\n}\n:root {\n --z-index-bar: 21;\n --z-index-selection: 30;\n --z-index-over-selection: 31;\n}\n", ""]); + + + /***/ }), /***/ "6l46": @@ -50369,6 +51204,46 @@ var green = { /***/ }), +/***/ "7/ZK": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.FileDoctype = exports.AppDoctype = void 0; + +var _propTypes = _interopRequireDefault(__webpack_require__("17x9")); + +var AppDoctype = _propTypes.default.shape({ + name: _propTypes.default.string, + slug: _propTypes.default.string, + developer: _propTypes.default.object, + links: _propTypes.default.shape({ + icon: _propTypes.default.string + }), + latest_version: _propTypes.default.shape({ + version: _propTypes.default.string + }) +}); + +exports.AppDoctype = AppDoctype; + +var FileDoctype = _propTypes.default.shape({ + _id: _propTypes.default.string, + class: _propTypes.default.string, + mime: _propTypes.default.string, + name: _propTypes.default.string +}); + +exports.FileDoctype = FileDoctype; + +/***/ }), + /***/ "7/eH": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -50783,6 +51658,24 @@ var Snackbar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](fun /***/ }), +/***/ "79cY": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _createWebStorage = __webpack_require__("w03P"); + +var _createWebStorage2 = _interopRequireDefault(_createWebStorage); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = (0, _createWebStorage2.default)('local'); + +/***/ }), + /***/ "79jq": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -52992,6 +53885,73 @@ module.exports = _inherits, module.exports.__esModule = true, module.exports["de /***/ }), +/***/ "7aHD": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return createStore; }); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("MVZn"); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("fd+0"); +/* harmony import */ var _middlewares_appsI18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("wJKc"); +/* harmony import */ var redux_thunk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("s7lR"); +/* harmony import */ var redux_persist__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ahA9"); +/* harmony import */ var _reducers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("h8u/"); +/* harmony import */ var redux_logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("1mXj"); +/* harmony import */ var redux_logger__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(redux_logger__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var redux_persist_lib_storage__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("79cY"); +/* harmony import */ var redux_persist_lib_storage__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(redux_persist_lib_storage__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _config_persistWhitelist_json__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("rXrk"); +var _config_persistWhitelist_json__WEBPACK_IMPORTED_MODULE_8___namespace = /*#__PURE__*/__webpack_require__.t("rXrk", 1); +/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("c5px"); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("mgfL"); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(cozy_flags__WEBPACK_IMPORTED_MODULE_10__); + + + + + + + + + + + +var config = { + storage: redux_persist_lib_storage__WEBPACK_IMPORTED_MODULE_7___default.a, + key: 'cozy-bar', + whitelist: _config_persistWhitelist_json__WEBPACK_IMPORTED_MODULE_8__ +}; +var loggerMiddleware = Object(redux_logger__WEBPACK_IMPORTED_MODULE_6__["createLogger"])({ + logger: _logger__WEBPACK_IMPORTED_MODULE_9__["default"] +}); +var reducer = Object(redux_persist__WEBPACK_IMPORTED_MODULE_4__["persistCombineReducers"])(config, _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _reducers__WEBPACK_IMPORTED_MODULE_5__["reducers"])); +var middlewares = [_middlewares_appsI18n__WEBPACK_IMPORTED_MODULE_2__["default"], redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"]]; + +if (cozy_flags__WEBPACK_IMPORTED_MODULE_10___default()('bar.debug')) { + middlewares.push(loggerMiddleware); +} + +var createStore = function createStore() { + store = Object(redux__WEBPACK_IMPORTED_MODULE_1__["createStore"])(reducer, redux__WEBPACK_IMPORTED_MODULE_1__["applyMiddleware"].apply(null, middlewares)); + Object(redux_persist__WEBPACK_IMPORTED_MODULE_4__["persistStore"])(store); + return store; +}; +var store; + +var getOrCreateStore = function getOrCreateStore() { + if (!store) { + store = createStore(); + } + + return store; +}; + +/* harmony default export */ __webpack_exports__["default"] = (getOrCreateStore); + +/***/ }), + /***/ "7dVa": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -53209,6 +54169,64 @@ var useDispatch = /*#__PURE__*/createDispatchHook(); /***/ }), +/***/ "7jrE": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// GENERATED AUTOMATICALLY FROM stylus/settings/palette.json +module.exports = { + black: 'var(--black)', + white: 'var(--white)', + paleGrey: 'var(--paleGrey)', + silver: 'var(--silver)', + coolGrey: 'var(--coolGrey)', + slateGrey: 'var(--slateGrey)', + charcoalGrey: 'var(--charcoalGrey)', + overlay: 'var(--overlay)', + primaryColor: 'var(--primaryColor)', + primaryColorLight: 'var(--primaryColorLight)', + primaryContrastTextColor: 'var(--primaryContrastTextColor)', + success: 'var(--successColor)', + warning: 'var(--warningColor)', + error: 'var(--errorColor)', + info: 'var(--infoColor)', + errorBackground: 'var(--errorBackground)', + primaryBackgroundLight: 'var(--primaryBackgroundLight)', + neutralBackground: 'var(--neutralBackground)', + zircon: '#F5FAFF', + frenchPass: '#C2DCFF', + dodgerBlue: '#297EF2', + scienceBlue: '#0B61D6', + puertoRico: '#0DCBCF', + grannyApple: '#DEF7E7', + emerald: '#35CE68', + malachite: '#08b442', + seafoamGreen: '#3DA67E', + brightSun: '#FFC644', + texasRose: '#FFAE5F', + chablis: '#FFF2F2', + yourPink: '#FDCBCB', + fuchsia: '#FC4C83', + pomegranate: '#F52D2D', + monza: '#DD0505', + portage: '#9169F2', + azure: '#1FA8F1', + melon: '#FD7461', + blazeOrange: '#FC6D00', + mango: '#FF962F', + pumpkinOrange: '#FF7F1B', + lavender: '#C2ADF4', + darkPeriwinkle: '#6984CE', + purpley: '#7F6BEE', + lightishPurple: '#B449E7', + barney: '#922BC2', + weirdGreen: '#40DE8E' +}; + +/***/ }), + /***/ "7l4b": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -59341,6 +60359,187 @@ function set(values) { } +/***/ }), + +/***/ "8Zd4": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ForbiddenException", function() { return ForbiddenException; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ServerErrorException", function() { return ServerErrorException; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotFoundException", function() { return NotFoundException; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MethodNotAllowedException", function() { return MethodNotAllowedException; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnavailableStackException", function() { return UnavailableStackException; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnavailableSettingsException", function() { return UnavailableSettingsException; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnauthorizedStackException", function() { return UnauthorizedStackException; }); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("lwsE"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("7W2i"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("a1gu"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Nsbk"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("oShl"); +/* harmony import */ var _babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4__); + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +var ForbiddenException = /*#__PURE__*/function (_Error) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(ForbiddenException, _Error); + + var _super = _createSuper(ForbiddenException); + + function ForbiddenException(message) { + var _this; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, ForbiddenException); + + _this = _super.call(this); + _this.name = 'Forbidden'; + _this.status = 403; + _this.message = message || 'The application does not have permission to access this resource.'; + _this.stack = new Error().stack; + return _this; + } + + return ForbiddenException; +}( /*#__PURE__*/_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default()(Error)); + +var ServerErrorException = /*#__PURE__*/function (_Error2) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(ServerErrorException, _Error2); + + var _super2 = _createSuper(ServerErrorException); + + function ServerErrorException(message) { + var _this2; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, ServerErrorException); + + _this2 = _super2.call(this); + _this2.name = 'ServerError'; + _this2.status = 500; + _this2.message = message || 'A server error occurred'; + _this2.stack = new Error().stack; + return _this2; + } + + return ServerErrorException; +}( /*#__PURE__*/_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default()(Error)); + +var NotFoundException = /*#__PURE__*/function (_Error3) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(NotFoundException, _Error3); + + var _super3 = _createSuper(NotFoundException); + + function NotFoundException(message) { + var _this3; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, NotFoundException); + + _this3 = _super3.call(this); + _this3.name = 'NotFound'; + _this3.status = 404; + _this3.message = message || 'The ressource was not found'; + _this3.stack = new Error().stack; + return _this3; + } + + return NotFoundException; +}( /*#__PURE__*/_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default()(Error)); + +var MethodNotAllowedException = /*#__PURE__*/function (_Error4) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(MethodNotAllowedException, _Error4); + + var _super4 = _createSuper(MethodNotAllowedException); + + function MethodNotAllowedException(message) { + var _this4; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, MethodNotAllowedException); + + _this4 = _super4.call(this); + _this4.name = 'MethodNotAllowed'; + _this4.status = 405; + _this4.message = message || 'Method not allowed'; + _this4.stack = new Error().stack; + return _this4; + } + + return MethodNotAllowedException; +}( /*#__PURE__*/_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default()(Error)); + +var UnavailableStackException = /*#__PURE__*/function (_Error5) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(UnavailableStackException, _Error5); + + var _super5 = _createSuper(UnavailableStackException); + + function UnavailableStackException(message) { + var _this5; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, UnavailableStackException); + + _this5 = _super5.call(this); + _this5.name = 'UnavailableStack'; + _this5.message = message || 'The stack is temporarily unavailable'; + _this5.stack = new Error().stack; + return _this5; + } + + return UnavailableStackException; +}( /*#__PURE__*/_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default()(Error)); + +var UnauthorizedStackException = /*#__PURE__*/function (_Error6) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(UnauthorizedStackException, _Error6); + + var _super6 = _createSuper(UnauthorizedStackException); + + function UnauthorizedStackException(message) { + var _this6; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, UnauthorizedStackException); + + _this6 = _super6.call(this); + _this6.name = 'UnauthorizedStack'; + _this6.status = 401; + _this6.message = message || 'The app is not allowed to access to the requested resource'; + _this6.stack = new Error().stack; + return _this6; + } + + return UnauthorizedStackException; +}( /*#__PURE__*/_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default()(Error)); + +var UnavailableSettingsException = /*#__PURE__*/function (_Error7) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_1___default()(UnavailableSettingsException, _Error7); + + var _super7 = _createSuper(UnavailableSettingsException); + + function UnavailableSettingsException(message) { + var _this7; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, UnavailableSettingsException); + + _this7 = _super7.call(this); + _this7.name = 'UnavailableSettings'; + _this7.message = message || "The 'Settings' application isn't available or installed in the stack"; + _this7.stack = new Error().stack; + return _this7; + } + + return UnavailableSettingsException; +}( /*#__PURE__*/_babel_runtime_helpers_wrapNativeSuper__WEBPACK_IMPORTED_MODULE_4___default()(Error)); + + + /***/ }), /***/ "8a7r": @@ -60259,6 +61458,42 @@ module.exports = Object.freeze({ /***/ }), +/***/ "8lBA": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createTransform; }); + + +function createTransform( +// @NOTE inbound: transform state coming from redux on its way to being serialized and stored +inbound, +// @NOTE outbound: transform state coming from storage, on its way to be rehydrated into redux +outbound) { + var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + var whitelist = config.whitelist || null; + var blacklist = config.blacklist || null; + + function whitelistBlacklistCheck(key) { + if (whitelist && whitelist.indexOf(key) === -1) return true; + if (blacklist && blacklist.indexOf(key) !== -1) return true; + return false; + } + + return { + in: function _in(state, key, fullState) { + return !whitelistBlacklistCheck(key) && inbound ? inbound(state, key, fullState) : state; + }, + out: function out(state, key, fullState) { + return !whitelistBlacklistCheck(key) && outbound ? outbound(state, key, fullState) : state; + } + }; +} + +/***/ }), + /***/ "8moF": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -60769,6 +62004,160 @@ __webpack_require__.r(__webpack_exports__); +/***/ }), + +/***/ "9+rA": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("lwsE"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("W8MJ"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("PJYZ"); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("7W2i"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("a1gu"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("Nsbk"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("lSNA"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _lib_stack__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("g4K+"); +/* harmony import */ var _ClaudyIcon__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("4JP3"); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("y6ex"); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_10__); + + + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + + +var Claudy = /*#__PURE__*/function (_Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default()(Claudy, _Component); + + var _super = _createSuper(Claudy); + + function Claudy(props, context) { + var _this; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Claudy); + + _this = _super.call(this, props); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "toggle", function () { + if (!_this.props.opened && !_this.intentWrapperRef.childNodes.length) { + _this.setState({ + isLoading: true + }); // init Claudy intent + + + _this.intents.create('CLAUDY', 'io.cozy.settings', { + exposeIntentFrameRemoval: true + }).start(_this.intentWrapperRef, function () { + _this.setState({ + isLoading: false, + isActive: true + }); + + _this.props.onToggle(); // toggle claudy when the intent is loaded + + }).then(function (_ref) { + var removeIntentIframe = _ref.removeIntentIframe; + + // exposeFrameRemoval intent event + // remove the intent frame at the end of the menu closing transition + var closedListener = function closedListener(e) { + if (e.propertyName === 'transform') { + removeIntentIframe(); + + _this.setState({ + isActive: false + }); + + e.target.removeEventListener('transitionend', closedListener); + } + }; + + _this.intentWrapperRef.addEventListener('transitionend', closedListener, false); + + _this.props.onToggle(); + }); + } else { + _this.setState({ + isActive: !_this.state.isActive + }); + + _this.props.onToggle(); + } + }); + + _this.store = context.barStore; + _this.state = { + isLoading: false, + isActive: false + }; + _this.intents = Object(_lib_stack__WEBPACK_IMPORTED_MODULE_8__["getIntents"])(); + return _this; + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Claudy, [{ + key: "UNSAFE_componentWillReceiveProps", + value: function UNSAFE_componentWillReceiveProps(nextProps) { + if (nextProps.claudyFired) this.toggle(); + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + var opened = this.props.opened; + var _this$state = this.state, + isLoading = _this$state.isLoading, + isActive = _this$state.isActive; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", { + className: "coz-claudy ".concat(opened ? 'coz-claudy--opened' : '') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("button", { + type: "button", + className: "coz-claudy-icon coz-bar-hide-sm", + "data-claudy-opened": isActive, + "data-claudy-loading": isLoading, + onClick: this.toggle, + "aria-haspopup": "true", + "aria-expanded": isActive + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_10___default.a, { + icon: _ClaudyIcon__WEBPACK_IMPORTED_MODULE_9__["default"], + height: "32", + width: "32" + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", { + className: "coz-claudy-intent-wrapper", + ref: function ref(wrapper) { + _this2.intentWrapperRef = wrapper; + } + })); + } + }]); + + return Claudy; +}(react__WEBPACK_IMPORTED_MODULE_7__["Component"]); + +/* harmony default export */ __webpack_exports__["default"] = (Claudy); + /***/ }), /***/ "9/De": @@ -60887,6 +62276,38 @@ exports.decrypt = function(alg, key, cdata, props) { }; +/***/ }), + +/***/ "9/ZD": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__("pVnL")); + +var _react = _interopRequireDefault(__webpack_require__("q1tI")); + +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/top.svg` to regenerate; +function SvgTop(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 24 24" + }, props), /*#__PURE__*/_react.default.createElement("path", { + d: "M20.603 17.825a1.571 1.571 0 002.222-2.222l-9.428-9.428a1.571 1.571 0 00-2.222 0l-9.429 9.428a1.571 1.571 0 002.222 2.222l8.318-8.317 8.317 8.317z", + fillRule: "evenodd" + })); +} + +var _default = SvgTop; +exports.default = _default; + /***/ }), /***/ "9/Zf": @@ -62154,451 +63575,1449 @@ var TextField = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](fu /***/ }), -/***/ "9MzS": +/***/ "9MQZ": /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* WEBPACK VAR INJECTION */(function(Buffer) {/*! - * deps/ciphermodes/pack.js - Pack/Unpack Functions - * - * Copyright (c) 2015 Cisco Systems, Inc. See LICENSE file. +/* WEBPACK VAR INJECTION */(function(global) {/** + * lodash (Custom Build) <https://lodash.com/> + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors <https://jquery.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; -var Long = __webpack_require__("2lpH"); - -var pack = module.exports = { - intToBigEndian: function(n, bs, off) { - if (typeof n === "number") { - switch (arguments.length) { - case 1: - bs = Buffer.alloc(4); - pack.intToBigEndian(n, bs, 0); - break; - case 3: - bs[off] = 0xff & (n >>> 24); - bs[++off] = 0xff & (n >>> 16); - bs[++off] = 0xff & (n >>> 8); - bs[++off] = 0xff & (n); - break; - default: - throw new TypeError("Expected 1 or 3 arguments."); - } - } else { - switch (arguments.length) { - case 1: - bs = Buffer.alloc(4 * n.length); - pack.intToBigEndian(n, bs, 0); - break; - case 3: - for (var i = 0; i < n.length; ++i) { - pack.intToBigEndian(n[i], bs, off); - off += 4; - } - break; - default: - throw new TypeError("Expected 1 or 3 arguments."); - } - } - - return bs; - }, - longToBigEndian: function(n, bs, off) { - if (!Array.isArray(n)) { - // Single - switch (arguments.length) { - case 1: - bs = Buffer.alloc(8); - pack.longToBigEndian(n, bs, 0); - break; - case 3: - var lo = n.low, - hi = n.high; - pack.intToBigEndian(hi, bs, off); - pack.intToBigEndian(lo, bs, off + 4); - break; - default: - throw new TypeError("Expected 1 or 3 arguments."); - } - } else { - // Array - switch (arguments.length) { - case 1: - bs = Buffer.alloc(8 * n.length); - pack.longToBigEndian(n, bs, 0); - break; - case 3: - for (var i = 0; i < n.length; ++i) { - pack.longToBigEndian(n[i], bs, off); - off += 8; - } - break; - default: - throw new TypeError("Expected 1 or 3 arguments."); - } - } +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; - return bs; - }, +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; - bigEndianToInt: function(bs, off, ns) { - switch (arguments.length) { - case 2: - var n = bs[off] << 24; - n |= (bs[++off] & 0xff) << 16; - n |= (bs[++off] & 0xff) << 8; - n |= (bs[++off] & 0xff); - return n; - case 3: - for (var i = 0; i < ns.length; ++i) { - ns[i] = pack.bigEndianToInt(bs, off); - off += 4; - } - break; - default: - throw new TypeError("Expected 2 or 3 arguments."); - } - }, - bigEndianToLong: function(bs, off, ns) { - switch (arguments.length) { - case 2: - var hi = pack.bigEndianToInt(bs, off); - var lo = pack.bigEndianToInt(bs, off + 4); - var num = new Long(lo, hi); - return num; - case 3: - for (var i = 0; i < ns.length; ++i) { - ns[i] = pack.bigEndianToLong(bs, off); - off += 8; - } - break; - default: - throw new TypeError("Expected 2 or 3 arguments."); - } - } -}; +/** `Object#toString` result references. */ +var funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + symbolTag = '[object Symbol]'; -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("tjlA").Buffer)) +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + reLeadingDot = /^\./, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; -/***/ }), +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; -/***/ "9NZZ": -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return useScrollTrigger; }); -/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("wx14"); -/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Ff2n"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("q1tI"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; -function defaultTrigger(store, options) { - var _options$disableHyste = options.disableHysteresis, - disableHysteresis = _options$disableHyste === void 0 ? false : _options$disableHyste, - _options$threshold = options.threshold, - threshold = _options$threshold === void 0 ? 100 : _options$threshold, - target = options.target; - var previous = store.current; +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); - if (target) { - // Get vertical scroll - store.current = target.pageYOffset !== undefined ? target.pageYOffset : target.scrollTop; - } +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} - if (!disableHysteresis && previous !== undefined) { - if (store.current < previous) { - return false; - } +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} } - - return store.current > threshold; + return result; } -var defaultTarget = typeof window !== 'undefined' ? window : null; -function useScrollTrigger() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - var _options$getTrigger = options.getTrigger, - getTrigger = _options$getTrigger === void 0 ? defaultTrigger : _options$getTrigger, - _options$target = options.target, - target = _options$target === void 0 ? defaultTarget : _options$target, - other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(options, ["getTrigger", "target"]); +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; - var store = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](); +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; - var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](function () { - return getTrigger(store, other); - }), - trigger = _React$useState[0], - setTrigger = _React$useState[1]; +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); - react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { - var handleScroll = function handleScroll() { - setTrigger(getTrigger(store, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ - target: target - }, other))); - }; +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; - handleScroll(); // Re-evaluate trigger when dependencies change +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; - target.addEventListener('scroll', handleScroll); - return function () { - target.removeEventListener('scroll', handleScroll); - }; // See Option 3. https://github.com/facebook/react/issues/14476#issuecomment-471199055 - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [target, getTrigger, JSON.stringify(other)]); - return trigger; -} +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; -/***/ }), +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); -/***/ "9Nap": -/***/ (function(module, exports, __webpack_require__) { +/** Built-in value references. */ +var Symbol = root.Symbol, + splice = arrayProto.splice; -var isSymbol = __webpack_require__("/9aa"); +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + nativeCreate = getNative(Object, 'create'); -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; /** - * Converts `value` to a string key if it's not a string or symbol. + * Creates a hash object. * * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. + * @constructor + * @param {Array} [entries] The key-value pairs to cache. */ -function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } -module.exports = toKey; - - -/***/ }), - -/***/ "9P93": -/***/ (function(module, exports, __webpack_require__) { +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} -// 20.2.2.18 Math.imul(x, y) -var $export = __webpack_require__("XKFU"); -var $imul = Math.imul; +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} -// some WebKit versions fails with big numbers, some has wrong arity -$export($export.S + $export.F * __webpack_require__("eeVq")(function () { - return $imul(0xffffffff, 5) != -5 || $imul.length != 2; -}), 'Math', { - imul: function imul(x, y) { - var UINT16 = 0xffff; - var xn = +x; - var yn = +y; - var xl = UINT16 & xn; - var yl = UINT16 & yn; - return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; } -}); - - -/***/ }), - -/***/ "9PYc": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__("TqRt"); - -var _slicedToArray2 = _interopRequireDefault(__webpack_require__("J4zp")); + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} -var _defineProperty2 = _interopRequireDefault(__webpack_require__("lSNA")); +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} -var _classCallCheck2 = _interopRequireDefault(__webpack_require__("lwsE")); +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} -var _createClass2 = _interopRequireDefault(__webpack_require__("W8MJ")); +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; -var _inherits2 = _interopRequireDefault(__webpack_require__("7W2i")); +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("a1gu")); + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("Nsbk")); +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} -function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } + return index < 0 ? undefined : data[index][1]; +} -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} -function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); -function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} -var groupBy = __webpack_require__("bt/X"); +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; -var get = __webpack_require__("mwIZ"); +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; -var merge = __webpack_require__("QkVN"); + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} -var Document = __webpack_require__("4YOj"); +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} -var matching = __webpack_require__("Z8kY"); +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} -var _require = __webpack_require__("5+xK"), - getSlugFromInstitutionLabel = _require.getSlugFromInstitutionLabel; +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} -var log = __webpack_require__("mZ56").namespace('BankAccount'); +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} -var BankAccount = /*#__PURE__*/function (_Document) { - (0, _inherits2.default)(BankAccount, _Document); +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} - var _super = _createSuper(BankAccount); +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; - function BankAccount() { - (0, _classCallCheck2.default)(this, BankAccount); - return _super.apply(this, arguments); +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; } +} - (0, _createClass2.default)(BankAccount, null, [{ - key: "reconciliate", - value: - /** - * Adds _id of existing accounts to fetched accounts - */ - function reconciliate(fetchedAccounts, localAccounts) { - var matchings = matching.matchAccounts(fetchedAccounts, localAccounts); - return matchings.map(function (matching) { - log('info', matching.match ? "".concat(matching.account.label, " matched with ").concat(matching.match.label, " via ").concat(matching.method) : "".concat(matching.account.label, " did not match with an existing account")); - return _objectSpread(_objectSpread({}, matching.account), {}, { - relationships: merge({}, matching.match ? matching.match.relationships : null, matching.account.relationships), - _id: matching.match ? matching.match._id : undefined - }); - }); +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; } - }, { - key: "findDuplicateAccountsWithNoOperations", - value: function findDuplicateAccountsWithNoOperations(accounts, operations) { - var opsByAccountId = groupBy(operations, function (op) { - return op.account; - }); - var duplicateAccountGroups = Object.entries(groupBy(accounts, function (x) { - return x.institutionLabel + ' > ' + x.label; - })).map(function (_ref) { - var _ref2 = (0, _slicedToArray2.default)(_ref, 2), - duplicateGroup = _ref2[1]; - - return duplicateGroup; - }).filter(function (duplicateGroup) { - return duplicateGroup.length > 1; - }); - var res = []; - - var _iterator = _createForOfIteratorHelper(duplicateAccountGroups), - _step; - - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var duplicateAccounts = _step.value; - - var _iterator2 = _createForOfIteratorHelper(duplicateAccounts), - _step2; - - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { - var account = _step2.value; - var accountOperations = opsByAccountId[account._id] || []; + } + return -1; +} - if (accountOperations.length === 0) { - res.push(account); - } - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} - return res; - } - }, { - key: "hasIncoherentCreatedByApp", - value: function hasIncoherentCreatedByApp(account) { - var predictedSlug = getSlugFromInstitutionLabel(account.institutionLabel); - var createdByApp = account.cozyMetadata && account.cozyMetadata.createdByApp; - return Boolean(predictedSlug && createdByApp && predictedSlug !== createdByApp); - } - }, { - key: "getUpdatedAt", - value: function getUpdatedAt(account) { - var vendorUpdatedAt = get(account, 'metadata.updatedAt'); +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = isKey(path, object) ? [path] : castPath(path); - if (vendorUpdatedAt) { - return vendorUpdatedAt; - } + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; - var cozyUpdatedAt = get(account, 'cozyMetadata.updatedAt'); + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; - if (cozyUpdatedAt) { - return cozyUpdatedAt; + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); } - - return null; } - }]); - return BankAccount; -}(Document); + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; +} -BankAccount.normalizeAccountNumber = matching.normalizeAccountNumber; -BankAccount.doctype = 'io.cozy.bank.accounts'; -BankAccount.idAttributes = ['_id']; -BankAccount.version = 1; -BankAccount.checkedAttributes = null; -BankAccount.vendorIdAttr = 'vendorId'; -module.exports = BankAccount; +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} -/***/ }), +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value) { + return isArray(value) ? value : stringToPath(value); +} -/***/ "9Pyj": -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SentryError", function() { return SentryError; }); -/** An error emitted by Sentry SDKs and related utilities. */ -class SentryError extends Error { - /** Display name of this error instance. */ +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} - constructor( message, logLevel = 'warn') { - super(message);this.message = message;; +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); +} - this.name = new.target.prototype.constructor.name; - // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line - // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes - // instances of `SentryError` fail `obj instanceof SentryError` checks. - Object.setPrototypeOf(this, new.target.prototype); - this.logLevel = logLevel; +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); } +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ +var stringToPath = memoize(function(string) { + string = toString(string); + + var result = []; + if (reLeadingDot.test(string)) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; +} + +// Assign cache to `_.memoize`. +memoize.Cache = MapCache; + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && objectToString.call(value) == symbolTag); +} + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {string} Returns the string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : baseToString(value); +} + +/** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ +function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); +} + +module.exports = set; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("yLpj"))) + +/***/ }), + +/***/ "9MzS": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(Buffer) {/*! + * deps/ciphermodes/pack.js - Pack/Unpack Functions + * + * Copyright (c) 2015 Cisco Systems, Inc. See LICENSE file. + */ + + +var Long = __webpack_require__("2lpH"); + +var pack = module.exports = { + intToBigEndian: function(n, bs, off) { + if (typeof n === "number") { + switch (arguments.length) { + case 1: + bs = Buffer.alloc(4); + pack.intToBigEndian(n, bs, 0); + break; + case 3: + bs[off] = 0xff & (n >>> 24); + bs[++off] = 0xff & (n >>> 16); + bs[++off] = 0xff & (n >>> 8); + bs[++off] = 0xff & (n); + break; + default: + throw new TypeError("Expected 1 or 3 arguments."); + } + } else { + switch (arguments.length) { + case 1: + bs = Buffer.alloc(4 * n.length); + pack.intToBigEndian(n, bs, 0); + break; + case 3: + for (var i = 0; i < n.length; ++i) { + pack.intToBigEndian(n[i], bs, off); + off += 4; + } + break; + default: + throw new TypeError("Expected 1 or 3 arguments."); + } + } + + return bs; + }, + longToBigEndian: function(n, bs, off) { + if (!Array.isArray(n)) { + // Single + switch (arguments.length) { + case 1: + bs = Buffer.alloc(8); + pack.longToBigEndian(n, bs, 0); + break; + case 3: + var lo = n.low, + hi = n.high; + pack.intToBigEndian(hi, bs, off); + pack.intToBigEndian(lo, bs, off + 4); + break; + default: + throw new TypeError("Expected 1 or 3 arguments."); + } + } else { + // Array + switch (arguments.length) { + case 1: + bs = Buffer.alloc(8 * n.length); + pack.longToBigEndian(n, bs, 0); + break; + case 3: + for (var i = 0; i < n.length; ++i) { + pack.longToBigEndian(n[i], bs, off); + off += 8; + } + break; + default: + throw new TypeError("Expected 1 or 3 arguments."); + } + } + + return bs; + }, + + bigEndianToInt: function(bs, off, ns) { + switch (arguments.length) { + case 2: + var n = bs[off] << 24; + n |= (bs[++off] & 0xff) << 16; + n |= (bs[++off] & 0xff) << 8; + n |= (bs[++off] & 0xff); + return n; + case 3: + for (var i = 0; i < ns.length; ++i) { + ns[i] = pack.bigEndianToInt(bs, off); + off += 4; + } + break; + default: + throw new TypeError("Expected 2 or 3 arguments."); + } + }, + bigEndianToLong: function(bs, off, ns) { + switch (arguments.length) { + case 2: + var hi = pack.bigEndianToInt(bs, off); + var lo = pack.bigEndianToInt(bs, off + 4); + var num = new Long(lo, hi); + return num; + case 3: + for (var i = 0; i < ns.length; ++i) { + ns[i] = pack.bigEndianToLong(bs, off); + off += 8; + } + break; + default: + throw new TypeError("Expected 2 or 3 arguments."); + } + } +}; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("tjlA").Buffer)) + +/***/ }), + +/***/ "9NZZ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return useScrollTrigger; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("wx14"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Ff2n"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); + + + + +function defaultTrigger(store, options) { + var _options$disableHyste = options.disableHysteresis, + disableHysteresis = _options$disableHyste === void 0 ? false : _options$disableHyste, + _options$threshold = options.threshold, + threshold = _options$threshold === void 0 ? 100 : _options$threshold, + target = options.target; + var previous = store.current; + + if (target) { + // Get vertical scroll + store.current = target.pageYOffset !== undefined ? target.pageYOffset : target.scrollTop; + } + + if (!disableHysteresis && previous !== undefined) { + if (store.current < previous) { + return false; + } + } + + return store.current > threshold; +} + +var defaultTarget = typeof window !== 'undefined' ? window : null; +function useScrollTrigger() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var _options$getTrigger = options.getTrigger, + getTrigger = _options$getTrigger === void 0 ? defaultTrigger : _options$getTrigger, + _options$target = options.target, + target = _options$target === void 0 ? defaultTarget : _options$target, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(options, ["getTrigger", "target"]); + + var store = react__WEBPACK_IMPORTED_MODULE_2__["useRef"](); + + var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"](function () { + return getTrigger(store, other); + }), + trigger = _React$useState[0], + setTrigger = _React$useState[1]; + + react__WEBPACK_IMPORTED_MODULE_2__["useEffect"](function () { + var handleScroll = function handleScroll() { + setTrigger(getTrigger(store, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + target: target + }, other))); + }; + + handleScroll(); // Re-evaluate trigger when dependencies change + + target.addEventListener('scroll', handleScroll); + return function () { + target.removeEventListener('scroll', handleScroll); + }; // See Option 3. https://github.com/facebook/react/issues/14476#issuecomment-471199055 + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [target, getTrigger, JSON.stringify(other)]); + return trigger; +} + +/***/ }), + +/***/ "9Nap": +/***/ (function(module, exports, __webpack_require__) { + +var isSymbol = __webpack_require__("/9aa"); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = toKey; + + +/***/ }), + +/***/ "9P93": +/***/ (function(module, exports, __webpack_require__) { + +// 20.2.2.18 Math.imul(x, y) +var $export = __webpack_require__("XKFU"); +var $imul = Math.imul; + +// some WebKit versions fails with big numbers, some has wrong arity +$export($export.S + $export.F * __webpack_require__("eeVq")(function () { + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; +}), 'Math', { + imul: function imul(x, y) { + var UINT16 = 0xffff; + var xn = +x; + var yn = +y; + var xl = UINT16 & xn; + var yl = UINT16 & yn; + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); + } +}); + + +/***/ }), + +/***/ "9PYc": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__("J4zp")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("lSNA")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("lwsE")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("W8MJ")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("7W2i")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("a1gu")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("Nsbk")); + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +var groupBy = __webpack_require__("bt/X"); + +var get = __webpack_require__("mwIZ"); + +var merge = __webpack_require__("QkVN"); + +var Document = __webpack_require__("4YOj"); + +var matching = __webpack_require__("Z8kY"); + +var _require = __webpack_require__("5+xK"), + getSlugFromInstitutionLabel = _require.getSlugFromInstitutionLabel; + +var log = __webpack_require__("mZ56").namespace('BankAccount'); + +var BankAccount = /*#__PURE__*/function (_Document) { + (0, _inherits2.default)(BankAccount, _Document); + + var _super = _createSuper(BankAccount); + + function BankAccount() { + (0, _classCallCheck2.default)(this, BankAccount); + return _super.apply(this, arguments); + } + + (0, _createClass2.default)(BankAccount, null, [{ + key: "reconciliate", + value: + /** + * Adds _id of existing accounts to fetched accounts + */ + function reconciliate(fetchedAccounts, localAccounts) { + var matchings = matching.matchAccounts(fetchedAccounts, localAccounts); + return matchings.map(function (matching) { + log('info', matching.match ? "".concat(matching.account.label, " matched with ").concat(matching.match.label, " via ").concat(matching.method) : "".concat(matching.account.label, " did not match with an existing account")); + return _objectSpread(_objectSpread({}, matching.account), {}, { + relationships: merge({}, matching.match ? matching.match.relationships : null, matching.account.relationships), + _id: matching.match ? matching.match._id : undefined + }); + }); + } + }, { + key: "findDuplicateAccountsWithNoOperations", + value: function findDuplicateAccountsWithNoOperations(accounts, operations) { + var opsByAccountId = groupBy(operations, function (op) { + return op.account; + }); + var duplicateAccountGroups = Object.entries(groupBy(accounts, function (x) { + return x.institutionLabel + ' > ' + x.label; + })).map(function (_ref) { + var _ref2 = (0, _slicedToArray2.default)(_ref, 2), + duplicateGroup = _ref2[1]; + + return duplicateGroup; + }).filter(function (duplicateGroup) { + return duplicateGroup.length > 1; + }); + var res = []; + + var _iterator = _createForOfIteratorHelper(duplicateAccountGroups), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var duplicateAccounts = _step.value; + + var _iterator2 = _createForOfIteratorHelper(duplicateAccounts), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var account = _step2.value; + var accountOperations = opsByAccountId[account._id] || []; + + if (accountOperations.length === 0) { + res.push(account); + } + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + return res; + } + }, { + key: "hasIncoherentCreatedByApp", + value: function hasIncoherentCreatedByApp(account) { + var predictedSlug = getSlugFromInstitutionLabel(account.institutionLabel); + var createdByApp = account.cozyMetadata && account.cozyMetadata.createdByApp; + return Boolean(predictedSlug && createdByApp && predictedSlug !== createdByApp); + } + }, { + key: "getUpdatedAt", + value: function getUpdatedAt(account) { + var vendorUpdatedAt = get(account, 'metadata.updatedAt'); + + if (vendorUpdatedAt) { + return vendorUpdatedAt; + } + + var cozyUpdatedAt = get(account, 'cozyMetadata.updatedAt'); + + if (cozyUpdatedAt) { + return cozyUpdatedAt; + } + + return null; + } + }]); + return BankAccount; +}(Document); + +BankAccount.normalizeAccountNumber = matching.normalizeAccountNumber; +BankAccount.doctype = 'io.cozy.bank.accounts'; +BankAccount.idAttributes = ['_id']; +BankAccount.version = 1; +BankAccount.checkedAttributes = null; +BankAccount.vendorIdAttr = 'vendorId'; +module.exports = BankAccount; + +/***/ }), + +/***/ "9Pyj": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SentryError", function() { return SentryError; }); +/** An error emitted by Sentry SDKs and related utilities. */ +class SentryError extends Error { + /** Display name of this error instance. */ + + constructor( message, logLevel = 'warn') { + super(message);this.message = message;; + + this.name = new.target.prototype.constructor.name; + // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line + // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes + // instances of `SentryError` fail `obj instanceof SentryError` checks. + Object.setPrototypeOf(this, new.target.prototype); + this.logLevel = logLevel; + } +} + + +//# sourceMappingURL=error.js.map -//# sourceMappingURL=error.js.map - /***/ }), @@ -63081,6 +65500,37 @@ function clipAntimeridianInterpolate(from, to, direction, stream) { } +/***/ }), + +/***/ "9aZC": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; + +function _default(fn, duration, keyFn) { + var memo = {}; + return function (arg) { + var key = keyFn(arg); + var memoInfo = memo[key]; + var uptodate = memoInfo && memoInfo.result && memoInfo.date - Date.now() < duration; + + if (!uptodate) { + memo[key] = { + result: fn(arg), + date: Date.now() + }; + } + + return memo[key].result; + }; +} + /***/ }), /***/ "9c/f": @@ -63591,6 +66041,297 @@ function cross(...values) { } +/***/ }), + +/***/ "9jFK": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "init", function() { return init; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setBarCenter", function() { return setBarCenter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setBarLeft", function() { return setBarLeft; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setBarRight", function() { return setBarRight; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setBarSearch", function() { return setBarSearch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BarLeft", function() { return BarLeft; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BarRight", function() { return BarRight; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BarCenter", function() { return BarCenter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BarSearch", function() { return BarSearch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTheme", function() { return setTheme; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setWebviewContext", function() { return setWebviewContext; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateAccessToken", function() { return updateAccessToken; }); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("o0o1"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("yXPU"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("snfs"); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cozy_device_helper__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var cozy_ui_transpiled_react_hooks_useBreakpoints__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("1I/2"); +/* harmony import */ var cozy_ui_transpiled_react_hooks_useBreakpoints__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_hooks_useBreakpoints__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _lib_stack__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("g4K+"); +/* harmony import */ var _lib_reducers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("h8u/"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setLocale", function() { return _lib_reducers__WEBPACK_IMPORTED_MODULE_5__["setLocale"]; }); + +/* harmony import */ var _lib_api__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("dvG5"); +/* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("z8F8"); +/* harmony import */ var _locales_en_json__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("XM2u"); +var _locales_en_json__WEBPACK_IMPORTED_MODULE_8___namespace = /*#__PURE__*/__webpack_require__.t("XM2u", 1); +/* harmony import */ var _locales_fr_json__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("tZSp"); +var _locales_fr_json__WEBPACK_IMPORTED_MODULE_9___namespace = /*#__PURE__*/__webpack_require__.t("tZSp", 1); +/* harmony import */ var _locales_es_json__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("+YbN"); +var _locales_es_json__WEBPACK_IMPORTED_MODULE_10___namespace = /*#__PURE__*/__webpack_require__.t("+YbN", 1); + + + +/* global __VERSION__ */ + + + + + + + + + +var locales = { + en: _locales_en_json__WEBPACK_IMPORTED_MODULE_8__, + fr: _locales_fr_json__WEBPACK_IMPORTED_MODULE_9__, + es: _locales_es_json__WEBPACK_IMPORTED_MODULE_10__ +}; + +var createBarElement = function createBarElement() { + var targetName = Object(cozy_device_helper__WEBPACK_IMPORTED_MODULE_2__["isMobileApp"])() ? 'mobile' : 'browser'; + var barNode = document.createElement('div'); + barNode.setAttribute('id', 'coz-bar'); + barNode.setAttribute('role', 'banner'); + barNode.classList.add("coz-target--".concat(targetName)); + return barNode; +}; + +var injectBarInDOM = function injectBarInDOM(data) { + if (document.getElementById('coz-bar') !== null) { + return; + } + + var barNode = createBarElement(); + var appNode = document.querySelector(_dom__WEBPACK_IMPORTED_MODULE_7__["APP_SELECTOR"]); + + if (!appNode) { + // eslint-disable-next-line no-console + console.warn("Cozy-bar is looking for a \"".concat(_dom__WEBPACK_IMPORTED_MODULE_7__["APP_SELECTOR"], "\" tag that contains your application and can't find it :'(\u2026 The BAR is now disabled")); + return null; + } + + document.body.insertBefore(barNode, appNode); // method to put cozy-bar z-index on the top when Drawer visible and vice versa + + data.onDrawer = function (visible) { + barNode.dataset.drawerVisible = visible; + }; // specific layout behaviour if banner displayed + + + if (data.userActionRequired) { + document.body.classList.add('has-banner'); + } + + return barNode; +}; + +var renderBar = function renderBar(barNode, options) { + // import React related modules on init only + var React = __webpack_require__("q1tI"); + + var _require = __webpack_require__("i8i4"), + render = _require.render; + + var _require2 = __webpack_require__("p2W/"), + connect = _require2.connect, + Provider = _require2.Provider; + + var I18n = __webpack_require__("buk/").default; + + var Bar = __webpack_require__("LK2x").default; + + var CozyProvider = __webpack_require__("SH7X").CozyProvider; + + var cozyClient = options.cozyClient; // we connect the I18n component to the store to listen + // locale change from the api setLocale() + + var EnhancedI18n = connect(function (state) { + return { + lang: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_5__["getLocale"])(state) + }; + })(I18n); + var barComponent = /*#__PURE__*/React.createElement(Provider, { + store: options.reduxStore + }, /*#__PURE__*/React.createElement(EnhancedI18n, { + dictRequire: function dictRequire(lang) { + return locales[lang]; + } + }, /*#__PURE__*/React.createElement(cozy_ui_transpiled_react_hooks_useBreakpoints__WEBPACK_IMPORTED_MODULE_3__["BreakpointsProvider"], null, cozyClient ? /*#__PURE__*/React.createElement(CozyProvider, { + client: cozyClient + }, /*#__PURE__*/React.createElement(Bar, options)) : /*#__PURE__*/React.createElement(Bar, options)))); + render(barComponent, barNode); // for testing only + + return barComponent; +}; + +var makeCozyClientAutomatically = function makeCozyClientAutomatically(_ref) { + var cozyURL = _ref.cozyURL, + token = _ref.token, + isPublic = _ref.isPublic; + var ccURI = cozyURL || Object(_dom__WEBPACK_IMPORTED_MODULE_7__["getDefaultStackURL"])(isPublic); + var ccToken = token || Object(_dom__WEBPACK_IMPORTED_MODULE_7__["getDefaultToken"])(isPublic); + var ccOptions = { + uri: ccURI, + token: ccToken + }; + + var CozyClient = __webpack_require__("SH7X").default; // eslint-disable-next-line no-console + + + console.warn('Automatically made cozyClient. Options: ', ccOptions); + return new CozyClient(ccOptions); +}; + +var exposedAPI = {}; +/** + * Initializes the cozy bar + * + * It can be initialized either with a cozyClient instance + * + * @param {Object} options - Options + * @param {string} options.appName - App name to be displayed in the bar + * @param {string} options.appNamePrefix - App name prefix to be displayed in the bar + * @param {string} options.appSlug - App slug to be displayed in the bar + * @param {string} options.lang - Language for the bar + * @param {string} options.iconPath - Icon path for the bar + * @param {string} options.isInvertedTheme - For use Home icon with inverted color + * @param {Object} options.cozyClient - a cozy client instance + * @param {string} options.cozyURL - URL or domain of the stack + * @param {string} options.token - Access token for the stack + * @param {boolean} options.replaceTitleOnMobile - Replace title on mobile (default: false) + * @param {boolean} options.isPublic - Is public (default: false) + * @param {Function} options.onLogout - On logout callback + * @example + * import cozyBar from 'cozy-bar' + * cozyBar.init({ appName: 'My awesome app', appNamePrefix: 'Cozy', lang: 'en', iconPath: 'icon.svg', cozyClient: client }) + */ + +var init = /*#__PURE__*/function () { + var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() { + var _ref3, + appName, + _ref3$appNamePrefix, + appNamePrefix, + _ref3$appSlug, + appSlug, + lang, + _ref3$iconPath, + iconPath, + isInvertedTheme, + cozyClient, + cozyURL, + token, + _ref3$replaceTitleOnM, + replaceTitleOnMobile, + _ref3$isPublic, + isPublic, + onLogOut, + getOrCreateStore, + reduxStore, + apiMethods, + options, + barNode, + _args = arguments; + + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _ref3 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, appName = _ref3.appName, _ref3$appNamePrefix = _ref3.appNamePrefix, appNamePrefix = _ref3$appNamePrefix === void 0 ? Object(_dom__WEBPACK_IMPORTED_MODULE_7__["getAppNamePrefix"])() : _ref3$appNamePrefix, _ref3$appSlug = _ref3.appSlug, appSlug = _ref3$appSlug === void 0 ? Object(_dom__WEBPACK_IMPORTED_MODULE_7__["getAppSlug"])() : _ref3$appSlug, lang = _ref3.lang, _ref3$iconPath = _ref3.iconPath, iconPath = _ref3$iconPath === void 0 ? Object(_dom__WEBPACK_IMPORTED_MODULE_7__["getDefaultIcon"])() : _ref3$iconPath, isInvertedTheme = _ref3.isInvertedTheme, cozyClient = _ref3.cozyClient, cozyURL = _ref3.cozyURL, token = _ref3.token, _ref3$replaceTitleOnM = _ref3.replaceTitleOnMobile, replaceTitleOnMobile = _ref3$replaceTitleOnM === void 0 ? false : _ref3$replaceTitleOnM, _ref3$isPublic = _ref3.isPublic, isPublic = _ref3$isPublic === void 0 ? false : _ref3$isPublic, onLogOut = _ref3.onLogOut; + + // Force public mode in `/public` URLs + if (!isPublic && /^\/public/.test(window.location.pathname)) { + isPublic = true; + } + + if (!cozyClient) { + cozyClient = makeCozyClientAutomatically({ + cozyURL: cozyURL, + token: token, + isPublic: isPublic + }); + } // store + + + getOrCreateStore = __webpack_require__("7aHD").default; + reduxStore = getOrCreateStore(); + reduxStore.dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_5__["setInfos"])(appName, appNamePrefix, appSlug)); + _lib_stack__WEBPACK_IMPORTED_MODULE_4__["default"].init({ + cozyClient: cozyClient, + onCreate: function onCreate(data) { + return reduxStore.dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_5__["onRealtimeCreate"])(data)); + }, + onDelete: function onDelete(data) { + return reduxStore.dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_5__["onRealtimeDelete"])(data)); + } + }); + + if (lang) { + reduxStore.dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_5__["setLocale"])(lang)); + } // Assign all api methods to the bar object + + + apiMethods = Object(_lib_api__WEBPACK_IMPORTED_MODULE_6__["createBarAPI"])(reduxStore); + Object.assign(exposedAPI, apiMethods); + options = { + appName: appName, + isInvertedTheme: isInvertedTheme, + appNamePrefix: appNamePrefix, + appSlug: appSlug, + cozyClient: cozyClient, + iconPath: iconPath, + replaceTitleOnMobile: replaceTitleOnMobile, + isPublic: isPublic, + onLogOut: onLogOut, + userActionRequired: Object(_dom__WEBPACK_IMPORTED_MODULE_7__["getUserActionRequired"])(), + reduxStore: reduxStore + }; + barNode = injectBarInDOM(options); + renderBar(barNode, options); + + case 13: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function init() { + return _ref2.apply(this, arguments); + }; +}(); + +var updateAccessToken = function updateAccessToken(accessToken) { + _lib_stack__WEBPACK_IMPORTED_MODULE_4__["default"].updateAccessToken(accessToken); +}; + +var proxiedAPI = Object(_lib_api__WEBPACK_IMPORTED_MODULE_6__["createBarProxiedAPI"])(exposedAPI); +var setBarCenter = proxiedAPI.setBarCenter, + setBarLeft = proxiedAPI.setBarLeft, + setBarRight = proxiedAPI.setBarRight, + setBarSearch = proxiedAPI.setBarSearch, + BarCenter = proxiedAPI.BarCenter, + BarRight = proxiedAPI.BarRight, + BarLeft = proxiedAPI.BarLeft, + BarSearch = proxiedAPI.BarSearch, + setTheme = proxiedAPI.setTheme, + setWebviewContext = proxiedAPI.setWebviewContext; +var version = "\"0.0.0-development\""; + + /***/ }), /***/ "9jPY": @@ -67184,6 +69925,33 @@ exports.getReferencedFolder = getReferencedFolder; /***/ }), +/***/ "ADDh": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return verifySubselectors; }); +/* harmony import */ var _utils_warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("Se9h"); + + +function verify(selector, methodName, displayName) { + if (!selector) { + throw new Error("Unexpected value for " + methodName + " in " + displayName + "."); + } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') { + if (!selector.hasOwnProperty('dependsOnOwnProps')) { + Object(_utils_warning__WEBPACK_IMPORTED_MODULE_0__["default"])("The selector for " + methodName + " of " + displayName + " did not specify a value for dependsOnOwnProps."); + } + } +} + +function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) { + verify(mapStateToProps, 'mapStateToProps', displayName); + verify(mapDispatchToProps, 'mapDispatchToProps', displayName); + verify(mergeProps, 'mergeProps', displayName); +} + +/***/ }), + /***/ "ADg1": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -68635,6 +71403,116 @@ function _createCipher(options) { } +/***/ }), + +/***/ "AHTZ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getUniversalLinkDomain = exports.generateWebLink = exports.generateUniversalLink = void 0; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("lSNA")); + +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("QILm")); + +var _cozyClient = __webpack_require__("SH7X"); + +var _native = __webpack_require__("bGd3"); + +var _excluded = ["nativePath"]; + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + + return keys; +} + +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { + (0, _defineProperty2.default)(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + + return target; +} + +var getUniversalLinkDomain = function getUniversalLinkDomain() { + return _native.UNIVERSAL_LINK_URL; +}; + +exports.getUniversalLinkDomain = getUniversalLinkDomain; + +var generateWebLink = function generateWebLink(_ref) { + var nativePath = _ref.nativePath, + props = (0, _objectWithoutProperties2.default)(_ref, _excluded); + console.warn('Deprecated: you should use generateWebLink from cozy-client instead'); + return (0, _cozyClient.generateWebLink)(_objectSpread({ + pathname: '/', + hash: nativePath + }, props)); +}; +/** + * Returns a universal link for an app + native path + * + * @param {string} options.slug - eg: drive + * @param {string} options.nativePath - /path/to/view + * @param {string} options.fallbackUrl - https://...mycozy.cloud, optional if cozyUrl is passed + * @param {string} options.cozyUrl - https://name.mycozy.cloud, optional if fallbackUrl is passed + * @param {string} options.subDomainType - flat/nested, optionally the type of subdomains that is used. + * @return {string} - https://links.cozy.cloud/drive/?fallback... + */ + + +exports.generateWebLink = generateWebLink; + +var generateUniversalLink = function generateUniversalLink(options) { + var slug = options.slug, + cozyUrl = options.cozyUrl, + subDomainType = options.subDomainType; + var fallbackUrl = options.fallbackUrl, + nativePath = options.nativePath; + nativePath = (0, _cozyClient.ensureFirstSlash)(nativePath); + + if (!cozyUrl && !fallbackUrl) { + throw new Error('Must have either cozyUrl or fallbackUrl to generate universal link.'); + } + + if (cozyUrl && !fallbackUrl) { + fallbackUrl = (0, _cozyClient.generateWebLink)({ + cozyUrl: cozyUrl, + pathname: '/', + hash: nativePath, + slug: slug, + subDomainType: subDomainType + }); + } + + var url = getUniversalLinkDomain(cozyUrl) + '/' + slug + nativePath; + var urlObj = new URL(url); + urlObj.searchParams.append('fallback', fallbackUrl); + return urlObj.toString(); +}; + +exports.generateUniversalLink = generateUniversalLink; + /***/ }), /***/ "AHz+": @@ -75405,6 +78283,261 @@ function buildFormatLocale () { module.exports = buildFormatLocale +/***/ }), + +/***/ "Bls7": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Settings", function() { return Settings; }); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("lwsE"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("W8MJ"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("PJYZ"); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("7W2i"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("a1gu"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("Nsbk"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("lSNA"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("p2W/"); +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("fd+0"); +/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("mwIZ"); +/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("buk/"); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var cozy_ui_transpiled_react_Button__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("KXWi"); +/* harmony import */ var cozy_ui_transpiled_react_Button__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Button__WEBPACK_IMPORTED_MODULE_12__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Gear__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("sKEN"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Gear__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Gear__WEBPACK_IMPORTED_MODULE_13__); +/* harmony import */ var cozy_client_dist__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("SH7X"); +/* harmony import */ var cozy_client_dist__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(cozy_client_dist__WEBPACK_IMPORTED_MODULE_14__); +/* harmony import */ var _SettingsContent__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("JlJ5"); +/* harmony import */ var _lib_reducers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("h8u/"); +/* harmony import */ var _queries__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("0k3h"); +/* harmony import */ var _helper__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("PFuL"); + + + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + + + + + + +var instanceModel = undefined; +var hasAnOffer = undefined; +var isFremiumFixed = undefined; + +if (cozy_client_dist__WEBPACK_IMPORTED_MODULE_14__["models"]) { + instanceModel = cozy_client_dist__WEBPACK_IMPORTED_MODULE_14__["models"].instance; // TODO fallback from cozy-client + + isFremiumFixed = function isFremiumFixed(data) { + var GB = 1000 * 1000 * 1000; + var PREMIUM_QUOTA = 50 * GB; + var quota = lodash_get__WEBPACK_IMPORTED_MODULE_10___default()(data, 'diskUsage.data.attributes.quota', false); + return parseInt(quota) < PREMIUM_QUOTA; + }; + + hasAnOffer = function hasAnOffer(data) { + return !instanceModel.isSelfHosted(data) && instanceModel.arePremiumLinksEnabled(data) && instanceModel.getUuid(data) && !isFremiumFixed(data); + }; +} + + + + + +var Settings = /*#__PURE__*/function (_Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default()(Settings, _Component); + + var _super = _createSuper(Settings); + + function Settings(props) { + var _this; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Settings); + + _this = _super.call(this, props); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "onClickOutside", function (event) { + if (_this.props.isFetching || _this.state.opened) { + // if it's not a cozy-bar nav popup, close the opened popup + if (!_this.rootRef.contains(event.target)) { + _this.setState({ + opened: false + }); + + event.stopPropagation(); + } + } + }); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "toggleMenu", function () { + var stateUpdate = { + opened: false + }; // if popup already opened, stop here to close it + + if (_this.state.opened) return _this.setState(stateUpdate); // fetch data + + _this.props.fetchSettingsData(); + + _this.setState({ + opened: true + }); + }); + + _this.state = { + opened: false + }; + return _this; + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Settings, [{ + key: "componentDidMount", + value: function componentDidMount() { + document.body.addEventListener('click', this.onClickOutside); + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + document.body.removeEventListener('click', this.onClickOutside); + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + var _this$props = this.props, + isBusy = _this$props.isBusy, + logOut = _this$props.logOut, + _onLogOut = _this$props.onLogOut, + t = _this$props.t, + diskUsageQuery = _this$props.diskUsageQuery, + instanceQuery = _this$props.instanceQuery, + contextQuery = _this$props.contextQuery, + storageData = _this$props.storageData, + settingsAppURL = _this$props.settingsAppURL, + isFetching = _this$props.isFetching; + var shouldDisplayViewOfferButton = false; + var managerUrlPremiumLink; + var isFetchingFromQueries; + var canCheckPremium = Object(_helper__WEBPACK_IMPORTED_MODULE_18__["cozyClientCanCheckPremium"])(); + + if (canCheckPremium) { + isFetchingFromQueries = Object(_helper__WEBPACK_IMPORTED_MODULE_18__["isFetchingQueries"])([diskUsageQuery, instanceQuery, contextQuery]); + + if (!isFetchingFromQueries) { + var data = { + context: contextQuery, + diskUsage: diskUsageQuery, + instance: instanceQuery + }; + shouldDisplayViewOfferButton = instanceModel.shouldDisplayOffers(data) || hasAnOffer(data); + managerUrlPremiumLink = instanceModel.buildPremiumLink(data); + } + } + + var areAllFetchingDone = false; + + if (!canCheckPremium) { + areAllFetchingDone = !isFetching; + } else { + areAllFetchingDone = !isFetchingFromQueries && !isFetching; + } + + var opened = this.state.opened; + var openMenu = opened && areAllFetchingDone; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", { + className: "coz-nav coz-nav-settings", + ref: function ref(_ref) { + _this2.rootRef = _ref; + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(cozy_ui_transpiled_react_Button__WEBPACK_IMPORTED_MODULE_12__["Button"], { + type: "button", + theme: "text", + onClick: this.toggleMenu, + className: "coz-nav-settings-btn", + "aria-controls": "coz-nav-pop--settings", + busy: isBusy, + icon: cozy_ui_transpiled_react_Icons_Gear__WEBPACK_IMPORTED_MODULE_13___default.a, + label: t('menu.settings') + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", { + className: "coz-nav-pop coz-nav-pop--settings", + id: "coz-nav-pop--settings", + "aria-hidden": !openMenu + }, areAllFetchingDone && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_7___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_SettingsContent__WEBPACK_IMPORTED_MODULE_15__["default"], { + onLogOut: function onLogOut() { + if (_onLogOut && typeof _onLogOut === 'function') { + _onLogOut(); + } else { + logOut(); + } + }, + storageData: storageData, + settingsAppURL: settingsAppURL, + shoulDisplayViewOfferButton: shouldDisplayViewOfferButton, + managerUrlPremiumLink: managerUrlPremiumLink + })))); + } + }]); + + return Settings; +}(react__WEBPACK_IMPORTED_MODULE_7__["Component"]); + +var mapStateToProps = function mapStateToProps(state) { + return { + storageData: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_16__["getStorageData"])(state), + settingsAppURL: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_16__["getSettingsAppURL"])(state), + isBusy: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_16__["isSettingsBusy"])(state), + isFetching: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_16__["isFetchingSettings"])(state) + }; +}; + +var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + fetchSettingsData: function fetchSettingsData() { + return dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_16__["fetchSettingsData"])()); + }, + logOut: function logOut() { + return dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_16__["logOut"])()); + } + }; +}; + +var exported; + +if (Object(_helper__WEBPACK_IMPORTED_MODULE_18__["cozyClientCanCheckPremium"])()) { + exported = Object(redux__WEBPACK_IMPORTED_MODULE_9__["compose"])(Object(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_11__["translate"])(), Object(cozy_client_dist__WEBPACK_IMPORTED_MODULE_14__["queryConnect"])({ + instanceQuery: _queries__WEBPACK_IMPORTED_MODULE_17__["instanceReq"], + contextQuery: _queries__WEBPACK_IMPORTED_MODULE_17__["contextReq"], + diskUsageQuery: _queries__WEBPACK_IMPORTED_MODULE_17__["diskUsageReq"] + }), Object(react_redux__WEBPACK_IMPORTED_MODULE_8__["connect"])(mapStateToProps, mapDispatchToProps))(Settings); +} else { + exported = Object(redux__WEBPACK_IMPORTED_MODULE_9__["compose"])(Object(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_11__["translate"])(), Object(react_redux__WEBPACK_IMPORTED_MODULE_8__["connect"])(mapStateToProps, mapDispatchToProps))(Settings); +} + +/* harmony default export */ __webpack_exports__["default"] = (exported); + /***/ }), /***/ "BmUa": @@ -75803,6 +78936,38 @@ module.exports = function () { }; +/***/ }), + +/***/ "C1Al": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__("pVnL")); + +var _react = _interopRequireDefault(__webpack_require__("q1tI")); + +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/openwith.svg` to regenerate; +function SvgOpenwith(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + d: "M9 0v2h3.5L6 8.5 7.5 10 14 3.5V7h2V1.003A.996.996 0 0014.997 0H9zM7 2V0H1.003A1 1 0 000 1v14c0 .552.445 1 1 1h14c.552 0 1-.438 1-1.003V9h-2v5H2V2h5z", + fillRule: "evenodd" + })); +} + +var _default = SvgOpenwith; +exports.default = _default; + /***/ }), /***/ "C2EL": @@ -91748,6 +94913,66 @@ uuid.v4 = v4; module.exports = uuid; +/***/ }), + +/***/ "EchP": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("lwsE")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("W8MJ")); + +var Request = +/*#__PURE__*/ +function () { + function Request(cozyClient) { + (0, _classCallCheck2.default)(this, Request); + this.stackClient = cozyClient.stackClient; + } + + (0, _createClass2.default)(Request, [{ + key: "get", + value: function get(id) { + return this.stackClient.fetchJSON('GET', "/intents/".concat(id)).then(function (resp) { + var data = resp.data; + if (!data._id) data._id = data.id; + return data; + }); + } + }, { + key: "post", + value: function post(action, type, data, permissions) { + return this.stackClient.fetchJSON('POST', '/intents', { + data: { + type: 'io.cozy.intents', + attributes: { + action: action, + type: type, + data: data, + permissions: permissions + } + } + }).then(function (resp) { + return resp.data; + }); + } + }]); + return Request; +}(); + +var _default = Request; +exports.default = _default; + /***/ }), /***/ "EdMa": @@ -156961,6 +160186,203 @@ exports.default = _default; /***/ }), +/***/ "JlJ5": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("PI/G"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("mgfL"); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cozy_flags__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("snfs"); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(cozy_device_helper__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("buk/"); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("y6ex"); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Openwith__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("C1Al"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Openwith__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Openwith__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Cloud__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("g4Do"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Cloud__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Cloud__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_People__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("kJHp"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_People__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_People__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_GraphCircle__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("Nh9u"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_GraphCircle__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_GraphCircle__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_CozyCircle__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("RsHC"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_CozyCircle__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_CozyCircle__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Hand__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("JylD"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Hand__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Hand__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Devices__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("wpu4"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Devices__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Devices__WEBPACK_IMPORTED_MODULE_12__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Globe__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("Sacj"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Globe__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Globe__WEBPACK_IMPORTED_MODULE_13__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Logout__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("SQLq"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Logout__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Logout__WEBPACK_IMPORTED_MODULE_14__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Help__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("aXzq"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Help__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Help__WEBPACK_IMPORTED_MODULE_15__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Email__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("VqGu"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Email__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Email__WEBPACK_IMPORTED_MODULE_16__); +/* harmony import */ var _StorageData__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("uISV"); + + + + + + + + + + + + + + + + + + + +var MenuIcon = function MenuIcon(_ref) { + var icon = _ref.icon; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_5___default.a, { + className: "u-mr-1", + color: "var(--slateGrey)", + icon: icon + }); +}; + +var ExternalLinkIcon = function ExternalLinkIcon() { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_5___default.a, { + className: "coz-nav-settings-item-btn-external-icon", + color: "var(--coolGrey)", + icon: cozy_ui_transpiled_react_Icons_Openwith__WEBPACK_IMPORTED_MODULE_6___default.a + }); +}; + +var NavGroup = function NavGroup(_ref2) { + var children = _ref2.children; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("ul", { + className: "coz-nav-group" + }, children); +}; + +var NavItem = function NavItem(_ref3) { + var children = _ref3.children; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("li", { + className: "coz-nav-settings-item" + }, children); +}; + +var SettingsContent = function SettingsContent(_ref4) { + var t = _ref4.t, + onLogOut = _ref4.onLogOut, + settingsAppURL = _ref4.settingsAppURL, + storageData = _ref4.storageData, + onClaudy = _ref4.onClaudy, + _ref4$isDrawer = _ref4.isDrawer, + isDrawer = _ref4$isDrawer === void 0 ? false : _ref4$isDrawer, + isClaudyLoading = _ref4.isClaudyLoading, + shoulDisplayViewOfferButton = _ref4.shoulDisplayViewOfferButton, + managerUrlPremiumLink = _ref4.managerUrlPremiumLink; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { + className: "coz-nav-pop-content" + }, isDrawer && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("hr", null), settingsAppURL && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavGroup, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + role: "menuitem", + href: "".concat(settingsAppURL, "#/profile"), + target: "_self", + title: t('profile') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_People__WEBPACK_IMPORTED_MODULE_8___default.a + }), t('profile'))), (!isDrawer || !Object(cozy_device_helper__WEBPACK_IMPORTED_MODULE_3__["isMobileApp"])()) && shoulDisplayViewOfferButton && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + role: "menuitem", + href: managerUrlPremiumLink, + target: "_self", + title: t('plans') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_CozyCircle__WEBPACK_IMPORTED_MODULE_10___default.a + }), t('plans'), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ExternalLinkIcon, null))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + role: "menuitem", + target: "_self", + title: t('storage'), + href: "".concat(settingsAppURL, "#/storage") + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_GraphCircle__WEBPACK_IMPORTED_MODULE_9___default.a + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, t('storage'), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_StorageData__WEBPACK_IMPORTED_MODULE_17__["default"], { + data: storageData + }))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavGroup, null, cozy_flags__WEBPACK_IMPORTED_MODULE_2___default()('settings.permissions-dashboard') && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + role: "menuitem", + href: "".concat(settingsAppURL, "#/permissions/slug"), + target: "_self", + title: t('permissions') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_Hand__WEBPACK_IMPORTED_MODULE_11___default.a + }), t('permissions'))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + role: "menuitem", + href: "".concat(settingsAppURL, "#/connectedDevices"), + target: "_self", + title: t('connectedDevices') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_Devices__WEBPACK_IMPORTED_MODULE_12___default.a + }), t('connectedDevices'))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + role: "menuitem", + href: "".concat(settingsAppURL, "#/sessions"), + target: "_self", + title: t('connections') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_Globe__WEBPACK_IMPORTED_MODULE_13___default.a + }), t('connections')))), isDrawer && onClaudy && !Object(cozy_device_helper__WEBPACK_IMPORTED_MODULE_3__["isMobileApp"])() && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavGroup, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", { + type: "button", + role: "menuitem", + className: "coz-nav-settings-item-btn", + busy: isClaudyLoading, + onClick: onClaudy + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_Cloud__WEBPACK_IMPORTED_MODULE_7___default.a + }), " ", t('claudy.title')))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavGroup, null, !Object(cozy_device_helper__WEBPACK_IMPORTED_MODULE_3__["isMobileApp"])() && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + role: "menuitem", + target: "_blank", + rel: "noopener noreferrer", + href: "https://support.cozy.io/", + title: t('help') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_Help__WEBPACK_IMPORTED_MODULE_15___default.a + }), t('help'), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ExternalLinkIcon, null))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + role: "menuitem", + href: "".concat(settingsAppURL, "#/support"), + target: "_self", + title: t('contact') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_Email__WEBPACK_IMPORTED_MODULE_16___default.a + }), t('contact')))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NavItem, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", { + type: "button", + role: "menuitem", + onClick: onLogOut, + title: t('logout') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MenuIcon, { + icon: cozy_ui_transpiled_react_Icons_Logout__WEBPACK_IMPORTED_MODULE_14___default.a + }), " ", t('logout'))))); +}; + +SettingsContent.defaultProps = { + shoulDisplayViewOfferButton: false +}; +SettingsContent.propTypes = { + shoulDisplayViewOfferButton: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, + t: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired, + onLogOut: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func.isRequired, + settingsAppURL: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, + storageData: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, + onClaudy: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func]), + isDrawer: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool, + isClaudyLoading: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool +}; +/* harmony default export */ __webpack_exports__["default"] = (Object(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_4__["translate"])()(SettingsContent)); + +/***/ }), + /***/ "JlTW": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -157948,6 +161370,37 @@ function endOfHour (dirtyDate) { module.exports = endOfHour +/***/ }), + +/***/ "JylD": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__("pVnL")); + +var _react = _interopRequireDefault(__webpack_require__("q1tI")); + +// Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/hand.svg` to regenerate; +function SvgHand(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 15 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + d: "M14.992 8V5a1.001 1.001 0 00-2 0v3h-1V2a1.001 1.001 0 00-2 0v5h-1V1a1.001 1.001 0 00-2 0v6h-1V2c0-.551-.45-1-1-1-.551 0-1 .449-1 1v6.5a.5.5 0 01-.88.325L1.1 6.125c-.222-.182-.64-.166-.897.091a.7.7 0 00-.075.898c.064.117 1.542 4.144 3.227 6.798A4.486 4.486 0 007.156 16h3.336c2.48 0 4.5-2.019 4.5-4.5V8z" + })); +} + +var _default = SvgHand; +exports.default = _default; + /***/ }), /***/ "Jzny": @@ -160541,6 +163994,292 @@ function buildDistanceInWordsLocale () { module.exports = buildDistanceInWordsLocale +/***/ }), + +/***/ "KdTy": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return connectAdvanced; }); +/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dI71"); +/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("JX7q"); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("wx14"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("zLVn"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("2mql"); +/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("QLaP"); +/* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("TOwV"); +/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _utils_Subscription__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("0HMc"); +/* harmony import */ var _utils_PropTypes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("xhga"); + + + + + + + + + + +var hotReloadingVersion = 0; +var dummyState = {}; + +function noop() {} + +function makeSelectorStateful(sourceSelector, store) { + // wrap the selector in an object that tracks its results between runs. + var selector = { + run: function runComponentSelector(props) { + try { + var nextProps = sourceSelector(store.getState(), props); + + if (nextProps !== selector.props || selector.error) { + selector.shouldComponentUpdate = true; + selector.props = nextProps; + selector.error = null; + } + } catch (error) { + selector.shouldComponentUpdate = true; + selector.error = error; + } + } + }; + return selector; +} + +function connectAdvanced( +/* + selectorFactory is a func that is responsible for returning the selector function used to + compute new props from state, props, and dispatch. For example: + export default connectAdvanced((dispatch, options) => (state, props) => ({ + thing: state.things[props.thingId], + saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)), + }))(YourComponent) + Access to dispatch is provided to the factory so selectorFactories can bind actionCreators + outside of their selector as an optimization. Options passed to connectAdvanced are passed to + the selectorFactory, along with displayName and WrappedComponent, as the second argument. + Note that selectorFactory is responsible for all caching/memoization of inbound and outbound + props. Do not use connectAdvanced directly without memoizing results between calls to your + selector, otherwise the Connect component will re-render on every state or props change. +*/ +selectorFactory, // options object: +_ref) { + var _contextTypes, _childContextTypes; + + if (_ref === void 0) { + _ref = {}; + } + + var _ref2 = _ref, + _ref2$getDisplayName = _ref2.getDisplayName, + getDisplayName = _ref2$getDisplayName === void 0 ? function (name) { + return "ConnectAdvanced(" + name + ")"; + } : _ref2$getDisplayName, + _ref2$methodName = _ref2.methodName, + methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName, + _ref2$renderCountProp = _ref2.renderCountProp, + renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp, + _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges, + shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta, + _ref2$storeKey = _ref2.storeKey, + storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey, + _ref2$withRef = _ref2.withRef, + withRef = _ref2$withRef === void 0 ? false : _ref2$withRef, + connectOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_3__["default"])(_ref2, ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef"]); + + var subscriptionKey = storeKey + 'Subscription'; + var version = hotReloadingVersion++; + var contextTypes = (_contextTypes = {}, _contextTypes[storeKey] = _utils_PropTypes__WEBPACK_IMPORTED_MODULE_9__["storeShape"], _contextTypes[subscriptionKey] = _utils_PropTypes__WEBPACK_IMPORTED_MODULE_9__["subscriptionShape"], _contextTypes); + var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = _utils_PropTypes__WEBPACK_IMPORTED_MODULE_9__["subscriptionShape"], _childContextTypes); + return function wrapWithConnect(WrappedComponent) { + invariant__WEBPACK_IMPORTED_MODULE_5___default()(Object(react_is__WEBPACK_IMPORTED_MODULE_7__["isValidElementType"])(WrappedComponent), "You must pass a component to the function returned by " + (methodName + ". Instead received " + JSON.stringify(WrappedComponent))); + var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; + var displayName = getDisplayName(wrappedComponentName); + + var selectorFactoryOptions = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({}, connectOptions, { + getDisplayName: getDisplayName, + methodName: methodName, + renderCountProp: renderCountProp, + shouldHandleStateChanges: shouldHandleStateChanges, + storeKey: storeKey, + withRef: withRef, + displayName: displayName, + wrappedComponentName: wrappedComponentName, + WrappedComponent: WrappedComponent // TODO Actually fix our use of componentWillReceiveProps + + /* eslint-disable react/no-deprecated */ + + }); + + var Connect = + /*#__PURE__*/ + function (_Component) { + Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(Connect, _Component); + + function Connect(props, context) { + var _this; + + _this = _Component.call(this, props, context) || this; + _this.version = version; + _this.state = {}; + _this.renderCount = 0; + _this.store = props[storeKey] || context[storeKey]; + _this.propsMode = Boolean(props[storeKey]); + _this.setWrappedInstance = _this.setWrappedInstance.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__["default"])(_this))); + invariant__WEBPACK_IMPORTED_MODULE_5___default()(_this.store, "Could not find \"" + storeKey + "\" in either the context or props of " + ("\"" + displayName + "\". Either wrap the root component in a <Provider>, ") + ("or explicitly pass \"" + storeKey + "\" as a prop to \"" + displayName + "\".")); + + _this.initSelector(); + + _this.initSubscription(); + + return _this; + } + + var _proto = Connect.prototype; + + _proto.getChildContext = function getChildContext() { + var _ref3; + + // If this component received store from props, its subscription should be transparent + // to any descendants receiving store+subscription from context; it passes along + // subscription passed to it. Otherwise, it shadows the parent subscription, which allows + // Connect to control ordering of notifications to flow top-down. + var subscription = this.propsMode ? null : this.subscription; + return _ref3 = {}, _ref3[subscriptionKey] = subscription || this.context[subscriptionKey], _ref3; + }; + + _proto.componentDidMount = function componentDidMount() { + if (!shouldHandleStateChanges) return; // componentWillMount fires during server side rendering, but componentDidMount and + // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount. + // Otherwise, unsubscription would never take place during SSR, causing a memory leak. + // To handle the case where a child component may have triggered a state change by + // dispatching an action in its componentWillMount, we have to re-run the select and maybe + // re-render. + + this.subscription.trySubscribe(); + this.selector.run(this.props); + if (this.selector.shouldComponentUpdate) this.forceUpdate(); + }; + + _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + this.selector.run(nextProps); + }; + + _proto.shouldComponentUpdate = function shouldComponentUpdate() { + return this.selector.shouldComponentUpdate; + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + if (this.subscription) this.subscription.tryUnsubscribe(); + this.subscription = null; + this.notifyNestedSubs = noop; + this.store = null; + this.selector.run = noop; + this.selector.shouldComponentUpdate = false; + }; + + _proto.getWrappedInstance = function getWrappedInstance() { + invariant__WEBPACK_IMPORTED_MODULE_5___default()(withRef, "To access the wrapped instance, you need to specify " + ("{ withRef: true } in the options argument of the " + methodName + "() call.")); + return this.wrappedInstance; + }; + + _proto.setWrappedInstance = function setWrappedInstance(ref) { + this.wrappedInstance = ref; + }; + + _proto.initSelector = function initSelector() { + var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions); + this.selector = makeSelectorStateful(sourceSelector, this.store); + this.selector.run(this.props); + }; + + _proto.initSubscription = function initSubscription() { + if (!shouldHandleStateChanges) return; // parentSub's source should match where store came from: props vs. context. A component + // connected to the store via props shouldn't use subscription from context, or vice versa. + + var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey]; + this.subscription = new _utils_Subscription__WEBPACK_IMPORTED_MODULE_8__["default"](this.store, parentSub, this.onStateChange.bind(this)); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in + // the middle of the notification loop, where `this.subscription` will then be null. An + // extra null check every change can be avoided by copying the method onto `this` and then + // replacing it with a no-op on unmount. This can probably be avoided if Subscription's + // listeners logic is changed to not call listeners that have been unsubscribed in the + // middle of the notification loop. + + this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription); + }; + + _proto.onStateChange = function onStateChange() { + this.selector.run(this.props); + + if (!this.selector.shouldComponentUpdate) { + this.notifyNestedSubs(); + } else { + this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate; + this.setState(dummyState); + } + }; + + _proto.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() { + // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it + // needs to notify nested subs. Once called, it unimplements itself until further state + // changes occur. Doing it this way vs having a permanent `componentDidUpdate` that does + // a boolean check every time avoids an extra method call most of the time, resulting + // in some perf boost. + this.componentDidUpdate = undefined; + this.notifyNestedSubs(); + }; + + _proto.isSubscribed = function isSubscribed() { + return Boolean(this.subscription) && this.subscription.isSubscribed(); + }; + + _proto.addExtraProps = function addExtraProps(props) { + if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props; // make a shallow copy so that fields added don't leak to the original selector. + // this is especially important for 'ref' since that's a reference back to the component + // instance. a singleton memoized selector would then be holding a reference to the + // instance, preventing the instance from being garbage collected, and that would be bad + + var withExtras = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__["default"])({}, props); + + if (withRef) withExtras.ref = this.setWrappedInstance; + if (renderCountProp) withExtras[renderCountProp] = this.renderCount++; + if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription; + return withExtras; + }; + + _proto.render = function render() { + var selector = this.selector; + selector.shouldComponentUpdate = false; + + if (selector.error) { + throw selector.error; + } else { + return Object(react__WEBPACK_IMPORTED_MODULE_6__["createElement"])(WrappedComponent, this.addExtraProps(selector.props)); + } + }; + + return Connect; + }(react__WEBPACK_IMPORTED_MODULE_6__["Component"]); + /* eslint-enable react/no-deprecated */ + + + Connect.WrappedComponent = WrappedComponent; + Connect.displayName = displayName; + Connect.childContextTypes = childContextTypes; + Connect.contextTypes = contextTypes; + Connect.propTypes = contextTypes; + + if (false) {} + + return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4___default()(Connect, WrappedComponent); + }; +} + /***/ }), /***/ "KfNM": @@ -163687,6 +167426,359 @@ var indigo = { /***/ }), +/***/ "LK2x": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bar", function() { return Bar; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapStateToProps", function() { return mapStateToProps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapDispatchToProps", function() { return mapDispatchToProps; }); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("MVZn"); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("lwsE"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("W8MJ"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("PJYZ"); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("7W2i"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("a1gu"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("Nsbk"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("lSNA"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("pVnL"); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("p2W/"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("PI/G"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("buk/"); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_12__); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("y6ex"); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_13__); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("snfs"); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(cozy_device_helper__WEBPACK_IMPORTED_MODULE_14__); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("mgfL"); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(cozy_flags__WEBPACK_IMPORTED_MODULE_15__); +/* harmony import */ var _Apps_ButtonCozyHome__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("uURn"); +/* harmony import */ var _Banner__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("rrFb"); +/* harmony import */ var _Drawer__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("XISK"); +/* harmony import */ var _Settings__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("Bls7"); +/* harmony import */ var _Apps__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__("d04y"); +/* harmony import */ var _Claudy__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__("9+rA"); +/* harmony import */ var _lib_reducers__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__("h8u/"); + + + + + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + + + + + + + + + + + +/* Generated with node_modules/.bin/svgr src/assets/sprites/icon-apps.svg */ + +function SvgIconApps(props) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("svg", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_8___default()({ + width: 16, + height: 16 + }, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("path", { + d: "M0 0h4v4H0V0zm0 6h4v4H0V6zm0 6h4v4H0v-4zM6 0h4v4H6V0zm0 6h4v4H6V6zm0 6h4v4H6v-4zm6-12h4v4h-4V0zm0 6h4v4h-4V6zm0 6h4v4h-4v-4z", + fillRule: "evenodd" + })); +} + +var Bar = /*#__PURE__*/function (_Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(Bar, _Component); + + var _super = _createSuper(Bar); + + function Bar(props) { + var _this; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, Bar); + + _this = _super.call(this, props); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), "toggleDrawer", function () { + // don't allow to toggle the drawer if claudy opened or is opening + if (_this.state.claudyOpened || _this.state.claudyFired) return; + var drawerVisible = !_this.state.drawerVisible; // don't wait for transitionend if displaying + + if (drawerVisible) _this.props.onDrawer(drawerVisible); + + _this.setState({ + drawerVisible: drawerVisible + }); + }); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), "toggleClaudy", function () { + var isFromDrawer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + if (!_this.props.claudyEnabled) return; + var claudyOpened = _this.state.claudyOpened; + + if (isFromDrawer && !claudyOpened) { + // if opened from drawer + // reset to toggle via the Claudy component + return _this.setState({ + claudyFired: true + }); + } + + if (_this.state.claudyFired) _this.setState({ + claudyFired: false + }); + + _this.setState({ + claudyOpened: !claudyOpened + }); + }); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), "renderLeft", function () { + var _this$props = _this.props, + t = _this$props.t, + isPublic = _this$props.isPublic, + webviewContext = _this$props.webviewContext, + isInvertedTheme = _this$props.isInvertedTheme; + + if (Object(cozy_device_helper__WEBPACK_IMPORTED_MODULE_14__["isFlagshipApp"])() || cozy_flags__WEBPACK_IMPORTED_MODULE_15___default()('flagship.debug')) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(_Apps_ButtonCozyHome__WEBPACK_IMPORTED_MODULE_16__["ButtonCozyHome"], { + webviewContext: webviewContext, + isInvertedTheme: isInvertedTheme + }); + } // data-tutorial attribute allows to be targeted in an application tutorial + + + return !isPublic ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("button", { + type: "button", + className: "coz-bar-btn coz-bar-burger", + onClick: _this.toggleDrawer, + "data-tutorial": "apps-mobile" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_13___default.a, { + icon: SvgIconApps, + width: 16, + height: 16, + color: "currentColor" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("span", { + className: "coz-bar-hidden" + }, t('drawer'))) : null; + }); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this), "renderRight", function () { + var isPublic = _this.props.isPublic; + return !isPublic ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(_Settings__WEBPACK_IMPORTED_MODULE_19__["default"], { + onLogOut: _this.props.onLogOut + }) : null; + }); + + _this.state = { + claudyFired: false, + // true to fire claudy (used by the drawer) + claudyOpened: false, + drawerVisible: false + }; + _this.fetchApps = _this.fetchApps.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this)); + _this.fetchInitialData = _this.fetchInitialData.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this)); + _this.handleTokenRefreshed = _this.handleTokenRefreshed.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this)); + return _this; + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(Bar, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.fetchInitialData(); + var cozyClient = this.props.cozyClient; + cozyClient.on('tokenRefreshed', this.handleTokenRefreshed); + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + var cozyClient = this.props.cozyClient; + cozyClient.removeListener('tokenRefreshed', this.handleTokenRefreshed); + } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate(prevProps, prevState) { + if (!this.props.hasFetchedApps && this.state.drawerVisible && prevState.drawerVisible !== this.state.drawerVisible) { + this.fetchApps(); + } + } + }, { + key: "handleTokenRefreshed", + value: function handleTokenRefreshed() { + this.fetchInitialData(); + } + }, { + key: "fetchApps", + value: function fetchApps() { + this.props.fetchApps(); + } + }, { + key: "fetchInitialData", + value: function fetchInitialData() { + if (this.props.isPublic) { + return; + } + + this.props.fetchContext(); + this.props.fetchSettingsData(false); + this.fetchApps(); + } + }, { + key: "renderCenter", + value: function renderCenter() { + var _this$props2 = this.props, + appName = _this$props2.appName, + appNamePrefix = _this$props2.appNamePrefix, + appSlug = _this$props2.appSlug, + iconPath = _this$props2.iconPath, + isPublic = _this$props2.isPublic, + isInvertedTheme = _this$props2.isInvertedTheme; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(_Apps__WEBPACK_IMPORTED_MODULE_20__["default"], { + appName: appName, + appNamePrefix: appNamePrefix, + appSlug: appSlug, + iconPath: iconPath, + isPublic: isPublic, + isInvertedTheme: isInvertedTheme + }); + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + var _this$state = this.state, + claudyFired = _this$state.claudyFired, + claudyOpened = _this$state.claudyOpened, + drawerVisible = _this$state.drawerVisible; + var _this$props3 = this.props, + theme = _this$props3.theme, + themeOverrides = _this$props3.themeOverrides, + barLeft = _this$props3.barLeft, + barRight = _this$props3.barRight, + barCenter = _this$props3.barCenter, + barSearch = _this$props3.barSearch, + claudyEnabled = _this$props3.claudyEnabled, + onDrawer = _this$props3.onDrawer, + isPublic = _this$props3.isPublic, + onLogOut = _this$props3.onLogOut, + userActionRequired = _this$props3.userActionRequired, + isInvertedTheme = _this$props3.isInvertedTheme; + var pColor = themeOverrides.primaryColor, + pctColor = themeOverrides.primaryContrastTextColor; + var pStyle = pColor ? { + '--cozBarThemePrimaryColor': pColor + } : {}; + var pctStyle = pctColor ? { + '--cozBarThemePrimaryContrastTextColor': pctColor + } : {}; + + var themeStyle = _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, pStyle, pctStyle); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("div", { + className: "coz-bar-wrapper coz-theme-".concat(theme), + style: themeStyle + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("div", { + id: "cozy-bar-modal-dom-place" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("div", { + className: "coz-bar-container" + }, barLeft || this.renderLeft(), barCenter || this.renderCenter(), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("div", { + className: "u-flex-grow" + }, barSearch), barRight || this.renderRight(), !isPublic ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(_Drawer__WEBPACK_IMPORTED_MODULE_18__["default"], { + visible: drawerVisible, + onClose: this.toggleDrawer, + onClaudy: claudyEnabled && function () { + return _this2.toggleClaudy(true); + } || false, + isClaudyLoading: claudyFired, + drawerListener: function drawerListener() { + return onDrawer(drawerVisible); + }, + onLogOut: onLogOut, + isInvertedTheme: isInvertedTheme + }) : null, claudyEnabled && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(_Claudy__WEBPACK_IMPORTED_MODULE_21__["default"], { + claudyFired: claudyFired, + onToggle: function onToggle() { + return _this2.toggleClaudy(false); + }, + opened: claudyOpened + })), userActionRequired && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(_Banner__WEBPACK_IMPORTED_MODULE_17__["default"], userActionRequired)); + } + }]); + + return Bar; +}(react__WEBPACK_IMPORTED_MODULE_9__["Component"]); +Bar.propTypes = { + appName: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.string, + appNamePrefix: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.string, + appSlug: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.string, + iconPath: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.string, + isPublic: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.bool, + isInvertedTheme: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.bool, + onLogOut: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.func, + onDrawer: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.func, + userActionRequired: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.object, + cozyClient: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.object.isRequired, + isDrive: prop_types__WEBPACK_IMPORTED_MODULE_11___default.a.bool.isRequired +}; +var mapStateToProps = function mapStateToProps(state) { + return { + theme: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["getTheme"])(state).name, + themeOverrides: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["getTheme"])(state).overrides, + barLeft: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["getContent"])(state, 'left'), + barRight: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["getContent"])(state, 'right'), + barCenter: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["getContent"])(state, 'center'), + barSearch: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["getContent"])(state, 'search'), + isDrive: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["isCurrentApp"])(state, { + slug: 'drive' + }), + claudyEnabled: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["shouldEnableClaudy"])(state), + hasFetchedApps: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["hasFetched"])(state), + webviewContext: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["getWebviewContext"])(state) + }; +}; +var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + fetchApps: function fetchApps() { + return dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["fetchApps"])()); + }, + fetchContext: function fetchContext() { + return dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["fetchContext"])()); + }, + fetchSettingsData: function fetchSettingsData(displayBusy) { + return dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_22__["fetchSettingsData"])(displayBusy)); + } + }; +}; +/* harmony default export */ __webpack_exports__["default"] = (Object(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_12__["translate"])()(Object(react_redux__WEBPACK_IMPORTED_MODULE_10__["connect"])(mapStateToProps, mapDispatchToProps)(Bar))); + +/***/ }), + /***/ "LK8F": /***/ (function(module, exports, __webpack_require__) { @@ -165714,6 +169806,104 @@ function buildDistanceInWordsLocale () { module.exports = buildDistanceInWordsLocale +/***/ }), + +/***/ "LaBD": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "impureFinalPropsSelectorFactory", function() { return impureFinalPropsSelectorFactory; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pureFinalPropsSelectorFactory", function() { return pureFinalPropsSelectorFactory; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return finalPropsSelectorFactory; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("zLVn"); +/* harmony import */ var _verifySubselectors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("ADDh"); + + +function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) { + return function impureFinalPropsSelector(state, ownProps) { + return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps); + }; +} +function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) { + var areStatesEqual = _ref.areStatesEqual, + areOwnPropsEqual = _ref.areOwnPropsEqual, + areStatePropsEqual = _ref.areStatePropsEqual; + var hasRunAtLeastOnce = false; + var state; + var ownProps; + var stateProps; + var dispatchProps; + var mergedProps; + + function handleFirstCall(firstState, firstOwnProps) { + state = firstState; + ownProps = firstOwnProps; + stateProps = mapStateToProps(state, ownProps); + dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + hasRunAtLeastOnce = true; + return mergedProps; + } + + function handleNewPropsAndNewState() { + stateProps = mapStateToProps(state, ownProps); + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleNewProps() { + if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps); + if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); + mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleNewState() { + var nextStateProps = mapStateToProps(state, ownProps); + var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps); + stateProps = nextStateProps; + if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps); + return mergedProps; + } + + function handleSubsequentCalls(nextState, nextOwnProps) { + var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps); + var stateChanged = !areStatesEqual(nextState, state); + state = nextState; + ownProps = nextOwnProps; + if (propsChanged && stateChanged) return handleNewPropsAndNewState(); + if (propsChanged) return handleNewProps(); + if (stateChanged) return handleNewState(); + return mergedProps; + } + + return function pureFinalPropsSelector(nextState, nextOwnProps) { + return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps); + }; +} // TODO: Add more comments +// If pure is true, the selector returned by selectorFactory will memoize its results, +// allowing connectAdvanced's shouldComponentUpdate to return false if final +// props have not changed. If false, the selector will always return a new +// object and shouldComponentUpdate will always return true. + +function finalPropsSelectorFactory(dispatch, _ref2) { + var initMapStateToProps = _ref2.initMapStateToProps, + initMapDispatchToProps = _ref2.initMapDispatchToProps, + initMergeProps = _ref2.initMergeProps, + options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref2, ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"]); + + var mapStateToProps = initMapStateToProps(dispatch, options); + var mapDispatchToProps = initMapDispatchToProps(dispatch, options); + var mergeProps = initMergeProps(dispatch, options); + + if (false) {} + + var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory; + return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options); +} + /***/ }), /***/ "LcVK": @@ -195264,6 +199454,44 @@ __webpack_require__("7DDg")('Uint8', 1, function (init) { }); +/***/ }), + +/***/ "NQxy": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__("pVnL")); + +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("QILm")); + +var _react = _interopRequireDefault(__webpack_require__("q1tI")); + +var _excluded = ["iconRef"]; // Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/cube.svg` to regenerate; + +function SvgCube(_ref) { + var iconRef = _ref.iconRef, + props = (0, _objectWithoutProperties2.default)(_ref, _excluded); + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props, { + ref: iconRef + }), /*#__PURE__*/_react.default.createElement("path", { + d: "M1 11.009V5.5c0-.55.39-.773.872-.498l5.256 3.003c.476.272.872.944.872 1.495v5.508c0 .549-.39.772-.872.497l-5.256-3.003C1.396 12.231 1 11.56 1 11.01zm15 0c0 .55-.396 1.222-.872 1.494l-5.256 3.003c-.481.275-.872.052-.872-.497V9.5c0-.55.396-1.223.872-1.495l5.256-3.003c.481-.275.872-.052.872.498v5.508zM9.35 6.982c-.47.288-1.237.284-1.7 0l-4.8-2.954c-.47-.29-.463-.732.027-.995L7.623.477c.485-.261 1.264-.264 1.754 0l4.746 2.556c.485.26.49.71.027.995l-4.8 2.954z" + })); +} + +var _default = SvgCube; +exports.default = _default; + /***/ }), /***/ "NRL+": @@ -196387,6 +200615,38 @@ var Cipher = /*#__PURE__*/function (_Domain) { /***/ }), +/***/ "Nh9u": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__("pVnL")); + +var _react = _interopRequireDefault(__webpack_require__("q1tI")); + +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/graph-circle.svg` to regenerate; +function SvgGraphCircle(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + fillRule: "evenodd", + d: "M7 16A7 7 0 017 2v7h7a7 7 0 01-7 7zm2-9V0a7 7 0 017 7H9z" + })); +} + +var _default = SvgGraphCircle; +exports.default = _default; + +/***/ }), + /***/ "Nkvg": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -198052,11 +202312,13 @@ Object.defineProperty(exports, "__esModule", { }); exports.WebviewService = void 0; +var _createClass2 = _interopRequireDefault(__webpack_require__("W8MJ")); + var _classCallCheck2 = _interopRequireDefault(__webpack_require__("lwsE")); var _defineProperty2 = _interopRequireDefault(__webpack_require__("lSNA")); -var WebviewService = function WebviewService(connection) { +var WebviewService = /*#__PURE__*/(0, _createClass2.default)(function WebviewService(connection) { var _this = this; (0, _classCallCheck2.default)(this, WebviewService); @@ -198079,8 +202341,7 @@ var WebviewService = function WebviewService(connection) { this.close = function () { return connection.close(); }; -}; - +}); exports.WebviewService = WebviewService; /***/ }), @@ -198277,6 +202538,102 @@ function fromPairs(pairs) { module.exports = fromPairs; +/***/ }), + +/***/ "O7wn": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.hide = hide; +exports.show = show; +exports.remove = remove; +exports.iframeFromIntent = iframeFromIntent; +exports.insertIntentIframe = insertIntentIframe; +exports.assertOKForIntentIframe = exports.applyStyle = void 0; +var intentClass = 'coz-intent'; + +function hide(node) { + node.style.display = 'none'; +} + +function show(node) { + node.style.display = 'block'; +} + +function remove(node) { + if (!node.parentNode) { + return; + } + + node.parentNode.removeChild(node); +} + +var px = function px(val) { + return val + 'px'; +}; + +var propFmt = { + width: px, + height: px, + maxWidth: px, + maxHeight: px +}; + +var applyStyle = function applyStyle(node, style) { + Object.keys(style).forEach(function (prop) { + var val = style[prop]; + node.style[prop] = "".concat(propFmt[prop] ? propFmt[prop](val) : val); + }); +}; + +exports.applyStyle = applyStyle; + +var assertOKForIntentIframe = function assertOKForIntentIframe(node) { + var document = node.ownerDocument; + + if (!document) { + console.warn('assertProperForIframe: bad node', node); // eslint-disable-line no-console + + throw new Error('Cannot retrieve document object from given node'); + } + + var window = document.defaultView; + + if (!window) { + console.warn('assertProperForIframe: bad document', document); // eslint-disable-line no-console + + throw new Error('Cannot retrieve window object from document'); + } +}; + +exports.assertOKForIntentIframe = assertOKForIntentIframe; + +function iframeFromIntent(intent, node, url) { + var document = node.ownerDocument; + if (!document) throw new Error('Cannot retrieve document object from given node'); + var iframe = document.createElement('iframe'); // TODO: implement 'title' attribute + + iframe.setAttribute('id', "intent-".concat(intent.id)); + iframe.setAttribute('src', url); + iframe.classList.add(intentClass); + return iframe; +} + +function insertIntentIframe(intent, element, url, onload) { + assertOKForIntentIframe(element); + var iframe = iframeFromIntent(intent, element, url); // if callback provided for when iframe is loaded + + if (typeof onload === 'function') iframe.onload = onload; + element.appendChild(iframe); + iframe.focus(); + return iframe; +} + /***/ }), /***/ "O8cK": @@ -202078,6 +206435,34 @@ __webpack_require__.r(__webpack_exports__); }); +/***/ }), + +/***/ "P422": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "default", { + enumerable: true, + get: function get() { + return _intents.default; + } +}); +Object.defineProperty(exports, "Intents", { + enumerable: true, + get: function get() { + return _intents.default; + } +}); + +var _intents = _interopRequireDefault(__webpack_require__("rlYB")); + /***/ }), /***/ "P4MJ": @@ -202805,6 +207190,26 @@ var CipherString = /*#__PURE__*/function () { /***/ }), +/***/ "PFuL": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFetchingQueries", function() { return isFetchingQueries; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cozyClientCanCheckPremium", function() { return cozyClientCanCheckPremium; }); +/* harmony import */ var _lib_stack_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("cePo"); + +var isFetchingQueries = function isFetchingQueries(requests) { + return requests.some(function (request) { + return request.fetchStatus === 'loading'; + }); +}; +var cozyClientCanCheckPremium = function cozyClientCanCheckPremium() { + return Object(_lib_stack_client__WEBPACK_IMPORTED_MODULE_0__["compareClientVersion"])('8.3.0'); +}; + +/***/ }), + /***/ "PFvu": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -203095,6 +207500,25 @@ var Dialog = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](funct name: 'MuiDialog' })(Dialog)); +/***/ }), + +/***/ "PI/G": +/***/ (function(module, exports, __webpack_require__) { + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +if (false) { var throwOnDirectAccess, ReactIs; } else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = __webpack_require__("+dCL")(); +} + + /***/ }), /***/ "PIsB": @@ -206210,6 +210634,59 @@ function shuffler(random) { } +/***/ }), + +/***/ "QLaP": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var invariant = function(condition, format, a, b, c, d, e, f) { + if (false) {} + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +}; + +module.exports = invariant; + + /***/ }), /***/ "QN/F": @@ -206234,6 +210711,82 @@ exports.default = _default; /***/ }), +/***/ "QNwn": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapMapToPropsConstant", function() { return wrapMapToPropsConstant; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDependsOnOwnProps", function() { return getDependsOnOwnProps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapMapToPropsFunc", function() { return wrapMapToPropsFunc; }); +/* harmony import */ var _utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("TfBO"); + +function wrapMapToPropsConstant(getConstant) { + return function initConstantSelector(dispatch, options) { + var constant = getConstant(dispatch, options); + + function constantSelector() { + return constant; + } + + constantSelector.dependsOnOwnProps = false; + return constantSelector; + }; +} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args +// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine +// whether mapToProps needs to be invoked when props have changed. +// +// A length of one signals that mapToProps does not depend on props from the parent component. +// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and +// therefore not reporting its length accurately.. + +function getDependsOnOwnProps(mapToProps) { + return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1; +} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction, +// this function wraps mapToProps in a proxy function which does several things: +// +// * Detects whether the mapToProps function being called depends on props, which +// is used by selectorFactory to decide if it should reinvoke on props changes. +// +// * On first call, handles mapToProps if returns another function, and treats that +// new function as the true mapToProps for subsequent calls. +// +// * On first call, verifies the first result is a plain object, in order to warn +// the developer that their mapToProps function is not returning a valid result. +// + +function wrapMapToPropsFunc(mapToProps, methodName) { + return function initProxySelector(dispatch, _ref) { + var displayName = _ref.displayName; + + var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { + return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch); + }; // allow detectFactoryAndVerify to get ownProps + + + proxy.dependsOnOwnProps = true; + + proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { + proxy.mapToProps = mapToProps; + proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); + var props = proxy(stateOrDispatch, ownProps); + + if (typeof props === 'function') { + proxy.mapToProps = props; + proxy.dependsOnOwnProps = getDependsOnOwnProps(props); + props = proxy(stateOrDispatch, ownProps); + } + + if (false) {} + return props; + }; + + return proxy; + }; +} + +/***/ }), + /***/ "QNwp": /***/ (function(module, exports, __webpack_require__) { @@ -206441,6 +210994,121 @@ __webpack_require__.r(__webpack_exports__); +/***/ }), + +/***/ "QSai": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createConnect", function() { return createConnect; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("wx14"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("zLVn"); +/* harmony import */ var _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("KdTy"); +/* harmony import */ var _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Qzmj"); +/* harmony import */ var _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("neDe"); +/* harmony import */ var _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("vFLY"); +/* harmony import */ var _mergeProps__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("Rt4z"); +/* harmony import */ var _selectorFactory__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("LaBD"); + + + + + + + + +/* + connect is a facade over connectAdvanced. It turns its args into a compatible + selectorFactory, which has the signature: + + (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps + + connect passes its args to connectAdvanced as options, which will in turn pass them to + selectorFactory each time a Connect component instance is instantiated or hot reloaded. + + selectorFactory returns a final props selector from its mapStateToProps, + mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps, + mergePropsFactories, and pure args. + + The resulting final props selector is called by the Connect component instance whenever + it receives new props or store state. + */ + +function match(arg, factories, name) { + for (var i = factories.length - 1; i >= 0; i--) { + var result = factories[i](arg); + if (result) return result; + } + + return function (dispatch, options) { + throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " + options.wrappedComponentName + "."); + }; +} + +function strictEqual(a, b) { + return a === b; +} // createConnect with default args builds the 'official' connect behavior. Calling it with +// different options opens up some testing and extensibility scenarios + + +function createConnect(_temp) { + var _ref = _temp === void 0 ? {} : _temp, + _ref$connectHOC = _ref.connectHOC, + connectHOC = _ref$connectHOC === void 0 ? _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_2__["default"] : _ref$connectHOC, + _ref$mapStateToPropsF = _ref.mapStateToPropsFactories, + mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps__WEBPACK_IMPORTED_MODULE_5__["default"] : _ref$mapStateToPropsF, + _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories, + mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps__WEBPACK_IMPORTED_MODULE_4__["default"] : _ref$mapDispatchToPro, + _ref$mergePropsFactor = _ref.mergePropsFactories, + mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps__WEBPACK_IMPORTED_MODULE_6__["default"] : _ref$mergePropsFactor, + _ref$selectorFactory = _ref.selectorFactory, + selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory__WEBPACK_IMPORTED_MODULE_7__["default"] : _ref$selectorFactory; + + return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) { + if (_ref2 === void 0) { + _ref2 = {}; + } + + var _ref3 = _ref2, + _ref3$pure = _ref3.pure, + pure = _ref3$pure === void 0 ? true : _ref3$pure, + _ref3$areStatesEqual = _ref3.areStatesEqual, + areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual, + _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual, + areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__["default"] : _ref3$areOwnPropsEqua, + _ref3$areStatePropsEq = _ref3.areStatePropsEqual, + areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__["default"] : _ref3$areStatePropsEq, + _ref3$areMergedPropsE = _ref3.areMergedPropsEqual, + areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__["default"] : _ref3$areMergedPropsE, + extraOptions = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref3, ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"]); + + var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps'); + var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps'); + var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps'); + return connectHOC(selectorFactory, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + // used in error messages + methodName: 'connect', + // used to compute Connect's displayName from the wrapped component's displayName. + getDisplayName: function getDisplayName(name) { + return "Connect(" + name + ")"; + }, + // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes + shouldHandleStateChanges: Boolean(mapStateToProps), + // passed through to selectorFactory + initMapStateToProps: initMapStateToProps, + initMapDispatchToProps: initMapDispatchToProps, + initMergeProps: initMergeProps, + pure: pure, + areStatesEqual: areStatesEqual, + areOwnPropsEqual: areOwnPropsEqual, + areStatePropsEqual: areStatePropsEqual, + areMergedPropsEqual: areMergedPropsEqual + }, extraOptions)); + }; +} +/* harmony default export */ __webpack_exports__["default"] = (createConnect()); + /***/ }), /***/ "QSbP": @@ -207777,6 +212445,44 @@ var Field = /*#__PURE__*/function (_Domain) { /***/ }), +/***/ "Qzmj": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return shallowEqual; }); +var hasOwn = Object.prototype.hasOwnProperty; + +function is(x, y) { + if (x === y) { + return x !== 0 || y !== 0 || 1 / x === 1 / y; + } else { + return x !== x && y !== y; + } +} + +function shallowEqual(objA, objB) { + if (is(objA, objB)) return true; + + if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { + return false; + } + + var keysA = Object.keys(objA); + var keysB = Object.keys(objB); + if (keysA.length !== keysB.length) return false; + + for (var i = 0; i < keysA.length; i++) { + if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { + return false; + } + } + + return true; +} + +/***/ }), + /***/ "R/W3": /***/ (function(module, exports, __webpack_require__) { @@ -211770,6 +216476,241 @@ function ordinal (number) { module.exports = buildFormatLocale +/***/ }), + +/***/ "RsHC": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__("pVnL")); + +var _react = _interopRequireDefault(__webpack_require__("q1tI")); + +// Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/cozy-circle.svg` to regenerate; +function SvgCozyCircle(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 20 20" + }, props), /*#__PURE__*/_react.default.createElement("path", { + fillRule: "evenodd", + clipRule: "evenodd", + d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm2 0c0 5.523-4.477 10-10 10S0 15.523 0 10 4.477 0 10 0s10 4.477 10 10zm-8.59 1.206c.134.086.33.046.417-.085a.28.28 0 00-.087-.396c-.116-.073-.125-.223-.125-.223a.296.296 0 00-.3-.282h-.006a.306.306 0 00-.21.087.283.283 0 00-.085.21.895.895 0 00.029.183 1.682 1.682 0 01-2.087.004c.03-.11.03-.189.03-.191a.294.294 0 00-.291-.292.285.285 0 00-.213.076.289.289 0 00-.098.204s-.008.15-.126.225a.282.282 0 00-.085.396.315.315 0 00.442.068l.007-.005c.392.295.874.455 1.375.455a2.29 2.29 0 001.379-.456l.033.022zm.766-5.313c.521.502.845 1.153.932 1.856C14.726 7.892 16 9.236 16 10.869 16 12.594 14.574 14 12.822 14H7.177C5.425 14 4 12.595 4 10.868c0-.823.322-1.601.906-2.19a3.179 3.179 0 011.893-.92c.085-.707.41-1.36.933-1.865A3.18 3.18 0 019.954 5a3.18 3.18 0 012.222.893z" + })); +} + +var _default = SvgCozyCircle; +exports.default = _default; + +/***/ }), + +/***/ "Rt4z": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultMergeProps", function() { return defaultMergeProps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapMergePropsFunc", function() { return wrapMergePropsFunc; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMergePropsIsFunction", function() { return whenMergePropsIsFunction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMergePropsIsOmitted", function() { return whenMergePropsIsOmitted; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("wx14"); +/* harmony import */ var _utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("TfBO"); + + +function defaultMergeProps(stateProps, dispatchProps, ownProps) { + return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, ownProps, stateProps, dispatchProps); +} +function wrapMergePropsFunc(mergeProps) { + return function initMergePropsProxy(dispatch, _ref) { + var displayName = _ref.displayName, + pure = _ref.pure, + areMergedPropsEqual = _ref.areMergedPropsEqual; + var hasRunOnce = false; + var mergedProps; + return function mergePropsProxy(stateProps, dispatchProps, ownProps) { + var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps); + + if (hasRunOnce) { + if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps; + } else { + hasRunOnce = true; + mergedProps = nextMergedProps; + if (false) {} + } + + return mergedProps; + }; + }; +} +function whenMergePropsIsFunction(mergeProps) { + return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined; +} +function whenMergePropsIsOmitted(mergeProps) { + return !mergeProps ? function () { + return defaultMergeProps; + } : undefined; +} +/* harmony default export */ __webpack_exports__["default"] = ([whenMergePropsIsFunction, whenMergePropsIsOmitted]); + +/***/ }), + +/***/ "RuQZ": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("284h"); + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.start = start; + +var _regenerator = _interopRequireDefault(__webpack_require__("o0o1")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("yXPU")); + +var _objectSpread2 = _interopRequireDefault(__webpack_require__("MVZn")); + +var _helpers = __webpack_require__("paaR"); + +var dom = _interopRequireWildcard(__webpack_require__("O7wn")); + +var _listener = _interopRequireDefault(__webpack_require__("qnYc")); + +/** + * Keeps only http://domain:port/ + */ +var extractOrigin = function extractOrigin(url) { + return url.split('/', 3).join('/'); +}; +/** + * Creates the intent iframe and reacts to its messages. + * + * 1. Converts done/error/cancel/exposeFrameRemoval into Promise resolve/reject + * 2. Handles resize to style the DOM element holding the intent + * 3. Handles compose to create a child intent + * 4. Manages the lifecycle of the iframe. It is inserted into the DOM + * at the beginning and removed when the intent has completed. + */ + + +function start(createIntent, intent, element, data) { + var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; + var receiver, iframe; + + var destroy = function destroy() { + iframe && dom.remove(iframe); + receiver && receiver.stopListening(); + }; + + var onComplete = function onComplete() { + destroy(); + }; + + var prom = new Promise(function (resolve, reject) { + var service = (0, _helpers.pickService)(intent, options.filterServices); + iframe = dom.insertIntentIframe(intent, element, service.href, options.onReadyCallback); + var serviceOrigin = extractOrigin(service.href); + receiver = new _listener.default({ + intentId: intent.id, + origin: serviceOrigin, + onReady: function onReady(event) { + event.source.postMessage(data, event.origin); + }, + onDone: function onDone(event) { + resolve(event.data.document); + onComplete(); + }, + onCancel: function onCancel() { + resolve(null); + onComplete(); + }, + onError: function onError(errorOrEvent) { + reject(errorOrEvent instanceof Event ? _helpers.errorSerializer.deserialize(errorOrEvent.data.error) : errorOrEvent); + onComplete(); + }, + onResize: function onResize(event) { + var _event$data = event.data, + transition = _event$data.transition, + dimensions = _event$data.dimensions; + dom.applyStyle(element, (0, _objectSpread2.default)({ + transition: transition + }, dimensions)); + }, + onExposeFrameRemoval: function onExposeFrameRemoval(event) { + resolve({ + document: event.document, + removeIntentIframe: function removeIntentIframe() { + return dom.remove(iframe); + } + }); + }, + onCompose: function () { + var _onCompose = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee(event) { + var _event$data2, action, doctype, data, source, origin, intent, doc; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _event$data2 = event.data, action = _event$data2.action, doctype = _event$data2.doctype, data = _event$data2.data; + source = event.source, origin = event.origin; // Let start to name `type` as `doctype`, as `event.data` already have a `type` attribute. + + _context.next = 4; + return createIntent(action, doctype, data); + + case 4: + intent = _context.sent; + dom.hide(iframe); + _context.prev = 6; + _context.next = 9; + return start(createIntent, intent, element, (0, _objectSpread2.default)({}, data, { + exposeIntentFrameRemoval: false + })); + + case 9: + doc = _context.sent; + source.postMessage(doc, origin); + + case 11: + _context.prev = 11; + dom.show(iframe); + return _context.finish(11); + + case 14: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[6,, 11, 14]]); + })); + + function onCompose(_x) { + return _onCompose.apply(this, arguments); + } + + return onCompose; + }() + }); + receiver.listen(); + }); + prom.destroy = destroy; + return prom; +} + /***/ }), /***/ "RvZ3": @@ -215871,6 +220812,38 @@ $export($export.P + $export.F * !__webpack_require__("LyE8")([].reduceRight, tru }); +/***/ }), + +/***/ "SQLq": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__("pVnL")); + +var _react = _interopRequireDefault(__webpack_require__("q1tI")); + +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/logout.svg` to regenerate; +function SvgLogout(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + fillRule: "evenodd", + d: "M12.586 9H5a1 1 0 110-2h7.586l-1.293-1.293a1 1 0 111.414-1.414l3 3a1 1 0 010 1.414l-3 3a1 1 0 01-1.414-1.414L12.586 9zM0 1a1 1 0 112 0v14a1 1 0 01-2 0V1z" + })); +} + +var _default = SvgLogout; +exports.default = _default; + /***/ }), /***/ "SRfc": @@ -216701,6 +221674,38 @@ exports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){ret exports.typeOf=y; +/***/ }), + +/***/ "Sacj": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__("pVnL")); + +var _react = _interopRequireDefault(__webpack_require__("q1tI")); + +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/globe.svg` to regenerate; +function SvgGlobe(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + fillRule: "evenodd", + d: "M7.889 13.999L7 10 6 9 4 6l-.355-2.128A6 6 0 007.888 14zm.238-11.998L10 3.5V5L8 6.5l-1.5 1 .5 1 3 .5 1 1v1.5l-1.549 2.323A6 6 0 008.127 2.001zM8 16A8 8 0 118 0a8 8 0 010 16z" + })); +} + +var _default = SvgGlobe; +exports.default = _default; + /***/ }), /***/ "Sd7U": @@ -216770,6 +221775,39 @@ var TabIndicator = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"] /***/ }), +/***/ "Se9h": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return warning; }); +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + + + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ + +} + +/***/ }), + /***/ "SezH": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -221354,6 +226392,24 @@ module.exports = function isPrimitive(value) { }; +/***/ }), + +/***/ "TfBO": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return verifyPlainObject; }); +/* harmony import */ var _isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("UXdy"); +/* harmony import */ var _warning__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Se9h"); + + +function verifyPlainObject(value, displayName, methodName) { + if (!Object(_isPlainObject__WEBPACK_IMPORTED_MODULE_0__["default"])(value)) { + Object(_warning__WEBPACK_IMPORTED_MODULE_1__["default"])(methodName + "() in " + displayName + " must return a plain object. Instead received " + value + "."); + } +} + /***/ }), /***/ "TfGn": @@ -221395,6 +226451,84 @@ var getBatch = function getBatch() { /***/ }), +/***/ "Thmn": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTheme", function() { return setTheme; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefaultTheme", function() { return getDefaultTheme; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reducer", function() { return reducer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTheme", function() { return getTheme; }); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("MVZn"); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__); + +var SET_THEME = 'SET_THEME'; +var DEFAULT_THEME = 'default'; +var PRIMARY_THEME = 'primary'; +var THEMES = [DEFAULT_THEME, PRIMARY_THEME]; +var EMPTY_OVERRIDES = {}; // Theme state is { name, overrides } +// where both have the form described in `setTheme` + +var DEFAULT_STATE = { + name: DEFAULT_THEME, + overrides: EMPTY_OVERRIDES +}; +/** + * Change the cozy-bar theme + * + * Today, the value 'primary' will change the background color + * of the bar in the mobile view. It will then use the + * `--primaryColor` CSS variable and the `--primaryContrastTextColor` + * for the text. + * + * @function + * @param {String} name - either 'default' or 'primary' + * @param {Object} overrides - overrides of default values for the theme + * default to an empty object (no overrides) + * It will only overrides the values for the + * 'primary' specific theme/view + * @param {Object} overrides.primaryColor - the background color + * @param {Object} overrides.primaryContrastTextColor - the text color + * @returns {Object} action `{ type: SET_THEME, theme: {name, overrides} } + */ + +var setTheme = function setTheme(name) { + var overrides = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : EMPTY_OVERRIDES; + return { + type: SET_THEME, + theme: { + name: name, + overrides: overrides + } + }; +}; +var getDefaultTheme = function getDefaultTheme() { + return DEFAULT_STATE; +}; +var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getDefaultTheme(); + var action = arguments.length > 1 ? arguments[1] : undefined; + + if (action.type === SET_THEME) { + if (THEMES.includes(action.theme.name)) { + return action.theme; + } + + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, action.theme, { + name: DEFAULT_THEME + }); + } else { + return state; + } +}; // selector + +var getTheme = function getTheme(state) { + return state; +}; + +/***/ }), + /***/ "TisH": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -221618,6 +226752,85 @@ module.exports = _interopRequireDefault, module.exports.__esModule = true, modul /***/ }), +/***/ "TqiU": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createProvider", function() { return createProvider; }); +/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dI71"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("tBST"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _utils_PropTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("xhga"); +/* harmony import */ var _utils_warning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Se9h"); + + + + + +var didWarnAboutReceivingStore = false; + +function warnAboutReceivingStore() { + if (didWarnAboutReceivingStore) { + return; + } + + didWarnAboutReceivingStore = true; + Object(_utils_warning__WEBPACK_IMPORTED_MODULE_4__["default"])('<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reduxjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.'); +} + +function createProvider(storeKey) { + var _Provider$childContex; + + if (storeKey === void 0) { + storeKey = 'store'; + } + + var subscriptionKey = storeKey + "Subscription"; + + var Provider = + /*#__PURE__*/ + function (_Component) { + Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(Provider, _Component); + + var _proto = Provider.prototype; + + _proto.getChildContext = function getChildContext() { + var _ref; + + return _ref = {}, _ref[storeKey] = this[storeKey], _ref[subscriptionKey] = null, _ref; + }; + + function Provider(props, context) { + var _this; + + _this = _Component.call(this, props, context) || this; + _this[storeKey] = props.store; + return _this; + } + + _proto.render = function render() { + return react__WEBPACK_IMPORTED_MODULE_1__["Children"].only(this.props.children); + }; + + return Provider; + }(react__WEBPACK_IMPORTED_MODULE_1__["Component"]); + + if (false) {} + + Provider.propTypes = { + store: _utils_PropTypes__WEBPACK_IMPORTED_MODULE_3__["storeShape"].isRequired, + children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.element.isRequired + }; + Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[storeKey] = _utils_PropTypes__WEBPACK_IMPORTED_MODULE_3__["storeShape"].isRequired, _Provider$childContex[subscriptionKey] = _utils_PropTypes__WEBPACK_IMPORTED_MODULE_3__["subscriptionShape"], _Provider$childContex); + return Provider; +} +/* harmony default export */ __webpack_exports__["default"] = (createProvider()); + +/***/ }), + /***/ "TrhM": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -223521,6 +228734,29 @@ var zipWith = baseRest(function(arrays) { module.exports = zipWith; +/***/ }), + +/***/ "UEdh": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "locations", function() { return locations; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getJsApiName", function() { return getJsApiName; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getReactApiName", function() { return getReactApiName; }); +var locations = ['left', 'center', 'right', 'search']; + +var upperFirstLetter = function upperFirstLetter(val) { + return val[0].toUpperCase() + val.slice(1); +}; + +var getJsApiName = function getJsApiName(location) { + return "setBar".concat(upperFirstLetter(location)); +}; +var getReactApiName = function getReactApiName(location) { + return "Bar".concat(upperFirstLetter(location)); +}; + /***/ }), /***/ "UExd": @@ -228457,6 +233693,31 @@ exports.makeTypography = makeTypography; /***/ }), +/***/ "UXdy": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isPlainObject; }); +/** + * @param {any} obj The object to inspect. + * @returns {boolean} True if the argument appears to be a plain object. + */ +function isPlainObject(obj) { + if (typeof obj !== 'object' || obj === null) return false; + var proto = Object.getPrototypeOf(obj); + if (proto === null) return true; + var baseProto = proto; + + while (Object.getPrototypeOf(baseProto) !== null) { + baseProto = Object.getPrototypeOf(baseProto); + } + + return proto === baseProto; +} + +/***/ }), + /***/ "UXlw": /***/ (function(module, exports, __webpack_require__) { @@ -239402,6 +244663,38 @@ exports.enable = function() { +/***/ }), + +/***/ "VqGu": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__("pVnL")); + +var _react = _interopRequireDefault(__webpack_require__("q1tI")); + +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/email.svg` to regenerate; +function SvgEmail(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + fillRule: "evenodd", + d: "M0 2.999A.998.998 0 011 2h14c.552 0 1 .443 1 .999V5L8 8 0 5V2.999zM0 7l8 3 8-3v7.003c0 .55-.445.997-1 .997H1c-.552 0-1-.453-1-.997V7z" + })); +} + +var _default = SvgEmail; +exports.default = _default; + /***/ }), /***/ "VqT8": @@ -242165,6 +247458,26 @@ const INTEGRATIONS = { //# sourceMappingURL=index.js.map +/***/ }), + +/***/ "WSXs": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + +module.exports = ReactPropTypesSecret; + + /***/ }), /***/ "WXWk": @@ -244297,6 +249610,401 @@ function baseFlatten(array, depth, predicate, isStrict, result) { module.exports = baseFlatten; +/***/ }), + +/***/ "XISK": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Drawer", function() { return Drawer; }); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("o0o1"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("yXPU"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("lwsE"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("W8MJ"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("PJYZ"); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("7W2i"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("a1gu"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("Nsbk"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("lSNA"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("p2W/"); +/* harmony import */ var hammerjs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("yLV6"); +/* harmony import */ var hammerjs__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(hammerjs__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("PI/G"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_12__); +/* harmony import */ var _Apps_AppsContent__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("kYDj"); +/* harmony import */ var _Settings_SettingsContent__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("JlJ5"); +/* harmony import */ var _lib_reducers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("h8u/"); + + + + + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + + + + + +var Drawer = /*#__PURE__*/function (_Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(Drawer, _Component); + + var _super = _createSuper(Drawer); + + function Drawer(props) { + var _this; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, Drawer); + + _this = _super.call(this, props); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), "onDrawerClick", function (event) { + if (event.target === _this.wrapperRef) { + _this.close(); + } + }); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), "onTransitionEnd", function () { + if (_this.props.visible) { + if (!_this.gesturesHandler) _this.attachGestures(); + + _this.preventBackgroundScrolling(); + } else { + _this.restoreBackgroundScrolling(); + + _this.setState({ + isClosing: false + }); + } + + _this.props.drawerListener(); + }); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), "UNSAFE_componentWillReceiveProps", /*#__PURE__*/function () { + var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(nextProps) { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (!(!_this.props.visible && nextProps.visible)) { + _context.next = 3; + break; + } + + _context.next = 3; + return _this.props.fetchSettingsData(); + + case 3: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function (_x) { + return _ref.apply(this, arguments); + }; + }()); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this), "close", function () { + if (_this.state.isClosing) return; + + _this.detachGestures(); + + _this.setState(function () { + return { + isClosing: true + }; + }); + + _this.turnTransitionsOn(); + + _this.props.onClose(); + + _this.asideRef.style.transform = ''; + }); + + _this.state = { + isScrolling: false, + isClosing: false + }; + _this.handleLogout = _this.handleLogout.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this)); + return _this; + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(Drawer, [{ + key: "componentDidMount", + value: function () { + var _componentDidMount = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee2() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + this.turnTransitionsOn(); + + case 1: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function componentDidMount() { + return _componentDidMount.apply(this, arguments); + } + + return componentDidMount; + }() + }, { + key: "turnTransitionsOn", + value: function turnTransitionsOn() { + this.asideRef.classList.add('with-transition'); + this.asideRef.addEventListener('transitionend', this.onTransitionEnd); + } + }, { + key: "turnTransitionsOff", + value: function turnTransitionsOff() { + this.asideRef.classList.remove('with-transition'); + this.asideRef.removeEventListener('transitionend', this.onTransitionEnd); + } + }, { + key: "preventBackgroundScrolling", + value: function preventBackgroundScrolling() { + document.body.style.overflow = 'hidden'; + } + }, { + key: "restoreBackgroundScrolling", + value: function restoreBackgroundScrolling() { + document.body.style.overflow = 'auto'; + } + }, { + key: "detachGestures", + value: function detachGestures() { + this.gesturesHandler.destroy(); + this.gesturesHandler = null; + } + }, { + key: "attachGestures", + value: function attachGestures() { + var _this2 = this; + + // IMPORTANT: on Chrome, the `overflow-y: scroll` property on .coz-drawer--apps prevented + // swipe events to be dispatched correctly ; the `touch-action: pan-y` fixes the problem + // see drawer.css + this.gesturesHandler = new hammerjs__WEBPACK_IMPORTED_MODULE_11___default.a.Manager(document.documentElement, { + // we listen in all directions so that we can catch panup/pandown events and let the user scroll + recognizers: [[hammerjs__WEBPACK_IMPORTED_MODULE_11___default.a.Pan, { + direction: hammerjs__WEBPACK_IMPORTED_MODULE_11___default.a.DIRECTION_ALL + }]] + }); // to be completely accurate, `maximumGestureDelta` should be the difference between the right of the aside and the + // left of the page; but using the width is much easier to compute and accurate enough. + + var maximumGestureDistance = this.asideRef.getBoundingClientRect().width; // between 0 and 1, how far down the gesture must be to be considered complete upon release + + var minimumCloseDistance = 0.4; // a gesture faster than this will dismiss the menu, regardless of distance traveled + + var minimumCloseVelocity = 0.2; + var currentGestureProgress = null; + this.gesturesHandler.on('panstart', function (event) { + if (_this2.state.isClosing) return; + + if (event.additionalEvent === 'panup' || event.additionalEvent === 'pandown') { + _this2.setState({ + isScrolling: true + }); + } else { + _this2.turnTransitionsOff(); + + currentGestureProgress = 0; + } + }); + this.gesturesHandler.on('pan', function (e) { + if (_this2.state.isClosing || _this2.state.isScrolling) return; + currentGestureProgress = -e.deltaX / maximumGestureDistance; + + _this2.applyTransformation(currentGestureProgress); + }); + this.gesturesHandler.on('panend', function (e) { + if (_this2.state.isClosing) return; + + if (_this2.state.isScrolling) { + _this2.setState({ + isScrolling: false + }); + + return; + } // Dismiss the menu if the swipe pan was bigger than the treshold, + // or if it was a fast, leftward gesture + + + var haveTravelledFarEnough = -e.deltaX / maximumGestureDistance >= minimumCloseDistance; + var haveTravelledFastEnough = e.velocity < 0 && Math.abs(e.velocity) >= minimumCloseVelocity; + var shouldDismiss = haveTravelledFarEnough || haveTravelledFastEnough; + + if (shouldDismiss) { + _this2.close(); + } else { + _this2.turnTransitionsOn(); + + _this2.applyTransformation(0); + } + }); + } + }, { + key: "applyTransformation", + value: function applyTransformation(progress) { + // constrain between 0 and 1.1 (go a bit further than 1 to be hidden completely) + progress = Math.min(1.1, Math.max(0, progress)); + this.asideRef.style.transform = 'translateX(-' + progress * 100 + '%)'; + } + }, { + key: "handleLogout", + value: function () { + var _handleLogout = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee3() { + var _this$props, onLogOut, logOut, res; + + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _this$props = this.props, onLogOut = _this$props.onLogOut, logOut = _this$props.logOut; + + if (!(onLogOut && typeof onLogOut === 'function')) { + _context3.next = 6; + break; + } + + res = onLogOut(); + + if (!(res instanceof Promise)) { + _context3.next = 6; + break; + } + + _context3.next = 6; + return res; + + case 6: + logOut(); + + case 7: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function handleLogout() { + return _handleLogout.apply(this, arguments); + } + + return handleLogout; + }() + }, { + key: "render", + value: function render() { + var _this3 = this; + + var _this$props2 = this.props, + onClaudy = _this$props2.onClaudy, + visible = _this$props2.visible, + isClaudyLoading = _this$props2.isClaudyLoading, + settingsAppURL = _this$props2.settingsAppURL, + storageData = _this$props2.storageData, + isInvertedTheme = _this$props2.isInvertedTheme; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("div", { + className: "coz-drawer-wrapper", + onClick: this.onDrawerClick, + "aria-hidden": visible ? 'false' : 'true', + ref: function ref(node) { + _this3.wrapperRef = node; + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("aside", { + ref: function ref(node) { + _this3.asideRef = node; + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("nav", { + className: "coz-drawer--apps" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(_Apps_AppsContent__WEBPACK_IMPORTED_MODULE_13__["default"], { + onAppSwitch: this.close, + isInvertedTheme: isInvertedTheme + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("hr", { + className: "coz-sep-flex" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("nav", { + className: "coz-drawer--settings" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(_Settings_SettingsContent__WEBPACK_IMPORTED_MODULE_14__["default"], { + onLogOut: this.handleLogout, + storageData: storageData, + settingsAppURL: settingsAppURL, + isClaudyLoading: isClaudyLoading, + onClaudy: onClaudy, + isDrawer: true + })))); + } + }]); + + return Drawer; +}(react__WEBPACK_IMPORTED_MODULE_9__["Component"]); + +Drawer.propTypes = { + visible: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.bool, + onClose: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func, + onLogOut: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func, + onClaudy: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func]), + isClaudyLoading: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.bool, + isInvertedTheme: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.bool, + storageData: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.object, + settingsAppURL: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.string, + fetchSettingsData: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func, + logOut: prop_types__WEBPACK_IMPORTED_MODULE_12___default.a.func +}; + + +var mapStateToProps = function mapStateToProps(state) { + return { + storageData: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_15__["getStorageData"])(state), + settingsAppURL: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_15__["getSettingsAppURL"])(state) + }; +}; + +var mapDispatchToProps = function mapDispatchToProps(dispatch) { + return { + fetchSettingsData: function fetchSettingsData() { + return dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_15__["fetchSettingsData"])()); + }, + logOut: function logOut() { + return dispatch(Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_15__["logOut"])()); + } + }; +}; + +/* harmony default export */ __webpack_exports__["default"] = (Object(react_redux__WEBPACK_IMPORTED_MODULE_10__["connect"])(mapStateToProps, mapDispatchToProps)(Drawer)); + /***/ }), /***/ "XJJ9": @@ -244377,6 +250085,13 @@ $export.R = 128; // real proto method for `library` module.exports = $export; +/***/ }), + +/***/ "XM2u": +/***/ (function(module) { + +module.exports = JSON.parse("{\"drawer\":\"Show menu drawer\",\"profile\":\"Profile\",\"plans\":\"Plans\",\"permissions\":\"Permissions\",\"connectedDevices\":\"Connected devices\",\"connections\":\"Connections\",\"storage\":\"Storage\",\"storage_phrase\":\"%{diskUsage} GB of %{diskQuota} GB used\",\"help\":\"FAQ\",\"contact\":\"Contact us\",\"logout\":\"Log out\",\"soon\":\"soon\",\"error_UnavailableStack\":\"The stack is unreachable (connection timed-out).\",\"error_UnauthorizedStack\":\"Some permissions are missing, the application can't access the requested resource on the stack.\",\"no_apps\":\"No applications found on the Cozy.\",\"menu\":{\"apps\":\"Apps\",\"settings\":\"Settings\",\"home_mobile\":\"Back to dashboard...\",\"home\":\"Back to dashboard\",\"home_title\":\"Home\"},\"Categories\":{\"cozy\":\"Cozy apps\",\"partners\":\"Partners apps\",\"ptnb\":\"expPTNB\",\"others\":\"Other apps\"},\"claudy\":{\"title\":\"How to drive your Cozy?\"},\"permsModal\":{\"title\":\"Access your whole Cozy from your application\",\"description\":\"Authorize %{app} to display your Cozy applications on this device\",\"button\":\"Authorize access\"},\"comingSoon\":{\"store\":{\"title\":\"The Store application will be available soon in your Cozy.\",\"description\":\"Thanks to Cozy Store you will be able to install the applications that you want in your Cozy.\"}},\"banner\":{\"tos-updated\":{\"description\":\"To comply with the GDPR, Cozy Cloud has updated its Terms of Services that have taken effect on May 25, 2018\",\"CTA\":\"Read now\"}}}"); + /***/ }), /***/ "XMVh": @@ -245203,6 +250918,31 @@ exports.hasNetworkInformationPlugin = hasNetworkInformationPlugin; /***/ }), +/***/ "XgXo": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return purgeStoredState; }); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1iYv"); + + + + +function purgeStoredState(config) { + var storage = config.storage; + var storageKey = '' + (config.keyPrefix !== undefined ? config.keyPrefix : _constants__WEBPACK_IMPORTED_MODULE_0__["KEY_PREFIX"]) + config.key; + return storage.removeItem(storageKey, warnIfRemoveError); +} + +function warnIfRemoveError(err) { + if (err && "production" !== 'production') { + console.error('redux-persist/purgeStoredState: Error purging data stored state', err); + } +} + +/***/ }), + /***/ "Xh4E": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -251252,6 +256992,308 @@ var TrueKeyCsvImporter = /*#__PURE__*/function (_BaseImporter) { /***/ }), +/***/ "YQzf": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isCurrentApp", function() { return isCurrentApp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getApps", function() { return getApps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHomeApp", function() { return getHomeApp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFetchingApps", function() { return isFetchingApps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasFetched", function() { return hasFetched; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deleteApp", function() { return deleteApp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "receiveApp", function() { return receiveApp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setInfos", function() { return setInfos; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fetchApps", function() { return fetchApps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDefaultApp", function() { return setDefaultApp; }); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("MVZn"); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("o0o1"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("yXPU"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("g4K+"); +/* harmony import */ var lodash_unionwith__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("ZJ9f"); +/* harmony import */ var lodash_unionwith__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_unionwith__WEBPACK_IMPORTED_MODULE_4__); + + + + + // constants + +var DELETE_APP = 'DELETE_APP'; +var RECEIVE_APP = 'RECEIVE_APP'; +var RECEIVE_APP_LIST = 'RECEIVE_APP_LIST'; +var RECEIVE_HOME_APP = 'RECEIVE_HOME_APP'; +var FETCH_APPS = 'FETCH_APPS'; +var FETCH_APPS_FAILURE = 'FETCH_APPS_FAILURE'; +var SET_INFOS = 'SET_INFOS'; +var isCurrentApp = function isCurrentApp(state, app) { + return app.slug === state.appSlug; +}; // selectors + +var getApps = function getApps(state) { + if (!state.apps) return []; + return state.apps; +}; +var getHomeApp = function getHomeApp(state) { + return state.homeApp; +}; +var isFetchingApps = function isFetchingApps(state) { + return state ? state.isFetching : false; +}; +var hasFetched = function hasFetched(state) { + return state.hasFetched; +}; // actions + +var deleteApp = function deleteApp(app) { + return { + type: DELETE_APP, + app: app + }; +}; +var receiveApp = function receiveApp(app) { + return { + type: RECEIVE_APP, + app: app + }; +}; + +var receiveAppList = function receiveAppList(apps) { + return { + type: RECEIVE_APP_LIST, + apps: apps + }; +}; + +var receiveHomeApp = function receiveHomeApp(homeApp) { + return { + type: RECEIVE_HOME_APP, + homeApp: homeApp + }; +}; + +var setInfos = function setInfos(appName, appNamePrefix, appSlug) { + return { + type: SET_INFOS, + appName: appName, + appNamePrefix: appNamePrefix, + appSlug: appSlug + }; +}; // actions async + +var fetchApps = function fetchApps() { + return /*#__PURE__*/function () { + var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(dispatch) { + var rawAppList, apps; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.prev = 0; + dispatch({ + type: FETCH_APPS + }); + _context.next = 4; + return _stack__WEBPACK_IMPORTED_MODULE_3__["default"].get.apps(); + + case 4: + rawAppList = _context.sent; + apps = rawAppList.map(mapApp); + + if (rawAppList.length) { + _context.next = 8; + break; + } + + throw new Error('No installed apps found by the bar'); + + case 8: + _context.next = 10; + return dispatch(setDefaultApp(apps)); + + case 10: + _context.next = 12; + return dispatch(receiveAppList(apps)); + + case 12: + _context.next = 18; + break; + + case 14: + _context.prev = 14; + _context.t0 = _context["catch"](0); + dispatch({ + type: FETCH_APPS_FAILURE + }); // eslint-disable-next-line no-console + + console.warn(_context.t0.message ? _context.t0.message : _context.t0); + + case 18: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[0, 14]]); + })); + + return function (_x) { + return _ref.apply(this, arguments); + }; + }(); +}; +/** + * + * @param {Array} appsList + */ + +var setDefaultApp = function setDefaultApp(appsList) { + return /*#__PURE__*/function () { + var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee2(dispatch) { + var HOME_APP_SLUG, homeApp; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.prev = 0; + HOME_APP_SLUG = 'home'; + homeApp = findAppInArray(HOME_APP_SLUG, appsList); + + if (!homeApp) { + _context2.next = 5; + break; + } + + return _context2.abrupt("return", dispatch(receiveHomeApp(homeApp))); + + case 5: + _context2.next = 10; + break; + + case 7: + _context2.prev = 7; + _context2.t0 = _context2["catch"](0); + // eslint-disable-next-line no-console + console.warn("Cozy-bar cannot fetch home app data: ".concat(_context2.t0.message)); + + case 10: + case "end": + return _context2.stop(); + } + } + }, _callee2, null, [[0, 7]]); + })); + + return function (_x2) { + return _ref2.apply(this, arguments); + }; + }(); +}; // reducers + +var defaultState = { + apps: [], + homeApp: null, + isFetching: true, + appName: null, + appNamePrefix: null, + appSlug: null, + hasFetched: false +}; + +var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState; + var action = arguments.length > 1 ? arguments[1] : undefined; + + switch (action.type) { + case FETCH_APPS: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + isFetching: true + }); + + case FETCH_APPS_FAILURE: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + isFetching: false + }); + + case RECEIVE_APP: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + apps: lodash_unionwith__WEBPACK_IMPORTED_MODULE_4___default()(state.apps, [mapApp(action.app)], function (appA, appB) { + return appA.slug === appB.slug; + }) + }); + + case RECEIVE_APP_LIST: + { + var appsList = action.apps.map(function (app) { + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, app, { + isCurrentApp: isCurrentApp(state, app) + }); + }); + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + isFetching: false, + hasFetched: true, + apps: appsList + }); + } + + case RECEIVE_HOME_APP: + { + var homeApp = action.homeApp; + return isCurrentApp(state, homeApp) ? _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + homeApp: _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, homeApp, { + isCurrentApp: true + }) + }) : _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + homeApp: homeApp + }); + } + + case DELETE_APP: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + apps: state.apps.filter(function (app) { + return app.slug !== action.app.slug; + }) + }); + + case SET_INFOS: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + appName: action.appName, + appNamePrefix: action.appNamePrefix, + appSlug: action.appSlug + }); + + default: + return state; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (reducer); // helpers + +var camelCasify = function camelCasify(object) { + return !!object && Object.keys(object).reduce(function (acc, key) { + var camelCaseKey = key.split('_').map(function (segment, index) { + return index ? segment.charAt(0).toUpperCase() + segment.slice(1) : segment; + }).join(''); + acc[camelCaseKey] = object[key]; + return acc; + }, {}); +}; + +var mapApp = function mapApp(app) { + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, app, camelCasify(app.attributes), { + href: app.links && app.links.related + }); +}; + +var findAppInArray = function findAppInArray(appSlug, apps) { + return apps.find(function (app) { + return app.slug === appSlug; + }); +}; + +/***/ }), + /***/ "YRY+": /***/ (function(module, exports, __webpack_require__) { @@ -255125,533 +261167,1750 @@ var SentryError = /** @class */ (function (_super) { /***/ }), -/***/ "ZKDM": -/***/ (function(module, exports) { - -function declensionGroup (scheme, count) { - if (count === 1) { - return scheme.one - } - - if (count >= 2 && count <= 4) { - return scheme.twoFour - } +/***/ "ZJ9f": +/***/ (function(module, exports, __webpack_require__) { - // if count === null || count === 0 || count >= 5 - return scheme.other -} +/* WEBPACK VAR INJECTION */(function(global) {/** + * lodash (Custom Build) <https://lodash.com/> + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors <https://jquery.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ -function declension (scheme, count, time) { - var group = declensionGroup(scheme, count) - var finalText = group[time] || group - return finalText.replace('{{count}}', count) -} +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; -function extractPreposition (token) { - var result = ['lessThan', 'about', 'over', 'almost'].filter(function (preposition) { - return !!token.match(new RegExp('^' + preposition)) - }) +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; - return result[0] -} +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991; -function prefixPreposition (preposition) { - var translation = '' +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; - if (preposition === 'almost') { - translation = 'skoro' - } +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - if (preposition === 'about') { - translation = 'přibližně' - } +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; - return translation.length > 0 ? translation + ' ' : '' -} +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; -function suffixPreposition (preposition) { - var translation = '' +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - if (preposition === 'lessThan') { - translation = 'méně než' - } +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); - if (preposition === 'over') { - translation = 'více než' +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); } - - return translation.length > 0 ? translation + ' ' : '' + return func.apply(thisArg, args); } -function lowercaseFirstLetter (string) { - return string.charAt(0).toLowerCase() + string.slice(1) +/** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludes(array, value) { + var length = array ? array.length : 0; + return !!length && baseIndexOf(array, value, 0) > -1; } -function buildDistanceInWordsLocale () { - var distanceInWordsLocale = { - xSeconds: { - one: { - regular: 'vteřina', - past: 'vteřinou', - future: 'vteřinu' - }, - twoFour: { - regular: '{{count}} vteřiny', - past: '{{count}} vteřinami', - future: '{{count}} vteřiny' - }, - other: { - regular: '{{count}} vteřin', - past: '{{count}} vteřinami', - future: '{{count}} vteřin' - } - }, - - halfAMinute: { - other: { - regular: 'půl minuty', - past: 'půl minutou', - future: 'půl minuty' - } - }, +/** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ +function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array ? array.length : 0; - xMinutes: { - one: { - regular: 'minuta', - past: 'minutou', - future: 'minutu' - }, - twoFour: { - regular: '{{count}} minuty', - past: '{{count}} minutami', - future: '{{count}} minuty' - }, - other: { - regular: '{{count}} minut', - past: '{{count}} minutami', - future: '{{count}} minut' - } - }, + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; +} - xHours: { - one: { - regular: 'hodina', - past: 'hodinou', - future: 'hodinu' - }, - twoFour: { - regular: '{{count}} hodiny', - past: '{{count}} hodinami', - future: '{{count}} hodiny' - }, - other: { - regular: '{{count}} hodin', - past: '{{count}} hodinami', - future: '{{count}} hodin' - } - }, +/** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ +function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; - xDays: { - one: { - regular: 'den', - past: 'dnem', - future: 'den' - }, - twoFour: { - regular: '{{count}} dni', - past: '{{count}} dny', - future: '{{count}} dni' - }, - other: { - regular: '{{count}} dní', - past: '{{count}} dny', - future: '{{count}} dní' - } - }, + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} - xMonths: { - one: { - regular: 'měsíc', - past: 'měsícem', - future: 'měsíc' - }, - twoFour: { - regular: '{{count}} měsíce', - past: '{{count}} měsíci', - future: '{{count}} měsíce' - }, - other: { - regular: '{{count}} měsíců', - past: '{{count}} měsíci', - future: '{{count}} měsíců' - } - }, +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); - xYears: { - one: { - regular: 'rok', - past: 'rokem', - future: 'rok' - }, - twoFour: { - regular: '{{count}} roky', - past: '{{count}} roky', - future: '{{count}} roky' - }, - other: { - regular: '{{count}} roků', - past: '{{count}} roky', - future: '{{count}} roků' - } + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; } } + return -1; +} - function localize (token, count, options) { - options = options || {} - - var preposition = extractPreposition(token) || '' - var key = lowercaseFirstLetter(token.substring(preposition.length)) - var scheme = distanceInWordsLocale[key] - - if (!options.addSuffix) { - return prefixPreposition(preposition) + suffixPreposition(preposition) + declension(scheme, count, 'regular') - } +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return baseFindIndex(array, baseIsNaN, fromIndex); + } + var index = fromIndex - 1, + length = array.length; - if (options.comparison > 0) { - return prefixPreposition(preposition) + 'za ' + suffixPreposition(preposition) + declension(scheme, count, 'future') - } else { - return prefixPreposition(preposition) + 'před ' + suffixPreposition(preposition) + declension(scheme, count, 'past') + while (++index < length) { + if (array[index] === value) { + return index; } } + return -1; +} - return { - localize: localize - } +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; } -module.exports = buildDistanceInWordsLocale +/** + * Checks if a cache value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} -/***/ }), +/** + * Checks if `value` is a host object in IE < 9. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + */ +function isHostObject(value) { + // Many host objects are `Object` objects that can coerce to strings + // despite having improperly defined `toString` methods. + var result = false; + if (value != null && typeof value.toString != 'function') { + try { + result = !!(value + ''); + } catch (e) {} + } + return result; +} -/***/ "ZLCw": -/***/ (function(module, exports, __webpack_require__) { +/** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ +function setToArray(set) { + var index = -1, + result = Array(set.size); -"use strict"; + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; -var GetIntrinsic = __webpack_require__("AM7I"); +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; -var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); -var hasPropertyDescriptors = function hasPropertyDescriptors() { - if ($defineProperty) { - try { - $defineProperty({}, 'a', { value: 1 }); - return true; - } catch (e) { - // IE 8 has a broken defineProperty - return false; - } - } - return false; -}; +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; -hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { - // node v0.6 has a bug where array lengths can be Set but not Defined - if (!hasPropertyDescriptors()) { - return null; - } - try { - return $defineProperty([], 'length', { value: 1 }).length !== 1; - } catch (e) { - // In Firefox 4-22, defining length on an array throws an exception. - return true; - } -}; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; -module.exports = hasPropertyDescriptors; +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var objectToString = objectProto.toString; +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); -/***/ }), +/** Built-in value references. */ +var Symbol = root.Symbol, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; -/***/ "ZOqE": -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); -/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("wx14"); -/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Ff2n"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("q1tI"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("17x9"); -/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("iuhU"); -/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("5UwM"); -/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("KgOg"); -/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("b7D3"); -/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("zWP6"); -/* harmony import */ var _internal_SwitchBase__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("ktyL"); +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + Set = getNative(root, 'Set'), + nativeCreate = getNative(Object, 'create'); +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; -// @inheritedComponent IconButton + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; +} +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); +} +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} -var styles = function styles(theme) { - return { - /* Styles applied to the root element. */ - root: { - display: 'inline-flex', - width: 34 + 12 * 2, - height: 14 + 12 * 2, - overflow: 'hidden', - padding: 12, - boxSizing: 'border-box', - position: 'relative', - flexShrink: 0, - zIndex: 0, - // Reset the stacking context. - verticalAlign: 'middle', - // For correct alignment with the text. - '@media print': { - colorAdjust: 'exact' - } - }, +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} - /* Styles applied to the root element if `edge="start"`. */ - edgeStart: { - marginLeft: -8 - }, +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); - /* Styles applied to the root element if `edge="end"`. */ - edgeEnd: { - marginRight: -8 - }, + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; +} - /* Styles applied to the internal `SwitchBase` component's `root` class. */ - switchBase: { - position: 'absolute', - top: 0, - left: 0, - zIndex: 1, - // Render above the focus ripple. - color: theme.palette.type === 'light' ? theme.palette.grey[50] : theme.palette.grey[400], - transition: theme.transitions.create(['left', 'transform'], { - duration: theme.transitions.duration.shortest - }), - '&$checked': { - transform: 'translateX(20px)' - }, - '&$disabled': { - color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800] - }, - '&$checked + $track': { - opacity: 0.5 - }, - '&$disabled + $track': { - opacity: theme.palette.type === 'light' ? 0.12 : 0.1 - } - }, +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); - /* Styles applied to the internal SwitchBase component's root element if `color="primary"`. */ - colorPrimary: { - '&$checked': { - color: theme.palette.primary.main, - '&:hover': { - backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.primary.main, theme.palette.action.hoverOpacity), - '@media (hover: none)': { - backgroundColor: 'transparent' - } - } - }, - '&$disabled': { - color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800] - }, - '&$checked + $track': { - backgroundColor: theme.palette.primary.main - }, - '&$disabled + $track': { - backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white - } - }, + return index < 0 ? undefined : data[index][1]; +} - /* Styles applied to the internal SwitchBase component's root element if `color="secondary"`. */ - colorSecondary: { - '&$checked': { - color: theme.palette.secondary.main, - '&:hover': { - backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.secondary.main, theme.palette.action.hoverOpacity), - '@media (hover: none)': { - backgroundColor: 'transparent' - } - } - }, - '&$disabled': { - color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800] - }, - '&$checked + $track': { - backgroundColor: theme.palette.secondary.main - }, - '&$disabled + $track': { - backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white - } - }, +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} - /* Styles applied to the root element if `size="small"`. */ - sizeSmall: { - width: 40, - height: 24, - padding: 7, - '& $thumb': { - width: 16, - height: 16 - }, - '& $switchBase': { - padding: 4, - '&$checked': { - transform: 'translateX(16px)' - } - } - }, +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); - /* Pseudo-class applied to the internal `SwitchBase` component's `checked` class. */ - checked: {}, + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} - /* Pseudo-class applied to the internal SwitchBase component's disabled class. */ - disabled: {}, +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; - /* Styles applied to the internal SwitchBase component's input element. */ - input: { - left: '-100%', - width: '300%' - }, +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries ? entries.length : 0; - /* Styles used to create the thumb passed to the internal `SwitchBase` component `icon` prop. */ - thumb: { - boxShadow: theme.shadows[1], - backgroundColor: 'currentColor', - width: 20, - height: 20, - borderRadius: '50%' - }, + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} - /* Styles applied to the track element. */ - track: { - height: '100%', - width: '100%', - borderRadius: 14 / 2, - zIndex: -1, - transition: theme.transitions.create(['opacity', 'background-color'], { - duration: theme.transitions.duration.shortest - }), - backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white, - opacity: theme.palette.type === 'light' ? 0.38 : 0.3 - } +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash }; -}; -var Switch = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Switch(props, ref) { - var classes = props.classes, - className = props.className, - _props$color = props.color, - color = _props$color === void 0 ? 'secondary' : _props$color, - _props$edge = props.edge, - edge = _props$edge === void 0 ? false : _props$edge, - _props$size = props.size, - size = _props$size === void 0 ? 'medium' : _props$size, - other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "color", "edge", "size"]); - - var icon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { - className: classes.thumb - }); - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { - className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, { - 'start': classes.edgeStart, - 'end': classes.edgeEnd - }[edge], size === "small" && classes["size".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(size))]) - }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_internal_SwitchBase__WEBPACK_IMPORTED_MODULE_9__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ - type: "checkbox", - icon: icon, - checkedIcon: icon, - classes: { - root: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.switchBase, classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(color))]), - input: classes.input, - checked: classes.checked, - disabled: classes.disabled - }, - ref: ref - }, other)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { - className: classes.track - })); -}); - false ? undefined : void 0; -/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { - name: 'MuiSwitch' -})(Switch)); +} -/***/ }), +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} -/***/ "ZQwz": -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("83xM"); -/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2K37"); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("CYYh"); +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values ? values.length : 0; -function arcInnerRadius(d) { - return d.innerRadius; + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } } -function arcOuterRadius(d) { - return d.outerRadius; +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; } -function arcStartAngle(d) { - return d.startAngle; +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); } -function arcEndAngle(d) { - return d.endAngle; +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; } -function arcPadAngle(d) { - return d && d.padAngle; // Note: optional! +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; + + predicate || (predicate = isFlattenable); + result || (result = []); + + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; } -function intersect(x0, y0, x1, y1, x2, y2, x3, y3) { - var x10 = x1 - x0, y10 = y1 - y0, - x32 = x3 - x2, y32 = y3 - y2, - t = y32 * x10 - x32 * y10; - if (t * t < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) return; - t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t; - return [x0 + t * x10, y0 + t * y10]; +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); } -// Compute perpendicular offset line of length rc. -// http://mathworld.wolfram.com/Circle-LineIntersection.html -function cornerTangents(x0, y0, x1, y1, r1, rc, cw) { - var x01 = x0 - x1, - y01 = y0 - y1, - lo = (cw ? rc : -rc) / Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(x01 * x01 + y01 * y01), - ox = lo * y01, - oy = -lo * x01, - x11 = x0 + ox, - y11 = y0 + oy, - x10 = x1 + ox, - y10 = y1 + oy, - x00 = (x11 + x10) / 2, - y00 = (y11 + y10) / 2, +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; +} + +/** + * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ +function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} + +/** + * Creates a set object of `values`. + * + * @private + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. + */ +var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); +}; + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to process. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array ? array.length : 0; + return length ? array[length - 1] : undefined; +} + +/** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ +var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); +}); + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); +} + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +module.exports = unionWith; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("yLpj"))) + +/***/ }), + +/***/ "ZKDM": +/***/ (function(module, exports) { + +function declensionGroup (scheme, count) { + if (count === 1) { + return scheme.one + } + + if (count >= 2 && count <= 4) { + return scheme.twoFour + } + + // if count === null || count === 0 || count >= 5 + return scheme.other +} + +function declension (scheme, count, time) { + var group = declensionGroup(scheme, count) + var finalText = group[time] || group + return finalText.replace('{{count}}', count) +} + +function extractPreposition (token) { + var result = ['lessThan', 'about', 'over', 'almost'].filter(function (preposition) { + return !!token.match(new RegExp('^' + preposition)) + }) + + return result[0] +} + +function prefixPreposition (preposition) { + var translation = '' + + if (preposition === 'almost') { + translation = 'skoro' + } + + if (preposition === 'about') { + translation = 'přibližně' + } + + return translation.length > 0 ? translation + ' ' : '' +} + +function suffixPreposition (preposition) { + var translation = '' + + if (preposition === 'lessThan') { + translation = 'méně než' + } + + if (preposition === 'over') { + translation = 'více než' + } + + return translation.length > 0 ? translation + ' ' : '' +} + +function lowercaseFirstLetter (string) { + return string.charAt(0).toLowerCase() + string.slice(1) +} + +function buildDistanceInWordsLocale () { + var distanceInWordsLocale = { + xSeconds: { + one: { + regular: 'vteřina', + past: 'vteřinou', + future: 'vteřinu' + }, + twoFour: { + regular: '{{count}} vteřiny', + past: '{{count}} vteřinami', + future: '{{count}} vteřiny' + }, + other: { + regular: '{{count}} vteřin', + past: '{{count}} vteřinami', + future: '{{count}} vteřin' + } + }, + + halfAMinute: { + other: { + regular: 'půl minuty', + past: 'půl minutou', + future: 'půl minuty' + } + }, + + xMinutes: { + one: { + regular: 'minuta', + past: 'minutou', + future: 'minutu' + }, + twoFour: { + regular: '{{count}} minuty', + past: '{{count}} minutami', + future: '{{count}} minuty' + }, + other: { + regular: '{{count}} minut', + past: '{{count}} minutami', + future: '{{count}} minut' + } + }, + + xHours: { + one: { + regular: 'hodina', + past: 'hodinou', + future: 'hodinu' + }, + twoFour: { + regular: '{{count}} hodiny', + past: '{{count}} hodinami', + future: '{{count}} hodiny' + }, + other: { + regular: '{{count}} hodin', + past: '{{count}} hodinami', + future: '{{count}} hodin' + } + }, + + xDays: { + one: { + regular: 'den', + past: 'dnem', + future: 'den' + }, + twoFour: { + regular: '{{count}} dni', + past: '{{count}} dny', + future: '{{count}} dni' + }, + other: { + regular: '{{count}} dní', + past: '{{count}} dny', + future: '{{count}} dní' + } + }, + + xMonths: { + one: { + regular: 'měsíc', + past: 'měsícem', + future: 'měsíc' + }, + twoFour: { + regular: '{{count}} měsíce', + past: '{{count}} měsíci', + future: '{{count}} měsíce' + }, + other: { + regular: '{{count}} měsíců', + past: '{{count}} měsíci', + future: '{{count}} měsíců' + } + }, + + xYears: { + one: { + regular: 'rok', + past: 'rokem', + future: 'rok' + }, + twoFour: { + regular: '{{count}} roky', + past: '{{count}} roky', + future: '{{count}} roky' + }, + other: { + regular: '{{count}} roků', + past: '{{count}} roky', + future: '{{count}} roků' + } + } + } + + function localize (token, count, options) { + options = options || {} + + var preposition = extractPreposition(token) || '' + var key = lowercaseFirstLetter(token.substring(preposition.length)) + var scheme = distanceInWordsLocale[key] + + if (!options.addSuffix) { + return prefixPreposition(preposition) + suffixPreposition(preposition) + declension(scheme, count, 'regular') + } + + if (options.comparison > 0) { + return prefixPreposition(preposition) + 'za ' + suffixPreposition(preposition) + declension(scheme, count, 'future') + } else { + return prefixPreposition(preposition) + 'před ' + suffixPreposition(preposition) + declension(scheme, count, 'past') + } + } + + return { + localize: localize + } +} + +module.exports = buildDistanceInWordsLocale + + +/***/ }), + +/***/ "ZLCw": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__("AM7I"); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + return true; + } catch (e) { + // IE 8 has a broken defineProperty + return false; + } + } + return false; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!hasPropertyDescriptors()) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; + + +/***/ }), + +/***/ "ZOqE": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("wx14"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Ff2n"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("17x9"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("iuhU"); +/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("5UwM"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("KgOg"); +/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("b7D3"); +/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("zWP6"); +/* harmony import */ var _internal_SwitchBase__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("ktyL"); + + +// @inheritedComponent IconButton + + + + + + + + +var styles = function styles(theme) { + return { + /* Styles applied to the root element. */ + root: { + display: 'inline-flex', + width: 34 + 12 * 2, + height: 14 + 12 * 2, + overflow: 'hidden', + padding: 12, + boxSizing: 'border-box', + position: 'relative', + flexShrink: 0, + zIndex: 0, + // Reset the stacking context. + verticalAlign: 'middle', + // For correct alignment with the text. + '@media print': { + colorAdjust: 'exact' + } + }, + + /* Styles applied to the root element if `edge="start"`. */ + edgeStart: { + marginLeft: -8 + }, + + /* Styles applied to the root element if `edge="end"`. */ + edgeEnd: { + marginRight: -8 + }, + + /* Styles applied to the internal `SwitchBase` component's `root` class. */ + switchBase: { + position: 'absolute', + top: 0, + left: 0, + zIndex: 1, + // Render above the focus ripple. + color: theme.palette.type === 'light' ? theme.palette.grey[50] : theme.palette.grey[400], + transition: theme.transitions.create(['left', 'transform'], { + duration: theme.transitions.duration.shortest + }), + '&$checked': { + transform: 'translateX(20px)' + }, + '&$disabled': { + color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800] + }, + '&$checked + $track': { + opacity: 0.5 + }, + '&$disabled + $track': { + opacity: theme.palette.type === 'light' ? 0.12 : 0.1 + } + }, + + /* Styles applied to the internal SwitchBase component's root element if `color="primary"`. */ + colorPrimary: { + '&$checked': { + color: theme.palette.primary.main, + '&:hover': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.primary.main, theme.palette.action.hoverOpacity), + '@media (hover: none)': { + backgroundColor: 'transparent' + } + } + }, + '&$disabled': { + color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800] + }, + '&$checked + $track': { + backgroundColor: theme.palette.primary.main + }, + '&$disabled + $track': { + backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white + } + }, + + /* Styles applied to the internal SwitchBase component's root element if `color="secondary"`. */ + colorSecondary: { + '&$checked': { + color: theme.palette.secondary.main, + '&:hover': { + backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__["alpha"])(theme.palette.secondary.main, theme.palette.action.hoverOpacity), + '@media (hover: none)': { + backgroundColor: 'transparent' + } + } + }, + '&$disabled': { + color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800] + }, + '&$checked + $track': { + backgroundColor: theme.palette.secondary.main + }, + '&$disabled + $track': { + backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white + } + }, + + /* Styles applied to the root element if `size="small"`. */ + sizeSmall: { + width: 40, + height: 24, + padding: 7, + '& $thumb': { + width: 16, + height: 16 + }, + '& $switchBase': { + padding: 4, + '&$checked': { + transform: 'translateX(16px)' + } + } + }, + + /* Pseudo-class applied to the internal `SwitchBase` component's `checked` class. */ + checked: {}, + + /* Pseudo-class applied to the internal SwitchBase component's disabled class. */ + disabled: {}, + + /* Styles applied to the internal SwitchBase component's input element. */ + input: { + left: '-100%', + width: '300%' + }, + + /* Styles used to create the thumb passed to the internal `SwitchBase` component `icon` prop. */ + thumb: { + boxShadow: theme.shadows[1], + backgroundColor: 'currentColor', + width: 20, + height: 20, + borderRadius: '50%' + }, + + /* Styles applied to the track element. */ + track: { + height: '100%', + width: '100%', + borderRadius: 14 / 2, + zIndex: -1, + transition: theme.transitions.create(['opacity', 'background-color'], { + duration: theme.transitions.duration.shortest + }), + backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white, + opacity: theme.palette.type === 'light' ? 0.38 : 0.3 + } + }; +}; +var Switch = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](function Switch(props, ref) { + var classes = props.classes, + className = props.className, + _props$color = props.color, + color = _props$color === void 0 ? 'secondary' : _props$color, + _props$edge = props.edge, + edge = _props$edge === void 0 ? false : _props$edge, + _props$size = props.size, + size = _props$size === void 0 ? 'medium' : _props$size, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["classes", "className", "color", "edge", "size"]); + + var icon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + className: classes.thumb + }); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.root, className, { + 'start': classes.edgeStart, + 'end': classes.edgeEnd + }[edge], size === "small" && classes["size".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(size))]) + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_internal_SwitchBase__WEBPACK_IMPORTED_MODULE_9__["default"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + type: "checkbox", + icon: icon, + checkedIcon: icon, + classes: { + root: Object(clsx__WEBPACK_IMPORTED_MODULE_4__["default"])(classes.switchBase, classes["color".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__["default"])(color))]), + input: classes.input, + checked: classes.checked, + disabled: classes.disabled + }, + ref: ref + }, other)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { + className: classes.track + })); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__["default"])(styles, { + name: 'MuiSwitch' +})(Switch)); + +/***/ }), + +/***/ "ZQwz": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("83xM"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2K37"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("CYYh"); + + + + +function arcInnerRadius(d) { + return d.innerRadius; +} + +function arcOuterRadius(d) { + return d.outerRadius; +} + +function arcStartAngle(d) { + return d.startAngle; +} + +function arcEndAngle(d) { + return d.endAngle; +} + +function arcPadAngle(d) { + return d && d.padAngle; // Note: optional! +} + +function intersect(x0, y0, x1, y1, x2, y2, x3, y3) { + var x10 = x1 - x0, y10 = y1 - y0, + x32 = x3 - x2, y32 = y3 - y2, + t = y32 * x10 - x32 * y10; + if (t * t < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) return; + t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t; + return [x0 + t * x10, y0 + t * y10]; +} + +// Compute perpendicular offset line of length rc. +// http://mathworld.wolfram.com/Circle-LineIntersection.html +function cornerTangents(x0, y0, x1, y1, r1, rc, cw) { + var x01 = x0 - x1, + y01 = y0 - y1, + lo = (cw ? rc : -rc) / Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(x01 * x01 + y01 * y01), + ox = lo * y01, + oy = -lo * x01, + x11 = x0 + ox, + y11 = y0 + oy, + x10 = x1 + ox, + y10 = y1 + oy, + x00 = (x11 + x10) / 2, + y00 = (y11 + y10) / 2, dx = x10 - x11, dy = y10 - y11, d2 = dx * dx + dy * dy, @@ -260965,6 +268224,184 @@ module.exports = function bind(that) { }; +/***/ }), + +/***/ "aJbG": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppItem", function() { return AppItem; }); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pVnL"); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("lwsE"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("W8MJ"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("PJYZ"); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("7W2i"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("a1gu"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("Nsbk"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("lSNA"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("mwIZ"); +/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("PI/G"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var cozy_client__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("SH7X"); +/* harmony import */ var cozy_client__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(cozy_client__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var cozy_ui_transpiled_react_AppIcon__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("rvOC"); +/* harmony import */ var cozy_ui_transpiled_react_AppIcon__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_AppIcon__WEBPACK_IMPORTED_MODULE_12__); +/* harmony import */ var cozy_ui_transpiled_react_AppLinker__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("sCMN"); +/* harmony import */ var cozy_ui_transpiled_react_AppLinker__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_AppLinker__WEBPACK_IMPORTED_MODULE_13__); +/* harmony import */ var _IconCozyHome__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("h/bp"); +/* harmony import */ var _proptypes__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("amV4"); +/* harmony import */ var _lib_stack__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("g4K+"); + + + + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + + + + + + +var getAppDisplayName = lodash_get__WEBPACK_IMPORTED_MODULE_9___default()(cozy_client__WEBPACK_IMPORTED_MODULE_11__["models"], 'applications.getAppDisplayName', function (app) { + return app.namePrefix && app.namePrefix.toLowerCase() !== 'cozy' ? "".concat(app.namePrefix, " ").concat(app.name) : app.name; +}); +var AppItem = /*#__PURE__*/function (_React$Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(AppItem, _React$Component); + + var _super = _createSuper(AppItem); + + /** + * Used to add query params to AppLinker links, useful in overrides + * @param {Object} props AppItem props + * @param {Object} context AppItem context + * @return {Object} Query string parameters as object + */ + function AppItem(props) { + var _this; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, AppItem); + + _this = _super.call(this, props); + _this.onAppSwitch = _this.onAppSwitch.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3___default()(_this)); + return _this; + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(AppItem, [{ + key: "componentWillUnmount", + value: function componentWillUnmount() { + if (this.switchTimeout) clearTimeout(this.switchTimeout); + } + }, { + key: "buildAppUrl", + value: function buildAppUrl(href) { + var url; + + try { + url = new URL(href); + } catch (error) { + // eslint-disable-next-line no-console + console.error(error.message); + return null; + } + + var queryParams = AppItem.buildQueryParams(this.props, this.context); + + if (queryParams) { + for (var name in queryParams) { + url.searchParams.append(name, queryParams[name]); + } + } + + return url.toString(); + } + }, { + key: "onAppSwitch", + value: function onAppSwitch() { + var onAppSwitch = this.props.onAppSwitch; + + if (typeof onAppSwitch === 'function') { + this.switchTimeout = setTimeout(function () { + onAppSwitch(); + }, 1000); + } + } + }, { + key: "render", + value: function render() { + var _this$props = this.props, + useHomeIcon = _this$props.useHomeIcon, + app = _this$props.app, + isInvertedTheme = _this$props.isInvertedTheme; + var dataIcon = app.slug ? "icon-".concat(app.slug) : ''; + var appName = getAppDisplayName(app); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(cozy_ui_transpiled_react_AppLinker__WEBPACK_IMPORTED_MODULE_13___default.a, { + onAppSwitch: this.onAppSwitch, + href: this.buildAppUrl(app.href) || '', + app: app + }, function (_ref) { + var onClick = _ref.onClick, + href = _ref.href; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("li", { + className: "coz-nav-apps-item".concat(app.isCurrentApp ? ' --current' : '') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("a", { + role: "menuitem", + href: href, + "data-icon": dataIcon, + title: appName, + onClick: onClick + }, useHomeIcon ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_IconCozyHome__WEBPACK_IMPORTED_MODULE_14__["default"], { + className: "coz-nav-apps-item-icon", + isInvertedTheme: isInvertedTheme + }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(cozy_ui_transpiled_react_AppIcon__WEBPACK_IMPORTED_MODULE_12___default.a, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({ + app: app, + className: "coz-nav-apps-item-icon", + key: app.slug + }, _lib_stack__WEBPACK_IMPORTED_MODULE_16__["default"].get.iconProps())), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("p", { + className: "coz-label" + }, appName))); + }); + } + }]); + + return AppItem; +}(react__WEBPACK_IMPORTED_MODULE_8___default.a.Component); + +_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(AppItem, "buildQueryParams", function () { + // default behaviour + return null; +}); + +AppItem.propTypes = { + app: _proptypes__WEBPACK_IMPORTED_MODULE_15__["appShape"].isRequired, + useHomeIcon: prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.bool, + isInvertedTheme: prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.bool, + onAppSwitch: prop_types__WEBPACK_IMPORTED_MODULE_10___default.a.func +}; +/* harmony default export */ __webpack_exports__["default"] = (AppItem); + /***/ }), /***/ "aJg2": @@ -261145,6 +268582,96 @@ exports.formatBytes = formatBytes; /***/ }), +/***/ "aLNe": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("o0o1"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("yXPU"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var cozy_realtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("oJ5p"); +/* harmony import */ var cozy_realtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cozy_realtime__WEBPACK_IMPORTED_MODULE_2__); + + + +var APPS_DOCTYPE = 'io.cozy.apps'; +/** + * Initialize realtime sockets + * + * @private + * @param {object} + * @returns {Promise} + */ + +function initializeRealtime(_ref) { + var getApp = _ref.getApp, + onCreate = _ref.onCreate, + onDelete = _ref.onDelete, + cozyClient = _ref.cozyClient; + + var handleAppCreation = /*#__PURE__*/function () { + var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(app) { + var fullApp; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.prev = 0; + _context.next = 3; + return getApp(app.slug); + + case 3: + fullApp = _context.sent; + _context.next = 9; + break; + + case 6: + _context.prev = 6; + _context.t0 = _context["catch"](0); + throw new Error("Cannot fetch app ".concat(app.slug, ": ").concat(_context.t0.message)); + + case 9: + if (typeof onCreate === 'function') { + onCreate(fullApp); + } + + case 10: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[0, 6]]); + })); + + return function handleAppCreation(_x) { + return _ref2.apply(this, arguments); + }; + }(); + + var handleAppRemoval = function handleAppRemoval(app) { + if (typeof onDelete === 'function') { + onDelete(app); + } + }; + + try { + var realtime = new cozy_realtime__WEBPACK_IMPORTED_MODULE_2___default.a({ + client: cozyClient + }); + realtime.subscribe('created', APPS_DOCTYPE, handleAppCreation); + realtime.subscribe('deleted', APPS_DOCTYPE, handleAppRemoval); + } catch (error) { + // eslint-disable-next-line no-console + console.warn("Cannot initialize realtime in Cozy-bar: ".concat(error.message)); + } +} + +/* harmony default export */ __webpack_exports__["default"] = (initializeRealtime); + +/***/ }), + /***/ "aNCX": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -261571,6 +269098,45 @@ function useTheme() { /***/ }), +/***/ "aXhX": +/***/ (function(module) { + +module.exports = JSON.parse("{\"desktop\":{\"icon\":\"icon-laptop.svg\",\"link\":{\"type\":\"external\"}},\"mobile\":{\"icon\":\"icon-phone.svg\",\"link\":{\"type\":\"external\"}},\"support\":{\"icon\":\"icon-question-mark.svg\",\"link\":{\"type\":\"external\"}}}"); + +/***/ }), + +/***/ "aXzq": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__("pVnL")); + +var _react = _interopRequireDefault(__webpack_require__("q1tI")); + +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/help.svg` to regenerate; +function SvgHelp(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + fillRule: "evenodd", + d: "M8 16A8 8 0 118 0a8 8 0 010 16zm1-7.198C10.122 8.355 11 7.21 11 6c0-1.552-1.448-3-3-3S5 4.448 5 6h2c0-.448.552-1 1-1 .448 0 1 .552 1 1 0 .448-.552 1-1 1a1 1 0 00-1 1v2h2V8.802zM7 11v2h2v-2H7z" + })); +} + +var _default = SvgHelp; +exports.default = _default; + +/***/ }), + /***/ "aY1w": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -261947,6 +269513,65 @@ __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=index.js.map +/***/ }), + +/***/ "ahA9": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _persistReducer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("yZDF"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "persistReducer", function() { return _persistReducer__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony import */ var _persistCombineReducers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("psFn"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "persistCombineReducers", function() { return _persistCombineReducers__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _persistStore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("sdKy"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "persistStore", function() { return _persistStore__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* harmony import */ var _createMigrate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("gKR3"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createMigrate", function() { return _createMigrate__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + +/* harmony import */ var _createTransform__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("8lBA"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createTransform", function() { return _createTransform__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + +/* harmony import */ var _getStoredState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("wD2s"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getStoredState", function() { return _getStoredState__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + +/* harmony import */ var _createPersistoid__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("iw+L"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createPersistoid", function() { return _createPersistoid__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + +/* harmony import */ var _purgeStoredState__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("XgXo"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "purgeStoredState", function() { return _purgeStoredState__WEBPACK_IMPORTED_MODULE_7__["default"]; }); + +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("1iYv"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "KEY_PREFIX", function() { return _constants__WEBPACK_IMPORTED_MODULE_8__["KEY_PREFIX"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FLUSH", function() { return _constants__WEBPACK_IMPORTED_MODULE_8__["FLUSH"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "REHYDRATE", function() { return _constants__WEBPACK_IMPORTED_MODULE_8__["REHYDRATE"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PAUSE", function() { return _constants__WEBPACK_IMPORTED_MODULE_8__["PAUSE"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PERSIST", function() { return _constants__WEBPACK_IMPORTED_MODULE_8__["PERSIST"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PURGE", function() { return _constants__WEBPACK_IMPORTED_MODULE_8__["PURGE"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "REGISTER", function() { return _constants__WEBPACK_IMPORTED_MODULE_8__["REGISTER"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_VERSION", function() { return _constants__WEBPACK_IMPORTED_MODULE_8__["DEFAULT_VERSION"]; }); + + + + + + + + + + + + /***/ }), /***/ "ahmL": @@ -262442,6 +270067,28 @@ function baseOrderBy(collection, iteratees, orders) { module.exports = baseOrderBy; +/***/ }), + +/***/ "amV4": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appShape", function() { return appShape; }); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("PI/G"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__); + +var appShape = prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ + slug: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string.isRequired, + name: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string.isRequired, + namePrefix: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, + comingSoon: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool, + href: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, + links: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ + icon: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string.isRequired + }) +}); + /***/ }), /***/ "apmT": @@ -263566,6 +271213,167 @@ var MasterPasswordPolicyOptions = /*#__PURE__*/function (_Domain) { /***/ }), +/***/ "au6L": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("lwsE"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("W8MJ"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("7W2i"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("a1gu"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Nsbk"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("p2W/"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("PI/G"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Bottom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("oCl1"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Bottom__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Bottom__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("y6ex"); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Top__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("9/ZD"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Top__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Top__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("buk/"); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var _ButtonCozyHome__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("uURn"); +/* harmony import */ var _lib_reducers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("h8u/"); + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + + + + + + + + +var AppNavButton = /*#__PURE__*/function (_Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default()(AppNavButton, _Component); + + var _super = _createSuper(AppNavButton); + + function AppNavButton() { + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, AppNavButton); + + return _super.apply(this, arguments); + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(AppNavButton, [{ + key: "render", + value: function render() { + var _this$props = this.props, + homeApp = _this$props.homeApp, + handleClick = _this$props.handleClick, + appName = _this$props.appName, + appNamePrefix = _this$props.appNamePrefix, + appSlug = _this$props.appSlug, + iconPath = _this$props.iconPath, + isInvertedTheme = _this$props.isInvertedTheme, + isFetchingApps = _this$props.isFetchingApps, + isPublic = _this$props.isPublic, + opened = _this$props.opened, + t = _this$props.t; + var isHomeApp = homeApp && homeApp.isCurrentApp; + + if (!isPublic && isFetchingApps) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("div", { + className: "coz-nav-apps-btns --loading" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("div", { + className: "coz-nav-apps-btns-home coz-loading-placeholder" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("div", { + className: "coz-nav-apps-btns-main coz-loading-placeholder" + })); + } + + var displayName = !isHomeApp && appNamePrefix ? [t("".concat(appSlug, ".name_prefix"), { + _: appNamePrefix + }), t("".concat(appSlug, ".name"), { + _: appName + })].join(' ') : t("".concat(appSlug, ".name"), { + _: appName + }); + var homeHref = !isPublic && homeApp && homeApp.href; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("div", { + className: "coz-nav-apps-btns".concat(isHomeApp ? ' --currentHome' : '') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_ButtonCozyHome__WEBPACK_IMPORTED_MODULE_12__["ButtonCozyHome"], { + homeHref: homeHref, + isInvertedTheme: isInvertedTheme + }), !isHomeApp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("span", { + className: "coz-nav-apps-btns-sep" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("button", { + type: "button", + onClick: isPublic ? null : handleClick, + className: "coz-nav-apps-btns-main", + "aria-controls": "coz-nav-pop--apps", + "data-tutorial": "apps", + disabled: isPublic + }, !isHomeApp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("img", { + className: "coz-bar-hide-sm", + src: iconPath, + width: "28", + alt: "" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("span", { + className: "coz-nav-app-name" + }, displayName), !isPublic && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_9___default.a, { + icon: opened ? cozy_ui_transpiled_react_Icons_Top__WEBPACK_IMPORTED_MODULE_10___default.a : cozy_ui_transpiled_react_Icons_Bottom__WEBPACK_IMPORTED_MODULE_8___default.a, + color: "#95999d", + size: "12" + }))); + } + }]); + + return AppNavButton; +}(react__WEBPACK_IMPORTED_MODULE_5__["Component"]); + +AppNavButton.propTypes = { + homeApp: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.shape({ + isCurrentApp: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, + slug: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, + href: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string + }), + handleClick: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, + appName: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, + appNamePrefix: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, + appSlug: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, + iconPath: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, + isInvertedTheme: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, + isFetchingApps: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, + isPublic: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, + opened: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool +}; + +var mapStateToProps = function mapStateToProps(state) { + return { + homeApp: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_13__["getHomeApp"])(state), + isFetchingApps: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_13__["isFetchingApps"])(state) + }; +}; + +var mapDispatchToProps = function mapDispatchToProps() { + return {}; +}; + +/* harmony default export */ __webpack_exports__["default"] = (Object(react_redux__WEBPACK_IMPORTED_MODULE_6__["connect"])(mapStateToProps, mapDispatchToProps)(Object(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_11__["translate"])()(AppNavButton))); + +/***/ }), + /***/ "aw+z": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -264772,6 +272580,37 @@ __webpack_require__("OGtf")('fontcolor', function (createHTML) { }); +/***/ }), + +/***/ "bGd3": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.UNIVERSAL_LINK_URL = exports.NATIVE_APP_INFOS = void 0; + +var _cozyDeviceHelper = __webpack_require__("snfs"); + +var NATIVE_APP_INFOS = { + drive: { + appId: 'io.cozy.drive.mobile', + uri: 'cozydrive://', + name: 'Cozy Drive' + }, + banks: { + appId: (0, _cozyDeviceHelper.isAndroidApp)() ? 'io.cozy.banks.mobile' : 'io.cozy.banks', + uri: 'cozybanks://', + name: 'Cozy Banks' + } +}; +exports.NATIVE_APP_INFOS = NATIVE_APP_INFOS; +var UNIVERSAL_LINK_URL = 'https://links.mycozy.cloud'; +exports.UNIVERSAL_LINK_URL = UNIVERSAL_LINK_URL; + /***/ }), /***/ "bHqI": @@ -270474,6 +278313,34 @@ module.exports = _getPrototypeOf; /***/ }), +/***/ "c5px": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("mgfL"); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cozy_flags__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _cozy_minilog__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("btPC"); +/* harmony import */ var _cozy_minilog__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_cozy_minilog__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var lodash_set__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("9MQZ"); +/* harmony import */ var lodash_set__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_set__WEBPACK_IMPORTED_MODULE_2__); + + + +lodash_set__WEBPACK_IMPORTED_MODULE_2___default()(window, "cozy.debug.flagship", function () { + return cozy_flags__WEBPACK_IMPORTED_MODULE_0___default()('flagship.debug', true); +}); +var minilog = window.minilog || _cozy_minilog__WEBPACK_IMPORTED_MODULE_1___default.a; +var logger = minilog('cozy-bar'); + +if (!cozy_flags__WEBPACK_IMPORTED_MODULE_0___default()('bar.debug')) { + minilog.suggest.deny('cozy-bar', 'info'); +} + +/* harmony default export */ __webpack_exports__["default"] = (logger); + +/***/ }), + /***/ "c6wG": /***/ (function(module, exports, __webpack_require__) { @@ -272086,6 +279953,470 @@ function nopropagation(event) { }); +/***/ }), + +/***/ "cePo": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compareClientVersion", function() { return compareClientVersion; }); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("o0o1"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("yXPU"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var semver_compare__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ycmj"); +/* harmony import */ var semver_compare__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(semver_compare__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var cozy_interapp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("P422"); +/* harmony import */ var cozy_interapp__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(cozy_interapp__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("53+s"); +/* harmony import */ var _realtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("aLNe"); +/* harmony import */ var _exceptions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("8Zd4"); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("snfs"); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(cozy_device_helper__WEBPACK_IMPORTED_MODULE_7__); + + + +/* eslint-env browser */ + + + + + + +var errorStatuses = { + '401': _exceptions__WEBPACK_IMPORTED_MODULE_6__["UnauthorizedStackException"], + '403': _exceptions__WEBPACK_IMPORTED_MODULE_6__["ForbiddenException"], + '404': _exceptions__WEBPACK_IMPORTED_MODULE_6__["NotFoundException"], + '405': _exceptions__WEBPACK_IMPORTED_MODULE_6__["MethodNotAllowedException"], + '500': _exceptions__WEBPACK_IMPORTED_MODULE_6__["ServerErrorException"] +}; +/** + * Cozy client instance + * @private + */ + +var cozyClient; +/** + * Get the client instance + * + * @private + * @function + * @returns {Object} cozy-client instance + */ + +var getIntents = function getIntents() { + return new cozy_interapp__WEBPACK_IMPORTED_MODULE_3__["Intents"]({ + client: cozyClient + }); +}; +/** + * Get the stackClient from the cozy-client instance + * + * @private + * @function + * @returns {Object} cozy-stack-client instance + */ + + +var getStackClient = function getStackClient() { + return cozyClient.getStackClient(); +}; +/** + * Logout and disconnect the user + * @function + * @TODO move this to cozy-stack-client + * @returns {Promise} + */ + + +var logout = function logout() { + return getStackClient().fetch('DELETE', '/auth/login').then(function (resp) { + if (resp.status === 401) { + throw new _exceptions__WEBPACK_IMPORTED_MODULE_6__["UnauthorizedStackException"](); + } else if (resp.status === 204) { + window.location.reload(); + } + + return true; + }).catch(function () { + throw new _exceptions__WEBPACK_IMPORTED_MODULE_6__["UnavailableStackException"](); + }); +}; +/** + * Get a cozy URL object + * + * @function + * @returns {URL} + */ + + +var getCozyURL = function getCozyURL() { + return new URL(getStackClient().uri); +}; +/** + * Get a the cozy origin as an URL string + * + * @function + * @returns {string} + */ + + +var getCozyURLOrigin = function getCozyURLOrigin() { + return getCozyURL().origin; +}; +/** + * @deprecated + * @private + */ + + +var updateAccessToken = function updateAccessToken() { + throw new Error('updateAccessToken should not be used with a cozy-client instance initialization'); +}; +/** + * Fetch a resource with cozy-client + * + * Utility to maintain the compatibility with the legacy + * standalone cozy-bar client + * + * @function + * @private + * @returns {Promise} the full raw JSON payload + */ + + +var fetchJSON = function fetchJSON(method, path, body) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + // We mirror here a few lines from cozy-stack-client + // because we want a customized fetchJSON + var headers = options.headers = options.headers || {}; + headers['Accept'] = 'application/json'; + + if (method !== 'GET' && method !== 'HEAD' && body !== undefined) { + if (!headers['Content-Type']) { + headers['Content-Type'] = 'application/json'; + body = JSON.stringify(body); + } + } + + return getStackClient().fetch(method, path, body, options).then(function (resp) { + if (typeof errorStatuses[resp.status] === 'function') { + throw new errorStatuses[resp.status](); + } + + var contentType = resp.headers.get('content-type'); + var isJson = contentType.includes('json'); + + if (!isJson) { + throw new Error('Server response not in JSON'); + } + + return resp.json(); + }); +}; +/** + * Test if an error is from an HTTP 404 + * + * @function + * @private + * @param {Function} error - received from a fetch + * @returns {boolean} + */ + + +var is404 = function is404(error) { + return ['NotFoundException', 'NotFound', 'FetchError'].includes(error.name) && error.status && error.status === 404; +}; +/** + * Memoize the result of a function which does an HTTP fetch + * + * If a call throws an error because the + * underlying HTTP request returned a 404 + * then this function returns a default value + * + * In the absence of any other error, the result is + * cached and reused in the next call to the function. + * + * + * @function + * @param {Function} fn - the function to memoize. It will be + * called without any parameter + * @param {Object} defaultValue - returned in case of 404 + * @returns {Function} async function + */ + + +var withCache = function withCache(fn, defaultValue) { + var cache = undefined; + return /*#__PURE__*/_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() { + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (!(cache === undefined)) { + _context.next = 10; + break; + } + + _context.prev = 1; + _context.next = 4; + return fn(); + + case 4: + cache = _context.sent; + _context.next = 10; + break; + + case 7: + _context.prev = 7; + _context.t0 = _context["catch"](1); + cache = is404(_context.t0) ? defaultValue : undefined; + + case 10: + return _context.abrupt("return", cache); + + case 11: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[1, 7]]); + })); +}; +/** + * List all installed applications + * + * Returns only the `data` key of the + * whole JSON payload from the server + * + * @function + * @returns {Promise} + */ + + +var getApps = function getApps() { + return fetchJSON('GET', '/apps/').then(function (json) { + if (json.error) { + throw new Error(json.error); + } + + return json.data; + }); +}; +/** + * Detail of an installed application by its slug + * + * Returns only the `data` key of the + * whole JSON payload from the server + * + * @function + * @param {string} slug + * @returns {Promise} + */ + + +var getApp = function getApp(slug) { + if (!slug) { + throw new Error('Missing slug'); + } + + return fetchJSON('GET', "/apps/".concat(slug)).then(function (json) { + if (json.error) { + throw new Error(json.error); + } + + return json.data; + }); +}; +/** + * default value when no quota is provided + * @private + */ + + +var defaultQuota = Math.pow(10, 12); // 1 Tera + +/** + * Get storage and quota usage + * + * When no quota is returned by the server + * the quota used is the larger between + * `defaultQuota` and 10 * usage + * + * @function + * @returns {Object} {usage, quota, isLimited} + */ + +var getStorageData = function getStorageData() { + return fetchJSON('GET', '/settings/disk-usage').then(function (json) { + // parseInt because responses from the server are in text + var usage = parseInt(json.data.attributes.used, 10); + var realQuota = parseInt(json.data.attributes.quota, 10); // @TODO this is a workaround, we should certainly do smarter + // and either not requiring this attribute + // or set it to something more real + + var quota = realQuota || Math.max(defaultQuota, 10 * usage); + var isLimited = json.data.attributes.is_limited; + return { + usage: usage, + quota: quota, + isLimited: isLimited + }; + }).catch(function () { + throw new _exceptions__WEBPACK_IMPORTED_MODULE_6__["UnavailableStackException"](); + }); +}; +/** + * Fetch an icon data from its path + * + * The purpose of this function is to be sent + * to AppIcon components for mobile devices. + * + * @private + * @function + * @param {string} iconPath - path of the icon in the stack + * @returns {Blob} + */ + + +var iconFetcher = function iconFetcher(iconPath) { + return getStackClient().fetch('GET', iconPath); +}; +/** + * Get a props object that can be sent to an AppIcon component + * + * Mobile devices and web browsers need different props + * + * @function + * @returns {Object} + */ + + +var getAppIconProps = function getAppIconProps() { + var mobileAppIconProps = { + fetchIcon: function fetchIcon(app) { + return Object(_icon__WEBPACK_IMPORTED_MODULE_4__["default"])(iconFetcher, app, true); + } + }; + var browserAppIconProps = { + // we mustn't give the protocol here + domain: getCozyURL().host, + secure: getCozyURL().protocol === 'https:' + }; + return Object(cozy_device_helper__WEBPACK_IMPORTED_MODULE_7__["isMobileApp"])() ? mobileAppIconProps : browserAppIconProps; +}; +/** + * Get settings context + * + * @function + * @return {Promise} + * @see https://docs.cozy.io/en/cozy-stack/settings/#get-settingscontext + */ + + +var getContext = function getContext() { + return fetchJSON('GET', '/settings/context'); +}; +/** + * Fetch a resource on the cozy stack + * with a prototype compatible with the legacy cozy-client-js + * + * @function + * @param {object} cozy - cozy-client-js + * @param {string} method - HTTP method + * @param {string} path + * @param {object} body + * @returns {Promise} + */ + + +var cozyFetchJSON = function cozyFetchJSON(cozy, method, path, body) { + return fetchJSON(method, path, body).then(function (json) { + var responseData = Object.assign({}, json.data); + + if (responseData.id) { + responseData._id = responseData.id; + } + + return responseData; + }); +}; + +var getSettingsAppURL = function getSettingsAppURL() { + return getApp('settings').then(function (settings) { + if (!settings) { + throw new _exceptions__WEBPACK_IMPORTED_MODULE_6__["UnavailableSettingsException"](); + } + + return settings.links.related; + }); +}; +/** + * + * @param {cozyClient} forcedCozyClient only used to test purpose + * + * We can not read `version` from `import CozyClient from cozy-client` + * since in that case, we'll read version from the cozy-bar node modules + * and not from the app one. + * + * In order to avoid this issue, we get the instance passed by the app to the bar), + * then read the constructor and then read the version from it + */ + + +var compareClientVersion = function compareClientVersion(targetVersion) { + var forcedCozyClient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + var usedClient = cozyClient ? cozyClient.constructor : {}; + var cozyClientToUse = forcedCozyClient !== null ? forcedCozyClient : usedClient; + if (!cozyClientToUse.version) return false; + var result = semver_compare__WEBPACK_IMPORTED_MODULE_2___default()(cozyClientToUse.version, targetVersion); + return result >= 0; +}; +/** + * Initializes the functions to call the cozy stack + * + * @function + * @param {Object} arg + * @param {Object} arg.cozyClient - a cozy client instance + * @param {Function} arg.onCreate + * @param {Function} arg.onDelete + * @returns {Promise} + */ + + +var init = function init(_ref2) { + var client = _ref2.cozyClient, + onCreate = _ref2.onCreate, + onDelete = _ref2.onDelete; + cozyClient = client; + if (!cozyClient.isLogged) return; + Object(_realtime__WEBPACK_IMPORTED_MODULE_5__["default"])({ + getApp: getApp, + onCreate: onCreate, + onDelete: onDelete, + cozyClient: cozyClient + }); +}; + + +/* harmony default export */ __webpack_exports__["default"] = ({ + get: { + app: getApp, + apps: getApps, + context: withCache(getContext, {}), + storageData: getStorageData, + iconProps: getAppIconProps, + cozyURL: getCozyURLOrigin, + intents: getIntents, + settingsAppURL: getSettingsAppURL + }, + updateAccessToken: updateAccessToken, + cozyFetchJSON: cozyFetchJSON, + logout: logout, + init: init +}); + /***/ }), /***/ "cgbb": @@ -273821,6 +282152,149 @@ module.exports = function (index, length) { }; +/***/ }), + +/***/ "d04y": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("lwsE"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("W8MJ"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("PJYZ"); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("7W2i"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("a1gu"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("Nsbk"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("lSNA"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("PI/G"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var _AppsContent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("kYDj"); +/* harmony import */ var _AppNavButtons__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("au6L"); + + + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + + +var Apps = /*#__PURE__*/function (_Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default()(Apps, _Component); + + var _super = _createSuper(Apps); + + function Apps(props) { + var _this; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Apps); + + _this = _super.call(this, props); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "onClickOutside", function (event) { + if (_this.state.opened) { + // if it's not a cozy-bar nav popup, close the opened popup + if (!_this.rootRef.contains(event.target) && !_this.modalContainer.contains(event.target)) { + _this.setState({ + opened: false + }); + + event.stopPropagation(); + } + } + }); + + _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this), "toggleMenu", function () { + _this.setState({ + opened: !_this.state.opened + }); + }); + + _this.state = { + opened: false + }; + return _this; + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Apps, [{ + key: "componentDidMount", + value: function componentDidMount() { + document.body.addEventListener('click', this.onClickOutside); + this.modalContainer = document.getElementById('cozy-bar-modal-dom-place'); + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + document.body.removeEventListener('click', this.onClickOutside); + } + }, { + key: "render", + // data-tutorial attribute allows to be targeted in an application tutorial + value: function render() { + var _this2 = this; + + var _this$props = this.props, + appName = _this$props.appName, + appNamePrefix = _this$props.appNamePrefix, + appSlug = _this$props.appSlug, + iconPath = _this$props.iconPath, + isPublic = _this$props.isPublic, + isInvertedTheme = _this$props.isInvertedTheme; + var opened = this.state.opened; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("nav", { + className: "coz-nav coz-nav-apps", + ref: function ref(_ref) { + _this2.rootRef = _ref; + } + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_AppNavButtons__WEBPACK_IMPORTED_MODULE_10__["default"], { + appName: appName, + appNamePrefix: appNamePrefix, + appSlug: appSlug, + iconPath: iconPath, + handleClick: this.toggleMenu, + opened: opened, + isPublic: isPublic, + isInvertedTheme: isInvertedTheme + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement("div", { + className: "coz-nav-pop coz-nav-pop--apps", + id: "coz-nav-pop--apps", + "aria-hidden": !opened + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(_AppsContent__WEBPACK_IMPORTED_MODULE_9__["default"], { + isInvertedTheme: isInvertedTheme + }))); + } + }]); + + return Apps; +}(react__WEBPACK_IMPORTED_MODULE_7__["Component"]); + +Apps.propTypes = { + appName: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string, + appNamePrefix: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string, + appSlug: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string, + iconPath: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.string, + isPublic: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool, + isInvertedTheme: prop_types__WEBPACK_IMPORTED_MODULE_8___default.a.bool +}; +/* harmony default export */ __webpack_exports__["default"] = (Apps); + /***/ }), /***/ "d4HN": @@ -279619,6 +288093,205 @@ function makePromiseBuffer(limit) { /***/ }), +/***/ "dvG5": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createBarAPI", function() { return createBarAPI; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createBarProxiedAPI", function() { return createBarProxiedAPI; }); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("lwsE"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("W8MJ"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("7W2i"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("a1gu"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Nsbk"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _reducers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("h8u/"); +/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("UEdh"); + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + // The React API need unique IDs, so we will increment this variable + +var idToIncrement = 0; +/** + * Wraps argument into a React element if it is a string. Is used + * for setBar{Left,Right,Center} to be able to pass HTML + * + * @param {ReactElement|string} v + * @return {ReactElement} + */ + +var wrapInElement = function wrapInElement(v) { + if (typeof v === 'string') { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("span", { + dangerouslySetInnerHTML: { + __html: v + } + }); + } else { + return v; + } +}; +/** + * Creates a React component that enables to access store + * properties in a declarative way. + * + * @param {BarStore} store + */ + + +var barContentComponent = function barContentComponent(store, location) { + return /*#__PURE__*/function (_Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default()(BarContent, _Component); + + var _super = _createSuper(BarContent); + + function BarContent() { + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, BarContent); + + return _super.apply(this, arguments); + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(BarContent, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.componentId = idToIncrement++; + this.setContent(this.props.children); + } + }, { + key: "setContent", + value: function setContent(content) { + try { + content = react__WEBPACK_IMPORTED_MODULE_5___default.a.Children.only(content); // eslint-disable-next-line no-empty + } catch (e) {} + + store.dispatch(Object(_reducers__WEBPACK_IMPORTED_MODULE_6__["setContent"])(location, content, this.componentId)); + } + }, { + key: "unsetContent", + value: function unsetContent() { + store.dispatch(Object(_reducers__WEBPACK_IMPORTED_MODULE_6__["unsetContent"])(location, this.componentId)); + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.unsetContent(); + } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate(prevProps) { + if (this.props.children !== prevProps.children) { + this.setContent(this.props.children); + } + } + }, { + key: "render", + value: function render() { + return null; + } + }]); + + return BarContent; + }(react__WEBPACK_IMPORTED_MODULE_5__["Component"]); +}; +/** + * Creates a public API + * + * - getters/setters for public attributes + * - React components that act as getters/setters + * + * @param {ReduxStore} store - Store on which the API will act + * @return {object} - Methods of the public API + */ + + +var createBarAPI = function createBarAPI(store) { + // setBar{Left,Right,Center} and <Bar{Left,Right,Center} /> + var methods = {}; + _helpers__WEBPACK_IMPORTED_MODULE_7__["locations"].forEach(function (location) { + // expose JS API + methods[Object(_helpers__WEBPACK_IMPORTED_MODULE_7__["getJsApiName"])(location)] = function (value) { + return store.dispatch(Object(_reducers__WEBPACK_IMPORTED_MODULE_6__["setContent"])(location, wrapInElement(value), 'js')); + }; // expose React API + + + methods[Object(_helpers__WEBPACK_IMPORTED_MODULE_7__["getReactApiName"])(location)] = barContentComponent(store, location); + }); + + methods.setLocale = function () { + store.dispatch(_reducers__WEBPACK_IMPORTED_MODULE_6__["setLocale"].apply(void 0, arguments)); + }; + + methods.setTheme = function () { + store.dispatch(_reducers__WEBPACK_IMPORTED_MODULE_6__["setTheme"].apply(void 0, arguments)); + }; + + methods.setWebviewContext = function () { + store.dispatch(_reducers__WEBPACK_IMPORTED_MODULE_6__["setWebviewContext"].apply(void 0, arguments)); + }; + + return methods; +}; // Handle exceptions for API before init + +var showAPIError = function showAPIError(name) { + // eslint-disable-next-line no-console + console.error("You tried to use the CozyBar API (".concat(name, ") but the CozyBar is not initialised yet via cozy.bar.init(...).")); +}; + +var makeProxyMethodToAPI = function makeProxyMethodToAPI(exposedAPI, fnName) { + return function () { + if (exposedAPI[fnName]) { + return exposedAPI[fnName].apply(exposedAPI, arguments); + } else { + showAPIError(fnName); + } + }; +}; +/** Creates an API that swallows error until bar is correctly initialized */ + + +var createBarProxiedAPI = function createBarProxiedAPI(exposedAPI) { + var apiReferences = {}; + _helpers__WEBPACK_IMPORTED_MODULE_7__["locations"].forEach(function (location) { + var jsAPIName = Object(_helpers__WEBPACK_IMPORTED_MODULE_7__["getJsApiName"])(location); + var reactAPIName = Object(_helpers__WEBPACK_IMPORTED_MODULE_7__["getReactApiName"])(location); + apiReferences[jsAPIName] = makeProxyMethodToAPI(exposedAPI, jsAPIName); + + apiReferences[reactAPIName] = function (props) { + if (exposedAPI[reactAPIName]) { + return react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(exposedAPI[reactAPIName], props); + } else { + showAPIError(reactAPIName); + } + }; + }); + + for (var _i = 0, _arr = ['setLocale', 'setTheme', 'setWebviewContext']; _i < _arr.length; _i++) { + var fnName = _arr[_i]; + apiReferences[fnName] = makeProxyMethodToAPI(exposedAPI, fnName); + } + + return apiReferences; +}; + +/***/ }), + /***/ "dvhP": /***/ (function(module, exports, __webpack_require__) { @@ -283273,18 +291946,16 @@ exports.isWebDevMode = exports.isNativeDevMode = exports.interpolate = exports.g var _construct2 = _interopRequireDefault(__webpack_require__("sXyB")); -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__("RIqP")); - var interpolate = function interpolate(str, params) { if (!params) return str; var names = Object.keys(params); var vals = Object.values(params); // I do not see security risks here, we're not executing user input // eslint-disable-next-line @typescript-eslint/no-implied-eval - var makeInterpolate = (0, _construct2.default)(Function, (0, _toConsumableArray2.default)(names).concat(["return `".concat(str, "`;")])); + var makeInterpolate = (0, _construct2.default)(Function, names.concat(["return `".concat(str, "`;")])); try { - return makeInterpolate.apply(void 0, (0, _toConsumableArray2.default)(vals)); + return makeInterpolate.apply(void 0, vals); } catch (error) { // String template and params did not match return str; @@ -283320,6 +291991,26 @@ var getErrorMessage = function getErrorMessage(error) { exports.getErrorMessage = getErrorMessage; +/***/ }), + +/***/ "eq+D": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + +module.exports = ReactPropTypesSecret; + + /***/ }), /***/ "er+B": @@ -285056,6 +293747,50 @@ function baseGetAllKeys(object, keysFunc, symbolsFunc) { module.exports = baseGetAllKeys; +/***/ }), + +/***/ "fR9/": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getWebviewContext", function() { return getWebviewContext; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setWebviewContext", function() { return setWebviewContext; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reducer", function() { return reducer; }); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("MVZn"); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__); + +var SET_WEBVIEW_CONTEXT = 'SET_WEBVIEW_CONTEXT'; // selectors + +var getWebviewContext = function getWebviewContext(state) { + return state.webviewContext; +}; // actions + +var setWebviewContext = function setWebviewContext(payload) { + return { + type: SET_WEBVIEW_CONTEXT, + payload: payload + }; +}; // reducers + +var defaultState = { + webviewContext: undefined +}; +var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState; + var action = arguments.length > 1 ? arguments[1] : undefined; + + switch (action.type) { + case SET_WEBVIEW_CONTEXT: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + webviewContext: action.payload + }); + + default: + return state; + } +}; + /***/ }), /***/ "fRnL": @@ -285573,6 +294308,690 @@ function simpleEnd(buf) { return buf && buf.length ? this.write(buf) : ''; } +/***/ }), + +/***/ "fd+0": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__DO_NOT_USE__ActionTypes", function() { return ActionTypes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return applyMiddleware; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return bindActionCreators; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return combineReducers; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return createStore; }); +/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("VTBJ"); + + +/** + * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js + * + * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes + * during build. + * @param {number} code + */ +function formatProdErrorMessage(code) { + return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or " + 'use the non-minified dev environment for full errors. '; +} + +// Inlined version of the `symbol-observable` polyfill +var $$observable = (function () { + return typeof Symbol === 'function' && Symbol.observable || '@@observable'; +})(); + +/** + * These are private action types reserved by Redux. + * For any unknown actions, you must return the current state. + * If the current state is undefined, you must return the initial state. + * Do not reference these action types directly in your code. + */ +var randomString = function randomString() { + return Math.random().toString(36).substring(7).split('').join('.'); +}; + +var ActionTypes = { + INIT: "@@redux/INIT" + randomString(), + REPLACE: "@@redux/REPLACE" + randomString(), + PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() { + return "@@redux/PROBE_UNKNOWN_ACTION" + randomString(); + } +}; + +/** + * @param {any} obj The object to inspect. + * @returns {boolean} True if the argument appears to be a plain object. + */ +function isPlainObject(obj) { + if (typeof obj !== 'object' || obj === null) return false; + var proto = obj; + + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto); + } + + return Object.getPrototypeOf(obj) === proto; +} + +// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of +function miniKindOf(val) { + if (val === void 0) return 'undefined'; + if (val === null) return 'null'; + var type = typeof val; + + switch (type) { + case 'boolean': + case 'string': + case 'number': + case 'symbol': + case 'function': + { + return type; + } + } + + if (Array.isArray(val)) return 'array'; + if (isDate(val)) return 'date'; + if (isError(val)) return 'error'; + var constructorName = ctorName(val); + + switch (constructorName) { + case 'Symbol': + case 'Promise': + case 'WeakMap': + case 'WeakSet': + case 'Map': + case 'Set': + return constructorName; + } // other + + + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); +} + +function ctorName(val) { + return typeof val.constructor === 'function' ? val.constructor.name : null; +} + +function isError(val) { + return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'; +} + +function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function'; +} + +function kindOf(val) { + var typeOfVal = typeof val; + + if (false) {} + + return typeOfVal; +} + +/** + * Creates a Redux store that holds the state tree. + * The only way to change the data in the store is to call `dispatch()` on it. + * + * There should only be a single store in your app. To specify how different + * parts of the state tree respond to actions, you may combine several reducers + * into a single reducer function by using `combineReducers`. + * + * @param {Function} reducer A function that returns the next state tree, given + * the current state tree and the action to handle. + * + * @param {any} [preloadedState] The initial state. You may optionally specify it + * to hydrate the state from the server in universal apps, or to restore a + * previously serialized user session. + * If you use `combineReducers` to produce the root reducer function, this must be + * an object with the same shape as `combineReducers` keys. + * + * @param {Function} [enhancer] The store enhancer. You may optionally specify it + * to enhance the store with third-party capabilities such as middleware, + * time travel, persistence, etc. The only store enhancer that ships with Redux + * is `applyMiddleware()`. + * + * @returns {Store} A Redux store that lets you read the state, dispatch actions + * and subscribe to changes. + */ + +function createStore(reducer, preloadedState, enhancer) { + var _ref2; + + if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') { + throw new Error( true ? formatProdErrorMessage(0) : undefined); + } + + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { + enhancer = preloadedState; + preloadedState = undefined; + } + + if (typeof enhancer !== 'undefined') { + if (typeof enhancer !== 'function') { + throw new Error( true ? formatProdErrorMessage(1) : undefined); + } + + return enhancer(createStore)(reducer, preloadedState); + } + + if (typeof reducer !== 'function') { + throw new Error( true ? formatProdErrorMessage(2) : undefined); + } + + var currentReducer = reducer; + var currentState = preloadedState; + var currentListeners = []; + var nextListeners = currentListeners; + var isDispatching = false; + /** + * This makes a shallow copy of currentListeners so we can use + * nextListeners as a temporary list while dispatching. + * + * This prevents any bugs around consumers calling + * subscribe/unsubscribe in the middle of a dispatch. + */ + + function ensureCanMutateNextListeners() { + if (nextListeners === currentListeners) { + nextListeners = currentListeners.slice(); + } + } + /** + * Reads the state tree managed by the store. + * + * @returns {any} The current state tree of your application. + */ + + + function getState() { + if (isDispatching) { + throw new Error( true ? formatProdErrorMessage(3) : undefined); + } + + return currentState; + } + /** + * Adds a change listener. It will be called any time an action is dispatched, + * and some part of the state tree may potentially have changed. You may then + * call `getState()` to read the current state tree inside the callback. + * + * You may call `dispatch()` from a change listener, with the following + * caveats: + * + * 1. The subscriptions are snapshotted just before every `dispatch()` call. + * If you subscribe or unsubscribe while the listeners are being invoked, this + * will not have any effect on the `dispatch()` that is currently in progress. + * However, the next `dispatch()` call, whether nested or not, will use a more + * recent snapshot of the subscription list. + * + * 2. The listener should not expect to see all state changes, as the state + * might have been updated multiple times during a nested `dispatch()` before + * the listener is called. It is, however, guaranteed that all subscribers + * registered before the `dispatch()` started will be called with the latest + * state by the time it exits. + * + * @param {Function} listener A callback to be invoked on every dispatch. + * @returns {Function} A function to remove this change listener. + */ + + + function subscribe(listener) { + if (typeof listener !== 'function') { + throw new Error( true ? formatProdErrorMessage(4) : undefined); + } + + if (isDispatching) { + throw new Error( true ? formatProdErrorMessage(5) : undefined); + } + + var isSubscribed = true; + ensureCanMutateNextListeners(); + nextListeners.push(listener); + return function unsubscribe() { + if (!isSubscribed) { + return; + } + + if (isDispatching) { + throw new Error( true ? formatProdErrorMessage(6) : undefined); + } + + isSubscribed = false; + ensureCanMutateNextListeners(); + var index = nextListeners.indexOf(listener); + nextListeners.splice(index, 1); + currentListeners = null; + }; + } + /** + * Dispatches an action. It is the only way to trigger a state change. + * + * The `reducer` function, used to create the store, will be called with the + * current state tree and the given `action`. Its return value will + * be considered the **next** state of the tree, and the change listeners + * will be notified. + * + * The base implementation only supports plain object actions. If you want to + * dispatch a Promise, an Observable, a thunk, or something else, you need to + * wrap your store creating function into the corresponding middleware. For + * example, see the documentation for the `redux-thunk` package. Even the + * middleware will eventually dispatch plain object actions using this method. + * + * @param {Object} action A plain object representing “what changed”. It is + * a good idea to keep actions serializable so you can record and replay user + * sessions, or use the time travelling `redux-devtools`. An action must have + * a `type` property which may not be `undefined`. It is a good idea to use + * string constants for action types. + * + * @returns {Object} For convenience, the same action object you dispatched. + * + * Note that, if you use a custom middleware, it may wrap `dispatch()` to + * return something else (for example, a Promise you can await). + */ + + + function dispatch(action) { + if (!isPlainObject(action)) { + throw new Error( true ? formatProdErrorMessage(7) : undefined); + } + + if (typeof action.type === 'undefined') { + throw new Error( true ? formatProdErrorMessage(8) : undefined); + } + + if (isDispatching) { + throw new Error( true ? formatProdErrorMessage(9) : undefined); + } + + try { + isDispatching = true; + currentState = currentReducer(currentState, action); + } finally { + isDispatching = false; + } + + var listeners = currentListeners = nextListeners; + + for (var i = 0; i < listeners.length; i++) { + var listener = listeners[i]; + listener(); + } + + return action; + } + /** + * Replaces the reducer currently used by the store to calculate the state. + * + * You might need this if your app implements code splitting and you want to + * load some of the reducers dynamically. You might also need this if you + * implement a hot reloading mechanism for Redux. + * + * @param {Function} nextReducer The reducer for the store to use instead. + * @returns {void} + */ + + + function replaceReducer(nextReducer) { + if (typeof nextReducer !== 'function') { + throw new Error( true ? formatProdErrorMessage(10) : undefined); + } + + currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT. + // Any reducers that existed in both the new and old rootReducer + // will receive the previous state. This effectively populates + // the new state tree with any relevant data from the old one. + + dispatch({ + type: ActionTypes.REPLACE + }); + } + /** + * Interoperability point for observable/reactive libraries. + * @returns {observable} A minimal observable of state changes. + * For more information, see the observable proposal: + * https://github.com/tc39/proposal-observable + */ + + + function observable() { + var _ref; + + var outerSubscribe = subscribe; + return _ref = { + /** + * The minimal observable subscription method. + * @param {Object} observer Any object that can be used as an observer. + * The observer object should have a `next` method. + * @returns {subscription} An object with an `unsubscribe` method that can + * be used to unsubscribe the observable from the store, and prevent further + * emission of values from the observable. + */ + subscribe: function subscribe(observer) { + if (typeof observer !== 'object' || observer === null) { + throw new Error( true ? formatProdErrorMessage(11) : undefined); + } + + function observeState() { + if (observer.next) { + observer.next(getState()); + } + } + + observeState(); + var unsubscribe = outerSubscribe(observeState); + return { + unsubscribe: unsubscribe + }; + } + }, _ref[$$observable] = function () { + return this; + }, _ref; + } // When a store is created, an "INIT" action is dispatched so that every + // reducer returns their initial state. This effectively populates + // the initial state tree. + + + dispatch({ + type: ActionTypes.INIT + }); + return _ref2 = { + dispatch: dispatch, + subscribe: subscribe, + getState: getState, + replaceReducer: replaceReducer + }, _ref2[$$observable] = observable, _ref2; +} + +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + + + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + } catch (e) {} // eslint-disable-line no-empty + +} + +function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { + var reducerKeys = Object.keys(reducers); + var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; + + if (reducerKeys.length === 0) { + return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; + } + + if (!isPlainObject(inputState)) { + return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\""); + } + + var unexpectedKeys = Object.keys(inputState).filter(function (key) { + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; + }); + unexpectedKeys.forEach(function (key) { + unexpectedKeyCache[key] = true; + }); + if (action && action.type === ActionTypes.REPLACE) return; + + if (unexpectedKeys.length > 0) { + return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored."); + } +} + +function assertReducerShape(reducers) { + Object.keys(reducers).forEach(function (key) { + var reducer = reducers[key]; + var initialState = reducer(undefined, { + type: ActionTypes.INIT + }); + + if (typeof initialState === 'undefined') { + throw new Error( true ? formatProdErrorMessage(12) : undefined); + } + + if (typeof reducer(undefined, { + type: ActionTypes.PROBE_UNKNOWN_ACTION() + }) === 'undefined') { + throw new Error( true ? formatProdErrorMessage(13) : undefined); + } + }); +} +/** + * Turns an object whose values are different reducer functions, into a single + * reducer function. It will call every child reducer, and gather their results + * into a single state object, whose keys correspond to the keys of the passed + * reducer functions. + * + * @param {Object} reducers An object whose values correspond to different + * reducer functions that need to be combined into one. One handy way to obtain + * it is to use ES6 `import * as reducers` syntax. The reducers may never return + * undefined for any action. Instead, they should return their initial state + * if the state passed to them was undefined, and the current state for any + * unrecognized action. + * + * @returns {Function} A reducer function that invokes every reducer inside the + * passed object, and builds a state object with the same shape. + */ + + +function combineReducers(reducers) { + var reducerKeys = Object.keys(reducers); + var finalReducers = {}; + + for (var i = 0; i < reducerKeys.length; i++) { + var key = reducerKeys[i]; + + if (false) {} + + if (typeof reducers[key] === 'function') { + finalReducers[key] = reducers[key]; + } + } + + var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same + // keys multiple times. + + var unexpectedKeyCache; + + if (false) {} + + var shapeAssertionError; + + try { + assertReducerShape(finalReducers); + } catch (e) { + shapeAssertionError = e; + } + + return function combination(state, action) { + if (state === void 0) { + state = {}; + } + + if (shapeAssertionError) { + throw shapeAssertionError; + } + + if (false) { var warningMessage; } + + var hasChanged = false; + var nextState = {}; + + for (var _i = 0; _i < finalReducerKeys.length; _i++) { + var _key = finalReducerKeys[_i]; + var reducer = finalReducers[_key]; + var previousStateForKey = state[_key]; + var nextStateForKey = reducer(previousStateForKey, action); + + if (typeof nextStateForKey === 'undefined') { + var actionType = action && action.type; + throw new Error( true ? formatProdErrorMessage(14) : undefined); + } + + nextState[_key] = nextStateForKey; + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; + } + + hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length; + return hasChanged ? nextState : state; + }; +} + +function bindActionCreator(actionCreator, dispatch) { + return function () { + return dispatch(actionCreator.apply(this, arguments)); + }; +} +/** + * Turns an object whose values are action creators, into an object with the + * same keys, but with every function wrapped into a `dispatch` call so they + * may be invoked directly. This is just a convenience method, as you can call + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. + * + * For convenience, you can also pass an action creator as the first argument, + * and get a dispatch wrapped function in return. + * + * @param {Function|Object} actionCreators An object whose values are action + * creator functions. One handy way to obtain it is to use ES6 `import * as` + * syntax. You may also pass a single function. + * + * @param {Function} dispatch The `dispatch` function available on your Redux + * store. + * + * @returns {Function|Object} The object mimicking the original object, but with + * every action creator wrapped into the `dispatch` call. If you passed a + * function as `actionCreators`, the return value will also be a single + * function. + */ + + +function bindActionCreators(actionCreators, dispatch) { + if (typeof actionCreators === 'function') { + return bindActionCreator(actionCreators, dispatch); + } + + if (typeof actionCreators !== 'object' || actionCreators === null) { + throw new Error( true ? formatProdErrorMessage(16) : undefined); + } + + var boundActionCreators = {}; + + for (var key in actionCreators) { + var actionCreator = actionCreators[key]; + + if (typeof actionCreator === 'function') { + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); + } + } + + return boundActionCreators; +} + +/** + * Composes single-argument functions from right to left. The rightmost + * function can take multiple arguments as it provides the signature for + * the resulting composite function. + * + * @param {...Function} funcs The functions to compose. + * @returns {Function} A function obtained by composing the argument functions + * from right to left. For example, compose(f, g, h) is identical to doing + * (...args) => f(g(h(...args))). + */ +function compose() { + for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { + funcs[_key] = arguments[_key]; + } + + if (funcs.length === 0) { + return function (arg) { + return arg; + }; + } + + if (funcs.length === 1) { + return funcs[0]; + } + + return funcs.reduce(function (a, b) { + return function () { + return a(b.apply(void 0, arguments)); + }; + }); +} + +/** + * Creates a store enhancer that applies middleware to the dispatch method + * of the Redux store. This is handy for a variety of tasks, such as expressing + * asynchronous actions in a concise manner, or logging every action payload. + * + * See `redux-thunk` package as an example of the Redux middleware. + * + * Because middleware is potentially asynchronous, this should be the first + * store enhancer in the composition chain. + * + * Note that each middleware will be given the `dispatch` and `getState` functions + * as named arguments. + * + * @param {...Function} middlewares The middleware chain to be applied. + * @returns {Function} A store enhancer applying the middleware. + */ + +function applyMiddleware() { + for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) { + middlewares[_key] = arguments[_key]; + } + + return function (createStore) { + return function () { + var store = createStore.apply(void 0, arguments); + + var _dispatch = function dispatch() { + throw new Error( true ? formatProdErrorMessage(15) : undefined); + }; + + var middlewareAPI = { + getState: store.getState, + dispatch: function dispatch() { + return _dispatch.apply(void 0, arguments); + } + }; + var chain = middlewares.map(function (middleware) { + return middleware(middlewareAPI); + }); + _dispatch = compose.apply(void 0, chain)(store.dispatch); + return Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, store), {}, { + dispatch: _dispatch + }); + }; + }; +} + +/* + * This is a dummy function to check if the function name has been altered by minification. + * If the function has been minified and NODE_ENV !== 'production', warn the user. + */ + +function isCrushed() {} + +if (false) {} + + + + /***/ }), /***/ "fdqf": @@ -287905,8 +297324,8 @@ var WebviewIntentProvider = function WebviewIntentProvider(_ref2) { var setBarWebviewContext = setBarContext || getBarInitAPI(); (0, _react.useEffect)(function () { - !connection && !webviewService && isValidEnv() && getConnection(setConnection, methods); - }, [connection, webviewService]); + !connection && !webviewService && isValidEnv() && getConnection(setConnection, methods).catch(log); + }, [connection, webviewService, methods]); (0, _react.useEffect)(function () { !service && connection && setService(new _api.WebviewService(connection)); }, [service, connection]); @@ -288834,6 +298253,43 @@ var LoginUriView = /*#__PURE__*/function () { /***/ }), +/***/ "g4Do": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__("pVnL")); + +var _react = _interopRequireDefault(__webpack_require__("q1tI")); + +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/cloud.svg` to regenerate; +function SvgCloud(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("path", { + d: "M164 261a4 4 0 118 0 4 4 0 110 8h-8a4 4 0 110-8zm1.146 3.854c.155.154.423.368.793.58.618.353 1.31.566 2.061.566.75 0 1.443-.213 2.06-.566.371-.212.64-.426.794-.58a.5.5 0 10-.708-.708 2.934 2.934 0 01-.582.42A3.136 3.136 0 01168 265a3.136 3.136 0 01-1.564-.434 2.934 2.934 0 01-.582-.42.5.5 0 10-.708.708z", + id: "cloud_svg__a" + })), /*#__PURE__*/_react.default.createElement("g", { + fillRule: "evenodd", + transform: "translate(-160 -255)" + }, /*#__PURE__*/_react.default.createElement("use", { + xlinkHref: "#cloud_svg__a" + }))); +} + +var _default = SvgCloud; +exports.default = _default; + +/***/ }), + /***/ "g4EE": /***/ (function(module, exports, __webpack_require__) { @@ -288849,6 +298305,139 @@ module.exports = function (hint) { }; +/***/ }), + +/***/ "g4K+": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cozyFetchJSON", function() { return cozyFetchJSON; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getIntents", function() { return getIntents; }); +/* harmony import */ var _stack_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("cePo"); +/** + * This file served as a proxy between the old internal stack client from the + * bar and the new stack-client included in cozy-client. It is no longer + * necessary as there is no more internal-client. It is there only temporarily + * and should be removed as soon as possible. + * + * @TODO remove this and update the tests. + */ + +/** + * Reference to the current client depending + * on which one has been initialized + * + * @private + */ + +var stack; +/** + * Get the current stack client (legacy or cozy-client based) + * based on which one has been initialized + * + * @returns {Object} functions to call the stack + */ + +var current = function current() { + if (!stack) { + throw new Error('client not initialized in cozy-bar'); + } + + return stack; +}; +/** + * Initializes the functions to call the cozy stack + * + * It can be initialized either with a cozy-client instance + * or a { cozyURL, ssl, token } tupple. + * + * @function + * @param {Object} arg + * @param {Object} arg.cozyClient - a cozy client instance + * @param {string} arg.cozyURL - URL or domain of the stack + * @param {boolean} arg.ssl - Tells if we should use a secure protocol + * required if cozyURL does not have a protocol + * @param {string} arg.token - Access token for the stack + * @param {Function} arg.onCreateApp + * @param {Function} arg.onDeleteApp + * @param {Boolean} arg.isPublic + * @returns {Promise} + */ + + +var init = function init(options) { + stack = _stack_client__WEBPACK_IMPORTED_MODULE_0__["default"]; + return stack.init(options); +}; + +var get = { + app: function app() { + var _current$get; + + return (_current$get = current().get).app.apply(_current$get, arguments); + }, + apps: function apps() { + var _current$get2; + + return (_current$get2 = current().get).apps.apply(_current$get2, arguments); + }, + context: function context() { + var _current$get3; + + return (_current$get3 = current().get).context.apply(_current$get3, arguments); + }, + storageData: function storageData() { + var _current$get4; + + return (_current$get4 = current().get).storageData.apply(_current$get4, arguments); + }, + iconProps: function iconProps() { + var _current$get5; + + return (_current$get5 = current().get).iconProps.apply(_current$get5, arguments); + }, + cozyURL: function cozyURL() { + var _current$get6; + + return (_current$get6 = current().get).cozyURL.apply(_current$get6, arguments); + }, + settingsAppURL: function settingsAppURL() { + var _current$get7; + + return (_current$get7 = current().get).settingsAppURL.apply(_current$get7, arguments); + } +}; +var stackProxy = { + init: init, + get: get, + updateAccessToken: function updateAccessToken() { + var _current; + + return (_current = current()).updateAccessToken.apply(_current, arguments); + }, + logout: function logout() { + var _current2; + + return (_current2 = current()).logout.apply(_current2, arguments); + }, + cozyFetchJSON: function cozyFetchJSON() { + var _current3; + + return (_current3 = current()).cozyFetchJSON.apply(_current3, arguments); + }, + // useful to connect some getters outside of this file without exposing + // directly the private stack variable + getStack: current, + getIntents: function getIntents() { + return current().get.intents(); + } +}; +/* harmony default export */ __webpack_exports__["default"] = (stackProxy); +var cozyFetchJSON = stackProxy.cozyFetchJSON, + getIntents = stackProxy.getIntents; + + /***/ }), /***/ "g4R6": @@ -289817,6 +299406,58 @@ function buildDistanceInWordsLocale () { module.exports = buildDistanceInWordsLocale +/***/ }), + +/***/ "gKR3": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createMigrate; }); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1iYv"); + + +function createMigrate(migrations, config) { + var _ref = config || {}, + debug = _ref.debug; + + return function (state, currentVersion) { + if (!state) { + if (false) {} + return Promise.resolve(undefined); + } + + var inboundVersion = state._persist && state._persist.version !== undefined ? state._persist.version : _constants__WEBPACK_IMPORTED_MODULE_0__["DEFAULT_VERSION"]; + if (inboundVersion === currentVersion) { + if (false) {} + return Promise.resolve(state); + } + if (inboundVersion > currentVersion) { + if (false) {} + return Promise.resolve(state); + } + + var migrationKeys = Object.keys(migrations).map(function (ver) { + return parseInt(ver); + }).filter(function (key) { + return currentVersion >= key && key > inboundVersion; + }).sort(function (a, b) { + return a - b; + }); + + if (false) {} + try { + var migratedState = migrationKeys.reduce(function (state, versionKey) { + if (false) {} + return migrations[versionKey](state); + }, state); + return Promise.resolve(migratedState); + } catch (err) { + return Promise.reject(err); + } + }; +} + /***/ }), /***/ "gMwc": @@ -293834,6 +303475,111 @@ var $export = __webpack_require__("XKFU"); $export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); +/***/ }), + +/***/ "h/bp": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("lwsE"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("W8MJ"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("7W2i"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("a1gu"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Nsbk"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("pVnL"); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("PI/G"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var cozy_ui_transpiled_react_AppIcon__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("rvOC"); +/* harmony import */ var cozy_ui_transpiled_react_AppIcon__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_AppIcon__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var _lib_stack__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("g4K+"); + + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + +/* Generated with node_modules/.bin/svgr src/assets/sprites/icon-cozy-home.svg */ + +function SvgIconCozyHome(props) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("svg", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_5___default()({ + width: 32, + height: 32 + }, props), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("g", { + fill: "none", + fillRule: "evenodd" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("circle", { + fill: "#297EF2", + fillRule: "nonzero", + cx: 16, + cy: 16, + r: 16 + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("path", { + d: "M19.314 17.561a.555.555 0 01-.82.12 4.044 4.044 0 01-2.499.862 4.04 4.04 0 01-2.494-.86.557.557 0 01-.815-.12.547.547 0 01.156-.748c.214-.14.229-.421.229-.424a.555.555 0 01.176-.385.504.504 0 01.386-.145.544.544 0 01.528.553c0 .004 0 .153-.054.36a2.954 2.954 0 003.784-.008 1.765 1.765 0 01-.053-.344.546.546 0 01.536-.561h.01c.294 0 .538.237.545.532 0 0 .015.282.227.422a.544.544 0 01.158.746m2.322-6.369a5.94 5.94 0 00-1.69-3.506A5.651 5.651 0 0015.916 6a5.648 5.648 0 00-4.029 1.687 5.936 5.936 0 00-1.691 3.524 5.677 5.677 0 00-3.433 1.737 5.966 5.966 0 00-1.643 4.137C5.12 20.347 7.704 23 10.882 23h10.236c3.176 0 5.762-2.653 5.762-5.915 0-3.083-2.31-5.623-5.244-5.893", + fill: "#FFF" + }))); +} + +var IconCozyHome = /*#__PURE__*/function (_PureComponent) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default()(IconCozyHome, _PureComponent); + + var _super = _createSuper(IconCozyHome); + + function IconCozyHome() { + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, IconCozyHome); + + return _super.apply(this, arguments); + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(IconCozyHome, [{ + key: "render", + value: function render() { + var _this$props = this.props, + className = _this$props.className, + isInvertedTheme = _this$props.isInvertedTheme; + + var fetchIcon = function fetchIcon() { + if (isInvertedTheme) { + return "".concat(_lib_stack__WEBPACK_IMPORTED_MODULE_9__["default"].get.cozyURL(), "/assets/images/icon-cozy-home-inverted.svg"); + } + + return "".concat(_lib_stack__WEBPACK_IMPORTED_MODULE_9__["default"].get.cozyURL(), "/assets/images/icon-cozy-home.svg"); + }; + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(cozy_ui_transpiled_react_AppIcon__WEBPACK_IMPORTED_MODULE_8___default.a, { + fetchIcon: fetchIcon, + fallbackIcon: SvgIconCozyHome, + className: className + }); + } + }]); + + return IconCozyHome; +}(react__WEBPACK_IMPORTED_MODULE_6__["PureComponent"]); + +IconCozyHome.propTypes = { + className: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, + isInvertedTheme: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool +}; +/* harmony default export */ __webpack_exports__["default"] = (IconCozyHome); + /***/ }), /***/ "h2xr": @@ -293993,6 +303739,110 @@ const bisectCenter = Object(_bisector_js__WEBPACK_IMPORTED_MODULE_1__["default"] /* harmony default export */ __webpack_exports__["default"] = (bisectRight); +/***/ }), + +/***/ "h8u/": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setContent", function() { return setContent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unsetContent", function() { return unsetContent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLocale", function() { return setLocale; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTheme", function() { return setTheme; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setWebviewContext", function() { return setWebviewContext; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fetchApps", function() { return fetchApps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setInfos", function() { return setInfos; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fetchSettingsData", function() { return fetchSettingsData; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logOut", function() { return logOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fetchContext", function() { return fetchContext; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getContent", function() { return getContent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocale", function() { return getLocale; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTheme", function() { return getTheme; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getApps", function() { return getApps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHomeApp", function() { return getHomeApp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFetchingApps", function() { return isFetchingApps; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isCurrentApp", function() { return isCurrentApp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasFetched", function() { return hasFetched; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getStorageData", function() { return getStorageData; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSettingsAppURL", function() { return getSettingsAppURL; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSettingsBusy", function() { return isSettingsBusy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFetchingSettings", function() { return isFetchingSettings; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHelpLink", function() { return getHelpLink; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClaudyActions", function() { return getClaudyActions; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shouldEnableClaudy", function() { return shouldEnableClaudy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getWebviewContext", function() { return getWebviewContext; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onRealtimeCreate", function() { return onRealtimeCreate; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onRealtimeDelete", function() { return onRealtimeDelete; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reducers", function() { return reducers; }); +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fd+0"); +/* harmony import */ var _content__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("xSz2"); +/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("1mGG"); +/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("Thmn"); +/* harmony import */ var _unserializable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("fR9/"); +/* harmony import */ var _apps__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("YQzf"); +/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("3kqD"); +/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("oIfa"); + + + + + + + + + +var proxy = function proxy(attr, method) { + return function (state) { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + return method.apply(void 0, [state[attr]].concat(args)); + }; +}; + +var setContent = _content__WEBPACK_IMPORTED_MODULE_1__["setContent"]; +var unsetContent = _content__WEBPACK_IMPORTED_MODULE_1__["unsetContent"]; +var setLocale = _locale__WEBPACK_IMPORTED_MODULE_2__["setLocale"]; +var setTheme = _theme__WEBPACK_IMPORTED_MODULE_3__["setTheme"]; +var setWebviewContext = _unserializable__WEBPACK_IMPORTED_MODULE_4__["setWebviewContext"]; +var fetchApps = _apps__WEBPACK_IMPORTED_MODULE_5__["fetchApps"]; +var setInfos = _apps__WEBPACK_IMPORTED_MODULE_5__["setInfos"]; +var fetchSettingsData = _settings__WEBPACK_IMPORTED_MODULE_6__["fetchSettingsData"]; +var logOut = _settings__WEBPACK_IMPORTED_MODULE_6__["logOut"]; +var fetchContext = _context__WEBPACK_IMPORTED_MODULE_7__["fetchContext"]; + +var getContent = proxy('content', _content__WEBPACK_IMPORTED_MODULE_1__["getContent"]); +var getLocale = proxy('locale', _locale__WEBPACK_IMPORTED_MODULE_2__["getLocale"]); +var getTheme = proxy('theme', _theme__WEBPACK_IMPORTED_MODULE_3__["getTheme"]); +var getApps = proxy('apps', _apps__WEBPACK_IMPORTED_MODULE_5__["getApps"]); +var getHomeApp = proxy('apps', _apps__WEBPACK_IMPORTED_MODULE_5__["getHomeApp"]); +var isFetchingApps = proxy('apps', _apps__WEBPACK_IMPORTED_MODULE_5__["isFetchingApps"]); +var isCurrentApp = proxy('apps', _apps__WEBPACK_IMPORTED_MODULE_5__["isCurrentApp"]); +var hasFetched = proxy('apps', _apps__WEBPACK_IMPORTED_MODULE_5__["hasFetched"]); +var getStorageData = proxy('settings', _settings__WEBPACK_IMPORTED_MODULE_6__["getStorageData"]); +var getSettingsAppURL = proxy('settings', _settings__WEBPACK_IMPORTED_MODULE_6__["getSettingsAppURL"]); +var isSettingsBusy = proxy('settings', _settings__WEBPACK_IMPORTED_MODULE_6__["isSettingsBusy"]); +var isFetchingSettings = proxy('settings', _settings__WEBPACK_IMPORTED_MODULE_6__["isFetchingSettings"]); +var getHelpLink = proxy('context', _context__WEBPACK_IMPORTED_MODULE_7__["getHelpLink"]); +var getClaudyActions = proxy('context', _context__WEBPACK_IMPORTED_MODULE_7__["getClaudyActions"]); +var shouldEnableClaudy = proxy('context', _context__WEBPACK_IMPORTED_MODULE_7__["shouldEnableClaudy"]); +var getWebviewContext = proxy('unserializable', _unserializable__WEBPACK_IMPORTED_MODULE_4__["getWebviewContext"]); // realtime handlers + +var onRealtimeCreate = _apps__WEBPACK_IMPORTED_MODULE_5__["receiveApp"]; +var onRealtimeDelete = _apps__WEBPACK_IMPORTED_MODULE_5__["deleteApp"]; +var reducers = { + apps: _apps__WEBPACK_IMPORTED_MODULE_5__["default"], + content: _content__WEBPACK_IMPORTED_MODULE_1__["reducer"], + context: _context__WEBPACK_IMPORTED_MODULE_7__["default"], + locale: _locale__WEBPACK_IMPORTED_MODULE_2__["reducer"], + settings: _settings__WEBPACK_IMPORTED_MODULE_6__["default"], + theme: _theme__WEBPACK_IMPORTED_MODULE_3__["reducer"], + unserializable: _unserializable__WEBPACK_IMPORTED_MODULE_4__["reducer"] +}; +/* harmony default export */ __webpack_exports__["default"] = (Object(redux__WEBPACK_IMPORTED_MODULE_0__["combineReducers"])(reducers)); + /***/ }), /***/ "h9kl": @@ -309431,6 +319281,134 @@ __webpack_require__.r(__webpack_exports__); }); +/***/ }), + +/***/ "iw+L": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createPersistoid; }); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1iYv"); + + +// @TODO remove once flow < 0.63 support is no longer required. + +function createPersistoid(config) { + // defaults + var blacklist = config.blacklist || null; + var whitelist = config.whitelist || null; + var transforms = config.transforms || []; + var throttle = config.throttle || 0; + var storageKey = '' + (config.keyPrefix !== undefined ? config.keyPrefix : _constants__WEBPACK_IMPORTED_MODULE_0__["KEY_PREFIX"]) + config.key; + var storage = config.storage; + var serialize = config.serialize === false ? function (x) { + return x; + } : defaultSerialize; + + // initialize stateful values + var lastState = {}; + var stagedState = {}; + var keysToProcess = []; + var timeIterator = null; + var writePromise = null; + + var update = function update(state) { + // add any changed keys to the queue + Object.keys(state).forEach(function (key) { + if (!passWhitelistBlacklist(key)) return; // is keyspace ignored? noop + if (lastState[key] === state[key]) return; // value unchanged? noop + if (keysToProcess.indexOf(key) !== -1) return; // is key already queued? noop + keysToProcess.push(key); // add key to queue + }); + + //if any key is missing in the new state which was present in the lastState, + //add it for processing too + Object.keys(lastState).forEach(function (key) { + if (state[key] === undefined) { + keysToProcess.push(key); + } + }); + + // start the time iterator if not running (read: throttle) + if (timeIterator === null) { + timeIterator = setInterval(processNextKey, throttle); + } + + lastState = state; + }; + + function processNextKey() { + if (keysToProcess.length === 0) { + if (timeIterator) clearInterval(timeIterator); + timeIterator = null; + return; + } + + var key = keysToProcess.shift(); + var endState = transforms.reduce(function (subState, transformer) { + return transformer.in(subState, key, lastState); + }, lastState[key]); + + if (endState !== undefined) { + try { + stagedState[key] = serialize(endState); + } catch (err) { + console.error('redux-persist/createPersistoid: error serializing state', err); + } + } else { + //if the endState is undefined, no need to persist the existing serialized content + delete stagedState[key]; + } + + if (keysToProcess.length === 0) { + writeStagedState(); + } + } + + function writeStagedState() { + // cleanup any removed keys just before write. + Object.keys(stagedState).forEach(function (key) { + if (lastState[key] === undefined) { + delete stagedState[key]; + } + }); + + writePromise = storage.setItem(storageKey, serialize(stagedState)).catch(onWriteFail); + } + + function passWhitelistBlacklist(key) { + if (whitelist && whitelist.indexOf(key) === -1 && key !== '_persist') return false; + if (blacklist && blacklist.indexOf(key) !== -1) return false; + return true; + } + + function onWriteFail(err) { + // @TODO add fail handlers (typically storage full) + if (err && "production" !== 'production') { + console.error('Error storing data', err); + } + } + + var flush = function flush() { + while (keysToProcess.length !== 0) { + processNextKey(); + } + return writePromise || Promise.resolve(); + }; + + // return `persistoid` + return { + update: update, + flush: flush + }; +} + +// @NOTE in the future this may be exposed via config +function defaultSerialize(data) { + return JSON.stringify(data); +} + /***/ }), /***/ "iyIV": @@ -310186,6 +320164,48 @@ var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) }; +/***/ }), + +/***/ "jCC2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return autoMergeLevel1; }); +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function autoMergeLevel1(inboundState, originalState, reducedState, _ref) { + var debug = _ref.debug; + + var newState = _extends({}, reducedState); + // only rehydrate if inboundState exists and is an object + if (inboundState && (typeof inboundState === 'undefined' ? 'undefined' : _typeof(inboundState)) === 'object') { + Object.keys(inboundState).forEach(function (key) { + // ignore _persist data + if (key === '_persist') return; + // if reducer modifies substate, skip auto rehydration + if (originalState[key] !== reducedState[key]) { + if (false) {} + return; + } + // otherwise hard set the new value + newState[key] = inboundState[key]; + }); + } + + if (false) {} + + return newState; +} + +/* + autoMergeLevel1: + - merges 1 level of substate + - skips substate if already modified +*/ + /***/ }), /***/ "jDpt": @@ -315297,6 +325317,38 @@ Grow.muiSupportAuto = true; /***/ }), +/***/ "kJHp": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__("pVnL")); + +var _react = _interopRequireDefault(__webpack_require__("q1tI")); + +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/people.svg` to regenerate; +function SvgPeople(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + fillRule: "evenodd", + d: "M8 9c2.21 0 4-2.015 4-4.5S10.21 0 8 0 4 2.015 4 4.5 5.79 9 8 9zm-8 5c0-1 2-4 4-4s1 1 4 1 2-1 4-1 4 3 4 4 0 2-1 2H1c-1 0-1-1-1-2z" + })); +} + +var _default = SvgPeople; +exports.default = _default; + +/***/ }), + /***/ "kJMx": /***/ (function(module, exports, __webpack_require__) { @@ -316444,6 +326496,171 @@ class BrowserClient extends _sentry_core__WEBPACK_IMPORTED_MODULE_0__["BaseClien //# sourceMappingURL=client.js.map +/***/ }), + +/***/ "kYDj": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppsContent", function() { return AppsContent; }); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("lwsE"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("W8MJ"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("7W2i"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("a1gu"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("Nsbk"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("p2W/"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("PI/G"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("buk/"); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("y6ex"); +/* harmony import */ var cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Cloud__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("g4Do"); +/* harmony import */ var cozy_ui_transpiled_react_Icons_Cloud__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Icons_Cloud__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var cozy_ui_transpiled_react_helpers_withBreakpoints__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("ufaa"); +/* harmony import */ var cozy_ui_transpiled_react_helpers_withBreakpoints__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_helpers_withBreakpoints__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var _lib_reducers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("h8u/"); +/* harmony import */ var _AppItem__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("aJbG"); +/* harmony import */ var _AppItemPlaceholder__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("rMf1"); + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + + + + + + + + +var sorter = function sorter(fn) { + return function (itemA, itemB) { + return fn(itemA) > fn(itemB); + }; +}; + +var AppsContent = /*#__PURE__*/function (_Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_2___default()(AppsContent, _Component); + + var _super = _createSuper(AppsContent); + + function AppsContent(props, context) { + var _this; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, AppsContent); + + _this = _super.call(this, props, context); + _this.translateApp = translateApp(_this.props.t); + return _this; + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(AppsContent, [{ + key: "render", + value: function render() { + var _this$props = this.props, + t = _this$props.t, + apps = _this$props.apps, + breakpoints = _this$props.breakpoints, + homeApp = _this$props.homeApp, + isFetchingApps = _this$props.isFetchingApps, + onAppSwitch = _this$props.onAppSwitch, + isInvertedTheme = _this$props.isInvertedTheme; + var isMobile = breakpoints.isMobile; + var isHomeApp = homeApp && homeApp.isCurrentApp; + var homeSlug = homeApp && homeApp.slug; + + if (!isFetchingApps && (!apps || !apps.length)) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("p", { + className: "coz-nav--error coz-nav-group" + }, t('no_apps')); + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("div", { + className: "coz-nav-pop-content" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("ul", { + className: "coz-nav-group" + }, isMobile && homeApp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_AppItem__WEBPACK_IMPORTED_MODULE_13__["default"], { + app: homeApp, + useHomeIcon: true, + onAppSwitch: onAppSwitch, + isInvertedTheme: isInvertedTheme + }), isFetchingApps ? new Array(3).fill({}).map(function (nothing, index) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_AppItemPlaceholder__WEBPACK_IMPORTED_MODULE_14__["default"], { + key: index + }); + }) : apps.filter(function (app) { + return app.slug !== homeSlug; + }).sort(sorter(this.translateApp)).map(function (app, index) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_AppItem__WEBPACK_IMPORTED_MODULE_13__["default"], { + app: app, + key: index, + onAppSwitch: onAppSwitch, + isInvertedTheme: isInvertedTheme + }); + })), homeApp && !isMobile && !isHomeApp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("a", { + role: "menuitem", + href: homeApp.href, + className: "coz-apps-home-btn" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(cozy_ui_transpiled_react_Icon__WEBPACK_IMPORTED_MODULE_9___default.a, { + icon: cozy_ui_transpiled_react_Icons_Cloud__WEBPACK_IMPORTED_MODULE_10___default.a + }), t('menu.home'))); + } + }]); + + return AppsContent; +}(react__WEBPACK_IMPORTED_MODULE_5__["Component"]); +AppsContent.propTypes = { + homeApp: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.shape({ + isCurrentApp: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool, + slug: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string, + href: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string + }), + apps: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.array, + isFetchingApps: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool.isRequired, + onAppSwitch: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func, + isInvertedTheme: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool +}; + +var translateApp = function translateApp(t) { + return function (app) { + var namePrefix = app.namePrefix ? t("".concat(app.slug, ".namePrefix"), { + _: app.namePrefix + }) : null; + var name = t("".concat(app.slug, ".name"), { + _: app.name + }); + return namePrefix ? "".concat(namePrefix, " ").concat(name) : "".concat(name); + }; +}; + +var mapStateToProps = function mapStateToProps(state) { + return { + apps: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_12__["getApps"])(state), + homeApp: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_12__["getHomeApp"])(state), + isFetchingApps: Object(_lib_reducers__WEBPACK_IMPORTED_MODULE_12__["isFetchingApps"])(state) + }; +}; + +/* harmony default export */ __webpack_exports__["default"] = (Object(react_redux__WEBPACK_IMPORTED_MODULE_6__["connect"])(mapStateToProps)(Object(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_8__["translate"])()(cozy_ui_transpiled_react_helpers_withBreakpoints__WEBPACK_IMPORTED_MODULE_11___default()()(AppsContent)))); + /***/ }), /***/ "kaRY": @@ -326068,6 +336285,32 @@ __decorate([Object(_misc_sequentialize__WEBPACK_IMPORTED_MODULE_27__["sequential /***/ }), +/***/ "lNS+": +/***/ (function(module, exports, __webpack_require__) { + + +var content = __webpack_require__("6jB5"); + +if(typeof content === 'string') content = [[module.i, content, '']]; + +var transform; +var insertInto; + + + +var options = {"hmr":true} + +options.transform = transform +options.insertInto = undefined; + +var update = __webpack_require__("aET+")(content, options); + +if(content.locals) module.exports = content.locals; + +if(false) {} + +/***/ }), + /***/ "lO0E": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -340060,6 +350303,37 @@ module.exports = function (it) { }; +/***/ }), + +/***/ "neDe": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapDispatchToPropsIsFunction", function() { return whenMapDispatchToPropsIsFunction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapDispatchToPropsIsMissing", function() { return whenMapDispatchToPropsIsMissing; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapDispatchToPropsIsObject", function() { return whenMapDispatchToPropsIsObject; }); +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fd+0"); +/* harmony import */ var _wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("QNwn"); + + +function whenMapDispatchToPropsIsFunction(mapDispatchToProps) { + return typeof mapDispatchToProps === 'function' ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__["wrapMapToPropsFunc"])(mapDispatchToProps, 'mapDispatchToProps') : undefined; +} +function whenMapDispatchToPropsIsMissing(mapDispatchToProps) { + return !mapDispatchToProps ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__["wrapMapToPropsConstant"])(function (dispatch) { + return { + dispatch: dispatch + }; + }) : undefined; +} +function whenMapDispatchToPropsIsObject(mapDispatchToProps) { + return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__["wrapMapToPropsConstant"])(function (dispatch) { + return Object(redux__WEBPACK_IMPORTED_MODULE_0__["bindActionCreators"])(mapDispatchToProps, dispatch); + }) : undefined; +} +/* harmony default export */ __webpack_exports__["default"] = ([whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject]); + /***/ }), /***/ "nh4g": @@ -345542,6 +355816,168 @@ var FolderData = function FolderData(response, userId) { /***/ }), +/***/ "oIfa": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHelpLink", function() { return getHelpLink; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClaudyActions", function() { return getClaudyActions; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shouldEnableClaudy", function() { return shouldEnableClaudy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fetchContext", function() { return fetchContext; }); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("MVZn"); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("o0o1"); +/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("yXPU"); +/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("g4K+"); +/* harmony import */ var _config_claudyActions_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("aXhX"); +var _config_claudyActions_json__WEBPACK_IMPORTED_MODULE_4___namespace = /*#__PURE__*/__webpack_require__.t("aXhX", 1); +/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("3kqD"); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("mgfL"); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(cozy_flags__WEBPACK_IMPORTED_MODULE_6__); + + + + + + + +var FETCH_CONTEXT = 'FETCH_CONTEXT'; +var FETCH_CONTEXT_SUCCESS = 'FETCH_CONTEXT_SUCCESS'; +var RECEIVE_NO_CONTEXT = 'RECEIVE_NO_CONTEXT'; // selectors + +var getHelpLink = function getHelpLink(state) { + return state.helpLink; +}; +var getClaudyActions = function getClaudyActions(state) { + return state.claudyActions; +}; +var shouldEnableClaudy = function shouldEnableClaudy(state) { + var claudyActions = getClaudyActions(state); + return !!claudyActions && !!claudyActions.length; +}; // actions + +var fetchContext = function fetchContext() { + return /*#__PURE__*/function () { + var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function _callee(dispatch, getState) { + var context; + return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + dispatch({ + type: FETCH_CONTEXT + }); + + if (!getState().context.contextNotExist) { + _context.next = 3; + break; + } + + return _context.abrupt("return", dispatch({ + type: FETCH_CONTEXT_SUCCESS, + context: null + })); + + case 3: + _context.prev = 3; + _context.next = 6; + return _stack__WEBPACK_IMPORTED_MODULE_3__["default"].get.context(); + + case 6: + context = _context.sent; + return _context.abrupt("return", dispatch({ + type: FETCH_CONTEXT_SUCCESS, + context: context + })); + + case 10: + _context.prev = 10; + _context.t0 = _context["catch"](3); + + if (_context.t0.status && _context.t0.status === 404) { + dispatch({ + type: RECEIVE_NO_CONTEXT + }); + } // eslint-disable-next-line no-console + + + console.warn('Cannot get Cozy context'); + return _context.abrupt("return", null); + + case 15: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[3, 10]]); + })); + + return function (_x, _x2) { + return _ref.apply(this, arguments); + }; + }(); +}; // reducers + +var defaultState = { + claudyActions: [], + contextNotExist: false, + helpLink: null, + isFetching: false +}; + +var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState; + var action = arguments.length > 1 ? arguments[1] : undefined; + + switch (action.type) { + case FETCH_CONTEXT: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + isFetching: true + }); + + case FETCH_CONTEXT_SUCCESS: + { + var attr = action.context && action.context.data && action.context.data.attributes; + var contextActions = cozy_flags__WEBPACK_IMPORTED_MODULE_6___default()('bar.claudy.force-all-actions') ? Object.keys(_config_claudyActions_json__WEBPACK_IMPORTED_MODULE_4__) : attr && attr['claudy_actions']; // get an arrays of action + + var claudyActions = contextActions.map(function (slug) { + if (_config_claudyActions_json__WEBPACK_IMPORTED_MODULE_4__.hasOwnProperty(slug)) { + // adding also the action slug + return Object.assign({}, _config_claudyActions_json__WEBPACK_IMPORTED_MODULE_4__[slug], { + slug: slug + }); + } + }).filter(function (action) { + return action; + }); + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + helpLink: attr && attr['help_link'] || null, + claudyActions: claudyActions, + isFetching: false, + contextNotExist: false + }); + } + + case RECEIVE_NO_CONTEXT: + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, state, { + contextNotExist: true + }); + + case _settings__WEBPACK_IMPORTED_MODULE_5__["LOG_OUT"]: + return defaultState; + + default: + return state; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (reducer); + +/***/ }), + /***/ "oJ5p": /***/ (function(module, exports, __webpack_require__) { @@ -353062,6 +363498,29 @@ function _update(s, w, bytes) { } +/***/ }), + +/***/ "p2W/": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _components_Provider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("TqiU"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Provider", function() { return _components_Provider__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createProvider", function() { return _components_Provider__WEBPACK_IMPORTED_MODULE_0__["createProvider"]; }); + +/* harmony import */ var _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("KdTy"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "connectAdvanced", function() { return _components_connectAdvanced__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _connect_connect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("QSai"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "connect", function() { return _connect_connect__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + + + + + + /***/ }), /***/ "p39L": @@ -354364,6 +364823,58 @@ function isAfter (dirtyDate, dirtyDateToCompare) { module.exports = isAfter +/***/ }), + +/***/ "pEUm": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return autoMergeLevel2; }); +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function autoMergeLevel2(inboundState, originalState, reducedState, _ref) { + var debug = _ref.debug; + + var newState = _extends({}, reducedState); + // only rehydrate if inboundState exists and is an object + if (inboundState && (typeof inboundState === 'undefined' ? 'undefined' : _typeof(inboundState)) === 'object') { + Object.keys(inboundState).forEach(function (key) { + // ignore _persist data + if (key === '_persist') return; + // if reducer modifies substate, skip auto rehydration + if (originalState[key] !== reducedState[key]) { + if (false) {} + return; + } + if (isPlainEnoughObject(reducedState[key])) { + // if object is plain enough shallow merge the new values (hence "Level2") + newState[key] = _extends({}, newState[key], inboundState[key]); + return; + } + // otherwise hard set + newState[key] = inboundState[key]; + }); + } + + if (false) {} + + return newState; +} + +/* + autoMergeLevel2: + - merges 2 level of substate + - skips substate if already modified + - this is essentially redux-perist v4 behavior +*/ + +function isPlainEnoughObject(o) { + return o !== null && !Array.isArray(o) && (typeof o === 'undefined' ? 'undefined' : _typeof(o)) === 'object'; +} + /***/ }), /***/ "pF7D": @@ -357753,6 +368264,91 @@ function basename(path, ext) { //# sourceMappingURL=path.js.map +/***/ }), + +/***/ "paaR": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.removeQueryString = exports.buildRedirectionURL = exports.pickService = exports.errorSerializer = void 0; + +// helper to serialize/deserialize an error for/from postMessage +var errorSerializer = function () { + var mapErrorProperties = function mapErrorProperties(from, to) { + var result = Object.assign(to, from); + var nativeProperties = ['name', 'message']; + return nativeProperties.reduce(function (result, property) { + if (from[property]) { + to[property] = from[property]; + } + + return result; + }, result); + }; + + return { + serialize: function serialize(error) { + return mapErrorProperties(error, {}); + }, + deserialize: function deserialize(data) { + return mapErrorProperties(data, new Error(data.message)); + } + }; +}(); +/** + * + * Returns the first service from the services in the intent. + * Throws if service not found. + * + * If filterServices is passed, the first service matching filterServices + * is returned. + * + * In the future, users will have to pick the desired service from a list. + * + */ + + +exports.errorSerializer = errorSerializer; + +var pickService = function pickService(intent, filterServices) { + var services = intent.attributes.services || []; + var service = filterServices ? services.find(filterServices) : services[0]; + + if (!service) { + throw new Error('Unable to find a service'); + } + + return service; +}; + +exports.pickService = pickService; + +var buildRedirectionURL = function buildRedirectionURL(url, data) { + var isSerializable = function isSerializable(value) { + return !['object', 'function'].includes(typeof value); + }; + + var parameterStrings = Object.keys(data).filter(function (key) { + return isSerializable(data[key]); + }).map(function (key) { + return "".concat(key, "=").concat(data[key]); + }); + return parameterStrings.length ? "".concat(url, "?").concat(parameterStrings.join('&')) : url; +}; + +exports.buildRedirectionURL = buildRedirectionURL; + +var removeQueryString = function removeQueryString(url) { + return url.replace(/\?[^/#]*/, ''); +}; + +exports.removeQueryString = removeQueryString; + /***/ }), /***/ "pb3N": @@ -358537,6 +369133,27 @@ __webpack_require__.r(__webpack_exports__); }); +/***/ }), + +/***/ "psFn": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return persistCombineReducers; }); +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fd+0"); +/* harmony import */ var _persistReducer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("yZDF"); +/* harmony import */ var _stateReconciler_autoMergeLevel2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("pEUm"); + + + + +// combineReducers + persistReducer with stateReconciler defaulted to autoMergeLevel2 +function persistCombineReducers(config, reducers) { + config.stateReconciler = config.stateReconciler === undefined ? _stateReconciler_autoMergeLevel2__WEBPACK_IMPORTED_MODULE_2__["default"] : config.stateReconciler; + return Object(_persistReducer__WEBPACK_IMPORTED_MODULE_1__["default"])(config, Object(redux__WEBPACK_IMPORTED_MODULE_0__["combineReducers"])(reducers)); +} + /***/ }), /***/ "pt56": @@ -364862,6 +375479,132 @@ function formatDecimalParts(x, p) { } +/***/ }), + +/***/ "qnYc": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("lwsE")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("W8MJ")); + +/* eslint no-console: ["error", { allow: ["warn", "error"] }] */ +var intentTypeRx = /intent-(.*):(.*)/; +/** + * Listens to `message` DOM events for the specific intent and + * forwards them to callbacks passed in options. + * + * Will throw if an event is received and no ready message + * has been received first. + */ + +var IntentListener = +/*#__PURE__*/ +function () { + function IntentListener(options) { + (0, _classCallCheck2.default)(this, IntentListener); + this.state = { + handshaken: false + }; + this.options = options; + this.handleMessageWrapper = this.handleMessageWrapper.bind(this); + } + + (0, _createClass2.default)(IntentListener, [{ + key: "handleMessage", + value: function handleMessage(event) { + if (event.origin !== this.options.origin) { + return; + } + + var eventType = event.data.type; + + if (eventType === 'load') { + // Safari 9.1 (At least) send a MessageEvent when the iframe loads, + // making the handshake fails. + console.warn && console.warn('Cozy Client ignored MessageEvent having data.type `load`.'); + return; + } + + var parts = intentTypeRx.exec(eventType); + + if (!parts) { + console.warn("intents: Message type ".concat(eventType, " not matching intent format")); + return; + } + + var id = parts[1]; + assert(id == this.options.intentId, 'Invalid event id', "eventId: ".concat(id, " != listener eventId ").concat(this.options.intentId)); + var subtype = parts[2]; + + if (subtype !== 'ready') { + assert(this.state.handshaken, 'Unexpected handshake message from intent service'); + } else { + this.state.handshaken = true; + } + + var handler = this.options['on' + capitalize(subtype)]; + + if (handler) { + return handler(event); + } else { + console.warn("intents: Unhandled event ".concat(subtype)); + } + } + /** + * Primary handler for DOM messages. Passes any thrown error from + * the real message handler to the options.onError callback. + */ + + }, { + key: "handleMessageWrapper", + value: function handleMessageWrapper(ev) { + try { + this.handleMessage(ev); + } catch (e) { + this.options.onError(e); + } + } + }, { + key: "listen", + value: function listen() { + window.addEventListener('message', this.handleMessageWrapper); + } + }, { + key: "stopListening", + value: function stopListening() { + window.removeEventListener('message', this.handleMessageWrapper); + } + }]); + return IntentListener; +}(); + +exports.default = IntentListener; + +var assert = function assert(cond, msg, extraMsg) { + if (!cond) { + if (extraMsg) { + console.warn(extraMsg); + } + + throw new Error(msg); + } +}; + +var capitalize = function capitalize(str) { + return str[0].toUpperCase() + str.slice(1); +}; + /***/ }), /***/ "qncB": @@ -365495,6 +376238,146 @@ __webpack_require__.r(__webpack_exports__); }); +/***/ }), + +/***/ "r70G": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.start = void 0; + +var _helpers = __webpack_require__("paaR"); + +function listenClientData(intent, window) { + return new Promise(function (resolve) { + var messageEventListener = function messageEventListener(event) { + if (event.origin !== intent.attributes.client) return; + window.removeEventListener('message', messageEventListener); + resolve(event.data); + }; + + window.addEventListener('message', messageEventListener); + window.parent.postMessage({ + type: "intent-".concat(intent._id, ":ready") + }, intent.attributes.client); + }); +} // maximize the height of an element + + +function maximize(element) { + if (element && element.style) { + element.style.height = '100%'; + } +} + +var start = function start(request) { + return function (intentIdArg, serviceWindowArg) { + var serviceWindow = serviceWindowArg || typeof window !== 'undefined' && window; + + if (!serviceWindow || !serviceWindow.document) { + return Promise.reject(new Error('Intent service should be used in browser')); + } // Maximize document, the whole iframe is handled by intents, clients and + // services + + + serviceWindow.addEventListener('load', function () { + var document = serviceWindow.document; + [document.documentElement, document.body].forEach(maximize); + }); + var intentId = intentIdArg || serviceWindow.location.search.split('=')[1]; + if (!intentId) return Promise.reject(new Error('Cannot retrieve intent from URL')); + return request.get(intentId).then(function (intent) { + var terminated = false; + + var sendMessage = function sendMessage(message) { + if (terminated) throw new Error('Intent service has already been terminated'); + serviceWindow.parent.postMessage(message, intent.attributes.client); + }; + + var compose = function compose(action, doctype, data) { + return new Promise(function (resolve) { + var composeEventListener = function composeEventListener(event) { + if (event.origin !== intent.attributes.client) return; + serviceWindow.removeEventListener('message', composeEventListener); + return resolve(event.data); + }; + + serviceWindow.addEventListener('message', composeEventListener); + sendMessage({ + type: "intent-".concat(intent._id, ":compose"), + action: action, + doctype: doctype, + data: data + }); + }); + }; + + var _terminate = function terminate(message) { + sendMessage(message); + terminated = true; + }; + + var resizeClient = function resizeClient(dimensions, transitionProperty) { + if (terminated) throw new Error('Intent service has been terminated'); + sendMessage({ + type: "intent-".concat(intent._id, ":resize"), + // if a dom element is passed, calculate its size + dimensions: dimensions.element ? Object.assign({}, dimensions, { + maxHeight: dimensions.element.clientHeight, + maxWidth: dimensions.element.clientWidth + }) : dimensions, + transition: transitionProperty + }); + }; + + var cancel = function cancel() { + _terminate({ + type: "intent-".concat(intent._id, ":cancel") + }); + }; // Prevent unfulfilled client promises when this window unloads for a + // reason or another. + + + serviceWindow.addEventListener('unload', function () { + if (!terminated) cancel(); + }); + return listenClientData(intent, serviceWindow).then(function (data) { + return { + compose: compose, + getData: function getData() { + return data; + }, + getIntent: function getIntent() { + return intent; + }, + terminate: function terminate(doc) { + var eventName = data && data.exposeIntentFrameRemoval ? 'exposeFrameRemoval' : 'done'; + return _terminate({ + type: "intent-".concat(intent._id, ":").concat(eventName), + document: doc + }); + }, + throw: function _throw(error) { + return _terminate({ + type: "intent-".concat(intent._id, ":error"), + error: _helpers.errorSerializer.serialize(error) + }); + }, + resizeClient: resizeClient, + cancel: cancel + }; + }); + }); + }; +}; + +exports.start = start; + /***/ }), /***/ "r9i8": @@ -366077,6 +376960,31 @@ function isLeapYear (dirtyDate) { module.exports = isLeapYear +/***/ }), + +/***/ "rMf1": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppItemPlaceholder", function() { return AppItemPlaceholder; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); + +var AppItemPlaceholder = function AppItemPlaceholder() { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("li", { + className: "coz-nav-apps-item" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { + role: "menuitem", + disabled: true + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { + className: "coz-nav-apps-item-icon coz-loading-placeholder" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p", { + className: "coz-label coz-loading-placeholder" + }))); +}; +/* harmony default export */ __webpack_exports__["default"] = (AppItemPlaceholder); + /***/ }), /***/ "rO+Z": @@ -367389,6 +378297,13 @@ function indexOf(xs, x) { /***/ }), +/***/ "rXrk": +/***/ (function(module) { + +module.exports = JSON.parse("[\"apps\",\"context\"]"); + +/***/ }), + /***/ "rbyU": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -367913,6 +378828,193 @@ var sqrt3 = Math.sqrt(3); }); +/***/ }), + +/***/ "rlYB": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("284h"); + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__("o0o1")); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("yXPU")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("lwsE")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("W8MJ")); + +var client = _interopRequireWildcard(__webpack_require__("RuQZ")); + +var service = _interopRequireWildcard(__webpack_require__("r70G")); + +var _request = _interopRequireDefault(__webpack_require__("EchP")); + +var _helpers = __webpack_require__("paaR"); + +var Intents = +/*#__PURE__*/ +function () { + function Intents() { + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + client = _ref.client; + + (0, _classCallCheck2.default)(this, Intents); + this.request = new _request.default(client); + this.create = this.create.bind(this); + } + + (0, _createClass2.default)(Intents, [{ + key: "create", + value: function create(action, type) { + var _this = this; + + var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var permissions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; + if (!action) throw new Error("Misformed intent, \"action\" property must be provided"); + if (!type) throw new Error("Misformed intent, \"type\" property must be provided"); + var createPromise = this.request.post(action, type, data, permissions); + + createPromise.start = function (element, onReadyCallback) { + var options = { + filteredServices: data.filteredServices, + onReadyCallback: onReadyCallback + }; + delete data.filteredServices; + var intentManager; + var prom = createPromise.then(function (intent) { + intentManager = client.start(_this.create, intent, element, data, options); + return intentManager; + }); + + prom.stop = function () { + intentManager && intentManager.destroy(); + }; + + return prom; + }; + + return createPromise; + } // returns a service to communicate with intent client + + }, { + key: "createService", + value: function createService(intentId, serviceWindow) { + return service.start(this.request)(intentId, serviceWindow); + } // Redirect to an app able to handle the doctype + // Redirections are more or less a hack of the intent API to retrieve an URL for + // accessing a given doctype or a given document. + // It needs to use a special action `REDIRECT` + + }, { + key: "getRedirectionURL", + value: function () { + var _getRedirectionURL = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee(type, data) { + var intent, service, baseURL; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (!(!type && !data)) { + _context.next = 2; + break; + } + + throw new Error("Cannot retrieve redirection, at least type or doc must be provided"); + + case 2: + _context.next = 4; + return this.create('REDIRECT', type, data); + + case 4: + intent = _context.sent; + service = (0, _helpers.pickService)(intent); // Intents cannot be deleted now + // await deleteIntent(intent) + + baseURL = (0, _helpers.removeQueryString)(service.href); + return _context.abrupt("return", data ? (0, _helpers.buildRedirectionURL)(baseURL, data) : baseURL); + + case 8: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function getRedirectionURL(_x, _x2) { + return _getRedirectionURL.apply(this, arguments); + } + + return getRedirectionURL; + }() + }, { + key: "redirect", + value: function () { + var _redirect = (0, _asyncToGenerator2.default)( + /*#__PURE__*/ + _regenerator.default.mark(function _callee2(type, doc, redirectFn) { + var redirectionURL; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (window) { + _context2.next = 2; + break; + } + + throw new Error('redirect() method can only be called in a browser'); + + case 2: + _context2.next = 4; + return this.getRedirectionURL(type, doc); + + case 4: + redirectionURL = _context2.sent; + + if (!(redirectFn && typeof redirectFn === 'function')) { + _context2.next = 7; + break; + } + + return _context2.abrupt("return", redirectFn(redirectionURL)); + + case 7: + window.location.href = redirectionURL; + + case 8: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function redirect(_x3, _x4, _x5) { + return _redirect.apply(this, arguments); + } + + return redirect; + }() + }]); + return Intents; +}(); + +var _default = Intents; +exports.default = _default; + /***/ }), /***/ "rr1i": @@ -367928,6 +379030,108 @@ module.exports = function (bitmap, value) { }; +/***/ }), + +/***/ "rrFb": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("lwsE"); +/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("W8MJ"); +/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("PJYZ"); +/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("7W2i"); +/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("a1gu"); +/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("Nsbk"); +/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var cozy_ui_transpiled_react_Button__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("KXWi"); +/* harmony import */ var cozy_ui_transpiled_react_Button__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_Button__WEBPACK_IMPORTED_MODULE_7__); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("buk/"); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_8__); + + + + + + + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + + + + + +var Banner = /*#__PURE__*/function (_Component) { + _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default()(Banner, _Component); + + var _super = _createSuper(Banner); + + function Banner(props) { + var _this; + + _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Banner); + + _this = _super.call(this, props); + _this.state = { + unmounted: true + }; + _this.animate = _this.animate.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this)); + return _this; + } + + _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Banner, [{ + key: "animate", + value: function animate() { + var _this2 = this; + + // To animate we have to use a setTimeout to + // force a CSS class update and trigger CSS animation + return setTimeout(function () { + _this2.setState(function () { + return { + unmounted: false + }; + }); + }, 100); + } + }, { + key: "componentDidMount", + value: function componentDidMount() { + this.animate(); + } + }, { + key: "render", + value: function render() { + var _this$props = this.props, + t = _this$props.t, + code = _this$props.code, + links = _this$props.links; + var unmounted = this.state.unmounted; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("div", { + className: "coz-bar-banner".concat(unmounted ? ' unmounted' : '') + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("p", null, t("banner.".concat(code, ".description"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement(cozy_ui_transpiled_react_Button__WEBPACK_IMPORTED_MODULE_7__["ButtonLink"], { + className: "coz-bar-banner-button", + size: "tiny", + href: links, + label: t("banner.".concat(code, ".CTA")) + })); + } + }]); + + return Banner; +}(react__WEBPACK_IMPORTED_MODULE_6__["Component"]); + +/* harmony default export */ __webpack_exports__["default"] = (Object(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_8__["translate"])()(Banner)); + /***/ }), /***/ "rsCV": @@ -368216,6 +379420,295 @@ async function _asyncOptionalChain(ops) { //# sourceMappingURL=_asyncOptionalChain.js.map +/***/ }), + +/***/ "rvOC": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.AppIcon = void 0; + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("yXPU")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("lwsE")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("W8MJ")); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__("PJYZ")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("7W2i")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("a1gu")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("Nsbk")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("lSNA")); + +var _regenerator = _interopRequireDefault(__webpack_require__("o0o1")); + +var _react = _interopRequireWildcard(__webpack_require__("q1tI")); + +var _propTypes = _interopRequireDefault(__webpack_require__("17x9")); + +var _classnames = _interopRequireDefault(__webpack_require__("TSYQ")); + +var _cozyClient = __webpack_require__("SH7X"); + +var _Icon = _interopRequireWildcard(__webpack_require__("y6ex")); + +var _Cube = _interopRequireDefault(__webpack_require__("NQxy")); + +var _palette = _interopRequireDefault(__webpack_require__("7jrE")); + +var _proptypes = __webpack_require__("7/ZK"); + +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +function _createSuper(Derived) { + var hasNativeReflectConstruct = _isNativeReflectConstruct(); + + return function _createSuperInternal() { + var Super = (0, _getPrototypeOf2.default)(Derived), + result; + + if (hasNativeReflectConstruct) { + var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + + return (0, _possibleConstructorReturn2.default)(this, result); + }; +} + +function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + return true; + } catch (e) { + return false; + } +} + +var styles = { + "c-loading-placeholder": "styles__c-loading-placeholder___3L6Gz", + "placeHolderShimmer": "styles__placeHolderShimmer___3Rei_", + "c-app-icon": "styles__c-app-icon___2_O40", + "c-app-icon-default": "styles__c-app-icon-default___3CEmt" +}; +var DONE = 'done'; +var ERRORED = 'errored'; +var FETCHING = 'fetching'; + +var AppIcon = /*#__PURE__*/function (_Component) { + (0, _inherits2.default)(AppIcon, _Component); + + var _super = _createSuper(AppIcon); + + function AppIcon(props, context) { + var _this; + + (0, _classCallCheck2.default)(this, AppIcon); + _this = _super.call(this, props, context); + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", { + error: null, + icon: null, + status: _this.props.client ? FETCHING : ERRORED + }); + _this.isUnmounting = false; + _this.handleError = _this.handleError.bind((0, _assertThisInitialized2.default)(_this)); + _this.fetchIcon = _this.fetchIcon.bind((0, _assertThisInitialized2.default)(_this)); + return _this; + } + + (0, _createClass2.default)(AppIcon, [{ + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.isUnmounting = true; + } + }, { + key: "componentDidMount", + value: function componentDidMount() { + this.isUnmounting = false; + this.load(); + } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate(prevProps) { + if (this.props.fetchIcon !== prevProps.fetchIcon) { + this.load(); + } + } + }, { + key: "fetchIcon", + value: function fetchIcon() { + var _this$props = this.props, + app = _this$props.app, + type = _this$props.type, + priority = _this$props.priority, + client = _this$props.client; + return client.getStackClient().getIconURL({ + type: type, + slug: app.slug || app, + appData: app, + priority: priority + }); + } + }, { + key: "handleError", + value: function handleError() { + this.setState({ + status: ERRORED + }); + } + }, { + key: "load", + value: function () { + var _load = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + var _this$props2, app, fetchIcon, onReady, client, loadFn, loadedUrl, loadError, domain, secure, cozyURL; + + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _this$props2 = this.props, app = _this$props2.app, fetchIcon = _this$props2.fetchIcon, onReady = _this$props2.onReady, client = _this$props2.client; + loadFn = fetchIcon || this.fetchIcon; + _context.prev = 2; + + if (client) { + cozyURL = new URL(client.getStackClient().uri); + domain = cozyURL.host; + secure = cozyURL.protocol === 'https:'; + } + + _context.next = 6; + return loadFn(app, domain, secure); + + case 6: + loadedUrl = _context.sent; + _context.next = 12; + break; + + case 9: + _context.prev = 9; + _context.t0 = _context["catch"](2); + loadError = _context.t0; + + case 12: + if (!this.isUnmounting) { + this.setState({ + error: loadError, + icon: loadedUrl, + status: loadError ? ERRORED : DONE + }); + + if (typeof onReady === 'function') { + onReady(); + } + } + + case 13: + case "end": + return _context.stop(); + } + } + }, _callee, this, [[2, 9]]); + })); + + function load() { + return _load.apply(this, arguments); + } + + return load; + }() + }, { + key: "render", + value: function render() { + var _this$props3 = this.props, + alt = _this$props3.alt, + className = _this$props3.className, + fallbackIcon = _this$props3.fallbackIcon; + var _this$state = this.state, + icon = _this$state.icon, + status = _this$state.status; + + switch (status) { + case FETCHING: + return /*#__PURE__*/_react.default.createElement("div", { + role: "progressbar", + className: (0, _classnames.default)(styles['c-loading-placeholder'], styles['c-app-icon'], className) + }); + + case DONE: + return /*#__PURE__*/_react.default.createElement("img", { + alt: alt, + className: (0, _classnames.default)(styles['c-app-icon'], className), + onError: this.handleError, + ref: this.props.iconRef, + src: icon + }); + + case ERRORED: + default: + return /*#__PURE__*/_react.default.createElement(_Icon.default, { + className: (0, _classnames.default)(styles['c-app-icon'], styles['c-app-icon-default'], className), + height: "100%", + icon: fallbackIcon || _Cube.default, + width: "100%", + color: _palette.default['coolGrey'], + iconRef: this.props.iconRef + }); + } + } + }]); + return AppIcon; +}(_react.Component); + +exports.AppIcon = AppIcon; +AppIcon.propTypes = { + alt: _propTypes.default.string, + + /** Required if fetchIcon is not provided */ + app: _propTypes.default.oneOfType([_proptypes.AppDoctype, _propTypes.default.string]), + + /** Icon to fallback on error (optional), default cube icon */ + fallbackIcon: _Icon.iconPropType, + + /** Custom implementation of how to fetch icon */ + fetchIcon: _propTypes.default.func, + client: _propTypes.default.object.isRequired, + className: _propTypes.default.string, + onReady: _propTypes.default.func, + + /** Type of application */ + type: _propTypes.default.oneOf(['app', 'konnector']), + + /** First source to fetch the icon. If nothing is found, there is a second try with the other source */ + priority: _propTypes.default.oneOf(['stack', 'registry']) +}; +AppIcon.defaultProps = { + type: 'app', + priority: 'stack' +}; + +var _default = (0, _cozyClient.withClient)(AppIcon); + +exports.default = _default; + /***/ }), /***/ "rvZc": @@ -368878,6 +380371,34 @@ module.exports = function (it, TYPE) { }; +/***/ }), + +/***/ "s7lR": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function createThunkMiddleware(extraArgument) { + return function (_ref) { + var dispatch = _ref.dispatch, + getState = _ref.getState; + return function (next) { + return function (action) { + if (typeof action === 'function') { + return action(dispatch, getState, extraArgument); + } + + return next(action); + }; + }; + }; +} + +var thunk = createThunkMiddleware(); +thunk.withExtraArgument = createThunkMiddleware; + +/* harmony default export */ __webpack_exports__["default"] = (thunk); + /***/ }), /***/ "s8O9": @@ -369009,6 +380530,411 @@ __webpack_require__.r(__webpack_exports__); +/***/ }), + +/***/ "sCMN": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.AppLinker = void 0; +Object.defineProperty(exports, "NATIVE_APP_INFOS", { + enumerable: true, + get: function get() { + return _native2.NATIVE_APP_INFOS; + } +}); +exports.default = void 0; +Object.defineProperty(exports, "generateUniversalLink", { + enumerable: true, + get: function get() { + return _native.generateUniversalLink; + } +}); +Object.defineProperty(exports, "generateWebLink", { + enumerable: true, + get: function get() { + return _native.generateWebLink; + } +}); +Object.defineProperty(exports, "getUniversalLinkDomain", { + enumerable: true, + get: function get() { + return _native.getUniversalLinkDomain; + } +}); + +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__("yXPU")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("lwsE")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("W8MJ")); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__("PJYZ")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("7W2i")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("a1gu")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("Nsbk")); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__("lSNA")); + +var _regenerator = _interopRequireDefault(__webpack_require__("o0o1")); + +var _react = _interopRequireDefault(__webpack_require__("q1tI")); + +var _propTypes = _interopRequireDefault(__webpack_require__("17x9")); + +var _cozyClient = __webpack_require__("SH7X"); + +var _cozyDeviceHelper = __webpack_require__("snfs"); + +var _cozyIntent = __webpack_require__("qvEe"); + +var _cozyLogger = _interopRequireDefault(__webpack_require__("Vggm")); + +var _native = __webpack_require__("AHTZ"); + +var _native2 = __webpack_require__("bGd3"); + +var _expiringMemoize = _interopRequireDefault(__webpack_require__("9aZC")); + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + + return keys; +} + +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { + (0, _defineProperty2.default)(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + + return target; +} + +function _createSuper(Derived) { + var hasNativeReflectConstruct = _isNativeReflectConstruct(); + + return function _createSuperInternal() { + var Super = (0, _getPrototypeOf2.default)(Derived), + result; + + if (hasNativeReflectConstruct) { + var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + + return (0, _possibleConstructorReturn2.default)(this, result); + }; +} + +function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + return true; + } catch (e) { + return false; + } +} + +var expirationDelay = 10 * 1000; +var memoizedCheckApp = (0, _expiringMemoize.default)(function (appInfo) { + return (0, _cozyDeviceHelper.checkApp)(appInfo).catch(function () { + return false; + }); +}, expirationDelay, function (appInfo) { + return appInfo.appId; +}); + +var AppLinker = /*#__PURE__*/function (_React$Component) { + (0, _inherits2.default)(AppLinker, _React$Component); + + var _super = _createSuper(AppLinker); + + function AppLinker(props) { + var _this; + + (0, _classCallCheck2.default)(this, AppLinker); + _this = _super.call(this, props); + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", { + nativeAppIsAvailable: null, + isFetchingAppInfo: false + }); + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setImgRef", function (img) { + _this.imgRef = img; + + _this.setState({ + imgRef: _this.imgRef + }); + }); + _this.imgRef = null; + return _this; + } + + (0, _createClass2.default)(AppLinker, [{ + key: "componentDidMount", + value: function componentDidMount() { + if ((0, _cozyDeviceHelper.isMobileApp)()) { + this.checkAppAvailability(); + } + } + }, { + key: "checkAppAvailability", + value: function () { + var _checkAppAvailability = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { + var slug, appInfo, nativeAppIsAvailable; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + slug = AppLinker.getSlug(this.props); + appInfo = _native2.NATIVE_APP_INFOS[slug]; + + if (!appInfo) { + _context.next = 9; + break; + } + + _context.t0 = Boolean; + _context.next = 6; + return memoizedCheckApp(appInfo); + + case 6: + _context.t1 = _context.sent; + nativeAppIsAvailable = (0, _context.t0)(_context.t1); + this.setState({ + nativeAppIsAvailable: nativeAppIsAvailable + }); + + case 9: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function checkAppAvailability() { + return _checkAppAvailability.apply(this, arguments); + } + + return checkAppAvailability; + }() + }, { + key: "render", + value: function render() { + var children = this.props.children; + AppLinker.deprecateSlug(this.props); + var slug = AppLinker.getSlug(this.props); + var nativeAppIsAvailable = this.state.nativeAppIsAvailable; + var appInfo = _native2.NATIVE_APP_INFOS[slug]; + + var _AppLinker$getOnClick = AppLinker.getOnClickHref(this.props, nativeAppIsAvailable, this.context, this.state.imgRef), + href = _AppLinker$getOnClick.href, + onClick = _AppLinker$getOnClick.onClick; + + return children(_objectSpread(_objectSpread({}, appInfo), {}, { + iconRef: this.setImgRef, + onClick: onClick, + href: href + })); + } + }], [{ + key: "getSlug", + value: function getSlug(props) { + if (props.app && props.app.slug) { + return props.app.slug; + } + + return props.slug; + } + }, { + key: "deprecateSlug", + value: function deprecateSlug(props) { + if (props.slug) { + console.warn("AppLinker's 'slug' prop is deprecated, please use 'app.slug' instead"); + } + } + }, { + key: "getOnClickHref", + value: function getOnClickHref(props, nativeAppIsAvailable, context, imgRef) { + var app = props.app, + client = props.client, + nativePath = props.nativePath; + var slug = AppLinker.getSlug(props); + var href = props.href; + var onClick = null; + var usingNativeApp = (0, _cozyDeviceHelper.isMobileApp)(); + var appInfo = _native2.NATIVE_APP_INFOS[slug]; + + if ((0, _cozyDeviceHelper.isFlagshipApp)()) { + var _ref = client ? client.getInstanceOptions() : undefined, + currentApp = _ref.app; + + if (currentApp === undefined || app.slug !== currentApp.slug) { + var imgPayload = imgRef && JSON.stringify(_objectSpread({}, imgRef.getBoundingClientRect().toJSON())); + return { + onClick: function onClick(event) { + event.preventDefault(); + context ? context.call('openApp', href, app, imgPayload) : _cozyLogger.default.error("Failed to \"openApp(".concat(app, ")\". WebviewService has the following falsy value \"").concat(context, "\" in AppLinker's context.")); + }, + href: '#' + }; + } + } + + if (usingNativeApp) { + if (nativeAppIsAvailable) { + // If we are on the native app and the other native app is available, + // we open the native app + onClick = AppLinker.openNativeFromNative.bind(this, props); + href = '#'; + } else { + // If we are on a native app, but the other native app is not available + // we open the web link, this is done by the href prop. We still + // have to call the prop callback + onClick = AppLinker.openWeb.bind(this, props); + } + } else if ((0, _cozyDeviceHelper.isMobile)() && appInfo) { + // If we are on the "mobile web version", we try to open the native app + // if it exists with an universal links. If it fails, we redirect to the web + // version of the requested app + // Only on iOS ATM + if ((0, _cozyDeviceHelper.isAndroid)()) { + onClick = AppLinker.openNativeFromWeb.bind(this, props); + } else { + // Since generateUniversalLink can rise an error, let's catch it to not crash + // all the page. + try { + href = (0, _native.generateUniversalLink)({ + slug: slug, + nativePath: nativePath, + fallbackUrl: href + }); + } catch (err) { + console.error(err); + href = '#'; + } + } + } + + return { + href: href, + onClick: onClick + }; + } + }, { + key: "openNativeFromWeb", + value: function openNativeFromWeb(props, ev) { + var href = props.href, + nativePath = props.nativePath, + onAppSwitch = props.onAppSwitch; + var slug = AppLinker.getSlug(props); + var appInfo = _native2.NATIVE_APP_INFOS[slug]; + + if (ev) { + ev.preventDefault(); + } + + AppLinker.onAppSwitch(onAppSwitch); + (0, _cozyDeviceHelper.openDeeplinkOrRedirect)(appInfo.uri + (nativePath === '/' ? '' : nativePath), function () { + window.location.href = href; + }); + } + }, { + key: "onAppSwitch", + value: function onAppSwitch(onAppSwitchFn) { + if (typeof onAppSwitchFn === 'function') { + onAppSwitchFn(); + } + } + }, { + key: "openNativeFromNative", + value: function openNativeFromNative(props, ev) { + var onAppSwitch = props.onAppSwitch; + var slug = AppLinker.getSlug(props); + + if (ev) { + ev.preventDefault(); + } + + var appInfo = _native2.NATIVE_APP_INFOS[slug]; + AppLinker.onAppSwitch(onAppSwitch); + (0, _cozyDeviceHelper.startApp)(appInfo).catch(function (err) { + console.error('AppLinker: Could not open native app', err); + }); + } + }, { + key: "openWeb", + value: function openWeb(props) { + AppLinker.onAppSwitch(props.onAppSwitch); + } + }]); + return AppLinker; +}(_react.default.Component); + +exports.AppLinker = AppLinker; +(0, _defineProperty2.default)(AppLinker, "contextType", _cozyIntent.WebviewContext); +AppLinker.defaultProps = { + nativePath: '/' +}; +AppLinker.propTypes = { + /** DEPRECATED: please use app.slug prop */ + slug: _propTypes.default.string, + + /* + Full web url : Used by default on desktop browser + Used as a fallback_uri on mobile web + */ + href: _propTypes.default.string, + + /* + Path used for "native link" + */ + nativePath: _propTypes.default.string, + onAppSwitch: _propTypes.default.func, + app: _propTypes.default.shape({ + // Slug of the app : drive / banks ... + slug: _propTypes.default.string.isRequired, + // Information about mobile native app + mobile: _propTypes.default.shape({ + schema: _propTypes.default.string, + id_playstore: _propTypes.default.string, + id_appstore: _propTypes.default.string + }) + }).isRequired +}; + +var _default = (0, _cozyClient.withClient)(AppLinker); + +exports.default = _default; + /***/ }), /***/ "sCaM": @@ -369787,6 +381713,38 @@ CardinalOpen.prototype = { })(0)); +/***/ }), + +/***/ "sKEN": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__("pVnL")); + +var _react = _interopRequireDefault(__webpack_require__("q1tI")); + +// Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/gear.svg` to regenerate; +function SvgGear(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + d: "M14.25 7.078c.051.26.077.568.077.926 0 .358-.026.665-.078.925l1.62 1.333c.131.086.163.203.099.352-.325.95-.859 1.826-1.602 2.628-.104.124-.229.155-.37.094l-2.032-.668c-.52.396-1.08.705-1.68.926l-.409 2c-.026.146-.117.233-.273.258-.56.1-1.094.148-1.602.148a9.21 9.21 0 01-1.601-.148c-.157-.024-.248-.11-.274-.259l-.409-1.999a5.98 5.98 0 01-1.68-.926l-2.03.668c-.145.062-.268.03-.372-.094C.892 12.44.359 11.565.032 10.614c-.065-.148-.032-.266.098-.352L1.751 8.93a4.761 4.761 0 01-.078-.925c0-.358.026-.667.078-.926L.131 5.746C0 5.66-.034 5.542.031 5.394c.326-.95.86-1.826 1.602-2.627.104-.123.228-.154.371-.093l2.031.667a5.99 5.99 0 011.68-.926l.41-1.999c.025-.148.116-.234.273-.259a8.221 8.221 0 013.202 0c.156.024.247.111.273.26l.41 1.998c.6.223 1.159.53 1.68.926l2.03-.667c.143-.062.267-.03.371.093.742.802 1.276 1.678 1.602 2.627.064.148.032.266-.098.352l-1.62 1.332zM8 4.5a3.5 3.5 0 100 7 3.5 3.5 0 000-7z", + fillRule: "evenodd" + })); +} + +var _default = SvgGear; +exports.default = _default; + /***/ }), /***/ "sMXx": @@ -371539,6 +383497,112 @@ module.exports = exports['default']; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3NhZmUtc3RyaW5nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFDQSxTQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUU7QUFDMUIsTUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7Q0FDdEI7O0FBRUQsVUFBVSxDQUFDLFNBQVMsQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsWUFBVztBQUN2RSxTQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDO0NBQ3pCLENBQUM7O3FCQUVhLFVBQVUiLCJmaWxlIjoic2FmZS1zdHJpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBCdWlsZCBvdXQgb3VyIGJhc2ljIFNhZmVTdHJpbmcgdHlwZVxuZnVuY3Rpb24gU2FmZVN0cmluZyhzdHJpbmcpIHtcbiAgdGhpcy5zdHJpbmcgPSBzdHJpbmc7XG59XG5cblNhZmVTdHJpbmcucHJvdG90eXBlLnRvU3RyaW5nID0gU2FmZVN0cmluZy5wcm90b3R5cGUudG9IVE1MID0gZnVuY3Rpb24oKSB7XG4gIHJldHVybiAnJyArIHRoaXMuc3RyaW5nO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgU2FmZVN0cmluZztcbiJdfQ== +/***/ }), + +/***/ "sdKy": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return persistStore; }); +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fd+0"); +/* harmony import */ var _persistReducer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("yZDF"); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("1iYv"); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + + + + + + +var initialState = { + registry: [], + bootstrapped: false +}; + +var persistorReducer = function persistorReducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; + var action = arguments[1]; + + switch (action.type) { + case _constants__WEBPACK_IMPORTED_MODULE_2__["REGISTER"]: + return _extends({}, state, { registry: [].concat(_toConsumableArray(state.registry), [action.key]) }); + case _constants__WEBPACK_IMPORTED_MODULE_2__["REHYDRATE"]: + var firstIndex = state.registry.indexOf(action.key); + var registry = [].concat(_toConsumableArray(state.registry)); + registry.splice(firstIndex, 1); + return _extends({}, state, { registry: registry, bootstrapped: registry.length === 0 }); + default: + return state; + } +}; + +function persistStore(store, options, cb) { + // help catch incorrect usage of passing PersistConfig in as PersistorOptions + if (false) { var bannedKeys, optionsToTest; } + var boostrappedCb = cb || false; + + var _pStore = Object(redux__WEBPACK_IMPORTED_MODULE_0__["createStore"])(persistorReducer, initialState, options ? options.enhancer : undefined); + var register = function register(key) { + _pStore.dispatch({ + type: _constants__WEBPACK_IMPORTED_MODULE_2__["REGISTER"], + key: key + }); + }; + + var rehydrate = function rehydrate(key, payload, err) { + var rehydrateAction = { + type: _constants__WEBPACK_IMPORTED_MODULE_2__["REHYDRATE"], + payload: payload, + err: err, + key: key + // dispatch to `store` to rehydrate and `persistor` to track result + };store.dispatch(rehydrateAction); + _pStore.dispatch(rehydrateAction); + if (boostrappedCb && persistor.getState().bootstrapped) { + boostrappedCb(); + boostrappedCb = false; + } + }; + + var persistor = _extends({}, _pStore, { + purge: function purge() { + var results = []; + store.dispatch({ + type: _constants__WEBPACK_IMPORTED_MODULE_2__["PURGE"], + result: function result(purgeResult) { + results.push(purgeResult); + } + }); + return Promise.all(results); + }, + flush: function flush() { + var results = []; + store.dispatch({ + type: _constants__WEBPACK_IMPORTED_MODULE_2__["FLUSH"], + result: function result(flushResult) { + results.push(flushResult); + } + }); + return Promise.all(results); + }, + pause: function pause() { + store.dispatch({ + type: _constants__WEBPACK_IMPORTED_MODULE_2__["PAUSE"] + }); + }, + persist: function persist() { + store.dispatch({ type: _constants__WEBPACK_IMPORTED_MODULE_2__["PERSIST"], register: register, rehydrate: rehydrate }); + } + }); + + persistor.persist(); + + return persistor; +} + /***/ }), /***/ "sdTk": @@ -376909,6 +388973,25 @@ var checkShouldUnlock = /*#__PURE__*/function () { }; }(); +/***/ }), + +/***/ "tBST": +/***/ (function(module, exports, __webpack_require__) { + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +if (false) { var throwOnDirectAccess, ReactIs; } else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = __webpack_require__("1XoH")(); +} + + /***/ }), /***/ "tDdy": @@ -379265,6 +391348,13 @@ exports.default = _default; /***/ }), +/***/ "tZSp": +/***/ (function(module) { + +module.exports = JSON.parse("{\"drawer\":\"Afficher le menu latéral\",\"profile\":\"Profil\",\"plans\":\"Forfait\",\"permissions\":\"Permissions\",\"connectedDevices\":\"Appareils connectés\",\"connections\":\"Connexions\",\"storage\":\"Stockage\",\"storage_phrase\":\"%{diskUsage} Go sur %{diskQuota} Go\",\"help\":\"Manuel d'utilisation\",\"contact\":\"Nous contacter\",\"logout\":\"Déconnexion\",\"soon\":\"à venir\",\"error_UnavailableStack\":\"Connexion à la stack impossible (connection timed-out)\",\"error_UnauthorizedStack\":\"Des permissions sont manquante, l'application ne peut accéder aux ressources demandées.\",\"no_apps\":\"Pas d'applications Cozy trouvées.\",\"menu\":{\"apps\":\"Applications\",\"settings\":\"Paramètres\",\"home_mobile\":\"Retour vers le tableau de bord...\",\"home\":\"Retour vers le tableau de bord\",\"home_title\":\"Accueil \"},\"Categories\":{\"cozy\":\"Apps Cozy\",\"partners\":\"Expérimentation MesInfos\",\"ptnb\":\"Expérimentation Carnet du logement\",\"others\":\"Autres apps\"},\"claudy\":{\"title\":\"Comment utiliser votre Cozy ?\"},\"permsModal\":{\"title\":\"Accéder à ton Cozy à partir de ton application\",\"description\":\"Autoriser %{app} à afficher les applications de ton Cozy sur cet appareil\",\"button\":\"Autoriser l'accès\"},\"comingSoon\":{\"store\":{\"title\":\"L'application Store sera bientôt disponible dans votre Cozy\",\"description\":\"Grâce à cozy Store vous pourrez installer les applications que vous souhaitez sur votre Cozy.\"}},\"banner\":{\"tos-updated\":{\"description\":\"Dans le cadre du RGPD, Cozy Cloud met à jour ses Conditions Générales d'Utilisation qui ont pris effet le 25 Mai 2018\",\"CTA\":\"Lire maintenant\"}}}"); + +/***/ }), + /***/ "ta7q": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -379421,6 +391511,8 @@ Object.defineProperty(exports, "__esModule", { }); exports.NativeMessenger = exports.DebugNativeMessenger = void 0; +var _createClass2 = _interopRequireDefault(__webpack_require__("W8MJ")); + var _classCallCheck2 = _interopRequireDefault(__webpack_require__("lwsE")); var _defineProperty2 = _interopRequireDefault(__webpack_require__("lSNA")); @@ -379430,8 +391522,7 @@ var _postMe = __webpack_require__("c4kq"); var _api = __webpack_require__("onNx"); var log = (0, _postMe.debug)('NativeMessenger'); - -var NativeMessenger = function NativeMessenger(webviewRef) { +var NativeMessenger = /*#__PURE__*/(0, _createClass2.default)(function NativeMessenger(webviewRef) { var _this = this; (0, _classCallCheck2.default)(this, NativeMessenger); @@ -379464,8 +391555,7 @@ var NativeMessenger = function NativeMessenger(webviewRef) { }); }); this.injectJavaScript = webviewRef.injectJavaScript; -}; - +}); exports.NativeMessenger = NativeMessenger; var DebugNativeMessenger = function DebugNativeMessenger(messenger) { @@ -383977,6 +396067,42 @@ var Slider = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"](funct /***/ }), +/***/ "uISV": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("buk/"); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_1__); + + + +var StorageData = function StorageData(_ref) { + var t = _ref.t, + data = _ref.data; + var diskQuota = Number.isInteger(data.quota) ? (data.quota / (1000 * 1000 * 1000)).toFixed(2) : data.quota; + var diskUsage = Number.isInteger(data.usage) ? (data.usage / (1000 * 1000 * 1000)).toFixed(2) : data.usage; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { + className: "coz-nav-storage" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p", { + className: "coz-nav-storage-text" + }, t('storage_phrase', { + diskUsage: diskUsage, + diskQuota: diskQuota + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("progress", { + className: "cozy-nav-storage-bar", + value: diskUsage, + max: diskQuota, + min: "0" + })); +}; + +/* harmony default export */ __webpack_exports__["default"] = (Object(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_1__["translate"])()(StorageData)); + +/***/ }), + /***/ "uJTZ": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -384903,6 +397029,65 @@ exports.default = CozyProvider; /***/ }), +/***/ "uURn": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ButtonCozyHome", function() { return ButtonCozyHome; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("PI/G"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("mgfL"); +/* harmony import */ var cozy_flags__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cozy_flags__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("snfs"); +/* harmony import */ var cozy_device_helper__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(cozy_device_helper__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _IconCozyHome__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("h/bp"); + + + + + +var ButtonCozyHome = function ButtonCozyHome(_ref) { + var webviewContext = _ref.webviewContext, + homeHref = _ref.homeHref, + isInvertedTheme = _ref.isInvertedTheme; + if (Object(cozy_device_helper__WEBPACK_IMPORTED_MODULE_3__["isFlagshipApp"])() || cozy_flags__WEBPACK_IMPORTED_MODULE_2___default()('flagship.debug')) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + onClick: function onClick() { + webviewContext.call('backToHome'); + }, + className: "coz-nav-apps-btns-home --is-flagship" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_IconCozyHome__WEBPACK_IMPORTED_MODULE_4__["default"], { + className: "coz-nav-apps-btns-home-svg", + isInvertedTheme: isInvertedTheme + })); + + if (homeHref) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("a", { + href: homeHref, + className: "coz-nav-apps-btns-home" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_IconCozyHome__WEBPACK_IMPORTED_MODULE_4__["default"], { + className: "coz-nav-apps-btns-home-svg", + isInvertedTheme: isInvertedTheme + })); + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { + className: "coz-nav-apps-btns-home" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_IconCozyHome__WEBPACK_IMPORTED_MODULE_4__["default"], { + className: "coz-nav-apps-btns-home-svg", + isInvertedTheme: isInvertedTheme + })); +}; +ButtonCozyHome.propTypes = { + webviewContext: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object, + homeHref: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.string, + isInvertedTheme: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool +}; + +/***/ }), + /***/ "uUyN": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -386396,6 +398581,164 @@ function requirePropFactory(componentNameInError) { /***/ }), +/***/ "ufaa": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = exports.breakpointsPropTypes = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__("pVnL")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("lwsE")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("W8MJ")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("7W2i")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("a1gu")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("Nsbk")); + +var _react = _interopRequireWildcard(__webpack_require__("q1tI")); + +var _throttle = _interopRequireDefault(__webpack_require__("DzJC")); + +var _propTypes = _interopRequireDefault(__webpack_require__("17x9")); + +var _breakpoints = _interopRequireWildcard(__webpack_require__("C2EL")); + +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +function _createSuper(Derived) { + var hasNativeReflectConstruct = _isNativeReflectConstruct(); + + return function _createSuperInternal() { + var Super = (0, _getPrototypeOf2.default)(Derived), + result; + + if (hasNativeReflectConstruct) { + var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; + result = Reflect.construct(Super, arguments, NewTarget); + } else { + result = Super.apply(this, arguments); + } + + return (0, _possibleConstructorReturn2.default)(this, result); + }; +} + +function _isNativeReflectConstruct() { + if (typeof Reflect === "undefined" || !Reflect.construct) return false; + if (Reflect.construct.sham) return false; + if (typeof Proxy === "function") return true; + + try { + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + return true; + } catch (e) { + return false; + } +} + +/** + * HOC providing the `breakpoints` property to its children to help + * with responsive web design. + * + * `breakpoints` values will reflect if the window.innerWidth is under + * those breakpoints. + * + * @Example + * ```` + * // here we define `mobile` as a screen under 1000px + * const B = withBreakpoints({ mobile: 1000 })(A) + * ```` + * + * `A` will receive `{ breakpoints: { mobile: true }}` if the screen + * width is under 1000px. + * + * `A` will receive `{ breakpoints: { mobile: false }}` if the screen + * width is over 1000px; + * + * + */ +var withBreakpoints = function withBreakpoints() { + var bp = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _breakpoints.default; + return function (Wrapped) { + var Aware = /*#__PURE__*/function (_Component) { + (0, _inherits2.default)(Aware, _Component); + + var _super = _createSuper(Aware); + + function Aware(props) { + var _this; + + (0, _classCallCheck2.default)(this, Aware); + _this = _super.call(this, props); + _this.state = { + breakpoints: (0, _breakpoints.getBreakpointsStatus)(bp) + }; + _this.checkBreakpoints = (0, _throttle.default)(function () { + _this.setState({ + breakpoints: (0, _breakpoints.getBreakpointsStatus)(bp) + }); + }, 100, { + trailing: true + }); + return _this; + } + + (0, _createClass2.default)(Aware, [{ + key: "componentDidMount", + value: function componentDidMount() { + window.addEventListener('resize', this.checkBreakpoints); + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + window.removeEventListener('resize', this.checkBreakpoints); + } + }, { + key: "render", + value: function render() { + var props = this.props; + var breakpoints = this.state.breakpoints; + return /*#__PURE__*/_react.default.createElement(Wrapped, (0, _extends2.default)({}, props, { + breakpoints: breakpoints + })); + } + }]); + return Aware; + }(_react.Component); + + Aware.displayName = "withBreakpoints(".concat(Wrapped.displayName || Wrapped.name, ")"); + return Aware; + }; +}; +/** + * PropTypes to use into the component Proptypes definition + */ + + +var breakpointsPropTypes = _propTypes.default.shape(Object.keys(_breakpoints.default).reduce(function (all, breakpoint) { + all[breakpoint] = _propTypes.default.bool.isRequired; + return all; +}, {})); + +exports.breakpointsPropTypes = breakpointsPropTypes; +var _default = withBreakpoints; +exports.default = _default; + +/***/ }), + /***/ "uhZd": /***/ (function(module, exports, __webpack_require__) { @@ -388221,6 +400564,27 @@ __webpack_require__.r(__webpack_exports__); + +/***/ }), + +/***/ "vFLY": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapStateToPropsIsFunction", function() { return whenMapStateToPropsIsFunction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "whenMapStateToPropsIsMissing", function() { return whenMapStateToPropsIsMissing; }); +/* harmony import */ var _wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("QNwn"); + +function whenMapStateToPropsIsFunction(mapStateToProps) { + return typeof mapStateToProps === 'function' ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__["wrapMapToPropsFunc"])(mapStateToProps, 'mapStateToProps') : undefined; +} +function whenMapStateToPropsIsMissing(mapStateToProps) { + return !mapStateToProps ? Object(_wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__["wrapMapToPropsConstant"])(function () { + return {}; + }) : undefined; +} +/* harmony default export */ __webpack_exports__["default"] = ([whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing]); /***/ }), @@ -391852,6 +404216,44 @@ function baseIsSet(value) { module.exports = baseIsSet; +/***/ }), + +/***/ "w03P": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = createWebStorage; + +var _getStorage = __webpack_require__("zNxr"); + +var _getStorage2 = _interopRequireDefault(_getStorage); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function createWebStorage(type) { + var storage = (0, _getStorage2.default)(type); + return { + getItem: function getItem(key) { + return new Promise(function (resolve, reject) { + resolve(storage.getItem(key)); + }); + }, + setItem: function setItem(key, item) { + return new Promise(function (resolve, reject) { + resolve(storage.setItem(key, item)); + }); + }, + removeItem: function removeItem(key) { + return new Promise(function (resolve, reject) { + resolve(storage.removeItem(key)); + }); + } + }; +} + /***/ }), /***/ "w0j3": @@ -392803,6 +405205,50 @@ function useControlled(_ref) { /***/ }), +/***/ "wD2s": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getStoredState; }); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1iYv"); + + + + +function getStoredState(config) { + var transforms = config.transforms || []; + var storageKey = '' + (config.keyPrefix !== undefined ? config.keyPrefix : _constants__WEBPACK_IMPORTED_MODULE_0__["KEY_PREFIX"]) + config.key; + var storage = config.storage; + var debug = config.debug; + var deserialize = config.serialize === false ? function (x) { + return x; + } : defaultDeserialize; + return storage.getItem(storageKey).then(function (serialized) { + if (!serialized) return undefined;else { + try { + var state = {}; + var rawState = deserialize(serialized); + Object.keys(rawState).forEach(function (key) { + state[key] = transforms.reduceRight(function (subState, transformer) { + return transformer.out(subState, key, rawState); + }, deserialize(rawState[key])); + }); + return state; + } catch (err) { + if (false) {} + throw err; + } + } + }); +} + +function defaultDeserialize(serial) { + return JSON.parse(serial); +} + +/***/ }), + /***/ "wDwx": /***/ (function(module, exports, __webpack_require__) { @@ -393001,6 +405447,84 @@ function stackSeries(key) { }); +/***/ }), + +/***/ "wJKc": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appsI18nMiddleware", function() { return appsI18nMiddleware; }); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("lSNA"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("buk/"); +/* harmony import */ var cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _reducers_locale__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("1mGG"); + + + + +var extendI18nWithApp = function extendI18nWithApp(lang) { + return function (app) { + var langs = app.langs, + locales = app.locales; + var hasLangs = langs && langs.length; + + if (!hasLangs) { + // TODO The app does not provide langs, we should probably warn the developer + // when the app is published on the registry. + return app; + } + + var providesLang = hasLangs && langs.includes(lang); + var currentLang = providesLang ? lang : langs[0]; + var localeKeys = locales && Object.keys(locales); + var providesLocales = localeKeys && localeKeys.length && localeKeys.includes(currentLang); + + if (!providesLocales) { + // TODO The app does not provide locales, we should probably warn the developer + // when the app is published on the regisry. + return app; + } + + Object(cozy_ui_transpiled_react_I18n__WEBPACK_IMPORTED_MODULE_1__["extend"])(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, app.slug, locales[currentLang])); + return app; + }; +}; + +var useLang = function useLang(apps, lang) { + apps && apps.forEach(extendI18nWithApp(lang)); +}; + +var appsI18nMiddleware = function appsI18nMiddleware(_ref) { + var getState = _ref.getState; + return function (next) { + return function (action) { + var state = getState(); + + switch (action.type) { + case _reducers_locale__WEBPACK_IMPORTED_MODULE_2__["SET_LOCALE"]: + { + var apps = state.apps && state.apps.apps; + useLang(apps, action.lang); + break; + } + + case 'RECEIVE_APP_LIST': + action.apps && action.apps.length && action.apps.forEach(extendI18nWithApp(state.locale)); + break; + + case 'RECEIVE_APP': + action.app && extendI18nWithApp(state.locale && state.locale.lang)(action.app); + break; + } + + return next(action); + }; + }; +}; +/* harmony default export */ __webpack_exports__["default"] = (appsI18nMiddleware); + /***/ }), /***/ "wJR0": @@ -396463,6 +408987,38 @@ function makeDsn(from) { /***/ }), +/***/ "wpu4": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__("TqRt"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__("pVnL")); + +var _react = _interopRequireDefault(__webpack_require__("q1tI")); + +// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/devices.svg` to regenerate; +function SvgDevices(props) { + return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({ + viewBox: "0 0 16 16" + }, props), /*#__PURE__*/_react.default.createElement("path", { + fillRule: "evenodd", + d: "M9.734 5.995c0-.55.45-.995.99-.995h4.02a1 1 0 01.99.995v8.01c0 .55-.451.995-.99.995h-4.02a1 1 0 01-.99-.995v-8.01zm2 1.005v6h2V7h-2zm-11-5.002c0-.551.447-.998.998-.998h11.003c.552 0 .999.444.999 1v1h-11v6h5v4H.73c-.55 0-.858-.417-.68-.95L.733 10V1.998z" + })); +} + +var _default = SvgDevices; +exports.default = _default; + +/***/ }), + /***/ "wq4j": /***/ (function(module, exports, __webpack_require__) { @@ -399296,6 +411852,91 @@ var Session = /** @class */ (function () { /***/ }), +/***/ "xSz2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setContent", function() { return setContent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unsetContent", function() { return unsetContent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefaultState", function() { return getDefaultState; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reducer", function() { return reducer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getContent", function() { return getContent; }); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("lSNA"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("MVZn"); +/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__); + + +var SET_CONTENT = 'SET_CONTENT'; +var UNSET_CONTENT = 'UNSET_CONTENT'; + +var getLastItemInMap = function getLastItemInMap(map) { + return Array.from(map)[map.size - 1]; +}; // action creator + + +var setContent = function setContent(location, content, id) { + return { + type: SET_CONTENT, + location: location, + content: content, + id: id + }; +}; +var unsetContent = function unsetContent(location, id) { + return { + type: UNSET_CONTENT, + location: location, + id: id + }; +}; // reducer + +var getDefaultState = function getDefaultState() { + return { + left: new Map(), + center: new Map(), + right: new Map(), + search: new Map() + }; +}; +var reducer = function reducer() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getDefaultState(); + var action = arguments.length > 1 ? arguments[1] : undefined; + if (!action.location || typeof action.id === undefined) return state; + + switch (action.type) { + case SET_CONTENT: + { + var currentState = state[action.location]; + currentState.set(action.id, action.content); + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, state, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, action.location, currentState)); + } + + case UNSET_CONTENT: + { + var _currentState = state[action.location]; + + if (!_currentState.get(action.id)) { + return state; + } + + _currentState.delete(action.id); + + return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, state, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, action.location, _currentState)); + } + + default: + return state; + } +}; // selectors + +var getContent = function getContent(state, location) { + return getLastItemInMap(state[location]) && getLastItemInMap(state[location])[1]; +}; + +/***/ }), + /***/ "xTGq": /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -400447,2758 +413088,4014 @@ function _fromDer(bytes, remaining, depth, options) { } } - // add BIT STRING contents if available - var asn1Options = bitStringContents === undefined ? null : { - bitStringContents: bitStringContents - }; + // add BIT STRING contents if available + var asn1Options = bitStringContents === undefined ? null : { + bitStringContents: bitStringContents + }; + + // create and return asn1 object + return asn1.create(tagClass, type, constructed, value, asn1Options); +} + +/** + * Converts the given asn1 object to a buffer of bytes in DER format. + * + * @param asn1 the asn1 object to convert to bytes. + * + * @return the buffer of bytes. + */ +asn1.toDer = function(obj) { + var bytes = forge.util.createBuffer(); + + // build the first byte + var b1 = obj.tagClass | obj.type; + + // for storing the ASN.1 value + var value = forge.util.createBuffer(); + + // use BIT STRING contents if available and data not changed + var useBitStringContents = false; + if('bitStringContents' in obj) { + useBitStringContents = true; + if(obj.original) { + useBitStringContents = asn1.equals(obj, obj.original); + } + } + + if(useBitStringContents) { + value.putBytes(obj.bitStringContents); + } else if(obj.composed) { + // if composed, use each child asn1 object's DER bytes as value + // turn on 6th bit (0x20 = 32) to indicate asn1 is constructed + // from other asn1 objects + if(obj.constructed) { + b1 |= 0x20; + } else { + // type is a bit string, add unused bits of 0x00 + value.putByte(0x00); + } + + // add all of the child DER bytes together + for(var i = 0; i < obj.value.length; ++i) { + if(obj.value[i] !== undefined) { + value.putBuffer(asn1.toDer(obj.value[i])); + } + } + } else { + // use asn1.value directly + if(obj.type === asn1.Type.BMPSTRING) { + for(var i = 0; i < obj.value.length; ++i) { + value.putInt16(obj.value.charCodeAt(i)); + } + } else { + // ensure integer is minimally-encoded + // TODO: should all leading bytes be stripped vs just one? + // .. ex '00 00 01' => '01'? + if(obj.type === asn1.Type.INTEGER && + obj.value.length > 1 && + // leading 0x00 for positive integer + ((obj.value.charCodeAt(0) === 0 && + (obj.value.charCodeAt(1) & 0x80) === 0) || + // leading 0xFF for negative integer + (obj.value.charCodeAt(0) === 0xFF && + (obj.value.charCodeAt(1) & 0x80) === 0x80))) { + value.putBytes(obj.value.substr(1)); + } else { + value.putBytes(obj.value); + } + } + } + + // add tag byte + bytes.putByte(b1); + + // use "short form" encoding + if(value.length() <= 127) { + // one byte describes the length + // bit 8 = 0 and bits 7-1 = length + bytes.putByte(value.length() & 0x7F); + } else { + // use "long form" encoding + // 2 to 127 bytes describe the length + // first byte: bit 8 = 1 and bits 7-1 = # of additional bytes + // other bytes: length in base 256, big-endian + var len = value.length(); + var lenBytes = ''; + do { + lenBytes += String.fromCharCode(len & 0xFF); + len = len >>> 8; + } while(len > 0); + + // set first byte to # bytes used to store the length and turn on + // bit 8 to indicate long-form length is used + bytes.putByte(lenBytes.length | 0x80); + + // concatenate length bytes in reverse since they were generated + // little endian and we need big endian + for(var i = lenBytes.length - 1; i >= 0; --i) { + bytes.putByte(lenBytes.charCodeAt(i)); + } + } + + // concatenate value bytes + bytes.putBuffer(value); + return bytes; +}; + +/** + * Converts an OID dot-separated string to a byte buffer. The byte buffer + * contains only the DER-encoded value, not any tag or length bytes. + * + * @param oid the OID dot-separated string. + * + * @return the byte buffer. + */ +asn1.oidToDer = function(oid) { + // split OID into individual values + var values = oid.split('.'); + var bytes = forge.util.createBuffer(); + + // first byte is 40 * value1 + value2 + bytes.putByte(40 * parseInt(values[0], 10) + parseInt(values[1], 10)); + // other bytes are each value in base 128 with 8th bit set except for + // the last byte for each value + var last, valueBytes, value, b; + for(var i = 2; i < values.length; ++i) { + // produce value bytes in reverse because we don't know how many + // bytes it will take to store the value + last = true; + valueBytes = []; + value = parseInt(values[i], 10); + do { + b = value & 0x7F; + value = value >>> 7; + // if value is not last, then turn on 8th bit + if(!last) { + b |= 0x80; + } + valueBytes.push(b); + last = false; + } while(value > 0); + + // add value bytes in reverse (needs to be in big endian) + for(var n = valueBytes.length - 1; n >= 0; --n) { + bytes.putByte(valueBytes[n]); + } + } + + return bytes; +}; + +/** + * Converts a DER-encoded byte buffer to an OID dot-separated string. The + * byte buffer should contain only the DER-encoded value, not any tag or + * length bytes. + * + * @param bytes the byte buffer. + * + * @return the OID dot-separated string. + */ +asn1.derToOid = function(bytes) { + var oid; + + // wrap in buffer if needed + if(typeof bytes === 'string') { + bytes = forge.util.createBuffer(bytes); + } + + // first byte is 40 * value1 + value2 + var b = bytes.getByte(); + oid = Math.floor(b / 40) + '.' + (b % 40); + + // other bytes are each value in base 128 with 8th bit set except for + // the last byte for each value + var value = 0; + while(bytes.length() > 0) { + b = bytes.getByte(); + value = value << 7; + // not the last byte for the value + if(b & 0x80) { + value += b & 0x7F; + } else { + // last byte + oid += '.' + (value + b); + value = 0; + } + } + + return oid; +}; + +/** + * Converts a UTCTime value to a date. + * + * Note: GeneralizedTime has 4 digits for the year and is used for X.509 + * dates past 2049. Parsing that structure hasn't been implemented yet. + * + * @param utc the UTCTime value to convert. + * + * @return the date. + */ +asn1.utcTimeToDate = function(utc) { + /* The following formats can be used: + + YYMMDDhhmmZ + YYMMDDhhmm+hh'mm' + YYMMDDhhmm-hh'mm' + YYMMDDhhmmssZ + YYMMDDhhmmss+hh'mm' + YYMMDDhhmmss-hh'mm' + + Where: + + YY is the least significant two digits of the year + MM is the month (01 to 12) + DD is the day (01 to 31) + hh is the hour (00 to 23) + mm are the minutes (00 to 59) + ss are the seconds (00 to 59) + Z indicates that local time is GMT, + indicates that local time is + later than GMT, and - indicates that local time is earlier than GMT + hh' is the absolute value of the offset from GMT in hours + mm' is the absolute value of the offset from GMT in minutes */ + var date = new Date(); + + // if YY >= 50 use 19xx, if YY < 50 use 20xx + var year = parseInt(utc.substr(0, 2), 10); + year = (year >= 50) ? 1900 + year : 2000 + year; + var MM = parseInt(utc.substr(2, 2), 10) - 1; // use 0-11 for month + var DD = parseInt(utc.substr(4, 2), 10); + var hh = parseInt(utc.substr(6, 2), 10); + var mm = parseInt(utc.substr(8, 2), 10); + var ss = 0; + + // not just YYMMDDhhmmZ + if(utc.length > 11) { + // get character after minutes + var c = utc.charAt(10); + var end = 10; + + // see if seconds are present + if(c !== '+' && c !== '-') { + // get seconds + ss = parseInt(utc.substr(10, 2), 10); + end += 2; + } + } + + // update date + date.setUTCFullYear(year, MM, DD); + date.setUTCHours(hh, mm, ss, 0); + + if(end) { + // get +/- after end of time + c = utc.charAt(end); + if(c === '+' || c === '-') { + // get hours+minutes offset + var hhoffset = parseInt(utc.substr(end + 1, 2), 10); + var mmoffset = parseInt(utc.substr(end + 4, 2), 10); + + // calculate offset in milliseconds + var offset = hhoffset * 60 + mmoffset; + offset *= 60000; + + // apply offset + if(c === '+') { + date.setTime(+date - offset); + } else { + date.setTime(+date + offset); + } + } + } + + return date; +}; + +/** + * Converts a GeneralizedTime value to a date. + * + * @param gentime the GeneralizedTime value to convert. + * + * @return the date. + */ +asn1.generalizedTimeToDate = function(gentime) { + /* The following formats can be used: + + YYYYMMDDHHMMSS + YYYYMMDDHHMMSS.fff + YYYYMMDDHHMMSSZ + YYYYMMDDHHMMSS.fffZ + YYYYMMDDHHMMSS+hh'mm' + YYYYMMDDHHMMSS.fff+hh'mm' + YYYYMMDDHHMMSS-hh'mm' + YYYYMMDDHHMMSS.fff-hh'mm' + + Where: + + YYYY is the year + MM is the month (01 to 12) + DD is the day (01 to 31) + hh is the hour (00 to 23) + mm are the minutes (00 to 59) + ss are the seconds (00 to 59) + .fff is the second fraction, accurate to three decimal places + Z indicates that local time is GMT, + indicates that local time is + later than GMT, and - indicates that local time is earlier than GMT + hh' is the absolute value of the offset from GMT in hours + mm' is the absolute value of the offset from GMT in minutes */ + var date = new Date(); + + var YYYY = parseInt(gentime.substr(0, 4), 10); + var MM = parseInt(gentime.substr(4, 2), 10) - 1; // use 0-11 for month + var DD = parseInt(gentime.substr(6, 2), 10); + var hh = parseInt(gentime.substr(8, 2), 10); + var mm = parseInt(gentime.substr(10, 2), 10); + var ss = parseInt(gentime.substr(12, 2), 10); + var fff = 0; + var offset = 0; + var isUTC = false; + + if(gentime.charAt(gentime.length - 1) === 'Z') { + isUTC = true; + } + + var end = gentime.length - 5, c = gentime.charAt(end); + if(c === '+' || c === '-') { + // get hours+minutes offset + var hhoffset = parseInt(gentime.substr(end + 1, 2), 10); + var mmoffset = parseInt(gentime.substr(end + 4, 2), 10); + + // calculate offset in milliseconds + offset = hhoffset * 60 + mmoffset; + offset *= 60000; + + // apply offset + if(c === '+') { + offset *= -1; + } + + isUTC = true; + } + + // check for second fraction + if(gentime.charAt(14) === '.') { + fff = parseFloat(gentime.substr(14), 10) * 1000; + } + + if(isUTC) { + date.setUTCFullYear(YYYY, MM, DD); + date.setUTCHours(hh, mm, ss, fff); + + // apply offset + date.setTime(+date + offset); + } else { + date.setFullYear(YYYY, MM, DD); + date.setHours(hh, mm, ss, fff); + } + + return date; +}; + +/** + * Converts a date to a UTCTime value. + * + * Note: GeneralizedTime has 4 digits for the year and is used for X.509 + * dates past 2049. Converting to a GeneralizedTime hasn't been + * implemented yet. + * + * @param date the date to convert. + * + * @return the UTCTime value. + */ +asn1.dateToUtcTime = function(date) { + // TODO: validate; currently assumes proper format + if(typeof date === 'string') { + return date; + } + + var rval = ''; + + // create format YYMMDDhhmmssZ + var format = []; + format.push(('' + date.getUTCFullYear()).substr(2)); + format.push('' + (date.getUTCMonth() + 1)); + format.push('' + date.getUTCDate()); + format.push('' + date.getUTCHours()); + format.push('' + date.getUTCMinutes()); + format.push('' + date.getUTCSeconds()); + + // ensure 2 digits are used for each format entry + for(var i = 0; i < format.length; ++i) { + if(format[i].length < 2) { + rval += '0'; + } + rval += format[i]; + } + rval += 'Z'; + + return rval; +}; + +/** + * Converts a date to a GeneralizedTime value. + * + * @param date the date to convert. + * + * @return the GeneralizedTime value as a string. + */ +asn1.dateToGeneralizedTime = function(date) { + // TODO: validate; currently assumes proper format + if(typeof date === 'string') { + return date; + } + + var rval = ''; + + // create format YYYYMMDDHHMMSSZ + var format = []; + format.push('' + date.getUTCFullYear()); + format.push('' + (date.getUTCMonth() + 1)); + format.push('' + date.getUTCDate()); + format.push('' + date.getUTCHours()); + format.push('' + date.getUTCMinutes()); + format.push('' + date.getUTCSeconds()); + + // ensure 2 digits are used for each format entry + for(var i = 0; i < format.length; ++i) { + if(format[i].length < 2) { + rval += '0'; + } + rval += format[i]; + } + rval += 'Z'; + + return rval; +}; + +/** + * Converts a javascript integer to a DER-encoded byte buffer to be used + * as the value for an INTEGER type. + * + * @param x the integer. + * + * @return the byte buffer. + */ +asn1.integerToDer = function(x) { + var rval = forge.util.createBuffer(); + if(x >= -0x80 && x < 0x80) { + return rval.putSignedInt(x, 8); + } + if(x >= -0x8000 && x < 0x8000) { + return rval.putSignedInt(x, 16); + } + if(x >= -0x800000 && x < 0x800000) { + return rval.putSignedInt(x, 24); + } + if(x >= -0x80000000 && x < 0x80000000) { + return rval.putSignedInt(x, 32); + } + var error = new Error('Integer too large; max is 32-bits.'); + error.integer = x; + throw error; +}; + +/** + * Converts a DER-encoded byte buffer to a javascript integer. This is + * typically used to decode the value of an INTEGER type. + * + * @param bytes the byte buffer. + * + * @return the integer. + */ +asn1.derToInteger = function(bytes) { + // wrap in buffer if needed + if(typeof bytes === 'string') { + bytes = forge.util.createBuffer(bytes); + } + + var n = bytes.length() * 8; + if(n > 32) { + throw new Error('Integer too large; max is 32-bits.'); + } + return bytes.getSignedInt(n); +}; + +/** + * Validates that the given ASN.1 object is at least a super set of the + * given ASN.1 structure. Only tag classes and types are checked. An + * optional map may also be provided to capture ASN.1 values while the + * structure is checked. + * + * To capture an ASN.1 value, set an object in the validator's 'capture' + * parameter to the key to use in the capture map. To capture the full + * ASN.1 object, specify 'captureAsn1'. To capture BIT STRING bytes, including + * the leading unused bits counter byte, specify 'captureBitStringContents'. + * To capture BIT STRING bytes, without the leading unused bits counter byte, + * specify 'captureBitStringValue'. + * + * Objects in the validator may set a field 'optional' to true to indicate + * that it isn't necessary to pass validation. + * + * @param obj the ASN.1 object to validate. + * @param v the ASN.1 structure validator. + * @param capture an optional map to capture values in. + * @param errors an optional array for storing validation errors. + * + * @return true on success, false on failure. + */ +asn1.validate = function(obj, v, capture, errors) { + var rval = false; + + // ensure tag class and type are the same if specified + if((obj.tagClass === v.tagClass || typeof(v.tagClass) === 'undefined') && + (obj.type === v.type || typeof(v.type) === 'undefined')) { + // ensure constructed flag is the same if specified + if(obj.constructed === v.constructed || + typeof(v.constructed) === 'undefined') { + rval = true; + + // handle sub values + if(v.value && forge.util.isArray(v.value)) { + var j = 0; + for(var i = 0; rval && i < v.value.length; ++i) { + rval = v.value[i].optional || false; + if(obj.value[j]) { + rval = asn1.validate(obj.value[j], v.value[i], capture, errors); + if(rval) { + ++j; + } else if(v.value[i].optional) { + rval = true; + } + } + if(!rval && errors) { + errors.push( + '[' + v.name + '] ' + + 'Tag class "' + v.tagClass + '", type "' + + v.type + '" expected value length "' + + v.value.length + '", got "' + + obj.value.length + '"'); + } + } + } + + if(rval && capture) { + if(v.capture) { + capture[v.capture] = obj.value; + } + if(v.captureAsn1) { + capture[v.captureAsn1] = obj; + } + if(v.captureBitStringContents && 'bitStringContents' in obj) { + capture[v.captureBitStringContents] = obj.bitStringContents; + } + if(v.captureBitStringValue && 'bitStringContents' in obj) { + var value; + if(obj.bitStringContents.length < 2) { + capture[v.captureBitStringValue] = ''; + } else { + // FIXME: support unused bits with data shifting + var unused = obj.bitStringContents.charCodeAt(0); + if(unused !== 0) { + throw new Error( + 'captureBitStringValue only supported for zero unused bits'); + } + capture[v.captureBitStringValue] = obj.bitStringContents.slice(1); + } + } + } + } else if(errors) { + errors.push( + '[' + v.name + '] ' + + 'Expected constructed "' + v.constructed + '", got "' + + obj.constructed + '"'); + } + } else if(errors) { + if(obj.tagClass !== v.tagClass) { + errors.push( + '[' + v.name + '] ' + + 'Expected tag class "' + v.tagClass + '", got "' + + obj.tagClass + '"'); + } + if(obj.type !== v.type) { + errors.push( + '[' + v.name + '] ' + + 'Expected type "' + v.type + '", got "' + obj.type + '"'); + } + } + return rval; +}; + +// regex for testing for non-latin characters +var _nonLatinRegex = /[^\\u0000-\\u00ff]/; + +/** + * Pretty prints an ASN.1 object to a string. + * + * @param obj the object to write out. + * @param level the level in the tree. + * @param indentation the indentation to use. + * + * @return the string. + */ +asn1.prettyPrint = function(obj, level, indentation) { + var rval = ''; + + // set default level and indentation + level = level || 0; + indentation = indentation || 2; + + // start new line for deep levels + if(level > 0) { + rval += '\n'; + } + + // create indent + var indent = ''; + for(var i = 0; i < level * indentation; ++i) { + indent += ' '; + } + + // print class:type + rval += indent + 'Tag: '; + switch(obj.tagClass) { + case asn1.Class.UNIVERSAL: + rval += 'Universal:'; + break; + case asn1.Class.APPLICATION: + rval += 'Application:'; + break; + case asn1.Class.CONTEXT_SPECIFIC: + rval += 'Context-Specific:'; + break; + case asn1.Class.PRIVATE: + rval += 'Private:'; + break; + } + + if(obj.tagClass === asn1.Class.UNIVERSAL) { + rval += obj.type; + + // known types + switch(obj.type) { + case asn1.Type.NONE: + rval += ' (None)'; + break; + case asn1.Type.BOOLEAN: + rval += ' (Boolean)'; + break; + case asn1.Type.INTEGER: + rval += ' (Integer)'; + break; + case asn1.Type.BITSTRING: + rval += ' (Bit string)'; + break; + case asn1.Type.OCTETSTRING: + rval += ' (Octet string)'; + break; + case asn1.Type.NULL: + rval += ' (Null)'; + break; + case asn1.Type.OID: + rval += ' (Object Identifier)'; + break; + case asn1.Type.ODESC: + rval += ' (Object Descriptor)'; + break; + case asn1.Type.EXTERNAL: + rval += ' (External or Instance of)'; + break; + case asn1.Type.REAL: + rval += ' (Real)'; + break; + case asn1.Type.ENUMERATED: + rval += ' (Enumerated)'; + break; + case asn1.Type.EMBEDDED: + rval += ' (Embedded PDV)'; + break; + case asn1.Type.UTF8: + rval += ' (UTF8)'; + break; + case asn1.Type.ROID: + rval += ' (Relative Object Identifier)'; + break; + case asn1.Type.SEQUENCE: + rval += ' (Sequence)'; + break; + case asn1.Type.SET: + rval += ' (Set)'; + break; + case asn1.Type.PRINTABLESTRING: + rval += ' (Printable String)'; + break; + case asn1.Type.IA5String: + rval += ' (IA5String (ASCII))'; + break; + case asn1.Type.UTCTIME: + rval += ' (UTC time)'; + break; + case asn1.Type.GENERALIZEDTIME: + rval += ' (Generalized time)'; + break; + case asn1.Type.BMPSTRING: + rval += ' (BMP String)'; + break; + } + } else { + rval += obj.type; + } + + rval += '\n'; + rval += indent + 'Constructed: ' + obj.constructed + '\n'; + + if(obj.composed) { + var subvalues = 0; + var sub = ''; + for(var i = 0; i < obj.value.length; ++i) { + if(obj.value[i] !== undefined) { + subvalues += 1; + sub += asn1.prettyPrint(obj.value[i], level + 1, indentation); + if((i + 1) < obj.value.length) { + sub += ','; + } + } + } + rval += indent + 'Sub values: ' + subvalues + sub; + } else { + rval += indent + 'Value: '; + if(obj.type === asn1.Type.OID) { + var oid = asn1.derToOid(obj.value); + rval += oid; + if(forge.pki && forge.pki.oids) { + if(oid in forge.pki.oids) { + rval += ' (' + forge.pki.oids[oid] + ') '; + } + } + } + if(obj.type === asn1.Type.INTEGER) { + try { + rval += asn1.derToInteger(obj.value); + } catch(ex) { + rval += '0x' + forge.util.bytesToHex(obj.value); + } + } else if(obj.type === asn1.Type.BITSTRING) { + // TODO: shift bits as needed to display without padding + if(obj.value.length > 1) { + // remove unused bits field + rval += '0x' + forge.util.bytesToHex(obj.value.slice(1)); + } else { + rval += '(none)'; + } + // show unused bit count + if(obj.value.length > 0) { + var unused = obj.value.charCodeAt(0); + if(unused == 1) { + rval += ' (1 unused bit shown)'; + } else if(unused > 1) { + rval += ' (' + unused + ' unused bits shown)'; + } + } + } else if(obj.type === asn1.Type.OCTETSTRING) { + if(!_nonLatinRegex.test(obj.value)) { + rval += '(' + obj.value + ') '; + } + rval += '0x' + forge.util.bytesToHex(obj.value); + } else if(obj.type === asn1.Type.UTF8) { + rval += forge.util.decodeUtf8(obj.value); + } else if(obj.type === asn1.Type.PRINTABLESTRING || + obj.type === asn1.Type.IA5String) { + rval += obj.value; + } else if(_nonLatinRegex.test(obj.value)) { + rval += '0x' + forge.util.bytesToHex(obj.value); + } else if(obj.value.length === 0) { + rval += '[null]'; + } else { + rval += obj.value; + } + } + + return rval; +}; + + +/***/ }), + +/***/ "xZgz": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__("Zh31"); + +var _interopRequireDefault = __webpack_require__("OYUV"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getDomTreeShapes = getDomTreeShapes; +exports.findNativeHandler = findNativeHandler; +exports.default = exports.SwipeableViewsContext = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__("G2ut")); + +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("PTHm")); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__("MOn9")); + +var _createClass2 = _interopRequireDefault(__webpack_require__("NRM5")); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("VJ99")); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("hR4y")); + +var _inherits2 = _interopRequireDefault(__webpack_require__("jiea")); + +var React = _interopRequireWildcard(__webpack_require__("q1tI")); + +var _propTypes = _interopRequireDefault(__webpack_require__("17x9")); + +var _warning = _interopRequireDefault(__webpack_require__("2W6z")); + +var _reactSwipeableViewsCore = __webpack_require__("TZ23"); + +function addEventListener(node, event, handler, options) { + node.addEventListener(event, handler, options); + return { + remove: function remove() { + node.removeEventListener(event, handler, options); + } + }; +} + +var styles = { + container: { + direction: 'ltr', + display: 'flex', + willChange: 'transform' + }, + slide: { + width: '100%', + WebkitFlexShrink: 0, + flexShrink: 0, + overflow: 'auto' + } +}; +var axisProperties = { + root: { + x: { + overflowX: 'hidden' + }, + 'x-reverse': { + overflowX: 'hidden' + }, + y: { + overflowY: 'hidden' + }, + 'y-reverse': { + overflowY: 'hidden' + } + }, + flexDirection: { + x: 'row', + 'x-reverse': 'row-reverse', + y: 'column', + 'y-reverse': 'column-reverse' + }, + transform: { + x: function x(translate) { + return "translate(".concat(-translate, "%, 0)"); + }, + 'x-reverse': function xReverse(translate) { + return "translate(".concat(translate, "%, 0)"); + }, + y: function y(translate) { + return "translate(0, ".concat(-translate, "%)"); + }, + 'y-reverse': function yReverse(translate) { + return "translate(0, ".concat(translate, "%)"); + } + }, + length: { + x: 'width', + 'x-reverse': 'width', + y: 'height', + 'y-reverse': 'height' + }, + rotationMatrix: { + x: { + x: [1, 0], + y: [0, 1] + }, + 'x-reverse': { + x: [-1, 0], + y: [0, 1] + }, + y: { + x: [0, 1], + y: [1, 0] + }, + 'y-reverse': { + x: [0, -1], + y: [1, 0] + } + }, + scrollPosition: { + x: 'scrollLeft', + 'x-reverse': 'scrollLeft', + y: 'scrollTop', + 'y-reverse': 'scrollTop' + }, + scrollLength: { + x: 'scrollWidth', + 'x-reverse': 'scrollWidth', + y: 'scrollHeight', + 'y-reverse': 'scrollHeight' + }, + clientLength: { + x: 'clientWidth', + 'x-reverse': 'clientWidth', + y: 'clientHeight', + 'y-reverse': 'clientHeight' + } +}; + +function createTransition(property, options) { + var duration = options.duration, + easeFunction = options.easeFunction, + delay = options.delay; + return "".concat(property, " ").concat(duration, " ").concat(easeFunction, " ").concat(delay); +} // We are using a 2x2 rotation matrix. + + +function applyRotationMatrix(touch, axis) { + var rotationMatrix = axisProperties.rotationMatrix[axis]; + return { + pageX: rotationMatrix.x[0] * touch.pageX + rotationMatrix.x[1] * touch.pageY, + pageY: rotationMatrix.y[0] * touch.pageX + rotationMatrix.y[1] * touch.pageY + }; +} + +function adaptMouse(event) { + event.touches = [{ + pageX: event.pageX, + pageY: event.pageY + }]; + return event; +} + +function getDomTreeShapes(element, rootNode) { + var domTreeShapes = []; + + while (element && element !== rootNode && element !== document.body) { + // We reach a Swipeable View, no need to look higher in the dom tree. + if (element.hasAttribute('data-swipeable')) { + break; + } + + var style = window.getComputedStyle(element); + + if ( // Ignore the scroll children if the element is absolute positioned. + style.getPropertyValue('position') === 'absolute' || // Ignore the scroll children if the element has an overflowX hidden + style.getPropertyValue('overflow-x') === 'hidden') { + domTreeShapes = []; + } else if (element.clientWidth > 0 && element.scrollWidth > element.clientWidth || element.clientHeight > 0 && element.scrollHeight > element.clientHeight) { + // Ignore the nodes that have no width. + // Keep elements with a scroll + domTreeShapes.push({ + element: element, + scrollWidth: element.scrollWidth, + scrollHeight: element.scrollHeight, + clientWidth: element.clientWidth, + clientHeight: element.clientHeight, + scrollLeft: element.scrollLeft, + scrollTop: element.scrollTop + }); + } + + element = element.parentNode; + } + + return domTreeShapes; +} // We can only have one node at the time claiming ownership for handling the swipe. +// Otherwise, the UX would be confusing. +// That's why we use a singleton here. + + +var nodeWhoClaimedTheScroll = null; + +function findNativeHandler(params) { + var domTreeShapes = params.domTreeShapes, + pageX = params.pageX, + startX = params.startX, + axis = params.axis; + return domTreeShapes.some(function (shape) { + // Determine if we are going backward or forward. + var goingForward = pageX >= startX; + + if (axis === 'x' || axis === 'y') { + goingForward = !goingForward; + } // scrollTop is not always be an integer. + // https://github.com/jquery/api.jquery.com/issues/608 + + + var scrollPosition = Math.round(shape[axisProperties.scrollPosition[axis]]); + var areNotAtStart = scrollPosition > 0; + var areNotAtEnd = scrollPosition + shape[axisProperties.clientLength[axis]] < shape[axisProperties.scrollLength[axis]]; + + if (goingForward && areNotAtEnd || !goingForward && areNotAtStart) { + nodeWhoClaimedTheScroll = shape.element; + return true; + } + + return false; + }); +} + +var SwipeableViewsContext = React.createContext(); +exports.SwipeableViewsContext = SwipeableViewsContext; + +if (false) {} + +var SwipeableViews = +/*#__PURE__*/ +function (_React$Component) { + (0, _inherits2.default)(SwipeableViews, _React$Component); + + function SwipeableViews(props) { + var _this; + + (0, _classCallCheck2.default)(this, SwipeableViews); + _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(SwipeableViews).call(this, props)); + _this.rootNode = null; + _this.containerNode = null; + _this.ignoreNextScrollEvents = false; + _this.viewLength = 0; + _this.startX = 0; + _this.lastX = 0; + _this.vx = 0; + _this.startY = 0; + _this.isSwiping = undefined; + _this.started = false; + _this.startIndex = 0; + _this.transitionListener = null; + _this.touchMoveListener = null; + _this.activeSlide = null; + _this.indexCurrent = null; + _this.firstRenderTimeout = null; + + _this.setRootNode = function (node) { + _this.rootNode = node; + }; + + _this.setContainerNode = function (node) { + _this.containerNode = node; + }; + + _this.setActiveSlide = function (node) { + _this.activeSlide = node; + + _this.updateHeight(); + }; + + _this.handleSwipeStart = function (event) { + var axis = _this.props.axis; + var touch = applyRotationMatrix(event.touches[0], axis); + _this.viewLength = _this.rootNode.getBoundingClientRect()[axisProperties.length[axis]]; + _this.startX = touch.pageX; + _this.lastX = touch.pageX; + _this.vx = 0; + _this.startY = touch.pageY; + _this.isSwiping = undefined; + _this.started = true; + var computedStyle = window.getComputedStyle(_this.containerNode); + var transform = computedStyle.getPropertyValue('-webkit-transform') || computedStyle.getPropertyValue('transform'); + + if (transform && transform !== 'none') { + var transformValues = transform.split('(')[1].split(')')[0].split(','); + var rootStyle = window.getComputedStyle(_this.rootNode); + var tranformNormalized = applyRotationMatrix({ + pageX: parseInt(transformValues[4], 10), + pageY: parseInt(transformValues[5], 10) + }, axis); + _this.startIndex = -tranformNormalized.pageX / (_this.viewLength - parseInt(rootStyle.paddingLeft, 10) - parseInt(rootStyle.paddingRight, 10)) || 0; + } + }; + + _this.handleSwipeMove = function (event) { + // The touch start event can be cancel. + // Makes sure we set a starting point. + if (!_this.started) { + _this.handleTouchStart(event); + + return; + } // We are not supposed to hanlde this touch move. + + + if (nodeWhoClaimedTheScroll !== null && nodeWhoClaimedTheScroll !== _this.rootNode) { + return; + } + + var _this$props = _this.props, + axis = _this$props.axis, + children = _this$props.children, + ignoreNativeScroll = _this$props.ignoreNativeScroll, + onSwitching = _this$props.onSwitching, + resistance = _this$props.resistance; + var touch = applyRotationMatrix(event.touches[0], axis); // We don't know yet. + + if (_this.isSwiping === undefined) { + var dx = Math.abs(touch.pageX - _this.startX); + var dy = Math.abs(touch.pageY - _this.startY); + var isSwiping = dx > dy && dx > _reactSwipeableViewsCore.constant.UNCERTAINTY_THRESHOLD; // We let the parent handle the scroll. + + if (!resistance && (axis === 'y' || axis === 'y-reverse') && (_this.indexCurrent === 0 && _this.startX < touch.pageX || _this.indexCurrent === React.Children.count(_this.props.children) - 1 && _this.startX > touch.pageX)) { + _this.isSwiping = false; + return; + } // We are likely to be swiping, let's prevent the scroll event. + + + if (dx > dy) { + event.preventDefault(); + } + + if (isSwiping === true || dy > _reactSwipeableViewsCore.constant.UNCERTAINTY_THRESHOLD) { + _this.isSwiping = isSwiping; + _this.startX = touch.pageX; // Shift the starting point. + + return; // Let's wait the next touch event to move something. + } + } + + if (_this.isSwiping !== true) { + return; + } // We are swiping, let's prevent the scroll event. + + + event.preventDefault(); // Low Pass filter. + + _this.vx = _this.vx * 0.5 + (touch.pageX - _this.lastX) * 0.5; + _this.lastX = touch.pageX; + + var _computeIndex = (0, _reactSwipeableViewsCore.computeIndex)({ + children: children, + resistance: resistance, + pageX: touch.pageX, + startIndex: _this.startIndex, + startX: _this.startX, + viewLength: _this.viewLength + }), + index = _computeIndex.index, + startX = _computeIndex.startX; // Add support for native scroll elements. + + + if (nodeWhoClaimedTheScroll === null && !ignoreNativeScroll) { + var domTreeShapes = getDomTreeShapes(event.target, _this.rootNode); + var hasFoundNativeHandler = findNativeHandler({ + domTreeShapes: domTreeShapes, + startX: _this.startX, + pageX: touch.pageX, + axis: axis + }); // We abort the touch move handler. + + if (hasFoundNativeHandler) { + return; + } + } // We are moving toward the edges. + + + if (startX) { + _this.startX = startX; + } else if (nodeWhoClaimedTheScroll === null) { + nodeWhoClaimedTheScroll = _this.rootNode; + } + + _this.setIndexCurrent(index); + + var callback = function callback() { + if (onSwitching) { + onSwitching(index, 'move'); + } + }; + + if (_this.state.displaySameSlide || !_this.state.isDragging) { + _this.setState({ + displaySameSlide: false, + isDragging: true + }, callback); + } + + callback(); + }; + + _this.handleSwipeEnd = function () { + nodeWhoClaimedTheScroll = null; // The touch start event can be cancel. + // Makes sure that a starting point is set. + + if (!_this.started) { + return; + } + + _this.started = false; + + if (_this.isSwiping !== true) { + return; + } + + var indexLatest = _this.state.indexLatest; + var indexCurrent = _this.indexCurrent; + var delta = indexLatest - indexCurrent; + var indexNew; // Quick movement + + if (Math.abs(_this.vx) > _this.props.threshold) { + if (_this.vx > 0) { + indexNew = Math.floor(indexCurrent); + } else { + indexNew = Math.ceil(indexCurrent); + } + } else if (Math.abs(delta) > _this.props.hysteresis) { + // Some hysteresis with indexLatest. + indexNew = delta > 0 ? Math.floor(indexCurrent) : Math.ceil(indexCurrent); + } else { + indexNew = indexLatest; + } + + var indexMax = React.Children.count(_this.props.children) - 1; + + if (indexNew < 0) { + indexNew = 0; + } else if (indexNew > indexMax) { + indexNew = indexMax; + } + + _this.setIndexCurrent(indexNew); + + _this.setState({ + indexLatest: indexNew, + isDragging: false + }, function () { + if (_this.props.onSwitching) { + _this.props.onSwitching(indexNew, 'end'); + } + + if (_this.props.onChangeIndex && indexNew !== indexLatest) { + _this.props.onChangeIndex(indexNew, indexLatest, { + reason: 'swipe' + }); + } // Manually calling handleTransitionEnd in that case as isn't otherwise. + + + if (indexCurrent === indexLatest) { + _this.handleTransitionEnd(); + } + }); + }; + + _this.handleTouchStart = function (event) { + if (_this.props.onTouchStart) { + _this.props.onTouchStart(event); + } + + _this.handleSwipeStart(event); + }; + + _this.handleTouchEnd = function (event) { + if (_this.props.onTouchEnd) { + _this.props.onTouchEnd(event); + } + + _this.handleSwipeEnd(event); + }; + + _this.handleMouseDown = function (event) { + if (_this.props.onMouseDown) { + _this.props.onMouseDown(event); + } + + event.persist(); + + _this.handleSwipeStart(adaptMouse(event)); + }; + + _this.handleMouseUp = function (event) { + if (_this.props.onMouseUp) { + _this.props.onMouseUp(event); + } + + _this.handleSwipeEnd(adaptMouse(event)); + }; + + _this.handleMouseLeave = function (event) { + if (_this.props.onMouseLeave) { + _this.props.onMouseLeave(event); + } // Filter out events + + + if (_this.started) { + _this.handleSwipeEnd(adaptMouse(event)); + } + }; + + _this.handleMouseMove = function (event) { + if (_this.props.onMouseMove) { + _this.props.onMouseMove(event); + } // Filter out events + + + if (_this.started) { + _this.handleSwipeMove(adaptMouse(event)); + } + }; + + _this.handleScroll = function (event) { + if (_this.props.onScroll) { + _this.props.onScroll(event); + } // Ignore events bubbling up. + + + if (event.target !== _this.rootNode) { + return; + } + + if (_this.ignoreNextScrollEvents) { + _this.ignoreNextScrollEvents = false; + return; + } + + var indexLatest = _this.state.indexLatest; + var indexNew = Math.ceil(event.target.scrollLeft / event.target.clientWidth) + indexLatest; + _this.ignoreNextScrollEvents = true; // Reset the scroll position. + + event.target.scrollLeft = 0; + + if (_this.props.onChangeIndex && indexNew !== indexLatest) { + _this.props.onChangeIndex(indexNew, indexLatest, { + reason: 'focus' + }); + } + }; + + _this.updateHeight = function () { + if (_this.activeSlide !== null) { + var child = _this.activeSlide.children[0]; + + if (child !== undefined && child.offsetHeight !== undefined && _this.state.heightLatest !== child.offsetHeight) { + _this.setState({ + heightLatest: child.offsetHeight + }); + } + } + }; + + if (false) {} + + _this.state = { + indexLatest: props.index, + // Set to true as soon as the component is swiping. + // It's the state counter part of this.isSwiping. + isDragging: false, + // Help with SSR logic and lazy loading logic. + renderOnlyActive: !props.disableLazyLoading, + heightLatest: 0, + // Let the render method that we are going to display the same slide than previously. + displaySameSlide: true + }; + + _this.setIndexCurrent(props.index); + + return _this; + } + + (0, _createClass2.default)(SwipeableViews, [{ + key: "componentDidMount", + value: function componentDidMount() { + var _this2 = this; + + // Subscribe to transition end events. + this.transitionListener = addEventListener(this.containerNode, 'transitionend', function (event) { + if (event.target !== _this2.containerNode) { + return; + } + + _this2.handleTransitionEnd(); + }); // Block the thread to handle that event. + + this.touchMoveListener = addEventListener(this.rootNode, 'touchmove', function (event) { + // Handling touch events is disabled. + if (_this2.props.disabled) { + return; + } + + _this2.handleSwipeMove(event); + }, { + passive: false + }); + + if (!this.props.disableLazyLoading) { + this.firstRenderTimeout = setTimeout(function () { + _this2.setState({ + renderOnlyActive: false + }); + }, 0); + } // Send all functions in an object if action param is set. + + + if (this.props.action) { + this.props.action({ + updateHeight: this.updateHeight + }); + } + } // eslint-disable-next-line camelcase,react/sort-comp + + }, { + key: "UNSAFE_componentWillReceiveProps", + value: function UNSAFE_componentWillReceiveProps(nextProps) { + var index = nextProps.index; + + if (typeof index === 'number' && index !== this.props.index) { + if (false) {} + + this.setIndexCurrent(index); + this.setState({ + // If true, we are going to change the children. We shoudn't animate it. + displaySameSlide: (0, _reactSwipeableViewsCore.getDisplaySameSlide)(this.props, nextProps), + indexLatest: index + }); + } + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.transitionListener.remove(); + this.touchMoveListener.remove(); + clearTimeout(this.firstRenderTimeout); + } + }, { + key: "getSwipeableViewsContext", + value: function getSwipeableViewsContext() { + var _this3 = this; + + return { + slideUpdateHeight: function slideUpdateHeight() { + _this3.updateHeight(); + } + }; + } + }, { + key: "setIndexCurrent", + value: function setIndexCurrent(indexCurrent) { + if (!this.props.animateTransitions && this.indexCurrent !== indexCurrent) { + this.handleTransitionEnd(); + } + + this.indexCurrent = indexCurrent; + + if (this.containerNode) { + var axis = this.props.axis; + var transform = axisProperties.transform[axis](indexCurrent * 100); + this.containerNode.style.WebkitTransform = transform; + this.containerNode.style.transform = transform; + } + } + }, { + key: "handleTransitionEnd", + value: function handleTransitionEnd() { + if (!this.props.onTransitionEnd) { + return; + } // Filters out when changing the children + + + if (this.state.displaySameSlide) { + return; + } // The rest callback is triggered when swiping. It's just noise. + // We filter it out. + + + if (!this.state.isDragging) { + this.props.onTransitionEnd(); + } + } + }, { + key: "render", + value: function render() { + var _this4 = this; + + var _this$props2 = this.props, + action = _this$props2.action, + animateHeight = _this$props2.animateHeight, + animateTransitions = _this$props2.animateTransitions, + axis = _this$props2.axis, + children = _this$props2.children, + containerStyleProp = _this$props2.containerStyle, + disabled = _this$props2.disabled, + disableLazyLoading = _this$props2.disableLazyLoading, + enableMouseEvents = _this$props2.enableMouseEvents, + hysteresis = _this$props2.hysteresis, + ignoreNativeScroll = _this$props2.ignoreNativeScroll, + index = _this$props2.index, + onChangeIndex = _this$props2.onChangeIndex, + onSwitching = _this$props2.onSwitching, + onTransitionEnd = _this$props2.onTransitionEnd, + resistance = _this$props2.resistance, + slideStyleProp = _this$props2.slideStyle, + slideClassName = _this$props2.slideClassName, + springConfig = _this$props2.springConfig, + style = _this$props2.style, + threshold = _this$props2.threshold, + other = (0, _objectWithoutProperties2.default)(_this$props2, ["action", "animateHeight", "animateTransitions", "axis", "children", "containerStyle", "disabled", "disableLazyLoading", "enableMouseEvents", "hysteresis", "ignoreNativeScroll", "index", "onChangeIndex", "onSwitching", "onTransitionEnd", "resistance", "slideStyle", "slideClassName", "springConfig", "style", "threshold"]); + var _this$state = this.state, + displaySameSlide = _this$state.displaySameSlide, + heightLatest = _this$state.heightLatest, + indexLatest = _this$state.indexLatest, + isDragging = _this$state.isDragging, + renderOnlyActive = _this$state.renderOnlyActive; + var touchEvents = !disabled ? { + onTouchStart: this.handleTouchStart, + onTouchEnd: this.handleTouchEnd + } : {}; + var mouseEvents = !disabled && enableMouseEvents ? { + onMouseDown: this.handleMouseDown, + onMouseUp: this.handleMouseUp, + onMouseLeave: this.handleMouseLeave, + onMouseMove: this.handleMouseMove + } : {}; // There is no point to animate if we are already providing a height. + + false ? undefined : void 0; + var slideStyle = (0, _extends2.default)({}, styles.slide, slideStyleProp); + var transition; + var WebkitTransition; + + if (isDragging || !animateTransitions || displaySameSlide) { + transition = 'all 0s ease 0s'; + WebkitTransition = 'all 0s ease 0s'; + } else { + transition = createTransition('transform', springConfig); + WebkitTransition = createTransition('-webkit-transform', springConfig); + + if (heightLatest !== 0) { + var additionalTranstion = ", ".concat(createTransition('height', springConfig)); + transition += additionalTranstion; + WebkitTransition += additionalTranstion; + } + } + + var containerStyle = { + height: null, + WebkitFlexDirection: axisProperties.flexDirection[axis], + flexDirection: axisProperties.flexDirection[axis], + WebkitTransition: WebkitTransition, + transition: transition + }; // Apply the styles for SSR considerations + + if (!renderOnlyActive) { + var transform = axisProperties.transform[axis](this.indexCurrent * 100); + containerStyle.WebkitTransform = transform; + containerStyle.transform = transform; + } + + if (animateHeight) { + containerStyle.height = heightLatest; + } + + return React.createElement(SwipeableViewsContext.Provider, { + value: this.getSwipeableViewsContext() + }, React.createElement("div", (0, _extends2.default)({ + ref: this.setRootNode, + style: (0, _extends2.default)({}, axisProperties.root[axis], style) + }, other, touchEvents, mouseEvents, { + onScroll: this.handleScroll + }), React.createElement("div", { + ref: this.setContainerNode, + style: (0, _extends2.default)({}, containerStyle, styles.container, containerStyleProp), + className: "react-swipeable-view-container" + }, React.Children.map(children, function (child, indexChild) { + if (renderOnlyActive && indexChild !== indexLatest) { + return null; + } + + false ? undefined : void 0; + var ref; + var hidden = true; + + if (indexChild === indexLatest) { + hidden = false; + + if (animateHeight) { + ref = _this4.setActiveSlide; + slideStyle.overflowY = 'hidden'; + } + } + + return React.createElement("div", { + ref: ref, + style: slideStyle, + className: slideClassName, + "aria-hidden": hidden, + "data-swipeable": "true" + }, child); + })))); + } + }]); + return SwipeableViews; +}(React.Component); // Added as an ads for people using the React dev tools in production. +// So they know, the tool used to build the awesome UI they +// are looking at/retro engineering. + + +SwipeableViews.displayName = 'ReactSwipableView'; +SwipeableViews.propTypes = false ? undefined : {}; +SwipeableViews.defaultProps = { + animateHeight: false, + animateTransitions: true, + axis: 'x', + disabled: false, + disableLazyLoading: false, + enableMouseEvents: false, + hysteresis: 0.6, + ignoreNativeScroll: false, + index: 0, + threshold: 5, + springConfig: { + duration: '0.35s', + easeFunction: 'cubic-bezier(0.15, 0.3, 0.25, 1)', + delay: '0s' + }, + resistance: false +}; +var _default = SwipeableViews; +exports.default = _default; + +/***/ }), + +/***/ "xfY5": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__("dyZX"); +var has = __webpack_require__("aagx"); +var cof = __webpack_require__("LZWt"); +var inheritIfRequired = __webpack_require__("Xbzi"); +var toPrimitive = __webpack_require__("apmT"); +var fails = __webpack_require__("eeVq"); +var gOPN = __webpack_require__("kJMx").f; +var gOPD = __webpack_require__("EemH").f; +var dP = __webpack_require__("hswa").f; +var $trim = __webpack_require__("qncB").trim; +var NUMBER = 'Number'; +var $Number = global[NUMBER]; +var Base = $Number; +var proto = $Number.prototype; +// Opera ~12 has broken Object#toString +var BROKEN_COF = cof(__webpack_require__("Kuth")(proto)) == NUMBER; +var TRIM = 'trim' in String.prototype; + +// 7.1.3 ToNumber(argument) +var toNumber = function (argument) { + var it = toPrimitive(argument, false); + if (typeof it == 'string' && it.length > 2) { + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0); + var third, radix, maxCode; + if (first === 43 || first === 45) { + third = it.charCodeAt(2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i + case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i + default: return +it; + } + for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { + code = digits.charCodeAt(i); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if (code < 48 || code > maxCode) return NaN; + } return parseInt(digits, radix); + } + } return +it; +}; + +if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { + $Number = function Number(value) { + var it = arguments.length < 1 ? 0 : value; + var that = this; + return that instanceof $Number + // check on 1..constructor(foo) case + && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER) + ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); + }; + for (var keys = __webpack_require__("nh4g") ? gOPN(Base) : ( + // ES3: + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' + ).split(','), j = 0, key; keys.length > j; j++) { + if (has(Base, key = keys[j]) && !has($Number, key)) { + dP($Number, key, gOPD(Base, key)); + } + } + $Number.prototype = proto; + proto.constructor = $Number; + __webpack_require__("KroJ")(global, NUMBER, $Number); +} + - // create and return asn1 object - return asn1.create(tagClass, type, constructed, value, asn1Options); +/***/ }), + +/***/ "xfeJ": +/***/ (function(module, exports) { + +function _isNativeFunction(fn) { + return Function.toString.call(fn).indexOf("[native code]") !== -1; } -/** - * Converts the given asn1 object to a buffer of bytes in DER format. - * - * @param asn1 the asn1 object to convert to bytes. - * - * @return the buffer of bytes. - */ -asn1.toDer = function(obj) { - var bytes = forge.util.createBuffer(); +module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports; - // build the first byte - var b1 = obj.tagClass | obj.type; +/***/ }), - // for storing the ASN.1 value - var value = forge.util.createBuffer(); +/***/ "xhJ2": +/***/ (function(module, exports, __webpack_require__) { - // use BIT STRING contents if available and data not changed - var useBitStringContents = false; - if('bitStringContents' in obj) { - useBitStringContents = true; - if(obj.original) { - useBitStringContents = asn1.equals(obj, obj.original); - } - } +"use strict"; - if(useBitStringContents) { - value.putBytes(obj.bitStringContents); - } else if(obj.composed) { - // if composed, use each child asn1 object's DER bytes as value - // turn on 6th bit (0x20 = 32) to indicate asn1 is constructed - // from other asn1 objects - if(obj.constructed) { - b1 |= 0x20; - } else { - // type is a bit string, add unused bits of 0x00 - value.putByte(0x00); - } - // add all of the child DER bytes together - for(var i = 0; i < obj.value.length; ++i) { - if(obj.value[i] !== undefined) { - value.putBuffer(asn1.toDer(obj.value[i])); - } - } - } else { - // use asn1.value directly - if(obj.type === asn1.Type.BMPSTRING) { - for(var i = 0; i < obj.value.length; ++i) { - value.putInt16(obj.value.charCodeAt(i)); - } - } else { - // ensure integer is minimally-encoded - // TODO: should all leading bytes be stripped vs just one? - // .. ex '00 00 01' => '01'? - if(obj.type === asn1.Type.INTEGER && - obj.value.length > 1 && - // leading 0x00 for positive integer - ((obj.value.charCodeAt(0) === 0 && - (obj.value.charCodeAt(1) & 0x80) === 0) || - // leading 0xFF for negative integer - (obj.value.charCodeAt(0) === 0xFF && - (obj.value.charCodeAt(1) & 0x80) === 0x80))) { - value.putBytes(obj.value.substr(1)); - } else { - value.putBytes(obj.value); - } - } - } +var $isNaN = Number.isNaN || function (a) { return a !== a; }; - // add tag byte - bytes.putByte(b1); +module.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; }; - // use "short form" encoding - if(value.length() <= 127) { - // one byte describes the length - // bit 8 = 0 and bits 7-1 = length - bytes.putByte(value.length() & 0x7F); - } else { - // use "long form" encoding - // 2 to 127 bytes describe the length - // first byte: bit 8 = 1 and bits 7-1 = # of additional bytes - // other bytes: length in base 256, big-endian - var len = value.length(); - var lenBytes = ''; - do { - lenBytes += String.fromCharCode(len & 0xFF); - len = len >>> 8; - } while(len > 0); - // set first byte to # bytes used to store the length and turn on - // bit 8 to indicate long-form length is used - bytes.putByte(lenBytes.length | 0x80); +/***/ }), - // concatenate length bytes in reverse since they were generated - // little endian and we need big endian - for(var i = lenBytes.length - 1; i >= 0; --i) { - bytes.putByte(lenBytes.charCodeAt(i)); - } - } +/***/ "xhga": +/***/ (function(module, __webpack_exports__, __webpack_require__) { - // concatenate value bytes - bytes.putBuffer(value); - return bytes; -}; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscriptionShape", function() { return subscriptionShape; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "storeShape", function() { return storeShape; }); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("tBST"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__); -/** - * Converts an OID dot-separated string to a byte buffer. The byte buffer - * contains only the DER-encoded value, not any tag or length bytes. - * - * @param oid the OID dot-separated string. - * - * @return the byte buffer. - */ -asn1.oidToDer = function(oid) { - // split OID into individual values - var values = oid.split('.'); - var bytes = forge.util.createBuffer(); +var subscriptionShape = prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ + trySubscribe: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired, + tryUnsubscribe: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired, + notifyNestedSubs: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired, + isSubscribed: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired +}); +var storeShape = prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.shape({ + subscribe: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired, + dispatch: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired, + getState: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func.isRequired +}); - // first byte is 40 * value1 + value2 - bytes.putByte(40 * parseInt(values[0], 10) + parseInt(values[1], 10)); - // other bytes are each value in base 128 with 8th bit set except for - // the last byte for each value - var last, valueBytes, value, b; - for(var i = 2; i < values.length; ++i) { - // produce value bytes in reverse because we don't know how many - // bytes it will take to store the value - last = true; - valueBytes = []; - value = parseInt(values[i], 10); - do { - b = value & 0x7F; - value = value >>> 7; - // if value is not last, then turn on 8th bit - if(!last) { - b |= 0x80; - } - valueBytes.push(b); - last = false; - } while(value > 0); +/***/ }), - // add value bytes in reverse (needs to be in big endian) - for(var n = valueBytes.length - 1; n >= 0; --n) { - bytes.putByte(valueBytes[n]); - } - } +/***/ "xk4V": +/***/ (function(module, exports, __webpack_require__) { - return bytes; -}; +var rng = __webpack_require__("4fRq"); +var bytesToUuid = __webpack_require__("I2ZF"); -/** - * Converts a DER-encoded byte buffer to an OID dot-separated string. The - * byte buffer should contain only the DER-encoded value, not any tag or - * length bytes. - * - * @param bytes the byte buffer. - * - * @return the OID dot-separated string. - */ -asn1.derToOid = function(bytes) { - var oid; +function v4(options, buf, offset) { + var i = buf && offset || 0; - // wrap in buffer if needed - if(typeof bytes === 'string') { - bytes = forge.util.createBuffer(bytes); + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; } + options = options || {}; - // first byte is 40 * value1 + value2 - var b = bytes.getByte(); - oid = Math.floor(b / 40) + '.' + (b % 40); + var rnds = options.random || (options.rng || rng)(); - // other bytes are each value in base 128 with 8th bit set except for - // the last byte for each value - var value = 0; - while(bytes.length() > 0) { - b = bytes.getByte(); - value = value << 7; - // not the last byte for the value - if(b & 0x80) { - value += b & 0x7F; - } else { - // last byte - oid += '.' + (value + b); - value = 0; + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; } } - return oid; -}; + return buf || bytesToUuid(rnds); +} -/** - * Converts a UTCTime value to a date. - * - * Note: GeneralizedTime has 4 digits for the year and is used for X.509 - * dates past 2049. Parsing that structure hasn't been implemented yet. - * - * @param utc the UTCTime value to convert. - * - * @return the date. - */ -asn1.utcTimeToDate = function(utc) { - /* The following formats can be used: +module.exports = v4; - YYMMDDhhmmZ - YYMMDDhhmm+hh'mm' - YYMMDDhhmm-hh'mm' - YYMMDDhhmmssZ - YYMMDDhhmmss+hh'mm' - YYMMDDhhmmss-hh'mm' - Where: +/***/ }), - YY is the least significant two digits of the year - MM is the month (01 to 12) - DD is the day (01 to 31) - hh is the hour (00 to 23) - mm are the minutes (00 to 59) - ss are the seconds (00 to 59) - Z indicates that local time is GMT, + indicates that local time is - later than GMT, and - indicates that local time is earlier than GMT - hh' is the absolute value of the offset from GMT in hours - mm' is the absolute value of the offset from GMT in minutes */ - var date = new Date(); +/***/ "xkK/": +/***/ (function(module, __webpack_exports__, __webpack_require__) { - // if YY >= 50 use 19xx, if YY < 50 use 20xx - var year = parseInt(utc.substr(0, 2), 10); - year = (year >= 50) ? 1900 + year : 2000 + year; - var MM = parseInt(utc.substr(2, 2), 10) - 1; // use 0-11 for month - var DD = parseInt(utc.substr(4, 2), 10); - var hh = parseInt(utc.substr(6, 2), 10); - var mm = parseInt(utc.substr(8, 2), 10); - var ss = 0; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ImageListItem__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("o68O"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ImageListItem__WEBPACK_IMPORTED_MODULE_0__["default"]; }); - // not just YYMMDDhhmmZ - if(utc.length > 11) { - // get character after minutes - var c = utc.charAt(10); - var end = 10; - // see if seconds are present - if(c !== '+' && c !== '-') { - // get seconds - ss = parseInt(utc.substr(10, 2), 10); - end += 2; - } - } - // update date - date.setUTCFullYear(year, MM, DD); - date.setUTCHours(hh, mm, ss, 0); +/***/ }), - if(end) { - // get +/- after end of time - c = utc.charAt(end); - if(c === '+' || c === '-') { - // get hours+minutes offset - var hhoffset = parseInt(utc.substr(end + 1, 2), 10); - var mmoffset = parseInt(utc.substr(end + 4, 2), 10); +/***/ "xkTb": +/***/ (function(module, __webpack_exports__, __webpack_require__) { - // calculate offset in milliseconds - var offset = hhoffset * 60 + mmoffset; - offset *= 60000; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ZtE7"); - // apply offset - if(c === '+') { - date.setTime(+date - offset); - } else { - date.setTime(+date + offset); - } - } - } - return date; -}; +/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")); -/** - * Converts a GeneralizedTime value to a date. - * - * @param gentime the GeneralizedTime value to convert. - * - * @return the date. - */ -asn1.generalizedTimeToDate = function(gentime) { - /* The following formats can be used: - YYYYMMDDHHMMSS - YYYYMMDDHHMMSS.fff - YYYYMMDDHHMMSSZ - YYYYMMDDHHMMSS.fffZ - YYYYMMDDHHMMSS+hh'mm' - YYYYMMDDHHMMSS.fff+hh'mm' - YYYYMMDDHHMMSS-hh'mm' - YYYYMMDDHHMMSS.fff-hh'mm' +/***/ }), - Where: +/***/ "xm80": +/***/ (function(module, exports, __webpack_require__) { - YYYY is the year - MM is the month (01 to 12) - DD is the day (01 to 31) - hh is the hour (00 to 23) - mm are the minutes (00 to 59) - ss are the seconds (00 to 59) - .fff is the second fraction, accurate to three decimal places - Z indicates that local time is GMT, + indicates that local time is - later than GMT, and - indicates that local time is earlier than GMT - hh' is the absolute value of the offset from GMT in hours - mm' is the absolute value of the offset from GMT in minutes */ - var date = new Date(); +"use strict"; - var YYYY = parseInt(gentime.substr(0, 4), 10); - var MM = parseInt(gentime.substr(4, 2), 10) - 1; // use 0-11 for month - var DD = parseInt(gentime.substr(6, 2), 10); - var hh = parseInt(gentime.substr(8, 2), 10); - var mm = parseInt(gentime.substr(10, 2), 10); - var ss = parseInt(gentime.substr(12, 2), 10); - var fff = 0; - var offset = 0; - var isUTC = false; +var $export = __webpack_require__("XKFU"); +var $typed = __webpack_require__("D4iV"); +var buffer = __webpack_require__("7Qtz"); +var anObject = __webpack_require__("y3w9"); +var toAbsoluteIndex = __webpack_require__("d/Gc"); +var toLength = __webpack_require__("ne8i"); +var isObject = __webpack_require__("0/R4"); +var ArrayBuffer = __webpack_require__("dyZX").ArrayBuffer; +var speciesConstructor = __webpack_require__("69bn"); +var $ArrayBuffer = buffer.ArrayBuffer; +var $DataView = buffer.DataView; +var $isView = $typed.ABV && ArrayBuffer.isView; +var $slice = $ArrayBuffer.prototype.slice; +var VIEW = $typed.VIEW; +var ARRAY_BUFFER = 'ArrayBuffer'; - if(gentime.charAt(gentime.length - 1) === 'Z') { - isUTC = true; - } +$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer }); - var end = gentime.length - 5, c = gentime.charAt(end); - if(c === '+' || c === '-') { - // get hours+minutes offset - var hhoffset = parseInt(gentime.substr(end + 1, 2), 10); - var mmoffset = parseInt(gentime.substr(end + 4, 2), 10); +$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it) { + return $isView && $isView(it) || isObject(it) && VIEW in it; + } +}); - // calculate offset in milliseconds - offset = hhoffset * 60 + mmoffset; - offset *= 60000; +$export($export.P + $export.U + $export.F * __webpack_require__("eeVq")(function () { + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; +}), ARRAY_BUFFER, { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end) { + if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength; + var first = toAbsoluteIndex(start, len); + var fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); - // apply offset - if(c === '+') { - offset *= -1; - } +__webpack_require__("elZq")(ARRAY_BUFFER); - isUTC = true; - } - // check for second fraction - if(gentime.charAt(14) === '.') { - fff = parseFloat(gentime.substr(14), 10) * 1000; - } +/***/ }), - if(isUTC) { - date.setUTCFullYear(YYYY, MM, DD); - date.setUTCHours(hh, mm, ss, fff); +/***/ "xn8L": +/***/ (function(module, __webpack_exports__, __webpack_require__) { - // apply offset - date.setTime(+date + offset); - } else { - date.setFullYear(YYYY, MM, DD); - date.setHours(hh, mm, ss, fff); - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("5AJ6"); - return date; -}; /** - * Converts a date to a UTCTime value. - * - * Note: GeneralizedTime has 4 digits for the year and is used for X.509 - * dates past 2049. Converting to a GeneralizedTime hasn't been - * implemented yet. - * - * @param date the date to convert. - * - * @return the UTCTime value. + * @ignore - internal component. */ -asn1.dateToUtcTime = function(date) { - // TODO: validate; currently assumes proper format - if(typeof date === 'string') { - return date; - } - var rval = ''; +/* harmony default export */ __webpack_exports__["default"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { + d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" +}), 'MoreHoriz')); - // create format YYMMDDhhmmssZ - var format = []; - format.push(('' + date.getUTCFullYear()).substr(2)); - format.push('' + (date.getUTCMonth() + 1)); - format.push('' + date.getUTCDate()); - format.push('' + date.getUTCHours()); - format.push('' + date.getUTCMinutes()); - format.push('' + date.getUTCSeconds()); +/***/ }), - // ensure 2 digits are used for each format entry - for(var i = 0; i < format.length; ++i) { - if(format[i].length < 2) { - rval += '0'; - } - rval += format[i]; - } - rval += 'Z'; +/***/ "xo8x": +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return rval; -}; +"use strict"; +__webpack_require__.r(__webpack_exports__); +var noop = {value: () => {}}; -/** - * Converts a date to a GeneralizedTime value. - * - * @param date the date to convert. - * - * @return the GeneralizedTime value as a string. - */ -asn1.dateToGeneralizedTime = function(date) { - // TODO: validate; currently assumes proper format - if(typeof date === 'string') { - return date; +function dispatch() { + for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { + if (!(t = arguments[i] + "") || (t in _) || /[\s.]/.test(t)) throw new Error("illegal type: " + t); + _[t] = []; } + return new Dispatch(_); +} - var rval = ''; +function Dispatch(_) { + this._ = _; +} - // create format YYYYMMDDHHMMSSZ - var format = []; - format.push('' + date.getUTCFullYear()); - format.push('' + (date.getUTCMonth() + 1)); - format.push('' + date.getUTCDate()); - format.push('' + date.getUTCHours()); - format.push('' + date.getUTCMinutes()); - format.push('' + date.getUTCSeconds()); +function parseTypenames(typenames, types) { + return typenames.trim().split(/^|\s+/).map(function(t) { + var name = "", i = t.indexOf("."); + if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); + if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t); + return {type: t, name: name}; + }); +} - // ensure 2 digits are used for each format entry - for(var i = 0; i < format.length; ++i) { - if(format[i].length < 2) { - rval += '0'; +Dispatch.prototype = dispatch.prototype = { + constructor: Dispatch, + on: function(typename, callback) { + var _ = this._, + T = parseTypenames(typename + "", _), + t, + i = -1, + n = T.length; + + // If no callback was specified, return the callback of the given type and name. + if (arguments.length < 2) { + while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; + return; } - rval += format[i]; - } - rval += 'Z'; - return rval; -}; + // If a type was specified, set the callback for the given type and name. + // Otherwise, if a null callback was specified, remove callbacks of the given name. + if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback); + while (++i < n) { + if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback); + else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null); + } -/** - * Converts a javascript integer to a DER-encoded byte buffer to be used - * as the value for an INTEGER type. - * - * @param x the integer. - * - * @return the byte buffer. - */ -asn1.integerToDer = function(x) { - var rval = forge.util.createBuffer(); - if(x >= -0x80 && x < 0x80) { - return rval.putSignedInt(x, 8); - } - if(x >= -0x8000 && x < 0x8000) { - return rval.putSignedInt(x, 16); + return this; + }, + copy: function() { + var copy = {}, _ = this._; + for (var t in _) copy[t] = _[t].slice(); + return new Dispatch(copy); + }, + call: function(type, that) { + if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2]; + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + }, + apply: function(type, that, args) { + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); } - if(x >= -0x800000 && x < 0x800000) { - return rval.putSignedInt(x, 24); +}; + +function get(type, name) { + for (var i = 0, n = type.length, c; i < n; ++i) { + if ((c = type[i]).name === name) { + return c.value; + } } - if(x >= -0x80000000 && x < 0x80000000) { - return rval.putSignedInt(x, 32); +} + +function set(type, name, callback) { + for (var i = 0, n = type.length; i < n; ++i) { + if (type[i].name === name) { + type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); + break; + } } - var error = new Error('Integer too large; max is 32-bits.'); - error.integer = x; - throw error; -}; + if (callback != null) type.push({name: name, value: callback}); + return type; +} + +/* harmony default export */ __webpack_exports__["default"] = (dispatch); + + +/***/ }), + +/***/ "xoAc": +/***/ (function(module, exports, __webpack_require__) { /** - * Converts a DER-encoded byte buffer to a javascript integer. This is - * typically used to decode the value of an INTEGER type. + * Javascript implementation of mask generation function MGF1. * - * @param bytes the byte buffer. + * @author Stefan Siegl + * @author Dave Longley * - * @return the integer. + * Copyright (c) 2012 Stefan Siegl <stesie@brokenpipe.de> + * Copyright (c) 2014 Digital Bazaar, Inc. */ -asn1.derToInteger = function(bytes) { - // wrap in buffer if needed - if(typeof bytes === 'string') { - bytes = forge.util.createBuffer(bytes); - } +var forge = __webpack_require__("ioFA"); +__webpack_require__("0pCD"); - var n = bytes.length() * 8; - if(n > 32) { - throw new Error('Integer too large; max is 32-bits.'); - } - return bytes.getSignedInt(n); -}; +forge.mgf = forge.mgf || {}; +var mgf1 = module.exports = forge.mgf.mgf1 = forge.mgf1 = forge.mgf1 || {}; /** - * Validates that the given ASN.1 object is at least a super set of the - * given ASN.1 structure. Only tag classes and types are checked. An - * optional map may also be provided to capture ASN.1 values while the - * structure is checked. - * - * To capture an ASN.1 value, set an object in the validator's 'capture' - * parameter to the key to use in the capture map. To capture the full - * ASN.1 object, specify 'captureAsn1'. To capture BIT STRING bytes, including - * the leading unused bits counter byte, specify 'captureBitStringContents'. - * To capture BIT STRING bytes, without the leading unused bits counter byte, - * specify 'captureBitStringValue'. - * - * Objects in the validator may set a field 'optional' to true to indicate - * that it isn't necessary to pass validation. + * Creates a MGF1 mask generation function object. * - * @param obj the ASN.1 object to validate. - * @param v the ASN.1 structure validator. - * @param capture an optional map to capture values in. - * @param errors an optional array for storing validation errors. + * @param md the message digest API to use (eg: forge.md.sha1.create()). * - * @return true on success, false on failure. + * @return a mask generation function object. */ -asn1.validate = function(obj, v, capture, errors) { - var rval = false; +mgf1.create = function(md) { + var mgf = { + /** + * Generate mask of specified length. + * + * @param {String} seed The seed for mask generation. + * @param maskLen Number of bytes to generate. + * @return {String} The generated mask. + */ + generate: function(seed, maskLen) { + /* 2. Let T be the empty octet string. */ + var t = new forge.util.ByteBuffer(); - // ensure tag class and type are the same if specified - if((obj.tagClass === v.tagClass || typeof(v.tagClass) === 'undefined') && - (obj.type === v.type || typeof(v.type) === 'undefined')) { - // ensure constructed flag is the same if specified - if(obj.constructed === v.constructed || - typeof(v.constructed) === 'undefined') { - rval = true; + /* 3. For counter from 0 to ceil(maskLen / hLen), do the following: */ + var len = Math.ceil(maskLen / md.digestLength); + for(var i = 0; i < len; i++) { + /* a. Convert counter to an octet string C of length 4 octets */ + var c = new forge.util.ByteBuffer(); + c.putInt32(i); - // handle sub values - if(v.value && forge.util.isArray(v.value)) { - var j = 0; - for(var i = 0; rval && i < v.value.length; ++i) { - rval = v.value[i].optional || false; - if(obj.value[j]) { - rval = asn1.validate(obj.value[j], v.value[i], capture, errors); - if(rval) { - ++j; - } else if(v.value[i].optional) { - rval = true; - } - } - if(!rval && errors) { - errors.push( - '[' + v.name + '] ' + - 'Tag class "' + v.tagClass + '", type "' + - v.type + '" expected value length "' + - v.value.length + '", got "' + - obj.value.length + '"'); - } - } + /* b. Concatenate the hash of the seed mgfSeed and C to the octet + * string T: */ + md.start(); + md.update(seed + c.getBytes()); + t.putBuffer(md.digest()); } - if(rval && capture) { - if(v.capture) { - capture[v.capture] = obj.value; - } - if(v.captureAsn1) { - capture[v.captureAsn1] = obj; - } - if(v.captureBitStringContents && 'bitStringContents' in obj) { - capture[v.captureBitStringContents] = obj.bitStringContents; - } - if(v.captureBitStringValue && 'bitStringContents' in obj) { - var value; - if(obj.bitStringContents.length < 2) { - capture[v.captureBitStringValue] = ''; - } else { - // FIXME: support unused bits with data shifting - var unused = obj.bitStringContents.charCodeAt(0); - if(unused !== 0) { - throw new Error( - 'captureBitStringValue only supported for zero unused bits'); - } - capture[v.captureBitStringValue] = obj.bitStringContents.slice(1); - } - } - } - } else if(errors) { - errors.push( - '[' + v.name + '] ' + - 'Expected constructed "' + v.constructed + '", got "' + - obj.constructed + '"'); - } - } else if(errors) { - if(obj.tagClass !== v.tagClass) { - errors.push( - '[' + v.name + '] ' + - 'Expected tag class "' + v.tagClass + '", got "' + - obj.tagClass + '"'); - } - if(obj.type !== v.type) { - errors.push( - '[' + v.name + '] ' + - 'Expected type "' + v.type + '", got "' + obj.type + '"'); + /* Output the leading maskLen octets of T as the octet string mask. */ + t.truncate(t.length() - maskLen); + return t.getBytes(); } - } - return rval; + }; + + return mgf; }; -// regex for testing for non-latin characters -var _nonLatinRegex = /[^\\u0000-\\u00ff]/; -/** - * Pretty prints an ASN.1 object to a string. - * - * @param obj the object to write out. - * @param level the level in the tree. - * @param indentation the indentation to use. - * - * @return the string. - */ -asn1.prettyPrint = function(obj, level, indentation) { - var rval = ''; +/***/ }), - // set default level and indentation - level = level || 0; - indentation = indentation || 2; +/***/ "xpBP": +/***/ (function(module, __webpack_exports__, __webpack_require__) { - // start new line for deep levels - if(level > 0) { - rval += '\n'; - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "instrumentRoutingWithDefaults", function() { return instrumentRoutingWithDefaults; }); +/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("TwdF"); +/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Wezb"); - // create indent - var indent = ''; - for(var i = 0; i < level * indentation; ++i) { - indent += ' '; - } - // print class:type - rval += indent + 'Tag: '; - switch(obj.tagClass) { - case asn1.Class.UNIVERSAL: - rval += 'Universal:'; - break; - case asn1.Class.APPLICATION: - rval += 'Application:'; - break; - case asn1.Class.CONTEXT_SPECIFIC: - rval += 'Context-Specific:'; - break; - case asn1.Class.PRIVATE: - rval += 'Private:'; - break; + +/** + * Default function implementing pageload and navigation transactions + */ +function instrumentRoutingWithDefaults( + customStartTransaction, + startTransactionOnPageLoad = true, + startTransactionOnLocationChange = true, +) { + if (!_types_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"] || !_types_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].location) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn('Could not initialize routing instrumentation due to invalid location'); + return; } - if(obj.tagClass === asn1.Class.UNIVERSAL) { - rval += obj.type; + let startingUrl = _types_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].location.href; - // known types - switch(obj.type) { - case asn1.Type.NONE: - rval += ' (None)'; - break; - case asn1.Type.BOOLEAN: - rval += ' (Boolean)'; - break; - case asn1.Type.INTEGER: - rval += ' (Integer)'; - break; - case asn1.Type.BITSTRING: - rval += ' (Bit string)'; - break; - case asn1.Type.OCTETSTRING: - rval += ' (Octet string)'; - break; - case asn1.Type.NULL: - rval += ' (Null)'; - break; - case asn1.Type.OID: - rval += ' (Object Identifier)'; - break; - case asn1.Type.ODESC: - rval += ' (Object Descriptor)'; - break; - case asn1.Type.EXTERNAL: - rval += ' (External or Instance of)'; - break; - case asn1.Type.REAL: - rval += ' (Real)'; - break; - case asn1.Type.ENUMERATED: - rval += ' (Enumerated)'; - break; - case asn1.Type.EMBEDDED: - rval += ' (Embedded PDV)'; - break; - case asn1.Type.UTF8: - rval += ' (UTF8)'; - break; - case asn1.Type.ROID: - rval += ' (Relative Object Identifier)'; - break; - case asn1.Type.SEQUENCE: - rval += ' (Sequence)'; - break; - case asn1.Type.SET: - rval += ' (Set)'; - break; - case asn1.Type.PRINTABLESTRING: - rval += ' (Printable String)'; - break; - case asn1.Type.IA5String: - rval += ' (IA5String (ASCII))'; - break; - case asn1.Type.UTCTIME: - rval += ' (UTC time)'; - break; - case asn1.Type.GENERALIZEDTIME: - rval += ' (Generalized time)'; - break; - case asn1.Type.BMPSTRING: - rval += ' (BMP String)'; - break; - } - } else { - rval += obj.type; + let activeTransaction; + if (startTransactionOnPageLoad) { + activeTransaction = customStartTransaction({ + name: _types_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].location.pathname, + op: 'pageload', + metadata: { source: 'url' }, + }); } - rval += '\n'; - rval += indent + 'Constructed: ' + obj.constructed + '\n'; - - if(obj.composed) { - var subvalues = 0; - var sub = ''; - for(var i = 0; i < obj.value.length; ++i) { - if(obj.value[i] !== undefined) { - subvalues += 1; - sub += asn1.prettyPrint(obj.value[i], level + 1, indentation); - if((i + 1) < obj.value.length) { - sub += ','; - } - } - } - rval += indent + 'Sub values: ' + subvalues + sub; - } else { - rval += indent + 'Value: '; - if(obj.type === asn1.Type.OID) { - var oid = asn1.derToOid(obj.value); - rval += oid; - if(forge.pki && forge.pki.oids) { - if(oid in forge.pki.oids) { - rval += ' (' + forge.pki.oids[oid] + ') '; - } - } - } - if(obj.type === asn1.Type.INTEGER) { - try { - rval += asn1.derToInteger(obj.value); - } catch(ex) { - rval += '0x' + forge.util.bytesToHex(obj.value); - } - } else if(obj.type === asn1.Type.BITSTRING) { - // TODO: shift bits as needed to display without padding - if(obj.value.length > 1) { - // remove unused bits field - rval += '0x' + forge.util.bytesToHex(obj.value.slice(1)); - } else { - rval += '(none)'; + if (startTransactionOnLocationChange) { + Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["addInstrumentationHandler"])('history', ({ to, from }) => { + /** + * This early return is there to account for some cases where a navigation transaction starts right after + * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't + * create an uneccessary navigation transaction. + * + * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also + * only be caused in certain development environments where the usage of a hot module reloader is causing + * errors. + */ + if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) { + startingUrl = undefined; + return; } - // show unused bit count - if(obj.value.length > 0) { - var unused = obj.value.charCodeAt(0); - if(unused == 1) { - rval += ' (1 unused bit shown)'; - } else if(unused > 1) { - rval += ' (' + unused + ' unused bits shown)'; + + if (from !== to) { + startingUrl = undefined; + if (activeTransaction) { + (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log(`[Tracing] Finishing current transaction with op: ${activeTransaction.op}`); + // If there's an open transaction on the scope, we need to finish it before creating an new one. + activeTransaction.finish(); } + activeTransaction = customStartTransaction({ + name: _types_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].location.pathname, + op: 'navigation', + metadata: { source: 'url' }, + }); } - } else if(obj.type === asn1.Type.OCTETSTRING) { - if(!_nonLatinRegex.test(obj.value)) { - rval += '(' + obj.value + ') '; - } - rval += '0x' + forge.util.bytesToHex(obj.value); - } else if(obj.type === asn1.Type.UTF8) { - rval += forge.util.decodeUtf8(obj.value); - } else if(obj.type === asn1.Type.PRINTABLESTRING || - obj.type === asn1.Type.IA5String) { - rval += obj.value; - } else if(_nonLatinRegex.test(obj.value)) { - rval += '0x' + forge.util.bytesToHex(obj.value); - } else if(obj.value.length === 0) { - rval += '[null]'; - } else { - rval += obj.value; - } + }); } +} + + +//# sourceMappingURL=router.js.map + + +/***/ }), + +/***/ "xpiv": +/***/ (function(module, exports, __webpack_require__) { + +// 26.1.11 Reflect.ownKeys(target) +var $export = __webpack_require__("XKFU"); + +$export($export.S, 'Reflect', { ownKeys: __webpack_require__("mQtv") }); + + +/***/ }), + +/***/ "xpj1": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (x => () => x); + + +/***/ }), + +/***/ "xpql": +/***/ (function(module, exports, __webpack_require__) { - return rval; -}; +module.exports = !__webpack_require__("nh4g") && !__webpack_require__("eeVq")(function () { + return Object.defineProperty(__webpack_require__("Iw71")('div'), 'a', { get: function () { return 7; } }).a != 7; +}); /***/ }), -/***/ "xZgz": +/***/ "xq5I": /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var startOfSecond = __webpack_require__("IpkJ") +/** + * @category Second Helpers + * @summary Are the given dates in the same second? + * + * @description + * Are the given dates in the same second? + * + * @param {Date|String|Number} dateLeft - the first date to check + * @param {Date|String|Number} dateRight - the second date to check + * @returns {Boolean} the dates are in the same second + * + * @example + * // Are 4 September 2014 06:30:15.000 and 4 September 2014 06:30.15.500 + * // in the same second? + * var result = isSameSecond( + * new Date(2014, 8, 4, 6, 30, 15), + * new Date(2014, 8, 4, 6, 30, 15, 500) + * ) + * //=> true + */ +function isSameSecond (dirtyDateLeft, dirtyDateRight) { + var dateLeftStartOfSecond = startOfSecond(dirtyDateLeft) + var dateRightStartOfSecond = startOfSecond(dirtyDateRight) -var _interopRequireWildcard = __webpack_require__("Zh31"); + return dateLeftStartOfSecond.getTime() === dateRightStartOfSecond.getTime() +} -var _interopRequireDefault = __webpack_require__("OYUV"); +module.exports = isSameSecond -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getDomTreeShapes = getDomTreeShapes; -exports.findNativeHandler = findNativeHandler; -exports.default = exports.SwipeableViewsContext = void 0; -var _extends2 = _interopRequireDefault(__webpack_require__("G2ut")); +/***/ }), -var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("PTHm")); +/***/ "xqgi": +/***/ (function(module, exports, __webpack_require__) { -var _classCallCheck2 = _interopRequireDefault(__webpack_require__("MOn9")); +/** + * RC2 implementation. + * + * @author Stefan Siegl + * + * Copyright (c) 2012 Stefan Siegl <stesie@brokenpipe.de> + * + * Information on the RC2 cipher is available from RFC #2268, + * http://www.ietf.org/rfc/rfc2268.txt + */ +var forge = __webpack_require__("0ycz"); +__webpack_require__("sdTk"); -var _createClass2 = _interopRequireDefault(__webpack_require__("NRM5")); +var piTable = [ + 0xd9, 0x78, 0xf9, 0xc4, 0x19, 0xdd, 0xb5, 0xed, 0x28, 0xe9, 0xfd, 0x79, 0x4a, 0xa0, 0xd8, 0x9d, + 0xc6, 0x7e, 0x37, 0x83, 0x2b, 0x76, 0x53, 0x8e, 0x62, 0x4c, 0x64, 0x88, 0x44, 0x8b, 0xfb, 0xa2, + 0x17, 0x9a, 0x59, 0xf5, 0x87, 0xb3, 0x4f, 0x13, 0x61, 0x45, 0x6d, 0x8d, 0x09, 0x81, 0x7d, 0x32, + 0xbd, 0x8f, 0x40, 0xeb, 0x86, 0xb7, 0x7b, 0x0b, 0xf0, 0x95, 0x21, 0x22, 0x5c, 0x6b, 0x4e, 0x82, + 0x54, 0xd6, 0x65, 0x93, 0xce, 0x60, 0xb2, 0x1c, 0x73, 0x56, 0xc0, 0x14, 0xa7, 0x8c, 0xf1, 0xdc, + 0x12, 0x75, 0xca, 0x1f, 0x3b, 0xbe, 0xe4, 0xd1, 0x42, 0x3d, 0xd4, 0x30, 0xa3, 0x3c, 0xb6, 0x26, + 0x6f, 0xbf, 0x0e, 0xda, 0x46, 0x69, 0x07, 0x57, 0x27, 0xf2, 0x1d, 0x9b, 0xbc, 0x94, 0x43, 0x03, + 0xf8, 0x11, 0xc7, 0xf6, 0x90, 0xef, 0x3e, 0xe7, 0x06, 0xc3, 0xd5, 0x2f, 0xc8, 0x66, 0x1e, 0xd7, + 0x08, 0xe8, 0xea, 0xde, 0x80, 0x52, 0xee, 0xf7, 0x84, 0xaa, 0x72, 0xac, 0x35, 0x4d, 0x6a, 0x2a, + 0x96, 0x1a, 0xd2, 0x71, 0x5a, 0x15, 0x49, 0x74, 0x4b, 0x9f, 0xd0, 0x5e, 0x04, 0x18, 0xa4, 0xec, + 0xc2, 0xe0, 0x41, 0x6e, 0x0f, 0x51, 0xcb, 0xcc, 0x24, 0x91, 0xaf, 0x50, 0xa1, 0xf4, 0x70, 0x39, + 0x99, 0x7c, 0x3a, 0x85, 0x23, 0xb8, 0xb4, 0x7a, 0xfc, 0x02, 0x36, 0x5b, 0x25, 0x55, 0x97, 0x31, + 0x2d, 0x5d, 0xfa, 0x98, 0xe3, 0x8a, 0x92, 0xae, 0x05, 0xdf, 0x29, 0x10, 0x67, 0x6c, 0xba, 0xc9, + 0xd3, 0x00, 0xe6, 0xcf, 0xe1, 0x9e, 0xa8, 0x2c, 0x63, 0x16, 0x01, 0x3f, 0x58, 0xe2, 0x89, 0xa9, + 0x0d, 0x38, 0x34, 0x1b, 0xab, 0x33, 0xff, 0xb0, 0xbb, 0x48, 0x0c, 0x5f, 0xb9, 0xb1, 0xcd, 0x2e, + 0xc5, 0xf3, 0xdb, 0x47, 0xe5, 0xa5, 0x9c, 0x77, 0x0a, 0xa6, 0x20, 0x68, 0xfe, 0x7f, 0xc1, 0xad +]; -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__("VJ99")); +var s = [1, 2, 3, 5]; -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__("hR4y")); +/** + * Rotate a word left by given number of bits. + * + * Bits that are shifted out on the left are put back in on the right + * hand side. + * + * @param word The word to shift left. + * @param bits The number of bits to shift by. + * @return The rotated word. + */ +var rol = function(word, bits) { + return ((word << bits) & 0xffff) | ((word & 0xffff) >> (16 - bits)); +}; -var _inherits2 = _interopRequireDefault(__webpack_require__("jiea")); +/** + * Rotate a word right by given number of bits. + * + * Bits that are shifted out on the right are put back in on the left + * hand side. + * + * @param word The word to shift right. + * @param bits The number of bits to shift by. + * @return The rotated word. + */ +var ror = function(word, bits) { + return ((word & 0xffff) >> bits) | ((word << (16 - bits)) & 0xffff); +}; -var React = _interopRequireWildcard(__webpack_require__("q1tI")); +/* RC2 API */ +module.exports = forge.rc2 = forge.rc2 || {}; -var _propTypes = _interopRequireDefault(__webpack_require__("17x9")); +/** + * Perform RC2 key expansion as per RFC #2268, section 2. + * + * @param key variable-length user key (between 1 and 128 bytes) + * @param effKeyBits number of effective key bits (default: 128) + * @return the expanded RC2 key (ByteBuffer of 128 bytes) + */ +forge.rc2.expandKey = function(key, effKeyBits) { + if(typeof key === 'string') { + key = forge.util.createBuffer(key); + } + effKeyBits = effKeyBits || 128; -var _warning = _interopRequireDefault(__webpack_require__("2W6z")); + /* introduce variables that match the names used in RFC #2268 */ + var L = key; + var T = key.length(); + var T1 = effKeyBits; + var T8 = Math.ceil(T1 / 8); + var TM = 0xff >> (T1 & 0x07); + var i; -var _reactSwipeableViewsCore = __webpack_require__("TZ23"); + for(i = T; i < 128; i++) { + L.putByte(piTable[(L.at(i - 1) + L.at(i - T)) & 0xff]); + } -function addEventListener(node, event, handler, options) { - node.addEventListener(event, handler, options); - return { - remove: function remove() { - node.removeEventListener(event, handler, options); - } - }; -} + L.setAt(128 - T8, piTable[L.at(128 - T8) & TM]); -var styles = { - container: { - direction: 'ltr', - display: 'flex', - willChange: 'transform' - }, - slide: { - width: '100%', - WebkitFlexShrink: 0, - flexShrink: 0, - overflow: 'auto' + for(i = 127 - T8; i >= 0; i--) { + L.setAt(i, piTable[L.at(i + 1) ^ L.at(i + T8)]); } + + return L; }; -var axisProperties = { - root: { - x: { - overflowX: 'hidden' - }, - 'x-reverse': { - overflowX: 'hidden' - }, - y: { - overflowY: 'hidden' - }, - 'y-reverse': { - overflowY: 'hidden' + +/** + * Creates a RC2 cipher object. + * + * @param key the symmetric key to use (as base for key generation). + * @param bits the number of effective key bits. + * @param encrypt false for decryption, true for encryption. + * + * @return the cipher. + */ +var createCipher = function(key, bits, encrypt) { + var _finish = false, _input = null, _output = null, _iv = null; + var mixRound, mashRound; + var i, j, K = []; + + /* Expand key and fill into K[] Array */ + key = forge.rc2.expandKey(key, bits); + for(i = 0; i < 64; i++) { + K.push(key.getInt16Le()); + } + + if(encrypt) { + /** + * Perform one mixing round "in place". + * + * @param R Array of four words to perform mixing on. + */ + mixRound = function(R) { + for(i = 0; i < 4; i++) { + R[i] += K[j] + (R[(i + 3) % 4] & R[(i + 2) % 4]) + + ((~R[(i + 3) % 4]) & R[(i + 1) % 4]); + R[i] = rol(R[i], s[i]); + j++; + } + }; + + /** + * Perform one mashing round "in place". + * + * @param R Array of four words to perform mashing on. + */ + mashRound = function(R) { + for(i = 0; i < 4; i++) { + R[i] += K[R[(i + 3) % 4] & 63]; + } + }; + } else { + /** + * Perform one r-mixing round "in place". + * + * @param R Array of four words to perform mixing on. + */ + mixRound = function(R) { + for(i = 3; i >= 0; i--) { + R[i] = ror(R[i], s[i]); + R[i] -= K[j] + (R[(i + 3) % 4] & R[(i + 2) % 4]) + + ((~R[(i + 3) % 4]) & R[(i + 1) % 4]); + j--; + } + }; + + /** + * Perform one r-mashing round "in place". + * + * @param R Array of four words to perform mashing on. + */ + mashRound = function(R) { + for(i = 3; i >= 0; i--) { + R[i] -= K[R[(i + 3) % 4] & 63]; + } + }; + } + + /** + * Run the specified cipher execution plan. + * + * This function takes four words from the input buffer, applies the IV on + * it (if requested) and runs the provided execution plan. + * + * The plan must be put together in form of a array of arrays. Where the + * outer one is simply a list of steps to perform and the inner one needs + * to have two elements: the first one telling how many rounds to perform, + * the second one telling what to do (i.e. the function to call). + * + * @param {Array} plan The plan to execute. + */ + var runPlan = function(plan) { + var R = []; + + /* Get data from input buffer and fill the four words into R */ + for(i = 0; i < 4; i++) { + var val = _input.getInt16Le(); + + if(_iv !== null) { + if(encrypt) { + /* We're encrypting, apply the IV first. */ + val ^= _iv.getInt16Le(); + } else { + /* We're decryption, keep cipher text for next block. */ + _iv.putInt16Le(val); + } + } + + R.push(val & 0xffff); } - }, - flexDirection: { - x: 'row', - 'x-reverse': 'row-reverse', - y: 'column', - 'y-reverse': 'column-reverse' - }, - transform: { - x: function x(translate) { - return "translate(".concat(-translate, "%, 0)"); - }, - 'x-reverse': function xReverse(translate) { - return "translate(".concat(translate, "%, 0)"); - }, - y: function y(translate) { - return "translate(0, ".concat(-translate, "%)"); - }, - 'y-reverse': function yReverse(translate) { - return "translate(0, ".concat(translate, "%)"); + + /* Reset global "j" variable as per spec. */ + j = encrypt ? 0 : 63; + + /* Run execution plan. */ + for(var ptr = 0; ptr < plan.length; ptr++) { + for(var ctr = 0; ctr < plan[ptr][0]; ctr++) { + plan[ptr][1](R); + } } - }, - length: { - x: 'width', - 'x-reverse': 'width', - y: 'height', - 'y-reverse': 'height' - }, - rotationMatrix: { - x: { - x: [1, 0], - y: [0, 1] - }, - 'x-reverse': { - x: [-1, 0], - y: [0, 1] + + /* Write back result to output buffer. */ + for(i = 0; i < 4; i++) { + if(_iv !== null) { + if(encrypt) { + /* We're encrypting in CBC-mode, feed back encrypted bytes into + IV buffer to carry it forward to next block. */ + _iv.putInt16Le(R[i]); + } else { + R[i] ^= _iv.getInt16Le(); + } + } + + _output.putInt16Le(R[i]); + } + }; + + /* Create cipher object */ + var cipher = null; + cipher = { + /** + * Starts or restarts the encryption or decryption process, whichever + * was previously configured. + * + * To use the cipher in CBC mode, iv may be given either as a string + * of bytes, or as a byte buffer. For ECB mode, give null as iv. + * + * @param iv the initialization vector to use, null for ECB mode. + * @param output the output the buffer to write to, null to create one. + */ + start: function(iv, output) { + if(iv) { + /* CBC mode */ + if(typeof iv === 'string') { + iv = forge.util.createBuffer(iv); + } + } + + _finish = false; + _input = forge.util.createBuffer(); + _output = output || new forge.util.createBuffer(); + _iv = iv; + + cipher.output = _output; }, - y: { - x: [0, 1], - y: [1, 0] + + /** + * Updates the next block. + * + * @param input the buffer to read from. + */ + update: function(input) { + if(!_finish) { + // not finishing, so fill the input buffer with more input + _input.putBuffer(input); + } + + while(_input.length() >= 8) { + runPlan([ + [ 5, mixRound ], + [ 1, mashRound ], + [ 6, mixRound ], + [ 1, mashRound ], + [ 5, mixRound ] + ]); + } }, - 'y-reverse': { - x: [0, -1], - y: [1, 0] - } - }, - scrollPosition: { - x: 'scrollLeft', - 'x-reverse': 'scrollLeft', - y: 'scrollTop', - 'y-reverse': 'scrollTop' - }, - scrollLength: { - x: 'scrollWidth', - 'x-reverse': 'scrollWidth', - y: 'scrollHeight', - 'y-reverse': 'scrollHeight' - }, - clientLength: { - x: 'clientWidth', - 'x-reverse': 'clientWidth', - y: 'clientHeight', - 'y-reverse': 'clientHeight' - } -}; -function createTransition(property, options) { - var duration = options.duration, - easeFunction = options.easeFunction, - delay = options.delay; - return "".concat(property, " ").concat(duration, " ").concat(easeFunction, " ").concat(delay); -} // We are using a 2x2 rotation matrix. + /** + * Finishes encrypting or decrypting. + * + * @param pad a padding function to use, null for PKCS#7 padding, + * signature(blockSize, buffer, decrypt). + * + * @return true if successful, false on error. + */ + finish: function(pad) { + var rval = true; + if(encrypt) { + if(pad) { + rval = pad(8, _input, !encrypt); + } else { + // add PKCS#7 padding to block (each pad byte is the + // value of the number of pad bytes) + var padding = (_input.length() === 8) ? 8 : (8 - _input.length()); + _input.fillWithByte(padding, padding); + } + } -function applyRotationMatrix(touch, axis) { - var rotationMatrix = axisProperties.rotationMatrix[axis]; - return { - pageX: rotationMatrix.x[0] * touch.pageX + rotationMatrix.x[1] * touch.pageY, - pageY: rotationMatrix.y[0] * touch.pageX + rotationMatrix.y[1] * touch.pageY - }; -} + if(rval) { + // do final update + _finish = true; + cipher.update(); + } -function adaptMouse(event) { - event.touches = [{ - pageX: event.pageX, - pageY: event.pageY - }]; - return event; -} + if(!encrypt) { + // check for error: input data not a multiple of block size + rval = (_input.length() === 0); + if(rval) { + if(pad) { + rval = pad(8, _output, !encrypt); + } else { + // ensure padding byte count is valid + var len = _output.length(); + var count = _output.at(len - 1); -function getDomTreeShapes(element, rootNode) { - var domTreeShapes = []; + if(count > len) { + rval = false; + } else { + // trim off padding bytes + _output.truncate(count); + } + } + } + } - while (element && element !== rootNode && element !== document.body) { - // We reach a Swipeable View, no need to look higher in the dom tree. - if (element.hasAttribute('data-swipeable')) { - break; + return rval; } + }; - var style = window.getComputedStyle(element); + return cipher; +}; - if ( // Ignore the scroll children if the element is absolute positioned. - style.getPropertyValue('position') === 'absolute' || // Ignore the scroll children if the element has an overflowX hidden - style.getPropertyValue('overflow-x') === 'hidden') { - domTreeShapes = []; - } else if (element.clientWidth > 0 && element.scrollWidth > element.clientWidth || element.clientHeight > 0 && element.scrollHeight > element.clientHeight) { - // Ignore the nodes that have no width. - // Keep elements with a scroll - domTreeShapes.push({ - element: element, - scrollWidth: element.scrollWidth, - scrollHeight: element.scrollHeight, - clientWidth: element.clientWidth, - clientHeight: element.clientHeight, - scrollLeft: element.scrollLeft, - scrollTop: element.scrollTop - }); - } +/** + * Creates an RC2 cipher object to encrypt data in ECB or CBC mode using the + * given symmetric key. The output will be stored in the 'output' member + * of the returned cipher. + * + * The key and iv may be given as a string of bytes or a byte buffer. + * The cipher is initialized to use 128 effective key bits. + * + * @param key the symmetric key to use. + * @param iv the initialization vector to use. + * @param output the buffer to write to, null to create one. + * + * @return the cipher. + */ +forge.rc2.startEncrypting = function(key, iv, output) { + var cipher = forge.rc2.createEncryptionCipher(key, 128); + cipher.start(iv, output); + return cipher; +}; - element = element.parentNode; - } +/** + * Creates an RC2 cipher object to encrypt data in ECB or CBC mode using the + * given symmetric key. + * + * The key may be given as a string of bytes or a byte buffer. + * + * To start encrypting call start() on the cipher with an iv and optional + * output buffer. + * + * @param key the symmetric key to use. + * + * @return the cipher. + */ +forge.rc2.createEncryptionCipher = function(key, bits) { + return createCipher(key, bits, true); +}; - return domTreeShapes; -} // We can only have one node at the time claiming ownership for handling the swipe. -// Otherwise, the UX would be confusing. -// That's why we use a singleton here. +/** + * Creates an RC2 cipher object to decrypt data in ECB or CBC mode using the + * given symmetric key. The output will be stored in the 'output' member + * of the returned cipher. + * + * The key and iv may be given as a string of bytes or a byte buffer. + * The cipher is initialized to use 128 effective key bits. + * + * @param key the symmetric key to use. + * @param iv the initialization vector to use. + * @param output the buffer to write to, null to create one. + * + * @return the cipher. + */ +forge.rc2.startDecrypting = function(key, iv, output) { + var cipher = forge.rc2.createDecryptionCipher(key, 128); + cipher.start(iv, output); + return cipher; +}; +/** + * Creates an RC2 cipher object to decrypt data in ECB or CBC mode using the + * given symmetric key. + * + * The key may be given as a string of bytes or a byte buffer. + * + * To start decrypting call start() on the cipher with an iv and optional + * output buffer. + * + * @param key the symmetric key to use. + * + * @return the cipher. + */ +forge.rc2.createDecryptionCipher = function(key, bits) { + return createCipher(key, bits, false); +}; -var nodeWhoClaimedTheScroll = null; -function findNativeHandler(params) { - var domTreeShapes = params.domTreeShapes, - pageX = params.pageX, - startX = params.startX, - axis = params.axis; - return domTreeShapes.some(function (shape) { - // Determine if we are going backward or forward. - var goingForward = pageX >= startX; +/***/ }), - if (axis === 'x' || axis === 'y') { - goingForward = !goingForward; - } // scrollTop is not always be an integer. - // https://github.com/jquery/api.jquery.com/issues/608 +/***/ "xrec": +/***/ (function(module, exports, __webpack_require__) { +var baseRest = __webpack_require__("EA7m"), + unzip = __webpack_require__("Y0CH"); - var scrollPosition = Math.round(shape[axisProperties.scrollPosition[axis]]); - var areNotAtStart = scrollPosition > 0; - var areNotAtEnd = scrollPosition + shape[axisProperties.clientLength[axis]] < shape[axisProperties.scrollLength[axis]]; +/** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ +var zip = baseRest(unzip); - if (goingForward && areNotAtEnd || !goingForward && areNotAtStart) { - nodeWhoClaimedTheScroll = shape.element; - return true; - } +module.exports = zip; - return false; - }); -} -var SwipeableViewsContext = React.createContext(); -exports.SwipeableViewsContext = SwipeableViewsContext; +/***/ }), -if (false) {} +/***/ "xs/l": +/***/ (function(module, exports, __webpack_require__) { -var SwipeableViews = -/*#__PURE__*/ -function (_React$Component) { - (0, _inherits2.default)(SwipeableViews, _React$Component); +var flatten = __webpack_require__("TYy9"), + overRest = __webpack_require__("Ioao"), + setToString = __webpack_require__("wclG"); - function SwipeableViews(props) { - var _this; +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); +} - (0, _classCallCheck2.default)(this, SwipeableViews); - _this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(SwipeableViews).call(this, props)); - _this.rootNode = null; - _this.containerNode = null; - _this.ignoreNextScrollEvents = false; - _this.viewLength = 0; - _this.startX = 0; - _this.lastX = 0; - _this.vx = 0; - _this.startY = 0; - _this.isSwiping = undefined; - _this.started = false; - _this.startIndex = 0; - _this.transitionListener = null; - _this.touchMoveListener = null; - _this.activeSlide = null; - _this.indexCurrent = null; - _this.firstRenderTimeout = null; +module.exports = flatRest; - _this.setRootNode = function (node) { - _this.rootNode = node; - }; - _this.setContainerNode = function (node) { - _this.containerNode = node; - }; +/***/ }), - _this.setActiveSlide = function (node) { - _this.activeSlide = node; +/***/ "xtnD": +/***/ (function(module, __webpack_exports__, __webpack_require__) { - _this.updateHeight(); - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return disjoint; }); +function disjoint(values, other) { + const iterator = other[Symbol.iterator](), set = new Set(); + for (const v of values) { + if (set.has(v)) return false; + let value, done; + while (({value, done} = iterator.next())) { + if (done) break; + if (Object.is(v, value)) return false; + set.add(value); + } + } + return true; +} - _this.handleSwipeStart = function (event) { - var axis = _this.props.axis; - var touch = applyRotationMatrix(event.touches[0], axis); - _this.viewLength = _this.rootNode.getBoundingClientRect()[axisProperties.length[axis]]; - _this.startX = touch.pageX; - _this.lastX = touch.pageX; - _this.vx = 0; - _this.startY = touch.pageY; - _this.isSwiping = undefined; - _this.started = true; - var computedStyle = window.getComputedStyle(_this.containerNode); - var transform = computedStyle.getPropertyValue('-webkit-transform') || computedStyle.getPropertyValue('transform'); - if (transform && transform !== 'none') { - var transformValues = transform.split('(')[1].split(')')[0].split(','); - var rootStyle = window.getComputedStyle(_this.rootNode); - var tranformNormalized = applyRotationMatrix({ - pageX: parseInt(transformValues[4], 10), - pageY: parseInt(transformValues[5], 10) - }, axis); - _this.startIndex = -tranformNormalized.pageX / (_this.viewLength - parseInt(rootStyle.paddingLeft, 10) - parseInt(rootStyle.paddingRight, 10)) || 0; - } - }; +/***/ }), - _this.handleSwipeMove = function (event) { - // The touch start event can be cancel. - // Makes sure we set a starting point. - if (!_this.started) { - _this.handleTouchStart(event); +/***/ "xweI": +/***/ (function(module, exports, __webpack_require__) { - return; - } // We are not supposed to hanlde this touch move. +var baseFlatten = __webpack_require__("XGnz"), + baseOrderBy = __webpack_require__("alwl"), + baseRest = __webpack_require__("EA7m"), + isIterateeCall = __webpack_require__("mv/X"); + +/** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ +var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); +}); +module.exports = sortBy; - if (nodeWhoClaimedTheScroll !== null && nodeWhoClaimedTheScroll !== _this.rootNode) { - return; - } - var _this$props = _this.props, - axis = _this$props.axis, - children = _this$props.children, - ignoreNativeScroll = _this$props.ignoreNativeScroll, - onSwitching = _this$props.onSwitching, - resistance = _this$props.resistance; - var touch = applyRotationMatrix(event.touches[0], axis); // We don't know yet. +/***/ }), - if (_this.isSwiping === undefined) { - var dx = Math.abs(touch.pageX - _this.startX); - var dy = Math.abs(touch.pageY - _this.startY); - var isSwiping = dx > dy && dx > _reactSwipeableViewsCore.constant.UNCERTAINTY_THRESHOLD; // We let the parent handle the scroll. +/***/ "xzKj": +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (!resistance && (axis === 'y' || axis === 'y-reverse') && (_this.indexCurrent === 0 && _this.startX < touch.pageX || _this.indexCurrent === React.Children.count(_this.props.children) - 1 && _this.startX > touch.pageX)) { - _this.isSwiping = false; - return; - } // We are likely to be swiping, let's prevent the scroll event. +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _attachmentView__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("173S"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AttachmentView", function() { return _attachmentView__WEBPACK_IMPORTED_MODULE_0__["AttachmentView"]; }); +/* harmony import */ var _cardView__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("qVmr"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CardView", function() { return _cardView__WEBPACK_IMPORTED_MODULE_1__["CardView"]; }); - if (dx > dy) { - event.preventDefault(); - } +/* harmony import */ var _cipherView__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("g6GL"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CipherView", function() { return _cipherView__WEBPACK_IMPORTED_MODULE_2__["CipherView"]; }); - if (isSwiping === true || dy > _reactSwipeableViewsCore.constant.UNCERTAINTY_THRESHOLD) { - _this.isSwiping = isSwiping; - _this.startX = touch.pageX; // Shift the starting point. +/* harmony import */ var _fieldView__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("QDNy"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FieldView", function() { return _fieldView__WEBPACK_IMPORTED_MODULE_3__["FieldView"]; }); - return; // Let's wait the next touch event to move something. - } - } +/* harmony import */ var _identityView__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("JPmt"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IdentityView", function() { return _identityView__WEBPACK_IMPORTED_MODULE_4__["IdentityView"]; }); - if (_this.isSwiping !== true) { - return; - } // We are swiping, let's prevent the scroll event. +/* harmony import */ var _loginUriView__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("g3ya"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LoginUriView", function() { return _loginUriView__WEBPACK_IMPORTED_MODULE_5__["LoginUriView"]; }); +/* harmony import */ var _loginView__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("bJVX"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LoginView", function() { return _loginView__WEBPACK_IMPORTED_MODULE_6__["LoginView"]; }); - event.preventDefault(); // Low Pass filter. +/* harmony import */ var _secureNoteView__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("D9MD"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SecureNoteView", function() { return _secureNoteView__WEBPACK_IMPORTED_MODULE_7__["SecureNoteView"]; }); - _this.vx = _this.vx * 0.5 + (touch.pageX - _this.lastX) * 0.5; - _this.lastX = touch.pageX; +/* harmony import */ var _view__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("qDRa"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "View", function() { return _view__WEBPACK_IMPORTED_MODULE_8__["View"]; }); - var _computeIndex = (0, _reactSwipeableViewsCore.computeIndex)({ - children: children, - resistance: resistance, - pageX: touch.pageX, - startIndex: _this.startIndex, - startX: _this.startX, - viewLength: _this.viewLength - }), - index = _computeIndex.index, - startX = _computeIndex.startX; // Add support for native scroll elements. - if (nodeWhoClaimedTheScroll === null && !ignoreNativeScroll) { - var domTreeShapes = getDomTreeShapes(event.target, _this.rootNode); - var hasFoundNativeHandler = findNativeHandler({ - domTreeShapes: domTreeShapes, - startX: _this.startX, - pageX: touch.pageX, - axis: axis - }); // We abort the touch move handler. - if (hasFoundNativeHandler) { - return; - } - } // We are moving toward the edges. - if (startX) { - _this.startX = startX; - } else if (nodeWhoClaimedTheScroll === null) { - nodeWhoClaimedTheScroll = _this.rootNode; - } - _this.setIndexCurrent(index); - var callback = function callback() { - if (onSwitching) { - onSwitching(index, 'move'); - } - }; - if (_this.state.displaySameSlide || !_this.state.isDragging) { - _this.setState({ - displaySameSlide: false, - isDragging: true - }, callback); - } - callback(); - }; - _this.handleSwipeEnd = function () { - nodeWhoClaimedTheScroll = null; // The touch start event can be cancel. - // Makes sure that a starting point is set. +/***/ }), - if (!_this.started) { - return; - } +/***/ "y+lv": +/***/ (function(module, __webpack_exports__, __webpack_require__) { - _this.started = false; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fill", function() { return fill; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addNonEnumerableProperty", function() { return addNonEnumerableProperty; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "markFunctionWrapped", function() { return markFunctionWrapped; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOriginalFunction", function() { return getOriginalFunction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "urlEncode", function() { return urlEncode; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertToPlainObject", function() { return convertToPlainObject; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extractExceptionKeysForMessage", function() { return extractExceptionKeysForMessage; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dropUndefinedKeys", function() { return dropUndefinedKeys; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "objectify", function() { return objectify; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("mrSG"); +/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("TAEo"); +/* harmony import */ var _is__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("fUgN"); +/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("/gRg"); - if (_this.isSwiping !== true) { - return; - } - var indexLatest = _this.state.indexLatest; - var indexCurrent = _this.indexCurrent; - var delta = indexLatest - indexCurrent; - var indexNew; // Quick movement - if (Math.abs(_this.vx) > _this.props.threshold) { - if (_this.vx > 0) { - indexNew = Math.floor(indexCurrent); - } else { - indexNew = Math.ceil(indexCurrent); + +/** + * Replace a method in an object with a wrapped version of itself. + * + * @param source An object that contains a method to be wrapped. + * @param name The name of the method to be wrapped. + * @param replacementFactory A higher-order function that takes the original version of the given method and returns a + * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to + * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other + * args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`. + * @returns void + */ +function fill(source, name, replacementFactory) { + if (!(name in source)) { + return; + } + var original = source[name]; + var wrapped = replacementFactory(original); + // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work + // otherwise it'll throw "TypeError: Object.defineProperties called on non-object" + if (typeof wrapped === 'function') { + try { + markFunctionWrapped(wrapped, original); + } + catch (_Oo) { + // This can throw if multiple fill happens on a global object like XMLHttpRequest + // Fixes https://github.com/getsentry/sentry-javascript/issues/2043 + } + } + source[name] = wrapped; +} +/** + * Defines a non-enumerable property on the given object. + * + * @param obj The object on which to set the property + * @param name The name of the property to be set + * @param value The value to which to set the property + */ +function addNonEnumerableProperty(obj, name, value) { + Object.defineProperty(obj, name, { + // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it + value: value, + writable: true, + configurable: true, + }); +} +/** + * Remembers the original function on the wrapped function and + * patches up the prototype. + * + * @param wrapped the wrapper function + * @param original the original function that gets wrapped + */ +function markFunctionWrapped(wrapped, original) { + var proto = original.prototype || {}; + wrapped.prototype = original.prototype = proto; + addNonEnumerableProperty(wrapped, '__sentry_original__', original); +} +/** + * This extracts the original function if available. See + * `markFunctionWrapped` for more information. + * + * @param func the function to unwrap + * @returns the unwrapped version of the function if available. + */ +function getOriginalFunction(func) { + return func.__sentry_original__; +} +/** + * Encodes given object into url-friendly format + * + * @param object An object that contains serializable values + * @returns string Encoded + */ +function urlEncode(object) { + return Object.keys(object) + .map(function (key) { return encodeURIComponent(key) + "=" + encodeURIComponent(object[key]); }) + .join('&'); +} +/** + * Transforms any object into an object literal with all its attributes + * attached to it. + * + * @param value Initial source that we have to transform in order for it to be usable by the serializer + */ +function convertToPlainObject(value) { + var newObj = value; + if (Object(_is__WEBPACK_IMPORTED_MODULE_2__["isError"])(value)) { + newObj = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ message: value.message, name: value.name, stack: value.stack }, getOwnProperties(value)); + } + else if (Object(_is__WEBPACK_IMPORTED_MODULE_2__["isEvent"])(value)) { + var event_1 = value; + newObj = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ type: event_1.type, target: serializeEventTarget(event_1.target), currentTarget: serializeEventTarget(event_1.currentTarget) }, getOwnProperties(event_1)); + if (typeof CustomEvent !== 'undefined' && Object(_is__WEBPACK_IMPORTED_MODULE_2__["isInstanceOf"])(value, CustomEvent)) { + newObj.detail = event_1.detail; + } + } + return newObj; +} +/** Creates a string representation of the target of an `Event` object */ +function serializeEventTarget(target) { + try { + return Object(_is__WEBPACK_IMPORTED_MODULE_2__["isElement"])(target) ? Object(_browser__WEBPACK_IMPORTED_MODULE_1__["htmlTreeAsString"])(target) : Object.prototype.toString.call(target); + } + catch (_oO) { + return '<unknown>'; + } +} +/** Filters out all but an object's own properties */ +function getOwnProperties(obj) { + var extractedProps = {}; + for (var property in obj) { + if (Object.prototype.hasOwnProperty.call(obj, property)) { + extractedProps[property] = obj[property]; } - } else if (Math.abs(delta) > _this.props.hysteresis) { - // Some hysteresis with indexLatest. - indexNew = delta > 0 ? Math.floor(indexCurrent) : Math.ceil(indexCurrent); - } else { - indexNew = indexLatest; - } - - var indexMax = React.Children.count(_this.props.children) - 1; - - if (indexNew < 0) { - indexNew = 0; - } else if (indexNew > indexMax) { - indexNew = indexMax; - } - - _this.setIndexCurrent(indexNew); - - _this.setState({ - indexLatest: indexNew, - isDragging: false - }, function () { - if (_this.props.onSwitching) { - _this.props.onSwitching(indexNew, 'end'); + } + return extractedProps; +} +/** + * Given any captured exception, extract its keys and create a sorted + * and truncated list that will be used inside the event message. + * eg. `Non-error exception captured with keys: foo, bar, baz` + */ +// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types +function extractExceptionKeysForMessage(exception, maxLength) { + if (maxLength === void 0) { maxLength = 40; } + var keys = Object.keys(convertToPlainObject(exception)); + keys.sort(); + if (!keys.length) { + return '[object has no keys]'; + } + if (keys[0].length >= maxLength) { + return Object(_string__WEBPACK_IMPORTED_MODULE_3__["truncate"])(keys[0], maxLength); + } + for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) { + var serialized = keys.slice(0, includedKeys).join(', '); + if (serialized.length > maxLength) { + continue; } - - if (_this.props.onChangeIndex && indexNew !== indexLatest) { - _this.props.onChangeIndex(indexNew, indexLatest, { - reason: 'swipe' - }); - } // Manually calling handleTransitionEnd in that case as isn't otherwise. - - - if (indexCurrent === indexLatest) { - _this.handleTransitionEnd(); + if (includedKeys === keys.length) { + return serialized; } - }); - }; - - _this.handleTouchStart = function (event) { - if (_this.props.onTouchStart) { - _this.props.onTouchStart(event); - } + return Object(_string__WEBPACK_IMPORTED_MODULE_3__["truncate"])(serialized, maxLength); + } + return ''; +} +/** + * Given any object, return the new object with removed keys that value was `undefined`. + * Works recursively on objects and arrays. + */ +function dropUndefinedKeys(val) { + var e_1, _a; + if (Object(_is__WEBPACK_IMPORTED_MODULE_2__["isPlainObject"])(val)) { + var rv = {}; + try { + for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(Object.keys(val)), _c = _b.next(); !_c.done; _c = _b.next()) { + var key = _c.value; + if (typeof val[key] !== 'undefined') { + rv[key] = dropUndefinedKeys(val[key]); + } + } + } + catch (e_1_1) { e_1 = { error: e_1_1 }; } + finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } + finally { if (e_1) throw e_1.error; } + } + return rv; + } + if (Array.isArray(val)) { + return val.map(dropUndefinedKeys); + } + return val; +} +/** + * Ensure that something is an object. + * + * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper + * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives. + * + * @param wat The subject of the objectification + * @returns A version of `wat` which can safely be used with `Object` class methods + */ +function objectify(wat) { + var objectified; + switch (true) { + case wat === undefined || wat === null: + objectified = new String(wat); + break; + // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason + // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as + // an object in order to wrap it. + case typeof wat === 'symbol' || typeof wat === 'bigint': + objectified = Object(wat); + break; + // this will catch the remaining primitives: `String`, `Number`, and `Boolean` + case Object(_is__WEBPACK_IMPORTED_MODULE_2__["isPrimitive"])(wat): + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + objectified = new wat.constructor(wat); + break; + // by process of elimination, at this point we know that `wat` must already be an object + default: + objectified = wat; + break; + } + return objectified; +} +//# sourceMappingURL=object.js.map - _this.handleSwipeStart(event); - }; +/***/ }), - _this.handleTouchEnd = function (event) { - if (_this.props.onTouchEnd) { - _this.props.onTouchEnd(event); - } +/***/ "y/6f": +/***/ (function(module, __webpack_exports__, __webpack_require__) { - _this.handleSwipeEnd(event); - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "config", function() { return config; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConfig", function() { return setConfig; }); +var config = { + onError: function (e) { return console.error(e); }, +}; +var setConfig = function (conf) { + Object.assign(config, conf); +}; - _this.handleMouseDown = function (event) { - if (_this.props.onMouseDown) { - _this.props.onMouseDown(event); - } - event.persist(); +/***/ }), - _this.handleSwipeStart(adaptMouse(event)); - }; +/***/ "y1pI": +/***/ (function(module, exports, __webpack_require__) { - _this.handleMouseUp = function (event) { - if (_this.props.onMouseUp) { - _this.props.onMouseUp(event); - } +var eq = __webpack_require__("ljhN"); - _this.handleSwipeEnd(adaptMouse(event)); - }; +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} - _this.handleMouseLeave = function (event) { - if (_this.props.onMouseLeave) { - _this.props.onMouseLeave(event); - } // Filter out events +module.exports = assocIndexOf; - if (_this.started) { - _this.handleSwipeEnd(adaptMouse(event)); - } - }; +/***/ }), - _this.handleMouseMove = function (event) { - if (_this.props.onMouseMove) { - _this.props.onMouseMove(event); - } // Filter out events +/***/ "y34A": +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeNewFetchTransport", function() { return makeNewFetchTransport; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("mrSG"); +/* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("5K7t"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("6VZY"); - if (_this.started) { - _this.handleSwipeMove(adaptMouse(event)); - } - }; - _this.handleScroll = function (event) { - if (_this.props.onScroll) { - _this.props.onScroll(event); - } // Ignore events bubbling up. +/** + * Creates a Transport that uses the Fetch API to send events to Sentry. + */ +function makeNewFetchTransport(options, nativeFetch) { + if (nativeFetch === void 0) { nativeFetch = Object(_utils__WEBPACK_IMPORTED_MODULE_2__["getNativeFetchImplementation"])(); } + function makeRequest(request) { + var requestOptions = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ body: request.body, method: 'POST', referrerPolicy: 'origin' }, options.requestOptions); + return nativeFetch(options.url, requestOptions).then(function (response) { + return response.text().then(function (body) { return ({ + body: body, + headers: { + 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'), + 'retry-after': response.headers.get('Retry-After'), + }, + reason: response.statusText, + statusCode: response.status, + }); }); + }); + } + return Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["createTransport"])({ bufferSize: options.bufferSize }, makeRequest); +} +//# sourceMappingURL=new-fetch.js.map - if (event.target !== _this.rootNode) { - return; - } +/***/ }), - if (_this.ignoreNextScrollEvents) { - _this.ignoreNextScrollEvents = false; - return; - } +/***/ "y3w9": +/***/ (function(module, exports, __webpack_require__) { - var indexLatest = _this.state.indexLatest; - var indexNew = Math.ceil(event.target.scrollLeft / event.target.clientWidth) + indexLatest; - _this.ignoreNextScrollEvents = true; // Reset the scroll position. +var isObject = __webpack_require__("0/R4"); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; - event.target.scrollLeft = 0; - if (_this.props.onChangeIndex && indexNew !== indexLatest) { - _this.props.onChangeIndex(indexNew, indexLatest, { - reason: 'focus' - }); - } - }; +/***/ }), - _this.updateHeight = function () { - if (_this.activeSlide !== null) { - var child = _this.activeSlide.children[0]; +/***/ "y4dS": +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (child !== undefined && child.offsetHeight !== undefined && _this.state.heightLatest !== child.offsetHeight) { - _this.setState({ - heightLatest: child.offsetHeight - }); - } - } - }; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStoreHook", function() { return createStoreHook; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useStore", function() { return useStore; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("joe6"); +/* harmony import */ var _useReduxContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("mCWk"); - if (false) {} - _this.state = { - indexLatest: props.index, - // Set to true as soon as the component is swiping. - // It's the state counter part of this.isSwiping. - isDragging: false, - // Help with SSR logic and lazy loading logic. - renderOnlyActive: !props.disableLazyLoading, - heightLatest: 0, - // Let the render method that we are going to display the same slide than previously. - displaySameSlide: true - }; - _this.setIndexCurrent(props.index); +/** + * Hook factory, which creates a `useStore` hook bound to a given context. + * + * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`. + * @returns {Function} A `useStore` hook bound to the specified context. + */ - return _this; +function createStoreHook(context) { + if (context === void 0) { + context = _components_Context__WEBPACK_IMPORTED_MODULE_1__["ReactReduxContext"]; } - (0, _createClass2.default)(SwipeableViews, [{ - key: "componentDidMount", - value: function componentDidMount() { - var _this2 = this; + var useReduxContext = context === _components_Context__WEBPACK_IMPORTED_MODULE_1__["ReactReduxContext"] ? _useReduxContext__WEBPACK_IMPORTED_MODULE_2__["useReduxContext"] : function () { + return Object(react__WEBPACK_IMPORTED_MODULE_0__["useContext"])(context); + }; + return function useStore() { + var _useReduxContext = useReduxContext(), + store = _useReduxContext.store; - // Subscribe to transition end events. - this.transitionListener = addEventListener(this.containerNode, 'transitionend', function (event) { - if (event.target !== _this2.containerNode) { - return; - } + return store; + }; +} +/** + * A hook to access the redux store. + * + * @returns {any} the redux store + * + * @example + * + * import React from 'react' + * import { useStore } from 'react-redux' + * + * export const ExampleComponent = () => { + * const store = useStore() + * return <div>{store.getState()}</div> + * } + */ - _this2.handleTransitionEnd(); - }); // Block the thread to handle that event. +var useStore = /*#__PURE__*/createStoreHook(); - this.touchMoveListener = addEventListener(this.rootNode, 'touchmove', function (event) { - // Handling touch events is disabled. - if (_this2.props.disabled) { - return; - } +/***/ }), - _this2.handleSwipeMove(event); - }, { - passive: false - }); +/***/ "y5a+": +/***/ (function(module, exports, __webpack_require__) { - if (!this.props.disableLazyLoading) { - this.firstRenderTimeout = setTimeout(function () { - _this2.setState({ - renderOnlyActive: false - }); - }, 0); - } // Send all functions in an object if action param is set. +var parse = __webpack_require__("yNUO") +/** + * @category Week Helpers + * @summary Return the last day of a week for the given date. + * + * @description + * Return the last day of a week for the given date. + * The result will be in the local timezone. + * + * @param {Date|String|Number} date - the original date + * @param {Object} [options] - the object with options + * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @returns {Date} the last day of a week + * + * @example + * // The last day of a week for 2 September 2014 11:55:00: + * var result = lastDayOfWeek(new Date(2014, 8, 2, 11, 55, 0)) + * //=> Sat Sep 06 2014 00:00:00 + * + * @example + * // If the week starts on Monday, the last day of the week for 2 September 2014 11:55:00: + * var result = lastDayOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1}) + * //=> Sun Sep 07 2014 00:00:00 + */ +function lastDayOfWeek (dirtyDate, dirtyOptions) { + var weekStartsOn = dirtyOptions ? (Number(dirtyOptions.weekStartsOn) || 0) : 0 - if (this.props.action) { - this.props.action({ - updateHeight: this.updateHeight - }); - } - } // eslint-disable-next-line camelcase,react/sort-comp + var date = parse(dirtyDate) + var day = date.getDay() + var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn) - }, { - key: "UNSAFE_componentWillReceiveProps", - value: function UNSAFE_componentWillReceiveProps(nextProps) { - var index = nextProps.index; + date.setHours(0, 0, 0, 0) + date.setDate(date.getDate() + diff) + return date +} - if (typeof index === 'number' && index !== this.props.index) { - if (false) {} +module.exports = lastDayOfWeek - this.setIndexCurrent(index); - this.setState({ - // If true, we are going to change the children. We shoudn't animate it. - displaySameSlide: (0, _reactSwipeableViewsCore.getDisplaySameSlide)(this.props, nextProps), - indexLatest: index - }); - } - } - }, { - key: "componentWillUnmount", - value: function componentWillUnmount() { - this.transitionListener.remove(); - this.touchMoveListener.remove(); - clearTimeout(this.firstRenderTimeout); - } - }, { - key: "getSwipeableViewsContext", - value: function getSwipeableViewsContext() { - var _this3 = this; - return { - slideUpdateHeight: function slideUpdateHeight() { - _this3.updateHeight(); - } - }; - } - }, { - key: "setIndexCurrent", - value: function setIndexCurrent(indexCurrent) { - if (!this.props.animateTransitions && this.indexCurrent !== indexCurrent) { - this.handleTransitionEnd(); - } +/***/ }), - this.indexCurrent = indexCurrent; +/***/ "y6BH": +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (this.containerNode) { - var axis = this.props.axis; - var transform = axisProperties.transform[axis](indexCurrent * 100); - this.containerNode.style.WebkitTransform = transform; - this.containerNode.style.transform = transform; - } - } - }, { - key: "handleTransitionEnd", - value: function handleTransitionEnd() { - if (!this.props.onTransitionEnd) { - return; - } // Filters out when changing the children +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return unsupportedProp; }); +function unsupportedProp(props, propName, componentName, location, propFullName) { + if (true) { + return null; + } + var propFullNameSafe = propFullName || propName; - if (this.state.displaySameSlide) { - return; - } // The rest callback is triggered when swiping. It's just noise. - // We filter it out. + if (typeof props[propName] !== 'undefined') { + return new Error("The prop `".concat(propFullNameSafe, "` is not supported. Please remove it.")); + } + return null; +} - if (!this.state.isDragging) { - this.props.onTransitionEnd(); - } - } - }, { - key: "render", - value: function render() { - var _this4 = this; +/***/ }), - var _this$props2 = this.props, - action = _this$props2.action, - animateHeight = _this$props2.animateHeight, - animateTransitions = _this$props2.animateTransitions, - axis = _this$props2.axis, - children = _this$props2.children, - containerStyleProp = _this$props2.containerStyle, - disabled = _this$props2.disabled, - disableLazyLoading = _this$props2.disableLazyLoading, - enableMouseEvents = _this$props2.enableMouseEvents, - hysteresis = _this$props2.hysteresis, - ignoreNativeScroll = _this$props2.ignoreNativeScroll, - index = _this$props2.index, - onChangeIndex = _this$props2.onChangeIndex, - onSwitching = _this$props2.onSwitching, - onTransitionEnd = _this$props2.onTransitionEnd, - resistance = _this$props2.resistance, - slideStyleProp = _this$props2.slideStyle, - slideClassName = _this$props2.slideClassName, - springConfig = _this$props2.springConfig, - style = _this$props2.style, - threshold = _this$props2.threshold, - other = (0, _objectWithoutProperties2.default)(_this$props2, ["action", "animateHeight", "animateTransitions", "axis", "children", "containerStyle", "disabled", "disableLazyLoading", "enableMouseEvents", "hysteresis", "ignoreNativeScroll", "index", "onChangeIndex", "onSwitching", "onTransitionEnd", "resistance", "slideStyle", "slideClassName", "springConfig", "style", "threshold"]); - var _this$state = this.state, - displaySameSlide = _this$state.displaySameSlide, - heightLatest = _this$state.heightLatest, - indexLatest = _this$state.indexLatest, - isDragging = _this$state.isDragging, - renderOnlyActive = _this$state.renderOnlyActive; - var touchEvents = !disabled ? { - onTouchStart: this.handleTouchStart, - onTouchEnd: this.handleTouchEnd - } : {}; - var mouseEvents = !disabled && enableMouseEvents ? { - onMouseDown: this.handleMouseDown, - onMouseUp: this.handleMouseUp, - onMouseLeave: this.handleMouseLeave, - onMouseMove: this.handleMouseMove - } : {}; // There is no point to animate if we are already providing a height. +/***/ "y6ex": +/***/ (function(module, exports, __webpack_require__) { - false ? undefined : void 0; - var slideStyle = (0, _extends2.default)({}, styles.slide, slideStyleProp); - var transition; - var WebkitTransition; +"use strict"; - if (isDragging || !animateTransitions || displaySameSlide) { - transition = 'all 0s ease 0s'; - WebkitTransition = 'all 0s ease 0s'; - } else { - transition = createTransition('transform', springConfig); - WebkitTransition = createTransition('-webkit-transform', springConfig); - if (heightLatest !== 0) { - var additionalTranstion = ", ".concat(createTransition('height', springConfig)); - transition += additionalTranstion; - WebkitTransition += additionalTranstion; - } - } +var _interopRequireDefault = __webpack_require__("TqRt"); - var containerStyle = { - height: null, - WebkitFlexDirection: axisProperties.flexDirection[axis], - flexDirection: axisProperties.flexDirection[axis], - WebkitTransition: WebkitTransition, - transition: transition - }; // Apply the styles for SSR considerations +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.iconPropType = exports.default = void 0; - if (!renderOnlyActive) { - var transform = axisProperties.transform[axis](this.indexCurrent * 100); - containerStyle.WebkitTransform = transform; - containerStyle.transform = transform; - } +var _extends2 = _interopRequireDefault(__webpack_require__("pVnL")); - if (animateHeight) { - containerStyle.height = heightLatest; - } +var _defineProperty2 = _interopRequireDefault(__webpack_require__("lSNA")); - return React.createElement(SwipeableViewsContext.Provider, { - value: this.getSwipeableViewsContext() - }, React.createElement("div", (0, _extends2.default)({ - ref: this.setRootNode, - style: (0, _extends2.default)({}, axisProperties.root[axis], style) - }, other, touchEvents, mouseEvents, { - onScroll: this.handleScroll - }), React.createElement("div", { - ref: this.setContainerNode, - style: (0, _extends2.default)({}, containerStyle, styles.container, containerStyleProp), - className: "react-swipeable-view-container" - }, React.Children.map(children, function (child, indexChild) { - if (renderOnlyActive && indexChild !== indexLatest) { - return null; - } +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("QILm")); - false ? undefined : void 0; - var ref; - var hidden = true; +var _react = _interopRequireWildcard(__webpack_require__("q1tI")); - if (indexChild === indexLatest) { - hidden = false; +var _propTypes = _interopRequireDefault(__webpack_require__("17x9")); - if (animateHeight) { - ref = _this4.setActiveSlide; - slideStyle.overflowY = 'hidden'; - } - } +var _classnames = _interopRequireDefault(__webpack_require__("TSYQ")); - return React.createElement("div", { - ref: ref, - style: slideStyle, - className: slideClassName, - "aria-hidden": hidden, - "data-swipeable": "true" - }, child); - })))); - } - }]); - return SwipeableViews; -}(React.Component); // Added as an ads for people using the React dev tools in production. -// So they know, the tool used to build the awesome UI they -// are looking at/retro engineering. +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -SwipeableViews.displayName = 'ReactSwipableView'; -SwipeableViews.propTypes = false ? undefined : {}; -SwipeableViews.defaultProps = { - animateHeight: false, - animateTransitions: true, - axis: 'x', - disabled: false, - disableLazyLoading: false, - enableMouseEvents: false, - hysteresis: 0.6, - ignoreNativeScroll: false, - index: 0, - threshold: 5, - springConfig: { - duration: '0.35s', - easeFunction: 'cubic-bezier(0.15, 0.3, 0.25, 1)', - delay: '0s' - }, - resistance: false +var _excluded = ["icon", "width", "height", "color", "className", "preserveColor", "rotate", "size", "spin"]; +var styles = { + "icon--spin": "styles__icon--spin___ybfC1", + "spin": "styles__spin___2Vvw3", + "icon": "styles__icon___23x3R", + "icon--preserveColor": "styles__icon--preserveColor___3gBz6", + "shake": "styles__shake___wT_3z" }; -var _default = SwipeableViews; -exports.default = _default; - -/***/ }), - -/***/ "xfY5": -/***/ (function(module, exports, __webpack_require__) { +var DEFAULT_SIZE = '16'; -"use strict"; +function getSvgObject(icon) { + var anchor; -var global = __webpack_require__("dyZX"); -var has = __webpack_require__("aagx"); -var cof = __webpack_require__("LZWt"); -var inheritIfRequired = __webpack_require__("Xbzi"); -var toPrimitive = __webpack_require__("apmT"); -var fails = __webpack_require__("eeVq"); -var gOPN = __webpack_require__("kJMx").f; -var gOPD = __webpack_require__("EemH").f; -var dP = __webpack_require__("hswa").f; -var $trim = __webpack_require__("qncB").trim; -var NUMBER = 'Number'; -var $Number = global[NUMBER]; -var Base = $Number; -var proto = $Number.prototype; -// Opera ~12 has broken Object#toString -var BROKEN_COF = cof(__webpack_require__("Kuth")(proto)) == NUMBER; -var TRIM = 'trim' in String.prototype; + if (icon.id) { + anchor = "#".concat(icon.id); + } else if (icon[0] === '#') { + anchor = icon; + } else { + anchor = '#' + icon; + } -// 7.1.3 ToNumber(argument) -var toNumber = function (argument) { - var it = toPrimitive(argument, false); - if (typeof it == 'string' && it.length > 2) { - it = TRIM ? it.trim() : $trim(it, 3); - var first = it.charCodeAt(0); - var third, radix, maxCode; - if (first === 43 || first === 45) { - third = it.charCodeAt(2); - if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix - } else if (first === 48) { - switch (it.charCodeAt(1)) { - case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i - case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i - default: return +it; - } - for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { - code = digits.charCodeAt(i); - // parseInt parses a string to a first unavailable symbol - // but ToNumber should return NaN if a string contains unavailable symbols - if (code < 48 || code > maxCode) return NaN; - } return parseInt(digits, radix); - } - } return +it; -}; + if (!anchor) { + console.warn("Icon not found ".concat(icon, ".")); + return null; + } -if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { - $Number = function Number(value) { - var it = arguments.length < 1 ? 0 : value; - var that = this; - return that instanceof $Number - // check on 1..constructor(foo) case - && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER) - ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); + return function (props) { + return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("use", { + xlinkHref: anchor + })); }; - for (var keys = __webpack_require__("nh4g") ? gOPN(Base) : ( - // ES3: - 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + - // ES6 (in case, if modules with ES6 Number statics required before): - 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + - 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' - ).split(','), j = 0, key; keys.length > j; j++) { - if (has(Base, key = keys[j]) && !has($Number, key)) { - dP($Number, key, gOPD(Base, key)); - } - } - $Number.prototype = proto; - proto.constructor = $Number; - __webpack_require__("KroJ")(global, NUMBER, $Number); } - -/***/ }), - -/***/ "xfeJ": -/***/ (function(module, exports) { - -function _isNativeFunction(fn) { - return Function.toString.call(fn).indexOf("[native code]") !== -1; +function isFunction(obj) { + return obj instanceof Function; } -module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports; - -/***/ }), - -/***/ "xhJ2": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var $isNaN = Number.isNaN || function (a) { return a !== a; }; - -module.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; }; - - -/***/ }), - -/***/ "xk4V": -/***/ (function(module, exports, __webpack_require__) { - -var rng = __webpack_require__("4fRq"); -var bytesToUuid = __webpack_require__("I2ZF"); - -function v4(options, buf, offset) { - var i = buf && offset || 0; +function Icon(props) { + var icon = props.icon, + width = props.width, + height = props.height, + color = props.color, + className = props.className, + preserveColor = props.preserveColor, + rotate = props.rotate, + size = props.size, + spin = props.spin, + restProps = (0, _objectWithoutProperties2.default)(props, _excluded); + var Svg = (0, _react.useMemo)(function () { + return isFunction(icon) ? icon : getSvgObject(icon); + }, [icon]); + var style = props.style; + style = Object.assign({}, style); - if (typeof(options) == 'string') { - buf = options === 'binary' ? new Array(16) : null; - options = null; + if (color) { + style['fill'] = color; } - options = options || {}; - - var rnds = options.random || (options.rng || rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; - } + if (rotate) { + style['transform'] = "rotate(".concat(rotate, "deg)"); } - return buf || bytesToUuid(rnds); + var iconClassName = preserveColor ? 'icon--preserveColor' : 'icon'; + var iconClass = (0, _classnames.default)(className, styles[iconClassName], (0, _defineProperty2.default)({}, styles['icon--spin'], spin)); + return Svg ? /*#__PURE__*/_react.default.createElement(Svg, (0, _extends2.default)({ + className: iconClass, + style: style, + width: width || size || DEFAULT_SIZE, + height: height || size || DEFAULT_SIZE + }, restProps)) : null; } -module.exports = v4; +Icon.isProperIcon = function (icon) { + var isSvgSymbol = icon && !!icon.id; + var isIconIdentifier = typeof icon === 'string'; + var isSvgr = isFunction(icon); + return isSvgSymbol || isIconIdentifier || isSvgr; +}; + +var iconPropType = _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object, _propTypes.default.func]); + +exports.iconPropType = iconPropType; +Icon.propTypes = { + icon: iconPropType.isRequired, + width: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), + height: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), + color: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]), + className: _propTypes.default.string, + preserveColor: _propTypes.default.bool, + /** Shorthand for both width and height */ + size: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), + spin: _propTypes.default.bool +}; +Icon.defaultProps = { + spin: false +}; +var _default = Icon; +exports.default = _default; /***/ }), -/***/ "xkK/": +/***/ "y9qz": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _ImageListItem__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("o68O"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _ImageListItem__WEBPACK_IMPORTED_MODULE_0__["default"]; }); +/* harmony import */ var _Unstable_TrapFocus__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("q/9G"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Unstable_TrapFocus__WEBPACK_IMPORTED_MODULE_0__["default"]; }); /***/ }), -/***/ "xkTb": +/***/ "yAGa": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("ZtE7"); - - -/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")); +/* harmony default export */ __webpack_exports__["default"] = (function(value) { + return arguments.length + ? this.property("__data__", value) + : this.node().__data__; +}); /***/ }), -/***/ "xm80": -/***/ (function(module, exports, __webpack_require__) { +/***/ "yCCt": +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; - -var $export = __webpack_require__("XKFU"); -var $typed = __webpack_require__("D4iV"); -var buffer = __webpack_require__("7Qtz"); -var anObject = __webpack_require__("y3w9"); -var toAbsoluteIndex = __webpack_require__("d/Gc"); -var toLength = __webpack_require__("ne8i"); -var isObject = __webpack_require__("0/R4"); -var ArrayBuffer = __webpack_require__("dyZX").ArrayBuffer; -var speciesConstructor = __webpack_require__("69bn"); -var $ArrayBuffer = buffer.ArrayBuffer; -var $DataView = buffer.DataView; -var $isView = $typed.ABV && ArrayBuffer.isView; -var $slice = $ArrayBuffer.prototype.slice; -var VIEW = $typed.VIEW; -var ARRAY_BUFFER = 'ArrayBuffer'; - -$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer }); - -$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { - // 24.1.3.1 ArrayBuffer.isView(arg) - isView: function isView(it) { - return $isView && $isView(it) || isObject(it) && VIEW in it; - } -}); - -$export($export.P + $export.U + $export.F * __webpack_require__("eeVq")(function () { - return !new $ArrayBuffer(2).slice(1, undefined).byteLength; -}), ARRAY_BUFFER, { - // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) - slice: function slice(start, end) { - if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix - var len = anObject(this).byteLength; - var first = toAbsoluteIndex(start, len); - var fin = toAbsoluteIndex(end === undefined ? len : end, len); - var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); - var viewS = new $DataView(this); - var viewT = new $DataView(result); - var index = 0; - while (first < fin) { - viewT.setUint8(index++, viewS.getUint8(first++)); - } return result; - } -}); - -__webpack_require__("elZq")(ARRAY_BUFFER); - +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IS_DEBUG_BUILD", function() { return IS_DEBUG_BUILD; }); +/* + * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking + * for users. + * + * Debug flags need to be declared in each package individually and must not be imported across package boundaries, + * because some build tools have trouble tree-shaking imported guards. + * + * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder. + * + * Debug flag files will contain "magic strings" like `__SENTRY_DEBUG__` that may get replaced with actual values during + * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not + * replaced. + */ +/** Flag that is true for debug builds, false otherwise. */ +var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__; +//# sourceMappingURL=flags.js.map /***/ }), -/***/ "xn8L": +/***/ "yCxk": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return useControlled; }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("q1tI"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("5AJ6"); +/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */ +function useControlled(_ref) { + var controlled = _ref.controlled, + defaultProp = _ref.default, + name = _ref.name, + _ref$state = _ref.state, + state = _ref$state === void 0 ? 'value' : _ref$state; -/** - * @ignore - internal component. - */ + var _React$useRef = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](controlled !== undefined), + isControlled = _React$useRef.current; -/* harmony default export */ __webpack_exports__["default"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", { - d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" -}), 'MoreHoriz')); + var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__["useState"](defaultProp), + valueState = _React$useState[0], + setValue = _React$useState[1]; + + var value = isControlled ? controlled : valueState; + + if (false) { var _React$useRef2, defaultValue; } + + var setValueIfUncontrolled = react__WEBPACK_IMPORTED_MODULE_0__["useCallback"](function (newValue) { + if (!isControlled) { + setValue(newValue); + } + }, []); + return [value, setValueIfUncontrolled]; +} /***/ }), -/***/ "xo8x": -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/***/ "yDR0": +/***/ (function(module, exports, __webpack_require__) { "use strict"; -__webpack_require__.r(__webpack_exports__); -var noop = {value: () => {}}; -function dispatch() { - for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { - if (!(t = arguments[i] + "") || (t in _) || /[\s.]/.test(t)) throw new Error("illegal type: " + t); - _[t] = []; - } - return new Dispatch(_); -} -function Dispatch(_) { - this._ = _; -} +// Note: adler32 takes 12% for level 0 and 2% for level 6. +// It isn't worth it to make additional optimizations as in original. +// Small size is preferable. -function parseTypenames(typenames, types) { - return typenames.trim().split(/^|\s+/).map(function(t) { - var name = "", i = t.indexOf("."); - if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); - if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t); - return {type: t, name: name}; - }); -} +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. -Dispatch.prototype = dispatch.prototype = { - constructor: Dispatch, - on: function(typename, callback) { - var _ = this._, - T = parseTypenames(typename + "", _), - t, - i = -1, - n = T.length; +function adler32(adler, buf, len, pos) { + var s1 = (adler & 0xffff) |0, + s2 = ((adler >>> 16) & 0xffff) |0, + n = 0; - // If no callback was specified, return the callback of the given type and name. - if (arguments.length < 2) { - while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; - return; - } + while (len !== 0) { + // Set limit ~ twice less than 5552, to keep + // s2 in 31-bits, because we force signed ints. + // in other case %= will fail. + n = len > 2000 ? 2000 : len; + len -= n; - // If a type was specified, set the callback for the given type and name. - // Otherwise, if a null callback was specified, remove callbacks of the given name. - if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback); - while (++i < n) { - if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback); - else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null); - } + do { + s1 = (s1 + buf[pos++]) |0; + s2 = (s2 + s1) |0; + } while (--n); - return this; - }, - copy: function() { - var copy = {}, _ = this._; - for (var t in _) copy[t] = _[t].slice(); - return new Dispatch(copy); - }, - call: function(type, that) { - if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2]; - if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); - for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); - }, - apply: function(type, that, args) { - if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); - for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + s1 %= 65521; + s2 %= 65521; } -}; -function get(type, name) { - for (var i = 0, n = type.length, c; i < n; ++i) { - if ((c = type[i]).name === name) { - return c.value; - } - } + return (s1 | (s2 << 16)) |0; } -function set(type, name, callback) { - for (var i = 0, n = type.length; i < n; ++i) { - if (type[i].name === name) { - type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); - break; - } - } - if (callback != null) type.push({name: name, value: callback}); - return type; -} -/* harmony default export */ __webpack_exports__["default"] = (dispatch); +module.exports = adler32; /***/ }), -/***/ "xoAc": -/***/ (function(module, exports, __webpack_require__) { - -/** - * Javascript implementation of mask generation function MGF1. - * - * @author Stefan Siegl - * @author Dave Longley - * - * Copyright (c) 2012 Stefan Siegl <stesie@brokenpipe.de> - * Copyright (c) 2014 Digital Bazaar, Inc. - */ -var forge = __webpack_require__("ioFA"); -__webpack_require__("0pCD"); - -forge.mgf = forge.mgf || {}; -var mgf1 = module.exports = forge.mgf.mgf1 = forge.mgf1 = forge.mgf1 || {}; - -/** - * Creates a MGF1 mask generation function object. - * - * @param md the message digest API to use (eg: forge.md.sha1.create()). - * - * @return a mask generation function object. - */ -mgf1.create = function(md) { - var mgf = { - /** - * Generate mask of specified length. - * - * @param {String} seed The seed for mask generation. - * @param maskLen Number of bytes to generate. - * @return {String} The generated mask. - */ - generate: function(seed, maskLen) { - /* 2. Let T be the empty octet string. */ - var t = new forge.util.ByteBuffer(); - - /* 3. For counter from 0 to ceil(maskLen / hLen), do the following: */ - var len = Math.ceil(maskLen / md.digestLength); - for(var i = 0; i < len; i++) { - /* a. Convert counter to an octet string C of length 4 octets */ - var c = new forge.util.ByteBuffer(); - c.putInt32(i); +/***/ "yE6J": +/***/ (function(module, __webpack_exports__, __webpack_require__) { - /* b. Concatenate the hash of the seed mgfSeed and C to the octet - * string T: */ - md.start(); - md.update(seed + c.getBytes()); - t.putBuffer(md.digest()); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function*() { + var node = this, current, next = [node], children, i, n; + do { + current = next.reverse(), next = []; + while (node = current.pop()) { + yield node; + if (children = node.children) { + for (i = 0, n = children.length; i < n; ++i) { + next.push(children[i]); + } } - - /* Output the leading maskLen octets of T as the octet string mask. */ - t.truncate(t.length() - maskLen); - return t.getBytes(); } - }; - - return mgf; -}; + } while (next.length); +}); /***/ }), -/***/ "xpBP": +/***/ "yE6y": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "instrumentRoutingWithDefaults", function() { return instrumentRoutingWithDefaults; }); -/* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("TwdF"); -/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Wezb"); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "severityFromString", function() { return severityFromString; }); +/* harmony import */ var _sentry_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("PIsB"); +/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("P6zQ"); +function isSupportedSeverity(level) { + return _enums__WEBPACK_IMPORTED_MODULE_1__["SeverityLevels"].indexOf(level) !== -1; +} /** - * Default function implementing pageload and navigation transactions + * Converts a string-based level into a {@link Severity}. + * + * @param level string representation of Severity + * @returns Severity */ -function instrumentRoutingWithDefaults( - customStartTransaction, - startTransactionOnPageLoad = true, - startTransactionOnLocationChange = true, -) { - if (!_types_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"] || !_types_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].location) { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].warn('Could not initialize routing instrumentation due to invalid location'); - return; - } - - let startingUrl = _types_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].location.href; +function severityFromString(level) { + if (level === 'warn') + return _sentry_types__WEBPACK_IMPORTED_MODULE_0__["Severity"].Warning; + if (isSupportedSeverity(level)) { + return level; + } + return _sentry_types__WEBPACK_IMPORTED_MODULE_0__["Severity"].Log; +} +//# sourceMappingURL=severity.js.map - let activeTransaction; - if (startTransactionOnPageLoad) { - activeTransaction = customStartTransaction({ - name: _types_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].location.pathname, - op: 'pageload', - metadata: { source: 'url' }, - }); - } +/***/ }), - if (startTransactionOnLocationChange) { - Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_0__["addInstrumentationHandler"])('history', ({ to, from }) => { - /** - * This early return is there to account for some cases where a navigation transaction starts right after - * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't - * create an uneccessary navigation transaction. - * - * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also - * only be caused in certain development environments where the usage of a hot module reloader is causing - * errors. - */ - if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) { - startingUrl = undefined; - return; - } +/***/ "yEp2": +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (from !== to) { - startingUrl = undefined; - if (activeTransaction) { - (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__["logger"].log(`[Tracing] Finishing current transaction with op: ${activeTransaction.op}`); - // If there's an open transaction on the scope, we need to finish it before creating an new one. - activeTransaction.finish(); - } - activeTransaction = customStartTransaction({ - name: _types_js__WEBPACK_IMPORTED_MODULE_1__["WINDOW"].location.pathname, - op: 'navigation', - metadata: { source: 'url' }, - }); - } - }); - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "basis", function() { return basis; }); +function basis(t1, v0, v1, v2, v3) { + var t2 = t1 * t1, t3 = t2 * t1; + return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + + (4 - 6 * t2 + 3 * t3) * v1 + + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + + t3 * v3) / 6; } - -//# sourceMappingURL=router.js.map +/* harmony default export */ __webpack_exports__["default"] = (function(values) { + var n = values.length - 1; + return function(t) { + var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), + v1 = values[i], + v2 = values[i + 1], + v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, + v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; + return basis((t - i / n) * n, v0, v1, v2, v3); + }; +}); /***/ }), -/***/ "xpiv": +/***/ "yFc8": /***/ (function(module, exports, __webpack_require__) { -// 26.1.11 Reflect.ownKeys(target) -var $export = __webpack_require__("XKFU"); +"use strict"; -$export($export.S, 'Reflect', { ownKeys: __webpack_require__("mQtv") }); +var _interopRequireDefault = __webpack_require__("TqRt"); -/***/ }), +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.useCozyTheme = exports.default = exports.CozyThemeContext = void 0; -/***/ "xpj1": -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var _react = _interopRequireWildcard(__webpack_require__("q1tI")); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (x => () => x); +var _classnames = _interopRequireDefault(__webpack_require__("TSYQ")); +var _MuiCozyTheme = _interopRequireDefault(__webpack_require__("xIbs")); -/***/ }), +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -/***/ "xpql": -/***/ (function(module, exports, __webpack_require__) { +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -module.exports = !__webpack_require__("nh4g") && !__webpack_require__("eeVq")(function () { - return Object.defineProperty(__webpack_require__("Iw71")('div'), 'a', { get: function () { return 7; } }).a != 7; -}); +var themesStyles = { + "CozyTheme--inverted": "palette__CozyTheme--inverted___UL0fq", + "CozyTheme--normal": "palette__CozyTheme--normal___3UmMb" +}; +var CozyThemeContext = /*#__PURE__*/(0, _react.createContext)(); +exports.CozyThemeContext = CozyThemeContext; +var allStyles = { + 'CozyTheme--normal': themesStyles['CozyTheme--normal'], + 'CozyTheme--inverted': themesStyles['CozyTheme--inverted'] +}; +var CozyTheme = function CozyTheme(_ref) { + var variant = _ref.variant, + children = _ref.children, + className = _ref.className; + return /*#__PURE__*/_react.default.createElement(CozyThemeContext.Provider, { + value: variant + }, /*#__PURE__*/_react.default.createElement(_MuiCozyTheme.default, { + variant: variant + }, /*#__PURE__*/_react.default.createElement("div", { + className: (0, _classnames.default)(className, allStyles["CozyTheme--".concat(variant)]) + }, children))); +}; -/***/ }), +var useCozyTheme = function useCozyTheme() { + return (0, _react.useContext)(CozyThemeContext); +}; -/***/ "xq5I": -/***/ (function(module, exports, __webpack_require__) { +exports.useCozyTheme = useCozyTheme; +var _default = CozyTheme; +exports.default = _default; -var startOfSecond = __webpack_require__("IpkJ") +/***/ }), -/** - * @category Second Helpers - * @summary Are the given dates in the same second? - * - * @description - * Are the given dates in the same second? - * - * @param {Date|String|Number} dateLeft - the first date to check - * @param {Date|String|Number} dateRight - the second date to check - * @returns {Boolean} the dates are in the same second - * - * @example - * // Are 4 September 2014 06:30:15.000 and 4 September 2014 06:30.15.500 - * // in the same second? - * var result = isSameSecond( - * new Date(2014, 8, 4, 6, 30, 15), - * new Date(2014, 8, 4, 6, 30, 15, 500) - * ) - * //=> true - */ -function isSameSecond (dirtyDateLeft, dirtyDateRight) { - var dateLeftStartOfSecond = startOfSecond(dirtyDateLeft) - var dateRightStartOfSecond = startOfSecond(dirtyDateRight) +/***/ "yGTc": +/***/ (function(module, exports) { - return dateLeftStartOfSecond.getTime() === dateRightStartOfSecond.getTime() +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; } -module.exports = isSameSecond - +module.exports = _interopRequireDefault; /***/ }), -/***/ "xqgi": +/***/ "yGk4": /***/ (function(module, exports, __webpack_require__) { -/** - * RC2 implementation. - * - * @author Stefan Siegl - * - * Copyright (c) 2012 Stefan Siegl <stesie@brokenpipe.de> - * - * Information on the RC2 cipher is available from RFC #2268, - * http://www.ietf.org/rfc/rfc2268.txt - */ -var forge = __webpack_require__("0ycz"); -__webpack_require__("sdTk"); +var getNative = __webpack_require__("Cwc5"), + root = __webpack_require__("Kz5y"); -var piTable = [ - 0xd9, 0x78, 0xf9, 0xc4, 0x19, 0xdd, 0xb5, 0xed, 0x28, 0xe9, 0xfd, 0x79, 0x4a, 0xa0, 0xd8, 0x9d, - 0xc6, 0x7e, 0x37, 0x83, 0x2b, 0x76, 0x53, 0x8e, 0x62, 0x4c, 0x64, 0x88, 0x44, 0x8b, 0xfb, 0xa2, - 0x17, 0x9a, 0x59, 0xf5, 0x87, 0xb3, 0x4f, 0x13, 0x61, 0x45, 0x6d, 0x8d, 0x09, 0x81, 0x7d, 0x32, - 0xbd, 0x8f, 0x40, 0xeb, 0x86, 0xb7, 0x7b, 0x0b, 0xf0, 0x95, 0x21, 0x22, 0x5c, 0x6b, 0x4e, 0x82, - 0x54, 0xd6, 0x65, 0x93, 0xce, 0x60, 0xb2, 0x1c, 0x73, 0x56, 0xc0, 0x14, 0xa7, 0x8c, 0xf1, 0xdc, - 0x12, 0x75, 0xca, 0x1f, 0x3b, 0xbe, 0xe4, 0xd1, 0x42, 0x3d, 0xd4, 0x30, 0xa3, 0x3c, 0xb6, 0x26, - 0x6f, 0xbf, 0x0e, 0xda, 0x46, 0x69, 0x07, 0x57, 0x27, 0xf2, 0x1d, 0x9b, 0xbc, 0x94, 0x43, 0x03, - 0xf8, 0x11, 0xc7, 0xf6, 0x90, 0xef, 0x3e, 0xe7, 0x06, 0xc3, 0xd5, 0x2f, 0xc8, 0x66, 0x1e, 0xd7, - 0x08, 0xe8, 0xea, 0xde, 0x80, 0x52, 0xee, 0xf7, 0x84, 0xaa, 0x72, 0xac, 0x35, 0x4d, 0x6a, 0x2a, - 0x96, 0x1a, 0xd2, 0x71, 0x5a, 0x15, 0x49, 0x74, 0x4b, 0x9f, 0xd0, 0x5e, 0x04, 0x18, 0xa4, 0xec, - 0xc2, 0xe0, 0x41, 0x6e, 0x0f, 0x51, 0xcb, 0xcc, 0x24, 0x91, 0xaf, 0x50, 0xa1, 0xf4, 0x70, 0x39, - 0x99, 0x7c, 0x3a, 0x85, 0x23, 0xb8, 0xb4, 0x7a, 0xfc, 0x02, 0x36, 0x5b, 0x25, 0x55, 0x97, 0x31, - 0x2d, 0x5d, 0xfa, 0x98, 0xe3, 0x8a, 0x92, 0xae, 0x05, 0xdf, 0x29, 0x10, 0x67, 0x6c, 0xba, 0xc9, - 0xd3, 0x00, 0xe6, 0xcf, 0xe1, 0x9e, 0xa8, 0x2c, 0x63, 0x16, 0x01, 0x3f, 0x58, 0xe2, 0x89, 0xa9, - 0x0d, 0x38, 0x34, 0x1b, 0xab, 0x33, 0xff, 0xb0, 0xbb, 0x48, 0x0c, 0x5f, 0xb9, 0xb1, 0xcd, 0x2e, - 0xc5, 0xf3, 0xdb, 0x47, 0xe5, 0xa5, 0x9c, 0x77, 0x0a, 0xa6, 0x20, 0x68, 0xfe, 0x7f, 0xc1, 0xad -]; +/* Built-in method references that are verified to be native. */ +var Set = getNative(root, 'Set'); -var s = [1, 2, 3, 5]; +module.exports = Set; + + +/***/ }), + +/***/ "yHON": +/***/ (function(module, exports, __webpack_require__) { + +var parse = __webpack_require__("yNUO") /** - * Rotate a word left by given number of bits. + * @category Common Helpers + * @summary Compare the two dates reverse chronologically and return -1, 0 or 1. * - * Bits that are shifted out on the left are put back in on the right - * hand side. + * @description + * Compare the two dates and return -1 if the first date is after the second, + * 1 if the first date is before the second or 0 if dates are equal. * - * @param word The word to shift left. - * @param bits The number of bits to shift by. - * @return The rotated word. - */ -var rol = function(word, bits) { - return ((word << bits) & 0xffff) | ((word & 0xffff) >> (16 - bits)); -}; - -/** - * Rotate a word right by given number of bits. + * @param {Date|String|Number} dateLeft - the first date to compare + * @param {Date|String|Number} dateRight - the second date to compare + * @returns {Number} the result of the comparison * - * Bits that are shifted out on the right are put back in on the left - * hand side. + * @example + * // Compare 11 February 1987 and 10 July 1989 reverse chronologically: + * var result = compareDesc( + * new Date(1987, 1, 11), + * new Date(1989, 6, 10) + * ) + * //=> 1 * - * @param word The word to shift right. - * @param bits The number of bits to shift by. - * @return The rotated word. + * @example + * // Sort the array of dates in reverse chronological order: + * var result = [ + * new Date(1995, 6, 2), + * new Date(1987, 1, 11), + * new Date(1989, 6, 10) + * ].sort(compareDesc) + * //=> [ + * // Sun Jul 02 1995 00:00:00, + * // Mon Jul 10 1989 00:00:00, + * // Wed Feb 11 1987 00:00:00 + * // ] */ -var ror = function(word, bits) { - return ((word & 0xffff) >> bits) | ((word << (16 - bits)) & 0xffff); -}; - -/* RC2 API */ -module.exports = forge.rc2 = forge.rc2 || {}; +function compareDesc (dirtyDateLeft, dirtyDateRight) { + var dateLeft = parse(dirtyDateLeft) + var timeLeft = dateLeft.getTime() + var dateRight = parse(dirtyDateRight) + var timeRight = dateRight.getTime() -/** - * Perform RC2 key expansion as per RFC #2268, section 2. - * - * @param key variable-length user key (between 1 and 128 bytes) - * @param effKeyBits number of effective key bits (default: 128) - * @return the expanded RC2 key (ByteBuffer of 128 bytes) - */ -forge.rc2.expandKey = function(key, effKeyBits) { - if(typeof key === 'string') { - key = forge.util.createBuffer(key); + if (timeLeft > timeRight) { + return -1 + } else if (timeLeft < timeRight) { + return 1 + } else { + return 0 } - effKeyBits = effKeyBits || 128; +} - /* introduce variables that match the names used in RFC #2268 */ - var L = key; - var T = key.length(); - var T1 = effKeyBits; - var T8 = Math.ceil(T1 / 8); - var TM = 0xff >> (T1 & 0x07); - var i; +module.exports = compareDesc - for(i = T; i < 128; i++) { - L.putByte(piTable[(L.at(i - 1) + L.at(i - T)) & 0xff]); - } - L.setAt(128 - T8, piTable[L.at(128 - T8) & TM]); +/***/ }), - for(i = 127 - T8; i >= 0; i--) { - L.setAt(i, piTable[L.at(i + 1) ^ L.at(i + T8)]); - } +/***/ "yHx3": +/***/ (function(module, exports) { - return L; -}; +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * Creates a RC2 cipher object. - * - * @param key the symmetric key to use (as base for key generation). - * @param bits the number of effective key bits. - * @param encrypt false for decryption, true for encryption. + * Initializes an array clone. * - * @return the cipher. + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. */ -var createCipher = function(key, bits, encrypt) { - var _finish = false, _input = null, _output = null, _iv = null; - var mixRound, mashRound; - var i, j, K = []; +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); - /* Expand key and fill into K[] Array */ - key = forge.rc2.expandKey(key, bits); - for(i = 0; i < 64; i++) { - K.push(key.getInt16Le()); + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; } + return result; +} - if(encrypt) { - /** - * Perform one mixing round "in place". - * - * @param R Array of four words to perform mixing on. - */ - mixRound = function(R) { - for(i = 0; i < 4; i++) { - R[i] += K[j] + (R[(i + 3) % 4] & R[(i + 2) % 4]) + - ((~R[(i + 3) % 4]) & R[(i + 1) % 4]); - R[i] = rol(R[i], s[i]); - j++; - } - }; +module.exports = initCloneArray; - /** - * Perform one mashing round "in place". - * - * @param R Array of four words to perform mashing on. - */ - mashRound = function(R) { - for(i = 0; i < 4; i++) { - R[i] += K[R[(i + 3) % 4] & 63]; - } - }; - } else { - /** - * Perform one r-mixing round "in place". - * - * @param R Array of four words to perform mixing on. - */ - mixRound = function(R) { - for(i = 3; i >= 0; i--) { - R[i] = ror(R[i], s[i]); - R[i] -= K[j] + (R[(i + 3) % 4] & R[(i + 2) % 4]) + - ((~R[(i + 3) % 4]) & R[(i + 1) % 4]); - j--; - } - }; - /** - * Perform one r-mashing round "in place". - * - * @param R Array of four words to perform mashing on. - */ - mashRound = function(R) { - for(i = 3; i >= 0; i--) { - R[i] -= K[R[(i + 3) % 4] & 63]; - } - }; - } +/***/ }), - /** - * Run the specified cipher execution plan. - * - * This function takes four words from the input buffer, applies the IV on - * it (if requested) and runs the provided execution plan. - * - * The plan must be put together in form of a array of arrays. Where the - * outer one is simply a list of steps to perform and the inner one needs - * to have two elements: the first one telling how many rounds to perform, - * the second one telling what to do (i.e. the function to call). - * - * @param {Array} plan The plan to execute. - */ - var runPlan = function(plan) { - var R = []; +/***/ "yJHZ": +/***/ (function(module, __webpack_exports__, __webpack_require__) { - /* Get data from input buffer and fill the four words into R */ - for(i = 0; i < 4; i++) { - var val = _input.getInt16Le(); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); +/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("wx14"); +/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Ff2n"); +/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("KQm4"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("q1tI"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("17x9"); +/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("iuhU"); +/* harmony import */ var _utils_debounce__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("/Cew"); +/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("KgOg"); +/* harmony import */ var _utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("2hVh"); - if(_iv !== null) { - if(encrypt) { - /* We're encrypting, apply the IV first. */ - val ^= _iv.getInt16Le(); - } else { - /* We're decryption, keep cipher text for next block. */ - _iv.putInt16Le(val); - } - } - R.push(val & 0xffff); - } - /* Reset global "j" variable as per spec. */ - j = encrypt ? 0 : 63; - /* Run execution plan. */ - for(var ptr = 0; ptr < plan.length; ptr++) { - for(var ctr = 0; ctr < plan[ptr][0]; ctr++) { - plan[ptr][1](R); - } - } - /* Write back result to output buffer. */ - for(i = 0; i < 4; i++) { - if(_iv !== null) { - if(encrypt) { - /* We're encrypting in CBC-mode, feed back encrypted bytes into - IV buffer to carry it forward to next block. */ - _iv.putInt16Le(R[i]); - } else { - R[i] ^= _iv.getInt16Le(); - } - } - _output.putInt16Le(R[i]); - } - }; - /* Create cipher object */ - var cipher = null; - cipher = { - /** - * Starts or restarts the encryption or decryption process, whichever - * was previously configured. - * - * To use the cipher in CBC mode, iv may be given either as a string - * of bytes, or as a byte buffer. For ECB mode, give null as iv. - * - * @param iv the initialization vector to use, null for ECB mode. - * @param output the output the buffer to write to, null to create one. - */ - start: function(iv, output) { - if(iv) { - /* CBC mode */ - if(typeof iv === 'string') { - iv = forge.util.createBuffer(iv); - } - } - _finish = false; - _input = forge.util.createBuffer(); - _output = output || new forge.util.createBuffer(); - _iv = iv; - cipher.output = _output; - }, +var styles = { + /* Styles applied to the root element. */ + root: { + boxSizing: 'border-box', + flexShrink: 0 + }, - /** - * Updates the next block. - * - * @param input the buffer to read from. - */ - update: function(input) { - if(!_finish) { - // not finishing, so fill the input buffer with more input - _input.putBuffer(input); - } + /* Styles applied to the `div` element that wraps the children. */ + tile: { + position: 'relative', + display: 'block', + // In case it's not rendered with a div. + height: '100%', + overflow: 'hidden' + }, - while(_input.length() >= 8) { - runPlan([ - [ 5, mixRound ], - [ 1, mashRound ], - [ 6, mixRound ], - [ 1, mashRound ], - [ 5, mixRound ] - ]); - } - }, + /* Styles applied to an `img` element child, if needed to ensure it covers the tile. */ + imgFullHeight: { + height: '100%', + transform: 'translateX(-50%)', + position: 'relative', + left: '50%' + }, - /** - * Finishes encrypting or decrypting. - * - * @param pad a padding function to use, null for PKCS#7 padding, - * signature(blockSize, buffer, decrypt). - * - * @return true if successful, false on error. - */ - finish: function(pad) { - var rval = true; + /* Styles applied to an `img` element child, if needed to ensure it covers the tile. */ + imgFullWidth: { + width: '100%', + position: 'relative', + transform: 'translateY(-50%)', + top: '50%' + } +}; - if(encrypt) { - if(pad) { - rval = pad(8, _input, !encrypt); - } else { - // add PKCS#7 padding to block (each pad byte is the - // value of the number of pad bytes) - var padding = (_input.length() === 8) ? 8 : (8 - _input.length()); - _input.fillWithByte(padding, padding); - } - } +var fit = function fit(imgEl, classes) { + if (!imgEl || !imgEl.complete) { + return; + } - if(rval) { - // do final update - _finish = true; - cipher.update(); - } + if (imgEl.width / imgEl.height > imgEl.parentElement.offsetWidth / imgEl.parentElement.offsetHeight) { + var _imgEl$classList, _imgEl$classList2; - if(!encrypt) { - // check for error: input data not a multiple of block size - rval = (_input.length() === 0); - if(rval) { - if(pad) { - rval = pad(8, _output, !encrypt); - } else { - // ensure padding byte count is valid - var len = _output.length(); - var count = _output.at(len - 1); + (_imgEl$classList = imgEl.classList).remove.apply(_imgEl$classList, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.imgFullWidth.split(' '))); - if(count > len) { - rval = false; - } else { - // trim off padding bytes - _output.truncate(count); - } - } - } - } + (_imgEl$classList2 = imgEl.classList).add.apply(_imgEl$classList2, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.imgFullHeight.split(' '))); + } else { + var _imgEl$classList3, _imgEl$classList4; - return rval; - } - }; + (_imgEl$classList3 = imgEl.classList).remove.apply(_imgEl$classList3, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.imgFullHeight.split(' '))); - return cipher; + (_imgEl$classList4 = imgEl.classList).add.apply(_imgEl$classList4, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.imgFullWidth.split(' '))); + } }; -/** - * Creates an RC2 cipher object to encrypt data in ECB or CBC mode using the - * given symmetric key. The output will be stored in the 'output' member - * of the returned cipher. - * - * The key and iv may be given as a string of bytes or a byte buffer. - * The cipher is initialized to use 128 effective key bits. - * - * @param key the symmetric key to use. - * @param iv the initialization vector to use. - * @param output the buffer to write to, null to create one. - * - * @return the cipher. - */ -forge.rc2.startEncrypting = function(key, iv, output) { - var cipher = forge.rc2.createEncryptionCipher(key, 128); - cipher.start(iv, output); - return cipher; -}; +function ensureImageCover(imgEl, classes) { + if (!imgEl) { + return; + } -/** - * Creates an RC2 cipher object to encrypt data in ECB or CBC mode using the - * given symmetric key. - * - * The key may be given as a string of bytes or a byte buffer. - * - * To start encrypting call start() on the cipher with an iv and optional - * output buffer. - * - * @param key the symmetric key to use. - * - * @return the cipher. - */ -forge.rc2.createEncryptionCipher = function(key, bits) { - return createCipher(key, bits, true); -}; + if (imgEl.complete) { + fit(imgEl, classes); + } else { + imgEl.addEventListener('load', function () { + fit(imgEl, classes); + }); + } +} +var warnedOnce = false; /** - * Creates an RC2 cipher object to decrypt data in ECB or CBC mode using the - * given symmetric key. The output will be stored in the 'output' member - * of the returned cipher. - * - * The key and iv may be given as a string of bytes or a byte buffer. - * The cipher is initialized to use 128 effective key bits. - * - * @param key the symmetric key to use. - * @param iv the initialization vector to use. - * @param output the buffer to write to, null to create one. + * ⚠️ The GridList component was renamed to ImageList to align with the current Material Design naming. * - * @return the cipher. + * You should use `import { ImageListItem } from '@material-ui/core'` + * or `import ImageListItem from '@material-ui/core/ImageListItem'`. */ -forge.rc2.startDecrypting = function(key, iv, output) { - var cipher = forge.rc2.createDecryptionCipher(key, 128); - cipher.start(iv, output); - return cipher; -}; -/** - * Creates an RC2 cipher object to decrypt data in ECB or CBC mode using the - * given symmetric key. - * - * The key may be given as a string of bytes or a byte buffer. - * - * To start decrypting call start() on the cipher with an iv and optional - * output buffer. - * - * @param key the symmetric key to use. - * - * @return the cipher. - */ -forge.rc2.createDecryptionCipher = function(key, bits) { - return createCipher(key, bits, false); -}; +var GridListTile = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function GridListTile(props, ref) { + if (false) {} // cols rows default values are for docs only + + + var children = props.children, + classes = props.classes, + className = props.className, + _props$cols = props.cols, + cols = _props$cols === void 0 ? 1 : _props$cols, + _props$component = props.component, + Component = _props$component === void 0 ? 'li' : _props$component, + _props$rows = props.rows, + rows = _props$rows === void 0 ? 1 : _props$rows, + other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "classes", "className", "cols", "component", "rows"]); + + var imgRef = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](null); + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + ensureImageCover(imgRef.current, classes); + }); + react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { + var handleResize = Object(_utils_debounce__WEBPACK_IMPORTED_MODULE_6__["default"])(function () { + fit(imgRef.current, classes); + }); + window.addEventListener('resize', handleResize); + return function () { + handleResize.clear(); + window.removeEventListener('resize', handleResize); + }; + }, [classes]); + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ + className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, className), + ref: ref + }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { + className: classes.tile + }, react__WEBPACK_IMPORTED_MODULE_3__["Children"].map(children, function (child) { + if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["isValidElement"](child)) { + return null; + } + + if (child.type === 'img' || Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__["default"])(child, ['Image'])) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["cloneElement"](child, { + ref: imgRef + }); + } + return child; + }))); +}); + false ? undefined : void 0; +/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__["default"])(styles, { + name: 'MuiGridListTile' +})(GridListTile)); /***/ }), -/***/ "xrec": -/***/ (function(module, exports, __webpack_require__) { +/***/ "yKYv": +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var baseRest = __webpack_require__("EA7m"), - unzip = __webpack_require__("Y0CH"); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("XVSz"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "common", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -/** - * Creates an array of grouped elements, the first of which contains the - * first elements of the given arrays, the second of which contains the - * second elements of the given arrays, and so on. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to process. - * @returns {Array} Returns the new array of grouped elements. - * @example - * - * _.zip(['a', 'b'], [1, 2], [true, false]); - * // => [['a', 1, true], ['b', 2, false]] - */ -var zip = baseRest(unzip); +/* harmony import */ var _red__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("dl/7"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "red", function() { return _red__WEBPACK_IMPORTED_MODULE_1__["default"]; }); -module.exports = zip; +/* harmony import */ var _pink__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("nXt3"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pink", function() { return _pink__WEBPACK_IMPORTED_MODULE_2__["default"]; }); +/* harmony import */ var _purple__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("6T4/"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "purple", function() { return _purple__WEBPACK_IMPORTED_MODULE_3__["default"]; }); -/***/ }), +/* harmony import */ var _deepPurple__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("UuMD"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deepPurple", function() { return _deepPurple__WEBPACK_IMPORTED_MODULE_4__["default"]; }); -/***/ "xs/l": -/***/ (function(module, exports, __webpack_require__) { +/* harmony import */ var _indigo__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rwtN"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "indigo", function() { return _indigo__WEBPACK_IMPORTED_MODULE_5__["default"]; }); -var flatten = __webpack_require__("TYy9"), - overRest = __webpack_require__("Ioao"), - setToString = __webpack_require__("wclG"); +/* harmony import */ var _blue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("edxh"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blue", function() { return _blue__WEBPACK_IMPORTED_MODULE_6__["default"]; }); -/** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ -function flatRest(func) { - return setToString(overRest(func, undefined, flatten), func + ''); -} +/* harmony import */ var _lightBlue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("02N3"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lightBlue", function() { return _lightBlue__WEBPACK_IMPORTED_MODULE_7__["default"]; }); -module.exports = flatRest; +/* harmony import */ var _cyan__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("ejDI"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cyan", function() { return _cyan__WEBPACK_IMPORTED_MODULE_8__["default"]; }); +/* harmony import */ var _teal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("YlDu"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "teal", function() { return _teal__WEBPACK_IMPORTED_MODULE_9__["default"]; }); -/***/ }), +/* harmony import */ var _green__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("6yBS"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "green", function() { return _green__WEBPACK_IMPORTED_MODULE_10__["default"]; }); -/***/ "xtnD": -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* harmony import */ var _lightGreen__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("EQQ8"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lightGreen", function() { return _lightGreen__WEBPACK_IMPORTED_MODULE_11__["default"]; }); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return disjoint; }); -function disjoint(values, other) { - const iterator = other[Symbol.iterator](), set = new Set(); - for (const v of values) { - if (set.has(v)) return false; - let value, done; - while (({value, done} = iterator.next())) { - if (done) break; - if (Object.is(v, value)) return false; - set.add(value); - } - } - return true; -} +/* harmony import */ var _lime__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("+bwn"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lime", function() { return _lime__WEBPACK_IMPORTED_MODULE_12__["default"]; }); +/* harmony import */ var _yellow__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("An1w"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "yellow", function() { return _yellow__WEBPACK_IMPORTED_MODULE_13__["default"]; }); -/***/ }), +/* harmony import */ var _amber__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("Rp/f"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "amber", function() { return _amber__WEBPACK_IMPORTED_MODULE_14__["default"]; }); -/***/ "xweI": -/***/ (function(module, exports, __webpack_require__) { +/* harmony import */ var _orange__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("Yb7a"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "orange", function() { return _orange__WEBPACK_IMPORTED_MODULE_15__["default"]; }); -var baseFlatten = __webpack_require__("XGnz"), - baseOrderBy = __webpack_require__("alwl"), - baseRest = __webpack_require__("EA7m"), - isIterateeCall = __webpack_require__("mv/X"); +/* harmony import */ var _deepOrange__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("6s8c"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deepOrange", function() { return _deepOrange__WEBPACK_IMPORTED_MODULE_16__["default"]; }); -/** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 30 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] - */ -var sortBy = baseRest(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return baseOrderBy(collection, baseFlatten(iteratees, 1), []); -}); +/* harmony import */ var _brown__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("11O8"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brown", function() { return _brown__WEBPACK_IMPORTED_MODULE_17__["default"]; }); -module.exports = sortBy; +/* harmony import */ var _grey__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("LXXt"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "grey", function() { return _grey__WEBPACK_IMPORTED_MODULE_18__["default"]; }); +/* harmony import */ var _blueGrey__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("tOKM"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blueGrey", function() { return _blueGrey__WEBPACK_IMPORTED_MODULE_19__["default"]; }); -/***/ }), -/***/ "xzKj": -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _attachmentView__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("173S"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AttachmentView", function() { return _attachmentView__WEBPACK_IMPORTED_MODULE_0__["AttachmentView"]; }); -/* harmony import */ var _cardView__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("qVmr"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CardView", function() { return _cardView__WEBPACK_IMPORTED_MODULE_1__["CardView"]; }); -/* harmony import */ var _cipherView__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("g6GL"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CipherView", function() { return _cipherView__WEBPACK_IMPORTED_MODULE_2__["CipherView"]; }); -/* harmony import */ var _fieldView__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("QDNy"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FieldView", function() { return _fieldView__WEBPACK_IMPORTED_MODULE_3__["FieldView"]; }); -/* harmony import */ var _identityView__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("JPmt"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "IdentityView", function() { return _identityView__WEBPACK_IMPORTED_MODULE_4__["IdentityView"]; }); -/* harmony import */ var _loginUriView__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("g3ya"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LoginUriView", function() { return _loginUriView__WEBPACK_IMPORTED_MODULE_5__["LoginUriView"]; }); -/* harmony import */ var _loginView__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("bJVX"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LoginView", function() { return _loginView__WEBPACK_IMPORTED_MODULE_6__["LoginView"]; }); -/* harmony import */ var _secureNoteView__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("D9MD"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SecureNoteView", function() { return _secureNoteView__WEBPACK_IMPORTED_MODULE_7__["SecureNoteView"]; }); -/* harmony import */ var _view__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("qDRa"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "View", function() { return _view__WEBPACK_IMPORTED_MODULE_8__["View"]; }); @@ -403212,1381 +417109,2796 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "y+lv": +/***/ "yL5O": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fill", function() { return fill; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addNonEnumerableProperty", function() { return addNonEnumerableProperty; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "markFunctionWrapped", function() { return markFunctionWrapped; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOriginalFunction", function() { return getOriginalFunction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "urlEncode", function() { return urlEncode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertToPlainObject", function() { return convertToPlainObject; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extractExceptionKeysForMessage", function() { return extractExceptionKeysForMessage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dropUndefinedKeys", function() { return dropUndefinedKeys; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "objectify", function() { return objectify; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("mrSG"); -/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("TAEo"); -/* harmony import */ var _is__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("fUgN"); -/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("/gRg"); - +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reactRouterV3Instrumentation", function() { return reactRouterV3Instrumentation; }); +/* harmony import */ var _sentry_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("WSEr"); +// Many of the types below had to be mocked out to prevent typescript issues +// these types are required for correct functionality. /** - * Replace a method in an object with a wrapped version of itself. + * Creates routing instrumentation for React Router v3 + * Works for React Router >= 3.2.0 and < 4.0.0 * - * @param source An object that contains a method to be wrapped. - * @param name The name of the method to be wrapped. - * @param replacementFactory A higher-order function that takes the original version of the given method and returns a - * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to - * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other - * args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`. - * @returns void + * @param history object from the `history` library + * @param routes a list of all routes, should be + * @param match `Router.match` utility */ -function fill(source, name, replacementFactory) { - if (!(name in source)) { - return; +function reactRouterV3Instrumentation( + history, + routes, + match, +) { + return ( + startTransaction, + startTransactionOnPageLoad = true, + startTransactionOnLocationChange = true, + ) => { + let activeTransaction; + let prevName; + + // Have to use window.location because history.location might not be defined. + if (startTransactionOnPageLoad && _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["WINDOW"] && _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].location) { + normalizeTransactionName( + routes, + _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].location , + match, + (localName, source = 'url') => { + prevName = localName; + activeTransaction = startTransaction({ + name: prevName, + op: 'pageload', + tags: { + 'routing.instrumentation': 'react-router-v3', + }, + metadata: { + source, + }, + }); + }, + ); } - var original = source[name]; - var wrapped = replacementFactory(original); - // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work - // otherwise it'll throw "TypeError: Object.defineProperties called on non-object" - if (typeof wrapped === 'function') { - try { - markFunctionWrapped(wrapped, original); - } - catch (_Oo) { - // This can throw if multiple fill happens on a global object like XMLHttpRequest - // Fixes https://github.com/getsentry/sentry-javascript/issues/2043 + + if (startTransactionOnLocationChange && history.listen) { + history.listen(location => { + if (location.action === 'PUSH' || location.action === 'POP') { + if (activeTransaction) { + activeTransaction.finish(); + } + const tags = { + 'routing.instrumentation': 'react-router-v3', + }; + if (prevName) { + tags.from = prevName; + } + normalizeTransactionName(routes, location, match, (localName, source = 'url') => { + prevName = localName; + activeTransaction = startTransaction({ + name: prevName, + op: 'navigation', + tags, + metadata: { + source, + }, + }); + }); } + }); } - source[name] = wrapped; + }; } + /** - * Defines a non-enumerable property on the given object. - * - * @param obj The object on which to set the property - * @param name The name of the property to be set - * @param value The value to which to set the property + * Normalize transaction names using `Router.match` */ -function addNonEnumerableProperty(obj, name, value) { - Object.defineProperty(obj, name, { - // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it - value: value, - writable: true, - configurable: true, - }); +function normalizeTransactionName( + appRoutes, + location, + match, + callback, +) { + let name = location.pathname; + match( + { + location, + routes: appRoutes, + }, + (error, _redirectLocation, renderProps) => { + if (error || !renderProps) { + return callback(name); + } + + const routePath = getRouteStringFromRoutes(renderProps.routes || []); + if (routePath.length === 0 || routePath === '/*') { + return callback(name); + } + + name = routePath; + return callback(name, 'route'); + }, + ); } + /** - * Remembers the original function on the wrapped function and - * patches up the prototype. - * - * @param wrapped the wrapper function - * @param original the original function that gets wrapped + * Generate route name from array of routes */ -function markFunctionWrapped(wrapped, original) { - var proto = original.prototype || {}; - wrapped.prototype = original.prototype = proto; - addNonEnumerableProperty(wrapped, '__sentry_original__', original); +function getRouteStringFromRoutes(routes) { + if (!Array.isArray(routes) || routes.length === 0) { + return ''; + } + + const routesWithPaths = routes.filter((route) => !!route.path); + + let index = -1; + for (let x = routesWithPaths.length - 1; x >= 0; x--) { + const route = routesWithPaths[x]; + if (route.path && route.path.startsWith('/')) { + index = x; + break; + } + } + + return routesWithPaths + .slice(index) + .filter(({ path }) => !!path) + .map(({ path }) => path) + .join(''); } -/** - * This extracts the original function if available. See - * `markFunctionWrapped` for more information. + + +//# sourceMappingURL=reactrouterv3.js.map + + +/***/ }), + +/***/ "yLV6": +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/*! Hammer.JS - v2.0.7 - 2016-04-22 + * http://hammerjs.github.io/ * - * @param func the function to unwrap - * @returns the unwrapped version of the function if available. + * Copyright (c) 2016 Jorik Tangelder; + * Licensed under the MIT license */ +(function(window, document, exportName, undefined) { + 'use strict'; + +var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o']; +var TEST_ELEMENT = document.createElement('div'); + +var TYPE_FUNCTION = 'function'; + +var round = Math.round; +var abs = Math.abs; +var now = Date.now; + +/** + * set a timeout with a given scope + * @param {Function} fn + * @param {Number} timeout + * @param {Object} context + * @returns {number} */ -function getOriginalFunction(func) { - return func.__sentry_original__; +function setTimeoutContext(fn, timeout, context) { + return setTimeout(bindFn(fn, context), timeout); } + /** - * Encodes given object into url-friendly format - * - * @param object An object that contains serializable values - * @returns string Encoded + * if the argument is an array, we want to execute the fn on each entry + * if it aint an array we don't want to do a thing. + * this is used by all the methods that accept a single and array argument. + * @param {*|Array} arg + * @param {String} fn + * @param {Object} [context] + * @returns {Boolean} */ -function urlEncode(object) { - return Object.keys(object) - .map(function (key) { return encodeURIComponent(key) + "=" + encodeURIComponent(object[key]); }) - .join('&'); +function invokeArrayArg(arg, fn, context) { + if (Array.isArray(arg)) { + each(arg, context[fn], context); + return true; + } + return false; } + /** - * Transforms any object into an object literal with all its attributes - * attached to it. - * - * @param value Initial source that we have to transform in order for it to be usable by the serializer + * walk objects and arrays + * @param {Object} obj + * @param {Function} iterator + * @param {Object} context */ -function convertToPlainObject(value) { - var newObj = value; - if (Object(_is__WEBPACK_IMPORTED_MODULE_2__["isError"])(value)) { - newObj = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ message: value.message, name: value.name, stack: value.stack }, getOwnProperties(value)); +function each(obj, iterator, context) { + var i; + + if (!obj) { + return; } - else if (Object(_is__WEBPACK_IMPORTED_MODULE_2__["isEvent"])(value)) { - var event_1 = value; - newObj = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ type: event_1.type, target: serializeEventTarget(event_1.target), currentTarget: serializeEventTarget(event_1.currentTarget) }, getOwnProperties(event_1)); - if (typeof CustomEvent !== 'undefined' && Object(_is__WEBPACK_IMPORTED_MODULE_2__["isInstanceOf"])(value, CustomEvent)) { - newObj.detail = event_1.detail; + + if (obj.forEach) { + obj.forEach(iterator, context); + } else if (obj.length !== undefined) { + i = 0; + while (i < obj.length) { + iterator.call(context, obj[i], i, obj); + i++; + } + } else { + for (i in obj) { + obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj); } } - return newObj; } -/** Creates a string representation of the target of an `Event` object */ -function serializeEventTarget(target) { - try { - return Object(_is__WEBPACK_IMPORTED_MODULE_2__["isElement"])(target) ? Object(_browser__WEBPACK_IMPORTED_MODULE_1__["htmlTreeAsString"])(target) : Object.prototype.toString.call(target); - } - catch (_oO) { - return '<unknown>'; - } + +/** + * wrap a method with a deprecation warning and stack trace + * @param {Function} method + * @param {String} name + * @param {String} message + * @returns {Function} A new function wrapping the supplied method. + */ +function deprecate(method, name, message) { + var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\n' + message + ' AT \n'; + return function() { + var e = new Error('get-stack-trace'); + var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '') + .replace(/^\s+at\s+/gm, '') + .replace(/^Object.<anonymous>\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace'; + + var log = window.console && (window.console.warn || window.console.log); + if (log) { + log.call(window.console, deprecationMessage, stack); + } + return method.apply(this, arguments); + }; } -/** Filters out all but an object's own properties */ -function getOwnProperties(obj) { - var extractedProps = {}; - for (var property in obj) { - if (Object.prototype.hasOwnProperty.call(obj, property)) { - extractedProps[property] = obj[property]; + +/** + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} target + * @param {...Object} objects_to_assign + * @returns {Object} target + */ +var assign; +if (typeof Object.assign !== 'function') { + assign = function assign(target) { + if (target === undefined || target === null) { + throw new TypeError('Cannot convert undefined or null to object'); } - } - return extractedProps; + + var output = Object(target); + for (var index = 1; index < arguments.length; index++) { + var source = arguments[index]; + if (source !== undefined && source !== null) { + for (var nextKey in source) { + if (source.hasOwnProperty(nextKey)) { + output[nextKey] = source[nextKey]; + } + } + } + } + return output; + }; +} else { + assign = Object.assign; } + /** - * Given any captured exception, extract its keys and create a sorted - * and truncated list that will be used inside the event message. - * eg. `Non-error exception captured with keys: foo, bar, baz` + * extend object. + * means that properties in dest will be overwritten by the ones in src. + * @param {Object} dest + * @param {Object} src + * @param {Boolean} [merge=false] + * @returns {Object} dest */ -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types -function extractExceptionKeysForMessage(exception, maxLength) { - if (maxLength === void 0) { maxLength = 40; } - var keys = Object.keys(convertToPlainObject(exception)); - keys.sort(); - if (!keys.length) { - return '[object has no keys]'; +var extend = deprecate(function extend(dest, src, merge) { + var keys = Object.keys(src); + var i = 0; + while (i < keys.length) { + if (!merge || (merge && dest[keys[i]] === undefined)) { + dest[keys[i]] = src[keys[i]]; + } + i++; } - if (keys[0].length >= maxLength) { - return Object(_string__WEBPACK_IMPORTED_MODULE_3__["truncate"])(keys[0], maxLength); + return dest; +}, 'extend', 'Use `assign`.'); + +/** + * merge the values from src in the dest. + * means that properties that exist in dest will not be overwritten by src + * @param {Object} dest + * @param {Object} src + * @returns {Object} dest + */ +var merge = deprecate(function merge(dest, src) { + return extend(dest, src, true); +}, 'merge', 'Use `assign`.'); + +/** + * simple class inheritance + * @param {Function} child + * @param {Function} base + * @param {Object} [properties] + */ +function inherit(child, base, properties) { + var baseP = base.prototype, + childP; + + childP = child.prototype = Object.create(baseP); + childP.constructor = child; + childP._super = baseP; + + if (properties) { + assign(childP, properties); } - for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) { - var serialized = keys.slice(0, includedKeys).join(', '); - if (serialized.length > maxLength) { - continue; - } - if (includedKeys === keys.length) { - return serialized; +} + +/** + * simple function bind + * @param {Function} fn + * @param {Object} context + * @returns {Function} + */ +function bindFn(fn, context) { + return function boundFn() { + return fn.apply(context, arguments); + }; +} + +/** + * let a boolean value also be a function that must return a boolean + * this first item in args will be used as the context + * @param {Boolean|Function} val + * @param {Array} [args] + * @returns {Boolean} + */ +function boolOrFn(val, args) { + if (typeof val == TYPE_FUNCTION) { + return val.apply(args ? args[0] || undefined : undefined, args); + } + return val; +} + +/** + * use the val2 when val1 is undefined + * @param {*} val1 + * @param {*} val2 + * @returns {*} + */ +function ifUndefined(val1, val2) { + return (val1 === undefined) ? val2 : val1; +} + +/** + * addEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ +function addEventListeners(target, types, handler) { + each(splitStr(types), function(type) { + target.addEventListener(type, handler, false); + }); +} + +/** + * removeEventListener with multiple events at once + * @param {EventTarget} target + * @param {String} types + * @param {Function} handler + */ +function removeEventListeners(target, types, handler) { + each(splitStr(types), function(type) { + target.removeEventListener(type, handler, false); + }); +} + +/** + * find if a node is in the given parent + * @method hasParent + * @param {HTMLElement} node + * @param {HTMLElement} parent + * @return {Boolean} found + */ +function hasParent(node, parent) { + while (node) { + if (node == parent) { + return true; } - return Object(_string__WEBPACK_IMPORTED_MODULE_3__["truncate"])(serialized, maxLength); + node = node.parentNode; } - return ''; + return false; } + /** - * Given any object, return the new object with removed keys that value was `undefined`. - * Works recursively on objects and arrays. + * small indexOf wrapper + * @param {String} str + * @param {String} find + * @returns {Boolean} found */ -function dropUndefinedKeys(val) { - var e_1, _a; - if (Object(_is__WEBPACK_IMPORTED_MODULE_2__["isPlainObject"])(val)) { - var rv = {}; - try { - for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__values"])(Object.keys(val)), _c = _b.next(); !_c.done; _c = _b.next()) { - var key = _c.value; - if (typeof val[key] !== 'undefined') { - rv[key] = dropUndefinedKeys(val[key]); - } +function inStr(str, find) { + return str.indexOf(find) > -1; +} + +/** + * split string on whitespace + * @param {String} str + * @returns {Array} words + */ +function splitStr(str) { + return str.trim().split(/\s+/g); +} + +/** + * find if a array contains the object using indexOf or a simple polyFill + * @param {Array} src + * @param {String} find + * @param {String} [findByKey] + * @return {Boolean|Number} false when not found, or the index + */ +function inArray(src, find, findByKey) { + if (src.indexOf && !findByKey) { + return src.indexOf(find); + } else { + var i = 0; + while (i < src.length) { + if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) { + return i; } + i++; } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } + return -1; + } +} + +/** + * convert array-like objects to real arrays + * @param {Object} obj + * @returns {Array} + */ +function toArray(obj) { + return Array.prototype.slice.call(obj, 0); +} + +/** + * unique array with objects based on a key (like 'id') or just by the array's value + * @param {Array} src [{id:1},{id:2},{id:1}] + * @param {String} [key] + * @param {Boolean} [sort=False] + * @returns {Array} [{id:1},{id:2}] + */ +function uniqueArray(src, key, sort) { + var results = []; + var values = []; + var i = 0; + + while (i < src.length) { + var val = key ? src[i][key] : src[i]; + if (inArray(values, val) < 0) { + results.push(src[i]); } - return rv; + values[i] = val; + i++; } - if (Array.isArray(val)) { - return val.map(dropUndefinedKeys); + + if (sort) { + if (!key) { + results = results.sort(); + } else { + results = results.sort(function sortUniqueArray(a, b) { + return a[key] > b[key]; + }); + } } - return val; + + return results; } + /** - * Ensure that something is an object. - * - * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper - * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives. - * - * @param wat The subject of the objectification - * @returns A version of `wat` which can safely be used with `Object` class methods + * get the prefixed property + * @param {Object} obj + * @param {String} property + * @returns {String|Undefined} prefixed */ -function objectify(wat) { - var objectified; - switch (true) { - case wat === undefined || wat === null: - objectified = new String(wat); - break; - // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason - // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as - // an object in order to wrap it. - case typeof wat === 'symbol' || typeof wat === 'bigint': - objectified = Object(wat); - break; - // this will catch the remaining primitives: `String`, `Number`, and `Boolean` - case Object(_is__WEBPACK_IMPORTED_MODULE_2__["isPrimitive"])(wat): - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - objectified = new wat.constructor(wat); - break; - // by process of elimination, at this point we know that `wat` must already be an object - default: - objectified = wat; - break; +function prefixed(obj, property) { + var prefix, prop; + var camelProp = property[0].toUpperCase() + property.slice(1); + + var i = 0; + while (i < VENDOR_PREFIXES.length) { + prefix = VENDOR_PREFIXES[i]; + prop = (prefix) ? prefix + camelProp : property; + + if (prop in obj) { + return prop; + } + i++; } - return objectified; + return undefined; } -//# sourceMappingURL=object.js.map -/***/ }), +/** + * get a unique id + * @returns {number} uniqueId + */ +var _uniqueId = 1; +function uniqueId() { + return _uniqueId++; +} -/***/ "y/6f": -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** + * get the window object of an element + * @param {HTMLElement} element + * @returns {DocumentView|Window} + */ +function getWindowForElement(element) { + var doc = element.ownerDocument || element; + return (doc.defaultView || doc.parentWindow || window); +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "config", function() { return config; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConfig", function() { return setConfig; }); -var config = { - onError: function (e) { return console.error(e); }, -}; -var setConfig = function (conf) { - Object.assign(config, conf); -}; +var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; +var SUPPORT_TOUCH = ('ontouchstart' in window); +var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined; +var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent); -/***/ }), +var INPUT_TYPE_TOUCH = 'touch'; +var INPUT_TYPE_PEN = 'pen'; +var INPUT_TYPE_MOUSE = 'mouse'; +var INPUT_TYPE_KINECT = 'kinect'; -/***/ "y1pI": -/***/ (function(module, exports, __webpack_require__) { +var COMPUTE_INTERVAL = 25; -var eq = __webpack_require__("ljhN"); +var INPUT_START = 1; +var INPUT_MOVE = 2; +var INPUT_END = 4; +var INPUT_CANCEL = 8; + +var DIRECTION_NONE = 1; +var DIRECTION_LEFT = 2; +var DIRECTION_RIGHT = 4; +var DIRECTION_UP = 8; +var DIRECTION_DOWN = 16; + +var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT; +var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN; +var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL; + +var PROPS_XY = ['x', 'y']; +var PROPS_CLIENT_XY = ['clientX', 'clientY']; /** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. + * create new input type manager + * @param {Manager} manager + * @param {Function} callback + * @returns {Input} + * @constructor */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; +function Input(manager, callback) { + var self = this; + this.manager = manager; + this.callback = callback; + this.element = manager.element; + this.target = manager.options.inputTarget; + + // smaller wrapper around the handler, for the scope and the enabled state of the manager, + // so when disabled the input events are completely bypassed. + this.domHandler = function(ev) { + if (boolOrFn(manager.options.enable, [manager])) { + self.handler(ev); + } + }; + + this.init(); + +} + +Input.prototype = { + /** + * should handle the inputEvent data and trigger the callback + * @virtual + */ + handler: function() { }, + + /** + * bind the events + */ + init: function() { + this.evEl && addEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); + }, + + /** + * unbind the events + */ + destroy: function() { + this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler); + this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler); + this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler); } - } - return -1; +}; + +/** + * create new input type manager + * called by the Manager constructor + * @param {Hammer} manager + * @returns {Input} + */ +function createInputInstance(manager) { + var Type; + var inputClass = manager.options.inputClass; + + if (inputClass) { + Type = inputClass; + } else if (SUPPORT_POINTER_EVENTS) { + Type = PointerEventInput; + } else if (SUPPORT_ONLY_TOUCH) { + Type = TouchInput; + } else if (!SUPPORT_TOUCH) { + Type = MouseInput; + } else { + Type = TouchMouseInput; + } + return new (Type)(manager, inputHandler); } -module.exports = assocIndexOf; +/** + * handle input events + * @param {Manager} manager + * @param {String} eventType + * @param {Object} input + */ +function inputHandler(manager, eventType, input) { + var pointersLen = input.pointers.length; + var changedPointersLen = input.changedPointers.length; + var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0)); + var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0)); + input.isFirst = !!isFirst; + input.isFinal = !!isFinal; -/***/ }), + if (isFirst) { + manager.session = {}; + } -/***/ "y34A": -/***/ (function(module, __webpack_exports__, __webpack_require__) { + // source event is the normalized value of the domEvents + // like 'touchstart, mouseup, pointerdown' + input.eventType = eventType; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeNewFetchTransport", function() { return makeNewFetchTransport; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("mrSG"); -/* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("5K7t"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("6VZY"); + // compute scale, rotation etc + computeInputData(manager, input); + // emit secret event + manager.emit('hammer.input', input); + manager.recognize(input); + manager.session.prevInput = input; +} /** - * Creates a Transport that uses the Fetch API to send events to Sentry. + * extend the data with some usable properties like scale, rotate, velocity etc + * @param {Object} manager + * @param {Object} input */ -function makeNewFetchTransport(options, nativeFetch) { - if (nativeFetch === void 0) { nativeFetch = Object(_utils__WEBPACK_IMPORTED_MODULE_2__["getNativeFetchImplementation"])(); } - function makeRequest(request) { - var requestOptions = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ body: request.body, method: 'POST', referrerPolicy: 'origin' }, options.requestOptions); - return nativeFetch(options.url, requestOptions).then(function (response) { - return response.text().then(function (body) { return ({ - body: body, - headers: { - 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'), - 'retry-after': response.headers.get('Retry-After'), - }, - reason: response.statusText, - statusCode: response.status, - }); }); - }); +function computeInputData(manager, input) { + var session = manager.session; + var pointers = input.pointers; + var pointersLength = pointers.length; + + // store the first input to calculate the distance and direction + if (!session.firstInput) { + session.firstInput = simpleCloneInputData(input); } - return Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__["createTransport"])({ bufferSize: options.bufferSize }, makeRequest); -} -//# sourceMappingURL=new-fetch.js.map -/***/ }), + // to compute scale and rotation we need to store the multiple touches + if (pointersLength > 1 && !session.firstMultiple) { + session.firstMultiple = simpleCloneInputData(input); + } else if (pointersLength === 1) { + session.firstMultiple = false; + } -/***/ "y3w9": -/***/ (function(module, exports, __webpack_require__) { + var firstInput = session.firstInput; + var firstMultiple = session.firstMultiple; + var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center; -var isObject = __webpack_require__("0/R4"); -module.exports = function (it) { - if (!isObject(it)) throw TypeError(it + ' is not an object!'); - return it; -}; + var center = input.center = getCenter(pointers); + input.timeStamp = now(); + input.deltaTime = input.timeStamp - firstInput.timeStamp; + input.angle = getAngle(offsetCenter, center); + input.distance = getDistance(offsetCenter, center); -/***/ }), + computeDeltaXY(session, input); + input.offsetDirection = getDirection(input.deltaX, input.deltaY); -/***/ "y4dS": -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY); + input.overallVelocityX = overallVelocity.x; + input.overallVelocityY = overallVelocity.y; + input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStoreHook", function() { return createStoreHook; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useStore", function() { return useStore; }); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("q1tI"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("joe6"); -/* harmony import */ var _useReduxContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("mCWk"); + input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1; + input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0; + input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length > + session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers); + computeIntervalInputData(session, input); -/** - * Hook factory, which creates a `useStore` hook bound to a given context. - * - * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`. - * @returns {Function} A `useStore` hook bound to the specified context. - */ + // find the correct target + var target = manager.element; + if (hasParent(input.srcEvent.target, target)) { + target = input.srcEvent.target; + } + input.target = target; +} -function createStoreHook(context) { - if (context === void 0) { - context = _components_Context__WEBPACK_IMPORTED_MODULE_1__["ReactReduxContext"]; - } +function computeDeltaXY(session, input) { + var center = input.center; + var offset = session.offsetDelta || {}; + var prevDelta = session.prevDelta || {}; + var prevInput = session.prevInput || {}; - var useReduxContext = context === _components_Context__WEBPACK_IMPORTED_MODULE_1__["ReactReduxContext"] ? _useReduxContext__WEBPACK_IMPORTED_MODULE_2__["useReduxContext"] : function () { - return Object(react__WEBPACK_IMPORTED_MODULE_0__["useContext"])(context); - }; - return function useStore() { - var _useReduxContext = useReduxContext(), - store = _useReduxContext.store; + if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) { + prevDelta = session.prevDelta = { + x: prevInput.deltaX || 0, + y: prevInput.deltaY || 0 + }; - return store; - }; + offset = session.offsetDelta = { + x: center.x, + y: center.y + }; + } + + input.deltaX = prevDelta.x + (center.x - offset.x); + input.deltaY = prevDelta.y + (center.y - offset.y); } -/** - * A hook to access the redux store. - * - * @returns {any} the redux store - * - * @example - * - * import React from 'react' - * import { useStore } from 'react-redux' - * - * export const ExampleComponent = () => { - * const store = useStore() - * return <div>{store.getState()}</div> - * } + +/** + * velocity is calculated every x ms + * @param {Object} session + * @param {Object} input */ +function computeIntervalInputData(session, input) { + var last = session.lastInterval || input, + deltaTime = input.timeStamp - last.timeStamp, + velocity, velocityX, velocityY, direction; -var useStore = /*#__PURE__*/createStoreHook(); + if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) { + var deltaX = input.deltaX - last.deltaX; + var deltaY = input.deltaY - last.deltaY; -/***/ }), + var v = getVelocity(deltaTime, deltaX, deltaY); + velocityX = v.x; + velocityY = v.y; + velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y; + direction = getDirection(deltaX, deltaY); -/***/ "y5a+": -/***/ (function(module, exports, __webpack_require__) { + session.lastInterval = input; + } else { + // use latest velocity info if it doesn't overtake a minimum period + velocity = last.velocity; + velocityX = last.velocityX; + velocityY = last.velocityY; + direction = last.direction; + } -var parse = __webpack_require__("yNUO") + input.velocity = velocity; + input.velocityX = velocityX; + input.velocityY = velocityY; + input.direction = direction; +} /** - * @category Week Helpers - * @summary Return the last day of a week for the given date. - * - * @description - * Return the last day of a week for the given date. - * The result will be in the local timezone. - * - * @param {Date|String|Number} date - the original date - * @param {Object} [options] - the object with options - * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) - * @returns {Date} the last day of a week - * - * @example - * // The last day of a week for 2 September 2014 11:55:00: - * var result = lastDayOfWeek(new Date(2014, 8, 2, 11, 55, 0)) - * //=> Sat Sep 06 2014 00:00:00 - * - * @example - * // If the week starts on Monday, the last day of the week for 2 September 2014 11:55:00: - * var result = lastDayOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1}) - * //=> Sun Sep 07 2014 00:00:00 + * create a simple clone from the input used for storage of firstInput and firstMultiple + * @param {Object} input + * @returns {Object} clonedInputData */ -function lastDayOfWeek (dirtyDate, dirtyOptions) { - var weekStartsOn = dirtyOptions ? (Number(dirtyOptions.weekStartsOn) || 0) : 0 - - var date = parse(dirtyDate) - var day = date.getDay() - var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn) +function simpleCloneInputData(input) { + // make a simple copy of the pointers because we will get a reference if we don't + // we only need clientXY for the calculations + var pointers = []; + var i = 0; + while (i < input.pointers.length) { + pointers[i] = { + clientX: round(input.pointers[i].clientX), + clientY: round(input.pointers[i].clientY) + }; + i++; + } - date.setHours(0, 0, 0, 0) - date.setDate(date.getDate() + diff) - return date + return { + timeStamp: now(), + pointers: pointers, + center: getCenter(pointers), + deltaX: input.deltaX, + deltaY: input.deltaY + }; } -module.exports = lastDayOfWeek +/** + * get the center of all the pointers + * @param {Array} pointers + * @return {Object} center contains `x` and `y` properties + */ +function getCenter(pointers) { + var pointersLength = pointers.length; + // no need to loop when only one touch + if (pointersLength === 1) { + return { + x: round(pointers[0].clientX), + y: round(pointers[0].clientY) + }; + } -/***/ }), + var x = 0, y = 0, i = 0; + while (i < pointersLength) { + x += pointers[i].clientX; + y += pointers[i].clientY; + i++; + } -/***/ "y6BH": -/***/ (function(module, __webpack_exports__, __webpack_require__) { + return { + x: round(x / pointersLength), + y: round(y / pointersLength) + }; +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return unsupportedProp; }); -function unsupportedProp(props, propName, componentName, location, propFullName) { - if (true) { - return null; - } +/** + * calculate the velocity between two points. unit is in px per ms. + * @param {Number} deltaTime + * @param {Number} x + * @param {Number} y + * @return {Object} velocity `x` and `y` + */ +function getVelocity(deltaTime, x, y) { + return { + x: x / deltaTime || 0, + y: y / deltaTime || 0 + }; +} - var propFullNameSafe = propFullName || propName; +/** + * get the direction between two points + * @param {Number} x + * @param {Number} y + * @return {Number} direction + */ +function getDirection(x, y) { + if (x === y) { + return DIRECTION_NONE; + } - if (typeof props[propName] !== 'undefined') { - return new Error("The prop `".concat(propFullNameSafe, "` is not supported. Please remove it.")); - } + if (abs(x) >= abs(y)) { + return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT; + } + return y < 0 ? DIRECTION_UP : DIRECTION_DOWN; +} - return null; +/** + * calculate the absolute distance between two points + * @param {Object} p1 {x, y} + * @param {Object} p2 {x, y} + * @param {Array} [props] containing x and y keys + * @return {Number} distance + */ +function getDistance(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + var x = p2[props[0]] - p1[props[0]], + y = p2[props[1]] - p1[props[1]]; + + return Math.sqrt((x * x) + (y * y)); } -/***/ }), +/** + * calculate the angle between two coordinates + * @param {Object} p1 + * @param {Object} p2 + * @param {Array} [props] containing x and y keys + * @return {Number} angle + */ +function getAngle(p1, p2, props) { + if (!props) { + props = PROPS_XY; + } + var x = p2[props[0]] - p1[props[0]], + y = p2[props[1]] - p1[props[1]]; + return Math.atan2(y, x) * 180 / Math.PI; +} -/***/ "y6ex": -/***/ (function(module, exports, __webpack_require__) { +/** + * calculate the rotation degrees between two pointersets + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} rotation + */ +function getRotation(start, end) { + return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY); +} -"use strict"; +/** + * calculate the scale factor between two pointersets + * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out + * @param {Array} start array of pointers + * @param {Array} end array of pointers + * @return {Number} scale + */ +function getScale(start, end) { + return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY); +} +var MOUSE_INPUT_MAP = { + mousedown: INPUT_START, + mousemove: INPUT_MOVE, + mouseup: INPUT_END +}; -var _interopRequireDefault = __webpack_require__("TqRt"); +var MOUSE_ELEMENT_EVENTS = 'mousedown'; +var MOUSE_WINDOW_EVENTS = 'mousemove mouseup'; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.iconPropType = exports.default = void 0; +/** + * Mouse events input + * @constructor + * @extends Input + */ +function MouseInput() { + this.evEl = MOUSE_ELEMENT_EVENTS; + this.evWin = MOUSE_WINDOW_EVENTS; -var _extends2 = _interopRequireDefault(__webpack_require__("pVnL")); + this.pressed = false; // mousedown state -var _defineProperty2 = _interopRequireDefault(__webpack_require__("lSNA")); + Input.apply(this, arguments); +} -var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__("QILm")); +inherit(MouseInput, Input, { + /** + * handle mouse events + * @param {Object} ev + */ + handler: function MEhandler(ev) { + var eventType = MOUSE_INPUT_MAP[ev.type]; -var _react = _interopRequireWildcard(__webpack_require__("q1tI")); + // on start we want to have the left mouse button down + if (eventType & INPUT_START && ev.button === 0) { + this.pressed = true; + } -var _propTypes = _interopRequireDefault(__webpack_require__("17x9")); + if (eventType & INPUT_MOVE && ev.which !== 1) { + eventType = INPUT_END; + } -var _classnames = _interopRequireDefault(__webpack_require__("TSYQ")); + // mouse must be down + if (!this.pressed) { + return; + } -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + if (eventType & INPUT_END) { + this.pressed = false; + } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + this.callback(this.manager, eventType, { + pointers: [ev], + changedPointers: [ev], + pointerType: INPUT_TYPE_MOUSE, + srcEvent: ev + }); + } +}); -var _excluded = ["icon", "width", "height", "color", "className", "preserveColor", "rotate", "size", "spin"]; -var styles = { - "icon--spin": "styles__icon--spin___ybfC1", - "spin": "styles__spin___2Vvw3", - "icon": "styles__icon___23x3R", - "icon--preserveColor": "styles__icon--preserveColor___3gBz6", - "shake": "styles__shake___wT_3z" +var POINTER_INPUT_MAP = { + pointerdown: INPUT_START, + pointermove: INPUT_MOVE, + pointerup: INPUT_END, + pointercancel: INPUT_CANCEL, + pointerout: INPUT_CANCEL }; -var DEFAULT_SIZE = '16'; - -function getSvgObject(icon) { - var anchor; - if (icon.id) { - anchor = "#".concat(icon.id); - } else if (icon[0] === '#') { - anchor = icon; - } else { - anchor = '#' + icon; - } +// in IE10 the pointer types is defined as an enum +var IE10_POINTER_TYPE_ENUM = { + 2: INPUT_TYPE_TOUCH, + 3: INPUT_TYPE_PEN, + 4: INPUT_TYPE_MOUSE, + 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816 +}; - if (!anchor) { - console.warn("Icon not found ".concat(icon, ".")); - return null; - } +var POINTER_ELEMENT_EVENTS = 'pointerdown'; +var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; - return function (props) { - return /*#__PURE__*/_react.default.createElement("svg", props, /*#__PURE__*/_react.default.createElement("use", { - xlinkHref: anchor - })); - }; +// IE10 has prefixed support, and case-sensitive +if (window.MSPointerEvent && !window.PointerEvent) { + POINTER_ELEMENT_EVENTS = 'MSPointerDown'; + POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel'; } -function isFunction(obj) { - return obj instanceof Function; +/** + * Pointer events input + * @constructor + * @extends Input + */ +function PointerEventInput() { + this.evEl = POINTER_ELEMENT_EVENTS; + this.evWin = POINTER_WINDOW_EVENTS; + + Input.apply(this, arguments); + + this.store = (this.manager.session.pointerEvents = []); } -function Icon(props) { - var icon = props.icon, - width = props.width, - height = props.height, - color = props.color, - className = props.className, - preserveColor = props.preserveColor, - rotate = props.rotate, - size = props.size, - spin = props.spin, - restProps = (0, _objectWithoutProperties2.default)(props, _excluded); - var Svg = (0, _react.useMemo)(function () { - return isFunction(icon) ? icon : getSvgObject(icon); - }, [icon]); - var style = props.style; - style = Object.assign({}, style); +inherit(PointerEventInput, Input, { + /** + * handle mouse events + * @param {Object} ev + */ + handler: function PEhandler(ev) { + var store = this.store; + var removePointer = false; - if (color) { - style['fill'] = color; - } + var eventTypeNormalized = ev.type.toLowerCase().replace('ms', ''); + var eventType = POINTER_INPUT_MAP[eventTypeNormalized]; + var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType; - if (rotate) { - style['transform'] = "rotate(".concat(rotate, "deg)"); - } + var isTouch = (pointerType == INPUT_TYPE_TOUCH); - var iconClassName = preserveColor ? 'icon--preserveColor' : 'icon'; - var iconClass = (0, _classnames.default)(className, styles[iconClassName], (0, _defineProperty2.default)({}, styles['icon--spin'], spin)); - return Svg ? /*#__PURE__*/_react.default.createElement(Svg, (0, _extends2.default)({ - className: iconClass, - style: style, - width: width || size || DEFAULT_SIZE, - height: height || size || DEFAULT_SIZE - }, restProps)) : null; -} + // get index of the event in the store + var storeIndex = inArray(store, ev.pointerId, 'pointerId'); -Icon.isProperIcon = function (icon) { - var isSvgSymbol = icon && !!icon.id; - var isIconIdentifier = typeof icon === 'string'; - var isSvgr = isFunction(icon); - return isSvgSymbol || isIconIdentifier || isSvgr; -}; + // start and mouse must be down + if (eventType & INPUT_START && (ev.button === 0 || isTouch)) { + if (storeIndex < 0) { + store.push(ev); + storeIndex = store.length - 1; + } + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + removePointer = true; + } -var iconPropType = _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object, _propTypes.default.func]); + // it not found, so the pointer hasn't been down (so it's probably a hover) + if (storeIndex < 0) { + return; + } -exports.iconPropType = iconPropType; -Icon.propTypes = { - icon: iconPropType.isRequired, - width: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), - height: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), - color: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object]), - className: _propTypes.default.string, - preserveColor: _propTypes.default.bool, + // update the event in the store + store[storeIndex] = ev; - /** Shorthand for both width and height */ - size: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]), - spin: _propTypes.default.bool -}; -Icon.defaultProps = { - spin: false + this.callback(this.manager, eventType, { + pointers: store, + changedPointers: [ev], + pointerType: pointerType, + srcEvent: ev + }); + + if (removePointer) { + // remove from the store + store.splice(storeIndex, 1); + } + } +}); + +var SINGLE_TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL }; -var _default = Icon; -exports.default = _default; -/***/ }), +var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart'; +var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel'; -/***/ "y9qz": -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** + * Touch events input + * @constructor + * @extends Input + */ +function SingleTouchInput() { + this.evTarget = SINGLE_TOUCH_TARGET_EVENTS; + this.evWin = SINGLE_TOUCH_WINDOW_EVENTS; + this.started = false; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _Unstable_TrapFocus__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("q/9G"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _Unstable_TrapFocus__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + Input.apply(this, arguments); +} +inherit(SingleTouchInput, Input, { + handler: function TEhandler(ev) { + var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; + // should we handle the touch events? + if (type === INPUT_START) { + this.started = true; + } -/***/ }), + if (!this.started) { + return; + } -/***/ "yAGa": -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var touches = normalizeSingleTouches.call(this, ev, type); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function(value) { - return arguments.length - ? this.property("__data__", value) - : this.node().__data__; + // when done, reset the started state + if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) { + this.started = false; + } + + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + } }); +/** + * @this {TouchInput} + * @param {Object} ev + * @param {Number} type flag + * @returns {undefined|Array} [all, changed] + */ +function normalizeSingleTouches(ev, type) { + var all = toArray(ev.touches); + var changed = toArray(ev.changedTouches); -/***/ }), + if (type & (INPUT_END | INPUT_CANCEL)) { + all = uniqueArray(all.concat(changed), 'identifier', true); + } -/***/ "yCCt": -/***/ (function(module, __webpack_exports__, __webpack_require__) { + return [all, changed]; +} -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IS_DEBUG_BUILD", function() { return IS_DEBUG_BUILD; }); -/* - * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking - * for users. - * - * Debug flags need to be declared in each package individually and must not be imported across package boundaries, - * because some build tools have trouble tree-shaking imported guards. - * - * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder. - * - * Debug flag files will contain "magic strings" like `__SENTRY_DEBUG__` that may get replaced with actual values during - * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not - * replaced. +var TOUCH_INPUT_MAP = { + touchstart: INPUT_START, + touchmove: INPUT_MOVE, + touchend: INPUT_END, + touchcancel: INPUT_CANCEL +}; + +var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel'; + +/** + * Multi-user touch events input + * @constructor + * @extends Input */ -/** Flag that is true for debug builds, false otherwise. */ -var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__; -//# sourceMappingURL=flags.js.map +function TouchInput() { + this.evTarget = TOUCH_TARGET_EVENTS; + this.targetIds = {}; -/***/ }), + Input.apply(this, arguments); +} -/***/ "yCxk": -/***/ (function(module, __webpack_exports__, __webpack_require__) { +inherit(TouchInput, Input, { + handler: function MTEhandler(ev) { + var type = TOUCH_INPUT_MAP[ev.type]; + var touches = getTouches.call(this, ev, type); + if (!touches) { + return; + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return useControlled; }); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("q1tI"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); -/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */ + this.callback(this.manager, type, { + pointers: touches[0], + changedPointers: touches[1], + pointerType: INPUT_TYPE_TOUCH, + srcEvent: ev + }); + } +}); -function useControlled(_ref) { - var controlled = _ref.controlled, - defaultProp = _ref.default, - name = _ref.name, - _ref$state = _ref.state, - state = _ref$state === void 0 ? 'value' : _ref$state; +/** + * @this {TouchInput} + * @param {Object} ev + * @param {Number} type flag + * @returns {undefined|Array} [all, changed] + */ +function getTouches(ev, type) { + var allTouches = toArray(ev.touches); + var targetIds = this.targetIds; - var _React$useRef = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](controlled !== undefined), - isControlled = _React$useRef.current; + // when there is only one touch, the process can be simplified + if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) { + targetIds[allTouches[0].identifier] = true; + return [allTouches, allTouches]; + } - var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__["useState"](defaultProp), - valueState = _React$useState[0], - setValue = _React$useState[1]; + var i, + targetTouches, + changedTouches = toArray(ev.changedTouches), + changedTargetTouches = [], + target = this.target; + + // get target touches from touches + targetTouches = allTouches.filter(function(touch) { + return hasParent(touch.target, target); + }); - var value = isControlled ? controlled : valueState; + // collect touches + if (type === INPUT_START) { + i = 0; + while (i < targetTouches.length) { + targetIds[targetTouches[i].identifier] = true; + i++; + } + } - if (false) { var _React$useRef2, defaultValue; } + // filter changed touches to only contain touches that exist in the collected target ids + i = 0; + while (i < changedTouches.length) { + if (targetIds[changedTouches[i].identifier]) { + changedTargetTouches.push(changedTouches[i]); + } - var setValueIfUncontrolled = react__WEBPACK_IMPORTED_MODULE_0__["useCallback"](function (newValue) { - if (!isControlled) { - setValue(newValue); + // cleanup removed touches + if (type & (INPUT_END | INPUT_CANCEL)) { + delete targetIds[changedTouches[i].identifier]; + } + i++; } - }, []); - return [value, setValueIfUncontrolled]; + + if (!changedTargetTouches.length) { + return; + } + + return [ + // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel' + uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), + changedTargetTouches + ]; } -/***/ }), +/** + * Combined touch and mouse input + * + * Touch has a higher priority then mouse, and while touching no mouse events are allowed. + * This because touch devices also emit mouse events while doing a touch. + * + * @constructor + * @extends Input + */ -/***/ "yDR0": -/***/ (function(module, exports, __webpack_require__) { +var DEDUP_TIMEOUT = 2500; +var DEDUP_DISTANCE = 25; -"use strict"; +function TouchMouseInput() { + Input.apply(this, arguments); + var handler = bindFn(this.handler, this); + this.touch = new TouchInput(this.manager, handler); + this.mouse = new MouseInput(this.manager, handler); -// Note: adler32 takes 12% for level 0 and 2% for level 6. -// It isn't worth it to make additional optimizations as in original. -// Small size is preferable. + this.primaryTouch = null; + this.lastTouches = []; +} -// (C) 1995-2013 Jean-loup Gailly and Mark Adler -// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. +inherit(TouchMouseInput, Input, { + /** + * handle mouse and touch events + * @param {Hammer} manager + * @param {String} inputEvent + * @param {Object} inputData + */ + handler: function TMEhandler(manager, inputEvent, inputData) { + var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH), + isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE); -function adler32(adler, buf, len, pos) { - var s1 = (adler & 0xffff) |0, - s2 = ((adler >>> 16) & 0xffff) |0, - n = 0; + if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) { + return; + } - while (len !== 0) { - // Set limit ~ twice less than 5552, to keep - // s2 in 31-bits, because we force signed ints. - // in other case %= will fail. - n = len > 2000 ? 2000 : len; - len -= n; + // when we're in a touch event, record touches to de-dupe synthetic mouse event + if (isTouch) { + recordTouches.call(this, inputEvent, inputData); + } else if (isMouse && isSyntheticEvent.call(this, inputData)) { + return; + } + + this.callback(manager, inputEvent, inputData); + }, + + /** + * remove the event listeners + */ + destroy: function destroy() { + this.touch.destroy(); + this.mouse.destroy(); + } +}); + +function recordTouches(eventType, eventData) { + if (eventType & INPUT_START) { + this.primaryTouch = eventData.changedPointers[0].identifier; + setLastTouch.call(this, eventData); + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + setLastTouch.call(this, eventData); + } +} + +function setLastTouch(eventData) { + var touch = eventData.changedPointers[0]; + + if (touch.identifier === this.primaryTouch) { + var lastTouch = {x: touch.clientX, y: touch.clientY}; + this.lastTouches.push(lastTouch); + var lts = this.lastTouches; + var removeLastTouch = function() { + var i = lts.indexOf(lastTouch); + if (i > -1) { + lts.splice(i, 1); + } + }; + setTimeout(removeLastTouch, DEDUP_TIMEOUT); + } +} + +function isSyntheticEvent(eventData) { + var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY; + for (var i = 0; i < this.lastTouches.length; i++) { + var t = this.lastTouches[i]; + var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y); + if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) { + return true; + } + } + return false; +} - do { - s1 = (s1 + buf[pos++]) |0; - s2 = (s2 + s1) |0; - } while (--n); +var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction'); +var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; - s1 %= 65521; - s2 %= 65521; - } +// magical touchAction value +var TOUCH_ACTION_COMPUTE = 'compute'; +var TOUCH_ACTION_AUTO = 'auto'; +var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented +var TOUCH_ACTION_NONE = 'none'; +var TOUCH_ACTION_PAN_X = 'pan-x'; +var TOUCH_ACTION_PAN_Y = 'pan-y'; +var TOUCH_ACTION_MAP = getTouchActionProps(); - return (s1 | (s2 << 16)) |0; +/** + * Touch Action + * sets the touchAction property or uses the js alternative + * @param {Manager} manager + * @param {String} value + * @constructor + */ +function TouchAction(manager, value) { + this.manager = manager; + this.set(value); } +TouchAction.prototype = { + /** + * set the touchAction value on the element or enable the polyfill + * @param {String} value + */ + set: function(value) { + // find out the touch-action by the event handlers + if (value == TOUCH_ACTION_COMPUTE) { + value = this.compute(); + } -module.exports = adler32; + if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) { + this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; + } + this.actions = value.toLowerCase().trim(); + }, + /** + * just re-set the touchAction value + */ + update: function() { + this.set(this.manager.options.touchAction); + }, -/***/ }), + /** + * compute the value for the touchAction property based on the recognizer's settings + * @returns {String} value + */ + compute: function() { + var actions = []; + each(this.manager.recognizers, function(recognizer) { + if (boolOrFn(recognizer.options.enable, [recognizer])) { + actions = actions.concat(recognizer.getTouchAction()); + } + }); + return cleanTouchActions(actions.join(' ')); + }, -/***/ "yE6J": -/***/ (function(module, __webpack_exports__, __webpack_require__) { + /** + * this method is called on each input cycle and provides the preventing of the browser behavior + * @param {Object} input + */ + preventDefaults: function(input) { + var srcEvent = input.srcEvent; + var direction = input.offsetDirection; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony default export */ __webpack_exports__["default"] = (function*() { - var node = this, current, next = [node], children, i, n; - do { - current = next.reverse(), next = []; - while (node = current.pop()) { - yield node; - if (children = node.children) { - for (i = 0, n = children.length; i < n; ++i) { - next.push(children[i]); + // if the touch action did prevented once this session + if (this.manager.session.prevented) { + srcEvent.preventDefault(); + return; } - } - } - } while (next.length); -}); + var actions = this.actions; + var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE]; + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y]; + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X]; -/***/ }), + if (hasNone) { + //do not prevent defaults if this is a tap gesture -/***/ "yE6y": -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var isTapPointer = input.pointers.length === 1; + var isTapMovement = input.distance < 2; + var isTapTouchTime = input.deltaTime < 250; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "severityFromString", function() { return severityFromString; }); -/* harmony import */ var _sentry_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("PIsB"); -/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("P6zQ"); + if (isTapPointer && isTapMovement && isTapTouchTime) { + return; + } + } + if (hasPanX && hasPanY) { + // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent + return; + } + + if (hasNone || + (hasPanY && direction & DIRECTION_HORIZONTAL) || + (hasPanX && direction & DIRECTION_VERTICAL)) { + return this.preventSrc(srcEvent); + } + }, + + /** + * call preventDefault to prevent the browser's default behavior (scrolling in most cases) + * @param {Object} srcEvent + */ + preventSrc: function(srcEvent) { + this.manager.session.prevented = true; + srcEvent.preventDefault(); + } +}; -function isSupportedSeverity(level) { - return _enums__WEBPACK_IMPORTED_MODULE_1__["SeverityLevels"].indexOf(level) !== -1; -} /** - * Converts a string-based level into a {@link Severity}. - * - * @param level string representation of Severity - * @returns Severity + * when the touchActions are collected they are not a valid value, so we need to clean things up. * + * @param {String} actions + * @returns {*} */ -function severityFromString(level) { - if (level === 'warn') - return _sentry_types__WEBPACK_IMPORTED_MODULE_0__["Severity"].Warning; - if (isSupportedSeverity(level)) { - return level; +function cleanTouchActions(actions) { + // none + if (inStr(actions, TOUCH_ACTION_NONE)) { + return TOUCH_ACTION_NONE; } - return _sentry_types__WEBPACK_IMPORTED_MODULE_0__["Severity"].Log; + + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); + + // if both pan-x and pan-y are set (different recognizers + // for different directions, e.g. horizontal pan but vertical swipe?) + // we need none (as otherwise with pan-x pan-y combined none of these + // recognizers will work, since the browser would handle all panning + if (hasPanX && hasPanY) { + return TOUCH_ACTION_NONE; + } + + // pan-x OR pan-y + if (hasPanX || hasPanY) { + return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y; + } + + // manipulation + if (inStr(actions, TOUCH_ACTION_MANIPULATION)) { + return TOUCH_ACTION_MANIPULATION; + } + + return TOUCH_ACTION_AUTO; } -//# sourceMappingURL=severity.js.map -/***/ }), +function getTouchActionProps() { + if (!NATIVE_TOUCH_ACTION) { + return false; + } + var touchMap = {}; + var cssSupports = window.CSS && window.CSS.supports; + ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) { -/***/ "yEp2": -/***/ (function(module, __webpack_exports__, __webpack_require__) { + // If css.supports is not supported but there is native touch-action assume it supports + // all values. This is the case for IE 10 and 11. + touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true; + }); + return touchMap; +} + +/** + * Recognizer flow explained; * + * All recognizers have the initial state of POSSIBLE when a input session starts. + * The definition of a input session is from the first input until the last input, with all it's movement in it. * + * Example session for mouse-input: mousedown -> mousemove -> mouseup + * + * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed + * which determines with state it should be. + * + * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to + * POSSIBLE to give it another change on the next cycle. + * + * Possible + * | + * +-----+---------------+ + * | | + * +-----+-----+ | + * | | | + * Failed Cancelled | + * +-------+------+ + * | | + * Recognized Began + * | + * Changed + * | + * Ended/Recognized + */ +var STATE_POSSIBLE = 1; +var STATE_BEGAN = 2; +var STATE_CHANGED = 4; +var STATE_ENDED = 8; +var STATE_RECOGNIZED = STATE_ENDED; +var STATE_CANCELLED = 16; +var STATE_FAILED = 32; + +/** + * Recognizer + * Every recognizer needs to extend from this class. + * @constructor + * @param {Object} options + */ +function Recognizer(options) { + this.options = assign({}, this.defaults, options || {}); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "basis", function() { return basis; }); -function basis(t1, v0, v1, v2, v3) { - var t2 = t1 * t1, t3 = t2 * t1; - return ((1 - 3 * t1 + 3 * t2 - t3) * v0 - + (4 - 6 * t2 + 3 * t3) * v1 - + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 - + t3 * v3) / 6; + this.id = uniqueId(); + + this.manager = null; + + // default is enable true + this.options.enable = ifUndefined(this.options.enable, true); + + this.state = STATE_POSSIBLE; + + this.simultaneous = {}; + this.requireFail = []; } -/* harmony default export */ __webpack_exports__["default"] = (function(values) { - var n = values.length - 1; - return function(t) { - var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), - v1 = values[i], - v2 = values[i + 1], - v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, - v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; - return basis((t - i / n) * n, v0, v1, v2, v3); - }; -}); +Recognizer.prototype = { + /** + * @virtual + * @type {Object} + */ + defaults: {}, + /** + * set options + * @param {Object} options + * @return {Recognizer} + */ + set: function(options) { + assign(this.options, options); -/***/ }), + // also update the touchAction, in case something changed about the directions/enabled state + this.manager && this.manager.touchAction.update(); + return this; + }, -/***/ "yFc8": -/***/ (function(module, exports, __webpack_require__) { + /** + * recognize simultaneous with an other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + recognizeWith: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) { + return this; + } -"use strict"; + var simultaneous = this.simultaneous; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + if (!simultaneous[otherRecognizer.id]) { + simultaneous[otherRecognizer.id] = otherRecognizer; + otherRecognizer.recognizeWith(this); + } + return this; + }, + /** + * drop the simultaneous link. it doesnt remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + dropRecognizeWith: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) { + return this; + } -var _interopRequireDefault = __webpack_require__("TqRt"); + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + delete this.simultaneous[otherRecognizer.id]; + return this; + }, -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.useCozyTheme = exports.default = exports.CozyThemeContext = void 0; + /** + * recognizer can only run when an other is failing + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + requireFailure: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) { + return this; + } -var _react = _interopRequireWildcard(__webpack_require__("q1tI")); + var requireFail = this.requireFail; + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + if (inArray(requireFail, otherRecognizer) === -1) { + requireFail.push(otherRecognizer); + otherRecognizer.requireFailure(this); + } + return this; + }, -var _classnames = _interopRequireDefault(__webpack_require__("TSYQ")); + /** + * drop the requireFailure link. it does not remove the link on the other recognizer. + * @param {Recognizer} otherRecognizer + * @returns {Recognizer} this + */ + dropRequireFailure: function(otherRecognizer) { + if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) { + return this; + } -var _MuiCozyTheme = _interopRequireDefault(__webpack_require__("xIbs")); + otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this); + var index = inArray(this.requireFail, otherRecognizer); + if (index > -1) { + this.requireFail.splice(index, 1); + } + return this; + }, -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + /** + * has require failures boolean + * @returns {boolean} + */ + hasRequireFailures: function() { + return this.requireFail.length > 0; + }, -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + /** + * if the recognizer can recognize simultaneous with an other recognizer + * @param {Recognizer} otherRecognizer + * @returns {Boolean} + */ + canRecognizeWith: function(otherRecognizer) { + return !!this.simultaneous[otherRecognizer.id]; + }, -var themesStyles = { - "CozyTheme--inverted": "palette__CozyTheme--inverted___UL0fq", - "CozyTheme--normal": "palette__CozyTheme--normal___3UmMb" -}; -var CozyThemeContext = /*#__PURE__*/(0, _react.createContext)(); -exports.CozyThemeContext = CozyThemeContext; -var allStyles = { - 'CozyTheme--normal': themesStyles['CozyTheme--normal'], - 'CozyTheme--inverted': themesStyles['CozyTheme--inverted'] -}; + /** + * You should use `tryEmit` instead of `emit` directly to check + * that all the needed recognizers has failed before emitting. + * @param {Object} input + */ + emit: function(input) { + var self = this; + var state = this.state; -var CozyTheme = function CozyTheme(_ref) { - var variant = _ref.variant, - children = _ref.children, - className = _ref.className; - return /*#__PURE__*/_react.default.createElement(CozyThemeContext.Provider, { - value: variant - }, /*#__PURE__*/_react.default.createElement(_MuiCozyTheme.default, { - variant: variant - }, /*#__PURE__*/_react.default.createElement("div", { - className: (0, _classnames.default)(className, allStyles["CozyTheme--".concat(variant)]) - }, children))); -}; + function emit(event) { + self.manager.emit(event, input); + } -var useCozyTheme = function useCozyTheme() { - return (0, _react.useContext)(CozyThemeContext); -}; + // 'panstart' and 'panmove' + if (state < STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } -exports.useCozyTheme = useCozyTheme; -var _default = CozyTheme; -exports.default = _default; + emit(self.options.event); // simple 'eventName' events -/***/ }), + if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...) + emit(input.additionalEvent); + } -/***/ "yGTc": -/***/ (function(module, exports) { + // panend and pancancel + if (state >= STATE_ENDED) { + emit(self.options.event + stateStr(state)); + } + }, -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; -} + /** + * Check that all the require failure recognizers has failed, + * if true, it emits a gesture event, + * otherwise, setup the state to FAILED. + * @param {Object} input + */ + tryEmit: function(input) { + if (this.canEmit()) { + return this.emit(input); + } + // it's failing anyway + this.state = STATE_FAILED; + }, -module.exports = _interopRequireDefault; + /** + * can we emit? + * @returns {boolean} + */ + canEmit: function() { + var i = 0; + while (i < this.requireFail.length) { + if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) { + return false; + } + i++; + } + return true; + }, -/***/ }), + /** + * update the recognizer + * @param {Object} inputData + */ + recognize: function(inputData) { + // make a new copy of the inputData + // so we can change the inputData without messing up the other recognizers + var inputDataClone = assign({}, inputData); -/***/ "yGk4": -/***/ (function(module, exports, __webpack_require__) { + // is is enabled and allow recognizing? + if (!boolOrFn(this.options.enable, [this, inputDataClone])) { + this.reset(); + this.state = STATE_FAILED; + return; + } -var getNative = __webpack_require__("Cwc5"), - root = __webpack_require__("Kz5y"); + // reset when we've reached the end + if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) { + this.state = STATE_POSSIBLE; + } -/* Built-in method references that are verified to be native. */ -var Set = getNative(root, 'Set'); + this.state = this.process(inputDataClone); -module.exports = Set; + // the recognizer has recognized a gesture + // so trigger an event + if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) { + this.tryEmit(inputDataClone); + } + }, + /** + * return the state of the recognizer + * the actual recognizing happens in this method + * @virtual + * @param {Object} inputData + * @returns {Const} STATE + */ + process: function(inputData) { }, // jshint ignore:line -/***/ }), + /** + * return the preferred touch-action + * @virtual + * @returns {Array} + */ + getTouchAction: function() { }, -/***/ "yHON": -/***/ (function(module, exports, __webpack_require__) { + /** + * called when the gesture isn't allowed to recognize + * like when another is being recognized or it is disabled + * @virtual + */ + reset: function() { } +}; -var parse = __webpack_require__("yNUO") +/** + * get a usable string, used as event postfix + * @param {Const} state + * @returns {String} state + */ +function stateStr(state) { + if (state & STATE_CANCELLED) { + return 'cancel'; + } else if (state & STATE_ENDED) { + return 'end'; + } else if (state & STATE_CHANGED) { + return 'move'; + } else if (state & STATE_BEGAN) { + return 'start'; + } + return ''; +} /** - * @category Common Helpers - * @summary Compare the two dates reverse chronologically and return -1, 0 or 1. - * - * @description - * Compare the two dates and return -1 if the first date is after the second, - * 1 if the first date is before the second or 0 if dates are equal. - * - * @param {Date|String|Number} dateLeft - the first date to compare - * @param {Date|String|Number} dateRight - the second date to compare - * @returns {Number} the result of the comparison - * - * @example - * // Compare 11 February 1987 and 10 July 1989 reverse chronologically: - * var result = compareDesc( - * new Date(1987, 1, 11), - * new Date(1989, 6, 10) - * ) - * //=> 1 - * - * @example - * // Sort the array of dates in reverse chronological order: - * var result = [ - * new Date(1995, 6, 2), - * new Date(1987, 1, 11), - * new Date(1989, 6, 10) - * ].sort(compareDesc) - * //=> [ - * // Sun Jul 02 1995 00:00:00, - * // Mon Jul 10 1989 00:00:00, - * // Wed Feb 11 1987 00:00:00 - * // ] + * direction cons to string + * @param {Const} direction + * @returns {String} */ -function compareDesc (dirtyDateLeft, dirtyDateRight) { - var dateLeft = parse(dirtyDateLeft) - var timeLeft = dateLeft.getTime() - var dateRight = parse(dirtyDateRight) - var timeRight = dateRight.getTime() +function directionStr(direction) { + if (direction == DIRECTION_DOWN) { + return 'down'; + } else if (direction == DIRECTION_UP) { + return 'up'; + } else if (direction == DIRECTION_LEFT) { + return 'left'; + } else if (direction == DIRECTION_RIGHT) { + return 'right'; + } + return ''; +} - if (timeLeft > timeRight) { - return -1 - } else if (timeLeft < timeRight) { - return 1 - } else { - return 0 - } +/** + * get a recognizer by name if it is bound to a manager + * @param {Recognizer|String} otherRecognizer + * @param {Recognizer} recognizer + * @returns {Recognizer} + */ +function getRecognizerByNameIfManager(otherRecognizer, recognizer) { + var manager = recognizer.manager; + if (manager) { + return manager.get(otherRecognizer); + } + return otherRecognizer; } -module.exports = compareDesc +/** + * This recognizer is just used as a base for the simple attribute recognizers. + * @constructor + * @extends Recognizer + */ +function AttrRecognizer() { + Recognizer.apply(this, arguments); +} +inherit(AttrRecognizer, Recognizer, { + /** + * @namespace + * @memberof AttrRecognizer + */ + defaults: { + /** + * @type {Number} + * @default 1 + */ + pointers: 1 + }, -/***/ }), + /** + * Used to check if it the recognizer receives valid input, like input.distance > 10. + * @memberof AttrRecognizer + * @param {Object} input + * @returns {Boolean} recognized + */ + attrTest: function(input) { + var optionPointers = this.options.pointers; + return optionPointers === 0 || input.pointers.length === optionPointers; + }, -/***/ "yHx3": -/***/ (function(module, exports) { + /** + * Process the input and return the state for the recognizer + * @memberof AttrRecognizer + * @param {Object} input + * @returns {*} State + */ + process: function(input) { + var state = this.state; + var eventType = input.eventType; -/** Used for built-in method references. */ -var objectProto = Object.prototype; + var isRecognized = state & (STATE_BEGAN | STATE_CHANGED); + var isValid = this.attrTest(input); -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + // on cancel input and we've recognized before, return STATE_CANCELLED + if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) { + return state | STATE_CANCELLED; + } else if (isRecognized || isValid) { + if (eventType & INPUT_END) { + return state | STATE_ENDED; + } else if (!(state & STATE_BEGAN)) { + return STATE_BEGAN; + } + return state | STATE_CHANGED; + } + return STATE_FAILED; + } +}); /** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. + * Pan + * Recognized when the pointer is down and moved in the allowed direction. + * @constructor + * @extends AttrRecognizer */ -function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); +function PanRecognizer() { + AttrRecognizer.apply(this, arguments); - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; + this.pX = null; + this.pY = null; } -module.exports = initCloneArray; +inherit(PanRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof PanRecognizer + */ + defaults: { + event: 'pan', + threshold: 10, + pointers: 1, + direction: DIRECTION_ALL + }, + getTouchAction: function() { + var direction = this.options.direction; + var actions = []; + if (direction & DIRECTION_HORIZONTAL) { + actions.push(TOUCH_ACTION_PAN_Y); + } + if (direction & DIRECTION_VERTICAL) { + actions.push(TOUCH_ACTION_PAN_X); + } + return actions; + }, -/***/ }), + directionTest: function(input) { + var options = this.options; + var hasMoved = true; + var distance = input.distance; + var direction = input.direction; + var x = input.deltaX; + var y = input.deltaY; -/***/ "yJHZ": -/***/ (function(module, __webpack_exports__, __webpack_require__) { + // lock to axis? + if (!(direction & options.direction)) { + if (options.direction & DIRECTION_HORIZONTAL) { + direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT; + hasMoved = x != this.pX; + distance = Math.abs(input.deltaX); + } else { + direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN; + hasMoved = y != this.pY; + distance = Math.abs(input.deltaY); + } + } + input.direction = direction; + return hasMoved && distance > options.threshold && direction & options.direction; + }, -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); -/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("wx14"); -/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Ff2n"); -/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("KQm4"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("q1tI"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("17x9"); -/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("iuhU"); -/* harmony import */ var _utils_debounce__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("/Cew"); -/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("KgOg"); -/* harmony import */ var _utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("2hVh"); + attrTest: function(input) { + return AttrRecognizer.prototype.attrTest.call(this, input) && + (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input))); + }, + emit: function(input) { + this.pX = input.deltaX; + this.pY = input.deltaY; + var direction = directionStr(input.direction); + if (direction) { + input.additionalEvent = this.options.event + direction; + } + this._super.emit.call(this, input); + } +}); +/** + * Pinch + * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out). + * @constructor + * @extends AttrRecognizer + */ +function PinchRecognizer() { + AttrRecognizer.apply(this, arguments); +} +inherit(PinchRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof PinchRecognizer + */ + defaults: { + event: 'pinch', + threshold: 0, + pointers: 2 + }, + getTouchAction: function() { + return [TOUCH_ACTION_NONE]; + }, + attrTest: function(input) { + return this._super.attrTest.call(this, input) && + (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN); + }, -var styles = { - /* Styles applied to the root element. */ - root: { - boxSizing: 'border-box', - flexShrink: 0 - }, + emit: function(input) { + if (input.scale !== 1) { + var inOut = input.scale < 1 ? 'in' : 'out'; + input.additionalEvent = this.options.event + inOut; + } + this._super.emit.call(this, input); + } +}); - /* Styles applied to the `div` element that wraps the children. */ - tile: { - position: 'relative', - display: 'block', - // In case it's not rendered with a div. - height: '100%', - overflow: 'hidden' - }, +/** + * Press + * Recognized when the pointer is down for x ms without any movement. + * @constructor + * @extends Recognizer + */ +function PressRecognizer() { + Recognizer.apply(this, arguments); - /* Styles applied to an `img` element child, if needed to ensure it covers the tile. */ - imgFullHeight: { - height: '100%', - transform: 'translateX(-50%)', - position: 'relative', - left: '50%' - }, + this._timer = null; + this._input = null; +} - /* Styles applied to an `img` element child, if needed to ensure it covers the tile. */ - imgFullWidth: { - width: '100%', - position: 'relative', - transform: 'translateY(-50%)', - top: '50%' - } -}; +inherit(PressRecognizer, Recognizer, { + /** + * @namespace + * @memberof PressRecognizer + */ + defaults: { + event: 'press', + pointers: 1, + time: 251, // minimal time of the pointer to be pressed + threshold: 9 // a minimal movement is ok, but keep it low + }, -var fit = function fit(imgEl, classes) { - if (!imgEl || !imgEl.complete) { - return; - } + getTouchAction: function() { + return [TOUCH_ACTION_AUTO]; + }, - if (imgEl.width / imgEl.height > imgEl.parentElement.offsetWidth / imgEl.parentElement.offsetHeight) { - var _imgEl$classList, _imgEl$classList2; + process: function(input) { + var options = this.options; + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTime = input.deltaTime > options.time; - (_imgEl$classList = imgEl.classList).remove.apply(_imgEl$classList, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.imgFullWidth.split(' '))); + this._input = input; - (_imgEl$classList2 = imgEl.classList).add.apply(_imgEl$classList2, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.imgFullHeight.split(' '))); - } else { - var _imgEl$classList3, _imgEl$classList4; + // we only allow little movement + // and we've reached an end event, so a tap is possible + if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) { + this.reset(); + } else if (input.eventType & INPUT_START) { + this.reset(); + this._timer = setTimeoutContext(function() { + this.state = STATE_RECOGNIZED; + this.tryEmit(); + }, options.time, this); + } else if (input.eventType & INPUT_END) { + return STATE_RECOGNIZED; + } + return STATE_FAILED; + }, - (_imgEl$classList3 = imgEl.classList).remove.apply(_imgEl$classList3, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.imgFullHeight.split(' '))); + reset: function() { + clearTimeout(this._timer); + }, - (_imgEl$classList4 = imgEl.classList).add.apply(_imgEl$classList4, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__["default"])(classes.imgFullWidth.split(' '))); - } -}; + emit: function(input) { + if (this.state !== STATE_RECOGNIZED) { + return; + } -function ensureImageCover(imgEl, classes) { - if (!imgEl) { - return; - } + if (input && (input.eventType & INPUT_END)) { + this.manager.emit(this.options.event + 'up', input); + } else { + this._input.timeStamp = now(); + this.manager.emit(this.options.event, this._input); + } + } +}); - if (imgEl.complete) { - fit(imgEl, classes); - } else { - imgEl.addEventListener('load', function () { - fit(imgEl, classes); - }); - } +/** + * Rotate + * Recognized when two or more pointer are moving in a circular motion. + * @constructor + * @extends AttrRecognizer + */ +function RotateRecognizer() { + AttrRecognizer.apply(this, arguments); } -var warnedOnce = false; +inherit(RotateRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof RotateRecognizer + */ + defaults: { + event: 'rotate', + threshold: 0, + pointers: 2 + }, + + getTouchAction: function() { + return [TOUCH_ACTION_NONE]; + }, + + attrTest: function(input) { + return this._super.attrTest.call(this, input) && + (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN); + } +}); + /** - * ⚠️ The GridList component was renamed to ImageList to align with the current Material Design naming. - * - * You should use `import { ImageListItem } from '@material-ui/core'` - * or `import ImageListItem from '@material-ui/core/ImageListItem'`. + * Swipe + * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction. + * @constructor + * @extends AttrRecognizer */ +function SwipeRecognizer() { + AttrRecognizer.apply(this, arguments); +} -var GridListTile = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function GridListTile(props, ref) { - if (false) {} // cols rows default values are for docs only +inherit(SwipeRecognizer, AttrRecognizer, { + /** + * @namespace + * @memberof SwipeRecognizer + */ + defaults: { + event: 'swipe', + threshold: 10, + velocity: 0.3, + direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL, + pointers: 1 + }, + getTouchAction: function() { + return PanRecognizer.prototype.getTouchAction.call(this); + }, - var children = props.children, - classes = props.classes, - className = props.className, - _props$cols = props.cols, - cols = _props$cols === void 0 ? 1 : _props$cols, - _props$component = props.component, - Component = _props$component === void 0 ? 'li' : _props$component, - _props$rows = props.rows, - rows = _props$rows === void 0 ? 1 : _props$rows, - other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(props, ["children", "classes", "className", "cols", "component", "rows"]); + attrTest: function(input) { + var direction = this.options.direction; + var velocity; - var imgRef = react__WEBPACK_IMPORTED_MODULE_3__["useRef"](null); - react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { - ensureImageCover(imgRef.current, classes); - }); - react__WEBPACK_IMPORTED_MODULE_3__["useEffect"](function () { - var handleResize = Object(_utils_debounce__WEBPACK_IMPORTED_MODULE_6__["default"])(function () { - fit(imgRef.current, classes); - }); - window.addEventListener('resize', handleResize); - return function () { - handleResize.clear(); - window.removeEventListener('resize', handleResize); - }; - }, [classes]); - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ - className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__["default"])(classes.root, className), - ref: ref - }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", { - className: classes.tile - }, react__WEBPACK_IMPORTED_MODULE_3__["Children"].map(children, function (child) { - if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["isValidElement"](child)) { - return null; - } + if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) { + velocity = input.overallVelocity; + } else if (direction & DIRECTION_HORIZONTAL) { + velocity = input.overallVelocityX; + } else if (direction & DIRECTION_VERTICAL) { + velocity = input.overallVelocityY; + } - if (child.type === 'img' || Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__["default"])(child, ['Image'])) { - return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["cloneElement"](child, { - ref: imgRef - }); - } + return this._super.attrTest.call(this, input) && + direction & input.offsetDirection && + input.distance > this.options.threshold && + input.maxPointers == this.options.pointers && + abs(velocity) > this.options.velocity && input.eventType & INPUT_END; + }, - return child; - }))); + emit: function(input) { + var direction = directionStr(input.offsetDirection); + if (direction) { + this.manager.emit(this.options.event + direction, input); + } + + this.manager.emit(this.options.event, input); + } }); - false ? undefined : void 0; -/* harmony default export */ __webpack_exports__["default"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__["default"])(styles, { - name: 'MuiGridListTile' -})(GridListTile)); -/***/ }), +/** + * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur + * between the given interval and position. The delay option can be used to recognize multi-taps without firing + * a single tap. + * + * The eventData from the emitted event contains the property `tapCount`, which contains the amount of + * multi-taps being recognized. + * @constructor + * @extends Recognizer + */ +function TapRecognizer() { + Recognizer.apply(this, arguments); -/***/ "yKYv": -/***/ (function(module, __webpack_exports__, __webpack_require__) { + // previous time and center, + // used for tap counting + this.pTime = false; + this.pCenter = false; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("XVSz"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "common", function() { return _common__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + this._timer = null; + this._input = null; + this.count = 0; +} -/* harmony import */ var _red__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("dl/7"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "red", function() { return _red__WEBPACK_IMPORTED_MODULE_1__["default"]; }); +inherit(TapRecognizer, Recognizer, { + /** + * @namespace + * @memberof PinchRecognizer + */ + defaults: { + event: 'tap', + pointers: 1, + taps: 1, + interval: 300, // max time between the multi-tap taps + time: 250, // max time of the pointer to be down (like finger on the screen) + threshold: 9, // a minimal movement is ok, but keep it low + posThreshold: 10 // a multi-tap can be a bit off the initial position + }, -/* harmony import */ var _pink__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("nXt3"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pink", function() { return _pink__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + getTouchAction: function() { + return [TOUCH_ACTION_MANIPULATION]; + }, -/* harmony import */ var _purple__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("6T4/"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "purple", function() { return _purple__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + process: function(input) { + var options = this.options; -/* harmony import */ var _deepPurple__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("UuMD"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deepPurple", function() { return _deepPurple__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + var validPointers = input.pointers.length === options.pointers; + var validMovement = input.distance < options.threshold; + var validTouchTime = input.deltaTime < options.time; -/* harmony import */ var _indigo__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("rwtN"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "indigo", function() { return _indigo__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + this.reset(); -/* harmony import */ var _blue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("edxh"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blue", function() { return _blue__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + if ((input.eventType & INPUT_START) && (this.count === 0)) { + return this.failTimeout(); + } -/* harmony import */ var _lightBlue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("02N3"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lightBlue", function() { return _lightBlue__WEBPACK_IMPORTED_MODULE_7__["default"]; }); + // we only allow little movement + // and we've reached an end event, so a tap is possible + if (validMovement && validTouchTime && validPointers) { + if (input.eventType != INPUT_END) { + return this.failTimeout(); + } -/* harmony import */ var _cyan__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("ejDI"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cyan", function() { return _cyan__WEBPACK_IMPORTED_MODULE_8__["default"]; }); + var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true; + var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold; -/* harmony import */ var _teal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("YlDu"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "teal", function() { return _teal__WEBPACK_IMPORTED_MODULE_9__["default"]; }); + this.pTime = input.timeStamp; + this.pCenter = input.center; -/* harmony import */ var _green__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("6yBS"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "green", function() { return _green__WEBPACK_IMPORTED_MODULE_10__["default"]; }); + if (!validMultiTap || !validInterval) { + this.count = 1; + } else { + this.count += 1; + } -/* harmony import */ var _lightGreen__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("EQQ8"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lightGreen", function() { return _lightGreen__WEBPACK_IMPORTED_MODULE_11__["default"]; }); + this._input = input; -/* harmony import */ var _lime__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("+bwn"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lime", function() { return _lime__WEBPACK_IMPORTED_MODULE_12__["default"]; }); + // if tap count matches we have recognized it, + // else it has began recognizing... + var tapCount = this.count % options.taps; + if (tapCount === 0) { + // no failing requirements, immediately trigger the tap event + // or wait as long as the multitap interval to trigger + if (!this.hasRequireFailures()) { + return STATE_RECOGNIZED; + } else { + this._timer = setTimeoutContext(function() { + this.state = STATE_RECOGNIZED; + this.tryEmit(); + }, options.interval, this); + return STATE_BEGAN; + } + } + } + return STATE_FAILED; + }, -/* harmony import */ var _yellow__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("An1w"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "yellow", function() { return _yellow__WEBPACK_IMPORTED_MODULE_13__["default"]; }); + failTimeout: function() { + this._timer = setTimeoutContext(function() { + this.state = STATE_FAILED; + }, this.options.interval, this); + return STATE_FAILED; + }, -/* harmony import */ var _amber__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("Rp/f"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "amber", function() { return _amber__WEBPACK_IMPORTED_MODULE_14__["default"]; }); + reset: function() { + clearTimeout(this._timer); + }, -/* harmony import */ var _orange__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("Yb7a"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "orange", function() { return _orange__WEBPACK_IMPORTED_MODULE_15__["default"]; }); + emit: function() { + if (this.state == STATE_RECOGNIZED) { + this._input.tapCount = this.count; + this.manager.emit(this.options.event, this._input); + } + } +}); -/* harmony import */ var _deepOrange__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("6s8c"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deepOrange", function() { return _deepOrange__WEBPACK_IMPORTED_MODULE_16__["default"]; }); +/** + * Simple way to create a manager with a default set of recognizers. + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ +function Hammer(element, options) { + options = options || {}; + options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset); + return new Manager(element, options); +} -/* harmony import */ var _brown__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("11O8"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brown", function() { return _brown__WEBPACK_IMPORTED_MODULE_17__["default"]; }); +/** + * @const {string} + */ +Hammer.VERSION = '2.0.7'; -/* harmony import */ var _grey__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("LXXt"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "grey", function() { return _grey__WEBPACK_IMPORTED_MODULE_18__["default"]; }); +/** + * default settings + * @namespace + */ +Hammer.defaults = { + /** + * set if DOM events are being triggered. + * But this is slower and unused by simple implementations, so disabled by default. + * @type {Boolean} + * @default false + */ + domEvents: false, -/* harmony import */ var _blueGrey__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("tOKM"); -/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blueGrey", function() { return _blueGrey__WEBPACK_IMPORTED_MODULE_19__["default"]; }); + /** + * The value for the touchAction property/fallback. + * When set to `compute` it will magically set the correct value based on the added recognizers. + * @type {String} + * @default compute + */ + touchAction: TOUCH_ACTION_COMPUTE, + /** + * @type {Boolean} + * @default true + */ + enable: true, + /** + * EXPERIMENTAL FEATURE -- can be removed/changed + * Change the parent input target element. + * If Null, then it is being set the to main element. + * @type {Null|EventTarget} + * @default null + */ + inputTarget: null, + /** + * force an input class + * @type {Null|Function} + * @default null + */ + inputClass: null, + /** + * Default recognizer setup when calling `Hammer()` + * When creating a new Manager these will be skipped. + * @type {Array} + */ + preset: [ + // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...] + [RotateRecognizer, {enable: false}], + [PinchRecognizer, {enable: false}, ['rotate']], + [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}], + [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']], + [TapRecognizer], + [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']], + [PressRecognizer] + ], + /** + * Some CSS properties can be used to improve the working of Hammer. + * Add them to this method and they will be set when creating a new Manager. + * @namespace + */ + cssProps: { + /** + * Disables text selection to improve the dragging gesture. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userSelect: 'none', + /** + * Disable the Windows Phone grippers when pressing an element. + * @type {String} + * @default 'none' + */ + touchSelect: 'none', + /** + * Disables the default callout shown when you touch and hold a touch target. + * On iOS, when you touch and hold a touch target such as a link, Safari displays + * a callout containing information about the link. This property allows you to disable that callout. + * @type {String} + * @default 'none' + */ + touchCallout: 'none', + /** + * Specifies whether zooming is enabled. Used by IE10> + * @type {String} + * @default 'none' + */ + contentZooming: 'none', + /** + * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers. + * @type {String} + * @default 'none' + */ + userDrag: 'none', + /** + * Overrides the highlight color shown when the user taps a link or a JavaScript + * clickable element in iOS. This property obeys the alpha value, if specified. + * @type {String} + * @default 'rgba(0,0,0,0)' + */ + tapHighlightColor: 'rgba(0,0,0,0)' + } +}; +var STOP = 1; +var FORCED_STOP = 2; +/** + * Manager + * @param {HTMLElement} element + * @param {Object} [options] + * @constructor + */ +function Manager(element, options) { + this.options = assign({}, Hammer.defaults, options || {}); + this.options.inputTarget = this.options.inputTarget || element; + this.handlers = {}; + this.session = {}; + this.recognizers = []; + this.oldCssProps = {}; + this.element = element; + this.input = createInputInstance(this); + this.touchAction = new TouchAction(this, this.options.touchAction); + toggleCssProps(this, true); + each(this.options.recognizers, function(item) { + var recognizer = this.add(new (item[0])(item[1])); + item[2] && recognizer.recognizeWith(item[2]); + item[3] && recognizer.requireFailure(item[3]); + }, this); +} +Manager.prototype = { + /** + * set options + * @param {Object} options + * @returns {Manager} + */ + set: function(options) { + assign(this.options, options); + // Options that need a little more setup + if (options.touchAction) { + this.touchAction.update(); + } + if (options.inputTarget) { + // Clean up existing event listeners and reinitialize + this.input.destroy(); + this.input.target = options.inputTarget; + this.input.init(); + } + return this; + }, + /** + * stop recognizing for this session. + * This session will be discarded, when a new [input]start event is fired. + * When forced, the recognizer cycle is stopped immediately. + * @param {Boolean} [force] + */ + stop: function(force) { + this.session.stopped = force ? FORCED_STOP : STOP; + }, + /** + * run the recognizers! + * called by the inputHandler function on every movement of the pointers (touches) + * it walks through all the recognizers and tries to detect the gesture that is being made + * @param {Object} inputData + */ + recognize: function(inputData) { + var session = this.session; + if (session.stopped) { + return; + } -/***/ }), + // run the touch-action polyfill + this.touchAction.preventDefaults(inputData); -/***/ "yL5O": -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var recognizer; + var recognizers = this.recognizers; -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reactRouterV3Instrumentation", function() { return reactRouterV3Instrumentation; }); -/* harmony import */ var _sentry_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("WSEr"); + // this holds the recognizer that is being recognized. + // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED + // if no recognizer is detecting a thing, it is set to `null` + var curRecognizer = session.curRecognizer; + // reset when the last recognizer is recognized + // or when we're in a new session + if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) { + curRecognizer = session.curRecognizer = null; + } -// Many of the types below had to be mocked out to prevent typescript issues -// these types are required for correct functionality. + var i = 0; + while (i < recognizers.length) { + recognizer = recognizers[i]; -/** - * Creates routing instrumentation for React Router v3 - * Works for React Router >= 3.2.0 and < 4.0.0 - * - * @param history object from the `history` library - * @param routes a list of all routes, should be - * @param match `Router.match` utility - */ -function reactRouterV3Instrumentation( - history, - routes, - match, -) { - return ( - startTransaction, - startTransactionOnPageLoad = true, - startTransactionOnLocationChange = true, - ) => { - let activeTransaction; - let prevName; + // find out if we are allowed try to recognize the input for this one. + // 1. allow if the session is NOT forced stopped (see the .stop() method) + // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one + // that is being recognized. + // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer. + // this can be setup with the `recognizeWith()` method on the recognizer. + if (session.stopped !== FORCED_STOP && ( // 1 + !curRecognizer || recognizer == curRecognizer || // 2 + recognizer.canRecognizeWith(curRecognizer))) { // 3 + recognizer.recognize(inputData); + } else { + recognizer.reset(); + } - // Have to use window.location because history.location might not be defined. - if (startTransactionOnPageLoad && _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["WINDOW"] && _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].location) { - normalizeTransactionName( - routes, - _sentry_browser__WEBPACK_IMPORTED_MODULE_0__["WINDOW"].location , - match, - (localName, source = 'url') => { - prevName = localName; - activeTransaction = startTransaction({ - name: prevName, - op: 'pageload', - tags: { - 'routing.instrumentation': 'react-router-v3', - }, - metadata: { - source, - }, - }); - }, - ); - } + // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the + // current active recognizer. but only if we don't already have an active recognizer + if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) { + curRecognizer = session.curRecognizer = recognizer; + } + i++; + } + }, - if (startTransactionOnLocationChange && history.listen) { - history.listen(location => { - if (location.action === 'PUSH' || location.action === 'POP') { - if (activeTransaction) { - activeTransaction.finish(); - } - const tags = { - 'routing.instrumentation': 'react-router-v3', - }; - if (prevName) { - tags.from = prevName; - } - normalizeTransactionName(routes, location, match, (localName, source = 'url') => { - prevName = localName; - activeTransaction = startTransaction({ - name: prevName, - op: 'navigation', - tags, - metadata: { - source, - }, - }); - }); + /** + * get a recognizer by its event name. + * @param {Recognizer|String} recognizer + * @returns {Recognizer|Null} + */ + get: function(recognizer) { + if (recognizer instanceof Recognizer) { + return recognizer; } - }); - } - }; -} -/** - * Normalize transaction names using `Router.match` - */ -function normalizeTransactionName( - appRoutes, - location, - match, - callback, -) { - let name = location.pathname; - match( - { - location, - routes: appRoutes, + var recognizers = this.recognizers; + for (var i = 0; i < recognizers.length; i++) { + if (recognizers[i].options.event == recognizer) { + return recognizers[i]; + } + } + return null; }, - (error, _redirectLocation, renderProps) => { - if (error || !renderProps) { - return callback(name); - } - const routePath = getRouteStringFromRoutes(renderProps.routes || []); - if (routePath.length === 0 || routePath === '/*') { - return callback(name); - } + /** + * add a recognizer to the manager + * existing recognizers with the same event name will be removed + * @param {Recognizer} recognizer + * @returns {Recognizer|Manager} + */ + add: function(recognizer) { + if (invokeArrayArg(recognizer, 'add', this)) { + return this; + } - name = routePath; - return callback(name, 'route'); + // remove existing + var existing = this.get(recognizer.options.event); + if (existing) { + this.remove(existing); + } + + this.recognizers.push(recognizer); + recognizer.manager = this; + + this.touchAction.update(); + return recognizer; }, - ); -} -/** - * Generate route name from array of routes - */ -function getRouteStringFromRoutes(routes) { - if (!Array.isArray(routes) || routes.length === 0) { - return ''; - } + /** + * remove a recognizer by name or instance + * @param {Recognizer|String} recognizer + * @returns {Manager} + */ + remove: function(recognizer) { + if (invokeArrayArg(recognizer, 'remove', this)) { + return this; + } - const routesWithPaths = routes.filter((route) => !!route.path); + recognizer = this.get(recognizer); - let index = -1; - for (let x = routesWithPaths.length - 1; x >= 0; x--) { - const route = routesWithPaths[x]; - if (route.path && route.path.startsWith('/')) { - index = x; - break; + // let's make sure this recognizer exists + if (recognizer) { + var recognizers = this.recognizers; + var index = inArray(recognizers, recognizer); + + if (index !== -1) { + recognizers.splice(index, 1); + this.touchAction.update(); + } + } + + return this; + }, + + /** + * bind event + * @param {String} events + * @param {Function} handler + * @returns {EventEmitter} this + */ + on: function(events, handler) { + if (events === undefined) { + return; + } + if (handler === undefined) { + return; + } + + var handlers = this.handlers; + each(splitStr(events), function(event) { + handlers[event] = handlers[event] || []; + handlers[event].push(handler); + }); + return this; + }, + + /** + * unbind event, leave emit blank to remove all handlers + * @param {String} events + * @param {Function} [handler] + * @returns {EventEmitter} this + */ + off: function(events, handler) { + if (events === undefined) { + return; + } + + var handlers = this.handlers; + each(splitStr(events), function(event) { + if (!handler) { + delete handlers[event]; + } else { + handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1); + } + }); + return this; + }, + + /** + * emit event to the listeners + * @param {String} event + * @param {Object} data + */ + emit: function(event, data) { + // we also want to trigger dom events + if (this.options.domEvents) { + triggerDomEvent(event, data); + } + + // no handlers, so skip it all + var handlers = this.handlers[event] && this.handlers[event].slice(); + if (!handlers || !handlers.length) { + return; + } + + data.type = event; + data.preventDefault = function() { + data.srcEvent.preventDefault(); + }; + + var i = 0; + while (i < handlers.length) { + handlers[i](data); + i++; + } + }, + + /** + * destroy the manager and unbinds all events + * it doesn't unbind dom events, that is the user own responsibility + */ + destroy: function() { + this.element && toggleCssProps(this, false); + + this.handlers = {}; + this.session = {}; + this.input.destroy(); + this.element = null; } - } +}; - return routesWithPaths - .slice(index) - .filter(({ path }) => !!path) - .map(({ path }) => path) - .join(''); -} +/** + * add/remove the css properties as defined in manager.options.cssProps + * @param {Manager} manager + * @param {Boolean} add + */ +function toggleCssProps(manager, add) { + var element = manager.element; + if (!element.style) { + return; + } + var prop; + each(manager.options.cssProps, function(value, name) { + prop = prefixed(element.style, name); + if (add) { + manager.oldCssProps[prop] = element.style[prop]; + element.style[prop] = value; + } else { + element.style[prop] = manager.oldCssProps[prop] || ''; + } + }); + if (!add) { + manager.oldCssProps = {}; + } +} + +/** + * trigger dom event + * @param {String} event + * @param {Object} data + */ +function triggerDomEvent(event, data) { + var gestureEvent = document.createEvent('Event'); + gestureEvent.initEvent(event, true, true); + gestureEvent.gesture = data; + data.target.dispatchEvent(gestureEvent); +} + +assign(Hammer, { + INPUT_START: INPUT_START, + INPUT_MOVE: INPUT_MOVE, + INPUT_END: INPUT_END, + INPUT_CANCEL: INPUT_CANCEL, + + STATE_POSSIBLE: STATE_POSSIBLE, + STATE_BEGAN: STATE_BEGAN, + STATE_CHANGED: STATE_CHANGED, + STATE_ENDED: STATE_ENDED, + STATE_RECOGNIZED: STATE_RECOGNIZED, + STATE_CANCELLED: STATE_CANCELLED, + STATE_FAILED: STATE_FAILED, + + DIRECTION_NONE: DIRECTION_NONE, + DIRECTION_LEFT: DIRECTION_LEFT, + DIRECTION_RIGHT: DIRECTION_RIGHT, + DIRECTION_UP: DIRECTION_UP, + DIRECTION_DOWN: DIRECTION_DOWN, + DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL, + DIRECTION_VERTICAL: DIRECTION_VERTICAL, + DIRECTION_ALL: DIRECTION_ALL, + + Manager: Manager, + Input: Input, + TouchAction: TouchAction, + + TouchInput: TouchInput, + MouseInput: MouseInput, + PointerEventInput: PointerEventInput, + TouchMouseInput: TouchMouseInput, + SingleTouchInput: SingleTouchInput, + + Recognizer: Recognizer, + AttrRecognizer: AttrRecognizer, + Tap: TapRecognizer, + Pan: PanRecognizer, + Swipe: SwipeRecognizer, + Pinch: PinchRecognizer, + Rotate: RotateRecognizer, + Press: PressRecognizer, + + on: addEventListeners, + off: removeEventListeners, + each: each, + merge: merge, + extend: extend, + assign: assign, + inherit: inherit, + bindFn: bindFn, + prefixed: prefixed +}); +// this prevents errors when Hammer is loaded in the presence of an AMD +// style loader but by script tag, not by the loader. +var freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line +freeGlobal.Hammer = Hammer; -//# sourceMappingURL=reactrouterv3.js.map +if (true) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { + return Hammer; + }).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +} else {} + +})(window, document, 'Hammer'); /***/ }), @@ -405456,6 +420768,150 @@ function isWednesday (dirtyDate) { module.exports = isWednesday +/***/ }), + +/***/ "yZDF": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return persistReducer; }); +/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("1iYv"); +/* harmony import */ var _stateReconciler_autoMergeLevel1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("jCC2"); +/* harmony import */ var _createPersistoid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("iw+L"); +/* harmony import */ var _getStoredState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("wD2s"); +/* harmony import */ var _purgeStoredState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("XgXo"); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + + + + + + + +var DEFAULT_TIMEOUT = 5000; +/* + @TODO add validation / handling for: + - persisting a reducer which has nested _persist + - handling actions that fire before reydrate is called +*/ +function persistReducer(config, baseReducer) { + if (false) {} + + var version = config.version !== undefined ? config.version : _constants__WEBPACK_IMPORTED_MODULE_0__["DEFAULT_VERSION"]; + var debug = config.debug || false; + var stateReconciler = config.stateReconciler === undefined ? _stateReconciler_autoMergeLevel1__WEBPACK_IMPORTED_MODULE_1__["default"] : config.stateReconciler; + var getStoredState = config.getStoredState || _getStoredState__WEBPACK_IMPORTED_MODULE_3__["default"]; + var timeout = config.timeout !== undefined ? config.timeout : DEFAULT_TIMEOUT; + var _persistoid = null; + var _purge = false; + var _paused = true; + var conditionalUpdate = function conditionalUpdate(state) { + // update the persistoid only if we are rehydrated and not paused + state._persist.rehydrated && _persistoid && !_paused && _persistoid.update(state); + return state; + }; + + return function (state, action) { + var _ref = state || {}, + _persist = _ref._persist, + rest = _objectWithoutProperties(_ref, ['_persist']); + + var restState = rest; + + if (action.type === _constants__WEBPACK_IMPORTED_MODULE_0__["PERSIST"]) { + var _sealed = false; + var _rehydrate = function _rehydrate(payload, err) { + // dev warning if we are already sealed + if (false) {} + + // only rehydrate if we are not already sealed + if (!_sealed) { + action.rehydrate(config.key, payload, err); + _sealed = true; + } + }; + timeout && setTimeout(function () { + !_sealed && _rehydrate(undefined, new Error('redux-persist: persist timed out for persist key "' + config.key + '"')); + }, timeout); + + // @NOTE PERSIST resumes if paused. + _paused = false; + + // @NOTE only ever create persistoid once, ensure we call it at least once, even if _persist has already been set + if (!_persistoid) _persistoid = Object(_createPersistoid__WEBPACK_IMPORTED_MODULE_2__["default"])(config); + + // @NOTE PERSIST can be called multiple times, noop after the first + if (_persist) return state; + if (typeof action.rehydrate !== 'function' || typeof action.register !== 'function') throw new Error('redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.'); + + action.register(config.key); + + getStoredState(config).then(function (restoredState) { + var migrate = config.migrate || function (s, v) { + return Promise.resolve(s); + }; + migrate(restoredState, version).then(function (migratedState) { + _rehydrate(migratedState); + }, function (migrateErr) { + if (false) {} + _rehydrate(undefined, migrateErr); + }); + }, function (err) { + _rehydrate(undefined, err); + }); + + return _extends({}, baseReducer(restState, action), { + _persist: { version: version, rehydrated: false } + }); + } else if (action.type === _constants__WEBPACK_IMPORTED_MODULE_0__["PURGE"]) { + _purge = true; + action.result(Object(_purgeStoredState__WEBPACK_IMPORTED_MODULE_4__["default"])(config)); + return _extends({}, baseReducer(restState, action), { + _persist: _persist + }); + } else if (action.type === _constants__WEBPACK_IMPORTED_MODULE_0__["FLUSH"]) { + action.result(_persistoid && _persistoid.flush()); + return _extends({}, baseReducer(restState, action), { + _persist: _persist + }); + } else if (action.type === _constants__WEBPACK_IMPORTED_MODULE_0__["PAUSE"]) { + _paused = true; + } else if (action.type === _constants__WEBPACK_IMPORTED_MODULE_0__["REHYDRATE"]) { + // noop on restState if purging + if (_purge) return _extends({}, restState, { + _persist: _extends({}, _persist, { rehydrated: true }) + + // @NOTE if key does not match, will continue to default else below + });if (action.key === config.key) { + var reducedState = baseReducer(restState, action); + var inboundState = action.payload; + // only reconcile state if stateReconciler and inboundState are both defined + var reconciledRest = stateReconciler !== false && inboundState !== undefined ? stateReconciler(inboundState, state, reducedState, config) : reducedState; + + var _newState = _extends({}, reconciledRest, { + _persist: _extends({}, _persist, { rehydrated: true }) + }); + return conditionalUpdate(_newState); + } + } + + // if we have not already handled PERSIST, straight passthrough + if (!_persist) return baseReducer(state, action); + + // run base reducer: + // is state modified ? return original : return updated + var newState = baseReducer(restState, action); + if (newState === restState) return state;else { + newState._persist = _persist; + return conditionalUpdate(newState); + } + }; +} + /***/ }), /***/ "yad4": @@ -405700,6 +421156,26 @@ var Typography = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__["forwardRef"](f name: 'MuiTypography' })(Typography)); +/***/ }), + +/***/ "ycmj": +/***/ (function(module, exports) { + +module.exports = function cmp (a, b) { + var pa = a.split('.'); + var pb = b.split('.'); + for (var i = 0; i < 3; i++) { + var na = Number(pa[i]); + var nb = Number(pb[i]); + if (na > nb) return 1; + if (nb > na) return -1; + if (!isNaN(na) && isNaN(nb)) return 1; + if (isNaN(na) && !isNaN(nb)) return -1; + } + return 0; +}; + + /***/ }), /***/ "ycre": @@ -409200,6 +424676,105 @@ treeProto.x = _x_js__WEBPACK_IMPORTED_MODULE_10__["default"]; treeProto.y = _y_js__WEBPACK_IMPORTED_MODULE_11__["default"]; +/***/ }), + +/***/ "z8F8": +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefaultStackURL", function() { return getDefaultStackURL; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefaultToken", function() { return getDefaultToken; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefaultIcon", function() { return getDefaultIcon; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAppNamePrefix", function() { return getAppNamePrefix; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAppSlug", function() { return getAppSlug; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUserActionRequired", function() { return getUserActionRequired; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_SELECTOR", function() { return APP_SELECTOR; }); +var APP_SELECTOR = '[role=application]'; // return an empty object by default to avoid checking existance + +var getAppNodeDataSet = function getAppNodeDataSet() { + var appNode = document.querySelector(APP_SELECTOR); + if (!appNode || !appNode.dataset) return {}; + return appNode.dataset; +}; + +var getDefaultStackURL = function getDefaultStackURL(isPublic) { + var data = getAppNodeDataSet(); + + if (!data.cozyDomain) { + if (!isPublic) { + // eslint-disable-next-line no-console + console.warn("Cozy-bar can't discover the cozy's URL, and will probably fail to initialize the connection with the stack."); + } + + return ''; + } + + var protocol = window.location.protocol; + return "".concat(protocol, "//").concat(data.cozyDomain); +}; + +var getDefaultToken = function getDefaultToken(isPublic) { + var data = getAppNodeDataSet(); + + if (!data.cozyToken) { + if (!isPublic) { + // eslint-disable-next-line no-console + console.warn("Cozy-bar can't discover the app's token, and will probably fail to initialize the connection with the stack."); + } + + return ''; + } + + return data.cozyToken; +}; + +var getDefaultIcon = function getDefaultIcon() { + var linkNode = document.querySelector('link[rel="icon"][sizes^="32"]'); + + if (linkNode !== null) { + return linkNode.getAttribute('href'); + } else { + return 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; + } +}; + +var getAppNamePrefix = function getAppNamePrefix() { + var data = getAppNodeDataSet(); + return data.cozyAppNamePrefix || null; +}; + +var getAppSlug = function getAppSlug() { + var data = getAppNodeDataSet(); + return data.cozyAppSlug || null; +}; + +var getUserActionRequired = function getUserActionRequired() { + var meta = document.querySelector('meta[name=user-action-required]'); + var data = meta && meta.dataset; + + if (data) { + var title = data.title, + code = data.code, + detail = data.detail, + links = data.links; + + if (code) { + // we suppose that at least code will always exist + return { + title: title, + code: code, + detail: detail, + links: links + }; + } + } + + return undefined; +}; + + + /***/ }), /***/ "z8qe": @@ -409747,6 +425322,55 @@ __webpack_require__.r(__webpack_exports__); +/***/ }), + +/***/ "zNxr": +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +exports.default = getStorage; + + +function noop() {} + +var noopStorage = { + getItem: noop, + setItem: noop, + removeItem: noop +}; + +function hasStorage(storageType) { + if ((typeof self === 'undefined' ? 'undefined' : _typeof(self)) !== 'object' || !(storageType in self)) { + return false; + } + + try { + var storage = self[storageType]; + var testKey = 'redux-persist ' + storageType + ' test'; + storage.setItem(testKey, 'test'); + storage.getItem(testKey); + storage.removeItem(testKey); + } catch (e) { + if (false) {} + return false; + } + return true; +} + +function getStorage(type) { + var storageType = type + 'Storage'; + if (hasStorage(storageType)) return self[storageType];else { + if (false) {} + return noopStorage; + } +} + /***/ }), /***/ "zRwo":