@iframe-resizer/child 5.5.1-beta.1 → 5.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -22,4 +22,4 @@ yarn add @iframe-resizer/child
22
22
 
23
23
  ---
24
24
 
25
- _iframe-resizer version 5.5.1-beta.1 2025-07-31 - 09:43:35.491Z_
25
+ _iframe-resizer version 5.5.1 2025-08-01 - 09:36:01.131Z_
package/index.cjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/child 5.5.1-beta.1 (cjs) - 2025-07-31
4
+ * @module iframe-resizer/child 5.5.1 (cjs) - 2025-08-01
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -17,5 +17,4 @@
17
17
  */
18
18
 
19
19
 
20
- "use strict";const e=require("auto-console-group"),t="5.5.1-beta.1",n="iframeResizer",o=10,r="data-iframe-size",i="data-iframe-overflowed",a="data-iframe-ignore",s="bottom",l="right",c="autoResizeEnabled",u=Symbol("sizeChanged"),d="manualResize",f={},m="setOffsetSize",p="resizeObserver",h="overflowObserver",g="mutationObserver",y="visibilityObserver",b="none",v="No change in content size detected",z="init",w=(e,t,n,o)=>e.addEventListener(t,n,o||!1),$=e=>{if(!e)return"";let t=-559038744,n=1103547984;for(let o,r=0;r<e.length;r++)o=e.codePointAt(r),t=Math.imul(t^o,2246822519),n=Math.imul(n^o,3266489917);return t^=Math.imul(t^n>>>15,1935289751),n^=Math.imul(n^t>>>15,3405138345),t^=n>>>16,n^=t>>>16,(2097152*(n>>>0)+(t>>>11)).toString(36)},I=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),O=["spjluzl","rlf","clyzpvu"],S=["<yi>Puchspk Spjluzl Rlf</><iy><iy>","<yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm 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 <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>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.<iy><iy>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.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt."],T=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],H=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),M=e=>I(S[e]),E=e=>{const t=e[I(O[0])]||e[I(O[1])]||e[I(O[2])];if(!t)return-1;const n=t.split("-");let o=function(e=""){let t=-2;const n=$(I(e));return n in H&&(t=H[n]),t}(n[0]);return 0===o||(e=>e[2]===$(e[0]+e[1]))(n)||(o=-2),o},k=(e,...t)=>setTimeout(()=>e(...t),0),j=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},A=e=>e,R=e=>Math.round(1e3*e)/1e3,G=e=>e.charAt(0).toUpperCase()+e.slice(1),N=e=>""!=`${e}`&&void 0!==e;const L=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${G(t)}`)};let x=!0,P=n;var C;const q=(C=e,C?.__esModule?C.default:C)({label:`${n}(child)`});const B=(D="log",(...e)=>!x||q[D](...e));var D;const F=B;const{assert:W,debug:U,endAutoGroup:V,error:Z,errorBoundary:J,event:_,label:Q,purge:Y,warn:X}=q,K=e=>{return q.warn((t=A,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):t(e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(e));var t},ee=K,te=(e=>(t,n="renamed to")=>(o,r,i="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${i}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))((e,t)=>K(t)),ne=te("Method"),oe=te("Method","replaced with"),re=te("Option"),ie=["min-height","min-width","max-height","max-width"],ae=new Set,se=e=>e.tagName?e.tagName.toLowerCase():"unknown",le=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),ce=(e,t)=>{return(n=le(e,t))&&"0px"!==n&&"auto"!==n&&"none"!==n;var n};function ue({href:e}){ae.has(e)||(B("Unable to access stylesheet:",e),ae.add(e))}const de=(e,t)=>function(e,t){const n=e.style[t];return n?{source:"an inline style attribute",value:n}:null}(e,t)||function(e,t){for(const n of document.styleSheets)try{for(const o of n.cssRules||[])if(o.selectorText&&e.matches(o.selectorText)){const e=o.style[t];if(e)return{source:"STYLE"===n.ownerNode.tagName?"an inline <style> block":`stylesheet (${n.href})`,value:e}}}catch(e){ue(n)}return{source:"cross-origin stylesheet",value:le(e,t)}}(e,t),fe=(e,t)=>{const{source:n,value:o}=de(e,t),r=se(e);K(`The <b>${t}</> CSS property is set to <b>${o}</> on the <b><${r}></> element via ${n}. This may cause issues with the correct operation of <i>iframe-resizer</>.\n\nIf you wish to restrict the size of the iframe, then you should set this property on the iframe element itself, not the content inside it.`)};function me(){for(const e of[document.documentElement,document.body])for(const t of ie)B(`Checking <${se(e)}> for blocking CSS: ${t}`),ce(e,t)&&fe(e,t)}const pe=e=>t=>void 0===t?void 0:e(t),he=pe(e=>"true"===e),ge=pe(Number),ye=new Set,be=new Set,ve=[];let ze,we=1,$e=!1,Ie=0;const Oe=e=>{B("Mutations:",e);for(const t of e){const{addedNodes:e,removedNodes:n}=t;for(const t of e)ye.add(t);for(const e of n)ye.has(e)?ye.delete(e):be.add(e)}};function Se(e){ve.push(e),$e||(Ie=performance.now(),$e=!0,requestAnimationFrame(ze))}function Te(t){const n=new window.MutationObserver(Se),o=document.querySelector("body"),i={attributes:!0,attributeFilter:[a,r],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return ze=(t=>()=>{const n=performance.now(),o=n-Ie,r=16*we+++2;if(o>r&&o<200)return _("MutationDelay"),F("Update delayed due to heavy workload on the callStack"),F(`EventLoop busy time: %c${R(o)}ms %c> Max wait: %c${r-2}ms`,e.HIGHLIGHT,e.FOREGROUND,e.HIGHLIGHT),setTimeout(ze,16*we),void(Ie=n);we=1,ve.forEach(Oe),ve.length=0,t({addedMutations:ye,removedMutations:be}),$e=!1,ye.clear(),be.clear()})(t),n.observe(o,i),F("Attached MutationObserver to body"),n}const He=(t,n=!0)=>o=>{o>0&&F(`${n?"At":"De"}tached ${t}Observer ${n?"to":"from"} %c${o}%c element${1===o?"":"s"}`,e.HIGHLIGHT,e.NORMAL)},Me=(e,t,n)=>e=>{let o=0;for(const r of e)n.has(r)&&(t.unobserve(r),n.delete(r),o+=1);return o},Ee=e=>e.hidden||null===e.offsetParent||"none"===e.style.display,ke=(e,t)=>{const n=t.side,o={root:t.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||A,a=(t=!1)=>e(t),s=(e,t)=>0===e||e>t[n],l=(e,t)=>e.toggleAttribute(i,t);const c=new IntersectionObserver(function(e){for(const t of e){const{boundingClientRect:e,rootBounds:o,target:r}=t,i=e[n],a=s(i,o)&&!Ee(r);l(r,a)}r(a)},o),u=new WeakSet;return{attachObservers:function(e){let t=0;for(const n of e){const e=n.nodeType===Node.ELEMENT_NODE,o=u.has(n);e&&(W(!o,"Node already observed for overflow",n),o||(c.observe(n),u.add(n),t+=1))}return t},detachObservers:Me(0,c,u)}},je="--ifr-start",Ae="--ifr-end",Re=[],Ge=new WeakSet,Ne=e=>"object"==typeof e&&Ge.add(e);let Le={},xe=0;function Pe(e){e.getEntries().forEach(e=>{if(e.name===Ae){const{duration:t}=performance.measure("--ifr-measure",je,Ae);Le=e.detail,Re.push(t),Re.length>100&&Re.shift()}})}function Ce(){F("Attached PerformanceObserver to page");new PerformanceObserver(Pe).observe({entryTypes:["mark"]}),Ne(document.documentElement),Ne(document.body),function(){const e=setInterval(()=>{if(Re.length<10)return;if(Le.hasTags&&Le.len<25)return;Re.sort();const t=Math.min(Re.reduce((e,t)=>e+t,0)/Re.length,Re[Math.floor(Re.length/2)]),n=R(t);n>xe&&(xe=n,_("performanceObserver"),B("Mean time:",R(Re[Math.floor(Re.length/2)])),B("Median time:",R(Re.reduce((e,t)=>e+t,0)/Re.length)),B("Average time:",n),B("Max time:",R(Math.max(...Re)))),t<=4||(clearInterval(e),K(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${R(t)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${Le.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))},5e3)}()}const qe=He("Resize"),Be=new WeakSet;let De;function Fe(e){let t=0;for(const n of e){const e=n.nodeType===Node.ELEMENT_NODE,o=Be.has(n);if(!e)continue;const r=getComputedStyle(n)?.position;""!==r&&"static"!==r&&(W(!o,"Node already observed for resize",n),o||(De.observe(n),Be.add(n),t+=1))}qe(t)}const We=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},Ue=We("function"),Ve=We("number"),Ze=We("string");"undefined"!=typeof window&&function(){const $={height:()=>(X("Custom height calculation function not defined"),Bt.auto()),width:()=>(X("Custom width calculation function not defined"),Dt.auto())},S={},H={},A="auto",C="[iFrameSizer]",D="scroll";let W,Z,Y,te,ie,ae,se,le,ce,ue,de,fe=!0,pe="",ye=0,be="",ve="",ze=!1,we=!0,$e=!1,Ie=!0,Oe=!1,Se=!1,Ee=!1,Re=1,Ge=A,Ne="",Le=!0,xe={},Pe=!1,qe=!0,We=!1,Je=0,_e=!1,Qe=[],Ye="",Xe="child",Ke=!1,et="",tt=[],nt=window.parent,ot="*",rt=0,it=!1,at=1,st=D,lt=window,ct=()=>{X("onMessage function not defined")},ut=()=>{},dt=null,ft=null;function mt(i){var a,u,f;!function(e){Ye=e[0]??Ye,ye=ge(e[1])??ye,$e=he(e[2])??$e,We=he(e[3])??We,fe=he(e[6])??fe,be=e[7]??be,Ge=e[8]??Ge,pe=e[9]??pe,ve=e[10]??ve,rt=ge(e[11])??rt,xe.enable=he(e[12])??!1,Xe=e[13]??Xe,st=e[14]??st,_e=he(e[15])??_e,Y=ge(e[16])??Y,te=ge(e[17])??te,we=he(e[18])??we,W=e[19]??W,ue=e[20]??ue,Je=ge(e[21])??Je,qe=he(e[23])??qe}(i),P=(a={id:Ye,enabled:We,expand:qe}).id||n,q.label(`${P}`),q.expand(a.expand),x=a.enabled,B(`Initialising iframe v${t} ${window.location.href}`),function(){function t(e){B("Reading data from page:",Object.keys(e)),de=Ue(e,"onBeforeResize")??de,ct=Ue(e,"onMessage")??ct,ut=Ue(e,"onReady")??ut,"number"==typeof e?.offset&&(re("offset","offsetSize"),we&&(Y=Ve(e,"offset")??Y),$e&&(te=Ve(e,"offset")??te)),"number"==typeof e?.offsetSize&&(we&&(Y=Ve(e,"offsetSize")??Y),$e&&(te=Ve(e,"offsetSize")??te)),Z=Ze(e,I(O[0]))??Z,Ne=Ze(e,"ignoreSelector")??Ne,et=Ze(e,"sizeSelector")??et,ot=Ze(e,"targetOrigin")??ot,Ge=e?.heightCalculationMethod||Ge,st=e?.widthCalculationMethod||st}function n(e,t){return"function"==typeof e&&(K(`<rb>Deprecated Option(${t}CalculationMethod)</>\n\nThe use of <b>${t}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),$[t]=e,e="custom"),e}if(1===Je)return;const o=window.iframeResizer||window.iFrameResizer;"object"==typeof o&&(t(o),Ge=n(Ge,"height"),st=n(st,"width"),F(`Set targetOrigin for parent: %c${ot}`,e.HIGHLIGHT))}(),zt(),function(){try{Ke=1===Je||"iframeParentListener"in window.parent}catch(e){B("Cross domain iframe detected")}}(),$e===we&&(ze=!0),function(){const n=Je,o=E({key:W}),r=E({key:Z});if(Je=Math.max(o,r),Je<0){if(Je=Math.min(o,r),K(`${M(Je+2)}${M(2)}`),N(ue))throw M(Je+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"")}else(!N(ue)||n>-1&&Je>n)&&(sessionStorage.getItem("ifr")!==t&&function(t,n){console.info(`${P} %ciframe-resizer ${t}`,x||n<1?"font-weight: bold;":e.NORMAL)}(`v${t} (${(e=>I(T[e]))(Je)})`,Je),Je<2&&ee(M(3)),sessionStorage.setItem("ifr",t))}(),ue&&""!==ue&&"false"!==ue?ue!==t&&K(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ue} - Child page: ${t}.\n`):K("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),It(),Ot(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach(n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(r,!0)});t("data-iframe-height"),t("data-iframe-width"),e&&K("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),"BackCompat"===document.compatMode&&K("<rb>Quirks Mode Detected</>\n\nThis iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.\n\nFor more information see <u>https://iframe-resizer.com/quirks-mode</>.\n"),ht(),ze||me(),1!==Je&&(lt.parentIframe=Object.freeze({autoResize:e=>(L(e,"boolean","parentIframe.autoResize(enable) enable"),!1===$e&&!1===we?(_(c),K(`Auto Resize can not be changed when <b>direction</> is set to '${b}'.`),!1):(!0===e&&!1===fe?(fe=!0,queueMicrotask(()=>Jt(c,"Auto Resize enabled"))):!1===e&&!0===fe&&(fe=!1),Qt(0,0,"autoResize",JSON.stringify(fe)),fe)),close(){Qt(0,0,"close")},getId:()=>Ye,getOrigin:()=>(ne("getOrigin()","getParentOrigin()"),ie),getParentOrigin:()=>ie,getPageInfo(e){if("function"==typeof e)return dt=e,Qt(0,0,"pageInfo"),void oe("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");dt=null,Qt(0,0,"pageInfoStop")},getParentProps:e=>(L(e,"function","parentIframe.getParentProps(callback) callback"),ft=e,Qt(0,0,"parentInfo"),()=>{ft=null,Qt(0,0,"parentInfoStop")}),getParentProperties(e){ne("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){L(e,"string","parentIframe.moveToAnchor(anchor) anchor"),xe.findTarget(e)},reset(){!function(){const t=Ge;Ge=A,B("Reset trigger event: %cparentIframe.reset",e.HIGHLIGHT),it?B("TriggerLock blocked calculation"):(it=!0,U("Trigger event lock on"),requestAnimationFrame(()=>{it=!1,U("Trigger event lock off")})),_t("reset"),Ge=t}()},setOffsetSize(e){L(e,"number","parentIframe.setOffsetSize(offset) offset"),Y=e,te=e,Jt(m,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){L(e,"number","parentIframe.scrollBy(x, y) x"),L(t,"number","parentIframe.scrollBy(x, y) y"),Qt(t,e,"scrollBy")},scrollTo(e,t){L(e,"number","parentIframe.scrollTo(x, y) x"),L(t,"number","parentIframe.scrollTo(x, y) y"),Qt(t,e,"scrollTo")},scrollToOffset(e,t){L(e,"number","parentIframe.scrollToOffset(x, y) x"),L(t,"number","parentIframe.scrollToOffset(x, y) y"),Qt(t,e,"scrollToOffset")},sendMessage(e,t){t&&L(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),Qt(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){Ge=e,It()},setWidthCalculationMethod(e){st=e,Ot()},setTargetOrigin(t){L(t,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),B(`Set targetOrigin: %c${t}`,e.HIGHLIGHT),ot=t},resize(e,t){e&&L(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),t&&L(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),Jt(d,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){ne("size()","resize()"),this.resize(e,t)}}),lt.parentIFrame=lt.parentIframe),function(){function t(e){Qt(0,0,e.type,`${e.screenY}:${e.screenX}`)}function n(n,o){B(`Add event listener: %c${o}`,e.HIGHLIGHT),w(window.document,n,t)}!0===_e&&(n("mouseenter","Mouse Enter"),n("mouseleave","Mouse Leave"))}(),xe=function(){const t=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function n(e){const n=e.getBoundingClientRect(),r=t();return{x:parseInt(n.left,o)+parseInt(r.x,o),y:parseInt(n.top,o)+parseInt(r.y,o)}}function r(t){function o(t){const o=n(t);B(`Moving to in page link (%c#${r}%c) at x: %c${o.x}%c y: %c${o.y}`,e.HIGHLIGHT,e.FOREGROUND,e.HIGHLIGHT,e.FOREGROUND,e.HIGHLIGHT),Qt(o.y,o.x,"scrollToOffset")}const r=t.split("#")[1]||t,i=decodeURIComponent(r),a=document.getElementById(i)||document.getElementsByName(i)[0];void 0===a?(B(`In page link (#${r}) not found in iFrame, so sending to parent`),Qt(0,0,"inPageLink",`#${r}`)):o(a)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&r(t)}function a(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&w(e,"click",t=>{t.preventDefault(),r(e.getAttribute("href"))})}function s(){w(window,"hashchange",i)}function l(){setTimeout(i,128)}function c(){B("Setting up location.hash handlers"),a(),s(),l()}return xe.enable?1===Je?K("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):c():B("In page linking not enabled"),{findTarget:r}}(),void 0===be&&(be=`${ye}px`),bt("margin",(u="margin",(f=be).includes("-")&&(X(`Negative CSS value ignored for ${u}`),f=""),f)),bt("background",pe),bt("padding",ve),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),ze||function(){const t=e=>e.style.setProperty("height","auto","important");t(document.documentElement),t(document.body),B("Set HTML & body height: %cauto !important",e.HIGHLIGHT)}(),!0!==fe&&B("Auto Resize disabled"),function(e){wt({method:e,eventType:"After Print",eventName:"afterprint"}),wt({method:e,eventType:"Before Print",eventName:"beforeprint"}),wt({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}("add"),function(){const e=Lt(document.documentElement)();B("Attaching Observers"),Te(Rt),function(e){const t={root:document.documentElement,side:we?s:l};ae=ke(Tt,t),ae.attachObservers(e)}(e),Ce(),function(e){De=new ResizeObserver(Ht),De.observe(document.body),Be.add(document.body),F("Attached ResizeObserver to body"),se={attachObserverToNonStaticElements:Fe,detachObservers:Me(0,De,Be)},se.attachObserverToNonStaticElements(e)}(e),function(e){const t=new IntersectionObserver(t=>e(t[0].isIntersecting),{threshold:0}),n=document.documentElement;t.observe(n),F("Attached VisibilityObserver to page")}(Mt)}(),pt(j(ut)),B("Initialization complete"),Jt(z,"Init message from host page",void 0,void 0,`${t}:${Je}`),document.title&&""!==document.title&&Qt(0,0,"title",document.title)}function pt(e){"complete"===document.readyState?k(e):w(document,"readystatechange",()=>pt(e))}function ht(){tt=document.querySelectorAll(`[${r}]`),Ee=tt.length>0,B(`Tagged elements found: %c${Ee}`,e.HIGHLIGHT)}let gt=0;function yt(){const t=document.querySelectorAll(`*[${a}]`);Oe=t.length>0,Oe&&t.length!==gt&&(function(t){const n=1===t.length?"":"s";X(`%c[${a}]%c found on %c${t.length}%c element${n}`,e.BOLD,e.NORMAL,e.BOLD,e.NORMAL)}(t),gt=t.length)}function bt(t,n){void 0!==n&&""!==n&&"null"!==n&&(document.body.style.setProperty(t,n),F(`Set body ${t}: %c${n}`,e.HIGHLIGHT))}function vt(t,n,o){if(""!==o){B(`${t}: %c${o}`,e.HIGHLIGHT);for(const e of document.querySelectorAll(o))B(`Applying ${n} to:`,e),e.toggleAttribute(n,!0)}}function zt(){vt("sizeSelector",r,et),vt("ignoreSelector",a,Ne)}function wt(t){({add(e){function n(){Jt(t.eventName,t.eventType)}H[e]=n,w(window,e,n,{passive:!0})},remove(e){const t=H[e];var n,o;delete H[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[t.method](t.eventName),B(`${G(t.method)} event listener: %c${t.eventType}`,e.HIGHLIGHT)}function $t(t,n,o,r){return n!==t&&(t in o||(X(`${t} is not a valid option for ${r}CalculationMethod.`),t=n),t in S)&&K(`<rb>Deprecated ${r}CalculationMethod (${t})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${r} calculation method. It is recommended that you ${ue?"remove this option.":"set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page."}`),B(`Set ${r} calculation method: %c${t}`,e.HIGHLIGHT),t}function It(){Ge=$t(Ge,A,Bt,"height")}function Ot(){st=$t(st,D,Dt,"width")}function St(){const e=document.querySelectorAll(`[${i}]`);Qe=Array.from(e).filter(e=>!e.closest(`[${a}]`)),Se=Qe.length>0}function Tt(e){St(),(Se||e)&&(Qe.length>1?F("Overflowed Elements:",...Qe):Se||F("Overflow removed"),Jt(h,"Overflow updated"))}function Ht(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Jt(p,`Element resized <${function(e){switch(!0){case!N(e):return"";case N(e.id):return`${e.nodeName}#${e.id}`;case N(e.name):return`${e.nodeName} (${e.name}`;case N(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}function Mt(t){B(`Visible: %c${t}`,e.HIGHLIGHT),Pe=!t,Jt(y,"Visibility changed")}const Et=He("Overflow"),kt=He("Overflow",!1),jt=He("Resize"),At=He("Resize",!1);function Rt(e){!function({addedMutations:e,removedMutations:t}){_("contentMutated"),zt(),ht(),St();let n=0,o=0,r=0,i=0;for(const e of t){const t=Lt(e)();o+=ae.detachObservers(t),i+=se.detachObservers(t)}for(const t of e){const e=Lt(t)();n+=ae.attachObservers(e),r+=se.attachObserverToNonStaticElements(e)}kt(o),At(i),Et(n),jt(r),V()}(e),Jt(g,"Mutation Observed")}function Gt(e){performance.mark(je);const t=G(e);let n=0,o=document.documentElement,r=Ee?0:document.documentElement.getBoundingClientRect().bottom;const i=Ee?tt:Se?Qe:Lt(document)();for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return F(`${t} position calculated from:`,o),performance.mark(Ae,{detail:{hasTags:Ee,len:i.length,logging:We,Side:t}}),r}const Nt=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],Lt=e=>()=>{if(B("node:",e),B("node type:",e?.nodeType),!(e=>e.nodeType===Node.ELEMENT_NODE)(e))return[e];const t=["* ","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)"];return yt(),Oe&&t.push(`not([${a}])`,`not([${a}] *)`),[e,...e.querySelectorAll(t.join(":"))]},xt={height:0,width:0},Pt={height:0,width:0},Ct=[e.HIGHLIGHT,e.FOREGROUND,e.HIGHLIGHT];function qt(t){function n(){return Pt[r]=i,xt[r]=l,i}const o=t===Bt,r=o?"height":"width",i=t.boundingClientRect(),a=Math.ceil(i),s=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(t),c=`HTML: %c${i}px %cPage: %c${l}px`;let u=0;switch(!0){case!t.enabled():return l;case Ee:F("Found element with data-iframe-size attribute"),u=t.taggedElement();break;case!Se&&0===Pt[r]&&0===xt[r]:F(`Initial page size values: ${c}`,...Ct),u=n();break;case it&&i===Pt[r]&&l===xt[r]:F(`Size unchanged: ${c}`,...Ct),u=Math.max(i,l);break;case 0===i:F(`Page is hidden: ${c}`,...Ct),u=l;break;case!Se&&i!==Pt[r]&&l<=xt[r]:F(`New <html> size: ${c} `,...Ct),F(`Previous <html> size: %c${Pt[r]}px`,e.HIGHLIGHT),u=n();break;case!o:u=t.taggedElement();break;case!Se&&i<Pt[r]:F(`<html> size decreased: ${c}`,...Ct),u=n();break;case l===s||l===a:F(`<html> size equals page size: ${c}`,...Ct),u=n();break;case i>l:F(`Page size < <html> size: ${c}`,...Ct),u=n();break;case Se:F("Found element overflowing <html> "),u=t.taggedElement();break;default:F(`Using <html> size: ${c}`,...Ct),u=n()}return F(`Content ${r}: %c${u}px`,e.HIGHLIGHT),u+=function(t){const n=t.getOffset();return 0!==n&&F(`Page offsetSize: %c${n}px`,e.HIGHLIGHT),n}(t),u}const Bt={enabled:()=>we,getOffset:()=>Y,auto:()=>qt(Bt),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,o)+parseInt(t.marginBottom,o)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Bt.bodyOffset(),custom:()=>$.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...Nt(Bt)),min:()=>Math.min(...Nt(Bt)),grow:()=>Bt.max(),lowestElement:()=>Gt(s),taggedElement:()=>Gt(s)},Dt={enabled:()=>$e,getOffset:()=>te,auto:()=>qt(Dt),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>$.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...Nt(Dt)),min:()=>Math.min(...Nt(Dt)),rightMostElement:()=>Gt(l),scroll:()=>Math.max(Dt.bodyScroll(),Dt.documentElementScroll()),taggedElement:()=>Gt(l)},Ft=(e,t)=>!(Math.abs(e-t)<=rt);function Wt(e,t){const n=e[t]();return e.enabled()&&void 0!==de?function(e){const t=de(e);if(void 0===t)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);return t}(n):n}let Ut=!1;const Vt=j(()=>ee(M(4)));let Zt=!1;const Jt=J((t,n,o,r,i)=>{if(ce=performance.now(),le=!0,_(t),!0!==Ut){if(!fe&&!(t in f))return F("Resizing disabled"),void V();if(Pe){if(!0===Zt)return;return B("Iframe hidden - Ignored resize request"),void(Zt=!0)}Zt=!1,Ut=!0,requestAnimationFrame(()=>{Ut=!1}),function(t,n,o,r,i){const a=o??Wt(Bt,Ge),s=r??Wt(Dt,st),l=we&&Ft(Re,a)||$e&&Ft(at,s)?u:t;switch(B(`Resize event: %c${n}`,e.HIGHLIGHT),l){case z:case c:case u:Re=a,at=s;case m:Qt(Re,at,t,i);break;case h:case g:case p:case y:B(v);break;default:F(v)}le=!1}(t,n,o,r,i)}});function _t(e){Re=Bt[Ge](),at=Dt[st](),Qt(Re,at,e)}const Qt=J(function(t,n,o,r,i){Je<-1||(_(o),void 0!==i?B(`Message targetOrigin: %c${i}`,e.HIGHLIGHT):i=ot,function(){const a=`${Ye}:${t}:${n}:${o}${void 0===r?"":`:${r}`}`;if(Ke)try{window.parent.iframeParentListener(C+a)}catch(e){if(1!==Je)throw e;return void Vt()}else nt.postMessage(C+a,i);le&&B(function(){const e=R(performance.now()-ce);return o===z?`Initialised iFrame in %c${e}ms`:`Size calculated in %c${e}ms`}(),e.HIGHLIGHT),F(`Sending message to parent page via ${Ke?"sameOrigin":"postMessage"}: %c%c${a}`,e.ITALIC,e.HIGHLIGHT)}(),V())}),Yt=J(function(t){_("onMessage");const{freeze:n}=Object,{parse:o}=JSON,r=e=>n(o(e)),i=e=>Qt(0,0,`${e}Stop`),a={init:function(){if("loading"===document.readyState)return void B("Page not ready, ignoring init message");const e=t.data.slice(13).split(":");nt=t.source,ie=t.origin,mt(e),Ie=!1,setTimeout(()=>{Le=!1},128)},reset(){Le?B("Page reset ignored by init"):(B("Page size reset by host page"),_t("resetPage"))},resize(){B("Resize requested by host page"),Jt("parentResize","Parent window requested size check")},moveToAnchor(){xe.findTarget(l())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=l();B("PageInfo received from parent:",r(e)),dt?k(dt,o(e)):i("pageInfo")},parentInfo(){const e=r(l());B("ParentInfo received from parent:",e),ft?k(ft,e):i("parentInfo")},message(){const t=l();B("onMessage called from parent:%c",e.HIGHLIGHT,r(t)),k(ct,o(t))}},s=()=>t.data.split("]")[1].split(":")[0],l=()=>t.data.slice(t.data.indexOf(":")+1),c=()=>t.data.split(":")[2]in{true:1,false:1};function u(){const e=s();_(e),e in a?a[e]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||c()||X(`Unexpected message (${t.data})`)}C===`${t.data}`.slice(0,13)&&function(){if(!1!==Ie)return c()?(Q(s()),_(z),void a.init()):void B(`Ignored message of type "${s()}". Received before initialization.`);u()}()});function Xt(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?X("Already setup"):(window.iframeChildListener=e=>setTimeout(()=>Yt({data:e,sameOrigin:!0})),w(window,"message",Yt),w(window,"readystatechange",Xt),Xt())}();
21
- //# sourceMappingURL=index.cjs.js.map
20
+ "use strict";const e=require("auto-console-group"),t="5.5.1",n="iframeResizer",o=10,r="data-iframe-size",i="data-iframe-overflowed",a="data-iframe-ignore",s="bottom",l="right",c="autoResizeEnabled",u=Symbol("sizeChanged"),d="manualResize",f={},m="setOffsetSize",p="resizeObserver",h="overflowObserver",y="mutationObserver",g="visibilityObserver",b="none",v="init",z=(e,t,n,o)=>e.addEventListener(t,n,o||!1),w=e=>{if(!e)return"";let t=-559038744,n=1103547984;for(let o,r=0;r<e.length;r++)o=e.codePointAt(r),t=Math.imul(t^o,2246822519),n=Math.imul(n^o,3266489917);return t^=Math.imul(t^n>>>15,1935289751),n^=Math.imul(n^t>>>15,3405138345),t^=n>>>16,n^=t>>>16,(2097152*(n>>>0)+(t>>>11)).toString(36)},$=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),O=["spjluzl","rlf","clyzpvu"],S=["<yi>Puchspk Spjluzl Rlf</><iy><iy>","<yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm 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 <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>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.<iy><iy>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.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt."],I=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],M=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),T=e=>$(S[e]),E=e=>{const t=e[$(O[0])]||e[$(O[1])]||e[$(O[2])];if(!t)return-1;const n=t.split("-");let o=function(e=""){let t=-2;const n=w($(e));return n in M&&(t=M[n]),t}(n[0]);return 0===o||(e=>e[2]===w(e[0]+e[1]))(n)||(o=-2),o},j=(e,...t)=>setTimeout(()=>e(...t),0),k=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},A=e=>e,N=e=>Math.round(1e3*e)/1e3,x=e=>e.charAt(0).toUpperCase()+e.slice(1),R=e=>""!=`${e}`&&void 0!==e;const P=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${x(t)}`)};let C=!0,H=n;var L;const B=(L=e,L?.__esModule?L.default:L)({label:`${n}(child)`});var G;const q=(G="log",(...e)=>!C||B[G](...e));const{assert:W,debug:D,endAutoGroup:F,error:U,errorBoundary:V,event:Z,label:J,purge:_,warn:Q}=B,Y=e=>{return B.warn((t=A,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):t(e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(e));var t},X=Y,K=(e=>(t,n="renamed to")=>(o,r,i="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${i}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))((e,t)=>Y(t)),ee=K("Method"),te=K("Method","replaced with"),ne=K("Option"),oe=["min-height","min-width","max-height","max-width"],re=new Set,ie=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),ae=(e,t)=>{return(n=ie(e,t))&&"0px"!==n&&"auto"!==n&&"none"!==n;var n};function se({href:e}){re.has(e)||re.add(e)}const le=(e,t)=>function(e,t){const n=e.style[t];return n?{source:"an inline style attribute",value:n}:null}(e,t)||function(e,t){for(const n of document.styleSheets)try{for(const o of n.cssRules||[])if(o.selectorText&&e.matches(o.selectorText)){const e=o.style[t];if(e)return{source:"STYLE"===n.ownerNode.tagName?"an inline <style> block":`stylesheet (${n.href})`,value:e}}}catch(e){se(n)}return{source:"cross-origin stylesheet",value:ie(e,t)}}(e,t),ce=(e,t)=>{const{source:n,value:o}=le(e,t),r=(e=>e.tagName?e.tagName.toLowerCase():"unknown")(e);Y(`The <b>${t}</> CSS property is set to <b>${o}</> on the <b><${r}></> element via ${n}. This may cause issues with the correct operation of <i>iframe-resizer</>.\n\nIf you wish to restrict the size of the iframe, then you should set this property on the iframe element itself, not the content inside it.`)};function ue(){for(const e of[document.documentElement,document.body])for(const t of oe)ae(e,t)&&ce(e,t)}const de=e=>t=>void 0===t?void 0:e(t),fe=de(e=>"true"===e),me=de(Number),pe=new Set,he=new Set,ye=[];let ge,be=1,ve=!1,ze=0;const we=e=>{for(const t of e){const{addedNodes:e,removedNodes:n}=t;for(const t of e)pe.add(t);for(const e of n)pe.has(e)?pe.delete(e):he.add(e)}};function $e(e){ye.push(e),ve||(ze=performance.now(),ve=!0,requestAnimationFrame(ge))}function Oe(t){const n=new window.MutationObserver($e),o=document.querySelector("body"),i={attributes:!0,attributeFilter:[a,r],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return ge=(t=>()=>{const n=performance.now(),o=n-ze,r=16*be+++2;if(o>r&&o<200)return Z("MutationDelay"),q("Update delayed due to heavy workload on the callStack"),q(`EventLoop busy time: %c${N(o)}ms %c> Max wait: %c${r-2}ms`,e.HIGHLIGHT,e.FOREGROUND,e.HIGHLIGHT),setTimeout(ge,16*be),void(ze=n);be=1,ye.forEach(we),ye.length=0,t({addedMutations:pe,removedMutations:he}),ve=!1,pe.clear(),he.clear()})(t),n.observe(o,i),q("Attached MutationObserver to body"),n}const Se=(t,n=!0)=>o=>{o>0&&q(`${n?"At":"De"}tached ${t}Observer ${n?"to":"from"} %c${o}%c element${1===o?"":"s"}`,e.HIGHLIGHT,e.NORMAL)},Ie=(e,t,n)=>e=>{let o=0;for(const r of e)n.has(r)&&(t.unobserve(r),n.delete(r),o+=1);return o},Me=e=>e.hidden||null===e.offsetParent||"none"===e.style.display,Te=(e,t)=>{const n=t.side,o={root:t.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||A,a=(t=!1)=>e(t),s=(e,t)=>0===e||e>t[n],l=(e,t)=>e.toggleAttribute(i,t);const c=new IntersectionObserver(function(e){for(const t of e){const{boundingClientRect:e,rootBounds:o,target:r}=t,i=e[n],a=s(i,o)&&!Me(r);l(r,a)}r(a)},o),u=new WeakSet;return{attachObservers:function(e){let t=0;for(const n of e){const e=n.nodeType===Node.ELEMENT_NODE,o=u.has(n);e&&(W(!o,"Node already observed for overflow",n),o||(c.observe(n),u.add(n),t+=1))}return t},detachObservers:Ie(0,c,u)}},Ee="--ifr-start",je="--ifr-end",ke=[],Ae=new WeakSet,Ne=e=>"object"==typeof e&&Ae.add(e);let xe={},Re=0;function Pe(e){e.getEntries().forEach(e=>{if(e.name===je){const{duration:t}=performance.measure("--ifr-measure",Ee,je);xe=e.detail,ke.push(t),ke.length>100&&ke.shift()}})}function Ce(){q("Attached PerformanceObserver to page");new PerformanceObserver(Pe).observe({entryTypes:["mark"]}),Ne(document.documentElement),Ne(document.body),function(){const e=setInterval(()=>{if(ke.length<10)return;if(xe.hasTags&&xe.len<25)return;ke.sort();const t=Math.min(ke.reduce((e,t)=>e+t,0)/ke.length,ke[Math.floor(ke.length/2)]),n=N(t);n>Re&&(Re=n,Z("performanceObserver")),t<=4||(clearInterval(e),Y(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${N(t)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${xe.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))},5e3)}()}const He=Se("Resize"),Le=new WeakSet;let Be;function Ge(e){let t=0;for(const n of e){const e=n.nodeType===Node.ELEMENT_NODE,o=Le.has(n);if(!e)continue;const r=getComputedStyle(n)?.position;""!==r&&"static"!==r&&(W(!o,"Node already observed for resize",n),o||(Be.observe(n),Le.add(n),t+=1))}He(t)}const qe=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},We=qe("function"),De=qe("number"),Fe=qe("string");"undefined"!=typeof window&&function(){const w={height:()=>(Q("Custom height calculation function not defined"),Ct.auto()),width:()=>(Q("Custom width calculation function not defined"),Ht.auto())},S={},M={},A="auto",N="[iFrameSizer]",L="scroll";let G,W,D,U,K,oe,re,ie,ae,se=!0,le="",ce=0,de="",pe="",he=!1,ye=!0,ge=!1,be=!0,ve=!1,ze=!1,we=!1,$e=1,Me=A,ke="",Ae=!0,Ne={},xe=!1,Re=!0,Pe=!1,He=0,qe=!1,Ue=[],Ve="",Ze="child",Je=!1,_e="",Qe=[],Ye=window.parent,Xe="*",Ke=0,et=!1,tt=1,nt=L,ot=window,rt=()=>{Q("onMessage function not defined")},it=()=>{},at=null,st=null;function lt(i){var a,u,f;!function(e){Ve=e[0]??Ve,ce=me(e[1])??ce,ge=fe(e[2])??ge,Pe=fe(e[3])??Pe,se=fe(e[6])??se,de=e[7]??de,Me=e[8]??Me,le=e[9]??le,pe=e[10]??pe,Ke=me(e[11])??Ke,Ne.enable=fe(e[12])??!1,Ze=e[13]??Ze,nt=e[14]??nt,qe=fe(e[15])??qe,D=me(e[16])??D,U=me(e[17])??U,ye=fe(e[18])??ye,G=e[19]??G,ie=e[20]??ie,He=me(e[21])??He,Re=fe(e[23])??Re}(i),H=(a={id:Ve,enabled:Pe,expand:Re}).id||n,B.label(`${H}`),B.expand(a.expand),C=a.enabled,function(){function t(e){ae=We(e,"onBeforeResize")??ae,rt=We(e,"onMessage")??rt,it=We(e,"onReady")??it,"number"==typeof e?.offset&&(ne("offset","offsetSize"),ye&&(D=De(e,"offset")??D),ge&&(U=De(e,"offset")??U)),"number"==typeof e?.offsetSize&&(ye&&(D=De(e,"offsetSize")??D),ge&&(U=De(e,"offsetSize")??U)),W=Fe(e,$(O[0]))??W,ke=Fe(e,"ignoreSelector")??ke,_e=Fe(e,"sizeSelector")??_e,Xe=Fe(e,"targetOrigin")??Xe,Me=e?.heightCalculationMethod||Me,nt=e?.widthCalculationMethod||nt}function n(e,t){return"function"==typeof e&&(Y(`<rb>Deprecated Option(${t}CalculationMethod)</>\n\nThe use of <b>${t}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),w[t]=e,e="custom"),e}if(1===He)return;const o=window.iframeResizer||window.iFrameResizer;"object"==typeof o&&(t(o),Me=n(Me,"height"),nt=n(nt,"width"),q(`Set targetOrigin for parent: %c${Xe}`,e.HIGHLIGHT))}(),ht(),function(){try{Je=1===He||"iframeParentListener"in window.parent}catch(e){}}(),ge===ye&&(he=!0),function(){const n=He,o=E({key:G}),r=E({key:W});if(He=Math.max(o,r),He<0){if(He=Math.min(o,r),_(),Y(`${T(He+2)}${T(2)}`),R(ie))throw T(He+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"")}else(!R(ie)||n>-1&&He>n)&&(sessionStorage.getItem("ifr")!==t&&function(t,n){console.info(`${H} %ciframe-resizer ${t}`,C||n<1?"font-weight: bold;":e.NORMAL)}(`v${t} (${(e=>$(I[e]))(He)})`,He),He<2&&X(T(3)),sessionStorage.setItem("ifr",t))}(),ie&&""!==ie&&"false"!==ie?ie!==t&&Y(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ie} - Child page: ${t}.\n`):Y("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),bt(),vt(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach(n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(r,!0)});t("data-iframe-height"),t("data-iframe-width"),e&&Y("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),"BackCompat"===document.compatMode&&Y("<rb>Quirks Mode Detected</>\n\nThis iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.\n\nFor more information see <u>https://iframe-resizer.com/quirks-mode</>.\n"),ut(),he||ue(),1!==He&&(ot.parentIframe=Object.freeze({autoResize:e=>(P(e,"boolean","parentIframe.autoResize(enable) enable"),!1===ge&&!1===ye?(Z(c),Y(`Auto Resize can not be changed when <b>direction</> is set to '${b}'.`),!1):(!0===e&&!1===se?(se=!0,queueMicrotask(()=>Dt(c,"Auto Resize enabled"))):!1===e&&!0===se&&(se=!1),Ut(0,0,"autoResize",JSON.stringify(se)),se)),close(){Ut(0,0,"close")},getId:()=>Ve,getOrigin:()=>(ee("getOrigin()","getParentOrigin()"),K),getParentOrigin:()=>K,getPageInfo(e){if("function"==typeof e)return at=e,Ut(0,0,"pageInfo"),void te("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");at=null,Ut(0,0,"pageInfoStop")},getParentProps:e=>(P(e,"function","parentIframe.getParentProps(callback) callback"),st=e,Ut(0,0,"parentInfo"),()=>{st=null,Ut(0,0,"parentInfoStop")}),getParentProperties(e){ee("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){P(e,"string","parentIframe.moveToAnchor(anchor) anchor"),Ne.findTarget(e)},reset(){!function(){const e=Me;Me=A,et||(et=!0,requestAnimationFrame(()=>{et=!1})),Ft("reset"),Me=e}()},setOffsetSize(e){P(e,"number","parentIframe.setOffsetSize(offset) offset"),D=e,U=e,Dt(m,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){P(e,"number","parentIframe.scrollBy(x, y) x"),P(t,"number","parentIframe.scrollBy(x, y) y"),Ut(t,e,"scrollBy")},scrollTo(e,t){P(e,"number","parentIframe.scrollTo(x, y) x"),P(t,"number","parentIframe.scrollTo(x, y) y"),Ut(t,e,"scrollTo")},scrollToOffset(e,t){P(e,"number","parentIframe.scrollToOffset(x, y) x"),P(t,"number","parentIframe.scrollToOffset(x, y) y"),Ut(t,e,"scrollToOffset")},sendMessage(e,t){t&&P(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),Ut(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){Me=e,bt()},setWidthCalculationMethod(e){nt=e,vt()},setTargetOrigin(e){P(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),Xe=e},resize(e,t){e&&P(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),t&&P(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),Dt(d,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){ee("size()","resize()"),this.resize(e,t)}}),ot.parentIFrame=ot.parentIframe),function(){function e(e){Ut(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){z(window.document,t,e)}!0===qe&&(t("mouseenter"),t("mouseleave"))}(),Ne=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function t(t){const n=t.getBoundingClientRect(),r=e();return{x:parseInt(n.left,o)+parseInt(r.x,o),y:parseInt(n.top,o)+parseInt(r.y,o)}}function n(e){function n(e){const n=t(e);Ut(n.y,n.x,"scrollToOffset")}const o=e.split("#")[1]||e,r=decodeURIComponent(o),i=document.getElementById(r)||document.getElementsByName(r)[0];void 0===i?Ut(0,0,"inPageLink",`#${o}`):n(i)}function r(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&n(t)}function i(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&z(e,"click",t=>{t.preventDefault(),n(e.getAttribute("href"))})}function a(){z(window,"hashchange",r)}function s(){setTimeout(r,128)}function l(){i(),a(),s()}return Ne.enable&&(1===He?Y("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):l()),{findTarget:n}}(),void 0===de&&(de=`${ce}px`),mt("margin",(u="margin",(f=de).includes("-")&&(Q(`Negative CSS value ignored for ${u}`),f=""),f)),mt("background",le),mt("padding",pe),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),he||function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}(),function(e){yt({method:e,eventType:"After Print",eventName:"afterprint"}),yt({method:e,eventType:"Before Print",eventName:"beforeprint"}),yt({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}("add"),function(){const e=At(document.documentElement)();Oe(Et),function(e){const t={root:document.documentElement,side:ye?s:l};oe=Te(wt,t),oe.attachObservers(e)}(e),Ce(),function(e){Be=new ResizeObserver($t),Be.observe(document.body),Le.add(document.body),q("Attached ResizeObserver to body"),re={attachObserverToNonStaticElements:Ge,detachObservers:Ie(0,Be,Le)},re.attachObserverToNonStaticElements(e)}(e),function(e){const t=new IntersectionObserver(t=>e(t[0].isIntersecting),{threshold:0}),n=document.documentElement;t.observe(n),q("Attached VisibilityObserver to page")}(Ot)}(),ct(k(it)),Dt(v,"Init message from host page",void 0,void 0,`${t}:${He}`),document.title&&""!==document.title&&Ut(0,0,"title",document.title)}function ct(e){"complete"===document.readyState?j(e):z(document,"readystatechange",()=>ct(e))}function ut(){Qe=document.querySelectorAll(`[${r}]`),we=Qe.length>0}let dt=0;function ft(){const t=document.querySelectorAll(`*[${a}]`);ve=t.length>0,ve&&t.length!==dt&&(function(t){const n=1===t.length?"":"s";Q(`%c[${a}]%c found on %c${t.length}%c element${n}`,e.BOLD,e.NORMAL,e.BOLD,e.NORMAL)}(t),dt=t.length)}function mt(t,n){void 0!==n&&""!==n&&"null"!==n&&(document.body.style.setProperty(t,n),q(`Set body ${t}: %c${n}`,e.HIGHLIGHT))}function pt(e,t,n){if(""!==n)for(const e of document.querySelectorAll(n))e.toggleAttribute(t,!0)}function ht(){pt(0,r,_e),pt(0,a,ke)}function yt(e){({add(t){function n(){Dt(e.eventName,e.eventType)}M[t]=n,z(window,t,n,{passive:!0})},remove(e){const t=M[e];var n,o;delete M[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function gt(e,t,n,o){return t!==e&&(e in n||(Q(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in S)&&Y(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you ${ie?"remove this option.":"set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page."}`),e}function bt(){Me=gt(Me,A,Ct,"height")}function vt(){nt=gt(nt,L,Ht,"width")}function zt(){const e=document.querySelectorAll(`[${i}]`);Ue=Array.from(e).filter(e=>!e.closest(`[${a}]`)),ze=Ue.length>0}function wt(e){zt(),(ze||e)&&(Ue.length>1?q("Overflowed Elements:",...Ue):ze||q("Overflow removed"),Dt(h,"Overflow updated"))}function $t(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Dt(p,`Element resized <${function(e){switch(!0){case!R(e):return"";case R(e.id):return`${e.nodeName}#${e.id}`;case R(e.name):return`${e.nodeName} (${e.name}`;case R(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}function Ot(e){xe=!e,Dt(g,"Visibility changed")}const St=Se("Overflow"),It=Se("Overflow",!1),Mt=Se("Resize"),Tt=Se("Resize",!1);function Et(e){!function({addedMutations:e,removedMutations:t}){Z("contentMutated"),ht(),ut(),zt();let n=0,o=0,r=0,i=0;for(const e of t){const t=At(e)();o+=oe.detachObservers(t),i+=re.detachObservers(t)}for(const t of e){const e=At(t)();n+=oe.attachObservers(e),r+=re.attachObserverToNonStaticElements(e)}It(o),Tt(i),St(n),Mt(r),F()}(e),Dt(y,"Mutation Observed")}function jt(e){performance.mark(Ee);const t=x(e);let n=0,o=document.documentElement,r=we?0:document.documentElement.getBoundingClientRect().bottom;const i=we?Qe:ze?Ue:At(document)();for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return q(`${t} position calculated from:`,o),performance.mark(je,{detail:{hasTags:we,len:i.length,logging:Pe,Side:t}}),r}const kt=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],At=e=>()=>{if(!(e=>e.nodeType===Node.ELEMENT_NODE)(e))return[e];const t=["* ","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)"];return ft(),ve&&t.push(`not([${a}])`,`not([${a}] *)`),[e,...e.querySelectorAll(t.join(":"))]},Nt={height:0,width:0},xt={height:0,width:0},Rt=[e.HIGHLIGHT,e.FOREGROUND,e.HIGHLIGHT];function Pt(t){function n(){return xt[r]=i,Nt[r]=l,i}const o=t===Ct,r=o?"height":"width",i=t.boundingClientRect(),a=Math.ceil(i),s=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(t),c=`HTML: %c${i}px %cPage: %c${l}px`;let u=0;switch(!0){case!t.enabled():return l;case we:q("Found element with data-iframe-size attribute"),u=t.taggedElement();break;case!ze&&0===xt[r]&&0===Nt[r]:q(`Initial page size values: ${c}`,...Rt),u=n();break;case et&&i===xt[r]&&l===Nt[r]:q(`Size unchanged: ${c}`,...Rt),u=Math.max(i,l);break;case 0===i:q(`Page is hidden: ${c}`,...Rt),u=l;break;case!ze&&i!==xt[r]&&l<=Nt[r]:q(`New <html> size: ${c} `,...Rt),q(`Previous <html> size: %c${xt[r]}px`,e.HIGHLIGHT),u=n();break;case!o:u=t.taggedElement();break;case!ze&&i<xt[r]:q(`<html> size decreased: ${c}`,...Rt),u=n();break;case l===s||l===a:q(`<html> size equals page size: ${c}`,...Rt),u=n();break;case i>l:q(`Page size < <html> size: ${c}`,...Rt),u=n();break;case ze:q("Found element overflowing <html> "),u=t.taggedElement();break;default:q(`Using <html> size: ${c}`,...Rt),u=n()}return q(`Content ${r}: %c${u}px`,e.HIGHLIGHT),u+=function(t){const n=t.getOffset();return 0!==n&&q(`Page offsetSize: %c${n}px`,e.HIGHLIGHT),n}(t),u}const Ct={enabled:()=>ye,getOffset:()=>D,auto:()=>Pt(Ct),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,o)+parseInt(t.marginBottom,o)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Ct.bodyOffset(),custom:()=>w.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...kt(Ct)),min:()=>Math.min(...kt(Ct)),grow:()=>Ct.max(),lowestElement:()=>jt(s),taggedElement:()=>jt(s)},Ht={enabled:()=>ge,getOffset:()=>U,auto:()=>Pt(Ht),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>w.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...kt(Ht)),min:()=>Math.min(...kt(Ht)),rightMostElement:()=>jt(l),scroll:()=>Math.max(Ht.bodyScroll(),Ht.documentElementScroll()),taggedElement:()=>jt(l)},Lt=(e,t)=>!(Math.abs(e-t)<=Ke);function Bt(e,t){const n=e[t]();return e.enabled()&&void 0!==ae?function(e){const t=ae(e);if(void 0===t)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);return t}(n):n}let Gt=!1;const qt=k(()=>X(T(4)));let Wt=!1;const Dt=V((e,t,n,o,r)=>{if(performance.now(),Z(e),!0!==Gt){if(!se&&!(e in f))return q("Resizing disabled"),void F();if(xe){if(!0===Wt)return;Wt=!0}else Wt=!1,Gt=!0,requestAnimationFrame(()=>{Gt=!1}),function(e,t,n,o,r){const i=n??Bt(Ct,Me),a=o??Bt(Ht,nt);switch(ye&&Lt($e,i)||ge&&Lt(tt,a)?u:e){case v:case c:case u:$e=i,tt=a;case m:Ut($e,tt,e,r);break;case h:case y:case p:case g:_();break;default:_(),q("No change in content size detected")}}(e,0,n,o,r)}});function Ft(e){$e=Ct[Me](),tt=Ht[nt](),Ut($e,tt,e)}const Ut=V(function(t,n,o,r,i){He<-1||(Z(o),void 0!==i||(i=Xe),function(){const a=`${Ve}:${t}:${n}:${o}${void 0===r?"":`:${r}`}`;if(Je)try{window.parent.iframeParentListener(N+a)}catch(e){if(1!==He)throw e;return void qt()}else Ye.postMessage(N+a,i);q(`Sending message to parent page via ${Je?"sameOrigin":"postMessage"}: %c%c${a}`,e.ITALIC,e.HIGHLIGHT)}(),F())}),Vt=V(function(e){Z("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>Ut(0,0,`${e}Stop`),r={init:function(){if("loading"===document.readyState)return;const t=e.data.slice(13).split(":");Ye=e.source,K=e.origin,lt(t),be=!1,setTimeout(()=>{Ae=!1},128)},reset(){Ae||Ft("resetPage")},resize(){Dt("parentResize","Parent window requested size check")},moveToAnchor(){Ne.findTarget(a())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=a();at?j(at,n(e)):o("pageInfo")},parentInfo(){const e=(r=a(),t(n(r)));var r;st?j(st,e):o("parentInfo")},message(){const e=a();j(rt,n(e))}},i=()=>e.data.split("]")[1].split(":")[0],a=()=>e.data.slice(e.data.indexOf(":")+1),s=()=>e.data.split(":")[2]in{true:1,false:1};function l(){const t=i();Z(t),t in r?r[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||s()||Q(`Unexpected message (${e.data})`)}N===`${e.data}`.slice(0,13)&&function(){if(!1!==be)return s()?(J(i()),Z(v),void r.init()):void 0;l()}()});function Zt(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?Q("Already setup"):(window.iframeChildListener=e=>setTimeout(()=>Vt({data:e,sameOrigin:!0})),z(window,"message",Vt),z(window,"readystatechange",Zt),Zt())}();
package/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/child 5.5.1-beta.1 (esm) - 2025-07-31
4
+ * @module iframe-resizer/child 5.5.1 (esm) - 2025-08-01
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -17,5 +17,4 @@
17
17
  */
