diff --git a/iframe-resizer.zip b/iframe-resizer.zip index 6c610a98c..70860e504 100644 Binary files a/iframe-resizer.zip and b/iframe-resizer.zip differ diff --git a/js-dist/iframe-resizer.child.js b/js-dist/iframe-resizer.child.js index a74f26794..31304da84 100644 --- a/js-dist/iframe-resizer.child.js +++ b/js-dist/iframe-resizer.child.js @@ -1,7 +1,7 @@ /*! * @preserve * - * @module iframe-resizer/child 5.2.2 (iife) + * @module iframe-resizer/child 5.2.3 (iife) * * @license GPL-3.0 for non-commercial use only. * For commercial use, you must purchase a license from @@ -17,4 +17,4 @@ */ -!function(){"use strict";const e="5.2.2",t=10,n="data-iframe-size",o="data-iframe-overflow",i="bottom",r="right",a=(e,t,n,o)=>e.addEventListener(t,n,o||!1),l=(e,t,n)=>e.removeEventListener(t,n,!1),s=["Puchspk Spjluzl Rlf","Tpzzpun Spjluzl Rlf","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.Jvttlyjphs SpjluzlMvy jvttlyjphs bzl,

pmyhtl-ylzpgly ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa oaawz://pmyhtl-ylzpgly.jvt/wypjpun.Vwlu Zvbyjl SpjluzlPm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol spjluzl rlf pu

pmyhtl-ylzpgly vwapvuz av NWSc3.Mvy tvyl pumvythapvu wslhzl zll: oaawz://pmyhtl-ylzpgly.jvt/nws","NWSc3 Spjluzl ClyzpvuAopz clyzpvu vm

pmyhtl-ylzpgly pz ilpun bzlk bukly aol alytz vm aol NWS C3 spjluzl. Aopz spjluzl hssvdz fvb av bzl

pmyhtl-ylzpgly pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.Mvy tvyl pumvythapvu cpzpa oaawz://pmyhtl-ylzpgly.jvt/wypjpun."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const c=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(s[e]),d=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},u=e=>e;let m="";const f=e=>""!=`${e}`&&void 0!==e;const p=(...e)=>[`[iframe-resizer][${m}]`,...e].join(" "),h=(...e)=>console?.info(`[iframe-resizer][${m}]`,...e),y=(...e)=>console?.warn(p(...e)),g=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("
","\n").replaceAll("","").replaceAll("","").replaceAll("","").replaceAll("","").replaceAll("","")):e(t.replaceAll("
","\n").replaceAll(/<[/a-z]+>/gi,"")))(p)(...e)),v=e=>g(e);let b=[];const w=e=>{const t=e.side||i,n=e.onChange||u,r={root:document.documentElement,rootMargin:"0px",threshold:1},a=new WeakSet,l=new IntersectionObserver((e=>{e.forEach((e=>{e.target.toggleAttribute(o,(e=>0===e.boundingClientRect[t]||e.boundingClientRect[t]>e.rootBounds[t])(e))})),b=document.querySelectorAll(`[${o}]`),n()}),r);return e=>e.forEach((e=>{a.has(e)||(l.observe(e),a.add(e))}))},z=()=>b.length>0,S=1e5,E="--ifr-start",j="--ifr-end",$="--ifr-measure",P=[],C=new WeakSet,M=e=>"object"==typeof e&&C.add(e),O=e=>Math.floor(e*S)/S;let A=null,T=null,k={};const I=setInterval((()=>{if(P.length<10)return;if(k.hasTags&&k.len<25)return;P.sort();const e=Math.min(P.reduce(((e,t)=>e+t),0)/P.length,P[Math.floor(P.length/2)]);e<=4||(clearInterval(I),g(`Performance Warning\n\nCalculating the page size is taking an excessive amount of time (${O(e)}ms).\n\nTo improve performance add the data-iframe-size attribute to the ${k.Side.toLowerCase()} most element on the page. For more details see: https://iframe-resizer.com/perf.`))}),5e3);function N(e){e.getEntries().forEach((e=>{if(e.name===j){const{duration:t}=performance.measure($,E,j);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;k=e,C.has(T)||A===T||i&&o<=1||(r||M(T),A=T,h(`\n${n} position calculated from:`,T,`\nParsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${O(t)}ms`))}(e.detail,t),P.push(t),P.length>100&&P.shift()}}))}function R(){new PerformanceObserver(N).observe({entryTypes:["mark"]}),M(document.documentElement),M(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",R):R()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>(y("Custom height calculation function not defined"),De.auto()),width:()=>(y("Custom width calculation function not defined"),Ve.auto())},p={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,documentElementBoundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},h=128,S={},$="checkVisibility"in window,P="auto",C="[iFrameSizer]",M=C.length,O={max:1,min:1,bodyScroll:1,documentElementScroll:1},A=["body"],k="scroll";let I,N,R=!0,x="",B=0,q="",L=null,W="",F=!0,U=!1,D=!0,V=!1,J=1,H=P,Z=!0,Q="",X={},Y=!1,G=0,K=!1,_="",ee=u,te="child",ne=null,oe=!1,ie="",re=[],ae=window.parent,le="*",se=0,ce=!1,de="",ue=1,me=k,fe=window,pe=()=>{y("onMessage function not defined")},he=()=>{},ye=null,ge=null;function ve(){var o,l;!function(){const e=e=>"true"===e,t=Q.slice(M).split(":");_=t[0],B=void 0===t[1]?B:Number(t[1]),U=void 0===t[2]?U:e(t[2]),Y=void 0===t[3]?Y:e(t[3]),R=void 0===t[6]?R:e(t[6]),q=t[7],H=void 0===t[8]?H:t[8],x=t[9],W=t[10],se=void 0===t[11]?se:Number(t[11]),X.enable=void 0!==t[12]&&e(t[12]),te=void 0===t[13]?te:t[13],me=void 0===t[14]?me:t[14],K=void 0===t[15]?K:e(t[15]),I=void 0===t[16]?I:Number(t[16]),N=void 0===t[17]?N:Number(t[17]),F=void 0===t[18]?F:e(t[18]),t[19],de=t[20]||de,G=void 0===t[21]?G:Number(t[21])}(),function(){function e(){const e=window.iframeResizer||window.iFrameResizer;pe=e?.onMessage||pe,he=e?.onReady||he,"number"==typeof e?.offset&&(g("Deprecated option\n\n The offset option has been renamed to offsetSize. Use of the old name will be removed in a future version of iframe-resizer."),F&&(I=e?.offset),U&&(N=e?.offset)),"number"==typeof e?.offsetSize&&(F&&(I=e?.offsetSize),U&&(N=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(ie=e.sizeSelector),le=e?.targetOrigin||le,H=e?.heightCalculationMethod||H,me=e?.widthCalculationMethod||me}function t(e,t){return"function"==typeof e&&(s[t]=e,e="custom"),e}1!==G&&"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),H=t(H,"height"),me=t(me,"width"))}(),m={id:_,logging:Y}.id,function(){try{oe="iframeParentListener"in window.parent}catch(e){}}(),G<0?v(`${c(G+2)}${c(2)}`):de.codePointAt(0)>4||G<2&&v(c(3)),de&&""!==de&&"false"!==de?de!==e&&g(`Version mismatch\n\nThe parent and child pages are running different versions of iframe resizer.\n\nParent page: ${de} - Child page: ${e}.\n`):g("Legacy version detected on parent page\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use @iframe-resizer/parent.\n\nSee https://iframe-resizer.com/setup/ for more details.\n"),Ce(),Me(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((o=>{e=!0,o.removeAttribute(t),o.toggleAttribute(n,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&g("Deprecated Attributes\n \nThe data-iframe-height and data-iframe-width attributes have been deprecated and replaced with the single data-iframe-size attribute. Use of the old attributes will be removed in a future version of iframe-resizer.")}(),we(),F!==U&&(ee=w({onChange:d(be),side:F?i:r})),1!==G&&(fe.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===R?(R=!0,Oe()):!1===e&&!0===R&&(R=!1,$e("remove"),ne?.disconnect(),L?.disconnect()),Ye(0,0,"autoResize",JSON.stringify(R)),R),close(){Ye(0,0,"close")},getId:()=>_,getPageInfo(e){if("function"==typeof e)return ye=e,Ye(0,0,"pageInfo"),void g("Deprecated Method\n \nThe getPageInfo() method has been deprecated and replaced with getParentProps(). Use of this method will be removed in a future version of iframe-resizer.\n");ye=null,Ye(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIFrame.getParentProps(callback) callback not a function");return ge=e,Ye(0,0,"parentInfo"),()=>{ge=null,Ye(0,0,"parentInfoStop")}},getParentProperties(e){g("Renamed Method\n \nThe getParentProperties() method has been renamed getParentProps(). Use of the old name will be removed in a future version of iframe-resizer.\n"),this.getParentProps(e)},moveToAnchor(e){X.findTarget(e)},reset(){Xe()},scrollBy(e,t){Ye(t,e,"scrollBy")},scrollTo(e,t){Ye(t,e,"scrollTo")},scrollToOffset(e,t){Ye(t,e,"scrollToOffset")},sendMessage(e,t){Ye(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){H=e,Ce()},setWidthCalculationMethod(e){me=e,Me()},setTargetOrigin(e){le=e},resize(e,t){He("size",`parentIFrame.size(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){g("Deprecated Method\n \nThe size() method has been deprecated and replaced with resize(). Use of this method will be removed in a future version of iframe-resizer.\n"),this.resize(e,t)}}),fe.parentIFrame=fe.parentIframe),function(){function e(e){Ye(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){a(window.document,t,e)}!0===K&&(t("mouseenter"),t("mouseleave"))}(),X=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function n(n){const o=n.getBoundingClientRect(),i=e();return{x:parseInt(o.left,t)+parseInt(i.x,t),y:parseInt(o.top,t)+parseInt(i.y,t)}}function o(e){function t(e){const t=n(e);Ye(t.y,t.x,"scrollToOffset")}const o=e.split("#")[1]||e,i=decodeURIComponent(o),r=document.getElementById(i)||document.getElementsByName(i)[0];void 0===r?Ye(0,0,"inPageLink",`#${o}`):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){function e(e){function t(e){e.preventDefault(),o(this.getAttribute("href"))}"#"!==e.getAttribute("href")&&a(e,"click",t)}document.querySelectorAll('a[href^="#"]').forEach(e)}function l(){a(window,"hashchange",i)}function s(){setTimeout(i,h)}function c(){r(),l(),s()}return X.enable&&(1===G?g("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),ze(Le(document)()),void 0===q&&(q=`${B}px`),Se("margin",(o="margin",(l=q).includes("-")&&(y(`Negative CSS value ignored for ${o}`),l=""),l)),Se("background",x),Se("padding",W),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}(),Ee()}const be=()=>{He("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&Ye(0,0,"title",document.title),Oe(),he()};function we(){re=document.querySelectorAll(`[${n}]`),V=re.length>0}function ze(e){V?setTimeout(be):ee(e)}function Se(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function Ee(){""!==ie&&document.querySelectorAll(ie).forEach((e=>{e.dataset.iframeSize=!0}))}function je(e){({add(t){function n(){He(e.eventName,e.eventType)}S[t]=n,a(window,t,n,{passive:!0})},remove(e){const t=S[e];delete S[e],l(window,e,t)}})[e.method](e.eventName)}function $e(e){je({method:e,eventType:"After Print",eventName:"afterprint"}),je({method:e,eventType:"Before Print",eventName:"beforeprint"}),je({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}function Pe(e,t,n,o){return t!==e&&(e in n||(y(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in p&&g(`Deprecated ${o}CalculationMethod (${e})\n\nThis version of iframe-resizer can auto detect the most suitable ${o} calculation method. It is recommended that you remove this option.`)),e}function Ce(){H=Pe(H,P,De,"height")}function Me(){me=Pe(me,k,Ve,"width")}function Oe(){!0===R&&($e("add"),L=function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{const{length:n}=t;for(let o=0;or*s+++a&&uHe("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!f(e):return"";case f(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case f(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(f(e.className)?`.${e.className}`:"")}}(t)}`),setTimeout((()=>{Ae&&Ae(),Ae=void 0}),0)}const ke=e=>{const t=getComputedStyle(e);return""!==t?.position&&"static"!==t?.position},Ie=()=>[...Le(document)()].filter(ke),Ne=new WeakSet;function Re(e){e&&(Ne.has(e)||(ne.observe(e),Ne.add(e)))}function xe(e){[...Ie(),...A.flatMap((t=>e.querySelector(t)))].forEach(Re)}function Be(e){performance.mark(E);const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=V?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(E);const l=V?re:z()?b:Le(document)();let s=l.length;return l.forEach((t=>{V||!$||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1})),T=r,performance.mark(j,{detail:{Side:t,len:s,hasTags:V,logging:Y}}),a}const qe=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.documentElementBoundingClientRect()],Le=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)"),We={height:0,width:0},Fe={height:0,width:0};function Ue(e){function t(){return Fe[i]=r,We[i]=s,r}const n=z(),o=e===De,i=o?"height":"width",r=e.documentElementBoundingClientRect(),a=Math.ceil(r),l=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return s;case V:return e.taggedElement();case!n&&0===Fe[i]&&0===We[i]:return t();case ce&&r===Fe[i]&&s===We[i]:return Math.max(r,s);case 0===r:return s;case!n&&r!==Fe[i]&&s<=We[i]:return t();case!o:return e.taggedElement();case!n&&rs:return t()}return Math.max(e.taggedElement(),t())}const De={enabled:()=>F,getOffset:()=>I,auto:()=>Ue(De),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>De.bodyOffset(),custom:()=>s.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,documentElementBoundingClientRect:()=>document.documentElement.getBoundingClientRect().bottom,max:()=>Math.max(...qe(De)),min:()=>Math.min(...qe(De)),grow:()=>De.max(),lowestElement:()=>Be(i),taggedElement:()=>Be(i)},Ve={enabled:()=>U,getOffset:()=>N,auto:()=>Ue(Ve),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>s.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,documentElementBoundingClientRect:()=>document.documentElement.getBoundingClientRect().right,max:()=>Math.max(...qe(Ve)),min:()=>Math.min(...qe(Ve)),rightMostElement:()=>Be(r),scroll:()=>Math.max(Ve.bodyScroll(),Ve.documentElementScroll()),taggedElement:()=>Be(r)};function Je(e,t,n,o,i){let r,a;!function(){const e=(e,t)=>!(Math.abs(e-t)<=se);return r=void 0===n?De[H]():n,a=void 0===o?Ve[me]():o,F&&e(J,r)||U&&e(ue,a)}()&&"init"!==e?!(e in{init:1,size:1})&&(F&&H in O||U&&me in O)&&Xe():(Ze(),J=r,ue=a,Ye(J,ue,e,i))}function He(e,t,n,o,i){document.hidden||Je(e,0,n,o,i)}function Ze(){ce||(ce=!0,requestAnimationFrame((()=>{ce=!1})))}function Qe(e){J=De[H](),ue=Ve[me](),Ye(J,ue,e)}function Xe(e){const t=H;H=P,Ze(),Qe("reset"),H=t}function Ye(e,t,n,o,i){G<-1||(void 0!==i||(i=le),function(){const r=`${_}:${e+(I||0)}:${t+(N||0)}:${n}${void 0===o?"":`:${o}`}`;oe?window.parent.iframeParentListener(C+r):ae.postMessage(C+r,i)}())}function Ge(e){const t={init:function(){Q=e.data,ae=e.source,ve(),D=!1,setTimeout((()=>{Z=!1}),h)},reset(){Z||Qe("resetPage")},resize(){He("resizeParent")},moveToAnchor(){X.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();ye?ye(JSON.parse(e)):Ye(0,0,"pageInfoStop")},parentInfo(){const e=o();ge?ge(Object.freeze(JSON.parse(e))):Ye(0,0,"parentInfoStop")},message(){const e=o();pe(JSON.parse(e))}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};C===`${e.data}`.slice(0,M)&&(!1!==D?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||y(`Unexpected message (${e.data})`)}())}function Ke(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}function _e(e){return Ge(e),fe}window.iframeChildListener=e=>Ge({data:e,sameDomain:!0}),a(window,"message",Ge),a(window,"readystatechange",Ke),Ke();try{top?.document?.getElementById("banner")&&(fe={},window.mockMsgListener=_e,l(window,"message",Ge),define([],(()=>_e)))}catch(e){}}()}(); +!function(){"use strict";const e="5.2.3",t=10,n="data-iframe-size",o="data-iframe-overflow",i="bottom",r="right",a=(e,t,n,o)=>e.addEventListener(t,n,o||!1),l=(e,t,n)=>e.removeEventListener(t,n,!1),s=["Puchspk Spjluzl Rlf","Tpzzpun Spjluzl Rlf","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.Jvttlyjphs SpjluzlMvy jvttlyjphs bzl,

pmyhtl-ylzpgly ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa oaawz://pmyhtl-ylzpgly.jvt/wypjpun.Vwlu Zvbyjl SpjluzlPm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol spjluzl rlf pu

pmyhtl-ylzpgly vwapvuz av NWSc3.Mvy tvyl pumvythapvu wslhzl zll: oaawz://pmyhtl-ylzpgly.jvt/nws","NWSc3 Spjluzl ClyzpvuAopz clyzpvu vm

pmyhtl-ylzpgly pz ilpun bzlk bukly aol alytz vm aol NWS C3 spjluzl. Aopz spjluzl hssvdz fvb av bzl

pmyhtl-ylzpgly pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.Mvy tvyl pumvythapvu cpzpa oaawz://pmyhtl-ylzpgly.jvt/wypjpun."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const c=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(s[e]),d=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},u=e=>e;let m="";const f=e=>""!=`${e}`&&void 0!==e;const p=(...e)=>[`[iframe-resizer][${m}]`,...e].join(" "),h=(...e)=>console?.info(`[iframe-resizer][${m}]`,...e),y=(...e)=>console?.warn(p(...e)),g=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("
","\n").replaceAll("","").replaceAll("","").replaceAll("","").replaceAll("","").replaceAll("","")):e(t.replaceAll("
","\n").replaceAll(/<[/a-z]+>/gi,"")))(p)(...e)),v=e=>g(e);let b=[];const w=e=>{const t=e.side||i,n=e.onChange||u,r={root:document.documentElement,rootMargin:"0px",threshold:1},a=new WeakSet,l=new IntersectionObserver((e=>{e.forEach((e=>{e.target.toggleAttribute(o,(e=>0===e.boundingClientRect[t]||e.boundingClientRect[t]>e.rootBounds[t])(e))})),b=document.querySelectorAll(`[${o}]`),n()}),r);return e=>e.forEach((e=>{a.has(e)||(l.observe(e),a.add(e))}))},z=()=>b.length>0,S=1e5,E="--ifr-start",j="--ifr-end",$="--ifr-measure",P=[],C=new WeakSet,M=e=>"object"==typeof e&&C.add(e),O=e=>Math.floor(e*S)/S;let A=null,T=null,k={};const I=setInterval((()=>{if(P.length<10)return;if(k.hasTags&&k.len<25)return;P.sort();const e=Math.min(P.reduce(((e,t)=>e+t),0)/P.length,P[Math.floor(P.length/2)]);e<=4||(clearInterval(I),g(`Performance Warning\n\nCalculating the page size is taking an excessive amount of time (${O(e)}ms).\n\nTo improve performance add the data-iframe-size attribute to the ${k.Side.toLowerCase()} most element on the page. For more details see: https://iframe-resizer.com/perf.`))}),5e3);function N(e){e.getEntries().forEach((e=>{if(e.name===j){const{duration:t}=performance.measure($,E,j);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;k=e,C.has(T)||A===T||i&&o<=1||(r||M(T),A=T,h(`\n${n} position calculated from:`,T,`\nParsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${O(t)}ms`))}(e.detail,t),P.push(t),P.length>100&&P.shift()}}))}function R(){new PerformanceObserver(N).observe({entryTypes:["mark"]}),M(document.documentElement),M(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",R):R()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},s={height:()=>(y("Custom height calculation function not defined"),De.auto()),width:()=>(y("Custom width calculation function not defined"),Ve.auto())},p={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,documentElementBoundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},h=128,S={},$="checkVisibility"in window,P="auto",C="[iFrameSizer]",M=C.length,O={max:1,min:1,bodyScroll:1,documentElementScroll:1},A=["body"],k="scroll";let I,N,R=!0,x="",B=0,q="",L=null,W="",F=!0,U=!1,D=!0,V=!1,J=1,H=P,Z=!0,Q="",X={},Y=!1,G=0,K=!1,_="",ee=u,te="child",ne=null,oe=!1,ie="",re=[],ae=window.parent,le="*",se=0,ce=!1,de="",ue=1,me=k,fe=window,pe=()=>{y("onMessage function not defined")},he=()=>{},ye=null,ge=null;function ve(){var o,l;!function(){const e=e=>"true"===e,t=Q.slice(M).split(":");_=t[0],B=void 0===t[1]?B:Number(t[1]),U=void 0===t[2]?U:e(t[2]),Y=void 0===t[3]?Y:e(t[3]),R=void 0===t[6]?R:e(t[6]),q=t[7],H=void 0===t[8]?H:t[8],x=t[9],W=t[10],se=void 0===t[11]?se:Number(t[11]),X.enable=void 0!==t[12]&&e(t[12]),te=void 0===t[13]?te:t[13],me=void 0===t[14]?me:t[14],K=void 0===t[15]?K:e(t[15]),I=void 0===t[16]?I:Number(t[16]),N=void 0===t[17]?N:Number(t[17]),F=void 0===t[18]?F:e(t[18]),t[19],de=t[20]||de,G=void 0===t[21]?G:Number(t[21])}(),function(){function e(){const e=window.iframeResizer||window.iFrameResizer;pe=e?.onMessage||pe,he=e?.onReady||he,"number"==typeof e?.offset&&(g("Deprecated option\n\n The offset option has been renamed to offsetSize. Use of the old name will be removed in a future version of iframe-resizer."),F&&(I=e?.offset),U&&(N=e?.offset)),"number"==typeof e?.offsetSize&&(F&&(I=e?.offsetSize),U&&(N=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(ie=e.sizeSelector),le=e?.targetOrigin||le,H=e?.heightCalculationMethod||H,me=e?.widthCalculationMethod||me}function t(e,t){return"function"==typeof e&&(s[t]=e,e="custom"),e}1!==G&&"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),H=t(H,"height"),me=t(me,"width"))}(),m={id:_,logging:Y}.id,function(){try{oe="iframeParentListener"in window.parent}catch(e){}}(),G<0?v(`${c(G+2)}${c(2)}`):de.codePointAt(0)>4||G<2&&v(c(3)),de&&""!==de&&"false"!==de?de!==e&&g(`Version mismatch\n\nThe parent and child pages are running different versions of iframe resizer.\n\nParent page: ${de} - Child page: ${e}.\n`):g("Legacy version detected on parent page\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use @iframe-resizer/parent.\n\nSee https://iframe-resizer.com/setup/ for more details.\n"),Ce(),Me(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((o=>{e=!0,o.removeAttribute(t),o.toggleAttribute(n,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&g("Deprecated Attributes\n \nThe data-iframe-height and data-iframe-width attributes have been deprecated and replaced with the single data-iframe-size attribute. Use of the old attributes will be removed in a future version of iframe-resizer.")}(),we(),F!==U&&(ee=w({onChange:d(be),side:F?i:r})),1!==G&&(fe.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===R?(R=!0,Oe()):!1===e&&!0===R&&(R=!1,$e("remove"),ne?.disconnect(),L?.disconnect()),Ye(0,0,"autoResize",JSON.stringify(R)),R),close(){Ye(0,0,"close")},getId:()=>_,getPageInfo(e){if("function"==typeof e)return ye=e,Ye(0,0,"pageInfo"),void g("Deprecated Method\n \nThe getPageInfo() method has been deprecated and replaced with getParentProps(). Use of this method will be removed in a future version of iframe-resizer.\n");ye=null,Ye(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIFrame.getParentProps(callback) callback not a function");return ge=e,Ye(0,0,"parentInfo"),()=>{ge=null,Ye(0,0,"parentInfoStop")}},getParentProperties(e){g("Renamed Method\n \nThe getParentProperties() method has been renamed getParentProps(). Use of the old name will be removed in a future version of iframe-resizer.\n"),this.getParentProps(e)},moveToAnchor(e){X.findTarget(e)},reset(){Xe()},scrollBy(e,t){Ye(t,e,"scrollBy")},scrollTo(e,t){Ye(t,e,"scrollTo")},scrollToOffset(e,t){Ye(t,e,"scrollToOffset")},sendMessage(e,t){Ye(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){H=e,Ce()},setWidthCalculationMethod(e){me=e,Me()},setTargetOrigin(e){le=e},resize(e,t){He("size",`parentIFrame.size(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){g("Deprecated Method\n \nThe size() method has been deprecated and replaced with resize(). Use of this method will be removed in a future version of iframe-resizer.\n"),this.resize(e,t)}}),fe.parentIFrame=fe.parentIframe),function(){function e(e){Ye(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){a(window.document,t,e)}!0===K&&(t("mouseenter"),t("mouseleave"))}(),X=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function n(n){const o=n.getBoundingClientRect(),i=e();return{x:parseInt(o.left,t)+parseInt(i.x,t),y:parseInt(o.top,t)+parseInt(i.y,t)}}function o(e){function t(e){const t=n(e);Ye(t.y,t.x,"scrollToOffset")}const o=e.split("#")[1]||e,i=decodeURIComponent(o),r=document.getElementById(i)||document.getElementsByName(i)[0];void 0===r?Ye(0,0,"inPageLink",`#${o}`):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){function e(e){function t(e){e.preventDefault(),o(this.getAttribute("href"))}"#"!==e.getAttribute("href")&&a(e,"click",t)}document.querySelectorAll('a[href^="#"]').forEach(e)}function l(){a(window,"hashchange",i)}function s(){setTimeout(i,h)}function c(){r(),l(),s()}return X.enable&&(1===G?g("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),ze(Le(document)()),void 0===q&&(q=`${B}px`),Se("margin",(o="margin",(l=q).includes("-")&&(y(`Negative CSS value ignored for ${o}`),l=""),l)),Se("background",x),Se("padding",W),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}(),Ee()}const be=()=>{He("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&Ye(0,0,"title",document.title),Oe(),he()};function we(){re=document.querySelectorAll(`[${n}]`),V=re.length>0}function ze(e){V?setTimeout(be):ee(e)}function Se(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function Ee(){""!==ie&&document.querySelectorAll(ie).forEach((e=>{e.dataset.iframeSize=!0}))}function je(e){({add(t){function n(){He(e.eventName,e.eventType)}S[t]=n,a(window,t,n,{passive:!0})},remove(e){const t=S[e];delete S[e],l(window,e,t)}})[e.method](e.eventName)}function $e(e){je({method:e,eventType:"After Print",eventName:"afterprint"}),je({method:e,eventType:"Before Print",eventName:"beforeprint"}),je({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}function Pe(e,t,n,o){return t!==e&&(e in n||(y(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in p&&g(`Deprecated ${o}CalculationMethod (${e})\n\nThis version of iframe-resizer can auto detect the most suitable ${o} calculation method. It is recommended that you remove this option.`)),e}function Ce(){H=Pe(H,P,De,"height")}function Me(){me=Pe(me,k,Ve,"width")}function Oe(){!0===R&&($e("add"),L=function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{const{length:n}=t;for(let o=0;or*s+++a&&uHe("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!f(e):return"";case f(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case f(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(f(e.className)?`.${e.className}`:"")}}(t)}`),setTimeout((()=>{Ae&&Ae(),Ae=void 0}),0)}const ke=e=>{const t=getComputedStyle(e);return""!==t?.position&&"static"!==t?.position},Ie=()=>[...Le(document)()].filter(ke),Ne=new WeakSet;function Re(e){e&&(Ne.has(e)||(ne.observe(e),Ne.add(e)))}function xe(e){[...Ie(),...A.flatMap((t=>e.querySelector(t)))].forEach(Re)}function Be(e){performance.mark(E);const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=V?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(E);const l=V?re:z()?b:Le(document)();let s=l.length;return l.forEach((t=>{V||!$||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1})),T=r,performance.mark(j,{detail:{Side:t,len:s,hasTags:V,logging:Y}}),a}const qe=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.documentElementBoundingClientRect()],Le=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)"),We={height:0,width:0},Fe={height:0,width:0};function Ue(e){function t(){return Fe[i]=r,We[i]=s,r}const n=z(),o=e===De,i=o?"height":"width",r=e.documentElementBoundingClientRect(),a=Math.ceil(r),l=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return s;case V:return e.taggedElement();case!n&&0===Fe[i]&&0===We[i]:return t();case ce&&r===Fe[i]&&s===We[i]:return Math.max(r,s);case 0===r:return s;case!n&&r!==Fe[i]&&s<=We[i]:return t();case!o:return e.taggedElement();case!n&&rs:return t()}return Math.max(e.taggedElement(),t())}const De={enabled:()=>F,getOffset:()=>I,auto:()=>Ue(De),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>De.bodyOffset(),custom:()=>s.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,documentElementBoundingClientRect:()=>document.documentElement.getBoundingClientRect().bottom,max:()=>Math.max(...qe(De)),min:()=>Math.min(...qe(De)),grow:()=>De.max(),lowestElement:()=>Be(i),taggedElement:()=>Be(i)},Ve={enabled:()=>U,getOffset:()=>N,auto:()=>Ue(Ve),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>s.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,documentElementBoundingClientRect:()=>document.documentElement.getBoundingClientRect().right,max:()=>Math.max(...qe(Ve)),min:()=>Math.min(...qe(Ve)),rightMostElement:()=>Be(r),scroll:()=>Math.max(Ve.bodyScroll(),Ve.documentElementScroll()),taggedElement:()=>Be(r)};function Je(e,t,n,o,i){let r,a;!function(){const e=(e,t)=>!(Math.abs(e-t)<=se);return r=void 0===n?De[H]():n,a=void 0===o?Ve[me]():o,F&&e(J,r)||U&&e(ue,a)}()&&"init"!==e?!(e in{init:1,size:1})&&(F&&H in O||U&&me in O)&&Xe():(Ze(),J=r,ue=a,Ye(J,ue,e,i))}function He(e,t,n,o,i){document.hidden||Je(e,0,n,o,i)}function Ze(){ce||(ce=!0,requestAnimationFrame((()=>{ce=!1})))}function Qe(e){J=De[H](),ue=Ve[me](),Ye(J,ue,e)}function Xe(e){const t=H;H=P,Ze(),Qe("reset"),H=t}function Ye(e,t,n,o,i){G<-1||(void 0!==i||(i=le),function(){const r=`${_}:${e+(I||0)}:${t+(N||0)}:${n}${void 0===o?"":`:${o}`}`;oe?window.parent.iframeParentListener(C+r):ae.postMessage(C+r,i)}())}function Ge(e){const t={init:function(){Q=e.data,ae=e.source,ve(),D=!1,setTimeout((()=>{Z=!1}),h)},reset(){Z||Qe("resetPage")},resize(){He("resizeParent")},moveToAnchor(){X.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();ye?ye(JSON.parse(e)):Ye(0,0,"pageInfoStop")},parentInfo(){const e=o();ge?ge(Object.freeze(JSON.parse(e))):Ye(0,0,"parentInfoStop")},message(){const e=o();pe(JSON.parse(e))}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};C===`${e.data}`.slice(0,M)&&(!1!==D?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||y(`Unexpected message (${e.data})`)}())}function Ke(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}function _e(e){return Ge(e),fe}window.iframeChildListener=e=>Ge({data:e,sameDomain:!0}),a(window,"message",Ge),a(window,"readystatechange",Ke),Ke();try{top?.document?.getElementById("banner")&&(fe={},window.mockMsgListener=_e,l(window,"message",Ge),define([],(()=>_e)))}catch(e){}}()}(); diff --git a/js-dist/iframe-resizer.jquery.js b/js-dist/iframe-resizer.jquery.js index e8b64d0bf..3b31b282f 100644 --- a/js-dist/iframe-resizer.jquery.js +++ b/js-dist/iframe-resizer.jquery.js @@ -1,7 +1,7 @@ /*! * @preserve * - * @module iframe-resizer/jquery 5.2.2 (iife) + * @module iframe-resizer/jquery 5.2.3 (iife) * * @license GPL-3.0 for non-commercial use only. * For commercial use, you must purchase a license from @@ -17,4 +17,4 @@ */ -!function(){"use strict";const e="5.2.2",i="[iFrameSizer]",t=i.length,n=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),o=(e,i,t,n)=>e.addEventListener(i,t,n||!1),r=(e,i,t)=>e.removeEventListener(i,t,!1);const a="[iframe-resizer]";const s=e=>`${a}[${function(e){return window.top===window.self?`Parent page: ${e}`:window?.parentIFrame?.getId?`${window.parentIFrame.getId()}: ${e}`:`Nested parent page: ${e}`}(e)}]`,l=(e,i,...t)=>window?.console[e](s(i),...t),c=(e,...i)=>l("warn",e,...i),d=(e,i)=>console?.warn((e=>i=>window.chrome?e(i.replaceAll("
","\n").replaceAll("","").replaceAll("","").replaceAll("","").replaceAll("","").replaceAll("","")):e(i.replaceAll("
","\n").replaceAll(/<[/a-z]+>/gi,"")))((e=>(...i)=>[`${a}[${e}]`,...i].join(" "))(e))(i)),u=e=>{if(!e)return"";let i=-559038744,t=1103547984;for(let n,o=0;o>>15,1935289751),t^=Math.imul(t^i>>>15,3405138345),i^=t>>>16,t^=i>>>16,(2097152*(t>>>0)+(i>>>11)).toString(36)},f=e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))),p=["Puchspk Spjluzl Rlf","Tpzzpun Spjluzl Rlf","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.Jvttlyjphs SpjluzlMvy jvttlyjphs bzl,

pmyhtl-ylzpgly ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa oaawz://pmyhtl-ylzpgly.jvt/wypjpun.Vwlu Zvbyjl SpjluzlPm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol spjluzl rlf pu

pmyhtl-ylzpgly vwapvuz av NWSc3.Mvy tvyl pumvythapvu wslhzl zll: oaawz://pmyhtl-ylzpgly.jvt/nws","NWSc3 Spjluzl ClyzpvuAopz clyzpvu vm

pmyhtl-ylzpgly pz ilpun bzlk bukly aol alytz vm aol NWS C3 spjluzl. Aopz spjluzl hssvdz fvb av bzl

pmyhtl-ylzpgly pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.Mvy tvyl pumvythapvu cpzpa oaawz://pmyhtl-ylzpgly.jvt/wypjpun."],h=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],m=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,i)=>[e,Math.max(0,i-1)]))),y=e=>f(p[e]);var g=e=>{const i=e[f("spjluzl")];if(!i)return-1;const t=i.split("-");let n=function(e=""){let i=-2;const t=u(f(e));return t in m&&(i=m[t]),i}(t[0]);return 0===n||(e=>e[2]===u(e[0]+e[1]))(t)||(n=-2),n};var w={};var b=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyPadding:null,checkOrigin:!0,direction:"vertical",inPageLinks:!1,heightCalculationMethod:"auto",id:"iFrameResizer",log:!1,license:void 0,mouseEvents:!0,offsetHeight:null,offsetWidth:null,postMessageTarget:null,sameDomain:!1,scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,waitForLoad:!1,widthCalculationMethod:"auto",onClose:()=>!0,onClosed(){},onInit:!1,onMessage:null,onMouseEnter(){},onMouseLeave(){},onReady:e=>{"function"==typeof w[e.id].onInit&&(d(e.id,"\nDeprecated Option\n\nThe onInit() function is deprecated and has been replaced with onReady(). It will be removed in a future version of iFrame Resizer.\n "),w[e.id].onInit(e))},onResized(){},onScroll:()=>!0}),v={position:null,version:e};function z(n){function a(){S(H),I(),C("onResized",H)}function s(e){if("border-box"!==e.boxSizing)return 0;return(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function l(e){if("border-box"!==e.boxSizing)return 0;return(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}function u(e){return A.slice(A.indexOf(":")+7+e)}const f=(e,i)=>(t,n)=>{const o={};var r,a;r=function(){x(`Send ${e} (${t})`,`${e}:${i()}`,n)},o[a=n]||(r(),o[a]=requestAnimationFrame((()=>{o[a]=null})))},p=(e,i)=>()=>{const t=i=>()=>{w[s]?e(i,s):a()};function n(e,i){i(window,"scroll",t("scroll")),i(window,"resize",t("resize window"))}function a(){n(0,r),l.disconnect(),c.disconnect()}const s=P,l=new ResizeObserver(t("page observed")),c=new ResizeObserver(t("iframe observed"));n(0,o),l.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),c.observe(w[s].iframe,{attributes:!0,childList:!1,subtree:!1}),w[s]&&(w[s][`stop${i}`]=a)},h=e=>()=>{e in w[P]&&(w[P][e](),delete w[P][e])},m=f("pageInfo",(function(){const e=document.body.getBoundingClientRect(),i=H.iframe.getBoundingClientRect(),{scrollY:t,scrollX:n,innerHeight:o,innerWidth:r}=window,{clientHeight:a,clientWidth:s}=document.documentElement;return JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(a,o||0),clientWidth:Math.max(s,r||0),offsetTop:parseInt(i.top-e.top,10),offsetLeft:parseInt(i.left-e.left,10),scrollTop:t,scrollLeft:n,documentHeight:a,documentWidth:s,windowHeight:o,windowWidth:r})})),y=f("parentInfo",(function(){const{iframe:e}=H,{scrollWidth:i,scrollHeight:t}=document.documentElement,{width:n,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}=window.visualViewport;return JSON.stringify({iframe:e.getBoundingClientRect(),document:{scrollWidth:i,scrollHeight:t},viewport:{width:n,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}})})),g=p(m,"PageInfo"),b=p(y,"ParentInfo"),z=h("stopPageInfo"),k=h("stopParentInfo");function F(e){const i=e.getBoundingClientRect();return R(),{x:Number(i.left)+Number(v.position.x),y:Number(i.top)+Number(v.position.y)}}function N(e){const i=e?F(H.iframe):{x:0,y:0};let t=((e,i)=>({x:e.width+i.x,y:e.height+i.y}))(H,i);window.top===window.self?(v.position=t,E(P)):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):c(P,"Unable to scroll to requested position, window.parentIFrame not found")}function E(e){const{x:i,y:t}=v.position,n=w[e]?.iframe;!1!==C("onScroll",{iframe:n,top:t,left:i,x:i,y:t})?I():$()}function O(e){let i={};if(0===H.width&&0===H.height){const e=u(9).split(":");i={x:e[1],y:e[0]}}else i={x:H.width,y:H.height};C(e,{iframe:H.iframe,screenX:Number(i.x),screenY:Number(i.y),type:H.type})}const C=(e,i)=>j(P,e,i);let A=n.data,H={},P=null;"[iFrameResizerChild]Ready"!==A?i===`${A}`.slice(0,t)&&A.slice(t).split(":")[0]in w&&(H=function(){const e=A.slice(t).split(":"),i=e[1]?Number(e[1]):0,n=w[e[0]]?.iframe,o=getComputedStyle(n);return{iframe:n,id:e[0],height:i+s(o)+l(o),width:Number(e[2]),type:e[3],msg:e[4]}}(),P=H.id,P?(function(e){if(!w[e])throw new Error(`${H.type} No settings for ${e}. Message was: ${A}`)}(P),H.type in{true:1,false:1,undefined:1}||(w[P].loaded=!0,function(){let e=!0;return null===H.iframe&&(c(P,`The iframe (${H.id}) was not found.`),e=!1),e}()&&function(){const{origin:e,sameDomain:i}=n;if(i)return!0;let t=w[P]?.checkOrigin;if(t&&"null"!=`${e}`&&!(t.constructor===Array?function(){let i=0,n=!1;for(;iLegacy version detected in iframe\n\nDetected legacy version of child page script. It is recommended to update the page in the iframe to use @iframe-resizer/child.\n\nSee https://iframe-resizer.com/setup/#child-page-setup for more details.\n")),L=!0,C("onReady",H.iframe);break;default:if(0===H.width&&0===H.height)return void c(`Unsupported message received (${H.type}), this is likely due to the iframe containing a later version of iframe-resizer than the parent page`);if(0===H.width||0===H.height)return;if(document.hidden)return;a()}var i,t}())):c("iframeResizer received messageData without id, message was: ",A)):Object.keys(w).forEach((e=>{w[e].mode>=0&&x("iFrame requested init",W(e),e)}))}function j(e,i,t){let n=null,o=null;if(w[e]){if(n=w[e][i],"function"!=typeof n)throw new TypeError(`${i} on iFrame[${e}] is not a function`);o=n(t)}return o}function k(e){const i=e.id;delete w[i]}function T(e){const i=e.id;if(!1!==j(i,"onClose",i)){try{e.parentNode&&e.remove()}catch(e){c(e)}j(i,"onClosed",i),k(e)}}function R(e){null===v.position&&(v.position={x:window.scrollX,y:window.scrollY})}function $(){v.position=null}function I(e){null!==v.position&&(window.scrollTo(v.position.x,v.position.y),$())}function M(e){R(e.id),S(e),x("reset","reset",e.id)}function S(e){const i=e.id;function t(i){const t=`${e[i]}px`;e.iframe.style[i]=t}w[i].sizeHeight&&t("height"),w[i].sizeWidth&&t("width")}function x(e,t,n,o){w[n]&&(w[n]?.postMessageTarget?function(){const{postMessageTarget:e,targetOrigin:o}=w[n];if(w[n].sameDomain)try{return void w[n].iframe.contentWindow.iframeChildListener(i+t)}catch(e){}e.postMessage(i+t,o)}():c(n,`[${e}] IFrame(${n}) not found`),o&&w[n]?.warningTimeout&&(w[n].msgTimeout=setTimeout((function(){if(void 0===w[n])return;const{waitForLoad:e}=w[n];w[n].loaded||w[n].loadErrorShown||(w[n].loadErrorShown=!0,d(n,`\nNo response from iFrame\n \nThe iframe (${n}) has not responded within ${w[n].warningTimeout/1e3} seconds. Check @iframe-resizer/child package has been loaded in the iframe.\n${e?"\nThe waitForLoad option is currently set to true. If the iframe loads before the JavaScript runs, this option will prevent iframe-resizer from initialising. To disable this, set the waitForLoad option to false. \n":""}\nThis 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`))}),w[n].warningTimeout)))}function W(e){const i=w[e];return[e,"8",i.sizeWidth,i.log,"32",!0,i.autoResize,i.bodyMargin,i.heightCalculationMethod,i.bodyBackground,i.bodyPadding,i.tolerance,i.inPageLinks,"child",i.widthCalculationMethod,i.mouseEvents,i.offsetHeight,i.offsetWidth,i.sizeHeight,i.license,v.version,i.mode].join(":")}let F=0,L=!1,N=!1;var E=i=>t=>{function r(e){if(!e)return{};if("object"!=typeof e)throw new TypeError("Options is not an object");return("sizeWidth"in e||"sizeHeight"in e||"autoResize"in e)&&d(s,'Deprecated Option\n\nThe sizeWidth, sizeHeight and autoResize options have been replaced with new direction option which expects values of "vertical", "horizontal" or "horizontal".\n'),e}function a(e){const i=w[e]?.iframe?.title;return""===i||void 0===i}const s=function(e){if(e&&"string"!=typeof e)throw new TypeError("Invalid id for iFrame. Expected String");return""!==e&&e||(t.id=e=function(){let e=i?.id||b.id+F++;return null!==document.getElementById(e)&&(e+=F++),e}(),(i||{}).log),e}(t.id);return s in w&&"iFrameResizer"in t?c(s,"Ignored iFrame, already setup."):(function(e){var i,n;w[s]={iframe:t,firstRun:!0,remoteHost:t?.src.split("/").slice(0,3).join("/"),...b,...r(e),mode:g(e),syncTitle:a(s)},function(){if("horizontal"===w[s].direction)return w[s].sizeWidth=!0,void(w[s].sizeHeight=!1);if("none"===w[s].direction)return w[s].sizeWidth=!1,w[s].sizeHeight=!1,void(w[s].autoResize=!1);if("vertical"!==w[s].direction)throw new TypeError(s,`Direction value of "${w[s].direction}" is not valid`)}(),(i=e?.offsetSize||e?.offset)&&("vertical"===w[s].direction?w[s].offsetHeight=i:w[s].offsetWidth=i),e?.offset&&d(s,"Deprecated option\n\n The offset option has been renamed to offsetSize. Use of the old name will be removed in a future version of iframe-resizer."),null===w[s].postMessageTarget&&(w[s].postMessageTarget=t.contentWindow),w[s].targetOrigin=!0===w[s].checkOrigin?""===(n=w[s].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*"}(i),function(){const{mode:i}=w[s];i<0&&d("Parent",`${y(i+2)}${y(2)}`),N||i<0||(N=!0,((e,...i)=>{l("info",e,...i)})(`v${e} (${(e=>f(h[e]))(i)})`),i<1&&d("Parent",y(3)))}(),C(),function(){switch(t.style.overflow=!1===w[s]?.scrolling?"hidden":"auto",w[s]?.scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=w[s]?w[s].scrolling:"no"}}(),function(){const{bodyMargin:e}=w[s];"number"!=typeof e&&"0"!==e||(w[s].bodyMargin=`${e}px`)}(),function(e){const{id:i}=t;-1!==w[i].mode&&-2!==w[i].mode&&(o(t,"load",(function(){x("iFrame.onload",`${e}:${L}`,i,!0),function(){const e=w[s]?.firstRun,i=w[s]?.heightCalculationMethod in n;!e&&i&&M({iframe:t,height:0,width:0,type:"init"})}()})),!1===w[i].waitForLoad&&x("init",`${e}:${L}`,i,!0))}(W(s)),function(){if(w[s]){const e={close:T.bind(null,w[s].iframe),disconnect:k.bind(null,w[s].iframe),removeListeners(){d(s,"\nDeprecated Method Name\n\nThe emoveListeners() method has been renamed to isconnect().\n"),this.disconnect()},resize:x.bind(null,"Window resize","resize",s),moveToAnchor(e){x("Move to anchor",`moveToAnchor:${e}`,s)},sendMessage(e){x("Send Message",`message:${e=JSON.stringify(e)}`,s)}};w[s].iframe.iframeResizer=e,w[s].iframe.iFrameResizer=e}}()),t?.iFrameResizer};function O(){!1===document.hidden&&function(e,i){const t=e=>w[e]?.autoResize&&!w[e]?.firstRun;Object.keys(w).forEach((function(n){t(n)&&x(e,i,n)}))}("Tab Visible","resize")}const C=(e=>{let i=!1;return function(){return i?void 0:(i=!0,Reflect.apply(e,this,arguments))}})((()=>{o(window,"message",z),o(document,"visibilitychange",O),window.iframeParentListener=e=>z({data:e,sameDomain:!0})}));switch(!0){case void 0===window.jQuery:c("","Unable to bind to jQuery, it is not available.");break;case!window.jQuery.fn:c("","Unable to bind to jQuery, it is not fully loaded.");break;case window.jQuery.fn.iframeResize:c("","iframeResize is already assigned to jQuery.fn.");break;default:window.jQuery.fn.iframeResize=function(e){const i=E(e);return this.filter("iframe").each(i).end()},window.jQuery.fn.iFrameResize=function(e){return c("","Deprecated: Use the iframeResize method instead of iFrameResize"),this.iframeResize(e)}}}(); +!function(){"use strict";const e="5.2.3",i="[iFrameSizer]",t=i.length,n=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),o=(e,i,t,n)=>e.addEventListener(i,t,n||!1),r=(e,i,t)=>e.removeEventListener(i,t,!1);const a="[iframe-resizer]";const s=e=>`${a}[${function(e){return window.top===window.self?`Parent page: ${e}`:window?.parentIFrame?.getId?`${window.parentIFrame.getId()}: ${e}`:`Nested parent page: ${e}`}(e)}]`,l=(e,i,...t)=>window?.console[e](s(i),...t),c=(e,...i)=>l("warn",e,...i),d=(e,i)=>console?.warn((e=>i=>window.chrome?e(i.replaceAll("
","\n").replaceAll("","").replaceAll("","").replaceAll("","").replaceAll("","").replaceAll("","")):e(i.replaceAll("
","\n").replaceAll(/<[/a-z]+>/gi,"")))((e=>(...i)=>[`${a}[${e}]`,...i].join(" "))(e))(i)),u=e=>{if(!e)return"";let i=-559038744,t=1103547984;for(let n,o=0;o>>15,1935289751),t^=Math.imul(t^i>>>15,3405138345),i^=t>>>16,t^=i>>>16,(2097152*(t>>>0)+(i>>>11)).toString(36)},f=e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))),p=["Puchspk Spjluzl Rlf","Tpzzpun Spjluzl Rlf","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.Jvttlyjphs SpjluzlMvy jvttlyjphs bzl,

pmyhtl-ylzpgly ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa oaawz://pmyhtl-ylzpgly.jvt/wypjpun.Vwlu Zvbyjl SpjluzlPm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol spjluzl rlf pu

pmyhtl-ylzpgly vwapvuz av NWSc3.Mvy tvyl pumvythapvu wslhzl zll: oaawz://pmyhtl-ylzpgly.jvt/nws","NWSc3 Spjluzl ClyzpvuAopz clyzpvu vm

pmyhtl-ylzpgly pz ilpun bzlk bukly aol alytz vm aol NWS C3 spjluzl. Aopz spjluzl hssvdz fvb av bzl

pmyhtl-ylzpgly pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.Mvy tvyl pumvythapvu cpzpa oaawz://pmyhtl-ylzpgly.jvt/wypjpun."],h=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],m=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,i)=>[e,Math.max(0,i-1)]))),y=e=>f(p[e]);var g=e=>{const i=e[f("spjluzl")];if(!i)return-1;const t=i.split("-");let n=function(e=""){let i=-2;const t=u(f(e));return t in m&&(i=m[t]),i}(t[0]);return 0===n||(e=>e[2]===u(e[0]+e[1]))(t)||(n=-2),n};var w={};var b=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyPadding:null,checkOrigin:!0,direction:"vertical",inPageLinks:!1,heightCalculationMethod:"auto",id:"iFrameResizer",log:!1,license:void 0,mouseEvents:!0,offsetHeight:null,offsetWidth:null,postMessageTarget:null,sameDomain:!1,scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,waitForLoad:!1,widthCalculationMethod:"auto",onClose:()=>!0,onClosed(){},onInit:!1,onMessage:null,onMouseEnter(){},onMouseLeave(){},onReady:e=>{"function"==typeof w[e.id].onInit&&(d(e.id,"\nDeprecated Option\n\nThe onInit() function is deprecated and has been replaced with onReady(). It will be removed in a future version of iFrame Resizer.\n "),w[e.id].onInit(e))},onResized(){},onScroll:()=>!0}),v={position:null,version:e};function z(n){function a(){S(H),I(),C("onResized",H)}function s(e){if("border-box"!==e.boxSizing)return 0;return(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function l(e){if("border-box"!==e.boxSizing)return 0;return(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}function u(e){return A.slice(A.indexOf(":")+7+e)}const f=(e,i)=>(t,n)=>{const o={};var r,a;r=function(){x(`Send ${e} (${t})`,`${e}:${i()}`,n)},o[a=n]||(r(),o[a]=requestAnimationFrame((()=>{o[a]=null})))},p=(e,i)=>()=>{const t=i=>()=>{w[s]?e(i,s):a()};function n(e,i){i(window,"scroll",t("scroll")),i(window,"resize",t("resize window"))}function a(){n(0,r),l.disconnect(),c.disconnect()}const s=P,l=new ResizeObserver(t("page observed")),c=new ResizeObserver(t("iframe observed"));n(0,o),l.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),c.observe(w[s].iframe,{attributes:!0,childList:!1,subtree:!1}),w[s]&&(w[s][`stop${i}`]=a)},h=e=>()=>{e in w[P]&&(w[P][e](),delete w[P][e])},m=f("pageInfo",(function(){const e=document.body.getBoundingClientRect(),i=H.iframe.getBoundingClientRect(),{scrollY:t,scrollX:n,innerHeight:o,innerWidth:r}=window,{clientHeight:a,clientWidth:s}=document.documentElement;return JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(a,o||0),clientWidth:Math.max(s,r||0),offsetTop:parseInt(i.top-e.top,10),offsetLeft:parseInt(i.left-e.left,10),scrollTop:t,scrollLeft:n,documentHeight:a,documentWidth:s,windowHeight:o,windowWidth:r})})),y=f("parentInfo",(function(){const{iframe:e}=H,{scrollWidth:i,scrollHeight:t}=document.documentElement,{width:n,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}=window.visualViewport;return JSON.stringify({iframe:e.getBoundingClientRect(),document:{scrollWidth:i,scrollHeight:t},viewport:{width:n,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}})})),g=p(m,"PageInfo"),b=p(y,"ParentInfo"),z=h("stopPageInfo"),k=h("stopParentInfo");function F(e){const i=e.getBoundingClientRect();return R(),{x:Number(i.left)+Number(v.position.x),y:Number(i.top)+Number(v.position.y)}}function N(e){const i=e?F(H.iframe):{x:0,y:0};let t=((e,i)=>({x:e.width+i.x,y:e.height+i.y}))(H,i);window.top===window.self?(v.position=t,E(P)):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):c(P,"Unable to scroll to requested position, window.parentIFrame not found")}function E(e){const{x:i,y:t}=v.position,n=w[e]?.iframe;!1!==C("onScroll",{iframe:n,top:t,left:i,x:i,y:t})?I():$()}function O(e){let i={};if(0===H.width&&0===H.height){const e=u(9).split(":");i={x:e[1],y:e[0]}}else i={x:H.width,y:H.height};C(e,{iframe:H.iframe,screenX:Number(i.x),screenY:Number(i.y),type:H.type})}const C=(e,i)=>j(P,e,i);let A=n.data,H={},P=null;"[iFrameResizerChild]Ready"!==A?i===`${A}`.slice(0,t)&&A.slice(t).split(":")[0]in w&&(H=function(){const e=A.slice(t).split(":"),i=e[1]?Number(e[1]):0,n=w[e[0]]?.iframe,o=getComputedStyle(n);return{iframe:n,id:e[0],height:i+s(o)+l(o),width:Number(e[2]),type:e[3],msg:e[4]}}(),P=H.id,P?(function(e){if(!w[e])throw new Error(`${H.type} No settings for ${e}. Message was: ${A}`)}(P),H.type in{true:1,false:1,undefined:1}||(w[P].loaded=!0,function(){let e=!0;return null===H.iframe&&(c(P,`The iframe (${H.id}) was not found.`),e=!1),e}()&&function(){const{origin:e,sameDomain:i}=n;if(i)return!0;let t=w[P]?.checkOrigin;if(t&&"null"!=`${e}`&&!(t.constructor===Array?function(){let i=0,n=!1;for(;iLegacy version detected in iframe\n\nDetected legacy version of child page script. It is recommended to update the page in the iframe to use @iframe-resizer/child.\n\nSee https://iframe-resizer.com/setup/#child-page-setup for more details.\n")),L=!0,C("onReady",H.iframe);break;default:if(0===H.width&&0===H.height)return void c(`Unsupported message received (${H.type}), this is likely due to the iframe containing a later version of iframe-resizer than the parent page`);if(0===H.width||0===H.height)return;if(document.hidden)return;a()}var i,t}())):c("iframeResizer received messageData without id, message was: ",A)):Object.keys(w).forEach((e=>{w[e].mode>=0&&x("iFrame requested init",W(e),e)}))}function j(e,i,t){let n=null,o=null;if(w[e]){if(n=w[e][i],"function"!=typeof n)throw new TypeError(`${i} on iFrame[${e}] is not a function`);o=n(t)}return o}function k(e){const i=e.id;delete w[i]}function T(e){const i=e.id;if(!1!==j(i,"onClose",i)){try{e.parentNode&&e.remove()}catch(e){c(e)}j(i,"onClosed",i),k(e)}}function R(e){null===v.position&&(v.position={x:window.scrollX,y:window.scrollY})}function $(){v.position=null}function I(e){null!==v.position&&(window.scrollTo(v.position.x,v.position.y),$())}function M(e){R(e.id),S(e),x("reset","reset",e.id)}function S(e){const i=e.id;function t(i){const t=`${e[i]}px`;e.iframe.style[i]=t}w[i].sizeHeight&&t("height"),w[i].sizeWidth&&t("width")}function x(e,t,n,o){w[n]&&(w[n]?.postMessageTarget?function(){const{postMessageTarget:e,targetOrigin:o}=w[n];if(w[n].sameDomain)try{return void w[n].iframe.contentWindow.iframeChildListener(i+t)}catch(e){}e.postMessage(i+t,o)}():c(n,`[${e}] IFrame(${n}) not found`),o&&w[n]?.warningTimeout&&(w[n].msgTimeout=setTimeout((function(){if(void 0===w[n])return;const{waitForLoad:e}=w[n];w[n].loaded||w[n].loadErrorShown||(w[n].loadErrorShown=!0,d(n,`\nNo response from iFrame\n \nThe iframe (${n}) has not responded within ${w[n].warningTimeout/1e3} seconds. Check @iframe-resizer/child package has been loaded in the iframe.\n${e?"\nThe waitForLoad option is currently set to true. If the iframe loads before the JavaScript runs, this option will prevent iframe-resizer from initialising. To disable this, set the waitForLoad option to false. \n":""}\nThis 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`))}),w[n].warningTimeout)))}function W(e){const i=w[e];return[e,"8",i.sizeWidth,i.log,"32",!0,i.autoResize,i.bodyMargin,i.heightCalculationMethod,i.bodyBackground,i.bodyPadding,i.tolerance,i.inPageLinks,"child",i.widthCalculationMethod,i.mouseEvents,i.offsetHeight,i.offsetWidth,i.sizeHeight,i.license,v.version,i.mode].join(":")}let F=0,L=!1,N=!1;var E=i=>t=>{function r(e){if(!e)return{};if("object"!=typeof e)throw new TypeError("Options is not an object");return("sizeWidth"in e||"sizeHeight"in e||"autoResize"in e)&&d(s,'Deprecated Option\n\nThe sizeWidth, sizeHeight and autoResize options have been replaced with new direction option which expects values of "vertical", "horizontal" or "horizontal".\n'),e}function a(e){const i=w[e]?.iframe?.title;return""===i||void 0===i}const s=function(e){if(e&&"string"!=typeof e)throw new TypeError("Invalid id for iFrame. Expected String");return""!==e&&e||(t.id=e=function(){let e=i?.id||b.id+F++;return null!==document.getElementById(e)&&(e+=F++),e}(),(i||{}).log),e}(t.id);return s in w&&"iFrameResizer"in t?c(s,"Ignored iFrame, already setup."):(function(e){var i,n;w[s]={iframe:t,firstRun:!0,remoteHost:t?.src.split("/").slice(0,3).join("/"),...b,...r(e),mode:g(e),syncTitle:a(s)},function(){if("horizontal"===w[s].direction)return w[s].sizeWidth=!0,void(w[s].sizeHeight=!1);if("none"===w[s].direction)return w[s].sizeWidth=!1,w[s].sizeHeight=!1,void(w[s].autoResize=!1);if("vertical"!==w[s].direction)throw new TypeError(s,`Direction value of "${w[s].direction}" is not valid`)}(),(i=e?.offsetSize||e?.offset)&&("vertical"===w[s].direction?w[s].offsetHeight=i:w[s].offsetWidth=i),e?.offset&&d(s,"Deprecated option\n\n The offset option has been renamed to offsetSize. Use of the old name will be removed in a future version of iframe-resizer."),null===w[s].postMessageTarget&&(w[s].postMessageTarget=t.contentWindow),w[s].targetOrigin=!0===w[s].checkOrigin?""===(n=w[s].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*"}(i),function(){const{mode:i}=w[s];i<0&&d("Parent",`${y(i+2)}${y(2)}`),N||i<0||(N=!0,((e,...i)=>{l("info",e,...i)})(`v${e} (${(e=>f(h[e]))(i)})`),i<1&&d("Parent",y(3)))}(),C(),function(){switch(t.style.overflow=!1===w[s]?.scrolling?"hidden":"auto",w[s]?.scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=w[s]?w[s].scrolling:"no"}}(),function(){const{bodyMargin:e}=w[s];"number"!=typeof e&&"0"!==e||(w[s].bodyMargin=`${e}px`)}(),function(e){const{id:i}=t;-1!==w[i].mode&&-2!==w[i].mode&&(o(t,"load",(function(){x("iFrame.onload",`${e}:${L}`,i,!0),function(){const e=w[s]?.firstRun,i=w[s]?.heightCalculationMethod in n;!e&&i&&M({iframe:t,height:0,width:0,type:"init"})}()})),!1===w[i].waitForLoad&&x("init",`${e}:${L}`,i,!0))}(W(s)),function(){if(w[s]){const e={close:T.bind(null,w[s].iframe),disconnect:k.bind(null,w[s].iframe),removeListeners(){d(s,"\nDeprecated Method Name\n\nThe emoveListeners() method has been renamed to isconnect().\n"),this.disconnect()},resize:x.bind(null,"Window resize","resize",s),moveToAnchor(e){x("Move to anchor",`moveToAnchor:${e}`,s)},sendMessage(e){x("Send Message",`message:${e=JSON.stringify(e)}`,s)}};w[s].iframe.iframeResizer=e,w[s].iframe.iFrameResizer=e}}()),t?.iFrameResizer};function O(){!1===document.hidden&&function(e,i){const t=e=>w[e]?.autoResize&&!w[e]?.firstRun;Object.keys(w).forEach((function(n){t(n)&&x(e,i,n)}))}("Tab Visible","resize")}const C=(e=>{let i=!1;return function(){return i?void 0:(i=!0,Reflect.apply(e,this,arguments))}})((()=>{o(window,"message",z),o(document,"visibilitychange",O),window.iframeParentListener=e=>z({data:e,sameDomain:!0})}));switch(!0){case void 0===window.jQuery:c("","Unable to bind to jQuery, it is not available.");break;case!window.jQuery.fn:c("","Unable to bind to jQuery, it is not fully loaded.");break;case window.jQuery.fn.iframeResize:c("","iframeResize is already assigned to jQuery.fn.");break;default:window.jQuery.fn.iframeResize=function(e){const i=E(e);return this.filter("iframe").each(i).end()},window.jQuery.fn.iFrameResize=function(e){return c("","Deprecated: Use the iframeResize method instead of iFrameResize"),this.iframeResize(e)}}}(); diff --git a/js-dist/iframe-resizer.parent.js b/js-dist/iframe-resizer.parent.js index fcebdd49a..460239e84 100644 --- a/js-dist/iframe-resizer.parent.js +++ b/js-dist/iframe-resizer.parent.js @@ -1,7 +1,7 @@ /*! * @preserve * - * @module iframe-resizer/parent 5.2.2 (iife) + * @module iframe-resizer/parent 5.2.3 (iife) * * @license GPL-3.0 for non-commercial use only. * For commercial use, you must purchase a license from @@ -17,4 +17,4 @@ */ -!function(){"use strict";const e="[iframe-resizer]";const t=t=>`${e}[${function(e){return window.top===window.self?`Parent page: ${e}`:window?.parentIFrame?.getId?`${window.parentIFrame.getId()}: ${e}`:`Nested parent page: ${e}`}(t)}]`,i=(e,i,...n)=>window?.console[e](t(i),...n),n=(e,...t)=>i("warn",e,...t),o=(t,i)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("
","\n").replaceAll("","").replaceAll("","").replaceAll("","").replaceAll("","").replaceAll("","")):e(t.replaceAll("
","\n").replaceAll(/<[/a-z]+>/gi,"")))((t=>(...i)=>[`${e}[${t}]`,...i].join(" "))(t))(i)),r="5.2.2",a="[iFrameSizer]",s=a.length,l=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),c=(e,t,i,n)=>e.addEventListener(t,i,n||!1),d=(e,t,i)=>e.removeEventListener(t,i,!1),u=e=>{if(!e)return"";let t=-559038744,i=1103547984;for(let n,o=0;o>>15,1935289751),i^=Math.imul(i^t>>>15,3405138345),t^=i>>>16,i^=t>>>16,(2097152*(i>>>0)+(t>>>11)).toString(36)},f=e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))),p=["Puchspk Spjluzl Rlf","Tpzzpun Spjluzl Rlf","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.Jvttlyjphs SpjluzlMvy jvttlyjphs bzl,

pmyhtl-ylzpgly ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa oaawz://pmyhtl-ylzpgly.jvt/wypjpun.Vwlu Zvbyjl SpjluzlPm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol spjluzl rlf pu

pmyhtl-ylzpgly vwapvuz av NWSc3.Mvy tvyl pumvythapvu wslhzl zll: oaawz://pmyhtl-ylzpgly.jvt/nws","NWSc3 Spjluzl ClyzpvuAopz clyzpvu vm

pmyhtl-ylzpgly pz ilpun bzlk bukly aol alytz vm aol NWS C3 spjluzl. Aopz spjluzl hssvdz fvb av bzl

pmyhtl-ylzpgly pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.Mvy tvyl pumvythapvu cpzpa oaawz://pmyhtl-ylzpgly.jvt/wypjpun."],h=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],m=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)]))),y=e=>f(p[e]);var g=e=>{const t=e[f("spjluzl")];if(!t)return-1;const i=t.split("-");let n=function(e=""){let t=-2;const i=u(f(e));return i in m&&(t=m[i]),t}(i[0]);return 0===n||(e=>e[2]===u(e[0]+e[1]))(i)||(n=-2),n};var w={};var b=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyPadding:null,checkOrigin:!0,direction:"vertical",inPageLinks:!1,heightCalculationMethod:"auto",id:"iFrameResizer",log:!1,license:void 0,mouseEvents:!0,offsetHeight:null,offsetWidth:null,postMessageTarget:null,sameDomain:!1,scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,waitForLoad:!1,widthCalculationMethod:"auto",onClose:()=>!0,onClosed(){},onInit:!1,onMessage:null,onMouseEnter(){},onMouseLeave(){},onReady:e=>{"function"==typeof w[e.id].onInit&&(o(e.id,"\nDeprecated Option\n\nThe onInit() function is deprecated and has been replaced with onReady(). It will be removed in a future version of iFrame Resizer.\n "),w[e.id].onInit(e))},onResized(){},onScroll:()=>!0}),v={position:null,version:r};function z(e){function t(){S(H),I(),A("onResized",H)}function i(e){if("border-box"!==e.boxSizing)return 0;return(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function l(e){if("border-box"!==e.boxSizing)return 0;return(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}function u(e){return C.slice(C.indexOf(":")+7+e)}const f=(e,t)=>(i,n)=>{const o={};var r,a;r=function(){x(`Send ${e} (${i})`,`${e}:${t()}`,n)},o[a=n]||(r(),o[a]=requestAnimationFrame((()=>{o[a]=null})))},p=(e,t)=>()=>{const i=t=>()=>{w[r]?e(t,r):o()};function n(e,t){t(window,"scroll",i("scroll")),t(window,"resize",i("resize window"))}function o(){n(0,d),a.disconnect(),s.disconnect()}const r=P,a=new ResizeObserver(i("page observed")),s=new ResizeObserver(i("iframe observed"));n(0,c),a.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),s.observe(w[r].iframe,{attributes:!0,childList:!1,subtree:!1}),w[r]&&(w[r][`stop${t}`]=o)},h=e=>()=>{e in w[P]&&(w[P][e](),delete w[P][e])},m=f("pageInfo",(function(){const e=document.body.getBoundingClientRect(),t=H.iframe.getBoundingClientRect(),{scrollY:i,scrollX:n,innerHeight:o,innerWidth:r}=window,{clientHeight:a,clientWidth:s}=document.documentElement;return JSON.stringify({iframeHeight:t.height,iframeWidth:t.width,clientHeight:Math.max(a,o||0),clientWidth:Math.max(s,r||0),offsetTop:parseInt(t.top-e.top,10),offsetLeft:parseInt(t.left-e.left,10),scrollTop:i,scrollLeft:n,documentHeight:a,documentWidth:s,windowHeight:o,windowWidth:r})})),y=f("parentInfo",(function(){const{iframe:e}=H,{scrollWidth:t,scrollHeight:i}=document.documentElement,{width:n,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}=window.visualViewport;return JSON.stringify({iframe:e.getBoundingClientRect(),document:{scrollWidth:t,scrollHeight:i},viewport:{width:n,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}})})),g=p(m,"PageInfo"),b=p(y,"ParentInfo"),z=h("stopPageInfo"),T=h("stopParentInfo");function W(e){const t=e.getBoundingClientRect();return $(),{x:Number(t.left)+Number(v.position.x),y:Number(t.top)+Number(v.position.y)}}function N(e){const t=e?W(H.iframe):{x:0,y:0};let i=((e,t)=>({x:e.width+t.x,y:e.height+t.y}))(H,t);window.top===window.self?(v.position=i,L(P)):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](i.x,i.y):n(P,"Unable to scroll to requested position, window.parentIFrame not found")}function L(e){const{x:t,y:i}=v.position,n=w[e]?.iframe;!1!==A("onScroll",{iframe:n,top:i,left:t,x:t,y:i})?I():R()}function O(e){let t={};if(0===H.width&&0===H.height){const e=u(9).split(":");t={x:e[1],y:e[0]}}else t={x:H.width,y:H.height};A(e,{iframe:H.iframe,screenX:Number(t.x),screenY:Number(t.y),type:H.type})}const A=(e,t)=>j(P,e,t);let C=e.data,H={},P=null;"[iFrameResizerChild]Ready"!==C?a===`${C}`.slice(0,s)&&C.slice(s).split(":")[0]in w&&(H=function(){const e=C.slice(s).split(":"),t=e[1]?Number(e[1]):0,n=w[e[0]]?.iframe,o=getComputedStyle(n);return{iframe:n,id:e[0],height:t+i(o)+l(o),width:Number(e[2]),type:e[3],msg:e[4]}}(),P=H.id,P?(function(e){if(!w[e])throw new Error(`${H.type} No settings for ${e}. Message was: ${C}`)}(P),H.type in{true:1,false:1,undefined:1}||(w[P].loaded=!0,function(){let e=!0;return null===H.iframe&&(n(P,`The iframe (${H.id}) was not found.`),e=!1),e}()&&function(){const{origin:t,sameDomain:i}=e;if(i)return!0;let n=w[P]?.checkOrigin;if(n&&"null"!=`${t}`&&!(n.constructor===Array?function(){let e=0,i=!1;for(;eLegacy version detected in iframe\n\nDetected legacy version of child page script. It is recommended to update the page in the iframe to use @iframe-resizer/child.\n\nSee https://iframe-resizer.com/setup/#child-page-setup for more details.\n")),F=!0,A("onReady",H.iframe);break;default:if(0===H.width&&0===H.height)return void n(`Unsupported message received (${H.type}), this is likely due to the iframe containing a later version of iframe-resizer than the parent page`);if(0===H.width||0===H.height)return;if(document.hidden)return;t()}var e,i}())):n("iframeResizer received messageData without id, message was: ",C)):Object.keys(w).forEach((e=>{w[e].mode>=0&&x("iFrame requested init",E(e),e)}))}function j(e,t,i){let n=null,o=null;if(w[e]){if(n=w[e][t],"function"!=typeof n)throw new TypeError(`${t} on iFrame[${e}] is not a function`);o=n(i)}return o}function T(e){const t=e.id;delete w[t]}function k(e){const t=e.id;if(!1!==j(t,"onClose",t)){try{e.parentNode&&e.remove()}catch(e){n(e)}j(t,"onClosed",t),T(e)}}function $(e){null===v.position&&(v.position={x:window.scrollX,y:window.scrollY})}function R(){v.position=null}function I(e){null!==v.position&&(window.scrollTo(v.position.x,v.position.y),R())}function M(e){$(e.id),S(e),x("reset","reset",e.id)}function S(e){const t=e.id;function i(t){const i=`${e[t]}px`;e.iframe.style[t]=i}w[t].sizeHeight&&i("height"),w[t].sizeWidth&&i("width")}function x(e,t,i,r){w[i]&&(w[i]?.postMessageTarget?function(){const{postMessageTarget:e,targetOrigin:n}=w[i];if(w[i].sameDomain)try{return void w[i].iframe.contentWindow.iframeChildListener(a+t)}catch(e){}e.postMessage(a+t,n)}():n(i,`[${e}] IFrame(${i}) not found`),r&&w[i]?.warningTimeout&&(w[i].msgTimeout=setTimeout((function(){if(void 0===w[i])return;const{waitForLoad:e}=w[i];w[i].loaded||w[i].loadErrorShown||(w[i].loadErrorShown=!0,o(i,`\nNo response from iFrame\n \nThe iframe (${i}) has not responded within ${w[i].warningTimeout/1e3} seconds. Check @iframe-resizer/child package has been loaded in the iframe.\n${e?"\nThe waitForLoad option is currently set to true. If the iframe loads before the JavaScript runs, this option will prevent iframe-resizer from initialising. To disable this, set the waitForLoad option to false. \n":""}\nThis 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`))}),w[i].warningTimeout)))}function E(e){const t=w[e];return[e,"8",t.sizeWidth,t.log,"32",!0,t.autoResize,t.bodyMargin,t.heightCalculationMethod,t.bodyBackground,t.bodyPadding,t.tolerance,t.inPageLinks,"child",t.widthCalculationMethod,t.mouseEvents,t.offsetHeight,t.offsetWidth,t.sizeHeight,t.license,v.version,t.mode].join(":")}let W=0,F=!1,N=!1;var L=e=>t=>{function a(e){if(!e)return{};if("object"!=typeof e)throw new TypeError("Options is not an object");return("sizeWidth"in e||"sizeHeight"in e||"autoResize"in e)&&o(d,'Deprecated Option\n\nThe sizeWidth, sizeHeight and autoResize options have been replaced with new direction option which expects values of "vertical", "horizontal" or "horizontal".\n'),e}function s(e){const t=w[e]?.iframe?.title;return""===t||void 0===t}const d=function(i){if(i&&"string"!=typeof i)throw new TypeError("Invalid id for iFrame. Expected String");return""!==i&&i||(t.id=i=function(){let t=e?.id||b.id+W++;return null!==document.getElementById(t)&&(t+=W++),t}(),(e||{}).log),i}(t.id);return d in w&&"iFrameResizer"in t?n(d,"Ignored iFrame, already setup."):(function(e){var i,n;w[d]={iframe:t,firstRun:!0,remoteHost:t?.src.split("/").slice(0,3).join("/"),...b,...a(e),mode:g(e),syncTitle:s(d)},function(){if("horizontal"===w[d].direction)return w[d].sizeWidth=!0,void(w[d].sizeHeight=!1);if("none"===w[d].direction)return w[d].sizeWidth=!1,w[d].sizeHeight=!1,void(w[d].autoResize=!1);if("vertical"!==w[d].direction)throw new TypeError(d,`Direction value of "${w[d].direction}" is not valid`)}(),(i=e?.offsetSize||e?.offset)&&("vertical"===w[d].direction?w[d].offsetHeight=i:w[d].offsetWidth=i),e?.offset&&o(d,"Deprecated option\n\n The offset option has been renamed to offsetSize. Use of the old name will be removed in a future version of iframe-resizer."),null===w[d].postMessageTarget&&(w[d].postMessageTarget=t.contentWindow),w[d].targetOrigin=!0===w[d].checkOrigin?""===(n=w[d].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*"}(e),function(){const{mode:e}=w[d];e<0&&o("Parent",`${y(e+2)}${y(2)}`),N||e<0||(N=!0,((e,...t)=>{i("info",e,...t)})(`v${r} (${(e=>f(h[e]))(e)})`),e<1&&o("Parent",y(3)))}(),A(),function(){switch(t.style.overflow=!1===w[d]?.scrolling?"hidden":"auto",w[d]?.scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=w[d]?w[d].scrolling:"no"}}(),function(){const{bodyMargin:e}=w[d];"number"!=typeof e&&"0"!==e||(w[d].bodyMargin=`${e}px`)}(),function(e){const{id:i}=t;-1!==w[i].mode&&-2!==w[i].mode&&(c(t,"load",(function(){x("iFrame.onload",`${e}:${F}`,i,!0),function(){const e=w[d]?.firstRun,i=w[d]?.heightCalculationMethod in l;!e&&i&&M({iframe:t,height:0,width:0,type:"init"})}()})),!1===w[i].waitForLoad&&x("init",`${e}:${F}`,i,!0))}(E(d)),function(){if(w[d]){const e={close:k.bind(null,w[d].iframe),disconnect:T.bind(null,w[d].iframe),removeListeners(){o(d,"\nDeprecated Method Name\n\nThe emoveListeners() method has been renamed to isconnect().\n"),this.disconnect()},resize:x.bind(null,"Window resize","resize",d),moveToAnchor(e){x("Move to anchor",`moveToAnchor:${e}`,d)},sendMessage(e){x("Send Message",`message:${e=JSON.stringify(e)}`,d)}};w[d].iframe.iframeResizer=e,w[d].iframe.iFrameResizer=e}}()),t?.iFrameResizer};function O(){!1===document.hidden&&function(e,t){const i=e=>w[e]?.autoResize&&!w[e]?.firstRun;Object.keys(w).forEach((function(n){i(n)&&x(e,t,n)}))}("Tab Visible","resize")}const A=(e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}})((()=>{c(window,"message",z),c(document,"visibilitychange",O),window.iframeParentListener=e=>z({data:e,sameDomain:!0})})),C="[iframeResizer] ";window.iframeResize=function(){function e(e){switch(!0){case!e:throw new TypeError(`${C}iframe is not defined`);case!e.tagName:throw new TypeError(`${C}Not a valid DOM element`);case"IFRAME"!==e.tagName.toUpperCase():throw new TypeError(`${C}Expected