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.2106012301.0 to 1.2106030132.0

2

dist/component-preact.js

@@ -1,3 +0,3 @@

var Ce=Object.create,D=Object.defineProperty,Me=Object.getOwnPropertyDescriptor,Ne=Object.getOwnPropertyNames,Le=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty,ne=function(e){return D(e,"__esModule",{value:!0})},je=function(e,r){for(var t in r)D(e,t,{get:r[t],enumerable:!0})},Fe=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=Ne(r),a=0,i=o.length;a<i;a++)n=o[a],!Te.call(e,n)&&"default"!==n&&D(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=Me(r,n))||t.enumerable});return e},U=function(e){return Fe(ne(D(null!=e?Ce(Le(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};ne(exports),je(exports,{Instagram:function(){return Ie}});var u=U(require("preact/hooks")),O=U(require("preact")),oe=U(require("preact"));function p(e,r,t){return O.createElement.apply(void 0,arguments)}function ae(e){return O.createContext(e,void 0)}function G(e){return u.useState(e)}function L(e){return u.useRef(e)}function ie(e,r){u.useEffect(e,r)}function H(e,r){u.useLayoutEffect(e,r)}function se(e){return u.useContext(e)}function k(e,r){return u.useCallback(e,r)}function Q(e,r,t){return u.useImperativeHandle(e,r,t)}var $=U(require("preact/compat"));function y(e){return $.forwardRef(e)}var De=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function ue(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function v(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ue(Object(t),!0).forEach((function(r){Ue(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ue(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Ue(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ge(e,r){if(null==e)return{};var t,n,o=He(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function He(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var ke=[null,"paint","layout","content","size","size paint","size layout","strict"],$e={position:"relative",width:"100%",height:"100%"};function Ve(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,i=e.contentAs,c=void 0===i?"div":i,l=e.contentClassName,u=e.contentProps,f=e.contentRef,s=e.contentStyle,y=e.layout,O=void 0!==y&&y,b=e.paint,d=void 0!==b&&b,g=e.size,m=void 0!==g&&g,w=e.style,j=e.wrapperClassName,h=e.wrapperStyle,P=(m?4:0)+(O?2:0)+(d?1:0);return p(n,v(v({},Ge(e,De)),{},{ref:r,className:"".concat(a||""," ").concat(j||"").trim()||null,style:v(v(v({},w),h),{},{contain:ke[P]})}),p(c,v(v({},u),{},{ref:f,className:l,style:v(v({},m&&$e),{},{overflow:d?"hidden":"visible"},s)}),o))}var Y=y(Ve),ze=["as","children","className","style","wrapperClassName","wrapperStyle"];function fe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function V(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?fe(Object(t),!0).forEach((function(r){Be(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fe(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Be(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function qe(e,r){if(null==e)return{};var t,n,o=We(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function We(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}function Je(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,i=e.style,c=e.wrapperClassName,l=e.wrapperStyle;return p(n,V(V({},qe(e,ze)),{},{ref:r,className:"".concat(a||""," ").concat(c||"").trim()||null,style:V(V({},i),l)}),o)}var C,Qe=y(Je);function Z(e){var r=L(null);return r.current=e,r}function z(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var l={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},Ye=[l.AUTO,l.LAZY,l.EAGER,l.UNLOAD],ce=(z(C={},l.AUTO,0),z(C,l.LAZY,1),z(C,l.EAGER,2),z(C,l.UNLOAD,3),C);function le(e,r){var t=ce[e]||0,n=ce[r]||0,o=Math.max(t,n);return Ye[o]}var pe,T={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function Ze(){return pe||(pe=ae({renderable:!0,playable:!0,loading:l.AUTO}))}function K(){return se(Ze())}function me(e){return le(e,K().loading)}var Ke=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function de(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function B(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?de(Object(t),!0).forEach((function(r){Xe(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):de(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Xe(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function er(e,r){if(null==e)return{};var t,n,o=rr(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function rr(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var tr=function(){return!1},nr="about:blank",or=function(e){return e&&e!=nr&&!e.includes("#")};function ar(e,r){var t=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,c=e.title,u=e.matchesMessagingOrigin,f=void 0===u?tr:u,s=e.messageHandler,y=e.ready,O=void 0===y||y,b=e.loading,d=e.onReadyState,g=e.sandbox,m=e.src,v=er(e,Ke),w=K().playable,j=me(b),h=j!==l.UNLOAD,P=L(!1),S=Z(d),A=k((function(e){if(e!==P.current){P.current=e;var r=S.current;null==r||r(e?T.COMPLETE:T.LOADING)}}),[S]),E=L(null);return Q(r,(function(){return{get readyState(){return P.current?T.COMPLETE:T.LOADING},get node(){return E.current}}}),[]),H((function(){h||A(!1)}),[h,A]),ie((function(){var e=E.current;if(!w&&e){var r=e.src;if(or(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[w]),H((function(){var e=E.current;if(e&&h){var r=function(e){var r=E.current;!r||e.source!=r.contentWindow||!f(e.origin)||s(e)},t=e.ownerDocument.defaultView;return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}}),[f,s,h,O]),p(Y,B(B({},v),{},{layout:!0,size:!0,paint:!0}),h&&O&&p("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:j,name:i,onLoad:function(){return A(!0)},part:"iframe",ref:E,sandbox:g,scrolling:"no",src:m,style:B(B({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var X=y(ar);X.displayName="IframeEmbed";var ve=Object.prototype,ct=ve.hasOwnProperty,lt=ve.toString;function ee(e){return e||{}}var q=Array.isArray,f=self.AMP_CONFIG||{},lr=("string"==typeof f.thirdPartyFrameRegex?new RegExp(f.thirdPartyFrameRegex):f.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,Oe=("string"==typeof f.cdnProxyRegex?new RegExp(f.cdnProxyRegex):f.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Ae(e){if(!self.document||!self.document.head||self.location&&Oe.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var pr={thirdParty:f.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:f.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:lr,cdn:f.cdnUrl||Ae("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:Oe,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:f.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:f.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:f.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:f.geoApiUrl||Ae("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var wn=self.__AMP_LOG;function Se(e){return e.data}function _e(e){return JSON.parse(e)}var mr=["captioned","requestResize","shortcode","title"];function Re(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function dr(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Re(Object(t),!0).forEach((function(r){vr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Re(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function vr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Pe(e,r){return xr(e)||hr(e,r)||yr(e,r)||gr()}function gr(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yr(e,r){if(e){if("string"==typeof e)return we(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return we(e,r)}}function we(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function hr(e,r){var t=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=t){var n,o,a=[],i=!0,c=!1;try{for(t=t.call(e);!(i=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);i=!0);}catch(e){c=!0,o=e}finally{try{!i&&null!=t.return&&t.return()}finally{if(c)throw o}}return a}}function xr(e){if(Array.isArray(e))return e}function Er(e,r){if(null==e)return{};var t,n,o=br(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function br(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var Or=ee(),Ar=function(e){return"https://www.instagram.com"===e};function Sr(e,r){var t=e.captioned,n=e.requestResize,o=e.shortcode,a=e.title,i=void 0===a?"Instagram":a,c=Er(e,mr),l=Pe(G(Or),2),u=l[0],f=l[1],s=Pe(G(0),2),y=s[0],O=s[1],b=k((function(e){var r=_e(Se(e));if("MEASURE"==r.type&&r.details){var t=r.details.height;n&&n(t),f(ee({height:t})),O(1)}}),[n]);return p(X,dr({allowTransparency:!0,iframeStyle:{opacity:y},matchesMessagingOrigin:Ar,messageHandler:b,ref:r,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(t?"captioned/":"")+"?cr=1&v=12",title:i,wrapperStyle:u},c))}var Ie=y(Sr);Ie.displayName="Instagram";
var Ce=Object.create,D=Object.defineProperty,Me=Object.getOwnPropertyDescriptor,Ne=Object.getOwnPropertyNames,Le=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty,ne=function(e){return D(e,"__esModule",{value:!0})},je=function(e,r){for(var t in r)D(e,t,{get:r[t],enumerable:!0})},Fe=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=Ne(r),a=0,c=o.length;a<c;a++)n=o[a],!Te.call(e,n)&&"default"!==n&&D(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=Me(r,n))||t.enumerable});return e},U=function(e){return Fe(ne(D(null!=e?Ce(Le(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};ne(exports),je(exports,{Instagram:function(){return Ie}});var s=U(require("preact/hooks")),O=U(require("preact")),oe=U(require("preact"));function p(e,r,t){return O.createElement.apply(void 0,arguments)}function ae(e){return O.createContext(e,void 0)}function G(e){return s.useState(e)}function L(e){return s.useRef(e)}function ie(e,r){s.useEffect(e,r)}function H(e,r){s.useLayoutEffect(e,r)}function ue(e){return s.useContext(e)}function k(e,r){return s.useCallback(e,r)}function Q(e,r,t){return s.useImperativeHandle(e,r,t)}var V=U(require("preact/compat"));function y(e){return V.forwardRef(e)}var De=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function se(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function v(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?se(Object(t),!0).forEach((function(r){Ue(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):se(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Ue(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ge(e,r){if(null==e)return{};var t,n,o=He(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function He(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var ke=[null,"paint","layout","content","size","size paint","size layout","strict"],Ve={position:"relative",width:"100%",height:"100%"};function $e(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.contentAs,i=void 0===c?"div":c,l=e.contentClassName,u=e.contentProps,s=e.contentRef,f=e.contentStyle,y=e.layout,O=void 0!==y&&y,b=e.paint,d=void 0!==b&&b,g=e.size,m=void 0!==g&&g,w=e.style,j=e.wrapperClassName,h=e.wrapperStyle,P=(m?4:0)+(O?2:0)+(d?1:0);return p(n,v(v({},Ge(e,De)),{},{ref:r,className:"".concat(a||""," ").concat(j||"").trim()||null,style:v(v(v({},w),h),{},{contain:ke[P]})}),p(i,v(v({},u),{},{ref:s,className:l,style:v(v({},m&&Ve),{},{overflow:d?"hidden":"visible"},f)}),o))}var Y=y($e),ze=["as","children","className","style","wrapperClassName","wrapperStyle"];function ce(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function $(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ce(Object(t),!0).forEach((function(r){Be(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ce(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Be(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function qe(e,r){if(null==e)return{};var t,n,o=We(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function We(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}function Je(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.style,i=e.wrapperClassName,l=e.wrapperStyle;return p(n,$($({},qe(e,ze)),{},{ref:r,className:"".concat(a||""," ").concat(i||"").trim()||null,style:$($({},c),l)}),o)}var C,Qe=y(Je);function Z(e){var r=L(null);return r.current=e,r}function z(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var l={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},Ye=[l.AUTO,l.LAZY,l.EAGER,l.UNLOAD],fe=(z(C={},l.AUTO,0),z(C,l.LAZY,1),z(C,l.EAGER,2),z(C,l.UNLOAD,3),C);function le(e,r){var t=fe[e]||0,n=fe[r]||0,o=Math.max(t,n);return Ye[o]}var pe,T={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function Ze(){return pe||(pe=ae({renderable:!0,playable:!0,loading:l.AUTO}))}function K(){return ue(Ze())}function me(e){return le(e,K().loading)}var Ke=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function de(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function B(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?de(Object(t),!0).forEach((function(r){Xe(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):de(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Xe(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function er(e,r){if(null==e)return{};var t,n,o=rr(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function rr(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var tr=function(){return!1},nr="about:blank",or=function(e){return e&&e!=nr&&!e.includes("#")};function ar(e,r){var t=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,c=e.name,i=e.title,u=e.matchesMessagingOrigin,s=void 0===u?tr:u,f=e.messageHandler,y=e.ready,O=void 0===y||y,b=e.loading,d=e.onReadyState,g=e.sandbox,m=e.src,v=er(e,Ke),w=K().playable,j=me(b),h=j!==l.UNLOAD,P=L(!1),S=Z(d),A=k((function(e){if(e!==P.current){P.current=e;var r=S.current;null==r||r(e?T.COMPLETE:T.LOADING)}}),[S]),E=L(null);return Q(r,(function(){return{get readyState(){return P.current?T.COMPLETE:T.LOADING},get node(){return E.current}}}),[]),H((function(){h||A(!1)}),[h,A]),ie((function(){var e=E.current;if(!w&&e){var r=e.src;if(or(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[w]),H((function(){var e=E.current;if(e&&h){var r=function(e){var r=E.current;!r||e.source!=r.contentWindow||!s(e.origin)||f(e)},t=e.ownerDocument.defaultView;return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}}),[s,f,h,O]),p(Y,B(B({},v),{},{layout:!0,size:!0,paint:!0}),h&&O&&p("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:j,name:c,onLoad:function(){return A(!0)},part:"iframe",ref:E,sandbox:g,scrolling:"no",src:m,style:B(B({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}var X=y(ar);X.displayName="IframeEmbed";var ve=Object.prototype,ft=ve.hasOwnProperty,lt=ve.toString;function ee(e){return e||{}}var q=Array.isArray,c=self.AMP_CONFIG||{},lr=("string"==typeof c.thirdPartyFrameRegex?new RegExp(c.thirdPartyFrameRegex):c.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,Oe=("string"==typeof c.cdnProxyRegex?new RegExp(c.cdnProxyRegex):c.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Ae(e){if(!self.document||!self.document.head||self.location&&Oe.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var pr={thirdParty:c.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:c.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:lr,cdn:c.cdnUrl||Ae("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:Oe,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:c.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:c.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:c.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:c.geoApiUrl||Ae("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var wn=self.__AMP_LOG;function Se(e){return e.data}function _e(e){return JSON.parse(e)}var mr=["captioned","requestResize","shortcode","title"];function Re(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function dr(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Re(Object(t),!0).forEach((function(r){vr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Re(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function vr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Pe(e,r){return xr(e)||hr(e,r)||yr(e,r)||gr()}function gr(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yr(e,r){if(e){if("string"==typeof e)return we(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return we(e,r)}}function we(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function hr(e,r){var t=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=t){var n,o,a=[],c=!0,i=!1;try{for(t=t.call(e);!(c=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);c=!0);}catch(e){i=!0,o=e}finally{try{!c&&null!=t.return&&t.return()}finally{if(i)throw o}}return a}}function xr(e){if(Array.isArray(e))return e}function Er(e,r){if(null==e)return{};var t,n,o=br(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function br(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var Or=ee(),Ar=function(e){return"https://www.instagram.com"===e};function Sr(e,r){var t=e.captioned,n=e.requestResize,o=e.shortcode,a=e.title,c=void 0===a?"Instagram":a,i=Er(e,mr),l=Pe(G(Or),2),u=l[0],s=l[1],f=Pe(G(0),2),y=f[0],O=f[1],b=k((function(e){var r=_e(Se(e));if("MEASURE"==r.type&&r.details){var t=r.details.height;n&&n(t),s(ee({height:t})),O(1)}}),[n]);return p(X,dr({allowTransparency:!0,iframeStyle:{opacity:y},matchesMessagingOrigin:Ar,messageHandler:b,ref:r,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(t?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:u},i))}var Ie=y(Sr);Ie.displayName="Instagram";
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
//# sourceMappingURL=component-preact.js.map

@@ -1,3 +0,3 @@

var Ce=Object.create,D=Object.defineProperty,Me=Object.getOwnPropertyDescriptor,Ne=Object.getOwnPropertyNames,Le=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty,ne=function(e){return D(e,"__esModule",{value:!0})},je=function(e,r){for(var t in r)D(e,t,{get:r[t],enumerable:!0})},Fe=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=Ne(r),a=0,i=o.length;a<i;a++)n=o[a],!Te.call(e,n)&&"default"!==n&&D(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=Me(r,n))||t.enumerable});return e},U=function(e){return Fe(ne(D(null!=e?Ce(Le(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};ne(exports),je(exports,{Instagram:function(){return Ie}});var u=U(require("react")),O=U(require("react")),oe=U(require("react-dom"));function p(e,r,t){return O.createElement.apply(void 0,arguments)}function ae(e){return O.createContext(e,void 0)}function G(e){return u.useState(e)}function L(e){return u.useRef(e)}function ie(e,r){u.useEffect(e,r)}function H(e,r){u.useLayoutEffect(e,r)}function se(e){return u.useContext(e)}function k(e,r){return u.useCallback(e,r)}function Q(e,r,t){return u.useImperativeHandle(e,r,t)}var $=U(require("react"));function y(e){return $.forwardRef(e)}var De=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function ue(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function v(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ue(Object(t),!0).forEach((function(r){Ue(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ue(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Ue(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ge(e,r){if(null==e)return{};var t,n,o=He(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function He(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var ke=[null,"paint","layout","content","size","size paint","size layout","strict"],$e={position:"relative",width:"100%",height:"100%"};function Ve(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,i=e.contentAs,c=void 0===i?"div":i,l=e.contentClassName,u=e.contentProps,f=e.contentRef,s=e.contentStyle,y=e.layout,O=void 0!==y&&y,b=e.paint,d=void 0!==b&&b,g=e.size,m=void 0!==g&&g,w=e.style,j=e.wrapperClassName,h=e.wrapperStyle,P=(m?4:0)+(O?2:0)+(d?1:0);return p(n,v(v({},Ge(e,De)),{},{ref:r,className:"".concat(a||""," ").concat(j||"").trim()||null,style:v(v(v({},w),h),{},{contain:ke[P]})}),p(c,v(v({},u),{},{ref:f,className:l,style:v(v({},m&&$e),{},{overflow:d?"hidden":"visible"},s)}),o))}var Y=y(Ve),ze=["as","children","className","style","wrapperClassName","wrapperStyle"];function fe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function V(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?fe(Object(t),!0).forEach((function(r){Be(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fe(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Be(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function qe(e,r){if(null==e)return{};var t,n,o=We(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function We(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}function Je(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,i=e.style,c=e.wrapperClassName,l=e.wrapperStyle;return p(n,V(V({},qe(e,ze)),{},{ref:r,className:"".concat(a||""," ").concat(c||"").trim()||null,style:V(V({},i),l)}),o)}var C,Qe=y(Je);function Z(e){var r=L(null);return r.current=e,r}function z(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var l={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},Ye=[l.AUTO,l.LAZY,l.EAGER,l.UNLOAD],ce=(z(C={},l.AUTO,0),z(C,l.LAZY,1),z(C,l.EAGER,2),z(C,l.UNLOAD,3),C);function le(e,r){var t=ce[e]||0,n=ce[r]||0,o=Math.max(t,n);return Ye[o]}var pe,T={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function Ze(){return pe||(pe=ae({renderable:!0,playable:!0,loading:l.AUTO}))}function K(){return se(Ze())}function me(e){return le(e,K().loading)}var Ke=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function de(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function B(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?de(Object(t),!0).forEach((function(r){Xe(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):de(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Xe(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function er(e,r){if(null==e)return{};var t,n,o=rr(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function rr(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var tr=function(){return!1},nr="about:blank",or=function(e){return e&&e!=nr&&!e.includes("#")};function ar(e,r){var t=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,c=e.title,u=e.matchesMessagingOrigin,f=void 0===u?tr:u,s=e.messageHandler,y=e.ready,O=void 0===y||y,b=e.loading,d=e.onReadyState,g=e.sandbox,m=e.src,v=er(e,Ke),w=K().playable,j=me(b),h=j!==l.UNLOAD,P=L(!1),S=Z(d),A=k((function(e){if(e!==P.current){P.current=e;var r=S.current;null==r||r(e?T.COMPLETE:T.LOADING)}}),[S]),E=L(null);return Q(r,(function(){return{get readyState(){return P.current?T.COMPLETE:T.LOADING},get node(){return E.current}}}),[]),H((function(){h||A(!1)}),[h,A]),ie((function(){var e=E.current;if(!w&&e){var r=e.src;if(or(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[w]),H((function(){var e=E.current;if(e&&h){var r=function(e){var r=E.current;!r||e.source!=r.contentWindow||!f(e.origin)||s(e)},t=e.ownerDocument.defaultView;return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}}),[f,s,h,O]),p(Y,B(B({},v),{},{layout:!0,size:!0,paint:!0}),h&&O&&p("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:j,name:i,onLoad:function(){return A(!0)},part:"iframe",ref:E,sandbox:g,scrolling:"no",src:m,style:B(B({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var X=y(ar);X.displayName="IframeEmbed";var ve=Object.prototype,ct=ve.hasOwnProperty,lt=ve.toString;function ee(e){return e||{}}var q=Array.isArray,f=self.AMP_CONFIG||{},lr=("string"==typeof f.thirdPartyFrameRegex?new RegExp(f.thirdPartyFrameRegex):f.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,Oe=("string"==typeof f.cdnProxyRegex?new RegExp(f.cdnProxyRegex):f.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Ae(e){if(!self.document||!self.document.head||self.location&&Oe.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var pr={thirdParty:f.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:f.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:lr,cdn:f.cdnUrl||Ae("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:Oe,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:f.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:f.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:f.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:f.geoApiUrl||Ae("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var wn=self.__AMP_LOG;function Se(e){return e.data}function _e(e){return JSON.parse(e)}var mr=["captioned","requestResize","shortcode","title"];function Re(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function dr(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Re(Object(t),!0).forEach((function(r){vr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Re(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function vr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Pe(e,r){return xr(e)||hr(e,r)||yr(e,r)||gr()}function gr(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yr(e,r){if(e){if("string"==typeof e)return we(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return we(e,r)}}function we(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function hr(e,r){var t=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=t){var n,o,a=[],i=!0,c=!1;try{for(t=t.call(e);!(i=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);i=!0);}catch(e){c=!0,o=e}finally{try{!i&&null!=t.return&&t.return()}finally{if(c)throw o}}return a}}function xr(e){if(Array.isArray(e))return e}function Er(e,r){if(null==e)return{};var t,n,o=br(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function br(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var Or=ee(),Ar=function(e){return"https://www.instagram.com"===e};function Sr(e,r){var t=e.captioned,n=e.requestResize,o=e.shortcode,a=e.title,i=void 0===a?"Instagram":a,c=Er(e,mr),l=Pe(G(Or),2),u=l[0],f=l[1],s=Pe(G(0),2),y=s[0],O=s[1],b=k((function(e){var r=_e(Se(e));if("MEASURE"==r.type&&r.details){var t=r.details.height;n&&n(t),f(ee({height:t})),O(1)}}),[n]);return p(X,dr({allowTransparency:!0,iframeStyle:{opacity:y},matchesMessagingOrigin:Ar,messageHandler:b,ref:r,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(t?"captioned/":"")+"?cr=1&v=12",title:i,wrapperStyle:u},c))}var Ie=y(Sr);Ie.displayName="Instagram";
var Ce=Object.create,D=Object.defineProperty,Me=Object.getOwnPropertyDescriptor,Ne=Object.getOwnPropertyNames,Le=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty,ne=function(e){return D(e,"__esModule",{value:!0})},je=function(e,r){for(var t in r)D(e,t,{get:r[t],enumerable:!0})},Fe=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=Ne(r),a=0,c=o.length;a<c;a++)n=o[a],!Te.call(e,n)&&"default"!==n&&D(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=Me(r,n))||t.enumerable});return e},U=function(e){return Fe(ne(D(null!=e?Ce(Le(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};ne(exports),je(exports,{Instagram:function(){return Ie}});var s=U(require("react")),O=U(require("react")),oe=U(require("react-dom"));function p(e,r,t){return O.createElement.apply(void 0,arguments)}function ae(e){return O.createContext(e,void 0)}function G(e){return s.useState(e)}function L(e){return s.useRef(e)}function ie(e,r){s.useEffect(e,r)}function H(e,r){s.useLayoutEffect(e,r)}function ue(e){return s.useContext(e)}function k(e,r){return s.useCallback(e,r)}function Q(e,r,t){return s.useImperativeHandle(e,r,t)}var V=U(require("react"));function y(e){return V.forwardRef(e)}var De=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function se(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function v(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?se(Object(t),!0).forEach((function(r){Ue(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):se(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Ue(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ge(e,r){if(null==e)return{};var t,n,o=He(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function He(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var ke=[null,"paint","layout","content","size","size paint","size layout","strict"],Ve={position:"relative",width:"100%",height:"100%"};function $e(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.contentAs,i=void 0===c?"div":c,l=e.contentClassName,u=e.contentProps,s=e.contentRef,f=e.contentStyle,y=e.layout,O=void 0!==y&&y,b=e.paint,d=void 0!==b&&b,g=e.size,m=void 0!==g&&g,w=e.style,j=e.wrapperClassName,h=e.wrapperStyle,P=(m?4:0)+(O?2:0)+(d?1:0);return p(n,v(v({},Ge(e,De)),{},{ref:r,className:"".concat(a||""," ").concat(j||"").trim()||null,style:v(v(v({},w),h),{},{contain:ke[P]})}),p(i,v(v({},u),{},{ref:s,className:l,style:v(v({},m&&Ve),{},{overflow:d?"hidden":"visible"},f)}),o))}var Y=y($e),ze=["as","children","className","style","wrapperClassName","wrapperStyle"];function ce(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function $(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ce(Object(t),!0).forEach((function(r){Be(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ce(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Be(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function qe(e,r){if(null==e)return{};var t,n,o=We(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function We(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}function Je(e,r){var t=e.as,n=void 0===t?"div":t,o=e.children,a=e.className,c=e.style,i=e.wrapperClassName,l=e.wrapperStyle;return p(n,$($({},qe(e,ze)),{},{ref:r,className:"".concat(a||""," ").concat(i||"").trim()||null,style:$($({},c),l)}),o)}var C,Qe=y(Je);function Z(e){var r=L(null);return r.current=e,r}function z(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var l={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},Ye=[l.AUTO,l.LAZY,l.EAGER,l.UNLOAD],fe=(z(C={},l.AUTO,0),z(C,l.LAZY,1),z(C,l.EAGER,2),z(C,l.UNLOAD,3),C);function le(e,r){var t=fe[e]||0,n=fe[r]||0,o=Math.max(t,n);return Ye[o]}var pe,T={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"};function Ze(){return pe||(pe=ae({renderable:!0,playable:!0,loading:l.AUTO}))}function K(){return ue(Ze())}function me(e){return le(e,K().loading)}var Ke=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function de(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function B(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?de(Object(t),!0).forEach((function(r){Xe(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):de(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Xe(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function er(e,r){if(null==e)return{};var t,n,o=rr(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function rr(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var tr=function(){return!1},nr="about:blank",or=function(e){return e&&e!=nr&&!e.includes("#")};function ar(e,r){var t=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,c=e.name,i=e.title,u=e.matchesMessagingOrigin,s=void 0===u?tr:u,f=e.messageHandler,y=e.ready,O=void 0===y||y,b=e.loading,d=e.onReadyState,g=e.sandbox,m=e.src,v=er(e,Ke),w=K().playable,j=me(b),h=j!==l.UNLOAD,P=L(!1),S=Z(d),A=k((function(e){if(e!==P.current){P.current=e;var r=S.current;null==r||r(e?T.COMPLETE:T.LOADING)}}),[S]),E=L(null);return Q(r,(function(){return{get readyState(){return P.current?T.COMPLETE:T.LOADING},get node(){return E.current}}}),[]),H((function(){h||A(!1)}),[h,A]),ie((function(){var e=E.current;if(!w&&e){var r=e.src;if(or(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[w]),H((function(){var e=E.current;if(e&&h){var r=function(e){var r=E.current;!r||e.source!=r.contentWindow||!s(e.origin)||f(e)},t=e.ownerDocument.defaultView;return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}}),[s,f,h,O]),p(Y,B(B({},v),{},{layout:!0,size:!0,paint:!0}),h&&O&&p("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:j,name:c,onLoad:function(){return A(!0)},part:"iframe",ref:E,sandbox:g,scrolling:"no",src:m,style:B(B({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}var X=y(ar);X.displayName="IframeEmbed";var ve=Object.prototype,ft=ve.hasOwnProperty,lt=ve.toString;function ee(e){return e||{}}var q=Array.isArray,c=self.AMP_CONFIG||{},lr=("string"==typeof c.thirdPartyFrameRegex?new RegExp(c.thirdPartyFrameRegex):c.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,Oe=("string"==typeof c.cdnProxyRegex?new RegExp(c.cdnProxyRegex):c.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Ae(e){if(!self.document||!self.document.head||self.location&&Oe.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var pr={thirdParty:c.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:c.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:lr,cdn:c.cdnUrl||Ae("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:Oe,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:c.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:c.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:c.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:c.geoApiUrl||Ae("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var wn=self.__AMP_LOG;function Se(e){return e.data}function _e(e){return JSON.parse(e)}var mr=["captioned","requestResize","shortcode","title"];function Re(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function dr(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Re(Object(t),!0).forEach((function(r){vr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Re(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function vr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Pe(e,r){return xr(e)||hr(e,r)||yr(e,r)||gr()}function gr(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function yr(e,r){if(e){if("string"==typeof e)return we(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return we(e,r)}}function we(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function hr(e,r){var t=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=t){var n,o,a=[],c=!0,i=!1;try{for(t=t.call(e);!(c=(n=t.next()).done)&&(a.push(n.value),!r||a.length!==r);c=!0);}catch(e){i=!0,o=e}finally{try{!c&&null!=t.return&&t.return()}finally{if(i)throw o}}return a}}function xr(e){if(Array.isArray(e))return e}function Er(e,r){if(null==e)return{};var t,n,o=br(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(o[t]=e[t]))}return o}function br(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}var Or=ee(),Ar=function(e){return"https://www.instagram.com"===e};function Sr(e,r){var t=e.captioned,n=e.requestResize,o=e.shortcode,a=e.title,c=void 0===a?"Instagram":a,i=Er(e,mr),l=Pe(G(Or),2),u=l[0],s=l[1],f=Pe(G(0),2),y=f[0],O=f[1],b=k((function(e){var r=_e(Se(e));if("MEASURE"==r.type&&r.details){var t=r.details.height;n&&n(t),s(ee({height:t})),O(1)}}),[n]);return p(X,dr({allowTransparency:!0,iframeStyle:{opacity:y},matchesMessagingOrigin:Ar,messageHandler:b,ref:r,src:"https://www.instagram.com/p/"+encodeURIComponent(o)+"/embed/"+(t?"captioned/":"")+"?cr=1&v=12",title:c,wrapperStyle:u},i))}var Ie=y(Sr);Ie.displayName="Instagram";
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
//# sourceMappingURL=component-react.js.map
{
"name": "@ampproject/amp-instagram",
"version": "1.2106012301.0",
"version": "1.2106030132.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