{"version":3,"file":"js/349-c6a010f80a3989035262.chunk.js","mappings":"mHAGA,MAAMA,UAAkCC,YACtCC,oBACE,MAAMC,EAASC,KAAKD,OAEfA,IAILC,KAAKC,WAAY,QAAcF,GACjC,CAEAG,uBACMF,KAAKC,YACPD,KAAKC,YACLD,KAAKC,eAAY,EAErB,CAEIF,aACF,OAAOC,KAAKG,cAAc,SAC5B,EAGGC,OAAOC,eAAeC,IAAI,2BAC7BF,OAAOR,0BAA4BA,EACnCQ,OAAOC,eAAeE,OACpB,wBACAX,G,mCC9BJ,MAAMY,EAAE,QAAQ,SAASC,EAAEA,GAAG,SAASC,EAAEA,GAAG,GAAGA,EAAEC,SAASF,EAAEG,cAAc,OAAO,MAAMC,KAAKC,GAAGJ,EAAE,GAAG,QAAQI,EAAEC,UAAU,eAAeD,EAAEE,KAAKP,EAAEQ,aAAa,SAASH,EAAEI,aAAa,GAAG,iBAAiBJ,GAAG,QAAQA,EAAEK,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAACT,EAAEU,GAAGN,EAAEO,MAAMb,GAAG,WAAWE,GAAGD,EAAEQ,aAAa,SAASG,EAAE,CAAC,CAAC,OAAOhB,OAAOkB,iBAAiB,UAAUZ,GAAE,GAAID,EAAEG,eAAeH,EAAEG,cAAcW,YAAY,CAACR,SAAS,MAAMC,KAAK,eAAe,KAAK,WAAWZ,OAAOoB,oBAAoB,UAAUd,GAAE,EAAG,CAAC,C","sources":["webpack://endrun/./app/components/datawrapper_embed_component.js","webpack://endrun/./node_modules/@newswire/frames/dist/frames.modern.js"],"sourcesContent":["// packages\nimport { observeIframe } from '@newswire/frames';\n\nclass DatawrapperEmbedComponent extends HTMLElement {\n connectedCallback() {\n const iframe = this.iframe;\n\n if (!iframe) {\n return;\n }\n\n this.unobserve = observeIframe(iframe);\n }\n\n disconnectedCallback() {\n if (this.unobserve) {\n this.unobserve();\n this.unobserve = undefined;\n }\n }\n\n get iframe() {\n return this.querySelector('iframe');\n }\n}\n\nif (!window.customElements.get('tmp-datawrapper-embed')) {\n window.DatawrapperEmbedComponent = DatawrapperEmbedComponent;\n window.customElements.define(\n 'tmp-datawrapper-embed',\n DatawrapperEmbedComponent\n );\n}\n","const t=/xPYMx/;function n(n){function e(e){if(e.source!==n.contentWindow)return;const{data:i}=e;if(\"amp\"===i.sentinel&&\"embed-size\"===i.type)n.setAttribute(\"height\",i.height);else if(\"string\"==typeof i&&\"pym\"===i.slice(0,3)){const[,,e,o]=i.split(t);\"height\"===e&&n.setAttribute(\"height\",o)}}return window.addEventListener(\"message\",e,!1),n.contentWindow&&n.contentWindow.postMessage({sentinel:\"amp\",type:\"frames-init\"},\"*\"),function(){window.removeEventListener(\"message\",e,!1)}}function e(t,{attributes:e,src:i}={}){const o=document.createElement(\"iframe\"),a=n(o);if(i&&o.setAttribute(\"src\",i),o.setAttribute(\"width\",\"100%\"),o.setAttribute(\"scrolling\",\"no\"),o.setAttribute(\"marginheight\",\"0\"),o.setAttribute(\"frameborder\",\"0\"),e)for(let t in e)o.setAttribute(t,e[t]);return t.appendChild(o),{remove(){a(),t.removeChild(o)}}}const i=\"data-frame-attribute-\".length;function o(t){const n={},e=t.attributes,o=e.length;for(let t=0;tr(),!1)}function f(){window.addEventListener(\"message\",function t(n){const{data:e}=n;\"amp\"===e.sentinel&&\"frames-init\"===e.type&&(window.removeEventListener(\"message\",t,!1),r())},!1)}function u(t=300){setInterval(r,t)}function d(){r(),s(),c(),f()}function m(t){d(),u(t)}export{e as Framer,a as autoInitFrames,d as initFrame,m as initFrameAndPoll,n as observeIframe,r as sendFrameHeight,f as sendHeightOnFramerInit,s as sendHeightOnLoad,u as sendHeightOnPoll,c as sendHeightOnResize};\n//# sourceMappingURL=frames.modern.js.map\n"],"names":["DatawrapperEmbedComponent","HTMLElement","connectedCallback","iframe","this","unobserve","disconnectedCallback","querySelector","window","customElements","get","define","t","n","e","source","contentWindow","data","i","sentinel","type","setAttribute","height","slice","o","split","addEventListener","postMessage","removeEventListener"],"sourceRoot":""}