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,QAAE,KAAI,SAAE,MAAK,EAAE,GAAK;QACjD,QAAQ,GAAG,CAAC,MAAM;QAClB,OAAO,KAAK,OAAO,CAAC,KAAK,KAAK,WAAW;QACzC,KAAK,CAAC,KAAK,GAAG;IAChB;IAEA,OAAO,UACL;QAAC;QAAS;KAAe,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,SAAS,CAAC,OAAO,CAAC;AAE3E;AAEA,SAAS,gCAAU,KAAK,EAAE,IAAI,EAAE,WAAW,IAAI,EAAE;IAC/C,MAAM,OAAO,MAAM,IAAI,CAAC,CAAC,OAAS,KAAK,IAAI,KAAK;IAChD,OAAO,OAAO,KAAK,KAAK,GAAG,QAAQ;AACrC;AAEA,SAAS,qCAAe,KAAK,EAAE;IAC7B,OAAO,MAAM,MAAM,CAAC,CAAC,OAAS;QAC5B,OAAO,4CAAsB,IAAI,CAAC,CAAC,MAAQ;YACzC,MAAM,OAAO,KAAK,IAAI;YACtB,OACE,QAAQ,QACP,IAAI,QAAQ,CAAC,QAAQ,KAAK,UAAU,CAAC,IAAI,OAAO,CAAC,KAAK;QAE3D;IACF;AACF;AAEA,SAAS,sCAAgB;IACvB,MAAM,SACJ,SAAS,aAAa,IACtB,SAAS,aAAa,CAAC;IACzB,MAAM,YAAY,OAAO,GAAG;IAE5B,IAAI,aAAa,UAAU,QAAQ,CAAC,oBAClC,OAAO,UAAU,OAAO,CAAC,kCAAkC;IAG7D,OAAO,CAAC,EAAE,EAAE,SAAS,IAAI,CAAC,SAAS,CAAC;AACtC;AAEA,SAAS,gBAAgB,CAAC,oBAAoB,IAAM;","sources":["app/assets/lookbook/js/lookbook.js","node_modules/iframe-resizer/js/iframeResizer.js","app/assets/lookbook/js/lib/lookbook.js"],"sourcesContent":["import \"iframe-resizer/js/iframeResizer\";\nimport \"./lib/lookbook\";\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