@k8slens/extensions 5.3.0-git.5998b4ca84.0 → 5.3.0-git.62526c2192.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/common/catalog/catalog-entity.d.ts +4 -1
- package/dist/src/common/cluster-store.d.ts +0 -1
- package/dist/src/common/hotbar-store.d.ts +5 -0
- package/dist/src/common/k8s-api/endpoints/nodes.api.d.ts +16 -32
- package/dist/src/common/k8s-api/endpoints/secret.api.d.ts +5 -6
- package/dist/src/common/k8s-api/json-api.d.ts +2 -0
- package/dist/src/common/k8s-api/kube-api.d.ts +1 -1
- package/dist/src/common/routes/port-forwards.d.ts +1 -0
- package/dist/src/common/user-store/preferences-helpers.d.ts +8 -0
- package/dist/src/common/utils/array.d.ts +30 -0
- package/dist/src/common/utils/index.d.ts +2 -1
- package/dist/src/common/utils/iter.d.ts +23 -9
- package/dist/src/common/utils/sort-compare.d.ts +50 -0
- package/dist/src/extensions/extension-api.js +84 -36
- package/dist/src/main/helm/helm-chart-manager.d.ts +1 -0
- package/dist/src/main/kubectl.d.ts +1 -1
- package/dist/src/renderer/components/+catalog/catalog-entity-details.d.ts +0 -1
- package/dist/src/renderer/components/+catalog/catalog-entity-drawer-menu.d.ts +0 -1
- package/dist/src/renderer/components/+catalog/catalog.d.ts +2 -0
- package/dist/src/renderer/components/+catalog/hotbar-toggle-menu-item.d.ts +27 -0
- package/dist/src/renderer/components/+config-secrets/__tests__/secret-details.test.d.ts +21 -0
- package/dist/src/renderer/components/+config-secrets/secret-details.d.ts +4 -3
- package/dist/src/renderer/components/+network-port-forwards/port-forward-details.d.ts +33 -0
- package/dist/src/renderer/components/+network-port-forwards/port-forwards.d.ts +10 -1
- package/dist/src/renderer/components/+workloads-pods/pod-details-list.d.ts +0 -3
- package/dist/src/renderer/components/hotbar/hotbar-entity-icon.d.ts +0 -2
- package/dist/src/renderer/components/layout/sidebar.d.ts +3 -1
- package/dist/src/renderer/components/switch/switcher.d.ts +1 -1
- package/dist/src/renderer/components/table/__tests__/getSorted.test.d.ts +21 -0
- package/dist/src/renderer/components/table/sorting.d.ts +22 -0
- package/dist/src/renderer/components/table/table.d.ts +20 -3
- package/dist/src/renderer/components/virtual-list/virtual-list.d.ts +6 -0
- package/dist/src/renderer/port-forward/port-forward-dialog.d.ts +0 -1
- package/dist/src/renderer/port-forward/port-forward-item.d.ts +1 -0
- package/dist/src/renderer/port-forward/port-forward.store.d.ts +1 -0
- package/dist/src/renderer/utils/__tests__/converted-name.test.d.ts +21 -0
- package/dist/src/renderer/utils/index.d.ts +9 -10
- package/dist/src/renderer/utils/name-parts.d.ts +27 -0
- package/package.json +1 -1
|
@@ -293,7 +293,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
293
293
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
294
294
|
|
|
295
295
|
"use strict";
|
|
296
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _iterableToArrayLimit; });\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr
|
|
296
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _iterableToArrayLimit; });\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js?");
|
|
297
297
|
|
|
298
298
|
/***/ }),
|
|
299
299
|
|
|
@@ -353,7 +353,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
353
353
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
354
354
|
|
|
355
355
|
"use strict";
|
|
356
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _possibleConstructorReturn; });\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized.js */ \"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\");\n\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return Object(_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(self);\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js?");
|
|
356
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _possibleConstructorReturn; });\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized.js */ \"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\");\n\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return Object(_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(self);\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js?");
|
|
357
357
|
|
|
358
358
|
/***/ }),
|
|
359
359
|
|
|
@@ -469,7 +469,7 @@ eval("function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" &
|
|
|
469
469
|
/*! no static exports found */
|
|
470
470
|
/***/ (function(module, exports) {
|
|
471
471
|
|
|
472
|
-
eval("function _iterableToArrayLimit(arr, i) {\n var _i = arr
|
|
472
|
+
eval("function _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js?");
|
|
473
473
|
|
|
474
474
|
/***/ }),
|
|
475
475
|
|
|
@@ -15820,7 +15820,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
15820
15820
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
15821
15821
|
|
|
15822
15822
|
"use strict";
|
|
15823
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.i, \"/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n.Drawer {\\n --size: 50%;\\n --full-size: 75%;\\n --spacing: 24px;\\n --icon-focus-color: white;\\n position: absolute;\\n background: var(--contentColor);\\n box-shadow: 0 0 16px var(--boxShadow);\\n z-index: 100;\\n}\\n.Drawer.left {\\n left: 0;\\n}\\n.Drawer.right {\\n right: 0;\\n}\\n.Drawer.top {\\n top: 0;\\n}\\n.Drawer.bottom {\\n bottom: 0;\\n}\\n.Drawer.left, .Drawer.right {\\n top: 0;\\n width: var(--size);\\n height: 100%;\\n}\\n.Drawer.top, .Drawer.bottom {\\n left: 0;\\n width: 100%;\\n height: var(--size);\\n}\\n.Drawer .drawer-wrapper {\\n height: 100%;\\n min-height: 100%;\\n}\\n.Drawer .drawer-title {\\n background: var(--blue);\\n color: var(--drawerTitleText);\\n padding: 8px 20px;\\n word-break: break-all;\\n position: relative;\\n min-height: 54px;\\n}\\n.Drawer .drawer-title .drawer-title-text {\\n font-weight: bold;\\n flex-grow: 2;\\n padding-right: 8px;\\n}\\n.Drawer .drawer-title .drawer-title-text .Icon {\\n opacity: 0;\\n font-weight: normal;\\n margin-left: 8px;\\n}\\n.Drawer .drawer-title .drawer-title-text:hover .Icon {\\n opacity: 1;\\n transition: opacity 250ms;\\n}\\n.Drawer .drawer-title .MenuActions.toolbar .Icon {\\n color: var(--drawerTitleText);\\n}\\n.Drawer .drawer-title .Menu {\\n box-shadow: none;\\n}\\n.Drawer .drawer-content {\\n overflow: auto;\\n padding: var(--spacing);\\n}\\n.Drawer .drawer-content .Table .TableHead {\\n border-bottom: 1px solid var(--borderFaintColor);\\n}\\n@media (max-width: 900px) {\\n .Drawer.left, .Drawer.right {\\n width: var(--full-size);\\n }\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack:///./src/renderer/components/drawer/drawer.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js??ref--7-2");
|
|
15823
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);\n// Imports\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.i, \"/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n/**\\n * Copyright (c) 2021 OpenLens Authors\\n *\\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\\n * this software and associated documentation files (the \\\"Software\\\"), to deal in\\n * the Software without restriction, including without limitation the rights to\\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\\n * the Software, and to permit persons to whom the Software is furnished to do so,\\n * subject to the following conditions:\\n *\\n * The above copyright notice and this permission notice shall be included in all\\n * copies or substantial portions of the Software.\\n *\\n * THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n */\\n.Drawer {\\n --size: 50%;\\n --full-size: 75%;\\n --spacing: 24px;\\n --icon-focus-color: white;\\n position: absolute;\\n background: var(--contentColor);\\n box-shadow: 0 0 16px var(--boxShadow);\\n z-index: 100;\\n height: 100%;\\n}\\n.Drawer.left {\\n left: 0;\\n}\\n.Drawer.right {\\n right: 0;\\n}\\n.Drawer.top {\\n top: 0;\\n}\\n.Drawer.bottom {\\n bottom: 0;\\n}\\n.Drawer.left, .Drawer.right {\\n top: 0;\\n width: var(--size);\\n}\\n.Drawer.top, .Drawer.bottom {\\n left: 0;\\n width: 100%;\\n height: var(--size);\\n}\\n.Drawer .drawer-wrapper {\\n height: 100%;\\n min-height: 100%;\\n}\\n.Drawer .drawer-title {\\n background: var(--blue);\\n color: var(--drawerTitleText);\\n padding: 8px 20px;\\n word-break: break-all;\\n position: relative;\\n min-height: 54px;\\n}\\n.Drawer .drawer-title .drawer-title-text {\\n font-weight: bold;\\n flex-grow: 2;\\n padding-right: 8px;\\n}\\n.Drawer .drawer-title .drawer-title-text .Icon {\\n opacity: 0;\\n font-weight: normal;\\n margin-left: 8px;\\n}\\n.Drawer .drawer-title .drawer-title-text:hover .Icon {\\n opacity: 1;\\n transition: opacity 250ms;\\n}\\n.Drawer .drawer-title .MenuActions.toolbar .Icon {\\n color: var(--drawerTitleText);\\n}\\n.Drawer .drawer-title .Menu {\\n box-shadow: none;\\n}\\n.Drawer .drawer-content {\\n overflow: auto;\\n padding: var(--spacing);\\n}\\n.Drawer .drawer-content .Table .TableHead {\\n border-bottom: 1px solid var(--borderFaintColor);\\n}\\n@media (max-width: 900px) {\\n .Drawer.left, .Drawer.right {\\n width: var(--full-size);\\n }\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack:///./src/renderer/components/drawer/drawer.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js??ref--7-2");
|
|
15824
15824
|
|
|
15825
15825
|
/***/ }),
|
|
15826
15826
|
|
|
@@ -30553,6 +30553,18 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
|
|
|
30553
30553
|
|
|
30554
30554
|
/***/ }),
|
|
30555
30555
|
|
|
30556
|
+
/***/ "./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/push_off.svg":
|
|
30557
|
+
/*!*****************************************************************************************!*\
|
|
30558
|
+
!*** ./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/push_off.svg ***!
|
|
30559
|
+
\*****************************************************************************************/
|
|
30560
|
+
/*! exports provided: default */
|
|
30561
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
30562
|
+
|
|
30563
|
+
"use strict";
|
|
30564
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><!DOCTYPE svg PUBLIC \\\"-//W3C//DTD SVG 1.1//EN\\\" \\\"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\\\"><svg xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\" version=\\\"1.1\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M2,5.27L3.28,4L20,20.72L18.73,22L12.8,16.07V22H11.2V16H6V14L8,12V11.27L2,5.27M16,12L18,14V16H17.82L8,6.18V4H7V2H17V4H16V12Z\\\" /></svg>\");\n\n//# sourceURL=webpack:///./src/renderer/components/icon/push_off.svg?./node_modules/raw-loader/dist/cjs.js");
|
|
30565
|
+
|
|
30566
|
+
/***/ }),
|
|
30567
|
+
|
|
30556
30568
|
/***/ "./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/spinner.svg":
|
|
30557
30569
|
/*!****************************************************************************************!*\
|
|
30558
30570
|
!*** ./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/spinner.svg ***!
|
|
@@ -30777,7 +30789,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
30777
30789
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
30778
30790
|
|
|
30779
30791
|
"use strict";
|
|
30780
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"BrowserRouter\", function() { return BrowserRouter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"HashRouter\", function() { return HashRouter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Link\", function() { return Link; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"NavLink\", function() { return NavLink; });\n/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-router */ \"./node_modules/react-router/esm/react-router.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"MemoryRouter\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"MemoryRouter\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Prompt\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"Prompt\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Redirect\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"Redirect\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Route\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"Route\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Router\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"Router\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"StaticRouter\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"StaticRouter\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Switch\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"Switch\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"generatePath\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"generatePath\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"matchPath\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"matchPath\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useHistory\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"useHistory\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useLocation\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"useLocation\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useParams\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"useParams\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useRouteMatch\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"useRouteMatch\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withRouter\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"withRouter\"]; });\n\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var history__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! history */ \"./node_modules/history/esm/history.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var tiny_warning__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tiny-warning */ \"./node_modules/tiny-warning/dist/tiny-warning.esm.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var tiny_invariant__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! tiny-invariant */ \"./node_modules/tiny-invariant/dist/tiny-invariant.esm.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * The public API for a <Router> that uses HTML5 history.\n */\n\nvar BrowserRouter =\n/*#__PURE__*/\nfunction (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(BrowserRouter, _React$Component);\n\n function BrowserRouter() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createBrowserHistory\"])(_this.props);\n return _this;\n }\n\n var _proto = BrowserRouter.prototype;\n\n _proto.render = function render() {\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[\"Router\"], {\n history: this.history,\n children: this.props.children\n });\n };\n\n return BrowserRouter;\n}(react__WEBPACK_IMPORTED_MODULE_2___default.a.Component);\n\nif (true) {\n BrowserRouter.propTypes = {\n basename: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n forceRefresh: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n getUserConfirmation: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n keyLength: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number\n };\n\n BrowserRouter.prototype.componentDidMount = function () {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(!this.props.history, \"<BrowserRouter> ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { BrowserRouter as Router }`.\") : undefined;\n };\n}\n\n/**\n * The public API for a <Router> that uses window.location.hash.\n */\n\nvar HashRouter =\n/*#__PURE__*/\nfunction (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(HashRouter, _React$Component);\n\n function HashRouter() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createHashHistory\"])(_this.props);\n return _this;\n }\n\n var _proto = HashRouter.prototype;\n\n _proto.render = function render() {\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[\"Router\"], {\n history: this.history,\n children: this.props.children\n });\n };\n\n return HashRouter;\n}(react__WEBPACK_IMPORTED_MODULE_2___default.a.Component);\n\nif (true) {\n HashRouter.propTypes = {\n basename: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n getUserConfirmation: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n hashType: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf([\"hashbang\", \"noslash\", \"slash\"])\n };\n\n HashRouter.prototype.componentDidMount = function () {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(!this.props.history, \"<HashRouter> ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { HashRouter as Router }`.\") : undefined;\n };\n}\n\nvar resolveToLocation = function resolveToLocation(to, currentLocation) {\n return typeof to === \"function\" ? to(currentLocation) : to;\n};\nvar normalizeToLocation = function normalizeToLocation(to, currentLocation) {\n return typeof to === \"string\" ? Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createLocation\"])(to, null, null, currentLocation) : to;\n};\n\nvar forwardRefShim = function forwardRefShim(C) {\n return C;\n};\n\nvar forwardRef = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef;\n\nif (typeof forwardRef === \"undefined\") {\n forwardRef = forwardRefShim;\n}\n\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\n\nvar LinkAnchor = forwardRef(function (_ref, forwardedRef) {\n var innerRef = _ref.innerRef,\n navigate = _ref.navigate,\n _onClick = _ref.onClick,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_ref, [\"innerRef\", \"navigate\", \"onClick\"]);\n\n var target = rest.target;\n\n var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({}, rest, {\n onClick: function onClick(event) {\n try {\n if (_onClick) _onClick(event);\n } catch (ex) {\n event.preventDefault();\n throw ex;\n }\n\n if (!event.defaultPrevented && // onClick prevented default\n event.button === 0 && ( // ignore everything but left clicks\n !target || target === \"_self\") && // let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // ignore clicks with modifier keys\n ) {\n event.preventDefault();\n navigate();\n }\n }\n }); // React 15 compat\n\n\n if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.ref = innerRef;\n }\n /* eslint-disable-next-line jsx-a11y/anchor-has-content */\n\n\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(\"a\", props);\n});\n\nif (true) {\n LinkAnchor.displayName = \"LinkAnchor\";\n}\n/**\n * The public API for rendering a history-aware <a>.\n */\n\n\nvar Link = forwardRef(function (_ref2, forwardedRef) {\n var _ref2$component = _ref2.component,\n component = _ref2$component === void 0 ? LinkAnchor : _ref2$component,\n replace = _ref2.replace,\n to = _ref2.to,\n innerRef = _ref2.innerRef,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_ref2, [\"component\", \"replace\", \"to\", \"innerRef\"]);\n\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[\"__RouterContext\"].Consumer, null, function (context) {\n !context ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(false, \"You should not use <Link> outside a <Router>\") : undefined : void 0;\n var history = context.history;\n var location = normalizeToLocation(resolveToLocation(to, context.location), context.location);\n var href = location ? history.createHref(location) : \"\";\n\n var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({}, rest, {\n href: href,\n navigate: function navigate() {\n var location = resolveToLocation(to, context.location);\n var method = replace ? history.replace : history.push;\n method(location);\n }\n }); // React 15 compat\n\n\n if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.innerRef = innerRef;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(component, props);\n });\n});\n\nif (true) {\n var toType = prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func]);\n var refType = prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.shape({\n current: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.any\n })]);\n Link.displayName = \"Link\";\n Link.propTypes = {\n innerRef: refType,\n onClick: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n replace: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n target: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n to: toType.isRequired\n };\n}\n\nvar forwardRefShim$1 = function forwardRefShim(C) {\n return C;\n};\n\nvar forwardRef$1 = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef;\n\nif (typeof forwardRef$1 === \"undefined\") {\n forwardRef$1 = forwardRefShim$1;\n}\n\nfunction joinClassnames() {\n for (var _len = arguments.length, classnames = new Array(_len), _key = 0; _key < _len; _key++) {\n classnames[_key] = arguments[_key];\n }\n\n return classnames.filter(function (i) {\n return i;\n }).join(\" \");\n}\n/**\n * A <Link> wrapper that knows if it's \"active\" or not.\n */\n\n\nvar NavLink = forwardRef$1(function (_ref, forwardedRef) {\n var _ref$ariaCurrent = _ref[\"aria-current\"],\n ariaCurrent = _ref$ariaCurrent === void 0 ? \"page\" : _ref$ariaCurrent,\n _ref$activeClassName = _ref.activeClassName,\n activeClassName = _ref$activeClassName === void 0 ? \"active\" : _ref$activeClassName,\n activeStyle = _ref.activeStyle,\n classNameProp = _ref.className,\n exact = _ref.exact,\n isActiveProp = _ref.isActive,\n locationProp = _ref.location,\n sensitive = _ref.sensitive,\n strict = _ref.strict,\n styleProp = _ref.style,\n to = _ref.to,\n innerRef = _ref.innerRef,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_ref, [\"aria-current\", \"activeClassName\", \"activeStyle\", \"className\", \"exact\", \"isActive\", \"location\", \"sensitive\", \"strict\", \"style\", \"to\", \"innerRef\"]);\n\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[\"__RouterContext\"].Consumer, null, function (context) {\n !context ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(false, \"You should not use <NavLink> outside a <Router>\") : undefined : void 0;\n var currentLocation = locationProp || context.location;\n var toLocation = normalizeToLocation(resolveToLocation(to, currentLocation), currentLocation);\n var path = toLocation.pathname; // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202\n\n var escapedPath = path && path.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n var match = escapedPath ? Object(react_router__WEBPACK_IMPORTED_MODULE_0__[\"matchPath\"])(currentLocation.pathname, {\n path: escapedPath,\n exact: exact,\n sensitive: sensitive,\n strict: strict\n }) : null;\n var isActive = !!(isActiveProp ? isActiveProp(match, currentLocation) : match);\n var className = isActive ? joinClassnames(classNameProp, activeClassName) : classNameProp;\n var style = isActive ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({}, styleProp, {}, activeStyle) : styleProp;\n\n var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({\n \"aria-current\": isActive && ariaCurrent || null,\n className: className,\n style: style,\n to: toLocation\n }, rest); // React 15 compat\n\n\n if (forwardRefShim$1 !== forwardRef$1) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.innerRef = innerRef;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(Link, props);\n });\n});\n\nif (true) {\n NavLink.displayName = \"NavLink\";\n var ariaCurrentType = prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf([\"page\", \"step\", \"location\", \"date\", \"time\", \"true\"]);\n NavLink.propTypes = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({}, Link.propTypes, {\n \"aria-current\": ariaCurrentType,\n activeClassName: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n activeStyle: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n exact: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n isActive: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n location: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n sensitive: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n strict: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n style: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object\n });\n}\n\n\n//# sourceMappingURL=react-router-dom.js.map\n\n\n//# sourceURL=webpack:///./node_modules/react-router-dom/esm/react-router-dom.js?");
|
|
30792
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"BrowserRouter\", function() { return BrowserRouter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"HashRouter\", function() { return HashRouter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Link\", function() { return Link; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"NavLink\", function() { return NavLink; });\n/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-router */ \"./node_modules/react-router/esm/react-router.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"MemoryRouter\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"MemoryRouter\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Prompt\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"Prompt\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Redirect\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"Redirect\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Route\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"Route\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Router\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"Router\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"StaticRouter\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"StaticRouter\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Switch\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"Switch\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"generatePath\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"generatePath\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"matchPath\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"matchPath\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useHistory\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"useHistory\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useLocation\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"useLocation\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useParams\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"useParams\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useRouteMatch\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"useRouteMatch\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withRouter\", function() { return react_router__WEBPACK_IMPORTED_MODULE_0__[\"withRouter\"]; });\n\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var history__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! history */ \"./node_modules/history/esm/history.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var tiny_warning__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tiny-warning */ \"./node_modules/tiny-warning/dist/tiny-warning.esm.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var tiny_invariant__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! tiny-invariant */ \"./node_modules/tiny-invariant/dist/tiny-invariant.esm.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * The public API for a <Router> that uses HTML5 history.\n */\n\nvar BrowserRouter = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(BrowserRouter, _React$Component);\n\n function BrowserRouter() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createBrowserHistory\"])(_this.props);\n return _this;\n }\n\n var _proto = BrowserRouter.prototype;\n\n _proto.render = function render() {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[\"Router\"], {\n history: this.history,\n children: this.props.children\n });\n };\n\n return BrowserRouter;\n}(react__WEBPACK_IMPORTED_MODULE_2___default.a.Component);\n\nif (true) {\n BrowserRouter.propTypes = {\n basename: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n forceRefresh: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n getUserConfirmation: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n keyLength: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number\n };\n\n BrowserRouter.prototype.componentDidMount = function () {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(!this.props.history, \"<BrowserRouter> ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { BrowserRouter as Router }`.\") : undefined;\n };\n}\n\n/**\n * The public API for a <Router> that uses window.location.hash.\n */\n\nvar HashRouter = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(HashRouter, _React$Component);\n\n function HashRouter() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createHashHistory\"])(_this.props);\n return _this;\n }\n\n var _proto = HashRouter.prototype;\n\n _proto.render = function render() {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[\"Router\"], {\n history: this.history,\n children: this.props.children\n });\n };\n\n return HashRouter;\n}(react__WEBPACK_IMPORTED_MODULE_2___default.a.Component);\n\nif (true) {\n HashRouter.propTypes = {\n basename: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n getUserConfirmation: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n hashType: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf([\"hashbang\", \"noslash\", \"slash\"])\n };\n\n HashRouter.prototype.componentDidMount = function () {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(!this.props.history, \"<HashRouter> ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { HashRouter as Router }`.\") : undefined;\n };\n}\n\nvar resolveToLocation = function resolveToLocation(to, currentLocation) {\n return typeof to === \"function\" ? to(currentLocation) : to;\n};\nvar normalizeToLocation = function normalizeToLocation(to, currentLocation) {\n return typeof to === \"string\" ? Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createLocation\"])(to, null, null, currentLocation) : to;\n};\n\nvar forwardRefShim = function forwardRefShim(C) {\n return C;\n};\n\nvar forwardRef = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef;\n\nif (typeof forwardRef === \"undefined\") {\n forwardRef = forwardRefShim;\n}\n\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\n\nvar LinkAnchor = forwardRef(function (_ref, forwardedRef) {\n var innerRef = _ref.innerRef,\n navigate = _ref.navigate,\n _onClick = _ref.onClick,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_ref, [\"innerRef\", \"navigate\", \"onClick\"]);\n\n var target = rest.target;\n\n var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({}, rest, {\n onClick: function onClick(event) {\n try {\n if (_onClick) _onClick(event);\n } catch (ex) {\n event.preventDefault();\n throw ex;\n }\n\n if (!event.defaultPrevented && // onClick prevented default\n event.button === 0 && ( // ignore everything but left clicks\n !target || target === \"_self\") && // let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // ignore clicks with modifier keys\n ) {\n event.preventDefault();\n navigate();\n }\n }\n }); // React 15 compat\n\n\n if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.ref = innerRef;\n }\n /* eslint-disable-next-line jsx-a11y/anchor-has-content */\n\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(\"a\", props);\n});\n\nif (true) {\n LinkAnchor.displayName = \"LinkAnchor\";\n}\n/**\n * The public API for rendering a history-aware <a>.\n */\n\n\nvar Link = forwardRef(function (_ref2, forwardedRef) {\n var _ref2$component = _ref2.component,\n component = _ref2$component === void 0 ? LinkAnchor : _ref2$component,\n replace = _ref2.replace,\n to = _ref2.to,\n innerRef = _ref2.innerRef,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_ref2, [\"component\", \"replace\", \"to\", \"innerRef\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[\"__RouterContext\"].Consumer, null, function (context) {\n !context ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(false, \"You should not use <Link> outside a <Router>\") : undefined : void 0;\n var history = context.history;\n var location = normalizeToLocation(resolveToLocation(to, context.location), context.location);\n var href = location ? history.createHref(location) : \"\";\n\n var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({}, rest, {\n href: href,\n navigate: function navigate() {\n var location = resolveToLocation(to, context.location);\n var isDuplicateNavigation = Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createPath\"])(context.location) === Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createPath\"])(normalizeToLocation(location));\n var method = replace || isDuplicateNavigation ? history.replace : history.push;\n method(location);\n }\n }); // React 15 compat\n\n\n if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.innerRef = innerRef;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(component, props);\n });\n});\n\nif (true) {\n var toType = prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func]);\n var refType = prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.shape({\n current: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.any\n })]);\n Link.displayName = \"Link\";\n Link.propTypes = {\n innerRef: refType,\n onClick: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n replace: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n target: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n to: toType.isRequired\n };\n}\n\nvar forwardRefShim$1 = function forwardRefShim(C) {\n return C;\n};\n\nvar forwardRef$1 = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef;\n\nif (typeof forwardRef$1 === \"undefined\") {\n forwardRef$1 = forwardRefShim$1;\n}\n\nfunction joinClassnames() {\n for (var _len = arguments.length, classnames = new Array(_len), _key = 0; _key < _len; _key++) {\n classnames[_key] = arguments[_key];\n }\n\n return classnames.filter(function (i) {\n return i;\n }).join(\" \");\n}\n/**\n * A <Link> wrapper that knows if it's \"active\" or not.\n */\n\n\nvar NavLink = forwardRef$1(function (_ref, forwardedRef) {\n var _ref$ariaCurrent = _ref[\"aria-current\"],\n ariaCurrent = _ref$ariaCurrent === void 0 ? \"page\" : _ref$ariaCurrent,\n _ref$activeClassName = _ref.activeClassName,\n activeClassName = _ref$activeClassName === void 0 ? \"active\" : _ref$activeClassName,\n activeStyle = _ref.activeStyle,\n classNameProp = _ref.className,\n exact = _ref.exact,\n isActiveProp = _ref.isActive,\n locationProp = _ref.location,\n sensitive = _ref.sensitive,\n strict = _ref.strict,\n styleProp = _ref.style,\n to = _ref.to,\n innerRef = _ref.innerRef,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_ref, [\"aria-current\", \"activeClassName\", \"activeStyle\", \"className\", \"exact\", \"isActive\", \"location\", \"sensitive\", \"strict\", \"style\", \"to\", \"innerRef\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[\"__RouterContext\"].Consumer, null, function (context) {\n !context ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(false, \"You should not use <NavLink> outside a <Router>\") : undefined : void 0;\n var currentLocation = locationProp || context.location;\n var toLocation = normalizeToLocation(resolveToLocation(to, currentLocation), currentLocation);\n var path = toLocation.pathname; // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202\n\n var escapedPath = path && path.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n var match = escapedPath ? Object(react_router__WEBPACK_IMPORTED_MODULE_0__[\"matchPath\"])(currentLocation.pathname, {\n path: escapedPath,\n exact: exact,\n sensitive: sensitive,\n strict: strict\n }) : null;\n var isActive = !!(isActiveProp ? isActiveProp(match, currentLocation) : match);\n var className = typeof classNameProp === \"function\" ? classNameProp(isActive) : classNameProp;\n var style = typeof styleProp === \"function\" ? styleProp(isActive) : styleProp;\n\n if (isActive) {\n className = joinClassnames(className, activeClassName);\n style = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({}, style, activeStyle);\n }\n\n var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({\n \"aria-current\": isActive && ariaCurrent || null,\n className: className,\n style: style,\n to: toLocation\n }, rest); // React 15 compat\n\n\n if (forwardRefShim$1 !== forwardRef$1) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.innerRef = innerRef;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(Link, props);\n });\n});\n\nif (true) {\n NavLink.displayName = \"NavLink\";\n var ariaCurrentType = prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf([\"page\", \"step\", \"location\", \"date\", \"time\", \"true\", \"false\"]);\n NavLink.propTypes = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({}, Link.propTypes, {\n \"aria-current\": ariaCurrentType,\n activeClassName: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n activeStyle: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func]),\n exact: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n isActive: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n location: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n sensitive: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n strict: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n style: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func])\n });\n}\n\n\n//# sourceMappingURL=react-router-dom.js.map\n\n\n//# sourceURL=webpack:///./node_modules/react-router-dom/esm/react-router-dom.js?");
|
|
30781
30793
|
|
|
30782
30794
|
/***/ }),
|
|
30783
30795
|
|
|
@@ -30789,7 +30801,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
30789
30801
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
30790
30802
|
|
|
30791
30803
|
"use strict";
|
|
30792
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MemoryRouter\", function() { return MemoryRouter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Prompt\", function() { return Prompt; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Redirect\", function() { return Redirect; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Route\", function() { return Route; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Router\", function() { return Router; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"StaticRouter\", function() { return StaticRouter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Switch\", function() { return Switch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__HistoryContext\", function() { return historyContext; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__RouterContext\", function() { return context; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"generatePath\", function() { return generatePath; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"matchPath\", function() { return matchPath; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useHistory\", function() { return useHistory; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useLocation\", function() { return useLocation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useParams\", function() { return useParams; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useRouteMatch\", function() { return useRouteMatch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"withRouter\", function() { return withRouter; });\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var history__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! history */ \"./node_modules/history/esm/history.js\");\n/* harmony import */ var tiny_warning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tiny-warning */ \"./node_modules/tiny-warning/dist/tiny-warning.esm.js\");\n/* harmony import */ var mini_create_react_context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! mini-create-react-context */ \"./node_modules/mini-create-react-context/dist/esm/index.js\");\n/* harmony import */ var tiny_invariant__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tiny-invariant */ \"./node_modules/tiny-invariant/dist/tiny-invariant.esm.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var path_to_regexp__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! path-to-regexp */ \"./node_modules/react-router/node_modules/path-to-regexp/index.js\");\n/* harmony import */ var path_to_regexp__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(path_to_regexp__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react-is */ \"./node_modules/react-router/node_modules/react-is/index.js\");\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! hoist-non-react-statics */ \"./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js\");\n/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_11__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n// TODO: Replace with React.createContext once we can assume React 16+\n\nvar createNamedContext = function createNamedContext(name) {\n var context = Object(mini_create_react_context__WEBPACK_IMPORTED_MODULE_5__[\"default\"])();\n context.displayName = name;\n return context;\n};\n\nvar historyContext =\n/*#__PURE__*/\ncreateNamedContext(\"Router-History\");\n\n// TODO: Replace with React.createContext once we can assume React 16+\n\nvar createNamedContext$1 = function createNamedContext(name) {\n var context = Object(mini_create_react_context__WEBPACK_IMPORTED_MODULE_5__[\"default\"])();\n context.displayName = name;\n return context;\n};\n\nvar context =\n/*#__PURE__*/\ncreateNamedContext$1(\"Router\");\n\n/**\n * The public API for putting history on context.\n */\n\nvar Router =\n/*#__PURE__*/\nfunction (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Router, _React$Component);\n\n Router.computeRootMatch = function computeRootMatch(pathname) {\n return {\n path: \"/\",\n url: \"/\",\n params: {},\n isExact: pathname === \"/\"\n };\n };\n\n function Router(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.state = {\n location: props.history.location\n }; // This is a bit of a hack. We have to start listening for location\n // changes here in the constructor in case there are any <Redirect>s\n // on the initial render. If there are, they will replace/push when\n // they mount and since cDM fires in children before parents, we may\n // get a new location before the <Router> is mounted.\n\n _this._isMounted = false;\n _this._pendingLocation = null;\n\n if (!props.staticContext) {\n _this.unlisten = props.history.listen(function (location) {\n if (_this._isMounted) {\n _this.setState({\n location: location\n });\n } else {\n _this._pendingLocation = location;\n }\n });\n }\n\n return _this;\n }\n\n var _proto = Router.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this._isMounted = true;\n\n if (this._pendingLocation) {\n this.setState({\n location: this._pendingLocation\n });\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.unlisten) this.unlisten();\n };\n\n _proto.render = function render() {\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Provider, {\n value: {\n history: this.props.history,\n location: this.state.location,\n match: Router.computeRootMatch(this.state.location.pathname),\n staticContext: this.props.staticContext\n }\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(historyContext.Provider, {\n children: this.props.children || null,\n value: this.props.history\n }));\n };\n\n return Router;\n}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);\n\nif (true) {\n Router.propTypes = {\n children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.node,\n history: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object.isRequired,\n staticContext: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object\n };\n\n Router.prototype.componentDidUpdate = function (prevProps) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(prevProps.history === this.props.history, \"You cannot change <Router history>\") : undefined;\n };\n}\n\n/**\n * The public API for a <Router> that stores location in memory.\n */\n\nvar MemoryRouter =\n/*#__PURE__*/\nfunction (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(MemoryRouter, _React$Component);\n\n function MemoryRouter() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createMemoryHistory\"])(_this.props);\n return _this;\n }\n\n var _proto = MemoryRouter.prototype;\n\n _proto.render = function render() {\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Router, {\n history: this.history,\n children: this.props.children\n });\n };\n\n return MemoryRouter;\n}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);\n\nif (true) {\n MemoryRouter.propTypes = {\n initialEntries: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.array,\n initialIndex: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,\n getUserConfirmation: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func,\n keyLength: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,\n children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.node\n };\n\n MemoryRouter.prototype.componentDidMount = function () {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!this.props.history, \"<MemoryRouter> ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { MemoryRouter as Router }`.\") : undefined;\n };\n}\n\nvar Lifecycle =\n/*#__PURE__*/\nfunction (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Lifecycle, _React$Component);\n\n function Lifecycle() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Lifecycle.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n if (this.props.onMount) this.props.onMount.call(this, this);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.props.onUnmount) this.props.onUnmount.call(this, this);\n };\n\n _proto.render = function render() {\n return null;\n };\n\n return Lifecycle;\n}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);\n\n/**\n * The public API for prompting the user before navigating away from a screen.\n */\n\nfunction Prompt(_ref) {\n var message = _ref.message,\n _ref$when = _ref.when,\n when = _ref$when === void 0 ? true : _ref$when;\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Consumer, null, function (context) {\n !context ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You should not use <Prompt> outside a <Router>\") : undefined : void 0;\n if (!when || context.staticContext) return null;\n var method = context.history.block;\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Lifecycle, {\n onMount: function onMount(self) {\n self.release = method(message);\n },\n onUpdate: function onUpdate(self, prevProps) {\n if (prevProps.message !== message) {\n self.release();\n self.release = method(message);\n }\n },\n onUnmount: function onUnmount(self) {\n self.release();\n },\n message: message\n });\n });\n}\n\nif (true) {\n var messageType = prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string]);\n Prompt.propTypes = {\n when: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n message: messageType.isRequired\n };\n}\n\nvar cache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nfunction compilePath(path) {\n if (cache[path]) return cache[path];\n var generator = path_to_regexp__WEBPACK_IMPORTED_MODULE_8___default.a.compile(path);\n\n if (cacheCount < cacheLimit) {\n cache[path] = generator;\n cacheCount++;\n }\n\n return generator;\n}\n/**\n * Public API for generating a URL pathname from a path and parameters.\n */\n\n\nfunction generatePath(path, params) {\n if (path === void 0) {\n path = \"/\";\n }\n\n if (params === void 0) {\n params = {};\n }\n\n return path === \"/\" ? path : compilePath(path)(params, {\n pretty: true\n });\n}\n\n/**\n * The public API for navigating programmatically with a component.\n */\n\nfunction Redirect(_ref) {\n var computedMatch = _ref.computedMatch,\n to = _ref.to,\n _ref$push = _ref.push,\n push = _ref$push === void 0 ? false : _ref$push;\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Consumer, null, function (context) {\n !context ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You should not use <Redirect> outside a <Router>\") : undefined : void 0;\n var history = context.history,\n staticContext = context.staticContext;\n var method = push ? history.push : history.replace;\n var location = Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createLocation\"])(computedMatch ? typeof to === \"string\" ? generatePath(to, computedMatch.params) : Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, to, {\n pathname: generatePath(to.pathname, computedMatch.params)\n }) : to); // When rendering in a static context,\n // set the new location immediately.\n\n if (staticContext) {\n method(location);\n return null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Lifecycle, {\n onMount: function onMount() {\n method(location);\n },\n onUpdate: function onUpdate(self, prevProps) {\n var prevLocation = Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createLocation\"])(prevProps.to);\n\n if (!Object(history__WEBPACK_IMPORTED_MODULE_3__[\"locationsAreEqual\"])(prevLocation, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, location, {\n key: prevLocation.key\n }))) {\n method(location);\n }\n },\n to: to\n });\n });\n}\n\nif (true) {\n Redirect.propTypes = {\n push: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n from: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,\n to: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object]).isRequired\n };\n}\n\nvar cache$1 = {};\nvar cacheLimit$1 = 10000;\nvar cacheCount$1 = 0;\n\nfunction compilePath$1(path, options) {\n var cacheKey = \"\" + options.end + options.strict + options.sensitive;\n var pathCache = cache$1[cacheKey] || (cache$1[cacheKey] = {});\n if (pathCache[path]) return pathCache[path];\n var keys = [];\n var regexp = path_to_regexp__WEBPACK_IMPORTED_MODULE_8___default()(path, keys, options);\n var result = {\n regexp: regexp,\n keys: keys\n };\n\n if (cacheCount$1 < cacheLimit$1) {\n pathCache[path] = result;\n cacheCount$1++;\n }\n\n return result;\n}\n/**\n * Public API for matching a URL pathname to a path.\n */\n\n\nfunction matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}\n\nfunction isEmptyChildren(children) {\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.Children.count(children) === 0;\n}\n\nfunction evalChildrenDev(children, props, path) {\n var value = children(props);\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(value !== undefined, \"You returned `undefined` from the `children` function of \" + (\"<Route\" + (path ? \" path=\\\"\" + path + \"\\\"\" : \"\") + \">, but you \") + \"should have returned a React element or `null`\") : undefined;\n return value || null;\n}\n/**\n * The public API for matching a single path and rendering.\n */\n\n\nvar Route =\n/*#__PURE__*/\nfunction (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Route, _React$Component);\n\n function Route() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Route.prototype;\n\n _proto.render = function render() {\n var _this = this;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Consumer, null, function (context$1) {\n !context$1 ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You should not use <Route> outside a <Router>\") : undefined : void 0;\n var location = _this.props.location || context$1.location;\n var match = _this.props.computedMatch ? _this.props.computedMatch // <Switch> already computed the match for us\n : _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;\n\n var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, context$1, {\n location: location,\n match: match\n });\n\n var _this$props = _this.props,\n children = _this$props.children,\n component = _this$props.component,\n render = _this$props.render; // Preact uses an empty array as children by\n // default, so use null if that's the case.\n\n if (Array.isArray(children) && children.length === 0) {\n children = null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Provider, {\n value: props\n }, props.match ? children ? typeof children === \"function\" ? true ? evalChildrenDev(children, props, _this.props.path) : undefined : children : component ? react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(component, props) : render ? render(props) : null : typeof children === \"function\" ? true ? evalChildrenDev(children, props, _this.props.path) : undefined : null);\n });\n };\n\n return Route;\n}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);\n\nif (true) {\n Route.propTypes = {\n children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.node]),\n component: function component(props, propName) {\n if (props[propName] && !Object(react_is__WEBPACK_IMPORTED_MODULE_9__[\"isValidElementType\"])(props[propName])) {\n return new Error(\"Invalid prop 'component' supplied to 'Route': the prop is not a valid React component\");\n }\n },\n exact: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n location: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object,\n path: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string)]),\n render: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func,\n sensitive: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n strict: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool\n };\n\n Route.prototype.componentDidMount = function () {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!(this.props.children && !isEmptyChildren(this.props.children) && this.props.component), \"You should not use <Route component> and <Route children> in the same route; <Route component> will be ignored\") : undefined;\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!(this.props.children && !isEmptyChildren(this.props.children) && this.props.render), \"You should not use <Route render> and <Route children> in the same route; <Route render> will be ignored\") : undefined;\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!(this.props.component && this.props.render), \"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored\") : undefined;\n };\n\n Route.prototype.componentDidUpdate = function (prevProps) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!(this.props.location && !prevProps.location), '<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.') : undefined;\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!(!this.props.location && prevProps.location), '<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.') : undefined;\n };\n}\n\nfunction addLeadingSlash(path) {\n return path.charAt(0) === \"/\" ? path : \"/\" + path;\n}\n\nfunction addBasename(basename, location) {\n if (!basename) return location;\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, location, {\n pathname: addLeadingSlash(basename) + location.pathname\n });\n}\n\nfunction stripBasename(basename, location) {\n if (!basename) return location;\n var base = addLeadingSlash(basename);\n if (location.pathname.indexOf(base) !== 0) return location;\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, location, {\n pathname: location.pathname.substr(base.length)\n });\n}\n\nfunction createURL(location) {\n return typeof location === \"string\" ? location : Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createPath\"])(location);\n}\n\nfunction staticHandler(methodName) {\n return function () {\n true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You cannot %s with <StaticRouter>\", methodName) : undefined ;\n };\n}\n\nfunction noop() {}\n/**\n * The public top-level API for a \"static\" <Router>, so-called because it\n * can't actually change the current location. Instead, it just records\n * location changes in a context object. Useful mainly in testing and\n * server-rendering scenarios.\n */\n\n\nvar StaticRouter =\n/*#__PURE__*/\nfunction (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(StaticRouter, _React$Component);\n\n function StaticRouter() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _this.handlePush = function (location) {\n return _this.navigateTo(location, \"PUSH\");\n };\n\n _this.handleReplace = function (location) {\n return _this.navigateTo(location, \"REPLACE\");\n };\n\n _this.handleListen = function () {\n return noop;\n };\n\n _this.handleBlock = function () {\n return noop;\n };\n\n return _this;\n }\n\n var _proto = StaticRouter.prototype;\n\n _proto.navigateTo = function navigateTo(location, action) {\n var _this$props = this.props,\n _this$props$basename = _this$props.basename,\n basename = _this$props$basename === void 0 ? \"\" : _this$props$basename,\n _this$props$context = _this$props.context,\n context = _this$props$context === void 0 ? {} : _this$props$context;\n context.action = action;\n context.location = addBasename(basename, Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createLocation\"])(location));\n context.url = createURL(context.location);\n };\n\n _proto.render = function render() {\n var _this$props2 = this.props,\n _this$props2$basename = _this$props2.basename,\n basename = _this$props2$basename === void 0 ? \"\" : _this$props2$basename,\n _this$props2$context = _this$props2.context,\n context = _this$props2$context === void 0 ? {} : _this$props2$context,\n _this$props2$location = _this$props2.location,\n location = _this$props2$location === void 0 ? \"/\" : _this$props2$location,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(_this$props2, [\"basename\", \"context\", \"location\"]);\n\n var history = {\n createHref: function createHref(path) {\n return addLeadingSlash(basename + createURL(path));\n },\n action: \"POP\",\n location: stripBasename(basename, Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createLocation\"])(location)),\n push: this.handlePush,\n replace: this.handleReplace,\n go: staticHandler(\"go\"),\n goBack: staticHandler(\"goBack\"),\n goForward: staticHandler(\"goForward\"),\n listen: this.handleListen,\n block: this.handleBlock\n };\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Router, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, rest, {\n history: history,\n staticContext: context\n }));\n };\n\n return StaticRouter;\n}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);\n\nif (true) {\n StaticRouter.propTypes = {\n basename: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,\n context: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object,\n location: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object])\n };\n\n StaticRouter.prototype.componentDidMount = function () {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!this.props.history, \"<StaticRouter> ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { StaticRouter as Router }`.\") : undefined;\n };\n}\n\n/**\n * The public API for rendering the first <Route> that matches.\n */\n\nvar Switch =\n/*#__PURE__*/\nfunction (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Switch, _React$Component);\n\n function Switch() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Switch.prototype;\n\n _proto.render = function render() {\n var _this = this;\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Consumer, null, function (context) {\n !context ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You should not use <Switch> outside a <Router>\") : undefined : void 0;\n var location = _this.props.location || context.location;\n var element, match; // We use React.Children.forEach instead of React.Children.toArray().find()\n // here because toArray adds keys to all child elements and we do not want\n // to trigger an unmount/remount for two <Route>s that render the same\n // component at different URLs.\n\n react__WEBPACK_IMPORTED_MODULE_1___default.a.Children.forEach(_this.props.children, function (child) {\n if (match == null && react__WEBPACK_IMPORTED_MODULE_1___default.a.isValidElement(child)) {\n element = child;\n var path = child.props.path || child.props.from;\n match = path ? matchPath(location.pathname, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, child.props, {\n path: path\n })) : context.match;\n }\n });\n return match ? react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(element, {\n location: location,\n computedMatch: match\n }) : null;\n });\n };\n\n return Switch;\n}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);\n\nif (true) {\n Switch.propTypes = {\n children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.node,\n location: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object\n };\n\n Switch.prototype.componentDidUpdate = function (prevProps) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!(this.props.location && !prevProps.location), '<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.') : undefined;\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!(!this.props.location && prevProps.location), '<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.') : undefined;\n };\n}\n\n/**\n * A public higher-order component to access the imperative API\n */\n\nfunction withRouter(Component) {\n var displayName = \"withRouter(\" + (Component.displayName || Component.name) + \")\";\n\n var C = function C(props) {\n var wrappedComponentRef = props.wrappedComponentRef,\n remainingProps = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(props, [\"wrappedComponentRef\"]);\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Consumer, null, function (context) {\n !context ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You should not use <\" + displayName + \" /> outside a <Router>\") : undefined : void 0;\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, remainingProps, context, {\n ref: wrappedComponentRef\n }));\n });\n };\n\n C.displayName = displayName;\n C.WrappedComponent = Component;\n\n if (true) {\n C.propTypes = {\n wrappedComponentRef: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object])\n };\n }\n\n return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_11___default()(C, Component);\n}\n\nvar useContext = react__WEBPACK_IMPORTED_MODULE_1___default.a.useContext;\nfunction useHistory() {\n if (true) {\n !(typeof useContext === \"function\") ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You must use React >= 16.8 in order to use useHistory()\") : undefined : void 0;\n }\n\n return useContext(historyContext);\n}\nfunction useLocation() {\n if (true) {\n !(typeof useContext === \"function\") ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You must use React >= 16.8 in order to use useLocation()\") : undefined : void 0;\n }\n\n return useContext(context).location;\n}\nfunction useParams() {\n if (true) {\n !(typeof useContext === \"function\") ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You must use React >= 16.8 in order to use useParams()\") : undefined : void 0;\n }\n\n var match = useContext(context).match;\n return match ? match.params : {};\n}\nfunction useRouteMatch(path) {\n if (true) {\n !(typeof useContext === \"function\") ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You must use React >= 16.8 in order to use useRouteMatch()\") : undefined : void 0;\n }\n\n var location = useLocation();\n var match = useContext(context).match;\n return path ? matchPath(location.pathname, path) : match;\n}\n\nif (true) {\n if (typeof window !== \"undefined\") {\n var global = window;\n var key = \"__react_router_build__\";\n var buildNames = {\n cjs: \"CommonJS\",\n esm: \"ES modules\",\n umd: \"UMD\"\n };\n\n if (global[key] && global[key] !== \"esm\") {\n var initialBuildName = buildNames[global[key]];\n var secondaryBuildName = buildNames[\"esm\"]; // TODO: Add link to article that explains in detail how to avoid\n // loading 2 different builds.\n\n throw new Error(\"You are loading the \" + secondaryBuildName + \" build of React Router \" + (\"on a page that is already running the \" + initialBuildName + \" \") + \"build, so things won't work right.\");\n }\n\n global[key] = \"esm\";\n }\n}\n\n\n//# sourceMappingURL=react-router.js.map\n\n\n//# sourceURL=webpack:///./node_modules/react-router/esm/react-router.js?");
|
|
30804
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MemoryRouter\", function() { return MemoryRouter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Prompt\", function() { return Prompt; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Redirect\", function() { return Redirect; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Route\", function() { return Route; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Router\", function() { return Router; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"StaticRouter\", function() { return StaticRouter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Switch\", function() { return Switch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__HistoryContext\", function() { return historyContext; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"__RouterContext\", function() { return context; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"generatePath\", function() { return generatePath; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"matchPath\", function() { return matchPath; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useHistory\", function() { return useHistory; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useLocation\", function() { return useLocation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useParams\", function() { return useParams; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useRouteMatch\", function() { return useRouteMatch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"withRouter\", function() { return withRouter; });\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var history__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! history */ \"./node_modules/history/esm/history.js\");\n/* harmony import */ var tiny_warning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tiny-warning */ \"./node_modules/tiny-warning/dist/tiny-warning.esm.js\");\n/* harmony import */ var mini_create_react_context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! mini-create-react-context */ \"./node_modules/mini-create-react-context/dist/esm/index.js\");\n/* harmony import */ var tiny_invariant__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tiny-invariant */ \"./node_modules/tiny-invariant/dist/tiny-invariant.esm.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var path_to_regexp__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! path-to-regexp */ \"./node_modules/react-router/node_modules/path-to-regexp/index.js\");\n/* harmony import */ var path_to_regexp__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(path_to_regexp__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react-is */ \"./node_modules/react-router/node_modules/react-is/index.js\");\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! hoist-non-react-statics */ \"./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js\");\n/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_11__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n// TODO: Replace with React.createContext once we can assume React 16+\n\nvar createNamedContext = function createNamedContext(name) {\n var context = Object(mini_create_react_context__WEBPACK_IMPORTED_MODULE_5__[\"default\"])();\n context.displayName = name;\n return context;\n};\n\nvar historyContext = /*#__PURE__*/createNamedContext(\"Router-History\");\n\nvar context = /*#__PURE__*/createNamedContext(\"Router\");\n\n/**\n * The public API for putting history on context.\n */\n\nvar Router = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Router, _React$Component);\n\n Router.computeRootMatch = function computeRootMatch(pathname) {\n return {\n path: \"/\",\n url: \"/\",\n params: {},\n isExact: pathname === \"/\"\n };\n };\n\n function Router(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.state = {\n location: props.history.location\n }; // This is a bit of a hack. We have to start listening for location\n // changes here in the constructor in case there are any <Redirect>s\n // on the initial render. If there are, they will replace/push when\n // they mount and since cDM fires in children before parents, we may\n // get a new location before the <Router> is mounted.\n\n _this._isMounted = false;\n _this._pendingLocation = null;\n\n if (!props.staticContext) {\n _this.unlisten = props.history.listen(function (location) {\n if (_this._isMounted) {\n _this.setState({\n location: location\n });\n } else {\n _this._pendingLocation = location;\n }\n });\n }\n\n return _this;\n }\n\n var _proto = Router.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this._isMounted = true;\n\n if (this._pendingLocation) {\n this.setState({\n location: this._pendingLocation\n });\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.unlisten) {\n this.unlisten();\n this._isMounted = false;\n this._pendingLocation = null;\n }\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Provider, {\n value: {\n history: this.props.history,\n location: this.state.location,\n match: Router.computeRootMatch(this.state.location.pathname),\n staticContext: this.props.staticContext\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(historyContext.Provider, {\n children: this.props.children || null,\n value: this.props.history\n }));\n };\n\n return Router;\n}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);\n\nif (true) {\n Router.propTypes = {\n children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.node,\n history: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object.isRequired,\n staticContext: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object\n };\n\n Router.prototype.componentDidUpdate = function (prevProps) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(prevProps.history === this.props.history, \"You cannot change <Router history>\") : undefined;\n };\n}\n\n/**\n * The public API for a <Router> that stores location in memory.\n */\n\nvar MemoryRouter = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(MemoryRouter, _React$Component);\n\n function MemoryRouter() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createMemoryHistory\"])(_this.props);\n return _this;\n }\n\n var _proto = MemoryRouter.prototype;\n\n _proto.render = function render() {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Router, {\n history: this.history,\n children: this.props.children\n });\n };\n\n return MemoryRouter;\n}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);\n\nif (true) {\n MemoryRouter.propTypes = {\n initialEntries: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.array,\n initialIndex: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,\n getUserConfirmation: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func,\n keyLength: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.number,\n children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.node\n };\n\n MemoryRouter.prototype.componentDidMount = function () {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!this.props.history, \"<MemoryRouter> ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { MemoryRouter as Router }`.\") : undefined;\n };\n}\n\nvar Lifecycle = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Lifecycle, _React$Component);\n\n function Lifecycle() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Lifecycle.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n if (this.props.onMount) this.props.onMount.call(this, this);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.props.onUnmount) this.props.onUnmount.call(this, this);\n };\n\n _proto.render = function render() {\n return null;\n };\n\n return Lifecycle;\n}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);\n\n/**\n * The public API for prompting the user before navigating away from a screen.\n */\n\nfunction Prompt(_ref) {\n var message = _ref.message,\n _ref$when = _ref.when,\n when = _ref$when === void 0 ? true : _ref$when;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Consumer, null, function (context) {\n !context ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You should not use <Prompt> outside a <Router>\") : undefined : void 0;\n if (!when || context.staticContext) return null;\n var method = context.history.block;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Lifecycle, {\n onMount: function onMount(self) {\n self.release = method(message);\n },\n onUpdate: function onUpdate(self, prevProps) {\n if (prevProps.message !== message) {\n self.release();\n self.release = method(message);\n }\n },\n onUnmount: function onUnmount(self) {\n self.release();\n },\n message: message\n });\n });\n}\n\nif (true) {\n var messageType = prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string]);\n Prompt.propTypes = {\n when: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n message: messageType.isRequired\n };\n}\n\nvar cache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nfunction compilePath(path) {\n if (cache[path]) return cache[path];\n var generator = path_to_regexp__WEBPACK_IMPORTED_MODULE_8___default.a.compile(path);\n\n if (cacheCount < cacheLimit) {\n cache[path] = generator;\n cacheCount++;\n }\n\n return generator;\n}\n/**\n * Public API for generating a URL pathname from a path and parameters.\n */\n\n\nfunction generatePath(path, params) {\n if (path === void 0) {\n path = \"/\";\n }\n\n if (params === void 0) {\n params = {};\n }\n\n return path === \"/\" ? path : compilePath(path)(params, {\n pretty: true\n });\n}\n\n/**\n * The public API for navigating programmatically with a component.\n */\n\nfunction Redirect(_ref) {\n var computedMatch = _ref.computedMatch,\n to = _ref.to,\n _ref$push = _ref.push,\n push = _ref$push === void 0 ? false : _ref$push;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Consumer, null, function (context) {\n !context ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You should not use <Redirect> outside a <Router>\") : undefined : void 0;\n var history = context.history,\n staticContext = context.staticContext;\n var method = push ? history.push : history.replace;\n var location = Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createLocation\"])(computedMatch ? typeof to === \"string\" ? generatePath(to, computedMatch.params) : Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, to, {\n pathname: generatePath(to.pathname, computedMatch.params)\n }) : to); // When rendering in a static context,\n // set the new location immediately.\n\n if (staticContext) {\n method(location);\n return null;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Lifecycle, {\n onMount: function onMount() {\n method(location);\n },\n onUpdate: function onUpdate(self, prevProps) {\n var prevLocation = Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createLocation\"])(prevProps.to);\n\n if (!Object(history__WEBPACK_IMPORTED_MODULE_3__[\"locationsAreEqual\"])(prevLocation, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, location, {\n key: prevLocation.key\n }))) {\n method(location);\n }\n },\n to: to\n });\n });\n}\n\nif (true) {\n Redirect.propTypes = {\n push: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n from: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,\n to: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object]).isRequired\n };\n}\n\nvar cache$1 = {};\nvar cacheLimit$1 = 10000;\nvar cacheCount$1 = 0;\n\nfunction compilePath$1(path, options) {\n var cacheKey = \"\" + options.end + options.strict + options.sensitive;\n var pathCache = cache$1[cacheKey] || (cache$1[cacheKey] = {});\n if (pathCache[path]) return pathCache[path];\n var keys = [];\n var regexp = path_to_regexp__WEBPACK_IMPORTED_MODULE_8___default()(path, keys, options);\n var result = {\n regexp: regexp,\n keys: keys\n };\n\n if (cacheCount$1 < cacheLimit$1) {\n pathCache[path] = result;\n cacheCount$1++;\n }\n\n return result;\n}\n/**\n * Public API for matching a URL pathname to a path.\n */\n\n\nfunction matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}\n\nfunction isEmptyChildren(children) {\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.Children.count(children) === 0;\n}\n\nfunction evalChildrenDev(children, props, path) {\n var value = children(props);\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(value !== undefined, \"You returned `undefined` from the `children` function of \" + (\"<Route\" + (path ? \" path=\\\"\" + path + \"\\\"\" : \"\") + \">, but you \") + \"should have returned a React element or `null`\") : undefined;\n return value || null;\n}\n/**\n * The public API for matching a single path and rendering.\n */\n\n\nvar Route = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Route, _React$Component);\n\n function Route() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Route.prototype;\n\n _proto.render = function render() {\n var _this = this;\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Consumer, null, function (context$1) {\n !context$1 ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You should not use <Route> outside a <Router>\") : undefined : void 0;\n var location = _this.props.location || context$1.location;\n var match = _this.props.computedMatch ? _this.props.computedMatch // <Switch> already computed the match for us\n : _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;\n\n var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, context$1, {\n location: location,\n match: match\n });\n\n var _this$props = _this.props,\n children = _this$props.children,\n component = _this$props.component,\n render = _this$props.render; // Preact uses an empty array as children by\n // default, so use null if that's the case.\n\n if (Array.isArray(children) && isEmptyChildren(children)) {\n children = null;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Provider, {\n value: props\n }, props.match ? children ? typeof children === \"function\" ? true ? evalChildrenDev(children, props, _this.props.path) : undefined : children : component ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(component, props) : render ? render(props) : null : typeof children === \"function\" ? true ? evalChildrenDev(children, props, _this.props.path) : undefined : null);\n });\n };\n\n return Route;\n}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);\n\nif (true) {\n Route.propTypes = {\n children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.node]),\n component: function component(props, propName) {\n if (props[propName] && !Object(react_is__WEBPACK_IMPORTED_MODULE_9__[\"isValidElementType\"])(props[propName])) {\n return new Error(\"Invalid prop 'component' supplied to 'Route': the prop is not a valid React component\");\n }\n },\n exact: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n location: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object,\n path: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string)]),\n render: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func,\n sensitive: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n strict: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool\n };\n\n Route.prototype.componentDidMount = function () {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!(this.props.children && !isEmptyChildren(this.props.children) && this.props.component), \"You should not use <Route component> and <Route children> in the same route; <Route component> will be ignored\") : undefined;\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!(this.props.children && !isEmptyChildren(this.props.children) && this.props.render), \"You should not use <Route render> and <Route children> in the same route; <Route render> will be ignored\") : undefined;\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!(this.props.component && this.props.render), \"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored\") : undefined;\n };\n\n Route.prototype.componentDidUpdate = function (prevProps) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!(this.props.location && !prevProps.location), '<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.') : undefined;\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!(!this.props.location && prevProps.location), '<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.') : undefined;\n };\n}\n\nfunction addLeadingSlash(path) {\n return path.charAt(0) === \"/\" ? path : \"/\" + path;\n}\n\nfunction addBasename(basename, location) {\n if (!basename) return location;\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, location, {\n pathname: addLeadingSlash(basename) + location.pathname\n });\n}\n\nfunction stripBasename(basename, location) {\n if (!basename) return location;\n var base = addLeadingSlash(basename);\n if (location.pathname.indexOf(base) !== 0) return location;\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, location, {\n pathname: location.pathname.substr(base.length)\n });\n}\n\nfunction createURL(location) {\n return typeof location === \"string\" ? location : Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createPath\"])(location);\n}\n\nfunction staticHandler(methodName) {\n return function () {\n true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You cannot %s with <StaticRouter>\", methodName) : undefined ;\n };\n}\n\nfunction noop() {}\n/**\n * The public top-level API for a \"static\" <Router>, so-called because it\n * can't actually change the current location. Instead, it just records\n * location changes in a context object. Useful mainly in testing and\n * server-rendering scenarios.\n */\n\n\nvar StaticRouter = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(StaticRouter, _React$Component);\n\n function StaticRouter() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _this.handlePush = function (location) {\n return _this.navigateTo(location, \"PUSH\");\n };\n\n _this.handleReplace = function (location) {\n return _this.navigateTo(location, \"REPLACE\");\n };\n\n _this.handleListen = function () {\n return noop;\n };\n\n _this.handleBlock = function () {\n return noop;\n };\n\n return _this;\n }\n\n var _proto = StaticRouter.prototype;\n\n _proto.navigateTo = function navigateTo(location, action) {\n var _this$props = this.props,\n _this$props$basename = _this$props.basename,\n basename = _this$props$basename === void 0 ? \"\" : _this$props$basename,\n _this$props$context = _this$props.context,\n context = _this$props$context === void 0 ? {} : _this$props$context;\n context.action = action;\n context.location = addBasename(basename, Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createLocation\"])(location));\n context.url = createURL(context.location);\n };\n\n _proto.render = function render() {\n var _this$props2 = this.props,\n _this$props2$basename = _this$props2.basename,\n basename = _this$props2$basename === void 0 ? \"\" : _this$props2$basename,\n _this$props2$context = _this$props2.context,\n context = _this$props2$context === void 0 ? {} : _this$props2$context,\n _this$props2$location = _this$props2.location,\n location = _this$props2$location === void 0 ? \"/\" : _this$props2$location,\n rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(_this$props2, [\"basename\", \"context\", \"location\"]);\n\n var history = {\n createHref: function createHref(path) {\n return addLeadingSlash(basename + createURL(path));\n },\n action: \"POP\",\n location: stripBasename(basename, Object(history__WEBPACK_IMPORTED_MODULE_3__[\"createLocation\"])(location)),\n push: this.handlePush,\n replace: this.handleReplace,\n go: staticHandler(\"go\"),\n goBack: staticHandler(\"goBack\"),\n goForward: staticHandler(\"goForward\"),\n listen: this.handleListen,\n block: this.handleBlock\n };\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Router, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, rest, {\n history: history,\n staticContext: context\n }));\n };\n\n return StaticRouter;\n}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);\n\nif (true) {\n StaticRouter.propTypes = {\n basename: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string,\n context: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object,\n location: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object])\n };\n\n StaticRouter.prototype.componentDidMount = function () {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!this.props.history, \"<StaticRouter> ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { StaticRouter as Router }`.\") : undefined;\n };\n}\n\n/**\n * The public API for rendering the first <Route> that matches.\n */\n\nvar Switch = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Switch, _React$Component);\n\n function Switch() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = Switch.prototype;\n\n _proto.render = function render() {\n var _this = this;\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Consumer, null, function (context) {\n !context ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You should not use <Switch> outside a <Router>\") : undefined : void 0;\n var location = _this.props.location || context.location;\n var element, match; // We use React.Children.forEach instead of React.Children.toArray().find()\n // here because toArray adds keys to all child elements and we do not want\n // to trigger an unmount/remount for two <Route>s that render the same\n // component at different URLs.\n\n react__WEBPACK_IMPORTED_MODULE_1___default.a.Children.forEach(_this.props.children, function (child) {\n if (match == null && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.isValidElement(child)) {\n element = child;\n var path = child.props.path || child.props.from;\n match = path ? matchPath(location.pathname, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, child.props, {\n path: path\n })) : context.match;\n }\n });\n return match ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(element, {\n location: location,\n computedMatch: match\n }) : null;\n });\n };\n\n return Switch;\n}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);\n\nif (true) {\n Switch.propTypes = {\n children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.node,\n location: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object\n };\n\n Switch.prototype.componentDidUpdate = function (prevProps) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!(this.props.location && !prevProps.location), '<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.') : undefined;\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(!(!this.props.location && prevProps.location), '<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.') : undefined;\n };\n}\n\n/**\n * A public higher-order component to access the imperative API\n */\n\nfunction withRouter(Component) {\n var displayName = \"withRouter(\" + (Component.displayName || Component.name) + \")\";\n\n var C = function C(props) {\n var wrappedComponentRef = props.wrappedComponentRef,\n remainingProps = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(props, [\"wrappedComponentRef\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Consumer, null, function (context) {\n !context ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You should not use <\" + displayName + \" /> outside a <Router>\") : undefined : void 0;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, remainingProps, context, {\n ref: wrappedComponentRef\n }));\n });\n };\n\n C.displayName = displayName;\n C.WrappedComponent = Component;\n\n if (true) {\n C.propTypes = {\n wrappedComponentRef: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object])\n };\n }\n\n return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_11___default()(C, Component);\n}\n\nvar useContext = react__WEBPACK_IMPORTED_MODULE_1___default.a.useContext;\nfunction useHistory() {\n if (true) {\n !(typeof useContext === \"function\") ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You must use React >= 16.8 in order to use useHistory()\") : undefined : void 0;\n }\n\n return useContext(historyContext);\n}\nfunction useLocation() {\n if (true) {\n !(typeof useContext === \"function\") ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You must use React >= 16.8 in order to use useLocation()\") : undefined : void 0;\n }\n\n return useContext(context).location;\n}\nfunction useParams() {\n if (true) {\n !(typeof useContext === \"function\") ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You must use React >= 16.8 in order to use useParams()\") : undefined : void 0;\n }\n\n var match = useContext(context).match;\n return match ? match.params : {};\n}\nfunction useRouteMatch(path) {\n if (true) {\n !(typeof useContext === \"function\") ? true ? Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(false, \"You must use React >= 16.8 in order to use useRouteMatch()\") : undefined : void 0;\n }\n\n var location = useLocation();\n var match = useContext(context).match;\n return path ? matchPath(location.pathname, path) : match;\n}\n\nif (true) {\n if (typeof window !== \"undefined\") {\n var global = window;\n var key = \"__react_router_build__\";\n var buildNames = {\n cjs: \"CommonJS\",\n esm: \"ES modules\",\n umd: \"UMD\"\n };\n\n if (global[key] && global[key] !== \"esm\") {\n var initialBuildName = buildNames[global[key]];\n var secondaryBuildName = buildNames[\"esm\"]; // TODO: Add link to article that explains in detail how to avoid\n // loading 2 different builds.\n\n throw new Error(\"You are loading the \" + secondaryBuildName + \" build of React Router \" + (\"on a page that is already running the \" + initialBuildName + \" \") + \"build, so things won't work right.\");\n }\n\n global[key] = \"esm\";\n }\n}\n\n\n//# sourceMappingURL=react-router.js.map\n\n\n//# sourceURL=webpack:///./node_modules/react-router/esm/react-router.js?");
|
|
30793
30805
|
|
|
30794
30806
|
/***/ }),
|
|
30795
30807
|
|
|
@@ -36848,7 +36860,7 @@ eval("class Node {\n\t/// value;\n\t/// next;\n\n\tconstructor(value) {\n\t\tthi
|
|
|
36848
36860
|
/*! exports provided: name, productName, description, homepage, version, main, copyright, license, author, scripts, config, engines, jest, build, dependencies, devDependencies, default */
|
|
36849
36861
|
/***/ (function(module) {
|
|
36850
36862
|
|
|
36851
|
-
eval("module.exports = JSON.parse(\"{\\\"name\\\":\\\"open-lens\\\",\\\"productName\\\":\\\"OpenLens\\\",\\\"description\\\":\\\"OpenLens - Open Source IDE for Kubernetes\\\",\\\"homepage\\\":\\\"https://github.com/lensapp/lens\\\",\\\"version\\\":\\\"5.3.0-alpha.2\\\",\\\"main\\\":\\\"static/build/main.js\\\",\\\"copyright\\\":\\\"© 2021 OpenLens Authors\\\",\\\"license\\\":\\\"MIT\\\",\\\"author\\\":{\\\"name\\\":\\\"OpenLens Authors\\\",\\\"email\\\":\\\"info@k8slens.dev\\\"},\\\"scripts\\\":{\\\"dev\\\":\\\"concurrently -i -k \\\\\\\"yarn run dev-run -C\\\\\\\" yarn:dev:*\\\",\\\"dev-build\\\":\\\"concurrently yarn:compile:*\\\",\\\"debug-build\\\":\\\"concurrently yarn:compile:main yarn:compile:extension-types\\\",\\\"dev-run\\\":\\\"nodemon --watch static/build/main.js --exec \\\\\\\"electron --remote-debugging-port=9223 --inspect .\\\\\\\"\\\",\\\"dev:main\\\":\\\"yarn run compile:main --watch\\\",\\\"dev:renderer\\\":\\\"yarn run webpack-dev-server --config webpack.renderer.ts\\\",\\\"dev:extension-types\\\":\\\"yarn run compile:extension-types --watch\\\",\\\"compile\\\":\\\"env NODE_ENV=production concurrently yarn:compile:*\\\",\\\"compile:main\\\":\\\"yarn run webpack --config webpack.main.ts\\\",\\\"compile:renderer\\\":\\\"yarn run webpack --config webpack.renderer.ts\\\",\\\"compile:extension-types\\\":\\\"yarn run webpack --config webpack.extensions.ts\\\",\\\"npm:fix-build-version\\\":\\\"yarn run ts-node build/set_build_version.ts\\\",\\\"npm:fix-package-version\\\":\\\"yarn run ts-node build/set_npm_version.ts\\\",\\\"build:linux\\\":\\\"yarn run compile && electron-builder --linux --dir\\\",\\\"build:mac\\\":\\\"yarn run compile && electron-builder --mac --dir\\\",\\\"build:win\\\":\\\"yarn run compile && electron-builder --win --dir\\\",\\\"integration\\\":\\\"jest --runInBand --detectOpenHandles --forceExit integration\\\",\\\"dist\\\":\\\"yarn run compile && electron-builder --publish onTag\\\",\\\"dist:dir\\\":\\\"yarn run dist --dir -c.compression=store -c.mac.identity=null\\\",\\\"download-bins\\\":\\\"concurrently yarn:download:*\\\",\\\"download:kubectl\\\":\\\"yarn run ts-node build/download_kubectl.ts\\\",\\\"download:helm\\\":\\\"yarn run ts-node build/download_helm.ts\\\",\\\"build:tray-icons\\\":\\\"yarn run ts-node build/build_tray_icon.ts\\\",\\\"lint\\\":\\\"PROD=true yarn run eslint --ext js,ts,tsx --max-warnings=0 .\\\",\\\"lint:fix\\\":\\\"yarn run lint --fix\\\",\\\"mkdocs-serve-local\\\":\\\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-serve-local:latest\\\",\\\"verify-docs\\\":\\\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -v ${PWD}:/docs mkdocs-serve-local:latest build --strict\\\",\\\"typedocs-extensions-api\\\":\\\"yarn run typedoc src/extensions/extension-api.ts\\\",\\\"version-checkout\\\":\\\"cat package.json | jq '.version' -r | xargs printf \\\\\\\"release/v%s\\\\\\\" | xargs git checkout -b\\\",\\\"version-commit\\\":\\\"cat package.json | jq '.version' -r | xargs printf \\\\\\\"release v%s\\\\\\\" | git commit --no-edit -s -F -\\\",\\\"version\\\":\\\"yarn run version-checkout && git add package.json && yarn run version-commit\\\",\\\"postversion\\\":\\\"git push --set-upstream ${GIT_REMOTE:-origin} release/v$npm_package_version\\\"},\\\"config\\\":{\\\"bundledKubectlVersion\\\":\\\"1.21.2\\\",\\\"bundledHelmVersion\\\":\\\"3.6.3\\\",\\\"sentryDsn\\\":\\\"\\\"},\\\"engines\\\":{\\\"node\\\":\\\">=14 <15\\\"},\\\"jest\\\":{\\\"collectCoverage\\\":false,\\\"verbose\\\":true,\\\"transform\\\":{\\\"^.+\\\\\\\\.tsx?$\\\":\\\"ts-jest\\\"},\\\"moduleNameMapper\\\":{\\\"\\\\\\\\.(css|scss)$\\\":\\\"<rootDir>/__mocks__/styleMock.ts\\\",\\\"\\\\\\\\.(svg)$\\\":\\\"<rootDir>/__mocks__/imageMock.ts\\\",\\\"src/(.*)\\\":\\\"<rootDir>/__mocks__/windowMock.ts\\\"},\\\"modulePathIgnorePatterns\\\":[\\\"<rootDir>/dist\\\",\\\"<rootDir>/src/extensions/npm\\\"],\\\"setupFiles\\\":[\\\"<rootDir>/src/jest.setup.ts\\\",\\\"jest-canvas-mock\\\"]},\\\"build\\\":{\\\"generateUpdatesFilesForAllChannels\\\":true,\\\"files\\\":[\\\"static/build/main.js\\\"],\\\"afterSign\\\":\\\"build/notarize.js\\\",\\\"extraResources\\\":[{\\\"from\\\":\\\"locales/\\\",\\\"to\\\":\\\"locales/\\\",\\\"filter\\\":\\\"**/*.js\\\"},{\\\"from\\\":\\\"static/\\\",\\\"to\\\":\\\"static/\\\",\\\"filter\\\":\\\"!**/main.js\\\"},{\\\"from\\\":\\\"build/tray\\\",\\\"to\\\":\\\"static/icons\\\",\\\"filter\\\":\\\"*.png\\\"},{\\\"from\\\":\\\"extensions/\\\",\\\"to\\\":\\\"./extensions/\\\",\\\"filter\\\":[\\\"**/*.tgz\\\",\\\"**/package.json\\\",\\\"!**/node_modules\\\"]},{\\\"from\\\":\\\"templates/\\\",\\\"to\\\":\\\"./templates/\\\",\\\"filter\\\":\\\"**/*.yaml\\\"},\\\"LICENSE\\\"],\\\"linux\\\":{\\\"category\\\":\\\"Network\\\",\\\"artifactName\\\":\\\"${productName}-${version}.${arch}.${ext}\\\",\\\"target\\\":[\\\"deb\\\",\\\"rpm\\\",\\\"AppImage\\\"],\\\"extraResources\\\":[{\\\"from\\\":\\\"binaries/client/linux/${arch}/kubectl\\\",\\\"to\\\":\\\"./${arch}/kubectl\\\"},{\\\"from\\\":\\\"binaries/client/${arch}/helm3/helm3\\\",\\\"to\\\":\\\"./helm3/helm3\\\"}]},\\\"mac\\\":{\\\"hardenedRuntime\\\":true,\\\"gatekeeperAssess\\\":false,\\\"entitlements\\\":\\\"build/entitlements.mac.plist\\\",\\\"entitlementsInherit\\\":\\\"build/entitlements.mac.plist\\\",\\\"extraResources\\\":[{\\\"from\\\":\\\"binaries/client/darwin/${arch}/kubectl\\\",\\\"to\\\":\\\"./${arch}/kubectl\\\"},{\\\"from\\\":\\\"binaries/client/${arch}/helm3/helm3\\\",\\\"to\\\":\\\"./helm3/helm3\\\"}]},\\\"win\\\":{\\\"target\\\":[\\\"nsis\\\"],\\\"extraResources\\\":[{\\\"from\\\":\\\"binaries/client/windows/x64/kubectl.exe\\\",\\\"to\\\":\\\"./x64/kubectl.exe\\\"},{\\\"from\\\":\\\"binaries/client/windows/ia32/kubectl.exe\\\",\\\"to\\\":\\\"./ia32/kubectl.exe\\\"},{\\\"from\\\":\\\"binaries/client/x64/helm3/helm3.exe\\\",\\\"to\\\":\\\"./helm3/helm3.exe\\\"}]},\\\"nsis\\\":{\\\"include\\\":\\\"build/installer.nsh\\\",\\\"oneClick\\\":false,\\\"allowToChangeInstallationDirectory\\\":true},\\\"protocols\\\":{\\\"name\\\":\\\"Lens Protocol Handler\\\",\\\"schemes\\\":[\\\"lens\\\"],\\\"role\\\":\\\"Viewer\\\"}},\\\"dependencies\\\":{\\\"@electron/remote\\\":\\\"^1.2.2\\\",\\\"@hapi/call\\\":\\\"^8.0.1\\\",\\\"@hapi/subtext\\\":\\\"^7.0.3\\\",\\\"@kubernetes/client-node\\\":\\\"^0.15.1\\\",\\\"@sentry/electron\\\":\\\"^2.5.0\\\",\\\"@sentry/integrations\\\":\\\"^6.10.0\\\",\\\"abort-controller\\\":\\\"^3.0.0\\\",\\\"array-move\\\":\\\"^3.0.1\\\",\\\"auto-bind\\\":\\\"^4.0.0\\\",\\\"autobind-decorator\\\":\\\"^2.4.0\\\",\\\"await-lock\\\":\\\"^2.1.0\\\",\\\"byline\\\":\\\"^5.0.0\\\",\\\"chalk\\\":\\\"^4.1.0\\\",\\\"chokidar\\\":\\\"^3.4.3\\\",\\\"conf\\\":\\\"^7.1.2\\\",\\\"crypto-js\\\":\\\"^4.1.1\\\",\\\"electron-devtools-installer\\\":\\\"^3.2.0\\\",\\\"electron-updater\\\":\\\"^4.6.0\\\",\\\"electron-window-state\\\":\\\"^5.0.3\\\",\\\"filehound\\\":\\\"^1.17.4\\\",\\\"fs-extra\\\":\\\"^9.0.1\\\",\\\"glob-to-regexp\\\":\\\"^0.4.1\\\",\\\"got\\\":\\\"^11.8.2\\\",\\\"grapheme-splitter\\\":\\\"^1.0.4\\\",\\\"handlebars\\\":\\\"^4.7.7\\\",\\\"http-proxy\\\":\\\"^1.18.1\\\",\\\"immer\\\":\\\"^9.0.6\\\",\\\"joi\\\":\\\"^17.4.2\\\",\\\"js-yaml\\\":\\\"^4.1.0\\\",\\\"jsdom\\\":\\\"^16.7.0\\\",\\\"jsonpath\\\":\\\"^1.1.1\\\",\\\"lodash\\\":\\\"^4.17.15\\\",\\\"mac-ca\\\":\\\"^1.0.6\\\",\\\"marked\\\":\\\"^2.0.3\\\",\\\"md5-file\\\":\\\"^5.0.0\\\",\\\"mobx\\\":\\\"^6.3.0\\\",\\\"mobx-observable-history\\\":\\\"^2.0.1\\\",\\\"mobx-react\\\":\\\"^7.2.0\\\",\\\"mock-fs\\\":\\\"^4.14.0\\\",\\\"moment\\\":\\\"^2.29.1\\\",\\\"moment-timezone\\\":\\\"^0.5.33\\\",\\\"monaco-editor\\\":\\\"^0.26.1\\\",\\\"node-fetch\\\":\\\"^2.6.1\\\",\\\"node-pty\\\":\\\"^0.10.1\\\",\\\"npm\\\":\\\"^6.14.15\\\",\\\"p-limit\\\":\\\"^3.1.0\\\",\\\"path-to-regexp\\\":\\\"^6.2.0\\\",\\\"proper-lockfile\\\":\\\"^4.1.2\\\",\\\"react\\\":\\\"^17.0.2\\\",\\\"react-dom\\\":\\\"^17.0.2\\\",\\\"react-material-ui-carousel\\\":\\\"^2.3.1\\\",\\\"react-monaco-editor\\\":\\\"^0.44.0\\\",\\\"react-router\\\":\\\"^5.2.0\\\",\\\"react-virtualized-auto-sizer\\\":\\\"^1.0.6\\\",\\\"readable-stream\\\":\\\"^3.6.0\\\",\\\"request\\\":\\\"^2.88.2\\\",\\\"request-promise-native\\\":\\\"^1.0.9\\\",\\\"rfc6902\\\":\\\"^4.0.2\\\",\\\"semver\\\":\\\"^7.3.2\\\",\\\"serializr\\\":\\\"^2.0.5\\\",\\\"shell-env\\\":\\\"^3.0.1\\\",\\\"spdy\\\":\\\"^4.0.2\\\",\\\"tar\\\":\\\"^6.1.10\\\",\\\"tcp-port-used\\\":\\\"^1.0.2\\\",\\\"tempy\\\":\\\"1.0.1\\\",\\\"url-parse\\\":\\\"^1.5.3\\\",\\\"uuid\\\":\\\"^8.3.2\\\",\\\"win-ca\\\":\\\"^3.4.5\\\",\\\"winston\\\":\\\"^3.3.3\\\",\\\"winston-console-format\\\":\\\"^1.0.8\\\",\\\"winston-transport-browserconsole\\\":\\\"^1.0.5\\\",\\\"ws\\\":\\\"^7.5.5\\\"},\\\"devDependencies\\\":{\\\"@emeraldpay/hashicon-react\\\":\\\"^0.4.0\\\",\\\"@material-ui/core\\\":\\\"^4.12.3\\\",\\\"@material-ui/icons\\\":\\\"^4.11.2\\\",\\\"@material-ui/lab\\\":\\\"^4.0.0-alpha.60\\\",\\\"@pmmmwh/react-refresh-webpack-plugin\\\":\\\"^0.4.3\\\",\\\"@sentry/react\\\":\\\"^6.13.3\\\",\\\"@sentry/types\\\":\\\"^6.8.0\\\",\\\"@testing-library/dom\\\":\\\"^8.9.0\\\",\\\"@testing-library/jest-dom\\\":\\\"^5.14.1\\\",\\\"@testing-library/react\\\":\\\"^11.2.6\\\",\\\"@testing-library/user-event\\\":\\\"^13.2.1\\\",\\\"@types/byline\\\":\\\"^4.2.33\\\",\\\"@types/chart.js\\\":\\\"^2.9.34\\\",\\\"@types/color\\\":\\\"^3.0.2\\\",\\\"@types/crypto-js\\\":\\\"^3.1.47\\\",\\\"@types/dompurify\\\":\\\"^2.3.1\\\",\\\"@types/electron-devtools-installer\\\":\\\"^2.2.0\\\",\\\"@types/fs-extra\\\":\\\"^9.0.1\\\",\\\"@types/glob-to-regexp\\\":\\\"^0.4.1\\\",\\\"@types/hapi\\\":\\\"^18.0.6\\\",\\\"@types/hoist-non-react-statics\\\":\\\"^3.3.1\\\",\\\"@types/html-webpack-plugin\\\":\\\"^3.2.6\\\",\\\"@types/http-proxy\\\":\\\"^1.17.7\\\",\\\"@types/jest\\\":\\\"^26.0.24\\\",\\\"@types/js-yaml\\\":\\\"^4.0.2\\\",\\\"@types/jsdom\\\":\\\"^16.2.13\\\",\\\"@types/jsonpath\\\":\\\"^0.2.0\\\",\\\"@types/lodash\\\":\\\"^4.14.155\\\",\\\"@types/marked\\\":\\\"^2.0.4\\\",\\\"@types/md5-file\\\":\\\"^4.0.2\\\",\\\"@types/mini-css-extract-plugin\\\":\\\"^0.9.1\\\",\\\"@types/mock-fs\\\":\\\"^4.13.1\\\",\\\"@types/module-alias\\\":\\\"^2.0.1\\\",\\\"@types/node\\\":\\\"14.17.26\\\",\\\"@types/node-fetch\\\":\\\"^2.5.12\\\",\\\"@types/npm\\\":\\\"^2.0.32\\\",\\\"@types/progress-bar-webpack-plugin\\\":\\\"^2.1.2\\\",\\\"@types/proper-lockfile\\\":\\\"^4.1.2\\\",\\\"@types/randomcolor\\\":\\\"^0.5.6\\\",\\\"@types/react\\\":\\\"^17.0.29\\\",\\\"@types/react-beautiful-dnd\\\":\\\"^13.1.1\\\",\\\"@types/react-dom\\\":\\\"^17.0.9\\\",\\\"@types/react-router-dom\\\":\\\"^5.3.1\\\",\\\"@types/react-select\\\":\\\"3.1.2\\\",\\\"@types/react-table\\\":\\\"^7.7.6\\\",\\\"@types/react-virtualized-auto-sizer\\\":\\\"^1.0.1\\\",\\\"@types/react-window\\\":\\\"^1.8.5\\\",\\\"@types/readable-stream\\\":\\\"^2.3.11\\\",\\\"@types/request\\\":\\\"^2.48.7\\\",\\\"@types/request-promise-native\\\":\\\"^1.0.18\\\",\\\"@types/semver\\\":\\\"^7.2.0\\\",\\\"@types/sharp\\\":\\\"^0.28.3\\\",\\\"@types/spdy\\\":\\\"^3.4.4\\\",\\\"@types/tar\\\":\\\"^4.0.5\\\",\\\"@types/tcp-port-used\\\":\\\"^1.0.0\\\",\\\"@types/tempy\\\":\\\"^0.3.0\\\",\\\"@types/triple-beam\\\":\\\"^1.3.2\\\",\\\"@types/url-parse\\\":\\\"^1.4.4\\\",\\\"@types/uuid\\\":\\\"^8.3.1\\\",\\\"@types/webdriverio\\\":\\\"^4.13.0\\\",\\\"@types/webpack\\\":\\\"^4.41.31\\\",\\\"@types/webpack-dev-server\\\":\\\"^3.11.6\\\",\\\"@types/webpack-env\\\":\\\"^1.16.2\\\",\\\"@types/webpack-node-externals\\\":\\\"^1.7.1\\\",\\\"@typescript-eslint/eslint-plugin\\\":\\\"^4.33.0\\\",\\\"@typescript-eslint/parser\\\":\\\"^4.29.1\\\",\\\"ansi_up\\\":\\\"^5.0.1\\\",\\\"chart.js\\\":\\\"^2.9.4\\\",\\\"circular-dependency-plugin\\\":\\\"^5.2.2\\\",\\\"color\\\":\\\"^3.1.2\\\",\\\"concurrently\\\":\\\"^5.3.0\\\",\\\"css-loader\\\":\\\"^5.2.7\\\",\\\"deepdash\\\":\\\"^5.3.9\\\",\\\"dompurify\\\":\\\"^2.3.3\\\",\\\"electron\\\":\\\"^13.5.1\\\",\\\"electron-builder\\\":\\\"^22.11.11\\\",\\\"electron-notarize\\\":\\\"^0.3.0\\\",\\\"esbuild\\\":\\\"^0.12.24\\\",\\\"esbuild-loader\\\":\\\"^2.15.1\\\",\\\"eslint\\\":\\\"^7.32.0\\\",\\\"eslint-plugin-header\\\":\\\"^3.1.1\\\",\\\"eslint-plugin-react\\\":\\\"^7.26.1\\\",\\\"eslint-plugin-react-hooks\\\":\\\"^4.2.0\\\",\\\"eslint-plugin-unused-imports\\\":\\\"^1.0.1\\\",\\\"file-loader\\\":\\\"^6.2.0\\\",\\\"flex.box\\\":\\\"^3.4.4\\\",\\\"fork-ts-checker-webpack-plugin\\\":\\\"^5.2.1\\\",\\\"hoist-non-react-statics\\\":\\\"^3.3.2\\\",\\\"html-webpack-plugin\\\":\\\"^4.5.2\\\",\\\"identity-obj-proxy\\\":\\\"^3.0.0\\\",\\\"include-media\\\":\\\"^1.4.9\\\",\\\"jest\\\":\\\"26.6.3\\\",\\\"jest-canvas-mock\\\":\\\"^2.3.1\\\",\\\"jest-fetch-mock\\\":\\\"^3.0.3\\\",\\\"jest-mock-extended\\\":\\\"^1.0.18\\\",\\\"make-plural\\\":\\\"^6.2.2\\\",\\\"mini-css-extract-plugin\\\":\\\"^1.6.2\\\",\\\"node-gyp\\\":\\\"7.1.2\\\",\\\"node-loader\\\":\\\"^1.0.3\\\",\\\"nodemon\\\":\\\"^2.0.13\\\",\\\"playwright\\\":\\\"^1.15.2\\\",\\\"postcss\\\":\\\"^8.3.6\\\",\\\"postcss-loader\\\":\\\"4.3.0\\\",\\\"postinstall-postinstall\\\":\\\"^2.1.0\\\",\\\"progress-bar-webpack-plugin\\\":\\\"^2.1.0\\\",\\\"randomcolor\\\":\\\"^0.6.2\\\",\\\"raw-loader\\\":\\\"^4.0.2\\\",\\\"react-beautiful-dnd\\\":\\\"^13.1.0\\\",\\\"react-refresh\\\":\\\"^0.9.0\\\",\\\"react-router-dom\\\":\\\"^5.2.0\\\",\\\"react-select\\\":\\\"3.2.0\\\",\\\"react-select-event\\\":\\\"^5.1.0\\\",\\\"react-table\\\":\\\"^7.7.0\\\",\\\"react-window\\\":\\\"^1.8.5\\\",\\\"sass\\\":\\\"^1.43.2\\\",\\\"sass-loader\\\":\\\"^8.0.2\\\",\\\"sharp\\\":\\\"^0.29.1\\\",\\\"style-loader\\\":\\\"^2.0.0\\\",\\\"tailwindcss\\\":\\\"^2.2.17\\\",\\\"ts-jest\\\":\\\"26.5.6\\\",\\\"ts-loader\\\":\\\"^7.0.5\\\",\\\"ts-node\\\":\\\"^10.2.1\\\",\\\"type-fest\\\":\\\"^1.0.2\\\",\\\"typed-emitter\\\":\\\"^1.3.1\\\",\\\"typedoc\\\":\\\"0.22.5\\\",\\\"typedoc-plugin-markdown\\\":\\\"^3.11.3\\\",\\\"typeface-roboto\\\":\\\"^1.1.13\\\",\\\"typescript\\\":\\\"^4.4.3\\\",\\\"typescript-plugin-css-modules\\\":\\\"^3.4.0\\\",\\\"url-loader\\\":\\\"^4.1.1\\\",\\\"webpack\\\":\\\"^4.46.0\\\",\\\"webpack-cli\\\":\\\"^3.3.12\\\",\\\"webpack-dev-server\\\":\\\"^3.11.2\\\",\\\"webpack-node-externals\\\":\\\"^1.7.2\\\",\\\"what-input\\\":\\\"^5.2.10\\\",\\\"xterm\\\":\\\"^4.12.0\\\",\\\"xterm-addon-fit\\\":\\\"^0.5.0\\\"}}\");\n\n//# sourceURL=webpack:///./package.json?");
|
|
36863
|
+
eval("module.exports = JSON.parse(\"{\\\"name\\\":\\\"open-lens\\\",\\\"productName\\\":\\\"OpenLens\\\",\\\"description\\\":\\\"OpenLens - Open Source IDE for Kubernetes\\\",\\\"homepage\\\":\\\"https://github.com/lensapp/lens\\\",\\\"version\\\":\\\"5.3.0-alpha.2\\\",\\\"main\\\":\\\"static/build/main.js\\\",\\\"copyright\\\":\\\"© 2021 OpenLens Authors\\\",\\\"license\\\":\\\"MIT\\\",\\\"author\\\":{\\\"name\\\":\\\"OpenLens Authors\\\",\\\"email\\\":\\\"info@k8slens.dev\\\"},\\\"scripts\\\":{\\\"dev\\\":\\\"concurrently -i -k \\\\\\\"yarn run dev-run -C\\\\\\\" yarn:dev:*\\\",\\\"dev-build\\\":\\\"concurrently yarn:compile:*\\\",\\\"debug-build\\\":\\\"concurrently yarn:compile:main yarn:compile:extension-types\\\",\\\"dev-run\\\":\\\"nodemon --watch static/build/main.js --exec \\\\\\\"electron --remote-debugging-port=9223 --inspect .\\\\\\\"\\\",\\\"dev:main\\\":\\\"yarn run compile:main --watch\\\",\\\"dev:renderer\\\":\\\"yarn run webpack-dev-server --config webpack.renderer.ts\\\",\\\"dev:extension-types\\\":\\\"yarn run compile:extension-types --watch\\\",\\\"compile\\\":\\\"env NODE_ENV=production concurrently yarn:compile:*\\\",\\\"compile:main\\\":\\\"yarn run webpack --config webpack.main.ts\\\",\\\"compile:renderer\\\":\\\"yarn run webpack --config webpack.renderer.ts\\\",\\\"compile:extension-types\\\":\\\"yarn run webpack --config webpack.extensions.ts\\\",\\\"npm:fix-build-version\\\":\\\"yarn run ts-node build/set_build_version.ts\\\",\\\"npm:fix-package-version\\\":\\\"yarn run ts-node build/set_npm_version.ts\\\",\\\"build:linux\\\":\\\"yarn run compile && electron-builder --linux --dir\\\",\\\"build:mac\\\":\\\"yarn run compile && electron-builder --mac --dir\\\",\\\"build:win\\\":\\\"yarn run compile && electron-builder --win --dir\\\",\\\"integration\\\":\\\"jest --runInBand --detectOpenHandles --forceExit integration\\\",\\\"dist\\\":\\\"yarn run compile && electron-builder --publish onTag\\\",\\\"dist:dir\\\":\\\"yarn run dist --dir -c.compression=store -c.mac.identity=null\\\",\\\"download-bins\\\":\\\"concurrently yarn:download:*\\\",\\\"download:kubectl\\\":\\\"yarn run ts-node build/download_kubectl.ts\\\",\\\"download:helm\\\":\\\"yarn run ts-node build/download_helm.ts\\\",\\\"build:tray-icons\\\":\\\"yarn run ts-node build/build_tray_icon.ts\\\",\\\"lint\\\":\\\"PROD=true yarn run eslint --ext js,ts,tsx --max-warnings=0 .\\\",\\\"lint:fix\\\":\\\"yarn run lint --fix\\\",\\\"mkdocs-serve-local\\\":\\\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-serve-local:latest\\\",\\\"verify-docs\\\":\\\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -v ${PWD}:/docs mkdocs-serve-local:latest build --strict\\\",\\\"typedocs-extensions-api\\\":\\\"yarn run typedoc src/extensions/extension-api.ts\\\",\\\"version-checkout\\\":\\\"cat package.json | jq '.version' -r | xargs printf \\\\\\\"release/v%s\\\\\\\" | xargs git checkout -b\\\",\\\"version-commit\\\":\\\"cat package.json | jq '.version' -r | xargs printf \\\\\\\"release v%s\\\\\\\" | git commit --no-edit -s -F -\\\",\\\"version\\\":\\\"yarn run version-checkout && git add package.json && yarn run version-commit\\\",\\\"postversion\\\":\\\"git push --set-upstream ${GIT_REMOTE:-origin} release/v$npm_package_version\\\"},\\\"config\\\":{\\\"bundledKubectlVersion\\\":\\\"1.21.2\\\",\\\"bundledHelmVersion\\\":\\\"3.6.3\\\",\\\"sentryDsn\\\":\\\"\\\"},\\\"engines\\\":{\\\"node\\\":\\\">=14 <15\\\"},\\\"jest\\\":{\\\"collectCoverage\\\":false,\\\"verbose\\\":true,\\\"transform\\\":{\\\"^.+\\\\\\\\.tsx?$\\\":\\\"ts-jest\\\"},\\\"moduleNameMapper\\\":{\\\"\\\\\\\\.(css|scss)$\\\":\\\"<rootDir>/__mocks__/styleMock.ts\\\",\\\"\\\\\\\\.(svg)$\\\":\\\"<rootDir>/__mocks__/imageMock.ts\\\",\\\"src/(.*)\\\":\\\"<rootDir>/__mocks__/windowMock.ts\\\"},\\\"modulePathIgnorePatterns\\\":[\\\"<rootDir>/dist\\\",\\\"<rootDir>/src/extensions/npm\\\"],\\\"setupFiles\\\":[\\\"<rootDir>/src/jest.setup.ts\\\",\\\"jest-canvas-mock\\\"]},\\\"build\\\":{\\\"generateUpdatesFilesForAllChannels\\\":true,\\\"files\\\":[\\\"static/build/main.js\\\"],\\\"afterSign\\\":\\\"build/notarize.js\\\",\\\"extraResources\\\":[{\\\"from\\\":\\\"locales/\\\",\\\"to\\\":\\\"locales/\\\",\\\"filter\\\":\\\"**/*.js\\\"},{\\\"from\\\":\\\"static/\\\",\\\"to\\\":\\\"static/\\\",\\\"filter\\\":\\\"!**/main.js\\\"},{\\\"from\\\":\\\"build/tray\\\",\\\"to\\\":\\\"static/icons\\\",\\\"filter\\\":\\\"*.png\\\"},{\\\"from\\\":\\\"extensions/\\\",\\\"to\\\":\\\"./extensions/\\\",\\\"filter\\\":[\\\"**/*.tgz\\\",\\\"**/package.json\\\",\\\"!**/node_modules\\\"]},{\\\"from\\\":\\\"templates/\\\",\\\"to\\\":\\\"./templates/\\\",\\\"filter\\\":\\\"**/*.yaml\\\"},\\\"LICENSE\\\"],\\\"linux\\\":{\\\"category\\\":\\\"Network\\\",\\\"artifactName\\\":\\\"${productName}-${version}.${arch}.${ext}\\\",\\\"target\\\":[\\\"deb\\\",\\\"rpm\\\",\\\"AppImage\\\"],\\\"extraResources\\\":[{\\\"from\\\":\\\"binaries/client/linux/${arch}/kubectl\\\",\\\"to\\\":\\\"./${arch}/kubectl\\\"},{\\\"from\\\":\\\"binaries/client/${arch}/helm3/helm3\\\",\\\"to\\\":\\\"./helm3/helm3\\\"}]},\\\"mac\\\":{\\\"hardenedRuntime\\\":true,\\\"gatekeeperAssess\\\":false,\\\"entitlements\\\":\\\"build/entitlements.mac.plist\\\",\\\"entitlementsInherit\\\":\\\"build/entitlements.mac.plist\\\",\\\"extraResources\\\":[{\\\"from\\\":\\\"binaries/client/darwin/${arch}/kubectl\\\",\\\"to\\\":\\\"./${arch}/kubectl\\\"},{\\\"from\\\":\\\"binaries/client/${arch}/helm3/helm3\\\",\\\"to\\\":\\\"./helm3/helm3\\\"}]},\\\"win\\\":{\\\"target\\\":[\\\"nsis\\\"],\\\"extraResources\\\":[{\\\"from\\\":\\\"binaries/client/windows/x64/kubectl.exe\\\",\\\"to\\\":\\\"./x64/kubectl.exe\\\"},{\\\"from\\\":\\\"binaries/client/windows/ia32/kubectl.exe\\\",\\\"to\\\":\\\"./ia32/kubectl.exe\\\"},{\\\"from\\\":\\\"binaries/client/x64/helm3/helm3.exe\\\",\\\"to\\\":\\\"./helm3/helm3.exe\\\"}]},\\\"nsis\\\":{\\\"include\\\":\\\"build/installer.nsh\\\",\\\"oneClick\\\":false,\\\"allowToChangeInstallationDirectory\\\":true},\\\"protocols\\\":{\\\"name\\\":\\\"Lens Protocol Handler\\\",\\\"schemes\\\":[\\\"lens\\\"],\\\"role\\\":\\\"Viewer\\\"}},\\\"dependencies\\\":{\\\"@electron/remote\\\":\\\"^1.2.2\\\",\\\"@hapi/call\\\":\\\"^8.0.1\\\",\\\"@hapi/subtext\\\":\\\"^7.0.3\\\",\\\"@kubernetes/client-node\\\":\\\"^0.15.1\\\",\\\"@sentry/electron\\\":\\\"^2.5.0\\\",\\\"@sentry/integrations\\\":\\\"^6.10.0\\\",\\\"abort-controller\\\":\\\"^3.0.0\\\",\\\"array-move\\\":\\\"^3.0.1\\\",\\\"auto-bind\\\":\\\"^4.0.0\\\",\\\"autobind-decorator\\\":\\\"^2.4.0\\\",\\\"await-lock\\\":\\\"^2.1.0\\\",\\\"byline\\\":\\\"^5.0.0\\\",\\\"chalk\\\":\\\"^4.1.0\\\",\\\"chokidar\\\":\\\"^3.4.3\\\",\\\"conf\\\":\\\"^7.1.2\\\",\\\"crypto-js\\\":\\\"^4.1.1\\\",\\\"electron-devtools-installer\\\":\\\"^3.2.0\\\",\\\"electron-updater\\\":\\\"^4.6.0\\\",\\\"electron-window-state\\\":\\\"^5.0.3\\\",\\\"filehound\\\":\\\"^1.17.4\\\",\\\"fs-extra\\\":\\\"^9.0.1\\\",\\\"glob-to-regexp\\\":\\\"^0.4.1\\\",\\\"got\\\":\\\"^11.8.2\\\",\\\"grapheme-splitter\\\":\\\"^1.0.4\\\",\\\"handlebars\\\":\\\"^4.7.7\\\",\\\"http-proxy\\\":\\\"^1.18.1\\\",\\\"immer\\\":\\\"^9.0.6\\\",\\\"joi\\\":\\\"^17.4.2\\\",\\\"js-yaml\\\":\\\"^4.1.0\\\",\\\"jsdom\\\":\\\"^16.7.0\\\",\\\"jsonpath\\\":\\\"^1.1.1\\\",\\\"lodash\\\":\\\"^4.17.15\\\",\\\"mac-ca\\\":\\\"^1.0.6\\\",\\\"marked\\\":\\\"^2.1.3\\\",\\\"md5-file\\\":\\\"^5.0.0\\\",\\\"mobx\\\":\\\"^6.3.0\\\",\\\"mobx-observable-history\\\":\\\"^2.0.1\\\",\\\"mobx-react\\\":\\\"^7.2.0\\\",\\\"mock-fs\\\":\\\"^4.14.0\\\",\\\"moment\\\":\\\"^2.29.1\\\",\\\"moment-timezone\\\":\\\"^0.5.33\\\",\\\"monaco-editor\\\":\\\"^0.26.1\\\",\\\"node-fetch\\\":\\\"^2.6.1\\\",\\\"node-pty\\\":\\\"^0.10.1\\\",\\\"npm\\\":\\\"^6.14.15\\\",\\\"p-limit\\\":\\\"^3.1.0\\\",\\\"path-to-regexp\\\":\\\"^6.2.0\\\",\\\"proper-lockfile\\\":\\\"^4.1.2\\\",\\\"react\\\":\\\"^17.0.2\\\",\\\"react-dom\\\":\\\"^17.0.2\\\",\\\"react-material-ui-carousel\\\":\\\"^2.3.5\\\",\\\"react-monaco-editor\\\":\\\"^0.44.0\\\",\\\"react-router\\\":\\\"^5.2.0\\\",\\\"react-virtualized-auto-sizer\\\":\\\"^1.0.6\\\",\\\"readable-stream\\\":\\\"^3.6.0\\\",\\\"request\\\":\\\"^2.88.2\\\",\\\"request-promise-native\\\":\\\"^1.0.9\\\",\\\"rfc6902\\\":\\\"^4.0.2\\\",\\\"semver\\\":\\\"^7.3.2\\\",\\\"serializr\\\":\\\"^2.0.5\\\",\\\"shell-env\\\":\\\"^3.0.1\\\",\\\"spdy\\\":\\\"^4.0.2\\\",\\\"tar\\\":\\\"^6.1.10\\\",\\\"tcp-port-used\\\":\\\"^1.0.2\\\",\\\"tempy\\\":\\\"1.0.1\\\",\\\"url-parse\\\":\\\"^1.5.3\\\",\\\"uuid\\\":\\\"^8.3.2\\\",\\\"win-ca\\\":\\\"^3.4.5\\\",\\\"winston\\\":\\\"^3.3.3\\\",\\\"winston-console-format\\\":\\\"^1.0.8\\\",\\\"winston-transport-browserconsole\\\":\\\"^1.0.5\\\",\\\"ws\\\":\\\"^7.5.5\\\"},\\\"devDependencies\\\":{\\\"@material-ui/core\\\":\\\"^4.12.3\\\",\\\"@material-ui/icons\\\":\\\"^4.11.2\\\",\\\"@material-ui/lab\\\":\\\"^4.0.0-alpha.60\\\",\\\"@pmmmwh/react-refresh-webpack-plugin\\\":\\\"^0.4.3\\\",\\\"@sentry/react\\\":\\\"^6.13.3\\\",\\\"@sentry/types\\\":\\\"^6.8.0\\\",\\\"@testing-library/dom\\\":\\\"^8.9.0\\\",\\\"@testing-library/jest-dom\\\":\\\"^5.14.1\\\",\\\"@testing-library/react\\\":\\\"^11.2.6\\\",\\\"@testing-library/user-event\\\":\\\"^13.5.0\\\",\\\"@types/byline\\\":\\\"^4.2.33\\\",\\\"@types/chart.js\\\":\\\"^2.9.34\\\",\\\"@types/color\\\":\\\"^3.0.2\\\",\\\"@types/crypto-js\\\":\\\"^3.1.47\\\",\\\"@types/dompurify\\\":\\\"^2.3.1\\\",\\\"@types/electron-devtools-installer\\\":\\\"^2.2.0\\\",\\\"@types/fs-extra\\\":\\\"^9.0.1\\\",\\\"@types/glob-to-regexp\\\":\\\"^0.4.1\\\",\\\"@types/hapi\\\":\\\"^18.0.6\\\",\\\"@types/hoist-non-react-statics\\\":\\\"^3.3.1\\\",\\\"@types/html-webpack-plugin\\\":\\\"^3.2.6\\\",\\\"@types/http-proxy\\\":\\\"^1.17.7\\\",\\\"@types/jest\\\":\\\"^26.0.24\\\",\\\"@types/js-yaml\\\":\\\"^4.0.2\\\",\\\"@types/jsdom\\\":\\\"^16.2.13\\\",\\\"@types/jsonpath\\\":\\\"^0.2.0\\\",\\\"@types/lodash\\\":\\\"^4.14.155\\\",\\\"@types/marked\\\":\\\"^2.0.4\\\",\\\"@types/md5-file\\\":\\\"^4.0.2\\\",\\\"@types/mini-css-extract-plugin\\\":\\\"^0.9.1\\\",\\\"@types/mock-fs\\\":\\\"^4.13.1\\\",\\\"@types/module-alias\\\":\\\"^2.0.1\\\",\\\"@types/node\\\":\\\"14.17.27\\\",\\\"@types/node-fetch\\\":\\\"^2.5.12\\\",\\\"@types/npm\\\":\\\"^2.0.32\\\",\\\"@types/progress-bar-webpack-plugin\\\":\\\"^2.1.2\\\",\\\"@types/proper-lockfile\\\":\\\"^4.1.2\\\",\\\"@types/randomcolor\\\":\\\"^0.5.6\\\",\\\"@types/react\\\":\\\"^17.0.29\\\",\\\"@types/react-beautiful-dnd\\\":\\\"^13.1.2\\\",\\\"@types/react-dom\\\":\\\"^17.0.9\\\",\\\"@types/react-router-dom\\\":\\\"^5.3.1\\\",\\\"@types/react-select\\\":\\\"3.1.2\\\",\\\"@types/react-table\\\":\\\"^7.7.7\\\",\\\"@types/react-virtualized-auto-sizer\\\":\\\"^1.0.1\\\",\\\"@types/react-window\\\":\\\"^1.8.5\\\",\\\"@types/readable-stream\\\":\\\"^2.3.11\\\",\\\"@types/request\\\":\\\"^2.48.7\\\",\\\"@types/request-promise-native\\\":\\\"^1.0.18\\\",\\\"@types/semver\\\":\\\"^7.2.0\\\",\\\"@types/sharp\\\":\\\"^0.28.3\\\",\\\"@types/spdy\\\":\\\"^3.4.4\\\",\\\"@types/tar\\\":\\\"^4.0.5\\\",\\\"@types/tcp-port-used\\\":\\\"^1.0.0\\\",\\\"@types/tempy\\\":\\\"^0.3.0\\\",\\\"@types/triple-beam\\\":\\\"^1.3.2\\\",\\\"@types/url-parse\\\":\\\"^1.4.4\\\",\\\"@types/uuid\\\":\\\"^8.3.1\\\",\\\"@types/webdriverio\\\":\\\"^4.13.0\\\",\\\"@types/webpack\\\":\\\"^4.41.31\\\",\\\"@types/webpack-dev-server\\\":\\\"^3.11.6\\\",\\\"@types/webpack-env\\\":\\\"^1.16.3\\\",\\\"@types/webpack-node-externals\\\":\\\"^1.7.1\\\",\\\"@typescript-eslint/eslint-plugin\\\":\\\"^4.33.0\\\",\\\"@typescript-eslint/parser\\\":\\\"^4.29.1\\\",\\\"ansi_up\\\":\\\"^5.0.1\\\",\\\"chart.js\\\":\\\"^2.9.4\\\",\\\"circular-dependency-plugin\\\":\\\"^5.2.2\\\",\\\"color\\\":\\\"^3.1.2\\\",\\\"concurrently\\\":\\\"^5.3.0\\\",\\\"css-loader\\\":\\\"^5.2.7\\\",\\\"deepdash\\\":\\\"^5.3.9\\\",\\\"dompurify\\\":\\\"^2.3.3\\\",\\\"electron\\\":\\\"^13.5.1\\\",\\\"electron-builder\\\":\\\"^22.11.11\\\",\\\"electron-notarize\\\":\\\"^0.3.0\\\",\\\"esbuild\\\":\\\"^0.13.8\\\",\\\"esbuild-loader\\\":\\\"^2.16.0\\\",\\\"eslint\\\":\\\"^7.32.0\\\",\\\"eslint-plugin-header\\\":\\\"^3.1.1\\\",\\\"eslint-plugin-react\\\":\\\"^7.26.1\\\",\\\"eslint-plugin-react-hooks\\\":\\\"^4.2.0\\\",\\\"eslint-plugin-unused-imports\\\":\\\"^1.1.5\\\",\\\"file-loader\\\":\\\"^6.2.0\\\",\\\"flex.box\\\":\\\"^3.4.4\\\",\\\"fork-ts-checker-webpack-plugin\\\":\\\"^5.2.1\\\",\\\"hoist-non-react-statics\\\":\\\"^3.3.2\\\",\\\"html-webpack-plugin\\\":\\\"^4.5.2\\\",\\\"identity-obj-proxy\\\":\\\"^3.0.0\\\",\\\"include-media\\\":\\\"^1.4.9\\\",\\\"jest\\\":\\\"26.6.3\\\",\\\"jest-canvas-mock\\\":\\\"^2.3.1\\\",\\\"jest-fetch-mock\\\":\\\"^3.0.3\\\",\\\"jest-mock-extended\\\":\\\"^1.0.18\\\",\\\"make-plural\\\":\\\"^6.2.2\\\",\\\"mini-css-extract-plugin\\\":\\\"^1.6.2\\\",\\\"node-gyp\\\":\\\"7.1.2\\\",\\\"node-loader\\\":\\\"^1.0.3\\\",\\\"nodemon\\\":\\\"^2.0.13\\\",\\\"playwright\\\":\\\"^1.15.2\\\",\\\"postcss\\\":\\\"^8.3.6\\\",\\\"postcss-loader\\\":\\\"4.3.0\\\",\\\"postinstall-postinstall\\\":\\\"^2.1.0\\\",\\\"progress-bar-webpack-plugin\\\":\\\"^2.1.0\\\",\\\"randomcolor\\\":\\\"^0.6.2\\\",\\\"raw-loader\\\":\\\"^4.0.2\\\",\\\"react-beautiful-dnd\\\":\\\"^13.1.0\\\",\\\"react-refresh\\\":\\\"^0.9.0\\\",\\\"react-router-dom\\\":\\\"^5.3.0\\\",\\\"react-select\\\":\\\"3.2.0\\\",\\\"react-select-event\\\":\\\"^5.1.0\\\",\\\"react-table\\\":\\\"^7.7.0\\\",\\\"react-window\\\":\\\"^1.8.5\\\",\\\"sass\\\":\\\"^1.43.2\\\",\\\"sass-loader\\\":\\\"^8.0.2\\\",\\\"sharp\\\":\\\"^0.29.1\\\",\\\"style-loader\\\":\\\"^2.0.0\\\",\\\"tailwindcss\\\":\\\"^2.2.17\\\",\\\"ts-jest\\\":\\\"26.5.6\\\",\\\"ts-loader\\\":\\\"^7.0.5\\\",\\\"ts-node\\\":\\\"^10.3.0\\\",\\\"type-fest\\\":\\\"^1.0.2\\\",\\\"typed-emitter\\\":\\\"^1.3.1\\\",\\\"typedoc\\\":\\\"0.22.6\\\",\\\"typedoc-plugin-markdown\\\":\\\"^3.11.3\\\",\\\"typeface-roboto\\\":\\\"^1.1.13\\\",\\\"typescript\\\":\\\"^4.4.3\\\",\\\"typescript-plugin-css-modules\\\":\\\"^3.4.0\\\",\\\"url-loader\\\":\\\"^4.1.1\\\",\\\"webpack\\\":\\\"^4.46.0\\\",\\\"webpack-cli\\\":\\\"^3.3.12\\\",\\\"webpack-dev-server\\\":\\\"^3.11.2\\\",\\\"webpack-node-externals\\\":\\\"^1.7.2\\\",\\\"what-input\\\":\\\"^5.2.10\\\",\\\"xterm\\\":\\\"^4.12.0\\\",\\\"xterm-addon-fit\\\":\\\"^0.5.0\\\"}}\");\n\n//# sourceURL=webpack:///./package.json?");
|
|
36852
36864
|
|
|
36853
36865
|
/***/ }),
|
|
36854
36866
|
|
|
@@ -36896,7 +36908,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _gen
|
|
|
36896
36908
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
36897
36909
|
|
|
36898
36910
|
"use strict";
|
|
36899
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"LensKubernetesClusterStatus\", function() { return LensKubernetesClusterStatus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubernetesCluster\", function() { return KubernetesCluster; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"kubernetesClusterCategory\", function() { return kubernetesClusterCategory; });\n/* harmony import */ var _catalog_catalog_category_registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../catalog/catalog-category-registry */ \"./src/common/catalog/catalog-category-registry.ts\");\n/* harmony import */ var _catalog__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../catalog */ \"./src/common/catalog/index.ts\");\n/* harmony import */ var _cluster_ipc__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../cluster-ipc */ \"./src/common/cluster-ipc.ts\");\n/* harmony import */ var _cluster_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../cluster-store */ \"./src/common/cluster-store.ts\");\n/* harmony import */ var _ipc__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ipc */ \"./src/common/ipc/index.ts\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_5__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\n\n\nvar LensKubernetesClusterStatus;\n(function (LensKubernetesClusterStatus) {\n LensKubernetesClusterStatus[\"DELETING\"] = \"deleting\";\n LensKubernetesClusterStatus[\"CONNECTING\"] = \"connecting\";\n LensKubernetesClusterStatus[\"CONNECTED\"] = \"connected\";\n LensKubernetesClusterStatus[\"DISCONNECTED\"] = \"disconnected\";\n})(LensKubernetesClusterStatus || (LensKubernetesClusterStatus = {}));\nclass KubernetesCluster extends _catalog__WEBPACK_IMPORTED_MODULE_1__[\"CatalogEntity\"] {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"apiVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: KubernetesCluster.apiVersion\n });\n Object.defineProperty(this, \"kind\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: KubernetesCluster.kind\n });\n }\n async connect() {\n var _a;\n if (electron__WEBPACK_IMPORTED_MODULE_5__[\"app\"]) {\n await ((_a = _cluster_store__WEBPACK_IMPORTED_MODULE_3__[\"ClusterStore\"].getInstance().getById(this.metadata.uid)) === null || _a === void 0 ? void 0 : _a.activate());\n }\n else {\n await Object(_ipc__WEBPACK_IMPORTED_MODULE_4__[\"requestMain\"])(_cluster_ipc__WEBPACK_IMPORTED_MODULE_2__[\"clusterActivateHandler\"], this.metadata.uid, false);\n }\n }\n async disconnect() {\n var _a;\n if (electron__WEBPACK_IMPORTED_MODULE_5__[\"app\"]) {\n (_a = _cluster_store__WEBPACK_IMPORTED_MODULE_3__[\"ClusterStore\"].getInstance().getById(this.metadata.uid)) === null || _a === void 0 ? void 0 : _a.disconnect();\n }\n else {\n await Object(_ipc__WEBPACK_IMPORTED_MODULE_4__[\"requestMain\"])(_cluster_ipc__WEBPACK_IMPORTED_MODULE_2__[\"clusterDisconnectHandler\"], this.metadata.uid, false);\n }\n }\n async onRun(context) {\n context.navigate(`/cluster/${this.metadata.uid}`);\n }\n onDetailsOpen() {\n //\n }\n onSettingsOpen() {\n //\n }\n async onContextMenuOpen(context) {\n var _a;\n if (!this.metadata.source || this.metadata.source === \"local\") {\n context.menuItems.push({\n title: \"Settings\",\n icon: \"edit\",\n onClick: () =>
|
|
36911
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"LensKubernetesClusterStatus\", function() { return LensKubernetesClusterStatus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubernetesCluster\", function() { return KubernetesCluster; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"kubernetesClusterCategory\", function() { return kubernetesClusterCategory; });\n/* harmony import */ var _catalog_catalog_category_registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../catalog/catalog-category-registry */ \"./src/common/catalog/catalog-category-registry.ts\");\n/* harmony import */ var _catalog__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../catalog */ \"./src/common/catalog/index.ts\");\n/* harmony import */ var _cluster_ipc__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../cluster-ipc */ \"./src/common/cluster-ipc.ts\");\n/* harmony import */ var _cluster_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../cluster-store */ \"./src/common/cluster-store.ts\");\n/* harmony import */ var _ipc__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ipc */ \"./src/common/ipc/index.ts\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _renderer_navigation_events__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../renderer/navigation/events */ \"./src/renderer/navigation/events.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\n\n\n\nvar LensKubernetesClusterStatus;\n(function (LensKubernetesClusterStatus) {\n LensKubernetesClusterStatus[\"DELETING\"] = \"deleting\";\n LensKubernetesClusterStatus[\"CONNECTING\"] = \"connecting\";\n LensKubernetesClusterStatus[\"CONNECTED\"] = \"connected\";\n LensKubernetesClusterStatus[\"DISCONNECTED\"] = \"disconnected\";\n})(LensKubernetesClusterStatus || (LensKubernetesClusterStatus = {}));\nclass KubernetesCluster extends _catalog__WEBPACK_IMPORTED_MODULE_1__[\"CatalogEntity\"] {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"apiVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: KubernetesCluster.apiVersion\n });\n Object.defineProperty(this, \"kind\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: KubernetesCluster.kind\n });\n }\n async connect() {\n var _a;\n if (electron__WEBPACK_IMPORTED_MODULE_5__[\"app\"]) {\n await ((_a = _cluster_store__WEBPACK_IMPORTED_MODULE_3__[\"ClusterStore\"].getInstance().getById(this.metadata.uid)) === null || _a === void 0 ? void 0 : _a.activate());\n }\n else {\n await Object(_ipc__WEBPACK_IMPORTED_MODULE_4__[\"requestMain\"])(_cluster_ipc__WEBPACK_IMPORTED_MODULE_2__[\"clusterActivateHandler\"], this.metadata.uid, false);\n }\n }\n async disconnect() {\n var _a;\n if (electron__WEBPACK_IMPORTED_MODULE_5__[\"app\"]) {\n (_a = _cluster_store__WEBPACK_IMPORTED_MODULE_3__[\"ClusterStore\"].getInstance().getById(this.metadata.uid)) === null || _a === void 0 ? void 0 : _a.disconnect();\n }\n else {\n await Object(_ipc__WEBPACK_IMPORTED_MODULE_4__[\"requestMain\"])(_cluster_ipc__WEBPACK_IMPORTED_MODULE_2__[\"clusterDisconnectHandler\"], this.metadata.uid, false);\n }\n }\n async onRun(context) {\n context.navigate(`/cluster/${this.metadata.uid}`);\n }\n onDetailsOpen() {\n //\n }\n onSettingsOpen() {\n //\n }\n async onContextMenuOpen(context) {\n var _a;\n if (!this.metadata.source || this.metadata.source === \"local\") {\n context.menuItems.push({\n title: \"Settings\",\n icon: \"edit\",\n onClick: () => Object(_ipc__WEBPACK_IMPORTED_MODULE_4__[\"broadcastMessage\"])(_renderer_navigation_events__WEBPACK_IMPORTED_MODULE_6__[\"IpcRendererNavigationEvents\"].NAVIGATE_IN_APP, `/entity/${this.metadata.uid}/settings`),\n });\n }\n switch (this.status.phase) {\n case LensKubernetesClusterStatus.CONNECTED:\n case LensKubernetesClusterStatus.CONNECTING:\n context.menuItems.push({\n title: \"Disconnect\",\n icon: \"link_off\",\n onClick: () => Object(_ipc__WEBPACK_IMPORTED_MODULE_4__[\"requestMain\"])(_cluster_ipc__WEBPACK_IMPORTED_MODULE_2__[\"clusterDisconnectHandler\"], this.metadata.uid)\n });\n break;\n case LensKubernetesClusterStatus.DISCONNECTED:\n context.menuItems.push({\n title: \"Connect\",\n icon: \"link\",\n onClick: () => context.navigate(`/cluster/${this.metadata.uid}`)\n });\n break;\n }\n (_a = _catalog_catalog_category_registry__WEBPACK_IMPORTED_MODULE_0__[\"catalogCategoryRegistry\"]\n .getCategoryForEntity(this)) === null || _a === void 0 ? void 0 : _a.emit(\"contextMenuOpen\", this, context);\n }\n}\nObject.defineProperty(KubernetesCluster, \"apiVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"entity.k8slens.dev/v1alpha1\"\n});\nObject.defineProperty(KubernetesCluster, \"kind\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"KubernetesCluster\"\n});\nclass KubernetesClusterCategory extends _catalog__WEBPACK_IMPORTED_MODULE_1__[\"CatalogCategory\"] {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"apiVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"catalog.k8slens.dev/v1alpha1\"\n });\n Object.defineProperty(this, \"kind\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"CatalogCategory\"\n });\n Object.defineProperty(this, \"metadata\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n name: \"Clusters\",\n icon: __webpack_require__(/*! !raw-loader!./icons/kubernetes.svg */ \"./node_modules/raw-loader/dist/cjs.js!./src/common/catalog-entities/icons/kubernetes.svg\").default, // eslint-disable-line\n }\n });\n Object.defineProperty(this, \"spec\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n group: \"entity.k8slens.dev\",\n versions: [\n {\n name: \"v1alpha1\",\n entityClass: KubernetesCluster\n }\n ],\n names: {\n kind: \"KubernetesCluster\"\n }\n }\n });\n }\n}\nconst kubernetesClusterCategory = new KubernetesClusterCategory();\n_catalog_catalog_category_registry__WEBPACK_IMPORTED_MODULE_0__[\"catalogCategoryRegistry\"].add(kubernetesClusterCategory);\n\n\n//# sourceURL=webpack:///./src/common/catalog-entities/kubernetes-cluster.ts?");
|
|
36900
36912
|
|
|
36901
36913
|
/***/ }),
|
|
36902
36914
|
|
|
@@ -36920,7 +36932,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
36920
36932
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
36921
36933
|
|
|
36922
36934
|
"use strict";
|
|
36923
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CatalogCategoryRegistry\", function() { return CatalogCategoryRegistry; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"catalogCategoryRegistry\", function() { return catalogCategoryRegistry; });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _catalog_entity__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./catalog-entity */ \"./src/common/catalog/catalog-entity.ts\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\nclass CatalogCategoryRegistry {\n constructor() {\n Object.defineProperty(this, \"categories\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].set()\n });\n Object.defineProperty(this, \"groupKinds\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new _utils__WEBPACK_IMPORTED_MODULE_1__[\"ExtendedMap\"]()\n });\n Object.defineProperty(this, \"filters\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].set([], {\n deep: false,\n })\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"makeObservable\"])(this);\n }\n add(category) {\n this.categories.add(category);\n this.groupKinds\n .getOrInsert(category.spec.group, _utils__WEBPACK_IMPORTED_MODULE_1__[\"ExtendedMap\"].new)\n .strictSet(category.spec.names.kind, category);\n return () => {\n this.categories.delete(category);\n this.groupKinds.get(category.spec.group).delete(category.spec.names.kind);\n };\n }\n get items() {\n return Array.from(this.categories);\n }\n get filteredItems() {\n return Array.from(_utils__WEBPACK_IMPORTED_MODULE_1__[\"iter\"].reduce(this.filters, _utils__WEBPACK_IMPORTED_MODULE_1__[\"iter\"].filter, this.items));\n }\n getForGroupKind(group, kind) {\n var _a;\n return (_a = this.groupKinds.get(group)) === null || _a === void 0 ? void 0 : _a.get(kind);\n }\n getEntityForData(data) {\n const category = this.getCategoryForEntity(data);\n if (!category) {\n return null;\n }\n const splitApiVersion = data.apiVersion.split(\"/\");\n const version = splitApiVersion[1];\n const specVersion = category.spec.versions.find((v) => v.name === version);\n if (!specVersion) {\n return null;\n }\n return new specVersion.entityClass(data);\n }\n getCategoryForEntity(data) {\n const splitApiVersion = data.apiVersion.split(\"/\");\n const group = splitApiVersion[0];\n return this.getForGroupKind(group, data.kind);\n }\n getByName(name) {\n return this.items.find(category => { var _a; return ((_a = category.metadata) === null || _a === void 0 ? void 0 : _a.name) == name; });\n }\n /**\n * Add a new filter to the set of category filters\n * @param fn The function that should return a truthy value if that category should be displayed\n * @returns A function to remove that filter\n */\n addCatalogCategoryFilter(fn) {\n this.filters.add(fn);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"once\"])(() => void this.filters.delete(fn));\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [_catalog_entity__WEBPACK_IMPORTED_MODULE_2__[\"CatalogCategory\"]]),\n __metadata(\"design:returntype\", Function)\n], CatalogCategoryRegistry.prototype, \"add\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CatalogCategoryRegistry.prototype, \"items\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CatalogCategoryRegistry.prototype, \"filteredItems\", null);\nconst catalogCategoryRegistry = new CatalogCategoryRegistry();\n\n\n//# sourceURL=webpack:///./src/common/catalog/catalog-category-registry.ts?");
|
|
36935
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CatalogCategoryRegistry\", function() { return CatalogCategoryRegistry; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"catalogCategoryRegistry\", function() { return catalogCategoryRegistry; });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _catalog_entity__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./catalog-entity */ \"./src/common/catalog/catalog-entity.ts\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\nclass CatalogCategoryRegistry {\n constructor() {\n Object.defineProperty(this, \"categories\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].set()\n });\n Object.defineProperty(this, \"groupKinds\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new _utils__WEBPACK_IMPORTED_MODULE_1__[\"ExtendedMap\"]()\n });\n Object.defineProperty(this, \"filters\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].set([], {\n deep: false,\n })\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"makeObservable\"])(this);\n }\n add(category) {\n this.categories.add(category);\n this.groupKinds\n .getOrInsert(category.spec.group, _utils__WEBPACK_IMPORTED_MODULE_1__[\"ExtendedMap\"].new)\n .strictSet(category.spec.names.kind, category);\n return () => {\n this.categories.delete(category);\n this.groupKinds.get(category.spec.group).delete(category.spec.names.kind);\n };\n }\n get items() {\n return Array.from(this.categories);\n }\n get filteredItems() {\n return Array.from(_utils__WEBPACK_IMPORTED_MODULE_1__[\"iter\"].reduce(this.filters, _utils__WEBPACK_IMPORTED_MODULE_1__[\"iter\"].filter, this.items.values()));\n }\n getForGroupKind(group, kind) {\n var _a;\n return (_a = this.groupKinds.get(group)) === null || _a === void 0 ? void 0 : _a.get(kind);\n }\n getEntityForData(data) {\n const category = this.getCategoryForEntity(data);\n if (!category) {\n return null;\n }\n const splitApiVersion = data.apiVersion.split(\"/\");\n const version = splitApiVersion[1];\n const specVersion = category.spec.versions.find((v) => v.name === version);\n if (!specVersion) {\n return null;\n }\n return new specVersion.entityClass(data);\n }\n getCategoryForEntity(data) {\n const splitApiVersion = data.apiVersion.split(\"/\");\n const group = splitApiVersion[0];\n return this.getForGroupKind(group, data.kind);\n }\n getByName(name) {\n return this.items.find(category => { var _a; return ((_a = category.metadata) === null || _a === void 0 ? void 0 : _a.name) == name; });\n }\n /**\n * Add a new filter to the set of category filters\n * @param fn The function that should return a truthy value if that category should be displayed\n * @returns A function to remove that filter\n */\n addCatalogCategoryFilter(fn) {\n this.filters.add(fn);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"once\"])(() => void this.filters.delete(fn));\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [_catalog_entity__WEBPACK_IMPORTED_MODULE_2__[\"CatalogCategory\"]]),\n __metadata(\"design:returntype\", Function)\n], CatalogCategoryRegistry.prototype, \"add\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CatalogCategoryRegistry.prototype, \"items\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CatalogCategoryRegistry.prototype, \"filteredItems\", null);\nconst catalogCategoryRegistry = new CatalogCategoryRegistry();\n\n\n//# sourceURL=webpack:///./src/common/catalog/catalog-category-registry.ts?");
|
|
36924
36936
|
|
|
36925
36937
|
/***/ }),
|
|
36926
36938
|
|
|
@@ -36932,7 +36944,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
36932
36944
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
36933
36945
|
|
|
36934
36946
|
"use strict";
|
|
36935
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CatalogCategory\", function() { return CatalogCategory; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CatalogEntity\", function() { return CatalogEntity; });\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ \"events\");\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(events__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\nclass CatalogCategory extends events__WEBPACK_IMPORTED_MODULE_0___default.a {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"filters\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"].set([], {\n deep: false,\n })\n });\n }\n static parseId(id = \"\") {\n var _a;\n const [group, kind] = (_a = id.split(\"/\")) !== null && _a !== void 0 ? _a : [];\n return { group, kind };\n }\n getId() {\n return `${this.spec.group}/${this.spec.names.kind}`;\n }\n /**\n * Add a filter for menu items of catalogAddMenu\n * @param fn The function that should return a truthy value if that menu item should be displayed\n * @returns A function to remove that filter\n */\n addMenuFilter(fn) {\n this.filters.add(fn);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"once\"])(() => void this.filters.delete(fn));\n }\n /**\n * Filter menuItems according to the Category's set filters\n * @param menuItems menu items to filter\n * @returns filtered menu items\n */\n filteredItems(menuItems) {\n return Array.from(_utils__WEBPACK_IMPORTED_MODULE_3__[\"iter\"].reduce(this.filters, _utils__WEBPACK_IMPORTED_MODULE_3__[\"iter\"].filter, menuItems));\n }\n}\nclass CatalogEntity {\n constructor(data) {\n Object.defineProperty(this, \"metadata\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"status\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"spec\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"makeObservable\"])(this);\n this.metadata = data.metadata;\n this.status = data.status;\n this.spec = data.spec;\n }\n getId() {\n return this.metadata.uid;\n }\n getName() {\n return this.metadata.name;\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], CatalogEntity.prototype, \"metadata\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], CatalogEntity.prototype, \"status\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], CatalogEntity.prototype, \"spec\", void 0);\n\n\n//# sourceURL=webpack:///./src/common/catalog/catalog-entity.ts?");
|
|
36947
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CatalogCategory\", function() { return CatalogCategory; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CatalogEntity\", function() { return CatalogEntity; });\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ \"events\");\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(events__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\nclass CatalogCategory extends events__WEBPACK_IMPORTED_MODULE_0___default.a {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"filters\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"].set([], {\n deep: false,\n })\n });\n }\n static parseId(id = \"\") {\n var _a;\n const [group, kind] = (_a = id.split(\"/\")) !== null && _a !== void 0 ? _a : [];\n return { group, kind };\n }\n getId() {\n return `${this.spec.group}/${this.spec.names.kind}`;\n }\n /**\n * Add a filter for menu items of catalogAddMenu\n * @param fn The function that should return a truthy value if that menu item should be displayed\n * @returns A function to remove that filter\n */\n addMenuFilter(fn) {\n this.filters.add(fn);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"once\"])(() => void this.filters.delete(fn));\n }\n /**\n * Filter menuItems according to the Category's set filters\n * @param menuItems menu items to filter\n * @returns filtered menu items\n */\n filteredItems(menuItems) {\n return Array.from(_utils__WEBPACK_IMPORTED_MODULE_3__[\"iter\"].reduce(this.filters, _utils__WEBPACK_IMPORTED_MODULE_3__[\"iter\"].filter, menuItems.values()));\n }\n}\nclass CatalogEntity {\n constructor(data) {\n Object.defineProperty(this, \"metadata\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"status\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"spec\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"makeObservable\"])(this);\n this.metadata = data.metadata;\n this.status = data.status;\n this.spec = data.spec;\n }\n getId() {\n return this.metadata.uid;\n }\n getName() {\n return this.metadata.name;\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], CatalogEntity.prototype, \"metadata\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], CatalogEntity.prototype, \"status\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"],\n __metadata(\"design:type\", Object)\n], CatalogEntity.prototype, \"spec\", void 0);\n\n\n//# sourceURL=webpack:///./src/common/catalog/catalog-entity.ts?");
|
|
36936
36948
|
|
|
36937
36949
|
/***/ }),
|
|
36938
36950
|
|
|
@@ -36992,7 +37004,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
36992
37004
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
36993
37005
|
|
|
36994
37006
|
"use strict";
|
|
36995
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ClusterStore\", function() { return ClusterStore; });\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _base_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base-store */ \"./src/common/base-store.ts\");\n/* harmony import */ var _main_cluster__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../main/cluster */ \"./src/main/cluster.ts\");\n/* harmony import */ var _migrations_cluster_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../migrations/cluster-store */ \"./src/migrations/cluster-store/index.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../main/logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _event_bus__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event-bus */ \"./src/common/event-bus.ts\");\n/* harmony import */ var _ipc__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ipc */ \"./src/common/ipc/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils */ \"./src/common/utils/index.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\nconst initialStates = \"cluster:states\";\nclass ClusterStore extends _base_store__WEBPACK_IMPORTED_MODULE_2__[\"BaseStore\"] {\n constructor() {\n super({\n configName: \"lens-cluster-store\",\n accessPropertiesByDotNotation: false,\n syncOptions: {\n equals: mobx__WEBPACK_IMPORTED_MODULE_1__[\"comparer\"].structural,\n },\n migrations: _migrations_cluster_store__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n });\n Object.defineProperty(this, \"clusters\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"].map()\n });\n Object.defineProperty(this, \"removedClusters\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"].map()\n });\n Object.defineProperty(this, \"disposer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: Object(_utils__WEBPACK_IMPORTED_MODULE_8__[\"disposer\"])()\n });\n Object.defineProperty(this, \"handleStateChange\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (event, clusterId, state) => {\n var _a;\n _main_logger__WEBPACK_IMPORTED_MODULE_5__[\"default\"].silly(`[CLUSTER-STORE]: received push-state at ${location.host} (${electron__WEBPACK_IMPORTED_MODULE_0__[\"webFrame\"].routingId})`, clusterId, state);\n (_a = this.getById(clusterId)) === null || _a === void 0 ? void 0 : _a.setState(state);\n }\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"makeObservable\"])(this);\n this.load();\n this.pushStateToViewsAutomatically();\n }\n async loadInitialOnRenderer() {\n var _a;\n _main_logger__WEBPACK_IMPORTED_MODULE_5__[\"default\"].info(\"[CLUSTER-STORE] requesting initial state sync\");\n for (const { id, state } of await Object(_ipc__WEBPACK_IMPORTED_MODULE_7__[\"requestMain\"])(initialStates)) {\n (_a = this.getById(id)) === null || _a === void 0 ? void 0 : _a.setState(state);\n }\n }\n provideInitialFromMain() {\n Object(_ipc__WEBPACK_IMPORTED_MODULE_7__[\"ipcMainHandle\"])(initialStates, () => {\n return this.clustersList.map(cluster => ({\n id: cluster.id,\n state: cluster.getState(),\n }));\n });\n }\n pushStateToViewsAutomatically() {\n if (electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcMain\"]) {\n this.disposer.push(Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"reaction\"])(() => this.connectedClustersList, () => this.pushState()));\n }\n }\n registerIpcListener() {\n _main_logger__WEBPACK_IMPORTED_MODULE_5__[\"default\"].info(`[CLUSTER-STORE] start to listen (${electron__WEBPACK_IMPORTED_MODULE_0__[\"webFrame\"].routingId})`);\n if (electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcMain\"]) {\n this.disposer.push(Object(_ipc__WEBPACK_IMPORTED_MODULE_7__[\"ipcMainOn\"])(ClusterStore.StateChannel, this.handleStateChange));\n }\n if (electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcRenderer\"]) {\n this.disposer.push(Object(_ipc__WEBPACK_IMPORTED_MODULE_7__[\"ipcRendererOn\"])(ClusterStore.StateChannel, this.handleStateChange));\n }\n }\n unregisterIpcListener() {\n super.unregisterIpcListener();\n this.disposer();\n }\n pushState() {\n this.clusters.forEach((c) => {\n c.pushState();\n });\n }\n get clustersList() {\n return Array.from(this.clusters.values());\n }\n get connectedClustersList() {\n return this.clustersList.filter((c) => !c.disconnected);\n }\n hasClusters() {\n return this.clusters.size > 0;\n }\n getById(id) {\n var _a;\n return (_a = this.clusters.get(id)) !== null && _a !== void 0 ? _a : null;\n }\n addCluster(clusterOrModel) {\n _event_bus__WEBPACK_IMPORTED_MODULE_6__[\"appEventBus\"].emit({ name: \"cluster\", action: \"add\" });\n const cluster = clusterOrModel instanceof _main_cluster__WEBPACK_IMPORTED_MODULE_3__[\"Cluster\"]\n ? clusterOrModel\n : new _main_cluster__WEBPACK_IMPORTED_MODULE_3__[\"Cluster\"](clusterOrModel);\n this.clusters.set(cluster.id, cluster);\n return cluster;\n }\n fromStore({ clusters = [] } = {}) {\n const currentClusters = new Map(this.clusters);\n const newClusters = new Map();\n const removedClusters = new Map();\n // update new clusters\n for (const clusterModel of clusters) {\n try {\n let cluster = currentClusters.get(clusterModel.id);\n if (cluster) {\n cluster.updateModel(clusterModel);\n }\n else {\n cluster = new _main_cluster__WEBPACK_IMPORTED_MODULE_3__[\"Cluster\"](clusterModel);\n }\n newClusters.set(clusterModel.id, cluster);\n }\n catch (error) {\n _main_logger__WEBPACK_IMPORTED_MODULE_5__[\"default\"].warn(`[CLUSTER-STORE]: Failed to update/create a cluster: ${error}`);\n }\n }\n // update removed clusters\n currentClusters.forEach(cluster => {\n if (!newClusters.has(cluster.id)) {\n removedClusters.set(cluster.id, cluster);\n }\n });\n this.clusters.replace(newClusters);\n this.removedClusters.replace(removedClusters);\n }\n toJSON() {\n return Object(_utils__WEBPACK_IMPORTED_MODULE_8__[\"toJS\"])({\n clusters: this.clustersList.map(cluster => cluster.toJSON()),\n });\n }\n}\nObject.defineProperty(ClusterStore, \"StateChannel\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"cluster:state\"\n});\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], ClusterStore.prototype, \"clustersList\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], ClusterStore.prototype, \"connectedClustersList\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], ClusterStore.prototype, \"fromStore\", null);\n\n\n//# sourceURL=webpack:///./src/common/cluster-store.ts?");
|
|
37007
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ClusterStore\", function() { return ClusterStore; });\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _base_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base-store */ \"./src/common/base-store.ts\");\n/* harmony import */ var _main_cluster__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../main/cluster */ \"./src/main/cluster.ts\");\n/* harmony import */ var _migrations_cluster_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../migrations/cluster-store */ \"./src/migrations/cluster-store/index.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../main/logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _event_bus__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event-bus */ \"./src/common/event-bus.ts\");\n/* harmony import */ var _ipc__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ipc */ \"./src/common/ipc/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils */ \"./src/common/utils/index.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\nconst initialStates = \"cluster:states\";\nclass ClusterStore extends _base_store__WEBPACK_IMPORTED_MODULE_2__[\"BaseStore\"] {\n constructor() {\n super({\n configName: \"lens-cluster-store\",\n accessPropertiesByDotNotation: false,\n syncOptions: {\n equals: mobx__WEBPACK_IMPORTED_MODULE_1__[\"comparer\"].structural,\n },\n migrations: _migrations_cluster_store__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n });\n Object.defineProperty(this, \"clusters\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"].map()\n });\n Object.defineProperty(this, \"disposer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: Object(_utils__WEBPACK_IMPORTED_MODULE_8__[\"disposer\"])()\n });\n Object.defineProperty(this, \"handleStateChange\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (event, clusterId, state) => {\n var _a;\n _main_logger__WEBPACK_IMPORTED_MODULE_5__[\"default\"].silly(`[CLUSTER-STORE]: received push-state at ${location.host} (${electron__WEBPACK_IMPORTED_MODULE_0__[\"webFrame\"].routingId})`, clusterId, state);\n (_a = this.getById(clusterId)) === null || _a === void 0 ? void 0 : _a.setState(state);\n }\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"makeObservable\"])(this);\n this.load();\n this.pushStateToViewsAutomatically();\n }\n async loadInitialOnRenderer() {\n var _a;\n _main_logger__WEBPACK_IMPORTED_MODULE_5__[\"default\"].info(\"[CLUSTER-STORE] requesting initial state sync\");\n for (const { id, state } of await Object(_ipc__WEBPACK_IMPORTED_MODULE_7__[\"requestMain\"])(initialStates)) {\n (_a = this.getById(id)) === null || _a === void 0 ? void 0 : _a.setState(state);\n }\n }\n provideInitialFromMain() {\n Object(_ipc__WEBPACK_IMPORTED_MODULE_7__[\"ipcMainHandle\"])(initialStates, () => {\n return this.clustersList.map(cluster => ({\n id: cluster.id,\n state: cluster.getState(),\n }));\n });\n }\n pushStateToViewsAutomatically() {\n if (electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcMain\"]) {\n this.disposer.push(Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"reaction\"])(() => this.connectedClustersList, () => this.pushState()));\n }\n }\n registerIpcListener() {\n _main_logger__WEBPACK_IMPORTED_MODULE_5__[\"default\"].info(`[CLUSTER-STORE] start to listen (${electron__WEBPACK_IMPORTED_MODULE_0__[\"webFrame\"].routingId})`);\n if (electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcMain\"]) {\n this.disposer.push(Object(_ipc__WEBPACK_IMPORTED_MODULE_7__[\"ipcMainOn\"])(ClusterStore.StateChannel, this.handleStateChange));\n }\n if (electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcRenderer\"]) {\n this.disposer.push(Object(_ipc__WEBPACK_IMPORTED_MODULE_7__[\"ipcRendererOn\"])(ClusterStore.StateChannel, this.handleStateChange));\n }\n }\n unregisterIpcListener() {\n super.unregisterIpcListener();\n this.disposer();\n }\n pushState() {\n this.clusters.forEach((c) => {\n c.pushState();\n });\n }\n get clustersList() {\n return Array.from(this.clusters.values());\n }\n get connectedClustersList() {\n return this.clustersList.filter((c) => !c.disconnected);\n }\n hasClusters() {\n return this.clusters.size > 0;\n }\n getById(id) {\n var _a;\n return (_a = this.clusters.get(id)) !== null && _a !== void 0 ? _a : null;\n }\n addCluster(clusterOrModel) {\n _event_bus__WEBPACK_IMPORTED_MODULE_6__[\"appEventBus\"].emit({ name: \"cluster\", action: \"add\" });\n const cluster = clusterOrModel instanceof _main_cluster__WEBPACK_IMPORTED_MODULE_3__[\"Cluster\"]\n ? clusterOrModel\n : new _main_cluster__WEBPACK_IMPORTED_MODULE_3__[\"Cluster\"](clusterOrModel);\n this.clusters.set(cluster.id, cluster);\n return cluster;\n }\n fromStore({ clusters = [] } = {}) {\n const currentClusters = new Map(this.clusters);\n const newClusters = new Map();\n // update new clusters\n for (const clusterModel of clusters) {\n try {\n let cluster = currentClusters.get(clusterModel.id);\n if (cluster) {\n cluster.updateModel(clusterModel);\n }\n else {\n cluster = new _main_cluster__WEBPACK_IMPORTED_MODULE_3__[\"Cluster\"](clusterModel);\n }\n newClusters.set(clusterModel.id, cluster);\n }\n catch (error) {\n _main_logger__WEBPACK_IMPORTED_MODULE_5__[\"default\"].warn(`[CLUSTER-STORE]: Failed to update/create a cluster: ${error}`);\n }\n }\n this.clusters.replace(newClusters);\n }\n toJSON() {\n return Object(_utils__WEBPACK_IMPORTED_MODULE_8__[\"toJS\"])({\n clusters: this.clustersList.map(cluster => cluster.toJSON()),\n });\n }\n}\nObject.defineProperty(ClusterStore, \"StateChannel\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"cluster:state\"\n});\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], ClusterStore.prototype, \"clustersList\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"computed\"],\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], ClusterStore.prototype, \"connectedClustersList\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_1__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], ClusterStore.prototype, \"fromStore\", null);\n\n\n//# sourceURL=webpack:///./src/common/cluster-store.ts?");
|
|
36996
37008
|
|
|
36997
37009
|
/***/ }),
|
|
36998
37010
|
|
|
@@ -37364,7 +37376,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
37364
37376
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
37365
37377
|
|
|
37366
37378
|
"use strict";
|
|
37367
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"NodesApi\", function() { return NodesApi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getMetricsForAllNodes\", function() { return getMetricsForAllNodes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formatNodeTaint\", function() { return formatNodeTaint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Node\", function() { return Node; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nodesApi\", function() { return nodesApi; });\n/* harmony import */ var _kube_object__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var _renderer_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../renderer/utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _metrics_api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./metrics.api */ \"./src/common/k8s-api/endpoints/metrics.api.ts\");\n/* harmony import */ var _kube_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../kube-api */ \"./src/common/k8s-api/kube-api.ts\");\n/* harmony import */ var _utils_cluster_id_url_parsing__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/cluster-id-url-parsing */ \"./src/common/utils/cluster-id-url-parsing.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\nclass NodesApi extends _kube_api__WEBPACK_IMPORTED_MODULE_3__[\"KubeApi\"] {\n}\nfunction getMetricsForAllNodes() {\n const opts = { category: \"nodes\" };\n return _metrics_api__WEBPACK_IMPORTED_MODULE_2__[\"metricsApi\"].getMetrics({\n memoryUsage: opts,\n workloadMemoryUsage: opts,\n memoryCapacity: opts,\n memoryAllocatableCapacity: opts,\n cpuUsage: opts,\n cpuCapacity: opts,\n fsSize: opts,\n fsUsage: opts\n });\n}\nfunction formatNodeTaint(taint) {\n if (taint.value) {\n return `${taint.key}=${taint.value}:${taint.effect}`;\n }\n return `${taint.key}:${taint.effect}`;\n}\nclass Node extends _kube_object__WEBPACK_IMPORTED_MODULE_0__[\"KubeObject\"] {\n constructor(data) {\n super(data);\n Object(_renderer_utils__WEBPACK_IMPORTED_MODULE_1__[\"autoBind\"])(this);\n }\n getNodeConditionText() {\n
|
|
37379
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"NodesApi\", function() { return NodesApi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getMetricsForAllNodes\", function() { return getMetricsForAllNodes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formatNodeTaint\", function() { return formatNodeTaint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Node\", function() { return Node; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nodesApi\", function() { return nodesApi; });\n/* harmony import */ var _kube_object__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var _renderer_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../renderer/utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _metrics_api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./metrics.api */ \"./src/common/k8s-api/endpoints/metrics.api.ts\");\n/* harmony import */ var _kube_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../kube-api */ \"./src/common/k8s-api/kube-api.ts\");\n/* harmony import */ var _utils_cluster_id_url_parsing__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/cluster-id-url-parsing */ \"./src/common/utils/cluster-id-url-parsing.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\nclass NodesApi extends _kube_api__WEBPACK_IMPORTED_MODULE_3__[\"KubeApi\"] {\n}\nfunction getMetricsForAllNodes() {\n const opts = { category: \"nodes\" };\n return _metrics_api__WEBPACK_IMPORTED_MODULE_2__[\"metricsApi\"].getMetrics({\n memoryUsage: opts,\n workloadMemoryUsage: opts,\n memoryCapacity: opts,\n memoryAllocatableCapacity: opts,\n cpuUsage: opts,\n cpuCapacity: opts,\n fsSize: opts,\n fsUsage: opts\n });\n}\nfunction formatNodeTaint(taint) {\n if (taint.value) {\n return `${taint.key}=${taint.value}:${taint.effect}`;\n }\n return `${taint.key}:${taint.effect}`;\n}\n/**\n * Iterate over `conditions` yielding the `type` field if the `status` field is\n * the string `\"True\"`\n * @param conditions An iterator of some conditions\n */\nfunction* getTrueConditionTypes(conditions) {\n for (const { status, type } of conditions) {\n if (status === \"True\") {\n yield type;\n }\n }\n}\nclass Node extends _kube_object__WEBPACK_IMPORTED_MODULE_0__[\"KubeObject\"] {\n constructor(data) {\n super(data);\n Object(_renderer_utils__WEBPACK_IMPORTED_MODULE_1__[\"autoBind\"])(this);\n }\n /**\n * Returns the concatination of all current condition types which have a status\n * of `\"True\"`\n */\n getNodeConditionText() {\n var _a, _b;\n return _renderer_utils__WEBPACK_IMPORTED_MODULE_1__[\"iter\"].join(getTrueConditionTypes((_b = (_a = this.status) === null || _a === void 0 ? void 0 : _a.conditions) !== null && _b !== void 0 ? _b : []), \" \");\n }\n getTaints() {\n return this.spec.taints || [];\n }\n getRoleLabels() {\n var _a;\n if (!((_a = this.metadata) === null || _a === void 0 ? void 0 : _a.labels) || typeof this.metadata.labels !== \"object\") {\n return \"\";\n }\n const roleLabels = Object.keys(this.metadata.labels)\n .filter(key => key.includes(\"node-role.kubernetes.io\"))\n .map(key => key.match(/([^/]+$)/)[0]); // all after last slash\n if (this.metadata.labels[\"kubernetes.io/role\"] != undefined) {\n roleLabels.push(this.metadata.labels[\"kubernetes.io/role\"]);\n }\n return roleLabels.join(\", \");\n }\n getCpuCapacity() {\n if (!this.status.capacity || !this.status.capacity.cpu)\n return 0;\n return Object(_renderer_utils__WEBPACK_IMPORTED_MODULE_1__[\"cpuUnitsToNumber\"])(this.status.capacity.cpu);\n }\n getMemoryCapacity() {\n if (!this.status.capacity || !this.status.capacity.memory)\n return 0;\n return Object(_renderer_utils__WEBPACK_IMPORTED_MODULE_1__[\"unitsToBytes\"])(this.status.capacity.memory);\n }\n getConditions() {\n const conditions = this.status.conditions || [];\n if (this.isUnschedulable()) {\n return [{ type: \"SchedulingDisabled\", status: \"True\" }, ...conditions];\n }\n return conditions;\n }\n getActiveConditions() {\n return this.getConditions().filter(c => c.status === \"True\");\n }\n getWarningConditions() {\n const goodConditions = [\"Ready\", \"HostUpgrades\", \"SchedulingDisabled\"];\n return this.getActiveConditions().filter(condition => {\n return !goodConditions.includes(condition.type);\n });\n }\n getKubeletVersion() {\n return this.status.nodeInfo.kubeletVersion;\n }\n getOperatingSystem() {\n const label = this.getLabels().find(label => label.startsWith(\"kubernetes.io/os=\"));\n if (label) {\n return label.split(\"=\", 2)[1];\n }\n return \"linux\";\n }\n isUnschedulable() {\n return this.spec.unschedulable;\n }\n}\nObject.defineProperty(Node, \"kind\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Node\"\n});\nObject.defineProperty(Node, \"namespaced\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n});\nObject.defineProperty(Node, \"apiBase\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"/api/v1/nodes\"\n});\nlet nodesApi;\nif (Object(_utils_cluster_id_url_parsing__WEBPACK_IMPORTED_MODULE_4__[\"isClusterPageContext\"])()) {\n nodesApi = new NodesApi({\n objectConstructor: Node,\n });\n}\n\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/endpoints/nodes.api.ts?");
|
|
37368
37380
|
|
|
37369
37381
|
/***/ }),
|
|
37370
37382
|
|
|
@@ -37592,7 +37604,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
37592
37604
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
37593
37605
|
|
|
37594
37606
|
"use strict";
|
|
37595
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"JsonApi\", function() { return JsonApi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"JsonApiErrorParsed\", function() { return JsonApiErrorParsed; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var node_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! node-fetch */ \"./node_modules/node-fetch/browser.js\");\n/* harmony import */ var node_fetch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(node_fetch__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! querystring */ \"querystring\");\n/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(querystring__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _common_event_emitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/event-emitter */ \"./src/common/event-emitter.ts\");\n/* harmony import */ var _common_logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/logger */ \"./src/common/logger.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n// Base http-service / json-api class\n\n\n\n\n\nclass JsonApi {\n constructor(config, reqInit) {\n Object.defineProperty(this, \"config\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: config\n });\n Object.defineProperty(this, \"reqInit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: reqInit\n });\n Object.defineProperty(this, \"onData\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new _common_event_emitter__WEBPACK_IMPORTED_MODULE_3__[\"EventEmitter\"]()\n });\n Object.defineProperty(this, \"onError\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new _common_event_emitter__WEBPACK_IMPORTED_MODULE_3__[\"EventEmitter\"]()\n });\n this.config = Object.assign({}, JsonApi.configDefault, config);\n this.reqInit = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"merge\"])({}, JsonApi.reqInitDefault, reqInit);\n this.parseResponse = this.parseResponse.bind(this);\n }\n get(path, params, reqInit = {}) {\n return this.request(path, params, Object.assign(Object.assign({}, reqInit), { method: \"get\" }));\n }\n getResponse(path, params, init = {}) {\n let reqUrl = `${this.config.serverAddress}${this.config.apiBase}${path}`;\n const reqInit = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"merge\"])({}, this.reqInit, init);\n const { query } = params || {};\n if (!reqInit.method) {\n reqInit.method = \"get\";\n }\n if (query) {\n const queryString = Object(querystring__WEBPACK_IMPORTED_MODULE_2__[\"stringify\"])(query);\n reqUrl += (reqUrl.includes(\"?\") ? \"&\" : \"?\") + queryString;\n }\n return node_fetch__WEBPACK_IMPORTED_MODULE_1___default()(reqUrl, reqInit);\n }\n post(path, params, reqInit = {}) {\n return this.request(path, params, Object.assign(Object.assign({}, reqInit), { method: \"post\" }));\n }\n put(path, params, reqInit = {}) {\n return this.request(path, params, Object.assign(Object.assign({}, reqInit), { method: \"put\" }));\n }\n patch(path, params, reqInit = {}) {\n return this.request(path, params, Object.assign(Object.assign({}, reqInit), { method: \"PATCH\" }));\n }\n del(path, params, reqInit = {}) {\n return this.request(path, params, Object.assign(Object.assign({}, reqInit), { method: \"delete\" }));\n }\n async request(path, params, init = {}) {\n let reqUrl = `${this.config.serverAddress}${this.config.apiBase}${path}`;\n const reqInit = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"merge\"])({}, this.reqInit, init);\n const { data, query } = params || {};\n if (data && !reqInit.body) {\n reqInit.body = JSON.stringify(data);\n }\n if (query) {\n const queryString = Object(querystring__WEBPACK_IMPORTED_MODULE_2__[\"stringify\"])(query);\n reqUrl += (reqUrl.includes(\"?\") ? \"&\" : \"?\") + queryString;\n }\n const infoLog = {\n method: reqInit.method.toUpperCase(),\n reqUrl,\n reqInit,\n };\n const res = await node_fetch__WEBPACK_IMPORTED_MODULE_1___default()(reqUrl, reqInit);\n return this.parseResponse(res, infoLog);\n }\n async parseResponse(res, log) {\n const { status } = res;\n const text = await res.text();\n let data;\n try {\n data = text ? JSON.parse(text) : \"\"; // DELETE-requests might not have response-body\n }\n catch (e) {\n data = text;\n }\n if (status >= 200 && status < 300) {\n this.onData.emit(data, res);\n this.writeLog(Object.assign(Object.assign({}, log), { data }));\n return data;\n }\n if (log.method === \"GET\" && res.status === 403) {\n this.writeLog(Object.assign(Object.assign({}, log), { error: data }));\n throw data;\n }\n const error = new JsonApiErrorParsed(data, this.parseError(data, res));\n this.onError.emit(error, res);\n this.writeLog(Object.assign(Object.assign({}, log), { error }));\n throw error;\n }\n parseError(error, res) {\n if (typeof error === \"string\") {\n return [error];\n }\n if (Array.isArray(error.errors)) {\n return error.errors.map(error => error.title);\n }\n if (error.message) {\n return [error.message];\n }\n return [res.statusText || \"Error!\"];\n }\n writeLog(log) {\n const { method, reqUrl } = log, params = __rest(log, [\"method\", \"reqUrl\"]);\n _common_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[JSON-API] request ${method} ${reqUrl}`, params);\n }\n}\nObject.defineProperty(JsonApi, \"reqInitDefault\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n headers: {\n \"content-type\": \"application/json\"\n }\n }\n});\nObject.defineProperty(JsonApi, \"configDefault\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n debug: false\n }\n});\nclass JsonApiErrorParsed {\n constructor(error, messages) {\n Object.defineProperty(this, \"error\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: error\n });\n Object.defineProperty(this, \"messages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: messages\n });\n Object.defineProperty(this, \"isUsedForNotification\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n }\n get isAborted() {\n return this.error.code === DOMException.ABORT_ERR;\n }\n toString() {\n return this.messages.join(\"\\n\");\n }\n}\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/json-api.ts?");
|
|
37607
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"JsonApi\", function() { return JsonApi; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"JsonApiErrorParsed\", function() { return JsonApiErrorParsed; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var node_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! node-fetch */ \"./node_modules/node-fetch/browser.js\");\n/* harmony import */ var node_fetch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(node_fetch__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! querystring */ \"querystring\");\n/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(querystring__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _common_event_emitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/event-emitter */ \"./src/common/event-emitter.ts\");\n/* harmony import */ var _common_logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/logger */ \"./src/common/logger.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n// Base http-service / json-api class\n\n\n\n\n\nclass JsonApi {\n constructor(config, reqInit) {\n var _a;\n Object.defineProperty(this, \"config\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: config\n });\n Object.defineProperty(this, \"reqInit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: reqInit\n });\n Object.defineProperty(this, \"onData\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new _common_event_emitter__WEBPACK_IMPORTED_MODULE_3__[\"EventEmitter\"]()\n });\n Object.defineProperty(this, \"onError\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new _common_event_emitter__WEBPACK_IMPORTED_MODULE_3__[\"EventEmitter\"]()\n });\n Object.defineProperty(this, \"getRequestOptions\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.config = Object.assign({}, JsonApi.configDefault, config);\n this.reqInit = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"merge\"])({}, JsonApi.reqInitDefault, reqInit);\n this.parseResponse = this.parseResponse.bind(this);\n this.getRequestOptions = (_a = config.getRequestOptions) !== null && _a !== void 0 ? _a : (() => Promise.resolve({}));\n }\n get(path, params, reqInit = {}) {\n return this.request(path, params, Object.assign(Object.assign({}, reqInit), { method: \"get\" }));\n }\n async getResponse(path, params, init = {}) {\n let reqUrl = `${this.config.serverAddress}${this.config.apiBase}${path}`;\n const reqInit = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"merge\"])({}, this.reqInit, await this.getRequestOptions(), init);\n const { query } = params || {};\n if (!reqInit.method) {\n reqInit.method = \"get\";\n }\n if (query) {\n const queryString = Object(querystring__WEBPACK_IMPORTED_MODULE_2__[\"stringify\"])(query);\n reqUrl += (reqUrl.includes(\"?\") ? \"&\" : \"?\") + queryString;\n }\n return node_fetch__WEBPACK_IMPORTED_MODULE_1___default()(reqUrl, reqInit);\n }\n post(path, params, reqInit = {}) {\n return this.request(path, params, Object.assign(Object.assign({}, reqInit), { method: \"post\" }));\n }\n put(path, params, reqInit = {}) {\n return this.request(path, params, Object.assign(Object.assign({}, reqInit), { method: \"put\" }));\n }\n patch(path, params, reqInit = {}) {\n return this.request(path, params, Object.assign(Object.assign({}, reqInit), { method: \"PATCH\" }));\n }\n del(path, params, reqInit = {}) {\n return this.request(path, params, Object.assign(Object.assign({}, reqInit), { method: \"delete\" }));\n }\n async request(path, params, init = {}) {\n let reqUrl = `${this.config.serverAddress}${this.config.apiBase}${path}`;\n const reqInit = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"merge\"])({}, this.reqInit, await this.getRequestOptions(), init);\n const { data, query } = params || {};\n if (data && !reqInit.body) {\n reqInit.body = JSON.stringify(data);\n }\n if (query) {\n const queryString = Object(querystring__WEBPACK_IMPORTED_MODULE_2__[\"stringify\"])(query);\n reqUrl += (reqUrl.includes(\"?\") ? \"&\" : \"?\") + queryString;\n }\n const infoLog = {\n method: reqInit.method.toUpperCase(),\n reqUrl,\n reqInit,\n };\n const res = await node_fetch__WEBPACK_IMPORTED_MODULE_1___default()(reqUrl, reqInit);\n return this.parseResponse(res, infoLog);\n }\n async parseResponse(res, log) {\n const { status } = res;\n const text = await res.text();\n let data;\n try {\n data = text ? JSON.parse(text) : \"\"; // DELETE-requests might not have response-body\n }\n catch (e) {\n data = text;\n }\n if (status >= 200 && status < 300) {\n this.onData.emit(data, res);\n this.writeLog(Object.assign(Object.assign({}, log), { data }));\n return data;\n }\n if (log.method === \"GET\" && res.status === 403) {\n this.writeLog(Object.assign(Object.assign({}, log), { error: data }));\n throw data;\n }\n const error = new JsonApiErrorParsed(data, this.parseError(data, res));\n this.onError.emit(error, res);\n this.writeLog(Object.assign(Object.assign({}, log), { error }));\n throw error;\n }\n parseError(error, res) {\n if (typeof error === \"string\") {\n return [error];\n }\n if (Array.isArray(error.errors)) {\n return error.errors.map(error => error.title);\n }\n if (error.message) {\n return [error.message];\n }\n return [res.statusText || \"Error!\"];\n }\n writeLog(log) {\n const { method, reqUrl } = log, params = __rest(log, [\"method\", \"reqUrl\"]);\n _common_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[JSON-API] request ${method} ${reqUrl}`, params);\n }\n}\nObject.defineProperty(JsonApi, \"reqInitDefault\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n headers: {\n \"content-type\": \"application/json\"\n }\n }\n});\nObject.defineProperty(JsonApi, \"configDefault\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n debug: false\n }\n});\nclass JsonApiErrorParsed {\n constructor(error, messages) {\n Object.defineProperty(this, \"error\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: error\n });\n Object.defineProperty(this, \"messages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: messages\n });\n Object.defineProperty(this, \"isUsedForNotification\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n }\n get isAborted() {\n return this.error.code === DOMException.ABORT_ERR;\n }\n toString() {\n return this.messages.join(\"\\n\");\n }\n}\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/json-api.ts?");
|
|
37596
37608
|
|
|
37597
37609
|
/***/ }),
|
|
37598
37610
|
|
|
@@ -37616,7 +37628,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
37616
37628
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
37617
37629
|
|
|
37618
37630
|
"use strict";
|
|
37619
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forCluster\", function() { return forCluster; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forRemoteCluster\", function() { return forRemoteCluster; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ensureObjectSelfLink\", function() { return ensureObjectSelfLink; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeApi\", function() { return KubeApi; });\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/merge */ \"./node_modules/lodash/merge.js\");\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_merge__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! querystring */ \"querystring\");\n/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(querystring__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _common_vars__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/vars */ \"./src/common/vars.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _api_manager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./index */ \"./src/common/k8s-api/index.ts\");\n/* harmony import */ var _kube_api_parse__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./kube-api-parse */ \"./src/common/k8s-api/kube-api-parse.ts\");\n/* harmony import */ var _kube_object__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var byline__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! byline */ \"./node_modules/byline/lib/byline.js\");\n/* harmony import */ var byline__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(byline__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _kube_json_api__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./kube-json-api */ \"./src/common/k8s-api/kube-json-api.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! abort-controller */ \"./node_modules/abort-controller/browser.js\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(abort_controller__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! https */ \"https\");\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(https__WEBPACK_IMPORTED_MODULE_12__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n// Base class for building all kubernetes apis\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction forCluster(cluster, kubeClass) {\n const url = new URL(_index__WEBPACK_IMPORTED_MODULE_5__[\"apiBase\"].config.serverAddress);\n const request = new _kube_json_api__WEBPACK_IMPORTED_MODULE_9__[\"KubeJsonApi\"]({\n serverAddress: _index__WEBPACK_IMPORTED_MODULE_5__[\"apiBase\"].config.serverAddress,\n apiBase: _common_vars__WEBPACK_IMPORTED_MODULE_2__[\"apiKubePrefix\"],\n debug: _common_vars__WEBPACK_IMPORTED_MODULE_2__[\"isDevelopment\"],\n }, {\n headers: {\n \"Host\": `${cluster.metadata.uid}.localhost:${url.port}`\n }\n });\n return new KubeApi({\n objectConstructor: kubeClass,\n request\n });\n}\nfunction forRemoteCluster(config, kubeClass) {\n const reqInit = {};\n if (config.user.token) {\n reqInit.headers = {\n \"Authorization\": `Bearer ${config.user.token}`\n };\n }\n const agentOptions = {};\n if (config.cluster.skipTLSVerify === true) {\n agentOptions.rejectUnauthorized = false;\n }\n if (config.user.clientCertificateData) {\n agentOptions.cert = config.user.clientCertificateData;\n }\n if (config.user.clientKeyData) {\n agentOptions.key = config.user.clientKeyData;\n }\n if (config.cluster.caData) {\n agentOptions.ca = config.cluster.caData;\n }\n if (Object.keys(agentOptions).length > 0) {\n reqInit.agent = new https__WEBPACK_IMPORTED_MODULE_12__[\"Agent\"](agentOptions);\n }\n const request = new _kube_json_api__WEBPACK_IMPORTED_MODULE_9__[\"KubeJsonApi\"]({\n serverAddress: config.cluster.server,\n apiBase: \"\",\n debug: _common_vars__WEBPACK_IMPORTED_MODULE_2__[\"isDevelopment\"],\n }, reqInit);\n return new KubeApi({\n objectConstructor: kubeClass,\n request\n });\n}\nfunction ensureObjectSelfLink(api, object) {\n if (!object.metadata.selfLink) {\n object.metadata.selfLink = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_6__[\"createKubeApiURL\"])({\n apiPrefix: api.apiPrefix,\n apiVersion: api.apiVersionWithGroup,\n resource: api.apiResource,\n namespace: api.isNamespaced ? object.metadata.namespace : undefined,\n name: object.metadata.name,\n });\n }\n}\nclass KubeApi {\n constructor(options) {\n var _a, _b;\n Object.defineProperty(this, \"options\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: options\n });\n Object.defineProperty(this, \"kind\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiBase\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiPrefix\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiGroup\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiVersionPreferred\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiResource\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"isNamespaced\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"objectConstructor\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"request\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"resourceVersions\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Map()\n });\n Object.defineProperty(this, \"watchDisposer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"watchId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 1\n });\n const { objectConstructor, request = _index__WEBPACK_IMPORTED_MODULE_5__[\"apiKube\"], kind = (_a = options.objectConstructor) === null || _a === void 0 ? void 0 : _a.kind, isNamespaced = (_b = options.objectConstructor) === null || _b === void 0 ? void 0 : _b.namespaced } = options || {};\n if (!options.apiBase) {\n options.apiBase = objectConstructor.apiBase;\n }\n const { apiBase, apiPrefix, apiGroup, apiVersion, resource } = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_6__[\"parseKubeApi\"])(options.apiBase);\n this.kind = kind;\n this.isNamespaced = isNamespaced;\n this.apiBase = apiBase;\n this.apiPrefix = apiPrefix;\n this.apiGroup = apiGroup;\n this.apiVersion = apiVersion;\n this.apiResource = resource;\n this.request = request;\n this.objectConstructor = objectConstructor;\n this.parseResponse = this.parseResponse.bind(this);\n _api_manager__WEBPACK_IMPORTED_MODULE_4__[\"apiManager\"].registerApi(apiBase, this);\n }\n get apiVersionWithGroup() {\n var _a;\n return [this.apiGroup, (_a = this.apiVersionPreferred) !== null && _a !== void 0 ? _a : this.apiVersion]\n .filter(Boolean)\n .join(\"/\");\n }\n /**\n * Returns the latest API prefix/group that contains the required resource.\n * First tries options.apiBase, then urls in order from options.fallbackApiBases.\n */\n async getLatestApiPrefixGroup() {\n var _a;\n // Note that this.options.apiBase is the \"full\" url, whereas this.apiBase is parsed\n const apiBases = [this.options.apiBase, ...this.options.fallbackApiBases];\n for (const apiUrl of apiBases) {\n // Split e.g. \"/apis/extensions/v1beta1/ingresses\" to parts\n const { apiPrefix, apiGroup, apiVersionWithGroup, resource } = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_6__[\"parseKubeApi\"])(apiUrl);\n // Request available resources\n try {\n const response = await this.request.get(`${apiPrefix}/${apiVersionWithGroup}`);\n // If the resource is found in the group, use this apiUrl\n if ((_a = response.resources) === null || _a === void 0 ? void 0 : _a.find(kubeResource => kubeResource.name === resource)) {\n return { apiPrefix, apiGroup };\n }\n }\n catch (error) {\n // Exception is ignored as we can try the next url\n }\n }\n throw new Error(`Can't find working API for the Kubernetes resource ${this.apiResource}`);\n }\n /**\n * Get the apiPrefix and apiGroup to be used for fetching the preferred version.\n */\n async getPreferredVersionPrefixGroup() {\n if (this.options.fallbackApiBases) {\n try {\n return await this.getLatestApiPrefixGroup();\n }\n catch (error) {\n // If valid API wasn't found, log the error and return defaults below\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(error);\n }\n }\n return {\n apiPrefix: this.apiPrefix,\n apiGroup: this.apiGroup\n };\n }\n async checkPreferredVersion() {\n var _a, _b;\n if (this.options.fallbackApiBases && !this.options.checkPreferredVersion) {\n throw new Error(\"checkPreferredVersion must be enabled if fallbackApiBases is set in KubeApi\");\n }\n if (this.options.checkPreferredVersion && this.apiVersionPreferred === undefined) {\n const { apiPrefix, apiGroup } = await this.getPreferredVersionPrefixGroup();\n // The apiPrefix and apiGroup might change due to fallbackApiBases, so we must override them\n Object.defineProperty(this, \"apiPrefix\", {\n value: apiPrefix\n });\n Object.defineProperty(this, \"apiGroup\", {\n value: apiGroup\n });\n const res = await this.request.get(`${this.apiPrefix}/${this.apiGroup}`);\n Object.defineProperty(this, \"apiVersionPreferred\", {\n value: (_b = (_a = res === null || res === void 0 ? void 0 : res.preferredVersion) === null || _a === void 0 ? void 0 : _a.version) !== null && _b !== void 0 ? _b : null,\n });\n if (this.apiVersionPreferred) {\n Object.defineProperty(this, \"apiBase\", { value: this.getUrl() });\n _api_manager__WEBPACK_IMPORTED_MODULE_4__[\"apiManager\"].registerApi(this.apiBase, this);\n }\n }\n }\n setResourceVersion(namespace = \"\", newVersion) {\n this.resourceVersions.set(namespace, newVersion);\n }\n getResourceVersion(namespace = \"\") {\n return this.resourceVersions.get(namespace);\n }\n async refreshResourceVersion(params) {\n return this.list(params, { limit: 1 });\n }\n getUrl({ name = \"\", namespace = \"\" } = {}, query) {\n const resourcePath = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_6__[\"createKubeApiURL\"])({\n apiPrefix: this.apiPrefix,\n apiVersion: this.apiVersionWithGroup,\n resource: this.apiResource,\n namespace: this.isNamespaced ? namespace : undefined,\n name,\n });\n return resourcePath + (query ? `?${Object(querystring__WEBPACK_IMPORTED_MODULE_1__[\"stringify\"])(this.normalizeQuery(query))}` : \"\");\n }\n normalizeQuery(query = {}) {\n if (query.labelSelector) {\n query.labelSelector = [query.labelSelector].flat().join(\",\");\n }\n if (query.fieldSelector) {\n query.fieldSelector = [query.fieldSelector].flat().join(\",\");\n }\n return query;\n }\n parseResponse(data, namespace) {\n if (!data)\n return null;\n const KubeObjectConstructor = this.objectConstructor;\n // process items list response, check before single item since there is overlap\n if (_kube_object__WEBPACK_IMPORTED_MODULE_7__[\"KubeObject\"].isJsonApiDataList(data, _kube_object__WEBPACK_IMPORTED_MODULE_7__[\"KubeObject\"].isPartialJsonApiData)) {\n const { apiVersion, items, metadata } = data;\n this.setResourceVersion(namespace, metadata.resourceVersion);\n this.setResourceVersion(\"\", metadata.resourceVersion);\n return items.map((item) => {\n const object = new KubeObjectConstructor(Object.assign({ kind: this.kind, apiVersion }, item));\n ensureObjectSelfLink(this, object);\n return object;\n });\n }\n // process a single item\n if (_kube_object__WEBPACK_IMPORTED_MODULE_7__[\"KubeObject\"].isJsonApiData(data)) {\n const object = new KubeObjectConstructor(data);\n ensureObjectSelfLink(this, object);\n return object;\n }\n // custom apis might return array for list response, e.g. users, groups, etc.\n if (Array.isArray(data)) {\n return data.map(data => new KubeObjectConstructor(data));\n }\n return null;\n }\n async list({ namespace = \"\", reqInit } = {}, query) {\n await this.checkPreferredVersion();\n const url = this.getUrl({ namespace });\n const res = await this.request.get(url, { query }, reqInit);\n const parsed = this.parseResponse(res, namespace);\n if (Array.isArray(parsed)) {\n return parsed;\n }\n if (!parsed) {\n return null;\n }\n throw new Error(`GET multiple request to ${url} returned not an array: ${JSON.stringify(parsed)}`);\n }\n async get({ name = \"\", namespace = \"default\" } = {}, query) {\n await this.checkPreferredVersion();\n const url = this.getUrl({ namespace, name });\n const res = await this.request.get(url, { query });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`GET single request to ${url} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async create({ name = \"\", namespace = \"default\" } = {}, data) {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl({ namespace });\n const res = await this.request.post(apiUrl, {\n data: lodash_merge__WEBPACK_IMPORTED_MODULE_0___default()({\n kind: this.kind,\n apiVersion: this.apiVersionWithGroup,\n metadata: {\n name,\n namespace\n }\n }, data)\n });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`POST request to ${apiUrl} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async update({ name = \"\", namespace = \"default\" } = {}, data) {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl({ namespace, name });\n const res = await this.request.put(apiUrl, { data });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`PUT request to ${apiUrl} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async delete({ name = \"\", namespace = \"default\" }) {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl({ namespace, name });\n return this.request.del(apiUrl);\n }\n getWatchUrl(namespace = \"\", query = {}) {\n return this.getUrl({ namespace }, Object.assign({ watch: 1, resourceVersion: this.getResourceVersion(namespace) }, query));\n }\n watch(opts = { namespace: \"\", retry: false }) {\n let errorReceived = false;\n let timedRetry;\n const { abortController: { abort, signal } = new abort_controller__WEBPACK_IMPORTED_MODULE_11___default.a(), namespace, callback = _utils__WEBPACK_IMPORTED_MODULE_10__[\"noop\"], retry } = opts;\n const { watchId = `${this.kind.toLowerCase()}-${this.watchId++}` } = opts;\n signal.addEventListener(\"abort\", () => {\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[KUBE-API] watch (${watchId}) aborted ${watchUrl}`);\n clearTimeout(timedRetry);\n });\n const watchUrl = this.getWatchUrl(namespace);\n const responsePromise = this.request.getResponse(watchUrl, null, { signal, timeout: 600000 });\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[KUBE-API] watch (${watchId}) ${retry === true ? \"retried\" : \"started\"} ${watchUrl}`);\n responsePromise\n .then(response => {\n if (!response.ok) {\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].warn(`[KUBE-API] watch (${watchId}) error response ${watchUrl}`, { status: response.status });\n return callback(null, response);\n }\n [\"end\", \"close\", \"error\"].forEach((eventName) => {\n response.body.on(eventName, () => {\n if (errorReceived)\n return; // kubernetes errors should be handled in a callback\n if (signal.aborted)\n return;\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`[KUBE-API] watch (${watchId}) ${eventName} ${watchUrl}`);\n clearTimeout(timedRetry);\n timedRetry = setTimeout(() => {\n this.watch(Object.assign(Object.assign({}, opts), { namespace, callback, watchId, retry: true }));\n }, 1000);\n });\n });\n byline__WEBPACK_IMPORTED_MODULE_8___default()(response.body).on(\"data\", (line) => {\n try {\n const event = JSON.parse(line);\n if (event.type === \"ERROR\" && event.object.kind === \"Status\") {\n errorReceived = true;\n return callback(null, new _kube_object__WEBPACK_IMPORTED_MODULE_7__[\"KubeStatus\"](event.object));\n }\n this.modifyWatchEvent(event);\n callback(event, null);\n }\n catch (ignore) {\n // ignore parse errors\n }\n });\n })\n .catch(error => {\n _main_logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`[KUBE-API] watch (${watchId}) throwed ${watchUrl}`, error);\n callback(null, error);\n });\n return abort;\n }\n modifyWatchEvent(event) {\n switch (event.type) {\n case \"ADDED\":\n case \"DELETED\":\n case \"MODIFIED\": {\n ensureObjectSelfLink(this, event.object);\n const { namespace, resourceVersion } = event.object.metadata;\n this.setResourceVersion(namespace, resourceVersion);\n this.setResourceVersion(\"\", resourceVersion);\n break;\n }\n }\n }\n}\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/kube-api.ts?");
|
|
37631
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forCluster\", function() { return forCluster; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"forRemoteCluster\", function() { return forRemoteCluster; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ensureObjectSelfLink\", function() { return ensureObjectSelfLink; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeApi\", function() { return KubeApi; });\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/merge */ \"./node_modules/lodash/merge.js\");\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_merge__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! querystring */ \"querystring\");\n/* harmony import */ var querystring__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(querystring__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _common_vars__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/vars */ \"./src/common/vars.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _api_manager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./index */ \"./src/common/k8s-api/index.ts\");\n/* harmony import */ var _kube_api_parse__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./kube-api-parse */ \"./src/common/k8s-api/kube-api-parse.ts\");\n/* harmony import */ var _kube_object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var byline__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! byline */ \"./node_modules/byline/lib/byline.js\");\n/* harmony import */ var byline__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(byline__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _kube_json_api__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./kube-json-api */ \"./src/common/k8s-api/kube-json-api.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! abort-controller */ \"./node_modules/abort-controller/browser.js\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(abort_controller__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! https */ \"https\");\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(https__WEBPACK_IMPORTED_MODULE_13__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n// Base class for building all kubernetes apis\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction forCluster(cluster, kubeClass) {\n const url = new URL(_index__WEBPACK_IMPORTED_MODULE_6__[\"apiBase\"].config.serverAddress);\n const request = new _kube_json_api__WEBPACK_IMPORTED_MODULE_10__[\"KubeJsonApi\"]({\n serverAddress: _index__WEBPACK_IMPORTED_MODULE_6__[\"apiBase\"].config.serverAddress,\n apiBase: _common_vars__WEBPACK_IMPORTED_MODULE_3__[\"apiKubePrefix\"],\n debug: _common_vars__WEBPACK_IMPORTED_MODULE_3__[\"isDevelopment\"],\n }, {\n headers: {\n \"Host\": `${cluster.metadata.uid}.localhost:${url.port}`\n }\n });\n return new KubeApi({\n objectConstructor: kubeClass,\n request\n });\n}\nfunction forRemoteCluster(config, kubeClass) {\n const reqInit = {};\n const agentOptions = {};\n if (config.cluster.skipTLSVerify === true) {\n agentOptions.rejectUnauthorized = false;\n }\n if (config.user.clientCertificateData) {\n agentOptions.cert = config.user.clientCertificateData;\n }\n if (config.user.clientKeyData) {\n agentOptions.key = config.user.clientKeyData;\n }\n if (config.cluster.caData) {\n agentOptions.ca = config.cluster.caData;\n }\n if (Object.keys(agentOptions).length > 0) {\n reqInit.agent = new https__WEBPACK_IMPORTED_MODULE_13__[\"Agent\"](agentOptions);\n }\n const token = config.user.token;\n const request = new _kube_json_api__WEBPACK_IMPORTED_MODULE_10__[\"KubeJsonApi\"](Object.assign({ serverAddress: config.cluster.server, apiBase: \"\", debug: _common_vars__WEBPACK_IMPORTED_MODULE_3__[\"isDevelopment\"] }, (token ? {\n getRequestOptions: async () => ({\n headers: {\n \"Authorization\": `Bearer ${Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isFunction\"])(token) ? await token() : token}`\n }\n })\n } : {})), reqInit);\n return new KubeApi({\n objectConstructor: kubeClass,\n request\n });\n}\nfunction ensureObjectSelfLink(api, object) {\n if (!object.metadata.selfLink) {\n object.metadata.selfLink = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_7__[\"createKubeApiURL\"])({\n apiPrefix: api.apiPrefix,\n apiVersion: api.apiVersionWithGroup,\n resource: api.apiResource,\n namespace: api.isNamespaced ? object.metadata.namespace : undefined,\n name: object.metadata.name,\n });\n }\n}\nclass KubeApi {\n constructor(options) {\n var _a, _b;\n Object.defineProperty(this, \"options\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: options\n });\n Object.defineProperty(this, \"kind\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiBase\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiPrefix\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiGroup\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiVersionPreferred\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"apiResource\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"isNamespaced\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"objectConstructor\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"request\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"resourceVersions\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Map()\n });\n Object.defineProperty(this, \"watchDisposer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"watchId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 1\n });\n const { objectConstructor, request = _index__WEBPACK_IMPORTED_MODULE_6__[\"apiKube\"], kind = (_a = options.objectConstructor) === null || _a === void 0 ? void 0 : _a.kind, isNamespaced = (_b = options.objectConstructor) === null || _b === void 0 ? void 0 : _b.namespaced } = options || {};\n if (!options.apiBase) {\n options.apiBase = objectConstructor.apiBase;\n }\n const { apiBase, apiPrefix, apiGroup, apiVersion, resource } = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_7__[\"parseKubeApi\"])(options.apiBase);\n this.kind = kind;\n this.isNamespaced = isNamespaced;\n this.apiBase = apiBase;\n this.apiPrefix = apiPrefix;\n this.apiGroup = apiGroup;\n this.apiVersion = apiVersion;\n this.apiResource = resource;\n this.request = request;\n this.objectConstructor = objectConstructor;\n this.parseResponse = this.parseResponse.bind(this);\n _api_manager__WEBPACK_IMPORTED_MODULE_5__[\"apiManager\"].registerApi(apiBase, this);\n }\n get apiVersionWithGroup() {\n var _a;\n return [this.apiGroup, (_a = this.apiVersionPreferred) !== null && _a !== void 0 ? _a : this.apiVersion]\n .filter(Boolean)\n .join(\"/\");\n }\n /**\n * Returns the latest API prefix/group that contains the required resource.\n * First tries options.apiBase, then urls in order from options.fallbackApiBases.\n */\n async getLatestApiPrefixGroup() {\n var _a;\n // Note that this.options.apiBase is the \"full\" url, whereas this.apiBase is parsed\n const apiBases = [this.options.apiBase, ...this.options.fallbackApiBases];\n for (const apiUrl of apiBases) {\n // Split e.g. \"/apis/extensions/v1beta1/ingresses\" to parts\n const { apiPrefix, apiGroup, apiVersionWithGroup, resource } = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_7__[\"parseKubeApi\"])(apiUrl);\n // Request available resources\n try {\n const response = await this.request.get(`${apiPrefix}/${apiVersionWithGroup}`);\n // If the resource is found in the group, use this apiUrl\n if ((_a = response.resources) === null || _a === void 0 ? void 0 : _a.find(kubeResource => kubeResource.name === resource)) {\n return { apiPrefix, apiGroup };\n }\n }\n catch (error) {\n // Exception is ignored as we can try the next url\n }\n }\n throw new Error(`Can't find working API for the Kubernetes resource ${this.apiResource}`);\n }\n /**\n * Get the apiPrefix and apiGroup to be used for fetching the preferred version.\n */\n async getPreferredVersionPrefixGroup() {\n if (this.options.fallbackApiBases) {\n try {\n return await this.getLatestApiPrefixGroup();\n }\n catch (error) {\n // If valid API wasn't found, log the error and return defaults below\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].error(error);\n }\n }\n return {\n apiPrefix: this.apiPrefix,\n apiGroup: this.apiGroup\n };\n }\n async checkPreferredVersion() {\n var _a, _b;\n if (this.options.fallbackApiBases && !this.options.checkPreferredVersion) {\n throw new Error(\"checkPreferredVersion must be enabled if fallbackApiBases is set in KubeApi\");\n }\n if (this.options.checkPreferredVersion && this.apiVersionPreferred === undefined) {\n const { apiPrefix, apiGroup } = await this.getPreferredVersionPrefixGroup();\n // The apiPrefix and apiGroup might change due to fallbackApiBases, so we must override them\n Object.defineProperty(this, \"apiPrefix\", {\n value: apiPrefix\n });\n Object.defineProperty(this, \"apiGroup\", {\n value: apiGroup\n });\n const res = await this.request.get(`${this.apiPrefix}/${this.apiGroup}`);\n Object.defineProperty(this, \"apiVersionPreferred\", {\n value: (_b = (_a = res === null || res === void 0 ? void 0 : res.preferredVersion) === null || _a === void 0 ? void 0 : _a.version) !== null && _b !== void 0 ? _b : null,\n });\n if (this.apiVersionPreferred) {\n Object.defineProperty(this, \"apiBase\", { value: this.getUrl() });\n _api_manager__WEBPACK_IMPORTED_MODULE_5__[\"apiManager\"].registerApi(this.apiBase, this);\n }\n }\n }\n setResourceVersion(namespace = \"\", newVersion) {\n this.resourceVersions.set(namespace, newVersion);\n }\n getResourceVersion(namespace = \"\") {\n return this.resourceVersions.get(namespace);\n }\n async refreshResourceVersion(params) {\n return this.list(params, { limit: 1 });\n }\n getUrl({ name = \"\", namespace = \"\" } = {}, query) {\n const resourcePath = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_7__[\"createKubeApiURL\"])({\n apiPrefix: this.apiPrefix,\n apiVersion: this.apiVersionWithGroup,\n resource: this.apiResource,\n namespace: this.isNamespaced ? namespace : undefined,\n name,\n });\n return resourcePath + (query ? `?${Object(querystring__WEBPACK_IMPORTED_MODULE_2__[\"stringify\"])(this.normalizeQuery(query))}` : \"\");\n }\n normalizeQuery(query = {}) {\n if (query.labelSelector) {\n query.labelSelector = [query.labelSelector].flat().join(\",\");\n }\n if (query.fieldSelector) {\n query.fieldSelector = [query.fieldSelector].flat().join(\",\");\n }\n return query;\n }\n parseResponse(data, namespace) {\n if (!data)\n return null;\n const KubeObjectConstructor = this.objectConstructor;\n // process items list response, check before single item since there is overlap\n if (_kube_object__WEBPACK_IMPORTED_MODULE_8__[\"KubeObject\"].isJsonApiDataList(data, _kube_object__WEBPACK_IMPORTED_MODULE_8__[\"KubeObject\"].isPartialJsonApiData)) {\n const { apiVersion, items, metadata } = data;\n this.setResourceVersion(namespace, metadata.resourceVersion);\n this.setResourceVersion(\"\", metadata.resourceVersion);\n return items.map((item) => {\n const object = new KubeObjectConstructor(Object.assign({ kind: this.kind, apiVersion }, item));\n ensureObjectSelfLink(this, object);\n return object;\n });\n }\n // process a single item\n if (_kube_object__WEBPACK_IMPORTED_MODULE_8__[\"KubeObject\"].isJsonApiData(data)) {\n const object = new KubeObjectConstructor(data);\n ensureObjectSelfLink(this, object);\n return object;\n }\n // custom apis might return array for list response, e.g. users, groups, etc.\n if (Array.isArray(data)) {\n return data.map(data => new KubeObjectConstructor(data));\n }\n return null;\n }\n async list({ namespace = \"\", reqInit } = {}, query) {\n await this.checkPreferredVersion();\n const url = this.getUrl({ namespace });\n const res = await this.request.get(url, { query }, reqInit);\n const parsed = this.parseResponse(res, namespace);\n if (Array.isArray(parsed)) {\n return parsed;\n }\n if (!parsed) {\n return null;\n }\n throw new Error(`GET multiple request to ${url} returned not an array: ${JSON.stringify(parsed)}`);\n }\n async get({ name = \"\", namespace = \"default\" } = {}, query) {\n await this.checkPreferredVersion();\n const url = this.getUrl({ namespace, name });\n const res = await this.request.get(url, { query });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`GET single request to ${url} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async create({ name = \"\", namespace = \"default\" } = {}, data) {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl({ namespace });\n const res = await this.request.post(apiUrl, {\n data: lodash_merge__WEBPACK_IMPORTED_MODULE_0___default()({\n kind: this.kind,\n apiVersion: this.apiVersionWithGroup,\n metadata: {\n name,\n namespace\n }\n }, data)\n });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`POST request to ${apiUrl} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async update({ name = \"\", namespace = \"default\" } = {}, data) {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl({ namespace, name });\n const res = await this.request.put(apiUrl, { data });\n const parsed = this.parseResponse(res);\n if (Array.isArray(parsed)) {\n throw new Error(`PUT request to ${apiUrl} returned an array: ${JSON.stringify(parsed)}`);\n }\n return parsed;\n }\n async delete({ name = \"\", namespace = \"default\" }) {\n await this.checkPreferredVersion();\n const apiUrl = this.getUrl({ namespace, name });\n return this.request.del(apiUrl);\n }\n getWatchUrl(namespace = \"\", query = {}) {\n return this.getUrl({ namespace }, Object.assign({ watch: 1, resourceVersion: this.getResourceVersion(namespace) }, query));\n }\n watch(opts = { namespace: \"\", retry: false }) {\n let errorReceived = false;\n let timedRetry;\n const { abortController: { abort, signal } = new abort_controller__WEBPACK_IMPORTED_MODULE_12___default.a(), namespace, callback = _utils__WEBPACK_IMPORTED_MODULE_11__[\"noop\"], retry } = opts;\n const { watchId = `${this.kind.toLowerCase()}-${this.watchId++}` } = opts;\n signal.addEventListener(\"abort\", () => {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[KUBE-API] watch (${watchId}) aborted ${watchUrl}`);\n clearTimeout(timedRetry);\n });\n const watchUrl = this.getWatchUrl(namespace);\n const responsePromise = this.request.getResponse(watchUrl, null, { signal, timeout: 600000 });\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[KUBE-API] watch (${watchId}) ${retry === true ? \"retried\" : \"started\"} ${watchUrl}`);\n responsePromise\n .then(response => {\n if (!response.ok) {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].warn(`[KUBE-API] watch (${watchId}) error response ${watchUrl}`, { status: response.status });\n return callback(null, response);\n }\n [\"end\", \"close\", \"error\"].forEach((eventName) => {\n response.body.on(eventName, () => {\n if (errorReceived)\n return; // kubernetes errors should be handled in a callback\n if (signal.aborted)\n return;\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[KUBE-API] watch (${watchId}) ${eventName} ${watchUrl}`);\n clearTimeout(timedRetry);\n timedRetry = setTimeout(() => {\n this.watch(Object.assign(Object.assign({}, opts), { namespace, callback, watchId, retry: true }));\n }, 1000);\n });\n });\n byline__WEBPACK_IMPORTED_MODULE_9___default()(response.body).on(\"data\", (line) => {\n try {\n const event = JSON.parse(line);\n if (event.type === \"ERROR\" && event.object.kind === \"Status\") {\n errorReceived = true;\n return callback(null, new _kube_object__WEBPACK_IMPORTED_MODULE_8__[\"KubeStatus\"](event.object));\n }\n this.modifyWatchEvent(event);\n callback(event, null);\n }\n catch (ignore) {\n // ignore parse errors\n }\n });\n })\n .catch(error => {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].error(`[KUBE-API] watch (${watchId}) throwed ${watchUrl}`, error);\n callback(null, error);\n });\n return abort;\n }\n modifyWatchEvent(event) {\n switch (event.type) {\n case \"ADDED\":\n case \"DELETED\":\n case \"MODIFIED\": {\n ensureObjectSelfLink(this, event.object);\n const { namespace, resourceVersion } = event.object.metadata;\n this.setResourceVersion(namespace, resourceVersion);\n this.setResourceVersion(\"\", resourceVersion);\n break;\n }\n }\n }\n}\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/kube-api.ts?");
|
|
37620
37632
|
|
|
37621
37633
|
/***/ }),
|
|
37622
37634
|
|
|
@@ -37640,7 +37652,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
37640
37652
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
37641
37653
|
|
|
37642
37654
|
"use strict";
|
|
37643
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeObjectStore\", function() { return KubeObjectStore; });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _kube_object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var _item_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../item.store */ \"./src/common/item.store.ts\");\n/* harmony import */ var _api_manager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/* harmony import */ var _kube_api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./kube-api */ \"./src/common/k8s-api/kube-api.ts\");\n/* harmony import */ var _kube_api_parse__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./kube-api-parse */ \"./src/common/k8s-api/kube-api-parse.ts\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! abort-controller */ \"./node_modules/abort-controller/browser.js\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(abort_controller__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\n\nclass KubeObjectStore extends _item_store__WEBPACK_IMPORTED_MODULE_3__[\"ItemStore\"] {\n constructor(api) {\n super();\n Object.defineProperty(this, \"api\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"limit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"bufferSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 50000\n });\n Object.defineProperty(this, \"loadedNamespaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n // collect items from watch-api events to avoid UI blowing up with huge streams of data\n Object.defineProperty(this, \"eventsBuffer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].array([], { deep: false })\n });\n if (api)\n this.api = api;\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"makeObservable\"])(this);\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"autoBind\"])(this);\n this.bindWatchEventsUpdater();\n }\n get contextReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"when\"])(() => Boolean(this.context));\n }\n get namespacesReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"when\"])(() => Boolean(this.loadedNamespaces));\n }\n get context() {\n return KubeObjectStore.defaultContext.get();\n }\n get contextItems() {\n var _a, _b;\n const namespaces = (_b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.contextNamespaces) !== null && _b !== void 0 ? _b : [];\n return this.items.filter(item => {\n const itemNamespace = item.getNs();\n return !itemNamespace /* cluster-wide */ || namespaces.includes(itemNamespace);\n });\n }\n getTotalCount() {\n return this.contextItems.length;\n }\n get query() {\n const { limit } = this;\n if (!limit) {\n return {};\n }\n return { limit };\n }\n getAllByNs(namespace, strict = false) {\n const namespaces = [].concat(namespace);\n if (namespaces.length) {\n return this.items.filter(item => namespaces.includes(item.getNs()));\n }\n if (!strict) {\n return this.items;\n }\n return [];\n }\n getById(id) {\n return this.items.find(item => item.getId() === id);\n }\n getByName(name, namespace) {\n return this.items.find(item => {\n return item.getName() === name && (namespace ? item.getNs() === namespace : true);\n });\n }\n getByPath(path) {\n return this.items.find(item => item.selfLink === path);\n }\n getByLabel(labels) {\n if (Array.isArray(labels)) {\n return this.items.filter((item) => {\n const itemLabels = item.getLabels();\n return labels.every(label => itemLabels.includes(label));\n });\n }\n else {\n return this.items.filter((item) => {\n const itemLabels = item.metadata.labels || {};\n return Object.entries(labels)\n .every(([key, value]) => itemLabels[key] === value);\n });\n }\n }\n async loadItems({ namespaces, api, reqInit }) {\n var _a, _b;\n if ((_a = this.context) === null || _a === void 0 ? void 0 : _a.cluster.isAllowedResource(api.kind)) {\n if (!api.isNamespaced) {\n return api.list({ reqInit }, this.query);\n }\n const isLoadingAll = ((_b = this.context.allNamespaces) === null || _b === void 0 ? void 0 : _b.length) > 1\n && this.context.cluster.accessibleNamespaces.length === 0\n && this.context.allNamespaces.every(ns => namespaces.includes(ns));\n if (isLoadingAll) {\n this.loadedNamespaces = [];\n return api.list({ reqInit }, this.query);\n }\n else {\n this.loadedNamespaces = namespaces;\n return Promise // load resources per namespace\n .all(namespaces.map(namespace => api.list({ namespace, reqInit }, this.query)))\n .then(items => items.flat().filter(Boolean));\n }\n }\n return [];\n }\n filterItemsOnLoad(items) {\n return items;\n }\n async loadAll(options = {}) {\n await this.contextReady;\n this.isLoading = true;\n try {\n const { namespaces = this.context.allNamespaces, // load all namespaces by default\n merge = true, // merge loaded items or return as result\n reqInit, } = options;\n const items = await this.loadItems({ namespaces, api: this.api, reqInit });\n if (merge) {\n this.mergeItems(items, { replace: false });\n }\n else {\n this.mergeItems(items, { replace: true });\n }\n this.isLoaded = true;\n this.failedLoading = false;\n return items;\n }\n catch (error) {\n console.warn(\"[KubeObjectStore] loadAll failed\", this.api.apiBase, error);\n this.resetOnError(error);\n this.failedLoading = true;\n }\n finally {\n this.isLoading = false;\n }\n }\n async reloadAll(opts = {}) {\n const { force = false } = opts, loadingOptions = __rest(opts, [\"force\"]);\n if (this.isLoading || (this.isLoaded && !force)) {\n return;\n }\n return this.loadAll(loadingOptions);\n }\n mergeItems(partialItems, { replace = false, updateStore = true, sort = true, filter = true } = {}) {\n let items = partialItems;\n // update existing items\n if (!replace) {\n const namespaces = partialItems.map(item => item.getNs());\n items = [\n ...this.items.filter(existingItem => !namespaces.includes(existingItem.getNs())),\n ...partialItems,\n ];\n }\n if (filter)\n items = this.filterItemsOnLoad(items);\n if (sort)\n items = this.sortItems(items);\n if (updateStore)\n this.items.replace(items);\n return items;\n }\n resetOnError(error) {\n if (error)\n this.reset();\n }\n async loadItem(params) {\n return this.api.get(params);\n }\n async load(params) {\n const { name, namespace } = params;\n let item = this.getByName(name, namespace);\n if (!item) {\n item = await this.loadItem(params);\n const newItems = this.sortItems([...this.items, item]);\n this.items.replace(newItems);\n }\n return item;\n }\n async loadFromPath(resourcePath) {\n const { namespace, name } = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_6__[\"parseKubeApi\"])(resourcePath);\n return this.load({ name, namespace });\n }\n async createItem(params, data) {\n return this.api.create(params, data);\n }\n async create(params, data) {\n const newItem = await this.createItem(params, data);\n const items = this.sortItems([...this.items, newItem]);\n this.items.replace(items);\n return newItem;\n }\n postUpdate(rawItem) {\n const newItem = new this.api.objectConstructor(rawItem);\n const index = this.items.findIndex(item => item.getId() === newItem.getId());\n Object(_kube_api__WEBPACK_IMPORTED_MODULE_5__[\"ensureObjectSelfLink\"])(this.api, newItem);\n if (index < 0) {\n this.items.push(newItem);\n }\n else {\n this.items[index] = newItem;\n }\n return newItem;\n }\n async patch(item, patch) {\n return this.postUpdate(await item.patch(patch));\n }\n async update(item, data) {\n return this.postUpdate(await item.update(data));\n }\n async remove(item) {\n await item.delete();\n this.items.remove(item);\n this.selectedItemsIds.delete(item.getId());\n }\n async removeSelectedItems() {\n return Promise.all(this.selectedItems.map(this.remove));\n }\n bindWatchEventsUpdater(delay = 1000) {\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"reaction\"])(() => this.eventsBuffer.length, this.updateFromEventsBuffer, {\n delay\n });\n }\n subscribe() {\n const abortController = new abort_controller__WEBPACK_IMPORTED_MODULE_7___default.a();\n if (this.api.isNamespaced) {\n Promise.race([Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"rejectPromiseBy\"])(abortController.signal), Promise.all([this.contextReady, this.namespacesReady])])\n .then(() => {\n if (this.context.cluster.isGlobalWatchEnabled && this.loadedNamespaces.length === 0) {\n return this.watchNamespace(\"\", abortController);\n }\n for (const namespace of this.loadedNamespaces) {\n this.watchNamespace(namespace, abortController);\n }\n })\n .catch(_utils__WEBPACK_IMPORTED_MODULE_1__[\"noop\"]); // ignore DOMExceptions\n }\n else {\n this.watchNamespace(\"\", abortController);\n }\n return () => abortController.abort();\n }\n watchNamespace(namespace, abortController) {\n if (!this.api.getResourceVersion(namespace)) {\n return;\n }\n let timedRetry;\n const watch = () => this.api.watch({\n namespace,\n abortController,\n callback\n });\n const { signal } = abortController;\n const callback = (data, error) => {\n if (!this.isLoaded || (error === null || error === void 0 ? void 0 : error.type) === \"aborted\")\n return;\n if (error instanceof Response) {\n if (error.status === 404 || error.status === 401) {\n // api has gone, or credentials are not permitted, let's not retry\n return;\n }\n // not sure what to do, best to retry\n clearTimeout(timedRetry);\n timedRetry = setTimeout(watch, 5000);\n }\n else if (error instanceof _kube_object__WEBPACK_IMPORTED_MODULE_2__[\"KubeStatus\"] && error.code === 410) {\n clearTimeout(timedRetry);\n // resourceVersion has gone, let's try to reload\n timedRetry = setTimeout(() => {\n (namespace\n ? this.loadAll({ namespaces: [namespace], reqInit: { signal } })\n : this.loadAll({ merge: false, reqInit: { signal } })).then(watch);\n }, 1000);\n }\n else if (error) { // not sure what to do, best to retry\n clearTimeout(timedRetry);\n timedRetry = setTimeout(watch, 5000);\n }\n if (data) {\n this.eventsBuffer.push(data);\n }\n };\n signal.addEventListener(\"abort\", () => clearTimeout(timedRetry));\n watch();\n }\n updateFromEventsBuffer() {\n const items = this.getItems();\n for (const { type, object } of this.eventsBuffer.clear()) {\n const index = items.findIndex(item => { var _a; return item.getId() === ((_a = object.metadata) === null || _a === void 0 ? void 0 : _a.uid); });\n const item = items[index];\n const api = _api_manager__WEBPACK_IMPORTED_MODULE_4__[\"apiManager\"].getApiByKind(object.kind, object.apiVersion);\n switch (type) {\n case \"ADDED\":\n case \"MODIFIED\":\n const newItem = new api.objectConstructor(object);\n if (!item) {\n items.push(newItem);\n }\n else {\n items[index] = newItem;\n }\n break;\n case \"DELETED\":\n if (item) {\n items.splice(index, 1);\n }\n break;\n }\n }\n // update items\n this.items.replace(this.sortItems(items.slice(-this.bufferSize)));\n }\n}\nObject.defineProperty(KubeObjectStore, \"defaultContext\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].box()\n}); // TODO: support multiple cluster contexts\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"],\n __metadata(\"design:type\", Array)\n], KubeObjectStore.prototype, \"loadedNamespaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], KubeObjectStore.prototype, \"contextItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"loadAll\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"reloadAll\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Array, Object]),\n __metadata(\"design:returntype\", Array)\n], KubeObjectStore.prototype, \"mergeItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"load\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"loadFromPath\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], KubeObjectStore.prototype, \"updateFromEventsBuffer\", null);\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/kube-object.store.ts?");
|
|
37655
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"KubeObjectStore\", function() { return KubeObjectStore; });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _kube_object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var _item_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../item.store */ \"./src/common/item.store.ts\");\n/* harmony import */ var _kube_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./kube-api */ \"./src/common/k8s-api/kube-api.ts\");\n/* harmony import */ var _kube_api_parse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./kube-api-parse */ \"./src/common/k8s-api/kube-api-parse.ts\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! abort-controller */ \"./node_modules/abort-controller/browser.js\");\n/* harmony import */ var abort_controller__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(abort_controller__WEBPACK_IMPORTED_MODULE_6__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\nclass KubeObjectStore extends _item_store__WEBPACK_IMPORTED_MODULE_3__[\"ItemStore\"] {\n constructor(api) {\n super();\n Object.defineProperty(this, \"api\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"limit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"bufferSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 50000\n });\n Object.defineProperty(this, \"loadedNamespaces\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n // collect items from watch-api events to avoid UI blowing up with huge streams of data\n Object.defineProperty(this, \"eventsBuffer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].array([], { deep: false })\n });\n if (api)\n this.api = api;\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"makeObservable\"])(this);\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"autoBind\"])(this);\n this.bindWatchEventsUpdater();\n }\n get contextReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"when\"])(() => Boolean(this.context));\n }\n get namespacesReady() {\n return Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"when\"])(() => Boolean(this.loadedNamespaces));\n }\n get context() {\n return KubeObjectStore.defaultContext.get();\n }\n get contextItems() {\n var _a, _b;\n const namespaces = (_b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.contextNamespaces) !== null && _b !== void 0 ? _b : [];\n return this.items.filter(item => {\n const itemNamespace = item.getNs();\n return !itemNamespace /* cluster-wide */ || namespaces.includes(itemNamespace);\n });\n }\n getTotalCount() {\n return this.contextItems.length;\n }\n get query() {\n const { limit } = this;\n if (!limit) {\n return {};\n }\n return { limit };\n }\n getAllByNs(namespace, strict = false) {\n const namespaces = [].concat(namespace);\n if (namespaces.length) {\n return this.items.filter(item => namespaces.includes(item.getNs()));\n }\n if (!strict) {\n return this.items;\n }\n return [];\n }\n getById(id) {\n return this.items.find(item => item.getId() === id);\n }\n getByName(name, namespace) {\n return this.items.find(item => {\n return item.getName() === name && (namespace ? item.getNs() === namespace : true);\n });\n }\n getByPath(path) {\n return this.items.find(item => item.selfLink === path);\n }\n getByLabel(labels) {\n if (Array.isArray(labels)) {\n return this.items.filter((item) => {\n const itemLabels = item.getLabels();\n return labels.every(label => itemLabels.includes(label));\n });\n }\n else {\n return this.items.filter((item) => {\n const itemLabels = item.metadata.labels || {};\n return Object.entries(labels)\n .every(([key, value]) => itemLabels[key] === value);\n });\n }\n }\n async loadItems({ namespaces, api, reqInit }) {\n var _a, _b;\n if ((_a = this.context) === null || _a === void 0 ? void 0 : _a.cluster.isAllowedResource(api.kind)) {\n if (!api.isNamespaced) {\n return api.list({ reqInit }, this.query);\n }\n const isLoadingAll = ((_b = this.context.allNamespaces) === null || _b === void 0 ? void 0 : _b.length) > 1\n && this.context.cluster.accessibleNamespaces.length === 0\n && this.context.allNamespaces.every(ns => namespaces.includes(ns));\n if (isLoadingAll) {\n this.loadedNamespaces = [];\n return api.list({ reqInit }, this.query);\n }\n else {\n this.loadedNamespaces = namespaces;\n return Promise // load resources per namespace\n .all(namespaces.map(namespace => api.list({ namespace, reqInit }, this.query)))\n .then(items => items.flat().filter(Boolean));\n }\n }\n return [];\n }\n filterItemsOnLoad(items) {\n return items;\n }\n async loadAll(options = {}) {\n await this.contextReady;\n this.isLoading = true;\n try {\n const { namespaces = this.context.allNamespaces, // load all namespaces by default\n merge = true, // merge loaded items or return as result\n reqInit, } = options;\n const items = await this.loadItems({ namespaces, api: this.api, reqInit });\n if (merge) {\n this.mergeItems(items, { replace: false });\n }\n else {\n this.mergeItems(items, { replace: true });\n }\n this.isLoaded = true;\n this.failedLoading = false;\n return items;\n }\n catch (error) {\n console.warn(\"[KubeObjectStore] loadAll failed\", this.api.apiBase, error);\n this.resetOnError(error);\n this.failedLoading = true;\n }\n finally {\n this.isLoading = false;\n }\n }\n async reloadAll(opts = {}) {\n const { force = false } = opts, loadingOptions = __rest(opts, [\"force\"]);\n if (this.isLoading || (this.isLoaded && !force)) {\n return;\n }\n return this.loadAll(loadingOptions);\n }\n mergeItems(partialItems, { replace = false, updateStore = true, sort = true, filter = true } = {}) {\n let items = partialItems;\n // update existing items\n if (!replace) {\n const namespaces = partialItems.map(item => item.getNs());\n items = [\n ...this.items.filter(existingItem => !namespaces.includes(existingItem.getNs())),\n ...partialItems,\n ];\n }\n if (filter)\n items = this.filterItemsOnLoad(items);\n if (sort)\n items = this.sortItems(items);\n if (updateStore)\n this.items.replace(items);\n return items;\n }\n resetOnError(error) {\n if (error)\n this.reset();\n }\n async loadItem(params) {\n return this.api.get(params);\n }\n async load(params) {\n const { name, namespace } = params;\n let item = this.getByName(name, namespace);\n if (!item) {\n item = await this.loadItem(params);\n const newItems = this.sortItems([...this.items, item]);\n this.items.replace(newItems);\n }\n return item;\n }\n async loadFromPath(resourcePath) {\n const { namespace, name } = Object(_kube_api_parse__WEBPACK_IMPORTED_MODULE_5__[\"parseKubeApi\"])(resourcePath);\n return this.load({ name, namespace });\n }\n async createItem(params, data) {\n return this.api.create(params, data);\n }\n async create(params, data) {\n const newItem = await this.createItem(params, data);\n const items = this.sortItems([...this.items, newItem]);\n this.items.replace(items);\n return newItem;\n }\n postUpdate(rawItem) {\n const newItem = new this.api.objectConstructor(rawItem);\n const index = this.items.findIndex(item => item.getId() === newItem.getId());\n Object(_kube_api__WEBPACK_IMPORTED_MODULE_4__[\"ensureObjectSelfLink\"])(this.api, newItem);\n if (index < 0) {\n this.items.push(newItem);\n }\n else {\n this.items[index] = newItem;\n }\n return newItem;\n }\n async patch(item, patch) {\n return this.postUpdate(await item.patch(patch));\n }\n async update(item, data) {\n return this.postUpdate(await item.update(data));\n }\n async remove(item) {\n await item.delete();\n this.items.remove(item);\n this.selectedItemsIds.delete(item.getId());\n }\n async removeSelectedItems() {\n return Promise.all(this.selectedItems.map(this.remove));\n }\n bindWatchEventsUpdater(delay = 1000) {\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"reaction\"])(() => this.eventsBuffer.length, this.updateFromEventsBuffer, {\n delay\n });\n }\n subscribe() {\n const abortController = new abort_controller__WEBPACK_IMPORTED_MODULE_6___default.a();\n if (this.api.isNamespaced) {\n Promise.race([Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"rejectPromiseBy\"])(abortController.signal), Promise.all([this.contextReady, this.namespacesReady])])\n .then(() => {\n if (this.context.cluster.isGlobalWatchEnabled && this.loadedNamespaces.length === 0) {\n return this.watchNamespace(\"\", abortController);\n }\n for (const namespace of this.loadedNamespaces) {\n this.watchNamespace(namespace, abortController);\n }\n })\n .catch(_utils__WEBPACK_IMPORTED_MODULE_1__[\"noop\"]); // ignore DOMExceptions\n }\n else {\n this.watchNamespace(\"\", abortController);\n }\n return () => abortController.abort();\n }\n watchNamespace(namespace, abortController) {\n if (!this.api.getResourceVersion(namespace)) {\n return;\n }\n let timedRetry;\n const watch = () => this.api.watch({\n namespace,\n abortController,\n callback\n });\n const { signal } = abortController;\n const callback = (data, error) => {\n if (!this.isLoaded || (error === null || error === void 0 ? void 0 : error.type) === \"aborted\")\n return;\n if (error instanceof Response) {\n if (error.status === 404 || error.status === 401) {\n // api has gone, or credentials are not permitted, let's not retry\n return;\n }\n // not sure what to do, best to retry\n clearTimeout(timedRetry);\n timedRetry = setTimeout(watch, 5000);\n }\n else if (error instanceof _kube_object__WEBPACK_IMPORTED_MODULE_2__[\"KubeStatus\"] && error.code === 410) {\n clearTimeout(timedRetry);\n // resourceVersion has gone, let's try to reload\n timedRetry = setTimeout(() => {\n (namespace\n ? this.loadAll({ namespaces: [namespace], reqInit: { signal } })\n : this.loadAll({ merge: false, reqInit: { signal } })).then(watch);\n }, 1000);\n }\n else if (error) { // not sure what to do, best to retry\n clearTimeout(timedRetry);\n timedRetry = setTimeout(watch, 5000);\n }\n if (data) {\n this.eventsBuffer.push(data);\n }\n };\n signal.addEventListener(\"abort\", () => clearTimeout(timedRetry));\n watch();\n }\n updateFromEventsBuffer() {\n const items = this.getItems();\n for (const { type, object } of this.eventsBuffer.clear()) {\n const index = items.findIndex(item => { var _a; return item.getId() === ((_a = object.metadata) === null || _a === void 0 ? void 0 : _a.uid); });\n const item = items[index];\n switch (type) {\n case \"ADDED\":\n case \"MODIFIED\":\n const newItem = new this.api.objectConstructor(object);\n if (!item) {\n items.push(newItem);\n }\n else {\n items[index] = newItem;\n }\n break;\n case \"DELETED\":\n if (item) {\n items.splice(index, 1);\n }\n break;\n }\n }\n // update items\n this.items.replace(this.sortItems(items.slice(-this.bufferSize)));\n }\n}\nObject.defineProperty(KubeObjectStore, \"defaultContext\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].box()\n}); // TODO: support multiple cluster contexts\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"],\n __metadata(\"design:type\", Array)\n], KubeObjectStore.prototype, \"loadedNamespaces\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [])\n], KubeObjectStore.prototype, \"contextItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"loadAll\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"reloadAll\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Array, Object]),\n __metadata(\"design:returntype\", Array)\n], KubeObjectStore.prototype, \"mergeItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"load\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", Promise)\n], KubeObjectStore.prototype, \"loadFromPath\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], KubeObjectStore.prototype, \"updateFromEventsBuffer\", null);\n\n\n//# sourceURL=webpack:///./src/common/k8s-api/kube-object.store.ts?");
|
|
37644
37656
|
|
|
37645
37657
|
/***/ }),
|
|
37646
37658
|
|
|
@@ -37796,7 +37808,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
37796
37808
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
37797
37809
|
|
|
37798
37810
|
"use strict";
|
|
37799
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clusterRoute\", function() { return clusterRoute; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clusterURL\", function() { return clusterURL; });\n/* harmony import */ var _utils_buildUrl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/buildUrl */ \"./src/common/utils/buildUrl.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\nconst clusterRoute = {\n path: \"/
|
|
37811
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clusterRoute\", function() { return clusterRoute; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"clusterURL\", function() { return clusterURL; });\n/* harmony import */ var _utils_buildUrl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/buildUrl */ \"./src/common/utils/buildUrl.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\nconst clusterRoute = {\n path: \"/overview\"\n};\nconst clusterURL = Object(_utils_buildUrl__WEBPACK_IMPORTED_MODULE_0__[\"buildURL\"])(clusterRoute.path);\n\n\n//# sourceURL=webpack:///./src/common/routes/cluster.ts?");
|
|
37800
37812
|
|
|
37801
37813
|
/***/ }),
|
|
37802
37814
|
|
|
@@ -38012,7 +38024,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
38012
38024
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
38013
38025
|
|
|
38014
38026
|
"use strict";
|
|
38015
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"portForwardsRoute\", function() { return portForwardsRoute; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"portForwardsURL\", function() { return portForwardsURL; });\n/* harmony import */ var _utils_buildUrl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/buildUrl */ \"./src/common/utils/buildUrl.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\nconst portForwardsRoute = {\n path: \"/port-forwards
|
|
38027
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"portForwardsRoute\", function() { return portForwardsRoute; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"portForwardsURL\", function() { return portForwardsURL; });\n/* harmony import */ var _utils_buildUrl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/buildUrl */ \"./src/common/utils/buildUrl.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\nconst portForwardsRoute = {\n path: \"/port-forwards/:forwardport?\"\n};\nconst portForwardsURL = Object(_utils_buildUrl__WEBPACK_IMPORTED_MODULE_0__[\"buildURL\"])(portForwardsRoute.path);\n\n\n//# sourceURL=webpack:///./src/common/routes/port-forwards.ts?");
|
|
38016
38028
|
|
|
38017
38029
|
/***/ }),
|
|
38018
38030
|
|
|
@@ -38176,11 +38188,11 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _use
|
|
|
38176
38188
|
/*!******************************************************!*\
|
|
38177
38189
|
!*** ./src/common/user-store/preferences-helpers.ts ***!
|
|
38178
38190
|
\******************************************************/
|
|
38179
|
-
/*! exports provided: defaultEditorConfig, DESCRIPTORS, CONSTANTS */
|
|
38191
|
+
/*! exports provided: defaultEditorConfig, defaultPackageMirror, packageMirrors, DESCRIPTORS, CONSTANTS */
|
|
38180
38192
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
38181
38193
|
|
|
38182
38194
|
"use strict";
|
|
38183
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultEditorConfig\", function() { return defaultEditorConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DESCRIPTORS\", function() { return DESCRIPTORS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CONSTANTS\", function() { return CONSTANTS; });\n/* harmony import */ var moment_timezone__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment-timezone */ \"./node_modules/moment-timezone/index.js\");\n/* harmony import */ var moment_timezone__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment_timezone__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! path */ \"path\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! os */ \"os\");\n/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(os__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _renderer_theme_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../renderer/theme.store */ \"./src/renderer/theme.store.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/merge */ \"./node_modules/lodash/merge.js\");\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_merge__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! semver */ \"./node_modules/semver/index.js\");\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(semver__WEBPACK_IMPORTED_MODULE_6__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nvar _a;\n\n\n\n\n\n\n\nconst defaultEditorConfig = {\n lineNumbers: \"on\",\n miniMap: {\n enabled: true\n },\n tabSize: 2\n};\nconst httpsProxy = {\n fromStore(val) {\n return val;\n },\n toStore(val) {\n return val || undefined;\n },\n};\nconst shell = {\n fromStore(val) {\n return val;\n },\n toStore(val) {\n return val || undefined;\n },\n};\nconst colorTheme = {\n fromStore(val) {\n return val || _renderer_theme_store__WEBPACK_IMPORTED_MODULE_3__[\"ThemeStore\"].defaultTheme;\n },\n toStore(val) {\n if (!val || val === _renderer_theme_store__WEBPACK_IMPORTED_MODULE_3__[\"ThemeStore\"].defaultTheme) {\n return undefined;\n }\n return val;\n },\n};\nconst localeTimezone = {\n fromStore(val) {\n return val || moment_timezone__WEBPACK_IMPORTED_MODULE_0___default.a.tz.guess(true) || \"UTC\";\n },\n toStore(val) {\n if (!val || val === moment_timezone__WEBPACK_IMPORTED_MODULE_0___default.a.tz.guess(true) || val === \"UTC\") {\n return undefined;\n }\n return val;\n },\n};\nconst allowUntrustedCAs = {\n fromStore(val) {\n return val !== null && val !== void 0 ? val : false;\n },\n toStore(val) {\n if (!val) {\n return undefined;\n }\n return val;\n },\n};\nconst allowTelemetry = {\n fromStore(val) {\n return val !== null && val !== void 0 ? val : true;\n },\n toStore(val) {\n if (val === true) {\n return undefined;\n }\n return val;\n },\n};\nconst allowErrorReporting = {\n fromStore(val) {\n return val !== null && val !== void 0 ? val : true;\n },\n toStore(val) {\n if (val === true) {\n return undefined;\n }\n return val;\n },\n};\nconst downloadMirror = {\n fromStore(val) {\n return val !== null && val !== void 0 ? val : \"default\";\n },\n toStore(val) {\n if (!val || val === \"default\") {\n return undefined;\n }\n return val;\n },\n};\nconst downloadKubectlBinaries = {\n fromStore(val) {\n return val !== null && val !== void 0 ? val : true;\n },\n toStore(val) {\n if (val === true) {\n return undefined;\n }\n return val;\n },\n};\nconst downloadBinariesPath = {\n fromStore(val) {\n return val;\n },\n toStore(val) {\n if (!val) {\n return undefined;\n }\n return val;\n },\n};\nconst kubectlBinariesPath = {\n fromStore(val) {\n return val;\n },\n toStore(val) {\n if (!val) {\n return undefined;\n }\n return val;\n },\n};\nconst openAtLogin = {\n fromStore(val) {\n return val !== null && val !== void 0 ? val : false;\n },\n toStore(val) {\n if (!val) {\n return undefined;\n }\n return val;\n },\n};\nconst terminalCopyOnSelect = {\n fromStore(val) {\n return val !== null && val !== void 0 ? val : false;\n },\n toStore(val) {\n if (!val) {\n return undefined;\n }\n return val;\n },\n};\nconst hiddenTableColumns = {\n fromStore(val) {\n return new Map((val !== null && val !== void 0 ? val : []).map(([tableId, columnIds]) => [tableId, new _utils__WEBPACK_IMPORTED_MODULE_4__[\"ObservableToggleSet\"](columnIds)]));\n },\n toStore(val) {\n const res = [];\n for (const [table, columns] of val) {\n if (columns.size) {\n res.push([table, Array.from(columns)]);\n }\n }\n return res.length ? res : undefined;\n },\n};\nconst mainKubeFolder = path__WEBPACK_IMPORTED_MODULE_1___default.a.join(os__WEBPACK_IMPORTED_MODULE_2___default.a.homedir(), \".kube\");\nconst syncKubeconfigEntries = {\n fromStore(val) {\n var _a;\n return new Map((_a = val === null || val === void 0 ? void 0 : val.map((_a) => {\n var { filePath } = _a, rest = __rest(_a, [\"filePath\"]);\n return [filePath, rest];\n })) !== null && _a !== void 0 ? _a : [[mainKubeFolder, {}]]);\n },\n toStore(val) {\n if (val.size === 1 && val.has(mainKubeFolder)) {\n return undefined;\n }\n return Array.from(val, ([filePath, rest]) => (Object.assign({ filePath }, rest)));\n },\n};\nconst editorConfiguration = {\n fromStore(val) {\n return lodash_merge__WEBPACK_IMPORTED_MODULE_5___default()(defaultEditorConfig, val);\n },\n toStore(val) {\n return val;\n },\n};\nconst updateChannels = new Map([\n [\"latest\", {\n label: \"Stable\"\n }],\n [\"beta\", {\n label: \"Beta\"\n }],\n [\"alpha\", {\n label: \"Alpha\"\n }],\n]);\nconst defaultUpdateChannel = ((_a = new semver__WEBPACK_IMPORTED_MODULE_6__[\"SemVer\"](Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"getAppVersion\"])()).prerelease[0]) === null || _a === void 0 ? void 0 : _a.toString()) || \"latest\";\nconst updateChannel = {\n fromStore(val) {\n return updateChannels.has(val) ? val : defaultUpdateChannel;\n },\n toStore(val) {\n if (!updateChannels.has(val) || val === defaultUpdateChannel) {\n return undefined;\n }\n return val;\n }\n};\nconst DESCRIPTORS = {\n httpsProxy,\n shell,\n colorTheme,\n localeTimezone,\n allowUntrustedCAs,\n allowTelemetry,\n allowErrorReporting,\n downloadMirror,\n downloadKubectlBinaries,\n downloadBinariesPath,\n kubectlBinariesPath,\n openAtLogin,\n hiddenTableColumns,\n syncKubeconfigEntries,\n editorConfiguration,\n terminalCopyOnSelect,\n updateChannel,\n};\nconst CONSTANTS = {\n updateChannels,\n};\n\n\n//# sourceURL=webpack:///./src/common/user-store/preferences-helpers.ts?");
|
|
38195
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultEditorConfig\", function() { return defaultEditorConfig; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"defaultPackageMirror\", function() { return defaultPackageMirror; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"packageMirrors\", function() { return packageMirrors; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DESCRIPTORS\", function() { return DESCRIPTORS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CONSTANTS\", function() { return CONSTANTS; });\n/* harmony import */ var moment_timezone__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment-timezone */ \"./node_modules/moment-timezone/index.js\");\n/* harmony import */ var moment_timezone__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment_timezone__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! path */ \"path\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! os */ \"os\");\n/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(os__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _renderer_theme_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../renderer/theme.store */ \"./src/renderer/theme.store.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/merge */ \"./node_modules/lodash/merge.js\");\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_merge__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! semver */ \"./node_modules/semver/index.js\");\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(semver__WEBPACK_IMPORTED_MODULE_6__);\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nvar _a;\n\n\n\n\n\n\n\nconst defaultEditorConfig = {\n lineNumbers: \"on\",\n miniMap: {\n enabled: true\n },\n tabSize: 2\n};\nconst httpsProxy = {\n fromStore(val) {\n return val;\n },\n toStore(val) {\n return val || undefined;\n },\n};\nconst shell = {\n fromStore(val) {\n return val;\n },\n toStore(val) {\n return val || undefined;\n },\n};\nconst colorTheme = {\n fromStore(val) {\n return val || _renderer_theme_store__WEBPACK_IMPORTED_MODULE_3__[\"ThemeStore\"].defaultTheme;\n },\n toStore(val) {\n if (!val || val === _renderer_theme_store__WEBPACK_IMPORTED_MODULE_3__[\"ThemeStore\"].defaultTheme) {\n return undefined;\n }\n return val;\n },\n};\nconst localeTimezone = {\n fromStore(val) {\n return val || moment_timezone__WEBPACK_IMPORTED_MODULE_0___default.a.tz.guess(true) || \"UTC\";\n },\n toStore(val) {\n if (!val || val === moment_timezone__WEBPACK_IMPORTED_MODULE_0___default.a.tz.guess(true) || val === \"UTC\") {\n return undefined;\n }\n return val;\n },\n};\nconst allowUntrustedCAs = {\n fromStore(val) {\n return val !== null && val !== void 0 ? val : false;\n },\n toStore(val) {\n if (!val) {\n return undefined;\n }\n return val;\n },\n};\nconst allowTelemetry = {\n fromStore(val) {\n return val !== null && val !== void 0 ? val : true;\n },\n toStore(val) {\n if (val === true) {\n return undefined;\n }\n return val;\n },\n};\nconst allowErrorReporting = {\n fromStore(val) {\n return val !== null && val !== void 0 ? val : true;\n },\n toStore(val) {\n if (val === true) {\n return undefined;\n }\n return val;\n },\n};\nconst defaultPackageMirror = \"default\";\nconst packageMirrors = new Map([\n [defaultPackageMirror, {\n url: \"https://storage.googleapis.com/kubernetes-release/release\",\n label: \"Default (Google)\",\n platforms: new Set([\"darwin\", \"win32\", \"linux\"]),\n }],\n [\"china\", {\n url: \"https://mirror.azure.cn/kubernetes/kubectl\",\n label: \"China (Azure)\",\n platforms: new Set([\"win32\", \"linux\"]),\n }],\n]);\nconst downloadMirror = {\n fromStore(val) {\n return packageMirrors.has(val) ? val : defaultPackageMirror;\n },\n toStore(val) {\n if (!val || val === defaultPackageMirror) {\n return undefined;\n }\n return val;\n },\n};\nconst downloadKubectlBinaries = {\n fromStore(val) {\n return val !== null && val !== void 0 ? val : true;\n },\n toStore(val) {\n if (val === true) {\n return undefined;\n }\n return val;\n },\n};\nconst downloadBinariesPath = {\n fromStore(val) {\n return val;\n },\n toStore(val) {\n if (!val) {\n return undefined;\n }\n return val;\n },\n};\nconst kubectlBinariesPath = {\n fromStore(val) {\n return val;\n },\n toStore(val) {\n if (!val) {\n return undefined;\n }\n return val;\n },\n};\nconst openAtLogin = {\n fromStore(val) {\n return val !== null && val !== void 0 ? val : false;\n },\n toStore(val) {\n if (!val) {\n return undefined;\n }\n return val;\n },\n};\nconst terminalCopyOnSelect = {\n fromStore(val) {\n return val !== null && val !== void 0 ? val : false;\n },\n toStore(val) {\n if (!val) {\n return undefined;\n }\n return val;\n },\n};\nconst hiddenTableColumns = {\n fromStore(val) {\n return new Map((val !== null && val !== void 0 ? val : []).map(([tableId, columnIds]) => [tableId, new _utils__WEBPACK_IMPORTED_MODULE_4__[\"ObservableToggleSet\"](columnIds)]));\n },\n toStore(val) {\n const res = [];\n for (const [table, columns] of val) {\n if (columns.size) {\n res.push([table, Array.from(columns)]);\n }\n }\n return res.length ? res : undefined;\n },\n};\nconst mainKubeFolder = path__WEBPACK_IMPORTED_MODULE_1___default.a.join(os__WEBPACK_IMPORTED_MODULE_2___default.a.homedir(), \".kube\");\nconst syncKubeconfigEntries = {\n fromStore(val) {\n var _a;\n return new Map((_a = val === null || val === void 0 ? void 0 : val.map((_a) => {\n var { filePath } = _a, rest = __rest(_a, [\"filePath\"]);\n return [filePath, rest];\n })) !== null && _a !== void 0 ? _a : [[mainKubeFolder, {}]]);\n },\n toStore(val) {\n if (val.size === 1 && val.has(mainKubeFolder)) {\n return undefined;\n }\n return Array.from(val, ([filePath, rest]) => (Object.assign({ filePath }, rest)));\n },\n};\nconst editorConfiguration = {\n fromStore(val) {\n return lodash_merge__WEBPACK_IMPORTED_MODULE_5___default()(defaultEditorConfig, val);\n },\n toStore(val) {\n return val;\n },\n};\nconst updateChannels = new Map([\n [\"latest\", {\n label: \"Stable\"\n }],\n [\"beta\", {\n label: \"Beta\"\n }],\n [\"alpha\", {\n label: \"Alpha\"\n }],\n]);\nconst defaultUpdateChannel = ((_a = new semver__WEBPACK_IMPORTED_MODULE_6__[\"SemVer\"](Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"getAppVersion\"])()).prerelease[0]) === null || _a === void 0 ? void 0 : _a.toString()) || \"latest\";\nconst updateChannel = {\n fromStore(val) {\n return updateChannels.has(val) ? val : defaultUpdateChannel;\n },\n toStore(val) {\n if (!updateChannels.has(val) || val === defaultUpdateChannel) {\n return undefined;\n }\n return val;\n }\n};\nconst DESCRIPTORS = {\n httpsProxy,\n shell,\n colorTheme,\n localeTimezone,\n allowUntrustedCAs,\n allowTelemetry,\n allowErrorReporting,\n downloadMirror,\n downloadKubectlBinaries,\n downloadBinariesPath,\n kubectlBinariesPath,\n openAtLogin,\n hiddenTableColumns,\n syncKubeconfigEntries,\n editorConfiguration,\n terminalCopyOnSelect,\n updateChannel,\n};\nconst CONSTANTS = {\n updateChannels,\n};\n\n\n//# sourceURL=webpack:///./src/common/user-store/preferences-helpers.ts?");
|
|
38184
38196
|
|
|
38185
38197
|
/***/ }),
|
|
38186
38198
|
|
|
@@ -38220,6 +38232,18 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
38220
38232
|
|
|
38221
38233
|
/***/ }),
|
|
38222
38234
|
|
|
38235
|
+
/***/ "./src/common/utils/array.ts":
|
|
38236
|
+
/*!***********************************!*\
|
|
38237
|
+
!*** ./src/common/utils/array.ts ***!
|
|
38238
|
+
\***********************************/
|
|
38239
|
+
/*! exports provided: zipStrict */
|
|
38240
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
38241
|
+
|
|
38242
|
+
"use strict";
|
|
38243
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"zipStrict\", function() { return zipStrict; });\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n/**\n *\n * @param sources The source arrays\n * @yields A tuple of the next element from each of the sources\n * @returns The tuple of all the sources as soon as at least one of the sources is exausted\n */\nfunction* zipStrict(...sources) {\n const maxSafeLength = sources.reduce((prev, cur) => Math.min(prev, cur.length), Number.POSITIVE_INFINITY);\n if (!isFinite(maxSafeLength)) {\n // There are no sources, thus just return\n return [];\n }\n for (let i = 0; i < maxSafeLength; i += 1) {\n yield sources.map(source => source[i]);\n }\n return sources.map(source => source.slice(maxSafeLength));\n}\n\n\n//# sourceURL=webpack:///./src/common/utils/array.ts?");
|
|
38244
|
+
|
|
38245
|
+
/***/ }),
|
|
38246
|
+
|
|
38223
38247
|
/***/ "./src/common/utils/autobind.ts":
|
|
38224
38248
|
/*!**************************************!*\
|
|
38225
38249
|
!*** ./src/common/utils/autobind.ts ***!
|
|
@@ -38452,11 +38476,11 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
38452
38476
|
/*!***********************************!*\
|
|
38453
38477
|
!*** ./src/common/utils/index.ts ***!
|
|
38454
38478
|
\***********************************/
|
|
38455
|
-
/*! exports provided: noop, getAppVersion, getBundledKubectlVersion, getAppVersionFromProxyServer, autoBind, boundClass, boundMethod, base64, toCamelCase, cloneJsonObject, getClusterIdFromHost, getClusterFrameUrl, getHostedClusterId, isClusterPageContext, debouncePromise, defineGlobal, delay, disposer, downloadFile, downloadJson, formatDuration, escapeRegExp, multiSet, ExtendedMap, ExtendedObservableMap, getPath, getRandId, makeIterableIterator, HashSet, ObservableHashSet, storedKubeConfigFolder, getCustomKubeConfigPath, nFircate, openExternal, resolvePath, isLogicalChildPath, rejectPromiseBy, Singleton, sortCompare, sortCompareChartVersions, sortCharts, splitArray, bifurcateArray, readFileFromTar, listTarEntries, extractTar, ToggleSet, ObservableToggleSet, toJS, hasOwnProperty, hasOwnProperties, hasTypedProperty, hasOptionalProperty, isRecord, isTypedArray, isString, isObject, bindPredicate, unitsToBytes, bytesToUnits, cpuUnitsToNumber, iter */
|
|
38479
|
+
/*! exports provided: noop, getAppVersion, getBundledKubectlVersion, getAppVersionFromProxyServer, autoBind, boundClass, boundMethod, base64, toCamelCase, cloneJsonObject, getClusterIdFromHost, getClusterFrameUrl, getHostedClusterId, isClusterPageContext, debouncePromise, defineGlobal, delay, disposer, downloadFile, downloadJson, formatDuration, escapeRegExp, multiSet, ExtendedMap, ExtendedObservableMap, getPath, getRandId, makeIterableIterator, HashSet, ObservableHashSet, storedKubeConfigFolder, getCustomKubeConfigPath, nFircate, openExternal, resolvePath, isLogicalChildPath, rejectPromiseBy, Singleton, Ordering, rectifyOrdering, sortCompare, sortCompareChartVersions, sortCharts, splitArray, bifurcateArray, readFileFromTar, listTarEntries, extractTar, ToggleSet, ObservableToggleSet, toJS, hasOwnProperty, hasOwnProperties, hasTypedProperty, hasOptionalProperty, isRecord, isTypedArray, isString, isObject, bindPredicate, unitsToBytes, bytesToUnits, cpuUnitsToNumber, iter, array */
|
|
38456
38480
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
38457
38481
|
|
|
38458
38482
|
"use strict";
|
|
38459
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"noop\", function() { return noop; });\n/* harmony import */ var _app_version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./app-version */ \"./src/common/utils/app-version.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getAppVersion\", function() { return _app_version__WEBPACK_IMPORTED_MODULE_0__[\"getAppVersion\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getBundledKubectlVersion\", function() { return _app_version__WEBPACK_IMPORTED_MODULE_0__[\"getBundledKubectlVersion\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getAppVersionFromProxyServer\", function() { return _app_version__WEBPACK_IMPORTED_MODULE_0__[\"getAppVersionFromProxyServer\"]; });\n\n/* harmony import */ var _autobind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./autobind */ \"./src/common/utils/autobind.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"autoBind\", function() { return _autobind__WEBPACK_IMPORTED_MODULE_1__[\"autoBind\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"boundClass\", function() { return _autobind__WEBPACK_IMPORTED_MODULE_1__[\"boundClass\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"boundMethod\", function() { return _autobind__WEBPACK_IMPORTED_MODULE_1__[\"boundMethod\"]; });\n\n/* harmony import */ var _base64__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base64 */ \"./src/common/utils/base64.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"base64\", function() { return _base64__WEBPACK_IMPORTED_MODULE_2__[\"base64\"]; });\n\n/* harmony import */ var _camelCase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./camelCase */ \"./src/common/utils/camelCase.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toCamelCase\", function() { return _camelCase__WEBPACK_IMPORTED_MODULE_3__[\"toCamelCase\"]; });\n\n/* harmony import */ var _cloneJson__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cloneJson */ \"./src/common/utils/cloneJson.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cloneJsonObject\", function() { return _cloneJson__WEBPACK_IMPORTED_MODULE_4__[\"cloneJsonObject\"]; });\n\n/* harmony import */ var _cluster_id_url_parsing__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cluster-id-url-parsing */ \"./src/common/utils/cluster-id-url-parsing.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getClusterIdFromHost\", function() { return _cluster_id_url_parsing__WEBPACK_IMPORTED_MODULE_5__[\"getClusterIdFromHost\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getClusterFrameUrl\", function() { return _cluster_id_url_parsing__WEBPACK_IMPORTED_MODULE_5__[\"getClusterFrameUrl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getHostedClusterId\", function() { return _cluster_id_url_parsing__WEBPACK_IMPORTED_MODULE_5__[\"getHostedClusterId\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isClusterPageContext\", function() { return _cluster_id_url_parsing__WEBPACK_IMPORTED_MODULE_5__[\"isClusterPageContext\"]; });\n\n/* harmony import */ var _debouncePromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./debouncePromise */ \"./src/common/utils/debouncePromise.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"debouncePromise\", function() { return _debouncePromise__WEBPACK_IMPORTED_MODULE_6__[\"debouncePromise\"]; });\n\n/* harmony import */ var _defineGlobal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./defineGlobal */ \"./src/common/utils/defineGlobal.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"defineGlobal\", function() { return _defineGlobal__WEBPACK_IMPORTED_MODULE_7__[\"defineGlobal\"]; });\n\n/* harmony import */ var _delay__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./delay */ \"./src/common/utils/delay.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"delay\", function() { return _delay__WEBPACK_IMPORTED_MODULE_8__[\"delay\"]; });\n\n/* harmony import */ var _disposer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./disposer */ \"./src/common/utils/disposer.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"disposer\", function() { return _disposer__WEBPACK_IMPORTED_MODULE_9__[\"disposer\"]; });\n\n/* harmony import */ var _downloadFile__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./downloadFile */ \"./src/common/utils/downloadFile.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"downloadFile\", function() { return _downloadFile__WEBPACK_IMPORTED_MODULE_10__[\"downloadFile\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"downloadJson\", function() { return _downloadFile__WEBPACK_IMPORTED_MODULE_10__[\"downloadJson\"]; });\n\n/* harmony import */ var _formatDuration__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./formatDuration */ \"./src/common/utils/formatDuration.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatDuration\", function() { return _formatDuration__WEBPACK_IMPORTED_MODULE_11__[\"formatDuration\"]; });\n\n/* harmony import */ var _escapeRegExp__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./escapeRegExp */ \"./src/common/utils/escapeRegExp.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"escapeRegExp\", function() { return _escapeRegExp__WEBPACK_IMPORTED_MODULE_12__[\"escapeRegExp\"]; });\n\n/* harmony import */ var _extended_map__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./extended-map */ \"./src/common/utils/extended-map.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"multiSet\", function() { return _extended_map__WEBPACK_IMPORTED_MODULE_13__[\"multiSet\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ExtendedMap\", function() { return _extended_map__WEBPACK_IMPORTED_MODULE_13__[\"ExtendedMap\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ExtendedObservableMap\", function() { return _extended_map__WEBPACK_IMPORTED_MODULE_13__[\"ExtendedObservableMap\"]; });\n\n/* harmony import */ var _getPath__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./getPath */ \"./src/common/utils/getPath.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getPath\", function() { return _getPath__WEBPACK_IMPORTED_MODULE_14__[\"getPath\"]; });\n\n/* harmony import */ var _getRandId__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./getRandId */ \"./src/common/utils/getRandId.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getRandId\", function() { return _getRandId__WEBPACK_IMPORTED_MODULE_15__[\"getRandId\"]; });\n\n/* harmony import */ var _hash_set__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./hash-set */ \"./src/common/utils/hash-set.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"makeIterableIterator\", function() { return _hash_set__WEBPACK_IMPORTED_MODULE_16__[\"makeIterableIterator\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"HashSet\", function() { return _hash_set__WEBPACK_IMPORTED_MODULE_16__[\"HashSet\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ObservableHashSet\", function() { return _hash_set__WEBPACK_IMPORTED_MODULE_16__[\"ObservableHashSet\"]; });\n\n/* harmony import */ var _local_kubeconfig__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./local-kubeconfig */ \"./src/common/utils/local-kubeconfig.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"storedKubeConfigFolder\", function() { return _local_kubeconfig__WEBPACK_IMPORTED_MODULE_17__[\"storedKubeConfigFolder\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getCustomKubeConfigPath\", function() { return _local_kubeconfig__WEBPACK_IMPORTED_MODULE_17__[\"getCustomKubeConfigPath\"]; });\n\n/* harmony import */ var _n_fircate__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./n-fircate */ \"./src/common/utils/n-fircate.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"nFircate\", function() { return _n_fircate__WEBPACK_IMPORTED_MODULE_18__[\"nFircate\"]; });\n\n/* harmony import */ var _openExternal__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./openExternal */ \"./src/common/utils/openExternal.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"openExternal\", function() { return _openExternal__WEBPACK_IMPORTED_MODULE_19__[\"openExternal\"]; });\n\n/* harmony import */ var _paths__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./paths */ \"./src/common/utils/paths.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"resolvePath\", function() { return _paths__WEBPACK_IMPORTED_MODULE_20__[\"resolvePath\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isLogicalChildPath\", function() { return _paths__WEBPACK_IMPORTED_MODULE_20__[\"isLogicalChildPath\"]; });\n\n/* harmony import */ var _reject_promise__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./reject-promise */ \"./src/common/utils/reject-promise.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rejectPromiseBy\", function() { return _reject_promise__WEBPACK_IMPORTED_MODULE_21__[\"rejectPromiseBy\"]; });\n\n/* harmony import */ var _singleton__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./singleton */ \"./src/common/utils/singleton.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Singleton\", function() { return _singleton__WEBPACK_IMPORTED_MODULE_22__[\"Singleton\"]; });\n\n/* harmony import */ var _sort_compare__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./sort-compare */ \"./src/common/utils/sort-compare.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sortCompare\", function() { return _sort_compare__WEBPACK_IMPORTED_MODULE_23__[\"sortCompare\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sortCompareChartVersions\", function() { return _sort_compare__WEBPACK_IMPORTED_MODULE_23__[\"sortCompareChartVersions\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sortCharts\", function() { return _sort_compare__WEBPACK_IMPORTED_MODULE_23__[\"sortCharts\"]; });\n\n/* harmony import */ var _splitArray__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./splitArray */ \"./src/common/utils/splitArray.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"splitArray\", function() { return _splitArray__WEBPACK_IMPORTED_MODULE_24__[\"splitArray\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bifurcateArray\", function() { return _splitArray__WEBPACK_IMPORTED_MODULE_24__[\"bifurcateArray\"]; });\n\n/* harmony import */ var _tar__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./tar */ \"./src/common/utils/tar.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"readFileFromTar\", function() { return _tar__WEBPACK_IMPORTED_MODULE_25__[\"readFileFromTar\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"listTarEntries\", function() { return _tar__WEBPACK_IMPORTED_MODULE_25__[\"listTarEntries\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"extractTar\", function() { return _tar__WEBPACK_IMPORTED_MODULE_25__[\"extractTar\"]; });\n\n/* harmony import */ var _toggle_set__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./toggle-set */ \"./src/common/utils/toggle-set.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ToggleSet\", function() { return _toggle_set__WEBPACK_IMPORTED_MODULE_26__[\"ToggleSet\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ObservableToggleSet\", function() { return _toggle_set__WEBPACK_IMPORTED_MODULE_26__[\"ObservableToggleSet\"]; });\n\n/* harmony import */ var _toJS__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./toJS */ \"./src/common/utils/toJS.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toJS\", function() { return _toJS__WEBPACK_IMPORTED_MODULE_27__[\"toJS\"]; });\n\n/* harmony import */ var _type_narrowing__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./type-narrowing */ \"./src/common/utils/type-narrowing.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasOwnProperty\", function() { return _type_narrowing__WEBPACK_IMPORTED_MODULE_28__[\"hasOwnProperty\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasOwnProperties\", function() { return _type_narrowing__WEBPACK_IMPORTED_MODULE_28__[\"hasOwnProperties\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasTypedProperty\", function() { return _type_narrowing__WEBPACK_IMPORTED_MODULE_28__[\"hasTypedProperty\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasOptionalProperty\", function() { return _type_narrowing__WEBPACK_IMPORTED_MODULE_28__[\"hasOptionalProperty\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isRecord\", function() { return _type_narrowing__WEBPACK_IMPORTED_MODULE_28__[\"isRecord\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isTypedArray\", function() { return _type_narrowing__WEBPACK_IMPORTED_MODULE_28__[\"isTypedArray\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isString\", function() { return _type_narrowing__WEBPACK_IMPORTED_MODULE_28__[\"isString\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isObject\", function() { return _type_narrowing__WEBPACK_IMPORTED_MODULE_28__[\"isObject\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bindPredicate\", function() { return _type_narrowing__WEBPACK_IMPORTED_MODULE_28__[\"bindPredicate\"]; });\n\n/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./types */ \"./src/common/utils/types.ts\");\n/* empty/unused harmony star reexport *//* harmony import */ var _convertMemory__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./convertMemory */ \"./src/common/utils/convertMemory.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"unitsToBytes\", function() { return _convertMemory__WEBPACK_IMPORTED_MODULE_30__[\"unitsToBytes\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bytesToUnits\", function() { return _convertMemory__WEBPACK_IMPORTED_MODULE_30__[\"bytesToUnits\"]; });\n\n/* harmony import */ var _convertCpu__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./convertCpu */ \"./src/common/utils/convertCpu.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cpuUnitsToNumber\", function() { return _convertCpu__WEBPACK_IMPORTED_MODULE_31__[\"cpuUnitsToNumber\"]; });\n\n/* harmony import */ var _iter__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./iter */ \"./src/common/utils/iter.ts\");\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"iter\", function() { return _iter__WEBPACK_IMPORTED_MODULE_32__; });\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n/**\n * A function that does nothing\n */\nfunction noop(...args) {\n return void args;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./src/common/utils/index.ts?");
|
|
38483
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"noop\", function() { return noop; });\n/* harmony import */ var _app_version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./app-version */ \"./src/common/utils/app-version.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getAppVersion\", function() { return _app_version__WEBPACK_IMPORTED_MODULE_0__[\"getAppVersion\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getBundledKubectlVersion\", function() { return _app_version__WEBPACK_IMPORTED_MODULE_0__[\"getBundledKubectlVersion\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getAppVersionFromProxyServer\", function() { return _app_version__WEBPACK_IMPORTED_MODULE_0__[\"getAppVersionFromProxyServer\"]; });\n\n/* harmony import */ var _autobind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./autobind */ \"./src/common/utils/autobind.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"autoBind\", function() { return _autobind__WEBPACK_IMPORTED_MODULE_1__[\"autoBind\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"boundClass\", function() { return _autobind__WEBPACK_IMPORTED_MODULE_1__[\"boundClass\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"boundMethod\", function() { return _autobind__WEBPACK_IMPORTED_MODULE_1__[\"boundMethod\"]; });\n\n/* harmony import */ var _base64__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base64 */ \"./src/common/utils/base64.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"base64\", function() { return _base64__WEBPACK_IMPORTED_MODULE_2__[\"base64\"]; });\n\n/* harmony import */ var _camelCase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./camelCase */ \"./src/common/utils/camelCase.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toCamelCase\", function() { return _camelCase__WEBPACK_IMPORTED_MODULE_3__[\"toCamelCase\"]; });\n\n/* harmony import */ var _cloneJson__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cloneJson */ \"./src/common/utils/cloneJson.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cloneJsonObject\", function() { return _cloneJson__WEBPACK_IMPORTED_MODULE_4__[\"cloneJsonObject\"]; });\n\n/* harmony import */ var _cluster_id_url_parsing__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cluster-id-url-parsing */ \"./src/common/utils/cluster-id-url-parsing.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getClusterIdFromHost\", function() { return _cluster_id_url_parsing__WEBPACK_IMPORTED_MODULE_5__[\"getClusterIdFromHost\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getClusterFrameUrl\", function() { return _cluster_id_url_parsing__WEBPACK_IMPORTED_MODULE_5__[\"getClusterFrameUrl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getHostedClusterId\", function() { return _cluster_id_url_parsing__WEBPACK_IMPORTED_MODULE_5__[\"getHostedClusterId\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isClusterPageContext\", function() { return _cluster_id_url_parsing__WEBPACK_IMPORTED_MODULE_5__[\"isClusterPageContext\"]; });\n\n/* harmony import */ var _debouncePromise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./debouncePromise */ \"./src/common/utils/debouncePromise.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"debouncePromise\", function() { return _debouncePromise__WEBPACK_IMPORTED_MODULE_6__[\"debouncePromise\"]; });\n\n/* harmony import */ var _defineGlobal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./defineGlobal */ \"./src/common/utils/defineGlobal.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"defineGlobal\", function() { return _defineGlobal__WEBPACK_IMPORTED_MODULE_7__[\"defineGlobal\"]; });\n\n/* harmony import */ var _delay__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./delay */ \"./src/common/utils/delay.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"delay\", function() { return _delay__WEBPACK_IMPORTED_MODULE_8__[\"delay\"]; });\n\n/* harmony import */ var _disposer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./disposer */ \"./src/common/utils/disposer.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"disposer\", function() { return _disposer__WEBPACK_IMPORTED_MODULE_9__[\"disposer\"]; });\n\n/* harmony import */ var _downloadFile__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./downloadFile */ \"./src/common/utils/downloadFile.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"downloadFile\", function() { return _downloadFile__WEBPACK_IMPORTED_MODULE_10__[\"downloadFile\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"downloadJson\", function() { return _downloadFile__WEBPACK_IMPORTED_MODULE_10__[\"downloadJson\"]; });\n\n/* harmony import */ var _formatDuration__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./formatDuration */ \"./src/common/utils/formatDuration.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatDuration\", function() { return _formatDuration__WEBPACK_IMPORTED_MODULE_11__[\"formatDuration\"]; });\n\n/* harmony import */ var _escapeRegExp__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./escapeRegExp */ \"./src/common/utils/escapeRegExp.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"escapeRegExp\", function() { return _escapeRegExp__WEBPACK_IMPORTED_MODULE_12__[\"escapeRegExp\"]; });\n\n/* harmony import */ var _extended_map__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./extended-map */ \"./src/common/utils/extended-map.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"multiSet\", function() { return _extended_map__WEBPACK_IMPORTED_MODULE_13__[\"multiSet\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ExtendedMap\", function() { return _extended_map__WEBPACK_IMPORTED_MODULE_13__[\"ExtendedMap\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ExtendedObservableMap\", function() { return _extended_map__WEBPACK_IMPORTED_MODULE_13__[\"ExtendedObservableMap\"]; });\n\n/* harmony import */ var _getPath__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./getPath */ \"./src/common/utils/getPath.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getPath\", function() { return _getPath__WEBPACK_IMPORTED_MODULE_14__[\"getPath\"]; });\n\n/* harmony import */ var _getRandId__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./getRandId */ \"./src/common/utils/getRandId.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getRandId\", function() { return _getRandId__WEBPACK_IMPORTED_MODULE_15__[\"getRandId\"]; });\n\n/* harmony import */ var _hash_set__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./hash-set */ \"./src/common/utils/hash-set.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"makeIterableIterator\", function() { return _hash_set__WEBPACK_IMPORTED_MODULE_16__[\"makeIterableIterator\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"HashSet\", function() { return _hash_set__WEBPACK_IMPORTED_MODULE_16__[\"HashSet\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ObservableHashSet\", function() { return _hash_set__WEBPACK_IMPORTED_MODULE_16__[\"ObservableHashSet\"]; });\n\n/* harmony import */ var _local_kubeconfig__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./local-kubeconfig */ \"./src/common/utils/local-kubeconfig.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"storedKubeConfigFolder\", function() { return _local_kubeconfig__WEBPACK_IMPORTED_MODULE_17__[\"storedKubeConfigFolder\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getCustomKubeConfigPath\", function() { return _local_kubeconfig__WEBPACK_IMPORTED_MODULE_17__[\"getCustomKubeConfigPath\"]; });\n\n/* harmony import */ var _n_fircate__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./n-fircate */ \"./src/common/utils/n-fircate.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"nFircate\", function() { return _n_fircate__WEBPACK_IMPORTED_MODULE_18__[\"nFircate\"]; });\n\n/* harmony import */ var _openExternal__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./openExternal */ \"./src/common/utils/openExternal.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"openExternal\", function() { return _openExternal__WEBPACK_IMPORTED_MODULE_19__[\"openExternal\"]; });\n\n/* harmony import */ var _paths__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./paths */ \"./src/common/utils/paths.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"resolvePath\", function() { return _paths__WEBPACK_IMPORTED_MODULE_20__[\"resolvePath\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isLogicalChildPath\", function() { return _paths__WEBPACK_IMPORTED_MODULE_20__[\"isLogicalChildPath\"]; });\n\n/* harmony import */ var _reject_promise__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./reject-promise */ \"./src/common/utils/reject-promise.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rejectPromiseBy\", function() { return _reject_promise__WEBPACK_IMPORTED_MODULE_21__[\"rejectPromiseBy\"]; });\n\n/* harmony import */ var _singleton__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./singleton */ \"./src/common/utils/singleton.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Singleton\", function() { return _singleton__WEBPACK_IMPORTED_MODULE_22__[\"Singleton\"]; });\n\n/* harmony import */ var _sort_compare__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./sort-compare */ \"./src/common/utils/sort-compare.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Ordering\", function() { return _sort_compare__WEBPACK_IMPORTED_MODULE_23__[\"Ordering\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rectifyOrdering\", function() { return _sort_compare__WEBPACK_IMPORTED_MODULE_23__[\"rectifyOrdering\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sortCompare\", function() { return _sort_compare__WEBPACK_IMPORTED_MODULE_23__[\"sortCompare\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sortCompareChartVersions\", function() { return _sort_compare__WEBPACK_IMPORTED_MODULE_23__[\"sortCompareChartVersions\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sortCharts\", function() { return _sort_compare__WEBPACK_IMPORTED_MODULE_23__[\"sortCharts\"]; });\n\n/* harmony import */ var _splitArray__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./splitArray */ \"./src/common/utils/splitArray.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"splitArray\", function() { return _splitArray__WEBPACK_IMPORTED_MODULE_24__[\"splitArray\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bifurcateArray\", function() { return _splitArray__WEBPACK_IMPORTED_MODULE_24__[\"bifurcateArray\"]; });\n\n/* harmony import */ var _tar__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./tar */ \"./src/common/utils/tar.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"readFileFromTar\", function() { return _tar__WEBPACK_IMPORTED_MODULE_25__[\"readFileFromTar\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"listTarEntries\", function() { return _tar__WEBPACK_IMPORTED_MODULE_25__[\"listTarEntries\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"extractTar\", function() { return _tar__WEBPACK_IMPORTED_MODULE_25__[\"extractTar\"]; });\n\n/* harmony import */ var _toggle_set__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./toggle-set */ \"./src/common/utils/toggle-set.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ToggleSet\", function() { return _toggle_set__WEBPACK_IMPORTED_MODULE_26__[\"ToggleSet\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ObservableToggleSet\", function() { return _toggle_set__WEBPACK_IMPORTED_MODULE_26__[\"ObservableToggleSet\"]; });\n\n/* harmony import */ var _toJS__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./toJS */ \"./src/common/utils/toJS.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toJS\", function() { return _toJS__WEBPACK_IMPORTED_MODULE_27__[\"toJS\"]; });\n\n/* harmony import */ var _type_narrowing__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./type-narrowing */ \"./src/common/utils/type-narrowing.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasOwnProperty\", function() { return _type_narrowing__WEBPACK_IMPORTED_MODULE_28__[\"hasOwnProperty\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasOwnProperties\", function() { return _type_narrowing__WEBPACK_IMPORTED_MODULE_28__[\"hasOwnProperties\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasTypedProperty\", function() { return _type_narrowing__WEBPACK_IMPORTED_MODULE_28__[\"hasTypedProperty\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasOptionalProperty\", function() { return _type_narrowing__WEBPACK_IMPORTED_MODULE_28__[\"hasOptionalProperty\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isRecord\", function() { return _type_narrowing__WEBPACK_IMPORTED_MODULE_28__[\"isRecord\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isTypedArray\", function() { return _type_narrowing__WEBPACK_IMPORTED_MODULE_28__[\"isTypedArray\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isString\", function() { return _type_narrowing__WEBPACK_IMPORTED_MODULE_28__[\"isString\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isObject\", function() { return _type_narrowing__WEBPACK_IMPORTED_MODULE_28__[\"isObject\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bindPredicate\", function() { return _type_narrowing__WEBPACK_IMPORTED_MODULE_28__[\"bindPredicate\"]; });\n\n/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./types */ \"./src/common/utils/types.ts\");\n/* empty/unused harmony star reexport *//* harmony import */ var _convertMemory__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./convertMemory */ \"./src/common/utils/convertMemory.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"unitsToBytes\", function() { return _convertMemory__WEBPACK_IMPORTED_MODULE_30__[\"unitsToBytes\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bytesToUnits\", function() { return _convertMemory__WEBPACK_IMPORTED_MODULE_30__[\"bytesToUnits\"]; });\n\n/* harmony import */ var _convertCpu__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./convertCpu */ \"./src/common/utils/convertCpu.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cpuUnitsToNumber\", function() { return _convertCpu__WEBPACK_IMPORTED_MODULE_31__[\"cpuUnitsToNumber\"]; });\n\n/* harmony import */ var _iter__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./iter */ \"./src/common/utils/iter.ts\");\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"iter\", function() { return _iter__WEBPACK_IMPORTED_MODULE_32__; });\n/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./array */ \"./src/common/utils/array.ts\");\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"array\", function() { return _array__WEBPACK_IMPORTED_MODULE_33__; });\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n/**\n * A function that does nothing\n */\nfunction noop(...args) {\n return void args;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./src/common/utils/index.ts?");
|
|
38460
38484
|
|
|
38461
38485
|
/***/ }),
|
|
38462
38486
|
|
|
@@ -38464,11 +38488,11 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
38464
38488
|
/*!**********************************!*\
|
|
38465
38489
|
!*** ./src/common/utils/iter.ts ***!
|
|
38466
38490
|
\**********************************/
|
|
38467
|
-
/*! exports provided: newEmpty, take, map, filterFlatMap, flatMap, filter, filterMap, filterMapStrict, find, reduce */
|
|
38491
|
+
/*! exports provided: newEmpty, take, map, filterFlatMap, flatMap, filter, filterMap, filterMapStrict, find, reduce, join, every */
|
|
38468
38492
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
38469
38493
|
|
|
38470
38494
|
"use strict";
|
|
38471
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"newEmpty\", function() { return newEmpty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"take\", function() { return take; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return map; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"filterFlatMap\", function() { return filterFlatMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flatMap\", function() { return flatMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"filter\", function() { return filter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"filterMap\", function() { return filterMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"filterMapStrict\", function() { return filterMapStrict; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"find\", function() { return find; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"reduce\", function() { return reduce; });\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n/**\n * Create a new type safe empty Iterable\n * @returns An `Iterable` that yields 0 items\n */\nfunction* newEmpty() {\n return;\n}\n/**\n * Creates a new `Iterable` that yields at most n items from src.\n * Does not modify `src` which can be used later.\n * @param src An initial iterator\n * @param n The maximum number of elements to take from src. Yields up to the floor of `n` and 0 items if n < 0\n */\nfunction* take(src, n) {\n outer: for (let i = 0; i < n; i += 1) {\n for (const item of src) {\n yield item;\n continue outer;\n }\n // if we are here that means that `src` has been exhausted. Don't bother trying again.\n break outer;\n }\n}\n/**\n * Creates a new iterator that iterates (lazily) over its input and yields the\n * result of `fn` for each item.\n * @param src A type that can be iterated over\n * @param fn The function that is called for each value\n */\nfunction* map(src, fn) {\n for (const from of src) {\n yield fn(from);\n }\n}\n/**\n * The single layer flattening of an iterator, discarding `Falsey` values.\n * @param src A type that can be iterated over\n * @param fn The function that returns either an iterable over items that should be filtered out or a `Falsey` value indicating that it should be ignored\n */\nfunction* filterFlatMap(src, fn) {\n for (const from of src) {\n if (!from) {\n continue;\n }\n const mapping = fn(from);\n if (!mapping) {\n continue;\n }\n for (const mapped of mapping) {\n if (mapped) {\n yield mapped;\n }\n }\n }\n}\n/**\n * Returns a new iterator that yields the items that each call to `fn` would produce\n * @param src A type that can be iterated over\n * @param fn A function that returns an iterator\n */\nfunction* flatMap(src, fn) {\n for (const from of src) {\n yield* fn(from);\n }\n}\n/**\n * Creates a new iterator that iterates (lazily) over its input and yields the\n * items that return a `truthy` value from `fn`.\n * @param src A type that can be iterated over\n * @param fn The function that is called for each value\n */\nfunction* filter(src, fn) {\n for (const from of src) {\n if (fn(from)) {\n yield from;\n }\n }\n}\n/**\n * Creates a new iterator that iterates (lazily) over its input and yields the\n * result of `fn` when it is `truthy`\n * @param src A type that can be iterated over\n * @param fn The function that is called for each value\n */\nfunction* filterMap(src, fn) {\n for (const from of src) {\n const res = fn(from);\n if (res) {\n yield res;\n }\n }\n}\n/**\n * Creates a new iterator that iterates (lazily) over its input and yields the\n * result of `fn` when it is not null or undefined\n * @param src A type that can be iterated over\n * @param fn The function that is called for each value\n */\nfunction* filterMapStrict(src, fn) {\n for (const from of src) {\n const res = fn(from);\n if (res != null) {\n yield res;\n }\n }\n}\n/**\n * Iterate through `src` until `match` returns a truthy value\n * @param src A type that can be iterated over\n * @param match A function that should return a truthy value for the item that you want to find\n * @returns The first entry that `match` returns a truthy value for, or `undefined`\n */\nfunction find(src, match) {\n for (const from of src) {\n if (match(from)) {\n return from;\n }\n }\n return void 0;\n}\nfunction reduce(src, reducer, initial) {\n let acc = initial;\n for (const item of src) {\n acc = reducer(acc, item);\n }\n return acc;\n}\n\n\n//# sourceURL=webpack:///./src/common/utils/iter.ts?");
|
|
38495
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"newEmpty\", function() { return newEmpty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"take\", function() { return take; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"map\", function() { return map; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"filterFlatMap\", function() { return filterFlatMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flatMap\", function() { return flatMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"filter\", function() { return filter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"filterMap\", function() { return filterMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"filterMapStrict\", function() { return filterMapStrict; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"find\", function() { return find; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"reduce\", function() { return reduce; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"join\", function() { return join; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"every\", function() { return every; });\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n/**\n * Create a new type safe empty Iterable\n * @returns An `Iterable` that yields 0 items\n */\nfunction* newEmpty() {\n return;\n}\n/**\n * Creates a new `Iterable` that yields at most n items from src.\n * Does not modify `src` which can be used later.\n * @param src An initial iterator\n * @param n The maximum number of elements to take from src. Yields up to the floor of `n` and 0 items if n < 0\n */\nfunction* take(src, n) {\n outer: for (let i = 0; i < n; i += 1) {\n for (const item of src) {\n yield item;\n continue outer;\n }\n // if we are here that means that `src` has been exhausted. Don't bother trying again.\n break outer;\n }\n}\n/**\n * Creates a new iterator that iterates (lazily) over its input and yields the\n * result of `fn` for each item.\n * @param src A type that can be iterated over\n * @param fn The function that is called for each value\n */\nfunction* map(src, fn) {\n for (const from of src) {\n yield fn(from);\n }\n}\n/**\n * The single layer flattening of an iterator, discarding `Falsey` values.\n * @param src A type that can be iterated over\n * @param fn The function that returns either an iterable over items that should be filtered out or a `Falsey` value indicating that it should be ignored\n */\nfunction* filterFlatMap(src, fn) {\n for (const from of src) {\n if (!from) {\n continue;\n }\n const mapping = fn(from);\n if (!mapping) {\n continue;\n }\n for (const mapped of mapping) {\n if (mapped) {\n yield mapped;\n }\n }\n }\n}\n/**\n * Returns a new iterator that yields the items that each call to `fn` would produce\n * @param src A type that can be iterated over\n * @param fn A function that returns an iterator\n */\nfunction* flatMap(src, fn) {\n for (const from of src) {\n yield* fn(from);\n }\n}\n/**\n * Creates a new iterator that iterates (lazily) over its input and yields the\n * items that return a `truthy` value from `fn`.\n * @param src A type that can be iterated over\n * @param fn The function that is called for each value\n */\nfunction* filter(src, fn) {\n for (const from of src) {\n if (fn(from)) {\n yield from;\n }\n }\n}\n/**\n * Creates a new iterator that iterates (lazily) over its input and yields the\n * result of `fn` when it is `truthy`\n * @param src A type that can be iterated over\n * @param fn The function that is called for each value\n */\nfunction* filterMap(src, fn) {\n for (const from of src) {\n const res = fn(from);\n if (res) {\n yield res;\n }\n }\n}\n/**\n * Creates a new iterator that iterates (lazily) over its input and yields the\n * result of `fn` when it is not null or undefined\n * @param src A type that can be iterated over\n * @param fn The function that is called for each value\n */\nfunction* filterMapStrict(src, fn) {\n for (const from of src) {\n const res = fn(from);\n if (res != null) {\n yield res;\n }\n }\n}\n/**\n * Iterate through `src` until `match` returns a truthy value\n * @param src A type that can be iterated over\n * @param match A function that should return a truthy value for the item that you want to find\n * @returns The first entry that `match` returns a truthy value for, or `undefined`\n */\nfunction find(src, match) {\n for (const from of src) {\n if (match(from)) {\n return from;\n }\n }\n return void 0;\n}\nfunction reduce(src, reducer, initial) {\n let acc = initial;\n for (const item of src) {\n acc = reducer(acc, item);\n }\n return acc;\n}\n/**\n * A convenience function for reducing over an iterator of strings and concatenating them together\n * @param src The value to iterate over\n * @param connector The string value to intersperse between the yielded values\n * @returns The concatenated entries of `src` interspersed with copies of `connector`\n */\nfunction join(src, connector = \",\") {\n return reduce(src, (acc, cur) => `${acc}${connector}${cur}`, \"\");\n}\n/**\n * Iterate through `src` and return `true` if `fn` returns a thruthy value for every yielded value.\n * Otherwise, return `false`. This function short circuits.\n * @param src The type to be iterated over\n * @param fn A function to check each iteration\n */\nfunction every(src, fn) {\n for (const val of src) {\n if (!fn(val)) {\n return false;\n }\n }\n return true;\n}\n\n\n//# sourceURL=webpack:///./src/common/utils/iter.ts?");
|
|
38472
38496
|
|
|
38473
38497
|
/***/ }),
|
|
38474
38498
|
|
|
@@ -38548,11 +38572,11 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
38548
38572
|
/*!******************************************!*\
|
|
38549
38573
|
!*** ./src/common/utils/sort-compare.ts ***!
|
|
38550
38574
|
\******************************************/
|
|
38551
|
-
/*! exports provided: sortCompare, sortCompareChartVersions, sortCharts */
|
|
38575
|
+
/*! exports provided: Ordering, rectifyOrdering, sortCompare, sortCompareChartVersions, sortCharts */
|
|
38552
38576
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
38553
38577
|
|
|
38554
38578
|
"use strict";
|
|
38555
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sortCompare\", function() { return sortCompare; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sortCompareChartVersions\", function() { return sortCompareChartVersions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sortCharts\", function() { return sortCharts; });\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! semver */ \"./node_modules/semver/index.js\");\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(semver__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _iter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iter */ \"./src/common/utils/iter.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../logger */ \"./src/common/logger.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\nfunction sortCompare(left, right) {\n if (left < right) {\n return
|
|
38579
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Ordering\", function() { return Ordering; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rectifyOrdering\", function() { return rectifyOrdering; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sortCompare\", function() { return sortCompare; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sortCompareChartVersions\", function() { return sortCompareChartVersions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sortCharts\", function() { return sortCharts; });\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! semver */ \"./node_modules/semver/index.js\");\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(semver__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _iter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iter */ \"./src/common/utils/iter.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../logger */ \"./src/common/logger.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\nvar Ordering;\n(function (Ordering) {\n Ordering[Ordering[\"LESS\"] = -1] = \"LESS\";\n Ordering[Ordering[\"EQUAL\"] = 0] = \"EQUAL\";\n Ordering[Ordering[\"GREATER\"] = 1] = \"GREATER\";\n})(Ordering || (Ordering = {}));\n/**\n * This function switches the direction of `ordering` if `direction` is `\"desc\"`\n * @param ordering The original ordering (assumed to be an \"asc\" ordering)\n * @param direction The new desired direction\n */\nfunction rectifyOrdering(ordering, direction) {\n if (direction === \"desc\") {\n return -ordering;\n }\n return ordering;\n}\n/**\n * An ascending sorting function\n * @param left An item from an array\n * @param right An item from an array\n * @returns The relative ordering in an ascending manner.\n * - Less if left < right\n * - Equal if left == right\n * - Greater if left > right\n */\nfunction sortCompare(left, right) {\n if (left < right) {\n return Ordering.LESS;\n }\n if (left === right) {\n return Ordering.EQUAL;\n }\n return Ordering.GREATER;\n}\nfunction sortCompareChartVersions(left, right) {\n if (left.__version && right.__version) {\n return semver__WEBPACK_IMPORTED_MODULE_0___default.a.compare(right.__version, left.__version);\n }\n if (!left.__version && right.__version) {\n return Ordering.GREATER;\n }\n if (left.__version && !right.__version) {\n return Ordering.LESS;\n }\n return sortCompare(left.version, right.version);\n}\nfunction sortCharts(charts) {\n const chartsWithVersion = Array.from(_iter__WEBPACK_IMPORTED_MODULE_1__[\"map\"](charts, (chart => {\n const __version = Object(semver__WEBPACK_IMPORTED_MODULE_0__[\"coerce\"])(chart.version, { includePrerelease: true, loose: true });\n if (!__version) {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].warn(`[HELM-SERVICE]: Version from helm chart is not loosely coercable to semver.`, { name: chart.name, version: chart.version, repo: chart.repo });\n }\n chart.__version = __version;\n return chart;\n })));\n return chartsWithVersion\n .sort(sortCompareChartVersions)\n .map(chart => (delete chart.__version, chart));\n}\n\n\n//# sourceURL=webpack:///./src/common/utils/sort-compare.ts?");
|
|
38556
38580
|
|
|
38557
38581
|
/***/ }),
|
|
38558
38582
|
|
|
@@ -39356,7 +39380,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
39356
39380
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
39357
39381
|
|
|
39358
39382
|
"use strict";
|
|
39359
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bundledKubectlPath\", function() { return bundledKubectlPath; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Kubectl\", function() { return Kubectl; });\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ \"path\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs */ \"fs\");\n/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _promise_exec__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./promise-exec */ \"./src/main/promise-exec.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! fs-extra */ \"./node_modules/fs-extra/lib/index.js\");\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(fs_extra__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var proper_lockfile__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! proper-lockfile */ \"./node_modules/proper-lockfile/index.js\");\n/* harmony import */ var proper_lockfile__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(proper_lockfile__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _helm_helm_cli__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helm/helm-cli */ \"./src/main/helm/helm-cli.ts\");\n/* harmony import */ var _common_user_store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/user-store */ \"./src/common/user-store/index.ts\");\n/* harmony import */ var _common_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/request */ \"./src/common/request.ts\");\n/* harmony import */ var _common_utils_app_version__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../common/utils/app-version */ \"./src/common/utils/app-version.ts\");\n/* harmony import */ var _common_vars__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../common/vars */ \"./src/common/vars.ts\");\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! semver */ \"./node_modules/semver/index.js\");\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(semver__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _common_utils_getPath__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../common/utils/getPath */ \"./src/common/utils/getPath.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst bundledVersion = Object(_common_utils_app_version__WEBPACK_IMPORTED_MODULE_9__[\"getBundledKubectlVersion\"])();\nconst kubectlMap = new Map([\n [\"1.7\", \"1.8.15\"],\n [\"1.8\", \"1.9.10\"],\n [\"1.9\", \"1.10.13\"],\n [\"1.10\", \"1.11.10\"],\n [\"1.11\", \"1.12.10\"],\n [\"1.12\", \"1.13.12\"],\n [\"1.13\", \"1.13.12\"],\n [\"1.14\", \"1.14.10\"],\n [\"1.15\", \"1.15.11\"],\n [\"1.16\", \"1.16.15\"],\n [\"1.17\", \"1.17.17\"],\n [\"1.18\", \"1.18.20\"],\n [\"1.19\", \"1.19.12\"],\n [\"1.20\", \"1.20.8\"],\n [\"1.21\", bundledVersion]\n]);\nconst packageMirrors = new Map([\n [\"default\", \"https://storage.googleapis.com/kubernetes-release/release\"],\n [\"china\", \"https://mirror.azure.cn/kubernetes/kubectl\"]\n]);\nlet bundledPath;\nconst initScriptVersionString = \"# lens-initscript v3\\n\";\nfunction bundledKubectlPath() {\n if (bundledPath) {\n return bundledPath;\n }\n if (_common_vars__WEBPACK_IMPORTED_MODULE_10__[\"isDevelopment\"] || _common_vars__WEBPACK_IMPORTED_MODULE_10__[\"isTestEnv\"]) {\n const platformName = _common_vars__WEBPACK_IMPORTED_MODULE_10__[\"isWindows\"] ? \"windows\" : process.platform;\n bundledPath = path__WEBPACK_IMPORTED_MODULE_0___default.a.join(process.cwd(), \"binaries\", \"client\", platformName, process.arch, \"kubectl\");\n }\n else {\n bundledPath = path__WEBPACK_IMPORTED_MODULE_0___default.a.join(process.resourcesPath, process.arch, \"kubectl\");\n }\n if (_common_vars__WEBPACK_IMPORTED_MODULE_10__[\"isWindows\"]) {\n bundledPath = `${bundledPath}.exe`;\n }\n return bundledPath;\n}\nclass Kubectl {\n constructor(clusterVersion) {\n Object.defineProperty(this, \"kubectlVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"directory\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"url\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"path\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"dirname\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n let version;\n try {\n version = new semver__WEBPACK_IMPORTED_MODULE_11__[\"SemVer\"](clusterVersion, { includePrerelease: false });\n }\n catch (_a) {\n version = new semver__WEBPACK_IMPORTED_MODULE_11__[\"SemVer\"](Kubectl.bundledKubectlVersion);\n }\n const minorVersion = `${version.major}.${version.minor}`;\n /* minorVersion is the first two digits of kube server version\n if the version map includes that, use that version, if not, fallback to the exact x.y.z of kube version */\n if (kubectlMap.has(minorVersion)) {\n this.kubectlVersion = kubectlMap.get(minorVersion);\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`Set kubectl version ${this.kubectlVersion} for cluster version ${clusterVersion} using version map`);\n }\n else {\n this.kubectlVersion = version.format();\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`Set kubectl version ${this.kubectlVersion} for cluster version ${clusterVersion} using fallback`);\n }\n let arch = null;\n if (process.arch == \"x64\") {\n arch = \"amd64\";\n }\n else if (process.arch == \"x86\" || process.arch == \"ia32\") {\n arch = \"386\";\n }\n else {\n arch = process.arch;\n }\n const platformName = _common_vars__WEBPACK_IMPORTED_MODULE_10__[\"isWindows\"] ? \"windows\" : process.platform;\n const binaryName = _common_vars__WEBPACK_IMPORTED_MODULE_10__[\"isWindows\"] ? \"kubectl.exe\" : \"kubectl\";\n this.url = `${this.getDownloadMirror()}/v${this.kubectlVersion}/bin/${platformName}/${arch}/${binaryName}`;\n this.dirname = path__WEBPACK_IMPORTED_MODULE_0___default.a.normalize(path__WEBPACK_IMPORTED_MODULE_0___default.a.join(this.getDownloadDir(), this.kubectlVersion));\n this.path = path__WEBPACK_IMPORTED_MODULE_0___default.a.join(this.dirname, binaryName);\n }\n static get kubectlDir() {\n return path__WEBPACK_IMPORTED_MODULE_0___default.a.join(Object(_common_utils_getPath__WEBPACK_IMPORTED_MODULE_12__[\"getPath\"])(\"userData\"), \"binaries\", \"kubectl\");\n }\n // Returns the single bundled Kubectl instance\n static bundled() {\n var _a;\n return (_a = Kubectl.bundledInstance) !== null && _a !== void 0 ? _a : (Kubectl.bundledInstance = new Kubectl(Kubectl.bundledKubectlVersion));\n }\n getBundledPath() {\n return bundledKubectlPath();\n }\n getPathFromPreferences() {\n return _common_user_store__WEBPACK_IMPORTED_MODULE_7__[\"UserStore\"].getInstance().kubectlBinariesPath || this.getBundledPath();\n }\n getDownloadDir() {\n if (_common_user_store__WEBPACK_IMPORTED_MODULE_7__[\"UserStore\"].getInstance().downloadBinariesPath) {\n return path__WEBPACK_IMPORTED_MODULE_0___default.a.join(_common_user_store__WEBPACK_IMPORTED_MODULE_7__[\"UserStore\"].getInstance().downloadBinariesPath, \"kubectl\");\n }\n return Kubectl.kubectlDir;\n }\n async getPath(bundled = false) {\n if (bundled) {\n return this.getBundledPath();\n }\n if (_common_user_store__WEBPACK_IMPORTED_MODULE_7__[\"UserStore\"].getInstance().downloadKubectlBinaries === false) {\n return this.getPathFromPreferences();\n }\n // return binary name if bundled path is not functional\n if (!await this.checkBinary(this.getBundledPath(), false)) {\n Kubectl.invalidBundle = true;\n return path__WEBPACK_IMPORTED_MODULE_0___default.a.basename(this.getBundledPath());\n }\n try {\n if (!await this.ensureKubectl()) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(\"Failed to ensure kubectl, fallback to the bundled version\");\n return this.getBundledPath();\n }\n return this.path;\n }\n catch (err) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(\"Failed to ensure kubectl, fallback to the bundled version\");\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(err);\n return this.getBundledPath();\n }\n }\n async binDir() {\n try {\n await this.ensureKubectl();\n await this.writeInitScripts();\n return this.dirname;\n }\n catch (err) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(err);\n return \"\";\n }\n }\n async checkBinary(path, checkVersion = true) {\n const exists = await Object(fs_extra__WEBPACK_IMPORTED_MODULE_4__[\"pathExists\"])(path);\n if (exists) {\n try {\n const { stdout } = await Object(_promise_exec__WEBPACK_IMPORTED_MODULE_2__[\"promiseExec\"])(`\"${path}\" version --client=true -o json`);\n const output = JSON.parse(stdout);\n if (!checkVersion) {\n return true;\n }\n let version = output.clientVersion.gitVersion;\n if (version[0] === \"v\") {\n version = version.slice(1);\n }\n if (version === this.kubectlVersion) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`Local kubectl is version ${this.kubectlVersion}`);\n return true;\n }\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`Local kubectl is version ${version}, expected ${this.kubectlVersion}, unlinking`);\n }\n catch (err) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`Local kubectl failed to run properly (${err.message}), unlinking`);\n }\n await fs__WEBPACK_IMPORTED_MODULE_1___default.a.promises.unlink(this.path);\n }\n return false;\n }\n async checkBundled() {\n if (this.kubectlVersion === Kubectl.bundledKubectlVersion) {\n try {\n const exist = await Object(fs_extra__WEBPACK_IMPORTED_MODULE_4__[\"pathExists\"])(this.path);\n if (!exist) {\n await fs__WEBPACK_IMPORTED_MODULE_1___default.a.promises.copyFile(this.getBundledPath(), this.path);\n await fs__WEBPACK_IMPORTED_MODULE_1___default.a.promises.chmod(this.path, 0o755);\n }\n return true;\n }\n catch (err) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`Could not copy the bundled kubectl to app-data: ${err}`);\n return false;\n }\n }\n else {\n return false;\n }\n }\n async ensureKubectl() {\n if (_common_user_store__WEBPACK_IMPORTED_MODULE_7__[\"UserStore\"].getInstance().downloadKubectlBinaries === false) {\n return true;\n }\n if (Kubectl.invalidBundle) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`Detected invalid bundle binary, returning ...`);\n return false;\n }\n await Object(fs_extra__WEBPACK_IMPORTED_MODULE_4__[\"ensureDir\"])(this.dirname, 0o755);\n return proper_lockfile__WEBPACK_IMPORTED_MODULE_5__[\"lock\"](this.dirname).then(async (release) => {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`Acquired a lock for ${this.kubectlVersion}`);\n const bundled = await this.checkBundled();\n let isValid = await this.checkBinary(this.path, !bundled);\n if (!isValid && !bundled) {\n await this.downloadKubectl().catch((error) => {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(error);\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`Releasing lock for ${this.kubectlVersion}`);\n release();\n return false;\n });\n isValid = await this.checkBinary(this.path, false);\n }\n if (!isValid) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`Releasing lock for ${this.kubectlVersion}`);\n release();\n return false;\n }\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`Releasing lock for ${this.kubectlVersion}`);\n release();\n return true;\n }).catch((e) => {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`Failed to get a lock for ${this.kubectlVersion}`);\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(e);\n return false;\n });\n }\n async downloadKubectl() {\n await Object(fs_extra__WEBPACK_IMPORTED_MODULE_4__[\"ensureDir\"])(path__WEBPACK_IMPORTED_MODULE_0___default.a.dirname(this.path), 0o755);\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`Downloading kubectl ${this.kubectlVersion} from ${this.url} to ${this.path}`);\n return new Promise((resolve, reject) => {\n const stream = Object(_common_request__WEBPACK_IMPORTED_MODULE_8__[\"customRequest\"])({\n url: this.url,\n gzip: true,\n });\n const file = fs__WEBPACK_IMPORTED_MODULE_1___default.a.createWriteStream(this.path);\n stream.on(\"complete\", () => {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(\"kubectl binary download finished\");\n file.end();\n });\n stream.on(\"error\", (error) => {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(error);\n fs__WEBPACK_IMPORTED_MODULE_1___default.a.unlink(this.path, () => {\n // do nothing\n });\n reject(error);\n });\n file.on(\"close\", () => {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(\"kubectl binary download closed\");\n fs__WEBPACK_IMPORTED_MODULE_1___default.a.chmod(this.path, 0o755, (err) => {\n if (err)\n reject(err);\n });\n resolve();\n });\n stream.pipe(file);\n });\n }\n async writeInitScripts() {\n const kubectlPath = _common_user_store__WEBPACK_IMPORTED_MODULE_7__[\"UserStore\"].getInstance().downloadKubectlBinaries ? this.dirname : path__WEBPACK_IMPORTED_MODULE_0___default.a.dirname(this.getPathFromPreferences());\n const helmPath = _helm_helm_cli__WEBPACK_IMPORTED_MODULE_6__[\"helmCli\"].getBinaryDir();\n const fsPromises = fs__WEBPACK_IMPORTED_MODULE_1___default.a.promises;\n const bashScriptPath = path__WEBPACK_IMPORTED_MODULE_0___default.a.join(this.dirname, \".bash_set_path\");\n let bashScript = `${initScriptVersionString}`;\n bashScript += \"tempkubeconfig=\\\"$KUBECONFIG\\\"\\n\";\n bashScript += \"test -f \\\"/etc/profile\\\" && . \\\"/etc/profile\\\"\\n\";\n bashScript += \"if test -f \\\"$HOME/.bash_profile\\\"; then\\n\";\n bashScript += \" . \\\"$HOME/.bash_profile\\\"\\n\";\n bashScript += \"elif test -f \\\"$HOME/.bash_login\\\"; then\\n\";\n bashScript += \" . \\\"$HOME/.bash_login\\\"\\n\";\n bashScript += \"elif test -f \\\"$HOME/.profile\\\"; then\\n\";\n bashScript += \" . \\\"$HOME/.profile\\\"\\n\";\n bashScript += \"fi\\n\";\n bashScript += `export PATH=\"${helmPath}:${kubectlPath}:$PATH\"\\n`;\n bashScript += \"export KUBECONFIG=\\\"$tempkubeconfig\\\"\\n\";\n bashScript += \"NO_PROXY=\\\",${NO_PROXY:-localhost},\\\"\\n\";\n bashScript += \"NO_PROXY=\\\"${NO_PROXY//,localhost,/,}\\\"\\n\";\n bashScript += \"NO_PROXY=\\\"${NO_PROXY//,127.0.0.1,/,}\\\"\\n\";\n bashScript += \"NO_PROXY=\\\"localhost,127.0.0.1${NO_PROXY%,}\\\"\\n\";\n bashScript += \"export NO_PROXY\\n\";\n bashScript += \"unset tempkubeconfig\\n\";\n await fsPromises.writeFile(bashScriptPath, bashScript.toString(), { mode: 0o644 });\n const zshScriptPath = path__WEBPACK_IMPORTED_MODULE_0___default.a.join(this.dirname, \".zlogin\");\n let zshScript = `${initScriptVersionString}`;\n zshScript += \"tempkubeconfig=\\\"$KUBECONFIG\\\"\\n\";\n // restore previous ZDOTDIR\n zshScript += \"export ZDOTDIR=\\\"$OLD_ZDOTDIR\\\"\\n\";\n // source all the files\n zshScript += \"test -f \\\"$OLD_ZDOTDIR/.zshenv\\\" && . \\\"$OLD_ZDOTDIR/.zshenv\\\"\\n\";\n zshScript += \"test -f \\\"$OLD_ZDOTDIR/.zprofile\\\" && . \\\"$OLD_ZDOTDIR/.zprofile\\\"\\n\";\n zshScript += \"test -f \\\"$OLD_ZDOTDIR/.zlogin\\\" && . \\\"$OLD_ZDOTDIR/.zlogin\\\"\\n\";\n zshScript += \"test -f \\\"$OLD_ZDOTDIR/.zshrc\\\" && . \\\"$OLD_ZDOTDIR/.zshrc\\\"\\n\";\n // voodoo to replace any previous occurrences of kubectl path in the PATH\n zshScript += `kubectlpath=\\\"${kubectlPath}\"\\n`;\n zshScript += `helmpath=\\\"${helmPath}\"\\n`;\n zshScript += \"p=\\\":$kubectlpath:\\\"\\n\";\n zshScript += \"d=\\\":$PATH:\\\"\\n\";\n zshScript += \"d=${d//$p/:}\\n\";\n zshScript += \"d=${d/#:/}\\n\";\n zshScript += \"export PATH=\\\"$helmpath:$kubectlpath:${d/%:/}\\\"\\n\";\n zshScript += \"export KUBECONFIG=\\\"$tempkubeconfig\\\"\\n\";\n zshScript += \"NO_PROXY=\\\",${NO_PROXY:-localhost},\\\"\\n\";\n zshScript += \"NO_PROXY=\\\"${NO_PROXY//,localhost,/,}\\\"\\n\";\n zshScript += \"NO_PROXY=\\\"${NO_PROXY//,127.0.0.1,/,}\\\"\\n\";\n zshScript += \"NO_PROXY=\\\"localhost,127.0.0.1${NO_PROXY%,}\\\"\\n\";\n zshScript += \"export NO_PROXY\\n\";\n zshScript += \"unset tempkubeconfig\\n\";\n zshScript += \"unset OLD_ZDOTDIR\\n\";\n await fsPromises.writeFile(zshScriptPath, zshScript.toString(), { mode: 0o644 });\n }\n getDownloadMirror() {\n const mirror = packageMirrors.get(_common_user_store__WEBPACK_IMPORTED_MODULE_7__[\"UserStore\"].getInstance().downloadMirror);\n if (mirror) {\n return mirror;\n }\n return packageMirrors.get(\"default\"); // MacOS packages are only available from default\n }\n}\nObject.defineProperty(Kubectl, \"bundledKubectlVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: bundledVersion\n});\nObject.defineProperty(Kubectl, \"invalidBundle\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n});\n\n\n//# sourceURL=webpack:///./src/main/kubectl.ts?");
|
|
39383
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bundledKubectlPath\", function() { return bundledKubectlPath; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Kubectl\", function() { return Kubectl; });\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ \"path\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs */ \"fs\");\n/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _promise_exec__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./promise-exec */ \"./src/main/promise-exec.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! fs-extra */ \"./node_modules/fs-extra/lib/index.js\");\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(fs_extra__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var proper_lockfile__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! proper-lockfile */ \"./node_modules/proper-lockfile/index.js\");\n/* harmony import */ var proper_lockfile__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(proper_lockfile__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _helm_helm_cli__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helm/helm-cli */ \"./src/main/helm/helm-cli.ts\");\n/* harmony import */ var _common_user_store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/user-store */ \"./src/common/user-store/index.ts\");\n/* harmony import */ var _common_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/request */ \"./src/common/request.ts\");\n/* harmony import */ var _common_utils_app_version__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../common/utils/app-version */ \"./src/common/utils/app-version.ts\");\n/* harmony import */ var _common_vars__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../common/vars */ \"./src/common/vars.ts\");\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! semver */ \"./node_modules/semver/index.js\");\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(semver__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _common_utils_getPath__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../common/utils/getPath */ \"./src/common/utils/getPath.ts\");\n/* harmony import */ var _common_user_store_preferences_helpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../common/user-store/preferences-helpers */ \"./src/common/user-store/preferences-helpers.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst bundledVersion = Object(_common_utils_app_version__WEBPACK_IMPORTED_MODULE_9__[\"getBundledKubectlVersion\"])();\nconst kubectlMap = new Map([\n [\"1.7\", \"1.8.15\"],\n [\"1.8\", \"1.9.10\"],\n [\"1.9\", \"1.10.13\"],\n [\"1.10\", \"1.11.10\"],\n [\"1.11\", \"1.12.10\"],\n [\"1.12\", \"1.13.12\"],\n [\"1.13\", \"1.13.12\"],\n [\"1.14\", \"1.14.10\"],\n [\"1.15\", \"1.15.11\"],\n [\"1.16\", \"1.16.15\"],\n [\"1.17\", \"1.17.17\"],\n [\"1.18\", \"1.18.20\"],\n [\"1.19\", \"1.19.12\"],\n [\"1.20\", \"1.20.8\"],\n [\"1.21\", bundledVersion]\n]);\nlet bundledPath;\nconst initScriptVersionString = \"# lens-initscript v3\\n\";\nfunction bundledKubectlPath() {\n if (bundledPath) {\n return bundledPath;\n }\n if (_common_vars__WEBPACK_IMPORTED_MODULE_10__[\"isDevelopment\"] || _common_vars__WEBPACK_IMPORTED_MODULE_10__[\"isTestEnv\"]) {\n const platformName = _common_vars__WEBPACK_IMPORTED_MODULE_10__[\"isWindows\"] ? \"windows\" : process.platform;\n bundledPath = path__WEBPACK_IMPORTED_MODULE_0___default.a.join(process.cwd(), \"binaries\", \"client\", platformName, process.arch, \"kubectl\");\n }\n else {\n bundledPath = path__WEBPACK_IMPORTED_MODULE_0___default.a.join(process.resourcesPath, process.arch, \"kubectl\");\n }\n if (_common_vars__WEBPACK_IMPORTED_MODULE_10__[\"isWindows\"]) {\n bundledPath = `${bundledPath}.exe`;\n }\n return bundledPath;\n}\nclass Kubectl {\n constructor(clusterVersion) {\n Object.defineProperty(this, \"kubectlVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"directory\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"url\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"path\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"dirname\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n let version;\n try {\n version = new semver__WEBPACK_IMPORTED_MODULE_11__[\"SemVer\"](clusterVersion, { includePrerelease: false });\n }\n catch (_a) {\n version = new semver__WEBPACK_IMPORTED_MODULE_11__[\"SemVer\"](Kubectl.bundledKubectlVersion);\n }\n const minorVersion = `${version.major}.${version.minor}`;\n /* minorVersion is the first two digits of kube server version\n if the version map includes that, use that version, if not, fallback to the exact x.y.z of kube version */\n if (kubectlMap.has(minorVersion)) {\n this.kubectlVersion = kubectlMap.get(minorVersion);\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`Set kubectl version ${this.kubectlVersion} for cluster version ${clusterVersion} using version map`);\n }\n else {\n this.kubectlVersion = version.format();\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`Set kubectl version ${this.kubectlVersion} for cluster version ${clusterVersion} using fallback`);\n }\n let arch = null;\n if (process.arch == \"x64\") {\n arch = \"amd64\";\n }\n else if (process.arch == \"x86\" || process.arch == \"ia32\") {\n arch = \"386\";\n }\n else {\n arch = process.arch;\n }\n const platformName = _common_vars__WEBPACK_IMPORTED_MODULE_10__[\"isWindows\"] ? \"windows\" : process.platform;\n const binaryName = _common_vars__WEBPACK_IMPORTED_MODULE_10__[\"isWindows\"] ? \"kubectl.exe\" : \"kubectl\";\n this.url = `${this.getDownloadMirror()}/v${this.kubectlVersion}/bin/${platformName}/${arch}/${binaryName}`;\n this.dirname = path__WEBPACK_IMPORTED_MODULE_0___default.a.normalize(path__WEBPACK_IMPORTED_MODULE_0___default.a.join(this.getDownloadDir(), this.kubectlVersion));\n this.path = path__WEBPACK_IMPORTED_MODULE_0___default.a.join(this.dirname, binaryName);\n }\n static get kubectlDir() {\n return path__WEBPACK_IMPORTED_MODULE_0___default.a.join(Object(_common_utils_getPath__WEBPACK_IMPORTED_MODULE_12__[\"getPath\"])(\"userData\"), \"binaries\", \"kubectl\");\n }\n // Returns the single bundled Kubectl instance\n static bundled() {\n var _a;\n return (_a = Kubectl.bundledInstance) !== null && _a !== void 0 ? _a : (Kubectl.bundledInstance = new Kubectl(Kubectl.bundledKubectlVersion));\n }\n getBundledPath() {\n return bundledKubectlPath();\n }\n getPathFromPreferences() {\n return _common_user_store__WEBPACK_IMPORTED_MODULE_7__[\"UserStore\"].getInstance().kubectlBinariesPath || this.getBundledPath();\n }\n getDownloadDir() {\n if (_common_user_store__WEBPACK_IMPORTED_MODULE_7__[\"UserStore\"].getInstance().downloadBinariesPath) {\n return path__WEBPACK_IMPORTED_MODULE_0___default.a.join(_common_user_store__WEBPACK_IMPORTED_MODULE_7__[\"UserStore\"].getInstance().downloadBinariesPath, \"kubectl\");\n }\n return Kubectl.kubectlDir;\n }\n async getPath(bundled = false) {\n if (bundled) {\n return this.getBundledPath();\n }\n if (_common_user_store__WEBPACK_IMPORTED_MODULE_7__[\"UserStore\"].getInstance().downloadKubectlBinaries === false) {\n return this.getPathFromPreferences();\n }\n // return binary name if bundled path is not functional\n if (!await this.checkBinary(this.getBundledPath(), false)) {\n Kubectl.invalidBundle = true;\n return path__WEBPACK_IMPORTED_MODULE_0___default.a.basename(this.getBundledPath());\n }\n try {\n if (!await this.ensureKubectl()) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(\"Failed to ensure kubectl, fallback to the bundled version\");\n return this.getBundledPath();\n }\n return this.path;\n }\n catch (err) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(\"Failed to ensure kubectl, fallback to the bundled version\");\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(err);\n return this.getBundledPath();\n }\n }\n async binDir() {\n try {\n await this.ensureKubectl();\n await this.writeInitScripts();\n return this.dirname;\n }\n catch (err) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(err);\n return \"\";\n }\n }\n async checkBinary(path, checkVersion = true) {\n const exists = await Object(fs_extra__WEBPACK_IMPORTED_MODULE_4__[\"pathExists\"])(path);\n if (exists) {\n try {\n const { stdout } = await Object(_promise_exec__WEBPACK_IMPORTED_MODULE_2__[\"promiseExec\"])(`\"${path}\" version --client=true -o json`);\n const output = JSON.parse(stdout);\n if (!checkVersion) {\n return true;\n }\n let version = output.clientVersion.gitVersion;\n if (version[0] === \"v\") {\n version = version.slice(1);\n }\n if (version === this.kubectlVersion) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`Local kubectl is version ${this.kubectlVersion}`);\n return true;\n }\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`Local kubectl is version ${version}, expected ${this.kubectlVersion}, unlinking`);\n }\n catch (err) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`Local kubectl failed to run properly (${err.message}), unlinking`);\n }\n await fs__WEBPACK_IMPORTED_MODULE_1___default.a.promises.unlink(this.path);\n }\n return false;\n }\n async checkBundled() {\n if (this.kubectlVersion === Kubectl.bundledKubectlVersion) {\n try {\n const exist = await Object(fs_extra__WEBPACK_IMPORTED_MODULE_4__[\"pathExists\"])(this.path);\n if (!exist) {\n await fs__WEBPACK_IMPORTED_MODULE_1___default.a.promises.copyFile(this.getBundledPath(), this.path);\n await fs__WEBPACK_IMPORTED_MODULE_1___default.a.promises.chmod(this.path, 0o755);\n }\n return true;\n }\n catch (err) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`Could not copy the bundled kubectl to app-data: ${err}`);\n return false;\n }\n }\n else {\n return false;\n }\n }\n async ensureKubectl() {\n if (_common_user_store__WEBPACK_IMPORTED_MODULE_7__[\"UserStore\"].getInstance().downloadKubectlBinaries === false) {\n return true;\n }\n if (Kubectl.invalidBundle) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`Detected invalid bundle binary, returning ...`);\n return false;\n }\n await Object(fs_extra__WEBPACK_IMPORTED_MODULE_4__[\"ensureDir\"])(this.dirname, 0o755);\n return proper_lockfile__WEBPACK_IMPORTED_MODULE_5__[\"lock\"](this.dirname).then(async (release) => {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`Acquired a lock for ${this.kubectlVersion}`);\n const bundled = await this.checkBundled();\n let isValid = await this.checkBinary(this.path, !bundled);\n if (!isValid && !bundled) {\n await this.downloadKubectl().catch((error) => {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(error);\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`Releasing lock for ${this.kubectlVersion}`);\n release();\n return false;\n });\n isValid = await this.checkBinary(this.path, false);\n }\n if (!isValid) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`Releasing lock for ${this.kubectlVersion}`);\n release();\n return false;\n }\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(`Releasing lock for ${this.kubectlVersion}`);\n release();\n return true;\n }).catch((e) => {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(`Failed to get a lock for ${this.kubectlVersion}`);\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(e);\n return false;\n });\n }\n async downloadKubectl() {\n await Object(fs_extra__WEBPACK_IMPORTED_MODULE_4__[\"ensureDir\"])(path__WEBPACK_IMPORTED_MODULE_0___default.a.dirname(this.path), 0o755);\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].info(`Downloading kubectl ${this.kubectlVersion} from ${this.url} to ${this.path}`);\n return new Promise((resolve, reject) => {\n const stream = Object(_common_request__WEBPACK_IMPORTED_MODULE_8__[\"customRequest\"])({\n url: this.url,\n gzip: true,\n });\n const file = fs__WEBPACK_IMPORTED_MODULE_1___default.a.createWriteStream(this.path);\n stream.on(\"complete\", () => {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(\"kubectl binary download finished\");\n file.end();\n });\n stream.on(\"error\", (error) => {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].error(error);\n fs__WEBPACK_IMPORTED_MODULE_1___default.a.unlink(this.path, () => {\n // do nothing\n });\n reject(error);\n });\n file.on(\"close\", () => {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"default\"].debug(\"kubectl binary download closed\");\n fs__WEBPACK_IMPORTED_MODULE_1___default.a.chmod(this.path, 0o755, (err) => {\n if (err)\n reject(err);\n });\n resolve();\n });\n stream.pipe(file);\n });\n }\n async writeInitScripts() {\n const kubectlPath = _common_user_store__WEBPACK_IMPORTED_MODULE_7__[\"UserStore\"].getInstance().downloadKubectlBinaries ? this.dirname : path__WEBPACK_IMPORTED_MODULE_0___default.a.dirname(this.getPathFromPreferences());\n const helmPath = _helm_helm_cli__WEBPACK_IMPORTED_MODULE_6__[\"helmCli\"].getBinaryDir();\n const fsPromises = fs__WEBPACK_IMPORTED_MODULE_1___default.a.promises;\n const bashScriptPath = path__WEBPACK_IMPORTED_MODULE_0___default.a.join(this.dirname, \".bash_set_path\");\n let bashScript = `${initScriptVersionString}`;\n bashScript += \"tempkubeconfig=\\\"$KUBECONFIG\\\"\\n\";\n bashScript += \"test -f \\\"/etc/profile\\\" && . \\\"/etc/profile\\\"\\n\";\n bashScript += \"if test -f \\\"$HOME/.bash_profile\\\"; then\\n\";\n bashScript += \" . \\\"$HOME/.bash_profile\\\"\\n\";\n bashScript += \"elif test -f \\\"$HOME/.bash_login\\\"; then\\n\";\n bashScript += \" . \\\"$HOME/.bash_login\\\"\\n\";\n bashScript += \"elif test -f \\\"$HOME/.profile\\\"; then\\n\";\n bashScript += \" . \\\"$HOME/.profile\\\"\\n\";\n bashScript += \"fi\\n\";\n bashScript += `export PATH=\"${helmPath}:${kubectlPath}:$PATH\"\\n`;\n bashScript += \"export KUBECONFIG=\\\"$tempkubeconfig\\\"\\n\";\n bashScript += \"NO_PROXY=\\\",${NO_PROXY:-localhost},\\\"\\n\";\n bashScript += \"NO_PROXY=\\\"${NO_PROXY//,localhost,/,}\\\"\\n\";\n bashScript += \"NO_PROXY=\\\"${NO_PROXY//,127.0.0.1,/,}\\\"\\n\";\n bashScript += \"NO_PROXY=\\\"localhost,127.0.0.1${NO_PROXY%,}\\\"\\n\";\n bashScript += \"export NO_PROXY\\n\";\n bashScript += \"unset tempkubeconfig\\n\";\n await fsPromises.writeFile(bashScriptPath, bashScript.toString(), { mode: 0o644 });\n const zshScriptPath = path__WEBPACK_IMPORTED_MODULE_0___default.a.join(this.dirname, \".zlogin\");\n let zshScript = `${initScriptVersionString}`;\n zshScript += \"tempkubeconfig=\\\"$KUBECONFIG\\\"\\n\";\n // restore previous ZDOTDIR\n zshScript += \"export ZDOTDIR=\\\"$OLD_ZDOTDIR\\\"\\n\";\n // source all the files\n zshScript += \"test -f \\\"$OLD_ZDOTDIR/.zshenv\\\" && . \\\"$OLD_ZDOTDIR/.zshenv\\\"\\n\";\n zshScript += \"test -f \\\"$OLD_ZDOTDIR/.zprofile\\\" && . \\\"$OLD_ZDOTDIR/.zprofile\\\"\\n\";\n zshScript += \"test -f \\\"$OLD_ZDOTDIR/.zlogin\\\" && . \\\"$OLD_ZDOTDIR/.zlogin\\\"\\n\";\n zshScript += \"test -f \\\"$OLD_ZDOTDIR/.zshrc\\\" && . \\\"$OLD_ZDOTDIR/.zshrc\\\"\\n\";\n // voodoo to replace any previous occurrences of kubectl path in the PATH\n zshScript += `kubectlpath=\\\"${kubectlPath}\"\\n`;\n zshScript += `helmpath=\\\"${helmPath}\"\\n`;\n zshScript += \"p=\\\":$kubectlpath:\\\"\\n\";\n zshScript += \"d=\\\":$PATH:\\\"\\n\";\n zshScript += \"d=${d//$p/:}\\n\";\n zshScript += \"d=${d/#:/}\\n\";\n zshScript += \"export PATH=\\\"$helmpath:$kubectlpath:${d/%:/}\\\"\\n\";\n zshScript += \"export KUBECONFIG=\\\"$tempkubeconfig\\\"\\n\";\n zshScript += \"NO_PROXY=\\\",${NO_PROXY:-localhost},\\\"\\n\";\n zshScript += \"NO_PROXY=\\\"${NO_PROXY//,localhost,/,}\\\"\\n\";\n zshScript += \"NO_PROXY=\\\"${NO_PROXY//,127.0.0.1,/,}\\\"\\n\";\n zshScript += \"NO_PROXY=\\\"localhost,127.0.0.1${NO_PROXY%,}\\\"\\n\";\n zshScript += \"export NO_PROXY\\n\";\n zshScript += \"unset tempkubeconfig\\n\";\n zshScript += \"unset OLD_ZDOTDIR\\n\";\n await fsPromises.writeFile(zshScriptPath, zshScript.toString(), { mode: 0o644 });\n }\n getDownloadMirror() {\n // MacOS packages are only available from default\n var _a;\n return (_a = _common_user_store_preferences_helpers__WEBPACK_IMPORTED_MODULE_13__[\"packageMirrors\"].get(_common_user_store__WEBPACK_IMPORTED_MODULE_7__[\"UserStore\"].getInstance().downloadMirror)) !== null && _a !== void 0 ? _a : _common_user_store_preferences_helpers__WEBPACK_IMPORTED_MODULE_13__[\"packageMirrors\"].get(_common_user_store_preferences_helpers__WEBPACK_IMPORTED_MODULE_13__[\"defaultPackageMirror\"]);\n }\n}\nObject.defineProperty(Kubectl, \"bundledKubectlVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: bundledVersion\n});\nObject.defineProperty(Kubectl, \"invalidBundle\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n});\n\n\n//# sourceURL=webpack:///./src/main/kubectl.ts?");
|
|
39360
39384
|
|
|
39361
39385
|
/***/ }),
|
|
39362
39386
|
|
|
@@ -39728,7 +39752,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _com
|
|
|
39728
39752
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
39729
39753
|
|
|
39730
39754
|
"use strict";
|
|
39731
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CatalogEntityRegistry\", function() { return CatalogEntityRegistry; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"catalogEntityRegistry\", function() { return catalogEntityRegistry; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getActiveClusterEntity\", function() { return getActiveClusterEntity; });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _common_ipc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/ipc */ \"./src/common/ipc/index.ts\");\n/* harmony import */ var _common_catalog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/catalog */ \"./src/common/catalog/index.ts\");\n/* harmony import */ var _common_catalog_entities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/catalog-entities */ \"./src/common/catalog-entities/index.ts\");\n/* harmony import */ var _common_cluster_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/cluster-store */ \"./src/common/cluster-store.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _common_logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/logger */ \"./src/common/logger.ts\");\n/* harmony import */ var _catalog_entity__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./catalog-entity */ \"./src/renderer/api/catalog-entity.ts\");\n/* harmony import */ var _common_catalog_catalog_run_event__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/catalog/catalog-run-event */ \"./src/common/catalog/catalog-run-event.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\nclass CatalogEntityRegistry {\n constructor(categoryRegistry) {\n Object.defineProperty(this, \"categoryRegistry\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: categoryRegistry\n });\n Object.defineProperty(this, \"activeEntityId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: undefined\n });\n Object.defineProperty(this, \"_entities\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].map([], { deep: true })\n });\n Object.defineProperty(this, \"filters\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].set([], {\n deep: false,\n })\n });\n Object.defineProperty(this, \"onBeforeRunHooks\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].set([], {\n deep: false,\n })\n });\n /**\n * Buffer for keeping entities that don't yet have CatalogCategory synced\n */\n Object.defineProperty(this, \"rawEntities\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"makeObservable\"])(this);\n }\n get activeEntity() {\n return this._entities.get(this.activeEntityId) || null;\n }\n set activeEntity(raw) {\n if (raw) {\n const id = typeof raw === \"string\"\n ? raw\n : raw.getId();\n this.activeEntityId = id;\n }\n else {\n this.activeEntityId = undefined;\n }\n }\n init() {\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_1__[\"ipcRendererOn\"])(\"catalog:items\", (event, items) => {\n this.updateItems(items);\n });\n }\n updateItems(items) {\n this.rawEntities.length = 0;\n const newIds = new Set(items.map((item) => item.metadata.uid));\n for (const uid of this._entities.keys()) {\n if (!newIds.has(uid)) {\n this._entities.delete(uid);\n }\n }\n for (const item of items) {\n this.updateItem(item);\n }\n }\n updateItem(item) {\n const existing = this._entities.get(item.metadata.uid);\n if (!existing) {\n const entity = this.categoryRegistry.getEntityForData(item);\n if (entity) {\n this._entities.set(entity.metadata.uid, entity);\n }\n else {\n this.rawEntities.push(item);\n }\n }\n else {\n existing.metadata = item.metadata;\n existing.spec = item.spec;\n existing.status = item.status;\n }\n }\n processRawEntities() {\n const items = [...this.rawEntities];\n this.rawEntities.length = 0;\n for (const item of items) {\n this.updateItem(item);\n }\n }\n get items() {\n this.processRawEntities();\n return Array.from(this._entities.values());\n }\n get filteredItems() {\n return Array.from(_utils__WEBPACK_IMPORTED_MODULE_5__[\"iter\"].reduce(this.filters, _utils__WEBPACK_IMPORTED_MODULE_5__[\"iter\"].filter, this.items));\n }\n get entities() {\n return new Map(this.items.map(entity => [entity.getId(), entity]));\n }\n get filteredEntities() {\n return new Map(this.filteredItems.map(entity => [entity.getId(), entity]));\n }\n getById(id) {\n return this.entities.get(id);\n }\n getItemsForApiKind(apiVersion, kind, { filtered = false } = {}) {\n const byApiKind = (item) => item.apiVersion === apiVersion && item.kind === kind;\n const entities = filtered ? this.filteredItems : this.items;\n return entities.filter(byApiKind);\n }\n getItemsForCategory(category, { filtered = false } = {}) {\n const supportedVersions = new Set(category.spec.versions.map((v) => `${category.spec.group}/${v.name}`));\n const byApiVersionKind = (item) => supportedVersions.has(item.apiVersion) && item.kind === category.spec.names.kind;\n const entities = filtered ? this.filteredItems : this.items;\n return entities.filter(byApiVersionKind);\n }\n /**\n * Add a new filter to the set of item filters\n * @param fn The function that should return a truthy value if that entity should be sent currently \"active\"\n * @returns A function to remove that filter\n */\n addCatalogFilter(fn) {\n this.filters.add(fn);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"once\"])(() => void this.filters.delete(fn));\n }\n /**\n * Add a onBeforeRun hook. If `onBeforeRun` was previously added then it will not be added again\n * @param onBeforeRun The function that should return a boolean if the onRun of catalog entity should be triggered.\n * @returns A function to remove that hook\n */\n addOnBeforeRun(onBeforeRun) {\n _common_logger__WEBPACK_IMPORTED_MODULE_7__[\"default\"].debug(`[CATALOG-ENTITY-REGISTRY]: adding onBeforeRun hook`);\n this.onBeforeRunHooks.add(onBeforeRun);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"once\"])(() => void this.onBeforeRunHooks.delete(onBeforeRun));\n }\n /**\n * Runs all the registered `onBeforeRun` hooks, short circuiting on the first event that's preventDefaulted\n * @param entity The entity to run the hooks on\n * @returns Whether the entities `onRun` method should be executed\n */\n async onBeforeRun(entity) {\n _common_logger__WEBPACK_IMPORTED_MODULE_7__[\"default\"].debug(`[CATALOG-ENTITY-REGISTRY]: run onBeforeRun on ${entity.getId()}`);\n const runEvent = new _common_catalog_catalog_run_event__WEBPACK_IMPORTED_MODULE_9__[\"CatalogRunEvent\"]({ target: entity });\n for (const onBeforeRun of this.onBeforeRunHooks) {\n try {\n await onBeforeRun(runEvent);\n }\n catch (error) {\n _common_logger__WEBPACK_IMPORTED_MODULE_7__[\"default\"].warn(`[CATALOG-ENTITY-REGISTRY]: entity ${entity.getId()} onBeforeRun threw an error`, error);\n }\n if (runEvent.defaultPrevented) {\n return false;\n }\n }\n return true;\n }\n /**\n * Perform the onBeforeRun check and, if successful, then proceed to call `entity`'s onRun method\n * @param entity The instance to invoke the hooks and then execute the onRun\n */\n onRun(entity) {\n this.onBeforeRun(entity)\n .then(doOnRun => {\n var _a;\n if (doOnRun) {\n return (_a = entity.onRun) === null || _a === void 0 ? void 0 : _a.call(entity, _catalog_entity__WEBPACK_IMPORTED_MODULE_8__[\"catalogEntityRunContext\"]);\n }\n else {\n _common_logger__WEBPACK_IMPORTED_MODULE_7__[\"default\"].debug(`onBeforeRun for ${entity.getId()} returned false`);\n }\n })\n .catch(error => _common_logger__WEBPACK_IMPORTED_MODULE_7__[\"default\"].error(`[CATALOG-ENTITY-REGISTRY]: entity ${entity.getId()} onRun threw an error`, error));\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"],\n __metadata(\"design:type\", String)\n], CatalogEntityRegistry.prototype, \"activeEntityId\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Array]),\n __metadata(\"design:returntype\", void 0)\n], CatalogEntityRegistry.prototype, \"updateItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], CatalogEntityRegistry.prototype, \"updateItem\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CatalogEntityRegistry.prototype, \"items\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CatalogEntityRegistry.prototype, \"filteredItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Map),\n __metadata(\"design:paramtypes\", [])\n], CatalogEntityRegistry.prototype, \"entities\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Map),\n __metadata(\"design:paramtypes\", [])\n], CatalogEntityRegistry.prototype, \"filteredEntities\", null);\nconst catalogEntityRegistry = new CatalogEntityRegistry(_common_catalog__WEBPACK_IMPORTED_MODULE_2__[\"catalogCategoryRegistry\"]);\nfunction getActiveClusterEntity() {\n var _a;\n return _common_cluster_store__WEBPACK_IMPORTED_MODULE_4__[\"ClusterStore\"].getInstance().getById((_a = catalogEntityRegistry.activeEntity) === null || _a === void 0 ? void 0 : _a.getId());\n}\n\n\n//# sourceURL=webpack:///./src/renderer/api/catalog-entity-registry.ts?");
|
|
39755
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CatalogEntityRegistry\", function() { return CatalogEntityRegistry; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"catalogEntityRegistry\", function() { return catalogEntityRegistry; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getActiveClusterEntity\", function() { return getActiveClusterEntity; });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _common_ipc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/ipc */ \"./src/common/ipc/index.ts\");\n/* harmony import */ var _common_catalog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/catalog */ \"./src/common/catalog/index.ts\");\n/* harmony import */ var _common_catalog_entities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/catalog-entities */ \"./src/common/catalog-entities/index.ts\");\n/* harmony import */ var _common_cluster_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/cluster-store */ \"./src/common/cluster-store.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _common_logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../common/logger */ \"./src/common/logger.ts\");\n/* harmony import */ var _catalog_entity__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./catalog-entity */ \"./src/renderer/api/catalog-entity.ts\");\n/* harmony import */ var _common_catalog_catalog_run_event__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/catalog/catalog-run-event */ \"./src/common/catalog/catalog-run-event.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\nclass CatalogEntityRegistry {\n constructor(categoryRegistry) {\n Object.defineProperty(this, \"categoryRegistry\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: categoryRegistry\n });\n Object.defineProperty(this, \"activeEntityId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: undefined\n });\n Object.defineProperty(this, \"_entities\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].map([], { deep: true })\n });\n Object.defineProperty(this, \"filters\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].set([], {\n deep: false,\n })\n });\n Object.defineProperty(this, \"onBeforeRunHooks\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"].set([], {\n deep: false,\n })\n });\n /**\n * Buffer for keeping entities that don't yet have CatalogCategory synced\n */\n Object.defineProperty(this, \"rawEntities\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n Object(mobx__WEBPACK_IMPORTED_MODULE_0__[\"makeObservable\"])(this);\n }\n get activeEntity() {\n return this._entities.get(this.activeEntityId) || null;\n }\n set activeEntity(raw) {\n if (raw) {\n const id = typeof raw === \"string\"\n ? raw\n : raw.getId();\n this.activeEntityId = id;\n }\n else {\n this.activeEntityId = undefined;\n }\n }\n init() {\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_1__[\"ipcRendererOn\"])(\"catalog:items\", (event, items) => {\n this.updateItems(items);\n });\n }\n updateItems(items) {\n this.rawEntities.length = 0;\n const newIds = new Set(items.map((item) => item.metadata.uid));\n for (const uid of this._entities.keys()) {\n if (!newIds.has(uid)) {\n this._entities.delete(uid);\n }\n }\n for (const item of items) {\n this.updateItem(item);\n }\n }\n updateItem(item) {\n const existing = this._entities.get(item.metadata.uid);\n if (!existing) {\n const entity = this.categoryRegistry.getEntityForData(item);\n if (entity) {\n this._entities.set(entity.metadata.uid, entity);\n }\n else {\n this.rawEntities.push(item);\n }\n }\n else {\n existing.metadata = item.metadata;\n existing.spec = item.spec;\n existing.status = item.status;\n }\n }\n processRawEntities() {\n const items = [...this.rawEntities];\n this.rawEntities.length = 0;\n for (const item of items) {\n this.updateItem(item);\n }\n }\n get items() {\n this.processRawEntities();\n return Array.from(this._entities.values());\n }\n get filteredItems() {\n return Array.from(_utils__WEBPACK_IMPORTED_MODULE_5__[\"iter\"].reduce(this.filters, _utils__WEBPACK_IMPORTED_MODULE_5__[\"iter\"].filter, this.items.values()));\n }\n get entities() {\n return new Map(this.items.map(entity => [entity.getId(), entity]));\n }\n get filteredEntities() {\n return new Map(this.filteredItems.map(entity => [entity.getId(), entity]));\n }\n getById(id) {\n return this.entities.get(id);\n }\n getItemsForApiKind(apiVersion, kind, { filtered = false } = {}) {\n const byApiKind = (item) => item.apiVersion === apiVersion && item.kind === kind;\n const entities = filtered ? this.filteredItems : this.items;\n return entities.filter(byApiKind);\n }\n getItemsForCategory(category, { filtered = false } = {}) {\n const supportedVersions = new Set(category.spec.versions.map((v) => `${category.spec.group}/${v.name}`));\n const byApiVersionKind = (item) => supportedVersions.has(item.apiVersion) && item.kind === category.spec.names.kind;\n const entities = filtered ? this.filteredItems : this.items;\n return entities.filter(byApiVersionKind);\n }\n /**\n * Add a new filter to the set of item filters\n * @param fn The function that should return a truthy value if that entity should be sent currently \"active\"\n * @returns A function to remove that filter\n */\n addCatalogFilter(fn) {\n this.filters.add(fn);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"once\"])(() => void this.filters.delete(fn));\n }\n /**\n * Add a onBeforeRun hook. If `onBeforeRun` was previously added then it will not be added again\n * @param onBeforeRun The function that should return a boolean if the onRun of catalog entity should be triggered.\n * @returns A function to remove that hook\n */\n addOnBeforeRun(onBeforeRun) {\n _common_logger__WEBPACK_IMPORTED_MODULE_7__[\"default\"].debug(`[CATALOG-ENTITY-REGISTRY]: adding onBeforeRun hook`);\n this.onBeforeRunHooks.add(onBeforeRun);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"once\"])(() => void this.onBeforeRunHooks.delete(onBeforeRun));\n }\n /**\n * Runs all the registered `onBeforeRun` hooks, short circuiting on the first event that's preventDefaulted\n * @param entity The entity to run the hooks on\n * @returns Whether the entities `onRun` method should be executed\n */\n async onBeforeRun(entity) {\n _common_logger__WEBPACK_IMPORTED_MODULE_7__[\"default\"].debug(`[CATALOG-ENTITY-REGISTRY]: run onBeforeRun on ${entity.getId()}`);\n const runEvent = new _common_catalog_catalog_run_event__WEBPACK_IMPORTED_MODULE_9__[\"CatalogRunEvent\"]({ target: entity });\n for (const onBeforeRun of this.onBeforeRunHooks) {\n try {\n await onBeforeRun(runEvent);\n }\n catch (error) {\n _common_logger__WEBPACK_IMPORTED_MODULE_7__[\"default\"].warn(`[CATALOG-ENTITY-REGISTRY]: entity ${entity.getId()} onBeforeRun threw an error`, error);\n }\n if (runEvent.defaultPrevented) {\n return false;\n }\n }\n return true;\n }\n /**\n * Perform the onBeforeRun check and, if successful, then proceed to call `entity`'s onRun method\n * @param entity The instance to invoke the hooks and then execute the onRun\n */\n onRun(entity) {\n this.onBeforeRun(entity)\n .then(doOnRun => {\n var _a;\n if (doOnRun) {\n return (_a = entity.onRun) === null || _a === void 0 ? void 0 : _a.call(entity, _catalog_entity__WEBPACK_IMPORTED_MODULE_8__[\"catalogEntityRunContext\"]);\n }\n else {\n _common_logger__WEBPACK_IMPORTED_MODULE_7__[\"default\"].debug(`onBeforeRun for ${entity.getId()} returned false`);\n }\n })\n .catch(error => _common_logger__WEBPACK_IMPORTED_MODULE_7__[\"default\"].error(`[CATALOG-ENTITY-REGISTRY]: entity ${entity.getId()} onRun threw an error`, error));\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"observable\"],\n __metadata(\"design:type\", String)\n], CatalogEntityRegistry.prototype, \"activeEntityId\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Array]),\n __metadata(\"design:returntype\", void 0)\n], CatalogEntityRegistry.prototype, \"updateItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"action\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], CatalogEntityRegistry.prototype, \"updateItem\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CatalogEntityRegistry.prototype, \"items\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CatalogEntityRegistry.prototype, \"filteredItems\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Map),\n __metadata(\"design:paramtypes\", [])\n], CatalogEntityRegistry.prototype, \"entities\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_0__[\"computed\"],\n __metadata(\"design:type\", Map),\n __metadata(\"design:paramtypes\", [])\n], CatalogEntityRegistry.prototype, \"filteredEntities\", null);\nconst catalogEntityRegistry = new CatalogEntityRegistry(_common_catalog__WEBPACK_IMPORTED_MODULE_2__[\"catalogCategoryRegistry\"]);\nfunction getActiveClusterEntity() {\n var _a;\n return _common_cluster_store__WEBPACK_IMPORTED_MODULE_4__[\"ClusterStore\"].getInstance().getById((_a = catalogEntityRegistry.activeEntity) === null || _a === void 0 ? void 0 : _a.getId());\n}\n\n\n//# sourceURL=webpack:///./src/renderer/api/catalog-entity-registry.ts?");
|
|
39732
39756
|
|
|
39733
39757
|
/***/ }),
|
|
39734
39758
|
|
|
@@ -39884,7 +39908,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
39884
39908
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
39885
39909
|
|
|
39886
39910
|
"use strict";
|
|
39887
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CrdResources\", function() { return CrdResources; });\n/* harmony import */ var _crd_resources_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./crd-resources.scss */ \"./src/renderer/components/+custom-resources/crd-resources.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var jsonpath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! jsonpath */ \"./node_modules/jsonpath/jsonpath.js\");\n/* harmony import */ var jsonpath__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jsonpath__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _kube_object_list_layout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../kube-object-list-layout */ \"./src/renderer/components/kube-object-list-layout/index.ts\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _crd_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./crd.store */ \"./src/renderer/components/+custom-resources/crd.store.ts\");\n/* harmony import */ var _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/k8s-api/api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/* harmony import */ var _utils_jsonPath__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/jsonPath */ \"./src/renderer/utils/jsonPath.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\n\n\nvar columnId;\n(function (columnId) {\n columnId[\"name\"] = \"name\";\n columnId[\"namespace\"] = \"namespace\";\n columnId[\"age\"] = \"age\";\n})(columnId || (columnId = {}));\nlet CrdResources = class CrdResources extends react__WEBPACK_IMPORTED_MODULE_1___default.a.Component {\n constructor(props) {\n super(props);\n Object(mobx__WEBPACK_IMPORTED_MODULE_5__[\"makeObservable\"])(this);\n }\n get crd() {\n const { group, name } = this.props.match.params;\n return _crd_store__WEBPACK_IMPORTED_MODULE_6__[\"crdStore\"].getByGroup(group, name);\n }\n get store() {\n if (!this.crd)\n return null;\n return _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_7__[\"apiManager\"].getStore(this.crd.getResourceApiBase());\n }\n render() {\n const { crd, store } = this;\n if (!crd)\n return null;\n const isNamespaced = crd.isNamespaced();\n const extraColumns = crd.getPrinterColumns(false); // Cols with priority bigger than 0 are shown in details\n const sortingCallbacks = {\n [columnId.name]: item => item.getName(),\n [columnId.namespace]: item => item.getNs(),\n [columnId.age]: item => item.getTimeDiffFromNow(),\n };\n extraColumns.forEach(column => {\n sortingCallbacks[column.name] = item => jsonpath__WEBPACK_IMPORTED_MODULE_2___default.a.value(item, Object(_utils_jsonPath__WEBPACK_IMPORTED_MODULE_8__[\"parseJsonPath\"])(column.jsonPath.slice(1)));\n });\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_kube_object_list_layout__WEBPACK_IMPORTED_MODULE_4__[\"KubeObjectListLayout\"], { isConfigurable: true, key: `crd_resources_${crd.getResourceApiBase()}`, tableId: \"crd_resources\", className: \"CrdResources\", store: store, sortingCallbacks: sortingCallbacks, searchFilters: [\n item => item.getSearchFields(),\n ], renderHeaderTitle: crd.
|
|
39911
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CrdResources\", function() { return CrdResources; });\n/* harmony import */ var _crd_resources_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./crd-resources.scss */ \"./src/renderer/components/+custom-resources/crd-resources.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var jsonpath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! jsonpath */ \"./node_modules/jsonpath/jsonpath.js\");\n/* harmony import */ var jsonpath__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jsonpath__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _kube_object_list_layout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../kube-object-list-layout */ \"./src/renderer/components/kube-object-list-layout/index.ts\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _crd_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./crd.store */ \"./src/renderer/components/+custom-resources/crd.store.ts\");\n/* harmony import */ var _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/k8s-api/api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/* harmony import */ var _utils_jsonPath__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/jsonPath */ \"./src/renderer/utils/jsonPath.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\n\n\nvar columnId;\n(function (columnId) {\n columnId[\"name\"] = \"name\";\n columnId[\"namespace\"] = \"namespace\";\n columnId[\"age\"] = \"age\";\n})(columnId || (columnId = {}));\nlet CrdResources = class CrdResources extends react__WEBPACK_IMPORTED_MODULE_1___default.a.Component {\n constructor(props) {\n super(props);\n Object(mobx__WEBPACK_IMPORTED_MODULE_5__[\"makeObservable\"])(this);\n }\n get crd() {\n const { group, name } = this.props.match.params;\n return _crd_store__WEBPACK_IMPORTED_MODULE_6__[\"crdStore\"].getByGroup(group, name);\n }\n get store() {\n if (!this.crd)\n return null;\n return _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_7__[\"apiManager\"].getStore(this.crd.getResourceApiBase());\n }\n render() {\n const { crd, store } = this;\n if (!crd)\n return null;\n const isNamespaced = crd.isNamespaced();\n const extraColumns = crd.getPrinterColumns(false); // Cols with priority bigger than 0 are shown in details\n const sortingCallbacks = {\n [columnId.name]: item => item.getName(),\n [columnId.namespace]: item => item.getNs(),\n [columnId.age]: item => item.getTimeDiffFromNow(),\n };\n extraColumns.forEach(column => {\n sortingCallbacks[column.name] = item => jsonpath__WEBPACK_IMPORTED_MODULE_2___default.a.value(item, Object(_utils_jsonPath__WEBPACK_IMPORTED_MODULE_8__[\"parseJsonPath\"])(column.jsonPath.slice(1)));\n });\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_kube_object_list_layout__WEBPACK_IMPORTED_MODULE_4__[\"KubeObjectListLayout\"], { isConfigurable: true, key: `crd_resources_${crd.getResourceApiBase()}`, tableId: \"crd_resources\", className: \"CrdResources\", store: store, sortingCallbacks: sortingCallbacks, searchFilters: [\n item => item.getSearchFields(),\n ], renderHeaderTitle: crd.getResourceKind(), customizeHeader: (_a) => {\n var { searchProps } = _a, headerPlaceholders = __rest(_a, [\"searchProps\"]);\n return (Object.assign({ searchProps: Object.assign(Object.assign({}, searchProps), { placeholder: `${crd.getResourceKind()} search ...` }) }, headerPlaceholders));\n }, renderTableHeader: [\n { title: \"Name\", className: \"name\", sortBy: columnId.name, id: columnId.name },\n isNamespaced && { title: \"Namespace\", className: \"namespace\", sortBy: columnId.namespace, id: columnId.namespace },\n ...extraColumns.map(column => {\n const { name } = column;\n return {\n title: name,\n className: name.toLowerCase(),\n sortBy: name,\n id: name\n };\n }),\n { title: \"Age\", className: \"age\", sortBy: columnId.age, id: columnId.age },\n ], renderTableContents: crdInstance => [\n crdInstance.getName(),\n isNamespaced && crdInstance.getNs(),\n ...extraColumns.map((column) => {\n let value = jsonpath__WEBPACK_IMPORTED_MODULE_2___default.a.value(crdInstance, Object(_utils_jsonPath__WEBPACK_IMPORTED_MODULE_8__[\"parseJsonPath\"])(column.jsonPath.slice(1)));\n if (Array.isArray(value) || typeof value === \"object\") {\n value = JSON.stringify(value);\n }\n return {\n renderBoolean: true,\n children: value,\n };\n }),\n crdInstance.getAge(),\n ] }));\n }\n};\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_5__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CrdResources.prototype, \"crd\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_5__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CrdResources.prototype, \"store\", null);\nCrdResources = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_3__[\"observer\"],\n __metadata(\"design:paramtypes\", [Object])\n], CrdResources);\n\n\n\n//# sourceURL=webpack:///./src/renderer/components/+custom-resources/crd-resources.tsx?");
|
|
39888
39912
|
|
|
39889
39913
|
/***/ }),
|
|
39890
39914
|
|
|
@@ -40028,7 +40052,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
40028
40052
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
40029
40053
|
|
|
40030
40054
|
"use strict";
|
|
40031
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PodDetailsList\", function() { return PodDetailsList; });\n/* harmony import */ var _pod_details_list_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pod-details-list.scss */ \"./src/renderer/components/+workloads-pods/pod-details-list.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash_kebabCase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/kebabCase */ \"./node_modules/lodash/kebabCase.js\");\n/* harmony import */ var lodash_kebabCase__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_kebabCase__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _pods_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./pods.store */ \"./src/renderer/components/+workloads-pods/pods.store.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _line_progress__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../line-progress */ \"./src/renderer/components/line-progress/index.ts\");\n/* harmony import */ var _table__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../table */ \"./src/renderer/components/table/index.ts\");\n/* harmony import */ var _spinner__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../spinner */ \"./src/renderer/components/spinner/index.ts\");\n/* harmony import */ var _drawer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../drawer */ \"./src/renderer/components/drawer/index.ts\");\n/* harmony import */ var _kube_object_status_icon__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../kube-object-status-icon */ \"./src/renderer/components/kube-object-status-icon/index.ts\");\n/* harmony import */ var _kube_detail_params__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../kube-detail-params */ \"./src/renderer/components/kube-detail-params/index.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar sortBy;\n(function (sortBy) {\n sortBy[\"name\"] = \"name\";\n sortBy[\"namespace\"] = \"namespace\";\n sortBy[\"cpu\"] = \"cpu\";\n sortBy[\"memory\"] = \"memory\";\n})(sortBy || (sortBy = {}));\nlet PodDetailsList = class PodDetailsList extends react__WEBPACK_IMPORTED_MODULE_1___default.a.Component {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"metricsWatcher\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"interval\"])(120, () => {\n _pods_store__WEBPACK_IMPORTED_MODULE_5__[\"podsStore\"].loadKubeMetrics(this.props.owner.getNs());\n })\n });\n Object.defineProperty(this, \"sortingCallbacks\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n [sortBy.name]: (pod) => pod.getName(),\n [sortBy.namespace]: (pod) => pod.getNs(),\n [sortBy.cpu]: (pod) => _pods_store__WEBPACK_IMPORTED_MODULE_5__[\"podsStore\"].getPodKubeMetrics(pod).cpu,\n [sortBy.memory]: (pod) => _pods_store__WEBPACK_IMPORTED_MODULE_5__[\"podsStore\"].getPodKubeMetrics(pod).memory,\n }\n });\n }\n componentDidMount() {\n this.metricsWatcher.start(true);\n Object(mobx_react__WEBPACK_IMPORTED_MODULE_4__[\"disposeOnUnmount\"])(this, [\n Object(mobx__WEBPACK_IMPORTED_MODULE_3__[\"reaction\"])(() => this.props.owner, () => this.metricsWatcher.restart(true))\n ]);\n }\n componentWillUnmount() {\n this.metricsWatcher.stop();\n }\n renderCpuUsage(id, usage) {\n const { maxCpu } = this.props;\n const value = usage.toFixed(3);\n const tooltip = (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"p\", null,\n \"CPU: \",\n Math.ceil(usage * 100) / maxCpu,\n \"%\",\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"br\", null),\n usage.toFixed(3)));\n if (!maxCpu) {\n if (parseFloat(value) === 0)\n return 0;\n return value;\n }\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_line_progress__WEBPACK_IMPORTED_MODULE_7__[\"LineProgress\"], { max: maxCpu, value: usage, tooltip: parseFloat(value) !== 0 ? tooltip : null }));\n }\n renderMemoryUsage(id, usage) {\n const { maxMemory } = this.props;\n const tooltip = (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"p\", null,\n \"Memory: \",\n Math.ceil(usage * 100 / maxMemory),\n \"%\",\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"br\", null),\n Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"bytesToUnits\"])(usage, 3)));\n if (!maxMemory)\n return usage ? Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"bytesToUnits\"])(usage) : 0;\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_line_progress__WEBPACK_IMPORTED_MODULE_7__[\"LineProgress\"], { max: maxMemory, value: usage, tooltip: usage != 0 ? tooltip : null }));\n }\n getTableRow(uid) {\n const { pods } = this.props;\n const pod = pods.find(pod => pod.getId() == uid);\n const metrics = _pods_store__WEBPACK_IMPORTED_MODULE_5__[\"podsStore\"].getPodKubeMetrics(pod);\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableRow\"], { key: pod.getId(), sortItem: pod, nowrap: true, onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"prevDefault\"])(() => Object(_kube_detail_params__WEBPACK_IMPORTED_MODULE_12__[\"showDetails\"])(pod.selfLink, false)) },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"name\" }, pod.getName()),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"warning\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_kube_object_status_icon__WEBPACK_IMPORTED_MODULE_11__[\"KubeObjectStatusIcon\"], { key: \"icon\", object: pod })),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"namespace\" }, pod.getNs()),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"ready\" },\n pod.getRunningContainers().length,\n \"/\",\n pod.getContainers().length),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"cpu\" }, this.renderCpuUsage(`cpu-${pod.getId()}`, metrics.cpu)),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"memory\" }, this.renderMemoryUsage(`memory-${pod.getId()}`, metrics.memory)),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"cssNames\"])(\"status\", lodash_kebabCase__WEBPACK_IMPORTED_MODULE_2___default()(pod.getStatusMessage())) }, pod.getStatusMessage())));\n }\n render() {\n const { pods, showTitle } = this.props;\n const virtual = pods.length > 100;\n if (!pods.length && !_pods_store__WEBPACK_IMPORTED_MODULE_5__[\"podsStore\"].isLoaded)\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"PodDetailsList flex justify-center\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_spinner__WEBPACK_IMPORTED_MODULE_9__[\"Spinner\"], null)));\n if (!pods.length)\n return null;\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"PodDetailsList flex column\" },\n showTitle && react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_drawer__WEBPACK_IMPORTED_MODULE_10__[\"DrawerTitle\"], { title: \"Pods\" }),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"Table\"], { tableId: \"workloads_pod_details_list\", items: pods, selectable: true, virtual: virtual, scrollable: false, sortable: this.sortingCallbacks, sortByDefault: { sortBy: sortBy.cpu, orderBy: \"desc\" }, sortSyncWithUrl: false, getTableRow: this.getTableRow, className: \"box grow\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableHead\"], null,\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"name\", sortBy: sortBy.name }, \"Name\"),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"warning\" }),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"namespace\", sortBy: sortBy.namespace }, \"Namespace\"),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"ready\" }, \"Ready\"),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"cpu\", sortBy: sortBy.cpu }, \"CPU\"),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"memory\", sortBy: sortBy.memory }, \"Memory\"),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"status\" }, \"Status\")),\n !virtual && pods.map(pod => this.getTableRow(pod.getId())))));\n }\n};\nObject.defineProperty(PodDetailsList, \"defaultProps\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n showTitle: true\n }\n});\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_6__[\"boundMethod\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", void 0)\n], PodDetailsList.prototype, \"getTableRow\", null);\nPodDetailsList = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_4__[\"observer\"]\n], PodDetailsList);\n\n\n\n//# sourceURL=webpack:///./src/renderer/components/+workloads-pods/pod-details-list.tsx?");
|
|
40055
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PodDetailsList\", function() { return PodDetailsList; });\n/* harmony import */ var _pod_details_list_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pod-details-list.scss */ \"./src/renderer/components/+workloads-pods/pod-details-list.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash_kebabCase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/kebabCase */ \"./node_modules/lodash/kebabCase.js\");\n/* harmony import */ var lodash_kebabCase__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_kebabCase__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _pods_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./pods.store */ \"./src/renderer/components/+workloads-pods/pods.store.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _line_progress__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../line-progress */ \"./src/renderer/components/line-progress/index.ts\");\n/* harmony import */ var _table__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../table */ \"./src/renderer/components/table/index.ts\");\n/* harmony import */ var _spinner__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../spinner */ \"./src/renderer/components/spinner/index.ts\");\n/* harmony import */ var _drawer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../drawer */ \"./src/renderer/components/drawer/index.ts\");\n/* harmony import */ var _kube_object_status_icon__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../kube-object-status-icon */ \"./src/renderer/components/kube-object-status-icon/index.ts\");\n/* harmony import */ var _kube_detail_params__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../kube-detail-params */ \"./src/renderer/components/kube-detail-params/index.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar sortBy;\n(function (sortBy) {\n sortBy[\"name\"] = \"name\";\n sortBy[\"namespace\"] = \"namespace\";\n sortBy[\"cpu\"] = \"cpu\";\n sortBy[\"memory\"] = \"memory\";\n})(sortBy || (sortBy = {}));\nlet PodDetailsList = class PodDetailsList extends react__WEBPACK_IMPORTED_MODULE_1___default.a.Component {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"metricsWatcher\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"interval\"])(120, () => {\n _pods_store__WEBPACK_IMPORTED_MODULE_5__[\"podsStore\"].loadKubeMetrics(this.props.owner.getNs());\n })\n });\n }\n componentDidMount() {\n this.metricsWatcher.start(true);\n Object(mobx_react__WEBPACK_IMPORTED_MODULE_4__[\"disposeOnUnmount\"])(this, [\n Object(mobx__WEBPACK_IMPORTED_MODULE_3__[\"reaction\"])(() => this.props.owner, () => this.metricsWatcher.restart(true))\n ]);\n }\n componentWillUnmount() {\n this.metricsWatcher.stop();\n }\n renderCpuUsage(id, usage) {\n const { maxCpu } = this.props;\n const value = usage.toFixed(3);\n const tooltip = (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"p\", null,\n \"CPU: \",\n Math.ceil(usage * 100) / maxCpu,\n \"%\",\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"br\", null),\n usage.toFixed(3)));\n if (!maxCpu) {\n if (parseFloat(value) === 0)\n return 0;\n return value;\n }\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_line_progress__WEBPACK_IMPORTED_MODULE_7__[\"LineProgress\"], { max: maxCpu, value: usage, tooltip: parseFloat(value) !== 0 ? tooltip : null }));\n }\n renderMemoryUsage(id, usage) {\n const { maxMemory } = this.props;\n const tooltip = (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"p\", null,\n \"Memory: \",\n Math.ceil(usage * 100 / maxMemory),\n \"%\",\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"br\", null),\n Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"bytesToUnits\"])(usage, 3)));\n if (!maxMemory)\n return usage ? Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"bytesToUnits\"])(usage) : 0;\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_line_progress__WEBPACK_IMPORTED_MODULE_7__[\"LineProgress\"], { max: maxMemory, value: usage, tooltip: usage != 0 ? tooltip : null }));\n }\n getTableRow(uid) {\n const { pods } = this.props;\n const pod = pods.find(pod => pod.getId() == uid);\n const metrics = _pods_store__WEBPACK_IMPORTED_MODULE_5__[\"podsStore\"].getPodKubeMetrics(pod);\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableRow\"], { key: pod.getId(), sortItem: pod, nowrap: true, onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"prevDefault\"])(() => Object(_kube_detail_params__WEBPACK_IMPORTED_MODULE_12__[\"showDetails\"])(pod.selfLink, false)) },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"name\" }, pod.getName()),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"warning\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_kube_object_status_icon__WEBPACK_IMPORTED_MODULE_11__[\"KubeObjectStatusIcon\"], { key: \"icon\", object: pod })),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"namespace\" }, pod.getNs()),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"ready\" },\n pod.getRunningContainers().length,\n \"/\",\n pod.getContainers().length),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"cpu\" }, this.renderCpuUsage(`cpu-${pod.getId()}`, metrics.cpu)),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"memory\" }, this.renderMemoryUsage(`memory-${pod.getId()}`, metrics.memory)),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"cssNames\"])(\"status\", lodash_kebabCase__WEBPACK_IMPORTED_MODULE_2___default()(pod.getStatusMessage())) }, pod.getStatusMessage())));\n }\n render() {\n const { pods } = this.props;\n if (!_pods_store__WEBPACK_IMPORTED_MODULE_5__[\"podsStore\"].isLoaded) {\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"PodDetailsList flex justify-center\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_spinner__WEBPACK_IMPORTED_MODULE_9__[\"Spinner\"], null)));\n }\n if (!pods.length) {\n return null;\n }\n const virtual = pods.length > 20;\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: \"PodDetailsList flex column\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_drawer__WEBPACK_IMPORTED_MODULE_10__[\"DrawerTitle\"], { title: \"Pods\" }),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"Table\"], { tableId: \"workloads_pod_details_list\", items: pods, selectable: true, scrollable: false, virtual: virtual, \n // 660 is the exact hight required for 20 items with the default paddings\n virtualHeight: 660, sortable: {\n [sortBy.name]: pod => pod.getName(),\n [sortBy.namespace]: pod => pod.getNs(),\n [sortBy.cpu]: pod => _pods_store__WEBPACK_IMPORTED_MODULE_5__[\"podsStore\"].getPodKubeMetrics(pod).cpu,\n [sortBy.memory]: pod => _pods_store__WEBPACK_IMPORTED_MODULE_5__[\"podsStore\"].getPodKubeMetrics(pod).memory,\n }, sortByDefault: { sortBy: sortBy.cpu, orderBy: \"desc\" }, sortSyncWithUrl: false, getTableRow: this.getTableRow, renderRow: !virtual && (pod => this.getTableRow(pod.getId())), className: \"box grow\" },\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableHead\"], null,\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"name\", sortBy: sortBy.name }, \"Name\"),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"warning\" }),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"namespace\", sortBy: sortBy.namespace }, \"Namespace\"),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"ready\" }, \"Ready\"),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"cpu\", sortBy: sortBy.cpu }, \"CPU\"),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"memory\", sortBy: sortBy.memory }, \"Memory\"),\n react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_table__WEBPACK_IMPORTED_MODULE_8__[\"TableCell\"], { className: \"status\" }, \"Status\")))));\n }\n};\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_6__[\"boundMethod\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", void 0)\n], PodDetailsList.prototype, \"getTableRow\", null);\nPodDetailsList = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_4__[\"observer\"]\n], PodDetailsList);\n\n\n\n//# sourceURL=webpack:///./src/renderer/components/+workloads-pods/pod-details-list.tsx?");
|
|
40032
40056
|
|
|
40033
40057
|
/***/ }),
|
|
40034
40058
|
|
|
@@ -40699,7 +40723,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
|
|
|
40699
40723
|
/*! no static exports found */
|
|
40700
40724
|
/***/ (function(module, exports, __webpack_require__) {
|
|
40701
40725
|
|
|
40702
|
-
eval("var map = {\n\t\"./configuration.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/configuration.svg\",\n\t\"./crane.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/crane.svg\",\n\t\"./group.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/group.svg\",\n\t\"./install.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/install.svg\",\n\t\"./kube.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/kube.svg\",\n\t\"./lens-logo.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/lens-logo.svg\",\n\t\"./license.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/license.svg\",\n\t\"./logo-lens.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/logo-lens.svg\",\n\t\"./logout.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/logout.svg\",\n\t\"./nodes.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/nodes.svg\",\n\t\"./push-pin.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/push-pin.svg\",\n\t\"./spinner.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/spinner.svg\",\n\t\"./ssh.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/ssh.svg\",\n\t\"./storage.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/storage.svg\",\n\t\"./terminal.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/terminal.svg\",\n\t\"./user.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/user.svg\",\n\t\"./users.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/users.svg\",\n\t\"./wheel.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/wheel.svg\",\n\t\"./workloads.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/workloads.svg\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./src/renderer/components/icon sync recursive ./!./!./node_modules/raw-loader/dist/cjs.js!./ ^\\\\.\\\\/.*\\\\.svg$\";\n\n//# sourceURL=webpack:///./node_modules/raw-loader/dist/cjs.js_^\\.\\/.*\\.svg$?./src/renderer/components/icon_sync_");
|
|
40726
|
+
eval("var map = {\n\t\"./configuration.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/configuration.svg\",\n\t\"./crane.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/crane.svg\",\n\t\"./group.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/group.svg\",\n\t\"./install.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/install.svg\",\n\t\"./kube.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/kube.svg\",\n\t\"./lens-logo.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/lens-logo.svg\",\n\t\"./license.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/license.svg\",\n\t\"./logo-lens.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/logo-lens.svg\",\n\t\"./logout.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/logout.svg\",\n\t\"./nodes.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/nodes.svg\",\n\t\"./push-pin.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/push-pin.svg\",\n\t\"./push_off.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/push_off.svg\",\n\t\"./spinner.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/spinner.svg\",\n\t\"./ssh.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/ssh.svg\",\n\t\"./storage.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/storage.svg\",\n\t\"./terminal.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/terminal.svg\",\n\t\"./user.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/user.svg\",\n\t\"./users.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/users.svg\",\n\t\"./wheel.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/wheel.svg\",\n\t\"./workloads.svg\": \"./node_modules/raw-loader/dist/cjs.js!./src/renderer/components/icon/workloads.svg\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./src/renderer/components/icon sync recursive ./!./!./node_modules/raw-loader/dist/cjs.js!./ ^\\\\.\\\\/.*\\\\.svg$\";\n\n//# sourceURL=webpack:///./node_modules/raw-loader/dist/cjs.js_^\\.\\/.*\\.svg$?./src/renderer/components/icon_sync_");
|
|
40703
40727
|
|
|
40704
40728
|
/***/ }),
|
|
40705
40729
|
|
|
@@ -41771,6 +41795,18 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _tab
|
|
|
41771
41795
|
|
|
41772
41796
|
/***/ }),
|
|
41773
41797
|
|
|
41798
|
+
/***/ "./src/renderer/components/table/sorting.ts":
|
|
41799
|
+
/*!**************************************************!*\
|
|
41800
|
+
!*** ./src/renderer/components/table/sorting.ts ***!
|
|
41801
|
+
\**************************************************/
|
|
41802
|
+
/*! exports provided: getSorted */
|
|
41803
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
41804
|
+
|
|
41805
|
+
"use strict";
|
|
41806
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getSorted\", function() { return getSorted; });\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\nfunction getSorted(rawItems, sortingCallback, orderByRaw) {\n if (typeof sortingCallback !== \"function\") {\n return rawItems;\n }\n const orderBy = orderByRaw === \"asc\" || orderByRaw === \"desc\" ? orderByRaw : \"asc\";\n const sortData = rawItems.map((item, index) => ({\n index,\n sortBy: sortingCallback(item),\n }));\n sortData.sort((left, right) => {\n if (!Array.isArray(left.sortBy) && !Array.isArray(right.sortBy)) {\n return Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"rectifyOrdering\"])(Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"sortCompare\"])(left.sortBy, right.sortBy), orderBy);\n }\n const leftSortBy = [left.sortBy].flat();\n const rightSortBy = [right.sortBy].flat();\n const zipIter = _utils__WEBPACK_IMPORTED_MODULE_0__[\"array\"].zipStrict(leftSortBy, rightSortBy);\n let r = zipIter.next();\n for (; r.done === false; r = zipIter.next()) {\n const [nextL, nextR] = r.value;\n const sortOrder = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"rectifyOrdering\"])(Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"sortCompare\"])(nextL, nextR), orderBy);\n if (sortOrder !== _utils__WEBPACK_IMPORTED_MODULE_0__[\"Ordering\"].EQUAL) {\n return sortOrder;\n }\n }\n const [leftRest, rightRest] = r.value;\n return leftRest.length - rightRest.length;\n });\n const res = [];\n for (const { index } of sortData) {\n res.push(rawItems[index]);\n }\n return res;\n}\n\n\n//# sourceURL=webpack:///./src/renderer/components/table/sorting.ts?");
|
|
41807
|
+
|
|
41808
|
+
/***/ }),
|
|
41809
|
+
|
|
41774
41810
|
/***/ "./src/renderer/components/table/table-cell.scss":
|
|
41775
41811
|
/*!*******************************************************!*\
|
|
41776
41812
|
!*** ./src/renderer/components/table/table-cell.scss ***!
|
|
@@ -41875,7 +41911,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
41875
41911
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
41876
41912
|
|
|
41877
41913
|
"use strict";
|
|
41878
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sortByUrlParam\", function() { return sortByUrlParam; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"orderByUrlParam\", function() { return orderByUrlParam; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Table\", function() { return Table; });\n/* harmony import */ var _table_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./table.scss */ \"./src/renderer/components/table/table.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _table_row__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./table-row */ \"./src/renderer/components/table/table-row.tsx\");\n/* harmony import */ var _table_head__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./table-head */ \"./src/renderer/components/table/table-head.tsx\");\n/* harmony import */ var _virtual_list__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../virtual-list */ \"./src/renderer/components/virtual-list/index.ts\");\n/* harmony import */ var _navigation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../navigation */ \"./src/renderer/navigation/index.ts\");\n/* harmony import */ var _table_storage__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./table.storage */ \"./src/renderer/components/table/table.storage.ts\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\n\nconst sortByUrlParam = Object(_navigation__WEBPACK_IMPORTED_MODULE_8__[\"createPageParam\"])({\n name: \"sort\",\n});\nconst orderByUrlParam = Object(_navigation__WEBPACK_IMPORTED_MODULE_8__[\"createPageParam\"])({\n name: \"order\",\n});\nlet Table = class Table extends react__WEBPACK_IMPORTED_MODULE_1___default.a.Component {\n constructor(props) {\n super(props);\n Object(mobx__WEBPACK_IMPORTED_MODULE_10__[\"makeObservable\"])(this);\n }\n componentDidMount() {\n const { sortable, tableId } = this.props;\n if (sortable && !tableId) {\n console.error(\"[Table]: sorted table requires props.tableId to be specified\");\n }\n }\n get sortParams() {\n return Object.assign({}, this.props.sortByDefault, Object(_table_storage__WEBPACK_IMPORTED_MODULE_9__[\"getSortParams\"])(this.props.tableId));\n }\n renderHead() {\n const { sortable, children } = this.props;\n const content = react__WEBPACK_IMPORTED_MODULE_1___default.a.Children.toArray(children);\n const headElem = content.find(elem => elem.type === _table_head__WEBPACK_IMPORTED_MODULE_6__[\"TableHead\"]);\n if (!headElem) {\n return null;\n }\n if (sortable) {\n const columns = react__WEBPACK_IMPORTED_MODULE_1___default.a.Children.toArray(headElem.props.children);\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(headElem, {\n children: columns.map(elem => {\n if (elem.props.checkbox) {\n return elem;\n }\n const title = elem.props.title || (\n // copy cell content to title if it's a string\n // usable if part of TableCell's content is hidden when there is not enough space\n typeof elem.props.children === \"string\" ? elem.props.children : undefined);\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(elem, {\n title,\n _sort: this.sort,\n _sorting: this.sortParams,\n _nowrap: headElem.props.nowrap,\n });\n })\n });\n }\n return headElem;\n }\n getSorted(items) {\n const { sortBy, orderBy: order } = this.sortParams;\n const sortingCallback = this.props.sortable[sortBy] || _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"];\n return Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"orderBy\"])(items, sortingCallback, order);\n }\n onSort({ sortBy, orderBy }) {\n Object(_table_storage__WEBPACK_IMPORTED_MODULE_9__[\"setSortParams\"])(this.props.tableId, { sortBy, orderBy });\n const { sortSyncWithUrl, onSort } = this.props;\n if (sortSyncWithUrl) {\n sortByUrlParam.set(sortBy);\n orderByUrlParam.set(orderBy);\n }\n if (onSort) {\n onSort({ sortBy, orderBy });\n }\n }\n sort(colName) {\n const { sortBy, orderBy } = this.sortParams;\n const sameColumn = sortBy == colName;\n const newSortBy = colName;\n const newOrderBy = (!orderBy || !sameColumn || orderBy === \"desc\") ? \"asc\" : \"desc\";\n this.onSort({\n sortBy: String(newSortBy),\n orderBy: newOrderBy,\n });\n }\n getContent() {\n const { items, renderRow, children } = this.props;\n const content = react__WEBPACK_IMPORTED_MODULE_1___default.a.Children.toArray(children);\n if (renderRow) {\n content.push(...items.map(renderRow));\n }\n return content;\n }\n renderRows() {\n const { sortable, noItems, virtual, customRowHeights, rowLineHeight, rowPadding, items, getTableRow, selectedItemId, className } = this.props;\n const content = this.getContent();\n let rows = content.filter(elem => elem.type === _table_row__WEBPACK_IMPORTED_MODULE_5__[\"TableRow\"]);\n let sortedItems = rows.length ? rows.map(row => row.props.sortItem) : [...items];\n if (sortable) {\n sortedItems = this.getSorted(sortedItems);\n if (rows.length) {\n rows = sortedItems.map(item => rows.find(row => {\n return item == row.props.sortItem;\n }));\n }\n }\n if (!rows.length && !items.length && noItems) {\n return noItems;\n }\n if (virtual) {\n const lineHeight = parseFloat(rowLineHeight);\n const padding = parseFloat(rowPadding);\n let rowHeights = Array(items.length).fill(lineHeight + padding * 2);\n if (customRowHeights) {\n rowHeights = sortedItems.map(item => {\n return customRowHeights(item, lineHeight, padding * 2);\n });\n }\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_virtual_list__WEBPACK_IMPORTED_MODULE_7__[\"VirtualList\"], { items: sortedItems, rowHeights: rowHeights, getRow: getTableRow, selectedItemId: selectedItemId, className: className }));\n }\n return rows;\n }\n render() {\n const { selectable, scrollable, sortable, autoSize, virtual } = this.props;\n let { className } = this.props;\n className = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"cssNames\"])(\"Table flex column\", className, {\n selectable, scrollable, sortable, autoSize, virtual,\n });\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: className },\n this.renderHead(),\n this.renderRows()));\n }\n};\nObject.defineProperty(Table, \"defaultProps\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n scrollable: true,\n autoSize: true,\n rowPadding: \"8px\",\n rowLineHeight: \"17px\",\n sortSyncWithUrl: true,\n }\n});\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Table.prototype, \"sortParams\", null);\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_4__[\"boundMethod\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], Table.prototype, \"onSort\", null);\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_4__[\"boundMethod\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", void 0)\n], Table.prototype, \"sort\", null);\nTable = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_3__[\"observer\"],\n __metadata(\"design:paramtypes\", [Object])\n], Table);\n\n\n\n//# sourceURL=webpack:///./src/renderer/components/table/table.tsx?");
|
|
41914
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sortByUrlParam\", function() { return sortByUrlParam; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"orderByUrlParam\", function() { return orderByUrlParam; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Table\", function() { return Table; });\n/* harmony import */ var _table_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./table.scss */ \"./src/renderer/components/table/table.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _table_row__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./table-row */ \"./src/renderer/components/table/table-row.tsx\");\n/* harmony import */ var _table_head__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./table-head */ \"./src/renderer/components/table/table-head.tsx\");\n/* harmony import */ var _virtual_list__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../virtual-list */ \"./src/renderer/components/virtual-list/index.ts\");\n/* harmony import */ var _navigation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../navigation */ \"./src/renderer/navigation/index.ts\");\n/* harmony import */ var _table_storage__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./table.storage */ \"./src/renderer/components/table/table.storage.ts\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _sorting__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./sorting */ \"./src/renderer/components/table/sorting.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\n\nconst sortByUrlParam = Object(_navigation__WEBPACK_IMPORTED_MODULE_7__[\"createPageParam\"])({\n name: \"sort\",\n});\nconst orderByUrlParam = Object(_navigation__WEBPACK_IMPORTED_MODULE_7__[\"createPageParam\"])({\n name: \"order\",\n});\nlet Table = class Table extends react__WEBPACK_IMPORTED_MODULE_1___default.a.Component {\n constructor(props) {\n super(props);\n Object(mobx__WEBPACK_IMPORTED_MODULE_9__[\"makeObservable\"])(this);\n }\n componentDidMount() {\n const { sortable, tableId } = this.props;\n if (sortable && !tableId) {\n console.error(\"Table must have props.tableId if props.sortable is specified\");\n }\n }\n get isSortable() {\n const { sortable, tableId } = this.props;\n return Boolean(sortable && tableId);\n }\n get sortParams() {\n return Object.assign({}, this.props.sortByDefault, Object(_table_storage__WEBPACK_IMPORTED_MODULE_8__[\"getSortParams\"])(this.props.tableId));\n }\n renderHead() {\n const { children } = this.props;\n const content = react__WEBPACK_IMPORTED_MODULE_1___default.a.Children.toArray(children);\n const headElem = content.find(elem => elem.type === _table_head__WEBPACK_IMPORTED_MODULE_5__[\"TableHead\"]);\n if (!headElem) {\n return null;\n }\n if (this.isSortable) {\n const columns = react__WEBPACK_IMPORTED_MODULE_1___default.a.Children.toArray(headElem.props.children);\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(headElem, {\n children: columns.map(elem => {\n if (elem.props.checkbox) {\n return elem;\n }\n const title = elem.props.title || (\n // copy cell content to title if it's a string\n // usable if part of TableCell's content is hidden when there is not enough space\n typeof elem.props.children === \"string\" ? elem.props.children : undefined);\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(elem, {\n title,\n _sort: this.sort,\n _sorting: this.sortParams,\n _nowrap: headElem.props.nowrap,\n });\n })\n });\n }\n return headElem;\n }\n getSorted(rawItems) {\n const { sortBy, orderBy: orderByRaw } = this.sortParams;\n return Object(_sorting__WEBPACK_IMPORTED_MODULE_10__[\"getSorted\"])(rawItems, this.props.sortable[sortBy], orderByRaw);\n }\n onSort({ sortBy, orderBy }) {\n Object(_table_storage__WEBPACK_IMPORTED_MODULE_8__[\"setSortParams\"])(this.props.tableId, { sortBy, orderBy });\n const { sortSyncWithUrl, onSort } = this.props;\n if (sortSyncWithUrl) {\n sortByUrlParam.set(sortBy);\n orderByUrlParam.set(orderBy);\n }\n onSort === null || onSort === void 0 ? void 0 : onSort({ sortBy, orderBy });\n }\n sort(colName) {\n const { sortBy, orderBy } = this.sortParams;\n const sameColumn = sortBy == colName;\n const newSortBy = colName;\n const newOrderBy = (!orderBy || !sameColumn || orderBy === \"desc\") ? \"asc\" : \"desc\";\n this.onSort({\n sortBy: String(newSortBy),\n orderBy: newOrderBy,\n });\n }\n getContent() {\n const { items, renderRow, children } = this.props;\n const content = react__WEBPACK_IMPORTED_MODULE_1___default.a.Children.toArray(children);\n if (renderRow) {\n content.push(...items.map(renderRow));\n }\n return content;\n }\n renderRows() {\n const { noItems, virtual, customRowHeights, rowLineHeight, rowPadding, items, getTableRow, selectedItemId, className, virtualHeight } = this.props;\n const content = this.getContent();\n let rows = content.filter(elem => elem.type === _table_row__WEBPACK_IMPORTED_MODULE_4__[\"TableRow\"]);\n let sortedItems = rows.length ? rows.map(row => row.props.sortItem) : [...items];\n if (this.isSortable) {\n sortedItems = this.getSorted(sortedItems);\n if (rows.length) {\n rows = sortedItems.map(item => rows.find(row => item == row.props.sortItem));\n }\n }\n if (!rows.length && !items.length && noItems) {\n return noItems;\n }\n if (virtual) {\n const rowHeights = sortedItems.map(item => customRowHeights(item, rowLineHeight, rowPadding * 2));\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_virtual_list__WEBPACK_IMPORTED_MODULE_6__[\"VirtualList\"], { items: sortedItems, rowHeights: rowHeights, getRow: getTableRow, selectedItemId: selectedItemId, className: className, fixedHeight: virtualHeight }));\n }\n return rows;\n }\n render() {\n const { selectable, scrollable, autoSize, virtual, className } = this.props;\n const classNames = Object(_utils__WEBPACK_IMPORTED_MODULE_3__[\"cssNames\"])(\"Table flex column\", className, {\n selectable, scrollable, sortable: this.isSortable, autoSize, virtual,\n });\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: classNames },\n this.renderHead(),\n this.renderRows()));\n }\n};\nObject.defineProperty(Table, \"defaultProps\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n scrollable: true,\n autoSize: true,\n rowPadding: 8,\n rowLineHeight: 17,\n sortSyncWithUrl: true,\n customRowHeights: (item, lineHeight, paddings) => lineHeight + paddings,\n }\n});\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_9__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Table.prototype, \"isSortable\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_9__[\"computed\"],\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], Table.prototype, \"sortParams\", null);\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_3__[\"boundMethod\"],\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", void 0)\n], Table.prototype, \"sort\", null);\nTable = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_2__[\"observer\"],\n __metadata(\"design:paramtypes\", [Object])\n], Table);\n\n\n\n//# sourceURL=webpack:///./src/renderer/components/table/table.tsx?");
|
|
41879
41915
|
|
|
41880
41916
|
/***/ }),
|
|
41881
41917
|
|
|
@@ -41995,7 +42031,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
41995
42031
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
41996
42032
|
|
|
41997
42033
|
"use strict";
|
|
41998
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"VirtualList\", function() { return VirtualList; });\n/* harmony import */ var _virtual_list_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./virtual-list.scss */ \"./src/renderer/components/virtual-list/virtual-list.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var react_window__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-window */ \"./node_modules/react-window/dist/index.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/debounce */ \"./node_modules/lodash/debounce.js\");\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/isEqual */ \"./node_modules/lodash/isEqual.js\");\n/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var react_virtualized_auto_sizer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-virtualized-auto-sizer */ \"./node_modules/react-virtualized-auto-sizer/dist/index.esm.js\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n// Wrapper for \"react-window\" component\n// API docs: https://react-window.now.sh\n\n\n\n\n\n\n\n\nconst defaultProps = {\n width: \"100%\",\n initialOffset: 1,\n readyOffset: 10,\n onScroll: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"]\n};\nclass VirtualList extends react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"] {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"listRef\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: react__WEBPACK_IMPORTED_MODULE_1___default.a.createRef()\n });\n Object.defineProperty(this, \"state\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n overscanCount: this.props.initialOffset,\n }\n });\n Object.defineProperty(this, \"getItemSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (index) => this.props.rowHeights[index]\n });\n Object.defineProperty(this, \"scrollToSelectedItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: lodash_debounce__WEBPACK_IMPORTED_MODULE_5___default()(() => {\n var _a;\n if (!this.props.selectedItemId) {\n return;\n }\n const { items, selectedItemId } = this.props;\n const index = items.findIndex(item => item.getId() == selectedItemId);\n if (index >= 0) {\n (_a = this.listRef.current) === null || _a === void 0 ? void 0 : _a.scrollToItem(index, \"start\");\n }\n })\n });\n Object.defineProperty(this, \"scrollToItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (index, align) => {\n var _a;\n (_a = this.listRef.current) === null || _a === void 0 ? void 0 : _a.scrollToItem(index, align);\n }\n });\n }\n componentDidMount() {\n this.scrollToSelectedItem();\n this.setState({ overscanCount: this.props.readyOffset });\n }\n componentDidUpdate(prevProps) {\n var _a;\n const { items, rowHeights } = this.props;\n if (prevProps.items.length !== items.length || !lodash_isEqual__WEBPACK_IMPORTED_MODULE_6___default()(prevProps.rowHeights, rowHeights)) {\n (_a = this.listRef.current) === null || _a === void 0 ? void 0 : _a.resetAfterIndex(0, false);\n }\n }\n
|
|
42034
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"VirtualList\", function() { return VirtualList; });\n/* harmony import */ var _virtual_list_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./virtual-list.scss */ \"./src/renderer/components/virtual-list/virtual-list.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var react_window__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-window */ \"./node_modules/react-window/dist/index.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/debounce */ \"./node_modules/lodash/debounce.js\");\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/isEqual */ \"./node_modules/lodash/isEqual.js\");\n/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var react_virtualized_auto_sizer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-virtualized-auto-sizer */ \"./node_modules/react-virtualized-auto-sizer/dist/index.esm.js\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n// Wrapper for \"react-window\" component\n// API docs: https://react-window.now.sh\n\n\n\n\n\n\n\n\nconst defaultProps = {\n width: \"100%\",\n initialOffset: 1,\n readyOffset: 10,\n onScroll: _utils__WEBPACK_IMPORTED_MODULE_4__[\"noop\"]\n};\nclass VirtualList extends react__WEBPACK_IMPORTED_MODULE_1__[\"Component\"] {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"listRef\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: react__WEBPACK_IMPORTED_MODULE_1___default.a.createRef()\n });\n Object.defineProperty(this, \"state\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n overscanCount: this.props.initialOffset,\n }\n });\n Object.defineProperty(this, \"getItemSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (index) => this.props.rowHeights[index]\n });\n Object.defineProperty(this, \"scrollToSelectedItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: lodash_debounce__WEBPACK_IMPORTED_MODULE_5___default()(() => {\n var _a;\n if (!this.props.selectedItemId) {\n return;\n }\n const { items, selectedItemId } = this.props;\n const index = items.findIndex(item => item.getId() == selectedItemId);\n if (index >= 0) {\n (_a = this.listRef.current) === null || _a === void 0 ? void 0 : _a.scrollToItem(index, \"start\");\n }\n })\n });\n Object.defineProperty(this, \"scrollToItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (index, align) => {\n var _a;\n (_a = this.listRef.current) === null || _a === void 0 ? void 0 : _a.scrollToItem(index, align);\n }\n });\n }\n componentDidMount() {\n this.scrollToSelectedItem();\n this.setState({ overscanCount: this.props.readyOffset });\n }\n componentDidUpdate(prevProps) {\n var _a;\n const { items, rowHeights } = this.props;\n if (prevProps.items.length !== items.length || !lodash_isEqual__WEBPACK_IMPORTED_MODULE_6___default()(prevProps.rowHeights, rowHeights)) {\n (_a = this.listRef.current) === null || _a === void 0 ? void 0 : _a.resetAfterIndex(0, false);\n }\n }\n renderList(height) {\n const { width, items, getRow, onScroll, outerRef } = this.props;\n const { overscanCount } = this.state;\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react_window__WEBPACK_IMPORTED_MODULE_3__[\"VariableSizeList\"], { className: \"list\", width: width, height: height, itemSize: this.getItemSize, itemCount: items.length, itemData: {\n items,\n getRow\n }, overscanCount: overscanCount, ref: this.listRef, outerRef: outerRef, onScroll: onScroll }, Row));\n }\n render() {\n const { className, fixedHeight } = this.props;\n return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"div\", { className: Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"cssNames\"])(\"VirtualList\", className) }, typeof fixedHeight === \"number\"\n ? this.renderList(fixedHeight)\n : (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react_virtualized_auto_sizer__WEBPACK_IMPORTED_MODULE_7__[\"default\"], { disableWidth: true }, ({ height }) => this.renderList(height)))));\n }\n}\nObject.defineProperty(VirtualList, \"defaultProps\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: defaultProps\n});\nconst Row = Object(mobx_react__WEBPACK_IMPORTED_MODULE_2__[\"observer\"])((props) => {\n const { index, style, data } = props;\n const { items, getRow } = data;\n const item = items[index];\n const uid = typeof item == \"string\" ? index : items[index].getId();\n const row = getRow(uid);\n if (!row)\n return null;\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(row, {\n style: Object.assign({}, row.props.style, style)\n });\n});\n\n\n//# sourceURL=webpack:///./src/renderer/components/virtual-list/virtual-list.tsx?");
|
|
41999
42035
|
|
|
42000
42036
|
/***/ }),
|
|
42001
42037
|
|
|
@@ -42043,7 +42079,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
42043
42079
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
42044
42080
|
|
|
42045
42081
|
"use strict";
|
|
42046
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"IpcRendererNavigationEvents\", function() { return IpcRendererNavigationEvents; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bindEvents\", function() { return bindEvents; });\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers */ \"./src/renderer/navigation/helpers.ts\");\n/* harmony import */ var _common_ipc__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/ipc */ \"./src/common/ipc/index.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\nvar IpcRendererNavigationEvents;\n(function (IpcRendererNavigationEvents) {\n IpcRendererNavigationEvents[\"RELOAD_PAGE\"] = \"renderer:page-reload\";\n IpcRendererNavigationEvents[\"CLUSTER_VIEW_CURRENT_ID\"] = \"renderer:cluster-id-of-active-view\";\n IpcRendererNavigationEvents[\"NAVIGATE_IN_APP\"] = \"renderer:navigate\";\n IpcRendererNavigationEvents[\"NAVIGATE_IN_CLUSTER\"] = \"renderer:navigate-in-cluster\";\n IpcRendererNavigationEvents[\"LOADED\"] = \"renderer:loaded\";\n})(IpcRendererNavigationEvents || (IpcRendererNavigationEvents = {}));\nfunction bindEvents() {\n if (!electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcRenderer\"]) {\n return;\n }\n if (process.isMainFrame) {\n bindClusterManagerRouteEvents();\n }\n else {\n bindClusterFrameRouteEvents();\n }\n // Reload dashboard window\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_3__[\"ipcRendererOn\"])(IpcRendererNavigationEvents.RELOAD_PAGE, () => {\n location.reload();\n });\n}\n// Handle events only in main window renderer process (see also: cluster-manager.tsx)\nfunction bindClusterManagerRouteEvents() {\n // Keep track of active cluster-id for handling IPC/menus/etc.\n Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"reaction\"])(() => Object(_helpers__WEBPACK_IMPORTED_MODULE_2__[\"getMatchedClusterId\"])(), clusterId => {\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_3__[\"broadcastMessage\"])(IpcRendererNavigationEvents.CLUSTER_VIEW_CURRENT_ID, clusterId);\n }, {\n fireImmediately: true\n });\n // Handle navigation via IPC\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_3__[\"ipcRendererOn\"])(IpcRendererNavigationEvents.NAVIGATE_IN_APP, (event, url) => {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[IPC]: navigate to ${url}`, { currentLocation: location.href });\n Object(_helpers__WEBPACK_IMPORTED_MODULE_2__[\"navigate\"])(url);\n });\n}\n// Handle cluster-view renderer process events within iframes\nfunction bindClusterFrameRouteEvents() {\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_3__[\"ipcRendererOn\"])(IpcRendererNavigationEvents.NAVIGATE_IN_CLUSTER, (event, url) => {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[IPC]: navigate to ${url}`, { currentLocation: location.href });\n Object(_helpers__WEBPACK_IMPORTED_MODULE_2__[\"navigate\"])(url);\n });\n}\n\n\n//# sourceURL=webpack:///./src/renderer/navigation/events.ts?");
|
|
42082
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"IpcRendererNavigationEvents\", function() { return IpcRendererNavigationEvents; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bindEvents\", function() { return bindEvents; });\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers */ \"./src/renderer/navigation/helpers.ts\");\n/* harmony import */ var _common_ipc__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/ipc */ \"./src/common/ipc/index.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n\n\n\n\nvar IpcRendererNavigationEvents;\n(function (IpcRendererNavigationEvents) {\n IpcRendererNavigationEvents[\"RELOAD_PAGE\"] = \"renderer:page-reload\";\n IpcRendererNavigationEvents[\"CLUSTER_VIEW_CURRENT_ID\"] = \"renderer:cluster-id-of-active-view\";\n IpcRendererNavigationEvents[\"NAVIGATE_IN_APP\"] = \"renderer:navigate\";\n IpcRendererNavigationEvents[\"NAVIGATE_IN_CLUSTER\"] = \"renderer:navigate-in-cluster\";\n IpcRendererNavigationEvents[\"LOADED\"] = \"renderer:loaded\";\n})(IpcRendererNavigationEvents || (IpcRendererNavigationEvents = {}));\nfunction bindEvents() {\n if (!electron__WEBPACK_IMPORTED_MODULE_0__[\"ipcRenderer\"]) {\n return;\n }\n if (process.isMainFrame) {\n bindClusterManagerRouteEvents();\n }\n else {\n bindClusterFrameRouteEvents();\n }\n // Reload dashboard window\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_3__[\"ipcRendererOn\"])(IpcRendererNavigationEvents.RELOAD_PAGE, () => {\n location.reload();\n });\n}\n// Handle events only in main window renderer process (see also: cluster-manager.tsx)\nfunction bindClusterManagerRouteEvents() {\n // Keep track of active cluster-id for handling IPC/menus/etc.\n Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"reaction\"])(() => Object(_helpers__WEBPACK_IMPORTED_MODULE_2__[\"getMatchedClusterId\"])(), clusterId => {\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_3__[\"broadcastMessage\"])(IpcRendererNavigationEvents.CLUSTER_VIEW_CURRENT_ID, clusterId);\n }, {\n fireImmediately: true\n });\n // Handle navigation via IPC\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_3__[\"ipcRendererOn\"])(IpcRendererNavigationEvents.NAVIGATE_IN_APP, (event, url) => {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[IPC]: navigate to ${url}`, { currentLocation: location.href });\n Object(_helpers__WEBPACK_IMPORTED_MODULE_2__[\"navigate\"])(url);\n window.focus(); // make sure that the main frame is focused\n });\n}\n// Handle cluster-view renderer process events within iframes\nfunction bindClusterFrameRouteEvents() {\n Object(_common_ipc__WEBPACK_IMPORTED_MODULE_3__[\"ipcRendererOn\"])(IpcRendererNavigationEvents.NAVIGATE_IN_CLUSTER, (event, url) => {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`[IPC]: navigate to ${url}`, { currentLocation: location.href });\n Object(_helpers__WEBPACK_IMPORTED_MODULE_2__[\"navigate\"])(url);\n });\n}\n\n\n//# sourceURL=webpack:///./src/renderer/navigation/events.ts?");
|
|
42047
42083
|
|
|
42048
42084
|
/***/ }),
|
|
42049
42085
|
|
|
@@ -42149,7 +42185,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
42149
42185
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
42150
42186
|
|
|
42151
42187
|
"use strict";
|
|
42152
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createStorage\", function() { return createStorage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createAppStorage\", function() { return createAppStorage; });\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ \"path\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! fs-extra */ \"./node_modules/fs-extra/lib/index.js\");\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(fs_extra__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _storageHelper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./storageHelper */ \"./src/renderer/utils/storageHelper.ts\");\n/* harmony import */ var
|
|
42188
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createStorage\", function() { return createStorage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createAppStorage\", function() { return createAppStorage; });\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ \"path\");\n/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! fs-extra */ \"./node_modules/fs-extra/lib/index.js\");\n/* harmony import */ var fs_extra__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(fs_extra__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _storageHelper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./storageHelper */ \"./src/renderer/utils/storageHelper.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _common_vars__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/vars */ \"./src/common/vars.ts\");\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n// Keeps window.localStorage state in external JSON-files.\n// Because app creates random port between restarts => storage session wiped out each time.\n\n\n\n\n\n\n\nconst storage = Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"observable\"])({\n initialized: false,\n loaded: false,\n data: {}, // json-serializable\n});\n/**\n * Creates a helper for saving data under the \"key\" intended for window.localStorage\n * @param key\n * @param defaultValue\n */\nfunction createStorage(key, defaultValue) {\n return createAppStorage(key, defaultValue, Object(_common_utils__WEBPACK_IMPORTED_MODULE_5__[\"getHostedClusterId\"])());\n}\nfunction createAppStorage(key, defaultValue, clusterId) {\n const { logPrefix } = _storageHelper__WEBPACK_IMPORTED_MODULE_3__[\"StorageHelper\"];\n const folder = path__WEBPACK_IMPORTED_MODULE_0___default.a.resolve(Object(_common_utils__WEBPACK_IMPORTED_MODULE_5__[\"getPath\"])(\"userData\"), \"lens-local-storage\");\n const fileName = `${clusterId !== null && clusterId !== void 0 ? clusterId : \"app\"}.json`;\n const filePath = path__WEBPACK_IMPORTED_MODULE_0___default.a.resolve(folder, fileName);\n if (!storage.initialized) {\n init(); // called once per cluster-view\n }\n function init() {\n storage.initialized = true;\n // read previously saved state (if any)\n fs_extra__WEBPACK_IMPORTED_MODULE_2___default.a.readJson(filePath)\n .then(data => storage.data = data)\n .catch(() => null) // ignore empty / non-existing / invalid json files\n .finally(() => {\n if (!_common_vars__WEBPACK_IMPORTED_MODULE_6__[\"isTestEnv\"]) {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`${logPrefix} loading finished for ${filePath}`);\n }\n storage.loaded = true;\n });\n // bind auto-saving data changes to %storage-file.json\n Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"reaction\"])(() => Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"toJS\"])(storage.data), saveFile, {\n delay: 250,\n equals: mobx__WEBPACK_IMPORTED_MODULE_1__[\"comparer\"].structural, // save only when something really changed\n });\n async function saveFile(state = {}) {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].info(`${logPrefix} saving ${filePath}`);\n try {\n await fs_extra__WEBPACK_IMPORTED_MODULE_2___default.a.ensureDir(folder, { mode: 0o755 });\n await fs_extra__WEBPACK_IMPORTED_MODULE_2___default.a.writeJson(filePath, state, { spaces: 2 });\n }\n catch (error) {\n _main_logger__WEBPACK_IMPORTED_MODULE_4__[\"default\"].error(`${logPrefix} saving failed: ${error}`, {\n json: state, jsonFilePath: filePath\n });\n }\n }\n }\n return new _storageHelper__WEBPACK_IMPORTED_MODULE_3__[\"StorageHelper\"](key, {\n autoInit: true,\n defaultValue,\n storage: {\n async getItem(key) {\n await Object(mobx__WEBPACK_IMPORTED_MODULE_1__[\"when\"])(() => storage.loaded);\n return storage.data[key];\n },\n setItem(key, value) {\n storage.data[key] = value;\n },\n removeItem(key) {\n delete storage.data[key];\n }\n },\n });\n}\n\n\n//# sourceURL=webpack:///./src/renderer/utils/createStorage.ts?");
|
|
42153
42189
|
|
|
42154
42190
|
/***/ }),
|
|
42155
42191
|
|
|
@@ -42193,11 +42229,11 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
42193
42229
|
/*!*************************************!*\
|
|
42194
42230
|
!*** ./src/renderer/utils/index.ts ***!
|
|
42195
42231
|
\*************************************/
|
|
42196
|
-
/*! exports provided: noop, getAppVersion, getBundledKubectlVersion, getAppVersionFromProxyServer, autoBind, boundClass, boundMethod, base64, toCamelCase, cloneJsonObject, getClusterIdFromHost, getClusterFrameUrl, getHostedClusterId, isClusterPageContext, debouncePromise, defineGlobal, delay, disposer, downloadFile, downloadJson, formatDuration, escapeRegExp, multiSet, ExtendedMap, ExtendedObservableMap, getPath, getRandId, makeIterableIterator, HashSet, ObservableHashSet, storedKubeConfigFolder, getCustomKubeConfigPath, nFircate, openExternal, resolvePath, isLogicalChildPath, rejectPromiseBy, Singleton, sortCompare, sortCompareChartVersions, sortCharts, splitArray, bifurcateArray, readFileFromTar, listTarEntries, extractTar, ToggleSet, ObservableToggleSet, toJS, hasOwnProperty, hasOwnProperties, hasTypedProperty, hasOptionalProperty, isRecord, isTypedArray, isString, isObject, bindPredicate, unitsToBytes, bytesToUnits, cpuUnitsToNumber, iter,
|
|
42232
|
+
/*! exports provided: noop, getAppVersion, getBundledKubectlVersion, getAppVersionFromProxyServer, autoBind, boundClass, boundMethod, base64, toCamelCase, cloneJsonObject, getClusterIdFromHost, getClusterFrameUrl, getHostedClusterId, isClusterPageContext, debouncePromise, defineGlobal, delay, disposer, downloadFile, downloadJson, formatDuration, escapeRegExp, multiSet, ExtendedMap, ExtendedObservableMap, getPath, getRandId, makeIterableIterator, HashSet, ObservableHashSet, storedKubeConfigFolder, getCustomKubeConfigPath, nFircate, openExternal, resolvePath, isLogicalChildPath, rejectPromiseBy, Singleton, Ordering, rectifyOrdering, sortCompare, sortCompareChartVersions, sortCharts, splitArray, bifurcateArray, readFileFromTar, listTarEntries, extractTar, ToggleSet, ObservableToggleSet, toJS, hasOwnProperty, hasOwnProperties, hasTypedProperty, hasOptionalProperty, isRecord, isTypedArray, isString, isObject, bindPredicate, unitsToBytes, bytesToUnits, cpuUnitsToNumber, iter, array, EventEmitter, copyToClipboard, createStorage, createAppStorage, cssNames, cssVar, displayBooleans, interval, isMiddleClick, isReactNode, metricUnitsToNumber, getConvertedParts, prevDefault, stopPropagation, saveFileDialog, StorageHelper */
|
|
42197
42233
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
42198
42234
|
|
|
42199
42235
|
"use strict";
|
|
42200
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ \"./src/common/utils/index.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"noop\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"noop\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getAppVersion\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"getAppVersion\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getBundledKubectlVersion\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"getBundledKubectlVersion\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getAppVersionFromProxyServer\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"getAppVersionFromProxyServer\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"autoBind\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"autoBind\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"boundClass\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"boundClass\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"boundMethod\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"boundMethod\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"base64\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"base64\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toCamelCase\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"toCamelCase\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cloneJsonObject\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"cloneJsonObject\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getClusterIdFromHost\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"getClusterIdFromHost\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getClusterFrameUrl\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"getClusterFrameUrl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getHostedClusterId\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"getHostedClusterId\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isClusterPageContext\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"isClusterPageContext\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"debouncePromise\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"debouncePromise\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"defineGlobal\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"defineGlobal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"delay\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"delay\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"disposer\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"disposer\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"downloadFile\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"downloadFile\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"downloadJson\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"downloadJson\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatDuration\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"formatDuration\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"escapeRegExp\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"escapeRegExp\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"multiSet\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"multiSet\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ExtendedMap\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"ExtendedMap\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ExtendedObservableMap\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"ExtendedObservableMap\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getPath\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"getPath\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getRandId\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"getRandId\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"makeIterableIterator\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"makeIterableIterator\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"HashSet\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"HashSet\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ObservableHashSet\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"ObservableHashSet\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"storedKubeConfigFolder\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"storedKubeConfigFolder\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getCustomKubeConfigPath\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"getCustomKubeConfigPath\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"nFircate\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"nFircate\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"openExternal\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"openExternal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"resolvePath\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"resolvePath\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isLogicalChildPath\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"isLogicalChildPath\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rejectPromiseBy\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"rejectPromiseBy\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Singleton\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"Singleton\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sortCompare\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"sortCompare\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sortCompareChartVersions\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"sortCompareChartVersions\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sortCharts\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"sortCharts\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"splitArray\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"splitArray\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bifurcateArray\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"bifurcateArray\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"readFileFromTar\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"readFileFromTar\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"listTarEntries\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"listTarEntries\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"extractTar\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"extractTar\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ToggleSet\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"ToggleSet\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ObservableToggleSet\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"ObservableToggleSet\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toJS\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"toJS\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasOwnProperty\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"hasOwnProperty\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasOwnProperties\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"hasOwnProperties\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasTypedProperty\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"hasTypedProperty\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasOptionalProperty\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"hasOptionalProperty\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isRecord\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"isRecord\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isTypedArray\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"isTypedArray\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isString\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"isString\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isObject\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"isObject\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bindPredicate\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"bindPredicate\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"unitsToBytes\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"unitsToBytes\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bytesToUnits\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"bytesToUnits\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cpuUnitsToNumber\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"cpuUnitsToNumber\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"iter\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"iter\"]; });\n\n/* harmony import */ var _cssVar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cssVar */ \"./src/renderer/utils/cssVar.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cssVar\", function() { return _cssVar__WEBPACK_IMPORTED_MODULE_1__[\"cssVar\"]; });\n\n/* harmony import */ var _cssNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cssNames */ \"./src/renderer/utils/cssNames.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cssNames\", function() { return _cssNames__WEBPACK_IMPORTED_MODULE_2__[\"cssNames\"]; });\n\n/* harmony import */ var _common_event_emitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/event-emitter */ \"./src/common/event-emitter.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"EventEmitter\", function() { return _common_event_emitter__WEBPACK_IMPORTED_MODULE_3__[\"EventEmitter\"]; });\n\n/* harmony import */ var _saveFile__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./saveFile */ \"./src/renderer/utils/saveFile.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"saveFileDialog\", function() { return _saveFile__WEBPACK_IMPORTED_MODULE_4__[\"saveFileDialog\"]; });\n\n/* harmony import */ var _prevDefault__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./prevDefault */ \"./src/renderer/utils/prevDefault.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"prevDefault\", function() { return _prevDefault__WEBPACK_IMPORTED_MODULE_5__[\"prevDefault\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stopPropagation\", function() { return _prevDefault__WEBPACK_IMPORTED_MODULE_5__[\"stopPropagation\"]; });\n\n/* harmony import */ var _storageHelper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./storageHelper */ \"./src/renderer/utils/storageHelper.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"StorageHelper\", function() { return _storageHelper__WEBPACK_IMPORTED_MODULE_6__[\"StorageHelper\"]; });\n\n/* harmony import */ var _createStorage__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./createStorage */ \"./src/renderer/utils/createStorage.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createStorage\", function() { return _createStorage__WEBPACK_IMPORTED_MODULE_7__[\"createStorage\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createAppStorage\", function() { return _createStorage__WEBPACK_IMPORTED_MODULE_7__[\"createAppStorage\"]; });\n\n/* harmony import */ var _interval__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./interval */ \"./src/renderer/utils/interval.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interval\", function() { return _interval__WEBPACK_IMPORTED_MODULE_8__[\"interval\"]; });\n\n/* harmony import */ var _copyToClipboard__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./copyToClipboard */ \"./src/renderer/utils/copyToClipboard.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"copyToClipboard\", function() { return _copyToClipboard__WEBPACK_IMPORTED_MODULE_9__[\"copyToClipboard\"]; });\n\n/* harmony import */ var _isReactNode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./isReactNode */ \"./src/renderer/utils/isReactNode.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isReactNode\", function() { return _isReactNode__WEBPACK_IMPORTED_MODULE_10__[\"isReactNode\"]; });\n\n/* harmony import */ var _common_utils_convertMemory__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common/utils/convertMemory */ \"./src/common/utils/convertMemory.ts\");\n/* empty/unused harmony star reexport *//* harmony import */ var _common_utils_convertCpu__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../common/utils/convertCpu */ \"./src/common/utils/convertCpu.ts\");\n/* empty/unused harmony star reexport *//* harmony import */ var _metricUnitsToNumber__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./metricUnitsToNumber */ \"./src/renderer/utils/metricUnitsToNumber.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"metricUnitsToNumber\", function() { return _metricUnitsToNumber__WEBPACK_IMPORTED_MODULE_13__[\"metricUnitsToNumber\"]; });\n\n/* harmony import */ var _display_booleans__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./display-booleans */ \"./src/renderer/utils/display-booleans.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"displayBooleans\", function() { return _display_booleans__WEBPACK_IMPORTED_MODULE_14__[\"displayBooleans\"]; });\n\n/* harmony import */ var _isMiddleClick__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./isMiddleClick */ \"./src/renderer/utils/isMiddleClick.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isMiddleClick\", function() { return _isMiddleClick__WEBPACK_IMPORTED_MODULE_15__[\"isMiddleClick\"]; });\n\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n// Common usage utils & helpers\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./src/renderer/utils/index.ts?");
|
|
42236
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ \"./src/common/utils/index.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"noop\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"noop\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getAppVersion\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"getAppVersion\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getBundledKubectlVersion\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"getBundledKubectlVersion\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getAppVersionFromProxyServer\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"getAppVersionFromProxyServer\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"autoBind\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"autoBind\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"boundClass\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"boundClass\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"boundMethod\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"boundMethod\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"base64\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"base64\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toCamelCase\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"toCamelCase\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cloneJsonObject\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"cloneJsonObject\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getClusterIdFromHost\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"getClusterIdFromHost\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getClusterFrameUrl\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"getClusterFrameUrl\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getHostedClusterId\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"getHostedClusterId\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isClusterPageContext\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"isClusterPageContext\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"debouncePromise\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"debouncePromise\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"defineGlobal\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"defineGlobal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"delay\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"delay\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"disposer\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"disposer\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"downloadFile\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"downloadFile\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"downloadJson\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"downloadJson\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatDuration\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"formatDuration\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"escapeRegExp\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"escapeRegExp\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"multiSet\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"multiSet\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ExtendedMap\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"ExtendedMap\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ExtendedObservableMap\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"ExtendedObservableMap\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getPath\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"getPath\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getRandId\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"getRandId\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"makeIterableIterator\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"makeIterableIterator\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"HashSet\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"HashSet\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ObservableHashSet\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"ObservableHashSet\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"storedKubeConfigFolder\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"storedKubeConfigFolder\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getCustomKubeConfigPath\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"getCustomKubeConfigPath\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"nFircate\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"nFircate\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"openExternal\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"openExternal\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"resolvePath\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"resolvePath\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isLogicalChildPath\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"isLogicalChildPath\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rejectPromiseBy\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"rejectPromiseBy\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Singleton\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"Singleton\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Ordering\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"Ordering\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rectifyOrdering\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"rectifyOrdering\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sortCompare\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"sortCompare\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sortCompareChartVersions\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"sortCompareChartVersions\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sortCharts\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"sortCharts\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"splitArray\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"splitArray\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bifurcateArray\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"bifurcateArray\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"readFileFromTar\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"readFileFromTar\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"listTarEntries\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"listTarEntries\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"extractTar\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"extractTar\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ToggleSet\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"ToggleSet\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ObservableToggleSet\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"ObservableToggleSet\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"toJS\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"toJS\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasOwnProperty\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"hasOwnProperty\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasOwnProperties\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"hasOwnProperties\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasTypedProperty\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"hasTypedProperty\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hasOptionalProperty\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"hasOptionalProperty\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isRecord\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"isRecord\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isTypedArray\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"isTypedArray\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isString\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"isString\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isObject\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"isObject\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bindPredicate\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"bindPredicate\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"unitsToBytes\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"unitsToBytes\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bytesToUnits\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"bytesToUnits\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cpuUnitsToNumber\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"cpuUnitsToNumber\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"iter\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"iter\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"array\", function() { return _common_utils__WEBPACK_IMPORTED_MODULE_0__[\"array\"]; });\n\n/* harmony import */ var _common_event_emitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/event-emitter */ \"./src/common/event-emitter.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"EventEmitter\", function() { return _common_event_emitter__WEBPACK_IMPORTED_MODULE_1__[\"EventEmitter\"]; });\n\n/* harmony import */ var _copyToClipboard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./copyToClipboard */ \"./src/renderer/utils/copyToClipboard.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"copyToClipboard\", function() { return _copyToClipboard__WEBPACK_IMPORTED_MODULE_2__[\"copyToClipboard\"]; });\n\n/* harmony import */ var _createStorage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./createStorage */ \"./src/renderer/utils/createStorage.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createStorage\", function() { return _createStorage__WEBPACK_IMPORTED_MODULE_3__[\"createStorage\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createAppStorage\", function() { return _createStorage__WEBPACK_IMPORTED_MODULE_3__[\"createAppStorage\"]; });\n\n/* harmony import */ var _cssNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cssNames */ \"./src/renderer/utils/cssNames.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cssNames\", function() { return _cssNames__WEBPACK_IMPORTED_MODULE_4__[\"cssNames\"]; });\n\n/* harmony import */ var _cssVar__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cssVar */ \"./src/renderer/utils/cssVar.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cssVar\", function() { return _cssVar__WEBPACK_IMPORTED_MODULE_5__[\"cssVar\"]; });\n\n/* harmony import */ var _display_booleans__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./display-booleans */ \"./src/renderer/utils/display-booleans.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"displayBooleans\", function() { return _display_booleans__WEBPACK_IMPORTED_MODULE_6__[\"displayBooleans\"]; });\n\n/* harmony import */ var _interval__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./interval */ \"./src/renderer/utils/interval.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"interval\", function() { return _interval__WEBPACK_IMPORTED_MODULE_7__[\"interval\"]; });\n\n/* harmony import */ var _isMiddleClick__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./isMiddleClick */ \"./src/renderer/utils/isMiddleClick.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isMiddleClick\", function() { return _isMiddleClick__WEBPACK_IMPORTED_MODULE_8__[\"isMiddleClick\"]; });\n\n/* harmony import */ var _isReactNode__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./isReactNode */ \"./src/renderer/utils/isReactNode.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isReactNode\", function() { return _isReactNode__WEBPACK_IMPORTED_MODULE_9__[\"isReactNode\"]; });\n\n/* harmony import */ var _metricUnitsToNumber__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./metricUnitsToNumber */ \"./src/renderer/utils/metricUnitsToNumber.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"metricUnitsToNumber\", function() { return _metricUnitsToNumber__WEBPACK_IMPORTED_MODULE_10__[\"metricUnitsToNumber\"]; });\n\n/* harmony import */ var _name_parts__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./name-parts */ \"./src/renderer/utils/name-parts.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getConvertedParts\", function() { return _name_parts__WEBPACK_IMPORTED_MODULE_11__[\"getConvertedParts\"]; });\n\n/* harmony import */ var _prevDefault__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./prevDefault */ \"./src/renderer/utils/prevDefault.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"prevDefault\", function() { return _prevDefault__WEBPACK_IMPORTED_MODULE_12__[\"prevDefault\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"stopPropagation\", function() { return _prevDefault__WEBPACK_IMPORTED_MODULE_12__[\"stopPropagation\"]; });\n\n/* harmony import */ var _saveFile__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./saveFile */ \"./src/renderer/utils/saveFile.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"saveFileDialog\", function() { return _saveFile__WEBPACK_IMPORTED_MODULE_13__[\"saveFileDialog\"]; });\n\n/* harmony import */ var _storageHelper__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./storageHelper */ \"./src/renderer/utils/storageHelper.ts\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"StorageHelper\", function() { return _storageHelper__WEBPACK_IMPORTED_MODULE_14__[\"StorageHelper\"]; });\n\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n// Common usage utils & helpers\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./src/renderer/utils/index.ts?");
|
|
42201
42237
|
|
|
42202
42238
|
/***/ }),
|
|
42203
42239
|
|
|
@@ -42261,6 +42297,18 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
|
42261
42297
|
|
|
42262
42298
|
/***/ }),
|
|
42263
42299
|
|
|
42300
|
+
/***/ "./src/renderer/utils/name-parts.ts":
|
|
42301
|
+
/*!******************************************!*\
|
|
42302
|
+
!*** ./src/renderer/utils/name-parts.ts ***!
|
|
42303
|
+
\******************************************/
|
|
42304
|
+
/*! exports provided: getConvertedParts */
|
|
42305
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
42306
|
+
|
|
42307
|
+
"use strict";
|
|
42308
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getConvertedParts\", function() { return getConvertedParts; });\n/**\n * Copyright (c) 2021 OpenLens Authors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n * the Software, and to permit persons to whom the Software is furnished to do so,\n * subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n/**\n * Split `name` into the parts seperated by one or more of (-, _, or .) and\n * the sections can be converted to numbers will be converted\n * @param name A kube object name\n * @returns The converted parts of the name\n */\nfunction getConvertedParts(name) {\n return name\n .split(/[-_./\\\\]+/)\n .map(part => {\n const converted = +part;\n return isNaN(converted) ? part : converted;\n });\n}\n\n\n//# sourceURL=webpack:///./src/renderer/utils/name-parts.ts?");
|
|
42309
|
+
|
|
42310
|
+
/***/ }),
|
|
42311
|
+
|
|
42264
42312
|
/***/ "./src/renderer/utils/prevDefault.ts":
|
|
42265
42313
|
/*!*******************************************!*\
|
|
42266
42314
|
!*** ./src/renderer/utils/prevDefault.ts ***!
|