18
18
 
19
19
 
20
- import e,{NORMAL as t,HIGHLIGHT as n,FOREGROUND as o,ITALIC as r,BOLD as i}from"auto-console-group";const a="5.5.1-beta.1",s="iframeResizer",l=10,c="data-iframe-size",u="data-iframe-overflowed",d="data-iframe-ignore",m="bottom",f="right",p="autoResizeEnabled",h=Symbol("sizeChanged"),g="manualResize",y={},b="setOffsetSize",v="resizeObserver",z="overflowObserver",w="mutationObserver",$="visibilityObserver",S="none",O="No change in content size detected",M="init",k=(e,t,n,o)=>e.addEventListener(t,n,o||!1),E=e=>{if(!e)return"";let t=-559038744,n=1103547984;for(let o,r=0;r<e.length;r++)o=e.codePointAt(r),t=Math.imul(t^o,2246822519),n=Math.imul(n^o,3266489917);return t^=Math.imul(t^n>>>15,1935289751),n^=Math.imul(n^t>>>15,3405138345),t^=n>>>16,n^=t>>>16,(2097152*(n>>>0)+(t>>>11)).toString(36)},T=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),I=["spjluzl","rlf","clyzpvu"],j=["<yi>Puchspk Spjluzl Rlf</><iy><iy>","<yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm 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 <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>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.<iy><iy>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.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt."],A=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],x=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),P=e=>T(j[e]),N=e=>{const t=e[T(I[0])]||e[T(I[1])]||e[T(I[2])];if(!t)return-1;const n=t.split("-");let o=function(e=""){let t=-2;const n=E(T(e));return n in x&&(t=x[n]),t}(n[0]);return 0===o||(e=>e[2]===E(e[0]+e[1]))(n)||(o=-2),o},C=(e,...t)=>setTimeout(()=>e(...t),0),R=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},q=e=>e,B=e=>Math.round(1e3*e)/1e3,L=e=>e.charAt(0).toUpperCase()+e.slice(1),W=e=>""!=`${e}`&&void 0!==e;const F=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${L(t)}`)};let D=!0,V=s;var H;const U=(H=e,H?.__esModule?H.default:H)({label:`${s}(child)`});const Z=(J="log",(...e)=>!D||U[J](...e));var J;const _=Z;const{assert:Q,debug:Y,endAutoGroup:G,error:X,errorBoundary:K,event:ee,label:te,purge:ne,warn:oe}=U,re=e=>{return U.warn((t=q,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):t(e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(e));var t},ie=re,ae=(e=>(t,n="renamed to")=>(o,r,i="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${i}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))((e,t)=>re(t)),se=ae("Method"),le=ae("Method","replaced with"),ce=ae("Option"),ue=["min-height","min-width","max-height","max-width"],de=new Set,me=e=>e.tagName?e.tagName.toLowerCase():"unknown",fe=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),pe=(e,t)=>{return(n=fe(e,t))&&"0px"!==n&&"auto"!==n&&"none"!==n;var n};function he({href:e}){de.has(e)||(Z("Unable to access stylesheet:",e),de.add(e))}const ge=(e,t)=>function(e,t){const n=e.style[t];return n?{source:"an inline style attribute",value:n}:null}(e,t)||function(e,t){for(const n of document.styleSheets)try{for(const o of n.cssRules||[])if(o.selectorText&&e.matches(o.selectorText)){const e=o.style[t];if(e)return{source:"STYLE"===n.ownerNode.tagName?"an inline <style> block":`stylesheet (${n.href})`,value:e}}}catch(e){he(n)}return{source:"cross-origin stylesheet",value:fe(e,t)}}(e,t),ye=(e,t)=>{const{source:n,value:o}=ge(e,t),r=me(e);re(`The <b>${t}</> CSS property is set to <b>${o}</> on the <b><${r}></> element via ${n}. This may cause issues with the correct operation of <i>iframe-resizer</>.\n\nIf you wish to restrict the size of the iframe, then you should set this property on the iframe element itself, not the content inside it.`)};function be(){for(const e of[document.documentElement,document.body])for(const t of ue)Z(`Checking <${me(e)}> for blocking CSS: ${t}`),pe(e,t)&&ye(e,t)}const ve=e=>t=>void 0===t?void 0:e(t),ze=ve(e=>"true"===e),we=ve(Number),$e=new Set,Se=new Set,Oe=[];let Me,ke=1,Ee=!1,Te=0;const Ie=e=>{Z("Mutations:",e);for(const t of e){const{addedNodes:e,removedNodes:n}=t;for(const t of e)$e.add(t);for(const e of n)$e.has(e)?$e.delete(e):Se.add(e)}};function je(e){Oe.push(e),Ee||(Te=performance.now(),Ee=!0,requestAnimationFrame(Me))}function Ae(e){const t=new window.MutationObserver(je),r=document.querySelector("body"),i={attributes:!0,attributeFilter:[d,c],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return Me=(e=>()=>{const t=performance.now(),r=t-Te,i=16*ke+++2;if(r>i&&r<200)return ee("MutationDelay"),_("Update delayed due to heavy workload on the callStack"),_(`EventLoop busy time: %c${B(r)}ms %c> Max wait: %c${i-2}ms`,n,o,n),setTimeout(Me,16*ke),void(Te=t);ke=1,Oe.forEach(Ie),Oe.length=0,e({addedMutations:$e,removedMutations:Se}),Ee=!1,$e.clear(),Se.clear()})(e),t.observe(r,i),_("Attached MutationObserver to body"),t}const xe=(e,o=!0)=>r=>{r>0&&_(`${o?"At":"De"}tached ${e}Observer ${o?"to":"from"} %c${r}%c element${1===r?"":"s"}`,n,t)},Pe=(e,t,n)=>e=>{let o=0;for(const r of e)n.has(r)&&(t.unobserve(r),n.delete(r),o+=1);return o},Ne=e=>e.hidden||null===e.offsetParent||"none"===e.style.display,Ce=(e,t)=>{const n=t.side,o={root:t.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||q,i=(t=!1)=>e(t),a=(e,t)=>0===e||e>t[n],s=(e,t)=>e.toggleAttribute(u,t);const l=new IntersectionObserver(function(e){for(const t of e){const{boundingClientRect:e,rootBounds:o,target:r}=t,i=e[n],l=a(i,o)&&!Ne(r);s(r,l)}r(i)},o),c=new WeakSet;return{attachObservers:function(e){let t=0;for(const n of e){const e=n.nodeType===Node.ELEMENT_NODE,o=c.has(n);e&&(Q(!o,"Node already observed for overflow",n),o||(l.observe(n),c.add(n),t+=1))}return t},detachObservers:Pe(0,l,c)}},Re="--ifr-start",qe="--ifr-end",Be=[],Le=new WeakSet,We=e=>"object"==typeof e&&Le.add(e);let Fe={},De=0;function Ve(e){e.getEntries().forEach(e=>{if(e.name===qe){const{duration:t}=performance.measure("--ifr-measure",Re,qe);Fe=e.detail,Be.push(t),Be.length>100&&Be.shift()}})}function He(){_("Attached PerformanceObserver to page");new PerformanceObserver(Ve).observe({entryTypes:["mark"]}),We(document.documentElement),We(document.body),function(){const e=setInterval(()=>{if(Be.length<10)return;if(Fe.hasTags&&Fe.len<25)return;Be.sort();const t=Math.min(Be.reduce((e,t)=>e+t,0)/Be.length,Be[Math.floor(Be.length/2)]),n=B(t);n>De&&(De=n,ee("performanceObserver"),Z("Mean time:",B(Be[Math.floor(Be.length/2)])),Z("Median time:",B(Be.reduce((e,t)=>e+t,0)/Be.length)),Z("Average time:",n),Z("Max time:",B(Math.max(...Be)))),t<=4||(clearInterval(e),re(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${B(t)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${Fe.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))},5e3)}()}const Ue=xe("Resize"),Ze=new WeakSet;let Je;function _e(e){let t=0;for(const n of e){const e=n.nodeType===Node.ELEMENT_NODE,o=Ze.has(n);if(!e)continue;const r=getComputedStyle(n)?.position;""!==r&&"static"!==r&&(Q(!o,"Node already observed for resize",n),o||(Je.observe(n),Ze.add(n),t+=1))}Ue(t)}const Qe=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},Ye=Qe("function"),Ge=Qe("number"),Xe=Qe("string");"undefined"!=typeof window&&function(){const e={height:()=>(oe("Custom height calculation function not defined"),Ut.auto()),width:()=>(oe("Custom width calculation function not defined"),Zt.auto())},E={},j={},x="auto",q="[iFrameSizer]",H="scroll";let J,Q,X,ne,ae,ue,de,me,fe,pe,he,ge=!0,ye="",ve=0,$e="",Se="",Oe=!1,Me=!0,ke=!1,Ee=!0,Te=!1,Ie=!1,je=!1,Ne=1,Be=x,Le="",We=!0,Fe={},De=!1,Ve=!0,Ue=!1,Qe=0,Ke=!1,et=[],tt="",nt="child",ot=!1,rt="",it=[],at=window.parent,st="*",lt=0,ct=!1,ut=1,dt=H,mt=window,ft=()=>{oe("onMessage function not defined")},pt=()=>{},ht=null,gt=null;function yt(r){var i,u,d;!function(e){tt=e[0]??tt,ve=we(e[1])??ve,ke=ze(e[2])??ke,Ue=ze(e[3])??Ue,ge=ze(e[6])??ge,$e=e[7]??$e,Be=e[8]??Be,ye=e[9]??ye,Se=e[10]??Se,lt=we(e[11])??lt,Fe.enable=ze(e[12])??!1,nt=e[13]??nt,dt=e[14]??dt,Ke=ze(e[15])??Ke,X=we(e[16])??X,ne=we(e[17])??ne,Me=ze(e[18])??Me,J=e[19]??J,pe=e[20]??pe,Qe=we(e[21])??Qe,Ve=ze(e[23])??Ve}(r),V=(i={id:tt,enabled:Ue,expand:Ve}).id||s,U.label(`${V}`),U.expand(i.expand),D=i.enabled,Z(`Initialising iframe v${a} ${window.location.href}`),function(){function t(e){Z("Reading data from page:",Object.keys(e)),he=Ye(e,"onBeforeResize")??he,ft=Ye(e,"onMessage")??ft,pt=Ye(e,"onReady")??pt,"number"==typeof e?.offset&&(ce("offset","offsetSize"),Me&&(X=Ge(e,"offset")??X),ke&&(ne=Ge(e,"offset")??ne)),"number"==typeof e?.offsetSize&&(Me&&(X=Ge(e,"offsetSize")??X),ke&&(ne=Ge(e,"offsetSize")??ne)),Q=Xe(e,T(I[0]))??Q,Le=Xe(e,"ignoreSelector")??Le,rt=Xe(e,"sizeSelector")??rt,st=Xe(e,"targetOrigin")??st,Be=e?.heightCalculationMethod||Be,dt=e?.widthCalculationMethod||dt}function o(t,n){return"function"==typeof t&&(re(`<rb>Deprecated Option(${n}CalculationMethod)</>\n\nThe use of <b>${n}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),e[n]=t,t="custom"),t}if(1===Qe)return;const r=window.iframeResizer||window.iFrameResizer;"object"==typeof r&&(t(r),Be=o(Be,"height"),dt=o(dt,"width"),_(`Set targetOrigin for parent: %c${st}`,n))}(),Ot(),function(){try{ot=1===Qe||"iframeParentListener"in window.parent}catch(e){Z("Cross domain iframe detected")}}(),ke===Me&&(Oe=!0),function(){const e=Qe,n=N({key:J}),o=N({key:Q});if(Qe=Math.max(n,o),Qe<0){if(Qe=Math.min(n,o),re(`${P(Qe+2)}${P(2)}`),W(pe))throw P(Qe+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"")}else(!W(pe)||e>-1&&Qe>e)&&(sessionStorage.getItem("ifr")!==a&&function(e,n){console.info(`${V} %ciframe-resizer ${e}`,D||n<1?"font-weight: bold;":t)}(`v${a} (${(e=>T(A[e]))(Qe)})`,Qe),Qe<2&&ie(P(3)),sessionStorage.setItem("ifr",a))}(),pe&&""!==pe&&"false"!==pe?pe!==a&&re(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${pe} - Child page: ${a}.\n`):re("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),Et(),Tt(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach(n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(c,!0)});t("data-iframe-height"),t("data-iframe-width"),e&&re("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),"BackCompat"===document.compatMode&&re("<rb>Quirks Mode Detected</>\n\nThis iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.\n\nFor more information see <u>https://iframe-resizer.com/quirks-mode</>.\n"),vt(),Oe||be(),1!==Qe&&(mt.parentIframe=Object.freeze({autoResize:e=>(F(e,"boolean","parentIframe.autoResize(enable) enable"),!1===ke&&!1===Me?(ee(p),re(`Auto Resize can not be changed when <b>direction</> is set to '${S}'.`),!1):(!0===e&&!1===ge?(ge=!0,queueMicrotask(()=>Xt(p,"Auto Resize enabled"))):!1===e&&!0===ge&&(ge=!1),en(0,0,"autoResize",JSON.stringify(ge)),ge)),close(){en(0,0,"close")},getId:()=>tt,getOrigin:()=>(se("getOrigin()","getParentOrigin()"),ae),getParentOrigin:()=>ae,getPageInfo(e){if("function"==typeof e)return ht=e,en(0,0,"pageInfo"),void le("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");ht=null,en(0,0,"pageInfoStop")},getParentProps:e=>(F(e,"function","parentIframe.getParentProps(callback) callback"),gt=e,en(0,0,"parentInfo"),()=>{gt=null,en(0,0,"parentInfoStop")}),getParentProperties(e){se("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){F(e,"string","parentIframe.moveToAnchor(anchor) anchor"),Fe.findTarget(e)},reset(){!function(){const e=Be;Be=x,Z("Reset trigger event: %cparentIframe.reset",n),ct?Z("TriggerLock blocked calculation"):(ct=!0,Y("Trigger event lock on"),requestAnimationFrame(()=>{ct=!1,Y("Trigger event lock off")})),Kt("reset"),Be=e}()},setOffsetSize(e){F(e,"number","parentIframe.setOffsetSize(offset) offset"),X=e,ne=e,Xt(b,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){F(e,"number","parentIframe.scrollBy(x, y) x"),F(t,"number","parentIframe.scrollBy(x, y) y"),en(t,e,"scrollBy")},scrollTo(e,t){F(e,"number","parentIframe.scrollTo(x, y) x"),F(t,"number","parentIframe.scrollTo(x, y) y"),en(t,e,"scrollTo")},scrollToOffset(e,t){F(e,"number","parentIframe.scrollToOffset(x, y) x"),F(t,"number","parentIframe.scrollToOffset(x, y) y"),en(t,e,"scrollToOffset")},sendMessage(e,t){t&&F(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),en(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){Be=e,Et()},setWidthCalculationMethod(e){dt=e,Tt()},setTargetOrigin(e){F(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),Z(`Set targetOrigin: %c${e}`,n),st=e},resize(e,t){e&&F(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),t&&F(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),Xt(g,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){se("size()","resize()"),this.resize(e,t)}}),mt.parentIFrame=mt.parentIframe),function(){function e(e){en(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,o){Z(`Add event listener: %c${o}`,n),k(window.document,t,e)}!0===Ke&&(t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave"))}(),Fe=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function t(t){const n=t.getBoundingClientRect(),o=e();return{x:parseInt(n.left,l)+parseInt(o.x,l),y:parseInt(n.top,l)+parseInt(o.y,l)}}function r(e){function r(e){const r=t(e);Z(`Moving to in page link (%c#${i}%c) at x: %c${r.x}%c y: %c${r.y}`,n,o,n,o,n),en(r.y,r.x,"scrollToOffset")}const i=e.split("#")[1]||e,a=decodeURIComponent(i),s=document.getElementById(a)||document.getElementsByName(a)[0];void 0===s?(Z(`In page link (#${i}) not found in iFrame, so sending to parent`),en(0,0,"inPageLink",`#${i}`)):r(s)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&r(t)}function a(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&k(e,"click",t=>{t.preventDefault(),r(e.getAttribute("href"))})}function s(){k(window,"hashchange",i)}function c(){setTimeout(i,128)}function u(){Z("Setting up location.hash handlers"),a(),s(),c()}return Fe.enable?1===Qe?re("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):u():Z("In page linking not enabled"),{findTarget:r}}(),void 0===$e&&($e=`${ve}px`),$t("margin",(u="margin",(d=$e).includes("-")&&(oe(`Negative CSS value ignored for ${u}`),d=""),d)),$t("background",ye),$t("padding",Se),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),Oe||function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body),Z("Set HTML & body height: %cauto !important",n)}(),!0!==ge&&Z("Auto Resize disabled"),function(e){Mt({method:e,eventType:"After Print",eventName:"afterprint"}),Mt({method:e,eventType:"Before Print",eventName:"beforeprint"}),Mt({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}("add"),function(){const e=Wt(document.documentElement)();Z("Attaching Observers"),Ae(qt),function(e){const t={root:document.documentElement,side:Me?m:f};ue=Ce(jt,t),ue.attachObservers(e)}(e),He(),function(e){Je=new ResizeObserver(At),Je.observe(document.body),Ze.add(document.body),_("Attached ResizeObserver to body"),de={attachObserverToNonStaticElements:_e,detachObservers:Pe(0,Je,Ze)},de.attachObserverToNonStaticElements(e)}(e),function(e){const t=new IntersectionObserver(t=>e(t[0].isIntersecting),{threshold:0}),n=document.documentElement;t.observe(n),_("Attached VisibilityObserver to page")}(xt)}(),bt(R(pt)),Z("Initialization complete"),Xt(M,"Init message from host page",void 0,void 0,`${a}:${Qe}`),document.title&&""!==document.title&&en(0,0,"title",document.title)}function bt(e){"complete"===document.readyState?C(e):k(document,"readystatechange",()=>bt(e))}function vt(){it=document.querySelectorAll(`[${c}]`),je=it.length>0,Z(`Tagged elements found: %c${je}`,n)}let zt=0;function wt(){const e=document.querySelectorAll(`*[${d}]`);Te=e.length>0,Te&&e.length!==zt&&(function(e){const n=1===e.length?"":"s";oe(`%c[${d}]%c found on %c${e.length}%c element${n}`,i,t,i,t)}(e),zt=e.length)}function $t(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),_(`Set body ${e}: %c${t}`,n))}function St(e,t,o){if(""!==o){Z(`${e}: %c${o}`,n);for(const e of document.querySelectorAll(o))Z(`Applying ${t} to:`,e),e.toggleAttribute(t,!0)}}function Ot(){St("sizeSelector",c,rt),St("ignoreSelector",d,Le)}function Mt(e){({add(t){function n(){Xt(e.eventName,e.eventType)}j[t]=n,k(window,t,n,{passive:!0})},remove(e){const t=j[e];var n,o;delete j[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName),Z(`${L(e.method)} event listener: %c${e.eventType}`,n)}function kt(e,t,o,r){return t!==e&&(e in o||(oe(`${e} is not a valid option for ${r}CalculationMethod.`),e=t),e in E)&&re(`<rb>Deprecated ${r}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${r} calculation method. It is recommended that you ${pe?"remove this option.":"set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page."}`),Z(`Set ${r} calculation method: %c${e}`,n),e}function Et(){Be=kt(Be,x,Ut,"height")}function Tt(){dt=kt(dt,H,Zt,"width")}function It(){const e=document.querySelectorAll(`[${u}]`);et=Array.from(e).filter(e=>!e.closest(`[${d}]`)),Ie=et.length>0}function jt(e){It(),(Ie||e)&&(et.length>1?_("Overflowed Elements:",...et):Ie||_("Overflow removed"),Xt(z,"Overflow updated"))}function At(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Xt(v,`Element resized <${function(e){switch(!0){case!W(e):return"";case W(e.id):return`${e.nodeName}#${e.id}`;case W(e.name):return`${e.nodeName} (${e.name}`;case W(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}function xt(e){Z(`Visible: %c${e}`,n),De=!e,Xt($,"Visibility changed")}const Pt=xe("Overflow"),Nt=xe("Overflow",!1),Ct=xe("Resize"),Rt=xe("Resize",!1);function qt(e){!function({addedMutations:e,removedMutations:t}){ee("contentMutated"),Ot(),vt(),It();let n=0,o=0,r=0,i=0;for(const e of t){const t=Wt(e)();o+=ue.detachObservers(t),i+=de.detachObservers(t)}for(const t of e){const e=Wt(t)();n+=ue.attachObservers(e),r+=de.attachObserverToNonStaticElements(e)}Nt(o),Rt(i),Pt(n),Ct(r),G()}(e),Xt(w,"Mutation Observed")}function Bt(e){performance.mark(Re);const t=L(e);let n=0,o=document.documentElement,r=je?0:document.documentElement.getBoundingClientRect().bottom;const i=je?it:Ie?et:Wt(document)();for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return _(`${t} position calculated from:`,o),performance.mark(qe,{detail:{hasTags:je,len:i.length,logging:Ue,Side:t}}),r}const Lt=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],Wt=e=>()=>{if(Z("node:",e),Z("node type:",e?.nodeType),!(e=>e.nodeType===Node.ELEMENT_NODE)(e))return[e];const t=["* ","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)"];return wt(),Te&&t.push(`not([${d}])`,`not([${d}] *)`),[e,...e.querySelectorAll(t.join(":"))]},Ft={height:0,width:0},Dt={height:0,width:0},Vt=[n,o,n];function Ht(e){function t(){return Dt[r]=i,Ft[r]=l,i}const o=e===Ut,r=o?"height":"width",i=e.boundingClientRect(),a=Math.ceil(i),s=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),c=`HTML: %c${i}px %cPage: %c${l}px`;let u=0;switch(!0){case!e.enabled():return l;case je:_("Found element with data-iframe-size attribute"),u=e.taggedElement();break;case!Ie&&0===Dt[r]&&0===Ft[r]:_(`Initial page size values: ${c}`,...Vt),u=t();break;case ct&&i===Dt[r]&&l===Ft[r]:_(`Size unchanged: ${c}`,...Vt),u=Math.max(i,l);break;case 0===i:_(`Page is hidden: ${c}`,...Vt),u=l;break;case!Ie&&i!==Dt[r]&&l<=Ft[r]:_(`New <html> size: ${c} `,...Vt),_(`Previous <html> size: %c${Dt[r]}px`,n),u=t();break;case!o:u=e.taggedElement();break;case!Ie&&i<Dt[r]:_(`<html> size decreased: ${c}`,...Vt),u=t();break;case l===s||l===a:_(`<html> size equals page size: ${c}`,...Vt),u=t();break;case i>l:_(`Page size < <html> size: ${c}`,...Vt),u=t();break;case Ie:_("Found element overflowing <html> "),u=e.taggedElement();break;default:_(`Using <html> size: ${c}`,...Vt),u=t()}return _(`Content ${r}: %c${u}px`,n),u+=function(e){const t=e.getOffset();return 0!==t&&_(`Page offsetSize: %c${t}px`,n),t}(e),u}const Ut={enabled:()=>Me,getOffset:()=>X,auto:()=>Ht(Ut),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,l)+parseInt(t.marginBottom,l)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Ut.bodyOffset(),custom:()=>e.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...Lt(Ut)),min:()=>Math.min(...Lt(Ut)),grow:()=>Ut.max(),lowestElement:()=>Bt(m),taggedElement:()=>Bt(m)},Zt={enabled:()=>ke,getOffset:()=>ne,auto:()=>Ht(Zt),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>e.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...Lt(Zt)),min:()=>Math.min(...Lt(Zt)),rightMostElement:()=>Bt(f),scroll:()=>Math.max(Zt.bodyScroll(),Zt.documentElementScroll()),taggedElement:()=>Bt(f)},Jt=(e,t)=>!(Math.abs(e-t)<=lt);function _t(e,t){const n=e[t]();return e.enabled()&&void 0!==he?function(e){const t=he(e);if(void 0===t)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);return t}(n):n}let Qt=!1;const Yt=R(()=>ie(P(4)));let Gt=!1;const Xt=K((e,t,o,r,i)=>{if(fe=performance.now(),me=!0,ee(e),!0!==Qt){if(!ge&&!(e in y))return _("Resizing disabled"),void G();if(De){if(!0===Gt)return;return Z("Iframe hidden - Ignored resize request"),void(Gt=!0)}Gt=!1,Qt=!0,requestAnimationFrame(()=>{Qt=!1}),function(e,t,o,r,i){const a=o??_t(Ut,Be),s=r??_t(Zt,dt),l=Me&&Jt(Ne,a)||ke&&Jt(ut,s)?h:e;switch(Z(`Resize event: %c${t}`,n),l){case M:case p:case h:Ne=a,ut=s;case b:en(Ne,ut,e,i);break;case z:case w:case v:case $:Z(O);break;default:_(O)}me=!1}(e,t,o,r,i)}});function Kt(e){Ne=Ut[Be](),ut=Zt[dt](),en(Ne,ut,e)}const en=K(function(e,t,o,i,a){Qe<-1||(ee(o),void 0!==a?Z(`Message targetOrigin: %c${a}`,n):a=st,function(){const s=`${tt}:${e}:${t}:${o}${void 0===i?"":`:${i}`}`;if(ot)try{window.parent.iframeParentListener(q+s)}catch(e){if(1!==Qe)throw e;return void Yt()}else at.postMessage(q+s,a);me&&Z(function(){const e=B(performance.now()-fe);return o===M?`Initialised iFrame in %c${e}ms`:`Size calculated in %c${e}ms`}(),n),_(`Sending message to parent page via ${ot?"sameOrigin":"postMessage"}: %c%c${s}`,r,n)}(),G())}),tn=K(function(e){ee("onMessage");const{freeze:t}=Object,{parse:o}=JSON,r=e=>t(o(e)),i=e=>en(0,0,`${e}Stop`),a={init:function(){if("loading"===document.readyState)return void Z("Page not ready, ignoring init message");const t=e.data.slice(13).split(":");at=e.source,ae=e.origin,yt(t),Ee=!1,setTimeout(()=>{We=!1},128)},reset(){We?Z("Page reset ignored by init"):(Z("Page size reset by host page"),Kt("resetPage"))},resize(){Z("Resize requested by host page"),Xt("parentResize","Parent window requested size check")},moveToAnchor(){Fe.findTarget(l())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=l();Z("PageInfo received from parent:",r(e)),ht?C(ht,o(e)):i("pageInfo")},parentInfo(){const e=r(l());Z("ParentInfo received from parent:",e),gt?C(gt,e):i("parentInfo")},message(){const e=l();Z("onMessage called from parent:%c",n,r(e)),C(ft,o(e))}},s=()=>e.data.split("]")[1].split(":")[0],l=()=>e.data.slice(e.data.indexOf(":")+1),c=()=>e.data.split(":")[2]in{true:1,false:1};function u(){const t=s();ee(t),t in a?a[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||c()||oe(`Unexpected message (${e.data})`)}q===`${e.data}`.slice(0,13)&&function(){if(!1!==Ee)return c()?(te(s()),ee(M),void a.init()):void Z(`Ignored message of type "${s()}". Received before initialization.`);u()}()});function nn(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?oe("Already setup"):(window.iframeChildListener=e=>setTimeout(()=>tn({data:e,sameOrigin:!0})),k(window,"message",tn),k(window,"readystatechange",nn),nn())}();
21
- //# sourceMappingURL=index.esm.js.map
20
+ import e,{NORMAL as t,HIGHLIGHT as n,FOREGROUND as o,ITALIC as r,BOLD as i}from"auto-console-group";const a="5.5.1",s="iframeResizer",l=10,c="data-iframe-size",u="data-iframe-overflowed",d="data-iframe-ignore",f="bottom",m="right",p="autoResizeEnabled",h=Symbol("sizeChanged"),y="manualResize",g={},b="setOffsetSize",v="resizeObserver",z="overflowObserver",w="mutationObserver",$="visibilityObserver",S="none",O="init",M=(e,t,n,o)=>e.addEventListener(t,n,o||!1),E=e=>{if(!e)return"";let t=-559038744,n=1103547984;for(let o,r=0;r<e.length;r++)o=e.codePointAt(r),t=Math.imul(t^o,2246822519),n=Math.imul(n^o,3266489917);return t^=Math.imul(t^n>>>15,1935289751),n^=Math.imul(n^t>>>15,3405138345),t^=n>>>16,n^=t>>>16,(2097152*(n>>>0)+(t>>>11)).toString(36)},j=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),T=["spjluzl","rlf","clyzpvu"],k=["<yi>Puchspk Spjluzl Rlf</><iy><iy>","<yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm 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 <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>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.<iy><iy>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.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt."],I=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],A=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),x=e=>j(k[e]),N=e=>{const t=e[j(T[0])]||e[j(T[1])]||e[j(T[2])];if(!t)return-1;const n=t.split("-");let o=function(e=""){let t=-2;const n=E(j(e));return n in A&&(t=A[n]),t}(n[0]);return 0===o||(e=>e[2]===E(e[0]+e[1]))(n)||(o=-2),o},P=(e,...t)=>setTimeout(()=>e(...t),0),C=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},R=e=>e,B=e=>Math.round(1e3*e)/1e3,q=e=>e.charAt(0).toUpperCase()+e.slice(1),L=e=>""!=`${e}`&&void 0!==e;const W=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${q(t)}`)};let D=!0,F=s;var V;const H=(V=e,V?.__esModule?V.default:V)({label:`${s}(child)`});var U;const Z=(U="log",(...e)=>!D||H[U](...e));const{assert:J,debug:_,endAutoGroup:Q,error:Y,errorBoundary:G,event:X,label:K,purge:ee,warn:te}=H,ne=e=>{return H.warn((t=R,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):t(e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(e));var t},oe=ne,re=(e=>(t,n="renamed to")=>(o,r,i="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${i}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))((e,t)=>ne(t)),ie=re("Method"),ae=re("Method","replaced with"),se=re("Option"),le=["min-height","min-width","max-height","max-width"],ce=new Set,ue=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),de=(e,t)=>{return(n=ue(e,t))&&"0px"!==n&&"auto"!==n&&"none"!==n;var n};function fe({href:e}){ce.has(e)||ce.add(e)}const me=(e,t)=>function(e,t){const n=e.style[t];return n?{source:"an inline style attribute",value:n}:null}(e,t)||function(e,t){for(const n of document.styleSheets)try{for(const o of n.cssRules||[])if(o.selectorText&&e.matches(o.selectorText)){const e=o.style[t];if(e)return{source:"STYLE"===n.ownerNode.tagName?"an inline <style> block":`stylesheet (${n.href})`,value:e}}}catch(e){fe(n)}return{source:"cross-origin stylesheet",value:ue(e,t)}}(e,t),pe=(e,t)=>{const{source:n,value:o}=me(e,t),r=(e=>e.tagName?e.tagName.toLowerCase():"unknown")(e);ne(`The <b>${t}</> CSS property is set to <b>${o}</> on the <b><${r}></> element via ${n}. This may cause issues with the correct operation of <i>iframe-resizer</>.\n\nIf you wish to restrict the size of the iframe, then you should set this property on the iframe element itself, not the content inside it.`)};function he(){for(const e of[document.documentElement,document.body])for(const t of le)de(e,t)&&pe(e,t)}const ye=e=>t=>void 0===t?void 0:e(t),ge=ye(e=>"true"===e),be=ye(Number),ve=new Set,ze=new Set,we=[];let $e,Se=1,Oe=!1,Me=0;const Ee=e=>{for(const t of e){const{addedNodes:e,removedNodes:n}=t;for(const t of e)ve.add(t);for(const e of n)ve.has(e)?ve.delete(e):ze.add(e)}};function je(e){we.push(e),Oe||(Me=performance.now(),Oe=!0,requestAnimationFrame($e))}function Te(e){const t=new window.MutationObserver(je),r=document.querySelector("body"),i={attributes:!0,attributeFilter:[d,c],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return $e=(e=>()=>{const t=performance.now(),r=t-Me,i=16*Se+++2;if(r>i&&r<200)return X("MutationDelay"),Z("Update delayed due to heavy workload on the callStack"),Z(`EventLoop busy time: %c${B(r)}ms %c> Max wait: %c${i-2}ms`,n,o,n),setTimeout($e,16*Se),void(Me=t);Se=1,we.forEach(Ee),we.length=0,e({addedMutations:ve,removedMutations:ze}),Oe=!1,ve.clear(),ze.clear()})(e),t.observe(r,i),Z("Attached MutationObserver to body"),t}const ke=(e,o=!0)=>r=>{r>0&&Z(`${o?"At":"De"}tached ${e}Observer ${o?"to":"from"} %c${r}%c element${1===r?"":"s"}`,n,t)},Ie=(e,t,n)=>e=>{let o=0;for(const r of e)n.has(r)&&(t.unobserve(r),n.delete(r),o+=1);return o},Ae=e=>e.hidden||null===e.offsetParent||"none"===e.style.display,xe=(e,t)=>{const n=t.side,o={root:t.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||R,i=(t=!1)=>e(t),a=(e,t)=>0===e||e>t[n],s=(e,t)=>e.toggleAttribute(u,t);const l=new IntersectionObserver(function(e){for(const t of e){const{boundingClientRect:e,rootBounds:o,target:r}=t,i=e[n],l=a(i,o)&&!Ae(r);s(r,l)}r(i)},o),c=new WeakSet;return{attachObservers:function(e){let t=0;for(const n of e){const e=n.nodeType===Node.ELEMENT_NODE,o=c.has(n);e&&(J(!o,"Node already observed for overflow",n),o||(l.observe(n),c.add(n),t+=1))}return t},detachObservers:Ie(0,l,c)}},Ne="--ifr-start",Pe="--ifr-end",Ce=[],Re=new WeakSet,Be=e=>"object"==typeof e&&Re.add(e);let qe={},Le=0;function We(e){e.getEntries().forEach(e=>{if(e.name===Pe){const{duration:t}=performance.measure("--ifr-measure",Ne,Pe);qe=e.detail,Ce.push(t),Ce.length>100&&Ce.shift()}})}function De(){Z("Attached PerformanceObserver to page");new PerformanceObserver(We).observe({entryTypes:["mark"]}),Be(document.documentElement),Be(document.body),function(){const e=setInterval(()=>{if(Ce.length<10)return;if(qe.hasTags&&qe.len<25)return;Ce.sort();const t=Math.min(Ce.reduce((e,t)=>e+t,0)/Ce.length,Ce[Math.floor(Ce.length/2)]),n=B(t);n>Le&&(Le=n,X("performanceObserver")),t<=4||(clearInterval(e),ne(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${B(t)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${qe.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))},5e3)}()}const Fe=ke("Resize"),Ve=new WeakSet;let He;function Ue(e){let t=0;for(const n of e){const e=n.nodeType===Node.ELEMENT_NODE,o=Ve.has(n);if(!e)continue;const r=getComputedStyle(n)?.position;""!==r&&"static"!==r&&(J(!o,"Node already observed for resize",n),o||(He.observe(n),Ve.add(n),t+=1))}Fe(t)}const Ze=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},Je=Ze("function"),_e=Ze("number"),Qe=Ze("string");"undefined"!=typeof window&&function(){const e={height:()=>(te("Custom height calculation function not defined"),Wt.auto()),width:()=>(te("Custom width calculation function not defined"),Dt.auto())},E={},k={},A="auto",R="[iFrameSizer]",B="scroll";let V,U,J,_,Y,re,le,ce,ue,de=!0,fe="",me=0,pe="",ye="",ve=!1,ze=!0,we=!1,$e=!0,Se=!1,Oe=!1,Me=!1,Ee=1,je=A,Ae="",Ce=!0,Re={},Be=!1,qe=!0,Le=!1,We=0,Fe=!1,Ze=[],Ye="",Ge="child",Xe=!1,Ke="",et=[],tt=window.parent,nt="*",ot=0,rt=!1,it=1,at=B,st=window,lt=()=>{te("onMessage function not defined")},ct=()=>{},ut=null,dt=null;function ft(o){var r,i,u;!function(e){Ye=e[0]??Ye,me=be(e[1])??me,we=ge(e[2])??we,Le=ge(e[3])??Le,de=ge(e[6])??de,pe=e[7]??pe,je=e[8]??je,fe=e[9]??fe,ye=e[10]??ye,ot=be(e[11])??ot,Re.enable=ge(e[12])??!1,Ge=e[13]??Ge,at=e[14]??at,Fe=ge(e[15])??Fe,J=be(e[16])??J,_=be(e[17])??_,ze=ge(e[18])??ze,V=e[19]??V,ce=e[20]??ce,We=be(e[21])??We,qe=ge(e[23])??qe}(o),F=(r={id:Ye,enabled:Le,expand:qe}).id||s,H.label(`${F}`),H.expand(r.expand),D=r.enabled,function(){function t(e){ue=Je(e,"onBeforeResize")??ue,lt=Je(e,"onMessage")??lt,ct=Je(e,"onReady")??ct,"number"==typeof e?.offset&&(se("offset","offsetSize"),ze&&(J=_e(e,"offset")??J),we&&(_=_e(e,"offset")??_)),"number"==typeof e?.offsetSize&&(ze&&(J=_e(e,"offsetSize")??J),we&&(_=_e(e,"offsetSize")??_)),U=Qe(e,j(T[0]))??U,Ae=Qe(e,"ignoreSelector")??Ae,Ke=Qe(e,"sizeSelector")??Ke,nt=Qe(e,"targetOrigin")??nt,je=e?.heightCalculationMethod||je,at=e?.widthCalculationMethod||at}function o(t,n){return"function"==typeof t&&(ne(`<rb>Deprecated Option(${n}CalculationMethod)</>\n\nThe use of <b>${n}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),e[n]=t,t="custom"),t}if(1===We)return;const r=window.iframeResizer||window.iFrameResizer;"object"==typeof r&&(t(r),je=o(je,"height"),at=o(at,"width"),Z(`Set targetOrigin for parent: %c${nt}`,n))}(),vt(),function(){try{Xe=1===We||"iframeParentListener"in window.parent}catch(e){}}(),we===ze&&(ve=!0),function(){const e=We,n=N({key:V}),o=N({key:U});if(We=Math.max(n,o),We<0){if(We=Math.min(n,o),ee(),ne(`${x(We+2)}${x(2)}`),L(ce))throw x(We+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"")}else(!L(ce)||e>-1&&We>e)&&(sessionStorage.getItem("ifr")!==a&&function(e,n){console.info(`${F} %ciframe-resizer ${e}`,D||n<1?"font-weight: bold;":t)}(`v${a} (${(e=>j(I[e]))(We)})`,We),We<2&&oe(x(3)),sessionStorage.setItem("ifr",a))}(),ce&&""!==ce&&"false"!==ce?ce!==a&&ne(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ce} - Child page: ${a}.\n`):ne("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),$t(),St(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach(n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(c,!0)});t("data-iframe-height"),t("data-iframe-width"),e&&ne("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),"BackCompat"===document.compatMode&&ne("<rb>Quirks Mode Detected</>\n\nThis iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.\n\nFor more information see <u>https://iframe-resizer.com/quirks-mode</>.\n"),pt(),ve||he(),1!==We&&(st.parentIframe=Object.freeze({autoResize:e=>(W(e,"boolean","parentIframe.autoResize(enable) enable"),!1===we&&!1===ze?(X(p),ne(`Auto Resize can not be changed when <b>direction</> is set to '${S}'.`),!1):(!0===e&&!1===de?(de=!0,queueMicrotask(()=>Jt(p,"Auto Resize enabled"))):!1===e&&!0===de&&(de=!1),Qt(0,0,"autoResize",JSON.stringify(de)),de)),close(){Qt(0,0,"close")},getId:()=>Ye,getOrigin:()=>(ie("getOrigin()","getParentOrigin()"),Y),getParentOrigin:()=>Y,getPageInfo(e){if("function"==typeof e)return ut=e,Qt(0,0,"pageInfo"),void ae("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");ut=null,Qt(0,0,"pageInfoStop")},getParentProps:e=>(W(e,"function","parentIframe.getParentProps(callback) callback"),dt=e,Qt(0,0,"parentInfo"),()=>{dt=null,Qt(0,0,"parentInfoStop")}),getParentProperties(e){ie("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){W(e,"string","parentIframe.moveToAnchor(anchor) anchor"),Re.findTarget(e)},reset(){!function(){const e=je;je=A,rt||(rt=!0,requestAnimationFrame(()=>{rt=!1})),_t("reset"),je=e}()},setOffsetSize(e){W(e,"number","parentIframe.setOffsetSize(offset) offset"),J=e,_=e,Jt(b,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){W(e,"number","parentIframe.scrollBy(x, y) x"),W(t,"number","parentIframe.scrollBy(x, y) y"),Qt(t,e,"scrollBy")},scrollTo(e,t){W(e,"number","parentIframe.scrollTo(x, y) x"),W(t,"number","parentIframe.scrollTo(x, y) y"),Qt(t,e,"scrollTo")},scrollToOffset(e,t){W(e,"number","parentIframe.scrollToOffset(x, y) x"),W(t,"number","parentIframe.scrollToOffset(x, y) y"),Qt(t,e,"scrollToOffset")},sendMessage(e,t){t&&W(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),Qt(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){je=e,$t()},setWidthCalculationMethod(e){at=e,St()},setTargetOrigin(e){W(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),nt=e},resize(e,t){e&&W(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),t&&W(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),Jt(y,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){ie("size()","resize()"),this.resize(e,t)}}),st.parentIFrame=st.parentIframe),function(){function e(e){Qt(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){M(window.document,t,e)}!0===Fe&&(t("mouseenter"),t("mouseleave"))}(),Re=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function t(t){const n=t.getBoundingClientRect(),o=e();return{x:parseInt(n.left,l)+parseInt(o.x,l),y:parseInt(n.top,l)+parseInt(o.y,l)}}function n(e){function n(e){const n=t(e);Qt(n.y,n.x,"scrollToOffset")}const o=e.split("#")[1]||e,r=decodeURIComponent(o),i=document.getElementById(r)||document.getElementsByName(r)[0];void 0===i?Qt(0,0,"inPageLink",`#${o}`):n(i)}function o(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&n(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&M(e,"click",t=>{t.preventDefault(),n(e.getAttribute("href"))})}function i(){M(window,"hashchange",o)}function a(){setTimeout(o,128)}function s(){r(),i(),a()}return Re.enable&&(1===We?ne("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):s()),{findTarget:n}}(),void 0===pe&&(pe=`${me}px`),gt("margin",(i="margin",(u=pe).includes("-")&&(te(`Negative CSS value ignored for ${i}`),u=""),u)),gt("background",fe),gt("padding",ye),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),ve||function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}(),function(e){zt({method:e,eventType:"After Print",eventName:"afterprint"}),zt({method:e,eventType:"Before Print",eventName:"beforeprint"}),zt({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}("add"),function(){const e=Ct(document.documentElement)();Te(xt),function(e){const t={root:document.documentElement,side:ze?f:m};re=xe(Mt,t),re.attachObservers(e)}(e),De(),function(e){He=new ResizeObserver(Et),He.observe(document.body),Ve.add(document.body),Z("Attached ResizeObserver to body"),le={attachObserverToNonStaticElements:Ue,detachObservers:Ie(0,He,Ve)},le.attachObserverToNonStaticElements(e)}(e),function(e){const t=new IntersectionObserver(t=>e(t[0].isIntersecting),{threshold:0}),n=document.documentElement;t.observe(n),Z("Attached VisibilityObserver to page")}(jt)}(),mt(C(ct)),Jt(O,"Init message from host page",void 0,void 0,`${a}:${We}`),document.title&&""!==document.title&&Qt(0,0,"title",document.title)}function mt(e){"complete"===document.readyState?P(e):M(document,"readystatechange",()=>mt(e))}function pt(){et=document.querySelectorAll(`[${c}]`),Me=et.length>0}let ht=0;function yt(){const e=document.querySelectorAll(`*[${d}]`);Se=e.length>0,Se&&e.length!==ht&&(function(e){const n=1===e.length?"":"s";te(`%c[${d}]%c found on %c${e.length}%c element${n}`,i,t,i,t)}(e),ht=e.length)}function gt(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),Z(`Set body ${e}: %c${t}`,n))}function bt(e,t,n){if(""!==n)for(const e of document.querySelectorAll(n))e.toggleAttribute(t,!0)}function vt(){bt(0,c,Ke),bt(0,d,Ae)}function zt(e){({add(t){function n(){Jt(e.eventName,e.eventType)}k[t]=n,M(window,t,n,{passive:!0})},remove(e){const t=k[e];var n,o;delete k[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function wt(e,t,n,o){return t!==e&&(e in n||(te(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in E)&&ne(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you ${ce?"remove this option.":"set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page."}`),e}function $t(){je=wt(je,A,Wt,"height")}function St(){at=wt(at,B,Dt,"width")}function Ot(){const e=document.querySelectorAll(`[${u}]`);Ze=Array.from(e).filter(e=>!e.closest(`[${d}]`)),Oe=Ze.length>0}function Mt(e){Ot(),(Oe||e)&&(Ze.length>1?Z("Overflowed Elements:",...Ze):Oe||Z("Overflow removed"),Jt(z,"Overflow updated"))}function Et(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Jt(v,`Element resized <${function(e){switch(!0){case!L(e):return"";case L(e.id):return`${e.nodeName}#${e.id}`;case L(e.name):return`${e.nodeName} (${e.name}`;case L(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}function jt(e){Be=!e,Jt($,"Visibility changed")}const Tt=ke("Overflow"),kt=ke("Overflow",!1),It=ke("Resize"),At=ke("Resize",!1);function xt(e){!function({addedMutations:e,removedMutations:t}){X("contentMutated"),vt(),pt(),Ot();let n=0,o=0,r=0,i=0;for(const e of t){const t=Ct(e)();o+=re.detachObservers(t),i+=le.detachObservers(t)}for(const t of e){const e=Ct(t)();n+=re.attachObservers(e),r+=le.attachObserverToNonStaticElements(e)}kt(o),At(i),Tt(n),It(r),Q()}(e),Jt(w,"Mutation Observed")}function Nt(e){performance.mark(Ne);const t=q(e);let n=0,o=document.documentElement,r=Me?0:document.documentElement.getBoundingClientRect().bottom;const i=Me?et:Oe?Ze:Ct(document)();for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return Z(`${t} position calculated from:`,o),performance.mark(Pe,{detail:{hasTags:Me,len:i.length,logging:Le,Side:t}}),r}const Pt=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],Ct=e=>()=>{if(!(e=>e.nodeType===Node.ELEMENT_NODE)(e))return[e];const t=["* ","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)"];return yt(),Se&&t.push(`not([${d}])`,`not([${d}] *)`),[e,...e.querySelectorAll(t.join(":"))]},Rt={height:0,width:0},Bt={height:0,width:0},qt=[n,o,n];function Lt(e){function t(){return Bt[r]=i,Rt[r]=l,i}const o=e===Wt,r=o?"height":"width",i=e.boundingClientRect(),a=Math.ceil(i),s=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),c=`HTML: %c${i}px %cPage: %c${l}px`;let u=0;switch(!0){case!e.enabled():return l;case Me:Z("Found element with data-iframe-size attribute"),u=e.taggedElement();break;case!Oe&&0===Bt[r]&&0===Rt[r]:Z(`Initial page size values: ${c}`,...qt),u=t();break;case rt&&i===Bt[r]&&l===Rt[r]:Z(`Size unchanged: ${c}`,...qt),u=Math.max(i,l);break;case 0===i:Z(`Page is hidden: ${c}`,...qt),u=l;break;case!Oe&&i!==Bt[r]&&l<=Rt[r]:Z(`New <html> size: ${c} `,...qt),Z(`Previous <html> size: %c${Bt[r]}px`,n),u=t();break;case!o:u=e.taggedElement();break;case!Oe&&i<Bt[r]:Z(`<html> size decreased: ${c}`,...qt),u=t();break;case l===s||l===a:Z(`<html> size equals page size: ${c}`,...qt),u=t();break;case i>l:Z(`Page size < <html> size: ${c}`,...qt),u=t();break;case Oe:Z("Found element overflowing <html> "),u=e.taggedElement();break;default:Z(`Using <html> size: ${c}`,...qt),u=t()}return Z(`Content ${r}: %c${u}px`,n),u+=function(e){const t=e.getOffset();return 0!==t&&Z(`Page offsetSize: %c${t}px`,n),t}(e),u}const Wt={enabled:()=>ze,getOffset:()=>J,auto:()=>Lt(Wt),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,l)+parseInt(t.marginBottom,l)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Wt.bodyOffset(),custom:()=>e.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...Pt(Wt)),min:()=>Math.min(...Pt(Wt)),grow:()=>Wt.max(),lowestElement:()=>Nt(f),taggedElement:()=>Nt(f)},Dt={enabled:()=>we,getOffset:()=>_,auto:()=>Lt(Dt),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>e.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...Pt(Dt)),min:()=>Math.min(...Pt(Dt)),rightMostElement:()=>Nt(m),scroll:()=>Math.max(Dt.bodyScroll(),Dt.documentElementScroll()),taggedElement:()=>Nt(m)},Ft=(e,t)=>!(Math.abs(e-t)<=ot);function Vt(e,t){const n=e[t]();return e.enabled()&&void 0!==ue?function(e){const t=ue(e);if(void 0===t)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);return t}(n):n}let Ht=!1;const Ut=C(()=>oe(x(4)));let Zt=!1;const Jt=G((e,t,n,o,r)=>{if(performance.now(),X(e),!0!==Ht){if(!de&&!(e in g))return Z("Resizing disabled"),void Q();if(Be){if(!0===Zt)return;Zt=!0}else Zt=!1,Ht=!0,requestAnimationFrame(()=>{Ht=!1}),function(e,t,n,o,r){const i=n??Vt(Wt,je),a=o??Vt(Dt,at);switch(ze&&Ft(Ee,i)||we&&Ft(it,a)?h:e){case O:case p:case h:Ee=i,it=a;case b:Qt(Ee,it,e,r);break;case z:case w:case v:case $:ee();break;default:ee(),Z("No change in content size detected")}}(e,0,n,o,r)}});function _t(e){Ee=Wt[je](),it=Dt[at](),Qt(Ee,it,e)}const Qt=G(function(e,t,o,i,a){We<-1||(X(o),void 0!==a||(a=nt),function(){const s=`${Ye}:${e}:${t}:${o}${void 0===i?"":`:${i}`}`;if(Xe)try{window.parent.iframeParentListener(R+s)}catch(e){if(1!==We)throw e;return void Ut()}else tt.postMessage(R+s,a);Z(`Sending message to parent page via ${Xe?"sameOrigin":"postMessage"}: %c%c${s}`,r,n)}(),Q())}),Yt=G(function(e){X("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>Qt(0,0,`${e}Stop`),r={init:function(){if("loading"===document.readyState)return;const t=e.data.slice(13).split(":");tt=e.source,Y=e.origin,ft(t),$e=!1,setTimeout(()=>{Ce=!1},128)},reset(){Ce||_t("resetPage")},resize(){Jt("parentResize","Parent window requested size check")},moveToAnchor(){Re.findTarget(a())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=a();ut?P(ut,n(e)):o("pageInfo")},parentInfo(){const e=(r=a(),t(n(r)));var r;dt?P(dt,e):o("parentInfo")},message(){const e=a();P(lt,n(e))}},i=()=>e.data.split("]")[1].split(":")[0],a=()=>e.data.slice(e.data.indexOf(":")+1),s=()=>e.data.split(":")[2]in{true:1,false:1};function l(){const t=i();X(t),t in r?r[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||s()||te(`Unexpected message (${e.data})`)}R===`${e.data}`.slice(0,13)&&function(){if(!1!==$e)return s()?(K(i()),X(O),void r.init()):void 0;l()}()});function Gt(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?te("Already setup"):(window.iframeChildListener=e=>setTimeout(()=>Yt({data:e,sameOrigin:!0})),M(window,"message",Yt),M(window,"readystatechange",Gt),Gt())}();
package/index.umd.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/child 5.5.1-beta.1 (umd) - 2025-07-31
4
+ * @module iframe-resizer/child 5.5.1 (umd) - 2025-08-01
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -17,5 +17,4 @@
17
17
  */
18
18
 
19
19
 
20
- !function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";const e="font-weight: normal;",t="font-weight: bold;",n="font-style: italic;",o=e+n,r="default",i=Object.freeze({assert:!0,error:!0,warn:!0}),a={expand:!0,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},s={profile:0,profileEnd:0,timeStamp:0,trace:0},l=Object.assign(console);const{fromEntries:c,keys:u}=Object,d=e=>[e,l[e]],f=e=>t=>[t,function(n){e[t]=n}],m=(e,t)=>c(u(e).map(t));const p=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,h=p?"color: #A9C7FB;":"color: #135CD2;",g=p?"color: #E3E3E3;":"color: #1F1F1F;",y="5.5.1-beta.1",v="iframeResizer",b=10,z="data-iframe-size",w="data-iframe-overflowed",$="data-iframe-ignore",S="bottom",O="right",M="autoResizeEnabled",E=Symbol("sizeChanged"),k="manualResize",T={},j="setOffsetSize",I="resizeObserver",A="overflowObserver",x="mutationObserver",P="visibilityObserver",C="none",N="No change in content size detected",R="init",q=(e,t,n,o)=>e.addEventListener(t,n,o||!1),B=e=>{if(!e)return"";let t=-559038744,n=1103547984;for(let o,r=0;r<e.length;r++)o=e.codePointAt(r),t=Math.imul(t^o,2246822519),n=Math.imul(n^o,3266489917);return t^=Math.imul(t^n>>>15,1935289751),n^=Math.imul(n^t>>>15,3405138345),t^=n>>>16,n^=t>>>16,(2097152*(n>>>0)+(t>>>11)).toString(36)},L=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),F=["spjluzl","rlf","clyzpvu"],W=["<yi>Puchspk Spjluzl Rlf</><iy><iy>","<yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm 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 <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>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.<iy><iy>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.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt."],D=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],H=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),V=e=>L(W[e]),U=e=>{const t=e[L(F[0])]||e[L(F[1])]||e[L(F[2])];if(!t)return-1;const n=t.split("-");let o=function(e=""){let t=-2;const n=B(L(e));return n in H&&(t=H[n]),t}(n[0]);return 0===o||(e=>e[2]===B(e[0]+e[1]))(n)||(o=-2),o},Z=(e,...t)=>setTimeout(()=>e(...t),0),J=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},_=e=>e,Q=e=>Math.round(1e3*e)/1e3,G=e=>e.charAt(0).toUpperCase()+e.slice(1),Y=e=>""!=`${e}`&&void 0!==e;const X=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${G(t)}`)};let K=!0,ee=v;const te=(ne=function(n={}){const c={},u={},p=[],h={...a,expand:!n.collapsed||a.expanded,...n};let g="";function y(){p.length=0,g=""}function v(){delete h.event,y()}const b=()=>!!p.some(([e])=>e in i)||!!h.expand;function z(){if(0!==p.length){l[b()?"group":"groupCollapsed"](`%c${h.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(h)} %c${h.showTime?g:""}`,e,t,o);for(const[e,...t]of p)l.assert(e in l,`Unknown console method: ${e}`),e in l&&l[e](...t);l.groupEnd(),v()}else v()}function w(){""===g&&(g=function(){const e=new Date,t=(t,n)=>e[t]().toString().padStart(n,"0");return`@ ${t("getHours",2)}:${t("getMinutes",2)}:${t("getSeconds",2)}.${t("getMilliseconds",3)}`}())}function $(e,...t){0===p.length&&(w(),queueMicrotask(()=>queueMicrotask(z))),p.push([e,...t])}function S(e=r,...t){c[e]?$("log",`${e}: ${performance.now()-c[e]} ms`,...t):$("timeLog",e,...t)}return{...m(h,f(h)),...m(console,e=>[e,(...t)=>$(e,...t)]),...m(s,d),assert:function(e,...t){!0!==e&&$("assert",e,...t)},count:function(e=r){u[e]?u[e]+=1:u[e]=1,$("log",`${e}: ${u[e]}`)},countReset:function(e=r){delete u[e]},endAutoGroup:z,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;$("error",e),z()}return n},event:function(e){w(),h.event=e},purge:y,time:function(e=r){w(),c[e]=performance.now()},timeEnd:function(e=r){S(e),delete c[e]},timeLog:S,touch:w}},ne?.__esModule?ne.default:ne);var ne;const oe=te({label:`${v}(child)`});const re=(ie="log",(...e)=>!K||oe[ie](...e));var ie;const ae=re;const{assert:se,debug:le,endAutoGroup:ce,error:ue,errorBoundary:de,event:fe,label:me,purge:pe,warn:he}=oe,ge=e=>{return oe.warn((t=_,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):t(e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(e));var t},ye=ge,ve=(e=>(t,n="renamed to")=>(o,r,i="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${i}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))((e,t)=>ge(t)),be=ve("Method"),ze=ve("Method","replaced with"),we=ve("Option"),$e=["min-height","min-width","max-height","max-width"],Se=new Set,Oe=e=>e.tagName?e.tagName.toLowerCase():"unknown",Me=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),Ee=(e,t)=>{return(n=Me(e,t))&&"0px"!==n&&"auto"!==n&&"none"!==n;var n};function ke({href:e}){Se.has(e)||(re("Unable to access stylesheet:",e),Se.add(e))}const Te=(e,t)=>function(e,t){const n=e.style[t];return n?{source:"an inline style attribute",value:n}:null}(e,t)||function(e,t){for(const n of document.styleSheets)try{for(const o of n.cssRules||[])if(o.selectorText&&e.matches(o.selectorText)){const e=o.style[t];if(e)return{source:"STYLE"===n.ownerNode.tagName?"an inline <style> block":`stylesheet (${n.href})`,value:e}}}catch(e){ke(n)}return{source:"cross-origin stylesheet",value:Me(e,t)}}(e,t),je=(e,t)=>{const{source:n,value:o}=Te(e,t),r=Oe(e);ge(`The <b>${t}</> CSS property is set to <b>${o}</> on the <b><${r}></> element via ${n}. This may cause issues with the correct operation of <i>iframe-resizer</>.\n\nIf you wish to restrict the size of the iframe, then you should set this property on the iframe element itself, not the content inside it.`)};function Ie(){for(const e of[document.documentElement,document.body])for(const t of $e)re(`Checking <${Oe(e)}> for blocking CSS: ${t}`),Ee(e,t)&&je(e,t)}const Ae=e=>t=>void 0===t?void 0:e(t),xe=Ae(e=>"true"===e),Pe=Ae(Number),Ce=new Set,Ne=new Set,Re=[];let qe,Be=1,Le=!1,Fe=0;const We=e=>{re("Mutations:",e);for(const t of e){const{addedNodes:e,removedNodes:n}=t;for(const t of e)Ce.add(t);for(const e of n)Ce.has(e)?Ce.delete(e):Ne.add(e)}};function De(e){Re.push(e),Le||(Fe=performance.now(),Le=!0,requestAnimationFrame(qe))}function He(e){const t=new window.MutationObserver(De),n=document.querySelector("body"),o={attributes:!0,attributeFilter:[$,z],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return qe=(e=>()=>{const t=performance.now(),n=t-Fe,o=16*Be+++2;if(n>o&&n<200)return fe("MutationDelay"),ae("Update delayed due to heavy workload on the callStack"),ae(`EventLoop busy time: %c${Q(n)}ms %c> Max wait: %c${o-2}ms`,h,g,h),setTimeout(qe,16*Be),void(Fe=t);Be=1,Re.forEach(We),Re.length=0,e({addedMutations:Ce,removedMutations:Ne}),Le=!1,Ce.clear(),Ne.clear()})(e),t.observe(n,o),ae("Attached MutationObserver to body"),t}const Ve=(t,n=!0)=>o=>{o>0&&ae(`${n?"At":"De"}tached ${t}Observer ${n?"to":"from"} %c${o}%c element${1===o?"":"s"}`,h,e)},Ue=(e,t,n)=>e=>{let o=0;for(const r of e)n.has(r)&&(t.unobserve(r),n.delete(r),o+=1);return o},Ze=e=>e.hidden||null===e.offsetParent||"none"===e.style.display,Je=(e,t)=>{const n=t.side,o={root:t.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||_,i=(t=!1)=>e(t),a=(e,t)=>0===e||e>t[n],s=(e,t)=>e.toggleAttribute(w,t);const l=new IntersectionObserver(function(e){for(const t of e){const{boundingClientRect:e,rootBounds:o,target:r}=t,i=e[n],l=a(i,o)&&!Ze(r);s(r,l)}r(i)},o),c=new WeakSet;return{attachObservers:function(e){let t=0;for(const n of e){const e=n.nodeType===Node.ELEMENT_NODE,o=c.has(n);e&&(se(!o,"Node already observed for overflow",n),o||(l.observe(n),c.add(n),t+=1))}return t},detachObservers:Ue(0,l,c)}},_e="--ifr-start",Qe="--ifr-end",Ge=[],Ye=new WeakSet,Xe=e=>"object"==typeof e&&Ye.add(e);let Ke={},et=0;function tt(e){e.getEntries().forEach(e=>{if(e.name===Qe){const{duration:t}=performance.measure("--ifr-measure",_e,Qe);Ke=e.detail,Ge.push(t),Ge.length>100&&Ge.shift()}})}function nt(){ae("Attached PerformanceObserver to page");new PerformanceObserver(tt).observe({entryTypes:["mark"]}),Xe(document.documentElement),Xe(document.body),function(){const e=setInterval(()=>{if(Ge.length<10)return;if(Ke.hasTags&&Ke.len<25)return;Ge.sort();const t=Math.min(Ge.reduce((e,t)=>e+t,0)/Ge.length,Ge[Math.floor(Ge.length/2)]),n=Q(t);n>et&&(et=n,fe("performanceObserver"),re("Mean time:",Q(Ge[Math.floor(Ge.length/2)])),re("Median time:",Q(Ge.reduce((e,t)=>e+t,0)/Ge.length)),re("Average time:",n),re("Max time:",Q(Math.max(...Ge)))),t<=4||(clearInterval(e),ge(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${Q(t)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${Ke.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))},5e3)}()}const ot=Ve("Resize"),rt=new WeakSet;let it;function at(e){let t=0;for(const n of e){const e=n.nodeType===Node.ELEMENT_NODE,o=rt.has(n);if(!e)continue;const r=getComputedStyle(n)?.position;""!==r&&"static"!==r&&(se(!o,"Node already observed for resize",n),o||(it.observe(n),rt.add(n),t+=1))}ot(t)}const st=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},lt=st("function"),ct=st("number"),ut=st("string");"undefined"!=typeof window&&function(){const o={height:()=>(he("Custom height calculation function not defined"),Ut.auto()),width:()=>(he("Custom width calculation function not defined"),Zt.auto())},r={},i={},a="auto",s="[iFrameSizer]",l="scroll";let c,u,d,f,m,p,B,W,H,_,te,ne=!0,ie="",se=0,ue="",pe="",ve=!1,$e=!0,Se=!1,Oe=!0,Me=!1,Ee=!1,ke=!1,Te=1,je=a,Ae="",Ce=!0,Ne={},Re=!1,qe=!0,Be=!1,Le=0,Fe=!1,We=[],De="",Ze="child",Ge=!1,Ye="",Xe=[],Ke=window.parent,et="*",tt=0,ot=!1,st=1,dt=l,ft=window,mt=()=>{he("onMessage function not defined")},pt=()=>{},ht=null,gt=null;function yt(t){var n,r,i;!function(e){De=e[0]??De,se=Pe(e[1])??se,Se=xe(e[2])??Se,Be=xe(e[3])??Be,ne=xe(e[6])??ne,ue=e[7]??ue,je=e[8]??je,ie=e[9]??ie,pe=e[10]??pe,tt=Pe(e[11])??tt,Ne.enable=xe(e[12])??!1,Ze=e[13]??Ze,dt=e[14]??dt,Fe=xe(e[15])??Fe,d=Pe(e[16])??d,f=Pe(e[17])??f,$e=xe(e[18])??$e,c=e[19]??c,_=e[20]??_,Le=Pe(e[21])??Le,qe=xe(e[23])??qe}(t),ee=(n={id:De,enabled:Be,expand:qe}).id||v,oe.label(`${ee}`),oe.expand(n.expand),K=n.enabled,re(`Initialising iframe v${y} ${window.location.href}`),function(){function e(e){re("Reading data from page:",Object.keys(e)),te=lt(e,"onBeforeResize")??te,mt=lt(e,"onMessage")??mt,pt=lt(e,"onReady")??pt,"number"==typeof e?.offset&&(we("offset","offsetSize"),$e&&(d=ct(e,"offset")??d),Se&&(f=ct(e,"offset")??f)),"number"==typeof e?.offsetSize&&($e&&(d=ct(e,"offsetSize")??d),Se&&(f=ct(e,"offsetSize")??f)),u=ut(e,L(F[0]))??u,Ae=ut(e,"ignoreSelector")??Ae,Ye=ut(e,"sizeSelector")??Ye,et=ut(e,"targetOrigin")??et,je=e?.heightCalculationMethod||je,dt=e?.widthCalculationMethod||dt}function t(e,t){return"function"==typeof e&&(ge(`<rb>Deprecated Option(${t}CalculationMethod)</>\n\nThe use of <b>${t}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),o[t]=e,e="custom"),e}if(1===Le)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),je=t(je,"height"),dt=t(dt,"width"),ae(`Set targetOrigin for parent: %c${et}`,h))}(),Ot(),function(){try{Ge=1===Le||"iframeParentListener"in window.parent}catch(e){re("Cross domain iframe detected")}}(),Se===$e&&(ve=!0),function(){const t=Le,n=U({key:c}),o=U({key:u});if(Le=Math.max(n,o),Le<0){if(Le=Math.min(n,o),ge(`${V(Le+2)}${V(2)}`),Y(_))throw V(Le+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"")}else(!Y(_)||t>-1&&Le>t)&&(sessionStorage.getItem("ifr")!==y&&function(t,n){console.info(`${ee} %ciframe-resizer ${t}`,K||n<1?"font-weight: bold;":e)}(`v${y} (${(e=>L(D[e]))(Le)})`,Le),Le<2&&ye(V(3)),sessionStorage.setItem("ifr",y))}(),_&&""!==_&&"false"!==_?_!==y&&ge(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${_} - Child page: ${y}.\n`):ge("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),kt(),Tt(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach(n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(z,!0)});t("data-iframe-height"),t("data-iframe-width"),e&&ge("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),"BackCompat"===document.compatMode&&ge("<rb>Quirks Mode Detected</>\n\nThis iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.\n\nFor more information see <u>https://iframe-resizer.com/quirks-mode</>.\n"),bt(),ve||Ie(),1!==Le&&(ft.parentIframe=Object.freeze({autoResize:e=>(X(e,"boolean","parentIframe.autoResize(enable) enable"),!1===Se&&!1===$e?(fe(M),ge(`Auto Resize can not be changed when <b>direction</> is set to '${C}'.`),!1):(!0===e&&!1===ne?(ne=!0,queueMicrotask(()=>Xt(M,"Auto Resize enabled"))):!1===e&&!0===ne&&(ne=!1),en(0,0,"autoResize",JSON.stringify(ne)),ne)),close(){en(0,0,"close")},getId:()=>De,getOrigin:()=>(be("getOrigin()","getParentOrigin()"),m),getParentOrigin:()=>m,getPageInfo(e){if("function"==typeof e)return ht=e,en(0,0,"pageInfo"),void ze("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");ht=null,en(0,0,"pageInfoStop")},getParentProps:e=>(X(e,"function","parentIframe.getParentProps(callback) callback"),gt=e,en(0,0,"parentInfo"),()=>{gt=null,en(0,0,"parentInfoStop")}),getParentProperties(e){be("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){X(e,"string","parentIframe.moveToAnchor(anchor) anchor"),Ne.findTarget(e)},reset(){!function(){const e=je;je=a,re("Reset trigger event: %cparentIframe.reset",h),ot?re("TriggerLock blocked calculation"):(ot=!0,le("Trigger event lock on"),requestAnimationFrame(()=>{ot=!1,le("Trigger event lock off")})),Kt("reset"),je=e}()},setOffsetSize(e){X(e,"number","parentIframe.setOffsetSize(offset) offset"),d=e,f=e,Xt(j,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){X(e,"number","parentIframe.scrollBy(x, y) x"),X(t,"number","parentIframe.scrollBy(x, y) y"),en(t,e,"scrollBy")},scrollTo(e,t){X(e,"number","parentIframe.scrollTo(x, y) x"),X(t,"number","parentIframe.scrollTo(x, y) y"),en(t,e,"scrollTo")},scrollToOffset(e,t){X(e,"number","parentIframe.scrollToOffset(x, y) x"),X(t,"number","parentIframe.scrollToOffset(x, y) y"),en(t,e,"scrollToOffset")},sendMessage(e,t){t&&X(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),en(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){je=e,kt()},setWidthCalculationMethod(e){dt=e,Tt()},setTargetOrigin(e){X(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),re(`Set targetOrigin: %c${e}`,h),et=e},resize(e,t){e&&X(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),t&&X(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),Xt(k,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){be("size()","resize()"),this.resize(e,t)}}),ft.parentIFrame=ft.parentIframe),function(){function e(e){en(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){re(`Add event listener: %c${n}`,h),q(window.document,t,e)}!0===Fe&&(t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave"))}(),Ne=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function t(t){const n=t.getBoundingClientRect(),o=e();return{x:parseInt(n.left,b)+parseInt(o.x,b),y:parseInt(n.top,b)+parseInt(o.y,b)}}function n(e){function n(e){const n=t(e);re(`Moving to in page link (%c#${o}%c) at x: %c${n.x}%c y: %c${n.y}`,h,g,h,g,h),en(n.y,n.x,"scrollToOffset")}const o=e.split("#")[1]||e,r=decodeURIComponent(o),i=document.getElementById(r)||document.getElementsByName(r)[0];void 0===i?(re(`In page link (#${o}) not found in iFrame, so sending to parent`),en(0,0,"inPageLink",`#${o}`)):n(i)}function o(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&n(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&q(e,"click",t=>{t.preventDefault(),n(e.getAttribute("href"))})}function i(){q(window,"hashchange",o)}function a(){setTimeout(o,128)}function s(){re("Setting up location.hash handlers"),r(),i(),a()}return Ne.enable?1===Le?ge("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):s():re("In page linking not enabled"),{findTarget:n}}(),void 0===ue&&(ue=`${se}px`),$t("margin",(r="margin",(i=ue).includes("-")&&(he(`Negative CSS value ignored for ${r}`),i=""),i)),$t("background",ie),$t("padding",pe),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),ve||function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body),re("Set HTML & body height: %cauto !important",h)}(),!0!==ne&&re("Auto Resize disabled"),function(e){Mt({method:e,eventType:"After Print",eventName:"afterprint"}),Mt({method:e,eventType:"Before Print",eventName:"beforeprint"}),Mt({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}("add"),function(){const e=Ft(document.documentElement)();re("Attaching Observers"),He(qt),function(e){const t={root:document.documentElement,side:$e?S:O};p=Je(It,t),p.attachObservers(e)}(e),nt(),function(e){it=new ResizeObserver(At),it.observe(document.body),rt.add(document.body),ae("Attached ResizeObserver to body"),B={attachObserverToNonStaticElements:at,detachObservers:Ue(0,it,rt)},B.attachObserverToNonStaticElements(e)}(e),function(e){const t=new IntersectionObserver(t=>e(t[0].isIntersecting),{threshold:0}),n=document.documentElement;t.observe(n),ae("Attached VisibilityObserver to page")}(xt)}(),vt(J(pt)),re("Initialization complete"),Xt(R,"Init message from host page",void 0,void 0,`${y}:${Le}`),document.title&&""!==document.title&&en(0,0,"title",document.title)}function vt(e){"complete"===document.readyState?Z(e):q(document,"readystatechange",()=>vt(e))}function bt(){Xe=document.querySelectorAll(`[${z}]`),ke=Xe.length>0,re(`Tagged elements found: %c${ke}`,h)}let zt=0;function wt(){const n=document.querySelectorAll(`*[${$}]`);Me=n.length>0,Me&&n.length!==zt&&(function(n){const o=1===n.length?"":"s";he(`%c[${$}]%c found on %c${n.length}%c element${o}`,t,e,t,e)}(n),zt=n.length)}function $t(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),ae(`Set body ${e}: %c${t}`,h))}function St(e,t,n){if(""!==n){re(`${e}: %c${n}`,h);for(const e of document.querySelectorAll(n))re(`Applying ${t} to:`,e),e.toggleAttribute(t,!0)}}function Ot(){St("sizeSelector",z,Ye),St("ignoreSelector",$,Ae)}function Mt(e){({add(t){function n(){Xt(e.eventName,e.eventType)}i[t]=n,q(window,t,n,{passive:!0})},remove(e){const t=i[e];var n,o;delete i[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName),re(`${G(e.method)} event listener: %c${e.eventType}`,h)}function Et(e,t,n,o){return t!==e&&(e in n||(he(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in r)&&ge(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you ${_?"remove this option.":"set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page."}`),re(`Set ${o} calculation method: %c${e}`,h),e}function kt(){je=Et(je,a,Ut,"height")}function Tt(){dt=Et(dt,l,Zt,"width")}function jt(){const e=document.querySelectorAll(`[${w}]`);We=Array.from(e).filter(e=>!e.closest(`[${$}]`)),Ee=We.length>0}function It(e){jt(),(Ee||e)&&(We.length>1?ae("Overflowed Elements:",...We):Ee||ae("Overflow removed"),Xt(A,"Overflow updated"))}function At(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Xt(I,`Element resized <${function(e){switch(!0){case!Y(e):return"";case Y(e.id):return`${e.nodeName}#${e.id}`;case Y(e.name):return`${e.nodeName} (${e.name}`;case Y(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}function xt(e){re(`Visible: %c${e}`,h),Re=!e,Xt(P,"Visibility changed")}const Pt=Ve("Overflow"),Ct=Ve("Overflow",!1),Nt=Ve("Resize"),Rt=Ve("Resize",!1);function qt(e){!function({addedMutations:e,removedMutations:t}){fe("contentMutated"),Ot(),bt(),jt();let n=0,o=0,r=0,i=0;for(const e of t){const t=Ft(e)();o+=p.detachObservers(t),i+=B.detachObservers(t)}for(const t of e){const e=Ft(t)();n+=p.attachObservers(e),r+=B.attachObserverToNonStaticElements(e)}Ct(o),Rt(i),Pt(n),Nt(r),ce()}(e),Xt(x,"Mutation Observed")}function Bt(e){performance.mark(_e);const t=G(e);let n=0,o=document.documentElement,r=ke?0:document.documentElement.getBoundingClientRect().bottom;const i=ke?Xe:Ee?We:Ft(document)();for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return ae(`${t} position calculated from:`,o),performance.mark(Qe,{detail:{hasTags:ke,len:i.length,logging:Be,Side:t}}),r}const Lt=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],Ft=e=>()=>{if(re("node:",e),re("node type:",e?.nodeType),!(e=>e.nodeType===Node.ELEMENT_NODE)(e))return[e];const t=["* ","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)"];return wt(),Me&&t.push(`not([${$}])`,`not([${$}] *)`),[e,...e.querySelectorAll(t.join(":"))]},Wt={height:0,width:0},Dt={height:0,width:0},Ht=[h,g,h];function Vt(e){function t(){return Dt[o]=r,Wt[o]=s,r}const n=e===Ut,o=n?"height":"width",r=e.boundingClientRect(),i=Math.ceil(r),a=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),l=`HTML: %c${r}px %cPage: %c${s}px`;let c=0;switch(!0){case!e.enabled():return s;case ke:ae("Found element with data-iframe-size attribute"),c=e.taggedElement();break;case!Ee&&0===Dt[o]&&0===Wt[o]:ae(`Initial page size values: ${l}`,...Ht),c=t();break;case ot&&r===Dt[o]&&s===Wt[o]:ae(`Size unchanged: ${l}`,...Ht),c=Math.max(r,s);break;case 0===r:ae(`Page is hidden: ${l}`,...Ht),c=s;break;case!Ee&&r!==Dt[o]&&s<=Wt[o]:ae(`New <html> size: ${l} `,...Ht),ae(`Previous <html> size: %c${Dt[o]}px`,h),c=t();break;case!n:c=e.taggedElement();break;case!Ee&&r<Dt[o]:ae(`<html> size decreased: ${l}`,...Ht),c=t();break;case s===a||s===i:ae(`<html> size equals page size: ${l}`,...Ht),c=t();break;case r>s:ae(`Page size < <html> size: ${l}`,...Ht),c=t();break;case Ee:ae("Found element overflowing <html> "),c=e.taggedElement();break;default:ae(`Using <html> size: ${l}`,...Ht),c=t()}return ae(`Content ${o}: %c${c}px`,h),c+=function(e){const t=e.getOffset();return 0!==t&&ae(`Page offsetSize: %c${t}px`,h),t}(e),c}const Ut={enabled:()=>$e,getOffset:()=>d,auto:()=>Vt(Ut),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,b)+parseInt(t.marginBottom,b)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Ut.bodyOffset(),custom:()=>o.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...Lt(Ut)),min:()=>Math.min(...Lt(Ut)),grow:()=>Ut.max(),lowestElement:()=>Bt(S),taggedElement:()=>Bt(S)},Zt={enabled:()=>Se,getOffset:()=>f,auto:()=>Vt(Zt),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>o.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...Lt(Zt)),min:()=>Math.min(...Lt(Zt)),rightMostElement:()=>Bt(O),scroll:()=>Math.max(Zt.bodyScroll(),Zt.documentElementScroll()),taggedElement:()=>Bt(O)},Jt=(e,t)=>!(Math.abs(e-t)<=tt);function _t(e,t){const n=e[t]();return e.enabled()&&void 0!==te?function(e){const t=te(e);if(void 0===t)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);return t}(n):n}let Qt=!1;const Gt=J(()=>ye(V(4)));let Yt=!1;const Xt=de((e,t,n,o,r)=>{if(H=performance.now(),W=!0,fe(e),!0!==Qt){if(!ne&&!(e in T))return ae("Resizing disabled"),void ce();if(Re){if(!0===Yt)return;return re("Iframe hidden - Ignored resize request"),void(Yt=!0)}Yt=!1,Qt=!0,requestAnimationFrame(()=>{Qt=!1}),function(e,t,n,o,r){const i=n??_t(Ut,je),a=o??_t(Zt,dt),s=$e&&Jt(Te,i)||Se&&Jt(st,a)?E:e;switch(re(`Resize event: %c${t}`,h),s){case R:case M:case E:Te=i,st=a;case j:en(Te,st,e,r);break;case A:case x:case I:case P:re(N);break;default:ae(N)}W=!1}(e,t,n,o,r)}});function Kt(e){Te=Ut[je](),st=Zt[dt](),en(Te,st,e)}const en=de(function(e,t,o,r,i){Le<-1||(fe(o),void 0!==i?re(`Message targetOrigin: %c${i}`,h):i=et,function(){const a=`${De}:${e}:${t}:${o}${void 0===r?"":`:${r}`}`;if(Ge)try{window.parent.iframeParentListener(s+a)}catch(e){if(1!==Le)throw e;return void Gt()}else Ke.postMessage(s+a,i);W&&re(function(){const e=Q(performance.now()-H);return o===R?`Initialised iFrame in %c${e}ms`:`Size calculated in %c${e}ms`}(),h),ae(`Sending message to parent page via ${Ge?"sameOrigin":"postMessage"}: %c%c${a}`,n,h)}(),ce())}),tn=de(function(e){fe("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>t(n(e)),r=e=>en(0,0,`${e}Stop`),i={init:function(){if("loading"===document.readyState)return void re("Page not ready, ignoring init message");const t=e.data.slice(13).split(":");Ke=e.source,m=e.origin,yt(t),Oe=!1,setTimeout(()=>{Ce=!1},128)},reset(){Ce?re("Page reset ignored by init"):(re("Page size reset by host page"),Kt("resetPage"))},resize(){re("Resize requested by host page"),Xt("parentResize","Parent window requested size check")},moveToAnchor(){Ne.findTarget(l())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=l();re("PageInfo received from parent:",o(e)),ht?Z(ht,n(e)):r("pageInfo")},parentInfo(){const e=o(l());re("ParentInfo received from parent:",e),gt?Z(gt,e):r("parentInfo")},message(){const e=l();re("onMessage called from parent:%c",h,o(e)),Z(mt,n(e))}},a=()=>e.data.split("]")[1].split(":")[0],l=()=>e.data.slice(e.data.indexOf(":")+1),c=()=>e.data.split(":")[2]in{true:1,false:1};function u(){const t=a();fe(t),t in i?i[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||c()||he(`Unexpected message (${e.data})`)}s===`${e.data}`.slice(0,13)&&function(){if(!1!==Oe)return c()?(me(a()),fe(R),void i.init()):void re(`Ignored message of type "${a()}". Received before initialization.`);u()}()});function nn(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?he("Already setup"):(window.iframeChildListener=e=>setTimeout(()=>tn({data:e,sameOrigin:!0})),q(window,"message",tn),q(window,"readystatechange",nn),nn())}()});
21
- //# sourceMappingURL=index.umd.js.map
20
+ !function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";const e="font-weight: normal;",t="font-weight: bold;",n="font-style: italic;",o=e+n,r="default",i=Object.freeze({assert:!0,error:!0,warn:!0}),a={expand:!0,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},s={profile:0,profileEnd:0,timeStamp:0,trace:0},l=Object.assign(console);const{fromEntries:c,keys:u}=Object,d=e=>[e,l[e]],f=e=>t=>[t,function(n){e[t]=n}],m=(e,t)=>c(u(e).map(t));const p=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,h=p?"color: #A9C7FB;":"color: #135CD2;",g=p?"color: #E3E3E3;":"color: #1F1F1F;",y="5.5.1",v="iframeResizer",b=10,z="data-iframe-size",w="data-iframe-overflowed",$="data-iframe-ignore",S="bottom",O="right",E="autoResizeEnabled",M=Symbol("sizeChanged"),j="manualResize",k={},T="setOffsetSize",x="resizeObserver",A="overflowObserver",I="mutationObserver",C="visibilityObserver",N="none",P="init",R=(e,t,n,o)=>e.addEventListener(t,n,o||!1),B=e=>{if(!e)return"";let t=-559038744,n=1103547984;for(let o,r=0;r<e.length;r++)o=e.codePointAt(r),t=Math.imul(t^o,2246822519),n=Math.imul(n^o,3266489917);return t^=Math.imul(t^n>>>15,1935289751),n^=Math.imul(n^t>>>15,3405138345),t^=n>>>16,n^=t>>>16,(2097152*(n>>>0)+(t>>>11)).toString(36)},q=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),L=["spjluzl","rlf","clyzpvu"],W=["<yi>Puchspk Spjluzl Rlf</><iy><iy>","<yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm 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 <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>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.<iy><iy>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.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt."],F=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],D=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),H=e=>q(W[e]),V=e=>{const t=e[q(L[0])]||e[q(L[1])]||e[q(L[2])];if(!t)return-1;const n=t.split("-");let o=function(e=""){let t=-2;const n=B(q(e));return n in D&&(t=D[n]),t}(n[0]);return 0===o||(e=>e[2]===B(e[0]+e[1]))(n)||(o=-2),o},U=(e,...t)=>setTimeout(()=>e(...t),0),Z=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},J=e=>e,_=e=>Math.round(1e3*e)/1e3,Q=e=>e.charAt(0).toUpperCase()+e.slice(1),G=e=>""!=`${e}`&&void 0!==e;const Y=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${Q(t)}`)};let X=!0,K=v;const ee=(te=function(n={}){const c={},u={},p=[],h={...a,expand:!n.collapsed||a.expanded,...n};let g="";function y(){p.length=0,g=""}function v(){delete h.event,y()}const b=()=>!!p.some(([e])=>e in i)||!!h.expand;function z(){if(0!==p.length){l[b()?"group":"groupCollapsed"](`%c${h.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(h)} %c${h.showTime?g:""}`,e,t,o);for(const[e,...t]of p)l.assert(e in l,`Unknown console method: ${e}`),e in l&&l[e](...t);l.groupEnd(),v()}else v()}function w(){""===g&&(g=function(){const e=new Date,t=(t,n)=>e[t]().toString().padStart(n,"0");return`@ ${t("getHours",2)}:${t("getMinutes",2)}:${t("getSeconds",2)}.${t("getMilliseconds",3)}`}())}function $(e,...t){0===p.length&&(w(),queueMicrotask(()=>queueMicrotask(z))),p.push([e,...t])}function S(e=r,...t){c[e]?$("log",`${e}: ${performance.now()-c[e]} ms`,...t):$("timeLog",e,...t)}return{...m(h,f(h)),...m(console,e=>[e,(...t)=>$(e,...t)]),...m(s,d),assert:function(e,...t){!0!==e&&$("assert",e,...t)},count:function(e=r){u[e]?u[e]+=1:u[e]=1,$("log",`${e}: ${u[e]}`)},countReset:function(e=r){delete u[e]},endAutoGroup:z,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;$("error",e),z()}return n},event:function(e){w(),h.event=e},purge:y,time:function(e=r){w(),c[e]=performance.now()},timeEnd:function(e=r){S(e),delete c[e]},timeLog:S,touch:w}},te?.__esModule?te.default:te);var te;const ne=ee({label:`${v}(child)`});var oe;const re=(oe="log",(...e)=>!X||ne[oe](...e));const{assert:ie,debug:ae,endAutoGroup:se,error:le,errorBoundary:ce,event:ue,label:de,purge:fe,warn:me}=ne,pe=e=>{return ne.warn((t=J,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):t(e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(e));var t},he=pe,ge=(e=>(t,n="renamed to")=>(o,r,i="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${i}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))((e,t)=>pe(t)),ye=ge("Method"),ve=ge("Method","replaced with"),be=ge("Option"),ze=["min-height","min-width","max-height","max-width"],we=new Set,$e=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),Se=(e,t)=>{return(n=$e(e,t))&&"0px"!==n&&"auto"!==n&&"none"!==n;var n};function Oe({href:e}){we.has(e)||we.add(e)}const Ee=(e,t)=>function(e,t){const n=e.style[t];return n?{source:"an inline style attribute",value:n}:null}(e,t)||function(e,t){for(const n of document.styleSheets)try{for(const o of n.cssRules||[])if(o.selectorText&&e.matches(o.selectorText)){const e=o.style[t];if(e)return{source:"STYLE"===n.ownerNode.tagName?"an inline <style> block":`stylesheet (${n.href})`,value:e}}}catch(e){Oe(n)}return{source:"cross-origin stylesheet",value:$e(e,t)}}(e,t),Me=(e,t)=>{const{source:n,value:o}=Ee(e,t),r=(e=>e.tagName?e.tagName.toLowerCase():"unknown")(e);pe(`The <b>${t}</> CSS property is set to <b>${o}</> on the <b><${r}></> element via ${n}. This may cause issues with the correct operation of <i>iframe-resizer</>.\n\nIf you wish to restrict the size of the iframe, then you should set this property on the iframe element itself, not the content inside it.`)};function je(){for(const e of[document.documentElement,document.body])for(const t of ze)Se(e,t)&&Me(e,t)}const ke=e=>t=>void 0===t?void 0:e(t),Te=ke(e=>"true"===e),xe=ke(Number),Ae=new Set,Ie=new Set,Ce=[];let Ne,Pe=1,Re=!1,Be=0;const qe=e=>{for(const t of e){const{addedNodes:e,removedNodes:n}=t;for(const t of e)Ae.add(t);for(const e of n)Ae.has(e)?Ae.delete(e):Ie.add(e)}};function Le(e){Ce.push(e),Re||(Be=performance.now(),Re=!0,requestAnimationFrame(Ne))}function We(e){const t=new window.MutationObserver(Le),n=document.querySelector("body"),o={attributes:!0,attributeFilter:[$,z],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return Ne=(e=>()=>{const t=performance.now(),n=t-Be,o=16*Pe+++2;if(n>o&&n<200)return ue("MutationDelay"),re("Update delayed due to heavy workload on the callStack"),re(`EventLoop busy time: %c${_(n)}ms %c> Max wait: %c${o-2}ms`,h,g,h),setTimeout(Ne,16*Pe),void(Be=t);Pe=1,Ce.forEach(qe),Ce.length=0,e({addedMutations:Ae,removedMutations:Ie}),Re=!1,Ae.clear(),Ie.clear()})(e),t.observe(n,o),re("Attached MutationObserver to body"),t}const Fe=(t,n=!0)=>o=>{o>0&&re(`${n?"At":"De"}tached ${t}Observer ${n?"to":"from"} %c${o}%c element${1===o?"":"s"}`,h,e)},De=(e,t,n)=>e=>{let o=0;for(const r of e)n.has(r)&&(t.unobserve(r),n.delete(r),o+=1);return o},He=e=>e.hidden||null===e.offsetParent||"none"===e.style.display,Ve=(e,t)=>{const n=t.side,o={root:t.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||J,i=(t=!1)=>e(t),a=(e,t)=>0===e||e>t[n],s=(e,t)=>e.toggleAttribute(w,t);const l=new IntersectionObserver(function(e){for(const t of e){const{boundingClientRect:e,rootBounds:o,target:r}=t,i=e[n],l=a(i,o)&&!He(r);s(r,l)}r(i)},o),c=new WeakSet;return{attachObservers:function(e){let t=0;for(const n of e){const e=n.nodeType===Node.ELEMENT_NODE,o=c.has(n);e&&(ie(!o,"Node already observed for overflow",n),o||(l.observe(n),c.add(n),t+=1))}return t},detachObservers:De(0,l,c)}},Ue="--ifr-start",Ze="--ifr-end",Je=[],_e=new WeakSet,Qe=e=>"object"==typeof e&&_e.add(e);let Ge={},Ye=0;function Xe(e){e.getEntries().forEach(e=>{if(e.name===Ze){const{duration:t}=performance.measure("--ifr-measure",Ue,Ze);Ge=e.detail,Je.push(t),Je.length>100&&Je.shift()}})}function Ke(){re("Attached PerformanceObserver to page");new PerformanceObserver(Xe).observe({entryTypes:["mark"]}),Qe(document.documentElement),Qe(document.body),function(){const e=setInterval(()=>{if(Je.length<10)return;if(Ge.hasTags&&Ge.len<25)return;Je.sort();const t=Math.min(Je.reduce((e,t)=>e+t,0)/Je.length,Je[Math.floor(Je.length/2)]),n=_(t);n>Ye&&(Ye=n,ue("performanceObserver")),t<=4||(clearInterval(e),pe(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${_(t)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${Ge.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))},5e3)}()}const et=Fe("Resize"),tt=new WeakSet;let nt;function ot(e){let t=0;for(const n of e){const e=n.nodeType===Node.ELEMENT_NODE,o=tt.has(n);if(!e)continue;const r=getComputedStyle(n)?.position;""!==r&&"static"!==r&&(ie(!o,"Node already observed for resize",n),o||(nt.observe(n),tt.add(n),t+=1))}et(t)}const rt=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},it=rt("function"),at=rt("number"),st=rt("string");"undefined"!=typeof window&&function(){const o={height:()=>(me("Custom height calculation function not defined"),Wt.auto()),width:()=>(me("Custom width calculation function not defined"),Ft.auto())},r={},i={},a="auto",s="[iFrameSizer]",l="scroll";let c,u,d,f,m,p,B,W,D,J=!0,_="",ee=0,te="",oe="",ie=!1,ae=!0,le=!1,ge=!0,ze=!1,we=!1,$e=!1,Se=1,Oe=a,Ee="",Me=!0,ke={},Ae=!1,Ie=!0,Ce=!1,Ne=0,Pe=!1,Re=[],Be="",qe="child",Le=!1,He="",Je=[],_e=window.parent,Qe="*",Ge=0,Ye=!1,Xe=1,et=l,rt=window,lt=()=>{me("onMessage function not defined")},ct=()=>{},ut=null,dt=null;function ft(t){var n,r,i;!function(e){Be=e[0]??Be,ee=xe(e[1])??ee,le=Te(e[2])??le,Ce=Te(e[3])??Ce,J=Te(e[6])??J,te=e[7]??te,Oe=e[8]??Oe,_=e[9]??_,oe=e[10]??oe,Ge=xe(e[11])??Ge,ke.enable=Te(e[12])??!1,qe=e[13]??qe,et=e[14]??et,Pe=Te(e[15])??Pe,d=xe(e[16])??d,f=xe(e[17])??f,ae=Te(e[18])??ae,c=e[19]??c,W=e[20]??W,Ne=xe(e[21])??Ne,Ie=Te(e[23])??Ie}(t),K=(n={id:Be,enabled:Ce,expand:Ie}).id||v,ne.label(`${K}`),ne.expand(n.expand),X=n.enabled,function(){function e(e){D=it(e,"onBeforeResize")??D,lt=it(e,"onMessage")??lt,ct=it(e,"onReady")??ct,"number"==typeof e?.offset&&(be("offset","offsetSize"),ae&&(d=at(e,"offset")??d),le&&(f=at(e,"offset")??f)),"number"==typeof e?.offsetSize&&(ae&&(d=at(e,"offsetSize")??d),le&&(f=at(e,"offsetSize")??f)),u=st(e,q(L[0]))??u,Ee=st(e,"ignoreSelector")??Ee,He=st(e,"sizeSelector")??He,Qe=st(e,"targetOrigin")??Qe,Oe=e?.heightCalculationMethod||Oe,et=e?.widthCalculationMethod||et}function t(e,t){return"function"==typeof e&&(pe(`<rb>Deprecated Option(${t}CalculationMethod)</>\n\nThe use of <b>${t}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),o[t]=e,e="custom"),e}if(1===Ne)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),Oe=t(Oe,"height"),et=t(et,"width"),re(`Set targetOrigin for parent: %c${Qe}`,h))}(),bt(),function(){try{Le=1===Ne||"iframeParentListener"in window.parent}catch(e){}}(),le===ae&&(ie=!0),function(){const t=Ne,n=V({key:c}),o=V({key:u});if(Ne=Math.max(n,o),Ne<0){if(Ne=Math.min(n,o),fe(),pe(`${H(Ne+2)}${H(2)}`),G(W))throw H(Ne+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"")}else(!G(W)||t>-1&&Ne>t)&&(sessionStorage.getItem("ifr")!==y&&function(t,n){console.info(`${K} %ciframe-resizer ${t}`,X||n<1?"font-weight: bold;":e)}(`v${y} (${(e=>q(F[e]))(Ne)})`,Ne),Ne<2&&he(H(3)),sessionStorage.setItem("ifr",y))}(),W&&""!==W&&"false"!==W?W!==y&&pe(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${W} - Child page: ${y}.\n`):pe("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),$t(),St(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach(n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(z,!0)});t("data-iframe-height"),t("data-iframe-width"),e&&pe("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),"BackCompat"===document.compatMode&&pe("<rb>Quirks Mode Detected</>\n\nThis iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.\n\nFor more information see <u>https://iframe-resizer.com/quirks-mode</>.\n"),pt(),ie||je(),1!==Ne&&(rt.parentIframe=Object.freeze({autoResize:e=>(Y(e,"boolean","parentIframe.autoResize(enable) enable"),!1===le&&!1===ae?(ue(E),pe(`Auto Resize can not be changed when <b>direction</> is set to '${N}'.`),!1):(!0===e&&!1===J?(J=!0,queueMicrotask(()=>Jt(E,"Auto Resize enabled"))):!1===e&&!0===J&&(J=!1),Qt(0,0,"autoResize",JSON.stringify(J)),J)),close(){Qt(0,0,"close")},getId:()=>Be,getOrigin:()=>(ye("getOrigin()","getParentOrigin()"),m),getParentOrigin:()=>m,getPageInfo(e){if("function"==typeof e)return ut=e,Qt(0,0,"pageInfo"),void ve("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");ut=null,Qt(0,0,"pageInfoStop")},getParentProps:e=>(Y(e,"function","parentIframe.getParentProps(callback) callback"),dt=e,Qt(0,0,"parentInfo"),()=>{dt=null,Qt(0,0,"parentInfoStop")}),getParentProperties(e){ye("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){Y(e,"string","parentIframe.moveToAnchor(anchor) anchor"),ke.findTarget(e)},reset(){!function(){const e=Oe;Oe=a,Ye||(Ye=!0,requestAnimationFrame(()=>{Ye=!1})),_t("reset"),Oe=e}()},setOffsetSize(e){Y(e,"number","parentIframe.setOffsetSize(offset) offset"),d=e,f=e,Jt(T,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){Y(e,"number","parentIframe.scrollBy(x, y) x"),Y(t,"number","parentIframe.scrollBy(x, y) y"),Qt(t,e,"scrollBy")},scrollTo(e,t){Y(e,"number","parentIframe.scrollTo(x, y) x"),Y(t,"number","parentIframe.scrollTo(x, y) y"),Qt(t,e,"scrollTo")},scrollToOffset(e,t){Y(e,"number","parentIframe.scrollToOffset(x, y) x"),Y(t,"number","parentIframe.scrollToOffset(x, y) y"),Qt(t,e,"scrollToOffset")},sendMessage(e,t){t&&Y(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),Qt(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){Oe=e,$t()},setWidthCalculationMethod(e){et=e,St()},setTargetOrigin(e){Y(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),Qe=e},resize(e,t){e&&Y(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),t&&Y(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),Jt(j,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){ye("size()","resize()"),this.resize(e,t)}}),rt.parentIFrame=rt.parentIframe),function(){function e(e){Qt(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){R(window.document,t,e)}!0===Pe&&(t("mouseenter"),t("mouseleave"))}(),ke=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function t(t){const n=t.getBoundingClientRect(),o=e();return{x:parseInt(n.left,b)+parseInt(o.x,b),y:parseInt(n.top,b)+parseInt(o.y,b)}}function n(e){function n(e){const n=t(e);Qt(n.y,n.x,"scrollToOffset")}const o=e.split("#")[1]||e,r=decodeURIComponent(o),i=document.getElementById(r)||document.getElementsByName(r)[0];void 0===i?Qt(0,0,"inPageLink",`#${o}`):n(i)}function o(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&n(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&R(e,"click",t=>{t.preventDefault(),n(e.getAttribute("href"))})}function i(){R(window,"hashchange",o)}function a(){setTimeout(o,128)}function s(){r(),i(),a()}return ke.enable&&(1===Ne?pe("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):s()),{findTarget:n}}(),void 0===te&&(te=`${ee}px`),yt("margin",(r="margin",(i=te).includes("-")&&(me(`Negative CSS value ignored for ${r}`),i=""),i)),yt("background",_),yt("padding",oe),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),ie||function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}(),function(e){zt({method:e,eventType:"After Print",eventName:"afterprint"}),zt({method:e,eventType:"Before Print",eventName:"beforeprint"}),zt({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}("add"),function(){const e=Pt(document.documentElement)();We(It),function(e){const t={root:document.documentElement,side:ae?S:O};p=Ve(Et,t),p.attachObservers(e)}(e),Ke(),function(e){nt=new ResizeObserver(Mt),nt.observe(document.body),tt.add(document.body),re("Attached ResizeObserver to body"),B={attachObserverToNonStaticElements:ot,detachObservers:De(0,nt,tt)},B.attachObserverToNonStaticElements(e)}(e),function(e){const t=new IntersectionObserver(t=>e(t[0].isIntersecting),{threshold:0}),n=document.documentElement;t.observe(n),re("Attached VisibilityObserver to page")}(jt)}(),mt(Z(ct)),Jt(P,"Init message from host page",void 0,void 0,`${y}:${Ne}`),document.title&&""!==document.title&&Qt(0,0,"title",document.title)}function mt(e){"complete"===document.readyState?U(e):R(document,"readystatechange",()=>mt(e))}function pt(){Je=document.querySelectorAll(`[${z}]`),$e=Je.length>0}let ht=0;function gt(){const n=document.querySelectorAll(`*[${$}]`);ze=n.length>0,ze&&n.length!==ht&&(function(n){const o=1===n.length?"":"s";me(`%c[${$}]%c found on %c${n.length}%c element${o}`,t,e,t,e)}(n),ht=n.length)}function yt(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),re(`Set body ${e}: %c${t}`,h))}function vt(e,t,n){if(""!==n)for(const e of document.querySelectorAll(n))e.toggleAttribute(t,!0)}function bt(){vt(0,z,He),vt(0,$,Ee)}function zt(e){({add(t){function n(){Jt(e.eventName,e.eventType)}i[t]=n,R(window,t,n,{passive:!0})},remove(e){const t=i[e];var n,o;delete i[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function wt(e,t,n,o){return t!==e&&(e in n||(me(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in r)&&pe(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you ${W?"remove this option.":"set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page."}`),e}function $t(){Oe=wt(Oe,a,Wt,"height")}function St(){et=wt(et,l,Ft,"width")}function Ot(){const e=document.querySelectorAll(`[${w}]`);Re=Array.from(e).filter(e=>!e.closest(`[${$}]`)),we=Re.length>0}function Et(e){Ot(),(we||e)&&(Re.length>1?re("Overflowed Elements:",...Re):we||re("Overflow removed"),Jt(A,"Overflow updated"))}function Mt(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Jt(x,`Element resized <${function(e){switch(!0){case!G(e):return"";case G(e.id):return`${e.nodeName}#${e.id}`;case G(e.name):return`${e.nodeName} (${e.name}`;case G(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}function jt(e){Ae=!e,Jt(C,"Visibility changed")}const kt=Fe("Overflow"),Tt=Fe("Overflow",!1),xt=Fe("Resize"),At=Fe("Resize",!1);function It(e){!function({addedMutations:e,removedMutations:t}){ue("contentMutated"),bt(),pt(),Ot();let n=0,o=0,r=0,i=0;for(const e of t){const t=Pt(e)();o+=p.detachObservers(t),i+=B.detachObservers(t)}for(const t of e){const e=Pt(t)();n+=p.attachObservers(e),r+=B.attachObserverToNonStaticElements(e)}Tt(o),At(i),kt(n),xt(r),se()}(e),Jt(I,"Mutation Observed")}function Ct(e){performance.mark(Ue);const t=Q(e);let n=0,o=document.documentElement,r=$e?0:document.documentElement.getBoundingClientRect().bottom;const i=$e?Je:we?Re:Pt(document)();for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return re(`${t} position calculated from:`,o),performance.mark(Ze,{detail:{hasTags:$e,len:i.length,logging:Ce,Side:t}}),r}const Nt=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],Pt=e=>()=>{if(!(e=>e.nodeType===Node.ELEMENT_NODE)(e))return[e];const t=["* ","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)"];return gt(),ze&&t.push(`not([${$}])`,`not([${$}] *)`),[e,...e.querySelectorAll(t.join(":"))]},Rt={height:0,width:0},Bt={height:0,width:0},qt=[h,g,h];function Lt(e){function t(){return Bt[o]=r,Rt[o]=s,r}const n=e===Wt,o=n?"height":"width",r=e.boundingClientRect(),i=Math.ceil(r),a=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),l=`HTML: %c${r}px %cPage: %c${s}px`;let c=0;switch(!0){case!e.enabled():return s;case $e:re("Found element with data-iframe-size attribute"),c=e.taggedElement();break;case!we&&0===Bt[o]&&0===Rt[o]:re(`Initial page size values: ${l}`,...qt),c=t();break;case Ye&&r===Bt[o]&&s===Rt[o]:re(`Size unchanged: ${l}`,...qt),c=Math.max(r,s);break;case 0===r:re(`Page is hidden: ${l}`,...qt),c=s;break;case!we&&r!==Bt[o]&&s<=Rt[o]:re(`New <html> size: ${l} `,...qt),re(`Previous <html> size: %c${Bt[o]}px`,h),c=t();break;case!n:c=e.taggedElement();break;case!we&&r<Bt[o]:re(`<html> size decreased: ${l}`,...qt),c=t();break;case s===a||s===i:re(`<html> size equals page size: ${l}`,...qt),c=t();break;case r>s:re(`Page size < <html> size: ${l}`,...qt),c=t();break;case we:re("Found element overflowing <html> "),c=e.taggedElement();break;default:re(`Using <html> size: ${l}`,...qt),c=t()}return re(`Content ${o}: %c${c}px`,h),c+=function(e){const t=e.getOffset();return 0!==t&&re(`Page offsetSize: %c${t}px`,h),t}(e),c}const Wt={enabled:()=>ae,getOffset:()=>d,auto:()=>Lt(Wt),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,b)+parseInt(t.marginBottom,b)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Wt.bodyOffset(),custom:()=>o.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...Nt(Wt)),min:()=>Math.min(...Nt(Wt)),grow:()=>Wt.max(),lowestElement:()=>Ct(S),taggedElement:()=>Ct(S)},Ft={enabled:()=>le,getOffset:()=>f,auto:()=>Lt(Ft),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>o.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...Nt(Ft)),min:()=>Math.min(...Nt(Ft)),rightMostElement:()=>Ct(O),scroll:()=>Math.max(Ft.bodyScroll(),Ft.documentElementScroll()),taggedElement:()=>Ct(O)},Dt=(e,t)=>!(Math.abs(e-t)<=Ge);function Ht(e,t){const n=e[t]();return e.enabled()&&void 0!==D?function(e){const t=D(e);if(void 0===t)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);return t}(n):n}let Vt=!1;const Ut=Z(()=>he(H(4)));let Zt=!1;const Jt=ce((e,t,n,o,r)=>{if(performance.now(),ue(e),!0!==Vt){if(!J&&!(e in k))return re("Resizing disabled"),void se();if(Ae){if(!0===Zt)return;Zt=!0}else Zt=!1,Vt=!0,requestAnimationFrame(()=>{Vt=!1}),function(e,t,n,o,r){const i=n??Ht(Wt,Oe),a=o??Ht(Ft,et);switch(ae&&Dt(Se,i)||le&&Dt(Xe,a)?M:e){case P:case E:case M:Se=i,Xe=a;case T:Qt(Se,Xe,e,r);break;case A:case I:case x:case C:fe();break;default:fe(),re("No change in content size detected")}}(e,0,n,o,r)}});function _t(e){Se=Wt[Oe](),Xe=Ft[et](),Qt(Se,Xe,e)}const Qt=ce(function(e,t,o,r,i){Ne<-1||(ue(o),void 0!==i||(i=Qe),function(){const a=`${Be}:${e}:${t}:${o}${void 0===r?"":`:${r}`}`;if(Le)try{window.parent.iframeParentListener(s+a)}catch(e){if(1!==Ne)throw e;return void Ut()}else _e.postMessage(s+a,i);re(`Sending message to parent page via ${Le?"sameOrigin":"postMessage"}: %c%c${a}`,n,h)}(),se())}),Gt=ce(function(e){ue("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>Qt(0,0,`${e}Stop`),r={init:function(){if("loading"===document.readyState)return;const t=e.data.slice(13).split(":");_e=e.source,m=e.origin,ft(t),ge=!1,setTimeout(()=>{Me=!1},128)},reset(){Me||_t("resetPage")},resize(){Jt("parentResize","Parent window requested size check")},moveToAnchor(){ke.findTarget(a())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=a();ut?U(ut,n(e)):o("pageInfo")},parentInfo(){const e=(r=a(),t(n(r)));var r;dt?U(dt,e):o("parentInfo")},message(){const e=a();U(lt,n(e))}},i=()=>e.data.split("]")[1].split(":")[0],a=()=>e.data.slice(e.data.indexOf(":")+1),l=()=>e.data.split(":")[2]in{true:1,false:1};function c(){const t=i();ue(t),t in r?r[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||l()||me(`Unexpected message (${e.data})`)}s===`${e.data}`.slice(0,13)&&function(){if(!1!==ge)return l()?(de(i()),ue(P),void r.init()):void 0;c()}()});function Yt(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?me("Already setup"):(window.iframeChildListener=e=>setTimeout(()=>Gt({data:e,sameOrigin:!0})),R(window,"message",Gt),R(window,"readystatechange",Yt),Yt())}()});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iframe-resizer/child",
3
- "version": "5.5.1-beta.1",
3
+ "version": "5.5.1",
4
4
  "license": "GPL-3.0",
5
5
  "homepage": "https://iframe-resizer.com",
6
6
  "author": {