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SAAUY,KAAKX,UACxC4B,SAAQ,IAAMjB,KAAKV,iBAAkB,IAE3CU,KAAKN,OAGTE,QAAQC,IAAI,iBAAkBG,KAAKN,OACnCM,KAAKd,OAAOgC,SAASlB,KAAKN,QAH1BM,KAAKd,OAAOgC,SAASlB,KAAKZ,SAKzB,GA7DSL,E,mUAAK,EADjB,EAAAoC,W,kIAagC,IAAoC,KAAoB,QAZ5EpC,E,gICDNgC,eAAeK,EAAUC,GAC/BA,EAAQC,IACNC,wBACAC,QAAQ,mBACRC,OAAO,6BACPA,OAAO,cACPA,OAAO,wBAA8CC,GAAaA,EAAIC,yBAA0B,IAChGF,OAAO,kBAAwCG,IAC/CA,EAAOC,cACPD,EAAOE,OAAO,IACdF,EAAOG,SAASC,MAAO,EACvBJ,EAAOG,SAASE,gBAAiB,EACjCL,EAAOG,SAASG,sBAAuB,EACvCN,EAAOG,SAASI,eAAiB,KACjCP,EAAOG,SAASK,SAAW,CAAC,QAAS,SAAS,IAE9CX,OAAO,gBAAqCV,MAAOsB,IACnD,IAAIC,EAAU,CAAC,IAAK,QAGpB,OAFA,EAAAC,iBAAA,iBAAkCD,GAClCD,EAASG,QAAQlB,IAAI,KACde,EAASI,MAAM,CACrBC,QAAS,CAAEC,SAAU,2CACrBC,WAAYN,EACZO,IAAK,KACLC,YAAa,KACbC,OAAO,EACPC,6BAA6B,GAC5B,IAIJ3B,EAAQC,IAAI2B,mBAAmB,QAAoB,OAAS,QACxD,WACH5B,EAAQC,IAAIG,OAAO,yBAGdJ,EAAQ6B,cAKR7B,EAAQ8B,UAAUC,IAAI,MAAWC,mBACjChC,EAAQ8B,UAAUC,IAAI,MAAWC,mBACjChC,EAAQ8B,UAAUC,IAAI,MAAWC,mBACjChC,EAAQ8B,UAAUC,IAAI,KAA6BC,mBAGnDhC,EAAQiC,QAAQ,cACvB,C","sources":["webpack://client-app/./src/login/login.scss","webpack://client-app/./src/login/login.html","webpack://client-app/./src/login/login.ts","webpack://client-app/./src/main.ts"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nimport ___CSS_LOADER_GET_URL_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/getUrl.js\";\nvar ___CSS_LOADER_URL_IMPORT_0___ = new URL(\"/static/images/bg-image.webp\", import.meta.url);\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".login-container{width:100vw;height:100vh;background:url(\" + ___CSS_LOADER_URL_REPLACEMENT_0___ + \");background-size:cover;overflow-y:hidden}.login-container__center-box{max-width:500px;min-width:300px;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);width:30%;border-radius:5px;background-color:#fff}@media screen and (max-width: 640px){.login-container__center-box{width:100%;height:100%;max-width:700px;border-radius:0}}@media screen and (max-width: 640px){.login-container__center-box .login-content{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);width:100%;height:fit-content}}.login-container__center-box .login-content__logo-container{width:75%;top:20px;margin:0 auto;margin-top:20px;margin-bottom:20px;position:relative}.login-container__center-box .login-content .input-area{width:100%;padding:30px;padding-bottom:15px}.login-container__center-box .login-content .input-area div{margin-bottom:10px}.login-container__center-box .login-content .input-area div a{text-decoration:none}.login-container__center-box .login-content .input-area button{width:100%}.login-container__center-box .login-content .input-area button .login-processing.text{margin-left:calc(15px / 3)}.login-container__center-box .login-content .input-area button .custom-spinner{display:inline-block;background:rgba(0,0,0,0);border-top:2px solid #fff;border-left:2px solid rgba(0,0,0,.05);border-right:2px solid rgba(0,0,0,.05);border-bottom:2px solid rgba(0,0,0,.05);border-radius:50%;min-height:calc(15px - 2px);max-height:calc(15px - 2px);min-width:calc(15px - 2px);max-width:calc(15px - 2px);animation:rotating .75s linear infinite}.login-container__center-box .login-content .login-info-footer{width:100%;text-align:center;margin-bottom:20px;padding-left:30px;padding-right:30px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/login/login.scss\"],\"names\":[],\"mappings\":\"AACA,iBACI,WAAA,CACA,YAAA,CACA,kDAAA,CACA,qBAAA,CACA,iBAAA,CACA,6BACI,eAAA,CACA,eAAA,CACA,iBAAA,CACA,QAAA,CACA,OAAA,CACA,+BAAA,CACA,SAAA,CAOA,iBAAA,CACA,qBAAA,CAPA,qCARJ,6BASQ,UAAA,CACA,WAAA,CACA,eAAA,CACA,eAAA,CAAA,CAKA,qCADJ,4CAEQ,iBAAA,CACA,QAAA,CACA,OAAA,CACA,+BAAA,CACA,UAAA,CACA,kBAAA,CAAA,CAEJ,4DACI,SAAA,CACA,QAAA,CACA,aAAA,CACA,eAAA,CACA,kBAAA,CACA,iBAAA,CAEJ,wDACI,UAAA,CACA,YAAA,CACA,mBAAA,CACA,4DAII,kBAAA,CAHA,8DACI,oBAAA,CAIR,+DACI,UAAA,CAEI,sFACI,0BAAA,CAGR,+EACI,oBAAA,CACA,wBAAA,CACA,yBAAA,CACA,qCAAA,CACA,sCAAA,CACA,uCAAA,CACA,iBAAA,CACA,2BAAA,CACA,2BAAA,CACA,0BAAA,CACA,0BAAA,CAEA,uCAAA,CAIZ,+DACI,UAAA,CACA,iBAAA,CACA,kBAAA,CACA,iBAAA,CACA,kBAAA\",\"sourcesContent\":[\"@import \\\"src/resources/customized-styles/variables\\\";\\r\\n.login-container {\\r\\n width: 100vw;\\r\\n height: 100vh;\\r\\n background: url('/static/images/bg-image.webp');\\r\\n background-size: cover;\\r\\n overflow-y:hidden;\\r\\n &__center-box {\\r\\n max-width: 500px;\\r\\n min-width:300px;\\r\\n position: absolute;\\r\\n left: 50%;\\r\\n top:50%;\\r\\n transform: translate(-50%,-50%);\\r\\n width: 30%;\\r\\n @media screen and (max-width: 640px) {\\r\\n width: 100%;\\r\\n height: 100%;\\r\\n max-width: 700px;\\r\\n border-radius: 0;\\r\\n }\\r\\n border-radius: 5px;\\r\\n background-color: white;\\r\\n .login-content {\\r\\n @media screen and (max-width: 640px) {\\r\\n position:absolute;\\r\\n left: 50%;\\r\\n top:50%;\\r\\n transform: translate(-50%,-50%);\\r\\n width: 100%;\\r\\n height:fit-content\\r\\n }\\r\\n &__logo-container {\\r\\n width: 75%;\\r\\n top:20px;\\r\\n margin: 0 auto;\\r\\n margin-top: 20px;\\r\\n margin-bottom:20px;\\r\\n position: relative;\\r\\n }\\r\\n .input-area {\\r\\n width:100%;\\r\\n padding: 30px;\\r\\n padding-bottom: 15px;\\r\\n div {\\r\\n a {\\r\\n text-decoration: none;\\r\\n }\\r\\n margin-bottom: 10px;\\r\\n }\\r\\n button {\\r\\n width:100%;\\r\\n .login-processing {\\r\\n &.text {\\r\\n margin-left: calc(#{$gutter} / 3);\\r\\n }\\r\\n }\\r\\n .custom-spinner {\\r\\n display: inline-block;\\r\\n background: transparent;\\r\\n border-top: 2px solid white;\\r\\n border-left: 2px solid rgba(0,0,0,0.05);\\r\\n border-right: 2px solid rgba(0,0,0,0.05);\\r\\n border-bottom: 2px solid rgba(0,0,0,0.05);\\r\\n border-radius: 50%;\\r\\n min-height: calc(#{$gutter} - 2px);\\r\\n max-height: calc(#{$gutter} - 2px);\\r\\n min-width: calc(#{$gutter} - 2px);\\r\\n max-width: calc(#{$gutter} - 2px);\\r\\n \\r\\n animation: rotating .75s linear infinite;\\r\\n }\\r\\n }\\r\\n }\\r\\n .login-info-footer {\\r\\n width: 100%;\\r\\n text-align: center;\\r\\n margin-bottom: 20px;\\r\\n padding-left:30px;\\r\\n padding-right:30px;\\r\\n }\\r\\n }\\r\\n }\\r\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","module.exports = \"\\r\\n\\r\\n\";","import { UserSessionService } from 'app/services/user-session-service';\r\nimport { autoinject } from 'aurelia-framework';\r\nimport * as settings from 'app-settings.json';\r\nimport { Router } from 'aurelia-router';\r\nimport {ApiClient} from \"../app/services/api-client\";\r\n\r\nimport * as environment from '../../config/environment.json';\r\n\r\n@autoinject\r\nexport class Login {\r\n public username: string = \"\"; // Can we make aurelia screen cooperate with browser prefill?\r\n public password: string = \"\";\r\n\r\n\tpublic loginProcessing: Boolean = false;\r\n\tpublic clientVersion: string = \"\";\r\n\tpublic devOrProd: string = '-';\r\n\tprivate forgotPasswordUrl: string = \"\";\r\n\r\n\tpublic redir:string='';\r\n\tprivate hasFocus: boolean = false;\r\n\r\n constructor(private session: UserSessionService, private router: Router, public api: ApiClient) {\r\n\t\tconsole.log('login ctor');\r\n }\r\n\r\n\tactivate(params: any) {\r\n\t\tconsole.log('login activate, params:', params);\r\n\t\tthis.setForgotPasswordUrl();\r\n\t\tthis.hasFocus = true;\r\n\r\n\t\tthis.redir=params.redir;\r\n\t\t\r\n\t\t// Ensure clean app state\r\n\t\tif (Boolean(sessionStorage.getItem('access_token'))) {\r\n\t\t\tsessionStorage.removeItem('access_token');\r\n\t\t}\r\n\t\tthis.clientVersion = settings.version;\r\n\t\t//let nodeEnv = process.env.NODE_ENV; JG: What was I thinking? There is no Node Env on the client?? n:[${nodeEnv}] \r\n\t\tthis.devOrProd = `d:${(environment.debug ? 1 : 0)} t:${(environment.testing ? 1 : 0)} src:[${environment.env_src}]`;\r\n\r\n\t\tif (Array.isArray(params) && 'byReset' in params) {\r\n\t\t\tconsole.log('activated by reset.');\r\n\t\t\tthis.login();\r\n\t\t} // JG: This can only work, if some mechanism\r\n\t\t//// will pre-fill login fields.\r\n\t\t//// Can we improve our login screen to cooperate with pre-fill?\r\n }\r\n\r\n\tprivate setForgotPasswordUrl(): void {\r\n\t\tlet L = window.location;\r\n\t\tlet host = `${L.protocol}//${L.host}`; \r\n\t\tthis.forgotPasswordUrl = host + \"/#/forgot-password\";\r\n\t}\r\n\r\n get signUpUrl():string{ return settings.externalUrls.signUp; }\r\n public async login() {\r\n\t\tif (!this.username) {\r\n\t\t\tconsole.log('no username - ignoring login attempt.');\r\n\t\t}\r\n\r\n\t\tthis.loginProcessing = true;\r\n await this.session.logIn(this.username, this.password)\r\n .finally(() => this.loginProcessing = false); \r\n\r\n\t\tif (!this.redir) {\r\n\t\t\tthis.router.navigate(this.username);\r\n\t\t} else {\r\n\t\t\tconsole.log('attempt redir:', this.redir);\r\n\t\t\tthis.router.navigate(this.redir);\r\n\t\t}\r\n }\r\n}\r\n","import { ApiClient, BimClient, AWJClient } from 'app/services/api-client';\r\nimport { Aurelia } from 'aurelia-framework'\r\nimport * as environment from '../config/environment.json';\r\nimport { PLATFORM } from 'aurelia-pal';\r\nimport { I18N, TCustomAttribute } from 'aurelia-i18n';\r\nimport Backend from 'i18next-http-backend';\r\nimport { GlobalRejectionErrorHandler } from 'app/services/global-rejection-error-handler'\r\n\r\nexport async function configure(aurelia: Aurelia) {\r\n\taurelia.use\r\n\t\t.standardConfiguration()\r\n\t\t.feature(PLATFORM.moduleName('resources/index'))\r\n\t\t.plugin(PLATFORM.moduleName('aurelia-ui-virtualization'))\r\n\t\t.plugin(PLATFORM.moduleName('sortablejs'))\r\n\t\t.plugin(PLATFORM.moduleName(\"aurelia-animator-css\"), (cfg: any) => cfg.useAnimationDoneClasses = true)\r\n\t\t.plugin(PLATFORM.moduleName('aurelia-dialog'), (config: any) => {\r\n\t\t\tconfig.useDefaults();\r\n\t\t\tconfig.useCSS(''); // default aurelia-dialog styles have been copied to modal.scss and changed a little bit, because the default styling was interfering with theme styles\r\n\t\t\tconfig.settings.lock = true;\r\n\t\t\tconfig.settings.overlayDismiss = true;\r\n\t\t\tconfig.settings.centerHorizontalOnly = true;\r\n\t\t\tconfig.settings.startingZIndex = 8080;\r\n\t\t\tconfig.settings.keyboard = ['Enter', 'Escape']; //true;\r\n\t\t})\r\n\t\t.plugin(PLATFORM.moduleName('aurelia-i18n'), async (instance: I18N) => {\r\n\t\t\tlet aliases = ['t', 'i18n'];\r\n\t\t\tTCustomAttribute.configureAliases(aliases);\r\n\t\t\tinstance.i18next.use(Backend);\r\n\t\t\treturn instance.setup({\r\n\t\t\t\tbackend: { loadPath: './resources/locales/{{lng}}/{{ns}}.json' },\r\n\t\t\t\tattributes: aliases,\r\n\t\t\t\tlng: 'da',\r\n\t\t\t\tfallbackLng: 'en',\r\n\t\t\t\tdebug: false,\r\n\t\t\t\tskipTranslationOnMissingKey: true\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t//aurelia.use.developmentLogging('warn'); \r\n\taurelia.use.developmentLogging(environment.debug ? 'info' : 'warn');\r\n\tif (environment.testing) {\r\n\t\taurelia.use.plugin(PLATFORM.moduleName('aurelia-testing'));\r\n\t}\r\n\t\r\n\tawait aurelia.start();\r\n\r\n\t//console.log('(main.ts initializes client.)')\r\n\r\n\t//DI to initialise perhaps singleton instances of these classes.\r\n\tawait aurelia.container.get(ApiClient).initialize();\r\n\tawait aurelia.container.get(BimClient).initialize();\r\n\tawait aurelia.container.get(AWJClient).initialize();\r\n\tawait aurelia.container.get(GlobalRejectionErrorHandler).initialize();\r\n\r\n\t\t\r\n\tawait aurelia.setRoot(PLATFORM.moduleName('shell/shell')); // so, main says shell is ROOT.\r\n}\r\n\r\n"],"names":["___CSS_LOADER_URL_IMPORT_0___","URL","___CSS_LOADER_EXPORT___","___CSS_LOADER_URL_REPLACEMENT_0___","push","module","id","exports","Login","constructor","session","router","api","username","password","loginProcessing","clientVersion","devOrProd","forgotPasswordUrl","redir","hasFocus","console","log","activate","params","this","setForgotPasswordUrl","Boolean","sessionStorage","getItem","removeItem","Array","isArray","login","L","window","location","host","protocol","signUpUrl","async","logIn","finally","navigate","autoinject","configure","aurelia","use","standardConfiguration","feature","plugin","cfg","useAnimationDoneClasses","config","useDefaults","useCSS","settings","lock","overlayDismiss","centerHorizontalOnly","startingZIndex","keyboard","instance","aliases","TCustomAttribute","i18next","setup","backend","loadPath","attributes","lng","fallbackLng","debug","skipTranslationOnMissingKey","developmentLogging","start","container","get","initialize","setRoot"],"sourceRoot":""}