!function(e){"use strict";function n(n,t,i){"addEventListener"in e?n.addEventListener(t,i,!1):"attachEvent"in e&&n.attachEvent("on"+t,i)}function t(n,t,i){"removeEventListener"in e?n.removeEventListener(t,i,!1):"detachEvent"in e&&n.detachEvent("on"+t,i)}function i(){var n,t=["moz","webkit","o","ms"];for(n=0;nn&&(o=n,f(X,"Set "+i+" to max value")),Q[i]=""+o}function d(){function e(){function e(){var e=0,i=!1;for(f(X,"Checking connection is from allowed list of origins: "+t);eA[k]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}t("Height"),t("Width"),n("maxHeight"),n("minHeight"),n("maxWidth"),n("minWidth")}function o(){var e=t&&t.id||V.id+O++;return null!==document.getElementById(e)&&(e+=O++),e}function r(n){return U=n,""===n&&(e.id=n=o(),T=(t||{}).log,U=n,f(n,"Added missing iframe ID: "+n+" ("+e.src+")")),n}function a(){f(k,"IFrame scrolling "+(A[k].scrolling?"enabled":"disabled")+" for "+k),e.style.overflow=!1===A[k].scrolling?"hidden":"auto",e.scrolling=!1===A[k].scrolling?"no":"yes"}function c(){"number"!=typeof A[k].bodyMargin&&"0"!==A[k].bodyMargin||(A[k].bodyMarginV1=A[k].bodyMargin,A[k].bodyMargin=A[k].bodyMargin+"px")}function d(){var n=A[k].firstRun,t=A[k].heightCalculationMethod in L;!n&&t&&h({iframe:e,height:0,width:0,type:"init"})}function l(){Function.prototype.bind&&(A[k].iframe.iFrameResizer={close:m.bind(null,A[k].iframe),resize:v.bind(null,"Window resize","resize",A[k].iframe),moveToAnchor:function(e){v("Move to anchor","moveToAnchor:"+e,A[k].iframe,k)},sendMessage:function(e){e=JSON.stringify(e),v("Send Message","message:"+e,A[k].iframe,k)}})}function s(t){function i(){v("iFrame.onload",t,e),d()}n(e,"load",i),v("init",t,e)}function g(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}function p(e){for(var n in V)V.hasOwnProperty(n)&&(A[k][n]=e.hasOwnProperty(n)?e[n]:V[n])}function b(e){return""===e||"file://"===e?"*":e}function y(n){n=n||{},A[k]={firstRun:!0,iframe:e,remoteHost:e.src.split("/").slice(0,3).join("/")},g(n),p(n),A[k].targetOrigin=!0===A[k].checkOrigin?b(A[k].remoteHost):"*"}function _(){return k in A&&"iFrameResizer"in e}console.log("setting up iframe");var k=r(e.id);_()?u(k,"Ignored iFrame, already setup."):(y(t),a(),i(),c(),s(w(k)),l())}function I(e,n){null===q&&(q=setTimeout(function(){q=null,e()},n))}function x(){function n(){function e(e){function n(n){return"0px"===A[e].iframe.style[n]}function t(e){return null!==e.offsetParent}t(A[e].iframe)&&(n("height")||n("width"))&&v("Visibility change","resize",A[e].iframe,e)}for(var n in A)e(n)}function t(e){f("window","Mutation observed: "+e[0].target+" "+e[0].type),I(n,16)}function i(){var e=document.querySelector("body"),n={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};new o(t).observe(e,n)}var o=e.MutationObserver||e.WebKitMutationObserver;o&&i()}function F(e){function n(){M("Window "+e,"resize")}f("window","Trigger event: "+e),I(n,16)}function E(){function e(){M("Tab Visable","resize")}"hidden"!==document.visibilityState&&(f("document","Trigger event: Visiblity change"),I(e,16))}function M(e,n){function t(e){return"parent"===A[e].resizeFrom&&A[e].autoResize&&!A[e].firstRun}for(var i in A)t(i)&&v(e,n,document.getElementById(i),i)}function z(){n(e,"message",l),n(e,"resize",function(){F("resize")}),n(document,"visibilitychange",E),n(document,"-webkit-visibilitychange",E),n(e,"focusin",function(){F("focus")}),n(e,"focus",function(){F("focus")})}function R(){function e(e,t){function i(){if(!t.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==t.tagName.toUpperCase())throw new TypeError("Expected