openc3-tool-base 5.8.1 → 5.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24c6eb262ccd636794cc43b5dff448a9946bef400b62997dc1108f5e1f2f6898
4
- data.tar.gz: 5336c1f49f7e7d6eee190d4604b5dfcf177fb2a1a856f5d9e5f283574bf920e2
3
+ metadata.gz: cf557a5af74456df1650115a9ad8143e4a2dcc1fc4f70404c5502a5e9f808de1
4
+ data.tar.gz: 7a0d0614f83f446ba8a8ea78f83e8cdeeaa8af48ea20118f4fba5050825ea6b1
5
5
  SHA512:
6
- metadata.gz: d2c6c111bd4215c059426215954e0979f5a46789a7deb4c2befd94a7a9879bd6c1843c06f530ea36d0acaf98a2af5c45f8b51337137fd8010c33e4e4e7b4880e
7
- data.tar.gz: 06f1d47c7d978f663e302c6a8385fb31e5b824d8e47135503950b426c4a017b4016c34f321b47d2505b4eafeacda5488f205242c7c3fd5f01e3342790a8610e7
6
+ metadata.gz: fca9ed458be9f959b0a3daa5fa40cce75301881adbc57cea9a4a0cd7f8f6103cc307239d12dd8b8ae84a65a04f6871f48c2bb7e6981580d37012b5f00d9e3d28
7
+ data.tar.gz: 2453d5fe5f8bff271fc179fbd37234b1dab7a86aff84660882d665ad2f057dabc70f5df593151c833616a4cb5f759d9387ba3659beedf20dc5809daca08b6af1
@@ -1 +1 @@
1
- {"version":3,"file":"543.openc3-tool-base.js","mappings":"wJAAA,IAAIA,EAAS,WACX,IAAIC,EAAMC,KACNC,EAAKF,EAAIG,eACTC,EAAKJ,EAAIK,MAAMD,IAAMF,EACzB,OAAOE,EACL,SACA,CACEA,EAAG,eAAgB,CAACJ,EAAIM,GAAG,aAC3BN,EAAIM,GAAG,KACPF,EAAG,kBAAmB,CACpBJ,EAAIM,GACF,SACEN,EAAIO,GAAGP,EAAIQ,MAAQ,YAAc,YACjC,8CAGNR,EAAIM,GAAG,KACPF,EACE,cACA,CACEA,EACE,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C,SAAAC,QAAAC,IACA,YAEAH,OAAAC,SAAAG,UAAAN,GAAA,IACA,EACAzB,eAAA,eAAAgC,EAAA,KACA,KAAA1B,WAAA,EACAW,EAAAA,EAAAA,KAAA,0BAAAgB,EAAA,CACAxB,KAAA,CACAyB,MAAA,KAAAjD,WAEA,KAAA0B,UAEAO,MAAA,SAAAC,GACAa,EAAAV,OACA,IACAa,OAAA,SAAAC,GACAJ,EAAAzB,MAAA,qBACAyB,EAAA5B,UAAA,UACA4B,EAAA1B,WAAA,CACA,GACA,EACAT,YAAA,WACA,KAAAS,WAAA,EACAW,EAAAA,EAAAA,KAAA,uBAAAgB,EAAA,CACAxB,KAAA,CACA4B,UAAA,KAAAzD,YACAsD,MAAA,KAAAjD,WAEA,KAAA0B,UACAO,KAAA,KAAAI,MACA,IExKIgB,GAAY,E,QAAA,GACd,EACA1E,EHqJoB,IGnJpB,EACA,KACA,KACA,MAuBF0E,EAAU3B,QAAQ4B,OAAS,kEAC3B,MAAeD,EAAiB,O","sources":["webpack://tool-base/../packages/openc3-tool-common/src/tools/base/components/Login.vue?085f","webpack://tool-base/../packages/openc3-tool-common/src/tools/base/components/Login.vue","webpack://tool-base/../packages/openc3-tool-common/src/tools/base/components/Login.vue?ebfd","webpack://tool-base/../packages/openc3-tool-common/src/tools/base/components/Login.vue?dc66"],"sourcesContent":["var render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"v-card\",\n [\n _c(\"v-card-title\", [_vm._v(\" Login \")]),\n _vm._v(\" \"),\n _c(\"v-card-subtitle\", [\n _vm._v(\n \"\\n \" +\n _vm._s(_vm.isSet ? \"Enter the\" : \"Create a\") +\n \"\\n password to begin using OpenC3\\n \"\n ),\n ]),\n _vm._v(\" \"),\n _c(\n \"v-card-text\",\n [\n _c(\n \"v-form\",\n [\n _vm.isSet && _vm.reset\n ? _c(\"v-text-field\", {\n attrs: { type: \"password\", label: \"Old Password\" },\n model: {\n value: _vm.oldPassword,\n callback: function ($$v) {\n _vm.oldPassword = $$v\n },\n expression: \"oldPassword\",\n },\n })\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"v-text-field\", {\n attrs: {\n type: \"password\",\n label: (!_vm.isSet || _vm.reset ? \"New \" : \"\") + \"Password\",\n \"data-test\": \"new-password\",\n },\n model: {\n value: _vm.password,\n callback: function ($$v) {\n _vm.password = $$v\n },\n expression: \"password\",\n },\n }),\n _vm._v(\" \"),\n _vm.reset\n ? _c(\"v-text-field\", {\n attrs: {\n rules: [_vm.rules.matchPassword],\n type: \"password\",\n label: \"Confirm Password\",\n \"data-test\": \"confirm-password\",\n },\n model: {\n value: _vm.confirmPassword,\n callback: function ($$v) {\n _vm.confirmPassword = $$v\n },\n expression: \"confirmPassword\",\n },\n })\n : _vm._e(),\n _vm._v(\" \"),\n _vm.reset\n ? _c(\n \"v-btn\",\n {\n attrs: {\n type: \"submit\",\n large: \"\",\n color: _vm.isSet ? \"warn\" : \"success\",\n disabled: !_vm.formValid,\n \"data-test\": \"set-password\",\n },\n on: {\n click: function ($event) {\n $event.preventDefault()\n return _vm.setPassword.apply(null, arguments)\n },\n },\n },\n [_vm._v(\"\\n Set\\n \")]\n )\n : _c(\n \"v-container\",\n [\n _c(\n \"v-row\",\n [\n _c(\n \"v-btn\",\n {\n attrs: {\n type: \"submit\",\n large: \"\",\n color: \"success\",\n disabled: !_vm.formValid,\n },\n on: {\n click: function ($event) {\n $event.preventDefault()\n return _vm.verifyPassword.apply(\n null,\n arguments\n )\n },\n },\n },\n [_vm._v(\"\\n Login\\n \")]\n ),\n _vm._v(\" \"),\n _c(\"v-spacer\"),\n _vm._v(\" \"),\n _c(\n \"v-btn\",\n {\n attrs: { text: \"\", small: \"\" },\n on: { click: _vm.showReset },\n },\n [_vm._v(\" Change Password \")]\n ),\n ],\n 1\n ),\n ],\n 1\n ),\n ],\n 1\n ),\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"v-alert\",\n {\n attrs: { type: _vm.alertType, dismissible: \"\" },\n model: {\n value: _vm.showAlert,\n callback: function ($$v) {\n _vm.showAlert = $$v\n },\n expression: \"showAlert\",\n },\n },\n [_vm._v(\"\\n \" + _vm._s(_vm.alert) + \"\\n \")]\n ),\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","<!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license \n# if purchased from OpenC3, Inc.\n-->\n\n<template>\n <v-card>\n <v-card-title> Login </v-card-title>\n <v-card-subtitle>\n {{ isSet ? 'Enter the' : 'Create a' }}\n password to begin using OpenC3\n </v-card-subtitle>\n <v-card-text>\n <v-form>\n <v-text-field\n v-if=\"isSet && reset\"\n v-model=\"oldPassword\"\n type=\"password\"\n label=\"Old Password\"\n />\n <v-text-field\n v-model=\"password\"\n type=\"password\"\n :label=\"`${!isSet || reset ? 'New ' : ''}Password`\"\n data-test=\"new-password\"\n />\n <v-text-field\n v-if=\"reset\"\n v-model=\"confirmPassword\"\n :rules=\"[rules.matchPassword]\"\n type=\"password\"\n label=\"Confirm Password\"\n data-test=\"confirm-password\"\n />\n <v-btn\n v-if=\"reset\"\n type=\"submit\"\n @click.prevent=\"setPassword\"\n large\n :color=\"isSet ? 'warn' : 'success'\"\n :disabled=\"!formValid\"\n data-test=\"set-password\"\n >\n Set\n </v-btn>\n <v-container v-else>\n <v-row>\n <v-btn\n type=\"submit\"\n @click.prevent=\"verifyPassword\"\n large\n color=\"success\"\n :disabled=\"!formValid\"\n >\n Login\n </v-btn>\n <v-spacer />\n <v-btn text small @click=\"showReset\"> Change Password </v-btn>\n </v-row>\n </v-container>\n </v-form>\n </v-card-text>\n <v-alert :type=\"alertType\" v-model=\"showAlert\" dismissible>\n {{ alert }}\n </v-alert>\n </v-card>\n</template>\n\n<script>\nimport Api from '../../../services/api'\n\nexport default {\n data() {\n return {\n isSet: true,\n password: '',\n confirmPassword: '',\n oldPassword: '',\n reset: false, // setting a password for the first time, or changing to a new password\n alert: '',\n alertType: 'success',\n showAlert: false,\n }\n },\n computed: {\n options: function () {\n return {\n noAuth: true,\n noScope: true, // lol\n }\n },\n rules: function () {\n return {\n matchPassword: () =>\n this.password === this.confirmPassword || 'Passwords must match',\n }\n },\n formValid: function () {\n if (this.reset) {\n if (!this.isSet) {\n return !!this.password && this.password === this.confirmPassword\n } else {\n return (\n !!this.oldPassword &&\n !!this.password &&\n this.password === this.confirmPassword\n )\n }\n } else {\n return !!this.password\n }\n },\n },\n created: function () {\n Api.get('/openc3-api/auth/token-exists', this.options).then((response) => {\n this.isSet = !!response.data.result\n if (!this.isSet) {\n this.reset = true\n }\n })\n },\n methods: {\n showReset: function () {\n this.reset = true\n },\n login: function () {\n localStorage.openc3Token = this.password\n const redirect = new URLSearchParams(window.location.search).get(\n 'redirect'\n )\n window.location = decodeURI(redirect || '/')\n },\n verifyPassword: function () {\n this.showAlert = false\n Api.post('/openc3-api/auth/verify', {\n data: {\n token: this.password,\n },\n ...this.options,\n })\n .then((response) => {\n this.login()\n })\n .catch((error) => {\n this.alert = 'Incorrect password'\n this.alertType = 'warning'\n this.showAlert = true\n })\n },\n setPassword: function () {\n this.showAlert = false\n Api.post('/openc3-api/auth/set', {\n data: {\n old_token: this.oldPassword,\n token: this.password,\n },\n ...this.options,\n }).then(this.login)\n },\n },\n}\n</script>\n","import mod from \"-!../../../../../../openc3-tool-base/node_modules/babel-loader/lib/index.js!../../../../../../openc3-tool-base/node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../openc3-tool-base/node_modules/babel-loader/lib/index.js!../../../../../../openc3-tool-base/node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Login.vue?vue&type=template&id=c187c65e&\"\nimport script from \"./Login.vue?vue&type=script&lang=js&\"\nexport * from \"./Login.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../openc3-tool-base/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/openc3/plugins/openc3-tool-base/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('c187c65e')) {\n api.createRecord('c187c65e', component.options)\n } else {\n api.reload('c187c65e', component.options)\n }\n module.hot.accept(\"./Login.vue?vue&type=template&id=c187c65e&\", function () {\n api.rerender('c187c65e', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"packages/openc3-tool-common/src/tools/base/components/Login.vue\"\nexport default component.exports"],"names":["render","_vm","this","_h","$createElement","_c","_self","_v","_s","isSet","reset","attrs","type","label","model","value","oldPassword","callback","$$v","expression","_e","password","rules","matchPassword","confirmPassword","large","color","disabled","formValid","on","click","$event","preventDefault","setPassword","apply","arguments","verifyPassword","text","small","showReset","alertType","dismissible","showAlert","alert","_withStripped","data","computed","options","noAuth","noScope","_this","created","_this2","Api","then","response","result","methods","login","localStorage","openc3Token","redirect","URLSearchParams","window","location","search","get","decodeURI","_this3","_objectSpread","token","catch","error","old_token","component","__file"],"sourceRoot":""}
1
+ {"version":3,"file":"543.openc3-tool-base.js","mappings":"wJAAA,IAAIA,EAAS,WACX,IAAIC,EAAMC,K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AAA,KACAC,EAAAA,EAAAC,IAAA,qCAAAP,SAAAQ,MAAA,SAAAC,GACAJ,EAAA3C,QAAA+C,EAAAX,KAAAY,OACAL,EAAA3C,QACA2C,EAAA1C,OAAA,EAEA,GACA,EACAgD,QAAA,CACAnB,UAAA,WACA,KAAA7B,OAAA,CACA,EACAiD,MAAA,WACAC,aAAAC,YAAA,KAAAxC,SACA,IAAAyC,EAAA,IAAAC,gBAAAC,OAAAC,SAAAC,QAAAZ,IACA,YAEAU,OAAAC,SAAAE,UAAAL,GAAA,IACA,EACA1B,eAAA,eAAAgC,EAAA,KACA,KAAA1B,WAAA,EACAW,EAAAA,EAAAgB,KAAA,0BAAAC,EAAA,CACAzB,KAAA,CACA0B,MAAA,KAAAlD,WAEA,KAAA0B,UAEAQ,MAAA,SAAAC,GACAY,EAAAT,OACA,IACAa,OAAA,SAAAC,GACAL,EAAAzB,MAAA,qBACAyB,EAAA5B,UAAA,UACA4B,EAAA1B,WAAA,CACA,GACA,EACAT,YAAA,WACA,KAAAS,WAAA,EACAW,EAAAA,EAAAgB,KAAA,uBAAAC,EAAA,CACAzB,KAAA,CACA6B,UAAA,KAAA1D,YACAuD,MAAA,KAAAlD,WAEA,KAAA0B,UACAQ,KAAA,KAAAI,MACA,IExKIgB,GAAY,E,QAAA,GACd,EACA3E,EHqJoB,IGnJpB,EACA,KACA,KACA,MAuBF2E,EAAU5B,QAAQ6B,OAAS,kEAC3B,MAAeD,EAAiB,O","sources":["webpack://tool-base/../packages/openc3-tool-common/src/tools/base/components/Login.vue?085f","webpack://tool-base/../packages/openc3-tool-common/src/tools/base/components/Login.vue","webpack://tool-base/../packages/openc3-tool-common/src/tools/base/components/Login.vue?ebfd","webpack://tool-base/../packages/openc3-tool-common/src/tools/base/components/Login.vue?dc66"],"sourcesContent":["var render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"v-card\",\n [\n _c(\"v-card-title\", [_vm._v(\" Login \")]),\n _vm._v(\" \"),\n _c(\"v-card-subtitle\", [\n _vm._v(\n \"\\n \" +\n _vm._s(_vm.isSet ? \"Enter the\" : \"Create a\") +\n \"\\n password to begin using OpenC3\\n \"\n ),\n ]),\n _vm._v(\" \"),\n _c(\n \"v-card-text\",\n [\n _c(\n \"v-form\",\n [\n _vm.isSet && _vm.reset\n ? _c(\"v-text-field\", {\n attrs: { type: \"password\", label: \"Old Password\" },\n model: {\n value: _vm.oldPassword,\n callback: function ($$v) {\n _vm.oldPassword = $$v\n },\n expression: \"oldPassword\",\n },\n })\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"v-text-field\", {\n attrs: {\n type: \"password\",\n label: (!_vm.isSet || _vm.reset ? \"New \" : \"\") + \"Password\",\n \"data-test\": \"new-password\",\n },\n model: {\n value: _vm.password,\n callback: function ($$v) {\n _vm.password = $$v\n },\n expression: \"password\",\n },\n }),\n _vm._v(\" \"),\n _vm.reset\n ? _c(\"v-text-field\", {\n attrs: {\n rules: [_vm.rules.matchPassword],\n type: \"password\",\n label: \"Confirm Password\",\n \"data-test\": \"confirm-password\",\n },\n model: {\n value: _vm.confirmPassword,\n callback: function ($$v) {\n _vm.confirmPassword = $$v\n },\n expression: \"confirmPassword\",\n },\n })\n : _vm._e(),\n _vm._v(\" \"),\n _vm.reset\n ? _c(\n \"v-btn\",\n {\n attrs: {\n type: \"submit\",\n large: \"\",\n color: _vm.isSet ? \"warn\" : \"success\",\n disabled: !_vm.formValid,\n \"data-test\": \"set-password\",\n },\n on: {\n click: function ($event) {\n $event.preventDefault()\n return _vm.setPassword.apply(null, arguments)\n },\n },\n },\n [_vm._v(\"\\n Set\\n \")]\n )\n : _c(\n \"v-container\",\n [\n _c(\n \"v-row\",\n [\n _c(\n \"v-btn\",\n {\n attrs: {\n type: \"submit\",\n large: \"\",\n color: \"success\",\n disabled: !_vm.formValid,\n },\n on: {\n click: function ($event) {\n $event.preventDefault()\n return _vm.verifyPassword.apply(\n null,\n arguments\n )\n },\n },\n },\n [_vm._v(\"\\n Login\\n \")]\n ),\n _vm._v(\" \"),\n _c(\"v-spacer\"),\n _vm._v(\" \"),\n _c(\n \"v-btn\",\n {\n attrs: { text: \"\", small: \"\" },\n on: { click: _vm.showReset },\n },\n [_vm._v(\" Change Password \")]\n ),\n ],\n 1\n ),\n ],\n 1\n ),\n ],\n 1\n ),\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"v-alert\",\n {\n attrs: { type: _vm.alertType, dismissible: \"\" },\n model: {\n value: _vm.showAlert,\n callback: function ($$v) {\n _vm.showAlert = $$v\n },\n expression: \"showAlert\",\n },\n },\n [_vm._v(\"\\n \" + _vm._s(_vm.alert) + \"\\n \")]\n ),\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","<!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n\n# Modified by OpenC3, Inc.\n# All changes Copyright 2022, OpenC3, Inc.\n# All Rights Reserved\n#\n# This file may also be used under the terms of a commercial license \n# if purchased from OpenC3, Inc.\n-->\n\n<template>\n <v-card>\n <v-card-title> Login </v-card-title>\n <v-card-subtitle>\n {{ isSet ? 'Enter the' : 'Create a' }}\n password to begin using OpenC3\n </v-card-subtitle>\n <v-card-text>\n <v-form>\n <v-text-field\n v-if=\"isSet && reset\"\n v-model=\"oldPassword\"\n type=\"password\"\n label=\"Old Password\"\n />\n <v-text-field\n v-model=\"password\"\n type=\"password\"\n :label=\"`${!isSet || reset ? 'New ' : ''}Password`\"\n data-test=\"new-password\"\n />\n <v-text-field\n v-if=\"reset\"\n v-model=\"confirmPassword\"\n :rules=\"[rules.matchPassword]\"\n type=\"password\"\n label=\"Confirm Password\"\n data-test=\"confirm-password\"\n />\n <v-btn\n v-if=\"reset\"\n type=\"submit\"\n @click.prevent=\"setPassword\"\n large\n :color=\"isSet ? 'warn' : 'success'\"\n :disabled=\"!formValid\"\n data-test=\"set-password\"\n >\n Set\n </v-btn>\n <v-container v-else>\n <v-row>\n <v-btn\n type=\"submit\"\n @click.prevent=\"verifyPassword\"\n large\n color=\"success\"\n :disabled=\"!formValid\"\n >\n Login\n </v-btn>\n <v-spacer />\n <v-btn text small @click=\"showReset\"> Change Password </v-btn>\n </v-row>\n </v-container>\n </v-form>\n </v-card-text>\n <v-alert :type=\"alertType\" v-model=\"showAlert\" dismissible>\n {{ alert }}\n </v-alert>\n </v-card>\n</template>\n\n<script>\nimport Api from '../../../services/api'\n\nexport default {\n data() {\n return {\n isSet: true,\n password: '',\n confirmPassword: '',\n oldPassword: '',\n reset: false, // setting a password for the first time, or changing to a new password\n alert: '',\n alertType: 'success',\n showAlert: false,\n }\n },\n computed: {\n options: function () {\n return {\n noAuth: true,\n noScope: true, // lol\n }\n },\n rules: function () {\n return {\n matchPassword: () =>\n this.password === this.confirmPassword || 'Passwords must match',\n }\n },\n formValid: function () {\n if (this.reset) {\n if (!this.isSet) {\n return !!this.password && this.password === this.confirmPassword\n } else {\n return (\n !!this.oldPassword &&\n !!this.password &&\n this.password === this.confirmPassword\n )\n }\n } else {\n return !!this.password\n }\n },\n },\n created: function () {\n Api.get('/openc3-api/auth/token-exists', this.options).then((response) => {\n this.isSet = !!response.data.result\n if (!this.isSet) {\n this.reset = true\n }\n })\n },\n methods: {\n showReset: function () {\n this.reset = true\n },\n login: function () {\n localStorage.openc3Token = this.password\n const redirect = new URLSearchParams(window.location.search).get(\n 'redirect'\n )\n window.location = decodeURI(redirect || '/')\n },\n verifyPassword: function () {\n this.showAlert = false\n Api.post('/openc3-api/auth/verify', {\n data: {\n token: this.password,\n },\n ...this.options,\n })\n .then((response) => {\n this.login()\n })\n .catch((error) => {\n this.alert = 'Incorrect password'\n this.alertType = 'warning'\n this.showAlert = true\n })\n },\n setPassword: function () {\n this.showAlert = false\n Api.post('/openc3-api/auth/set', {\n data: {\n old_token: this.oldPassword,\n token: this.password,\n },\n ...this.options,\n }).then(this.login)\n },\n },\n}\n</script>\n","import mod from \"-!../../../../../../openc3-tool-base/node_modules/babel-loader/lib/index.js!../../../../../../openc3-tool-base/node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../openc3-tool-base/node_modules/babel-loader/lib/index.js!../../../../../../openc3-tool-base/node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Login.vue?vue&type=template&id=c187c65e&\"\nimport script from \"./Login.vue?vue&type=script&lang=js&\"\nexport * from \"./Login.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../openc3-tool-base/node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/openc3/plugins/openc3-tool-base/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('c187c65e')) {\n api.createRecord('c187c65e', component.options)\n } else {\n api.reload('c187c65e', component.options)\n }\n module.hot.accept(\"./Login.vue?vue&type=template&id=c187c65e&\", function () {\n api.rerender('c187c65e', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"packages/openc3-tool-common/src/tools/base/components/Login.vue\"\nexport default component.exports"],"names":["render","_vm","this","_h","$createElement","_c","_self","_v","_s","isSet","reset","attrs","type","label","model","value","oldPassword","callback","$$v","expression","_e","password","rules","matchPassword","confirmPassword","large","color","disabled","formValid","on","click","$event","preventDefault","setPassword","apply","arguments","verifyPassword","text","small","showReset","alertType","dismissible","showAlert","alert","_withStripped","data","computed","options","noAuth","noScope","_this","created","_this2","Api","get","then","response","result","methods","login","localStorage","openc3Token","redirect","URLSearchParams","window","location","search","decodeURI","_this3","post","_objectSpread","token","catch","error","old_token","component","__file"],"sourceRoot":""}
Binary file
@@ -1,13 +1,13 @@
1
1
  <!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>OpenC3</title><link rel="stylesheet" href="/css/roboto.css"/><link rel="stylesheet" href="/css/materialdesignicons-7.2.96.min.css"/><link rel="stylesheet" href="/css/vuetify-2.6.14.min.css"/><script src="/js/regenerator-runtime-0.13.11.min.js"></script><meta http-equiv="Content-Security-Policy" content="default-src 'self' blob: data: http: https:; script-src 'unsafe-inline' 'unsafe-eval' http: https: blob:; connect-src blob: http: https: wss: ws:; style-src 'unsafe-inline' http: https:; object-src 'none';"><meta name="importmap-type" content="systemjs-importmap"/><script type="systemjs-importmap">{
2
2
  "imports": {
3
- "single-spa": "/js/single-spa-5.9.4.min.js",
3
+ "single-spa": "/js/single-spa-5.9.5.min.js",
4
4
  "vue": "/js/vue-2.7.14.min.js",
5
5
  "vuetify": "/js/vuetify-2.6.14.min.js",
6
6
  "vue-router": "/js/vue-router-3.5.4.min.js",
7
7
  "vuex": "/js/vuex-3.6.2.min.js",
8
8
  "openc3-tool-base": "/openc3-tool-base.js"
9
9
  }
10
- }</script><link rel="preload" href="/js/single-spa-5.9.4.min.js" as="script"/><link rel="preload" href="/js/vue-2.7.14.min.js" as="script"/><link rel="preload" href="/js/vuetify-2.6.14.min.js" as="script"/><link rel="preload" href="/js/vue-router-3.5.4.min.js" as="script"/><link rel="preload" href="/js/vuex-3.6.2.min.js" as="script"/><script type="systemjs-importmap" src="/openc3-api/map.json"></script><script src="/js/auth.js"></script><script src="/js/import-map-overrides-2.4.1.js"></script><script src="/js/system-6.12.1.min.js"></script><script src="/js/amd.min.js"></script><script src="/js/named-register.min.js"></script></head><body><div id="openc3-main"></div><import-map-overrides-full show-when-local-storage="devtools"></import-map-overrides-full><script>(function() {
10
+ }</script><link rel="preload" href="/js/single-spa-5.9.5.min.js" as="script"/><link rel="preload" href="/js/vue-2.7.14.min.js" as="script"/><link rel="preload" href="/js/vuetify-2.6.14.min.js" as="script"/><link rel="preload" href="/js/vue-router-3.5.4.min.js" as="script"/><link rel="preload" href="/js/vuex-3.6.2.min.js" as="script"/><script type="systemjs-importmap" src="/openc3-api/map.json"></script><script src="/js/auth.js"></script><script src="/js/import-map-overrides-2.4.1.js"></script><script src="/js/system-6.12.1.min.js"></script><script src="/js/amd.min.js"></script><script src="/js/named-register.min.js"></script></head><body><div id="openc3-main"></div><import-map-overrides-full show-when-local-storage="devtools"></import-map-overrides-full><script>(function() {
11
11
  Promise.all([
12
12
  System.import('single-spa'),
13
13
  System.import('vue'),
@@ -1,13 +1,13 @@
1
1
  <!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>OpenC3</title><link rel="stylesheet" href="/css/roboto.css"/><link rel="stylesheet" href="/css/materialdesignicons-7.2.96.min.css"/><link rel="stylesheet" href="/css/vuetify-2.6.14.min.css"/><script src="/js/regenerator-runtime-0.13.11.min.js"></script><meta http-equiv="Content-Security-Policy" content="default-src 'self' blob: data: https: http://localhost:* http://host.docker.internal:* http://*.local:*; script-src 'unsafe-inline' 'unsafe-eval' https: blob: http://localhost:* http://host.docker.internal:* http://*.local:*; connect-src blob: https: wss: http://localhost:* http://host.docker.internal:* http://*.local:* ws://localhost:* ws://host.docker.internal:* ws://*.local:*; style-src 'unsafe-inline' https: http://localhost:* http://host.docker.internal:* http://*.local:*; object-src 'none';"><meta name="importmap-type" content="systemjs-importmap"/><script type="systemjs-importmap">{
2
2
  "imports": {
3
- "single-spa": "/js/single-spa-5.9.4.min.js",
3
+ "single-spa": "/js/single-spa-5.9.5.min.js",
4
4
  "vue": "/js/vue-2.7.14.min.js",
5
5
  "vuetify": "/js/vuetify-2.6.14.min.js",
6
6
  "vue-router": "/js/vue-router-3.5.4.min.js",
7
7
  "vuex": "/js/vuex-3.6.2.min.js",
8
8
  "openc3-tool-base": "/openc3-tool-base.js"
9
9
  }
10
- }</script><link rel="preload" href="/js/single-spa-5.9.4.min.js" as="script"/><link rel="preload" href="/js/vue-2.7.14.min.js" as="script"/><link rel="preload" href="/js/vuetify-2.6.14.min.js" as="script"/><link rel="preload" href="/js/vue-router-3.5.4.min.js" as="script"/><link rel="preload" href="/js/vuex-3.6.2.min.js" as="script"/><script type="systemjs-importmap" src="/openc3-api/map.json"></script><script src="/js/auth.js"></script><script src="/js/import-map-overrides-2.4.1.js"></script><script src="/js/system-6.12.1.min.js"></script><script src="/js/amd.min.js"></script><script src="/js/named-register.min.js"></script></head><body><div id="openc3-main"></div><import-map-overrides-full show-when-local-storage="devtools"></import-map-overrides-full><script>(function() {
10
+ }</script><link rel="preload" href="/js/single-spa-5.9.5.min.js" as="script"/><link rel="preload" href="/js/vue-2.7.14.min.js" as="script"/><link rel="preload" href="/js/vuetify-2.6.14.min.js" as="script"/><link rel="preload" href="/js/vue-router-3.5.4.min.js" as="script"/><link rel="preload" href="/js/vuex-3.6.2.min.js" as="script"/><script type="systemjs-importmap" src="/openc3-api/map.json"></script><script src="/js/auth.js"></script><script src="/js/import-map-overrides-2.4.1.js"></script><script src="/js/system-6.12.1.min.js"></script><script src="/js/amd.min.js"></script><script src="/js/named-register.min.js"></script></head><body><div id="openc3-main"></div><import-map-overrides-full show-when-local-storage="devtools"></import-map-overrides-full><script>(function() {
11
11
  Promise.all([
12
12
  System.import('single-spa'),
13
13
  System.import('vue'),
@@ -0,0 +1 @@
1
+ System.register([],(function(t){"use strict";return{execute:function(){t({addErrorHandler:c,checkActivityFunctions:bt,ensureJQuerySupport:lt,getAppNames:Ot,getAppStatus:Tt,getMountedApps:yt,mountRootParcel:$,navigateToUrl:rt,pathToActiveWhen:Ut,registerApplication:Pt,removeErrorHandler:s,setBootstrapMaxTime:J,setMountMaxTime:Q,setUnloadMaxTime:q,setUnmountMaxTime:V,start:Gt,triggerAppChange:jt,unloadApplication:Nt,unregisterApplication:At});var n=Object.freeze({__proto__:null,get start(){return Gt},get ensureJQuerySupport(){return lt},get setBootstrapMaxTime(){return J},get setMountMaxTime(){return Q},get setUnmountMaxTime(){return V},get setUnloadMaxTime(){return q},get registerApplication(){return Pt},get unregisterApplication(){return At},get getMountedApps(){return yt},get getAppStatus(){return Tt},get unloadApplication(){return Nt},get checkActivityFunctions(){return bt},get getAppNames(){return Ot},get pathToActiveWhen(){return Ut},get navigateToUrl(){return rt},get triggerAppChange(){return jt},get addErrorHandler(){return c},get removeErrorHandler(){return s},get mountRootParcel(){return $},get NOT_LOADED(){return p},get LOADING_SOURCE_CODE(){return h},get NOT_BOOTSTRAPPED(){return m},get BOOTSTRAPPING(){return d},get NOT_MOUNTED(){return v},get MOUNTING(){return w},get UPDATING(){return E},get LOAD_ERROR(){return T},get MOUNTED(){return g},get UNLOADING(){return O},get UNMOUNTING(){return y},get SKIP_BECAUSE_BROKEN(){return P}});function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var o=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).CustomEvent,i=function(){try{var t=new o("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?o:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(t,n){var e=document.createEvent("CustomEvent");return n?e.initCustomEvent(t,n.bubbles,n.cancelable,n.detail):e.initCustomEvent(t,!1,!1,void 0),e}:function(t,n){var e=document.createEventObject();return e.type=t,n?(e.bubbles=Boolean(n.bubbles),e.cancelable=Boolean(n.cancelable),e.detail=n.detail):(e.bubbles=!1,e.cancelable=!1,e.detail=void 0),e},u=[];function a(t,n,e){var r=l(t,n,e);u.length?u.forEach((function(t){return t(r)})):setTimeout((function(){throw r}))}function c(t){if("function"!=typeof t)throw Error(f(28,!1));u.push(t)}function s(t){if("function"!=typeof t)throw Error(f(29,!1));var n=!1;return u=u.filter((function(e){var r=e===t;return n=n||r,!r})),n}function f(t,n){for(var e=arguments.length,r=new Array(e>2?e-2:0),o=2;o<e;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(t,": ").concat(n?n+" ":"","See https://single-spa.js.org/error/?code=").concat(t).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function l(t,n,e){var r,o="".concat(_(n)," '").concat(N(n),"' died in status ").concat(n.status,": ");if(t instanceof Error){try{t.message=o+t.message}catch(t){}r=t}else{console.warn(f(30,!1,n.status,N(n)));try{r=Error(o+JSON.stringify(t))}catch(n){r=t}}return r.appOrParcelName=N(n),n.status=e,r}var p=t("NOT_LOADED","NOT_LOADED"),h=t("LOADING_SOURCE_CODE","LOADING_SOURCE_CODE"),m=t("NOT_BOOTSTRAPPED","NOT_BOOTSTRAPPED"),d=t("BOOTSTRAPPING","BOOTSTRAPPING"),v=t("NOT_MOUNTED","NOT_MOUNTED"),w=t("MOUNTING","MOUNTING"),g=t("MOUNTED","MOUNTED"),E=t("UPDATING","UPDATING"),y=t("UNMOUNTING","UNMOUNTING"),O=t("UNLOADING","UNLOADING"),T=t("LOAD_ERROR","LOAD_ERROR"),P=t("SKIP_BECAUSE_BROKEN","SKIP_BECAUSE_BROKEN");function b(t){return t.status===g}function A(t){try{return t.activeWhen(window.location)}catch(n){return a(n,t,P),!1}}function N(t){return t.name}function S(t){return Boolean(t.unmountThisParcel)}function _(t){return S(t)?"parcel":"application"}function U(){for(var t=arguments.length-1;t>0;t--)for(var n in arguments[t])"__proto__"!==n&&(arguments[t-1][n]=arguments[t][n]);return arguments[0]}function D(t,n){for(var e=0;e<t.length;e++)if(n(t[e]))return t[e];return null}function M(t){return t&&("function"==typeof t||(n=t,Array.isArray(n)&&!D(n,(function(t){return"function"!=typeof t}))));var n}function L(t,n){var e=t[n]||[];0===(e=Array.isArray(e)?e:[e]).length&&(e=[function(){return Promise.resolve()}]);var r=_(t),o=N(t);return function(t){return e.reduce((function(e,i,u){return e.then((function(){var e=i(t);return j(e)?e:Promise.reject(f(15,!1,r,o,n,u))}))}),Promise.resolve())}}function j(t){return t&&"function"==typeof t.then&&"function"==typeof t.catch}function R(t,n){return Promise.resolve().then((function(){return t.status!==m?t:(t.status=d,t.bootstrap?z(t,"bootstrap").then(e).catch((function(e){if(n)throw l(e,t,P);return a(e,t,P),t})):Promise.resolve().then(e))}));function e(){return t.status=v,t}}function I(t,n){return Promise.resolve().then((function(){if(t.status!==g)return t;t.status=y;var e=Object.keys(t.parcels).map((function(n){return t.parcels[n].unmountThisParcel()}));return Promise.all(e).then(r,(function(e){return r().then((function(){var r=Error(e.message);if(n)throw l(r,t,P);a(r,t,P)}))})).then((function(){return t}));function r(){return z(t,"unmount").then((function(){t.status=v})).catch((function(e){if(n)throw l(e,t,P);a(e,t,P)}))}}))}var x=!1,G=!1;function B(t,n){return Promise.resolve().then((function(){return t.status!==v?t:(x||(window.dispatchEvent(new i("single-spa:before-first-mount")),x=!0),z(t,"mount").then((function(){return t.status=g,G||(window.dispatchEvent(new i("single-spa:first-mount")),G=!0),t})).catch((function(e){return t.status=g,I(t,!0).then(r,r);function r(){if(n)throw l(e,t,P);return a(e,t,P),t}})))}))}var C=0,W={parcels:{}};function $(){return k.apply(W,arguments)}function k(t,n){var r=this;if(!t||"object"!==e(t)&&"function"!=typeof t)throw Error(f(2,!1));if(t.name&&"string"!=typeof t.name)throw Error(f(3,!1,e(t.name)));if("object"!==e(n))throw Error(f(4,!1,name,e(n)));if(!n.domElement)throw Error(f(5,!1,name));var o,i=C++,u="function"==typeof t,a=u?t:function(){return Promise.resolve(t)},c={id:i,parcels:{},status:u?h:m,customProps:n,parentName:N(r),unmountThisParcel:function(){return y.then((function(){if(c.status!==g)throw Error(f(6,!1,name,c.status));return I(c,!0)})).then((function(t){return c.parentName&&delete r.parcels[c.id],t})).then((function(t){return p(t),t})).catch((function(t){throw c.status=P,d(t),t}))}};r.parcels[i]=c;var s=a();if(!s||"function"!=typeof s.then)throw Error(f(7,!1));var p,d,w=(s=s.then((function(t){if(!t)throw Error(f(8,!1));var n=t.name||"parcel-".concat(i);if(Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!M(t.bootstrap))throw Error(f(9,!1,n));if(!M(t.mount))throw Error(f(10,!1,n));if(!M(t.unmount))throw Error(f(11,!1,n));if(t.update&&!M(t.update))throw Error(f(12,!1,n));var e=L(t,"bootstrap"),r=L(t,"mount"),u=L(t,"unmount");c.status=m,c.name=n,c.bootstrap=e,c.mount=r,c.unmount=u,c.timeouts=X(t.timeouts),t.update&&(c.update=L(t,"update"),o.update=function(t){return c.customProps=t,K(function(t){return Promise.resolve().then((function(){if(t.status!==g)throw Error(f(32,!1,N(t)));return t.status=E,z(t,"update").then((function(){return t.status=g,t})).catch((function(n){throw l(n,t,P)}))}))}(c))})}))).then((function(){return R(c,!0)})),y=w.then((function(){return B(c,!0)})),O=new Promise((function(t,n){p=t,d=n}));return o={mount:function(){return K(Promise.resolve().then((function(){if(c.status!==v)throw Error(f(13,!1,name,c.status));return r.parcels[i]=c,B(c)})))},unmount:function(){return K(c.unmountThisParcel())},getStatus:function(){return c.status},loadPromise:K(s),bootstrapPromise:K(w),mountPromise:K(y),unmountPromise:K(O)}}function K(t){return t.then((function(){return null}))}function F(t){var r=N(t),o="function"==typeof t.customProps?t.customProps(r,window.location):t.customProps;("object"!==e(o)||null===o||Array.isArray(o))&&(o={},console.warn(f(40,!1),r,o));var i=U({},o,{name:r,mountParcel:k.bind(t),singleSpa:n});return S(t)&&(i.unmountSelf=t.unmountThisParcel),i}var H={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function J(t,n,e){if("number"!=typeof t||t<=0)throw Error(f(16,!1));H.bootstrap={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function Q(t,n,e){if("number"!=typeof t||t<=0)throw Error(f(17,!1));H.mount={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function V(t,n,e){if("number"!=typeof t||t<=0)throw Error(f(18,!1));H.unmount={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function q(t,n,e){if("number"!=typeof t||t<=0)throw Error(f(19,!1));H.unload={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function z(t,n){var e=t.timeouts[n],r=e.warningMillis,o=_(t);return new Promise((function(i,u){var a=!1,c=!1;t[n](F(t)).then((function(t){a=!0,i(t)})).catch((function(t){a=!0,u(t)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),e.millis);var s=f(31,!1,n,o,N(t),e.millis);function l(t){if(!a)if(!0===t)c=!0,e.dieOnTimeout?u(Error(s)):console.error(s);else if(!c){var n=t,o=n*r;console.warn(s),o+r<e.millis&&setTimeout((function(){return l(n+1)}),r)}}}))}function X(t){var n={};for(var e in H)n[e]=U({},H[e],t&&t[e]||{});return n}function Y(t){return Promise.resolve().then((function(){return t.loadPromise?t.loadPromise:t.status!==p&&t.status!==T?t:(t.status=h,t.loadPromise=Promise.resolve().then((function(){var o=t.loadApp(F(t));if(!j(o))throw r=!0,Error(f(33,!1,N(t)));return o.then((function(r){var o;t.loadErrorTime=null,"object"!==e(n=r)&&(o=34),Object.prototype.hasOwnProperty.call(n,"bootstrap")&&!M(n.bootstrap)&&(o=35),M(n.mount)||(o=36),M(n.unmount)||(o=37);var i=_(n);if(o){var u;try{u=JSON.stringify(n)}catch(t){}return console.error(f(o,!1,i,N(t),u),n),a(void 0,t,P),t}return n.devtools&&n.devtools.overlays&&(t.devtools.overlays=U({},t.devtools.overlays,n.devtools.overlays)),t.status=m,t.bootstrap=L(n,"bootstrap"),t.mount=L(n,"mount"),t.unmount=L(n,"unmount"),t.unload=L(n,"unload"),t.timeouts=X(n.timeouts),delete t.loadPromise,t}))})).catch((function(n){var e;return delete t.loadPromise,r?e=P:(e=T,t.loadErrorTime=(new Date).getTime()),a(n,t,e),t})));var n,r}))}var Z,tt="undefined"!=typeof window,nt={hashchange:[],popstate:[]},et=["hashchange","popstate"];function rt(t){var n;if("string"==typeof t)n=t;else if(this&&this.href)n=this.href;else{if(!(t&&t.currentTarget&&t.currentTarget.href&&t.preventDefault))throw Error(f(14,!1));n=t.currentTarget.href,t.preventDefault()}var e=st(window.location.href),r=st(n);0===n.indexOf("#")?window.location.hash=r.hash:e.host!==r.host&&r.host?window.location.href=n:r.pathname===e.pathname&&r.search===e.search?window.location.hash=r.hash:window.history.pushState(null,null,n)}function ot(t){var n=this;if(t){var e=t[0].type;et.indexOf(e)>=0&&nt[e].forEach((function(e){try{e.apply(n,t)}catch(t){setTimeout((function(){throw t}))}}))}}function it(){Rt([],arguments)}function ut(t,n){return function(){var e=window.location.href,r=t.apply(this,arguments),o=window.location.href;return Z&&e===o||(Bt()?window.dispatchEvent(function(t,n){var e;try{e=new PopStateEvent("popstate",{state:t})}catch(n){(e=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,t)}return e.singleSpa=!0,e.singleSpaTrigger=n,e}(window.history.state,n)):Rt([])),r}}if(tt){window.addEventListener("hashchange",it),window.addEventListener("popstate",it);var at=window.addEventListener,ct=window.removeEventListener;window.addEventListener=function(t,n){if(!("function"==typeof n&&et.indexOf(t)>=0)||D(nt[t],(function(t){return t===n})))return at.apply(this,arguments);nt[t].push(n)},window.removeEventListener=function(t,n){if(!("function"==typeof n&&et.indexOf(t)>=0))return ct.apply(this,arguments);nt[t]=nt[t].filter((function(t){return t!==n}))},window.history.pushState=ut(window.history.pushState,"pushState"),window.history.replaceState=ut(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(f(41,!1)):window.singleSpaNavigate=rt}function st(t){var n=document.createElement("a");return n.href=t,n}var ft=!1;function lt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(t||window.$&&window.$.fn&&window.$.fn.jquery&&(t=window.$),t&&!ft){var n=t.fn.on,e=t.fn.off;t.fn.on=function(t,e){return pt.call(this,n,window.addEventListener,t,e,arguments)},t.fn.off=function(t,n){return pt.call(this,e,window.removeEventListener,t,n,arguments)},ft=!0}}function pt(t,n,e,r,o){return"string"!=typeof e?t.apply(this,o):(e.split(/\s+/).forEach((function(t){et.indexOf(t)>=0&&(n(t,r),e=e.replace(t,""))})),""===e.trim()?this:t.apply(this,o))}var ht={};function mt(t){return Promise.resolve().then((function(){var n=ht[N(t)];if(!n)return t;if(t.status===p)return dt(t,n),t;if(t.status===O)return n.promise.then((function(){return t}));if(t.status!==v&&t.status!==T)return t;var e=t.status===T?Promise.resolve():z(t,"unload");return t.status=O,e.then((function(){return dt(t,n),t})).catch((function(e){return function(t,n,e){delete ht[N(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,a(e,t,P),n.reject(e)}(t,n,e),t}))}))}function dt(t,n){delete ht[N(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,t.status=p,n.resolve()}function vt(t,n,e,r){ht[N(t)]={app:t,resolve:e,reject:r},Object.defineProperty(ht[N(t)],"promise",{get:n})}function wt(t){return ht[t]}var gt=[];function Et(){var t=[],n=[],e=[],r=[],o=(new Date).getTime();return gt.forEach((function(i){var u=i.status!==P&&A(i);switch(i.status){case T:u&&o-i.loadErrorTime>=200&&e.push(i);break;case p:case h:u&&e.push(i);break;case m:case v:!u&&wt(N(i))?t.push(i):u&&r.push(i);break;case g:u||n.push(i)}})),{appsToUnload:t,appsToUnmount:n,appsToLoad:e,appsToMount:r}}function yt(){return gt.filter(b).map(N)}function Ot(){return gt.map(N)}function Tt(t){var n=D(gt,(function(n){return N(n)===t}));return n?n.status:null}function Pt(t,n,r,o){var i=function(t,n,r,o){var i,u={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===e(t)?(function(t){if(Array.isArray(t)||null===t)throw Error(f(39,!1));var n=["name","app","activeWhen","customProps"],r=Object.keys(t).reduce((function(t,e){return n.indexOf(e)>=0?t:t.concat(e)}),[]);if(0!==r.length)throw Error(f(38,!1,n.join(", "),r.join(", ")));if("string"!=typeof t.name||0===t.name.length)throw Error(f(20,!1));if("object"!==e(t.app)&&"function"!=typeof t.app)throw Error(f(20,!1));var o=function(t){return"string"==typeof t||"function"==typeof t};if(!(o(t.activeWhen)||Array.isArray(t.activeWhen)&&t.activeWhen.every(o)))throw Error(f(24,!1));if(!_t(t.customProps))throw Error(f(22,!1))}(t),u.name=t.name,u.loadApp=t.app,u.activeWhen=t.activeWhen,u.customProps=t.customProps):(function(t,n,e,r){if("string"!=typeof t||0===t.length)throw Error(f(20,!1));if(!n)throw Error(f(23,!1));if("function"!=typeof e)throw Error(f(24,!1));if(!_t(r))throw Error(f(22,!1))}(t,n,r,o),u.name=t,u.loadApp=n,u.activeWhen=r,u.customProps=o),u.loadApp="function"!=typeof(i=u.loadApp)?function(){return Promise.resolve(i)}:i,u.customProps=function(t){return t||{}}(u.customProps),u.activeWhen=function(t){var n=Array.isArray(t)?t:[t];return n=n.map((function(t){return"function"==typeof t?t:Ut(t)})),function(t){return n.some((function(n){return n(t)}))}}(u.activeWhen),u}(t,n,r,o);if(-1!==Ot().indexOf(i.name))throw Error(f(21,!1,i.name));gt.push(U({loadErrorTime:null,status:p,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},i)),tt&&(lt(),Rt())}function bt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return gt.filter((function(n){return n.activeWhen(t)})).map(N)}function At(t){if(0===gt.filter((function(n){return N(n)===t})).length)throw Error(f(25,!1,t));return Nt(t).then((function(){var n=gt.map(N).indexOf(t);gt.splice(n,1)}))}function Nt(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof t)throw Error(f(26,!1));var e=D(gt,(function(n){return N(n)===t}));if(!e)throw Error(f(27,!1,t));var r,o=wt(N(e));if(n&&n.waitForUnmount){if(o)return o.promise;var i=new Promise((function(t,n){vt(e,(function(){return i}),t,n)}));return i}return o?(r=o.promise,St(e,o.resolve,o.reject)):r=new Promise((function(t,n){vt(e,(function(){return r}),t,n),St(e,t,n)})),r}function St(t,n,e){I(t).then(mt).then((function(){n(),setTimeout((function(){Rt()}))})).catch(e)}function _t(t){return!t||"function"==typeof t||"object"===e(t)&&null!==t&&!Array.isArray(t)}function Ut(t,n){var e=function(t,n){var e=0,r=!1,o="^";"/"!==t[0]&&(t="/"+t);for(var i=0;i<t.length;i++){var u=t[i];(!r&&":"===u||r&&"/"===u)&&a(i)}return a(t.length),new RegExp(o,"i");function a(i){var u=t.slice(e,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":u,i===t.length)if(r)n&&(o+="$");else{var a=n?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(a,"$"):"".concat(o,"(/").concat(a,")?(#.*)?$")}r=!r,e=i}}(t,n);return function(t){var n=t.origin;n||(n="".concat(t.protocol,"//").concat(t.host));var r=t.href.replace(n,"").replace(t.search,"").split("?")[0];return e.test(r)}}var Dt=!1,Mt=[],Lt=tt&&window.location.href;function jt(){return Rt()}function Rt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(Dt)return new Promise((function(t,e){Mt.push({resolve:t,reject:e,eventArguments:n})}));var e,o=Et(),u=o.appsToUnload,a=o.appsToUnmount,c=o.appsToLoad,s=o.appsToMount,f=!1,l=Lt,h=Lt=window.location.href;return Bt()?(Dt=!0,e=u.concat(c,a,s),Promise.resolve().then((function(){if(window.dispatchEvent(new i(0===e.length?"single-spa:before-no-app-change":"single-spa:before-app-change",E(!0))),window.dispatchEvent(new i("single-spa:before-routing-event",E(!0,{cancelNavigation:m}))),f)return window.dispatchEvent(new i("single-spa:before-mount-routing-event",E(!0))),d(),void rt(l);var n=u.map(mt),r=a.map(I).map((function(t){return t.then(mt)})).concat(n),o=Promise.all(r);o.then((function(){window.dispatchEvent(new i("single-spa:before-mount-routing-event",E(!0)))}));var p=c.map((function(t){return Y(t).then((function(t){return It(t,o)}))})),h=s.filter((function(t){return c.indexOf(t)<0})).map((function(t){return It(t,o)}));return o.catch((function(t){throw w(),t})).then((function(){return w(),Promise.all(p.concat(h)).catch((function(n){throw t.forEach((function(t){return t.reject(n)})),n})).then(d)}))}))):(e=c,Promise.resolve().then((function(){var t=c.map(Y);return Promise.all(t).then(w).then((function(){return[]})).catch((function(t){throw w(),t}))})));function m(){f=!0}function d(){var n=yt();t.forEach((function(t){return t.resolve(n)}));try{var r=0===e.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new i(r,E())),window.dispatchEvent(new i("single-spa:routing-event",E()))}catch(t){setTimeout((function(){throw t}))}if(Dt=!1,Mt.length>0){var o=Mt;Mt=[],Rt(o)}return n}function w(){t.forEach((function(t){ot(t.eventArguments)})),ot(n)}function E(){var t,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,m={},d=(r(t={},g,[]),r(t,v,[]),r(t,p,[]),r(t,P,[]),t);o?(c.concat(s).forEach((function(t,n){E(t,g)})),u.forEach((function(t){E(t,p)})),a.forEach((function(t){E(t,v)}))):e.forEach((function(t){E(t)}));var w={detail:{newAppStatuses:m,appsByNewStatus:d,totalAppChanges:e.length,originalEvent:null==n?void 0:n[0],oldUrl:l,newUrl:h,navigationIsCanceled:f}};return i&&U(w.detail,i),w;function E(t,n){var e=N(t);n=n||Tt(e),m[e]=n,(d[n]=d[n]||[]).push(e)}}}function It(t,n){return A(t)?R(t).then((function(t){return n.then((function(){return A(t)?B(t):t}))})):n.then((function(){return t}))}var xt=!1;function Gt(t){var n;xt=!0,t&&t.urlRerouteOnly&&(n=t.urlRerouteOnly,Z=n),tt&&Rt()}function Bt(){return xt}tt&&setTimeout((function(){xt||console.warn(f(1,!1))}),5e3);var Ct={getRawAppData:function(){return[].concat(gt)},reroute:Rt,NOT_LOADED:p,toLoadPromise:Y,toBootstrapPromise:R,unregisterApplication:At};tt&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Ct)}}}));