iframe-resizer 5.5.8-beta.1 → 5.5.8-beta.2

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.
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/legacy (child) 5.5.8-beta.1 (iife)
4
+ * @module iframe-resizer/legacy (child) 5.5.8-beta.2 (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.1",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",U=Symbol("sizeChanged"),V="manualResize",Z="parentResize",J={[V]: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)}`}())}function $(e,...t){0===p.length&&(w(),queueMicrotask(()=>queueMicrotask(z))),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"),Ue=We("Method","replaced with"),Ve=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",Ut=[];let Vt,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,Ut.push(t),Ut.length>100&&Ut.shift()}catch{}})}function Gt(){xe("Attached%c PerformanceObserver%c to page",h,g);const e=new PerformanceObserver(Qt);return e.observe({entryTypes:["mark"]}),Vt=setInterval(()=>{if(Ut.length<10)return;if(Zt.hasTags&&Zt.len<25)return;Ut.sort();const e=Math.min(Ut.reduce((e,t)=>e+t,0)/Ut.length,Ut[Math.floor(Ut.length/2)]),t=me(e);t>Jt&&(Jt=t,Re("performanceObserver"),je("Mean time:",me(Ut[Math.floor(Ut.length/2)])),je("Median time:",me(Ut.reduce((e,t)=>e+t,0)/Ut.length)),je("Average time:",t),je("Max time:",me(Math.max(...Ut)))),_t(),e<=4||(clearInterval(Vt),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(Vt),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&&(Ve(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,Ut,ln,qt,Ht,on,rn,en,Lt,Rt,Oe?fe:et,_t,()=>Vt("background",be),()=>Vt("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 Ut(){ke===Me&&(Oe=!0)}function Vt(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`),Vt("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: AUTO,\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 Ue("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(V,`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 Un,Vn=!1;const Zn=Pe((e,t,n,o,r)=>{switch(Re(e),!0){case!0===Xe:if(!0===Vn)break;je("Iframe hidden - Ignored resize request"),Vn=!0,Wn=!1,cancelAnimationFrame(Un);break;case!0===Wn&&e!==G:je("Resize already pending - Ignored resize request");break;case!se&&!(e in J):xe("Resizing disabled");break;default:Vn=!1,Wn=!0,p=performance.now(),m=!0,Un||(Un=requestAnimationFrame(()=>{Wn=!1,Un=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)?U:e;switch(je(`Resize event: %c${t}`,h),s){case z:case H:case U: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.2",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)}`}())}function $(e,...t){0===p.length&&(w(),queueMicrotask(()=>queueMicrotask(z))),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