@ampproject/amp-accordion
Advanced tools
Comparing version 1.2106012301.0 to 1.2106030132.0
@@ -1,3 +0,3 @@ | ||
var rr=Object.create,Q=Object.defineProperty,tr=Object.getOwnPropertyDescriptor,nr=Object.getOwnPropertyNames,or=Object.getPrototypeOf,ar=Object.prototype.hasOwnProperty,Oe=function(e){return Q(e,"__esModule",{value:!0})},ir=function(e,r){for(var n in r)Q(e,n,{get:r[n],enumerable:!0})},ur=function(e,r,n){if(r&&"object"==typeof r||"function"==typeof r)for(var t,o=nr(r),i=0,a=o.length;i<a;i++)t=o[i],!ar.call(e,t)&&"default"!==t&&Q(e,t,{get:function(e){return r[e]}.bind(null,t),enumerable:!(n=tr(r,t))||n.enumerable});return e},B=function(e){return ur(Oe(Q(null!=e?rr(or(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};Oe(exports),ir(exports,{Accordion:function(){return qe},AccordionContent:function(){return Lr},AccordionHeader:function(){return jr},AccordionSection:function(){return Fr}});var J,q="section-child-00fce3c",Re="header-00fce3c",Pe="content-hidden-00fce3c";function K(){return J||(J=Promise.resolve(void 0))}var U,v=B(require("preact/hooks")),F=B(require("preact")),Ie=B(require("preact"));function w(e,r,n){return F.createElement.apply(void 0,arguments)}function V(e){return F.createContext(e,void 0)}function M(e){return v.useState(e)}function k(e){return v.useRef(e)}function le(e,r){v.useEffect(e,r)}function Y(e,r){v.useLayoutEffect(e,r)}function D(e){return v.useContext(e)}function G(e,r){return v.useMemo(e,r)}function T(e,r){return v.useCallback(e,r)}function we(e,r,n){return v.useImperativeHandle(e,r,n)}function ee(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var Me,A={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},sr=[A.AUTO,A.LAZY,A.EAGER,A.UNLOAD],Ce=(ee(U={},A.AUTO,0),ee(U,A.LAZY,1),ee(U,A.EAGER,2),ee(U,A.UNLOAD,3),U);function de(e,r){var n=Ce[e]||0,t=Ce[r]||0,o=Math.max(n,t);return sr[o]}function Te(){return Me||(Me=V({renderable:!0,playable:!0,loading:A.AUTO}))}function Ne(e){var r=e.children,n=e.loading,t=void 0===n?"auto":n,o=e.notify,i=e.playable,a=void 0===i||i,c=e.renderable,u=void 0===c||c,l=cr(),f=u&&l.renderable,d=f&&a&&l.playable,s=de(f?A.AUTO:A.LAZY,de(t,l.loading)),v=o||l.notify,p=G((function(){return{renderable:f,playable:d,loading:s,notify:v}}),[f,d,s,v]);return w(Te().Provider,{children:r,value:p})}function cr(){return D(Te())}var pe=Array.isArray,Fe=Object.prototype,Qr=Fe.hasOwnProperty,Br=Fe.toString;function me(e){var r=Object.create(null);return e&&Object.assign(r,e),r}function ve(e,r){return Object.keys(e).reduce((function(n,t){return r.includes(t)||(n[t]=e[t]),n}),{})}var b=self.AMP_CONFIG||{},pr=("string"==typeof b.thirdPartyFrameRegex?new RegExp(b.thirdPartyFrameRegex):b.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,je=("string"==typeof b.cdnProxyRegex?new RegExp(b.cdnProxyRegex):b.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Le(e){if(!self.document||!self.document.head||self.location&&je.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var mr={thirdParty:b.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:b.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:pr,cdn:b.cdnUrl||Le("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:je,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:b.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:b.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:b.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:b.geoApiUrl||Le("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var re,Xt=self.__AMP_LOG,De=["Webkit","webkit","Moz","moz","ms","O","o"];function vr(e){return e.charAt(0).toUpperCase()+e.slice(1)}function gr(e,r){for(var n=0;n<De.length;n++){var t=De[n]+r;if(void 0!==e[t])return t}return""}function Ue(e,r,n){if(he(r))return r;re||(re=me());var t=re[r];if(!t||n){if(t=r,void 0===e[r]){var o=gr(e,vr(r));void 0!==e[o]&&(t=o)}n||(re[r]=t)}return t}function hr(e,r,n,t,o){var i=Ue(e.style,r,o);if(i){var a=t?n+t:n;he(i)?e.style.setProperty(i,a):e.style[i]=a}}function te(e,r,n){var t=Ue(e.style,r,n);if(t)return he(t)?e.style.getPropertyValue(t):e.style[t]}function ge(e,r){for(var n in r)hr(e,n,r[n])}function he(e){return e.startsWith("--")}var $e=500,xr=200,yr="cubic-bezier(0.47, 0, 0.745, 0.715)",br="cubic-bezier(0.39, 0.575, 0.565, 1)";function He(e){return ke(e,(function(){var r=te(e,"height"),n=te(e,"opacity"),t=te(e,"overflowY");ge(e,{height:0,opacity:0,overflowY:"auto"});var o=e.scrollHeight;ge(e,{height:r,opacity:n,overflowY:t});var i=Ye(o);return e.animate([{height:0,opacity:0,overflowY:"hidden"},{height:o+"px",opacity:1,overflowY:"hidden"}],{easing:yr,duration:i})}))}function Ve(e){return ke(e,(function(){var r=e.offsetHeight,n=Ye(r);return e.animate([{height:r+"px",opacity:1,overflowY:"hidden"},{height:"0",opacity:0,overflowY:"hidden"}],{easing:br,duration:n})}))}function ke(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;e.classList.add("i-amphtml-animating");var t=r();return t.onfinish=t.oncancel=function(){t=null,n&&n(),e.classList.remove("i-amphtml-animating")},function(){t&&t.cancel()}}function Ye(e){var r=window.innerHeight,n=Math.abs(e)/r*$e;return Math.min(Math.max(n,xr),$e)}var ne=B(require("preact/compat"));function Ge(e){return ne.forwardRef(e)}function We(){var e=0;return function(){return String(++e)}}function ze(e){return function(){return String(Math.floor(Math.random()*e))}}var Er=["animate","as","children","expandSingleSection","id"],_r=["animate","as","children","expanded","id","onExpandStateChange"],Ar=["as","children","className","id","role","tabIndex"],Sr=["as","children","className","id","role"];function Xe(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function O(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Xe(Object(n),!0).forEach((function(r){oe(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function oe(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function j(e,r){return Ir(e)||Pr(e,r)||Rr(e,r)||Or()}function Or(){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 Rr(e,r){if(e){if("string"==typeof e)return Ze(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ze(e,r)}}function Ze(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}function Pr(e,r){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var t,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(t=n.next()).done)&&(i.push(t.value),!r||i.length!==r);a=!0);}catch(e){c=!0,o=e}finally{try{!a&&null!=n.return&&n.return()}finally{if(c)throw o}}return i}}function Ir(e){if(Array.isArray(e))return e}function ae(e,r){if(null==e)return{};var n,t,o=wr(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t<i.length;t++)n=i[t],!(r.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(o[n]=e[n]))}return o}function wr(e,r){if(null==e)return{};var n,t,o={},i=Object.keys(e);for(t=0;t<i.length;t++)n=i[t],!(r.indexOf(n)>=0)&&(o[n]=e[n]);return o}var Qe=V({}),xe=V({}),Cr={},Mr={},Tr=We(),Be=ze(1e5);function Nr(e,r){var n=e.animate,t=void 0!==n&&n,o=e.as,i=void 0===o?"section":o,a=e.children,c=e.expandSingleSection,u=void 0!==c&&c,l=e.id,f=ae(e,Er),d=j(M(Cr),2),s=d[0],v=d[1],p=k(Mr),g=j(M(Be),1)[0],b=l||"a".concat(g);le((function(){!u||v((function(e){var r={},n=0;for(var t in e)r[t]=e[t]&&0==n++;return r}))}),[u]);var h=T((function(e,r,n){var t=n.current;return v((function(n){return Je(e,r,n,u)})),p.current=O(O({},p.current),{},oe({},e,t)),function(){v((function(r){return ve(r,e)})),p.current=ve(p.current,e)}}),[u]),y=T((function(e,r){v((function(n){var t=null!=r?r:!n[e],o=Je(e,t,n,u);return K().then((function(){for(var e in n){var r=p.current[e];r&&n[e]!=o[e]&&r(o[e])}})),o}))}),[u]),m=T((function(e,r){var n;return null!==(n=s[e])&&void 0!==n?n:r}),[s]),x=T((function(e){if(e)e in s&&y(e);else if(!u)for(var r in s)y(r)}),[s,y,u]),A=T((function(e){if(e)m(e,!0)||y(e);else if(!u)for(var r in s)m(r,!0)||y(r)}),[s,y,m,u]),P=T((function(e){if(e)m(e,!1)&&y(e);else for(var r in s)m(r,!1)&&y(r)}),[s,y,m]);we(r,(function(){return{toggle:x,expand:A,collapse:P}}),[x,P,A]);var E=G((function(){return{registerSection:h,toggleExpanded:y,isExpanded:m,animate:t,prefix:b}}),[h,y,m,t,b]);return w(i,O({id:l},f),w(Qe.Provider,{value:E},a))}var qe=Ge(Nr);function Je(e,r,n,t){var o;if(t&&r)for(var i in o=oe({},e,r),n)i!=e&&(o[i]=!1);else o=O(O({},n),{},oe({},e,r));return o}function Fr(e){var r=e.animate,n=void 0!==r&&r,t=e.as,o=void 0===t?"section":t,i=e.children,a=e.expanded,c=void 0!==a&&a,u=e.id,l=e.onExpandStateChange,f=ae(e,_r),d=j(M(Tr),1)[0],s=u||d,v=j(M(Be),1)[0],p=j(M(c),2),g=p[0],b=p[1],h=j(M(null),2),y=h[0],m=h[1],x=j(M(null),2),A=x[0],P=x[1],E=D(Qe),S=E.animate,R=E.isExpanded,U=E.prefix,I=E.registerSection,L=E.toggleExpanded,C=R?R(s,c):g,_=null!=S?S:n,F=y||"".concat(U||"a","-content-").concat(s,"-").concat(v),N=A||"".concat(U||"a","-header-").concat(s,"-").concat(v),H=k(null);H.current=l,Y((function(){if(I)return I(s,c,H)}),[I,s,c]);var q=T((function(e){L?L(s,e):b((function(r){var n=null!=e?e:!r;return K().then((function(){var e=H.current;e&&e(n)})),n}))}),[s,L]),z=G((function(){return{animate:_,contentId:F,headerId:N,expanded:C,toggleHandler:q,setContentId:m,setHeaderId:P}}),[_,F,N,C,q]);return w(o,O(O({},f),{},{expanded:C}),w(xe.Provider,{value:z},i))}function jr(e){var r=e.as,n=void 0===r?"div":r,t=e.children,o=e.className,i=void 0===o?"":o,a=e.id,c=e.role,u=void 0===c?"button":c,l=e.tabIndex,f=void 0===l?0:l,d=ae(e,Ar),s=D(xe),v=s.contentId,p=s.expanded,g=s.headerId,b=s.setHeaderId,h=s.toggleHandler;return Y((function(){b&&b(a)}),[b,a]),w(n,O(O({},d),{},{id:g,role:u,className:"".concat(i," ").concat(q," ").concat(Re),tabIndex:f,"aria-controls":v,onClick:function(){return h()},"aria-expanded":String(p)}),t)}function Lr(e){var r=e.as,n=void 0===r?"div":r,t=e.children,o=e.className,i=void 0===o?"":o,a=e.id,c=e.role,u=void 0===c?"region":c,l=ae(e,Sr),f=k(null),d=k(!1),s=D(xe),v=s.animate,p=s.contentId,g=s.expanded,b=s.headerId,h=s.setContentId;return le((function(){return d.current=!0,function(){return d.current=!1}}),[]),Y((function(){h&&h(a)}),[h,a]),Y((function(){var e=d.current,r=f.current;if(v&&e&&r&&r.animate)return g?He(r):Ve(r)}),[g,v]),w(Ne,{renderable:g},w(n,O(O({},l),{},{ref:f,className:i+(" "+q)+(g?"":" "+Pe),id:p,"aria-labelledby":b,role:u}),t))} | ||
var rr=Object.create,Q=Object.defineProperty,tr=Object.getOwnPropertyDescriptor,nr=Object.getOwnPropertyNames,or=Object.getPrototypeOf,ar=Object.prototype.hasOwnProperty,Oe=function(e){return Q(e,"__esModule",{value:!0})},ir=function(e,r){for(var n in r)Q(e,n,{get:r[n],enumerable:!0})},ur=function(e,r,n){if(r&&"object"==typeof r||"function"==typeof r)for(var t,o=nr(r),i=0,a=o.length;i<a;i++)t=o[i],!ar.call(e,t)&&"default"!==t&&Q(e,t,{get:function(e){return r[e]}.bind(null,t),enumerable:!(n=tr(r,t))||n.enumerable});return e},B=function(e){return ur(Oe(Q(null!=e?rr(or(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};Oe(exports),ir(exports,{Accordion:function(){return qe},AccordionContent:function(){return Lr},AccordionHeader:function(){return jr},AccordionSection:function(){return Fr}});var J,q="section-child-00fce3c",Pe="header-00fce3c",Re="content-hidden-00fce3c";function K(){return J||(J=Promise.resolve(void 0))}var U,v=B(require("preact/hooks")),F=B(require("preact")),Ie=B(require("preact"));function w(e,r,n){return F.createElement.apply(void 0,arguments)}function V(e){return F.createContext(e,void 0)}function M(e){return v.useState(e)}function k(e){return v.useRef(e)}function le(e,r){v.useEffect(e,r)}function Y(e,r){v.useLayoutEffect(e,r)}function D(e){return v.useContext(e)}function G(e,r){return v.useMemo(e,r)}function T(e,r){return v.useCallback(e,r)}function we(e,r,n){return v.useImperativeHandle(e,r,n)}function ee(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var Me,A={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},sr=[A.AUTO,A.LAZY,A.EAGER,A.UNLOAD],Ce=(ee(U={},A.AUTO,0),ee(U,A.LAZY,1),ee(U,A.EAGER,2),ee(U,A.UNLOAD,3),U);function de(e,r){var n=Ce[e]||0,t=Ce[r]||0,o=Math.max(n,t);return sr[o]}function Te(){return Me||(Me=V({renderable:!0,playable:!0,loading:A.AUTO}))}function Ne(e){var r=e.children,n=e.loading,t=void 0===n?"auto":n,o=e.notify,i=e.playable,a=void 0===i||i,c=e.renderable,u=void 0===c||c,l=cr(),f=u&&l.renderable,d=f&&a&&l.playable,s=de(f?A.AUTO:A.LAZY,de(t,l.loading)),v=o||l.notify,p=G((function(){return{renderable:f,playable:d,loading:s,notify:v}}),[f,d,s,v]);return w(Te().Provider,{children:r,value:p})}function cr(){return D(Te())}var pe=Array.isArray,Fe=Object.prototype,Qr=Fe.hasOwnProperty,Br=Fe.toString;function me(e){var r=Object.create(null);return e&&Object.assign(r,e),r}function ve(e,r){return Object.keys(e).reduce((function(n,t){return r.includes(t)||(n[t]=e[t]),n}),{})}var b=self.AMP_CONFIG||{},pr=("string"==typeof b.thirdPartyFrameRegex?new RegExp(b.thirdPartyFrameRegex):b.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,je=("string"==typeof b.cdnProxyRegex?new RegExp(b.cdnProxyRegex):b.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Le(e){if(!self.document||!self.document.head||self.location&&je.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var mr={thirdParty:b.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:b.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:pr,cdn:b.cdnUrl||Le("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:je,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:b.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:b.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:b.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:b.geoApiUrl||Le("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var re,Xt=self.__AMP_LOG,De=["Webkit","webkit","Moz","moz","ms","O","o"];function vr(e){return e.charAt(0).toUpperCase()+e.slice(1)}function gr(e,r){for(var n=0;n<De.length;n++){var t=De[n]+r;if(void 0!==e[t])return t}return""}function Ue(e,r,n){if(he(r))return r;re||(re=me());var t=re[r];if(!t||n){if(t=r,void 0===e[r]){var o=gr(e,vr(r));void 0!==e[o]&&(t=o)}n||(re[r]=t)}return t}function hr(e,r,n,t,o){var i=Ue(e.style,r,o);if(i){var a=t?n+t:n;he(i)?e.style.setProperty(i,a):e.style[i]=a}}function te(e,r,n){var t=Ue(e.style,r,n);if(t)return he(t)?e.style.getPropertyValue(t):e.style[t]}function ge(e,r){for(var n in r)hr(e,n,r[n])}function he(e){return e.startsWith("--")}var $e=500,xr=200,yr="cubic-bezier(0.47, 0, 0.745, 0.715)",br="cubic-bezier(0.39, 0.575, 0.565, 1)";function He(e){return ke(e,(function(){var r=te(e,"height"),n=te(e,"opacity"),t=te(e,"overflowY");ge(e,{height:0,opacity:0,overflowY:"auto"});var o=e.scrollHeight;ge(e,{height:r,opacity:n,overflowY:t});var i=Ye(o);return e.animate([{height:0,opacity:0,overflowY:"hidden"},{height:o+"px",opacity:1,overflowY:"hidden"}],{easing:yr,duration:i})}))}function Ve(e){return ke(e,(function(){var r=e.offsetHeight,n=Ye(r);return e.animate([{height:r+"px",opacity:1,overflowY:"hidden"},{height:"0",opacity:0,overflowY:"hidden"}],{easing:br,duration:n})}))}function ke(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;e.classList.add("i-amphtml-animating");var t=r();return t.onfinish=t.oncancel=function(){t=null,n&&n(),e.classList.remove("i-amphtml-animating")},function(){t&&t.cancel()}}function Ye(e){var r=window.innerHeight,n=Math.abs(e)/r*$e;return Math.min(Math.max(n,xr),$e)}var ne=B(require("preact/compat"));function Ge(e){return ne.forwardRef(e)}function We(){var e=0;return function(){return String(++e)}}function ze(e){return function(){return String(Math.floor(Math.random()*e))}}var Er=["animate","as","children","expandSingleSection","id"],_r=["animate","as","children","expanded","id","onExpandStateChange"],Ar=["as","children","className","id","role","tabIndex"],Sr=["as","children","className","id","role"];function Xe(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function O(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Xe(Object(n),!0).forEach((function(r){oe(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function oe(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function j(e,r){return Ir(e)||Rr(e,r)||Pr(e,r)||Or()}function Or(){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 Pr(e,r){if(e){if("string"==typeof e)return Ze(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ze(e,r)}}function Ze(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}function Rr(e,r){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var t,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(t=n.next()).done)&&(i.push(t.value),!r||i.length!==r);a=!0);}catch(e){c=!0,o=e}finally{try{!a&&null!=n.return&&n.return()}finally{if(c)throw o}}return i}}function Ir(e){if(Array.isArray(e))return e}function ae(e,r){if(null==e)return{};var n,t,o=wr(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t<i.length;t++)n=i[t],!(r.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(o[n]=e[n]))}return o}function wr(e,r){if(null==e)return{};var n,t,o={},i=Object.keys(e);for(t=0;t<i.length;t++)n=i[t],!(r.indexOf(n)>=0)&&(o[n]=e[n]);return o}var Qe=V({}),xe=V({}),Cr={},Mr={},Tr=We(),Be=ze(1e5);function Nr(e,r){var n=e.animate,t=void 0!==n&&n,o=e.as,i=void 0===o?"section":o,a=e.children,c=e.expandSingleSection,u=void 0!==c&&c,l=e.id,f=ae(e,Er),d=j(M(Cr),2),s=d[0],v=d[1],p=k(Mr),g=j(M(Be),1)[0],b=l||"a".concat(g);le((function(){!u||v((function(e){var r={},n=0;for(var t in e)r[t]=e[t]&&0==n++;return r}))}),[u]);var h=T((function(e,r,n){var t=n.current;return v((function(n){return Je(e,r,n,u)})),p.current=O(O({},p.current),{},oe({},e,t)),function(){v((function(r){return ve(r,e)})),p.current=ve(p.current,e)}}),[u]),y=T((function(e,r){v((function(n){var t=null!=r?r:!n[e],o=Je(e,t,n,u);return K().then((function(){for(var e in n){var r=p.current[e];r&&n[e]!=o[e]&&r(o[e])}})),o}))}),[u]),m=T((function(e,r){var n;return null!==(n=s[e])&&void 0!==n?n:r}),[s]),x=T((function(e){if(e)e in s&&y(e);else if(!u)for(var r in s)y(r)}),[s,y,u]),A=T((function(e){if(e)m(e,!0)||y(e);else if(!u)for(var r in s)m(r,!0)||y(r)}),[s,y,m,u]),P=T((function(e){if(e)m(e,!1)&&y(e);else for(var r in s)m(r,!1)&&y(r)}),[s,y,m]);we(r,(function(){return{toggle:x,expand:A,collapse:P}}),[x,P,A]);var E=G((function(){return{registerSection:h,toggleExpanded:y,isExpanded:m,animate:t,prefix:b}}),[h,y,m,t,b]);return w(i,O({id:l},f),w(Qe.Provider,{value:E},a))}var qe=Ge(Nr);function Je(e,r,n,t){var o;if(t&&r)for(var i in o=oe({},e,r),n)i!=e&&(o[i]=!1);else o=O(O({},n),{},oe({},e,r));return o}function Fr(e){var r=e.animate,n=void 0!==r&&r,t=e.as,o=void 0===t?"section":t,i=e.children,a=e.expanded,c=void 0!==a&&a,u=e.id,l=e.onExpandStateChange,f=ae(e,_r),d=j(M(Tr),1)[0],s=u||d,v=j(M(Be),1)[0],p=j(M(c),2),g=p[0],b=p[1],h=j(M(null),2),y=h[0],m=h[1],x=j(M(null),2),A=x[0],P=x[1],E=D(Qe),S=E.animate,R=E.isExpanded,U=E.prefix,I=E.registerSection,L=E.toggleExpanded,C=R?R(s,c):g,_=null!=S?S:n,F=y||"".concat(U||"a","-content-").concat(s,"-").concat(v),N=A||"".concat(U||"a","-header-").concat(s,"-").concat(v),H=k(null);H.current=l,Y((function(){if(I)return I(s,c,H)}),[I,s,c]);var q=T((function(e){L?L(s,e):b((function(r){var n=null!=e?e:!r;return K().then((function(){var e=H.current;e&&e(n)})),n}))}),[s,L]),z=G((function(){return{animate:_,contentId:F,headerId:N,expanded:C,toggleHandler:q,setContentId:m,setHeaderId:P}}),[_,F,N,C,q]);return w(o,O(O({},f),{},{expanded:C}),w(xe.Provider,{value:z},i))}function jr(e){var r=e.as,n=void 0===r?"div":r,t=e.children,o=e.className,i=void 0===o?"":o,a=e.id,c=e.role,u=void 0===c?"button":c,l=e.tabIndex,f=void 0===l?0:l,d=ae(e,Ar),s=D(xe),v=s.contentId,p=s.expanded,g=s.headerId,b=s.setHeaderId,h=s.toggleHandler;return Y((function(){b&&b(a)}),[b,a]),w(n,O(O({},d),{},{id:g,role:u,className:"".concat(i," ").concat(q," ").concat(Pe),tabIndex:f,"aria-controls":v,onClick:function(){return h()},"aria-expanded":String(p)}),t)}function Lr(e){var r=e.as,n=void 0===r?"div":r,t=e.children,o=e.className,i=void 0===o?"":o,a=e.id,c=e.role,u=void 0===c?"region":c,l=ae(e,Sr),f=k(null),d=k(!1),s=D(xe),v=s.animate,p=s.contentId,g=s.expanded,b=s.headerId,h=s.setContentId;return le((function(){return d.current=!0,function(){return d.current=!1}}),[]),Y((function(){h&&h(a)}),[h,a]),Y((function(){var e=d.current,r=f.current;if(v&&e&&r&&r.animate)return g?He(r):Ve(r)}),[g,v]),w(Ne,{renderable:g},w(n,O(O({},l),{},{ref:f,className:i+(" "+q)+(g?"":" "+Re),id:p,"aria-labelledby":b,role:u}),t))} | ||
//# sourceMappingURL=component-preact.js.map | ||
qe.displayName="Accordion"; |
@@ -1,3 +0,3 @@ | ||
var rr=Object.create,Q=Object.defineProperty,tr=Object.getOwnPropertyDescriptor,nr=Object.getOwnPropertyNames,or=Object.getPrototypeOf,ar=Object.prototype.hasOwnProperty,Oe=function(e){return Q(e,"__esModule",{value:!0})},ir=function(e,r){for(var n in r)Q(e,n,{get:r[n],enumerable:!0})},ur=function(e,r,n){if(r&&"object"==typeof r||"function"==typeof r)for(var t,o=nr(r),i=0,a=o.length;i<a;i++)t=o[i],!ar.call(e,t)&&"default"!==t&&Q(e,t,{get:function(e){return r[e]}.bind(null,t),enumerable:!(n=tr(r,t))||n.enumerable});return e},B=function(e){return ur(Oe(Q(null!=e?rr(or(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};Oe(exports),ir(exports,{Accordion:function(){return qe},AccordionContent:function(){return Lr},AccordionHeader:function(){return jr},AccordionSection:function(){return Fr}});var J,q="section-child-00fce3c",Re="header-00fce3c",Pe="content-hidden-00fce3c";function K(){return J||(J=Promise.resolve(void 0))}var U,v=B(require("react")),F=B(require("react")),Ie=B(require("react-dom"));function w(e,r,n){return F.createElement.apply(void 0,arguments)}function V(e){return F.createContext(e,void 0)}function M(e){return v.useState(e)}function k(e){return v.useRef(e)}function le(e,r){v.useEffect(e,r)}function Y(e,r){v.useLayoutEffect(e,r)}function D(e){return v.useContext(e)}function G(e,r){return v.useMemo(e,r)}function T(e,r){return v.useCallback(e,r)}function we(e,r,n){return v.useImperativeHandle(e,r,n)}function ee(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var Me,A={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},sr=[A.AUTO,A.LAZY,A.EAGER,A.UNLOAD],Ce=(ee(U={},A.AUTO,0),ee(U,A.LAZY,1),ee(U,A.EAGER,2),ee(U,A.UNLOAD,3),U);function de(e,r){var n=Ce[e]||0,t=Ce[r]||0,o=Math.max(n,t);return sr[o]}function Te(){return Me||(Me=V({renderable:!0,playable:!0,loading:A.AUTO}))}function Ne(e){var r=e.children,n=e.loading,t=void 0===n?"auto":n,o=e.notify,i=e.playable,a=void 0===i||i,c=e.renderable,u=void 0===c||c,l=cr(),f=u&&l.renderable,d=f&&a&&l.playable,s=de(f?A.AUTO:A.LAZY,de(t,l.loading)),v=o||l.notify,p=G((function(){return{renderable:f,playable:d,loading:s,notify:v}}),[f,d,s,v]);return w(Te().Provider,{children:r,value:p})}function cr(){return D(Te())}var pe=Array.isArray,Fe=Object.prototype,Qr=Fe.hasOwnProperty,Br=Fe.toString;function me(e){var r=Object.create(null);return e&&Object.assign(r,e),r}function ve(e,r){return Object.keys(e).reduce((function(n,t){return r.includes(t)||(n[t]=e[t]),n}),{})}var b=self.AMP_CONFIG||{},pr=("string"==typeof b.thirdPartyFrameRegex?new RegExp(b.thirdPartyFrameRegex):b.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,je=("string"==typeof b.cdnProxyRegex?new RegExp(b.cdnProxyRegex):b.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Le(e){if(!self.document||!self.document.head||self.location&&je.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var mr={thirdParty:b.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:b.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:pr,cdn:b.cdnUrl||Le("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:je,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:b.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:b.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:b.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:b.geoApiUrl||Le("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var re,Xt=self.__AMP_LOG,De=["Webkit","webkit","Moz","moz","ms","O","o"];function vr(e){return e.charAt(0).toUpperCase()+e.slice(1)}function gr(e,r){for(var n=0;n<De.length;n++){var t=De[n]+r;if(void 0!==e[t])return t}return""}function Ue(e,r,n){if(he(r))return r;re||(re=me());var t=re[r];if(!t||n){if(t=r,void 0===e[r]){var o=gr(e,vr(r));void 0!==e[o]&&(t=o)}n||(re[r]=t)}return t}function hr(e,r,n,t,o){var i=Ue(e.style,r,o);if(i){var a=t?n+t:n;he(i)?e.style.setProperty(i,a):e.style[i]=a}}function te(e,r,n){var t=Ue(e.style,r,n);if(t)return he(t)?e.style.getPropertyValue(t):e.style[t]}function ge(e,r){for(var n in r)hr(e,n,r[n])}function he(e){return e.startsWith("--")}var $e=500,xr=200,yr="cubic-bezier(0.47, 0, 0.745, 0.715)",br="cubic-bezier(0.39, 0.575, 0.565, 1)";function He(e){return ke(e,(function(){var r=te(e,"height"),n=te(e,"opacity"),t=te(e,"overflowY");ge(e,{height:0,opacity:0,overflowY:"auto"});var o=e.scrollHeight;ge(e,{height:r,opacity:n,overflowY:t});var i=Ye(o);return e.animate([{height:0,opacity:0,overflowY:"hidden"},{height:o+"px",opacity:1,overflowY:"hidden"}],{easing:yr,duration:i})}))}function Ve(e){return ke(e,(function(){var r=e.offsetHeight,n=Ye(r);return e.animate([{height:r+"px",opacity:1,overflowY:"hidden"},{height:"0",opacity:0,overflowY:"hidden"}],{easing:br,duration:n})}))}function ke(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;e.classList.add("i-amphtml-animating");var t=r();return t.onfinish=t.oncancel=function(){t=null,n&&n(),e.classList.remove("i-amphtml-animating")},function(){t&&t.cancel()}}function Ye(e){var r=window.innerHeight,n=Math.abs(e)/r*$e;return Math.min(Math.max(n,xr),$e)}var ne=B(require("react"));function Ge(e){return ne.forwardRef(e)}function We(){var e=0;return function(){return String(++e)}}function ze(e){return function(){return String(Math.floor(Math.random()*e))}}var Er=["animate","as","children","expandSingleSection","id"],_r=["animate","as","children","expanded","id","onExpandStateChange"],Ar=["as","children","className","id","role","tabIndex"],Sr=["as","children","className","id","role"];function Xe(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function O(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Xe(Object(n),!0).forEach((function(r){oe(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function oe(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function j(e,r){return Ir(e)||Pr(e,r)||Rr(e,r)||Or()}function Or(){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 Rr(e,r){if(e){if("string"==typeof e)return Ze(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ze(e,r)}}function Ze(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}function Pr(e,r){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var t,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(t=n.next()).done)&&(i.push(t.value),!r||i.length!==r);a=!0);}catch(e){c=!0,o=e}finally{try{!a&&null!=n.return&&n.return()}finally{if(c)throw o}}return i}}function Ir(e){if(Array.isArray(e))return e}function ae(e,r){if(null==e)return{};var n,t,o=wr(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t<i.length;t++)n=i[t],!(r.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(o[n]=e[n]))}return o}function wr(e,r){if(null==e)return{};var n,t,o={},i=Object.keys(e);for(t=0;t<i.length;t++)n=i[t],!(r.indexOf(n)>=0)&&(o[n]=e[n]);return o}var Qe=V({}),xe=V({}),Cr={},Mr={},Tr=We(),Be=ze(1e5);function Nr(e,r){var n=e.animate,t=void 0!==n&&n,o=e.as,i=void 0===o?"section":o,a=e.children,c=e.expandSingleSection,u=void 0!==c&&c,l=e.id,f=ae(e,Er),d=j(M(Cr),2),s=d[0],v=d[1],p=k(Mr),g=j(M(Be),1)[0],b=l||"a".concat(g);le((function(){!u||v((function(e){var r={},n=0;for(var t in e)r[t]=e[t]&&0==n++;return r}))}),[u]);var h=T((function(e,r,n){var t=n.current;return v((function(n){return Je(e,r,n,u)})),p.current=O(O({},p.current),{},oe({},e,t)),function(){v((function(r){return ve(r,e)})),p.current=ve(p.current,e)}}),[u]),y=T((function(e,r){v((function(n){var t=null!=r?r:!n[e],o=Je(e,t,n,u);return K().then((function(){for(var e in n){var r=p.current[e];r&&n[e]!=o[e]&&r(o[e])}})),o}))}),[u]),m=T((function(e,r){var n;return null!==(n=s[e])&&void 0!==n?n:r}),[s]),x=T((function(e){if(e)e in s&&y(e);else if(!u)for(var r in s)y(r)}),[s,y,u]),A=T((function(e){if(e)m(e,!0)||y(e);else if(!u)for(var r in s)m(r,!0)||y(r)}),[s,y,m,u]),P=T((function(e){if(e)m(e,!1)&&y(e);else for(var r in s)m(r,!1)&&y(r)}),[s,y,m]);we(r,(function(){return{toggle:x,expand:A,collapse:P}}),[x,P,A]);var E=G((function(){return{registerSection:h,toggleExpanded:y,isExpanded:m,animate:t,prefix:b}}),[h,y,m,t,b]);return w(i,O({id:l},f),w(Qe.Provider,{value:E},a))}var qe=Ge(Nr);function Je(e,r,n,t){var o;if(t&&r)for(var i in o=oe({},e,r),n)i!=e&&(o[i]=!1);else o=O(O({},n),{},oe({},e,r));return o}function Fr(e){var r=e.animate,n=void 0!==r&&r,t=e.as,o=void 0===t?"section":t,i=e.children,a=e.expanded,c=void 0!==a&&a,u=e.id,l=e.onExpandStateChange,f=ae(e,_r),d=j(M(Tr),1)[0],s=u||d,v=j(M(Be),1)[0],p=j(M(c),2),g=p[0],b=p[1],h=j(M(null),2),y=h[0],m=h[1],x=j(M(null),2),A=x[0],P=x[1],E=D(Qe),S=E.animate,R=E.isExpanded,U=E.prefix,I=E.registerSection,L=E.toggleExpanded,C=R?R(s,c):g,_=null!=S?S:n,F=y||"".concat(U||"a","-content-").concat(s,"-").concat(v),N=A||"".concat(U||"a","-header-").concat(s,"-").concat(v),H=k(null);H.current=l,Y((function(){if(I)return I(s,c,H)}),[I,s,c]);var q=T((function(e){L?L(s,e):b((function(r){var n=null!=e?e:!r;return K().then((function(){var e=H.current;e&&e(n)})),n}))}),[s,L]),z=G((function(){return{animate:_,contentId:F,headerId:N,expanded:C,toggleHandler:q,setContentId:m,setHeaderId:P}}),[_,F,N,C,q]);return w(o,O(O({},f),{},{expanded:C}),w(xe.Provider,{value:z},i))}function jr(e){var r=e.as,n=void 0===r?"div":r,t=e.children,o=e.className,i=void 0===o?"":o,a=e.id,c=e.role,u=void 0===c?"button":c,l=e.tabIndex,f=void 0===l?0:l,d=ae(e,Ar),s=D(xe),v=s.contentId,p=s.expanded,g=s.headerId,b=s.setHeaderId,h=s.toggleHandler;return Y((function(){b&&b(a)}),[b,a]),w(n,O(O({},d),{},{id:g,role:u,className:"".concat(i," ").concat(q," ").concat(Re),tabIndex:f,"aria-controls":v,onClick:function(){return h()},"aria-expanded":String(p)}),t)}function Lr(e){var r=e.as,n=void 0===r?"div":r,t=e.children,o=e.className,i=void 0===o?"":o,a=e.id,c=e.role,u=void 0===c?"region":c,l=ae(e,Sr),f=k(null),d=k(!1),s=D(xe),v=s.animate,p=s.contentId,g=s.expanded,b=s.headerId,h=s.setContentId;return le((function(){return d.current=!0,function(){return d.current=!1}}),[]),Y((function(){h&&h(a)}),[h,a]),Y((function(){var e=d.current,r=f.current;if(v&&e&&r&&r.animate)return g?He(r):Ve(r)}),[g,v]),w(Ne,{renderable:g},w(n,O(O({},l),{},{ref:f,className:i+(" "+q)+(g?"":" "+Pe),id:p,"aria-labelledby":b,role:u}),t))} | ||
var rr=Object.create,Q=Object.defineProperty,tr=Object.getOwnPropertyDescriptor,nr=Object.getOwnPropertyNames,or=Object.getPrototypeOf,ar=Object.prototype.hasOwnProperty,Oe=function(e){return Q(e,"__esModule",{value:!0})},ir=function(e,r){for(var n in r)Q(e,n,{get:r[n],enumerable:!0})},ur=function(e,r,n){if(r&&"object"==typeof r||"function"==typeof r)for(var t,o=nr(r),i=0,a=o.length;i<a;i++)t=o[i],!ar.call(e,t)&&"default"!==t&&Q(e,t,{get:function(e){return r[e]}.bind(null,t),enumerable:!(n=tr(r,t))||n.enumerable});return e},B=function(e){return ur(Oe(Q(null!=e?rr(or(e)):{},"default",e&&e.__esModule&&"default"in e?{get:function(){return e.default},enumerable:!0}:{value:e,enumerable:!0})),e)};Oe(exports),ir(exports,{Accordion:function(){return qe},AccordionContent:function(){return Lr},AccordionHeader:function(){return jr},AccordionSection:function(){return Fr}});var J,q="section-child-00fce3c",Pe="header-00fce3c",Re="content-hidden-00fce3c";function K(){return J||(J=Promise.resolve(void 0))}var U,v=B(require("react")),F=B(require("react")),Ie=B(require("react-dom"));function w(e,r,n){return F.createElement.apply(void 0,arguments)}function V(e){return F.createContext(e,void 0)}function M(e){return v.useState(e)}function k(e){return v.useRef(e)}function le(e,r){v.useEffect(e,r)}function Y(e,r){v.useLayoutEffect(e,r)}function D(e){return v.useContext(e)}function G(e,r){return v.useMemo(e,r)}function T(e,r){return v.useCallback(e,r)}function we(e,r,n){return v.useImperativeHandle(e,r,n)}function ee(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var Me,A={AUTO:"auto",LAZY:"lazy",EAGER:"eager",UNLOAD:"unload"},sr=[A.AUTO,A.LAZY,A.EAGER,A.UNLOAD],Ce=(ee(U={},A.AUTO,0),ee(U,A.LAZY,1),ee(U,A.EAGER,2),ee(U,A.UNLOAD,3),U);function de(e,r){var n=Ce[e]||0,t=Ce[r]||0,o=Math.max(n,t);return sr[o]}function Te(){return Me||(Me=V({renderable:!0,playable:!0,loading:A.AUTO}))}function Ne(e){var r=e.children,n=e.loading,t=void 0===n?"auto":n,o=e.notify,i=e.playable,a=void 0===i||i,c=e.renderable,u=void 0===c||c,l=cr(),f=u&&l.renderable,d=f&&a&&l.playable,s=de(f?A.AUTO:A.LAZY,de(t,l.loading)),v=o||l.notify,p=G((function(){return{renderable:f,playable:d,loading:s,notify:v}}),[f,d,s,v]);return w(Te().Provider,{children:r,value:p})}function cr(){return D(Te())}var pe=Array.isArray,Fe=Object.prototype,Qr=Fe.hasOwnProperty,Br=Fe.toString;function me(e){var r=Object.create(null);return e&&Object.assign(r,e),r}function ve(e,r){return Object.keys(e).reduce((function(n,t){return r.includes(t)||(n[t]=e[t]),n}),{})}var b=self.AMP_CONFIG||{},pr=("string"==typeof b.thirdPartyFrameRegex?new RegExp(b.thirdPartyFrameRegex):b.thirdPartyFrameRegex)||/^d-\d+\.ampproject\.net$/,je=("string"==typeof b.cdnProxyRegex?new RegExp(b.cdnProxyRegex):b.cdnProxyRegex)||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/;function Le(e){if(!self.document||!self.document.head||self.location&&je.test(self.location.origin))return null;var r=self.document.head.querySelector('meta[name="'.concat(e,'"]'));return r&&r.getAttribute("content")||null}var mr={thirdParty:b.thirdPartyUrl||"https://3p.ampproject.net",thirdPartyFrameHost:b.thirdPartyFrameHost||"ampproject.net",thirdPartyFrameRegex:pr,cdn:b.cdnUrl||Le("runtime-host")||"https://cdn.ampproject.org",cdnProxyRegex:je,localhostRegex:/^https?:\/\/localhost(:\d+)?$/,errorReporting:b.errorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r",betaErrorReporting:b.betaErrorReportingUrl||"https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta",localDev:b.localDev||!1,trustedViewerHosts:[/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,/(^|\.)gmail\.(com|dev)$/],geoApi:b.geoApiUrl||Le("amp-geo-api")};self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var re,Xt=self.__AMP_LOG,De=["Webkit","webkit","Moz","moz","ms","O","o"];function vr(e){return e.charAt(0).toUpperCase()+e.slice(1)}function gr(e,r){for(var n=0;n<De.length;n++){var t=De[n]+r;if(void 0!==e[t])return t}return""}function Ue(e,r,n){if(he(r))return r;re||(re=me());var t=re[r];if(!t||n){if(t=r,void 0===e[r]){var o=gr(e,vr(r));void 0!==e[o]&&(t=o)}n||(re[r]=t)}return t}function hr(e,r,n,t,o){var i=Ue(e.style,r,o);if(i){var a=t?n+t:n;he(i)?e.style.setProperty(i,a):e.style[i]=a}}function te(e,r,n){var t=Ue(e.style,r,n);if(t)return he(t)?e.style.getPropertyValue(t):e.style[t]}function ge(e,r){for(var n in r)hr(e,n,r[n])}function he(e){return e.startsWith("--")}var $e=500,xr=200,yr="cubic-bezier(0.47, 0, 0.745, 0.715)",br="cubic-bezier(0.39, 0.575, 0.565, 1)";function He(e){return ke(e,(function(){var r=te(e,"height"),n=te(e,"opacity"),t=te(e,"overflowY");ge(e,{height:0,opacity:0,overflowY:"auto"});var o=e.scrollHeight;ge(e,{height:r,opacity:n,overflowY:t});var i=Ye(o);return e.animate([{height:0,opacity:0,overflowY:"hidden"},{height:o+"px",opacity:1,overflowY:"hidden"}],{easing:yr,duration:i})}))}function Ve(e){return ke(e,(function(){var r=e.offsetHeight,n=Ye(r);return e.animate([{height:r+"px",opacity:1,overflowY:"hidden"},{height:"0",opacity:0,overflowY:"hidden"}],{easing:br,duration:n})}))}function ke(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;e.classList.add("i-amphtml-animating");var t=r();return t.onfinish=t.oncancel=function(){t=null,n&&n(),e.classList.remove("i-amphtml-animating")},function(){t&&t.cancel()}}function Ye(e){var r=window.innerHeight,n=Math.abs(e)/r*$e;return Math.min(Math.max(n,xr),$e)}var ne=B(require("react"));function Ge(e){return ne.forwardRef(e)}function We(){var e=0;return function(){return String(++e)}}function ze(e){return function(){return String(Math.floor(Math.random()*e))}}var Er=["animate","as","children","expandSingleSection","id"],_r=["animate","as","children","expanded","id","onExpandStateChange"],Ar=["as","children","className","id","role","tabIndex"],Sr=["as","children","className","id","role"];function Xe(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function O(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Xe(Object(n),!0).forEach((function(r){oe(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function oe(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function j(e,r){return Ir(e)||Rr(e,r)||Pr(e,r)||Or()}function Or(){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 Pr(e,r){if(e){if("string"==typeof e)return Ze(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ze(e,r)}}function Ze(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}function Rr(e,r){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var t,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(t=n.next()).done)&&(i.push(t.value),!r||i.length!==r);a=!0);}catch(e){c=!0,o=e}finally{try{!a&&null!=n.return&&n.return()}finally{if(c)throw o}}return i}}function Ir(e){if(Array.isArray(e))return e}function ae(e,r){if(null==e)return{};var n,t,o=wr(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t<i.length;t++)n=i[t],!(r.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(o[n]=e[n]))}return o}function wr(e,r){if(null==e)return{};var n,t,o={},i=Object.keys(e);for(t=0;t<i.length;t++)n=i[t],!(r.indexOf(n)>=0)&&(o[n]=e[n]);return o}var Qe=V({}),xe=V({}),Cr={},Mr={},Tr=We(),Be=ze(1e5);function Nr(e,r){var n=e.animate,t=void 0!==n&&n,o=e.as,i=void 0===o?"section":o,a=e.children,c=e.expandSingleSection,u=void 0!==c&&c,l=e.id,f=ae(e,Er),d=j(M(Cr),2),s=d[0],v=d[1],p=k(Mr),g=j(M(Be),1)[0],b=l||"a".concat(g);le((function(){!u||v((function(e){var r={},n=0;for(var t in e)r[t]=e[t]&&0==n++;return r}))}),[u]);var h=T((function(e,r,n){var t=n.current;return v((function(n){return Je(e,r,n,u)})),p.current=O(O({},p.current),{},oe({},e,t)),function(){v((function(r){return ve(r,e)})),p.current=ve(p.current,e)}}),[u]),y=T((function(e,r){v((function(n){var t=null!=r?r:!n[e],o=Je(e,t,n,u);return K().then((function(){for(var e in n){var r=p.current[e];r&&n[e]!=o[e]&&r(o[e])}})),o}))}),[u]),m=T((function(e,r){var n;return null!==(n=s[e])&&void 0!==n?n:r}),[s]),x=T((function(e){if(e)e in s&&y(e);else if(!u)for(var r in s)y(r)}),[s,y,u]),A=T((function(e){if(e)m(e,!0)||y(e);else if(!u)for(var r in s)m(r,!0)||y(r)}),[s,y,m,u]),P=T((function(e){if(e)m(e,!1)&&y(e);else for(var r in s)m(r,!1)&&y(r)}),[s,y,m]);we(r,(function(){return{toggle:x,expand:A,collapse:P}}),[x,P,A]);var E=G((function(){return{registerSection:h,toggleExpanded:y,isExpanded:m,animate:t,prefix:b}}),[h,y,m,t,b]);return w(i,O({id:l},f),w(Qe.Provider,{value:E},a))}var qe=Ge(Nr);function Je(e,r,n,t){var o;if(t&&r)for(var i in o=oe({},e,r),n)i!=e&&(o[i]=!1);else o=O(O({},n),{},oe({},e,r));return o}function Fr(e){var r=e.animate,n=void 0!==r&&r,t=e.as,o=void 0===t?"section":t,i=e.children,a=e.expanded,c=void 0!==a&&a,u=e.id,l=e.onExpandStateChange,f=ae(e,_r),d=j(M(Tr),1)[0],s=u||d,v=j(M(Be),1)[0],p=j(M(c),2),g=p[0],b=p[1],h=j(M(null),2),y=h[0],m=h[1],x=j(M(null),2),A=x[0],P=x[1],E=D(Qe),S=E.animate,R=E.isExpanded,U=E.prefix,I=E.registerSection,L=E.toggleExpanded,C=R?R(s,c):g,_=null!=S?S:n,F=y||"".concat(U||"a","-content-").concat(s,"-").concat(v),N=A||"".concat(U||"a","-header-").concat(s,"-").concat(v),H=k(null);H.current=l,Y((function(){if(I)return I(s,c,H)}),[I,s,c]);var q=T((function(e){L?L(s,e):b((function(r){var n=null!=e?e:!r;return K().then((function(){var e=H.current;e&&e(n)})),n}))}),[s,L]),z=G((function(){return{animate:_,contentId:F,headerId:N,expanded:C,toggleHandler:q,setContentId:m,setHeaderId:P}}),[_,F,N,C,q]);return w(o,O(O({},f),{},{expanded:C}),w(xe.Provider,{value:z},i))}function jr(e){var r=e.as,n=void 0===r?"div":r,t=e.children,o=e.className,i=void 0===o?"":o,a=e.id,c=e.role,u=void 0===c?"button":c,l=e.tabIndex,f=void 0===l?0:l,d=ae(e,Ar),s=D(xe),v=s.contentId,p=s.expanded,g=s.headerId,b=s.setHeaderId,h=s.toggleHandler;return Y((function(){b&&b(a)}),[b,a]),w(n,O(O({},d),{},{id:g,role:u,className:"".concat(i," ").concat(q," ").concat(Pe),tabIndex:f,"aria-controls":v,onClick:function(){return h()},"aria-expanded":String(p)}),t)}function Lr(e){var r=e.as,n=void 0===r?"div":r,t=e.children,o=e.className,i=void 0===o?"":o,a=e.id,c=e.role,u=void 0===c?"region":c,l=ae(e,Sr),f=k(null),d=k(!1),s=D(xe),v=s.animate,p=s.contentId,g=s.expanded,b=s.headerId,h=s.setContentId;return le((function(){return d.current=!0,function(){return d.current=!1}}),[]),Y((function(){h&&h(a)}),[h,a]),Y((function(){var e=d.current,r=f.current;if(v&&e&&r&&r.animate)return g?He(r):Ve(r)}),[g,v]),w(Ne,{renderable:g},w(n,O(O({},l),{},{ref:f,className:i+(" "+q)+(g?"":" "+Re),id:p,"aria-labelledby":b,role:u}),t))} | ||
//# sourceMappingURL=component-react.js.map | ||
qe.displayName="Accordion"; |
{ | ||
"name": "@ampproject/amp-accordion", | ||
"version": "1.2106012301.0", | ||
"version": "1.2106030132.0", | ||
"description": "AMP HTML amp-accordion 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
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package