iframe-resizer 5.5.8-beta.3 → 5.5.8-beta.4

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/index.cjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/legacy 5.5.8-beta.3 (cjs) - 2026-01-24
4
+ * @module iframe-resizer/legacy 5.5.8-beta.4 (cjs) - 2026-01-26
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
package/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/legacy 5.5.8-beta.3 (esm) - 2026-01-24
4
+ * @module iframe-resizer/legacy 5.5.8-beta.4 (esm) - 2026-01-26
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/legacy (child) 5.5.8-beta.3 (iife)
4
+ * @module iframe-resizer/legacy (child) 5.5.8-beta.4 (iife)
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,5 @@
17
17
  */
18
18
 
19
19
 
20
- !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:!1,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},s={profile:0,profileEnd:0,timeStamp:0,trace:0},c=Object.assign(console);const{fromEntries:l,keys:d}=Object,u=e=>[e,c[e]],f=e=>t=>[t,function(n){e[t]=n}],m=(e,t)=>l(d(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.8-beta.3",b="iframeResizer",v=":",z="init",w="message",$="pageHide",S="pageInfo",O="parentInfo",M="scrollToOffset",E="title",k=10,j="data-iframe-size",x="data-iframe-overflowed",I="data-iframe-ignore",T="height",A="width",C="offset",P="offsetSize",R="string",N="number",q="object",L="function",B="auto",D="readystatechange",F="bottom",W="right",H="autoResizeEnabled",V=Symbol("sizeChanged"),U="manualResize",Z="parentResize",J={[U]:1,[Z]:1},_="setOffsetSize",Q="resizeObserver",G="overflowObserver",Y="mutationObserver",X="visibilityObserver",K="No change in content size detected",ee="[iFrameSizer]",te=new Set(["head","body","meta","base","title","script","link","style","map","area","option","optgroup","template","track","wbr","nobr"]),ne=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)},oe=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),re=["spjluzl","rlf","clyzpvu"],ie=["<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.","Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz."],ae=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],se=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),ce=e=>oe(ie[e]);var le=e=>{const t=e[oe(re[0])]||e[oe(re[1])]||e[oe(re[2])];if(!t)return-1;const n=t.split("-");let o=function(e=""){let t=-2;const n=ne(oe(e));return n in se&&(t=se[n]),t}(n[0]);return 0===o||(e=>e[2]===ne(e[0]+e[1]))(n)||(o=-2),o};const de=(e,...t)=>setTimeout(()=>e(...t),0),ue=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},fe=e=>e,me=e=>Math.round(1e3*e)/1e3,pe=e=>e.charAt(0).toUpperCase()+e.slice(1),he=e=>""!=`${e}`&&void 0!==e,ge=e=>e();const ye=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${pe(t)}`)};const be={br:"\n",rb:"",bb:"",b:"",i:"",u:"","/":""},ve=Object.keys(be),ze=new RegExp(`<(${ve.join("|")})>`,"gi"),we=(e,t)=>be[t]??"";let $e=!0,Se=b;const Oe=(Me=function(n={}){const l={},d={},p=[],h={...a,expand:!n.collapsed||a.expanded,...n};let g="";function y(){p.length=0,g=""}function b(){delete h.event,y()}const v=()=>!!p.some(([e])=>e in i)||!!h.expand;function z(){if(0!==p.length){c[v()?"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)c.assert(e in c,`Unknown console method: ${e}`),e in c&&c[e](...t);c.groupEnd(),b()}else b()}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)}`}(),queueMicrotask(()=>queueMicrotask(z)))}function $(e,...t){0===p.length&&w(),p.push([e,...t])}function S(e=r,...t){l[e]?$("log",`${e}: ${performance.now()-l[e]} ms`,...t):$("timeLog",e,...t)}return{...m(h,f(h)),...m(console,e=>[e,(...t)=>$(e,...t)]),...m(s,u),assert:function(e,...t){!0!==e&&$("assert",e,...t)},count:function(e=r){d[e]?d[e]+=1:d[e]=1,$("log",`${e}: ${d[e]}`)},countReset:function(e=r){delete d[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(),l[e]=performance.now()},timeEnd:function(e=r){S(e),delete l[e]},timeLog:S,touch:w}},Me?.__esModule?Me.default:Me);var Me;const Ee=Oe({label:`${b}(child)`,expand:!1});const ke=e=>(...t)=>!$e||Ee[e](...t),je=ke("log"),xe=je,Ie=ke("debug");const{assert:Te,endAutoGroup:Ae,error:Ce,errorBoundary:Pe,event:Re,label:Ne,purge:qe,warn:Le}=Ee,Be=(De=fe,e=>De(typeof e===R?window.chrome?e.replace(ze,we):(e=>e.replaceAll("<br>","\n").replaceAll(/<\/?[^>]+>/gi,""))(e):e));var De;const Fe=(...e)=>Ee.warn(...e.map(Be)),We=(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)=>Fe(t)),He=We("Method"),Ve=We("Method","replaced with"),Ue=We("Option"),Ze=["min-height","min-width","max-height","max-width"],Je=new Set,_e=e=>e.tagName?e.tagName.toLowerCase():"unknown",Qe=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),Ge=(e,t)=>{return(n=Qe(e,t))&&"0px"!==n&&n!==B&&"none"!==n;var n};function Ye({href:e}){Je.has(e)||(je("Unable to access stylesheet:",e),Je.add(e))}const Xe=(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){Ye(n)}return{source:"cross-origin stylesheet",value:Qe(e,t)}}(e,t),Ke=(e,t)=>{const{source:n,value:o}=Xe(e,t),r=_e(e);Fe(`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 et(){for(const e of[document.documentElement,document.body])for(const t of Ze)je(`Checking <${_e(e)}> for blocking CSS: ${t}`),Ge(e,t)&&Ke(e,t)}const tt=e=>t=>void 0===t?void 0:e(t),nt=tt(e=>"true"===e),ot=tt(Number),rt=[];function it(e,t){je(`${e} event listener: %c${t}`,h)}const at=(e,t,n,o)=>{e.removeEventListener(t,n,o),it("Removed",t)},st=(e,t,n,o=!1)=>{e.addEventListener(t,n,o),rt.push(()=>at(e,t,n,o)),it("Added",t)},ct=(e="")=>t=>n=>{n.size>0&&Ie(`${t}Observer ${e}:`,...Array.from(n).flatMap(e=>["\n",e]))},lt=ct("attached to"),dt=((e="")=>t=>n=>{n.size>0&&Ce(`${t}Observer ${e}:`,...Array.from(n).flatMap(e=>["\n",e]))})("already attached"),ut=ct("detached from"),ft=(t,n=!0)=>o=>{o>0&&xe(`${n?"At":"De"}tached %c${t}Observer%c ${n?"to":"from"} %c${o}%c element${1===o?"":"s"}`,h,e,h,e)},mt=(e,t,n,o)=>{const r=ut(e);return e=>{const i=new Set;let a=0;for(const o of e)n.has(o)&&(t.unobserve(o),n.delete(o),i.add(o),a+=1);r(i),o(a),i.clear()}},pt="Mutation",ht=new Set,gt=new Set,yt=new Set,bt=[],vt={attributes:!0,attributeFilter:[I,j],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};let zt,wt=1,$t=!1,St=0;const Ot=ct("added")(pt),Mt=ct("removed (page)")(pt),Et=ct("removed (added)")(pt),kt=e=>e.nodeType!==Node.ELEMENT_NODE||te.has(e.tagName.toLowerCase());function jt(e){const t=e.addedNodes;for(const e of t)kt(e)||ht.add(e)}function xt(e){const t=e.removedNodes;for(const e of t)kt(e)||(ht.has(e)?(ht.delete(e),yt.add(e)):gt.add(e))}const It=e=>{xe("Mutations:",e);for(const t of e)jt(t),xt(t);Ot(ht),Mt(gt),Et(yt),yt.clear()};const Tt=e=>()=>{const t=performance.now(),n=t-St,o=16*wt+++2;if(n>o&&n<200)return Re("mutationThrottled"),xe("Update delayed due to heavy workload on the callStack"),xe(`EventLoop busy time: %c${me(n)}ms %c> Max wait: %c${o-2}ms`,h,g,h),setTimeout(zt,16*wt),void(St=t);wt=1,bt.forEach(It),bt.length=0,$t=!1,gt.size>0&&je(`Detected %c${gt.size} %cremoved element${gt.size>1?"s":""}`,h,g),ht.size>0&&je(`Found %c${ht.size} %cnew element${ht.size>1?"s":""}`,h,g),e({addedNodes:ht,removedNodes:gt}),ht.clear(),gt.clear()};function At(e){bt.push(e),$t||(St=performance.now(),$t=!0,requestAnimationFrame(zt))}function Ct(e){const t=new window.MutationObserver(At),n=document.body||document.documentElement;return zt=Tt(e),t.observe(n,vt),xe("Attached%c MutationObserver%c to body",h,g),{...t,disconnect:()=>{ht.clear(),gt.clear(),bt.length=0,t.disconnect(),xe("Detached%c MutationObserver",h)}}}const Pt="Overflow",Rt=ft(Pt),Nt=ft(Pt,!1),qt=lt(Pt),Lt=dt(Pt),Bt=e=>e.hidden||null===e.offsetParent||"none"===e.style.display,Dt=(e,t)=>{const n=t.side,o={root:t.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||fe,i=(t=!1)=>e(t),a=(e,t)=>0===e||e>t[n],s=(e,t)=>e.toggleAttribute(x,t);const c=new IntersectionObserver(function(e){for(const t of e){const{boundingClientRect:e,rootBounds:o,target:r}=t;if(!o)continue;const i=e[n],c=a(i,o)&&!Bt(r);s(r,c)}r(i)},o),l=new WeakSet;return{attachObservers:function(e){const t=new Set,n=new Set;let o=0;for(const r of e)r.nodeType===Node.ELEMENT_NODE&&(l.has(r)?t.add(r):(c.observe(r),l.add(r),n.add(r),o+=1));Lt(t),qt(n),Rt(o),n.clear(),t.clear()},detachObservers:mt(Pt,c,l,Nt),disconnect:()=>{c.disconnect(),xe("Detached%c OverflowObserver",h)}}},Ft="--ifr-start",Wt="--ifr-end",Ht="--ifr-measure",Vt=[];let Ut,Zt={},Jt=0;function _t(){try{performance.clearMarks(Ft),performance.clearMarks(Wt),performance.clearMeasures(Ht)}catch{}}function Qt(e){e.getEntries().forEach(e=>{if(e.name===Wt)try{const{duration:t}=performance.measure(Ht,Ft,Wt);Zt=e.detail,Vt.push(t),Vt.length>100&&Vt.shift()}catch{}})}function Gt(){xe("Attached%c PerformanceObserver%c to page",h,g);const e=new PerformanceObserver(Qt);return e.observe({entryTypes:["mark"]}),Ut=setInterval(()=>{if(Vt.length<10)return;if(Zt.hasTags&&Zt.len<25)return;Vt.sort();const e=Math.min(Vt.reduce((e,t)=>e+t,0)/Vt.length,Vt[Math.floor(Vt.length/2)]),t=me(e);t>Jt&&(Jt=t,Re("performanceObserver"),je("Mean time:",me(Vt[Math.floor(Vt.length/2)])),je("Median time:",me(Vt.reduce((e,t)=>e+t,0)/Vt.length)),je("Average time:",t),je("Max time:",me(Math.max(...Vt)))),_t(),e<=4||(clearInterval(Ut),Fe(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${me(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${Zt.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))},5e3),{disconnect:()=>{_t(),clearInterval(Ut),e.disconnect(),xe("Detached%c PerformanceObserver",h)}}}const Yt="Resize",Xt=ft(Yt),Kt=ft(Yt,!1),en=lt(Yt),tn=dt(Yt),nn=new WeakSet,on=new Set,rn=new Set;let an;function sn(e){let t=0;for(const n of e){if(n.nodeType!==Node.ELEMENT_NODE)continue;const e=getComputedStyle(n)?.position;""!==e&&"static"!==e&&(nn.has(n)?on.add(n):(an.observe(n),nn.add(n),rn.add(n),t+=1))}tn(on),en(rn),Xt(t),rn.clear(),on.clear()}function cn(e){const t=new IntersectionObserver(t=>e(t.at(-1).isIntersecting),{threshold:0}),n=document.documentElement;return t.observe(n),xe("Attached%c VisibilityObserver%c to page",h,g),{disconnect:()=>{t.disconnect(),xe("Detached%c VisibilityObserver",h)}}}const ln=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},dn=ln(L),un=ln(N),fn=ln(R);"undefined"!=typeof window&&function(){const o={height:()=>(Le("Custom height calculation function not defined"),Ln.auto()),width:()=>(Le("Custom width calculation function not defined"),Bn.auto())},r={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},i={},a=B,s="scroll";let c,l,d,u,f,m,p,ne,ie,se=!0,be="",ve=0,ze="",we="",Oe=!1,Me=!0,ke=!1,qe=!0,Be=!1,De=!1,We=!0,Ze=!1,Je=1,_e=a,Qe="",Ge=!0,Ye={},Xe=!1,Ke=!1,tt=!1,it=0,ct=!1,lt=0,dt=0,ut=new Set,ft="",pt="child",ht=!1,gt="",yt=[],bt=window.parent,vt="*",zt=0,wt=!1,$t=1,St=s,Ot=window,Mt=()=>{Le("onMessage function not defined")},Et=()=>{},kt=null,jt=null;function xt(e){var t;!function(e){ft=e[0]??ft,ve=ot(e[1])??ve,ke=nt(e[2])??ke,tt=nt(e[3])??tt,se=nt(e[6])??se,ze=e[7]??ze,_e=e[8]??_e,be=e[9]??be,we=e[10]??we,zt=ot(e[11])??zt,Ye.enable=nt(e[12])??!1,pt=e[13]??pt,St=e[14]??St,ct=nt(e[15])??ct,lt=ot(e[16])??lt,dt=ot(e[17])??dt,Me=nt(e[18])??Me,c=e[19]??c,ne=e[20]??ne,it=ot(e[21])??it,Ke=nt(e[23])??Ke}(e),Se=(t={id:ft,enabled:tt,expand:Ke}).id||b,Ee.label(`${Se}`),Ee.expand(t.expand),$e=t.enabled,Re("initReceived"),je(`Initialising iframe v${y} ${window.location.href}`),function(){function e(e){je("Reading data from page:",Object.keys(e)),ie=dn(e,"onBeforeResize")??ie,Mt=dn(e,"onMessage")??Mt,Et=dn(e,"onReady")??Et,typeof e?.offset===N&&(Ue(C,P),Me&&(lt=un(e,C)??lt),ke&&(dt=un(e,C)??dt)),typeof e?.offsetSize===N&&(Me&&(lt=un(e,P)??lt),ke&&(dt=un(e,P)??dt)),l=fn(e,oe(re[0]))??l,Qe=fn(e,"ignoreSelector")??Qe,gt=fn(e,"sizeSelector")??gt,vt=fn(e,"targetOrigin")??vt,_e=e?.heightCalculationMethod||_e,St=e?.widthCalculationMethod||St}function t(e,t){return typeof e===L&&(Fe(`<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===it)return;const n=window.iframeResizer||window.iFrameResizer;typeof n===q&&(e(n),_e=t(_e,T),St=t(St,A),xe(`Set targetOrigin for parent: %c${vt}`,h))}(),[Bt,Vt,ln,qt,Ht,on,rn,en,Lt,Rt,Oe?fe:et,_t,()=>Ut("background",be),()=>Ut("padding",we),Oe?fe:Qt,pn,Jt,xn,hn,mn,gn,Tt,yn].forEach(e=>{try{e()}catch(e){if(it<0)throw e;Fe("<rb>Error in setup function</>\n<i>iframe-resizer</> detected an error during setup.\n\nPlease report the following error message at <u>https://github.com/davidjbradshaw/iframe-resizer/issues</>"),Ce(e)}}),Pt(ue(Et)),je("Initialization complete"),Ae(),Zn(z,"Init message from host page",void 0,void 0,`${y}:${it}`),document.title&&""!==document.title&&Qn(0,0,E,document.title)}function It({persisted:e}){e||Qn(0,0,"beforeUnload"),Re($),xe("Page persisted:",e),e||rt.forEach(ge)}const Tt=()=>st(window,$.toLowerCase(),It);let At=!1;function Pt(e){"complete"===document.readyState?de(e):At||st(document,D,()=>Pt(e)),At=!0}function Rt(){yt=document.querySelectorAll(`[${j}]`),Ze=yt.length>0,je(`Tagged elements found: %c${Ze}`,h)}let Nt=0;function qt(){const n=document.querySelectorAll(`*[${I}]`);return Be=n.length>0,Be&&n.length!==Nt&&(function(n){const o=1===n.length?"":"s";Le(`%c[${I}]%c found on %c${n.length}%c element${o}`,t,e,t,e)}(n),Nt=n.length),Be}function Lt(){"BackCompat"===document.compatMode&&Fe("<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")}function Bt(){ne&&""!==ne&&"false"!==ne?ne!==y&&Fe(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ne} - Child page: ${y}.\n`):Fe("<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")}function Ht(){try{ht=1===it||"iframeParentListener"in window.parent}catch(e){je("Cross domain iframe detected")}}function Vt(){ke===Me&&(Oe=!0)}function Ut(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),xe(`Set body ${e}: %c${t}`,h))}function Zt(e,t,n){if(""!==n){je(`${e}: %c${n}`,h);for(const e of document.querySelectorAll(n))je(`Applying ${t} to:`,e),e.toggleAttribute(t,!0)}}function Jt(){Zt("sizeSelector",j,gt),Zt("ignoreSelector",I,Qe)}function _t(){var e,t;void 0===ze&&(ze=`${ve}px`),Ut("margin",(e="margin",(t=ze).includes("-")&&(Le(`Negative CSS value ignored for ${e}`),t=""),t))}function Qt(){const e=e=>e.style.setProperty(T,B,"important");e(document.documentElement),e(document.body),je("Set HTML & body height: %cauto !important",h)}function Xt(e){({add(t){function n(){Zn(e.eventName,e.eventType)}i[t]=n,st(window,t,n,{passive:!0})},remove(e){const t=i[e];delete i[e],at(window,e,t)}})[e.method](e.eventName)}function en(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach(n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(j,!0)});t("data-iframe-height"),t("data-iframe-width"),e&&Fe("<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</>.")}function tn(e,t,n){const{label:o}=n;return t!==e&&(e in n||(Le(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in r)&&Fe(`<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 ${ne?"remove this option.":`set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page. This can be done on the child page by adding the following code:\n\nwindow.iframeResizer = {\n license: 'xxxx',\n ${o}CalculationMethod: '${B}',\n}\n`}\n`),je(`Set ${o} calculation method: %c${e}`,h),e}function on(){_e=tn(_e,a,Ln)}function rn(){St=tn(St,s,Bn)}function ln(){const t=it,n=le({key:c}),o=le({key:l});if(it=Math.max(n,o),it<0){if(it=Math.min(n,o),Fe(`${ce(it+2)}${ce(2)}`),he(ne))throw ce(it+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"")}else(!he(ne)||t>-1&&it>t)&&(sessionStorage.getItem("ifr")!==y&&function(t,n){console.info(`${Se} %ciframe-resizer ${t}`,$e||n<1?"font-weight: bold;":e)}(`v${y} (${(e=>oe(ae[e]))(it)})`,it),it<2&&Fe(ce(3)),sessionStorage.setItem("ifr",y))}function mn(){var e;!0!==se&&je("Auto Resize disabled"),Xt({method:e="add",eventType:"After Print",eventName:"afterprint"}),Xt({method:e,eventType:"Before Print",eventName:"beforeprint"})}function pn(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}function hn(){function e(e){const t=e.getBoundingClientRect(),n={x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop};return{x:parseInt(t.left,k)+parseInt(n.x,k),y:parseInt(t.top,k)+parseInt(n.y,k)}}function t(t){const n=t.split("#")[1]||t,o=decodeURIComponent(n),r=document.getElementById(o)||document.getElementsByName(o)[0];void 0===r?(je(`In page link (#${n}) not found in iframe, so sending to parent`),Qn(0,0,"inPageLink",`#${n}`)):function(t){const o=e(t);je(`Moving to in page link (%c#${n}%c) at x: %c${o.x}%c y: %c${o.y}`,h,g,h,g,h),Qn(o.y,o.x,M)}(r)}function n(){const{hash:e,href:n}=window.location;""!==e&&"#"!==e&&t(n)}const{enable:o}=Ye;o?1===it?Fe(ce(5)):(je("Setting up location.hash handlers"),function(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&st(e,"click",n=>{n.preventDefault(),t(e.getAttribute("href"))})}(),st(window,"hashchange",n),setTimeout(n,128)):je("In page linking not enabled"),Ye={...Ye,findTarget:t}}function gn(){function e(e){Qn(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){je(`Add event listener: %c${n}`,h),st(window.document,t,e)}!0===ct&&(t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave"))}function yn(){1!==it&&(Ot.parentIframe=Object.freeze({autoResize:e=>(ye(e,"boolean","parentIframe.autoResize(enable) enable"),!1===ke&&!1===Me?(Re(H),Fe("Auto Resize can not be changed when <b>direction</> is set to 'none'."),!1):(!0===e&&!1===se?(se=!0,queueMicrotask(()=>Zn(H,"Auto Resize enabled"))):!1===e&&!0===se&&(se=!1),Qn(0,0,"autoResize",JSON.stringify(se)),se)),close(){Qn(0,0,"close")},getId:()=>ft,getOrigin:()=>(Re("getOrigin"),He("getOrigin()","getParentOrigin()"),d),getParentOrigin:()=>d,getPageInfo(e){if(typeof e===L)return kt=e,Qn(0,0,S),void Ve("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");kt=null,Qn(0,0,"pageInfoStop")},getParentProps:e=>(ye(e,L,"parentIframe.getParentProps(callback) callback"),jt=e,Qn(0,0,O),()=>{jt=null,Qn(0,0,"parentInfoStop")}),getParentProperties(e){He("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){ye(e,R,"parentIframe.moveToAnchor(anchor) anchor"),Ye.findTarget(e)},reset(){!function(){const e=_e;_e=a,je(`Reset trigger event: %c${"parentIframe.reset"}`,h),wt?je("TriggerLock blocked calculation"):(wt=!0,Ie("Trigger event lock on"),requestAnimationFrame(()=>{wt=!1,Ie("Trigger event lock off")})),Jn("reset"),_e=e}()},setOffsetSize(e){ye(e,N,"parentIframe.setOffsetSize(offset) offset"),lt=e,dt=e,Zn(_,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){ye(e,N,"parentIframe.scrollBy(x, y) x"),ye(t,N,"parentIframe.scrollBy(x, y) y"),Qn(t,e,"scrollBy")},scrollTo(e,t){ye(e,N,"parentIframe.scrollTo(x, y) x"),ye(t,N,"parentIframe.scrollTo(x, y) y"),Qn(t,e,"scrollTo")},scrollToOffset(e,t){ye(e,N,"parentIframe.scrollToOffset(x, y) x"),ye(t,N,"parentIframe.scrollToOffset(x, y) y"),Qn(t,e,M)},sendMessage(e,t){t&&ye(t,R,"parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),Qn(0,0,w,JSON.stringify(e),t)},setHeightCalculationMethod(e){_e=e,on()},setWidthCalculationMethod(e){St=e,rn()},setTargetOrigin(e){ye(e,R,"parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),je(`Set targetOrigin: %c${e}`,h),vt=e},resize(e,t){void 0!==e&&ye(e,N,"parentIframe.resize(customHeight, customWidth) customHeight"),void 0!==t&&ye(t,N,"parentIframe.resize(customHeight, customWidth) customWidth"),Zn(U,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){He("size()","resize()"),this.resize(e,t)}}),Ot.parentIFrame=Ot.parentIframe)}let bn=new Set;function vn(){const e=document.querySelectorAll(`[${x}]`);ut=function(e){const t=new Set,n=new Set;for(const o of e)o.closest(`[${I}]`)?n.add(o):t.add(o);return n.size>0&&queueMicrotask(()=>{Re("overflowIgnored"),xe("Ignoring elements with [data-iframe-ignore] > *:\n",n),Ae()}),t}(e),De=ut.size>0,typeof Set.prototype.symmetricDifference===L&&(We=ut.symmetricDifference(bn).size>0),bn=ut}function zn(){switch(vn(),!0){case!We:return;case ut.size>1:xe("Overflowed Elements:",ut);break;case De:break;default:xe("No overflow detected")}Zn(G,"Overflow updated")}function wn(e){const t={root:document.documentElement,side:Me?F:W};return u=Dt(zn,t),u.attachObservers(e),u}function $n(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Zn(Q,`Element resized <${function(e){switch(!0){case!he(e):return"";case he(e.id):return`${e.nodeName}#${e.id}`;case he(e.name):return`${e.nodeName} (${e.name}`;case he(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}function Sn(e){return an=new ResizeObserver($n),an.observe(document.body),nn.add(document.body),xe("Attached%c ResizeObserver%c to body",h,g),f={attachObserverToNonStaticElements:sn,detachObservers:mt(Yt,an,nn,Kt),disconnect:()=>{an.disconnect(),xe("Detached%c ResizeObserver",h)}},f.attachObserverToNonStaticElements(e),f}function On(e){je(`Visible: %c${e}`,h),Xe=!e,Zn(X,"Visibility changed")}const Mn=e=>{const t=new Set;for(const n of e){t.add(n);for(const e of Cn(n))t.add(e)}return xe("Inspecting:\n",t),t},En=e=>{if(0===e.size)return;Re("addObservers");const t=Mn(e);u.attachObservers(t),f.attachObserverToNonStaticElements(t),Ae()},kn=e=>{if(0===e.size)return;Re("removeObservers");const t=Mn(e);u.detachObservers(t),f.detachObservers(t),Ae()};function jn(e){!function({addedNodes:e,removedNodes:t}){Re("contentMutated"),Jt(),Rt(),vn(),Ae(),kn(t),En(e)}(e),Zn(Y,"Mutation Observed")}function xn(){const e=Cn(document.documentElement);var t;t=[Ct(jn),wn(e),Gt(),Sn(e),cn(On)],rt.push(...t.map(e=>e.disconnect))}function In(e){performance.mark(Ft);const t=pe(e);let n=1,o=document.documentElement,r=Ze?0:document.documentElement.getBoundingClientRect().bottom;const i=Ze?yt:De?Array.from(ut):Cn(document.documentElement);for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return xe(`${t} position calculated from:`,o),xe(`Checked %c${i.length}%c elements`,h,g),performance.mark(Wt,{detail:{hasTags:Ze,len:i.length,logging:tt,Side:t}}),r}const Tn=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],An=`* ${Array.from(te).map(e=>`:not(${e})`).join("")}`,Cn=e=>e.querySelectorAll(An),Pn={height:0,width:0},Rn={height:0,width:0},Nn=[h,g,h];function qn(e){function t(){return Rn[o]=r,Pn[o]=s,Math.max(r,1)}const n=e===Ln,o=e.label,r=e.boundingClientRect(),i=Math.ceil(r),a=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),c=`HTML: %c${r}px %cPage: %c${s}px`;let l=1;switch(!0){case!e.enabled():return Math.max(s,1);case Ze:xe("Found element with data-iframe-size attribute"),l=e.taggedElement();break;case!De&&qe&&0===Rn[o]&&0===Pn[o]:xe(`Initial page size values: ${c}`,...Nn),l=t();break;case wt&&r===Rn[o]&&s===Pn[o]:xe(`Size unchanged: ${c}`,...Nn),l=Math.max(r,s);break;case 0===r&&0!==s:xe(`Page is hidden: ${c}`,...Nn),l=s;break;case!De&&r!==Rn[o]&&s<=Pn[o]:xe(`New <html> size: ${c} `,...Nn),xe(`Previous <html> size: %c${Rn[o]}px`,h),l=t();break;case!n:l=e.taggedElement();break;case!De&&r<Rn[o]:xe(`<html> size decreased: ${c}`,...Nn),l=t();break;case s===a||s===i:xe(`<html> size equals page size: ${c}`,...Nn),l=t();break;case r>s:xe(`Page size < <html> size: ${c}`,...Nn),l=t();break;case De:xe("Found elements possibly overflowing <html> "),l=e.taggedElement();break;default:xe(`Using <html> size: ${c}`,...Nn),l=t()}return xe(`Content ${o}: %c${l}px`,h),l+=function(e){const t=e.getOffset();return 0!==t&&xe(`Page offsetSize: %c${t}px`,h),t}(e),Math.max(l,1)}const Ln={label:T,enabled:()=>Me,getOffset:()=>lt,auto:()=>qn(Ln),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,k)+parseInt(t.marginBottom,k)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Ln.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(...Tn(Ln)),min:()=>Math.min(...Tn(Ln)),grow:()=>Ln.max(),lowestElement:()=>In(F),taggedElement:()=>In(F)},Bn={label:A,enabled:()=>ke,getOffset:()=>dt,auto:()=>qn(Bn),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(...Tn(Bn)),min:()=>Math.min(...Tn(Bn)),rightMostElement:()=>In(W),scroll:()=>Math.max(Bn.bodyScroll(),Bn.documentElementScroll()),taggedElement:()=>In(W)},Dn=(e,t)=>!(Math.abs(e-t)<=zt);function Fn(e,t){const n=e[t](),o=e.enabled()&&void 0!==ie?function(e){const t=ie(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`);if(t<1)throw new RangeError(`Out of range value returned from onBeforeResize(): ${t}, must be at least 1`);return t}(n):n;return Te(o>=1,`New iframe ${e.label} is too small: ${o}, must be at least 1`),o}let Wn=!1;const Hn=ue(()=>Fe(ce(4)));let Vn,Un=!1;const Zn=Pe((e,t,n,o,r)=>{switch(Re(e),!0){case!0===Xe:if(!0===Un)break;je("Iframe hidden - Ignored resize request"),Un=!0,Wn=!1,cancelAnimationFrame(Vn);break;case!0===Wn&&e!==G:je("Resize already pending - Ignored resize request");break;case!se&&!(e in J):xe("Resizing disabled");break;default:Un=!1,Wn=!0,p=performance.now(),m=!0,Vn||(Vn=requestAnimationFrame(()=>{Wn=!1,Vn=null,Re("requestAnimationFrame"),Ie(`Reset sendPending: %c${e}`,h)})),function(e,t,n,o,r){const i=n??Fn(Ln,_e),a=o??Fn(Bn,St),s=Me&&Dn(Je,i)||ke&&Dn($t,a)?V:e;switch(je(`Resize event: %c${t}`,h),s){case z:case H:case V:Je=i,$t=a;case _:_n(Je,$t,e,r);break;case G:case Y:case Q:case X:je(K);break;default:xe(K)}m=!1}(e,t,n,o,r)}Ae()});function Jn(e){Je=Ln[_e](),$t=Bn[St](),Qn(Je,$t,e)}function _n(e,t,o,r,i){it<-1||(void 0!==i?je(`Message targetOrigin: %c${i}`,h):i=vt,function(){const a=`${ft}:${e}:${t}:${o}${void 0===r?"":`:${r}`}`;if(ht)try{window.parent.iframeParentListener(ee+a)}catch(e){if(1!==it)throw e;return void Hn()}else bt.postMessage(ee+a,i);m&&je(function(){const e=me(performance.now()-p);return o===z?`Initialised iframe in %c${e}ms`:`Size calculated in %c${e}ms`}(),h),xe(`Sending message to parent page via ${ht?"sameOrigin":"postMessage"}: %c%c${a}`,n,h)}())}const Qn=Pe((e,t,n,o,r)=>{Re(n),_n(e,t,n,o,r),Ae()}),Gn=Pe(function(e){Re("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>t(n(e)),r=e=>Qn(0,0,`${e}Stop`),i={init:function(){if("loading"===document.readyState)return void je("Page not ready, ignoring init message");const t=e.data.slice(13).split(v);bt=e.source,d=e.origin,xt(t),qe=!1,setTimeout(()=>{Ge=!1},128)},reset(){Ge?je("Page reset ignored by init"):(je("Page size reset by host page"),Jn("resetPage"))},resize(){je("Resize requested by host page"),Zn(Z,"Parent window requested size check")},moveToAnchor(){Ye.findTarget(s())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=s();je("PageInfo received from parent:",o(e)),kt?de(kt,n(e)):r(S)},parentInfo(){const e=o(s());je("ParentInfo received from parent:",e),jt?de(jt,e):r(O)},message(){const e=s();je("onMessage called from parent:%c",h,o(e)),de(Mt,n(e))}},a=()=>e.data.split("]")[1].split(v)[0],s=()=>e.data.slice(e.data.indexOf(v)+1),c=()=>e.data.split(v)[2]in{true:1,false:1};function l(){const t=a();Re(t),t in i?i[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||c()||Le(`Unexpected message (${e.data})`)}ee===`${e.data}`.slice(0,13)&&function(){if(!1!==qe)return c()?(Ne(a()),Re(z),void i.init()):void je(`Ignored message of type "${a()}". Received before initialization.`);l()}()});let Yn=!1;const Xn=e=>e.postMessage("[iFrameResizerChild]Ready",window?.iframeResizer?.targetOrigin||"*");function Kn(){if("loading"===document.readyState||!qe||Yn)return;const{parent:e,top:t}=window;Re("ready"),je("Sending%c ready%c to parent from",h,g,window.location.href),Xn(e),e!==t&&Xn(t),Yn=!0}"iframeChildListener"in window?Le("Already setup"):(window.iframeChildListener=e=>setTimeout(()=>Gn({data:e,sameOrigin:!0})),Re("listen"),st(window,w,Gn),st(document,D,Kn),Kn())}()}();
20
+ !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:!1,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},s={profile:0,profileEnd:0,timeStamp:0,trace:0},c=Object.assign(console);const{fromEntries:l,keys:d}=Object,u=e=>[e,c[e]],f=e=>t=>[t,function(n){e[t]=n}],m=(e,t)=>l(d(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.8-beta.4",b="iframeResizer",v=":",z="init",w="message",$="pageHide",S="pageInfo",O="parentInfo",M="scrollToOffset",E="title",k=10,j="data-iframe-size",x="data-iframe-overflowed",I="data-iframe-ignore",T="height",A="width",C="offset",P="offsetSize",R="string",N="number",q="object",L="function",B="auto",D="readystatechange",F="bottom",W="right",H="autoResizeEnabled",V=Symbol("sizeChanged"),U="manualResize",Z="parentResize",J={[U]:1,[Z]:1},_="setOffsetSize",Q="resizeObserver",G="overflowObserver",Y="mutationObserver",X="visibilityObserver",K="No change in content size detected",ee="[iFrameSizer]",te=new Set(["head","body","meta","base","title","script","link","style","map","area","option","optgroup","template","track","wbr","nobr"]),ne=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)},oe=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),re=["spjluzl","rlf","clyzpvu"],ie=["<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.","Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz."],ae=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],se=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),ce=e=>oe(ie[e]);var le=e=>{const t=e[oe(re[0])]||e[oe(re[1])]||e[oe(re[2])];if(!t)return-1;const n=t.split("-");let o=function(e=""){let t=-2;const n=ne(oe(e));return n in se&&(t=se[n]),t}(n[0]);return 0===o||(e=>e[2]===ne(e[0]+e[1]))(n)||(o=-2),o};const de=(e,...t)=>setTimeout(()=>e(...t),0),ue=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},fe=e=>e,me=e=>Math.round(1e3*e)/1e3,pe=e=>e.charAt(0).toUpperCase()+e.slice(1),he=e=>""!=`${e}`&&void 0!==e,ge=e=>e();const ye=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${pe(t)}`)};const be={br:"\n",rb:"",bb:"",b:"",i:"",u:"","/":""},ve=Object.keys(be),ze=new RegExp(`<(${ve.join("|")})>`,"gi"),we=(e,t)=>be[t]??"";let $e=!0,Se=b;const Oe=(Me=function(n={}){const l={},d={},p=[],h={...a,expand:!n.collapsed||a.expanded,...n};let g="";function y(){p.length=0,g=""}function b(){delete h.event,y()}const v=()=>!!p.some(([e])=>e in i)||!!h.expand;function z(){if(0!==p.length){c[v()?"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)c.assert(e in c,`Unknown console method: ${e}`),e in c&&c[e](...t);c.groupEnd(),b()}else b()}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)}`}(),queueMicrotask(()=>queueMicrotask(z)))}function $(e,...t){0===p.length&&w(),p.push([e,...t])}function S(e=r,...t){l[e]?$("log",`${e}: ${performance.now()-l[e]} ms`,...t):$("timeLog",e,...t)}return{...m(h,f(h)),...m(console,e=>[e,(...t)=>$(e,...t)]),...m(s,u),assert:function(e,...t){!0!==e&&$("assert",e,...t)},count:function(e=r){d[e]?d[e]+=1:d[e]=1,$("log",`${e}: ${d[e]}`)},countReset:function(e=r){delete d[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(),l[e]=performance.now()},timeEnd:function(e=r){S(e),delete l[e]},timeLog:S,touch:w}},Me?.__esModule?Me.default:Me);var Me;const Ee=Oe({label:`${b}(child)`,expand:!1});const ke=e=>(...t)=>!$e||Ee[e](...t),je=ke("log"),xe=je,Ie=ke("debug");const{assert:Te,endAutoGroup:Ae,error:Ce,errorBoundary:Pe,event:Re,label:Ne,purge:qe,warn:Le}=Ee,Be=(De=fe,e=>De(typeof e===R?window.chrome?e.replace(ze,we):(e=>e.replaceAll("<br>","\n").replaceAll(/<\/?[^>]+>/gi,""))(e):e));var De;const Fe=(...e)=>Ee.warn(...e.map(Be)),We=(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)=>Fe(t)),He=We("Method"),Ve=We("Method","replaced with"),Ue=We("Option"),Ze=["min-height","min-width","max-height","max-width"],Je=new Set,_e=e=>e.tagName?e.tagName.toLowerCase():"unknown",Qe=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),Ge=(e,t)=>{return(n=Qe(e,t))&&"0px"!==n&&n!==B&&"none"!==n;var n};function Ye({href:e}){Je.has(e)||(je("Unable to access stylesheet:",e),Je.add(e))}const Xe=(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){Ye(n)}return{source:"cross-origin stylesheet",value:Qe(e,t)}}(e,t),Ke=(e,t)=>{const{source:n,value:o}=Xe(e,t),r=_e(e);Fe(`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 et(){for(const e of[document.documentElement,document.body])for(const t of Ze)je(`Checking <${_e(e)}> for blocking CSS: ${t}`),Ge(e,t)&&Ke(e,t)}const tt=e=>t=>void 0===t?void 0:e(t),nt=tt(e=>"true"===e),ot=tt(Number),rt=[];function it(e,t){je(`${e} event listener: %c${t}`,h)}const at=(e,t,n,o)=>{e.removeEventListener(t,n,o),it("Removed",t)},st=(e,t,n,o=!1)=>{e.addEventListener(t,n,o),rt.push(()=>at(e,t,n,o)),it("Added",t)},ct=(e="")=>t=>n=>{n.size>0&&Ie(`${t}Observer ${e}:`,...Array.from(n).flatMap(e=>["\n",e]))},lt=ct("attached to"),dt=((e="")=>t=>n=>{n.size>0&&Ce(`${t}Observer ${e}:`,...Array.from(n).flatMap(e=>["\n",e]))})("already attached"),ut=ct("detached from"),ft=(t,n=!0)=>o=>{o>0&&xe(`${n?"At":"De"}tached %c${t}Observer%c ${n?"to":"from"} %c${o}%c element${1===o?"":"s"}`,h,e,h,e)},mt=(e,t,n,o)=>{const r=ut(e);return e=>{const i=new Set;let a=0;for(const o of e)n.has(o)&&(t.unobserve(o),n.delete(o),i.add(o),a+=1);r(i),o(a),i.clear()}},pt="Mutation",ht=new Set,gt=new Set,yt=new Set,bt=[],vt={attributes:!0,attributeFilter:[I,j],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};let zt,wt=1,$t=!1,St=0;const Ot=ct("added")(pt),Mt=ct("removed (page)")(pt),Et=ct("removed (added)")(pt),kt=e=>e.nodeType!==Node.ELEMENT_NODE||te.has(e.tagName.toLowerCase());function jt(e){const t=e.addedNodes;for(const e of t)kt(e)||ht.add(e)}function xt(e){const t=e.removedNodes;for(const e of t)kt(e)||(ht.has(e)?(ht.delete(e),yt.add(e)):gt.add(e))}const It=e=>{xe("Mutations:",e);for(const t of e)jt(t),xt(t);Ot(ht),Mt(gt),Et(yt),yt.clear()};const Tt=e=>()=>{const t=performance.now(),n=t-St,o=16*wt+++2;if(n>o&&n<200)return Re("mutationThrottled"),xe("Update delayed due to heavy workload on the callStack"),xe(`EventLoop busy time: %c${me(n)}ms %c> Max wait: %c${o-2}ms`,h,g,h),setTimeout(zt,16*wt),void(St=t);wt=1,bt.forEach(It),bt.length=0,$t=!1,gt.size>0&&je(`Detected %c${gt.size} %cremoved element${gt.size>1?"s":""}`,h,g),ht.size>0&&je(`Found %c${ht.size} %cnew element${ht.size>1?"s":""}`,h,g),e({addedNodes:ht,removedNodes:gt}),ht.clear(),gt.clear()};function At(e){bt.push(e),$t||(St=performance.now(),$t=!0,requestAnimationFrame(zt))}function Ct(e){const t=new window.MutationObserver(At),n=document.body||document.documentElement;return zt=Tt(e),t.observe(n,vt),xe("Attached%c MutationObserver%c to body",h,g),{...t,disconnect:()=>{ht.clear(),gt.clear(),bt.length=0,t.disconnect(),xe("Detached%c MutationObserver",h)}}}const Pt="Overflow",Rt=ft(Pt),Nt=ft(Pt,!1),qt=lt(Pt),Lt=dt(Pt),Bt=e=>e.hidden||null===e.offsetParent||"none"===e.style.display,Dt=(e,t)=>{const n=t.side,o={root:t.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||fe,i=(t=!1)=>e(t),a=(e,t)=>0===e||e>t[n],s=(e,t)=>e.toggleAttribute(x,t);const c=new IntersectionObserver(function(e){for(const t of e){const{boundingClientRect:e,rootBounds:o,target:r}=t;if(!o)continue;const i=e[n],c=a(i,o)&&!Bt(r);s(r,c)}r(i)},o),l=new WeakSet;return{attachObservers:function(e){const t=new Set,n=new Set;let o=0;for(const r of e)r.nodeType===Node.ELEMENT_NODE&&(l.has(r)?t.add(r):(c.observe(r),l.add(r),n.add(r),o+=1));Lt(t),qt(n),Rt(o),n.clear(),t.clear()},detachObservers:mt(Pt,c,l,Nt),disconnect:()=>{c.disconnect(),xe("Detached%c OverflowObserver",h)}}},Ft="--ifr-start",Wt="--ifr-end",Ht="--ifr-measure",Vt=[];let Ut,Zt={},Jt=0;function _t(){try{performance.clearMarks(Ft),performance.clearMarks(Wt),performance.clearMeasures(Ht)}catch{}}function Qt(e){e.getEntries().forEach(e=>{if(e.name===Wt)try{const{duration:t}=performance.measure(Ht,Ft,Wt);Zt=e.detail,Vt.push(t),Vt.length>100&&Vt.shift()}catch{}})}function Gt(){xe("Attached%c PerformanceObserver%c to page",h,g);const e=new PerformanceObserver(Qt);return e.observe({entryTypes:["mark"]}),Ut=setInterval(()=>{if(Vt.length<10)return;if(Zt.hasTags&&Zt.len<25)return;Vt.sort();const e=Math.min(Vt.reduce((e,t)=>e+t,0)/Vt.length,Vt[Math.floor(Vt.length/2)]),t=me(e);t>Jt&&(Jt=t,Re("performanceObserver"),je("Mean time:",me(Vt[Math.floor(Vt.length/2)])),je("Median time:",me(Vt.reduce((e,t)=>e+t,0)/Vt.length)),je("Average time:",t),je("Max time:",me(Math.max(...Vt)))),_t(),e<=4||(clearInterval(Ut),Fe(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${me(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${Zt.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))},5e3),{disconnect:()=>{_t(),clearInterval(Ut),e.disconnect(),xe("Detached%c PerformanceObserver",h)}}}const Yt="Resize",Xt=ft(Yt),Kt=ft(Yt,!1),en=lt(Yt),tn=dt(Yt),nn=new WeakSet,on=new Set,rn=new Set;let an;function sn(e){let t=0;for(const n of e){if(n.nodeType!==Node.ELEMENT_NODE)continue;const e=getComputedStyle(n)?.position;""!==e&&"static"!==e&&(nn.has(n)?on.add(n):(an.observe(n),nn.add(n),rn.add(n),t+=1))}tn(on),en(rn),Xt(t),rn.clear(),on.clear()}function cn(e){const t=new IntersectionObserver(t=>e(t.at(-1).isIntersecting),{threshold:0}),n=document.documentElement;return t.observe(n),xe("Attached%c VisibilityObserver%c to page",h,g),{disconnect:()=>{t.disconnect(),xe("Detached%c VisibilityObserver",h)}}}const ln=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},dn=ln(L),un=ln(N),fn=ln(R);"undefined"!=typeof window&&function(){const o={height:()=>(Le("Custom height calculation function not defined"),Ln.auto()),width:()=>(Le("Custom width calculation function not defined"),Bn.auto())},r={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},i={},a=B,s="scroll";let c,l,d,u,f,m,p,ne,ie,se=!0,be="",ve=0,ze="",we="",Oe=!1,Me=!0,ke=!1,qe=!0,Be=!1,De=!1,We=!0,Ze=!1,Je=1,_e=a,Qe="",Ge=!0,Ye={},Xe=!1,Ke=!1,tt=!1,it=0,ct=!1,lt=0,dt=0,ut=new Set,ft="",pt="child",ht=!1,gt="",yt=[],bt=window.parent,vt="*",zt=0,wt=!1,$t=1,St=s,Ot=window,Mt=()=>{Le("onMessage function not defined")},Et=()=>{},kt=null,jt=null;function xt(e){var t;!function(e){ft=e[0]??ft,ve=ot(e[1])??ve,ke=nt(e[2])??ke,tt=nt(e[3])??tt,se=nt(e[6])??se,ze=e[7]??ze,_e=e[8]??_e,be=e[9]??be,we=e[10]??we,zt=ot(e[11])??zt,Ye.enable=nt(e[12])??!1,pt=e[13]??pt,St=e[14]??St,ct=nt(e[15])??ct,lt=ot(e[16])??lt,dt=ot(e[17])??dt,Me=nt(e[18])??Me,c=e[19]??c,ne=e[20]??ne,it=ot(e[21])??it,Ke=nt(e[23])??Ke}(e),Se=(t={id:ft,enabled:tt,expand:Ke}).id||b,Ee.label(`${Se}`),Ee.expand(t.expand),$e=t.enabled,Re("initReceived"),je(`Initialising iframe v${y} ${window.location.href}`),function(){function e(e){je("Reading data from page:",Object.keys(e)),ie=dn(e,"onBeforeResize")??ie,Mt=dn(e,"onMessage")??Mt,Et=dn(e,"onReady")??Et,typeof e?.offset===N&&(Ue(C,P),Me&&(lt=un(e,C)??lt),ke&&(dt=un(e,C)??dt)),typeof e?.offsetSize===N&&(Me&&(lt=un(e,P)??lt),ke&&(dt=un(e,P)??dt)),l=fn(e,oe(re[0]))??l,Qe=fn(e,"ignoreSelector")??Qe,gt=fn(e,"sizeSelector")??gt,vt=fn(e,"targetOrigin")??vt,_e=e?.heightCalculationMethod||_e,St=e?.widthCalculationMethod||St}function t(e,t){return typeof e===L&&(Fe(`<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===it)return;const n=window.iframeResizer||window.iFrameResizer;typeof n===q&&(e(n),_e=t(_e,T),St=t(St,A),xe(`Set targetOrigin for parent: %c${vt}`,h))}(),[Bt,Vt,ln,qt,Ht,on,rn,en,Lt,Rt,Oe?fe:et,_t,()=>Ut("background",be),()=>Ut("padding",we),Oe?fe:Qt,pn,Jt,xn,hn,mn,gn,Tt,yn].forEach(e=>{try{e()}catch(e){if(it<0)throw e;Fe("<rb>Error in setup function</>\n<i>iframe-resizer</> detected an error during setup.\n\nPlease report the following error message at <u>https://github.com/davidjbradshaw/iframe-resizer/issues</>"),Ce(e)}}),Pt(ue(Et)),je("Initialization complete"),Ae(),Zn(z,"Init message from host page",void 0,void 0,`${y}:${it}`),document.title&&""!==document.title&&Qn(0,0,E,document.title)}function It({persisted:e}){e||Qn(0,0,"beforeUnload"),Re($),xe("Page persisted:",e),e||rt.forEach(ge)}const Tt=()=>st(window,$.toLowerCase(),It);let At=!1;function Pt(e){"complete"===document.readyState?de(e):At||st(document,D,()=>Pt(e)),At=!0}function Rt(){yt=document.querySelectorAll(`[${j}]`),Ze=yt.length>0,je(`Tagged elements found: %c${Ze}`,h)}let Nt=0;function qt(){const n=document.querySelectorAll(`*[${I}]`);return Be=n.length>0,Be&&n.length!==Nt&&(function(n){const o=1===n.length?"":"s";Le(`%c[${I}]%c found on %c${n.length}%c element${o}`,t,e,t,e)}(n),Nt=n.length),Be}function Lt(){"BackCompat"===document.compatMode&&Fe("<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")}function Bt(){ne&&""!==ne&&"false"!==ne?ne!==y&&Fe(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ne} - Child page: ${y}.\n`):Fe("<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")}function Ht(){try{ht=1===it||"iframeParentListener"in window.parent}catch(e){je("Cross domain iframe detected")}}function Vt(){ke===Me&&(Oe=!0)}function Ut(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),xe(`Set body ${e}: %c${t}`,h))}function Zt(e,t,n){if(""!==n){je(`${e}: %c${n}`,h);for(const e of document.querySelectorAll(n))je(`Applying ${t} to:`,e),e.toggleAttribute(t,!0)}}function Jt(){Zt("sizeSelector",j,gt),Zt("ignoreSelector",I,Qe)}function _t(){var e,t;void 0===ze&&(ze=`${ve}px`),Ut("margin",(e="margin",(t=ze).includes("-")&&(Le(`Negative CSS value ignored for ${e}`),t=""),t))}function Qt(){const e=e=>e.style.setProperty(T,B,"important");e(document.documentElement),e(document.body),je("Set HTML & body height: %cauto !important",h)}function Xt(e){({add(t){function n(){Zn(e.eventName,e.eventType)}i[t]=n,st(window,t,n,{passive:!0})},remove(e){const t=i[e];delete i[e],at(window,e,t)}})[e.method](e.eventName)}function en(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach(n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(j,!0)});t("data-iframe-height"),t("data-iframe-width"),e&&Fe("<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</>.")}function tn(e,t,n){const{label:o}=n;return t!==e&&(e in n||(Le(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in r)&&Fe(`<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 ${ne?"remove this option.":`set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page. This can be done on the child page by adding the following code:\n\nwindow.iframeResizer = {\n license: 'xxxx',\n ${o}CalculationMethod: '${B}',\n}\n`}\n`),je(`Set ${o} calculation method: %c${e}`,h),e}function on(){_e=tn(_e,a,Ln)}function rn(){St=tn(St,s,Bn)}function ln(){const t=it,n=le({key:c}),o=le({key:l});if(it=Math.max(n,o),it<0){if(it=Math.min(n,o),Fe(`${ce(it+2)}${ce(2)}`),he(ne))throw ce(it+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"")}else(!he(ne)||t>-1&&it>t)&&(sessionStorage.getItem("ifr")!==y&&function(t,n){console.info(`${Se} %ciframe-resizer ${t}`,$e||n<1?"font-weight: bold;":e)}(`v${y} (${(e=>oe(ae[e]))(it)})`,it),it<2&&Fe(ce(3)),sessionStorage.setItem("ifr",y))}function mn(){var e;!0!==se&&je("Auto Resize disabled"),Xt({method:e="add",eventType:"After Print",eventName:"afterprint"}),Xt({method:e,eventType:"Before Print",eventName:"beforeprint"})}function pn(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}function hn(){function e(e){const t=e.getBoundingClientRect(),n={x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop};return{x:parseInt(t.left,k)+parseInt(n.x,k),y:parseInt(t.top,k)+parseInt(n.y,k)}}function t(t){const n=t.split("#")[1]||t,o=decodeURIComponent(n),r=document.getElementById(o)||document.getElementsByName(o)[0];void 0===r?(je(`In page link (#${n}) not found in iframe, so sending to parent`),Qn(0,0,"inPageLink",`#${n}`)):function(t){const o=e(t);je(`Moving to in page link (%c#${n}%c) at x: %c${o.x}%c y: %c${o.y}`,h,g,h,g,h),Qn(o.y,o.x,M)}(r)}function n(){const{hash:e,href:n}=window.location;""!==e&&"#"!==e&&t(n)}const{enable:o}=Ye;o?1===it?Fe(ce(5)):(je("Setting up location.hash handlers"),function(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&st(e,"click",n=>{n.preventDefault(),t(e.getAttribute("href"))})}(),st(window,"hashchange",n),setTimeout(n,128)):je("In page linking not enabled"),Ye={...Ye,findTarget:t}}function gn(){function e(e){Qn(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){je(`Add event listener: %c${n}`,h),st(window.document,t,e)}!0===ct&&(t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave"))}function yn(){1!==it&&(Ot.parentIframe=Object.freeze({autoResize:e=>(ye(e,"boolean","parentIframe.autoResize(enable) enable"),!1===ke&&!1===Me?(Re(H),Fe("Auto Resize can not be changed when <b>direction</> is set to 'none'."),!1):(!0===e&&!1===se?(se=!0,queueMicrotask(()=>Zn(H,"Auto Resize enabled"))):!1===e&&!0===se&&(se=!1),Qn(0,0,"autoResize",JSON.stringify(se)),se)),close(){Qn(0,0,"close")},getId:()=>ft,getOrigin:()=>(Re("getOrigin"),He("getOrigin()","getParentOrigin()"),d),getParentOrigin:()=>d,getPageInfo(e){if(typeof e===L)return kt=e,Qn(0,0,S),void Ve("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");kt=null,Qn(0,0,"pageInfoStop")},getParentProps:e=>(ye(e,L,"parentIframe.getParentProps(callback) callback"),jt=e,Qn(0,0,O),()=>{jt=null,Qn(0,0,"parentInfoStop")}),getParentProperties(e){He("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){ye(e,R,"parentIframe.moveToAnchor(anchor) anchor"),Ye.findTarget(e)},reset(){!function(){const e=_e;_e=a,je(`Reset trigger event: %c${"parentIframe.reset"}`,h),wt?je("TriggerLock blocked calculation"):(wt=!0,Ie("Trigger event lock on"),requestAnimationFrame(()=>{wt=!1,Ie("Trigger event lock off")})),Jn("reset"),_e=e}()},setOffsetSize(e){ye(e,N,"parentIframe.setOffsetSize(offset) offset"),lt=e,dt=e,Zn(_,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){ye(e,N,"parentIframe.scrollBy(x, y) x"),ye(t,N,"parentIframe.scrollBy(x, y) y"),Qn(t,e,"scrollBy")},scrollTo(e,t){ye(e,N,"parentIframe.scrollTo(x, y) x"),ye(t,N,"parentIframe.scrollTo(x, y) y"),Qn(t,e,"scrollTo")},scrollToOffset(e,t){ye(e,N,"parentIframe.scrollToOffset(x, y) x"),ye(t,N,"parentIframe.scrollToOffset(x, y) y"),Qn(t,e,M)},sendMessage(e,t){t&&ye(t,R,"parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),Qn(0,0,w,JSON.stringify(e),t)},setHeightCalculationMethod(e){_e=e,on()},setWidthCalculationMethod(e){St=e,rn()},setTargetOrigin(e){ye(e,R,"parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),je(`Set targetOrigin: %c${e}`,h),vt=e},resize(e,t){void 0!==e&&ye(e,N,"parentIframe.resize(customHeight, customWidth) customHeight"),void 0!==t&&ye(t,N,"parentIframe.resize(customHeight, customWidth) customWidth"),Zn(U,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){He("size()","resize()"),this.resize(e,t)}}),Ot.parentIFrame=Ot.parentIframe)}let bn=new Set;function vn(){const e=document.querySelectorAll(`[${x}]`);ut=function(e){const t=new Set,n=new Set;for(const o of e)o.closest(`[${I}]`)?n.add(o):t.add(o);return n.size>0&&queueMicrotask(()=>{Re("overflowIgnored"),xe("Ignoring elements with [data-iframe-ignore] > *:\n",n),Ae()}),t}(e),De=ut.size>0,typeof Set.prototype.symmetricDifference===L&&(We=ut.symmetricDifference(bn).size>0),bn=ut}function zn(){switch(vn(),!0){case!We:return;case ut.size>1:xe("Overflowed Elements:",ut);break;case De:break;default:xe("No overflow detected")}Zn(G,"Overflow updated")}function wn(e){const t={root:document.documentElement,side:Me?F:W};return u=Dt(zn,t),u.attachObservers(e),u}function $n(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Zn(Q,`Element resized <${function(e){switch(!0){case!he(e):return"";case he(e.id):return`${e.nodeName}#${e.id}`;case he(e.name):return`${e.nodeName} (${e.name}`;case he(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}function Sn(e){return an=new ResizeObserver($n),an.observe(document.body),nn.add(document.body),xe("Attached%c ResizeObserver%c to body",h,g),f={attachObserverToNonStaticElements:sn,detachObservers:mt(Yt,an,nn,Kt),disconnect:()=>{an.disconnect(),xe("Detached%c ResizeObserver",h)}},f.attachObserverToNonStaticElements(e),f}function On(e){je(`Visible: %c${e}`,h),Xe=!e,Zn(X,"Visibility changed")}const Mn=e=>{const t=new Set;for(const n of e){t.add(n);for(const e of Cn(n))t.add(e)}return xe("Inspecting:\n",t),t},En=e=>{if(0===e.size)return;Re("addObservers");const t=Mn(e);u.attachObservers(t),f.attachObserverToNonStaticElements(t),Ae()},kn=e=>{if(0===e.size)return;Re("removeObservers");const t=Mn(e);u.detachObservers(t),f.detachObservers(t),Ae()};function jn(e){!function({addedNodes:e,removedNodes:t}){Re("contentMutated"),Jt(),Rt(),vn(),Ae(),kn(t),En(e)}(e),Zn(Y,"Mutation Observed")}function xn(){const e=Cn(document.documentElement);var t;t=[Ct(jn),wn(e),Gt(),Sn(e),cn(On)],rt.push(...t.map(e=>e.disconnect))}function In(e){performance.mark(Ft);const t=pe(e);let n=1,o=document.documentElement,r=Ze?0:document.documentElement.getBoundingClientRect().bottom;const i=Ze?yt:De?Array.from(ut):Cn(document.documentElement);for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return xe(`${t} position calculated from:`,o),xe(`Checked %c${i.length}%c elements`,h,g),performance.mark(Wt,{detail:{hasTags:Ze,len:i.length,logging:tt,Side:t}}),r}const Tn=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],An=`* ${Array.from(te).map(e=>`:not(${e})`).join("")}`,Cn=e=>e.querySelectorAll(An),Pn={height:0,width:0},Rn={height:0,width:0},Nn=[h,g,h];function qn(e){function t(){return Rn[o]=r,Pn[o]=s,Math.max(r,1)}const n=e===Ln,o=e.label,r=e.boundingClientRect(),i=Math.ceil(r),a=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),c=`HTML: %c${r}px %cPage: %c${s}px`;let l=1;switch(!0){case!e.enabled():return Math.max(s,1);case Ze:xe("Found element with data-iframe-size attribute"),l=e.taggedElement();break;case!De&&qe&&0===Rn[o]&&0===Pn[o]:xe(`Initial page size values: ${c}`,...Nn),l=t();break;case wt&&r===Rn[o]&&s===Pn[o]:xe(`Size unchanged: ${c}`,...Nn),l=Math.max(r,s);break;case 0===r&&0!==s:xe(`Page is hidden: ${c}`,...Nn),l=s;break;case!De&&r!==Rn[o]&&s<=Pn[o]:xe(`New <html> size: ${c} `,...Nn),xe(`Previous <html> size: %c${Rn[o]}px`,h),l=t();break;case!n:l=e.taggedElement();break;case!De&&r<Rn[o]:xe(`<html> size decreased: ${c}`,...Nn),l=t();break;case s===a||s===i:xe(`<html> size equals page size: ${c}`,...Nn),l=t();break;case r>s:xe(`Page size < <html> size: ${c}`,...Nn),l=t();break;case De:xe("Found elements possibly overflowing <html> "),l=e.taggedElement();break;default:xe(`Using <html> size: ${c}`,...Nn),l=t()}return xe(`Content ${o}: %c${l}px`,h),l+=function(e){const t=e.getOffset();return 0!==t&&xe(`Page offsetSize: %c${t}px`,h),t}(e),Math.max(l,1)}const Ln={label:T,enabled:()=>Me,getOffset:()=>lt,auto:()=>qn(Ln),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,k)+parseInt(t.marginBottom,k)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Ln.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(...Tn(Ln)),min:()=>Math.min(...Tn(Ln)),grow:()=>Ln.max(),lowestElement:()=>In(F),taggedElement:()=>In(F)},Bn={label:A,enabled:()=>ke,getOffset:()=>dt,auto:()=>qn(Bn),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(...Tn(Bn)),min:()=>Math.min(...Tn(Bn)),rightMostElement:()=>In(W),scroll:()=>Math.max(Bn.bodyScroll(),Bn.documentElementScroll()),taggedElement:()=>In(W)},Dn=(e,t)=>!(Math.abs(e-t)<=zt);function Fn(e,t){const n=e[t](),o=e.enabled()&&void 0!==ie?function(e){const t=ie(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`);if(t<1)throw new RangeError(`Out of range value returned from onBeforeResize(): ${t}, must be at least 1`);return t}(n):n;return Te(o>=1,`New iframe ${e.label} is too small: ${o}, must be at least 1`),o}let Wn=!1;const Hn=ue(()=>Fe(ce(4)));let Vn,Un=!1;const Zn=Pe((e,t,n,o,r)=>{switch(Re(e),!0){case!0===Xe:if(!0===Un)break;je("Iframe hidden - Ignored resize request"),Un=!0,Wn=!1,cancelAnimationFrame(Vn);break;case!0===Wn&&e!==G:je("Resize already pending - Ignored resize request");break;case!se&&!(e in J):xe("Resizing disabled");break;default:Un=!1,Wn=!0,p=performance.now(),m=!0,Vn||(Vn=requestAnimationFrame(()=>{Wn=!1,Vn=null,Re("requestAnimationFrame"),Ie(`Reset sendPending: %c${e}`,h)})),function(e,t,n,o,r){const i=n??Fn(Ln,_e),a=o??Fn(Bn,St),s=Me&&Dn(Je,i)||ke&&Dn($t,a)?V:e;switch(je(`Resize event: %c${t}`,h),s){case z:case H:case V:Je=i,$t=a;case _:_n(Je,$t,e,r);break;case G:case Y:case Q:case X:je(K);break;default:xe(K)}m=!1}(e,t,n,o,r)}Ae()});function Jn(e){Je=Ln[_e](),$t=Bn[St](),Qn(Je,$t,e)}function _n(e,t,o,r,i){it<-1||(void 0!==i?je(`Message targetOrigin: %c${i}`,h):i=vt,function(){const a=`${ft}:${e}:${t}:${o}${void 0===r?"":`:${r}`}`;if(ht)try{window.parent.iframeParentListener(ee+a)}catch(e){if(1!==it)throw e;return void Hn()}else bt.postMessage(ee+a,i);m&&je(function(){const e=me(performance.now()-p);return o===z?`Initialised iframe in %c${e}ms`:`Size calculated in %c${e}ms`}(),h),xe(`Sending message to parent page via ${ht?"sameOrigin":"postMessage"}: %c%c${a}`,n,h)}())}const Qn=Pe((e,t,n,o,r)=>{Re(n),_n(e,t,n,o,r),Ae()}),Gn=Pe(function(e){Re("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>t(n(e)),r=e=>Qn(0,0,`${e}Stop`),i={init:function(){if("loading"===document.readyState)return void je("Page not ready, ignoring init message");const t=e.data.slice(13).split(v);bt=e.source,d=e.origin,xt(t),qe=!1,setTimeout(()=>{Ge=!1},128)},reset(){Ge?je("Page reset ignored by init"):(je("Page size reset by host page"),Jn("resetPage"))},resize(){je("Resize requested by host page"),Zn(Z,"Parent window requested size check")},moveToAnchor(){Ye.findTarget(s())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=s();je("PageInfo received from parent:",o(e)),kt?de(kt,n(e)):r(S)},parentInfo(){const e=o(s());je("ParentInfo received from parent:",e),jt?de(jt,e):r(O)},message(){const e=s();je("onMessage called from parent:%c",h,o(e)),de(Mt,n(e))}},a=()=>e.data.split("]")[1].split(v)[0],s=()=>e.data.slice(e.data.indexOf(v)+1),c=()=>e.data.split(v)[2]in{true:1,false:1};function l(){const t=a();Re(t),t in i?i[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||c()||Le(`Unexpected message (${e.data})`)}ee===`${e.data}`.slice(0,13)&&function(){if(!1!==qe)return c()?(Ne(a()),Re(z),void i.init()):void je(`Ignored message of type "${a()}". Received before initialization.`);l()}()});let Yn=!1;const Xn=e=>e.postMessage("[iFrameResizerChild]Ready",window?.iframeResizer?.targetOrigin||"*");function Kn(){if("loading"===document.readyState||!qe||Yn)return;const{parent:e,top:t}=window;Re("ready"),je("Sending%c ready%c to parent from",h,g,window.location.href),Xn(e),e!==t&&Xn(t),Yn=!0}"iframeChildListener"in window?Le("Already setup"):(window.iframeChildListener=e=>setTimeout(()=>Gn({data:e,sameOrigin:!0})),Re("listen"),st(window,w,Gn),st(document,D,Kn),Kn())}()}();
21
21
  //# sourceMappingURL=iframeResizer.contentWindow.js.map
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/legacy (child) 5.5.8-beta.3 (iife)
4
+ * @module iframe-resizer/legacy (child) 5.5.8-beta.4 (iife)
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,5 @@
17
17
  */
18
18
 
19
19
 
20
- !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:!1,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},s={profile:0,profileEnd:0,timeStamp:0,trace:0},c=Object.assign(console);const{fromEntries:l,keys:d}=Object,u=e=>[e,c[e]],f=e=>t=>[t,function(n){e[t]=n}],m=(e,t)=>l(d(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.8-beta.3",b="iframeResizer",v=":",z="init",w="message",$="pageHide",S="pageInfo",O="parentInfo",M="scrollToOffset",E="title",k=10,j="data-iframe-size",x="data-iframe-overflowed",I="data-iframe-ignore",T="height",A="width",C="offset",P="offsetSize",R="string",N="number",q="object",L="function",B="auto",D="readystatechange",F="bottom",W="right",H="autoResizeEnabled",V=Symbol("sizeChanged"),U="manualResize",Z="parentResize",J={[U]:1,[Z]:1},_="setOffsetSize",Q="resizeObserver",G="overflowObserver",Y="mutationObserver",X="visibilityObserver",K="No change in content size detected",ee="[iFrameSizer]",te=new Set(["head","body","meta","base","title","script","link","style","map","area","option","optgroup","template","track","wbr","nobr"]),ne=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)},oe=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),re=["spjluzl","rlf","clyzpvu"],ie=["<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.","Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz."],ae=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],se=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),ce=e=>oe(ie[e]);var le=e=>{const t=e[oe(re[0])]||e[oe(re[1])]||e[oe(re[2])];if(!t)return-1;const n=t.split("-");let o=function(e=""){let t=-2;const n=ne(oe(e));return n in se&&(t=se[n]),t}(n[0]);return 0===o||(e=>e[2]===ne(e[0]+e[1]))(n)||(o=-2),o};const de=(e,...t)=>setTimeout(()=>e(...t),0),ue=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},fe=e=>e,me=e=>Math.round(1e3*e)/1e3,pe=e=>e.charAt(0).toUpperCase()+e.slice(1),he=e=>""!=`${e}`&&void 0!==e,ge=e=>e();const ye=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${pe(t)}`)};const be={br:"\n",rb:"",bb:"",b:"",i:"",u:"","/":""},ve=Object.keys(be),ze=new RegExp(`<(${ve.join("|")})>`,"gi"),we=(e,t)=>be[t]??"";let $e=!0,Se=b;const Oe=(Me=function(n={}){const l={},d={},p=[],h={...a,expand:!n.collapsed||a.expanded,...n};let g="";function y(){p.length=0,g=""}function b(){delete h.event,y()}const v=()=>!!p.some(([e])=>e in i)||!!h.expand;function z(){if(0!==p.length){c[v()?"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)c.assert(e in c,`Unknown console method: ${e}`),e in c&&c[e](...t);c.groupEnd(),b()}else b()}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)}`}(),queueMicrotask(()=>queueMicrotask(z)))}function $(e,...t){0===p.length&&w(),p.push([e,...t])}function S(e=r,...t){l[e]?$("log",`${e}: ${performance.now()-l[e]} ms`,...t):$("timeLog",e,...t)}return{...m(h,f(h)),...m(console,e=>[e,(...t)=>$(e,...t)]),...m(s,u),assert:function(e,...t){!0!==e&&$("assert",e,...t)},count:function(e=r){d[e]?d[e]+=1:d[e]=1,$("log",`${e}: ${d[e]}`)},countReset:function(e=r){delete d[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(),l[e]=performance.now()},timeEnd:function(e=r){S(e),delete l[e]},timeLog:S,touch:w}},Me?.__esModule?Me.default:Me);var Me;const Ee=Oe({label:`${b}(child)`,expand:!1});const ke=e=>(...t)=>!$e||Ee[e](...t),je=ke("log"),xe=je,Ie=ke("debug");const{assert:Te,endAutoGroup:Ae,error:Ce,errorBoundary:Pe,event:Re,label:Ne,purge:qe,warn:Le}=Ee,Be=(De=fe,e=>De(typeof e===R?window.chrome?e.replace(ze,we):(e=>e.replaceAll("<br>","\n").replaceAll(/<\/?[^>]+>/gi,""))(e):e));var De;const Fe=(...e)=>Ee.warn(...e.map(Be)),We=(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)=>Fe(t)),He=We("Method"),Ve=We("Method","replaced with"),Ue=We("Option"),Ze=["min-height","min-width","max-height","max-width"],Je=new Set,_e=e=>e.tagName?e.tagName.toLowerCase():"unknown",Qe=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),Ge=(e,t)=>{return(n=Qe(e,t))&&"0px"!==n&&n!==B&&"none"!==n;var n};function Ye({href:e}){Je.has(e)||(je("Unable to access stylesheet:",e),Je.add(e))}const Xe=(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){Ye(n)}return{source:"cross-origin stylesheet",value:Qe(e,t)}}(e,t),Ke=(e,t)=>{const{source:n,value:o}=Xe(e,t),r=_e(e);Fe(`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 et(){for(const e of[document.documentElement,document.body])for(const t of Ze)je(`Checking <${_e(e)}> for blocking CSS: ${t}`),Ge(e,t)&&Ke(e,t)}const tt=e=>t=>void 0===t?void 0:e(t),nt=tt(e=>"true"===e),ot=tt(Number),rt=[];function it(e,t){je(`${e} event listener: %c${t}`,h)}const at=(e,t,n,o)=>{e.removeEventListener(t,n,o),it("Removed",t)},st=(e,t,n,o=!1)=>{e.addEventListener(t,n,o),rt.push(()=>at(e,t,n,o)),it("Added",t)},ct=(e="")=>t=>n=>{n.size>0&&Ie(`${t}Observer ${e}:`,...Array.from(n).flatMap(e=>["\n",e]))},lt=ct("attached to"),dt=((e="")=>t=>n=>{n.size>0&&Ce(`${t}Observer ${e}:`,...Array.from(n).flatMap(e=>["\n",e]))})("already attached"),ut=ct("detached from"),ft=(t,n=!0)=>o=>{o>0&&xe(`${n?"At":"De"}tached %c${t}Observer%c ${n?"to":"from"} %c${o}%c element${1===o?"":"s"}`,h,e,h,e)},mt=(e,t,n,o)=>{const r=ut(e);return e=>{const i=new Set;let a=0;for(const o of e)n.has(o)&&(t.unobserve(o),n.delete(o),i.add(o),a+=1);r(i),o(a),i.clear()}},pt="Mutation",ht=new Set,gt=new Set,yt=new Set,bt=[],vt={attributes:!0,attributeFilter:[I,j],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};let zt,wt=1,$t=!1,St=0;const Ot=ct("added")(pt),Mt=ct("removed (page)")(pt),Et=ct("removed (added)")(pt),kt=e=>e.nodeType!==Node.ELEMENT_NODE||te.has(e.tagName.toLowerCase());function jt(e){const t=e.addedNodes;for(const e of t)kt(e)||ht.add(e)}function xt(e){const t=e.removedNodes;for(const e of t)kt(e)||(ht.has(e)?(ht.delete(e),yt.add(e)):gt.add(e))}const It=e=>{xe("Mutations:",e);for(const t of e)jt(t),xt(t);Ot(ht),Mt(gt),Et(yt),yt.clear()};const Tt=e=>()=>{const t=performance.now(),n=t-St,o=16*wt+++2;if(n>o&&n<200)return Re("mutationThrottled"),xe("Update delayed due to heavy workload on the callStack"),xe(`EventLoop busy time: %c${me(n)}ms %c> Max wait: %c${o-2}ms`,h,g,h),setTimeout(zt,16*wt),void(St=t);wt=1,bt.forEach(It),bt.length=0,$t=!1,gt.size>0&&je(`Detected %c${gt.size} %cremoved element${gt.size>1?"s":""}`,h,g),ht.size>0&&je(`Found %c${ht.size} %cnew element${ht.size>1?"s":""}`,h,g),e({addedNodes:ht,removedNodes:gt}),ht.clear(),gt.clear()};function At(e){bt.push(e),$t||(St=performance.now(),$t=!0,requestAnimationFrame(zt))}function Ct(e){const t=new window.MutationObserver(At),n=document.body||document.documentElement;return zt=Tt(e),t.observe(n,vt),xe("Attached%c MutationObserver%c to body",h,g),{...t,disconnect:()=>{ht.clear(),gt.clear(),bt.length=0,t.disconnect(),xe("Detached%c MutationObserver",h)}}}const Pt="Overflow",Rt=ft(Pt),Nt=ft(Pt,!1),qt=lt(Pt),Lt=dt(Pt),Bt=e=>e.hidden||null===e.offsetParent||"none"===e.style.display,Dt=(e,t)=>{const n=t.side,o={root:t.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||fe,i=(t=!1)=>e(t),a=(e,t)=>0===e||e>t[n],s=(e,t)=>e.toggleAttribute(x,t);const c=new IntersectionObserver(function(e){for(const t of e){const{boundingClientRect:e,rootBounds:o,target:r}=t;if(!o)continue;const i=e[n],c=a(i,o)&&!Bt(r);s(r,c)}r(i)},o),l=new WeakSet;return{attachObservers:function(e){const t=new Set,n=new Set;let o=0;for(const r of e)r.nodeType===Node.ELEMENT_NODE&&(l.has(r)?t.add(r):(c.observe(r),l.add(r),n.add(r),o+=1));Lt(t),qt(n),Rt(o),n.clear(),t.clear()},detachObservers:mt(Pt,c,l,Nt),disconnect:()=>{c.disconnect(),xe("Detached%c OverflowObserver",h)}}},Ft="--ifr-start",Wt="--ifr-end",Ht="--ifr-measure",Vt=[];let Ut,Zt={},Jt=0;function _t(){try{performance.clearMarks(Ft),performance.clearMarks(Wt),performance.clearMeasures(Ht)}catch{}}function Qt(e){e.getEntries().forEach(e=>{if(e.name===Wt)try{const{duration:t}=performance.measure(Ht,Ft,Wt);Zt=e.detail,Vt.push(t),Vt.length>100&&Vt.shift()}catch{}})}function Gt(){xe("Attached%c PerformanceObserver%c to page",h,g);const e=new PerformanceObserver(Qt);return e.observe({entryTypes:["mark"]}),Ut=setInterval(()=>{if(Vt.length<10)return;if(Zt.hasTags&&Zt.len<25)return;Vt.sort();const e=Math.min(Vt.reduce((e,t)=>e+t,0)/Vt.length,Vt[Math.floor(Vt.length/2)]),t=me(e);t>Jt&&(Jt=t,Re("performanceObserver"),je("Mean time:",me(Vt[Math.floor(Vt.length/2)])),je("Median time:",me(Vt.reduce((e,t)=>e+t,0)/Vt.length)),je("Average time:",t),je("Max time:",me(Math.max(...Vt)))),_t(),e<=4||(clearInterval(Ut),Fe(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${me(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${Zt.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))},5e3),{disconnect:()=>{_t(),clearInterval(Ut),e.disconnect(),xe("Detached%c PerformanceObserver",h)}}}const Yt="Resize",Xt=ft(Yt),Kt=ft(Yt,!1),en=lt(Yt),tn=dt(Yt),nn=new WeakSet,on=new Set,rn=new Set;let an;function sn(e){let t=0;for(const n of e){if(n.nodeType!==Node.ELEMENT_NODE)continue;const e=getComputedStyle(n)?.position;""!==e&&"static"!==e&&(nn.has(n)?on.add(n):(an.observe(n),nn.add(n),rn.add(n),t+=1))}tn(on),en(rn),Xt(t),rn.clear(),on.clear()}function cn(e){const t=new IntersectionObserver(t=>e(t.at(-1).isIntersecting),{threshold:0}),n=document.documentElement;return t.observe(n),xe("Attached%c VisibilityObserver%c to page",h,g),{disconnect:()=>{t.disconnect(),xe("Detached%c VisibilityObserver",h)}}}const ln=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},dn=ln(L),un=ln(N),fn=ln(R);"undefined"!=typeof window&&function(){const o={height:()=>(Le("Custom height calculation function not defined"),Ln.auto()),width:()=>(Le("Custom width calculation function not defined"),Bn.auto())},r={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},i={},a=B,s="scroll";let c,l,d,u,f,m,p,ne,ie,se=!0,be="",ve=0,ze="",we="",Oe=!1,Me=!0,ke=!1,qe=!0,Be=!1,De=!1,We=!0,Ze=!1,Je=1,_e=a,Qe="",Ge=!0,Ye={},Xe=!1,Ke=!1,tt=!1,it=0,ct=!1,lt=0,dt=0,ut=new Set,ft="",pt="child",ht=!1,gt="",yt=[],bt=window.parent,vt="*",zt=0,wt=!1,$t=1,St=s,Ot=window,Mt=()=>{Le("onMessage function not defined")},Et=()=>{},kt=null,jt=null;function xt(e){var t;!function(e){ft=e[0]??ft,ve=ot(e[1])??ve,ke=nt(e[2])??ke,tt=nt(e[3])??tt,se=nt(e[6])??se,ze=e[7]??ze,_e=e[8]??_e,be=e[9]??be,we=e[10]??we,zt=ot(e[11])??zt,Ye.enable=nt(e[12])??!1,pt=e[13]??pt,St=e[14]??St,ct=nt(e[15])??ct,lt=ot(e[16])??lt,dt=ot(e[17])??dt,Me=nt(e[18])??Me,c=e[19]??c,ne=e[20]??ne,it=ot(e[21])??it,Ke=nt(e[23])??Ke}(e),Se=(t={id:ft,enabled:tt,expand:Ke}).id||b,Ee.label(`${Se}`),Ee.expand(t.expand),$e=t.enabled,Re("initReceived"),je(`Initialising iframe v${y} ${window.location.href}`),function(){function e(e){je("Reading data from page:",Object.keys(e)),ie=dn(e,"onBeforeResize")??ie,Mt=dn(e,"onMessage")??Mt,Et=dn(e,"onReady")??Et,typeof e?.offset===N&&(Ue(C,P),Me&&(lt=un(e,C)??lt),ke&&(dt=un(e,C)??dt)),typeof e?.offsetSize===N&&(Me&&(lt=un(e,P)??lt),ke&&(dt=un(e,P)??dt)),l=fn(e,oe(re[0]))??l,Qe=fn(e,"ignoreSelector")??Qe,gt=fn(e,"sizeSelector")??gt,vt=fn(e,"targetOrigin")??vt,_e=e?.heightCalculationMethod||_e,St=e?.widthCalculationMethod||St}function t(e,t){return typeof e===L&&(Fe(`<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===it)return;const n=window.iframeResizer||window.iFrameResizer;typeof n===q&&(e(n),_e=t(_e,T),St=t(St,A),xe(`Set targetOrigin for parent: %c${vt}`,h))}(),[Bt,Vt,ln,qt,Ht,on,rn,en,Lt,Rt,Oe?fe:et,_t,()=>Ut("background",be),()=>Ut("padding",we),Oe?fe:Qt,pn,Jt,xn,hn,mn,gn,Tt,yn].forEach(e=>{try{e()}catch(e){if(it<0)throw e;Fe("<rb>Error in setup function</>\n<i>iframe-resizer</> detected an error during setup.\n\nPlease report the following error message at <u>https://github.com/davidjbradshaw/iframe-resizer/issues</>"),Ce(e)}}),Pt(ue(Et)),je("Initialization complete"),Ae(),Zn(z,"Init message from host page",void 0,void 0,`${y}:${it}`),document.title&&""!==document.title&&Qn(0,0,E,document.title)}function It({persisted:e}){e||Qn(0,0,"beforeUnload"),Re($),xe("Page persisted:",e),e||rt.forEach(ge)}const Tt=()=>st(window,$.toLowerCase(),It);let At=!1;function Pt(e){"complete"===document.readyState?de(e):At||st(document,D,()=>Pt(e)),At=!0}function Rt(){yt=document.querySelectorAll(`[${j}]`),Ze=yt.length>0,je(`Tagged elements found: %c${Ze}`,h)}let Nt=0;function qt(){const n=document.querySelectorAll(`*[${I}]`);return Be=n.length>0,Be&&n.length!==Nt&&(function(n){const o=1===n.length?"":"s";Le(`%c[${I}]%c found on %c${n.length}%c element${o}`,t,e,t,e)}(n),Nt=n.length),Be}function Lt(){"BackCompat"===document.compatMode&&Fe("<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")}function Bt(){ne&&""!==ne&&"false"!==ne?ne!==y&&Fe(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ne} - Child page: ${y}.\n`):Fe("<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")}function Ht(){try{ht=1===it||"iframeParentListener"in window.parent}catch(e){je("Cross domain iframe detected")}}function Vt(){ke===Me&&(Oe=!0)}function Ut(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),xe(`Set body ${e}: %c${t}`,h))}function Zt(e,t,n){if(""!==n){je(`${e}: %c${n}`,h);for(const e of document.querySelectorAll(n))je(`Applying ${t} to:`,e),e.toggleAttribute(t,!0)}}function Jt(){Zt("sizeSelector",j,gt),Zt("ignoreSelector",I,Qe)}function _t(){var e,t;void 0===ze&&(ze=`${ve}px`),Ut("margin",(e="margin",(t=ze).includes("-")&&(Le(`Negative CSS value ignored for ${e}`),t=""),t))}function Qt(){const e=e=>e.style.setProperty(T,B,"important");e(document.documentElement),e(document.body),je("Set HTML & body height: %cauto !important",h)}function Xt(e){({add(t){function n(){Zn(e.eventName,e.eventType)}i[t]=n,st(window,t,n,{passive:!0})},remove(e){const t=i[e];delete i[e],at(window,e,t)}})[e.method](e.eventName)}function en(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach(n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(j,!0)});t("data-iframe-height"),t("data-iframe-width"),e&&Fe("<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</>.")}function tn(e,t,n){const{label:o}=n;return t!==e&&(e in n||(Le(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in r)&&Fe(`<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 ${ne?"remove this option.":`set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page. This can be done on the child page by adding the following code:\n\nwindow.iframeResizer = {\n license: 'xxxx',\n ${o}CalculationMethod: '${B}',\n}\n`}\n`),je(`Set ${o} calculation method: %c${e}`,h),e}function on(){_e=tn(_e,a,Ln)}function rn(){St=tn(St,s,Bn)}function ln(){const t=it,n=le({key:c}),o=le({key:l});if(it=Math.max(n,o),it<0){if(it=Math.min(n,o),Fe(`${ce(it+2)}${ce(2)}`),he(ne))throw ce(it+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"")}else(!he(ne)||t>-1&&it>t)&&(sessionStorage.getItem("ifr")!==y&&function(t,n){console.info(`${Se} %ciframe-resizer ${t}`,$e||n<1?"font-weight: bold;":e)}(`v${y} (${(e=>oe(ae[e]))(it)})`,it),it<2&&Fe(ce(3)),sessionStorage.setItem("ifr",y))}function mn(){var e;!0!==se&&je("Auto Resize disabled"),Xt({method:e="add",eventType:"After Print",eventName:"afterprint"}),Xt({method:e,eventType:"Before Print",eventName:"beforeprint"})}function pn(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}function hn(){function e(e){const t=e.getBoundingClientRect(),n={x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop};return{x:parseInt(t.left,k)+parseInt(n.x,k),y:parseInt(t.top,k)+parseInt(n.y,k)}}function t(t){const n=t.split("#")[1]||t,o=decodeURIComponent(n),r=document.getElementById(o)||document.getElementsByName(o)[0];void 0===r?(je(`In page link (#${n}) not found in iframe, so sending to parent`),Qn(0,0,"inPageLink",`#${n}`)):function(t){const o=e(t);je(`Moving to in page link (%c#${n}%c) at x: %c${o.x}%c y: %c${o.y}`,h,g,h,g,h),Qn(o.y,o.x,M)}(r)}function n(){const{hash:e,href:n}=window.location;""!==e&&"#"!==e&&t(n)}const{enable:o}=Ye;o?1===it?Fe(ce(5)):(je("Setting up location.hash handlers"),function(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&st(e,"click",n=>{n.preventDefault(),t(e.getAttribute("href"))})}(),st(window,"hashchange",n),setTimeout(n,128)):je("In page linking not enabled"),Ye={...Ye,findTarget:t}}function gn(){function e(e){Qn(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){je(`Add event listener: %c${n}`,h),st(window.document,t,e)}!0===ct&&(t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave"))}function yn(){1!==it&&(Ot.parentIframe=Object.freeze({autoResize:e=>(ye(e,"boolean","parentIframe.autoResize(enable) enable"),!1===ke&&!1===Me?(Re(H),Fe("Auto Resize can not be changed when <b>direction</> is set to 'none'."),!1):(!0===e&&!1===se?(se=!0,queueMicrotask(()=>Zn(H,"Auto Resize enabled"))):!1===e&&!0===se&&(se=!1),Qn(0,0,"autoResize",JSON.stringify(se)),se)),close(){Qn(0,0,"close")},getId:()=>ft,getOrigin:()=>(Re("getOrigin"),He("getOrigin()","getParentOrigin()"),d),getParentOrigin:()=>d,getPageInfo(e){if(typeof e===L)return kt=e,Qn(0,0,S),void Ve("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");kt=null,Qn(0,0,"pageInfoStop")},getParentProps:e=>(ye(e,L,"parentIframe.getParentProps(callback) callback"),jt=e,Qn(0,0,O),()=>{jt=null,Qn(0,0,"parentInfoStop")}),getParentProperties(e){He("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){ye(e,R,"parentIframe.moveToAnchor(anchor) anchor"),Ye.findTarget(e)},reset(){!function(){const e=_e;_e=a,je(`Reset trigger event: %c${"parentIframe.reset"}`,h),wt?je("TriggerLock blocked calculation"):(wt=!0,Ie("Trigger event lock on"),requestAnimationFrame(()=>{wt=!1,Ie("Trigger event lock off")})),Jn("reset"),_e=e}()},setOffsetSize(e){ye(e,N,"parentIframe.setOffsetSize(offset) offset"),lt=e,dt=e,Zn(_,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){ye(e,N,"parentIframe.scrollBy(x, y) x"),ye(t,N,"parentIframe.scrollBy(x, y) y"),Qn(t,e,"scrollBy")},scrollTo(e,t){ye(e,N,"parentIframe.scrollTo(x, y) x"),ye(t,N,"parentIframe.scrollTo(x, y) y"),Qn(t,e,"scrollTo")},scrollToOffset(e,t){ye(e,N,"parentIframe.scrollToOffset(x, y) x"),ye(t,N,"parentIframe.scrollToOffset(x, y) y"),Qn(t,e,M)},sendMessage(e,t){t&&ye(t,R,"parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),Qn(0,0,w,JSON.stringify(e),t)},setHeightCalculationMethod(e){_e=e,on()},setWidthCalculationMethod(e){St=e,rn()},setTargetOrigin(e){ye(e,R,"parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),je(`Set targetOrigin: %c${e}`,h),vt=e},resize(e,t){void 0!==e&&ye(e,N,"parentIframe.resize(customHeight, customWidth) customHeight"),void 0!==t&&ye(t,N,"parentIframe.resize(customHeight, customWidth) customWidth"),Zn(U,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){He("size()","resize()"),this.resize(e,t)}}),Ot.parentIFrame=Ot.parentIframe)}let bn=new Set;function vn(){const e=document.querySelectorAll(`[${x}]`);ut=function(e){const t=new Set,n=new Set;for(const o of e)o.closest(`[${I}]`)?n.add(o):t.add(o);return n.size>0&&queueMicrotask(()=>{Re("overflowIgnored"),xe("Ignoring elements with [data-iframe-ignore] > *:\n",n),Ae()}),t}(e),De=ut.size>0,typeof Set.prototype.symmetricDifference===L&&(We=ut.symmetricDifference(bn).size>0),bn=ut}function zn(){switch(vn(),!0){case!We:return;case ut.size>1:xe("Overflowed Elements:",ut);break;case De:break;default:xe("No overflow detected")}Zn(G,"Overflow updated")}function wn(e){const t={root:document.documentElement,side:Me?F:W};return u=Dt(zn,t),u.attachObservers(e),u}function $n(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Zn(Q,`Element resized <${function(e){switch(!0){case!he(e):return"";case he(e.id):return`${e.nodeName}#${e.id}`;case he(e.name):return`${e.nodeName} (${e.name}`;case he(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}function Sn(e){return an=new ResizeObserver($n),an.observe(document.body),nn.add(document.body),xe("Attached%c ResizeObserver%c to body",h,g),f={attachObserverToNonStaticElements:sn,detachObservers:mt(Yt,an,nn,Kt),disconnect:()=>{an.disconnect(),xe("Detached%c ResizeObserver",h)}},f.attachObserverToNonStaticElements(e),f}function On(e){je(`Visible: %c${e}`,h),Xe=!e,Zn(X,"Visibility changed")}const Mn=e=>{const t=new Set;for(const n of e){t.add(n);for(const e of Cn(n))t.add(e)}return xe("Inspecting:\n",t),t},En=e=>{if(0===e.size)return;Re("addObservers");const t=Mn(e);u.attachObservers(t),f.attachObserverToNonStaticElements(t),Ae()},kn=e=>{if(0===e.size)return;Re("removeObservers");const t=Mn(e);u.detachObservers(t),f.detachObservers(t),Ae()};function jn(e){!function({addedNodes:e,removedNodes:t}){Re("contentMutated"),Jt(),Rt(),vn(),Ae(),kn(t),En(e)}(e),Zn(Y,"Mutation Observed")}function xn(){const e=Cn(document.documentElement);var t;t=[Ct(jn),wn(e),Gt(),Sn(e),cn(On)],rt.push(...t.map(e=>e.disconnect))}function In(e){performance.mark(Ft);const t=pe(e);let n=1,o=document.documentElement,r=Ze?0:document.documentElement.getBoundingClientRect().bottom;const i=Ze?yt:De?Array.from(ut):Cn(document.documentElement);for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return xe(`${t} position calculated from:`,o),xe(`Checked %c${i.length}%c elements`,h,g),performance.mark(Wt,{detail:{hasTags:Ze,len:i.length,logging:tt,Side:t}}),r}const Tn=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],An=`* ${Array.from(te).map(e=>`:not(${e})`).join("")}`,Cn=e=>e.querySelectorAll(An),Pn={height:0,width:0},Rn={height:0,width:0},Nn=[h,g,h];function qn(e){function t(){return Rn[o]=r,Pn[o]=s,Math.max(r,1)}const n=e===Ln,o=e.label,r=e.boundingClientRect(),i=Math.ceil(r),a=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),c=`HTML: %c${r}px %cPage: %c${s}px`;let l=1;switch(!0){case!e.enabled():return Math.max(s,1);case Ze:xe("Found element with data-iframe-size attribute"),l=e.taggedElement();break;case!De&&qe&&0===Rn[o]&&0===Pn[o]:xe(`Initial page size values: ${c}`,...Nn),l=t();break;case wt&&r===Rn[o]&&s===Pn[o]:xe(`Size unchanged: ${c}`,...Nn),l=Math.max(r,s);break;case 0===r&&0!==s:xe(`Page is hidden: ${c}`,...Nn),l=s;break;case!De&&r!==Rn[o]&&s<=Pn[o]:xe(`New <html> size: ${c} `,...Nn),xe(`Previous <html> size: %c${Rn[o]}px`,h),l=t();break;case!n:l=e.taggedElement();break;case!De&&r<Rn[o]:xe(`<html> size decreased: ${c}`,...Nn),l=t();break;case s===a||s===i:xe(`<html> size equals page size: ${c}`,...Nn),l=t();break;case r>s:xe(`Page size < <html> size: ${c}`,...Nn),l=t();break;case De:xe("Found elements possibly overflowing <html> "),l=e.taggedElement();break;default:xe(`Using <html> size: ${c}`,...Nn),l=t()}return xe(`Content ${o}: %c${l}px`,h),l+=function(e){const t=e.getOffset();return 0!==t&&xe(`Page offsetSize: %c${t}px`,h),t}(e),Math.max(l,1)}const Ln={label:T,enabled:()=>Me,getOffset:()=>lt,auto:()=>qn(Ln),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,k)+parseInt(t.marginBottom,k)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Ln.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(...Tn(Ln)),min:()=>Math.min(...Tn(Ln)),grow:()=>Ln.max(),lowestElement:()=>In(F),taggedElement:()=>In(F)},Bn={label:A,enabled:()=>ke,getOffset:()=>dt,auto:()=>qn(Bn),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(...Tn(Bn)),min:()=>Math.min(...Tn(Bn)),rightMostElement:()=>In(W),scroll:()=>Math.max(Bn.bodyScroll(),Bn.documentElementScroll()),taggedElement:()=>In(W)},Dn=(e,t)=>!(Math.abs(e-t)<=zt);function Fn(e,t){const n=e[t](),o=e.enabled()&&void 0!==ie?function(e){const t=ie(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`);if(t<1)throw new RangeError(`Out of range value returned from onBeforeResize(): ${t}, must be at least 1`);return t}(n):n;return Te(o>=1,`New iframe ${e.label} is too small: ${o}, must be at least 1`),o}let Wn=!1;const Hn=ue(()=>Fe(ce(4)));let Vn,Un=!1;const Zn=Pe((e,t,n,o,r)=>{switch(Re(e),!0){case!0===Xe:if(!0===Un)break;je("Iframe hidden - Ignored resize request"),Un=!0,Wn=!1,cancelAnimationFrame(Vn);break;case!0===Wn&&e!==G:je("Resize already pending - Ignored resize request");break;case!se&&!(e in J):xe("Resizing disabled");break;default:Un=!1,Wn=!0,p=performance.now(),m=!0,Vn||(Vn=requestAnimationFrame(()=>{Wn=!1,Vn=null,Re("requestAnimationFrame"),Ie(`Reset sendPending: %c${e}`,h)})),function(e,t,n,o,r){const i=n??Fn(Ln,_e),a=o??Fn(Bn,St),s=Me&&Dn(Je,i)||ke&&Dn($t,a)?V:e;switch(je(`Resize event: %c${t}`,h),s){case z:case H:case V:Je=i,$t=a;case _:_n(Je,$t,e,r);break;case G:case Y:case Q:case X:je(K);break;default:xe(K)}m=!1}(e,t,n,o,r)}Ae()});function Jn(e){Je=Ln[_e](),$t=Bn[St](),Qn(Je,$t,e)}function _n(e,t,o,r,i){it<-1||(void 0!==i?je(`Message targetOrigin: %c${i}`,h):i=vt,function(){const a=`${ft}:${e}:${t}:${o}${void 0===r?"":`:${r}`}`;if(ht)try{window.parent.iframeParentListener(ee+a)}catch(e){if(1!==it)throw e;return void Hn()}else bt.postMessage(ee+a,i);m&&je(function(){const e=me(performance.now()-p);return o===z?`Initialised iframe in %c${e}ms`:`Size calculated in %c${e}ms`}(),h),xe(`Sending message to parent page via ${ht?"sameOrigin":"postMessage"}: %c%c${a}`,n,h)}())}const Qn=Pe((e,t,n,o,r)=>{Re(n),_n(e,t,n,o,r),Ae()}),Gn=Pe(function(e){Re("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>t(n(e)),r=e=>Qn(0,0,`${e}Stop`),i={init:function(){if("loading"===document.readyState)return void je("Page not ready, ignoring init message");const t=e.data.slice(13).split(v);bt=e.source,d=e.origin,xt(t),qe=!1,setTimeout(()=>{Ge=!1},128)},reset(){Ge?je("Page reset ignored by init"):(je("Page size reset by host page"),Jn("resetPage"))},resize(){je("Resize requested by host page"),Zn(Z,"Parent window requested size check")},moveToAnchor(){Ye.findTarget(s())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=s();je("PageInfo received from parent:",o(e)),kt?de(kt,n(e)):r(S)},parentInfo(){const e=o(s());je("ParentInfo received from parent:",e),jt?de(jt,e):r(O)},message(){const e=s();je("onMessage called from parent:%c",h,o(e)),de(Mt,n(e))}},a=()=>e.data.split("]")[1].split(v)[0],s=()=>e.data.slice(e.data.indexOf(v)+1),c=()=>e.data.split(v)[2]in{true:1,false:1};function l(){const t=a();Re(t),t in i?i[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||c()||Le(`Unexpected message (${e.data})`)}ee===`${e.data}`.slice(0,13)&&function(){if(!1!==qe)return c()?(Ne(a()),Re(z),void i.init()):void je(`Ignored message of type "${a()}". Received before initialization.`);l()}()});let Yn=!1;const Xn=e=>e.postMessage("[iFrameResizerChild]Ready",window?.iframeResizer?.targetOrigin||"*");function Kn(){if("loading"===document.readyState||!qe||Yn)return;const{parent:e,top:t}=window;Re("ready"),je("Sending%c ready%c to parent from",h,g,window.location.href),Xn(e),e!==t&&Xn(t),Yn=!0}"iframeChildListener"in window?Le("Already setup"):(window.iframeChildListener=e=>setTimeout(()=>Gn({data:e,sameOrigin:!0})),Re("listen"),st(window,w,Gn),st(document,D,Kn),Kn())}()}();
20
+ !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:!1,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},s={profile:0,profileEnd:0,timeStamp:0,trace:0},c=Object.assign(console);const{fromEntries:l,keys:d}=Object,u=e=>[e,c[e]],f=e=>t=>[t,function(n){e[t]=n}],m=(e,t)=>l(d(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.8-beta.4",b="iframeResizer",v=":",z="init",w="message",$="pageHide",S="pageInfo",O="parentInfo",M="scrollToOffset",E="title",k=10,j="data-iframe-size",x="data-iframe-overflowed",I="data-iframe-ignore",T="height",A="width",C="offset",P="offsetSize",R="string",N="number",q="object",L="function",B="auto",D="readystatechange",F="bottom",W="right",H="autoResizeEnabled",V=Symbol("sizeChanged"),U="manualResize",Z="parentResize",J={[U]:1,[Z]:1},_="setOffsetSize",Q="resizeObserver",G="overflowObserver",Y="mutationObserver",X="visibilityObserver",K="No change in content size detected",ee="[iFrameSizer]",te=new Set(["head","body","meta","base","title","script","link","style","map","area","option","optgroup","template","track","wbr","nobr"]),ne=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)},oe=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),re=["spjluzl","rlf","clyzpvu"],ie=["<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.","Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz."],ae=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],se=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),ce=e=>oe(ie[e]);var le=e=>{const t=e[oe(re[0])]||e[oe(re[1])]||e[oe(re[2])];if(!t)return-1;const n=t.split("-");let o=function(e=""){let t=-2;const n=ne(oe(e));return n in se&&(t=se[n]),t}(n[0]);return 0===o||(e=>e[2]===ne(e[0]+e[1]))(n)||(o=-2),o};const de=(e,...t)=>setTimeout(()=>e(...t),0),ue=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},fe=e=>e,me=e=>Math.round(1e3*e)/1e3,pe=e=>e.charAt(0).toUpperCase()+e.slice(1),he=e=>""!=`${e}`&&void 0!==e,ge=e=>e();const ye=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${pe(t)}`)};const be={br:"\n",rb:"",bb:"",b:"",i:"",u:"","/":""},ve=Object.keys(be),ze=new RegExp(`<(${ve.join("|")})>`,"gi"),we=(e,t)=>be[t]??"";let $e=!0,Se=b;const Oe=(Me=function(n={}){const l={},d={},p=[],h={...a,expand:!n.collapsed||a.expanded,...n};let g="";function y(){p.length=0,g=""}function b(){delete h.event,y()}const v=()=>!!p.some(([e])=>e in i)||!!h.expand;function z(){if(0!==p.length){c[v()?"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)c.assert(e in c,`Unknown console method: ${e}`),e in c&&c[e](...t);c.groupEnd(),b()}else b()}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)}`}(),queueMicrotask(()=>queueMicrotask(z)))}function $(e,...t){0===p.length&&w(),p.push([e,...t])}function S(e=r,...t){l[e]?$("log",`${e}: ${performance.now()-l[e]} ms`,...t):$("timeLog",e,...t)}return{...m(h,f(h)),...m(console,e=>[e,(...t)=>$(e,...t)]),...m(s,u),assert:function(e,...t){!0!==e&&$("assert",e,...t)},count:function(e=r){d[e]?d[e]+=1:d[e]=1,$("log",`${e}: ${d[e]}`)},countReset:function(e=r){delete d[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(),l[e]=performance.now()},timeEnd:function(e=r){S(e),delete l[e]},timeLog:S,touch:w}},Me?.__esModule?Me.default:Me);var Me;const Ee=Oe({label:`${b}(child)`,expand:!1});const ke=e=>(...t)=>!$e||Ee[e](...t),je=ke("log"),xe=je,Ie=ke("debug");const{assert:Te,endAutoGroup:Ae,error:Ce,errorBoundary:Pe,event:Re,label:Ne,purge:qe,warn:Le}=Ee,Be=(De=fe,e=>De(typeof e===R?window.chrome?e.replace(ze,we):(e=>e.replaceAll("<br>","\n").replaceAll(/<\/?[^>]+>/gi,""))(e):e));var De;const Fe=(...e)=>Ee.warn(...e.map(Be)),We=(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)=>Fe(t)),He=We("Method"),Ve=We("Method","replaced with"),Ue=We("Option"),Ze=["min-height","min-width","max-height","max-width"],Je=new Set,_e=e=>e.tagName?e.tagName.toLowerCase():"unknown",Qe=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),Ge=(e,t)=>{return(n=Qe(e,t))&&"0px"!==n&&n!==B&&"none"!==n;var n};function Ye({href:e}){Je.has(e)||(je("Unable to access stylesheet:",e),Je.add(e))}const Xe=(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){Ye(n)}return{source:"cross-origin stylesheet",value:Qe(e,t)}}(e,t),Ke=(e,t)=>{const{source:n,value:o}=Xe(e,t),r=_e(e);Fe(`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 et(){for(const e of[document.documentElement,document.body])for(const t of Ze)je(`Checking <${_e(e)}> for blocking CSS: ${t}`),Ge(e,t)&&Ke(e,t)}const tt=e=>t=>void 0===t?void 0:e(t),nt=tt(e=>"true"===e),ot=tt(Number),rt=[];function it(e,t){je(`${e} event listener: %c${t}`,h)}const at=(e,t,n,o)=>{e.removeEventListener(t,n,o),it("Removed",t)},st=(e,t,n,o=!1)=>{e.addEventListener(t,n,o),rt.push(()=>at(e,t,n,o)),it("Added",t)},ct=(e="")=>t=>n=>{n.size>0&&Ie(`${t}Observer ${e}:`,...Array.from(n).flatMap(e=>["\n",e]))},lt=ct("attached to"),dt=((e="")=>t=>n=>{n.size>0&&Ce(`${t}Observer ${e}:`,...Array.from(n).flatMap(e=>["\n",e]))})("already attached"),ut=ct("detached from"),ft=(t,n=!0)=>o=>{o>0&&xe(`${n?"At":"De"}tached %c${t}Observer%c ${n?"to":"from"} %c${o}%c element${1===o?"":"s"}`,h,e,h,e)},mt=(e,t,n,o)=>{const r=ut(e);return e=>{const i=new Set;let a=0;for(const o of e)n.has(o)&&(t.unobserve(o),n.delete(o),i.add(o),a+=1);r(i),o(a),i.clear()}},pt="Mutation",ht=new Set,gt=new Set,yt=new Set,bt=[],vt={attributes:!0,attributeFilter:[I,j],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};let zt,wt=1,$t=!1,St=0;const Ot=ct("added")(pt),Mt=ct("removed (page)")(pt),Et=ct("removed (added)")(pt),kt=e=>e.nodeType!==Node.ELEMENT_NODE||te.has(e.tagName.toLowerCase());function jt(e){const t=e.addedNodes;for(const e of t)kt(e)||ht.add(e)}function xt(e){const t=e.removedNodes;for(const e of t)kt(e)||(ht.has(e)?(ht.delete(e),yt.add(e)):gt.add(e))}const It=e=>{xe("Mutations:",e);for(const t of e)jt(t),xt(t);Ot(ht),Mt(gt),Et(yt),yt.clear()};const Tt=e=>()=>{const t=performance.now(),n=t-St,o=16*wt+++2;if(n>o&&n<200)return Re("mutationThrottled"),xe("Update delayed due to heavy workload on the callStack"),xe(`EventLoop busy time: %c${me(n)}ms %c> Max wait: %c${o-2}ms`,h,g,h),setTimeout(zt,16*wt),void(St=t);wt=1,bt.forEach(It),bt.length=0,$t=!1,gt.size>0&&je(`Detected %c${gt.size} %cremoved element${gt.size>1?"s":""}`,h,g),ht.size>0&&je(`Found %c${ht.size} %cnew element${ht.size>1?"s":""}`,h,g),e({addedNodes:ht,removedNodes:gt}),ht.clear(),gt.clear()};function At(e){bt.push(e),$t||(St=performance.now(),$t=!0,requestAnimationFrame(zt))}function Ct(e){const t=new window.MutationObserver(At),n=document.body||document.documentElement;return zt=Tt(e),t.observe(n,vt),xe("Attached%c MutationObserver%c to body",h,g),{...t,disconnect:()=>{ht.clear(),gt.clear(),bt.length=0,t.disconnect(),xe("Detached%c MutationObserver",h)}}}const Pt="Overflow",Rt=ft(Pt),Nt=ft(Pt,!1),qt=lt(Pt),Lt=dt(Pt),Bt=e=>e.hidden||null===e.offsetParent||"none"===e.style.display,Dt=(e,t)=>{const n=t.side,o={root:t.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||fe,i=(t=!1)=>e(t),a=(e,t)=>0===e||e>t[n],s=(e,t)=>e.toggleAttribute(x,t);const c=new IntersectionObserver(function(e){for(const t of e){const{boundingClientRect:e,rootBounds:o,target:r}=t;if(!o)continue;const i=e[n],c=a(i,o)&&!Bt(r);s(r,c)}r(i)},o),l=new WeakSet;return{attachObservers:function(e){const t=new Set,n=new Set;let o=0;for(const r of e)r.nodeType===Node.ELEMENT_NODE&&(l.has(r)?t.add(r):(c.observe(r),l.add(r),n.add(r),o+=1));Lt(t),qt(n),Rt(o),n.clear(),t.clear()},detachObservers:mt(Pt,c,l,Nt),disconnect:()=>{c.disconnect(),xe("Detached%c OverflowObserver",h)}}},Ft="--ifr-start",Wt="--ifr-end",Ht="--ifr-measure",Vt=[];let Ut,Zt={},Jt=0;function _t(){try{performance.clearMarks(Ft),performance.clearMarks(Wt),performance.clearMeasures(Ht)}catch{}}function Qt(e){e.getEntries().forEach(e=>{if(e.name===Wt)try{const{duration:t}=performance.measure(Ht,Ft,Wt);Zt=e.detail,Vt.push(t),Vt.length>100&&Vt.shift()}catch{}})}function Gt(){xe("Attached%c PerformanceObserver%c to page",h,g);const e=new PerformanceObserver(Qt);return e.observe({entryTypes:["mark"]}),Ut=setInterval(()=>{if(Vt.length<10)return;if(Zt.hasTags&&Zt.len<25)return;Vt.sort();const e=Math.min(Vt.reduce((e,t)=>e+t,0)/Vt.length,Vt[Math.floor(Vt.length/2)]),t=me(e);t>Jt&&(Jt=t,Re("performanceObserver"),je("Mean time:",me(Vt[Math.floor(Vt.length/2)])),je("Median time:",me(Vt.reduce((e,t)=>e+t,0)/Vt.length)),je("Average time:",t),je("Max time:",me(Math.max(...Vt)))),_t(),e<=4||(clearInterval(Ut),Fe(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${me(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${Zt.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))},5e3),{disconnect:()=>{_t(),clearInterval(Ut),e.disconnect(),xe("Detached%c PerformanceObserver",h)}}}const Yt="Resize",Xt=ft(Yt),Kt=ft(Yt,!1),en=lt(Yt),tn=dt(Yt),nn=new WeakSet,on=new Set,rn=new Set;let an;function sn(e){let t=0;for(const n of e){if(n.nodeType!==Node.ELEMENT_NODE)continue;const e=getComputedStyle(n)?.position;""!==e&&"static"!==e&&(nn.has(n)?on.add(n):(an.observe(n),nn.add(n),rn.add(n),t+=1))}tn(on),en(rn),Xt(t),rn.clear(),on.clear()}function cn(e){const t=new IntersectionObserver(t=>e(t.at(-1).isIntersecting),{threshold:0}),n=document.documentElement;return t.observe(n),xe("Attached%c VisibilityObserver%c to page",h,g),{disconnect:()=>{t.disconnect(),xe("Detached%c VisibilityObserver",h)}}}const ln=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},dn=ln(L),un=ln(N),fn=ln(R);"undefined"!=typeof window&&function(){const o={height:()=>(Le("Custom height calculation function not defined"),Ln.auto()),width:()=>(Le("Custom width calculation function not defined"),Bn.auto())},r={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},i={},a=B,s="scroll";let c,l,d,u,f,m,p,ne,ie,se=!0,be="",ve=0,ze="",we="",Oe=!1,Me=!0,ke=!1,qe=!0,Be=!1,De=!1,We=!0,Ze=!1,Je=1,_e=a,Qe="",Ge=!0,Ye={},Xe=!1,Ke=!1,tt=!1,it=0,ct=!1,lt=0,dt=0,ut=new Set,ft="",pt="child",ht=!1,gt="",yt=[],bt=window.parent,vt="*",zt=0,wt=!1,$t=1,St=s,Ot=window,Mt=()=>{Le("onMessage function not defined")},Et=()=>{},kt=null,jt=null;function xt(e){var t;!function(e){ft=e[0]??ft,ve=ot(e[1])??ve,ke=nt(e[2])??ke,tt=nt(e[3])??tt,se=nt(e[6])??se,ze=e[7]??ze,_e=e[8]??_e,be=e[9]??be,we=e[10]??we,zt=ot(e[11])??zt,Ye.enable=nt(e[12])??!1,pt=e[13]??pt,St=e[14]??St,ct=nt(e[15])??ct,lt=ot(e[16])??lt,dt=ot(e[17])??dt,Me=nt(e[18])??Me,c=e[19]??c,ne=e[20]??ne,it=ot(e[21])??it,Ke=nt(e[23])??Ke}(e),Se=(t={id:ft,enabled:tt,expand:Ke}).id||b,Ee.label(`${Se}`),Ee.expand(t.expand),$e=t.enabled,Re("initReceived"),je(`Initialising iframe v${y} ${window.location.href}`),function(){function e(e){je("Reading data from page:",Object.keys(e)),ie=dn(e,"onBeforeResize")??ie,Mt=dn(e,"onMessage")??Mt,Et=dn(e,"onReady")??Et,typeof e?.offset===N&&(Ue(C,P),Me&&(lt=un(e,C)??lt),ke&&(dt=un(e,C)??dt)),typeof e?.offsetSize===N&&(Me&&(lt=un(e,P)??lt),ke&&(dt=un(e,P)??dt)),l=fn(e,oe(re[0]))??l,Qe=fn(e,"ignoreSelector")??Qe,gt=fn(e,"sizeSelector")??gt,vt=fn(e,"targetOrigin")??vt,_e=e?.heightCalculationMethod||_e,St=e?.widthCalculationMethod||St}function t(e,t){return typeof e===L&&(Fe(`<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===it)return;const n=window.iframeResizer||window.iFrameResizer;typeof n===q&&(e(n),_e=t(_e,T),St=t(St,A),xe(`Set targetOrigin for parent: %c${vt}`,h))}(),[Bt,Vt,ln,qt,Ht,on,rn,en,Lt,Rt,Oe?fe:et,_t,()=>Ut("background",be),()=>Ut("padding",we),Oe?fe:Qt,pn,Jt,xn,hn,mn,gn,Tt,yn].forEach(e=>{try{e()}catch(e){if(it<0)throw e;Fe("<rb>Error in setup function</>\n<i>iframe-resizer</> detected an error during setup.\n\nPlease report the following error message at <u>https://github.com/davidjbradshaw/iframe-resizer/issues</>"),Ce(e)}}),Pt(ue(Et)),je("Initialization complete"),Ae(),Zn(z,"Init message from host page",void 0,void 0,`${y}:${it}`),document.title&&""!==document.title&&Qn(0,0,E,document.title)}function It({persisted:e}){e||Qn(0,0,"beforeUnload"),Re($),xe("Page persisted:",e),e||rt.forEach(ge)}const Tt=()=>st(window,$.toLowerCase(),It);let At=!1;function Pt(e){"complete"===document.readyState?de(e):At||st(document,D,()=>Pt(e)),At=!0}function Rt(){yt=document.querySelectorAll(`[${j}]`),Ze=yt.length>0,je(`Tagged elements found: %c${Ze}`,h)}let Nt=0;function qt(){const n=document.querySelectorAll(`*[${I}]`);return Be=n.length>0,Be&&n.length!==Nt&&(function(n){const o=1===n.length?"":"s";Le(`%c[${I}]%c found on %c${n.length}%c element${o}`,t,e,t,e)}(n),Nt=n.length),Be}function Lt(){"BackCompat"===document.compatMode&&Fe("<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")}function Bt(){ne&&""!==ne&&"false"!==ne?ne!==y&&Fe(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ne} - Child page: ${y}.\n`):Fe("<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")}function Ht(){try{ht=1===it||"iframeParentListener"in window.parent}catch(e){je("Cross domain iframe detected")}}function Vt(){ke===Me&&(Oe=!0)}function Ut(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),xe(`Set body ${e}: %c${t}`,h))}function Zt(e,t,n){if(""!==n){je(`${e}: %c${n}`,h);for(const e of document.querySelectorAll(n))je(`Applying ${t} to:`,e),e.toggleAttribute(t,!0)}}function Jt(){Zt("sizeSelector",j,gt),Zt("ignoreSelector",I,Qe)}function _t(){var e,t;void 0===ze&&(ze=`${ve}px`),Ut("margin",(e="margin",(t=ze).includes("-")&&(Le(`Negative CSS value ignored for ${e}`),t=""),t))}function Qt(){const e=e=>e.style.setProperty(T,B,"important");e(document.documentElement),e(document.body),je("Set HTML & body height: %cauto !important",h)}function Xt(e){({add(t){function n(){Zn(e.eventName,e.eventType)}i[t]=n,st(window,t,n,{passive:!0})},remove(e){const t=i[e];delete i[e],at(window,e,t)}})[e.method](e.eventName)}function en(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach(n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(j,!0)});t("data-iframe-height"),t("data-iframe-width"),e&&Fe("<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</>.")}function tn(e,t,n){const{label:o}=n;return t!==e&&(e in n||(Le(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in r)&&Fe(`<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 ${ne?"remove this option.":`set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page. This can be done on the child page by adding the following code:\n\nwindow.iframeResizer = {\n license: 'xxxx',\n ${o}CalculationMethod: '${B}',\n}\n`}\n`),je(`Set ${o} calculation method: %c${e}`,h),e}function on(){_e=tn(_e,a,Ln)}function rn(){St=tn(St,s,Bn)}function ln(){const t=it,n=le({key:c}),o=le({key:l});if(it=Math.max(n,o),it<0){if(it=Math.min(n,o),Fe(`${ce(it+2)}${ce(2)}`),he(ne))throw ce(it+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"")}else(!he(ne)||t>-1&&it>t)&&(sessionStorage.getItem("ifr")!==y&&function(t,n){console.info(`${Se} %ciframe-resizer ${t}`,$e||n<1?"font-weight: bold;":e)}(`v${y} (${(e=>oe(ae[e]))(it)})`,it),it<2&&Fe(ce(3)),sessionStorage.setItem("ifr",y))}function mn(){var e;!0!==se&&je("Auto Resize disabled"),Xt({method:e="add",eventType:"After Print",eventName:"afterprint"}),Xt({method:e,eventType:"Before Print",eventName:"beforeprint"})}function pn(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}function hn(){function e(e){const t=e.getBoundingClientRect(),n={x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop};return{x:parseInt(t.left,k)+parseInt(n.x,k),y:parseInt(t.top,k)+parseInt(n.y,k)}}function t(t){const n=t.split("#")[1]||t,o=decodeURIComponent(n),r=document.getElementById(o)||document.getElementsByName(o)[0];void 0===r?(je(`In page link (#${n}) not found in iframe, so sending to parent`),Qn(0,0,"inPageLink",`#${n}`)):function(t){const o=e(t);je(`Moving to in page link (%c#${n}%c) at x: %c${o.x}%c y: %c${o.y}`,h,g,h,g,h),Qn(o.y,o.x,M)}(r)}function n(){const{hash:e,href:n}=window.location;""!==e&&"#"!==e&&t(n)}const{enable:o}=Ye;o?1===it?Fe(ce(5)):(je("Setting up location.hash handlers"),function(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&st(e,"click",n=>{n.preventDefault(),t(e.getAttribute("href"))})}(),st(window,"hashchange",n),setTimeout(n,128)):je("In page linking not enabled"),Ye={...Ye,findTarget:t}}function gn(){function e(e){Qn(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){je(`Add event listener: %c${n}`,h),st(window.document,t,e)}!0===ct&&(t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave"))}function yn(){1!==it&&(Ot.parentIframe=Object.freeze({autoResize:e=>(ye(e,"boolean","parentIframe.autoResize(enable) enable"),!1===ke&&!1===Me?(Re(H),Fe("Auto Resize can not be changed when <b>direction</> is set to 'none'."),!1):(!0===e&&!1===se?(se=!0,queueMicrotask(()=>Zn(H,"Auto Resize enabled"))):!1===e&&!0===se&&(se=!1),Qn(0,0,"autoResize",JSON.stringify(se)),se)),close(){Qn(0,0,"close")},getId:()=>ft,getOrigin:()=>(Re("getOrigin"),He("getOrigin()","getParentOrigin()"),d),getParentOrigin:()=>d,getPageInfo(e){if(typeof e===L)return kt=e,Qn(0,0,S),void Ve("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");kt=null,Qn(0,0,"pageInfoStop")},getParentProps:e=>(ye(e,L,"parentIframe.getParentProps(callback) callback"),jt=e,Qn(0,0,O),()=>{jt=null,Qn(0,0,"parentInfoStop")}),getParentProperties(e){He("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){ye(e,R,"parentIframe.moveToAnchor(anchor) anchor"),Ye.findTarget(e)},reset(){!function(){const e=_e;_e=a,je(`Reset trigger event: %c${"parentIframe.reset"}`,h),wt?je("TriggerLock blocked calculation"):(wt=!0,Ie("Trigger event lock on"),requestAnimationFrame(()=>{wt=!1,Ie("Trigger event lock off")})),Jn("reset"),_e=e}()},setOffsetSize(e){ye(e,N,"parentIframe.setOffsetSize(offset) offset"),lt=e,dt=e,Zn(_,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){ye(e,N,"parentIframe.scrollBy(x, y) x"),ye(t,N,"parentIframe.scrollBy(x, y) y"),Qn(t,e,"scrollBy")},scrollTo(e,t){ye(e,N,"parentIframe.scrollTo(x, y) x"),ye(t,N,"parentIframe.scrollTo(x, y) y"),Qn(t,e,"scrollTo")},scrollToOffset(e,t){ye(e,N,"parentIframe.scrollToOffset(x, y) x"),ye(t,N,"parentIframe.scrollToOffset(x, y) y"),Qn(t,e,M)},sendMessage(e,t){t&&ye(t,R,"parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),Qn(0,0,w,JSON.stringify(e),t)},setHeightCalculationMethod(e){_e=e,on()},setWidthCalculationMethod(e){St=e,rn()},setTargetOrigin(e){ye(e,R,"parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),je(`Set targetOrigin: %c${e}`,h),vt=e},resize(e,t){void 0!==e&&ye(e,N,"parentIframe.resize(customHeight, customWidth) customHeight"),void 0!==t&&ye(t,N,"parentIframe.resize(customHeight, customWidth) customWidth"),Zn(U,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){He("size()","resize()"),this.resize(e,t)}}),Ot.parentIFrame=Ot.parentIframe)}let bn=new Set;function vn(){const e=document.querySelectorAll(`[${x}]`);ut=function(e){const t=new Set,n=new Set;for(const o of e)o.closest(`[${I}]`)?n.add(o):t.add(o);return n.size>0&&queueMicrotask(()=>{Re("overflowIgnored"),xe("Ignoring elements with [data-iframe-ignore] > *:\n",n),Ae()}),t}(e),De=ut.size>0,typeof Set.prototype.symmetricDifference===L&&(We=ut.symmetricDifference(bn).size>0),bn=ut}function zn(){switch(vn(),!0){case!We:return;case ut.size>1:xe("Overflowed Elements:",ut);break;case De:break;default:xe("No overflow detected")}Zn(G,"Overflow updated")}function wn(e){const t={root:document.documentElement,side:Me?F:W};return u=Dt(zn,t),u.attachObservers(e),u}function $n(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Zn(Q,`Element resized <${function(e){switch(!0){case!he(e):return"";case he(e.id):return`${e.nodeName}#${e.id}`;case he(e.name):return`${e.nodeName} (${e.name}`;case he(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}function Sn(e){return an=new ResizeObserver($n),an.observe(document.body),nn.add(document.body),xe("Attached%c ResizeObserver%c to body",h,g),f={attachObserverToNonStaticElements:sn,detachObservers:mt(Yt,an,nn,Kt),disconnect:()=>{an.disconnect(),xe("Detached%c ResizeObserver",h)}},f.attachObserverToNonStaticElements(e),f}function On(e){je(`Visible: %c${e}`,h),Xe=!e,Zn(X,"Visibility changed")}const Mn=e=>{const t=new Set;for(const n of e){t.add(n);for(const e of Cn(n))t.add(e)}return xe("Inspecting:\n",t),t},En=e=>{if(0===e.size)return;Re("addObservers");const t=Mn(e);u.attachObservers(t),f.attachObserverToNonStaticElements(t),Ae()},kn=e=>{if(0===e.size)return;Re("removeObservers");const t=Mn(e);u.detachObservers(t),f.detachObservers(t),Ae()};function jn(e){!function({addedNodes:e,removedNodes:t}){Re("contentMutated"),Jt(),Rt(),vn(),Ae(),kn(t),En(e)}(e),Zn(Y,"Mutation Observed")}function xn(){const e=Cn(document.documentElement);var t;t=[Ct(jn),wn(e),Gt(),Sn(e),cn(On)],rt.push(...t.map(e=>e.disconnect))}function In(e){performance.mark(Ft);const t=pe(e);let n=1,o=document.documentElement,r=Ze?0:document.documentElement.getBoundingClientRect().bottom;const i=Ze?yt:De?Array.from(ut):Cn(document.documentElement);for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return xe(`${t} position calculated from:`,o),xe(`Checked %c${i.length}%c elements`,h,g),performance.mark(Wt,{detail:{hasTags:Ze,len:i.length,logging:tt,Side:t}}),r}const Tn=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],An=`* ${Array.from(te).map(e=>`:not(${e})`).join("")}`,Cn=e=>e.querySelectorAll(An),Pn={height:0,width:0},Rn={height:0,width:0},Nn=[h,g,h];function qn(e){function t(){return Rn[o]=r,Pn[o]=s,Math.max(r,1)}const n=e===Ln,o=e.label,r=e.boundingClientRect(),i=Math.ceil(r),a=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),c=`HTML: %c${r}px %cPage: %c${s}px`;let l=1;switch(!0){case!e.enabled():return Math.max(s,1);case Ze:xe("Found element with data-iframe-size attribute"),l=e.taggedElement();break;case!De&&qe&&0===Rn[o]&&0===Pn[o]:xe(`Initial page size values: ${c}`,...Nn),l=t();break;case wt&&r===Rn[o]&&s===Pn[o]:xe(`Size unchanged: ${c}`,...Nn),l=Math.max(r,s);break;case 0===r&&0!==s:xe(`Page is hidden: ${c}`,...Nn),l=s;break;case!De&&r!==Rn[o]&&s<=Pn[o]:xe(`New <html> size: ${c} `,...Nn),xe(`Previous <html> size: %c${Rn[o]}px`,h),l=t();break;case!n:l=e.taggedElement();break;case!De&&r<Rn[o]:xe(`<html> size decreased: ${c}`,...Nn),l=t();break;case s===a||s===i:xe(`<html> size equals page size: ${c}`,...Nn),l=t();break;case r>s:xe(`Page size < <html> size: ${c}`,...Nn),l=t();break;case De:xe("Found elements possibly overflowing <html> "),l=e.taggedElement();break;default:xe(`Using <html> size: ${c}`,...Nn),l=t()}return xe(`Content ${o}: %c${l}px`,h),l+=function(e){const t=e.getOffset();return 0!==t&&xe(`Page offsetSize: %c${t}px`,h),t}(e),Math.max(l,1)}const Ln={label:T,enabled:()=>Me,getOffset:()=>lt,auto:()=>qn(Ln),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,k)+parseInt(t.marginBottom,k)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Ln.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(...Tn(Ln)),min:()=>Math.min(...Tn(Ln)),grow:()=>Ln.max(),lowestElement:()=>In(F),taggedElement:()=>In(F)},Bn={label:A,enabled:()=>ke,getOffset:()=>dt,auto:()=>qn(Bn),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(...Tn(Bn)),min:()=>Math.min(...Tn(Bn)),rightMostElement:()=>In(W),scroll:()=>Math.max(Bn.bodyScroll(),Bn.documentElementScroll()),taggedElement:()=>In(W)},Dn=(e,t)=>!(Math.abs(e-t)<=zt);function Fn(e,t){const n=e[t](),o=e.enabled()&&void 0!==ie?function(e){const t=ie(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`);if(t<1)throw new RangeError(`Out of range value returned from onBeforeResize(): ${t}, must be at least 1`);return t}(n):n;return Te(o>=1,`New iframe ${e.label} is too small: ${o}, must be at least 1`),o}let Wn=!1;const Hn=ue(()=>Fe(ce(4)));let Vn,Un=!1;const Zn=Pe((e,t,n,o,r)=>{switch(Re(e),!0){case!0===Xe:if(!0===Un)break;je("Iframe hidden - Ignored resize request"),Un=!0,Wn=!1,cancelAnimationFrame(Vn);break;case!0===Wn&&e!==G:je("Resize already pending - Ignored resize request");break;case!se&&!(e in J):xe("Resizing disabled");break;default:Un=!1,Wn=!0,p=performance.now(),m=!0,Vn||(Vn=requestAnimationFrame(()=>{Wn=!1,Vn=null,Re("requestAnimationFrame"),Ie(`Reset sendPending: %c${e}`,h)})),function(e,t,n,o,r){const i=n??Fn(Ln,_e),a=o??Fn(Bn,St),s=Me&&Dn(Je,i)||ke&&Dn($t,a)?V:e;switch(je(`Resize event: %c${t}`,h),s){case z:case H:case V:Je=i,$t=a;case _:_n(Je,$t,e,r);break;case G:case Y:case Q:case X:je(K);break;default:xe(K)}m=!1}(e,t,n,o,r)}Ae()});function Jn(e){Je=Ln[_e](),$t=Bn[St](),Qn(Je,$t,e)}function _n(e,t,o,r,i){it<-1||(void 0!==i?je(`Message targetOrigin: %c${i}`,h):i=vt,function(){const a=`${ft}:${e}:${t}:${o}${void 0===r?"":`:${r}`}`;if(ht)try{window.parent.iframeParentListener(ee+a)}catch(e){if(1!==it)throw e;return void Hn()}else bt.postMessage(ee+a,i);m&&je(function(){const e=me(performance.now()-p);return o===z?`Initialised iframe in %c${e}ms`:`Size calculated in %c${e}ms`}(),h),xe(`Sending message to parent page via ${ht?"sameOrigin":"postMessage"}: %c%c${a}`,n,h)}())}const Qn=Pe((e,t,n,o,r)=>{Re(n),_n(e,t,n,o,r),Ae()}),Gn=Pe(function(e){Re("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>t(n(e)),r=e=>Qn(0,0,`${e}Stop`),i={init:function(){if("loading"===document.readyState)return void je("Page not ready, ignoring init message");const t=e.data.slice(13).split(v);bt=e.source,d=e.origin,xt(t),qe=!1,setTimeout(()=>{Ge=!1},128)},reset(){Ge?je("Page reset ignored by init"):(je("Page size reset by host page"),Jn("resetPage"))},resize(){je("Resize requested by host page"),Zn(Z,"Parent window requested size check")},moveToAnchor(){Ye.findTarget(s())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=s();je("PageInfo received from parent:",o(e)),kt?de(kt,n(e)):r(S)},parentInfo(){const e=o(s());je("ParentInfo received from parent:",e),jt?de(jt,e):r(O)},message(){const e=s();je("onMessage called from parent:%c",h,o(e)),de(Mt,n(e))}},a=()=>e.data.split("]")[1].split(v)[0],s=()=>e.data.slice(e.data.indexOf(v)+1),c=()=>e.data.split(v)[2]in{true:1,false:1};function l(){const t=a();Re(t),t in i?i[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||c()||Le(`Unexpected message (${e.data})`)}ee===`${e.data}`.slice(0,13)&&function(){if(!1!==qe)return c()?(Ne(a()),Re(z),void i.init()):void je(`Ignored message of type "${a()}". Received before initialization.`);l()}()});let Yn=!1;const Xn=e=>e.postMessage("[iFrameResizerChild]Ready",window?.iframeResizer?.targetOrigin||"*");function Kn(){if("loading"===document.readyState||!qe||Yn)return;const{parent:e,top:t}=window;Re("ready"),je("Sending%c ready%c to parent from",h,g,window.location.href),Xn(e),e!==t&&Xn(t),Yn=!0}"iframeChildListener"in window?Le("Already setup"):(window.iframeChildListener=e=>setTimeout(()=>Gn({data:e,sameOrigin:!0})),Re("listen"),st(window,w,Gn),st(document,D,Kn),Kn())}()}();
21
21
  //# sourceMappingURL=iframeResizer.contentWindow.min.js.map
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/legacy (parent) 5.5.8-beta.3 (umd) - 2026-01-24
4
+ * @module iframe-resizer/legacy (parent) 5.5.8-beta.4 (umd) - 2026-01-26
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,5 @@
17
17
  */
18
18
 
19
19
 
20
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).iframeResize=t()}(this,function(){"use strict";console.info("IFRAME-RESIZER 5\n\nThis package has been split into separate packages for Parent and Child pages. Along with new packages for jQuery, React and Vue.\n\nGoing forward you are advised to use the new separate packages for Parent and Child pages, rather than this combined package.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n");const e="5.5.8-beta.3",t="iframeResizer",n=":",i="autoResize",o="init",r="iframeReady",a="load",s="message",l="onload",c="pageInfo",d="parentInfo",u="reset",f="resize",p="scroll",m="\n",h="child",g="parent",y="string",b="object",w="function",v="undefined",z="auto",$="none",k="both",j="vertical",T="horizontal",x="[iFrameSizer]",M=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),E=Object.freeze({[l]:1,[o]:1,[r]:1}),R="expanded",S="collapsed",I=Object.freeze({[R]:1,[S]:1}),O="Use of the old name will be removed in a future version of <i>iframe-resizer</>.",C="font-weight: normal;",A=C+"font-style: italic;",W="default",F=Object.freeze({assert:!0,error:!0,warn:!0}),L={expand:!1,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},N={profile:0,profileEnd:0,timeStamp:0,trace:0},P=Object.assign(console);const{fromEntries:B,keys:H}=Object,q=e=>[e,P[e]],D=e=>t=>[t,function(n){e[t]=n}],U=(e,t)=>B(H(e).map(t));const J=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,V=J?"color: #A9C7FB;":"color: #135CD2;",Z=J?"color: #E3E3E3;":"color: #1F1F1F;",G=Object.hasOwn||((e,t)=>Object.prototype.hasOwnProperty.call(e,t)),X={br:"\n",rb:"",bb:"",b:"",i:"",u:"","/":""},Y=Object.keys(X),_=new RegExp(`<(${Y.join("|")})>`,"gi"),Q=(e,t)=>X[t]??"",K=e=>t=>e(typeof t===y?window.chrome?t.replace(_,Q):(e=>e.replaceAll("<br>",m).replaceAll(/<\/?[^>]+>/gi,""))(t):t),ee={},te=(ne=function(e={}){const t={},n={},i=[],o={...L,expand:!e.collapsed||L.expanded,...e};let r="";function a(){i.length=0,r=""}function s(){delete o.event,a()}const l=()=>!!i.some(([e])=>e in F)||!!o.expand;function c(){if(0!==i.length){P[l()?"group":"groupCollapsed"](`%c${o.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(o)} %c${o.showTime?r:""}`,C,"font-weight: bold;",A);for(const[e,...t]of i)P.assert(e in P,`Unknown console method: ${e}`),e in P&&P[e](...t);P.groupEnd(),s()}else s()}function d(){""===r&&(r=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)}`}(),queueMicrotask(()=>queueMicrotask(c)))}function u(e,...t){0===i.length&&d(),i.push([e,...t])}function f(e=W,...n){t[e]?u("log",`${e}: ${performance.now()-t[e]} ms`,...n):u("timeLog",e,...n)}return{...U(o,D(o)),...U(console,e=>[e,(...t)=>u(e,...t)]),...U(N,q),assert:function(e,...t){!0!==e&&u("assert",e,...t)},count:function(e=W){n[e]?n[e]+=1:n[e]=1,u("log",`${e}: ${n[e]}`)},countReset:function(e=W){delete n[e]},endAutoGroup:c,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;u("error",e),c()}return n},event:function(e){d(),o.event=e},purge:a,time:function(e=W){d(),t[e]=performance.now()},timeEnd:function(e=W){f(e),delete t[e]},timeLog:f,touch:d}},ne?.__esModule?ne.default:ne);var ne;let ie=!0;const oe=te({expand:!1,label:g}),re=e=>window.top===window.self?`parent(${e})`:`nested parent(${e})`;const ae=e=>(t,...n)=>ee[t]?ee[t].console[e](...n):oe[e](...n),se=e=>(t,...n)=>!0===(e=>ee[e]?ee[e].log:ie)(t)?ae(e)(t,...n):null,le=se("log"),ce=le,de=se("debug"),ue=ae("warn"),fe=ae("error"),pe=ae("event"),me=ae("purge"),he=ae("endAutoGroup"),ge=ae("errorBoundary");const ye=K(e=>e),be=(e,...n)=>ee[e]?ee[e].console.warn(...n.map(ye)):queueMicrotask(()=>{const i=K((e=>(...n)=>[`${t}(${e})`,...n].join(" "))(e));console?.warn(...n.map(i))}),we=(e=>(t,n="renamed to")=>(i,o,r="",a="")=>e(a,`<rb>Deprecated ${t}(${i.replace("()","")})</>\n\nThe <b>${i}</> ${t.toLowerCase()} has been ${n} <b>${o}</>. ${r}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))(be),ve=we("Function"),ze=we("Option"),$e=(e,t,n,i)=>e.addEventListener(t,n,i||!1),ke=(e,t,n)=>e.removeEventListener(t,n,!1),je=e=>{if(!e)return"";let t=-559038744,n=1103547984;for(let i,o=0;o<e.length;o++)i=e.codePointAt(o),t=Math.imul(t^i,2246822519),n=Math.imul(n^i,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)},Te=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),xe=["spjluzl","rlf","clyzpvu"],Me=["<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.","Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz."],Ee=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],Re=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),Se=e=>Te(Me[e]),Ie=e=>{const t=e[Te(xe[0])]||e[Te(xe[1])]||e[Te(xe[2])];if(!t)return-1;const n=t.split("-");let i=function(e=""){let t=-2;const n=je(Te(e));return n in Re&&(t=Re[n]),t}(n[0]);return 0===i||(e=>e[2]===je(e[0]+e[1]))(n)||(i=-2),i};function Oe(e,t){const{checkOrigin:n,iframe:{src:i,sandbox:o},initialisedFirstPage:r,waitForLoad:a}=t[e],s=(e=>{try{return new URL(e).origin}catch(e){return null}})(i);pe(e,"noResponse"),be(e,`<rb>No response from iframe</>\n\nThe iframe (<i>${e}</>) has not responded within ${t[e].warningTimeout/1e3} seconds. Check <b>@iframe-resizer/child</> package has been loaded in the iframe.\n${n&&s?`\nThe <b>checkOrigin</> option is currently enabled. If the iframe redirects away from <i>${s}</>, then the connection to the iframe may be blocked by the browser. To disable this option, set <b>checkOrigin</> to <bb>false</> or an array of allowed origins. See <u>https://iframe-resizer.com/checkorigin</> for more information.\n`:""}${a&&!r?"\nThe <b>waitForLoad</> option is currently set to <bb>true</>. If the iframe loads before <i>iframe-resizer</> runs, this option will prevent <i>iframe-resizer</> initialising. To disable this option, set <b>waitForLoad</> to <bb>false</>.\n":""}${(e=>typeof e===b&&e.length>0&&!(e.contains("allow-scripts")&&e.contains("allow-same-origin")))(o)?"\nThe iframe has the <b>sandbox</> attribute, please ensure it contains both the <bb>allow-same-origin</> and <bb>allow-scripts</> values.\n":""}\nThis message can be ignored if everything is working, or you can set the <b>warningTimeout</> option to a higher value or zero to suppress this warning.\n`)}const Ce={};const Ae=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyPadding:null,checkOrigin:!0,direction:j,firstRun:!0,inPageLinks:!1,heightCalculationMethod:z,id:"iFrameResizer",log:!1,logExpand:!1,license:void 0,mouseEvents:!0,offsetHeight:null,offsetWidth:null,postMessageTarget:null,sameDomain:!1,scrolling:!1,sizeHeight:!0,sizeWidth:!1,tolerance:0,waitForLoad:!1,warningTimeout:5e3,widthCalculationMethod:z,onBeforeClose:()=>!0,onAfterClose(){},onInit:!1,onMessage:null,onMouseEnter(){},onMouseLeave(){},onReady:e=>{typeof ee[e.id].onInit===w&&(ze("init()","onReady()","",e.id),ee[e.id].onInit(e))},onResized(){},onScroll:()=>!0}),We={position:null,version:e};function Fe(t){function r(){Ue(L),qe(B),O("onResized",L)}function l(e){if("border-box"!==e.boxSizing)return 0;return(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function m(e){if("border-box"!==e.boxSizing)return 0;return(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}const h=e=>W.slice(W.indexOf(n)+7+e);const b=(e,t)=>(n,i)=>{const o={};var r,a;r=function(){Ve(`${n} (${e})`,`${e}:${t()}`,i)},o[a=i]||(r(),o[a]=requestAnimationFrame(()=>{o[a]=null}))},w=(e,t)=>()=>{let n=!1;const i=t=>()=>{ee[c]?n&&n!==t||(e(t,c),n=t,requestAnimationFrame(()=>{n=!1})):l()},o=i(p),r=i("resize window");function s(e,n){le(c,`${e}listeners for send${t}`),n(window,p,o),n(window,f,r)}function l(){pe(c,`stop${t}`),s("Remove ",ke),d.disconnect(),u.disconnect(),ke(ee[c].iframe,a,l)}const c=B,d=new ResizeObserver(i("pageObserver")),u=new ResizeObserver(i("iframeObserver"));ee[c]&&(ee[c][`stop${t}`]=l,$e(ee[c].iframe,a,l),s("Add ",$e),d.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),u.observe(ee[c].iframe,{attributes:!0,childList:!1,subtree:!1}))},v=e=>()=>{e in ee[B]&&(ee[B][e](),delete ee[B][e])},z=b(c,function(){const e=document.body.getBoundingClientRect(),t=L.iframe.getBoundingClientRect(),{scrollY:n,scrollX:i,innerHeight:o,innerWidth:r}=window,{clientHeight:a,clientWidth:s}=document.documentElement;return JSON.stringify({iframeHeight:t.height,iframeWidth:t.width,clientHeight:Math.max(a,o||0),clientWidth:Math.max(s,r||0),offsetTop:parseInt(t.top-e.top,10),offsetLeft:parseInt(t.left-e.left,10),scrollTop:n,scrollLeft:i,documentHeight:a,documentWidth:s,windowHeight:o,windowWidth:r})}),$=b(d,function(){const{iframe:e}=L,{scrollWidth:t,scrollHeight:n}=document.documentElement,{width:i,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}=window.visualViewport;return JSON.stringify({iframe:e.getBoundingClientRect(),document:{scrollWidth:t,scrollHeight:n},viewport:{width:i,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}})}),k=w(z,"PageInfo"),j=w($,"ParentInfo"),T=v("stopPageInfo"),M=v("stopParentInfo");function E(e){const t=e.getBoundingClientRect();return Be(B),{x:Number(t.left)+Number(We.position.x),y:Number(t.top)+Number(We.position.y)}}function R(e){const t=e?E(L.iframe):{x:0,y:0};ce(B,`Reposition requested (offset x:%c${t.x}%c y:%c${t.y})`,V,Z,V);const n=((e,t)=>({x:e.width+t.x,y:e.height+t.y}))(L,t),i=window.parentIframe||window.parentIFrame;i?function(t,n){setTimeout(()=>t["scrollTo"+(e?"Offset":"")](n.x,n.y))}(i,n):function(e){We.position=e,S(B)}(n)}function S(e){const{x:t,y:n}=We.position,i=ee[e]?.iframe;!1!==O("onScroll",{iframe:i,top:n,left:t,x:t,y:n})?qe(e):He()}function I(e){let t={};if(0===L.width&&0===L.height){const e=h(9).split(n);t={x:e[1],y:e[0]}}else t={x:L.width,y:L.height};O(e,{iframe:L.iframe,screenX:Number(t.x),screenY:Number(t.y),type:L.type})}const O=(e,t)=>Le(B,e,t);function C(){const{height:t,iframe:n,msg:a,type:l,width:f}=L;switch(ee[B]?.firstRun&&function(){if(!ee[B])return;le(B,`First run for ${B}`),Ye(B,L.mode),ee[B].firstRun=!1}(),l){case"close":Pe(n);break;case s:m=h(6),le(B,`onMessage passed: {iframe: %c${L.iframe.id}%c, message: %c${m}%c}`,V,Z,V,Z),O("onMessage",{iframe:L.iframe,message:JSON.parse(m)});break;case"mouseenter":I("onMouseEnter");break;case"mouseleave":I("onMouseLeave");break;case"beforeUnload":ce(B,"Ready state reset"),ee[B].initialised=!1;break;case i:ee[B].autoResize=JSON.parse(h(9));break;case"scrollBy":!function(){const e=L.width,t=L.height,n=window.parentIframe||window.parentIFrame||window;ce(B,`scrollBy: x: %c${e}%c y: %c${t}`,V,Z,V),n.scrollBy(e,t)}();break;case"scrollTo":R(!1);break;case"scrollToOffset":R(!0);break;case c:k();break;case d:j();break;case"pageInfoStop":T();break;case"parentInfoStop":M();break;case"inPageLink":!function(e){const t=e.split("#")[1]||"",n=decodeURIComponent(t);let i=document.getElementById(n)||document.getElementsByName(n)[0];i?function(){const e=E(i);ce(B,`Moving to in page link: %c#${t}`,V),We.position={x:e.x,y:e.y},S(B),window.location.hash=t}():window.top!==window.self?function(){const e=window.parentIframe||window.parentIFrame;e?e.moveToAnchor(t):le(B,`In page link #${t} not found`)}():le(B,`In page link #${t} not found`)}(h(9));break;case"title":!function(e,t){ee[t]?.syncTitle&&(ee[t].iframe.title=e,ce(t,`Set iframe title attribute: %c${e}`,V))}(a,B);break;case u:De(L);break;case o:r(),function(e){try{ee[e].sameOrigin=!!ee[e]?.iframe?.contentWindow?.iframeChildListener}catch(t){ee[e].sameOrigin=!1}le(e,`sameOrigin: %c${ee[e].sameOrigin}`,V)}(B),(p=a)!==e&&(void 0!==p?le(B,`Version mismatch (Child: %c${p}%c !== Parent: %c${e})`,V,Z,V):be(B,"<rb>Legacy version detected in iframe</>\n\nDetected legacy version of child page script. It is recommended to update the page in the iframe to use <b>@iframe-resizer/child</>.\n\nSee <u>https://iframe-resizer.com/setup/#child-page-setup</> for more details.\n")),ee[B].initialised=!0,O("onReady",n);break;default:if(0===f&&0===t)return void ue(B,`Unsupported message received (${l}), this is likely due to the iframe containing a later version of iframe-resizer than the parent page`);if(0===f||0===t)return void le(B,"Ignoring message with 0 height or width");if(document.hidden)return void le(B,"Page hidden - ignored resize request");r()}var p,m}function A(e){if(!ee[e])throw new Error(`${L.type} No settings for ${e}. Message was: ${W}`)}let W=t.data;if("[iFrameResizerChild]Ready"===W)return F=t.source,void Object.values(ee).forEach((e=>({initChild:t,postMessageTarget:n})=>{e===n&&t()})(F));var F;if(!(e=>x===`${e}`.slice(0,13)&&e.slice(13).split(n)[0]in ee)(W)){if(typeof W!==y)return;return pe(g,"ignoredMessage"),void de(g,W)}const L=function(e){const t=e.slice(13).split(n),i=t[1]?Number(t[1]):0,o=ee[t[0]]?.iframe,r=getComputedStyle(o),a={iframe:o,id:t[0],height:i+l(r)+m(r),width:Number(t[2]),type:t[3],msg:t[4]};return t[5]&&(a.mode=t[5]),a}(W),{id:N,type:P}=L,B=N;B?(pe(B,P),ge(B,function(e){A(B),function(){const e=L.type in{true:1,false:1,undefined:1};return e&&le(B,"Ignoring init message from meta parent page"),e}()||(le(B,`Received: %c${e}`,V),(null!==L.iframe||(ue(B,`The iframe (${L.id}) was not found.`),0))&&function(){const{origin:e,sameOrigin:n}=t;if(n)return!0;let i=ee[B]?.checkOrigin;if(i&&"null"!=`${e}`&&!(i.constructor===Array?function(){let t=0,n=!1;for(le(B,`Checking connection is from allowed list of origins: %c${i}`,V);t<i.length;t++)if(i[t]===e){n=!0;break}return n}():function(){const t=ee[B]?.remoteHost;return le(B,`Checking connection is from: %c${t}`,V),e===t}()))throw new Error(`Unexpected message received from: ${e} for ${L.iframe.id}. Message was: ${t.data}. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.`);return!0}()&&C())})(W)):ue("","iframeResizer received messageData without id, message was: ",W)}function Le(e,t,n){let i=null,o=null;if(ee[e]){if(i=ee[e][t],typeof i!==w)throw new TypeError(`${t} on iFrame[${e}] is not a function`);if("onBeforeClose"===t||"onScroll"===t)try{o=i(n)}catch(n){console.error(n),ue(e,`Error in ${t} callback`)}else((e,...t)=>{setTimeout(()=>e(...t),0)})(i,n)}return o}function Ne(e){const{id:t}=e;le(t,"Disconnected from iframe"),delete ee[t],delete e.iframeResizer}function Pe(e){const{id:t}=e;if(!1!==Le(t,"onBeforeClose",t)){le(t,`Removing iFrame: %c${t}`,V);try{e.parentNode&&e.remove()}catch(e){ue(t,e)}Le(t,"onAfterClose",t),Ne(e)}else le(t,"Close iframe cancelled by onBeforeClose")}function Be(e){null===We.position&&(We.position={x:window.scrollX,y:window.scrollY},le(e,`Get page position: %c${We.position.x}%c, %c${We.position.y}`,V,Z,V))}function He(){We.position=null}function qe(e){null!==We.position&&(window.scrollTo(We.position.x,We.position.y),ce(e,`Set page position: %c${We.position.x}%c, %c${We.position.y}`,V,Z,V),He())}function De(e){le(e.id,"Size reset requested by "+(e.type===o?"parent page":"child page")),Be(e.id),Ue(e),Ve(u,u,e.id)}function Ue(e){function t(t){const i=`${e[t]}px`;e.iframe.style[t]=i,ce(n,`Set ${t}: %c${i}`,V)}const{id:n}=e,{sizeHeight:i,sizeWidth:o}=ee[n];i&&t("height"),o&&t("width")}const Je=e=>e.split(n).filter((e,t)=>19!==t).join(n);function Ve(e,t,n){function i(i){const o=e in E?Je(t):t;ce(n,i,V,Z,V),ce(n,`Message data: %c${o}`,V)}pe(n,e),ee[n]&&(ee[n]?.postMessageTarget?function(){const{iframe:o,postMessageTarget:r,sameOrigin:a,targetOrigin:s}=ee[n];if(a)try{return o.contentWindow.iframeChildListener(x+t),void i(`Sending message to iframe %c${n}%c via same origin%c`)}catch(t){e in E?(ee[n].sameOrigin=!1,le(n,"New iframe does not support same origin")):ue(n,"Same origin messaging failed, falling back to postMessage")}i(`Sending message to iframe: %c${n}%c targetOrigin: %c${s}`),r.postMessage(x+t,s)}():ue(n,`Iframe(${n}) not found`))}let Ze=0,Ge=!1,Xe=!1;function Ye(t,n=-3){if(Ge)return;const i=Math.max(ee[t].mode,n);if(i>ee[t].mode&&(ee[t].mode=i),i<0)throw me(t),ee[t].vAdvised||be(t||"Parent",`${Se(i+2)}${Se(2)}`),ee[t].vAdvised=!0,Se(i+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"");i>0&&Xe||function(e,t){queueMicrotask(()=>console.info(`%ciframe-resizer ${e}`,ie||t<1?"font-weight: bold;":C))}(`v${e} (${(e=>Te(Ee[e]))(i)})`,i),i<1&&be("Parent",Se(3)),Ge=!0}const _e=e=>c=>{function d(){ee[A]?.heightCalculationMethod in M&&De({iframe:c,height:1,width:1,type:o})}function u(){if(ee[A]){const{iframe:e}=ee[A],t={close:Pe.bind(null,e),disconnect:Ne.bind(null,e),removeListeners(){be(A,`<rb>Deprecated Method Name</>\n\nThe <b>removeListeners()</> method has been renamed to <b>disconnect()</>. ${O}\n`),this.disconnect()},resize(){be(A,"<rb>Deprecated Method</>\n\nUse of the <b>resize()</> method from the parent page is deprecated and will be removed in a future version of <i>iframe-resizer</>. As their are no longer any edge cases that require triggering a resize from the parent page, it is recommended to remove this method from your code."),Ve.bind(null,"Window resize",f,A)},moveToAnchor(e){((e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${i=t,i.charAt(0).toUpperCase()+i.slice(1)}`);var i})(e,y,"moveToAnchor(anchor) anchor"),Ve("Move to anchor",`moveToAnchor:${e}`,A)},sendMessage(e){e=JSON.stringify(e),Ve(s,`${s}:${e}`,A)}};e.iframeResizer=t,e.iFrameResizer=t}}function p(e,t){const n=n=>()=>{if(!ee[e])return;const{firstRun:i,iframe:r}=ee[e];Ve(n,t,e),(e=>e===o)(n)&&(e=>"lazy"===e.loading)(r)||function(e,t){const{msgTimeout:n,warningTimeout:i}=t[e];i&&(n&&clearTimeout(n),t[e].msgTimeout=setTimeout(function(){if(void 0===t[e])return;const{initialised:n,loadErrorShown:i}=t[e];t[e].msgTimeout=void 0,n?t[e].initialisedFirstPage=!0:i||(t[e].loadErrorShown=!0,Oe(e,t))},i))}(e,ee),i||d()},{iframe:i}=ee[e];ee[e].initChild=n(r),function(e,t){$e(e,a,()=>setTimeout(t,1))}(i,n(l)),function(e,t){const{iframe:n,waitForLoad:i}=ee[e];!0!==i&&((e=>{const{src:t,srcdoc:n}=e;return!n&&(null==t||""===t||"about:blank"===t)})(n)?setTimeout(()=>{pe(e,"noContent"),ce(e,"No content detected in the iframe, delaying initialisation")}):setTimeout(t))}(e,n(o))}function g(e){return e?(("sizeWidth"in e||"sizeHeight"in e||i in e)&&be(A,`<rb>Deprecated Option</>\n\nThe <b>sizeWidth</>, <b>sizeHeight</> and <b>autoResize</> options have been replaced with new <b>direction</> option which expects values of <bb>${j}</>, <bb>${T}</>, <bb>${k}</> or <bb>${$}</>.\n`),e):{}}function w(e){const t=ee[e]?.iframe?.title;return""===t||void 0===t}function v(e,t){G(ee[A],e)&&(be(A,`<rb>Deprecated option</>\n\nThe <b>${e}</> option has been renamed to <b>${t}</>. ${O}`),ee[A][t]=ee[A][e],delete ee[A][e])}const x=e=>G(e,"onMouseEnter")||G(e,"onMouseLeave");function E(e){var t,n;ee[A]={...ee[A],iframe:c,remoteHost:c?.src.split("/").slice(0,3).join("/"),...Ae,...g(e),mouseEvents:x(e),mode:Ie(e),syncTitle:w(A)},v("offset","offsetSize"),v("onClose","onBeforeClose"),v("onClosed","onAfterClose"),pe(A,"setup"),function(){const{direction:e}=ee[A];switch(e){case j:break;case T:ee[A].sizeHeight=!1;case k:ee[A].sizeWidth=!0;break;case $:ee[A].sizeWidth=!1,ee[A].sizeHeight=!1,ee[A].autoResize=!1;break;default:throw new TypeError(A,`Direction value of "${e}" is not valid`)}le(A,`direction: %c${e}`,V)}(),(t=e?.offsetSize||e?.offset)&&(ee[A].direction===j?(ee[A].offsetHeight=t,le(A,`Offset height: %c${t}`,V)):(ee[A].offsetWidth=t,le(A,`Offset width: %c${t}`,V))),ee[A].warningTimeout||ce(A,"warningTimeout:%c disabled",V),null===ee[A].postMessageTarget&&(ee[A].postMessageTarget=c.contentWindow),ee[A].targetOrigin=!0===ee[A].checkOrigin?""===(n=ee[A].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*"}const C=()=>t in c,A=function(t){if(t&&typeof t!==y)throw new TypeError("Invalid id for iFrame. Expected String");return""!==t&&t||(t=function(){let t=e?.id||Ae.id+Ze++;return null!==document.getElementById(t)&&(t+=Ze++),t}(),c.id=t,pe(t,"assignId"),le(t,`Added missing iframe ID: ${t} (${c.src})`)),t}(c.id);if(typeof e!==b)throw new TypeError("Options is not an object");return function(e){const{search:t}=window.location;t.includes("ifrlog")&&(e.log=S,e.logExpand=t.includes("ifrlog=expanded"))}(e),function(e,t){const n=G(t,"log"),i=typeof t.log===y,o=n?!!i||t.log:Ae.log;G(t,"logExpand")||(t.logExpand=n&&i?t.log===R:Ae.logExpand),function(e){-1===e?.log&&(e.log=!1,Xe=!0)}(t),function({enabled:e,expand:t,iframeId:n}){const i=te({expand:t,label:re(n)});ie=e,ee[n]||(ee[n]={console:i})}({enabled:o,expand:t.logExpand,iframeId:e}),i&&!(t.log in I)&&fe(e,'Invalid value for options.log: Accepted values are "expanded" and "collapsed"'),t.log=o}(A,e),ge(A,function(e){C()?ue(A,`Ignored iframe (${A}), already setup.`):(E(e),function(e){if(!0===Ce[e])return!1;const t=document.querySelectorAll(`iframe#${CSS.escape(e)}`);if(t.length<=1)return!0;Ce[e]=!0;const n=Array.from(t).flatMap(e=>[m,e,m]);be(e,`<rb>Duplicate ID attributes detected</>\n\nThe <b>${e}</> ID is not unique. Having multiple iframes on the same page with the same ID causes problems with communication between the iframe and parent page. Please ensure that the ID of each iframe has a unique value.\n\nFound <bb>${t.length}</> iframes with the <b>${e}</> ID:`,...n,m)}(A),le(A,`src: %c${c.srcdoc||c.src}`,V),function(){if(Ge)return;const{mode:e}=ee[A];-1!==e&&Ye(A,e)}(),Ke(),function(){switch(le(A,`Iframe scrolling ${ee[A]?.scrolling?"enabled":"disabled"} for ${A}`),c.style.overflow=!1===ee[A]?.scrolling?"hidden":z,ee[A]?.scrolling){case"omit":break;case!0:c.scrolling="yes";break;case!1:c.scrolling="no";break;default:c.scrolling=ee[A]?ee[A].scrolling:"no"}}(),function(){const{bodyMargin:e}=ee[A];"number"!=typeof e&&"0"!==e||(ee[A].bodyMargin=`${e}px`)}(),p(A,function(e){const{autoResize:t,bodyBackground:i,bodyMargin:o,bodyPadding:r,heightCalculationMethod:a,inPageLinks:s,license:l,log:c,logExpand:d,mouseEvents:u,offsetHeight:f,offsetWidth:p,mode:m,sizeHeight:g,sizeWidth:y,tolerance:b,widthCalculationMethod:w}=ee[e];return[e,"8",y,c,"32",!0,t,o,a,i,r,b,s,h,w,u,f,p,g,l,We.version,m,"",d].join(n)}(A)),u(),le(A,"Setup complete"),he(A))})(e),c?.iframeResizer};function Qe(){!0!==document.hidden&&((e,t)=>{Object.values(ee).filter(({autoResize:e,firstRun:t})=>e&&!t).forEach(({iframe:n})=>Ve(e,t,n.id))})("tabVisible",f)}const Ke=(e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}})(()=>{$e(window,s,Fe),$e(document,"visibilitychange",Qe),window.iframeParentListener=e=>setTimeout(()=>Fe({data:e,sameOrigin:!0}))}),et=`[${t}] `;const tt=function(){function e(e){switch(!0){case!e:throw new TypeError(`${et}iframe is not defined`);case!e.tagName:throw new TypeError(`${et}Not a valid DOM element`);case"IFRAME"!==e.tagName.toUpperCase():throw new TypeError(`${et}Expected <IFRAME> tag, found <${e.tagName}>`);default:t(e),n.push(e)}}let t,n;return function(i,o){if(typeof window===v)return[];switch(t=_e(i),n=[],typeof o){case v:case y:document.querySelectorAll(o||"iframe").forEach(e);break;case b:e(o);break;default:throw new TypeError(`${et}Unexpected data type (${typeof o})`)}return Object.freeze(n)}}();return typeof window!==v&&(window.iFrameResize=window.iFrameResize||function(...e){ve("iFrameResize()","iframeResize()","",g),tt(...e)}),tt});
20
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).iframeResize=t()}(this,function(){"use strict";console.info("IFRAME-RESIZER 5\n\nThis package has been split into separate packages for Parent and Child pages. Along with new packages for jQuery, React and Vue.\n\nGoing forward you are advised to use the new separate packages for Parent and Child pages, rather than this combined package.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n");const e="5.5.8-beta.4",t="iframeResizer",n=":",i="autoResize",o="init",r="iframeReady",a="load",s="message",l="onload",c="pageInfo",u="parentInfo",d="reset",f="resize",p="scroll",m="\n",h="child",g="parent",y="string",b="object",w="function",v="undefined",z="auto",$="none",k="both",j="vertical",T="horizontal",x="[iFrameSizer]",M=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),R=Object.freeze({[l]:1,[o]:1,[r]:1}),E="expanded",I="collapsed",O=Object.freeze({[E]:1,[I]:1}),S="Use of the old name will be removed in a future version of <i>iframe-resizer</>.",C="font-weight: normal;",A=C+"font-style: italic;",W="default",F=Object.freeze({assert:!0,error:!0,warn:!0}),L={expand:!1,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},N={profile:0,profileEnd:0,timeStamp:0,trace:0},P=Object.assign(console);const{fromEntries:B,keys:H}=Object,q=e=>[e,P[e]],D=e=>t=>[t,function(n){e[t]=n}],U=(e,t)=>B(H(e).map(t));const J=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,V=J?"color: #A9C7FB;":"color: #135CD2;",Z=J?"color: #E3E3E3;":"color: #1F1F1F;",G=Object.hasOwn||((e,t)=>Object.prototype.hasOwnProperty.call(e,t)),X={br:"\n",rb:"",bb:"",b:"",i:"",u:"","/":""},Y=Object.keys(X),_=new RegExp(`<(${Y.join("|")})>`,"gi"),Q=(e,t)=>X[t]??"",K=e=>t=>e(typeof t===y?window.chrome?t.replace(_,Q):(e=>e.replaceAll("<br>",m).replaceAll(/<\/?[^>]+>/gi,""))(t):t),ee={},te=(ne=function(e={}){const t={},n={},i=[],o={...L,expand:!e.collapsed||L.expanded,...e};let r="";function a(){i.length=0,r=""}function s(){delete o.event,a()}const l=()=>!!i.some(([e])=>e in F)||!!o.expand;function c(){if(0!==i.length){P[l()?"group":"groupCollapsed"](`%c${o.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(o)} %c${o.showTime?r:""}`,C,"font-weight: bold;",A);for(const[e,...t]of i)P.assert(e in P,`Unknown console method: ${e}`),e in P&&P[e](...t);P.groupEnd(),s()}else s()}function u(){""===r&&(r=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)}`}(),queueMicrotask(()=>queueMicrotask(c)))}function d(e,...t){0===i.length&&u(),i.push([e,...t])}function f(e=W,...n){t[e]?d("log",`${e}: ${performance.now()-t[e]} ms`,...n):d("timeLog",e,...n)}return{...U(o,D(o)),...U(console,e=>[e,(...t)=>d(e,...t)]),...U(N,q),assert:function(e,...t){!0!==e&&d("assert",e,...t)},count:function(e=W){n[e]?n[e]+=1:n[e]=1,d("log",`${e}: ${n[e]}`)},countReset:function(e=W){delete n[e]},endAutoGroup:c,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;d("error",e),c()}return n},event:function(e){u(),o.event=e},purge:a,time:function(e=W){u(),t[e]=performance.now()},timeEnd:function(e=W){f(e),delete t[e]},timeLog:f,touch:u}},ne?.__esModule?ne.default:ne);var ne;let ie=!0;const oe=te({expand:!1,label:g}),re=e=>window.top===window.self?`parent(${e})`:`nested parent(${e})`;const ae=e=>(t,...n)=>ee[t]?ee[t].console[e](...n):oe[e](...n),se=e=>(t,...n)=>!0===(e=>ee[e]?ee[e].log:ie)(t)?ae(e)(t,...n):null,le=se("log"),ce=le,ue=se("debug"),de=ae("warn"),fe=ae("error"),pe=ae("event"),me=ae("purge"),he=ae("endAutoGroup"),ge=ae("errorBoundary");const ye=K(e=>e),be=(e,...n)=>ee[e]?ee[e].console.warn(...n.map(ye)):queueMicrotask(()=>{const i=K((e=>(...n)=>[`${t}(${e})`,...n].join(" "))(e));console?.warn(...n.map(i))}),we=(e=>(t,n="renamed to")=>(i,o,r="",a="")=>e(a,`<rb>Deprecated ${t}(${i.replace("()","")})</>\n\nThe <b>${i}</> ${t.toLowerCase()} has been ${n} <b>${o}</>. ${r}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))(be),ve=we("Function"),ze=we("Option"),$e=(e,t,n,i)=>e.addEventListener(t,n,i||!1),ke=(e,t,n)=>e.removeEventListener(t,n,!1),je=e=>{if(!e)return"";let t=-559038744,n=1103547984;for(let i,o=0;o<e.length;o++)i=e.codePointAt(o),t=Math.imul(t^i,2246822519),n=Math.imul(n^i,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)},Te=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),xe=["spjluzl","rlf","clyzpvu"],Me=["<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.","Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz."],Re=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],Ee=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),Ie=e=>Te(Me[e]),Oe=e=>{const t=e[Te(xe[0])]||e[Te(xe[1])]||e[Te(xe[2])];if(!t)return-1;const n=t.split("-");let i=function(e=""){let t=-2;const n=je(Te(e));return n in Ee&&(t=Ee[n]),t}(n[0]);return 0===i||(e=>e[2]===je(e[0]+e[1]))(n)||(i=-2),i};function Se(e){const{checkOrigin:t,iframe:{id:n,src:i,sandbox:o},initialisedFirstPage:r,waitForLoad:a,warningTimeout:s}=e,l=(e=>{try{return new URL(e).origin}catch(e){return null}})(i);pe(n,"noResponse"),be(n,`<rb>No response from iframe</>\n\nThe iframe (<i>${n}</>) has not responded within ${s/1e3} seconds. Check <b>@iframe-resizer/child</> package has been loaded in the iframe.\n${t&&l?`\nThe <b>checkOrigin</> option is currently enabled. If the iframe redirects away from <i>${l}</>, then the connection to the iframe may be blocked by the browser. To disable this option, set <b>checkOrigin</> to <bb>false</> or an array of allowed origins. See <u>https://iframe-resizer.com/checkorigin</> for more information.\n`:""}${a&&!r?"\nThe <b>waitForLoad</> option is currently set to <bb>true</>. If the iframe loads before <i>iframe-resizer</> runs, this option will prevent <i>iframe-resizer</> initialising. To disable this option, set <b>waitForLoad</> to <bb>false</>.\n":""}${(e=>typeof e===b&&e.length>0&&!(e.contains("allow-scripts")&&e.contains("allow-same-origin")))(o)?"\nThe iframe has the <b>sandbox</> attribute, please ensure it contains both the <bb>allow-same-origin</> and <bb>allow-scripts</> values.\n":""}\nThis message can be ignored if everything is working, or you can set the <b>warningTimeout</> option to a higher value or zero to suppress this warning.\n`)}const Ce={};const Ae=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyPadding:null,checkOrigin:!0,direction:j,firstRun:!0,inPageLinks:!1,heightCalculationMethod:z,id:"iFrameResizer",log:!1,logExpand:!1,license:void 0,mouseEvents:!0,offsetHeight:null,offsetWidth:null,postMessageTarget:null,sameDomain:!1,scrolling:!1,sizeHeight:!0,sizeWidth:!1,tolerance:0,waitForLoad:!1,warningTimeout:5e3,widthCalculationMethod:z,onBeforeClose:()=>!0,onAfterClose(){},onInit:!1,onMessage:null,onMouseEnter(){},onMouseLeave(){},onReady:e=>{typeof ee[e.id].onInit===w&&(ze("init()","onReady()","",e.id),ee[e.id].onInit(e))},onResized(){},onScroll:()=>!0}),We={position:null,version:e};function Fe(t){function r(){Ue(L),qe(B),S("onResized",L)}function l(e){if("border-box"!==e.boxSizing)return 0;return(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function m(e){if("border-box"!==e.boxSizing)return 0;return(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}const h=e=>W.slice(W.indexOf(n)+7+e);const b=(e,t)=>(n,i)=>{const o={};var r,a;r=function(){Ve(`${n} (${e})`,`${e}:${t()}`,i)},o[a=i]||(r(),o[a]=requestAnimationFrame(()=>{o[a]=null}))},w=(e,t)=>()=>{let n=!1;const i=t=>()=>{ee[c]?n&&n!==t||(e(t,c),n=t,requestAnimationFrame(()=>{n=!1})):l()},o=i(p),r=i("resize window");function s(e,n){le(c,`${e}listeners for send${t}`),n(window,p,o),n(window,f,r)}function l(){pe(c,`stop${t}`),s("Remove ",ke),u.disconnect(),d.disconnect(),ke(ee[c].iframe,a,l)}const c=B,u=new ResizeObserver(i("pageObserver")),d=new ResizeObserver(i("iframeObserver"));ee[c]&&(ee[c][`stop${t}`]=l,$e(ee[c].iframe,a,l),s("Add ",$e),u.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),d.observe(ee[c].iframe,{attributes:!0,childList:!1,subtree:!1}))},v=e=>()=>{e in ee[B]&&(ee[B][e](),delete ee[B][e])},z=b(c,function(){const e=document.body.getBoundingClientRect(),t=L.iframe.getBoundingClientRect(),{scrollY:n,scrollX:i,innerHeight:o,innerWidth:r}=window,{clientHeight:a,clientWidth:s}=document.documentElement;return JSON.stringify({iframeHeight:t.height,iframeWidth:t.width,clientHeight:Math.max(a,o||0),clientWidth:Math.max(s,r||0),offsetTop:parseInt(t.top-e.top,10),offsetLeft:parseInt(t.left-e.left,10),scrollTop:n,scrollLeft:i,documentHeight:a,documentWidth:s,windowHeight:o,windowWidth:r})}),$=b(u,function(){const{iframe:e}=L,{scrollWidth:t,scrollHeight:n}=document.documentElement,{width:i,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}=window.visualViewport;return JSON.stringify({iframe:e.getBoundingClientRect(),document:{scrollWidth:t,scrollHeight:n},viewport:{width:i,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}})}),k=w(z,"PageInfo"),j=w($,"ParentInfo"),T=v("stopPageInfo"),M=v("stopParentInfo");function R(e){const t=e.getBoundingClientRect();return Be(B),{x:Number(t.left)+Number(We.position.x),y:Number(t.top)+Number(We.position.y)}}function E(e){const t=e?R(L.iframe):{x:0,y:0};ce(B,`Reposition requested (offset x:%c${t.x}%c y:%c${t.y})`,V,Z,V);const n=((e,t)=>({x:e.width+t.x,y:e.height+t.y}))(L,t),i=window.parentIframe||window.parentIFrame;i?function(t,n){setTimeout(()=>t["scrollTo"+(e?"Offset":"")](n.x,n.y))}(i,n):function(e){We.position=e,I(B)}(n)}function I(e){const{x:t,y:n}=We.position,i=ee[e]?.iframe;!1!==S("onScroll",{iframe:i,top:n,left:t,x:t,y:n})?qe(e):He()}function O(e){let t={};if(0===L.width&&0===L.height){const e=h(9).split(n);t={x:e[1],y:e[0]}}else t={x:L.width,y:L.height};S(e,{iframe:L.iframe,screenX:Number(t.x),screenY:Number(t.y),type:L.type})}const S=(e,t)=>Le(B,e,t);function C(){const{height:t,iframe:n,msg:a,type:l,width:f}=L;switch(ee[B]?.firstRun&&function(){if(!ee[B])return;le(B,`First run for ${B}`),Ye(B,L.mode),ee[B].firstRun=!1}(),l){case"close":Pe(n);break;case s:m=h(6),le(B,`onMessage passed: {iframe: %c${L.iframe.id}%c, message: %c${m}%c}`,V,Z,V,Z),S("onMessage",{iframe:L.iframe,message:JSON.parse(m)});break;case"mouseenter":O("onMouseEnter");break;case"mouseleave":O("onMouseLeave");break;case"beforeUnload":ce(B,"Ready state reset"),ee[B].initialised=!1;break;case i:ee[B].autoResize=JSON.parse(h(9));break;case"scrollBy":!function(){const e=L.width,t=L.height,n=window.parentIframe||window.parentIFrame||window;ce(B,`scrollBy: x: %c${e}%c y: %c${t}`,V,Z,V),n.scrollBy(e,t)}();break;case"scrollTo":E(!1);break;case"scrollToOffset":E(!0);break;case c:k();break;case u:j();break;case"pageInfoStop":T();break;case"parentInfoStop":M();break;case"inPageLink":!function(e){const t=e.split("#")[1]||"",n=decodeURIComponent(t);let i=document.getElementById(n)||document.getElementsByName(n)[0];i?function(){const e=R(i);ce(B,`Moving to in page link: %c#${t}`,V),We.position={x:e.x,y:e.y},I(B),window.location.hash=t}():window.top!==window.self?function(){const e=window.parentIframe||window.parentIFrame;e?e.moveToAnchor(t):le(B,`In page link #${t} not found`)}():le(B,`In page link #${t} not found`)}(h(9));break;case"title":!function(e,t){ee[t]?.syncTitle&&(ee[t].iframe.title=e,ce(t,`Set iframe title attribute: %c${e}`,V))}(a,B);break;case d:De(L);break;case o:r(),function(e){try{ee[e].sameOrigin=!!ee[e]?.iframe?.contentWindow?.iframeChildListener}catch(t){ee[e].sameOrigin=!1}le(e,`sameOrigin: %c${ee[e].sameOrigin}`,V)}(B),(p=a)!==e&&(void 0!==p?le(B,`Version mismatch (Child: %c${p}%c !== Parent: %c${e})`,V,Z,V):be(B,"<rb>Legacy version detected in iframe</>\n\nDetected legacy version of child page script. It is recommended to update the page in the iframe to use <b>@iframe-resizer/child</>.\n\nSee <u>https://iframe-resizer.com/setup/#child-page-setup</> for more details.\n")),ee[B].initialised=!0,S("onReady",n);break;default:if(0===f&&0===t)return void de(B,`Unsupported message received (${l}), this is likely due to the iframe containing a later version of iframe-resizer than the parent page`);if(0===f||0===t)return void le(B,"Ignoring message with 0 height or width");if(document.hidden)return void le(B,"Page hidden - ignored resize request");r()}var p,m}function A(e){if(!ee[e])throw new Error(`${L.type} No settings for ${e}. Message was: ${W}`)}let W=t.data;if("[iFrameResizerChild]Ready"===W)return F=t.source,void Object.values(ee).forEach((e=>({initChild:t,postMessageTarget:n})=>{e===n&&t()})(F));var F;if(!(e=>x===`${e}`.slice(0,13)&&e.slice(13).split(n)[0]in ee)(W)){if(typeof W!==y)return;return pe(g,"ignoredMessage"),void ue(g,W)}const L=function(e){const t=e.slice(13).split(n),i=t[1]?Number(t[1]):0,o=ee[t[0]]?.iframe,r=getComputedStyle(o),a={iframe:o,id:t[0],height:i+l(r)+m(r),width:Number(t[2]),type:t[3],msg:t[4]};return t[5]&&(a.mode=t[5]),a}(W),{id:N,type:P}=L,B=N;B?(pe(B,P),ge(B,function(e){A(B),function(){const e=L.type in{true:1,false:1,undefined:1};return e&&le(B,"Ignoring init message from meta parent page"),e}()||(le(B,`Received: %c${e}`,V),(null!==L.iframe||(de(B,`The iframe (${L.id}) was not found.`),0))&&function(){const{origin:e,sameOrigin:n}=t;if(n)return!0;let i=ee[B]?.checkOrigin;if(i&&"null"!=`${e}`&&!(i.constructor===Array?function(){let t=0,n=!1;for(le(B,`Checking connection is from allowed list of origins: %c${i}`,V);t<i.length;t++)if(i[t]===e){n=!0;break}return n}():function(){const t=ee[B]?.remoteHost;return le(B,`Checking connection is from: %c${t}`,V),e===t}()))throw new Error(`Unexpected message received from: ${e} for ${L.iframe.id}. Message was: ${t.data}. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.`);return!0}()&&C())})(W)):de("","iframeResizer received messageData without id, message was: ",W)}function Le(e,t,n){let i=null,o=null;if(ee[e]){if(i=ee[e][t],typeof i!==w)throw new TypeError(`${t} on iFrame[${e}] is not a function`);if("onBeforeClose"===t||"onScroll"===t)try{o=i(n)}catch(n){console.error(n),de(e,`Error in ${t} callback`)}else((e,...t)=>{setTimeout(()=>e(...t),0)})(i,n)}return o}function Ne(e){const{id:t}=e;le(t,"Disconnected from iframe"),delete ee[t],delete e.iframeResizer}function Pe(e){const{id:t}=e;if(!1!==Le(t,"onBeforeClose",t)){le(t,`Removing iFrame: %c${t}`,V);try{e.parentNode&&e.remove()}catch(e){de(t,e)}Le(t,"onAfterClose",t),Ne(e)}else le(t,"Close iframe cancelled by onBeforeClose")}function Be(e){null===We.position&&(We.position={x:window.scrollX,y:window.scrollY},le(e,`Get page position: %c${We.position.x}%c, %c${We.position.y}`,V,Z,V))}function He(){We.position=null}function qe(e){null!==We.position&&(window.scrollTo(We.position.x,We.position.y),ce(e,`Set page position: %c${We.position.x}%c, %c${We.position.y}`,V,Z,V),He())}function De(e){le(e.id,"Size reset requested by "+(e.type===o?"parent page":"child page")),Be(e.id),Ue(e),Ve(d,d,e.id)}function Ue(e){function t(t){const i=`${e[t]}px`;e.iframe.style[t]=i,ce(n,`Set ${t}: %c${i}`,V)}const{id:n}=e,{sizeHeight:i,sizeWidth:o}=ee[n];i&&t("height"),o&&t("width")}const Je=e=>e.split(n).filter((e,t)=>19!==t).join(n);function Ve(e,t,n){function i(i){const o=e in R?Je(t):t;ce(n,i,V,Z,V),ce(n,`Message data: %c${o}`,V)}pe(n,e),ee[n]&&(ee[n]?.postMessageTarget?function(){const{iframe:o,postMessageTarget:r,sameOrigin:a,targetOrigin:s}=ee[n];if(a)try{return o.contentWindow.iframeChildListener(x+t),void i(`Sending message to iframe %c${n}%c via same origin%c`)}catch(t){e in R?(ee[n].sameOrigin=!1,le(n,"New iframe does not support same origin")):de(n,"Same origin messaging failed, falling back to postMessage")}i(`Sending message to iframe: %c${n}%c targetOrigin: %c${s}`),r.postMessage(x+t,s)}():de(n,`Iframe(${n}) not found`))}let Ze=0,Ge=!1,Xe=!1;function Ye(t,n=-3){if(Ge)return;const i=Math.max(ee[t].mode,n);if(i>ee[t].mode&&(ee[t].mode=i),i<0)throw me(t),ee[t].vAdvised||be(t||"Parent",`${Ie(i+2)}${Ie(2)}`),ee[t].vAdvised=!0,Ie(i+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"");i>0&&Xe||function(e,t){queueMicrotask(()=>console.info(`%ciframe-resizer ${e}`,ie||t<1?"font-weight: bold;":C))}(`v${e} (${(e=>Te(Re[e]))(i)})`,i),i<1&&be("Parent",Ie(3)),Ge=!0}const _e=e=>c=>{function u(){ee[A]?.heightCalculationMethod in M&&De({iframe:c,height:1,width:1,type:o})}function d(){if(ee[A]){const{iframe:e}=ee[A],t={close:Pe.bind(null,e),disconnect:Ne.bind(null,e),removeListeners(){be(A,`<rb>Deprecated Method Name</>\n\nThe <b>removeListeners()</> method has been renamed to <b>disconnect()</>. ${S}\n`),this.disconnect()},resize(){be(A,"<rb>Deprecated Method</>\n\nUse of the <b>resize()</> method from the parent page is deprecated and will be removed in a future version of <i>iframe-resizer</>. As their are no longer any edge cases that require triggering a resize from the parent page, it is recommended to remove this method from your code."),Ve.bind(null,"Window resize",f,A)},moveToAnchor(e){((e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${i=t,i.charAt(0).toUpperCase()+i.slice(1)}`);var i})(e,y,"moveToAnchor(anchor) anchor"),Ve("Move to anchor",`moveToAnchor:${e}`,A)},sendMessage(e){e=JSON.stringify(e),Ve(s,`${s}:${e}`,A)}};e.iframeResizer=t,e.iFrameResizer=t}}function p(e,t){const n=n=>()=>{if(!ee[e])return;const{firstRun:i,iframe:r}=ee[e];Ve(n,t,e),(e=>e===o)(n)&&(e=>"lazy"===e.loading)(r)||function(e,t){const n=t[e],{msgTimeout:i,warningTimeout:o}=n;o&&(i&&clearTimeout(i),n.msgTimeout=setTimeout(function(){const n=t[e];void 0!==n&&((e=>{e.msgTimeout=void 0})(n),function(e){const{initialised:t}=e;return t&&(e.initialisedFirstPage=!0),t}(n)||Se(n))},o))}(e,ee),i||u()},{iframe:i}=ee[e];ee[e].initChild=n(r),function(e,t){$e(e,a,()=>setTimeout(t,1))}(i,n(l)),function(e,t){const{iframe:n,waitForLoad:i}=ee[e];!0!==i&&((e=>{const{src:t,srcdoc:n}=e;return!n&&(null==t||""===t||"about:blank"===t)})(n)?setTimeout(()=>{pe(e,"noContent"),ce(e,"No content detected in the iframe, delaying initialisation")}):setTimeout(t))}(e,n(o))}function g(e){return e?(("sizeWidth"in e||"sizeHeight"in e||i in e)&&be(A,`<rb>Deprecated Option</>\n\nThe <b>sizeWidth</>, <b>sizeHeight</> and <b>autoResize</> options have been replaced with new <b>direction</> option which expects values of <bb>${j}</>, <bb>${T}</>, <bb>${k}</> or <bb>${$}</>.\n`),e):{}}function w(e){const t=ee[e]?.iframe?.title;return""===t||void 0===t}function v(e,t){G(ee[A],e)&&(be(A,`<rb>Deprecated option</>\n\nThe <b>${e}</> option has been renamed to <b>${t}</>. ${S}`),ee[A][t]=ee[A][e],delete ee[A][e])}const x=e=>G(e,"onMouseEnter")||G(e,"onMouseLeave");function R(e){var t,n;ee[A]={...ee[A],iframe:c,remoteHost:c?.src.split("/").slice(0,3).join("/"),...Ae,...g(e),mouseEvents:x(e),mode:Oe(e),syncTitle:w(A)},v("offset","offsetSize"),v("onClose","onBeforeClose"),v("onClosed","onAfterClose"),pe(A,"setup"),function(){const{direction:e}=ee[A];switch(e){case j:break;case T:ee[A].sizeHeight=!1;case k:ee[A].sizeWidth=!0;break;case $:ee[A].sizeWidth=!1,ee[A].sizeHeight=!1,ee[A].autoResize=!1;break;default:throw new TypeError(A,`Direction value of "${e}" is not valid`)}le(A,`direction: %c${e}`,V)}(),(t=e?.offsetSize||e?.offset)&&(ee[A].direction===j?(ee[A].offsetHeight=t,le(A,`Offset height: %c${t}`,V)):(ee[A].offsetWidth=t,le(A,`Offset width: %c${t}`,V))),ee[A].warningTimeout||ce(A,"warningTimeout:%c disabled",V),null===ee[A].postMessageTarget&&(ee[A].postMessageTarget=c.contentWindow),ee[A].targetOrigin=!0===ee[A].checkOrigin?""===(n=ee[A].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*"}const C=()=>t in c,A=function(t){if(t&&typeof t!==y)throw new TypeError("Invalid id for iFrame. Expected String");return""!==t&&t||(t=function(){let t=e?.id||Ae.id+Ze++;return null!==document.getElementById(t)&&(t+=Ze++),t}(),c.id=t,pe(t,"assignId"),le(t,`Added missing iframe ID: ${t} (${c.src})`)),t}(c.id);if(typeof e!==b)throw new TypeError("Options is not an object");return function(e){const{search:t}=window.location;t.includes("ifrlog")&&(e.log=I,e.logExpand=t.includes("ifrlog=expanded"))}(e),function(e,t){const n=G(t,"log"),i=typeof t.log===y,o=n?!!i||t.log:Ae.log;G(t,"logExpand")||(t.logExpand=n&&i?t.log===E:Ae.logExpand),function(e){-1===e?.log&&(e.log=!1,Xe=!0)}(t),function({enabled:e,expand:t,iframeId:n}){const i=te({expand:t,label:re(n)});ie=e,ee[n]||(ee[n]={console:i})}({enabled:o,expand:t.logExpand,iframeId:e}),i&&!(t.log in O)&&fe(e,'Invalid value for options.log: Accepted values are "expanded" and "collapsed"'),t.log=o}(A,e),ge(A,function(e){C()?de(A,`Ignored iframe (${A}), already setup.`):(R(e),function(e){if(!0===Ce[e])return!1;const t=document.querySelectorAll(`iframe#${CSS.escape(e)}`);if(t.length<=1)return!0;Ce[e]=!0;const n=Array.from(t).flatMap(e=>[m,e,m]);be(e,`<rb>Duplicate ID attributes detected</>\n\nThe <b>${e}</> ID is not unique. Having multiple iframes on the same page with the same ID causes problems with communication between the iframe and parent page. Please ensure that the ID of each iframe has a unique value.\n\nFound <bb>${t.length}</> iframes with the <b>${e}</> ID:`,...n,m)}(A),le(A,`src: %c${c.srcdoc||c.src}`,V),function(){if(Ge)return;const{mode:e}=ee[A];-1!==e&&Ye(A,e)}(),Ke(),function(){switch(le(A,`Iframe scrolling ${ee[A]?.scrolling?"enabled":"disabled"} for ${A}`),c.style.overflow=!1===ee[A]?.scrolling?"hidden":z,ee[A]?.scrolling){case"omit":break;case!0:c.scrolling="yes";break;case!1:c.scrolling="no";break;default:c.scrolling=ee[A]?ee[A].scrolling:"no"}}(),function(){const{bodyMargin:e}=ee[A];"number"!=typeof e&&"0"!==e||(ee[A].bodyMargin=`${e}px`)}(),p(A,function(e){const{autoResize:t,bodyBackground:i,bodyMargin:o,bodyPadding:r,heightCalculationMethod:a,inPageLinks:s,license:l,log:c,logExpand:u,mouseEvents:d,offsetHeight:f,offsetWidth:p,mode:m,sizeHeight:g,sizeWidth:y,tolerance:b,widthCalculationMethod:w}=ee[e];return[e,"8",y,c,"32",!0,t,o,a,i,r,b,s,h,w,d,f,p,g,l,We.version,m,"",u].join(n)}(A)),d(),le(A,"Setup complete"),he(A))})(e),c?.iframeResizer};function Qe(){!0!==document.hidden&&((e,t)=>{Object.values(ee).filter(({autoResize:e,firstRun:t})=>e&&!t).forEach(({iframe:n})=>Ve(e,t,n.id))})("tabVisible",f)}const Ke=(e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}})(()=>{$e(window,s,Fe),$e(document,"visibilitychange",Qe),window.iframeParentListener=e=>setTimeout(()=>Fe({data:e,sameOrigin:!0}))}),et=`[${t}] `;const tt=function(){function e(e){switch(!0){case!e:throw new TypeError(`${et}iframe is not defined`);case!e.tagName:throw new TypeError(`${et}Not a valid DOM element`);case"IFRAME"!==e.tagName.toUpperCase():throw new TypeError(`${et}Expected <IFRAME> tag, found <${e.tagName}>`);default:t(e),n.push(e)}}let t,n;return function(i,o){if(typeof window===v)return[];switch(t=_e(i),n=[],typeof o){case v:case y:document.querySelectorAll(o||"iframe").forEach(e);break;case b:e(o);break;default:throw new TypeError(`${et}Unexpected data type (${typeof o})`)}return Object.freeze(n)}}();return typeof window!==v&&(window.iFrameResize=window.iFrameResize||function(...e){ve("iFrameResize()","iframeResize()","",g),tt(...e)}),tt});
21
21
  //# sourceMappingURL=iframeResizer.js.map