if (typeof iFrameResize !== "function") { /*! iFrame Resizer (iframeSizer.min.js ) - v4.0.4 - 2019-03-04 * Desc: Force cross domain iframes to size to content. * Requires: iframeResizer.contentWindow.min.js to be loaded into the target frame. * Copyright: (c) 2019 David J. Bradshaw - dave@bradshaw.net * License: MIT */ !function(u){if("undefined"!=typeof window){var e,l=0,m=!1,n=!1,p="message".length,b="[iFrameSizer]",y=b.length,v=null,r=window.requestAnimationFrame,g={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},F={},i=null,h={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClosed:function(){},onInit:function(){},onMessage:function(){O("onMessage function not defined")},onResized:function(){},onScroll:function(){return!0}},I={};window.jQuery&&((e=window.jQuery).fn?e.fn.iFrameResize||(e.fn.iFrameResize=function(i){return this.filter("iframe").each(function(e,n){d(n,i)}).end()}):z("","Unable to bind to jQuery, it is not fully loaded.")),"function"==typeof define&&define.amd?define([],B):"object"==typeof module&&"object"==typeof module.exports&&(module.exports=B()),window.iFrameResize=window.iFrameResize||B()}function w(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function M(e,n,i){e.addEventListener(n,i,!1)}function x(e,n,i){e.removeEventListener(n,i,!1)}function o(e){return b+"["+(i="Host page: "+(n=e),window.top!==window.self&&(i=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+n:"Nested host page: "+n),i)+"]";var n,i}function t(e){return F[e]?F[e].log:m}function k(e,n){a("log",e,n,t(e))}function z(e,n){a("info",e,n,t(e))}function O(e,n){a("warn",e,n,!0)}function a(e,n,i,t){!0===t&&"object"==typeof window.console&&console[e](o(n),i)}function s(n){function a(){e("Height"),e("Width"),P(function(){j(h),C(w),l("onResized",h)},h,"init")}function e(e){var n=Number(F[w]["max"+e]),i=Number(F[w]["min"+e]),t=e.toLowerCase(),o=Number(h[t]);k(w,"Checking "+t+" is in range "+i+"-"+n),oF[f]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(F[f]&&F[f].bodyMargin)&&"0"!==(F[f]&&F[f].bodyMargin)||(F[f].bodyMarginV1=F[f].bodyMargin,F[f].bodyMargin=F[f].bodyMargin+"px"),r=A(f),(s=w())&&(a=s,i.parentNode&&new a(function(e){e.forEach(function(e){Array.prototype.slice.call(e.removedNodes).forEach(function(e){e===i&&E(i)})})}).observe(i.parentNode,{childList:!0})),M(i,"load",function(){var e,n;H("iFrame.onload",r,i,u,!0),e=F[f]&&F[f].firstRun,n=F[f]&&F[f].heightCalculationMethod in g,!e&&n&&W({iframe:i,height:0,width:0,type:"init"})}),H("init",r,i,u,!0),F[f]&&(F[f].iframe.iFrameResizer={close:E.bind(null,F[f].iframe),removeListeners:T.bind(null,F[f].iframe),resize:H.bind(null,"Window resize","resize",F[f].iframe),moveToAnchor:function(e){H("Move to anchor","moveToAnchor:"+e,F[f].iframe,f)},sendMessage:function(e){H("Send Message","message:"+(e=JSON.stringify(e)),F[f].iframe,f)}}))}function c(e,n){null===i&&(i=setTimeout(function(){i=null,e()},n))}function f(){"hidden"!==document.visibilityState&&(k("document","Trigger event: Visiblity change"),c(function(){q("Tab Visable","resize")},16))}function q(i,t){Object.keys(F).forEach(function(e){var n;F[n=e]&&"parent"===F[n].resizeFrom&&F[n].autoResize&&!F[n].firstRun&&H(i,t,document.getElementById(e),e)})}function L(){M(window,"message",s),M(window,"resize",function(){var e;k("window","Trigger event: "+(e="resize")),c(function(){q("Window "+e,"resize")},16)}),M(document,"visibilitychange",f),M(document,"-webkit-visibilitychange",f)}function B(){function t(e,n){n&&(!function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected '; document.scripts[document.scripts.length - 1].parentElement.appendChild(iframewrapper); iFrameResize({bodyBackground:'none',bodyMargin:0,heightCalculationMethod:'bodyOffset',log:false},'#' + 'wp-inframe-'+ ifr );