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AAO;gBACb,KAAK;gBACL,KAAK;oBACH,MAAM,SAAS,CAAC,OAAO,CAAC,IAAI,CAC1B,SAAS,gBAAgB,CAAC,UAAU,WACpC,KAAK,IAAI,CAAC,WAAW;oBAEvB,KAAK;gBAEP,KAAK;oBACH,KAAK,SAAS;oBACd,KAAK;gBAEP;oBACE,MAAM,IAAI,UAAU,2BAA2B,OAAO,SAAS,KAAI;YACvE;YAEA,OAAO;QACT;IACF;IAEA,SAAS,yBAAyB,CAAC,EAAE;QACnC,IAAI,CAAC,EAAE,EAAE,EACP,KAAK,IAAI;aACJ,IAAI,CAAC,EAAE,EAAE,CAAC,YAAY,EAC3B,EAAE,EAAE,CAAC,YAAY,GAAG,SAAS,eAAe,OAAO,EAAE;YACnD,SAAS,KAAK,KAAK,EAAE,OAAO,EAAE;gBAC5B,YAAY,SAAS;YACvB;YAEA,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,MAAM,GAAG;QAC7C;IAEJ;IAEA,IAAI,OAAO,MAAM,EACf,yBAAyB,OAAO,MAAM;IAGxC,IAAI,OAAO,WAAW,cAAc,OAAO,GAAG,EAC5C,OAAO,EAAE,EAAE;SACN,IAAkC,OAAO,OAAO,OAAO,KAAK,UACjE,qBAAqB;IACrB,OAAO,OAAO,GAAG;IAEnB,OAAO,YAAY,GAAG,OAAO,YAAY,IAAI;AAC/C,CAAA","sources":["node_modules/@parcel/runtime-browser-hmr/lib/runtime-712506ef7f493904.js","app/assets/lookbook/js/lookbook.js","node_modules/iframe-resizer/js/iframeResizer.js"],"sourcesContent":["var HMR_HOST = null;var HMR_PORT = 5111;var HMR_SECURE = false;var HMR_ENV_HASH = \"439701173a9199ea\";module.bundle.HMR_BUNDLE_ID = \"0e5aeac1cb50f978\";\"use strict\";\n\n/* global HMR_HOST, HMR_PORT, HMR_ENV_HASH, HMR_SECURE, chrome, browser, globalThis, __parcel__import__, __parcel__importScripts__, ServiceWorkerGlobalScope */\n\n/*::\nimport type {\n HMRAsset,\n HMRMessage,\n} from '@parcel/reporter-dev-server/src/HMRServer.js';\ninterface ParcelRequire {\n (string): mixed;\n cache: {|[string]: ParcelModule|};\n hotData: mixed;\n Module: any;\n parent: ?ParcelRequire;\n isParcelRequire: true;\n modules: {|[string]: [Function, {|[string]: string|}]|};\n HMR_BUNDLE_ID: string;\n root: ParcelRequire;\n}\ninterface ParcelModule {\n hot: {|\n data: mixed,\n accept(cb: (Function) => void): void,\n dispose(cb: (mixed) => void): void,\n // accept(deps: Array | string, cb: (Function) => void): void,\n // decline(): void,\n _acceptCallbacks: Array<(Function) => void>,\n _disposeCallbacks: Array<(mixed) => void>,\n |};\n}\ninterface ExtensionContext {\n runtime: {|\n reload(): void,\n getURL(url: string): string;\n getManifest(): {manifest_version: number, ...};\n |};\n}\ndeclare var module: {bundle: ParcelRequire, ...};\ndeclare var HMR_HOST: string;\ndeclare var HMR_PORT: string;\ndeclare var HMR_ENV_HASH: string;\ndeclare var HMR_SECURE: boolean;\ndeclare var chrome: ExtensionContext;\ndeclare var browser: ExtensionContext;\ndeclare var __parcel__import__: (string) => Promise;\ndeclare var __parcel__importScripts__: (string) => Promise;\ndeclare var globalThis: typeof self;\ndeclare var ServiceWorkerGlobalScope: Object;\n*/\nvar OVERLAY_ID = '__parcel__error__overlay__';\nvar OldModule = module.bundle.Module;\n\nfunction Module(moduleName) {\n OldModule.call(this, moduleName);\n this.hot = {\n data: module.bundle.hotData,\n _acceptCallbacks: [],\n _disposeCallbacks: [],\n accept: function (fn) {\n this._acceptCallbacks.push(fn || function () {});\n },\n dispose: function (fn) {\n this._disposeCallbacks.push(fn);\n }\n };\n module.bundle.hotData = undefined;\n}\n\nmodule.bundle.Module = Module;\nvar checkedAssets\n/*: {|[string]: boolean|} */\n, acceptedAssets\n/*: {|[string]: boolean|} */\n, assetsToAccept\n/*: Array<[ParcelRequire, string]> */\n;\n\nfunction getHostname() {\n return HMR_HOST || (location.protocol.indexOf('http') === 0 ? location.hostname : 'localhost');\n}\n\nfunction getPort() {\n return HMR_PORT || location.port;\n} // eslint-disable-next-line no-redeclare\n\n\nvar parent = module.bundle.parent;\n\nif ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {\n var hostname = getHostname();\n var port = getPort();\n var protocol = HMR_SECURE || location.protocol == 'https:' && !/localhost|127.0.0.1|0.0.0.0/.test(hostname) ? 'wss' : 'ws';\n var ws = new WebSocket(protocol + '://' + hostname + (port ? ':' + port : '') + '/'); // Web extension context\n\n var extCtx = typeof chrome === 'undefined' ? typeof browser === 'undefined' ? null : browser : chrome; // Safari doesn't support sourceURL in error stacks.\n // eval may also be disabled via CSP, so do a quick check.\n\n var supportsSourceURL = false;\n\n try {\n (0, eval)('throw new Error(\"test\"); //# sourceURL=test.js');\n } catch (err) {\n supportsSourceURL = err.stack.includes('test.js');\n } // $FlowFixMe\n\n\n ws.onmessage = async function (event\n /*: {data: string, ...} */\n ) {\n checkedAssets = {}\n /*: {|[string]: boolean|} */\n ;\n acceptedAssets = {}\n /*: {|[string]: boolean|} */\n ;\n assetsToAccept = [];\n var data\n /*: HMRMessage */\n = JSON.parse(event.data);\n\n if (data.type === 'update') {\n // Remove error overlay if there is one\n if (typeof document !== 'undefined') {\n removeErrorOverlay();\n }\n\n let assets = data.assets.filter(asset => asset.envHash === HMR_ENV_HASH); // Handle HMR Update\n\n let handled = assets.every(asset => {\n return asset.type === 'css' || asset.type === 'js' && hmrAcceptCheck(module.bundle.root, asset.id, asset.depsByBundle);\n });\n\n if (handled) {\n console.clear(); // Dispatch custom event so other runtimes (e.g React Refresh) are aware.\n\n if (typeof window !== 'undefined' && typeof CustomEvent !== 'undefined') {\n window.dispatchEvent(new CustomEvent('parcelhmraccept'));\n }\n\n await hmrApplyUpdates(assets);\n\n for (var i = 0; i < assetsToAccept.length; i++) {\n var id = assetsToAccept[i][1];\n\n if (!acceptedAssets[id]) {\n hmrAcceptRun(assetsToAccept[i][0], id);\n }\n }\n } else fullReload();\n }\n\n if (data.type === 'error') {\n // Log parcel errors to console\n for (let ansiDiagnostic of data.diagnostics.ansi) {\n let stack = ansiDiagnostic.codeframe ? ansiDiagnostic.codeframe : ansiDiagnostic.stack;\n console.error('🚨 [parcel]: ' + ansiDiagnostic.message + '\\n' + stack + '\\n\\n' + ansiDiagnostic.hints.join('\\n'));\n }\n\n if (typeof document !== 'undefined') {\n // Render the fancy html overlay\n removeErrorOverlay();\n var overlay = createErrorOverlay(data.diagnostics.html); // $FlowFixMe\n\n document.body.appendChild(overlay);\n }\n }\n };\n\n ws.onerror = function (e) {\n console.error(e.message);\n };\n\n ws.onclose = function () {\n console.warn('[parcel] 🚨 Connection to the HMR server was lost');\n };\n}\n\nfunction removeErrorOverlay() {\n var overlay = document.getElementById(OVERLAY_ID);\n\n if (overlay) {\n overlay.remove();\n console.log('[parcel] ✨ Error resolved');\n }\n}\n\nfunction createErrorOverlay(diagnostics) {\n var overlay = document.createElement('div');\n overlay.id = OVERLAY_ID;\n let errorHTML = '
';\n\n for (let diagnostic of diagnostics) {\n let stack = diagnostic.frames.length ? diagnostic.frames.reduce((p, frame) => {\n return `${p}\n${frame.location}\n${frame.code}`;\n }, '') : diagnostic.stack;\n errorHTML += `\n
\n
\n 🚨 ${diagnostic.message}\n
\n
${stack}
\n
\n ${diagnostic.hints.map(hint => '
💡 ' + hint + '
').join('')}\n
\n ${diagnostic.documentation ? `` : ''}\n
\n `;\n }\n\n errorHTML += '
';\n overlay.innerHTML = errorHTML;\n return overlay;\n}\n\nfunction fullReload() {\n if ('reload' in location) {\n location.reload();\n } else if (extCtx && extCtx.runtime && extCtx.runtime.reload) {\n extCtx.runtime.reload();\n }\n}\n\nfunction getParents(bundle, id)\n/*: Array<[ParcelRequire, string]> */\n{\n var modules = bundle.modules;\n\n if (!modules) {\n return [];\n }\n\n var parents = [];\n var k, d, dep;\n\n for (k in modules) {\n for (d in modules[k][1]) {\n dep = modules[k][1][d];\n\n if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {\n parents.push([bundle, k]);\n }\n }\n }\n\n if (bundle.parent) {\n parents = parents.concat(getParents(bundle.parent, id));\n }\n\n return parents;\n}\n\nfunction updateLink(link) {\n var newLink = link.cloneNode();\n\n newLink.onload = function () {\n if (link.parentNode !== null) {\n // $FlowFixMe\n link.parentNode.removeChild(link);\n }\n };\n\n newLink.setAttribute('href', // $FlowFixMe\n link.getAttribute('href').split('?')[0] + '?' + Date.now()); // $FlowFixMe\n\n link.parentNode.insertBefore(newLink, link.nextSibling);\n}\n\nvar cssTimeout = null;\n\nfunction reloadCSS() {\n if (cssTimeout) {\n return;\n }\n\n cssTimeout = setTimeout(function () {\n var links = document.querySelectorAll('link[rel=\"stylesheet\"]');\n\n for (var i = 0; i < links.length; i++) {\n // $FlowFixMe[incompatible-type]\n var href\n /*: string */\n = links[i].getAttribute('href');\n var hostname = getHostname();\n var servedFromHMRServer = hostname === 'localhost' ? new RegExp('^(https?:\\\\/\\\\/(0.0.0.0|127.0.0.1)|localhost):' + getPort()).test(href) : href.indexOf(hostname + ':' + getPort());\n var absolute = /^https?:\\/\\//i.test(href) && href.indexOf(location.origin) !== 0 && !servedFromHMRServer;\n\n if (!absolute) {\n updateLink(links[i]);\n }\n }\n\n cssTimeout = null;\n }, 50);\n}\n\nfunction hmrDownload(asset) {\n if (asset.type === 'js') {\n if (typeof document !== 'undefined') {\n let script = document.createElement('script');\n script.src = asset.url + '?t=' + Date.now();\n\n if (asset.outputFormat === 'esmodule') {\n script.type = 'module';\n }\n\n return new Promise((resolve, reject) => {\n var _document$head;\n\n script.onload = () => resolve(script);\n\n script.onerror = reject;\n (_document$head = document.head) === null || _document$head === void 0 ? void 0 : _document$head.appendChild(script);\n });\n } else if (typeof importScripts === 'function') {\n // Worker scripts\n if (asset.outputFormat === 'esmodule') {\n return __parcel__import__(asset.url + '?t=' + Date.now());\n } else {\n return new Promise((resolve, reject) => {\n try {\n __parcel__importScripts__(asset.url + '?t=' + Date.now());\n\n resolve();\n } catch (err) {\n reject(err);\n }\n });\n }\n }\n }\n}\n\nasync function hmrApplyUpdates(assets) {\n global.parcelHotUpdate = Object.create(null);\n let scriptsToRemove;\n\n try {\n // If sourceURL comments aren't supported in eval, we need to load\n // the update from the dev server over HTTP so that stack traces\n // are correct in errors/logs. This is much slower than eval, so\n // we only do it if needed (currently just Safari).\n // https://bugs.webkit.org/show_bug.cgi?id=137297\n // This path is also taken if a CSP disallows eval.\n if (!supportsSourceURL) {\n let promises = assets.map(asset => {\n var _hmrDownload;\n\n return (_hmrDownload = hmrDownload(asset)) === null || _hmrDownload === void 0 ? void 0 : _hmrDownload.catch(err => {\n // Web extension bugfix for Chromium\n // https://bugs.chromium.org/p/chromium/issues/detail?id=1255412#c12\n if (extCtx && extCtx.runtime && extCtx.runtime.getManifest().manifest_version == 3) {\n if (typeof ServiceWorkerGlobalScope != 'undefined' && global instanceof ServiceWorkerGlobalScope) {\n extCtx.runtime.reload();\n return;\n }\n\n asset.url = extCtx.runtime.getURL('/__parcel_hmr_proxy__?url=' + encodeURIComponent(asset.url + '?t=' + Date.now()));\n return hmrDownload(asset);\n }\n\n throw err;\n });\n });\n scriptsToRemove = await Promise.all(promises);\n }\n\n assets.forEach(function (asset) {\n hmrApply(module.bundle.root, asset);\n });\n } finally {\n delete global.parcelHotUpdate;\n\n if (scriptsToRemove) {\n scriptsToRemove.forEach(script => {\n if (script) {\n var _document$head2;\n\n (_document$head2 = document.head) === null || _document$head2 === void 0 ? void 0 : _document$head2.removeChild(script);\n }\n });\n }\n }\n}\n\nfunction hmrApply(bundle\n/*: ParcelRequire */\n, asset\n/*: HMRAsset */\n) {\n var modules = bundle.modules;\n\n if (!modules) {\n return;\n }\n\n if (asset.type === 'css') {\n reloadCSS();\n } else if (asset.type === 'js') {\n let deps = asset.depsByBundle[bundle.HMR_BUNDLE_ID];\n\n if (deps) {\n if (modules[asset.id]) {\n // Remove dependencies that are removed and will become orphaned.\n // This is necessary so that if the asset is added back again, the cache is gone, and we prevent a full page reload.\n let oldDeps = modules[asset.id][1];\n\n for (let dep in oldDeps) {\n if (!deps[dep] || deps[dep] !== oldDeps[dep]) {\n let id = oldDeps[dep];\n let parents = getParents(module.bundle.root, id);\n\n if (parents.length === 1) {\n hmrDelete(module.bundle.root, id);\n }\n }\n }\n }\n\n if (supportsSourceURL) {\n // Global eval. We would use `new Function` here but browser\n // support for source maps is better with eval.\n (0, eval)(asset.output);\n } // $FlowFixMe\n\n\n let fn = global.parcelHotUpdate[asset.id];\n modules[asset.id] = [fn, deps];\n } else if (bundle.parent) {\n hmrApply(bundle.parent, asset);\n }\n }\n}\n\nfunction hmrDelete(bundle, id) {\n let modules = bundle.modules;\n\n if (!modules) {\n return;\n }\n\n if (modules[id]) {\n // Collect dependencies that will become orphaned when this module is deleted.\n let deps = modules[id][1];\n let orphans = [];\n\n for (let dep in deps) {\n let parents = getParents(module.bundle.root, deps[dep]);\n\n if (parents.length === 1) {\n orphans.push(deps[dep]);\n }\n } // Delete the module. This must be done before deleting dependencies in case of circular dependencies.\n\n\n delete modules[id];\n delete bundle.cache[id]; // Now delete the orphans.\n\n orphans.forEach(id => {\n hmrDelete(module.bundle.root, id);\n });\n } else if (bundle.parent) {\n hmrDelete(bundle.parent, id);\n }\n}\n\nfunction hmrAcceptCheck(bundle\n/*: ParcelRequire */\n, id\n/*: string */\n, depsByBundle\n/*: ?{ [string]: { [string]: string } }*/\n) {\n if (hmrAcceptCheckOne(bundle, id, depsByBundle)) {\n return true;\n } // Traverse parents breadth first. All possible ancestries must accept the HMR update, or we'll reload.\n\n\n let parents = getParents(module.bundle.root, id);\n let accepted = false;\n\n while (parents.length > 0) {\n let v = parents.shift();\n let a = hmrAcceptCheckOne(v[0], v[1], null);\n\n if (a) {\n // If this parent accepts, stop traversing upward, but still consider siblings.\n accepted = true;\n } else {\n // Otherwise, queue the parents in the next level upward.\n let p = getParents(module.bundle.root, v[1]);\n\n if (p.length === 0) {\n // If there are no parents, then we've reached an entry without accepting. Reload.\n accepted = false;\n break;\n }\n\n parents.push(...p);\n }\n }\n\n return accepted;\n}\n\nfunction hmrAcceptCheckOne(bundle\n/*: ParcelRequire */\n, id\n/*: string */\n, depsByBundle\n/*: ?{ [string]: { [string]: string } }*/\n) {\n var modules = bundle.modules;\n\n if (!modules) {\n return;\n }\n\n if (depsByBundle && !depsByBundle[bundle.HMR_BUNDLE_ID]) {\n // If we reached the root bundle without finding where the asset should go,\n // there's nothing to do. Mark as \"accepted\" so we don't reload the page.\n if (!bundle.parent) {\n return true;\n }\n\n return hmrAcceptCheck(bundle.parent, id, depsByBundle);\n }\n\n if (checkedAssets[id]) {\n return true;\n }\n\n checkedAssets[id] = true;\n var cached = bundle.cache[id];\n assetsToAccept.push([bundle, id]);\n\n if (!cached || cached.hot && cached.hot._acceptCallbacks.length) {\n return true;\n }\n}\n\nfunction hmrAcceptRun(bundle\n/*: ParcelRequire */\n, id\n/*: string */\n) {\n var cached = bundle.cache[id];\n bundle.hotData = {};\n\n if (cached && cached.hot) {\n cached.hot.data = bundle.hotData;\n }\n\n if (cached && cached.hot && cached.hot._disposeCallbacks.length) {\n cached.hot._disposeCallbacks.forEach(function (cb) {\n cb(bundle.hotData);\n });\n }\n\n delete bundle.cache[id];\n bundle(id);\n cached = bundle.cache[id];\n\n if (cached && cached.hot && cached.hot._acceptCallbacks.length) {\n cached.hot._acceptCallbacks.forEach(function (cb) {\n var assetsToAlsoAccept = cb(function () {\n return getParents(module.bundle.root, id);\n });\n\n if (assetsToAlsoAccept && assetsToAccept.length) {\n // $FlowFixMe[method-unbinding]\n assetsToAccept.push.apply(assetsToAccept, assetsToAlsoAccept);\n }\n });\n }\n\n acceptedAssets[id] = true;\n}","import \"iframe-resizer/js/iframeResizer\";\n\nwindow.Lookbook = window.Lookbook || {};\n\nwindow.Lookbook.initEmbeds = function () {\n const embeds = Array.from(document.querySelectorAll(\"lookbook-embed\"));\n\n embeds.forEach((embed) => {\n const attrs = Array.from(embed.attributes);\n const iframe = createIframe(attrs);\n embed.replaceWith(iframe);\n });\n\n window.iFrameResize({}, \"[data-lookbook-embed]\");\n};\n\nconst endpoint = \"embed\";\nconst defaultBasePath = `//${location.host}/lookbook`;\n\nfunction createIframe(attrs) {\n const src = buildSrc(attrs);\n const id = attrValue(attrs, \"id\");\n const classes = attrValue(attrs, \"class\", \"\")\n .split(\" \")\n .map((c) => c.trim())\n .filter((c) => c.length);\n\n const iframe = document.createElement(\"iframe\");\n iframe.src = src;\n if (id) iframe.id = id;\n\n iframe.setAttribute(\"frameborder\", 0);\n iframe.setAttribute(\"data-lookbook-embed\", true);\n\n if (classes.length) iframe.classList.add(...classes);\n iframe.style.width = \"100%\";\n iframe.style.transition = \"height 0.3s\";\n iframe.style.boxShadow = \"0px 0px 4px rgba(0,0,0,0.15)\";\n iframe.style.borderRadius = \"8px\";\n\n return iframe;\n}\n\nfunction buildSrc(attrs) {\n const basePath = attrValue(attrs, \"base\") || defaultBasePath;\n\n const props = {};\n attrsWithout(attrs, \"base\", \"class\").forEach(({ name, value }) => {\n name = name.replace(\"-\", \"_\").toLowerCase();\n value = encodeURIComponent(value);\n props[name] = value;\n });\n\n return [basePath, endpoint].join(\"/\") + `?props=${JSON.stringify(props)}`;\n}\n\nfunction attrValue(attrs, name, fallback = null) {\n const attr = attrs.find((attr) => attr.name === name);\n return attr ? attr.value : fallback;\n}\n\nfunction attrsWithout(attrs, ...without) {\n return attrs.filter((attr) => !without.includes(attr.name));\n}\n\nfunction insertAfter(newNode, referenceNode) {\n referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\n}\n","/*\n * File: iframeResizer.js\n * Desc: Force iframes to size to content.\n * Requires: iframeResizer.contentWindow.js to be loaded into the target frame.\n * Doc: https://github.com/davidjbradshaw/iframe-resizer\n * Author: David J. Bradshaw - dave@bradshaw.net\n * Contributor: Jure Mav - jure.mav@gmail.com\n * Contributor: Reed Dadoune - reed@dadoune.com\n */\n\n// eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names\n;(function (undefined) {\n if (typeof window === 'undefined') return // don't run for server side render\n\n var count = 0,\n logEnabled = false,\n hiddenCheckEnabled = false,\n msgHeader = 'message',\n msgHeaderLen = msgHeader.length,\n msgId = '[iFrameSizer]', // Must match iframe msg ID\n msgIdLen = msgId.length,\n pagePosition = null,\n requestAnimationFrame = window.requestAnimationFrame,\n resetRequiredMethods = {\n max: 1,\n scroll: 1,\n bodyScroll: 1,\n documentElementScroll: 1\n },\n settings = {},\n timer = null,\n defaults = {\n autoResize: true,\n bodyBackground: null,\n bodyMargin: null,\n bodyMarginV1: 8,\n bodyPadding: null,\n checkOrigin: true,\n inPageLinks: false,\n enablePublicMethods: true,\n heightCalculationMethod: 'bodyOffset',\n id: 'iFrameResizer',\n interval: 32,\n log: false,\n maxHeight: Infinity,\n maxWidth: Infinity,\n minHeight: 0,\n minWidth: 0,\n mouseEvents: true,\n resizeFrom: 'parent',\n scrolling: false,\n sizeHeight: true,\n sizeWidth: false,\n warningTimeout: 5000,\n tolerance: 0,\n widthCalculationMethod: 'scroll',\n onClose: function () {\n return true\n },\n onClosed: function () {},\n onInit: function () {},\n onMessage: function () {\n warn('onMessage function not defined')\n },\n onMouseEnter: function () {},\n onMouseLeave: function () {},\n onResized: function () {},\n onScroll: function () {\n return true\n }\n }\n\n function getMutationObserver() {\n return (\n window.MutationObserver ||\n window.WebKitMutationObserver ||\n window.MozMutationObserver\n )\n }\n\n function addEventListener(el, evt, func) {\n el.addEventListener(evt, func, false)\n }\n\n function removeEventListener(el, evt, func) {\n el.removeEventListener(evt, func, false)\n }\n\n function setupRequestAnimationFrame() {\n var vendors = ['moz', 'webkit', 'o', 'ms']\n var x\n\n // Remove vendor prefixing if prefixed and break early if not\n for (x = 0; x < vendors.length && !requestAnimationFrame; x += 1) {\n requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']\n }\n\n if (!requestAnimationFrame) {\n log('setup', 'RequestAnimationFrame not supported')\n } else {\n // Firefox extension content-scripts have a globalThis object that is not the same as window.\n // Binding `requestAnimationFrame` to window allows the function to work and prevents errors\n // being thrown when run in that context, and should be a no-op in every other context.\n requestAnimationFrame = requestAnimationFrame.bind(window)\n }\n }\n\n function getMyID(iframeId) {\n var retStr = 'Host page: ' + iframeId\n\n if (window.top !== window.self) {\n retStr =\n window.parentIFrame && window.parentIFrame.getId\n ? window.parentIFrame.getId() + ': ' + iframeId\n : 'Nested host page: ' + iframeId\n }\n\n return retStr\n }\n\n function formatLogHeader(iframeId) {\n return msgId + '[' + getMyID(iframeId) + ']'\n }\n\n function isLogEnabled(iframeId) {\n return settings[iframeId] ? settings[iframeId].log : logEnabled\n }\n\n function log(iframeId, msg) {\n output('log', iframeId, msg, isLogEnabled(iframeId))\n }\n\n function info(iframeId, msg) {\n output('info', iframeId, msg, isLogEnabled(iframeId))\n }\n\n function warn(iframeId, msg) {\n output('warn', iframeId, msg, true)\n }\n\n function output(type, iframeId, msg, enabled) {\n if (true === enabled && 'object' === typeof window.console) {\n // eslint-disable-next-line no-console\n console[type](formatLogHeader(iframeId), msg)\n }\n }\n\n function iFrameListener(event) {\n function resizeIFrame() {\n function resize() {\n setSize(messageData)\n setPagePosition(iframeId)\n on('onResized', messageData)\n }\n\n ensureInRange('Height')\n ensureInRange('Width')\n\n syncResize(resize, messageData, 'init')\n }\n\n function processMsg() {\n var data = msg.substr(msgIdLen).split(':')\n var height = data[1] ? parseInt(data[1], 10) : 0\n var iframe = settings[data[0]] && settings[data[0]].iframe\n var compStyle = getComputedStyle(iframe)\n\n return {\n iframe: iframe,\n id: data[0],\n height: height + getPaddingEnds(compStyle) + getBorderEnds(compStyle),\n width: data[2],\n type: data[3]\n }\n }\n\n function getPaddingEnds(compStyle) {\n if (compStyle.boxSizing !== 'border-box') {\n return 0\n }\n var top = compStyle.paddingTop ? parseInt(compStyle.paddingTop, 10) : 0\n var bot = compStyle.paddingBottom\n ? parseInt(compStyle.paddingBottom, 10)\n : 0\n return top + bot\n }\n\n function getBorderEnds(compStyle) {\n if (compStyle.boxSizing !== 'border-box') {\n return 0\n }\n var top = compStyle.borderTopWidth\n ? parseInt(compStyle.borderTopWidth, 10)\n : 0\n var bot = compStyle.borderBottomWidth\n ? parseInt(compStyle.borderBottomWidth, 10)\n : 0\n return top + bot\n }\n\n function ensureInRange(Dimension) {\n var max = Number(settings[iframeId]['max' + Dimension]),\n min = Number(settings[iframeId]['min' + Dimension]),\n dimension = Dimension.toLowerCase(),\n size = Number(messageData[dimension])\n\n log(iframeId, 'Checking ' + dimension + ' is in range ' + min + '-' + max)\n\n if (size < min) {\n size = min\n log(iframeId, 'Set ' + dimension + ' to min value')\n }\n\n if (size > max) {\n size = max\n log(iframeId, 'Set ' + dimension + ' to max value')\n }\n\n messageData[dimension] = '' + size\n }\n\n function isMessageFromIFrame() {\n function checkAllowedOrigin() {\n function checkList() {\n var i = 0,\n retCode = false\n\n log(\n iframeId,\n 'Checking connection is from allowed list of origins: ' +\n checkOrigin\n )\n\n for (; i < checkOrigin.length; i++) {\n if (checkOrigin[i] === origin) {\n retCode = true\n break\n }\n }\n return retCode\n }\n\n function checkSingle() {\n var remoteHost = settings[iframeId] && settings[iframeId].remoteHost\n log(iframeId, 'Checking connection is from: ' + remoteHost)\n return origin === remoteHost\n }\n\n return checkOrigin.constructor === Array ? checkList() : checkSingle()\n }\n\n var origin = event.origin,\n checkOrigin = settings[iframeId] && settings[iframeId].checkOrigin\n\n if (checkOrigin && '' + origin !== 'null' && !checkAllowedOrigin()) {\n throw new Error(\n 'Unexpected message received from: ' +\n origin +\n ' for ' +\n messageData.iframe.id +\n '. Message was: ' +\n event.data +\n '. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.'\n )\n }\n\n return true\n }\n\n function isMessageForUs() {\n return (\n msgId === ('' + msg).substr(0, msgIdLen) &&\n msg.substr(msgIdLen).split(':')[0] in settings\n ) // ''+Protects against non-string msg\n }\n\n function isMessageFromMetaParent() {\n // Test if this message is from a parent above us. This is an ugly test, however, updating\n // the message format would break backwards compatibity.\n var retCode = messageData.type in { true: 1, false: 1, undefined: 1 }\n\n if (retCode) {\n log(iframeId, 'Ignoring init message from meta parent page')\n }\n\n return retCode\n }\n\n function getMsgBody(offset) {\n return msg.substr(msg.indexOf(':') + msgHeaderLen + offset)\n }\n\n function forwardMsgFromIFrame(msgBody) {\n log(\n iframeId,\n 'onMessage passed: {iframe: ' +\n messageData.iframe.id +\n ', message: ' +\n msgBody +\n '}'\n )\n\n on('onMessage', {\n iframe: messageData.iframe,\n message: JSON.parse(msgBody)\n })\n\n log(iframeId, '--')\n }\n\n function getPageInfo() {\n var bodyPosition = document.body.getBoundingClientRect(),\n iFramePosition = messageData.iframe.getBoundingClientRect()\n\n return JSON.stringify({\n iframeHeight: iFramePosition.height,\n iframeWidth: iFramePosition.width,\n clientHeight: Math.max(\n document.documentElement.clientHeight,\n window.innerHeight || 0\n ),\n clientWidth: Math.max(\n document.documentElement.clientWidth,\n window.innerWidth || 0\n ),\n offsetTop: parseInt(iFramePosition.top - bodyPosition.top, 10),\n offsetLeft: parseInt(iFramePosition.left - bodyPosition.left, 10),\n scrollTop: window.pageYOffset,\n scrollLeft: window.pageXOffset,\n documentHeight: document.documentElement.clientHeight,\n documentWidth: document.documentElement.clientWidth,\n windowHeight: window.innerHeight,\n windowWidth: window.innerWidth\n })\n }\n\n function sendPageInfoToIframe(iframe, iframeId) {\n function debouncedTrigger() {\n trigger('Send Page Info', 'pageInfo:' + getPageInfo(), iframe, iframeId)\n }\n debounceFrameEvents(debouncedTrigger, 32, iframeId)\n }\n\n function startPageInfoMonitor() {\n function setListener(type, func) {\n function sendPageInfo() {\n if (settings[id]) {\n sendPageInfoToIframe(settings[id].iframe, id)\n } else {\n stop()\n }\n }\n\n ;['scroll', 'resize'].forEach(function (evt) {\n log(id, type + evt + ' listener for sendPageInfo')\n func(window, evt, sendPageInfo)\n })\n }\n\n function stop() {\n setListener('Remove ', removeEventListener)\n }\n\n function start() {\n setListener('Add ', addEventListener)\n }\n\n var id = iframeId // Create locally scoped copy of iFrame ID\n\n start()\n\n if (settings[id]) {\n settings[id].stopPageInfo = stop\n }\n }\n\n function stopPageInfoMonitor() {\n if (settings[iframeId] && settings[iframeId].stopPageInfo) {\n settings[iframeId].stopPageInfo()\n delete settings[iframeId].stopPageInfo\n }\n }\n\n function checkIFrameExists() {\n var retBool = true\n\n if (null === messageData.iframe) {\n warn(iframeId, 'IFrame (' + messageData.id + ') not found')\n retBool = false\n }\n return retBool\n }\n\n function getElementPosition(target) {\n var iFramePosition = target.getBoundingClientRect()\n\n getPagePosition(iframeId)\n\n return {\n x: Math.floor(Number(iFramePosition.left) + Number(pagePosition.x)),\n y: Math.floor(Number(iFramePosition.top) + Number(pagePosition.y))\n }\n }\n\n function scrollRequestFromChild(addOffset) {\n /* istanbul ignore next */ // Not testable in Karma\n function reposition() {\n pagePosition = newPosition\n scrollTo()\n log(iframeId, '--')\n }\n\n function calcOffset() {\n return {\n x: Number(messageData.width) + offset.x,\n y: Number(messageData.height) + offset.y\n }\n }\n\n function scrollParent() {\n if (window.parentIFrame) {\n window.parentIFrame['scrollTo' + (addOffset ? 'Offset' : '')](\n newPosition.x,\n newPosition.y\n )\n } else {\n warn(\n iframeId,\n 'Unable to scroll to requested position, window.parentIFrame not found'\n )\n }\n }\n\n var offset = addOffset\n ? getElementPosition(messageData.iframe)\n : { x: 0, y: 0 },\n newPosition = calcOffset()\n\n log(\n iframeId,\n 'Reposition requested from iFrame (offset x:' +\n offset.x +\n ' y:' +\n offset.y +\n ')'\n )\n\n if (window.top !== window.self) {\n scrollParent()\n } else {\n reposition()\n }\n }\n\n function scrollTo() {\n if (false !== on('onScroll', pagePosition)) {\n setPagePosition(iframeId)\n } else {\n unsetPagePosition()\n }\n }\n\n function findTarget(location) {\n function jumpToTarget() {\n var jumpPosition = getElementPosition(target)\n\n log(\n iframeId,\n 'Moving to in page link (#' +\n hash +\n ') at x: ' +\n jumpPosition.x +\n ' y: ' +\n jumpPosition.y\n )\n pagePosition = {\n x: jumpPosition.x,\n y: jumpPosition.y\n }\n\n scrollTo()\n log(iframeId, '--')\n }\n\n function jumpToParent() {\n if (window.parentIFrame) {\n window.parentIFrame.moveToAnchor(hash)\n } else {\n log(\n iframeId,\n 'In page link #' +\n hash +\n ' not found and window.parentIFrame not found'\n )\n }\n }\n\n var hash = location.split('#')[1] || '',\n hashData = decodeURIComponent(hash),\n target =\n document.getElementById(hashData) ||\n document.getElementsByName(hashData)[0]\n\n if (target) {\n jumpToTarget()\n } else if (window.top !== window.self) {\n jumpToParent()\n } else {\n log(iframeId, 'In page link #' + hash + ' not found')\n }\n }\n\n function onMouse(event) {\n var mousePos = {}\n\n if (Number(messageData.width) === 0 && Number(messageData.height) === 0) {\n var data = getMsgBody(9).split(':')\n mousePos = {\n x: data[1],\n y: data[0]\n }\n } else {\n mousePos = {\n x: messageData.width,\n y: messageData.height\n }\n }\n\n on(event, {\n iframe: messageData.iframe,\n screenX: Number(mousePos.x),\n screenY: Number(mousePos.y),\n type: messageData.type\n })\n }\n\n function on(funcName, val) {\n return chkEvent(iframeId, funcName, val)\n }\n\n function actionMsg() {\n if (settings[iframeId] && settings[iframeId].firstRun) firstRun()\n\n switch (messageData.type) {\n case 'close':\n closeIFrame(messageData.iframe)\n break\n\n case 'message':\n forwardMsgFromIFrame(getMsgBody(6))\n break\n\n case 'mouseenter':\n onMouse('onMouseEnter')\n break\n\n case 'mouseleave':\n onMouse('onMouseLeave')\n break\n\n case 'autoResize':\n settings[iframeId].autoResize = JSON.parse(getMsgBody(9))\n break\n\n case 'scrollTo':\n scrollRequestFromChild(false)\n break\n\n case 'scrollToOffset':\n scrollRequestFromChild(true)\n break\n\n case 'pageInfo':\n sendPageInfoToIframe(\n settings[iframeId] && settings[iframeId].iframe,\n iframeId\n )\n startPageInfoMonitor()\n break\n\n case 'pageInfoStop':\n stopPageInfoMonitor()\n break\n\n case 'inPageLink':\n findTarget(getMsgBody(9))\n break\n\n case 'reset':\n resetIFrame(messageData)\n break\n\n case 'init':\n resizeIFrame()\n on('onInit', messageData.iframe)\n break\n\n default:\n if (\n Number(messageData.width) === 0 &&\n Number(messageData.height) === 0\n ) {\n warn(\n 'Unsupported message received (' +\n messageData.type +\n '), this is likely due to the iframe containing a later ' +\n 'version of iframe-resizer than the parent page'\n )\n } else {\n resizeIFrame()\n }\n }\n }\n\n function hasSettings(iframeId) {\n var retBool = true\n\n if (!settings[iframeId]) {\n retBool = false\n warn(\n messageData.type +\n ' No settings for ' +\n iframeId +\n '. Message was: ' +\n msg\n )\n }\n\n return retBool\n }\n\n function iFrameReadyMsgReceived() {\n // eslint-disable-next-line no-restricted-syntax, guard-for-in\n for (var iframeId in settings) {\n trigger(\n 'iFrame requested init',\n createOutgoingMsg(iframeId),\n settings[iframeId].iframe,\n iframeId\n )\n }\n }\n\n function firstRun() {\n if (settings[iframeId]) {\n settings[iframeId].firstRun = false\n }\n }\n\n var msg = event.data,\n messageData = {},\n iframeId = null\n\n if ('[iFrameResizerChild]Ready' === msg) {\n iFrameReadyMsgReceived()\n } else if (isMessageForUs()) {\n messageData = processMsg()\n iframeId = messageData.id\n if (settings[iframeId]) {\n settings[iframeId].loaded = true\n }\n\n if (!isMessageFromMetaParent() && hasSettings(iframeId)) {\n log(iframeId, 'Received: ' + msg)\n\n if (checkIFrameExists() && isMessageFromIFrame()) {\n actionMsg()\n }\n }\n } else {\n info(iframeId, 'Ignored: ' + msg)\n }\n }\n\n function chkEvent(iframeId, funcName, val) {\n var func = null,\n retVal = null\n\n if (settings[iframeId]) {\n func = settings[iframeId][funcName]\n\n if ('function' === typeof func) {\n retVal = func(val)\n } else {\n throw new TypeError(\n funcName + ' on iFrame[' + iframeId + '] is not a function'\n )\n }\n }\n\n return retVal\n }\n\n function removeIframeListeners(iframe) {\n var iframeId = iframe.id\n delete settings[iframeId]\n }\n\n function closeIFrame(iframe) {\n var iframeId = iframe.id\n if (chkEvent(iframeId, 'onClose', iframeId) === false) {\n log(iframeId, 'Close iframe cancelled by onClose event')\n return\n }\n log(iframeId, 'Removing iFrame: ' + iframeId)\n\n try {\n // Catch race condition error with React\n if (iframe.parentNode) {\n iframe.parentNode.removeChild(iframe)\n }\n } catch (error) {\n warn(error)\n }\n\n chkEvent(iframeId, 'onClosed', iframeId)\n log(iframeId, '--')\n removeIframeListeners(iframe)\n }\n\n function getPagePosition(iframeId) {\n if (null === pagePosition) {\n pagePosition = {\n x:\n window.pageXOffset !== undefined\n ? window.pageXOffset\n : document.documentElement.scrollLeft,\n y:\n window.pageYOffset !== undefined\n ? window.pageYOffset\n : document.documentElement.scrollTop\n }\n log(\n iframeId,\n 'Get page position: ' + pagePosition.x + ',' + pagePosition.y\n )\n }\n }\n\n function setPagePosition(iframeId) {\n if (null !== pagePosition) {\n window.scrollTo(pagePosition.x, pagePosition.y)\n log(\n iframeId,\n 'Set page position: ' + pagePosition.x + ',' + pagePosition.y\n )\n unsetPagePosition()\n }\n }\n\n function unsetPagePosition() {\n pagePosition = null\n }\n\n function resetIFrame(messageData) {\n function reset() {\n setSize(messageData)\n trigger('reset', 'reset', messageData.iframe, messageData.id)\n }\n\n log(\n messageData.id,\n 'Size reset requested by ' +\n ('init' === messageData.type ? 'host page' : 'iFrame')\n )\n getPagePosition(messageData.id)\n syncResize(reset, messageData, 'reset')\n }\n\n function setSize(messageData) {\n function setDimension(dimension) {\n if (!messageData.id) {\n log('undefined', 'messageData id not set')\n return\n }\n messageData.iframe.style[dimension] = messageData[dimension] + 'px'\n log(\n messageData.id,\n 'IFrame (' +\n iframeId +\n ') ' +\n dimension +\n ' set to ' +\n messageData[dimension] +\n 'px'\n )\n }\n\n function chkZero(dimension) {\n // FireFox sets dimension of hidden iFrames to zero.\n // So if we detect that set up an event to check for\n // when iFrame becomes visible.\n\n /* istanbul ignore next */ // Not testable in PhantomJS\n if (!hiddenCheckEnabled && '0' === messageData[dimension]) {\n hiddenCheckEnabled = true\n log(iframeId, 'Hidden iFrame detected, creating visibility listener')\n fixHiddenIFrames()\n }\n }\n\n function processDimension(dimension) {\n setDimension(dimension)\n chkZero(dimension)\n }\n\n var iframeId = messageData.iframe.id\n\n if (settings[iframeId]) {\n if (settings[iframeId].sizeHeight) {\n processDimension('height')\n }\n if (settings[iframeId].sizeWidth) {\n processDimension('width')\n }\n }\n }\n\n function syncResize(func, messageData, doNotSync) {\n /* istanbul ignore if */ // Not testable in PhantomJS\n if (\n doNotSync !== messageData.type &&\n requestAnimationFrame &&\n // including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame\n !window.jasmine\n ) {\n log(messageData.id, 'Requesting animation frame')\n requestAnimationFrame(func)\n } else {\n func()\n }\n }\n\n function trigger(calleeMsg, msg, iframe, id, noResponseWarning) {\n function postMessageToIFrame() {\n var target = settings[id] && settings[id].targetOrigin\n log(\n id,\n '[' +\n calleeMsg +\n '] Sending msg to iframe[' +\n id +\n '] (' +\n msg +\n ') targetOrigin: ' +\n target\n )\n iframe.contentWindow.postMessage(msgId + msg, target)\n }\n\n function iFrameNotFound() {\n warn(id, '[' + calleeMsg + '] IFrame(' + id + ') not found')\n }\n\n function chkAndSend() {\n if (\n iframe &&\n 'contentWindow' in iframe &&\n null !== iframe.contentWindow\n ) {\n // Null test for PhantomJS\n postMessageToIFrame()\n } else {\n iFrameNotFound()\n }\n }\n\n function warnOnNoResponse() {\n function warning() {\n if (settings[id] && !settings[id].loaded && !errorShown) {\n errorShown = true\n warn(\n id,\n 'IFrame has not responded within ' +\n settings[id].warningTimeout / 1000 +\n ' seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning.'\n )\n }\n }\n\n if (\n !!noResponseWarning &&\n settings[id] &&\n !!settings[id].warningTimeout\n ) {\n settings[id].msgTimeout = setTimeout(\n warning,\n settings[id].warningTimeout\n )\n }\n }\n\n var errorShown = false\n\n id = id || iframe.id\n\n if (settings[id]) {\n chkAndSend()\n warnOnNoResponse()\n }\n }\n\n function createOutgoingMsg(iframeId) {\n return (\n iframeId +\n ':' +\n settings[iframeId].bodyMarginV1 +\n ':' +\n settings[iframeId].sizeWidth +\n ':' +\n settings[iframeId].log +\n ':' +\n settings[iframeId].interval +\n ':' +\n settings[iframeId].enablePublicMethods +\n ':' +\n settings[iframeId].autoResize +\n ':' +\n settings[iframeId].bodyMargin +\n ':' +\n settings[iframeId].heightCalculationMethod +\n ':' +\n settings[iframeId].bodyBackground +\n ':' +\n settings[iframeId].bodyPadding +\n ':' +\n settings[iframeId].tolerance +\n ':' +\n settings[iframeId].inPageLinks +\n ':' +\n settings[iframeId].resizeFrom +\n ':' +\n settings[iframeId].widthCalculationMethod +\n ':' +\n settings[iframeId].mouseEvents\n )\n }\n\n function isNumber(value) {\n return typeof value === 'number'\n }\n\n function setupIFrame(iframe, options) {\n function setLimits() {\n function addStyle(style) {\n var styleValue = settings[iframeId][style]\n if (Infinity !== styleValue && 0 !== styleValue) {\n iframe.style[style] = isNumber(styleValue)\n ? styleValue + 'px'\n : styleValue\n log(iframeId, 'Set ' + style + ' = ' + iframe.style[style])\n }\n }\n\n function chkMinMax(dimension) {\n if (\n settings[iframeId]['min' + dimension] >\n settings[iframeId]['max' + dimension]\n ) {\n throw new Error(\n 'Value for min' +\n dimension +\n ' can not be greater than max' +\n dimension\n )\n }\n }\n\n chkMinMax('Height')\n chkMinMax('Width')\n\n addStyle('maxHeight')\n addStyle('minHeight')\n addStyle('maxWidth')\n addStyle('minWidth')\n }\n\n function newId() {\n var id = (options && options.id) || defaults.id + count++\n if (null !== document.getElementById(id)) {\n id += count++\n }\n return id\n }\n\n function ensureHasId(iframeId) {\n if ('' === iframeId) {\n // eslint-disable-next-line no-multi-assign\n iframe.id = iframeId = newId()\n logEnabled = (options || {}).log\n log(\n iframeId,\n 'Added missing iframe ID: ' + iframeId + ' (' + iframe.src + ')'\n )\n }\n\n return iframeId\n }\n\n function setScrolling() {\n log(\n iframeId,\n 'IFrame scrolling ' +\n (settings[iframeId] && settings[iframeId].scrolling\n ? 'enabled'\n : 'disabled') +\n ' for ' +\n iframeId\n )\n iframe.style.overflow =\n false === (settings[iframeId] && settings[iframeId].scrolling)\n ? 'hidden'\n : 'auto'\n switch (settings[iframeId] && settings[iframeId].scrolling) {\n case 'omit':\n break\n\n case true:\n iframe.scrolling = 'yes'\n break\n\n case false:\n iframe.scrolling = 'no'\n break\n\n default:\n iframe.scrolling = settings[iframeId]\n ? settings[iframeId].scrolling\n : 'no'\n }\n }\n\n // The V1 iFrame script expects an int, where as in V2 expects a CSS\n // string value such as '1px 3em', so if we have an int for V2, set V1=V2\n // and then convert V2 to a string PX value.\n function setupBodyMarginValues() {\n if (\n 'number' ===\n typeof (settings[iframeId] && settings[iframeId].bodyMargin) ||\n '0' === (settings[iframeId] && settings[iframeId].bodyMargin)\n ) {\n settings[iframeId].bodyMarginV1 = settings[iframeId].bodyMargin\n settings[iframeId].bodyMargin =\n '' + settings[iframeId].bodyMargin + 'px'\n }\n }\n\n function checkReset() {\n // Reduce scope of firstRun to function, because IE8's JS execution\n // context stack is borked and this value gets externally\n // changed midway through running this function!!!\n var firstRun = settings[iframeId] && settings[iframeId].firstRun,\n resetRequertMethod =\n settings[iframeId] &&\n settings[iframeId].heightCalculationMethod in resetRequiredMethods\n\n if (!firstRun && resetRequertMethod) {\n resetIFrame({ iframe: iframe, height: 0, width: 0, type: 'init' })\n }\n }\n\n function setupIFrameObject() {\n if (settings[iframeId]) {\n settings[iframeId].iframe.iFrameResizer = {\n close: closeIFrame.bind(null, settings[iframeId].iframe),\n\n removeListeners: removeIframeListeners.bind(\n null,\n settings[iframeId].iframe\n ),\n\n resize: trigger.bind(\n null,\n 'Window resize',\n 'resize',\n settings[iframeId].iframe\n ),\n\n moveToAnchor: function (anchor) {\n trigger(\n 'Move to anchor',\n 'moveToAnchor:' + anchor,\n settings[iframeId].iframe,\n iframeId\n )\n },\n\n sendMessage: function (message) {\n message = JSON.stringify(message)\n trigger(\n 'Send Message',\n 'message:' + message,\n settings[iframeId].iframe,\n iframeId\n )\n }\n }\n }\n }\n\n // We have to call trigger twice, as we can not be sure if all\n // iframes have completed loading when this code runs. The\n // event listener also catches the page changing in the iFrame.\n function init(msg) {\n function iFrameLoaded() {\n trigger('iFrame.onload', msg, iframe, undefined, true)\n checkReset()\n }\n\n function createDestroyObserver(MutationObserver) {\n if (!iframe.parentNode) {\n return\n }\n\n var destroyObserver = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutation) {\n var removedNodes = Array.prototype.slice.call(mutation.removedNodes) // Transform NodeList into an Array\n removedNodes.forEach(function (removedNode) {\n if (removedNode === iframe) {\n closeIFrame(iframe)\n }\n })\n })\n })\n destroyObserver.observe(iframe.parentNode, {\n childList: true\n })\n }\n\n var MutationObserver = getMutationObserver()\n if (MutationObserver) {\n createDestroyObserver(MutationObserver)\n }\n\n addEventListener(iframe, 'load', iFrameLoaded)\n trigger('init', msg, iframe, undefined, true)\n }\n\n function checkOptions(options) {\n if ('object' !== typeof options) {\n throw new TypeError('Options is not an object')\n }\n }\n\n function copyOptions(options) {\n // eslint-disable-next-line no-restricted-syntax\n for (var option in defaults) {\n if (Object.prototype.hasOwnProperty.call(defaults, option)) {\n settings[iframeId][option] = Object.prototype.hasOwnProperty.call(\n options,\n option\n )\n ? options[option]\n : defaults[option]\n }\n }\n }\n\n function getTargetOrigin(remoteHost) {\n return '' === remoteHost ||\n null !== remoteHost.match(/^(about:blank|javascript:|file:\\/\\/)/)\n ? '*'\n : remoteHost\n }\n\n function depricate(key) {\n var splitName = key.split('Callback')\n\n if (splitName.length === 2) {\n var name =\n 'on' + splitName[0].charAt(0).toUpperCase() + splitName[0].slice(1)\n this[name] = this[key]\n delete this[key]\n warn(\n iframeId,\n \"Deprecated: '\" +\n key +\n \"' has been renamed '\" +\n name +\n \"'. The old method will be removed in the next major version.\"\n )\n }\n }\n\n function processOptions(options) {\n options = options || {}\n settings[iframeId] = {\n firstRun: true,\n iframe: iframe,\n remoteHost: iframe.src && iframe.src.split('/').slice(0, 3).join('/')\n }\n\n checkOptions(options)\n Object.keys(options).forEach(depricate, options)\n copyOptions(options)\n\n if (settings[iframeId]) {\n settings[iframeId].targetOrigin =\n true === settings[iframeId].checkOrigin\n ? getTargetOrigin(settings[iframeId].remoteHost)\n : '*'\n }\n }\n\n function beenHere() {\n return iframeId in settings && 'iFrameResizer' in iframe\n }\n\n var iframeId = ensureHasId(iframe.id)\n\n if (!beenHere()) {\n processOptions(options)\n setScrolling()\n setLimits()\n setupBodyMarginValues()\n init(createOutgoingMsg(iframeId))\n setupIFrameObject()\n } else {\n warn(iframeId, 'Ignored iFrame, already setup.')\n }\n }\n\n function debouce(fn, time) {\n if (null === timer) {\n timer = setTimeout(function () {\n timer = null\n fn()\n }, time)\n }\n }\n\n var frameTimer = {}\n function debounceFrameEvents(fn, time, frameId) {\n if (!frameTimer[frameId]) {\n frameTimer[frameId] = setTimeout(function () {\n frameTimer[frameId] = null\n fn()\n }, time)\n }\n }\n\n // Not testable in PhantomJS\n /* istanbul ignore next */\n\n function fixHiddenIFrames() {\n function checkIFrames() {\n function checkIFrame(settingId) {\n function chkDimension(dimension) {\n return (\n '0px' ===\n (settings[settingId] && settings[settingId].iframe.style[dimension])\n )\n }\n\n function isVisible(el) {\n return null !== el.offsetParent\n }\n\n if (\n settings[settingId] &&\n isVisible(settings[settingId].iframe) &&\n (chkDimension('height') || chkDimension('width'))\n ) {\n trigger(\n 'Visibility change',\n 'resize',\n settings[settingId].iframe,\n settingId\n )\n }\n }\n\n Object.keys(settings).forEach(function (key) {\n checkIFrame(key)\n })\n }\n\n function mutationObserved(mutations) {\n log(\n 'window',\n 'Mutation observed: ' + mutations[0].target + ' ' + mutations[0].type\n )\n debouce(checkIFrames, 16)\n }\n\n function createMutationObserver() {\n var target = document.querySelector('body'),\n config = {\n attributes: true,\n attributeOldValue: false,\n characterData: true,\n characterDataOldValue: false,\n childList: true,\n subtree: true\n },\n observer = new MutationObserver(mutationObserved)\n\n observer.observe(target, config)\n }\n\n var MutationObserver = getMutationObserver()\n if (MutationObserver) {\n createMutationObserver()\n }\n }\n\n function resizeIFrames(event) {\n function resize() {\n sendTriggerMsg('Window ' + event, 'resize')\n }\n\n log('window', 'Trigger event: ' + event)\n debouce(resize, 16)\n }\n\n // Not testable in PhantomJS\n /* istanbul ignore next */\n function tabVisible() {\n function resize() {\n sendTriggerMsg('Tab Visable', 'resize')\n }\n\n if ('hidden' !== document.visibilityState) {\n log('document', 'Trigger event: Visiblity change')\n debouce(resize, 16)\n }\n }\n\n function sendTriggerMsg(eventName, event) {\n function isIFrameResizeEnabled(iframeId) {\n return (\n settings[iframeId] &&\n 'parent' === settings[iframeId].resizeFrom &&\n settings[iframeId].autoResize &&\n !settings[iframeId].firstRun\n )\n }\n\n Object.keys(settings).forEach(function (iframeId) {\n if (isIFrameResizeEnabled(iframeId)) {\n trigger(eventName, event, settings[iframeId].iframe, iframeId)\n }\n })\n }\n\n function setupEventListeners() {\n addEventListener(window, 'message', iFrameListener)\n\n addEventListener(window, 'resize', function () {\n resizeIFrames('resize')\n })\n\n addEventListener(document, 'visibilitychange', tabVisible)\n\n addEventListener(document, '-webkit-visibilitychange', tabVisible)\n }\n\n function factory() {\n function init(options, element) {\n function chkType() {\n if (!element.tagName) {\n throw new TypeError('Object is not a valid DOM element')\n } else if ('IFRAME' !== element.tagName.toUpperCase()) {\n throw new TypeError(\n 'Expected