{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/app/loginStyleInjection.ts"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;ACrEA,IAAI,MAAM,CAAC,gBAAgB,KAAK,SAAS;IAAE,MAAM,CAAC,gBAAgB,GAAG,EAAE,CAAC;AAExE,IAAM,gBAAgB,GAAW,GAAG,CAAC;AAErC,MAAM,CAAC,gBAAgB,CAAC,wBAAwB,GAAG,UAAC,OAAyC;IACzF,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,GAAG,EAAE,CAAC;IAExC,IAAI,QAAQ,GAAW,OAAO,CAAC,QAAQ,CAAC;IACxC,IAAI,QAAQ,KAAK,SAAS;QAAE,QAAQ,GAAG,0BAA0B,CAAC;IAElE,IAAI,YAAY,GAAW,OAAO,CAAC,YAAY,CAAC;IAChD,IAAI,YAAY,KAAK,SAAS;QAAE,YAAY,GAAG,YAAY,CAAC;IAE5D,IAAM,WAAW,GAAG,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAChD,SAAS,eAAe,CAAC,UAAkB;QACvC,OAAO,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC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AAC;KACtE;AACL,CAAC,CAAC","file":"loginStyleInjection.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","declare var BuildDateTime: string;\r\n\r\ninterface ApplyLoginStyleInjectionOptions {\r\n basePath?: string;\r\n loginFrameId?: string;\r\n}\r\n\r\ninterface Window {\r\n SPLUSDock2Layout?: {\r\n applyLoginStyleInjection?: (ApplyLoginStyleInjectionOptions) => void;\r\n };\r\n}\r\n\r\nif (window.SPLUSDock2Layout === undefined) window.SPLUSDock2Layout = {};\r\n\r\nconst animationSeconds: number = 0.5;\r\n\r\nwindow.SPLUSDock2Layout.applyLoginStyleInjection = (options?: ApplyLoginStyleInjectionOptions): void => {\r\n if (options === undefined) options = {};\r\n\r\n let basePath: string = options.basePath;\r\n if (basePath === undefined) basePath = '/services/printing/dock2';\r\n\r\n let loginFrameId: string = options.loginFrameId;\r\n if (loginFrameId === undefined) loginFrameId = 'LoginFrame';\r\n\r\n const readyStates = ['complete', 'interactive'];\r\n function documentIsReady(readyState: string): boolean {\r\n return readyStates.indexOf(readyState) !== -1; // IE11 support, originally: readyStates.includes(readyState);\r\n }\r\n\r\n function startStyleInjection(): void {\r\n const loginFrameElement: HTMLElement = document.getElementById(loginFrameId);\r\n if (loginFrameElement === null) throw `There is no iframe element with 'id' attribute set to '${loginFrameId}'.`;\r\n if (loginFrameElement.nodeName !== 'IFRAME') throw `The element with id '${loginFrameId}' is a ${loginFrameElement.nodeName} element, not an IFRAME element.`;\r\n\r\n const loadingAnimation: HTMLElement = document.createElement('div');\r\n\r\n function setLoadingAnimationSize() {\r\n loadingAnimation.style.width = `${loginFrameElement.offsetWidth}px`;\r\n loadingAnimation.style.height = `${loginFrameElement.offsetHeight}px`;\r\n loadingAnimation.style.left = `${loginFrameElement.offsetLeft}px`;\r\n loadingAnimation.style.top = `${loginFrameElement.offsetTop}px`;\r\n }\r\n\r\n loadingAnimation.className = 'loginStyleInjectionLoadingContainer';\r\n loadingAnimation.style.transition = `opacity ${animationSeconds}s`;\r\n loadingAnimation.style.position = 'absolute';\r\n setLoadingAnimationSize();\r\n loadingAnimation.innerHTML = `\r\n
\r\n
\r\n
\r\n
\r\n
`;\r\n loginFrameElement.parentNode.insertBefore(loadingAnimation, loginFrameElement.nextSibling);\r\n\r\n loginFrameElement.style.opacity = '0';\r\n loginFrameElement.style.transition = `opacity ${animationSeconds}s`;\r\n\r\n new MutationObserver(setLoadingAnimationSize).observe(loginFrameElement, {\r\n attributes: true,\r\n attributeFilter: ['width', 'height', 'style']\r\n });\r\n\r\n const loginFrameWindow = (loginFrameElement).contentWindow;\r\n\r\n loginFrameElement.addEventListener('load', () => {\r\n window.postMessage(JSON.stringify({\r\n loginPage: loginFrameWindow.location.pathname === '/idm/com/login',\r\n registerPage: loginFrameWindow.location.pathname === '/idm/com/createaccount'\r\n }), window.origin || window.location.origin);\r\n loginFrameElement.style.opacity = '1';\r\n loadingAnimation.style.opacity = '0';\r\n setTimeout(() => { loadingAnimation.style.display = 'none'; }, animationSeconds*1000);\r\n loginFrameWindow.addEventListener('beforeunload', () => {\r\n loginFrameElement.style.opacity = '0';\r\n loadingAnimation.style.display = 'block';\r\n requestAnimationFrame(() => loadingAnimation.style.opacity = '1');\r\n });\r\n });\r\n }\r\n\r\n if (documentIsReady(document.readyState)) {\r\n startStyleInjection();\r\n } else {\r\n document.addEventListener('DOMContentLoaded', startStyleInjection);\r\n }\r\n};\r\n"],"sourceRoot":""}