@ampproject/amp-facebook
Advanced tools
Comparing version 1.2107140004.0 to 1.2107150011.0
@@ -1,3 +0,3 @@ | ||
var Tr=Object.create,te=Object.defineProperty,wr=Object.getOwnPropertyDescriptor,Mr=Object.getOwnPropertyNames,Cr=Object.getPrototypeOf,Lr=Object.prototype.hasOwnProperty,Me=function(e){return te(e,"__esModule",{value:!0})},jr=function(e,t){for(var r in Me(e),t)te(e,r,{get:t[r],enumerable:!0})},Ur=function(e,t,r){if(t&&"object"==typeof t||"function"==typeof t)for(var n,o=Mr(t),a=0,i=o.length;a<i;a++)n=o[a],!Lr.call(e,n)&&"default"!==n&&te(e,n,{get:function(e){return t[e]}.bind(null,n),enumerable:!(r=wr(t,n))||r.enumerable});return e},ne=function(e){return Ur(Me(te(null!=e?Tr(Cr(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};jr(exports,{Facebook:function(){return Nr}});var G=ne(require("preact")),Ce=ne(require("preact")),d=ne(require("preact/hooks"));function A(e,t,r){return G.createElement.apply(void 0,arguments)}function Le(e){return G.createContext(e,void 0)}function K(e){return d.useState(e)}function j(e){return d.useRef(e)}function oe(e,t){d.useEffect(e,t)}function U(e,t){d.useLayoutEffect(e,t)}function je(e){return d.useContext(e)}function de(e,t){return d.useMemo(e,t)}function ie(e,t){return d.useCallback(e,t)}function Z(e,t,r){return d.useImperativeHandle(e,t,r)}var ge=function(){return["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"]},ye=function(){return["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"]};function Ue(){var e=0;return function(){return String(++e)}}var ke=Object.prototype,sn=ke.hasOwnProperty,cn=ke.toString;function k(e){var t=Object.create(null);return e&&Object.assign(t,e),t}function w(e){return e||{}}function Be(e){return e.replace("-","_")}function He(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}var Y,ae=ne(require("preact/compat"));function T(e){return ae.forwardRef(e)}function ue(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var R={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},kr=[R.AUTO,R.LAZY,R.EAGER,R.UNLOAD],Ve=(ue(Y={},R.AUTO,0),ue(Y,R.LAZY,1),ue(Y,R.EAGER,2),ue(Y,R.UNLOAD,3),Y);function Ge(e,t){var r=Ve[e]||0,n=Ve[t]||0,o=Math.max(r,n);return kr[o]}var Q={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},Br=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function We(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?We(Object(r),!0).forEach((function(t){Hr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):We(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Hr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vr(e,t){if(null==e)return{};var r,n,o=Gr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function Gr(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var Wr=[null,"paint","layout","content","size","size paint","size layout","strict"],$r={position:"relative",width:"100%",height:"100%"};function zr(e,t){var r=e.as,n=void 0===r?"div":r,o=e.children,a=e.className,i=e.contentAs,c=void 0===i?"div":i,l=e.contentClassName,u=e.contentProps,s=e.contentRef,f=e.contentStyle,p=e.layout,y=void 0!==p&&p,d=e.paint,b=void 0!==d&&d,O=e.size,v=void 0!==O&&O,m=e.style,g=e.wrapperClassName,h=e.wrapperStyle,w=(v?4:0)+(y?2:0)+(b?1:0);return A(n,M(M({},Vr(e,Br)),{},{ref:t,className:"".concat(a||""," ").concat(g||"").trim()||null,style:M(M(M({},m),h),{},{contain:Wr[w]})}),A(c,M(M({},u),{},{ref:s,className:l,style:M(M({},v&&$r),{},{overflow:b?"hidden":"visible"},f)}),o))}var he=T(zr),Xr=["as","children","className","style","wrapperClassName","wrapperStyle"];function $e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$e(Object(r),!0).forEach((function(t){qr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$e(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function qr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jr(e,t){if(null==e)return{};var r,n,o=Kr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function Kr(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}function Yr(e,t){var r=e.as,n=void 0===r?"div":r,o=e.children,a=e.className,i=e.style,c=e.wrapperClassName,l=e.wrapperStyle;return A(n,se(se({},Jr(e,Xr)),{},{ref:t,className:"".concat(a||""," ").concat(c||"").trim()||null,style:se(se({},i),l)}),o)}var ze,Zr=T(Yr);function xe(e){var t=j(null);return t.current=e,t}function Qr(){return ze||(ze=Le({renderable:!0,playable:!0,loading:R.AUTO}))}function be(){return je(Qr())}function Xe(e){return Ge(e,be().loading)}var et=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach((function(t){rt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function rt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tt(e,t){if(null==e)return{};var r,n,o=nt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function nt(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var ot=function(){return!1},it="about:blank",at=function(e){return e&&e!=it&&!e.includes("#")};function ut(e,t){var r=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,c=e.title,l=e.matchesMessagingOrigin,u=void 0===l?ot:l,s=e.messageHandler,f=e.ready,p=void 0===f||f,y=e.loading,d=e.onReadyState,b=e.sandbox,O=e.src,v=tt(e,et),m=be().playable,g=Xe(y),h=g!==R.UNLOAD,w=j(!1),P=xe(d),S=ie((function(e){if(e!==w.current){w.current=e;var t=P.current;null==t||t(e?Q.COMPLETE:Q.LOADING)}}),[P]),_=j(null);return Z(t,(function(){return{get readyState(){return w.current?Q.COMPLETE:Q.LOADING},get node(){return _.current}}}),[]),U((function(){h||S(!1)}),[h,S]),oe((function(){var e=_.current;if(!m&&e){var t=e.src;if(at(t))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[m]),U((function(){var e=_.current;if(e&&h){var t=function(e){var t=_.current;!t||e.source!=t.contentWindow||!u(e.origin)||s(e)},r=e.ownerDocument.defaultView;return r.addEventListener("message",t),function(){return r.removeEventListener("message",t)}}}),[u,s,h,p]),A(he,ce(ce({},v),{},{layout:!0,size:!0,paint:!0}),h&&p&&A("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:g,name:i,onLoad:function(){return S(!0)},part:"iframe",ref:_,sandbox:b,scrolling:"no",src:O,style:ce(ce({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var Ee=T(ut);function le(){return!1}function ee(e){var t;if(!le())return!1;var r=e||self;return!!(null!==(t=r.AMP_CONFIG)&&void 0!==t&&t.test||r.__AMP_TEST||r.__karma__)}function ct(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ke(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function lt(e,t,r){return t&&Ke(e.prototype,t),r&&Ke(e,r),e}Ee.displayName="IframeEmbed";var Ye=function(){function e(t){ct(this,e),this.capacity_=t,this.size_=0,this.access_=0,this.cache_=k()}return lt(e,[{key:"has",value:function(e){return!!this.cache_[e]}},{key:"get",value:function(e){var t=this.cache_[e];if(t)return t.access=++this.access_,t.payload}},{key:"put",value:function(e,t){this.has(e)||this.size_++,this.cache_[e]={payload:t,access:this.access_},this.evict_()}},{key:"evict_",value:function(){if(!(this.size_<=this.capacity_)){var e,t=this.cache_,r=this.access_+1;for(var n in t){var o=t[n].access;o<r&&(r=o,e=n)}void 0!==e&&(delete t[e],this.size_--)}}}]),e}(),W=Array.isArray,ft=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function Ze(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(e)}catch(e){return t}}function fe(e){var t,r=k();if(!e)return r;for(;t=ft.exec(e);){var n=Ze(t[1],t[1]),o=t[2]?Ze(t[2].replace(/\+/g," "),t[2]):"";r[n]=o}return r}var O=self.AMP_CONFIG||{},pt=("string"==typeof O.thirdPartyFrameRegex?new RegExp(O.thirdPartyFrameRegex):O.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,Qe=("string"==typeof O.cdnProxyRegex?new RegExp(O.cdnProxyRegex):O.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function er(e){if(!self.document||!self.document.head||self.location&&Qe.test(self.location.origin))return null;var t=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return t&&t.getAttribute("content")||null}var B={thirdParty:O.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:O.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:pt,cdn:O.cdnUrl||er("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:Qe,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:O.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:O.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:O.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:O.geoApiUrl||er("amp-geo-api")};function $(){return"2107140004000"}var Se={OFF:0,ERROR:1,WARN:2,INFO:3,FINE:4};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var Ae=self.__AMP_LOG,cr=null;function z(){if(Ae.dev)return Ae.dev;if(!cr)throw new Error("failed to call initLogConstructor");return Ae.dev=new cr(self,(function(e){return e>=3?Se.FINE:e>=2?Se.INFO:Se.OFF}))}function pe(e,t,r,n,o,a,i,c,l,u,s){return e}var Oe,fr,oi=new Set(["c","v","a","ad"]);function _e(e,t){return Oe||(Oe=self.document.createElement("a"),fr=self.__AMP_URL_CACHE||(self.__AMP_URL_CACHE=new Ye(100))),yt(Oe,e,t?null:fr)}function yt(e,t,r){if(r&&r.has(t))return r.get(t);e.href=t,e.protocol||(e.href=e.href);var n,o={href:e.href,protocol:e.protocol,host:e.host,hostname:e.hostname,port:"0"==e.port?"":e.port,pathname:e.pathname,search:e.search,hash:e.hash,origin:null};"/"!==o.pathname[0]&&(o.pathname="/"+o.pathname),("http:"==o.protocol&&80==o.port||"https:"==o.protocol&&443==o.port)&&(o.port="",o.host=o.hostname),n=e.origin&&"null"!=e.origin?e.origin:"data:"!=o.protocol&&o.host?o.protocol+"//"+o.host:o.href,o.origin=n;var a=ee()&&Object.freeze?Object.freeze(o):o;return r&&r.put(t,a),a}function Pe(e){return JSON.parse(e)}function re(e,t){try{return Pe(e)}catch(e){return null==t||t(e),null}}function Fe(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ot(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{!i&&null!=r.return&&r.return()}finally{if(c)throw a}}}}function Ot(e,t){if(e){if("string"==typeof e)return mr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mr(e,t)}}function mr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function vr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vr(Object(r),!0).forEach((function(t){_t(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Pt="EXPERIMENTS",Ft="amp-experiment-toggles",me="__AMP__EXPERIMENT_TOGGLES";function gr(e,t){return!!yr(e)[t]}function yr(e){var t,r,n,o,a;if(e[me])return e[me];e[me]=k();var i=e[me],c=dr(dr({},null!==(t=e.AMP_CONFIG)&&void 0!==t?t:{}),null!==(r=e.AMP_EXP)&&void 0!==r?r:Pe((null===(n=e.__AMP_EXP)||void 0===n?void 0:n.textContent)||"{}"));for(var l in c){var u=c[l];"number"==typeof u&&u>=0&&u<=1&&(i[l]=Math.random()<u)}var s=null===(o=e.AMP_CONFIG)||void 0===o?void 0:o["allow-doc-opt-in"];if(W(s)&&s.length){var f=e.document.head.querySelector('meta[name="amp-experiments-opt-in"]');if(f){var p,y=Fe(f.getAttribute("content").split(","));try{for(y.s();!(p=y.n()).done;){var d=p.value;s.includes(d)&&(i[d]=!0)}}catch(e){y.e(e)}finally{y.f()}}}Object.assign(i,Rt(e));var b=null===(a=e.AMP_CONFIG)||void 0===a?void 0:a["allow-url-opt-in"];if(W(b)&&b.length){var O,v=fe(e.location.originalHash||e.location.hash),m=Fe(b);try{for(m.s();!(O=m.n()).done;){var g=O.value,h=v["e-".concat(g)];"1"==h&&(i[g]=!0),"0"==h&&(i[g]=!1)}}catch(e){m.e(e)}finally{m.f()}}return i}function Rt(e){var t,r="";try{"localStorage"in e&&(r=e.localStorage.getItem(Ft))}catch(e){z().warn(Pt,"Failed to retrieve experiments from localStorage.")}var n,o=(null===(t=r)||void 0===t?void 0:t.split(/\s*,\s*/g))||[],a=k(),i=Fe(o);try{for(i.s();!(n=i.n()).done;){var c=n.value;!c||("-"==c[0]?a[c.substr(1)]=!1:a[c]=!0)}}catch(e){i.e(e)}finally{i.f()}return a}function hr(e,t){return gr(t,"3p-vendor-split")?"".concat(B.thirdParty,"/").concat($(),"/vendor/").concat(e,".js"):"".concat(B.thirdParty,"/").concat($(),"/f.js")}function xr(e,t){var r=t||"frame";return e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||Nt(e),"https://"+e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+".".concat(B.thirdPartyFrameHost,"/").concat($(),"/")+"".concat(r,".html")}function Nt(e){return"d-"+br(e)}function br(e){var t;if(e.crypto&&e.crypto.getRandomValues){var r=new Uint32Array(2);e.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(e.Math.random()).substr(2)+"0";return t}function Er(e){for(var t=0,r=e;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+br(e)}var It=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function Sr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Dt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Sr(Object(r),!0).forEach((function(t){Tt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Tt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wt(e,t){return jt(e)||Lt(e,t)||Ct(e,t)||Mt()}function Mt(){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 Ct(e,t){if(e){if("string"==typeof e)return Ar(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ar(e,t)}}function Ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Lt(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{!i&&null!=r.return&&r.return()}finally{if(c)throw o}}return a}}function jt(e){if(Array.isArray(e))return e}function Ut(e,t){if(null==e)return{};var r,n,o=kt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function kt(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var Re={},Or={EMBED_SIZE:"embed-size"},Ne="sync-xhr 'none'",Bt=ge().join(" ")+" "+ye().join(" ");function Ht(e,t){var r=e.allow,n=void 0===r?Ne:r,o=e.bootstrap,a=e.contextOptions,i=e.excludeSandbox,c=e.name,l=e.messageHandler,u=e.options,s=e.sandbox,f=void 0===s?Bt:s,p=e.src,y=e.type,d=e.title,b=void 0===d?y:d,O=Ut(e,It);if(!He(n,Ne))throw new Error("'allow' prop must contain \"".concat(Ne,'". Found "').concat(n,'".'));var v=j(null),m=j(null),g=de((function(){return Re[y]||(Re[y]=Ue()),Re[y]()}),[y]),h=wt(K({name:c,src:p}),2),P=h[0],S=P.name,_=P.src,E=h[1];return U((function(){var e,t,r=null===(e=v.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView,n=null!=p?p:r?xr(r):"about:blank";if(c)E({name:c,src:n});else if(r){var i=Object.assign(w({location:{href:r.location.href},sentinel:Er(r)}),a),l=Object.assign(w({title:b,type:y,_context:i}),u);E({name:JSON.stringify(w({host:_e(n).hostname,bootstrap:null!=o?o:hr(y,r),type:y,count:g,attributes:l})),src:n})}}),[o,a,g,c,u,p,b,y]),oe((function(){var e,t=null===(e=m.current)||void 0===e?void 0:e.node;t&&t.parentNode.insertBefore(t,t.nextSibling)}),[S]),Z(t,(function(){return{get readyState(){var e;return null===(e=m.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=m.current)||void 0===e?void 0:e.node}}}),[]),A(Ee,Dt({allow:n,contentRef:v,messageHandler:l,name:S,ref:m,ready:!!S,sandbox:i?void 0:f,src:_,title:b},O))}var Ie=T(Ht);Ie.displayName="ProxyIframeEmbed";var Vt="amp-";function _r(e){if(!Gt(e))return null;var t=e.indexOf("{");return pe(-1!=t),re(e.substr(t),(function(t){return z().error("MESSAGING","Failed to parse message: "+e,t)}))}function Gt(e){return"string"==typeof e&&0==e.indexOf(Vt)&&-1!=e.indexOf("{")}var Wt=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function Pr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pr(Object(r),!0).forEach((function(t){$t(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fr(e,t){return Jt(e)||qt(e,t)||Xt(e,t)||zt()}function zt(){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 Xt(e,t){if(e){if("string"==typeof e)return Rr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rr(e,t)}}function Rr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function qt(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{!i&&null!=r.return&&r.return()}finally{if(c)throw o}}return a}}function Jt(e){if(Array.isArray(e))return e}function Kt(e,t){if(null==e)return{};var r,n,o=Yt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function Yt(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var Zt="facebook",Qt="100%",en=function(){return!0},rn="Facebook comments";function tn(e,t){var r=e.action,n=e.colorscheme,o=e.embedAs,a=e.hideCover,i=e.hideCta,c=e.href,l=e.includeCommentParent,u=e.kdSite,s=e.layout,f=e.locale,p=e.numPosts,y=e.onReady,d=e.orderBy,b=e.refLabel,O=e.requestResize,v=e.share,m=e.showFacepile,g=e.showText,h=e.size,w=e.smallHeader,j=e.style,P=e.tabs,S=e.title,_=void 0===S?rn:S,E=Kt(e,Wt),x=Fr(K(null),2),R=x[0],M=x[1],N=ie((function(e){var t,r=null!==(t=re(e.data))&&void 0!==t?t:_r(e.data);if("ready"==r.action&&(null==y||y()),r.type==Or.EMBED_SIZE){var n=r.height;O?(O(n),M(Qt)):M(n)}}),[O,y]),D=Fr(K(f),2),I=D[0],F=D[1];return U((function(){var e,r;if(f)F(f);else{var n=null==t||null===(e=t.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView;!n||F(Be(n.navigator.language))}}),[f,t]),A(Ie,ve(ve({options:{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:i,href:c,includeCommentParent:l,kd_site:u,layout:s,locale:I,numPosts:p,orderBy:d,ref:b,share:v,showFacepile:m,showText:g,size:h,smallHeader:w,tabs:P},ref:t,title:_},E),{},{excludeSandbox:!0,matchesMessagingOrigin:en,messageHandler:N,type:Zt,style:R?ve(ve({},j),{},{height:R}):j}))}var Nr=T(tn);Nr.displayName="Facebook"; | ||
var Or=Object.create,te=Object.defineProperty,_r=Object.getOwnPropertyDescriptor,Pr=Object.getOwnPropertyNames,Fr=Object.getPrototypeOf,Rr=Object.prototype.hasOwnProperty,Ie=function(e){return te(e,"__esModule",{value:!0})},Nr=function(e,r){for(var t in Ie(e),r)te(e,t,{get:r[t],enumerable:!0})},Ir=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=Pr(r),a=0,i=o.length;a<i;a++)n=o[a],!Rr.call(e,n)&&"default"!==n&&te(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=_r(r,n))||t.enumerable});return e},ne=function(e){return Ir(Ie(te(null!=e?Or(Fr(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};Nr(exports,{Facebook:function(){return Er}});var H=ne(require("preact")),De=ne(require("preact")),p=ne(require("preact/hooks"));function g(e,r,t){return H.createElement.apply(void 0,arguments)}function Te(e){return H.createContext(e,void 0)}function z(e){return p.useState(e)}function j(e){return p.useRef(e)}function oe(e,r){p.useEffect(e,r)}function U(e,r){p.useLayoutEffect(e,r)}function we(e){return p.useContext(e)}function me(e,r){return p.useMemo(e,r)}function ie(e,r){return p.useCallback(e,r)}function K(e,r,t){return p.useImperativeHandle(e,r,t)}var ve=function(){return["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"]},de=function(){return["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"]};function Me(){var e=0;return function(){return String(++e)}}var Ce=Object.prototype,Xt=Ce.hasOwnProperty,qt=Ce.toString;function Y(e){var r=Object.create(null);return e&&Object.assign(r,e),r}function D(e){return e||{}}function Le(e){return e.replace("-","_")}function je(e,r,t){return"number"!=typeof t&&(t=0),!(t+r.length>e.length)&&-1!==e.indexOf(r,t)}var X,ae=ne(require("preact/compat"));function F(e){return ae.forwardRef(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}var x={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},Dr=[x.AUTO,x.LAZY,x.EAGER,x.UNLOAD],Ue=(ue(X={},x.AUTO,0),ue(X,x.LAZY,1),ue(X,x.EAGER,2),ue(X,x.UNLOAD,3),X);function ke(e,r){var t=Ue[e]||0,n=Ue[r]||0,o=Math.max(t,n);return Dr[o]}var Z={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},Tr=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function Be(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 T(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Be(Object(t),!0).forEach((function(r){wr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Be(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function wr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Mr(e,r){if(null==e)return{};var t,n,o=Cr(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 Cr(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 Lr=[null,"paint","layout","content","size","size paint","size layout","strict"],jr={position:"relative",width:"100%",height:"100%"};function Ur(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,s=e.contentRef,f=e.contentStyle,p=e.layout,y=void 0!==p&&p,d=e.paint,b=void 0!==d&&d,O=e.size,m=void 0!==O&&O,v=e.style,h=e.wrapperClassName,w=e.wrapperStyle,j=(m?4:0)+(y?2:0)+(b?1:0);return g(n,T(T({},Mr(e,Tr)),{},{ref:r,className:"".concat(a||""," ").concat(h||"").trim()||null,style:T(T(T({},v),w),{},{contain:Lr[j]})}),g(c,T(T({},u),{},{ref:s,className:l,style:T(T({},m&&jr),{},{overflow:b?"hidden":"visible"},f)}),o))}var ge=F(Ur),kr=["as","children","className","style","wrapperClassName","wrapperStyle"];function He(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 se(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?He(Object(t),!0).forEach((function(r){Br(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):He(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Br(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Hr(e,r){if(null==e)return{};var t,n,o=Vr(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 Vr(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 Gr(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 g(n,se(se({},Hr(e,kr)),{},{ref:r,className:"".concat(a||""," ").concat(c||"").trim()||null,style:se(se({},i),l)}),o)}var Ve,Wr=F(Gr);function ye(e){var r=j(null);return r.current=e,r}function $r(){return Ve||(Ve=Te({renderable:!0,playable:!0,loading:x.AUTO}))}function he(){return we($r())}function Ge(e){return ke(e,he().loading)}var zr=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function We(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 ce(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?We(Object(t),!0).forEach((function(r){Xr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):We(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Xr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function qr(e,r){if(null==e)return{};var t,n,o=Jr(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 Jr(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 Kr=function(){return!1},Yr="about:blank",Zr=function(e){return e&&e!=Yr&&!e.includes("#")};function Qr(e,r){var t=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,c=e.title,l=e.matchesMessagingOrigin,u=void 0===l?Kr:l,s=e.messageHandler,f=e.ready,p=void 0===f||f,y=e.loading,d=e.onReadyState,b=e.sandbox,O=e.src,m=qr(e,zr),v=he().playable,h=Ge(y),w=h!==x.UNLOAD,P=j(!1),S=ye(d),_=ie((function(e){if(e!==P.current){P.current=e;var r=S.current;null==r||r(e?Z.COMPLETE:Z.LOADING)}}),[S]),E=j(null);return K(r,(function(){return{get readyState(){return P.current?Z.COMPLETE:Z.LOADING},get node(){return E.current}}}),[]),U((function(){w||_(!1)}),[w,_]),oe((function(){var e=E.current;if(!v&&e){var r=e.src;if(Zr(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[v]),U((function(){var e=E.current;if(e&&w){var r=function(e){var r=E.current;!r||e.source!=r.contentWindow||!u(e.origin)||s(e)},t=e.ownerDocument.defaultView;return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}}),[u,s,w,p]),g(ge,ce(ce({},m),{},{layout:!0,size:!0,paint:!0}),w&&p&&g("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:h,name:i,onLoad:function(){return _(!0)},part:"iframe",ref:E,sandbox:b,scrolling:"no",src:O,style:ce(ce({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var xe=F(Qr);xe.displayName="IframeEmbed";var y=self.AMP_CONFIG||{},et=("string"==typeof y.thirdPartyFrameRegex?new RegExp(y.thirdPartyFrameRegex):y.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,$e=("string"==typeof y.cdnProxyRegex?new RegExp(y.cdnProxyRegex):y.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function ze(e){if(!self.document||!self.document.head||self.location&&$e.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var V={thirdParty:y.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:y.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:et,cdn:y.cdnUrl||ze("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:$e,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:y.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:y.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:y.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:y.geoApiUrl||ze("amp-geo-api")};function le(){return!1}function Q(e){var r;if(!le())return!1;var t=e||self;return!!(null!==(r=t.AMP_CONFIG)&&void 0!==r&&r.test||t.__AMP_TEST||t.__karma__)}var ee=Array.isArray;function tr(e){return JSON.parse(e)}function re(e,r){try{return tr(e)}catch(e){return null==r||r(e),null}}function q(){return"2107150011000"}var be={OFF:0,ERROR:1,WARN:2,INFO:3,FINE:4};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var Ee=self.__AMP_LOG,ir=null;function J(){if(Ee.dev)return Ee.dev;if(!ir)throw new Error("failed to call initLogConstructor");return Ee.dev=new ir(self,(function(e){return e>=3?be.FINE:e>=2?be.INFO:be.OFF}))}function fe(e,r,t,n,o,a,i,c,l,u,s){return e}function pt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function ur(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function mt(e,r,t){return r&&ur(e.prototype,r),t&&ur(e,t),e}var Se,cr,sr=function(){function e(r){pt(this,e),this.capacity_=r,this.size_=0,this.access_=0,this.cache_=Y()}return mt(e,[{key:"has",value:function(e){return!!this.cache_[e]}},{key:"get",value:function(e){var r=this.cache_[e];if(r)return r.access=++this.access_,r.payload}},{key:"put",value:function(e,r){this.has(e)||this.size_++,this.cache_[e]={payload:r,access:this.access_},this.evict_()}},{key:"evict_",value:function(){if(!(this.size_<=this.capacity_)){var e,r=this.cache_,t=this.access_+1;for(var n in r){var o=r[n].access;o<t&&(t=o,e=n)}void 0!==e&&(delete r[e],this.size_--)}}}]),e}(),Va=new Set(["c","v","a","ad"]);function Ae(e,r){return Se||(Se=self.document.createElement("a"),cr=self.__AMP_URL_CACHE||(self.__AMP_URL_CACHE=new sr(100))),vt(Se,e,r?null:cr)}function vt(e,r,t){if(t&&t.has(r))return t.get(r);e.href=r,e.protocol||(e.href=e.href);var n,o={href:e.href,protocol:e.protocol,host:e.host,hostname:e.hostname,port:"0"==e.port?"":e.port,pathname:e.pathname,search:e.search,hash:e.hash,origin:null};"/"!==o.pathname[0]&&(o.pathname="/"+o.pathname),("http:"==o.protocol&&80==o.port||"https:"==o.protocol&&443==o.port)&&(o.port="",o.host=o.hostname),n=e.origin&&"null"!=e.origin?e.origin:"data:"!=o.protocol&&o.host?o.protocol+"//"+o.host:o.href,o.origin=n;var a=Q()&&Object.freeze?Object.freeze(o):o;return t&&t.put(r,a),a}function lr(e){return"".concat(V.thirdParty,"/").concat(q(),"/vendor/").concat(e).concat(".js")}function fr(e,r){var t=r||"frame";return e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||dt(e),"https://"+e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+".".concat(V.thirdPartyFrameHost,"/").concat(q(),"/")+"".concat(t,".html")}function dt(e){return"d-"+pr(e)}function pr(e){var r;if(e.crypto&&e.crypto.getRandomValues){var t=new Uint32Array(2);e.crypto.getRandomValues(t),r=String(t[0])+t[1]}else r=String(e.Math.random()).substr(2)+"0";return r}function mr(e){for(var r=0,t=e;t&&t!=t.parent;t=t.parent)r++;return String(r)+"-"+pr(e)}var gt=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function vr(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 yt(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?vr(Object(t),!0).forEach((function(r){ht(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vr(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function ht(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function xt(e,r){return At(e)||St(e,r)||Et(e,r)||bt()}function bt(){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 Et(e,r){if(e){if("string"==typeof e)return dr(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 dr(e,r)}}function dr(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 St(e,r){var t=null==e?null:"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 At(e){if(Array.isArray(e))return e}function Ot(e,r){if(null==e)return{};var t,n,o=_t(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 _t(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 Oe={},gr={EMBED_SIZE:"embed-size"},_e="sync-xhr 'none'",Pt=ve().join(" ")+" "+de().join(" ");function Ft(e,r){var t=e.allow,n=void 0===t?_e:t,o=e.bootstrap,a=e.contextOptions,i=e.excludeSandbox,c=e.name,l=e.messageHandler,u=e.options,s=e.sandbox,f=void 0===s?Pt:s,p=e.src,y=e.type,d=e.title,b=void 0===d?y:d,O=Ot(e,gt);if(!je(n,_e))throw new Error("'allow' prop must contain \"".concat(_e,'". Found "').concat(n,'".'));var m=j(null),v=j(null),h=me((function(){return Oe[y]||(Oe[y]=Me()),Oe[y]()}),[y]),w=xt(z({name:c,src:p}),2),P=w[0],S=P.name,x=P.src,_=w[1];return U((function(){var e,r,t=null===(e=m.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView,n=null!=p?p:t?fr(t):"about:blank";if(c)_({name:c,src:n});else if(t){var i=Object.assign(D({location:{href:t.location.href},sentinel:mr(t)}),a),l=Object.assign(D({title:b,type:y,_context:i}),u);_({name:JSON.stringify(D({host:Ae(n).hostname,bootstrap:null!=o?o:lr(y),type:y,count:h,attributes:l})),src:n})}}),[o,a,h,c,u,p,b,y]),oe((function(){var e,r=null===(e=v.current)||void 0===e?void 0:e.node;r&&r.parentNode.insertBefore(r,r.nextSibling)}),[S]),K(r,(function(){return{get readyState(){var e;return null===(e=v.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=v.current)||void 0===e?void 0:e.node}}}),[]),g(xe,yt({allow:n,contentRef:m,messageHandler:l,name:S,ref:v,ready:!!S,sandbox:i?void 0:f,src:x,title:b},O))}var Pe=F(Ft);Pe.displayName="ProxyIframeEmbed";var Rt="amp-";function yr(e){if(!Nt(e))return null;var r=e.indexOf("{");return fe(-1!=r),re(e.substr(r),(function(r){return J().error("MESSAGING","Failed to parse message: "+e,r)}))}function Nt(e){return"string"==typeof e&&0==e.indexOf(Rt)&&-1!=e.indexOf("{")}var It=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function hr(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 pe(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?hr(Object(t),!0).forEach((function(r){Dt(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hr(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Dt(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function xr(e,r){return Ct(e)||Mt(e,r)||wt(e,r)||Tt()}function Tt(){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 wt(e,r){if(e){if("string"==typeof e)return br(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 br(e,r)}}function br(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 Mt(e,r){var t=null==e?null:"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 Ct(e){if(Array.isArray(e))return e}function Lt(e,r){if(null==e)return{};var t,n,o=jt(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 jt(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 Ut="facebook",kt="100%",Bt=function(){return!0},Ht="Facebook comments";function Vt(e,r){var t=e.action,n=e.colorscheme,o=e.embedAs,a=e.hideCover,i=e.hideCta,c=e.href,l=e.includeCommentParent,u=e.kdSite,s=e.layout,f=e.locale,p=e.numPosts,y=e.onReady,d=e.orderBy,b=e.refLabel,O=e.requestResize,m=e.share,v=e.showFacepile,h=e.showText,w=e.size,j=e.smallHeader,P=e.style,S=e.tabs,x=e.title,_=void 0===x?Ht:x,E=Lt(e,It),A=xr(z(null),2),D=A[0],R=A[1],N=ie((function(e){var r,t=null!==(r=re(e.data))&&void 0!==r?r:yr(e.data);if("ready"==t.action&&(null==y||y()),t.type==gr.EMBED_SIZE){var n=t.height;O?(O(n),R(kt)):R(n)}}),[O,y]),T=xr(z(f),2),F=T[0],I=T[1];return U((function(){var e,t;if(f)I(f);else{var n=null==r||null===(e=r.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;!n||I(Le(n.navigator.language))}}),[f,r]),g(Pe,pe(pe({options:{action:t,colorscheme:n,embedAs:o,hideCover:a,hideCta:i,href:c,includeCommentParent:l,kd_site:u,layout:s,locale:F,numPosts:p,orderBy:d,ref:b,share:m,showFacepile:v,showText:h,size:w,smallHeader:j,tabs:S},ref:r,title:_},E),{},{excludeSandbox:!0,matchesMessagingOrigin:Bt,messageHandler:N,type:Ut,style:D?pe(pe({},P),{},{height:D}):P}))}var Er=F(Vt);Er.displayName="Facebook"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-preact.js.map |
@@ -418,2 +418,30 @@ var __create = Object.create; | ||
// src/config.js | ||
var env = self.AMP_CONFIG || {}; | ||
var thirdPartyFrameRegex = (typeof env["thirdPartyFrameRegex"] == "string" ? new RegExp(env["thirdPartyFrameRegex"]) : env["thirdPartyFrameRegex"]) || /^d-\d+\.ampproject\.net$/; | ||
var cdnProxyRegex = (typeof env["cdnProxyRegex"] == "string" ? new RegExp(env["cdnProxyRegex"]) : env["cdnProxyRegex"]) || /^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/; | ||
function getMetaUrl(name) { | ||
if (!self.document || !self.document.head) { | ||
return null; | ||
} | ||
if (self.location && cdnProxyRegex.test(self.location.origin)) { | ||
return null; | ||
} | ||
var metaEl = self.document.head.querySelector('meta[name="' + name + '"]'); | ||
return metaEl && metaEl.getAttribute("content") || null; | ||
} | ||
var urls = { | ||
thirdParty: env["thirdPartyUrl"] || "https://3p.ampproject.net", | ||
thirdPartyFrameHost: env["thirdPartyFrameHost"] || "ampproject.net", | ||
thirdPartyFrameRegex: thirdPartyFrameRegex, | ||
cdn: env["cdnUrl"] || getMetaUrl("runtime-host") || "https://cdn.ampproject.org", | ||
cdnProxyRegex: cdnProxyRegex, | ||
localhostRegex: /^https?:\/\/localhost(:\d+)?$/, | ||
errorReporting: env["errorReportingUrl"] || "https://us-central1-amp-error-reporting.cloudfunctions.net/r", | ||
betaErrorReporting: env["betaErrorReportingUrl"] || "https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta", | ||
localDev: env["localDev"] || false, | ||
trustedViewerHosts: [/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/, /(^|\.)gmail\.(com|dev)$/], | ||
geoApi: env["geoApiUrl"] || getMetaUrl("amp-geo-api") | ||
}; | ||
// src/core/mode/for-testing.js | ||
@@ -445,88 +473,18 @@ function isFortesting() { | ||
// src/core/data-structures/lru-cache.js | ||
function _classCallCheck(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) { | ||
throw new TypeError("Cannot call a class as a function"); | ||
} | ||
// src/core/types/array.js | ||
var isArray = Array.isArray; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) | ||
descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) | ||
_defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) | ||
_defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
var LruCache = /* @__PURE__ */ function() { | ||
function LruCache2(capacity) { | ||
_classCallCheck(this, LruCache2); | ||
this.capacity_ = capacity; | ||
this.size_ = 0; | ||
this.access_ = 0; | ||
this.cache_ = map(); | ||
} | ||
_createClass(LruCache2, [{ | ||
key: "has", | ||
value: function has(key) { | ||
return !!this.cache_[key]; | ||
} | ||
}, { | ||
key: "get", | ||
value: function get(key) { | ||
var cacheable = this.cache_[key]; | ||
if (cacheable) { | ||
cacheable.access = ++this.access_; | ||
return cacheable.payload; | ||
} | ||
return void 0; | ||
} | ||
}, { | ||
key: "put", | ||
value: function put(key, payload) { | ||
if (!this.has(key)) { | ||
this.size_++; | ||
} | ||
this.cache_[key] = { | ||
payload: payload, | ||
access: this.access_ | ||
}; | ||
this.evict_(); | ||
} | ||
}, { | ||
key: "evict_", | ||
value: function evict_() { | ||
if (this.size_ <= this.capacity_) { | ||
return; | ||
} | ||
var cache = this.cache_; | ||
var oldest = this.access_ + 1; | ||
var oldestKey; | ||
for (var key in cache) { | ||
var access = cache[key].access; | ||
if (access < oldest) { | ||
oldest = access; | ||
oldestKey = key; | ||
} | ||
} | ||
if (oldestKey !== void 0) { | ||
delete cache[oldestKey]; | ||
this.size_--; | ||
} | ||
} | ||
}]); | ||
return LruCache2; | ||
}(); | ||
// src/core/types/array.js | ||
var isArray = Array.isArray; | ||
// src/core/types/string/url.js | ||
@@ -558,33 +516,5 @@ var QUERY_STRING_REGEX = /(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g; | ||
// src/config.js | ||
var env = self.AMP_CONFIG || {}; | ||
var thirdPartyFrameRegex = (typeof env["thirdPartyFrameRegex"] == "string" ? new RegExp(env["thirdPartyFrameRegex"]) : env["thirdPartyFrameRegex"]) || /^d-\d+\.ampproject\.net$/; | ||
var cdnProxyRegex = (typeof env["cdnProxyRegex"] == "string" ? new RegExp(env["cdnProxyRegex"]) : env["cdnProxyRegex"]) || /^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/; | ||
function getMetaUrl(name) { | ||
if (!self.document || !self.document.head) { | ||
return null; | ||
} | ||
if (self.location && cdnProxyRegex.test(self.location.origin)) { | ||
return null; | ||
} | ||
var metaEl = self.document.head.querySelector('meta[name="' + name + '"]'); | ||
return metaEl && metaEl.getAttribute("content") || null; | ||
} | ||
var urls = { | ||
thirdParty: env["thirdPartyUrl"] || "https://3p.ampproject.net", | ||
thirdPartyFrameHost: env["thirdPartyFrameHost"] || "ampproject.net", | ||
thirdPartyFrameRegex: thirdPartyFrameRegex, | ||
cdn: env["cdnUrl"] || getMetaUrl("runtime-host") || "https://cdn.ampproject.org", | ||
cdnProxyRegex: cdnProxyRegex, | ||
localhostRegex: /^https?:\/\/localhost(:\d+)?$/, | ||
errorReporting: env["errorReportingUrl"] || "https://us-central1-amp-error-reporting.cloudfunctions.net/r", | ||
betaErrorReporting: env["betaErrorReportingUrl"] || "https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta", | ||
localDev: env["localDev"] || false, | ||
trustedViewerHosts: [/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/, /(^|\.)gmail\.(com|dev)$/], | ||
geoApi: env["geoApiUrl"] || getMetaUrl("amp-geo-api") | ||
}; | ||
// src/internal-version.js | ||
function internalRuntimeVersion() { | ||
return "2107140004000"; | ||
return "2107150011000"; | ||
} | ||
@@ -659,3 +589,3 @@ | ||
} | ||
function devAssert(shouldBeTrueish, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9) { | ||
function devAssert2(shouldBeTrueish, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9) { | ||
if (getMode().minified) { | ||
@@ -670,2 +600,85 @@ return shouldBeTrueish; | ||
// src/core/data-structures/lru-cache.js | ||
function _classCallCheck(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) { | ||
throw new TypeError("Cannot call a class as a function"); | ||
} | ||
} | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) | ||
descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) | ||
_defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) | ||
_defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
var LruCache = /* @__PURE__ */ function() { | ||
function LruCache2(capacity) { | ||
_classCallCheck(this, LruCache2); | ||
this.capacity_ = capacity; | ||
this.size_ = 0; | ||
this.access_ = 0; | ||
this.cache_ = map(); | ||
} | ||
_createClass(LruCache2, [{ | ||
key: "has", | ||
value: function has(key) { | ||
return !!this.cache_[key]; | ||
} | ||
}, { | ||
key: "get", | ||
value: function get(key) { | ||
var cacheable = this.cache_[key]; | ||
if (cacheable) { | ||
cacheable.access = ++this.access_; | ||
return cacheable.payload; | ||
} | ||
return void 0; | ||
} | ||
}, { | ||
key: "put", | ||
value: function put(key, payload) { | ||
if (!this.has(key)) { | ||
this.size_++; | ||
} | ||
this.cache_[key] = { | ||
payload: payload, | ||
access: this.access_ | ||
}; | ||
this.evict_(); | ||
} | ||
}, { | ||
key: "evict_", | ||
value: function evict_() { | ||
if (this.size_ <= this.capacity_) { | ||
return; | ||
} | ||
var cache = this.cache_; | ||
var oldest = this.access_ + 1; | ||
var oldestKey; | ||
for (var key in cache) { | ||
var access = cache[key].access; | ||
if (access < oldest) { | ||
oldest = access; | ||
oldestKey = key; | ||
} | ||
} | ||
if (oldestKey !== void 0) { | ||
delete cache[oldestKey]; | ||
this.size_--; | ||
} | ||
} | ||
}]); | ||
return LruCache2; | ||
}(); | ||
// src/url.js | ||
@@ -733,156 +746,11 @@ var SERVING_TYPE_PREFIX = new Set([ | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/experiments/index.js | ||
function _createForOfIteratorHelperLoose(o, allowArrayLike) { | ||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; | ||
if (it) | ||
return (it = it.call(o)).next.bind(it); | ||
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { | ||
if (it) | ||
o = it; | ||
var i = 0; | ||
return function() { | ||
if (i >= o.length) | ||
return { done: true }; | ||
return { done: false, value: o[i++] }; | ||
}; | ||
} | ||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) | ||
return; | ||
if (typeof o === "string") | ||
return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) | ||
n = o.constructor.name; | ||
if (n === "Map" || n === "Set") | ||
return Array.from(o); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) | ||
return _arrayLikeToArray(o, minLen); | ||
} | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) | ||
len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) { | ||
arr2[i] = arr[i]; | ||
} | ||
return arr2; | ||
} | ||
function _extends4() { | ||
_extends4 = Object.assign || function(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends4.apply(this, arguments); | ||
} | ||
var TAG = "EXPERIMENTS"; | ||
var LOCAL_STORAGE_KEY = "amp-experiment-toggles"; | ||
var TOGGLES_WINDOW_PROPERTY = "__AMP__EXPERIMENT_TOGGLES"; | ||
function isExperimentOn(win, experimentId) { | ||
var toggles = experimentToggles(win); | ||
return !!toggles[experimentId]; | ||
} | ||
function experimentToggles(win) { | ||
var _win$AMP_CONFIG3, _win$AMP_EXP, _win$__AMP_EXP, _win$AMP_CONFIG4, _win$AMP_CONFIG5; | ||
if (win[TOGGLES_WINDOW_PROPERTY]) { | ||
return win[TOGGLES_WINDOW_PROPERTY]; | ||
} | ||
win[TOGGLES_WINDOW_PROPERTY] = map(); | ||
var toggles = win[TOGGLES_WINDOW_PROPERTY]; | ||
var buildExperimentConfigs = _extends4({}, (_win$AMP_CONFIG3 = win.AMP_CONFIG) != null ? _win$AMP_CONFIG3 : {}, (_win$AMP_EXP = win.AMP_EXP) != null ? _win$AMP_EXP : parseJson(((_win$__AMP_EXP = win.__AMP_EXP) == null ? void 0 : _win$__AMP_EXP.textContent) || "{}")); | ||
for (var experimentId in buildExperimentConfigs) { | ||
var frequency = buildExperimentConfigs[experimentId]; | ||
if (typeof frequency === "number" && frequency >= 0 && frequency <= 1) { | ||
toggles[experimentId] = Math.random() < frequency; | ||
} | ||
} | ||
var allowedDocOptIn = (_win$AMP_CONFIG4 = win.AMP_CONFIG) == null ? void 0 : _win$AMP_CONFIG4["allow-doc-opt-in"]; | ||
if (isArray(allowedDocOptIn) && allowedDocOptIn.length) { | ||
var meta = win.document.head.querySelector('meta[name="amp-experiments-opt-in"]'); | ||
if (meta) { | ||
var optedInExperiments = meta.getAttribute("content").split(","); | ||
for (var _iterator = _createForOfIteratorHelperLoose(optedInExperiments), _step; !(_step = _iterator()).done; ) { | ||
var experiment = _step.value; | ||
if (dev().assertArray(allowedDocOptIn).includes(experiment)) { | ||
toggles[experiment] = true; | ||
} | ||
} | ||
} | ||
} | ||
Object.assign(toggles, getExperimentToggles(win)); | ||
var allowedUrlOptIn = (_win$AMP_CONFIG5 = win.AMP_CONFIG) == null ? void 0 : _win$AMP_CONFIG5["allow-url-opt-in"]; | ||
if (isArray(allowedUrlOptIn) && allowedUrlOptIn.length) { | ||
var hash = win.location["originalHash"] || win.location.hash; | ||
var params = parseQueryString(hash); | ||
for (var _iterator2 = _createForOfIteratorHelperLoose(allowedUrlOptIn), _step2; !(_step2 = _iterator2()).done; ) { | ||
var _experiment = _step2.value; | ||
var param = params["e-" + _experiment]; | ||
if (param == "1") { | ||
toggles[_experiment] = true; | ||
} | ||
if (param == "0") { | ||
toggles[_experiment] = false; | ||
} | ||
} | ||
} | ||
return toggles; | ||
} | ||
function getExperimentToggles(win) { | ||
var _experimentsString; | ||
var experimentsString = ""; | ||
try { | ||
if ("localStorage" in win) { | ||
experimentsString = win.localStorage.getItem(LOCAL_STORAGE_KEY); | ||
} | ||
} catch (_unused) { | ||
dev().warn(TAG, "Failed to retrieve experiments from localStorage."); | ||
} | ||
var tokens = ((_experimentsString = experimentsString) == null ? void 0 : _experimentsString.split(/\s*,\s*/g)) || []; | ||
var toggles = map(); | ||
for (var _iterator3 = _createForOfIteratorHelperLoose(tokens), _step3; !(_step3 = _iterator3()).done; ) { | ||
var token = _step3.value; | ||
if (!token) { | ||
continue; | ||
} | ||
if (token[0] == "-") { | ||
toggles[token.substr(1)] = false; | ||
} else { | ||
toggles[token] = true; | ||
} | ||
} | ||
return toggles; | ||
} | ||
// src/3p-frame.js | ||
var overrideBootstrapBaseUrl; | ||
function getBootstrapUrl(type, win) { | ||
function getBootstrapUrl(type) { | ||
var extension = false ? ".mjs" : ".js"; | ||
if (getMode().localDev || getMode().test) { | ||
var filename = getMode().minified ? "./vendor/" + type + "." : "./vendor/" + type + ".max."; | ||
return false ? filename + "mjs" : filename + "js"; | ||
var filename = getMode().minified ? "./vendor/" + type : "./vendor/" + type + ".max"; | ||
return filename + extension; | ||
} | ||
if (isExperimentOn(win, "3p-vendor-split")) { | ||
return false ? urls.thirdParty + "/" + internalRuntimeVersion() + "/vendor/" + type + ".mjs" : urls.thirdParty + "/" + internalRuntimeVersion() + "/vendor/" + type + ".js"; | ||
} | ||
return urls.thirdParty + "/" + internalRuntimeVersion() + "/f.js"; | ||
return urls.thirdParty + "/" + internalRuntimeVersion() + "/vendor/" + type + extension; | ||
} | ||
@@ -931,4 +799,4 @@ function getDefaultBootstrapBaseUrl(parentWindow, opt_srcFileBasename) { | ||
var _excluded4 = ["allow", "bootstrap", "contextOptions", "excludeSandbox", "name", "messageHandler", "options", "sandbox", "src", "type", "title"]; | ||
function _extends5() { | ||
_extends5 = Object.assign || function(target) { | ||
function _extends4() { | ||
_extends4 = Object.assign || function(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
@@ -944,3 +812,3 @@ var source = arguments[i]; | ||
}; | ||
return _extends5.apply(this, arguments); | ||
return _extends4.apply(this, arguments); | ||
} | ||
@@ -1012,3 +880,3 @@ function _objectWithoutPropertiesLoose4(source, excluded) { | ||
"host": parseUrlDeprecated(src2).hostname, | ||
"bootstrap": bootstrap != null ? bootstrap : getBootstrapUrl(type, win), | ||
"bootstrap": bootstrap != null ? bootstrap : getBootstrapUrl(type), | ||
"type": type, | ||
@@ -1042,3 +910,3 @@ "count": count, | ||
}, []); | ||
return createElement2(IframeEmbed, _extends5({ | ||
return createElement2(IframeEmbed, _extends4({ | ||
allow: allow, | ||
@@ -1065,3 +933,3 @@ contentRef: contentRef, | ||
var startPos = message.indexOf("{"); | ||
devAssert(startPos != -1, "JSON missing in %s", message); | ||
devAssert2(startPos != -1, "JSON missing in %s", message); | ||
return tryParseJson(message.substr(startPos), function(e) { | ||
@@ -1077,4 +945,4 @@ return dev().error("MESSAGING", "Failed to parse message: " + message, e); | ||
var _excluded5 = ["action", "colorscheme", "embedAs", "hideCover", "hideCta", "href", "includeCommentParent", "kdSite", "layout", "locale", "numPosts", "onReady", "orderBy", "refLabel", "requestResize", "share", "showFacepile", "showText", "size", "smallHeader", "style", "tabs", "title"]; | ||
function _extends6() { | ||
_extends6 = Object.assign || function(target) { | ||
function _extends5() { | ||
_extends5 = Object.assign || function(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
@@ -1090,3 +958,3 @@ var source = arguments[i]; | ||
}; | ||
return _extends6.apply(this, arguments); | ||
return _extends5.apply(this, arguments); | ||
} | ||
@@ -1145,3 +1013,3 @@ function _objectWithoutPropertiesLoose5(source, excluded) { | ||
}, [localeProp, ref]); | ||
return createElement2(ProxyIframeEmbed, _extends6({ | ||
return createElement2(ProxyIframeEmbed, _extends5({ | ||
options: { | ||
@@ -1175,3 +1043,3 @@ action: action, | ||
type: TYPE, | ||
style: height ? _extends6({}, style, { | ||
style: height ? _extends5({}, style, { | ||
height: height | ||
@@ -1178,0 +1046,0 @@ }) : style |
@@ -435,2 +435,30 @@ // src/preact/index.js | ||
// src/config.js | ||
var env = self.AMP_CONFIG || {}; | ||
var thirdPartyFrameRegex = (typeof env["thirdPartyFrameRegex"] == "string" ? new RegExp(env["thirdPartyFrameRegex"]) : env["thirdPartyFrameRegex"]) || /^d-\d+\.ampproject\.net$/; | ||
var cdnProxyRegex = (typeof env["cdnProxyRegex"] == "string" ? new RegExp(env["cdnProxyRegex"]) : env["cdnProxyRegex"]) || /^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/; | ||
function getMetaUrl(name) { | ||
if (!self.document || !self.document.head) { | ||
return null; | ||
} | ||
if (self.location && cdnProxyRegex.test(self.location.origin)) { | ||
return null; | ||
} | ||
const metaEl = self.document.head.querySelector(`meta[name="${name}"]`); | ||
return metaEl && metaEl.getAttribute("content") || null; | ||
} | ||
var urls = { | ||
thirdParty: env["thirdPartyUrl"] || "https://3p.ampproject.net", | ||
thirdPartyFrameHost: env["thirdPartyFrameHost"] || "ampproject.net", | ||
thirdPartyFrameRegex, | ||
cdn: env["cdnUrl"] || getMetaUrl("runtime-host") || "https://cdn.ampproject.org", | ||
cdnProxyRegex, | ||
localhostRegex: /^https?:\/\/localhost(:\d+)?$/, | ||
errorReporting: env["errorReportingUrl"] || "https://us-central1-amp-error-reporting.cloudfunctions.net/r", | ||
betaErrorReporting: env["betaErrorReportingUrl"] || "https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta", | ||
localDev: env["localDev"] || false, | ||
trustedViewerHosts: [/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/, /(^|\.)gmail\.(com|dev)$/], | ||
geoApi: env["geoApiUrl"] || getMetaUrl("amp-geo-api") | ||
}; | ||
// src/core/mode/for-testing.js | ||
@@ -462,6 +490,14 @@ function isFortesting() { | ||
// src/core/types/array.js | ||
var { | ||
isArray | ||
} = Array; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
@@ -491,33 +527,5 @@ // src/core/types/string/url.js | ||
// src/config.js | ||
var env = self.AMP_CONFIG || {}; | ||
var thirdPartyFrameRegex = (typeof env["thirdPartyFrameRegex"] == "string" ? new RegExp(env["thirdPartyFrameRegex"]) : env["thirdPartyFrameRegex"]) || /^d-\d+\.ampproject\.net$/; | ||
var cdnProxyRegex = (typeof env["cdnProxyRegex"] == "string" ? new RegExp(env["cdnProxyRegex"]) : env["cdnProxyRegex"]) || /^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/; | ||
function getMetaUrl(name) { | ||
if (!self.document || !self.document.head) { | ||
return null; | ||
} | ||
if (self.location && cdnProxyRegex.test(self.location.origin)) { | ||
return null; | ||
} | ||
const metaEl = self.document.head.querySelector(`meta[name="${name}"]`); | ||
return metaEl && metaEl.getAttribute("content") || null; | ||
} | ||
var urls = { | ||
thirdParty: env["thirdPartyUrl"] || "https://3p.ampproject.net", | ||
thirdPartyFrameHost: env["thirdPartyFrameHost"] || "ampproject.net", | ||
thirdPartyFrameRegex, | ||
cdn: env["cdnUrl"] || getMetaUrl("runtime-host") || "https://cdn.ampproject.org", | ||
cdnProxyRegex, | ||
localhostRegex: /^https?:\/\/localhost(:\d+)?$/, | ||
errorReporting: env["errorReportingUrl"] || "https://us-central1-amp-error-reporting.cloudfunctions.net/r", | ||
betaErrorReporting: env["betaErrorReportingUrl"] || "https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta", | ||
localDev: env["localDev"] || false, | ||
trustedViewerHosts: [/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/, /(^|\.)gmail\.(com|dev)$/], | ||
geoApi: env["geoApiUrl"] || getMetaUrl("amp-geo-api") | ||
}; | ||
// src/internal-version.js | ||
function internalRuntimeVersion() { | ||
return "2107140004000"; | ||
return "2107150011000"; | ||
} | ||
@@ -592,3 +600,3 @@ | ||
} | ||
function devAssert(shouldBeTrueish, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9) { | ||
function devAssert2(shouldBeTrueish, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9) { | ||
if (getMode().minified) { | ||
@@ -665,116 +673,11 @@ return shouldBeTrueish; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/experiments/index.js | ||
function _extends4() { | ||
_extends4 = Object.assign || function(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends4.apply(this, arguments); | ||
} | ||
var TAG = "EXPERIMENTS"; | ||
var LOCAL_STORAGE_KEY = "amp-experiment-toggles"; | ||
var TOGGLES_WINDOW_PROPERTY = "__AMP__EXPERIMENT_TOGGLES"; | ||
function isExperimentOn(win, experimentId) { | ||
const toggles = experimentToggles(win); | ||
return !!toggles[experimentId]; | ||
} | ||
function experimentToggles(win) { | ||
var _win$AMP_CONFIG3, _win$AMP_EXP, _win$__AMP_EXP, _win$AMP_CONFIG4, _win$AMP_CONFIG5; | ||
if (win[TOGGLES_WINDOW_PROPERTY]) { | ||
return win[TOGGLES_WINDOW_PROPERTY]; | ||
} | ||
win[TOGGLES_WINDOW_PROPERTY] = map(); | ||
const toggles = win[TOGGLES_WINDOW_PROPERTY]; | ||
const buildExperimentConfigs = _extends4({}, (_win$AMP_CONFIG3 = win.AMP_CONFIG) != null ? _win$AMP_CONFIG3 : {}, (_win$AMP_EXP = win.AMP_EXP) != null ? _win$AMP_EXP : parseJson(((_win$__AMP_EXP = win.__AMP_EXP) == null ? void 0 : _win$__AMP_EXP.textContent) || "{}")); | ||
for (const experimentId in buildExperimentConfigs) { | ||
const frequency = buildExperimentConfigs[experimentId]; | ||
if (typeof frequency === "number" && frequency >= 0 && frequency <= 1) { | ||
toggles[experimentId] = Math.random() < frequency; | ||
} | ||
} | ||
const allowedDocOptIn = (_win$AMP_CONFIG4 = win.AMP_CONFIG) == null ? void 0 : _win$AMP_CONFIG4["allow-doc-opt-in"]; | ||
if (isArray(allowedDocOptIn) && allowedDocOptIn.length) { | ||
const meta = win.document.head.querySelector('meta[name="amp-experiments-opt-in"]'); | ||
if (meta) { | ||
const optedInExperiments = meta.getAttribute("content").split(","); | ||
for (const experiment of optedInExperiments) { | ||
if (dev().assertArray(allowedDocOptIn).includes(experiment)) { | ||
toggles[experiment] = true; | ||
} | ||
} | ||
} | ||
} | ||
Object.assign(toggles, getExperimentToggles(win)); | ||
const allowedUrlOptIn = (_win$AMP_CONFIG5 = win.AMP_CONFIG) == null ? void 0 : _win$AMP_CONFIG5["allow-url-opt-in"]; | ||
if (isArray(allowedUrlOptIn) && allowedUrlOptIn.length) { | ||
const hash = win.location["originalHash"] || win.location.hash; | ||
const params = parseQueryString(hash); | ||
for (const experiment of allowedUrlOptIn) { | ||
const param = params[`e-${experiment}`]; | ||
if (param == "1") { | ||
toggles[experiment] = true; | ||
} | ||
if (param == "0") { | ||
toggles[experiment] = false; | ||
} | ||
} | ||
} | ||
return toggles; | ||
} | ||
function getExperimentToggles(win) { | ||
var _experimentsString; | ||
let experimentsString = ""; | ||
try { | ||
if ("localStorage" in win) { | ||
experimentsString = win.localStorage.getItem(LOCAL_STORAGE_KEY); | ||
} | ||
} catch (_unused) { | ||
dev().warn(TAG, "Failed to retrieve experiments from localStorage."); | ||
} | ||
const tokens = ((_experimentsString = experimentsString) == null ? void 0 : _experimentsString.split(/\s*,\s*/g)) || []; | ||
const toggles = map(); | ||
for (const token of tokens) { | ||
if (!token) { | ||
continue; | ||
} | ||
if (token[0] == "-") { | ||
toggles[token.substr(1)] = false; | ||
} else { | ||
toggles[token] = true; | ||
} | ||
} | ||
return toggles; | ||
} | ||
// src/3p-frame.js | ||
var overrideBootstrapBaseUrl; | ||
function getBootstrapUrl(type, win) { | ||
function getBootstrapUrl(type) { | ||
const extension = true ? ".mjs" : ".js"; | ||
if (getMode().localDev || getMode().test) { | ||
const filename = getMode().minified ? `./vendor/${type}.` : `./vendor/${type}.max.`; | ||
return true ? filename + "mjs" : filename + "js"; | ||
const filename = getMode().minified ? `./vendor/${type}` : `./vendor/${type}.max`; | ||
return filename + extension; | ||
} | ||
if (isExperimentOn(win, "3p-vendor-split")) { | ||
return true ? `${urls.thirdParty}/${internalRuntimeVersion()}/vendor/${type}.mjs` : `${urls.thirdParty}/${internalRuntimeVersion()}/vendor/${type}.js`; | ||
} | ||
return `${urls.thirdParty}/${internalRuntimeVersion()}/f.js`; | ||
return `${urls.thirdParty}/${internalRuntimeVersion()}/vendor/${type}${extension}`; | ||
} | ||
@@ -823,4 +726,4 @@ function getDefaultBootstrapBaseUrl(parentWindow, opt_srcFileBasename) { | ||
var _excluded4 = ["allow", "bootstrap", "contextOptions", "excludeSandbox", "name", "messageHandler", "options", "sandbox", "src", "type", "title"]; | ||
function _extends5() { | ||
_extends5 = Object.assign || function(target) { | ||
function _extends4() { | ||
_extends4 = Object.assign || function(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
@@ -836,3 +739,3 @@ var source = arguments[i]; | ||
}; | ||
return _extends5.apply(this, arguments); | ||
return _extends4.apply(this, arguments); | ||
} | ||
@@ -919,3 +822,3 @@ function _objectWithoutPropertiesLoose4(source, excluded) { | ||
"host": parseUrlDeprecated(src2).hostname, | ||
"bootstrap": bootstrap != null ? bootstrap : getBootstrapUrl(type, win), | ||
"bootstrap": bootstrap != null ? bootstrap : getBootstrapUrl(type), | ||
"type": type, | ||
@@ -947,3 +850,3 @@ "count": count, | ||
}), []); | ||
return createElement2(IframeEmbed, _extends5({ | ||
return createElement2(IframeEmbed, _extends4({ | ||
allow, | ||
@@ -970,3 +873,3 @@ contentRef, | ||
const startPos = message.indexOf("{"); | ||
devAssert(startPos != -1, "JSON missing in %s", message); | ||
devAssert2(startPos != -1, "JSON missing in %s", message); | ||
return tryParseJson(message.substr(startPos), (e) => dev().error("MESSAGING", "Failed to parse message: " + message, e)); | ||
@@ -980,4 +883,4 @@ } | ||
var _excluded5 = ["action", "colorscheme", "embedAs", "hideCover", "hideCta", "href", "includeCommentParent", "kdSite", "layout", "locale", "numPosts", "onReady", "orderBy", "refLabel", "requestResize", "share", "showFacepile", "showText", "size", "smallHeader", "style", "tabs", "title"]; | ||
function _extends6() { | ||
_extends6 = Object.assign || function(target) { | ||
function _extends5() { | ||
_extends5 = Object.assign || function(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
@@ -993,3 +896,3 @@ var source = arguments[i]; | ||
}; | ||
return _extends6.apply(this, arguments); | ||
return _extends5.apply(this, arguments); | ||
} | ||
@@ -1070,3 +973,3 @@ function _objectWithoutPropertiesLoose5(source, excluded) { | ||
}, [localeProp, ref]); | ||
return createElement2(ProxyIframeEmbed, _extends6({ | ||
return createElement2(ProxyIframeEmbed, _extends5({ | ||
options: { | ||
@@ -1100,3 +1003,3 @@ action, | ||
type: TYPE, | ||
style: height ? _extends6({}, style, { | ||
style: height ? _extends5({}, style, { | ||
height | ||
@@ -1103,0 +1006,0 @@ }) : style |
@@ -1,3 +0,3 @@ | ||
import{Fragment as Dr,cloneElement as Mr,createContext as ut,createElement as at,createRef as wr}from"preact";import{hydrate as Tr,render as Fr}from"preact";import{useCallback as ht,useContext as dt,useEffect as pt,useImperativeHandle as xt,useLayoutEffect as mt,useMemo as gt,useRef as ft,useState as lt}from"preact/hooks";function E(e,t,r){return at.apply(void 0,arguments)}function _e(e){return ut(e,void 0)}function H(e){return lt(e)}function F(e){return ft(e)}function q(e,t){pt(e,t)}function T(e,t){mt(e,t)}function be(e){return dt(e)}function oe(e,t){return gt(e,t)}function J(e,t){return ht(e,t)}function G(e,t,r){return xt(e,t,r)}var ie=()=>["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"],se=()=>["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"];function Oe(){let e=0;return()=>String(++e)}var{hasOwnProperty:jr,toString:$r}=Object.prototype;function L(e){let t=Object.create(null);return e&&Object.assign(t,e),t}function R(e){return e||{}}function Se(e){return e.replace("-","_")}function Ae(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}import{Children as Gr,createPortal as kr,forwardRef as Et}from"preact/compat";function A(e){return Et(e)}var _={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},yt=[_.AUTO,_.LAZY,_.EAGER,_.UNLOAD],Pe={[_.AUTO]:0,[_.LAZY]:1,[_.EAGER]:2,[_.UNLOAD]:3};function Re(e,t){let r=Pe[e]||0,n=Pe[t]||0,o=Math.max(r,n);return yt[o]}var W={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},vt=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function Ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(r),!0).forEach((function(t){_t(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ne(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bt(e,t){if(null==e)return{};var r,n,o=Ot(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function Ot(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var St=[null,"paint","layout","content","size","size paint","size layout","strict"],At={position:"relative",width:"100%",height:"100%"};function Pt(e,t){let{as:r="div",children:n,className:o,contentAs:a="div",contentClassName:l,contentProps:i,contentRef:c,contentStyle:u,layout:s=!1,paint:f=!1,size:p=!1,style:d,wrapperClassName:y,wrapperStyle:O}=e,b=(p?4:0)+(s?2:0)+(f?1:0);return E(r,N(N({},bt(e,vt)),{},{ref:t,className:`${o||""} ${y||""}`.trim()||null,style:N(N(N({},d),O),{},{contain:St[b]})}),E(a,N(N({},i),{},{ref:c,className:l,style:N(N({},p&&At),{},{overflow:f?"hidden":"visible"},u)}),n))}var ce=A(Pt),Rt=["as","children","className","style","wrapperClassName","wrapperStyle"];function Ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function K(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach((function(t){Nt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Nt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function It(e,t){if(null==e)return{};var r,n,o=Mt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function Mt(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}function Ft(e,t){let{as:r="div",children:n,className:o,style:a,wrapperClassName:l,wrapperStyle:i}=e;return E(r,K(K({},It(e,Rt)),{},{ref:t,className:`${o||""} ${l||""}`.trim()||null,style:K(K({},a),i)}),n)}var Me,Tt=A(Ft);function ae(e){let t=F(null);return t.current=e,t}function Dt(){return Me||(Me=_e({renderable:!0,playable:!0,loading:_.AUTO}))}function ue(){return be(Dt())}function Fe(e){let{loading:t}=ue();return Re(e,t)}var wt=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function Te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(r),!0).forEach((function(t){Ct(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ct(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lt(e,t){if(null==e)return{};var r,n,o=jt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function jt(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var $t=()=>!1,Ut="about:blank",Bt=e=>e&&e!=Ut&&!e.includes("#");function Vt(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:l,title:i,matchesMessagingOrigin:c=$t,messageHandler:u,ready:s=!0,loading:f,onReadyState:p,sandbox:d,src:y}=e,O=Lt(e,wt),{playable:b}=ue(),m=Fe(f),g=m!==_.UNLOAD,v=F(!1),h=ae(p),P=J((e=>{if(e!==v.current){v.current=e;let t=h.current;null==t||t(e?W.COMPLETE:W.LOADING)}}),[h]),w=F(null);return G(t,(()=>({get readyState(){return v.current?W.COMPLETE:W.LOADING},get node(){return w.current}})),[]),T((()=>{g||P(!1)}),[g,P]),q((()=>{let e=w.current;if(!b&&e){let{src:t}=e;Bt(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[b]),T((()=>{let e=w.current;if(!e||!g)return;let t=e=>{let t=w.current;!t||e.source!=t.contentWindow||!c(e.origin)||u(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[c,u,g,s]),E(ce,Y(Y({},O),{},{layout:!0,size:!0,paint:!0}),g&&s&&E("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:m,name:l,onLoad:()=>P(!0),part:"iframe",ref:w,sandbox:d,scrolling:"no",src:y,style:Y(Y({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}var le=A(Vt);function Z(){return!1}function z(e){var t;if(!Z())return!1;let r=e||self;return!!(null!==(t=r.AMP_CONFIG)&&void 0!==t&&t.test||r.__AMP_TEST||r.__karma__)}le.displayName="IframeEmbed";var{isArray:j}=Array,kt=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function we(e,t=""){let r=t;try{return decodeURIComponent(e)}catch(e){return r}}function Q(e){let t,r=L();if(!e)return r;for(;t=kt.exec(e);){let e=we(t[1],t[1]),n=t[2]?we(t[2].replace(/\+/g," "),t[2]):"";r[e]=n}return r}var y=self.AMP_CONFIG||{},Gt=("string"==typeof y.thirdPartyFrameRegex?new RegExp(y.thirdPartyFrameRegex):y.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,Ce=("string"==typeof y.cdnProxyRegex?new RegExp(y.cdnProxyRegex):y.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Le(e){if(!self.document||!self.document.head||self.location&&Ce.test(self.location.origin))return null;let t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var D={thirdParty:y.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:y.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:Gt,cdn:y.cdnUrl||Le("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:Ce,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:y.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:y.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:y.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:y.geoApiUrl||Le("amp-geo-api")};function $(){return"2107140004000"}var fe={OFF:0,ERROR:1,WARN:2,INFO:3,FINE:4};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var pe=self.__AMP_LOG,We=null;function ee(){if(pe.dev)return pe.dev;if(!We)throw new Error("failed to call initLogConstructor");return pe.dev=new We(self,(e=>e>=3?fe.FINE:e>=2?fe.INFO:fe.OFF))}function te(e,t,r,n,o,a,l,i,c,u,s){return e}var me,Jt,$o=new Set(["c","v","a","ad"]);function de(e,t){return me||(me=self.document.createElement("a"),Jt=null),Kt(me,e,null)}function Kt(e,t,r){return e.href="",new URL(t,e.href)}function ge(e){return JSON.parse(e)}function X(e,t){try{return ge(e)}catch(e){return null==t||t(e),null}}function qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Je(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach((function(t){nr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function nr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var or="amp-experiment-toggles",re="__AMP__EXPERIMENT_TOGGLES";function Ke(e,t){return!!Ye(e)[t]}function Ye(e){var t,r,n,o,a;if(e[re])return e[re];e[re]=L();let l=e[re],i=Je(Je({},null!==(t=e.AMP_CONFIG)&&void 0!==t?t:{}),null!==(r=e.AMP_EXP)&&void 0!==r?r:ge((null===(n=e.__AMP_EXP)||void 0===n?void 0:n.textContent)||"{}"));for(let e in i){let t=i[e];"number"==typeof t&&t>=0&&t<=1&&(l[e]=Math.random()<t)}let c=null===(o=e.AMP_CONFIG)||void 0===o?void 0:o["allow-doc-opt-in"];if(j(c)&&c.length){let t=e.document.head.querySelector('meta[name="amp-experiments-opt-in"]');if(t){let e=t.getAttribute("content").split(",");for(let t of e)c.includes(t)&&(l[t]=!0)}}Object.assign(l,ir(e));let u=null===(a=e.AMP_CONFIG)||void 0===a?void 0:a["allow-url-opt-in"];if(j(u)&&u.length){let t=Q(e.location.originalHash||e.location.hash);for(let e of u){let r=t[`e-${e}`];"1"==r&&(l[e]=!0),"0"==r&&(l[e]=!1)}}return l}function ir(e){var t;let r="";try{"localStorage"in e&&(r=e.localStorage.getItem(or))}catch(e){}let n=(null===(t=r)||void 0===t?void 0:t.split(/\s*,\s*/g))||[],o=L();for(let e of n)!e||("-"==e[0]?o[e.substr(1)]=!1:o[e]=!0);return o}function Ze(e,t){return Ke(t,"3p-vendor-split")?`${D.thirdParty}/${$()}/vendor/${e}.mjs`:`${D.thirdParty}/${$()}/f.js`}function Qe(e,t){let r=t||"frame";return e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||sr(e),"https://"+e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+`.${D.thirdPartyFrameHost}/${$()}/${r}.html`}function sr(e){return"d-"+et(e)}function et(e){let t;if(e.crypto&&e.crypto.getRandomValues){let r=new Uint32Array(2);e.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(e.Math.random()).substr(2)+"0";return t}function tt(e){let t=0;for(let r=e;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+et(e)}var cr=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function rt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ar(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(r),!0).forEach((function(t){ur(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ur(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lr(e,t){if(null==e)return{};var r,n,o=fr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function fr(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var he={},nt={EMBED_SIZE:"embed-size"},xe="sync-xhr 'none'",pr=ie().join(" ")+" "+se().join(" ");function mr(e,t){let{allow:r=xe,bootstrap:n,contextOptions:o,excludeSandbox:a,name:l,messageHandler:i,options:c,sandbox:u=pr,src:s,type:f,title:p=f}=e,d=lr(e,cr);if(!Ae(r,xe))throw new Error(`'allow' prop must contain "${xe}". Found "${r}".`);let y=F(null),O=F(null),b=oe((()=>(he[f]||(he[f]=Oe()),he[f]())),[f]),{0:{name:m,src:g},1:v}=H({name:l,src:s});return T((()=>{var e,t;let r=null===(e=y.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView,a=null!=s?s:r?Qe(r):"about:blank";if(l)return void v({name:l,src:a});if(!r)return;let i=Object.assign(R({location:{href:r.location.href},sentinel:tt(r)}),o),u=Object.assign(R({title:p,type:f,_context:i}),c);v({name:JSON.stringify(R({host:de(a).hostname,bootstrap:null!=n?n:Ze(f,r),type:f,count:b,attributes:u})),src:a})}),[n,o,b,l,c,s,p,f]),q((()=>{var e;let t=null===(e=O.current)||void 0===e?void 0:e.node;t&&t.parentNode.insertBefore(t,t.nextSibling)}),[m]),G(t,(()=>({get readyState(){var e;return null===(e=O.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=O.current)||void 0===e?void 0:e.node}})),[]),E(le,ar({allow:r,contentRef:y,messageHandler:i,name:m,ref:O,ready:!!m,sandbox:a?void 0:u,src:g,title:p},d))}var Ee=A(mr);Ee.displayName="ProxyIframeEmbed";var dr="amp-";function ot(e){if(!gr(e))return null;let t=e.indexOf("{");return te(-1!=t),X(e.substr(t),(t=>ee().error("MESSAGING","Failed to parse message: "+e,t)))}function gr(e){return"string"==typeof e&&0==e.indexOf(dr)&&-1!=e.indexOf("{")}var hr=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function it(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ne(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?it(Object(r),!0).forEach((function(t){xr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):it(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function xr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Er(e,t){if(null==e)return{};var r,n,o=yr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function yr(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var vr="facebook",_r="100%",br=()=>!0,Or="Facebook comments";function Sr(e,t){let{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,kdSite:u,layout:s,locale:f,numPosts:p,onReady:d,orderBy:y,refLabel:O,requestResize:b,share:m,showFacepile:g,showText:v,size:h,smallHeader:P,style:w,tabs:j,title:S=Or}=e,A=Er(e,hr),{0:x,1:_}=H(null),N=J((e=>{var t;let r=null!==(t=X(e.data))&&void 0!==t?t:ot(e.data);if("ready"==r.action&&(null==d||d()),r.type==nt.EMBED_SIZE){let e=r.height;b?(b(e),_(_r)):_(e)}}),[b,d]),{0:R,1:D}=H(f);return T((()=>{var e,r;if(f)return void D(f);let n=null==t||null===(e=t.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView;!n||D(Se(n.navigator.language))}),[f,t]),E(Ee,ne(ne({options:{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,kd_site:u,layout:s,locale:R,numPosts:p,orderBy:y,ref:O,share:m,showFacepile:g,showText:v,size:h,smallHeader:P,tabs:j},ref:t,title:S},A),{},{excludeSandbox:!0,matchesMessagingOrigin:br,messageHandler:N,type:vr,style:x?ne(ne({},w),{},{height:x}):w}))}var Ar=A(Sr);Ar.displayName="Facebook";export{Ar as Facebook}; | ||
import{Fragment as Or,cloneElement as vr,createContext as nt,createElement as rt,createRef as Sr}from"preact";import{hydrate as br,render as _r}from"preact";import{useCallback as lt,useContext as at,useEffect as st,useImperativeHandle as ft,useLayoutEffect as ct,useMemo as ut,useRef as it,useState as ot}from"preact/hooks";function d(e,t,r){return rt.apply(void 0,arguments)}function Ee(e){return nt(e,void 0)}function $(e){return ot(e)}function F(e){return it(e)}function z(e,t){st(e,t)}function T(e,t){ct(e,t)}function ye(e){return at(e)}function te(e,t){return ut(e,t)}function X(e,t){return lt(e,t)}function H(e,t,r){return ft(e,t,r)}var re=()=>["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"],ne=()=>["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"];function ve(){let e=0;return()=>String(++e)}var{hasOwnProperty:Nr,toString:Rr}=Object.prototype;function N(e){return e||{}}function _e(e){return e.replace("-","_")}function be(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}import{Children as wr,createPortal as Dr,forwardRef as pt}from"preact/compat";function A(e){return pt(e)}var x={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},mt=[x.AUTO,x.LAZY,x.EAGER,x.UNLOAD],Oe={[x.AUTO]:0,[x.LAZY]:1,[x.EAGER]:2,[x.UNLOAD]:3};function Se(e,t){let r=Oe[e]||0,n=Oe[t]||0,o=Math.max(r,n);return mt[o]}var k={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},dt=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function Ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(r),!0).forEach((function(t){gt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ae(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function gt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ht(e,t){if(null==e)return{};var r,n,o=xt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function xt(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var Et=[null,"paint","layout","content","size","size paint","size layout","strict"],yt={position:"relative",width:"100%",height:"100%"};function vt(e,t){let{as:r="div",children:n,className:o,contentAs:a="div",contentClassName:l,contentProps:i,contentRef:c,contentStyle:u,layout:s=!1,paint:f=!1,size:p=!1,style:y,wrapperClassName:O,wrapperStyle:b}=e,m=(p?4:0)+(s?2:0)+(f?1:0);return d(r,R(R({},ht(e,dt)),{},{ref:t,className:`${o||""} ${O||""}`.trim()||null,style:R(R(R({},y),b),{},{contain:Et[m]})}),d(a,R(R({},i),{},{ref:c,className:l,style:R(R({},p&&yt),{},{overflow:f?"hidden":"visible"},u)}),n))}var oe=A(vt),_t=["as","children","className","style","wrapperClassName","wrapperStyle"];function Pe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(r),!0).forEach((function(t){bt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function bt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ot(e,t){if(null==e)return{};var r,n,o=St(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function St(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}function At(e,t){let{as:r="div",children:n,className:o,style:a,wrapperClassName:l,wrapperStyle:i}=e;return d(r,q(q({},Ot(e,_t)),{},{ref:t,className:`${o||""} ${l||""}`.trim()||null,style:q(q({},a),i)}),n)}var Ne,Pt=A(At);function ie(e){let t=F(null);return t.current=e,t}function Nt(){return Ne||(Ne=Ee({renderable:!0,playable:!0,loading:x.AUTO}))}function se(){return ye(Nt())}function Re(e){let{loading:t}=se();return Se(e,t)}var Rt=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function Ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function J(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach((function(t){It(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function It(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mt(e,t){if(null==e)return{};var r,n,o=Ft(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function Ft(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var Tt=()=>!1,Dt="about:blank",wt=e=>e&&e!=Dt&&!e.includes("#");function Ct(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:l,title:i,matchesMessagingOrigin:c=Tt,messageHandler:u,ready:s=!0,loading:f,onReadyState:p,sandbox:y,src:O}=e,b=Mt(e,Rt),{playable:m}=se(),g=Re(f),v=g!==x.UNLOAD,h=F(!1),w=ie(p),P=X((e=>{if(e!==h.current){h.current=e;let t=w.current;null==t||t(e?k.COMPLETE:k.LOADING)}}),[w]),j=F(null);return H(t,(()=>({get readyState(){return h.current?k.COMPLETE:k.LOADING},get node(){return j.current}})),[]),T((()=>{v||P(!1)}),[v,P]),z((()=>{let e=j.current;if(!m&&e){let{src:t}=e;wt(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[m]),T((()=>{let e=j.current;if(!e||!v)return;let t=e=>{let t=j.current;!t||e.source!=t.contentWindow||!c(e.origin)||u(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[c,u,v,s]),d(oe,J(J({},b),{},{layout:!0,size:!0,paint:!0}),v&&s&&d("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:g,name:l,onLoad:()=>P(!0),part:"iframe",ref:j,sandbox:y,scrolling:"no",src:O,style:J(J({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}var ce=A(Ct);ce.displayName="IframeEmbed";var g=self.AMP_CONFIG||{},Lt=("string"==typeof g.thirdPartyFrameRegex?new RegExp(g.thirdPartyFrameRegex):g.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,Me=("string"==typeof g.cdnProxyRegex?new RegExp(g.cdnProxyRegex):g.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Fe(e){if(!self.document||!self.document.head||self.location&&Me.test(self.location.origin))return null;let t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var C={thirdParty:g.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:g.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:Lt,cdn:g.cdnUrl||Fe("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:Me,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:g.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:g.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:g.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:g.geoApiUrl||Fe("amp-geo-api")};function K(){return!1}function G(e){var t;if(!K())return!1;let r=e||self;return!!(null!==(t=r.AMP_CONFIG)&&void 0!==t&&t.test||r.__AMP_TEST||r.__karma__)}function Ve(e){return JSON.parse(e)}function W(e,t){try{return Ve(e)}catch(e){return null==t||t(e),null}}function B(){return"2107150011000"}var ue={OFF:0,ERROR:1,WARN:2,INFO:3,FINE:4};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var le=self.__AMP_LOG,Ge=null;function Z(){if(le.dev)return le.dev;if(!Ge)throw new Error("failed to call initLogConstructor");return le.dev=new Ge(self,(e=>e>=3?ue.FINE:e>=2?ue.INFO:ue.OFF))}function Q(e,t,r,n,o,a,l,i,c,u,s){return e}var fe,qt,Ns=new Set(["c","v","a","ad"]);function pe(e,t){return fe||(fe=self.document.createElement("a"),qt=null),Jt(fe,e,null)}function Jt(e,t,r){return e.href="",new URL(t,e.href)}function ze(e){return`${C.thirdParty}/${B()}/vendor/${e}.mjs`}function Xe(e,t){let r=t||"frame";return e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||Kt(e),"https://"+e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+`.${C.thirdPartyFrameHost}/${B()}/${r}.html`}function Kt(e){return"d-"+qe(e)}function qe(e){let t;if(e.crypto&&e.crypto.getRandomValues){let r=new Uint32Array(2);e.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(e.Math.random()).substr(2)+"0";return t}function Je(e){let t=0;for(let r=e;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+qe(e)}var Yt=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function Ke(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Zt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(r),!0).forEach((function(t){Qt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ke(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Qt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function er(e,t){if(null==e)return{};var r,n,o=tr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function tr(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var me={},Ye={EMBED_SIZE:"embed-size"},de="sync-xhr 'none'",rr=re().join(" ")+" "+ne().join(" ");function nr(e,t){let{allow:r=de,bootstrap:n,contextOptions:o,excludeSandbox:a,name:l,messageHandler:i,options:c,sandbox:u=rr,src:s,type:f,title:p=f}=e,y=er(e,Yt);if(!be(r,de))throw new Error(`'allow' prop must contain "${de}". Found "${r}".`);let O=F(null),b=F(null),m=te((()=>(me[f]||(me[f]=ve()),me[f]())),[f]),{0:{name:g,src:v},1:h}=$({name:l,src:s});return T((()=>{var e,t;let r=null===(e=O.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView,a=null!=s?s:r?Xe(r):"about:blank";if(l)return void h({name:l,src:a});if(!r)return;let i=Object.assign(N({location:{href:r.location.href},sentinel:Je(r)}),o),u=Object.assign(N({title:p,type:f,_context:i}),c);h({name:JSON.stringify(N({host:pe(a).hostname,bootstrap:null!=n?n:ze(f),type:f,count:m,attributes:u})),src:a})}),[n,o,m,l,c,s,p,f]),z((()=>{var e;let t=null===(e=b.current)||void 0===e?void 0:e.node;t&&t.parentNode.insertBefore(t,t.nextSibling)}),[g]),H(t,(()=>({get readyState(){var e;return null===(e=b.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=b.current)||void 0===e?void 0:e.node}})),[]),d(ce,Zt({allow:r,contentRef:O,messageHandler:i,name:g,ref:b,ready:!!g,sandbox:a?void 0:u,src:v,title:p},y))}var ge=A(nr);ge.displayName="ProxyIframeEmbed";var or="amp-";function Ze(e){if(!ir(e))return null;let t=e.indexOf("{");return Q(-1!=t),W(e.substr(t),(t=>Z().error("MESSAGING","Failed to parse message: "+e,t)))}function ir(e){return"string"==typeof e&&0==e.indexOf(or)&&-1!=e.indexOf("{")}var sr=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function Qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(r),!0).forEach((function(t){cr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function cr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ar(e,t){if(null==e)return{};var r,n,o=ur(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function ur(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var lr="facebook",fr="100%",pr=()=>!0,mr="Facebook comments";function dr(e,t){let{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,kdSite:u,layout:s,locale:f,numPosts:p,onReady:y,orderBy:O,refLabel:b,requestResize:m,share:g,showFacepile:v,showText:h,size:w,smallHeader:P,style:j,tabs:x,title:S=mr}=e,E=ar(e,sr),{0:A,1:R}=$(null),N=X((e=>{var t;let r=null!==(t=W(e.data))&&void 0!==t?t:Ze(e.data);if("ready"==r.action&&(null==y||y()),r.type==Ye.EMBED_SIZE){let e=r.height;m?(m(e),R(fr)):R(e)}}),[m,y]),{0:D,1:F}=$(f);return T((()=>{var e,r;if(f)return void F(f);let n=null==t||null===(e=t.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView;!n||F(_e(n.navigator.language))}),[f,t]),d(ge,ee(ee({options:{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,kd_site:u,layout:s,locale:D,numPosts:p,orderBy:O,ref:b,share:g,showFacepile:v,showText:h,size:w,smallHeader:P,tabs:x},ref:t,title:S},E),{},{excludeSandbox:!0,matchesMessagingOrigin:pr,messageHandler:N,type:lr,style:A?ee(ee({},j),{},{height:A}):j}))}var gr=A(dr);gr.displayName="Facebook";export{gr as Facebook}; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-preact.module.js.map |
@@ -1,3 +0,3 @@ | ||
var Tr=Object.create,te=Object.defineProperty,wr=Object.getOwnPropertyDescriptor,Mr=Object.getOwnPropertyNames,Cr=Object.getPrototypeOf,Lr=Object.prototype.hasOwnProperty,Me=function(e){return te(e,"__esModule",{value:!0})},jr=function(e,t){for(var r in Me(e),t)te(e,r,{get:t[r],enumerable:!0})},Ur=function(e,t,r){if(t&&"object"==typeof t||"function"==typeof t)for(var n,o=Mr(t),a=0,i=o.length;a<i;a++)n=o[a],!Lr.call(e,n)&&"default"!==n&&te(e,n,{get:function(e){return t[e]}.bind(null,n),enumerable:!(r=wr(t,n))||r.enumerable});return e},ne=function(e){return Ur(Me(te(null!=e?Tr(Cr(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};jr(exports,{Facebook:function(){return Nr}});var G=ne(require("react")),Ce=ne(require("react-dom")),d=ne(require("react"));function A(e,t,r){return G.createElement.apply(void 0,arguments)}function Le(e){return G.createContext(e,void 0)}function K(e){return d.useState(e)}function j(e){return d.useRef(e)}function oe(e,t){d.useEffect(e,t)}function U(e,t){d.useLayoutEffect(e,t)}function je(e){return d.useContext(e)}function de(e,t){return d.useMemo(e,t)}function ie(e,t){return d.useCallback(e,t)}function Z(e,t,r){return d.useImperativeHandle(e,t,r)}var ge=function(){return["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"]},ye=function(){return["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"]};function Ue(){var e=0;return function(){return String(++e)}}var ke=Object.prototype,sn=ke.hasOwnProperty,cn=ke.toString;function k(e){var t=Object.create(null);return e&&Object.assign(t,e),t}function w(e){return e||{}}function Be(e){return e.replace("-","_")}function He(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}var Y,ae=ne(require("react"));function T(e){return ae.forwardRef(e)}function ue(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var R={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},kr=[R.AUTO,R.LAZY,R.EAGER,R.UNLOAD],Ve=(ue(Y={},R.AUTO,0),ue(Y,R.LAZY,1),ue(Y,R.EAGER,2),ue(Y,R.UNLOAD,3),Y);function Ge(e,t){var r=Ve[e]||0,n=Ve[t]||0,o=Math.max(r,n);return kr[o]}var Q={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},Br=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function We(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?We(Object(r),!0).forEach((function(t){Hr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):We(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Hr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vr(e,t){if(null==e)return{};var r,n,o=Gr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function Gr(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var Wr=[null,"paint","layout","content","size","size paint","size layout","strict"],$r={position:"relative",width:"100%",height:"100%"};function zr(e,t){var r=e.as,n=void 0===r?"div":r,o=e.children,a=e.className,i=e.contentAs,c=void 0===i?"div":i,l=e.contentClassName,u=e.contentProps,s=e.contentRef,f=e.contentStyle,p=e.layout,y=void 0!==p&&p,d=e.paint,b=void 0!==d&&d,O=e.size,v=void 0!==O&&O,m=e.style,g=e.wrapperClassName,h=e.wrapperStyle,w=(v?4:0)+(y?2:0)+(b?1:0);return A(n,M(M({},Vr(e,Br)),{},{ref:t,className:"".concat(a||""," ").concat(g||"").trim()||null,style:M(M(M({},m),h),{},{contain:Wr[w]})}),A(c,M(M({},u),{},{ref:s,className:l,style:M(M({},v&&$r),{},{overflow:b?"hidden":"visible"},f)}),o))}var he=T(zr),Xr=["as","children","className","style","wrapperClassName","wrapperStyle"];function $e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$e(Object(r),!0).forEach((function(t){qr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$e(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function qr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jr(e,t){if(null==e)return{};var r,n,o=Kr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function Kr(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}function Yr(e,t){var r=e.as,n=void 0===r?"div":r,o=e.children,a=e.className,i=e.style,c=e.wrapperClassName,l=e.wrapperStyle;return A(n,se(se({},Jr(e,Xr)),{},{ref:t,className:"".concat(a||""," ").concat(c||"").trim()||null,style:se(se({},i),l)}),o)}var ze,Zr=T(Yr);function xe(e){var t=j(null);return t.current=e,t}function Qr(){return ze||(ze=Le({renderable:!0,playable:!0,loading:R.AUTO}))}function be(){return je(Qr())}function Xe(e){return Ge(e,be().loading)}var et=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach((function(t){rt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function rt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tt(e,t){if(null==e)return{};var r,n,o=nt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function nt(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var ot=function(){return!1},it="about:blank",at=function(e){return e&&e!=it&&!e.includes("#")};function ut(e,t){var r=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,c=e.title,l=e.matchesMessagingOrigin,u=void 0===l?ot:l,s=e.messageHandler,f=e.ready,p=void 0===f||f,y=e.loading,d=e.onReadyState,b=e.sandbox,O=e.src,v=tt(e,et),m=be().playable,g=Xe(y),h=g!==R.UNLOAD,w=j(!1),P=xe(d),S=ie((function(e){if(e!==w.current){w.current=e;var t=P.current;null==t||t(e?Q.COMPLETE:Q.LOADING)}}),[P]),_=j(null);return Z(t,(function(){return{get readyState(){return w.current?Q.COMPLETE:Q.LOADING},get node(){return _.current}}}),[]),U((function(){h||S(!1)}),[h,S]),oe((function(){var e=_.current;if(!m&&e){var t=e.src;if(at(t))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[m]),U((function(){var e=_.current;if(e&&h){var t=function(e){var t=_.current;!t||e.source!=t.contentWindow||!u(e.origin)||s(e)},r=e.ownerDocument.defaultView;return r.addEventListener("message",t),function(){return r.removeEventListener("message",t)}}}),[u,s,h,p]),A(he,ce(ce({},v),{},{layout:!0,size:!0,paint:!0}),h&&p&&A("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:g,name:i,onLoad:function(){return S(!0)},part:"iframe",ref:_,sandbox:b,scrolling:"no",src:O,style:ce(ce({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var Ee=T(ut);function le(){return!1}function ee(e){var t;if(!le())return!1;var r=e||self;return!!(null!==(t=r.AMP_CONFIG)&&void 0!==t&&t.test||r.__AMP_TEST||r.__karma__)}function ct(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ke(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function lt(e,t,r){return t&&Ke(e.prototype,t),r&&Ke(e,r),e}Ee.displayName="IframeEmbed";var Ye=function(){function e(t){ct(this,e),this.capacity_=t,this.size_=0,this.access_=0,this.cache_=k()}return lt(e,[{key:"has",value:function(e){return!!this.cache_[e]}},{key:"get",value:function(e){var t=this.cache_[e];if(t)return t.access=++this.access_,t.payload}},{key:"put",value:function(e,t){this.has(e)||this.size_++,this.cache_[e]={payload:t,access:this.access_},this.evict_()}},{key:"evict_",value:function(){if(!(this.size_<=this.capacity_)){var e,t=this.cache_,r=this.access_+1;for(var n in t){var o=t[n].access;o<r&&(r=o,e=n)}void 0!==e&&(delete t[e],this.size_--)}}}]),e}(),W=Array.isArray,ft=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function Ze(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(e)}catch(e){return t}}function fe(e){var t,r=k();if(!e)return r;for(;t=ft.exec(e);){var n=Ze(t[1],t[1]),o=t[2]?Ze(t[2].replace(/\+/g," "),t[2]):"";r[n]=o}return r}var O=self.AMP_CONFIG||{},pt=("string"==typeof O.thirdPartyFrameRegex?new RegExp(O.thirdPartyFrameRegex):O.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,Qe=("string"==typeof O.cdnProxyRegex?new RegExp(O.cdnProxyRegex):O.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function er(e){if(!self.document||!self.document.head||self.location&&Qe.test(self.location.origin))return null;var t=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return t&&t.getAttribute("content")||null}var B={thirdParty:O.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:O.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:pt,cdn:O.cdnUrl||er("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:Qe,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:O.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:O.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:O.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:O.geoApiUrl||er("amp-geo-api")};function $(){return"2107140004000"}var Se={OFF:0,ERROR:1,WARN:2,INFO:3,FINE:4};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var Ae=self.__AMP_LOG,cr=null;function z(){if(Ae.dev)return Ae.dev;if(!cr)throw new Error("failed to call initLogConstructor");return Ae.dev=new cr(self,(function(e){return e>=3?Se.FINE:e>=2?Se.INFO:Se.OFF}))}function pe(e,t,r,n,o,a,i,c,l,u,s){return e}var Oe,fr,oi=new Set(["c","v","a","ad"]);function _e(e,t){return Oe||(Oe=self.document.createElement("a"),fr=self.__AMP_URL_CACHE||(self.__AMP_URL_CACHE=new Ye(100))),yt(Oe,e,t?null:fr)}function yt(e,t,r){if(r&&r.has(t))return r.get(t);e.href=t,e.protocol||(e.href=e.href);var n,o={href:e.href,protocol:e.protocol,host:e.host,hostname:e.hostname,port:"0"==e.port?"":e.port,pathname:e.pathname,search:e.search,hash:e.hash,origin:null};"/"!==o.pathname[0]&&(o.pathname="/"+o.pathname),("http:"==o.protocol&&80==o.port||"https:"==o.protocol&&443==o.port)&&(o.port="",o.host=o.hostname),n=e.origin&&"null"!=e.origin?e.origin:"data:"!=o.protocol&&o.host?o.protocol+"//"+o.host:o.href,o.origin=n;var a=ee()&&Object.freeze?Object.freeze(o):o;return r&&r.put(t,a),a}function Pe(e){return JSON.parse(e)}function re(e,t){try{return Pe(e)}catch(e){return null==t||t(e),null}}function Fe(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ot(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{!i&&null!=r.return&&r.return()}finally{if(c)throw a}}}}function Ot(e,t){if(e){if("string"==typeof e)return mr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mr(e,t)}}function mr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function vr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vr(Object(r),!0).forEach((function(t){_t(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Pt="EXPERIMENTS",Ft="amp-experiment-toggles",me="__AMP__EXPERIMENT_TOGGLES";function gr(e,t){return!!yr(e)[t]}function yr(e){var t,r,n,o,a;if(e[me])return e[me];e[me]=k();var i=e[me],c=dr(dr({},null!==(t=e.AMP_CONFIG)&&void 0!==t?t:{}),null!==(r=e.AMP_EXP)&&void 0!==r?r:Pe((null===(n=e.__AMP_EXP)||void 0===n?void 0:n.textContent)||"{}"));for(var l in c){var u=c[l];"number"==typeof u&&u>=0&&u<=1&&(i[l]=Math.random()<u)}var s=null===(o=e.AMP_CONFIG)||void 0===o?void 0:o["allow-doc-opt-in"];if(W(s)&&s.length){var f=e.document.head.querySelector('meta[name="amp-experiments-opt-in"]');if(f){var p,y=Fe(f.getAttribute("content").split(","));try{for(y.s();!(p=y.n()).done;){var d=p.value;s.includes(d)&&(i[d]=!0)}}catch(e){y.e(e)}finally{y.f()}}}Object.assign(i,Rt(e));var b=null===(a=e.AMP_CONFIG)||void 0===a?void 0:a["allow-url-opt-in"];if(W(b)&&b.length){var O,v=fe(e.location.originalHash||e.location.hash),m=Fe(b);try{for(m.s();!(O=m.n()).done;){var g=O.value,h=v["e-".concat(g)];"1"==h&&(i[g]=!0),"0"==h&&(i[g]=!1)}}catch(e){m.e(e)}finally{m.f()}}return i}function Rt(e){var t,r="";try{"localStorage"in e&&(r=e.localStorage.getItem(Ft))}catch(e){z().warn(Pt,"Failed to retrieve experiments from localStorage.")}var n,o=(null===(t=r)||void 0===t?void 0:t.split(/\s*,\s*/g))||[],a=k(),i=Fe(o);try{for(i.s();!(n=i.n()).done;){var c=n.value;!c||("-"==c[0]?a[c.substr(1)]=!1:a[c]=!0)}}catch(e){i.e(e)}finally{i.f()}return a}function hr(e,t){return gr(t,"3p-vendor-split")?"".concat(B.thirdParty,"/").concat($(),"/vendor/").concat(e,".js"):"".concat(B.thirdParty,"/").concat($(),"/f.js")}function xr(e,t){var r=t||"frame";return e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||Nt(e),"https://"+e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+".".concat(B.thirdPartyFrameHost,"/").concat($(),"/")+"".concat(r,".html")}function Nt(e){return"d-"+br(e)}function br(e){var t;if(e.crypto&&e.crypto.getRandomValues){var r=new Uint32Array(2);e.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(e.Math.random()).substr(2)+"0";return t}function Er(e){for(var t=0,r=e;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+br(e)}var It=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function Sr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Dt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Sr(Object(r),!0).forEach((function(t){Tt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Tt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wt(e,t){return jt(e)||Lt(e,t)||Ct(e,t)||Mt()}function Mt(){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 Ct(e,t){if(e){if("string"==typeof e)return Ar(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ar(e,t)}}function Ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Lt(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{!i&&null!=r.return&&r.return()}finally{if(c)throw o}}return a}}function jt(e){if(Array.isArray(e))return e}function Ut(e,t){if(null==e)return{};var r,n,o=kt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function kt(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var Re={},Or={EMBED_SIZE:"embed-size"},Ne="sync-xhr 'none'",Bt=ge().join(" ")+" "+ye().join(" ");function Ht(e,t){var r=e.allow,n=void 0===r?Ne:r,o=e.bootstrap,a=e.contextOptions,i=e.excludeSandbox,c=e.name,l=e.messageHandler,u=e.options,s=e.sandbox,f=void 0===s?Bt:s,p=e.src,y=e.type,d=e.title,b=void 0===d?y:d,O=Ut(e,It);if(!He(n,Ne))throw new Error("'allow' prop must contain \"".concat(Ne,'". Found "').concat(n,'".'));var v=j(null),m=j(null),g=de((function(){return Re[y]||(Re[y]=Ue()),Re[y]()}),[y]),h=wt(K({name:c,src:p}),2),P=h[0],S=P.name,_=P.src,E=h[1];return U((function(){var e,t,r=null===(e=v.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView,n=null!=p?p:r?xr(r):"about:blank";if(c)E({name:c,src:n});else if(r){var i=Object.assign(w({location:{href:r.location.href},sentinel:Er(r)}),a),l=Object.assign(w({title:b,type:y,_context:i}),u);E({name:JSON.stringify(w({host:_e(n).hostname,bootstrap:null!=o?o:hr(y,r),type:y,count:g,attributes:l})),src:n})}}),[o,a,g,c,u,p,b,y]),oe((function(){var e,t=null===(e=m.current)||void 0===e?void 0:e.node;t&&t.parentNode.insertBefore(t,t.nextSibling)}),[S]),Z(t,(function(){return{get readyState(){var e;return null===(e=m.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=m.current)||void 0===e?void 0:e.node}}}),[]),A(Ee,Dt({allow:n,contentRef:v,messageHandler:l,name:S,ref:m,ready:!!S,sandbox:i?void 0:f,src:_,title:b},O))}var Ie=T(Ht);Ie.displayName="ProxyIframeEmbed";var Vt="amp-";function _r(e){if(!Gt(e))return null;var t=e.indexOf("{");return pe(-1!=t),re(e.substr(t),(function(t){return z().error("MESSAGING","Failed to parse message: "+e,t)}))}function Gt(e){return"string"==typeof e&&0==e.indexOf(Vt)&&-1!=e.indexOf("{")}var Wt=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function Pr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pr(Object(r),!0).forEach((function(t){$t(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function $t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fr(e,t){return Jt(e)||qt(e,t)||Xt(e,t)||zt()}function zt(){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 Xt(e,t){if(e){if("string"==typeof e)return Rr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rr(e,t)}}function Rr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function qt(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{!i&&null!=r.return&&r.return()}finally{if(c)throw o}}return a}}function Jt(e){if(Array.isArray(e))return e}function Kt(e,t){if(null==e)return{};var r,n,o=Yt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function Yt(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var Zt="facebook",Qt="100%",en=function(){return!0},rn="Facebook comments";function tn(e,t){var r=e.action,n=e.colorscheme,o=e.embedAs,a=e.hideCover,i=e.hideCta,c=e.href,l=e.includeCommentParent,u=e.kdSite,s=e.layout,f=e.locale,p=e.numPosts,y=e.onReady,d=e.orderBy,b=e.refLabel,O=e.requestResize,v=e.share,m=e.showFacepile,g=e.showText,h=e.size,w=e.smallHeader,j=e.style,P=e.tabs,S=e.title,_=void 0===S?rn:S,E=Kt(e,Wt),x=Fr(K(null),2),R=x[0],M=x[1],N=ie((function(e){var t,r=null!==(t=re(e.data))&&void 0!==t?t:_r(e.data);if("ready"==r.action&&(null==y||y()),r.type==Or.EMBED_SIZE){var n=r.height;O?(O(n),M(Qt)):M(n)}}),[O,y]),D=Fr(K(f),2),I=D[0],F=D[1];return U((function(){var e,r;if(f)F(f);else{var n=null==t||null===(e=t.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView;!n||F(Be(n.navigator.language))}}),[f,t]),A(Ie,ve(ve({options:{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:i,href:c,includeCommentParent:l,kd_site:u,layout:s,locale:I,numPosts:p,orderBy:d,ref:b,share:v,showFacepile:m,showText:g,size:h,smallHeader:w,tabs:P},ref:t,title:_},E),{},{excludeSandbox:!0,matchesMessagingOrigin:en,messageHandler:N,type:Zt,style:R?ve(ve({},j),{},{height:R}):j}))}var Nr=T(tn);Nr.displayName="Facebook"; | ||
var Or=Object.create,te=Object.defineProperty,_r=Object.getOwnPropertyDescriptor,Pr=Object.getOwnPropertyNames,Fr=Object.getPrototypeOf,Rr=Object.prototype.hasOwnProperty,Ie=function(e){return te(e,"__esModule",{value:!0})},Nr=function(e,r){for(var t in Ie(e),r)te(e,t,{get:r[t],enumerable:!0})},Ir=function(e,r,t){if(r&&"object"==typeof r||"function"==typeof r)for(var n,o=Pr(r),a=0,i=o.length;a<i;a++)n=o[a],!Rr.call(e,n)&&"default"!==n&&te(e,n,{get:function(e){return r[e]}.bind(null,n),enumerable:!(t=_r(r,n))||t.enumerable});return e},ne=function(e){return Ir(Ie(te(null!=e?Or(Fr(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};Nr(exports,{Facebook:function(){return Er}});var H=ne(require("react")),De=ne(require("react-dom")),p=ne(require("react"));function g(e,r,t){return H.createElement.apply(void 0,arguments)}function Te(e){return H.createContext(e,void 0)}function z(e){return p.useState(e)}function j(e){return p.useRef(e)}function oe(e,r){p.useEffect(e,r)}function U(e,r){p.useLayoutEffect(e,r)}function we(e){return p.useContext(e)}function me(e,r){return p.useMemo(e,r)}function ie(e,r){return p.useCallback(e,r)}function K(e,r,t){return p.useImperativeHandle(e,r,t)}var ve=function(){return["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"]},de=function(){return["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"]};function Me(){var e=0;return function(){return String(++e)}}var Ce=Object.prototype,Xt=Ce.hasOwnProperty,qt=Ce.toString;function Y(e){var r=Object.create(null);return e&&Object.assign(r,e),r}function D(e){return e||{}}function Le(e){return e.replace("-","_")}function je(e,r,t){return"number"!=typeof t&&(t=0),!(t+r.length>e.length)&&-1!==e.indexOf(r,t)}var X,ae=ne(require("react"));function F(e){return ae.forwardRef(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}var x={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},Dr=[x.AUTO,x.LAZY,x.EAGER,x.UNLOAD],Ue=(ue(X={},x.AUTO,0),ue(X,x.LAZY,1),ue(X,x.EAGER,2),ue(X,x.UNLOAD,3),X);function ke(e,r){var t=Ue[e]||0,n=Ue[r]||0,o=Math.max(t,n);return Dr[o]}var Z={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},Tr=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function Be(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 T(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?Be(Object(t),!0).forEach((function(r){wr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Be(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function wr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Mr(e,r){if(null==e)return{};var t,n,o=Cr(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 Cr(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 Lr=[null,"paint","layout","content","size","size paint","size layout","strict"],jr={position:"relative",width:"100%",height:"100%"};function Ur(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,s=e.contentRef,f=e.contentStyle,p=e.layout,y=void 0!==p&&p,d=e.paint,b=void 0!==d&&d,O=e.size,m=void 0!==O&&O,v=e.style,h=e.wrapperClassName,w=e.wrapperStyle,j=(m?4:0)+(y?2:0)+(b?1:0);return g(n,T(T({},Mr(e,Tr)),{},{ref:r,className:"".concat(a||""," ").concat(h||"").trim()||null,style:T(T(T({},v),w),{},{contain:Lr[j]})}),g(c,T(T({},u),{},{ref:s,className:l,style:T(T({},m&&jr),{},{overflow:b?"hidden":"visible"},f)}),o))}var ge=F(Ur),kr=["as","children","className","style","wrapperClassName","wrapperStyle"];function He(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 se(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?He(Object(t),!0).forEach((function(r){Br(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):He(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Br(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Hr(e,r){if(null==e)return{};var t,n,o=Vr(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 Vr(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 Gr(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 g(n,se(se({},Hr(e,kr)),{},{ref:r,className:"".concat(a||""," ").concat(c||"").trim()||null,style:se(se({},i),l)}),o)}var Ve,Wr=F(Gr);function ye(e){var r=j(null);return r.current=e,r}function $r(){return Ve||(Ve=Te({renderable:!0,playable:!0,loading:x.AUTO}))}function he(){return we($r())}function Ge(e){return ke(e,he().loading)}var zr=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function We(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 ce(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?We(Object(t),!0).forEach((function(r){Xr(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):We(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Xr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function qr(e,r){if(null==e)return{};var t,n,o=Jr(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 Jr(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 Kr=function(){return!1},Yr="about:blank",Zr=function(e){return e&&e!=Yr&&!e.includes("#")};function Qr(e,r){var t=e.allow,n=e.allowFullScreen,o=e.allowTransparency,a=e.iframeStyle,i=e.name,c=e.title,l=e.matchesMessagingOrigin,u=void 0===l?Kr:l,s=e.messageHandler,f=e.ready,p=void 0===f||f,y=e.loading,d=e.onReadyState,b=e.sandbox,O=e.src,m=qr(e,zr),v=he().playable,h=Ge(y),w=h!==x.UNLOAD,P=j(!1),S=ye(d),_=ie((function(e){if(e!==P.current){P.current=e;var r=S.current;null==r||r(e?Z.COMPLETE:Z.LOADING)}}),[S]),E=j(null);return K(r,(function(){return{get readyState(){return P.current?Z.COMPLETE:Z.LOADING},get node(){return E.current}}}),[]),U((function(){w||_(!1)}),[w,_]),oe((function(){var e=E.current;if(!v&&e){var r=e.src;if(Zr(r))e.src=e.src;else e.parentNode.insertBefore(e,e.nextSibling)}}),[v]),U((function(){var e=E.current;if(e&&w){var r=function(e){var r=E.current;!r||e.source!=r.contentWindow||!u(e.origin)||s(e)},t=e.ownerDocument.defaultView;return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}}),[u,s,w,p]),g(ge,ce(ce({},m),{},{layout:!0,size:!0,paint:!0}),w&&p&&g("iframe",{allow:t,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:h,name:i,onLoad:function(){return _(!0)},part:"iframe",ref:E,sandbox:b,scrolling:"no",src:O,style:ce(ce({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:c}))}var xe=F(Qr);xe.displayName="IframeEmbed";var y=self.AMP_CONFIG||{},et=("string"==typeof y.thirdPartyFrameRegex?new RegExp(y.thirdPartyFrameRegex):y.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,$e=("string"==typeof y.cdnProxyRegex?new RegExp(y.cdnProxyRegex):y.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function ze(e){if(!self.document||!self.document.head||self.location&&$e.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var V={thirdParty:y.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:y.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:et,cdn:y.cdnUrl||ze("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:$e,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:y.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:y.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:y.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:y.geoApiUrl||ze("amp-geo-api")};function le(){return!1}function Q(e){var r;if(!le())return!1;var t=e||self;return!!(null!==(r=t.AMP_CONFIG)&&void 0!==r&&r.test||t.__AMP_TEST||t.__karma__)}var ee=Array.isArray;function tr(e){return JSON.parse(e)}function re(e,r){try{return tr(e)}catch(e){return null==r||r(e),null}}function q(){return"2107150011000"}var be={OFF:0,ERROR:1,WARN:2,INFO:3,FINE:4};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var Ee=self.__AMP_LOG,ir=null;function J(){if(Ee.dev)return Ee.dev;if(!ir)throw new Error("failed to call initLogConstructor");return Ee.dev=new ir(self,(function(e){return e>=3?be.FINE:e>=2?be.INFO:be.OFF}))}function fe(e,r,t,n,o,a,i,c,l,u,s){return e}function pt(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function ur(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function mt(e,r,t){return r&&ur(e.prototype,r),t&&ur(e,t),e}var Se,cr,sr=function(){function e(r){pt(this,e),this.capacity_=r,this.size_=0,this.access_=0,this.cache_=Y()}return mt(e,[{key:"has",value:function(e){return!!this.cache_[e]}},{key:"get",value:function(e){var r=this.cache_[e];if(r)return r.access=++this.access_,r.payload}},{key:"put",value:function(e,r){this.has(e)||this.size_++,this.cache_[e]={payload:r,access:this.access_},this.evict_()}},{key:"evict_",value:function(){if(!(this.size_<=this.capacity_)){var e,r=this.cache_,t=this.access_+1;for(var n in r){var o=r[n].access;o<t&&(t=o,e=n)}void 0!==e&&(delete r[e],this.size_--)}}}]),e}(),Va=new Set(["c","v","a","ad"]);function Ae(e,r){return Se||(Se=self.document.createElement("a"),cr=self.__AMP_URL_CACHE||(self.__AMP_URL_CACHE=new sr(100))),vt(Se,e,r?null:cr)}function vt(e,r,t){if(t&&t.has(r))return t.get(r);e.href=r,e.protocol||(e.href=e.href);var n,o={href:e.href,protocol:e.protocol,host:e.host,hostname:e.hostname,port:"0"==e.port?"":e.port,pathname:e.pathname,search:e.search,hash:e.hash,origin:null};"/"!==o.pathname[0]&&(o.pathname="/"+o.pathname),("http:"==o.protocol&&80==o.port||"https:"==o.protocol&&443==o.port)&&(o.port="",o.host=o.hostname),n=e.origin&&"null"!=e.origin?e.origin:"data:"!=o.protocol&&o.host?o.protocol+"//"+o.host:o.href,o.origin=n;var a=Q()&&Object.freeze?Object.freeze(o):o;return t&&t.put(r,a),a}function lr(e){return"".concat(V.thirdParty,"/").concat(q(),"/vendor/").concat(e).concat(".js")}function fr(e,r){var t=r||"frame";return e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||dt(e),"https://"+e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+".".concat(V.thirdPartyFrameHost,"/").concat(q(),"/")+"".concat(t,".html")}function dt(e){return"d-"+pr(e)}function pr(e){var r;if(e.crypto&&e.crypto.getRandomValues){var t=new Uint32Array(2);e.crypto.getRandomValues(t),r=String(t[0])+t[1]}else r=String(e.Math.random()).substr(2)+"0";return r}function mr(e){for(var r=0,t=e;t&&t!=t.parent;t=t.parent)r++;return String(r)+"-"+pr(e)}var gt=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function vr(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 yt(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?vr(Object(t),!0).forEach((function(r){ht(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vr(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function ht(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function xt(e,r){return At(e)||St(e,r)||Et(e,r)||bt()}function bt(){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 Et(e,r){if(e){if("string"==typeof e)return dr(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 dr(e,r)}}function dr(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 St(e,r){var t=null==e?null:"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 At(e){if(Array.isArray(e))return e}function Ot(e,r){if(null==e)return{};var t,n,o=_t(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 _t(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 Oe={},gr={EMBED_SIZE:"embed-size"},_e="sync-xhr 'none'",Pt=ve().join(" ")+" "+de().join(" ");function Ft(e,r){var t=e.allow,n=void 0===t?_e:t,o=e.bootstrap,a=e.contextOptions,i=e.excludeSandbox,c=e.name,l=e.messageHandler,u=e.options,s=e.sandbox,f=void 0===s?Pt:s,p=e.src,y=e.type,d=e.title,b=void 0===d?y:d,O=Ot(e,gt);if(!je(n,_e))throw new Error("'allow' prop must contain \"".concat(_e,'". Found "').concat(n,'".'));var m=j(null),v=j(null),h=me((function(){return Oe[y]||(Oe[y]=Me()),Oe[y]()}),[y]),w=xt(z({name:c,src:p}),2),P=w[0],S=P.name,x=P.src,_=w[1];return U((function(){var e,r,t=null===(e=m.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView,n=null!=p?p:t?fr(t):"about:blank";if(c)_({name:c,src:n});else if(t){var i=Object.assign(D({location:{href:t.location.href},sentinel:mr(t)}),a),l=Object.assign(D({title:b,type:y,_context:i}),u);_({name:JSON.stringify(D({host:Ae(n).hostname,bootstrap:null!=o?o:lr(y),type:y,count:h,attributes:l})),src:n})}}),[o,a,h,c,u,p,b,y]),oe((function(){var e,r=null===(e=v.current)||void 0===e?void 0:e.node;r&&r.parentNode.insertBefore(r,r.nextSibling)}),[S]),K(r,(function(){return{get readyState(){var e;return null===(e=v.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=v.current)||void 0===e?void 0:e.node}}}),[]),g(xe,yt({allow:n,contentRef:m,messageHandler:l,name:S,ref:v,ready:!!S,sandbox:i?void 0:f,src:x,title:b},O))}var Pe=F(Ft);Pe.displayName="ProxyIframeEmbed";var Rt="amp-";function yr(e){if(!Nt(e))return null;var r=e.indexOf("{");return fe(-1!=r),re(e.substr(r),(function(r){return J().error("MESSAGING","Failed to parse message: "+e,r)}))}function Nt(e){return"string"==typeof e&&0==e.indexOf(Rt)&&-1!=e.indexOf("{")}var It=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function hr(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 pe(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?hr(Object(t),!0).forEach((function(r){Dt(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hr(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function Dt(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function xr(e,r){return Ct(e)||Mt(e,r)||wt(e,r)||Tt()}function Tt(){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 wt(e,r){if(e){if("string"==typeof e)return br(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 br(e,r)}}function br(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 Mt(e,r){var t=null==e?null:"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 Ct(e){if(Array.isArray(e))return e}function Lt(e,r){if(null==e)return{};var t,n,o=jt(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 jt(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 Ut="facebook",kt="100%",Bt=function(){return!0},Ht="Facebook comments";function Vt(e,r){var t=e.action,n=e.colorscheme,o=e.embedAs,a=e.hideCover,i=e.hideCta,c=e.href,l=e.includeCommentParent,u=e.kdSite,s=e.layout,f=e.locale,p=e.numPosts,y=e.onReady,d=e.orderBy,b=e.refLabel,O=e.requestResize,m=e.share,v=e.showFacepile,h=e.showText,w=e.size,j=e.smallHeader,P=e.style,S=e.tabs,x=e.title,_=void 0===x?Ht:x,E=Lt(e,It),A=xr(z(null),2),D=A[0],R=A[1],N=ie((function(e){var r,t=null!==(r=re(e.data))&&void 0!==r?r:yr(e.data);if("ready"==t.action&&(null==y||y()),t.type==gr.EMBED_SIZE){var n=t.height;O?(O(n),R(kt)):R(n)}}),[O,y]),T=xr(z(f),2),F=T[0],I=T[1];return U((function(){var e,t;if(f)I(f);else{var n=null==r||null===(e=r.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;!n||I(Le(n.navigator.language))}}),[f,r]),g(Pe,pe(pe({options:{action:t,colorscheme:n,embedAs:o,hideCover:a,hideCta:i,href:c,includeCommentParent:l,kd_site:u,layout:s,locale:F,numPosts:p,orderBy:d,ref:b,share:m,showFacepile:v,showText:h,size:w,smallHeader:j,tabs:S},ref:r,title:_},E),{},{excludeSandbox:!0,matchesMessagingOrigin:Bt,messageHandler:N,type:Ut,style:D?pe(pe({},P),{},{height:D}):P}))}var Er=F(Vt);Er.displayName="Facebook"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-react.js.map |
@@ -418,2 +418,30 @@ var __create = Object.create; | ||
// src/config.js | ||
var env = self.AMP_CONFIG || {}; | ||
var thirdPartyFrameRegex = (typeof env["thirdPartyFrameRegex"] == "string" ? new RegExp(env["thirdPartyFrameRegex"]) : env["thirdPartyFrameRegex"]) || /^d-\d+\.ampproject\.net$/; | ||
var cdnProxyRegex = (typeof env["cdnProxyRegex"] == "string" ? new RegExp(env["cdnProxyRegex"]) : env["cdnProxyRegex"]) || /^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/; | ||
function getMetaUrl(name) { | ||
if (!self.document || !self.document.head) { | ||
return null; | ||
} | ||
if (self.location && cdnProxyRegex.test(self.location.origin)) { | ||
return null; | ||
} | ||
var metaEl = self.document.head.querySelector('meta[name="' + name + '"]'); | ||
return metaEl && metaEl.getAttribute("content") || null; | ||
} | ||
var urls = { | ||
thirdParty: env["thirdPartyUrl"] || "https://3p.ampproject.net", | ||
thirdPartyFrameHost: env["thirdPartyFrameHost"] || "ampproject.net", | ||
thirdPartyFrameRegex: thirdPartyFrameRegex, | ||
cdn: env["cdnUrl"] || getMetaUrl("runtime-host") || "https://cdn.ampproject.org", | ||
cdnProxyRegex: cdnProxyRegex, | ||
localhostRegex: /^https?:\/\/localhost(:\d+)?$/, | ||
errorReporting: env["errorReportingUrl"] || "https://us-central1-amp-error-reporting.cloudfunctions.net/r", | ||
betaErrorReporting: env["betaErrorReportingUrl"] || "https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta", | ||
localDev: env["localDev"] || false, | ||
trustedViewerHosts: [/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/, /(^|\.)gmail\.(com|dev)$/], | ||
geoApi: env["geoApiUrl"] || getMetaUrl("amp-geo-api") | ||
}; | ||
// src/core/mode/for-testing.js | ||
@@ -445,88 +473,18 @@ function isFortesting() { | ||
// src/core/data-structures/lru-cache.js | ||
function _classCallCheck(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) { | ||
throw new TypeError("Cannot call a class as a function"); | ||
} | ||
// src/core/types/array.js | ||
var isArray = Array.isArray; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) | ||
descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) | ||
_defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) | ||
_defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
var LruCache = /* @__PURE__ */ function() { | ||
function LruCache2(capacity) { | ||
_classCallCheck(this, LruCache2); | ||
this.capacity_ = capacity; | ||
this.size_ = 0; | ||
this.access_ = 0; | ||
this.cache_ = map(); | ||
} | ||
_createClass(LruCache2, [{ | ||
key: "has", | ||
value: function has(key) { | ||
return !!this.cache_[key]; | ||
} | ||
}, { | ||
key: "get", | ||
value: function get(key) { | ||
var cacheable = this.cache_[key]; | ||
if (cacheable) { | ||
cacheable.access = ++this.access_; | ||
return cacheable.payload; | ||
} | ||
return void 0; | ||
} | ||
}, { | ||
key: "put", | ||
value: function put(key, payload) { | ||
if (!this.has(key)) { | ||
this.size_++; | ||
} | ||
this.cache_[key] = { | ||
payload: payload, | ||
access: this.access_ | ||
}; | ||
this.evict_(); | ||
} | ||
}, { | ||
key: "evict_", | ||
value: function evict_() { | ||
if (this.size_ <= this.capacity_) { | ||
return; | ||
} | ||
var cache = this.cache_; | ||
var oldest = this.access_ + 1; | ||
var oldestKey; | ||
for (var key in cache) { | ||
var access = cache[key].access; | ||
if (access < oldest) { | ||
oldest = access; | ||
oldestKey = key; | ||
} | ||
} | ||
if (oldestKey !== void 0) { | ||
delete cache[oldestKey]; | ||
this.size_--; | ||
} | ||
} | ||
}]); | ||
return LruCache2; | ||
}(); | ||
// src/core/types/array.js | ||
var isArray = Array.isArray; | ||
// src/core/types/string/url.js | ||
@@ -558,33 +516,5 @@ var QUERY_STRING_REGEX = /(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g; | ||
// src/config.js | ||
var env = self.AMP_CONFIG || {}; | ||
var thirdPartyFrameRegex = (typeof env["thirdPartyFrameRegex"] == "string" ? new RegExp(env["thirdPartyFrameRegex"]) : env["thirdPartyFrameRegex"]) || /^d-\d+\.ampproject\.net$/; | ||
var cdnProxyRegex = (typeof env["cdnProxyRegex"] == "string" ? new RegExp(env["cdnProxyRegex"]) : env["cdnProxyRegex"]) || /^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/; | ||
function getMetaUrl(name) { | ||
if (!self.document || !self.document.head) { | ||
return null; | ||
} | ||
if (self.location && cdnProxyRegex.test(self.location.origin)) { | ||
return null; | ||
} | ||
var metaEl = self.document.head.querySelector('meta[name="' + name + '"]'); | ||
return metaEl && metaEl.getAttribute("content") || null; | ||
} | ||
var urls = { | ||
thirdParty: env["thirdPartyUrl"] || "https://3p.ampproject.net", | ||
thirdPartyFrameHost: env["thirdPartyFrameHost"] || "ampproject.net", | ||
thirdPartyFrameRegex: thirdPartyFrameRegex, | ||
cdn: env["cdnUrl"] || getMetaUrl("runtime-host") || "https://cdn.ampproject.org", | ||
cdnProxyRegex: cdnProxyRegex, | ||
localhostRegex: /^https?:\/\/localhost(:\d+)?$/, | ||
errorReporting: env["errorReportingUrl"] || "https://us-central1-amp-error-reporting.cloudfunctions.net/r", | ||
betaErrorReporting: env["betaErrorReportingUrl"] || "https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta", | ||
localDev: env["localDev"] || false, | ||
trustedViewerHosts: [/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/, /(^|\.)gmail\.(com|dev)$/], | ||
geoApi: env["geoApiUrl"] || getMetaUrl("amp-geo-api") | ||
}; | ||
// src/internal-version.js | ||
function internalRuntimeVersion() { | ||
return "2107140004000"; | ||
return "2107150011000"; | ||
} | ||
@@ -659,3 +589,3 @@ | ||
} | ||
function devAssert(shouldBeTrueish, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9) { | ||
function devAssert2(shouldBeTrueish, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9) { | ||
if (getMode().minified) { | ||
@@ -670,2 +600,85 @@ return shouldBeTrueish; | ||
// src/core/data-structures/lru-cache.js | ||
function _classCallCheck(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) { | ||
throw new TypeError("Cannot call a class as a function"); | ||
} | ||
} | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) | ||
descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) | ||
_defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) | ||
_defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
var LruCache = /* @__PURE__ */ function() { | ||
function LruCache2(capacity) { | ||
_classCallCheck(this, LruCache2); | ||
this.capacity_ = capacity; | ||
this.size_ = 0; | ||
this.access_ = 0; | ||
this.cache_ = map(); | ||
} | ||
_createClass(LruCache2, [{ | ||
key: "has", | ||
value: function has(key) { | ||
return !!this.cache_[key]; | ||
} | ||
}, { | ||
key: "get", | ||
value: function get(key) { | ||
var cacheable = this.cache_[key]; | ||
if (cacheable) { | ||
cacheable.access = ++this.access_; | ||
return cacheable.payload; | ||
} | ||
return void 0; | ||
} | ||
}, { | ||
key: "put", | ||
value: function put(key, payload) { | ||
if (!this.has(key)) { | ||
this.size_++; | ||
} | ||
this.cache_[key] = { | ||
payload: payload, | ||
access: this.access_ | ||
}; | ||
this.evict_(); | ||
} | ||
}, { | ||
key: "evict_", | ||
value: function evict_() { | ||
if (this.size_ <= this.capacity_) { | ||
return; | ||
} | ||
var cache = this.cache_; | ||
var oldest = this.access_ + 1; | ||
var oldestKey; | ||
for (var key in cache) { | ||
var access = cache[key].access; | ||
if (access < oldest) { | ||
oldest = access; | ||
oldestKey = key; | ||
} | ||
} | ||
if (oldestKey !== void 0) { | ||
delete cache[oldestKey]; | ||
this.size_--; | ||
} | ||
} | ||
}]); | ||
return LruCache2; | ||
}(); | ||
// src/url.js | ||
@@ -733,156 +746,11 @@ var SERVING_TYPE_PREFIX = new Set([ | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/experiments/index.js | ||
function _createForOfIteratorHelperLoose(o, allowArrayLike) { | ||
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; | ||
if (it) | ||
return (it = it.call(o)).next.bind(it); | ||
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { | ||
if (it) | ||
o = it; | ||
var i = 0; | ||
return function() { | ||
if (i >= o.length) | ||
return { done: true }; | ||
return { done: false, value: o[i++] }; | ||
}; | ||
} | ||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | ||
} | ||
function _unsupportedIterableToArray(o, minLen) { | ||
if (!o) | ||
return; | ||
if (typeof o === "string") | ||
return _arrayLikeToArray(o, minLen); | ||
var n = Object.prototype.toString.call(o).slice(8, -1); | ||
if (n === "Object" && o.constructor) | ||
n = o.constructor.name; | ||
if (n === "Map" || n === "Set") | ||
return Array.from(o); | ||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) | ||
return _arrayLikeToArray(o, minLen); | ||
} | ||
function _arrayLikeToArray(arr, len) { | ||
if (len == null || len > arr.length) | ||
len = arr.length; | ||
for (var i = 0, arr2 = new Array(len); i < len; i++) { | ||
arr2[i] = arr[i]; | ||
} | ||
return arr2; | ||
} | ||
function _extends4() { | ||
_extends4 = Object.assign || function(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends4.apply(this, arguments); | ||
} | ||
var TAG = "EXPERIMENTS"; | ||
var LOCAL_STORAGE_KEY = "amp-experiment-toggles"; | ||
var TOGGLES_WINDOW_PROPERTY = "__AMP__EXPERIMENT_TOGGLES"; | ||
function isExperimentOn(win, experimentId) { | ||
var toggles = experimentToggles(win); | ||
return !!toggles[experimentId]; | ||
} | ||
function experimentToggles(win) { | ||
var _win$AMP_CONFIG3, _win$AMP_EXP, _win$__AMP_EXP, _win$AMP_CONFIG4, _win$AMP_CONFIG5; | ||
if (win[TOGGLES_WINDOW_PROPERTY]) { | ||
return win[TOGGLES_WINDOW_PROPERTY]; | ||
} | ||
win[TOGGLES_WINDOW_PROPERTY] = map(); | ||
var toggles = win[TOGGLES_WINDOW_PROPERTY]; | ||
var buildExperimentConfigs = _extends4({}, (_win$AMP_CONFIG3 = win.AMP_CONFIG) != null ? _win$AMP_CONFIG3 : {}, (_win$AMP_EXP = win.AMP_EXP) != null ? _win$AMP_EXP : parseJson(((_win$__AMP_EXP = win.__AMP_EXP) == null ? void 0 : _win$__AMP_EXP.textContent) || "{}")); | ||
for (var experimentId in buildExperimentConfigs) { | ||
var frequency = buildExperimentConfigs[experimentId]; | ||
if (typeof frequency === "number" && frequency >= 0 && frequency <= 1) { | ||
toggles[experimentId] = Math.random() < frequency; | ||
} | ||
} | ||
var allowedDocOptIn = (_win$AMP_CONFIG4 = win.AMP_CONFIG) == null ? void 0 : _win$AMP_CONFIG4["allow-doc-opt-in"]; | ||
if (isArray(allowedDocOptIn) && allowedDocOptIn.length) { | ||
var meta = win.document.head.querySelector('meta[name="amp-experiments-opt-in"]'); | ||
if (meta) { | ||
var optedInExperiments = meta.getAttribute("content").split(","); | ||
for (var _iterator = _createForOfIteratorHelperLoose(optedInExperiments), _step; !(_step = _iterator()).done; ) { | ||
var experiment = _step.value; | ||
if (dev().assertArray(allowedDocOptIn).includes(experiment)) { | ||
toggles[experiment] = true; | ||
} | ||
} | ||
} | ||
} | ||
Object.assign(toggles, getExperimentToggles(win)); | ||
var allowedUrlOptIn = (_win$AMP_CONFIG5 = win.AMP_CONFIG) == null ? void 0 : _win$AMP_CONFIG5["allow-url-opt-in"]; | ||
if (isArray(allowedUrlOptIn) && allowedUrlOptIn.length) { | ||
var hash = win.location["originalHash"] || win.location.hash; | ||
var params = parseQueryString(hash); | ||
for (var _iterator2 = _createForOfIteratorHelperLoose(allowedUrlOptIn), _step2; !(_step2 = _iterator2()).done; ) { | ||
var _experiment = _step2.value; | ||
var param = params["e-" + _experiment]; | ||
if (param == "1") { | ||
toggles[_experiment] = true; | ||
} | ||
if (param == "0") { | ||
toggles[_experiment] = false; | ||
} | ||
} | ||
} | ||
return toggles; | ||
} | ||
function getExperimentToggles(win) { | ||
var _experimentsString; | ||
var experimentsString = ""; | ||
try { | ||
if ("localStorage" in win) { | ||
experimentsString = win.localStorage.getItem(LOCAL_STORAGE_KEY); | ||
} | ||
} catch (_unused) { | ||
dev().warn(TAG, "Failed to retrieve experiments from localStorage."); | ||
} | ||
var tokens = ((_experimentsString = experimentsString) == null ? void 0 : _experimentsString.split(/\s*,\s*/g)) || []; | ||
var toggles = map(); | ||
for (var _iterator3 = _createForOfIteratorHelperLoose(tokens), _step3; !(_step3 = _iterator3()).done; ) { | ||
var token = _step3.value; | ||
if (!token) { | ||
continue; | ||
} | ||
if (token[0] == "-") { | ||
toggles[token.substr(1)] = false; | ||
} else { | ||
toggles[token] = true; | ||
} | ||
} | ||
return toggles; | ||
} | ||
// src/3p-frame.js | ||
var overrideBootstrapBaseUrl; | ||
function getBootstrapUrl(type, win) { | ||
function getBootstrapUrl(type) { | ||
var extension = false ? ".mjs" : ".js"; | ||
if (getMode().localDev || getMode().test) { | ||
var filename = getMode().minified ? "./vendor/" + type + "." : "./vendor/" + type + ".max."; | ||
return false ? filename + "mjs" : filename + "js"; | ||
var filename = getMode().minified ? "./vendor/" + type : "./vendor/" + type + ".max"; | ||
return filename + extension; | ||
} | ||
if (isExperimentOn(win, "3p-vendor-split")) { | ||
return false ? urls.thirdParty + "/" + internalRuntimeVersion() + "/vendor/" + type + ".mjs" : urls.thirdParty + "/" + internalRuntimeVersion() + "/vendor/" + type + ".js"; | ||
} | ||
return urls.thirdParty + "/" + internalRuntimeVersion() + "/f.js"; | ||
return urls.thirdParty + "/" + internalRuntimeVersion() + "/vendor/" + type + extension; | ||
} | ||
@@ -931,4 +799,4 @@ function getDefaultBootstrapBaseUrl(parentWindow, opt_srcFileBasename) { | ||
var _excluded4 = ["allow", "bootstrap", "contextOptions", "excludeSandbox", "name", "messageHandler", "options", "sandbox", "src", "type", "title"]; | ||
function _extends5() { | ||
_extends5 = Object.assign || function(target) { | ||
function _extends4() { | ||
_extends4 = Object.assign || function(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
@@ -944,3 +812,3 @@ var source = arguments[i]; | ||
}; | ||
return _extends5.apply(this, arguments); | ||
return _extends4.apply(this, arguments); | ||
} | ||
@@ -1012,3 +880,3 @@ function _objectWithoutPropertiesLoose4(source, excluded) { | ||
"host": parseUrlDeprecated(src2).hostname, | ||
"bootstrap": bootstrap != null ? bootstrap : getBootstrapUrl(type, win), | ||
"bootstrap": bootstrap != null ? bootstrap : getBootstrapUrl(type), | ||
"type": type, | ||
@@ -1042,3 +910,3 @@ "count": count, | ||
}, []); | ||
return createElement2(IframeEmbed, _extends5({ | ||
return createElement2(IframeEmbed, _extends4({ | ||
allow: allow, | ||
@@ -1065,3 +933,3 @@ contentRef: contentRef, | ||
var startPos = message.indexOf("{"); | ||
devAssert(startPos != -1, "JSON missing in %s", message); | ||
devAssert2(startPos != -1, "JSON missing in %s", message); | ||
return tryParseJson(message.substr(startPos), function(e) { | ||
@@ -1077,4 +945,4 @@ return dev().error("MESSAGING", "Failed to parse message: " + message, e); | ||
var _excluded5 = ["action", "colorscheme", "embedAs", "hideCover", "hideCta", "href", "includeCommentParent", "kdSite", "layout", "locale", "numPosts", "onReady", "orderBy", "refLabel", "requestResize", "share", "showFacepile", "showText", "size", "smallHeader", "style", "tabs", "title"]; | ||
function _extends6() { | ||
_extends6 = Object.assign || function(target) { | ||
function _extends5() { | ||
_extends5 = Object.assign || function(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
@@ -1090,3 +958,3 @@ var source = arguments[i]; | ||
}; | ||
return _extends6.apply(this, arguments); | ||
return _extends5.apply(this, arguments); | ||
} | ||
@@ -1145,3 +1013,3 @@ function _objectWithoutPropertiesLoose5(source, excluded) { | ||
}, [localeProp, ref]); | ||
return createElement2(ProxyIframeEmbed, _extends6({ | ||
return createElement2(ProxyIframeEmbed, _extends5({ | ||
options: { | ||
@@ -1175,3 +1043,3 @@ action: action, | ||
type: TYPE, | ||
style: height ? _extends6({}, style, { | ||
style: height ? _extends5({}, style, { | ||
height: height | ||
@@ -1178,0 +1046,0 @@ }) : style |
@@ -435,2 +435,30 @@ // src/preact/index.js | ||
// src/config.js | ||
var env = self.AMP_CONFIG || {}; | ||
var thirdPartyFrameRegex = (typeof env["thirdPartyFrameRegex"] == "string" ? new RegExp(env["thirdPartyFrameRegex"]) : env["thirdPartyFrameRegex"]) || /^d-\d+\.ampproject\.net$/; | ||
var cdnProxyRegex = (typeof env["cdnProxyRegex"] == "string" ? new RegExp(env["cdnProxyRegex"]) : env["cdnProxyRegex"]) || /^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/; | ||
function getMetaUrl(name) { | ||
if (!self.document || !self.document.head) { | ||
return null; | ||
} | ||
if (self.location && cdnProxyRegex.test(self.location.origin)) { | ||
return null; | ||
} | ||
const metaEl = self.document.head.querySelector(`meta[name="${name}"]`); | ||
return metaEl && metaEl.getAttribute("content") || null; | ||
} | ||
var urls = { | ||
thirdParty: env["thirdPartyUrl"] || "https://3p.ampproject.net", | ||
thirdPartyFrameHost: env["thirdPartyFrameHost"] || "ampproject.net", | ||
thirdPartyFrameRegex, | ||
cdn: env["cdnUrl"] || getMetaUrl("runtime-host") || "https://cdn.ampproject.org", | ||
cdnProxyRegex, | ||
localhostRegex: /^https?:\/\/localhost(:\d+)?$/, | ||
errorReporting: env["errorReportingUrl"] || "https://us-central1-amp-error-reporting.cloudfunctions.net/r", | ||
betaErrorReporting: env["betaErrorReportingUrl"] || "https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta", | ||
localDev: env["localDev"] || false, | ||
trustedViewerHosts: [/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/, /(^|\.)gmail\.(com|dev)$/], | ||
geoApi: env["geoApiUrl"] || getMetaUrl("amp-geo-api") | ||
}; | ||
// src/core/mode/for-testing.js | ||
@@ -462,6 +490,14 @@ function isFortesting() { | ||
// src/core/types/array.js | ||
var { | ||
isArray | ||
} = Array; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
@@ -491,33 +527,5 @@ // src/core/types/string/url.js | ||
// src/config.js | ||
var env = self.AMP_CONFIG || {}; | ||
var thirdPartyFrameRegex = (typeof env["thirdPartyFrameRegex"] == "string" ? new RegExp(env["thirdPartyFrameRegex"]) : env["thirdPartyFrameRegex"]) || /^d-\d+\.ampproject\.net$/; | ||
var cdnProxyRegex = (typeof env["cdnProxyRegex"] == "string" ? new RegExp(env["cdnProxyRegex"]) : env["cdnProxyRegex"]) || /^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/; | ||
function getMetaUrl(name) { | ||
if (!self.document || !self.document.head) { | ||
return null; | ||
} | ||
if (self.location && cdnProxyRegex.test(self.location.origin)) { | ||
return null; | ||
} | ||
const metaEl = self.document.head.querySelector(`meta[name="${name}"]`); | ||
return metaEl && metaEl.getAttribute("content") || null; | ||
} | ||
var urls = { | ||
thirdParty: env["thirdPartyUrl"] || "https://3p.ampproject.net", | ||
thirdPartyFrameHost: env["thirdPartyFrameHost"] || "ampproject.net", | ||
thirdPartyFrameRegex, | ||
cdn: env["cdnUrl"] || getMetaUrl("runtime-host") || "https://cdn.ampproject.org", | ||
cdnProxyRegex, | ||
localhostRegex: /^https?:\/\/localhost(:\d+)?$/, | ||
errorReporting: env["errorReportingUrl"] || "https://us-central1-amp-error-reporting.cloudfunctions.net/r", | ||
betaErrorReporting: env["betaErrorReportingUrl"] || "https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta", | ||
localDev: env["localDev"] || false, | ||
trustedViewerHosts: [/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/, /(^|\.)gmail\.(com|dev)$/], | ||
geoApi: env["geoApiUrl"] || getMetaUrl("amp-geo-api") | ||
}; | ||
// src/internal-version.js | ||
function internalRuntimeVersion() { | ||
return "2107140004000"; | ||
return "2107150011000"; | ||
} | ||
@@ -592,3 +600,3 @@ | ||
} | ||
function devAssert(shouldBeTrueish, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9) { | ||
function devAssert2(shouldBeTrueish, opt_message, opt_1, opt_2, opt_3, opt_4, opt_5, opt_6, opt_7, opt_8, opt_9) { | ||
if (getMode().minified) { | ||
@@ -665,116 +673,11 @@ return shouldBeTrueish; | ||
// src/core/types/object/json.js | ||
function parseJson(json) { | ||
return JSON.parse(json); | ||
} | ||
function tryParseJson(json, opt_onFailed) { | ||
try { | ||
return parseJson(json); | ||
} catch (e) { | ||
opt_onFailed == null ? void 0 : opt_onFailed(e); | ||
return null; | ||
} | ||
} | ||
// src/experiments/index.js | ||
function _extends4() { | ||
_extends4 = Object.assign || function(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends4.apply(this, arguments); | ||
} | ||
var TAG = "EXPERIMENTS"; | ||
var LOCAL_STORAGE_KEY = "amp-experiment-toggles"; | ||
var TOGGLES_WINDOW_PROPERTY = "__AMP__EXPERIMENT_TOGGLES"; | ||
function isExperimentOn(win, experimentId) { | ||
const toggles = experimentToggles(win); | ||
return !!toggles[experimentId]; | ||
} | ||
function experimentToggles(win) { | ||
var _win$AMP_CONFIG3, _win$AMP_EXP, _win$__AMP_EXP, _win$AMP_CONFIG4, _win$AMP_CONFIG5; | ||
if (win[TOGGLES_WINDOW_PROPERTY]) { | ||
return win[TOGGLES_WINDOW_PROPERTY]; | ||
} | ||
win[TOGGLES_WINDOW_PROPERTY] = map(); | ||
const toggles = win[TOGGLES_WINDOW_PROPERTY]; | ||
const buildExperimentConfigs = _extends4({}, (_win$AMP_CONFIG3 = win.AMP_CONFIG) != null ? _win$AMP_CONFIG3 : {}, (_win$AMP_EXP = win.AMP_EXP) != null ? _win$AMP_EXP : parseJson(((_win$__AMP_EXP = win.__AMP_EXP) == null ? void 0 : _win$__AMP_EXP.textContent) || "{}")); | ||
for (const experimentId in buildExperimentConfigs) { | ||
const frequency = buildExperimentConfigs[experimentId]; | ||
if (typeof frequency === "number" && frequency >= 0 && frequency <= 1) { | ||
toggles[experimentId] = Math.random() < frequency; | ||
} | ||
} | ||
const allowedDocOptIn = (_win$AMP_CONFIG4 = win.AMP_CONFIG) == null ? void 0 : _win$AMP_CONFIG4["allow-doc-opt-in"]; | ||
if (isArray(allowedDocOptIn) && allowedDocOptIn.length) { | ||
const meta = win.document.head.querySelector('meta[name="amp-experiments-opt-in"]'); | ||
if (meta) { | ||
const optedInExperiments = meta.getAttribute("content").split(","); | ||
for (const experiment of optedInExperiments) { | ||
if (dev().assertArray(allowedDocOptIn).includes(experiment)) { | ||
toggles[experiment] = true; | ||
} | ||
} | ||
} | ||
} | ||
Object.assign(toggles, getExperimentToggles(win)); | ||
const allowedUrlOptIn = (_win$AMP_CONFIG5 = win.AMP_CONFIG) == null ? void 0 : _win$AMP_CONFIG5["allow-url-opt-in"]; | ||
if (isArray(allowedUrlOptIn) && allowedUrlOptIn.length) { | ||
const hash = win.location["originalHash"] || win.location.hash; | ||
const params = parseQueryString(hash); | ||
for (const experiment of allowedUrlOptIn) { | ||
const param = params[`e-${experiment}`]; | ||
if (param == "1") { | ||
toggles[experiment] = true; | ||
} | ||
if (param == "0") { | ||
toggles[experiment] = false; | ||
} | ||
} | ||
} | ||
return toggles; | ||
} | ||
function getExperimentToggles(win) { | ||
var _experimentsString; | ||
let experimentsString = ""; | ||
try { | ||
if ("localStorage" in win) { | ||
experimentsString = win.localStorage.getItem(LOCAL_STORAGE_KEY); | ||
} | ||
} catch (_unused) { | ||
dev().warn(TAG, "Failed to retrieve experiments from localStorage."); | ||
} | ||
const tokens = ((_experimentsString = experimentsString) == null ? void 0 : _experimentsString.split(/\s*,\s*/g)) || []; | ||
const toggles = map(); | ||
for (const token of tokens) { | ||
if (!token) { | ||
continue; | ||
} | ||
if (token[0] == "-") { | ||
toggles[token.substr(1)] = false; | ||
} else { | ||
toggles[token] = true; | ||
} | ||
} | ||
return toggles; | ||
} | ||
// src/3p-frame.js | ||
var overrideBootstrapBaseUrl; | ||
function getBootstrapUrl(type, win) { | ||
function getBootstrapUrl(type) { | ||
const extension = true ? ".mjs" : ".js"; | ||
if (getMode().localDev || getMode().test) { | ||
const filename = getMode().minified ? `./vendor/${type}.` : `./vendor/${type}.max.`; | ||
return true ? filename + "mjs" : filename + "js"; | ||
const filename = getMode().minified ? `./vendor/${type}` : `./vendor/${type}.max`; | ||
return filename + extension; | ||
} | ||
if (isExperimentOn(win, "3p-vendor-split")) { | ||
return true ? `${urls.thirdParty}/${internalRuntimeVersion()}/vendor/${type}.mjs` : `${urls.thirdParty}/${internalRuntimeVersion()}/vendor/${type}.js`; | ||
} | ||
return `${urls.thirdParty}/${internalRuntimeVersion()}/f.js`; | ||
return `${urls.thirdParty}/${internalRuntimeVersion()}/vendor/${type}${extension}`; | ||
} | ||
@@ -823,4 +726,4 @@ function getDefaultBootstrapBaseUrl(parentWindow, opt_srcFileBasename) { | ||
var _excluded4 = ["allow", "bootstrap", "contextOptions", "excludeSandbox", "name", "messageHandler", "options", "sandbox", "src", "type", "title"]; | ||
function _extends5() { | ||
_extends5 = Object.assign || function(target) { | ||
function _extends4() { | ||
_extends4 = Object.assign || function(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
@@ -836,3 +739,3 @@ var source = arguments[i]; | ||
}; | ||
return _extends5.apply(this, arguments); | ||
return _extends4.apply(this, arguments); | ||
} | ||
@@ -919,3 +822,3 @@ function _objectWithoutPropertiesLoose4(source, excluded) { | ||
"host": parseUrlDeprecated(src2).hostname, | ||
"bootstrap": bootstrap != null ? bootstrap : getBootstrapUrl(type, win), | ||
"bootstrap": bootstrap != null ? bootstrap : getBootstrapUrl(type), | ||
"type": type, | ||
@@ -947,3 +850,3 @@ "count": count, | ||
}), []); | ||
return createElement2(IframeEmbed, _extends5({ | ||
return createElement2(IframeEmbed, _extends4({ | ||
allow, | ||
@@ -970,3 +873,3 @@ contentRef, | ||
const startPos = message.indexOf("{"); | ||
devAssert(startPos != -1, "JSON missing in %s", message); | ||
devAssert2(startPos != -1, "JSON missing in %s", message); | ||
return tryParseJson(message.substr(startPos), (e) => dev().error("MESSAGING", "Failed to parse message: " + message, e)); | ||
@@ -980,4 +883,4 @@ } | ||
var _excluded5 = ["action", "colorscheme", "embedAs", "hideCover", "hideCta", "href", "includeCommentParent", "kdSite", "layout", "locale", "numPosts", "onReady", "orderBy", "refLabel", "requestResize", "share", "showFacepile", "showText", "size", "smallHeader", "style", "tabs", "title"]; | ||
function _extends6() { | ||
_extends6 = Object.assign || function(target) { | ||
function _extends5() { | ||
_extends5 = Object.assign || function(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
@@ -993,3 +896,3 @@ var source = arguments[i]; | ||
}; | ||
return _extends6.apply(this, arguments); | ||
return _extends5.apply(this, arguments); | ||
} | ||
@@ -1070,3 +973,3 @@ function _objectWithoutPropertiesLoose5(source, excluded) { | ||
}, [localeProp, ref]); | ||
return createElement2(ProxyIframeEmbed, _extends6({ | ||
return createElement2(ProxyIframeEmbed, _extends5({ | ||
options: { | ||
@@ -1100,3 +1003,3 @@ action, | ||
type: TYPE, | ||
style: height ? _extends6({}, style, { | ||
style: height ? _extends5({}, style, { | ||
height | ||
@@ -1103,0 +1006,0 @@ }) : style |
@@ -1,3 +0,3 @@ | ||
import{Fragment as Dr,cloneElement as Mr,createContext as ut,createElement as at,createRef as wr}from"react";import{hydrate as Tr,render as Fr}from"react-dom";import{useCallback as ht,useContext as dt,useEffect as pt,useImperativeHandle as xt,useLayoutEffect as mt,useMemo as gt,useRef as ft,useState as lt}from"react";function E(e,t,r){return at.apply(void 0,arguments)}function _e(e){return ut(e,void 0)}function H(e){return lt(e)}function F(e){return ft(e)}function q(e,t){pt(e,t)}function T(e,t){mt(e,t)}function be(e){return dt(e)}function oe(e,t){return gt(e,t)}function J(e,t){return ht(e,t)}function G(e,t,r){return xt(e,t,r)}var ie=()=>["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"],se=()=>["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"];function Oe(){let e=0;return()=>String(++e)}var{hasOwnProperty:jr,toString:$r}=Object.prototype;function L(e){let t=Object.create(null);return e&&Object.assign(t,e),t}function R(e){return e||{}}function Se(e){return e.replace("-","_")}function Ae(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}import{Children as Gr,createPortal as kr,forwardRef as Et}from"react";function A(e){return Et(e)}var _={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},yt=[_.AUTO,_.LAZY,_.EAGER,_.UNLOAD],Pe={[_.AUTO]:0,[_.LAZY]:1,[_.EAGER]:2,[_.UNLOAD]:3};function Re(e,t){let r=Pe[e]||0,n=Pe[t]||0,o=Math.max(r,n);return yt[o]}var W={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},vt=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function Ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(r),!0).forEach((function(t){_t(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ne(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bt(e,t){if(null==e)return{};var r,n,o=Ot(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function Ot(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var St=[null,"paint","layout","content","size","size paint","size layout","strict"],At={position:"relative",width:"100%",height:"100%"};function Pt(e,t){let{as:r="div",children:n,className:o,contentAs:a="div",contentClassName:l,contentProps:i,contentRef:c,contentStyle:u,layout:s=!1,paint:f=!1,size:p=!1,style:d,wrapperClassName:y,wrapperStyle:O}=e,b=(p?4:0)+(s?2:0)+(f?1:0);return E(r,N(N({},bt(e,vt)),{},{ref:t,className:`${o||""} ${y||""}`.trim()||null,style:N(N(N({},d),O),{},{contain:St[b]})}),E(a,N(N({},i),{},{ref:c,className:l,style:N(N({},p&&At),{},{overflow:f?"hidden":"visible"},u)}),n))}var ce=A(Pt),Rt=["as","children","className","style","wrapperClassName","wrapperStyle"];function Ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function K(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach((function(t){Nt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Nt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function It(e,t){if(null==e)return{};var r,n,o=Mt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function Mt(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}function Ft(e,t){let{as:r="div",children:n,className:o,style:a,wrapperClassName:l,wrapperStyle:i}=e;return E(r,K(K({},It(e,Rt)),{},{ref:t,className:`${o||""} ${l||""}`.trim()||null,style:K(K({},a),i)}),n)}var Me,Tt=A(Ft);function ae(e){let t=F(null);return t.current=e,t}function Dt(){return Me||(Me=_e({renderable:!0,playable:!0,loading:_.AUTO}))}function ue(){return be(Dt())}function Fe(e){let{loading:t}=ue();return Re(e,t)}var wt=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function Te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(r),!0).forEach((function(t){Ct(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ct(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lt(e,t){if(null==e)return{};var r,n,o=jt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function jt(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var $t=()=>!1,Ut="about:blank",Bt=e=>e&&e!=Ut&&!e.includes("#");function Vt(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:l,title:i,matchesMessagingOrigin:c=$t,messageHandler:u,ready:s=!0,loading:f,onReadyState:p,sandbox:d,src:y}=e,O=Lt(e,wt),{playable:b}=ue(),m=Fe(f),g=m!==_.UNLOAD,v=F(!1),h=ae(p),P=J((e=>{if(e!==v.current){v.current=e;let t=h.current;null==t||t(e?W.COMPLETE:W.LOADING)}}),[h]),w=F(null);return G(t,(()=>({get readyState(){return v.current?W.COMPLETE:W.LOADING},get node(){return w.current}})),[]),T((()=>{g||P(!1)}),[g,P]),q((()=>{let e=w.current;if(!b&&e){let{src:t}=e;Bt(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[b]),T((()=>{let e=w.current;if(!e||!g)return;let t=e=>{let t=w.current;!t||e.source!=t.contentWindow||!c(e.origin)||u(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[c,u,g,s]),E(ce,Y(Y({},O),{},{layout:!0,size:!0,paint:!0}),g&&s&&E("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:m,name:l,onLoad:()=>P(!0),part:"iframe",ref:w,sandbox:d,scrolling:"no",src:y,style:Y(Y({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}var le=A(Vt);function Z(){return!1}function z(e){var t;if(!Z())return!1;let r=e||self;return!!(null!==(t=r.AMP_CONFIG)&&void 0!==t&&t.test||r.__AMP_TEST||r.__karma__)}le.displayName="IframeEmbed";var{isArray:j}=Array,kt=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function we(e,t=""){let r=t;try{return decodeURIComponent(e)}catch(e){return r}}function Q(e){let t,r=L();if(!e)return r;for(;t=kt.exec(e);){let e=we(t[1],t[1]),n=t[2]?we(t[2].replace(/\+/g," "),t[2]):"";r[e]=n}return r}var y=self.AMP_CONFIG||{},Gt=("string"==typeof y.thirdPartyFrameRegex?new RegExp(y.thirdPartyFrameRegex):y.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,Ce=("string"==typeof y.cdnProxyRegex?new RegExp(y.cdnProxyRegex):y.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Le(e){if(!self.document||!self.document.head||self.location&&Ce.test(self.location.origin))return null;let t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var D={thirdParty:y.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:y.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:Gt,cdn:y.cdnUrl||Le("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:Ce,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:y.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:y.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:y.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:y.geoApiUrl||Le("amp-geo-api")};function $(){return"2107140004000"}var fe={OFF:0,ERROR:1,WARN:2,INFO:3,FINE:4};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var pe=self.__AMP_LOG,We=null;function ee(){if(pe.dev)return pe.dev;if(!We)throw new Error("failed to call initLogConstructor");return pe.dev=new We(self,(e=>e>=3?fe.FINE:e>=2?fe.INFO:fe.OFF))}function te(e,t,r,n,o,a,l,i,c,u,s){return e}var me,Jt,$o=new Set(["c","v","a","ad"]);function de(e,t){return me||(me=self.document.createElement("a"),Jt=null),Kt(me,e,null)}function Kt(e,t,r){return e.href="",new URL(t,e.href)}function ge(e){return JSON.parse(e)}function X(e,t){try{return ge(e)}catch(e){return null==t||t(e),null}}function qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Je(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach((function(t){nr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function nr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var or="amp-experiment-toggles",re="__AMP__EXPERIMENT_TOGGLES";function Ke(e,t){return!!Ye(e)[t]}function Ye(e){var t,r,n,o,a;if(e[re])return e[re];e[re]=L();let l=e[re],i=Je(Je({},null!==(t=e.AMP_CONFIG)&&void 0!==t?t:{}),null!==(r=e.AMP_EXP)&&void 0!==r?r:ge((null===(n=e.__AMP_EXP)||void 0===n?void 0:n.textContent)||"{}"));for(let e in i){let t=i[e];"number"==typeof t&&t>=0&&t<=1&&(l[e]=Math.random()<t)}let c=null===(o=e.AMP_CONFIG)||void 0===o?void 0:o["allow-doc-opt-in"];if(j(c)&&c.length){let t=e.document.head.querySelector('meta[name="amp-experiments-opt-in"]');if(t){let e=t.getAttribute("content").split(",");for(let t of e)c.includes(t)&&(l[t]=!0)}}Object.assign(l,ir(e));let u=null===(a=e.AMP_CONFIG)||void 0===a?void 0:a["allow-url-opt-in"];if(j(u)&&u.length){let t=Q(e.location.originalHash||e.location.hash);for(let e of u){let r=t[`e-${e}`];"1"==r&&(l[e]=!0),"0"==r&&(l[e]=!1)}}return l}function ir(e){var t;let r="";try{"localStorage"in e&&(r=e.localStorage.getItem(or))}catch(e){}let n=(null===(t=r)||void 0===t?void 0:t.split(/\s*,\s*/g))||[],o=L();for(let e of n)!e||("-"==e[0]?o[e.substr(1)]=!1:o[e]=!0);return o}function Ze(e,t){return Ke(t,"3p-vendor-split")?`${D.thirdParty}/${$()}/vendor/${e}.mjs`:`${D.thirdParty}/${$()}/f.js`}function Qe(e,t){let r=t||"frame";return e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||sr(e),"https://"+e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+`.${D.thirdPartyFrameHost}/${$()}/${r}.html`}function sr(e){return"d-"+et(e)}function et(e){let t;if(e.crypto&&e.crypto.getRandomValues){let r=new Uint32Array(2);e.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(e.Math.random()).substr(2)+"0";return t}function tt(e){let t=0;for(let r=e;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+et(e)}var cr=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function rt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ar(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(r),!0).forEach((function(t){ur(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ur(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lr(e,t){if(null==e)return{};var r,n,o=fr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function fr(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var he={},nt={EMBED_SIZE:"embed-size"},xe="sync-xhr 'none'",pr=ie().join(" ")+" "+se().join(" ");function mr(e,t){let{allow:r=xe,bootstrap:n,contextOptions:o,excludeSandbox:a,name:l,messageHandler:i,options:c,sandbox:u=pr,src:s,type:f,title:p=f}=e,d=lr(e,cr);if(!Ae(r,xe))throw new Error(`'allow' prop must contain "${xe}". Found "${r}".`);let y=F(null),O=F(null),b=oe((()=>(he[f]||(he[f]=Oe()),he[f]())),[f]),{0:{name:m,src:g},1:v}=H({name:l,src:s});return T((()=>{var e,t;let r=null===(e=y.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView,a=null!=s?s:r?Qe(r):"about:blank";if(l)return void v({name:l,src:a});if(!r)return;let i=Object.assign(R({location:{href:r.location.href},sentinel:tt(r)}),o),u=Object.assign(R({title:p,type:f,_context:i}),c);v({name:JSON.stringify(R({host:de(a).hostname,bootstrap:null!=n?n:Ze(f,r),type:f,count:b,attributes:u})),src:a})}),[n,o,b,l,c,s,p,f]),q((()=>{var e;let t=null===(e=O.current)||void 0===e?void 0:e.node;t&&t.parentNode.insertBefore(t,t.nextSibling)}),[m]),G(t,(()=>({get readyState(){var e;return null===(e=O.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=O.current)||void 0===e?void 0:e.node}})),[]),E(le,ar({allow:r,contentRef:y,messageHandler:i,name:m,ref:O,ready:!!m,sandbox:a?void 0:u,src:g,title:p},d))}var Ee=A(mr);Ee.displayName="ProxyIframeEmbed";var dr="amp-";function ot(e){if(!gr(e))return null;let t=e.indexOf("{");return te(-1!=t),X(e.substr(t),(t=>ee().error("MESSAGING","Failed to parse message: "+e,t)))}function gr(e){return"string"==typeof e&&0==e.indexOf(dr)&&-1!=e.indexOf("{")}var hr=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function it(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ne(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?it(Object(r),!0).forEach((function(t){xr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):it(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function xr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Er(e,t){if(null==e)return{};var r,n,o=yr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function yr(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var vr="facebook",_r="100%",br=()=>!0,Or="Facebook comments";function Sr(e,t){let{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,kdSite:u,layout:s,locale:f,numPosts:p,onReady:d,orderBy:y,refLabel:O,requestResize:b,share:m,showFacepile:g,showText:v,size:h,smallHeader:P,style:w,tabs:j,title:S=Or}=e,A=Er(e,hr),{0:x,1:_}=H(null),N=J((e=>{var t;let r=null!==(t=X(e.data))&&void 0!==t?t:ot(e.data);if("ready"==r.action&&(null==d||d()),r.type==nt.EMBED_SIZE){let e=r.height;b?(b(e),_(_r)):_(e)}}),[b,d]),{0:R,1:D}=H(f);return T((()=>{var e,r;if(f)return void D(f);let n=null==t||null===(e=t.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView;!n||D(Se(n.navigator.language))}),[f,t]),E(Ee,ne(ne({options:{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,kd_site:u,layout:s,locale:R,numPosts:p,orderBy:y,ref:O,share:m,showFacepile:g,showText:v,size:h,smallHeader:P,tabs:j},ref:t,title:S},A),{},{excludeSandbox:!0,matchesMessagingOrigin:br,messageHandler:N,type:vr,style:x?ne(ne({},w),{},{height:x}):w}))}var Ar=A(Sr);Ar.displayName="Facebook";export{Ar as Facebook}; | ||
import{Fragment as Or,cloneElement as vr,createContext as nt,createElement as rt,createRef as Sr}from"react";import{hydrate as br,render as _r}from"react-dom";import{useCallback as lt,useContext as at,useEffect as st,useImperativeHandle as ft,useLayoutEffect as ct,useMemo as ut,useRef as it,useState as ot}from"react";function d(e,t,r){return rt.apply(void 0,arguments)}function Ee(e){return nt(e,void 0)}function $(e){return ot(e)}function F(e){return it(e)}function z(e,t){st(e,t)}function T(e,t){ct(e,t)}function ye(e){return at(e)}function te(e,t){return ut(e,t)}function X(e,t){return lt(e,t)}function H(e,t,r){return ft(e,t,r)}var re=()=>["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"],ne=()=>["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"];function ve(){let e=0;return()=>String(++e)}var{hasOwnProperty:Nr,toString:Rr}=Object.prototype;function N(e){return e||{}}function _e(e){return e.replace("-","_")}function be(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}import{Children as wr,createPortal as Dr,forwardRef as pt}from"react";function A(e){return pt(e)}var x={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},mt=[x.AUTO,x.LAZY,x.EAGER,x.UNLOAD],Oe={[x.AUTO]:0,[x.LAZY]:1,[x.EAGER]:2,[x.UNLOAD]:3};function Se(e,t){let r=Oe[e]||0,n=Oe[t]||0,o=Math.max(r,n);return mt[o]}var k={UPGRADING:"upgrading",BUILDING:"building",MOUNTING:"mounting",LOADING:"loading",COMPLETE:"complete",ERROR:"error"},dt=["as","children","className","contentAs","contentClassName","contentProps","contentRef","contentStyle","layout","paint","size","style","wrapperClassName","wrapperStyle"];function Ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(r),!0).forEach((function(t){gt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ae(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function gt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ht(e,t){if(null==e)return{};var r,n,o=xt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function xt(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var Et=[null,"paint","layout","content","size","size paint","size layout","strict"],yt={position:"relative",width:"100%",height:"100%"};function vt(e,t){let{as:r="div",children:n,className:o,contentAs:a="div",contentClassName:l,contentProps:i,contentRef:c,contentStyle:u,layout:s=!1,paint:f=!1,size:p=!1,style:y,wrapperClassName:O,wrapperStyle:b}=e,m=(p?4:0)+(s?2:0)+(f?1:0);return d(r,R(R({},ht(e,dt)),{},{ref:t,className:`${o||""} ${O||""}`.trim()||null,style:R(R(R({},y),b),{},{contain:Et[m]})}),d(a,R(R({},i),{},{ref:c,className:l,style:R(R({},p&&yt),{},{overflow:f?"hidden":"visible"},u)}),n))}var oe=A(vt),_t=["as","children","className","style","wrapperClassName","wrapperStyle"];function Pe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(r),!0).forEach((function(t){bt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function bt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ot(e,t){if(null==e)return{};var r,n,o=St(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function St(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}function At(e,t){let{as:r="div",children:n,className:o,style:a,wrapperClassName:l,wrapperStyle:i}=e;return d(r,q(q({},Ot(e,_t)),{},{ref:t,className:`${o||""} ${l||""}`.trim()||null,style:q(q({},a),i)}),n)}var Ne,Pt=A(At);function ie(e){let t=F(null);return t.current=e,t}function Nt(){return Ne||(Ne=Ee({renderable:!0,playable:!0,loading:x.AUTO}))}function se(){return ye(Nt())}function Re(e){let{loading:t}=se();return Se(e,t)}var Rt=["allow","allowFullScreen","allowTransparency","iframeStyle","name","title","matchesMessagingOrigin","messageHandler","ready","loading","onReadyState","sandbox","src"];function Ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function J(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach((function(t){It(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function It(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mt(e,t){if(null==e)return{};var r,n,o=Ft(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function Ft(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var Tt=()=>!1,Dt="about:blank",wt=e=>e&&e!=Dt&&!e.includes("#");function Ct(e,t){let{allow:r,allowFullScreen:n,allowTransparency:o,iframeStyle:a,name:l,title:i,matchesMessagingOrigin:c=Tt,messageHandler:u,ready:s=!0,loading:f,onReadyState:p,sandbox:y,src:O}=e,b=Mt(e,Rt),{playable:m}=se(),g=Re(f),v=g!==x.UNLOAD,h=F(!1),w=ie(p),P=X((e=>{if(e!==h.current){h.current=e;let t=w.current;null==t||t(e?k.COMPLETE:k.LOADING)}}),[w]),j=F(null);return H(t,(()=>({get readyState(){return h.current?k.COMPLETE:k.LOADING},get node(){return j.current}})),[]),T((()=>{v||P(!1)}),[v,P]),z((()=>{let e=j.current;if(!m&&e){let{src:t}=e;wt(t)?e.src=e.src:e.parentNode.insertBefore(e,e.nextSibling)}}),[m]),T((()=>{let e=j.current;if(!e||!v)return;let t=e=>{let t=j.current;!t||e.source!=t.contentWindow||!c(e.origin)||u(e)},{defaultView:r}=e.ownerDocument;return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}),[c,u,v,s]),d(oe,J(J({},b),{},{layout:!0,size:!0,paint:!0}),v&&s&&d("iframe",{allow:r,allowFullScreen:n,allowTransparency:o,frameborder:"0",loading:g,name:l,onLoad:()=>P(!0),part:"iframe",ref:j,sandbox:y,scrolling:"no",src:O,style:J(J({},a),{},{width:"100%",height:"100%",contentVisibility:"auto"}),title:i}))}var ce=A(Ct);ce.displayName="IframeEmbed";var g=self.AMP_CONFIG||{},Lt=("string"==typeof g.thirdPartyFrameRegex?new RegExp(g.thirdPartyFrameRegex):g.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,Me=("string"==typeof g.cdnProxyRegex?new RegExp(g.cdnProxyRegex):g.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Fe(e){if(!self.document||!self.document.head||self.location&&Me.test(self.location.origin))return null;let t=self.document.head.querySelector(`meta[name="${e}"]`);return t&&t.getAttribute("content")||null}var C={thirdParty:g.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:g.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:Lt,cdn:g.cdnUrl||Fe("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:Me,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:g.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:g.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:g.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:g.geoApiUrl||Fe("amp-geo-api")};function K(){return!1}function G(e){var t;if(!K())return!1;let r=e||self;return!!(null!==(t=r.AMP_CONFIG)&&void 0!==t&&t.test||r.__AMP_TEST||r.__karma__)}function Ve(e){return JSON.parse(e)}function W(e,t){try{return Ve(e)}catch(e){return null==t||t(e),null}}function B(){return"2107150011000"}var ue={OFF:0,ERROR:1,WARN:2,INFO:3,FINE:4};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var le=self.__AMP_LOG,Ge=null;function Z(){if(le.dev)return le.dev;if(!Ge)throw new Error("failed to call initLogConstructor");return le.dev=new Ge(self,(e=>e>=3?ue.FINE:e>=2?ue.INFO:ue.OFF))}function Q(e,t,r,n,o,a,l,i,c,u,s){return e}var fe,qt,Ns=new Set(["c","v","a","ad"]);function pe(e,t){return fe||(fe=self.document.createElement("a"),qt=null),Jt(fe,e,null)}function Jt(e,t,r){return e.href="",new URL(t,e.href)}function ze(e){return`${C.thirdParty}/${B()}/vendor/${e}.mjs`}function Xe(e,t){let r=t||"frame";return e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN=e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN||Kt(e),"https://"+e.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN+`.${C.thirdPartyFrameHost}/${B()}/${r}.html`}function Kt(e){return"d-"+qe(e)}function qe(e){let t;if(e.crypto&&e.crypto.getRandomValues){let r=new Uint32Array(2);e.crypto.getRandomValues(r),t=String(r[0])+r[1]}else t=String(e.Math.random()).substr(2)+"0";return t}function Je(e){let t=0;for(let r=e;r&&r!=r.parent;r=r.parent)t++;return String(t)+"-"+qe(e)}var Yt=["allow","bootstrap","contextOptions","excludeSandbox","name","messageHandler","options","sandbox","src","type","title"];function Ke(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Zt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(r),!0).forEach((function(t){Qt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ke(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Qt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function er(e,t){if(null==e)return{};var r,n,o=tr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function tr(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var me={},Ye={EMBED_SIZE:"embed-size"},de="sync-xhr 'none'",rr=re().join(" ")+" "+ne().join(" ");function nr(e,t){let{allow:r=de,bootstrap:n,contextOptions:o,excludeSandbox:a,name:l,messageHandler:i,options:c,sandbox:u=rr,src:s,type:f,title:p=f}=e,y=er(e,Yt);if(!be(r,de))throw new Error(`'allow' prop must contain "${de}". Found "${r}".`);let O=F(null),b=F(null),m=te((()=>(me[f]||(me[f]=ve()),me[f]())),[f]),{0:{name:g,src:v},1:h}=$({name:l,src:s});return T((()=>{var e,t;let r=null===(e=O.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView,a=null!=s?s:r?Xe(r):"about:blank";if(l)return void h({name:l,src:a});if(!r)return;let i=Object.assign(N({location:{href:r.location.href},sentinel:Je(r)}),o),u=Object.assign(N({title:p,type:f,_context:i}),c);h({name:JSON.stringify(N({host:pe(a).hostname,bootstrap:null!=n?n:ze(f),type:f,count:m,attributes:u})),src:a})}),[n,o,m,l,c,s,p,f]),z((()=>{var e;let t=null===(e=b.current)||void 0===e?void 0:e.node;t&&t.parentNode.insertBefore(t,t.nextSibling)}),[g]),H(t,(()=>({get readyState(){var e;return null===(e=b.current)||void 0===e?void 0:e.readyState},get node(){var e;return null===(e=b.current)||void 0===e?void 0:e.node}})),[]),d(ce,Zt({allow:r,contentRef:O,messageHandler:i,name:g,ref:b,ready:!!g,sandbox:a?void 0:u,src:v,title:p},y))}var ge=A(nr);ge.displayName="ProxyIframeEmbed";var or="amp-";function Ze(e){if(!ir(e))return null;let t=e.indexOf("{");return Q(-1!=t),W(e.substr(t),(t=>Z().error("MESSAGING","Failed to parse message: "+e,t)))}function ir(e){return"string"==typeof e&&0==e.indexOf(or)&&-1!=e.indexOf("{")}var sr=["action","colorscheme","embedAs","hideCover","hideCta","href","includeCommentParent","kdSite","layout","locale","numPosts","onReady","orderBy","refLabel","requestResize","share","showFacepile","showText","size","smallHeader","style","tabs","title"];function Qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(r),!0).forEach((function(t){cr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function cr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ar(e,t){if(null==e)return{};var r,n,o=ur(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(o[r]=e[r]))}return o}function ur(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var lr="facebook",fr="100%",pr=()=>!0,mr="Facebook comments";function dr(e,t){let{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,kdSite:u,layout:s,locale:f,numPosts:p,onReady:y,orderBy:O,refLabel:b,requestResize:m,share:g,showFacepile:v,showText:h,size:w,smallHeader:P,style:j,tabs:x,title:S=mr}=e,E=ar(e,sr),{0:A,1:R}=$(null),N=X((e=>{var t;let r=null!==(t=W(e.data))&&void 0!==t?t:Ze(e.data);if("ready"==r.action&&(null==y||y()),r.type==Ye.EMBED_SIZE){let e=r.height;m?(m(e),R(fr)):R(e)}}),[m,y]),{0:D,1:F}=$(f);return T((()=>{var e,r;if(f)return void F(f);let n=null==t||null===(e=t.current)||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView;!n||F(_e(n.navigator.language))}),[f,t]),d(ge,ee(ee({options:{action:r,colorscheme:n,embedAs:o,hideCover:a,hideCta:l,href:i,includeCommentParent:c,kd_site:u,layout:s,locale:D,numPosts:p,orderBy:O,ref:b,share:g,showFacepile:v,showText:h,size:w,smallHeader:P,tabs:x},ref:t,title:S},E),{},{excludeSandbox:!0,matchesMessagingOrigin:pr,messageHandler:N,type:lr,style:A?ee(ee({},j),{},{height:A}):j}))}var gr=A(dr);gr.displayName="Facebook";export{gr as Facebook}; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-react.module.js.map |
{ | ||
"name": "@ampproject/amp-facebook", | ||
"version": "1.2107140004.0", | ||
"version": "1.2107150011.0", | ||
"description": "AMP HTML amp-facebook 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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
891343
4256