text: /*! iFrame Resizer (iframeSizer.contentWindow.min.js) - v2.4.6 - 2014-05-08
   *  Desc: Include this file in any page being loaded into an iframe
   *        to force the iframe to resize to the content size.
   *  Requires: iframeResizer.min.js on host page.
   *  Copyright: (c) 2014 David J. Bradshaw - dave@bradshaw.net
   *  License: MIT
   */
  
  !function(){"use strict";function a(a,b,c){"addEventListener"in window?a.addEventListener(b,c,!1):"attachEvent"in window&&a.attachEvent("on"+b,c)}function b(a){return Z+"["+_+"] "+a}function c(a){Y&&"object"==typeof window.console&&console.log(b(a))}function d(a){"object"==typeof window.console&&console.warn(b(a))}function e(){c("Initialising iFrame"),f(),i(),h("background",K),h("padding",N),o(),m(),j(),p(),n()}function f(){function a(a){return"true"===a?!0:!1}var b=W.substr($).split(":");_=b[0],L=void 0!==b[1]?parseInt(b[1],J):L,O=void 0!==b[2]?a(b[2]):O,Y=void 0!==b[3]?a(b[3]):Y,X=void 0!==b[4]?parseInt(b[4],J):X,ab=void 0!==b[5]?a(b[5]):ab,I=void 0!==b[6]?a(b[6]):I,M=b[7],U=void 0!==b[8]?b[8]:U,K=b[9],N=b[10]}function g(a,b){return-1!==b.indexOf("-")&&(d("Negative CSS value ignored for "+a),b=""),b}function h(a,b){void 0!==b&&""!==b&&"null"!==b&&(document.body.style[a]=b,c("Body "+a+' set to "'+b+'"'))}function i(){void 0===M&&(M=L+"px"),g("margin",M),h("margin",M)}function j(){document.documentElement.style.height="",document.body.style.height="",c('HTML & body height set to "auto"')}function k(){a(window,"resize",function(){B("resize","Window resized")})}function l(){a(window,"click",function(){B("click","Window clicked")})}function m(){T!==U&&(U in hb||(d(U+" is not a valid option for heightCalculationMethod."),U="bodyScroll"),c('Height calculation method set to "'+U+'"'))}function n(){!0===I?(k(),l(),s()):c("Auto Resize disabled")}function o(){var a=document.createElement("div");a.style.clear="both",a.style.display="block",document.body.appendChild(a)}function p(){ab&&(c("Enable public methods"),window.parentIFrame={close:function(){B("close","parentIFrame.close()",0,0)},getId:function(){return _},reset:function(){E("parentIFrame.size")},sendMessage:function(a,b){F(0,0,"message",a,b)},setHeightCalculationMethod:function(a){U=a,m()},setTargetOrigin:function(a){c("Set targetOrigin: "+a),cb=a},size:function(a,b){var c=""+(a?a:"")+(b?","+b:"");C(),B("size","parentIFrame.size("+c+")",a,b)}})}function q(){0!==X&&(c("setInterval: "+X+"ms"),setInterval(function(){B("interval","setInterval: "+X)},Math.abs(X)))}function r(b){function d(b){(void 0===b.height||void 0===b.width||0===b.height||0===b.width)&&(c("Attach listerner to "+b.src),a(b,"load",function(){B("imageLoad","Image loaded")}))}b.forEach(function(a){if("attributes"===a.type&&"src"===a.attributeName)d(a.target);else if("childList"===a.type){var b=a.target.querySelectorAll("img");Array.prototype.forEach.call(b,function(a){d(a)})}})}function s(){function a(){var a=document.querySelector("body"),d={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0},e=new b(function(a){B("mutationObserver","mutationObserver: "+a[0].target+" "+a[0].type),r(a)});c("Enable MutationObserver"),e.observe(a,d)}var b=window.MutationObserver||window.WebKitMutationObserver;b?0>X?q():a():(d("MutationObserver not supported in this browser!"),q())}function t(){function a(a){function b(a){var b=/^\d+(px)?$/i;if(b.test(a))return parseInt(a,J);var d=c.style.left,e=c.runtimeStyle.left;return c.runtimeStyle.left=c.currentStyle.left,c.style.left=a||0,a=c.style.pixelLeft,c.style.left=d,c.runtimeStyle.left=e,a}var c=document.body,d=0;return"defaultView"in document&&"getComputedStyle"in document.defaultView?(d=document.defaultView.getComputedStyle(c,null),d=null!==d?d[a]:0):d=b(c.currentStyle[a]),parseInt(d,J)}return document.body.offsetHeight+a("marginTop")+a("marginBottom")}function u(){return document.body.scrollHeight}function v(){return document.documentElement.offsetHeight}function w(){return document.documentElement.scrollHeight}function x(){return[t(),u(),v(),w()]}function y(){return Math.max.apply(null,x())}function z(){return Math.min.apply(null,x())}function A(){return Math.max(document.documentElement.scrollWidth,document.body.scrollWidth)}function B(a,b,d,e){function f(){a in{reset:1,resetPage:1,init:1}||c("Trigger event: "+b)}function g(){R=n,gb=o,F(R,gb,a)}function h(){return eb&&a in P}function i(){return R!==n||O&&gb!==o}function j(){return!(a in{init:1,interval:1,size:1})}function k(){return U in bb}function l(){c("No change in size detected")}function m(){j()&&k()?E(b):a in{interval:1}||(f(),l())}var n=void 0!==d?d:hb[U](),o=void 0!==e?e:A();h()?c("Trigger event cancelled: "+a):i()?(f(),C(),g()):m()}function C(){eb||(eb=!0,c("Trigger event lock on")),clearTimeout(fb),fb=setTimeout(function(){eb=!1,c("Trigger event lock off"),c("--")},Q)}function D(a){R=hb[U](),gb=A(),F(R,gb,a)}function E(a){var b=U;U=T,c("Reset trigger event: "+a),C(),D("reset"),U=b}function F(a,b,d,e,f){function g(){void 0===f?f=cb:c("Message targetOrigin: "+f)}function h(){var g=a+":"+b,h=_+":"+g+":"+d+(void 0!==e?":"+e:"");c("Sending message to host page ("+h+")"),db.postMessage(Z+h,f)}g(),h()}function G(){return"iFrameResize"in window}function H(a){function b(){return Z===(""+a.data).substr(0,$)}b()&&(S?(W=a.data,e(),B("init","Init message from host page"),S=!1,setTimeout(function(){V=!1},Q)):"reset"===a.data.split("]")[1]?V?c("Page reset ignored by init"):(c("Page size reset by host page"),D("resetPage")):a.data===W||G()||d("Unexpected message ("+a.data+")"))}var I=!0,J=10,K="",L=0,M="",N="",O=!1,P={resize:1,click:1},Q=64,R=1,S=!0,T="offset",U=T,V=!0,W="",X=32,Y=!1,Z="[iFrameSizer]",$=Z.length,_="",ab=!1,bb={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},cb="*",db=window.parent,eb=!1,fb=null,gb=1,hb={offset:t,bodyOffset:t,bodyScroll:u,documentElementOffset:v,scroll:w,documentElementScroll:w,max:y,min:z,grow:y};a(window,"message",H)}();
  //# sourceMappingURL=../src/iframeResizer.contentWindow.map