Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ampproject/amp-instagram

Package Overview
Dependencies
Maintainers
16
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ampproject/amp-instagram - npm Package Compare versions

Comparing version 1.2110202310.0 to 1.2110212130.0

dist/web-component.js

2

dist/component-preact.module.js

@@ -1,2 +0,2 @@

function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(n){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?t(Object(a),!0).forEach((function(t){e(n,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(a,e))}))}return n}function r(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var{hasOwnProperty:a,toString:o}=Object.prototype;function l(e){return e||{}}import{cloneElement as s,createContext as i,createElement as c,createRef as u}from"preact";import{hydrate as f,render as p}from"preact";import{useCallback as d,useContext as m,useEffect as g,useImperativeHandle as y,useLayoutEffect as b,useMemo as w,useRef as v,useState as h}from"preact/hooks";function O(e,t,n){return c.apply(void 0,arguments)}function S(e){return h(e)}function j(e){return v(e)}function z(e,t){b(e,t)}function R(e,t){return d(e,t)}import{Children as C,createPortal as M,forwardRef as N}from"preact/compat";function x(e){return N(e)}var E=["as","children","class","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"],$=[null,"paint","layout","content","size","size paint","size layout","strict"],k={"position":"relative","width":"100%","height":"100%"},A=x((function(e,t){let{as:a="div",children:o,"class":l,contentAs:s="div",contentClassName:i,contentProps:c,contentRef:u,contentStyle:f,layout:p=!1,paint:d=!1,size:m=!1,"style":g,wrapperClassName:y,wrapperStyle:b}=e;const w=(m?4:0)+(p?2:0)+(d?1:0);return O(a,n(n({},r(e,E)),{},{ref:t,class:`${l||""} ${y||""}`.trim()||null,style:n(n(n({},g),b),{},{contain:$[w]})}),O(s,n(n({},c),{},{ref:u,class:i,style:n(n({},m&&k),{},{"overflow":d?"hidden":"visible"},f)}),o))})),F=["as","children","class","style","wrapperClassName","wrapperStyle"];function I(e){const t=j(null);return t.current=e,t}x((function(e,t){let{as:a="div",children:o,"class":l,"style":s,wrapperClassName:i,wrapperStyle:c}=e;return O(a,n(n({},r(e,F)),{},{ref:t,class:`${l||""} ${i||""}`.trim()||null,style:n(n({},s),c)}),o)})),new WeakMap,new WeakMap;var H,L=["auto","lazy","eager","unload"],P={auto:0,lazy:1,eager:2,unload:3};function q(){const e=H||(H=i({renderable:!0,playable:!0,loading:"auto"},void 0));return m(e)}var U=["allow","allowFullScreen","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"],V=()=>!1,W=x((function(e,t){let{allow:a,allowFullScreen:o,iframeStyle:l,name:s,title:i,matchesMessagingOrigin:c=V,messageHandler:u,ready:f=!0,loading:p,onReadyState:d,sandbox:m,src:b}=e,w=r(e,U);const{playable:v}=q(),h=function(e){const{loading:t}=q();return function(e,t){const n=P[e]||0,r=P[t]||0,a=Math.max(n,r);return L[a]}(e,t)}(p),S="unload"!==h,C=j(!1),M=I(d),N=R((e=>{if(e!==C.current){C.current=e;const t=M.current;null==t||t(e?"complete":"loading")}}),[M]),x=j(null);var E;return function(e,t,n){y(e,(()=>({get readyState(){return C.current?"complete":"loading"},get node(){return x.current}})),[])}(t),z((()=>{S||N(!1)}),[S,N]),E=()=>{const e=x.current;if(!v&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}},g(E,[v]),z((()=>{const e=x.current;if(!e||!S)return;const t=e=>{const t=x.current;t&&e.source==t.contentWindow&&c(e.origin)&&u(e)},{defaultView:n}=e.ownerDocument;return n.addEventListener("message",t),()=>n.removeEventListener("message",t)}),[c,u,S,f]),O(A,n(n({},w),{},{layout:!0,size:!0,paint:!0}),S&&f&&O("iframe",{allow:a,allowFullScreen:o,frameborder:"0",loading:h,name:s,onLoad:()=>N(!0),part:"iframe",ref:x,sandbox:m,scrolling:"no",src:b,style:n(n({},l),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}));W.displayName="IframeEmbed";var J=self.AMP_CONFIG||{},Z=("string"==typeof J.thirdPartyFrameRegex?new RegExp(J.thirdPartyFrameRegex):J.thirdPartyFrameRegex,("string"==typeof J.cdnProxyRegex?new RegExp(J.cdnProxyRegex):J.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/);function _(e){if(!self.document||!self.document.head)return null;if(self.location&&Z.test(self.location.origin))return null;const t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}J.thirdPartyUrl,J.thirdPartyFrameHost,J.cdnUrl||_("runtime-host"),J.errorReportingUrl,J.betaErrorReportingUrl,J.localDev,J.geoApiUrl||_("amp-geo-api"),self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG;var B=["captioned","onLoad","requestResize","shortcode","title"],D=l(),G=e=>"https://www.instagram.com"===e,K=x((function(e,t){let{captioned:a,onLoad:o,requestResize:s,shortcode:i,title:c="Instagram"}=e,u=r(e,B);const[f,p]=S(D),[d,m]=S(0),g=I(o),y=R((e=>{const t=(n=function(e){return e.data}(e),JSON.parse(n));var n;if("MEASURE"==t.type&&t.details){var r;const e=t.details.height;s&&s(e),p(l({"height":e})),m(1),null===(r=g.current)||void 0===r||r.call(g)}}),[s,g]);return O(W,n({iframeStyle:{opacity:d},matchesMessagingOrigin:G,messageHandler:y,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(i)+"/embed/"+(a?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:f},u))}));K.displayName="Instagram";export{K as BentoInstagram};
function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?n(Object(a),!0).forEach((function(n){t(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function Ai(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var{hasOwnProperty:f,toString:h}=Object.prototype;function d(e){return e||{}}import{cloneElement as ae,createContext as le,createElement as An,createRef as se}from"preact";import{hydrate as ce,render as Pn}from"preact";import{useCallback as En,useContext as ue,useEffect as Mn,useImperativeHandle as fe,useLayoutEffect as Sn,useMemo as pe,useRef as Rn,useState as kn}from"preact/hooks";function de(e,t,n){return An.apply(void 0,arguments)}function me(e){return kn(e)}function ge(e){return Rn(e)}function ye(e,t){Sn(e,t)}function be(e,t){return En(e,t)}import{Children as we,createPortal as ve,forwardRef as Di}from"preact/compat";function he(e){return Di(e)}var Hi=["as","children","class","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"],Zi=[null,"paint","layout","content","size","size paint","size layout","strict"],Bi={"position":"relative","width":"100%","height":"100%"},Gi=he((function(e,t){let{as:n="div",children:r,"class":a,contentAs:o="div",contentClassName:l,contentProps:s,contentRef:c,contentStyle:u,layout:f=!1,paint:p=!1,size:d=!1,"style":m,wrapperClassName:g,wrapperStyle:y}=e;const b=(d?4:0)+(f?2:0)+(p?1:0);return de(n,i(i({},Ai(e,Hi)),{},{ref:t,class:`${a||""} ${g||""}`.trim()||null,style:i(i(i({},m),y),{},{contain:Zi[b]})}),de(o,i(i({},s),{},{ref:c,class:l,style:i(i({},d&&Bi),{},{"overflow":p?"hidden":"visible"},u)}),r))})),Qi=["as","children","class","style","wrapperClassName","wrapperStyle"];function Ji(e){const t=ge(null);return t.current=e,t}he((function(e,t){let{as:n="div",children:r,"class":a,"style":o,wrapperClassName:l,wrapperStyle:s}=e;return de(n,i(i({},Ai(e,Qi)),{},{ref:t,class:`${a||""} ${l||""}`.trim()||null,style:i(i({},o),s)}),r)})),new WeakMap,new WeakMap;var mn,y=["auto","lazy","eager","unload"],b={auto:0,lazy:1,eager:2,unload:3};function Vn(){const e=mn||(mn=le({renderable:!0,playable:!0,loading:"auto"},void 0));return ue(e)}var Ki=["allow","allowFullScreen","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"],Xi=()=>!1,Yi=he((function(e,t){let{allow:n,allowFullScreen:r,iframeStyle:a,name:o,title:l,matchesMessagingOrigin:s=Xi,messageHandler:c,ready:u=!0,loading:f,onReadyState:p,sandbox:d,src:m}=e,g=Ai(e,Ki);const{playable:w}=Vn(),v=function(e){const{loading:t}=Vn();return function(e,t){const n=b[e]||0,r=b[t]||0,a=Math.max(n,r);return y[a]}(e,t)}(f),h="unload"!==v,O=ge(!1),S=Ji(p),j=be((e=>{if(e!==O.current){O.current=e;const t=S.current;null==t||t(e?"complete":"loading")}}),[S]),z=ge(null);var R;return function(e,t,n){fe(e,(()=>({get readyState(){return O.current?"complete":"loading"},get node(){return z.current}})),[])}(t),ye((()=>{h||j(!1)}),[h,j]),R=()=>{const e=z.current;if(!w&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}},Mn(R,[w]),ye((()=>{const e=z.current;if(!e||!h)return;const t=e=>{const t=z.current;t&&e.source==t.contentWindow&&s(e.origin)&&c(e)},{defaultView:n}=e.ownerDocument;return n.addEventListener("message",t),()=>n.removeEventListener("message",t)}),[s,c,h,u]),de(Gi,i(i({},g),{},{layout:!0,size:!0,paint:!0}),h&&u&&de("iframe",{allow:n,allowFullScreen:r,frameborder:"0",loading:v,name:o,onLoad:()=>j(!0),part:"iframe",ref:z,sandbox:d,scrolling:"no",src:m,style:i(i({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}));Yi.displayName="IframeEmbed";var ri=self.AMP_CONFIG||{},oi=("string"==typeof ri.thirdPartyFrameRegex?new RegExp(ri.thirdPartyFrameRegex):ri.thirdPartyFrameRegex,("string"==typeof ri.cdnProxyRegex?new RegExp(ri.cdnProxyRegex):ri.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/);function si(e){if(!self.document||!self.document.head)return null;if(self.location&&oi.test(self.location.origin))return null;const t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}ri.thirdPartyUrl,ri.thirdPartyFrameHost,ri.cdnUrl||si("runtime-host"),ri.errorReportingUrl,ri.betaErrorReportingUrl,ri.localDev,ri.geoApiUrl||si("amp-geo-api"),self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG;var te=["captioned","onLoad","requestResize","shortcode","title"],ne=d(),ie=e=>"https://www.instagram.com"===e,ee=he((function(e,t){let{captioned:n,onLoad:r,requestResize:a,shortcode:o,title:l="Instagram"}=e,s=Ai(e,te);const[c,u]=me(ne),[f,p]=me(0),m=Ji(r),g=be((e=>{const t=(n=function(e){return e.data}(e),JSON.parse(n));var n;if("MEASURE"==t.type&&t.details){var r;const e=t.details.height;a&&a(e),u(d({"height":e})),p(1),null===(r=m.current)||void 0===r||r.call(m)}}),[a,m]);return de(Yi,i({iframeStyle:{opacity:f},matchesMessagingOrigin:ie,messageHandler:g,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(n?"captioned/":"")+"?cr=1&v=12",title:l,wrapperStyle:c},s))}));ee.displayName="Instagram";export{ee as BentoInstagram};
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */

@@ -1,2 +0,2 @@

function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(n){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?t(Object(a),!0).forEach((function(t){e(n,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(a,e))}))}return n}function r(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var{hasOwnProperty:a,toString:o}=Object.prototype;function l(e){return e||{}}import{cloneElement as s,createContext as i,createElement as c,createRef as u}from"react";import{hydrate as f,render as p}from"react-dom";import{useCallback as d,useContext as m,useEffect as g,useImperativeHandle as y,useLayoutEffect as b,useMemo as w,useRef as v,useState as h}from"react";function O(e,t,n){return c.apply(void 0,arguments)}function S(e){return h(e)}function j(e){return v(e)}function z(e,t){b(e,t)}function R(e,t){return d(e,t)}import{Children as C,createPortal as M,forwardRef as N}from"react";function x(e){return N(e)}var E=["as","children","class","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"],$=[null,"paint","layout","content","size","size paint","size layout","strict"],A={"position":"relative","width":"100%","height":"100%"},F=x((function(e,t){let{as:a="div",children:o,"class":l,contentAs:s="div",contentClassName:i,contentProps:c,contentRef:u,contentStyle:f,layout:p=!1,paint:d=!1,size:m=!1,"style":g,wrapperClassName:y,wrapperStyle:b}=e;const w=(m?4:0)+(p?2:0)+(d?1:0);return O(a,n(n({},r(e,E)),{},{ref:t,class:`${l||""} ${y||""}`.trim()||null,style:n(n(n({},g),b),{},{contain:$[w]})}),O(s,n(n({},c),{},{ref:u,class:i,style:n(n({},m&&A),{},{"overflow":d?"hidden":"visible"},f)}),o))})),I=["as","children","class","style","wrapperClassName","wrapperStyle"];function k(e){const t=j(null);return t.current=e,t}x((function(e,t){let{as:a="div",children:o,"class":l,"style":s,wrapperClassName:i,wrapperStyle:c}=e;return O(a,n(n({},r(e,I)),{},{ref:t,class:`${l||""} ${i||""}`.trim()||null,style:n(n({},s),c)}),o)})),new WeakMap,new WeakMap;var H,L=["auto","lazy","eager","unload"],P={auto:0,lazy:1,eager:2,unload:3};function q(){const e=H||(H=i({renderable:!0,playable:!0,loading:"auto"},void 0));return m(e)}var U=["allow","allowFullScreen","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"],V=()=>!1,W=x((function(e,t){let{allow:a,allowFullScreen:o,iframeStyle:l,name:s,title:i,matchesMessagingOrigin:c=V,messageHandler:u,ready:f=!0,loading:p,onReadyState:d,sandbox:m,src:b}=e,w=r(e,U);const{playable:v}=q(),h=function(e){const{loading:t}=q();return function(e,t){const n=P[e]||0,r=P[t]||0,a=Math.max(n,r);return L[a]}(e,t)}(p),S="unload"!==h,C=j(!1),M=k(d),N=R((e=>{if(e!==C.current){C.current=e;const t=M.current;null==t||t(e?"complete":"loading")}}),[M]),x=j(null);var E;return function(e,t,n){y(e,(()=>({get readyState(){return C.current?"complete":"loading"},get node(){return x.current}})),[])}(t),z((()=>{S||N(!1)}),[S,N]),E=()=>{const e=x.current;if(!v&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}},g(E,[v]),z((()=>{const e=x.current;if(!e||!S)return;const t=e=>{const t=x.current;t&&e.source==t.contentWindow&&c(e.origin)&&u(e)},{defaultView:n}=e.ownerDocument;return n.addEventListener("message",t),()=>n.removeEventListener("message",t)}),[c,u,S,f]),O(F,n(n({},w),{},{layout:!0,size:!0,paint:!0}),S&&f&&O("iframe",{allow:a,allowFullScreen:o,frameborder:"0",loading:h,name:s,onLoad:()=>N(!0),part:"iframe",ref:x,sandbox:m,scrolling:"no",src:b,style:n(n({},l),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}));W.displayName="IframeEmbed";var J=self.AMP_CONFIG||{},Z=("string"==typeof J.thirdPartyFrameRegex?new RegExp(J.thirdPartyFrameRegex):J.thirdPartyFrameRegex,("string"==typeof J.cdnProxyRegex?new RegExp(J.cdnProxyRegex):J.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/);function _(e){if(!self.document||!self.document.head)return null;if(self.location&&Z.test(self.location.origin))return null;const t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}J.thirdPartyUrl,J.thirdPartyFrameHost,J.cdnUrl||_("runtime-host"),J.errorReportingUrl,J.betaErrorReportingUrl,J.localDev,J.geoApiUrl||_("amp-geo-api"),self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG;var B=["captioned","onLoad","requestResize","shortcode","title"],D=l(),G=e=>"https://www.instagram.com"===e,K=x((function(e,t){let{captioned:a,onLoad:o,requestResize:s,shortcode:i,title:c="Instagram"}=e,u=r(e,B);const[f,p]=S(D),[d,m]=S(0),g=k(o),y=R((e=>{const t=(n=function(e){return e.data}(e),JSON.parse(n));var n;if("MEASURE"==t.type&&t.details){var r;const e=t.details.height;s&&s(e),p(l({"height":e})),m(1),null===(r=g.current)||void 0===r||r.call(g)}}),[s,g]);return O(W,n({iframeStyle:{opacity:d},matchesMessagingOrigin:G,messageHandler:y,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(i)+"/embed/"+(a?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:f},u))}));K.displayName="Instagram";export{K as BentoInstagram};
function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?n(Object(a),!0).forEach((function(n){t(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function Ai(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var{hasOwnProperty:f,toString:h}=Object.prototype;function d(e){return e||{}}import{cloneElement as ae,createContext as le,createElement as An,createRef as se}from"react";import{hydrate as ce,render as Pn}from"react-dom";import{useCallback as En,useContext as ue,useEffect as Mn,useImperativeHandle as fe,useLayoutEffect as Sn,useMemo as pe,useRef as Rn,useState as kn}from"react";function de(e,t,n){return An.apply(void 0,arguments)}function me(e){return kn(e)}function ge(e){return Rn(e)}function ye(e,t){Sn(e,t)}function be(e,t){return En(e,t)}import{Children as we,createPortal as ve,forwardRef as Di}from"react";function he(e){return Di(e)}var Hi=["as","children","class","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"],Zi=[null,"paint","layout","content","size","size paint","size layout","strict"],Bi={"position":"relative","width":"100%","height":"100%"},Gi=he((function(e,t){let{as:n="div",children:r,"class":a,contentAs:o="div",contentClassName:l,contentProps:s,contentRef:c,contentStyle:u,layout:f=!1,paint:p=!1,size:d=!1,"style":m,wrapperClassName:g,wrapperStyle:y}=e;const b=(d?4:0)+(f?2:0)+(p?1:0);return de(n,i(i({},Ai(e,Hi)),{},{ref:t,class:`${a||""} ${g||""}`.trim()||null,style:i(i(i({},m),y),{},{contain:Zi[b]})}),de(o,i(i({},s),{},{ref:c,class:l,style:i(i({},d&&Bi),{},{"overflow":p?"hidden":"visible"},u)}),r))})),Qi=["as","children","class","style","wrapperClassName","wrapperStyle"];function Ji(e){const t=ge(null);return t.current=e,t}he((function(e,t){let{as:n="div",children:r,"class":a,"style":o,wrapperClassName:l,wrapperStyle:s}=e;return de(n,i(i({},Ai(e,Qi)),{},{ref:t,class:`${a||""} ${l||""}`.trim()||null,style:i(i({},o),s)}),r)})),new WeakMap,new WeakMap;var mn,y=["auto","lazy","eager","unload"],b={auto:0,lazy:1,eager:2,unload:3};function Vn(){const e=mn||(mn=le({renderable:!0,playable:!0,loading:"auto"},void 0));return ue(e)}var Ki=["allow","allowFullScreen","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"],Xi=()=>!1,Yi=he((function(e,t){let{allow:n,allowFullScreen:r,iframeStyle:a,name:o,title:l,matchesMessagingOrigin:s=Xi,messageHandler:c,ready:u=!0,loading:f,onReadyState:p,sandbox:d,src:m}=e,g=Ai(e,Ki);const{playable:w}=Vn(),v=function(e){const{loading:t}=Vn();return function(e,t){const n=b[e]||0,r=b[t]||0,a=Math.max(n,r);return y[a]}(e,t)}(f),h="unload"!==v,O=ge(!1),S=Ji(p),j=be((e=>{if(e!==O.current){O.current=e;const t=S.current;null==t||t(e?"complete":"loading")}}),[S]),z=ge(null);var R;return function(e,t,n){fe(e,(()=>({get readyState(){return O.current?"complete":"loading"},get node(){return z.current}})),[])}(t),ye((()=>{h||j(!1)}),[h,j]),R=()=>{const e=z.current;if(!w&&e){const{src:t}=e;(e=>e&&"about:blank"!=e&&!e.includes("#"))(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}},Mn(R,[w]),ye((()=>{const e=z.current;if(!e||!h)return;const t=e=>{const t=z.current;t&&e.source==t.contentWindow&&s(e.origin)&&c(e)},{defaultView:n}=e.ownerDocument;return n.addEventListener("message",t),()=>n.removeEventListener("message",t)}),[s,c,h,u]),de(Gi,i(i({},g),{},{layout:!0,size:!0,paint:!0}),h&&u&&de("iframe",{allow:n,allowFullScreen:r,frameborder:"0",loading:v,name:o,onLoad:()=>j(!0),part:"iframe",ref:z,sandbox:d,scrolling:"no",src:m,style:i(i({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:l}))}));Yi.displayName="IframeEmbed";var ri=self.AMP_CONFIG||{},oi=("string"==typeof ri.thirdPartyFrameRegex?new RegExp(ri.thirdPartyFrameRegex):ri.thirdPartyFrameRegex,("string"==typeof ri.cdnProxyRegex?new RegExp(ri.cdnProxyRegex):ri.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/);function si(e){if(!self.document||!self.document.head)return null;if(self.location&&oi.test(self.location.origin))return null;const t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}ri.thirdPartyUrl,ri.thirdPartyFrameHost,ri.cdnUrl||si("runtime-host"),ri.errorReportingUrl,ri.betaErrorReportingUrl,ri.localDev,ri.geoApiUrl||si("amp-geo-api"),self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG;var te=["captioned","onLoad","requestResize","shortcode","title"],ne=d(),ie=e=>"https://www.instagram.com"===e,ee=he((function(e,t){let{captioned:n,onLoad:r,requestResize:a,shortcode:o,title:l="Instagram"}=e,s=Ai(e,te);const[c,u]=me(ne),[f,p]=me(0),m=Ji(r),g=be((e=>{const t=(n=function(e){return e.data}(e),JSON.parse(n));var n;if("MEASURE"==t.type&&t.details){var r;const e=t.details.height;a&&a(e),u(d({"height":e})),p(1),null===(r=m.current)||void 0===r||r.call(m)}}),[a,m]);return de(Yi,i({iframeStyle:{opacity:f},matchesMessagingOrigin:ie,messageHandler:g,ref:t,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(n?"captioned/":"")+"?cr=1&v=12",title:l,wrapperStyle:c},s))}));ee.displayName="Instagram";export{ee as BentoInstagram};
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
{
"name": "@ampproject/amp-instagram",
"version": "1.2110202310.0",
"version": "1.2110212130.0",
"description": "AMP HTML amp-instagram Component",

@@ -5,0 +5,0 @@ "author": "The AMP HTML Authors",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc