@apollosproject/canvas-embeds 2.1.2383 → 2.1.2385
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/widget/index.js +78 -78
package/widget/index.js
CHANGED
|
@@ -861,7 +861,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
861
861
|
title
|
|
862
862
|
url
|
|
863
863
|
}
|
|
864
|
-
`);var _Ir=(e=[],{showUnmappedFeatures:t=!1}={})=>e?.filter(e=>(e?.features||[]).some(e=>e&&(Object.keys(e).some(e=>![`id`,`__typename`].includes(e))||t&&!!e.__typename)))||[],vIr={"--color-brand-primary":`0 103 109`,"--color-brand-secondary":`23 181 130`,"--color-brand-tertiary":`110 197 184`,"--color-fg-primary":`#27272e`,"--color-fg-primary-dark":`#f4f7f8`,"--color-fg-secondary":`#68686d`,"--color-fg-secondary-dark":`#9e9fa1`,"--color-fg-tertiary":`#b8b8ba`,"--color-fg-tertiary-dark":`#636466`,"--color-fg-quaternary":`#c9c9cb`,"--color-fg-quaternary-dark":`#525355`,"--color-fg-inverse":`#ffffff`,"--color-fg-inverse-dark":`#ffffff`,"--color-fg-quinary":`rgba(39, 39, 46, 0.15)`,"--color-fg-quinary-dark":`rgba(244, 247, 248, 0.15)`,"--color-gray-0":`255 255 255`,"--color-gray-50":`248 248 250`,"--color-gray-100":`229 229 234`,"--color-gray-200":`209 209 214`,"--color-gray-300":`199 199 204`,"--color-gray-400":`175 175 179`,"--color-gray-500":`142 142 147`,"--color-gray-600":`99 99 102`,"--color-gray-700":`72 72 74`,"--color-gray-800":`58 58 60`,"--color-gray-900":`44 44 46`,"--color-gray-950":`28 28 30`,"--color-gray-1000":`0 0 0`,"--color-material-chrome":`rgb(var(--color-gray-0))`,"--color-material-chrome-dark":`rgb(28 28 30 / 0.4)`,"--color-material-screen":`rgb(255 255 255 / 0.92)`,"--color-material-screen-dark":`rgb(var(--color-gray-1000))`,"--color-material-ultrathin":`rgb(248 248 250 / 0.4)`,"--color-material-ultrathin-dark":`rgb(28 28 30 / 0.5)`,"--color-material-thin":`rgb(248 248 250 / 0.65)`,"--color-material-thin-dark":`rgb(28 28 30 / 0.7)`,"--color-material-regular":`rgb(248 248 250 / 0.8)`,"--color-material-regular-dark":`rgb(28 28 30 / 0.9)`,"--color-material-thick":`rgb(248 248 250 / 0.92)`,"--color-material-thick-dark":`rgb(28 28 30 / 0.95)`,"--color-material-opaque":`rgb(28 28 30 / 0.99)`,"--color-system-chrome":`rgb(var(--color-gray-0))`,"--color-system-chrome-dark":`rgb(var(--color-gray-950))`,"--color-system-screen":`rgb(var(--color-gray-50))`,"--color-system-screen-dark":`rgb(var(--color-gray-1000))`,"--color-system-ultrathin":`rgb(103 103 134 / 0.08)`,"--color-system-ultrathin-dark":`rgb(118 118 128 / 0.18)`,"--color-system-thin":`rgb(120 120 128 / 0.12)`,"--color-system-thin-dark":`rgb(118 118 128 / 0.24)`,"--color-system-regular":`rgb(120 120 128 / 0.16)`,"--color-system-regular-dark":`rgb(120 120 128 / 0.32)`,"--color-system-thick":`rgb(120 120 128 / 0.2)`,"--color-system-thick-dark":`rgb(120 120 128 / 0.36)`,"--color-surface-paper":`#ffffff`,"--color-surface-paper-dark":`#1c1c1e`,"--color-surface-screen":`#f8f8fa`,"--color-surface-screen-dark":`#000000`,"--color-surface-muted":`#e5e5ea`,"--color-surface-muted-dark":`#2c2c2e`,"--color-surface-inverse":`#27272e`,"--color-surface-inverse-dark":`#f4f7f8`,"--color-surface-overlay":`#ffffff`,"--color-surface-overlay-dark":`#2c2c2e`,"--color-surface-overlay-muted":`#f8f8fa`,"--color-surface-overlay-muted-dark":`#1c1c1e`,"--color-border-muted":`#e5e5ea`,"--color-border-muted-dark":`#3a3a3c`,"--color-border-secondary":`#68686d`,"--color-border-secondary-dark":`#9e9fa1`,"--color-border-primary":`#27272e`,"--color-border-primary-dark":`#f4f7f8`,"--color-border-hairline":`rgba(0, 0, 0, 0.12)`,"--color-border-hairline-dark":`rgba(255, 255, 255, 0.10)`,"--color-border-strong":`#8e8e93`,"--color-border-strong-dark":`#636466`,"--color-fg-on-action":`#ffffff`,"--color-fg-on-action-dark":`#ffffff`,"--color-status-error":`#f04438`,"--color-status-error-dark":`#fda29b`,"--color-status-error-muted":`#fef3f2`,"--color-status-error-muted-dark":`#462423`,"--color-status-success":`#12b76a`,"--color-status-success-dark":`#12b76a`,"--color-status-success-muted":`#ecfdf3`,"--color-status-success-muted-dark":`#1a3b2d`,"--color-status-warning":`#f79009`,"--color-status-warning-dark":`#f79009`,"--color-status-warning-muted":`#fffaeb`,"--color-status-warning-muted-dark":`#48331a`,"--color-brand-primary-muted":`#cce1e2`,"--color-brand-primary-muted-dark":`#162b2e`,"--color-brand-primary-on-muted":`#00676d`,"--color-brand-primary-on-muted-dark":`#6ec5b8`,"--color-brand-action-muted":`#d1f0e6`,"--color-brand-action-muted-dark":`#1b3b32`,"--color-brand-action-on-muted":`#0f7856`,"--color-brand-action-on-muted-dark":`#17b582`,"--color-brand-accent-muted":`#e2f3f1`,"--color-brand-accent-muted-dark":`#2c3e3d`,"--color-brand-accent-on-muted":`#00676d`,"--color-brand-accent-on-muted-dark":`#6ec5b8`},yIr=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,bIr=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,xIr=e=>{if(!e)return null;let t=yIr.exec(e),n=t?t.slice(1).map(e=>parseInt(e,16)):bIr.exec(e)?.slice(1).map(Number);return n&&n.every(e=>e<=255)?n.join(` `):null},T7=(e,t)=>{let n=xIr(e);return n?t===void 0?`rgb(${n})`:`rgb(${n} / ${t})`:null},SIr={"--color-material-screen":[`light`,`paper`],"--color-material-ultrathin":[`light`,`screen`],"--color-material-thin":[`light`,`screen`],"--color-material-regular":[`light`,`screen`],"--color-material-thick":[`light`,`screen`],"--color-material-chrome-dark":[`dark`,`paper`],"--color-material-ultrathin-dark":[`dark`,`paper`],"--color-material-thin-dark":[`dark`,`paper`],"--color-material-regular-dark":[`dark`,`paper`],"--color-material-thick-dark":[`dark`,`paper`]},CIr=e=>Number(/\/ ([\d.]+)\)$/.exec(vIr[e])?.[1]??1);function wIr(e,t){let n={},r=e?.colors,i=t?.colors,a=(e,t)=>{t&&(n[e]=t)};a(`--color-system-screen`,T7(r?.screen)),a(`--color-system-chrome`,T7(r?.paper)),a(`--color-material-chrome`,T7(r?.paper)),a(`--color-system-screen-dark`,T7(i?.screen)),a(`--color-system-chrome-dark`,T7(i?.paper));let o={light:r,dark:i};for(let[e,[t,n]]of Object.entries(SIr))a(e,T7(o[t]?.[n],CIr(e)));return Object.keys(n).length?n:void 0}var TIr=`bg-system-screen dark:bg-system-screen-dark`,EIr=({lightTheme:e,darkTheme:t,children:n})=>{let r=wIr(e,t);return r?(0,q.jsx)(`div`,{className:TIr,style:r,children:n}):(0,q.jsx)(q.Fragment,{children:n})},DIr=e=>typeof e.percentComplete==`number`,OIr=e=>DIr(e)||!!e.childContentItemsConnection?.edges?.length,kIr=({content:e,pageCount:t,enabled:n})=>{let r=XOe(),[i,a]=(0,z.useState)(null),o=(0,z.useCallback)(e=>a(e),[]),s=(0,z.useRef)(null),c=(0,z.useRef)(null),l=t>1,u=n&&!OIr(e)&&!e.isCompleted,d=(0,z.useCallback)(()=>{u&&c.current!==e.id&&(c.current=e.id,r?.({contentItem:{id:e.id},action:`COMPLETE`}))},[u,e.id,r]);return(0,z.useEffect)(()=>{n&&s.current!==e.id&&(s.current=e.id,r?.({contentItem:{id:e.id},action:`VIEW`}),l||d())},[d,e.id,n,l,r]),(0,z.useEffect)(()=>{if(!u||!l||!i||typeof IntersectionObserver>`u`)return;let e=new IntersectionObserver(t=>{t.some(e=>e.isIntersecting)&&(d(),e.disconnect())});return e.observe(i),()=>e.disconnect()},[u,d,l,i]),{readingEndRef:o}};Ww(),oke();var AIr=e=>!!(e&&(`embedHtml`in e&&e.embedHtml||e.sources?.some(e=>!!e?.uri))),jIr=({content:e,setIsCTAOpen:t,setInteractionType:n})=>(0,q.jsx)(`div`,{className:`flex justify-end`,children:(0,q.jsxs)(`div`,{className:`fixed right-0 bottom-0 mr-4 [@media(width>=56rem)]:mr-8 [@media(width>=80rem)]:-mr-72 [@media(width>=80rem)]:right-auto mt-4 mb-8 py-1 flex flex-col justify-between items-center`,children:[(0,q.jsx)(`div`,{className:`mb-4`,children:(0,q.jsx)(bC,{onClick:()=>{t(!0),n(S7.Like)},circular:!0,children:(0,q.jsxs)(`div`,{className:`flex flex-col px-1.5 items-center`,children:[(0,q.jsx)(aT,{weight:e?.isLiked?`fill`:`regular`,size:20,className:`md:hidden ${e?.isLiked?`fill-action`:`text-action`}`}),(0,q.jsx)(aT,{weight:e?.isLiked?`fill`:`regular`,size:28,className:`hidden md:flex ${e?.isLiked?`fill-action`:`text-action`}`}),e.likedCount?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:`absolute -bottom-2.5 bg-white dark:bg-brand px-2 rounded-full text-xs z-9`,children:(0,q.jsx)(kC,{fg:`secondary`,className:`text-sm text-white dark:text-brand`,children:e.likedCount})}),(0,q.jsx)(`span`,{className:`absolute -bottom-2.5 bg-accent/20 dark:bg-brand px-2 rounded-full text-xs z-10`,children:(0,q.jsx)(kC,{fg:`secondary`,className:`text-sm text-accent/100`,children:e.likedCount})})]}):null]})})}),e.commentsEnabled?(0,q.jsx)(`div`,{className:`mb-4`,children:(0,q.jsx)(bC,{onClick:()=>{t(!0),n(S7.Comment)},circular:!0,children:(0,q.jsxs)(`div`,{className:`flex flex-col px-1.5 items-center`,children:[(0,q.jsx)(nT,{weight:`fill`,size:20,className:`md:hidden text-action`}),(0,q.jsx)(nT,{weight:`fill`,size:28,className:`hidden md:flex text-action`}),Pw(e.comments)?null:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:`absolute -bottom-2.5 bg-white dark:bg-brand px-2 rounded-full text-xs z-9`,children:(0,q.jsx)(kC,{fg:`secondary`,className:`text-sm text-white dark:text-brand`,children:e.comments?.length??0})}),(0,q.jsx)(`span`,{className:`absolute -bottom-2.5 bg-accent/20 dark:bg-brand px-2 rounded-full text-xs z-10`,children:(0,q.jsx)(kC,{fg:`secondary`,className:`text-sm text-accent/100`,children:e.comments?.length??0})})]})]})})}):null,e.sharing?(0,q.jsxs)(gIr,{circular:!0,sharable:e.sharing,children:[(0,q.jsx)(cT,{weight:`fill`,size:20,className:`mx-1.5 text-fg-secondary dark:text-fg-secondary-dark md:hidden`}),(0,q.jsx)(cT,{weight:`fill`,size:28,className:`mx-2 text-fg-secondary dark:text-fg-secondary-dark hidden md:flex`})]}):(0,q.jsx)(`div`,{})]})}),MIr=({lightTheme:e,darkTheme:t,...n})=>(0,q.jsx)(EIr,{lightTheme:e,darkTheme:t,children:(0,q.jsx)(NIr,{...n})}),NIr=({content:e,currentChurch:t,isInteractionEnabled:n=!1,userCanComment:r,userProfile:i,theme:a,executedConnectFeatureId:o,guideProgressEnabled:s=!1})=>{let c=Qke(),[l,u]=(0,z.useState)(!1),[d,f]=(0,z.useState)(S7.Default),p=$ke(),m=(0,z.useMemo)(()=>_Ir(e.pages,{showUnmappedFeatures:p}),[e.pages,p]),{readingEndRef:h}=kIr({content:e,pageCount:m?.length??0,enabled:s});if(!e)return null;let g=[...e?.videos??[],...e?.audios??[]].find(AIr),_=!!g,v=g?.__typename===`AudioMedia`,y=!!e?.coverImage,b=e?.childContentItemsConnection?.edges??[],x=e?.siblingContentItemsConnection?.edges??[],S=`md:border md:border-system-regular md:rounded-3xl py-6 md:p-6 mb-8 border-b border-b-system-regular`,C=m?.length&&m?.length>1,w=n?`pr-14 md:pr-16 [@media(width>=56rem)]:pr-0`:``;return(0,q.jsxs)(mIr,{children:[(0,q.jsxs)(`div`,{className:C?S:``,children:[y&&!_?(0,q.jsx)(lT,{image:e?.coverImage??void 0,className:`h-full w-full object-cover rounded-xl`}):null,_&&v?(0,q.jsx)(hwr,{media:g,coverImage:e?.coverImage??void 0,content:e??void 0,shouldSendInteractions:!!r}):null,_&&!v?(0,q.jsx)(cPr,{media:g,coverImage:e?.coverImage??void 0,content:e??void 0,shouldSendInteractions:!!r}):null,(0,q.jsxs)(`div`,{className:`${_||y?`mt-6 md:mt-12`:``} ${w} mb-4 mx-auto [&>*]:mx-auto [&>*]:max-w-[65ch]`,children:[(0,q.jsx)(`div`,{className:`prose dark:prose-invert`,children:(0,q.jsx)(kC,{as:`h1`,children:e.title})}),e.parentChannel?.name?(0,q.jsx)(kC,{fg:`secondary`,"data-testid":`content-item-category`,children:e.parentChannel.name}):null,(0,q.jsx)(`div`,{className:`h-px bg-system-thin my-8`}),e.htmlContent?(0,q.jsx)(iAe,{feature:{content:e.htmlContent}}):null,m?.length?(0,q.jsx)(`div`,{className:`mt-8 flex flex-col gap-4`,children:(0,q.jsx)(hIr,{features:m[0]?.features??[],church:t,userProfile:i,isInteractionEnabled:n,theme:a,executedConnectFeatureId:o})}):null]})]}),m?.slice(1).map(e=>e&&e.features?.length&&e.features.length>0&&(0,q.jsx)(`div`,{className:S,children:(0,q.jsx)(`div`,{className:`${w} flex flex-col gap-4`,children:(0,q.jsx)(hIr,{features:e.features??[],church:t,userProfile:i,isInteractionEnabled:n,theme:a,executedConnectFeatureId:o})})},e.id)),(0,q.jsx)(`div`,{ref:h,"data-testid":`content-item-reading-end`}),(0,q.jsxs)(`div`,{className:`${w} mx-auto [&>*]:mx-auto [&>*]:max-w-[65ch]`,children:[n?(0,q.jsx)(jIr,{content:e,setIsCTAOpen:u,setInteractionType:f}):null,b.length?(0,q.jsx)(VC,{className:`mt-10`,children:b.map(e=>{let t=(e?.node?.coverImage?.sources??[])[0]?.uri;return(0,q.jsx)(UC,{as:vC,to:{contentId:e?.node?.id},title:e?.node?.title??void 0,subtitle:e?.node?.summary,leadingAccessory:(0,q.jsx)(ow,{src:t??void 0}),trailingAccessory:(0,q.jsx)(Uw,{})},e?.node?.id)})}):null,e?.parentItem?(0,q.jsxs)(`div`,{className:`mt-12`,children:[(0,q.jsx)(kC,{as:`h3`,className:`mb-4`,children:`This series`}),(0,q.jsx)(pke,{content:e?.parentItem})]}):null,x.length?(0,q.jsxs)(`div`,{className:`mt-10`,children:[(0,q.jsx)(kC,{as:`h3`,children:`In this series`}),(0,q.jsx)(SOe,{children:x.map(e=>(0,q.jsx)(pke,{content:e?.node??void 0,tile:!0},e?.node?.id))})]}):null]}),(0,q.jsx)(jPr,{type:d,currentPageParams:c,isOpen:l,setIsOpen:u,church:t,hasComments:!Pw(e.comments),hasLikes:!!(e?.likedCount??0),isInteractionEnabled:n,theme:a})]})};Cw(`
|
|
864
|
+
`);var _Ir=(e=[],{showUnmappedFeatures:t=!1}={})=>e?.filter(e=>(e?.features||[]).some(e=>e&&(Object.keys(e).some(e=>![`id`,`__typename`].includes(e))||t&&!!e.__typename)))||[],vIr={"--color-brand-primary":`0 103 109`,"--color-brand-secondary":`23 181 130`,"--color-brand-tertiary":`110 197 184`,"--color-fg-primary":`#27272e`,"--color-fg-primary-dark":`#f4f7f8`,"--color-fg-secondary":`#68686d`,"--color-fg-secondary-dark":`#9e9fa1`,"--color-fg-tertiary":`#b8b8ba`,"--color-fg-tertiary-dark":`#636466`,"--color-fg-quaternary":`#c9c9cb`,"--color-fg-quaternary-dark":`#525355`,"--color-fg-inverse":`#ffffff`,"--color-fg-inverse-dark":`#ffffff`,"--color-fg-quinary":`rgba(39, 39, 46, 0.15)`,"--color-fg-quinary-dark":`rgba(244, 247, 248, 0.15)`,"--color-gray-0":`255 255 255`,"--color-gray-50":`248 248 250`,"--color-gray-100":`229 229 234`,"--color-gray-200":`209 209 214`,"--color-gray-300":`199 199 204`,"--color-gray-400":`175 175 179`,"--color-gray-500":`142 142 147`,"--color-gray-600":`99 99 102`,"--color-gray-700":`72 72 74`,"--color-gray-800":`58 58 60`,"--color-gray-900":`44 44 46`,"--color-gray-950":`28 28 30`,"--color-gray-1000":`0 0 0`,"--color-material-chrome":`rgb(var(--color-gray-0))`,"--color-material-chrome-dark":`rgb(28 28 30 / 0.4)`,"--color-material-screen":`rgb(255 255 255 / 0.92)`,"--color-material-screen-dark":`rgb(var(--color-gray-1000))`,"--color-material-ultrathin":`rgb(248 248 250 / 0.4)`,"--color-material-ultrathin-dark":`rgb(28 28 30 / 0.5)`,"--color-material-thin":`rgb(248 248 250 / 0.65)`,"--color-material-thin-dark":`rgb(28 28 30 / 0.7)`,"--color-material-regular":`rgb(248 248 250 / 0.8)`,"--color-material-regular-dark":`rgb(28 28 30 / 0.9)`,"--color-material-thick":`rgb(248 248 250 / 0.92)`,"--color-material-thick-dark":`rgb(28 28 30 / 0.95)`,"--color-material-opaque":`rgb(28 28 30 / 0.99)`,"--color-system-chrome":`rgb(var(--color-gray-0))`,"--color-system-chrome-dark":`rgb(var(--color-gray-950))`,"--color-system-screen":`rgb(var(--color-gray-50))`,"--color-system-screen-dark":`rgb(var(--color-gray-1000))`,"--color-system-ultrathin":`rgb(103 103 134 / 0.08)`,"--color-system-ultrathin-dark":`rgb(118 118 128 / 0.18)`,"--color-system-thin":`rgb(120 120 128 / 0.12)`,"--color-system-thin-dark":`rgb(118 118 128 / 0.24)`,"--color-system-regular":`rgb(120 120 128 / 0.16)`,"--color-system-regular-dark":`rgb(120 120 128 / 0.32)`,"--color-system-thick":`rgb(120 120 128 / 0.2)`,"--color-system-thick-dark":`rgb(120 120 128 / 0.36)`,"--color-surface-paper":`#ffffff`,"--color-surface-paper-dark":`#1c1c1e`,"--color-surface-screen":`#f8f8fa`,"--color-surface-screen-dark":`#000000`,"--color-surface-muted":`#e5e5ea`,"--color-surface-muted-dark":`#2c2c2e`,"--color-surface-inverse":`#27272e`,"--color-surface-inverse-dark":`#f4f7f8`,"--color-surface-overlay":`#ffffff`,"--color-surface-overlay-dark":`#2c2c2e`,"--color-surface-overlay-muted":`#f8f8fa`,"--color-surface-overlay-muted-dark":`#1c1c1e`,"--color-border-muted":`#e5e5ea`,"--color-border-muted-dark":`#3a3a3c`,"--color-border-secondary":`#68686d`,"--color-border-secondary-dark":`#9e9fa1`,"--color-border-primary":`#27272e`,"--color-border-primary-dark":`#f4f7f8`,"--color-border-hairline":`rgba(0, 0, 0, 0.12)`,"--color-border-hairline-dark":`rgba(255, 255, 255, 0.10)`,"--color-border-strong":`#8e8e93`,"--color-border-strong-dark":`#636466`,"--color-fg-on-action":`#ffffff`,"--color-fg-on-action-dark":`#ffffff`,"--color-status-error":`#f04438`,"--color-status-error-dark":`#fda29b`,"--color-status-error-muted":`#fef3f2`,"--color-status-error-muted-dark":`#462423`,"--color-status-success":`#12b76a`,"--color-status-success-dark":`#12b76a`,"--color-status-success-muted":`#ecfdf3`,"--color-status-success-muted-dark":`#1a3b2d`,"--color-status-warning":`#f79009`,"--color-status-warning-dark":`#f79009`,"--color-status-warning-muted":`#fffaeb`,"--color-status-warning-muted-dark":`#48331a`,"--color-brand-primary-muted":`#cce1e2`,"--color-brand-primary-muted-dark":`#162b2e`,"--color-brand-primary-on-muted":`#00676d`,"--color-brand-primary-on-muted-dark":`#6ec5b8`,"--color-brand-action-muted":`#d1f0e6`,"--color-brand-action-muted-dark":`#1b3b32`,"--color-brand-action-on-muted":`#0f7856`,"--color-brand-action-on-muted-dark":`#17b582`,"--color-brand-accent-muted":`#e2f3f1`,"--color-brand-accent-muted-dark":`#2c3e3d`,"--color-brand-accent-on-muted":`#00676d`,"--color-brand-accent-on-muted-dark":`#6ec5b8`},yIr=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,bIr=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,xIr=e=>{if(!e)return null;let t=yIr.exec(e),n=t?t.slice(1).map(e=>parseInt(e,16)):bIr.exec(e)?.slice(1).map(Number);return n&&n.every(e=>e<=255)?n.join(` `):null},T7=(e,t)=>{let n=xIr(e);return n?t===void 0?`rgb(${n})`:`rgb(${n} / ${t})`:null},SIr={"--color-material-screen":[`light`,`paper`],"--color-material-ultrathin":[`light`,`screen`],"--color-material-thin":[`light`,`screen`],"--color-material-regular":[`light`,`screen`],"--color-material-thick":[`light`,`screen`],"--color-material-chrome-dark":[`dark`,`paper`],"--color-material-ultrathin-dark":[`dark`,`paper`],"--color-material-thin-dark":[`dark`,`paper`],"--color-material-regular-dark":[`dark`,`paper`],"--color-material-thick-dark":[`dark`,`paper`]},CIr=e=>Number(/\/ ([\d.]+)\)$/.exec(vIr[e])?.[1]??1);function wIr(e,t){let n={},r=e?.colors,i=t?.colors,a=(e,t)=>{t&&(n[e]=t)};a(`--color-system-screen`,T7(r?.screen)),a(`--color-system-chrome`,T7(r?.paper)),a(`--color-material-chrome`,T7(r?.paper)),a(`--color-system-screen-dark`,T7(i?.screen)),a(`--color-system-chrome-dark`,T7(i?.paper));let o={light:r,dark:i};for(let[e,[t,n]]of Object.entries(SIr))a(e,T7(o[t]?.[n],CIr(e)));return Object.keys(n).length?n:void 0}var TIr=[[`primary`,`--color-brand-primary`],[`secondary`,`--color-brand-secondary`],[`secondary`,`--color-brand-tertiary`]];function EIr(e){let t={};for(let[n,r]of TIr){let i=xIr(e?.colors?.[n]);i&&(t[r]=i)}return Object.keys(t).length?t:void 0}function DIr(e,t,n,r){let i={...EIr(n)},a={...EIr(r)};for(let e of Object.keys(i))a[e]??=`inherit`;let o=(e,t)=>Object.keys(t).length?`${e}{${Object.entries(t).map(([e,t])=>`${e}:${t}`).join(`;`)}}`:``;return o(e,i)+o(t,a)||null}var OIr=`bg-system-screen dark:bg-system-screen-dark`,kIr=({lightTheme:e,darkTheme:t,children:n})=>{let r=`ct-${(0,z.useId)().replace(/[^\w-]/g,``)}`,i=wIr(e,t);if(!i)return(0,q.jsx)(q.Fragment,{children:n});let a=`[data-content-theme=${r}]`,o=DIr(a,`.dark ${a}`,e,t);return(0,q.jsxs)(`div`,{"data-content-theme":r,className:OIr,style:i,children:[o?(0,q.jsx)(`style`,{children:o}):null,n]})},AIr=e=>typeof e.percentComplete==`number`,jIr=e=>AIr(e)||!!e.childContentItemsConnection?.edges?.length,MIr=({content:e,pageCount:t,enabled:n})=>{let r=XOe(),[i,a]=(0,z.useState)(null),o=(0,z.useCallback)(e=>a(e),[]),s=(0,z.useRef)(null),c=(0,z.useRef)(null),l=t>1,u=n&&!jIr(e)&&!e.isCompleted,d=(0,z.useCallback)(()=>{u&&c.current!==e.id&&(c.current=e.id,r?.({contentItem:{id:e.id},action:`COMPLETE`}))},[u,e.id,r]);return(0,z.useEffect)(()=>{n&&s.current!==e.id&&(s.current=e.id,r?.({contentItem:{id:e.id},action:`VIEW`}),l||d())},[d,e.id,n,l,r]),(0,z.useEffect)(()=>{if(!u||!l||!i||typeof IntersectionObserver>`u`)return;let e=new IntersectionObserver(t=>{t.some(e=>e.isIntersecting)&&(d(),e.disconnect())});return e.observe(i),()=>e.disconnect()},[u,d,l,i]),{readingEndRef:o}};Ww(),oke();var NIr=e=>!!(e&&(`embedHtml`in e&&e.embedHtml||e.sources?.some(e=>!!e?.uri))),PIr=({content:e,setIsCTAOpen:t,setInteractionType:n})=>(0,q.jsx)(`div`,{className:`flex justify-end`,children:(0,q.jsxs)(`div`,{className:`fixed right-0 bottom-0 mr-4 [@media(width>=56rem)]:mr-8 [@media(width>=80rem)]:-mr-72 [@media(width>=80rem)]:right-auto mt-4 mb-8 py-1 flex flex-col justify-between items-center`,children:[(0,q.jsx)(`div`,{className:`mb-4`,children:(0,q.jsx)(bC,{onClick:()=>{t(!0),n(S7.Like)},circular:!0,children:(0,q.jsxs)(`div`,{className:`flex flex-col px-1.5 items-center`,children:[(0,q.jsx)(aT,{weight:e?.isLiked?`fill`:`regular`,size:20,className:`md:hidden ${e?.isLiked?`fill-action`:`text-action`}`}),(0,q.jsx)(aT,{weight:e?.isLiked?`fill`:`regular`,size:28,className:`hidden md:flex ${e?.isLiked?`fill-action`:`text-action`}`}),e.likedCount?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:`absolute -bottom-2.5 bg-white dark:bg-brand px-2 rounded-full text-xs z-9`,children:(0,q.jsx)(kC,{fg:`secondary`,className:`text-sm text-white dark:text-brand`,children:e.likedCount})}),(0,q.jsx)(`span`,{className:`absolute -bottom-2.5 bg-accent/20 dark:bg-brand px-2 rounded-full text-xs z-10`,children:(0,q.jsx)(kC,{fg:`secondary`,className:`text-sm text-accent/100`,children:e.likedCount})})]}):null]})})}),e.commentsEnabled?(0,q.jsx)(`div`,{className:`mb-4`,children:(0,q.jsx)(bC,{onClick:()=>{t(!0),n(S7.Comment)},circular:!0,children:(0,q.jsxs)(`div`,{className:`flex flex-col px-1.5 items-center`,children:[(0,q.jsx)(nT,{weight:`fill`,size:20,className:`md:hidden text-action`}),(0,q.jsx)(nT,{weight:`fill`,size:28,className:`hidden md:flex text-action`}),Pw(e.comments)?null:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:`absolute -bottom-2.5 bg-white dark:bg-brand px-2 rounded-full text-xs z-9`,children:(0,q.jsx)(kC,{fg:`secondary`,className:`text-sm text-white dark:text-brand`,children:e.comments?.length??0})}),(0,q.jsx)(`span`,{className:`absolute -bottom-2.5 bg-accent/20 dark:bg-brand px-2 rounded-full text-xs z-10`,children:(0,q.jsx)(kC,{fg:`secondary`,className:`text-sm text-accent/100`,children:e.comments?.length??0})})]})]})})}):null,e.sharing?(0,q.jsxs)(gIr,{circular:!0,sharable:e.sharing,children:[(0,q.jsx)(cT,{weight:`fill`,size:20,className:`mx-1.5 text-fg-secondary dark:text-fg-secondary-dark md:hidden`}),(0,q.jsx)(cT,{weight:`fill`,size:28,className:`mx-2 text-fg-secondary dark:text-fg-secondary-dark hidden md:flex`})]}):(0,q.jsx)(`div`,{})]})}),FIr=({lightTheme:e,darkTheme:t,...n})=>(0,q.jsx)(kIr,{lightTheme:e,darkTheme:t,children:(0,q.jsx)(IIr,{...n})}),IIr=({content:e,currentChurch:t,isInteractionEnabled:n=!1,userCanComment:r,userProfile:i,theme:a,executedConnectFeatureId:o,guideProgressEnabled:s=!1})=>{let c=Qke(),[l,u]=(0,z.useState)(!1),[d,f]=(0,z.useState)(S7.Default),p=$ke(),m=(0,z.useMemo)(()=>_Ir(e.pages,{showUnmappedFeatures:p}),[e.pages,p]),{readingEndRef:h}=MIr({content:e,pageCount:m?.length??0,enabled:s});if(!e)return null;let g=[...e?.videos??[],...e?.audios??[]].find(NIr),_=!!g,v=g?.__typename===`AudioMedia`,y=!!e?.coverImage,b=e?.childContentItemsConnection?.edges??[],x=e?.siblingContentItemsConnection?.edges??[],S=`md:border md:border-system-regular md:rounded-3xl py-6 md:p-6 mb-8 border-b border-b-system-regular`,C=m?.length&&m?.length>1,w=n?`pr-14 md:pr-16 [@media(width>=56rem)]:pr-0`:``;return(0,q.jsxs)(mIr,{children:[(0,q.jsxs)(`div`,{className:C?S:``,children:[y&&!_?(0,q.jsx)(lT,{image:e?.coverImage??void 0,className:`h-full w-full object-cover rounded-xl`}):null,_&&v?(0,q.jsx)(hwr,{media:g,coverImage:e?.coverImage??void 0,content:e??void 0,shouldSendInteractions:!!r}):null,_&&!v?(0,q.jsx)(cPr,{media:g,coverImage:e?.coverImage??void 0,content:e??void 0,shouldSendInteractions:!!r}):null,(0,q.jsxs)(`div`,{className:`${_||y?`mt-6 md:mt-12`:``} ${w} mb-4 mx-auto [&>*]:mx-auto [&>*]:max-w-[65ch]`,children:[(0,q.jsx)(`div`,{className:`prose dark:prose-invert`,children:(0,q.jsx)(kC,{as:`h1`,children:e.title})}),e.parentChannel?.name?(0,q.jsx)(kC,{fg:`secondary`,"data-testid":`content-item-category`,children:e.parentChannel.name}):null,(0,q.jsx)(`div`,{className:`h-px bg-system-thin my-8`}),e.htmlContent?(0,q.jsx)(iAe,{feature:{content:e.htmlContent}}):null,m?.length?(0,q.jsx)(`div`,{className:`mt-8 flex flex-col gap-4`,children:(0,q.jsx)(hIr,{features:m[0]?.features??[],church:t,userProfile:i,isInteractionEnabled:n,theme:a,executedConnectFeatureId:o})}):null]})]}),m?.slice(1).map(e=>e&&e.features?.length&&e.features.length>0&&(0,q.jsx)(`div`,{className:S,children:(0,q.jsx)(`div`,{className:`${w} flex flex-col gap-4`,children:(0,q.jsx)(hIr,{features:e.features??[],church:t,userProfile:i,isInteractionEnabled:n,theme:a,executedConnectFeatureId:o})})},e.id)),(0,q.jsx)(`div`,{ref:h,"data-testid":`content-item-reading-end`}),(0,q.jsxs)(`div`,{className:`${w} mx-auto [&>*]:mx-auto [&>*]:max-w-[65ch]`,children:[n?(0,q.jsx)(PIr,{content:e,setIsCTAOpen:u,setInteractionType:f}):null,b.length?(0,q.jsx)(VC,{className:`mt-10`,children:b.map(e=>{let t=(e?.node?.coverImage?.sources??[])[0]?.uri;return(0,q.jsx)(UC,{as:vC,to:{contentId:e?.node?.id},title:e?.node?.title??void 0,subtitle:e?.node?.summary,leadingAccessory:(0,q.jsx)(ow,{src:t??void 0}),trailingAccessory:(0,q.jsx)(Uw,{})},e?.node?.id)})}):null,e?.parentItem?(0,q.jsxs)(`div`,{className:`mt-12`,children:[(0,q.jsx)(kC,{as:`h3`,className:`mb-4`,children:`This series`}),(0,q.jsx)(pke,{content:e?.parentItem})]}):null,x.length?(0,q.jsxs)(`div`,{className:`mt-10`,children:[(0,q.jsx)(kC,{as:`h3`,children:`In this series`}),(0,q.jsx)(SOe,{children:x.map(e=>(0,q.jsx)(pke,{content:e?.node??void 0,tile:!0},e?.node?.id))})]}):null]}),(0,q.jsx)(jPr,{type:d,currentPageParams:c,isOpen:l,setIsOpen:u,church:t,hasComments:!Pw(e.comments),hasLikes:!!(e?.likedCount??0),isInteractionEnabled:n,theme:a})]})};Cw(`
|
|
865
865
|
fragment ContentItemFragment on ContentItem {
|
|
866
866
|
id
|
|
867
867
|
title
|
|
@@ -945,7 +945,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
945
945
|
...ShareButtonFragment
|
|
946
946
|
}
|
|
947
947
|
}
|
|
948
|
-
`);var
|
|
948
|
+
`);var LIr=({livestream:e})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(cPr,{media:e.stream??void 0,coverImage:e.coverImage??void 0,livestream:e}),(0,q.jsxs)(`div`,{className:`mt-6 md:mt-12 mb-4 mx-auto [&>*]:mx-auto [&>*]:max-w-[65ch]`,children:[(0,q.jsx)(`div`,{className:`prose dark:prose-invert`,children:(0,q.jsx)(kC,{as:`h1`,children:e.title})}),e.htmlContent?(0,q.jsx)(iAe,{feature:{content:e.htmlContent}}):null]})]});Cw(`
|
|
949
949
|
fragment LivestreamFragment on Livestream {
|
|
950
950
|
id
|
|
951
951
|
title
|
|
@@ -959,7 +959,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
959
959
|
}
|
|
960
960
|
...LivestreamPlayerFragment
|
|
961
961
|
}
|
|
962
|
-
`);var
|
|
962
|
+
`);var RIr=typeof process<`u`&&process.env.NODE_ENV===`development`?`http://localhost:4000`:`https://l.apollos.app`;function zIr({church:e,accessToken:t,children:n}){let r=(0,z.useCallback)(n=>{let r=new URLSearchParams({link:n,church:e});return t&&r.append(`token`,`Bearer ${t}`),`${RIr}/r?${r.toString()}`},[e,t]);return(0,q.jsx)(mke.Provider,{value:{church:e,accessToken:t},children:(0,q.jsx)(`div`,{onClick:e=>{let t=e.target;if(t&&t.tagName===`A`){let n=t.href,i=t.getAttribute(`to`),a=n||i;if(a){if(a.includes(`/auth/logout`)||a.startsWith(`http`)||a.startsWith(`mailto:`)||a.startsWith(`tel:`))return;e.preventDefault();try{let e=r(a);window.location.href=e}catch(e){console.error(`Error during redirection:`,e),window.location.href=a}}}},children:n})})}function BIr(e,t){if(!e)return t;let n=new Date(e).getTime()-Date.now();return Number.isNaN(n)?t:Math.max(1,Math.ceil(n/1e3))}var VIr=s(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),HIr=s(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),UIr=s(((e,t)=>{t.exports=HIr()(Object.keys,Object)})),WIr=s(((e,t)=>{var n=VIr(),r=UIr(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),GIr=s(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),E7=s(((e,t)=>{var n=GIr(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),KIr=s(((e,t)=>{t.exports=E7().Symbol})),qIr=s(((e,t)=>{var n=KIr(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),JIr=s(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),YIr=s(((e,t)=>{var n=KIr(),r=qIr(),i=JIr(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),XIr=s(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),ZIr=s(((e,t)=>{var n=YIr(),r=XIr(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),QIr=s(((e,t)=>{t.exports=E7()[`__core-js_shared__`]})),$Ir=s(((e,t)=>{var n=QIr(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),eLr=s(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),tLr=s(((e,t)=>{var n=ZIr(),r=$Ir(),i=XIr(),a=eLr(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),nLr=s(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),D7=s(((e,t)=>{var n=tLr(),r=nLr();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),rLr=s(((e,t)=>{t.exports=D7()(E7(),`DataView`)})),iLr=s(((e,t)=>{t.exports=D7()(E7(),`Map`)})),aLr=s(((e,t)=>{t.exports=D7()(E7(),`Promise`)})),oLr=s(((e,t)=>{t.exports=D7()(E7(),`Set`)})),sLr=s(((e,t)=>{t.exports=D7()(E7(),`WeakMap`)})),cLr=s(((e,t)=>{var n=rLr(),r=iLr(),i=aLr(),a=oLr(),o=sLr(),s=YIr(),c=eLr(),l=`[object Map]`,u=`[object Object]`,d=`[object Promise]`,f=`[object Set]`,p=`[object WeakMap]`,m=`[object DataView]`,h=c(n),g=c(r),_=c(i),v=c(a),y=c(o),b=s;(n&&b(new n(new ArrayBuffer(1)))!=m||r&&b(new r)!=l||i&&b(i.resolve())!=d||a&&b(new a)!=f||o&&b(new o)!=p)&&(b=function(e){var t=s(e),n=t==u?e.constructor:void 0,r=n?c(n):``;if(r)switch(r){case h:return m;case g:return l;case _:return d;case v:return f;case y:return p}return t}),t.exports=b})),lLr=s(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),uLr=s(((e,t)=>{var n=YIr(),r=lLr(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),dLr=s(((e,t)=>{var n=uLr(),r=lLr(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),fLr=s(((e,t)=>{t.exports=Array.isArray})),pLr=s(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),mLr=s(((e,t)=>{var n=ZIr(),r=pLr();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),hLr=s(((e,t)=>{function n(){return!1}t.exports=n})),gLr=s(((e,t)=>{var n=E7(),r=hLr(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),_Lr=s(((e,t)=>{var n=YIr(),r=pLr(),i=lLr(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,_=`[object WeakMap]`,v=`[object ArrayBuffer]`,y=`[object DataView]`,b=`[object Float32Array]`,x=`[object Float64Array]`,S=`[object Int8Array]`,C=`[object Int16Array]`,w=`[object Int32Array]`,T=`[object Uint8Array]`,E=`[object Uint8ClampedArray]`,D=`[object Uint16Array]`,O=`[object Uint32Array]`,k={};k[b]=k[x]=k[S]=k[C]=k[w]=k[T]=k[E]=k[D]=k[O]=!0,k[a]=k[o]=k[v]=k[s]=k[y]=k[c]=k[l]=k[u]=k[d]=k[f]=k[p]=k[m]=k[h]=k[g]=k[_]=!1;function A(e){return i(e)&&r(e.length)&&!!k[n(e)]}t.exports=A})),vLr=s(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),yLr=s(((e,t)=>{var n=GIr(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),bLr=s(((e,t)=>{var n=_Lr(),r=vLr(),i=yLr(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),xLr=u(s(((e,t)=>{var n=WIr(),r=cLr(),i=dLr(),a=fLr(),o=mLr(),s=gLr(),c=VIr(),l=bLr(),u=`[object Map]`,d=`[object Set]`,f=Object.prototype.hasOwnProperty;function p(e){if(e==null)return!0;if(o(e)&&(a(e)||typeof e==`string`||typeof e.splice==`function`||s(e)||l(e)||i(e)))return!e.length;var t=r(e);if(t==u||t==d)return!e.size;if(c(e))return!n(e).length;for(var p in e)if(f.call(e,p))return!1;return!0}t.exports=p}))());Oy();var SLr=vy`
|
|
963
963
|
mutation completeRegistrationEmbed(
|
|
964
964
|
$mergeProfileId: ID
|
|
965
965
|
$profileInput: [UpdateProfileInput]
|
|
@@ -975,7 +975,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
975
975
|
lastName
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
|
-
`;function
|
|
978
|
+
`;function CLr(e={}){return qy(SLr,e)}Oy();var wLr=vy`
|
|
979
979
|
query getContentFeed($id: ID!, $after: String, $first: Int) {
|
|
980
980
|
node(id: $id) {
|
|
981
981
|
... on ContentChannel {
|
|
@@ -1006,7 +1006,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1006
1006
|
}
|
|
1007
1007
|
}
|
|
1008
1008
|
}
|
|
1009
|
-
`;function
|
|
1009
|
+
`;function TLr(e={}){let t=By(wLr,{errorPolicy:`all`,...e});return{content:t?.data?.node?.childContentItemsConnection||{},...t}}var ELr=Cw(`
|
|
1010
1010
|
query getContentItemEmbeds($id: ID!, $withProgress: Boolean = false) {
|
|
1011
1011
|
content: node(id: $id) {
|
|
1012
1012
|
id
|
|
@@ -1016,7 +1016,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
1018
|
}
|
|
1019
|
-
`);function
|
|
1019
|
+
`);function DLr(e={}){let t=By(ELr,{fetchPolicy:`cache-and-network`,errorPolicy:`all`,...e});return{item:t?.data?.content,...t}}Oy();var OLr=vy`
|
|
1020
1020
|
query getCurrentChurchEmbeds {
|
|
1021
1021
|
currentChurch {
|
|
1022
1022
|
mobileAppStoreUrl
|
|
@@ -1035,7 +1035,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
1037
1037
|
}
|
|
1038
|
-
`;function
|
|
1038
|
+
`;function kLr(e={}){let t=By(OLr,{fetchPolicy:`cache-and-network`,errorPolicy:`all`,...e});return{currentChurch:t?.data?.currentChurch,...t}}var ALr=(e,t={})=>{let[n,r]=ob(),{token:i,authenticated:a}=n,{data:o,error:s,loading:c,refetch:l}=By(e,{skip:!a,fetchPolicy:`network-only`,onError:()=>{console.warn(`Authentication error: logging out...`),r(ab())},...t})||{},u=(0,z.useCallback)(()=>{l||setTimeout(()=>l(),0)},[l]);return(0,z.useEffect)(()=>{a&&u()?.catch(()=>{console.warn(`Refetch error, possibly unauthenticated`)})},[a,i,u]),{data:o,loading:c,error:s,authenticated:a}};Oy();var jLr=vy`
|
|
1039
1039
|
query getCurrentUserEmbeds {
|
|
1040
1040
|
currentUser {
|
|
1041
1041
|
id
|
|
@@ -1055,7 +1055,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
1058
|
-
`;function O7(e={}){let t=
|
|
1058
|
+
`;function O7(e={}){let t=ALr(jLr,{fetchPolicy:`cache-and-network`,errorPolicy:`all`,...e});return{currentUser:t?.data?.currentUser||null,...t}}var MLr=Cw(`
|
|
1059
1059
|
query getFeatureFeedRoute($id: ID!) {
|
|
1060
1060
|
featureFeed: node(id: $id) {
|
|
1061
1061
|
id
|
|
@@ -1065,7 +1065,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
1067
|
}
|
|
1068
|
-
`);function
|
|
1068
|
+
`);function NLr(e={}){let t=By(MLr,{fetchPolicy:`cache-and-network`,errorPolicy:`all`,...e});return{features:t?.data?.featureFeed||{},...t}}var PLr=e=>{let[t,n]=(0,z.useState)({});function r(e,t){n(n=>({...n,[e]:t}))}function i(t){typeof e==`function`&&e()}function a(){n({})}return{setFieldValue:r,handleSubmit:i,values:t,reset:a,setValues:n}},FLr=Cw(`
|
|
1069
1069
|
query getLivestreamEmbeds($id: ID!) {
|
|
1070
1070
|
livestream: node(id: $id) {
|
|
1071
1071
|
id
|
|
@@ -1075,19 +1075,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
|
-
`);function
|
|
1078
|
+
`);function ILr(e={}){let t=By(FLr,{fetchPolicy:`cache-and-network`,errorPolicy:`all`,...e});return{livestream:t?.data?.livestream,...t}}Oy();var LLr=vy`
|
|
1079
1079
|
mutation requestLogin($identity: AuthenticationIdentityInput!) {
|
|
1080
1080
|
requestLogin(identity: $identity) {
|
|
1081
1081
|
result
|
|
1082
1082
|
}
|
|
1083
1083
|
}
|
|
1084
|
-
`;function
|
|
1084
|
+
`;function RLr(e={}){return qy(LLr,e)}Oy();var zLr=vy`
|
|
1085
1085
|
mutation requestRegister($identity: AuthenticationIdentityInput!) {
|
|
1086
1086
|
requestRegister(identity: $identity) {
|
|
1087
1087
|
result
|
|
1088
1088
|
}
|
|
1089
1089
|
}
|
|
1090
|
-
`;function
|
|
1090
|
+
`;function BLr(e={}){return qy(zLr,e)}Oy();var VLr=vy`
|
|
1091
1091
|
mutation updateProfileFields($input: [UpdateProfileInput]!) {
|
|
1092
1092
|
updateProfileFields(input: $input) {
|
|
1093
1093
|
id
|
|
@@ -1095,7 +1095,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1095
1095
|
lastName
|
|
1096
1096
|
}
|
|
1097
1097
|
}
|
|
1098
|
-
`;function
|
|
1098
|
+
`;function HLr(e={}){return qy(VLr,e)}Oy();var ULr=vy`
|
|
1099
1099
|
mutation uploadProfileImage($file: Upload!, $size: Int!) {
|
|
1100
1100
|
uploadProfileImage(file: $file, size: $size) {
|
|
1101
1101
|
id
|
|
@@ -1109,7 +1109,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1109
1109
|
}
|
|
1110
1110
|
}
|
|
1111
1111
|
}
|
|
1112
|
-
`;function
|
|
1112
|
+
`;function WLr(e={}){return qy(ULr,e)}Oy();var GLr=vy`
|
|
1113
1113
|
mutation validateLoginEmbeds(
|
|
1114
1114
|
$identity: AuthenticationIdentityInput!
|
|
1115
1115
|
$otp: String!
|
|
@@ -1140,7 +1140,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1140
1140
|
}
|
|
1141
1141
|
}
|
|
1142
1142
|
}
|
|
1143
|
-
`;function
|
|
1143
|
+
`;function KLr(e={}){return qy(GLr,e)}Oy();var qLr=vy`
|
|
1144
1144
|
mutation validateRegisterEmbeds(
|
|
1145
1145
|
$identity: AuthenticationIdentityInput!
|
|
1146
1146
|
$otp: String!
|
|
@@ -1171,15 +1171,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1171
1171
|
}
|
|
1172
1172
|
}
|
|
1173
1173
|
}
|
|
1174
|
-
`;function
|
|
1175
|
-
best ministries and events.`,children:[(0,q.jsxs)(J7,{textAlign:`left`,children:[(0,q.jsx)(J7,{mb:`base`,children:(0,q.jsx)(RC,{id:`firstName`,placeholder:`First Name`,handleOnChange:e=>h(`firstName`,e),required:!0,error:r?.firstName,editable:!g})}),(0,q.jsx)(J7,{mb:`base`,children:(0,q.jsx)(RC,{id:`lastName`,placeholder:`Last Name`,handleOnChange:e=>h(`lastName`,e),required:!0,error:r?.lastName,editable:!g})})]}),(0,q.jsx)(bC,{status:t,onClick:m,disabled:!(p.firstName&&p.lastName)||g,children:`Finish${g?`ing...`:``}`})]})}function
|
|
1174
|
+
`;function JLr(e={}){return qy(qLr,e)}var YLr={defaultHeading:`Welcome.`,defaultSubHeading:`Please login to continue.`};Bw(),qC();function XLr(e={}){let[t,n]=ob(),r=()=>{n(ib({step:t.prevStep,prevStep:Qy.Welcome}))};return(0,q.jsx)(J7,{position:`fixed`,top:`0`,bottom:`0`,left:`0`,right:`0`,overflow:`scroll`,zIndex:9999,justifyContent:`center`,display:`flex`,alignItems:`center`,backgroundColor:`neutral.gray6`,children:(0,q.jsxs)(EC,{...e,className:`w-[440px] flex flex-col`,children:[t.prevStep===Qy.Identity?(0,q.jsx)(J7,{display:`flex`,alignItems:`center`,justifyContent:`end`,className:`pt-4 pr-4`,children:(0,q.jsxs)(bC,{variant:`link`,onClick:()=>r(),mode:`ghost`,surface:`tinted`,small:!0,children:[(0,q.jsx)(zw,{}),`Back`]})}):(0,q.jsx)(J7,{display:`flex`,alignItems:`center`,justifyContent:`end`,className:`pt-4 pr-4`,children:(0,q.jsx)(bC,{title:`Close`,circular:!0,surface:`tinted`,onClick:e.onClose,children:(0,q.jsx)(KC,{size:18,weight:`bold`})})}),(0,q.jsxs)(DC,{className:`px-9 pb-9`,children:[(0,q.jsx)(kC,{as:`h2`,children:e.heading||YLr.defaultHeading}),(0,q.jsx)(kC,{fg:`secondary`,className:`mb-6`,children:e.subHeading||YLr.defaultSubHeading}),e.children]})]})})}XLr.propTypes={children:Zy.default.oneOfType([Zy.default.element,Zy.default.node]).isRequired,heading:Zy.default.string,subHeading:Zy.default.string};var ZLr=XLr,QLr=e=>{let[t,n]=(0,z.useState)(`IDLE`),[r,i]=(0,z.useState)(null),[a,o]=ob(),[s,c]=(0,z.useState)(``),l=yx(),[u]=KLr(),[d]=JLr(),f=()=>{n(`ERROR`),i({passcode:`The code you entered is incorrect.`})},p=({token:e,user:t,sharedProfiles:n})=>{let r=(0,xLr.default)(t.firstName)||(0,xLr.default)(t.lastName);a.userExists?(l.track(`UserLogin`,{userId:t?.id,firstName:t?.firstName,lastName:t?.lastName,email:t?.email,phone:t?.phone}),o(ib(r?{token:e,step:Qy.Details}:{token:e,step:Qy.Success}))):n.length>1?(l.track(`ExistingUserRegister`,{userId:t?.id,email:t?.email,phone:t?.phone,numberOfSharedProfiles:n.length}),o(ib({token:e,step:Qy.Merge,userExists:!0,sharedProfiles:n}))):(l.track(`NewUserRegister`,{userId:t?.id,email:t?.email,phone:t?.phone}),o(ib(r?{token:e,step:Qy.Details,userExists:!0,user:t}:{token:e,step:Qy.Success,userExists:!0})))},m=async e=>{e.preventDefault(),n(`LOADING`);try{a.userExists?await u({variables:{identity:a.identity,otp:s},update:(e,{data:{validateLogin:{accessToken:t,person:n}={}}={}})=>{p({token:t,user:n})},onError:f}):await d({variables:{identity:a.identity,otp:s},update:(e,{data:{validateRegister:{accessToken:t,person:n,sharedProfiles:r}={}}={}})=>{p({token:t,user:n,sharedProfiles:r})},onError:f})}catch(e){console.log(e)}},h=t===`LOADING`;return(0,q.jsx)(ZLr,{...e,heading:`We sent you a code...`,subHeading:`Verify the code we sent to your ${a.type===`email`?`email`:`phone`}.`,children:(0,q.jsxs)(`form`,{onSubmit:m,children:[(0,q.jsx)(J7,{mb:`base`,children:(0,q.jsx)(LSe,{id:`passcode`,value:s||``,onChange:e=>c(e),required:!0,maxLength:6,autoFocus:!0,error:r?.passcode})}),(0,q.jsx)(bC,{surface:`solid`,type:`submit`,disabled:!s||h,children:`Verify${h?`ing...`:``}`})]})})};function $Lr(e){return e.charAt(0).toUpperCase()+e.slice(1)}function eRr(e){let[t,n]=(0,z.useState)(`IDLE`),[r,i]=(0,z.useState)(null),[a,o]=(0,z.useState)(null),[s,c]=ob(),[l]=HLr(),[u]=CLr(),{currentUser:d}=O7();(0,z.useEffect)(()=>{o(d)},[d]);let f=e=>{n(`ERROR`),i(e)},{values:p,handleSubmit:m,setFieldValue:h}=PLr(async()=>{n(`LOADING`);let e=Object.keys(p).map(e=>({field:$Lr(e),value:p[e]}));try{c(ib({userProfile:e})),await u({variables:{profileInput:e}}),c(ib({step:Qy.Success}))}catch(e){f(e),console.log(JSON.stringify(e))}}),g=t===`LOADING`;return(0,q.jsxs)(ZLr,{...e,heading:`Complete your profile`,subHeading:`Help us learn a little more about you so we can connect you with the
|
|
1175
|
+
best ministries and events.`,children:[(0,q.jsxs)(J7,{textAlign:`left`,children:[(0,q.jsx)(J7,{mb:`base`,children:(0,q.jsx)(RC,{id:`firstName`,placeholder:`First Name`,handleOnChange:e=>h(`firstName`,e),required:!0,error:r?.firstName,editable:!g})}),(0,q.jsx)(J7,{mb:`base`,children:(0,q.jsx)(RC,{id:`lastName`,placeholder:`Last Name`,handleOnChange:e=>h(`lastName`,e),required:!0,error:r?.lastName,editable:!g})})]}),(0,q.jsx)(bC,{status:t,onClick:m,disabled:!(p.firstName&&p.lastName)||g,children:`Finish${g?`ing...`:``}`})]})}function tRr({id:e}){let{features:t}=NLr({variables:{id:e}});return(0,q.jsx)(hIr,{features:t?.features??[]})}Kg();var nRr=e=>new Gg((t,n)=>(t.setContext(({headers:t})=>({headers:{...t,"x-church":e,"x-cache-me-not":1}})),n(t)));Fd(),Yg(),Eg();function rRr(e){return new Gg(function(t,n){var r=Ad(t,[]);return new eg(function(i){var a,o=!1;return Promise.resolve(r).then(function(n){return e(n,t.getContext())}).then(t.setContext).then(function(){o||(a=n(t).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}))}).catch(i.error.bind(i)),function(){o=!0,a&&a.unsubscribe()}})})}var iRr=rRr(async(e,{headers:t})=>{let n=null;try{return typeof window<`u`&&(n=window.localStorage.getItem($y)),n?{headers:{...t,authorization:n?`Bearer ${n}`:``}}:{}}catch(e){return console.warn(`Authorization Failed`,e),{}}});Fd(),$g(),Eg(),Yg();function aRr(e){return new Gg(function(t,n){return new eg(function(r){var i,a,o;try{i=n(t).subscribe({next:function(i){if(i.errors?o=e({graphQLErrors:i.errors,response:i,operation:t,forward:n}):sae(i)&&(o=e({protocolErrors:i.extensions[Zg],response:i,operation:t,forward:n})),o){a=o.subscribe({next:r.next.bind(r),error:r.error.bind(r),complete:r.complete.bind(r)});return}r.next(i)},error:function(i){if(o=e({operation:t,networkError:i,graphQLErrors:i&&i.result&&i.result.errors||void 0,forward:n}),o){a=o.subscribe({next:r.next.bind(r),error:r.error.bind(r),complete:r.complete.bind(r)});return}r.error(i)},complete:function(){o||r.complete.bind(r)()}})}catch(i){e({networkError:i,operation:t,forward:n}),r.error(i)}return function(){i&&i.unsubscribe(),a&&i.unsubscribe()}})})}(function(e){kd(t,e);function t(t){var n=e.call(this)||this;return n.link=aRr(t),n}return t.prototype.request=function(e,t){return this.link.request(e,t)},t})(Gg);var oRr=s(((e,t)=>{(function(n){var r=typeof e==`object`&&e,i=typeof t==`object`&&t&&t.exports==r&&t,a=typeof global==`object`&&global;(a.global===a||a.window===a)&&(n=a);var o=function(e){this.message=e};o.prototype=Error(),o.prototype.name=`InvalidCharacterError`;var s=function(e){throw new o(e)},c=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,l=/[\t\n\f\r ]/g,u={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&s(`The string to be encoded contains characters outside of the Latin1 range.`);for(var t=e.length%3,n=``,r=-1,i,a,o,l,u=e.length-t;++r<u;)i=e.charCodeAt(r)<<16,a=e.charCodeAt(++r)<<8,o=e.charCodeAt(++r),l=i+a+o,n+=c.charAt(l>>18&63)+c.charAt(l>>12&63)+c.charAt(l>>6&63)+c.charAt(l&63);return t==2?(i=e.charCodeAt(r)<<8,a=e.charCodeAt(++r),l=i+a,n+=c.charAt(l>>10)+c.charAt(l>>4&63)+c.charAt(l<<2&63)+`=`):t==1&&(l=e.charCodeAt(r),n+=c.charAt(l>>2)+c.charAt(l<<4&63)+`==`),n},decode:function(e){e=String(e).replace(l,``);var t=e.length;t%4==0&&(e=e.replace(/==?$/,``),t=e.length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&s(`Invalid character: the string to be decoded is not correctly encoded.`);for(var n=0,r,i,a=``,o=-1;++o<t;)i=c.indexOf(e.charAt(o)),r=n%4?r*64+i:i,n++%4&&(a+=String.fromCharCode(255&r>>(-2*n&6)));return a},version:`1.0.0`};if(typeof define==`function`&&typeof define.amd==`object`&&define.amd)define(function(){return u});else if(r&&!r.nodeType){if(i)i.exports=u;else for(var d in u)u.hasOwnProperty(d)&&(r[d]=u[d])}else n.base64=u})(e)})),sRr=s(((e,t)=>{t.exports=class{constructor({uri:e,name:t,type:n}){this.uri=e,this.name=t,this.type=n}}})),cRr=s(((e,t)=>{var n=sRr();t.exports=function(e){return typeof File<`u`&&e instanceof File||typeof Blob<`u`&&e instanceof Blob||e instanceof n}})),lRr=s(((e,t)=>{var n=cRr();t.exports=function(e,t=``,r=n){let i=new Map,a=new Map;function o(e,t,n){let s=e;if(r(e)){s=null;let n=i.get(e);n?n.push(t):i.set(e,[t])}else{let r=Array.isArray(e)||typeof FileList<`u`&&e instanceof FileList,i=e&&e.constructor===Object;if(r||i){let i=a.has(e);if(i?s=a.get(e):(s=r?[]:{},a.set(e,s)),!n.has(e)){let a=t?`${t}.`:``,c=new Set(n).add(e);if(r){let t=0;for(let n of e){let e=o(n,a+t++,c);i||s.push(e)}}else for(let t in e){let n=o(e[t],a+t,c);i||(s[t]=n)}}}}return s}return{clone:o(e,t,new Set),files:i}}})),uRr=s(((e,t)=>{t.exports=function(e,t,n){e.append(t,n,n.name)}})),dRr=s(((e,t)=>{t.exports=cRr()})),fRr=s(((e,t)=>{var{ApolloLink:n,Observable:r}=(Ay(),d(ky)),{createSignalIfSupported:i,fallbackHttpConfig:a,parseAndCheckHttpResponse:o,rewriteURIForGET:s,selectHttpOptionsAndBody:c,selectURI:l,serializeFetchParameter:u}=(S_(),d(x_)),f=lRr(),p=uRr(),m=dRr();t.exports=function({uri:e=`/graphql`,useGETForQueries:t,isExtractableFile:d=m,FormData:h,formDataAppendFile:g=p,fetch:_,fetchOptions:v,credentials:y,headers:b,includeExtensions:x}={}){let S={http:{includeExtensions:x},options:v,credentials:y,headers:b};return new n(n=>{let p=n.getContext(),{clientAwareness:{name:m,version:v}={},headers:y}=p,b={http:p.http,options:p.fetchOptions,credentials:p.credentials,headers:{...m&&{"apollographql-client-name":m},...v&&{"apollographql-client-version":v},...y}},{options:x,body:C}=c(n,a,S,b),{clone:w,files:T}=f(C,``,d),E=l(n,e);if(T.size){delete x.headers[`content-type`];let e=new(h||FormData);e.append(`operations`,u(w,`Payload`));let t={},n=0;T.forEach(e=>{t[++n]=e}),e.append(`map`,JSON.stringify(t)),n=0,T.forEach((t,r)=>{g(e,++n,r)}),x.body=e}else if(t&&!n.query.definitions.some(e=>e.kind===`OperationDefinition`&&e.operation===`mutation`)&&(x.method=`GET`),x.method===`GET`){let{newURI:e,parseError:t}=s(E,C);if(t)return new r(e=>{e.error(t)});E=e}else x.body=u(w,`Payload`);let{controller:D}=i();D&&(x.signal&&(x.signal.aborted?D.abort():x.signal.addEventListener(`abort`,()=>{D.abort()},{once:!0})),x.signal=D.signal);let O=_||fetch;return new r(e=>{let t;return O(E,x).then(e=>(n.setContext({response:e}),e)).then(o(n)).then(t=>{e.next(t),e.complete()}).catch(n=>{t||(n.result&&n.result.errors&&n.result.data&&e.next(n.result),e.error(n))}),()=>{t=!0,D&&D.abort()}})})}})),pRr=u(oRr()),mRr=u(fRr(),1);Hie(),v_(),Eg();var hRr=typeof window<`u`&&(window.location.hostname===`localhost`||window.location.hostname===`127.0.0.1`)?`http://localhost:4000`:`https://cdn.apollos.app`,gRr=Vie(({query:e})=>{let{kind:t,operation:n}=zm(e);return t===`OperationDefinition`&&n===`mutation`},(0,mRr.default)({uri:hRr}),__({uri:hRr}));jie();var _Rr=!1,vRr=[],yRr=e=>{_Rr=e},bRr=e=>{vRr.push(e)},xRr=()=>{vRr.map(e=>e()),vRr=[]},SRr=()=>{vRr=[]};async function CRr(e){let t=window.localStorage.getItem(eb);if(!t)throw Error(`Refresh Token not found.`);return fetch(hRr,{method:`POST`,headers:{"x-church":e,"Content-Type":`application/json`},body:JSON.stringify({query:`
|
|
1176
1176
|
mutation token($refreshToken: String!) {
|
|
1177
1177
|
refreshSession(refreshToken: $refreshToken){
|
|
1178
1178
|
accessToken
|
|
1179
1179
|
refreshToken
|
|
1180
1180
|
}
|
|
1181
1181
|
}
|
|
1182
|
-
`,variables:{refreshToken:t}})})}var xRr=e=>!!e.filter(e=>e?.extensions?.code===`UNAUTHENTICATED`).length;function SRr(e){if(!e)return null;try{let t=e.split(`.`)[1],n=JSON.parse(uRr.default.decode(t)).exp,r=new Date().getTime();return n*1e3<r}catch{return null}}function CRr(e){let t=e.getContext()?.headers?.authorization,n=null;return t&&(n=t.replace(`Bearer `,``)),n}var wRr=(e,t)=>nRr(({graphQLErrors:n,networkError:r,operation:i,forward:a})=>{if(n){let r=xRr(n),o=CRr(i),s=SRr(o);if(r&&o&&s){if(!mRr){gRr(!0);let n=null;return Og(bRr(t).then(e=>e.json()).then(e=>{if(n=e?.data?.refreshSession?.accessToken,n)return window.localStorage.setItem($y,n);throw Error(`Token could not be refreshed.`)}).then(()=>{let e=i.getContext().headers;return i.setContext({headers:{...e,authorization:`Bearer ${n}`}}),a(i)}).catch(()=>{yRr(),gRr(!1),e()})).flatMap(()=>(vRr(),gRr(!1),a(i)))}return Og(new Promise(e=>{_Rr(()=>e())})).flatMap(()=>a(i))}}return null}),TRr=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r},ERr=function(){function e(e){var t=e.debug,n=t!==void 0&&t;this.debug=n,this.lines=[]}return e.prototype.emit=function(t,n){if(t in console){var r=e.prefix;console[t].apply(console,TRr([r],n))}},e.prototype.tailLogs=function(){var e=this;this.lines.forEach(function(t){var n=t[0],r=t[1];return e.emit(n,r)})},e.prototype.getLogs=function(){return this.lines},e.prototype.write=function(t,n){var r=e.buffer;this.lines=TRr(this.lines.slice(1-r),[[t,n]]),(this.debug||t!==`log`)&&this.emit(t,n)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.write(`log`,e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.write(`warn`,e)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.write(`error`,e)},e.buffer=30,e.prefix=`[apollo-cache-persist]`,e}(),DRr=function(){function e(e){var t=e.cache,n=e.serialize,r=n===void 0||n;this.cache=t,this.serialize=r}return e.prototype.extract=function(){var e=this.cache.extract();return this.serialize&&(e=JSON.stringify(e)),e},e.prototype.restore=function(e){this.serialize&&typeof e==`string`&&(e=JSON.parse(e)),e!=null&&this.cache.restore(e)},e}(),ORr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},kRr=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:s(0),throw:s(1),return:s(2)};return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},ARr=function(){function e(e){var t=e.storage,n=e.key,r=n===void 0?`apollo-cache-persist`:n;this.storage=t,this.key=r}return e.prototype.read=function(){return ORr(this,void 0,void 0,function(){return kRr(this,function(e){return[2,this.storage.getItem(this.key)]})})},e.prototype.write=function(e){return ORr(this,void 0,void 0,function(){return kRr(this,function(t){switch(t.label){case 0:return[4,this.storage.setItem(this.key,e)];case 1:return t.sent(),[2]}})})},e.prototype.purge=function(){return ORr(this,void 0,void 0,function(){return kRr(this,function(e){switch(e.label){case 0:return[4,this.storage.removeItem(this.key)];case 1:return e.sent(),[2]}})})},e.prototype.getSize=function(){return ORr(this,void 0,void 0,function(){var e;return kRr(this,function(t){switch(t.label){case 0:return[4,this.storage.getItem(this.key)];case 1:return e=t.sent(),e==null?[2,0]:[2,typeof e==`string`?e.length:null]}})})},e}(),jRr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},MRr=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:s(0),throw:s(1),return:s(2)};return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},NRr=function(){function e(e,t){var n=e.log,r=e.cache,i=e.storage,a=t.maxSize,o=a===void 0?1048576:a,s=t.persistenceMapper;this.log=n,this.cache=r,this.storage=i,this.paused=!1,s&&(this.persistenceMapper=s),o&&(this.maxSize=o)}return e.prototype.persist=function(){return jRr(this,void 0,void 0,function(){var e,t;return MRr(this,function(n){switch(n.label){case 0:return n.trys.push([0,6,,7]),e=this.cache.extract(),this.paused||!this.persistenceMapper?[3,2]:[4,this.persistenceMapper(e)];case 1:e=n.sent(),n.label=2;case 2:return this.maxSize!=null&&typeof e==`string`&&e.length>this.maxSize&&!this.paused?[4,this.purge()]:[3,4];case 3:return n.sent(),this.paused=!0,[2];case 4:return this.paused?[2]:[4,this.storage.write(e)];case 5:return n.sent(),this.log.info(typeof e==`string`?`Persisted cache of size `+e.length+` characters`:`Persisted cache`),[3,7];case 6:throw t=n.sent(),this.log.error(`Error persisting cache`,t),t;case 7:return[2]}})})},e.prototype.restore=function(){return jRr(this,void 0,void 0,function(){var e,t;return MRr(this,function(n){switch(n.label){case 0:return n.trys.push([0,5,,6]),[4,this.storage.read()];case 1:return e=n.sent(),e==null?[3,3]:[4,this.cache.restore(e)];case 2:return n.sent(),this.log.info(typeof e==`string`?`Restored cache of size `+e.length+` characters`:`Restored cache`),[3,4];case 3:this.log.info(`No stored cache to restore`),n.label=4;case 4:return[3,6];case 5:throw t=n.sent(),this.log.error(`Error restoring cache`,t),t;case 6:return[2]}})})},e.prototype.purge=function(){return jRr(this,void 0,void 0,function(){var e;return MRr(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.storage.purge()];case 1:return t.sent(),this.log.info(`Purged cache storage`),[3,3];case 2:throw e=t.sent(),this.log.error(`Error purging cache storage`,e),e;case 3:return[2]}})})},e}(),PRr=(function(e){var t=e.cache;return function(e){var n=t.write,r=t.evict,i=t.modify;return t.write=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=n.apply(t,r);return e(),a},t.evict=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=r.apply(t,n);return e(),a},t.modify=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var a=i.apply(t,n);return e(),a},function(){t.write=n,t.evict=r,t.modify=i}}}),FRr=(function(e){var t=e.log,n=e.cache;return function(e){return t.warn("Trigger option `background` not available on web; using `write` trigger"),PRr({cache:n})(e)}}),IRr=function(){function e(t,n){var r=this,i=t.log,a=t.persistor;this.fire=function(){if(!r.debounce){r.persist();return}r.timeout!=null&&clearTimeout(r.timeout),r.timeout=setTimeout(r.persist,r.debounce)},this.persist=function(){r.paused||r.persistor.persist()};var o=e.defaultDebounce,s=n.cache,c=n.debounce,l=n.trigger,u=l===void 0?`write`:l;if(u)switch(this.debounce=c??o,this.persistor=a,this.paused=!1,u){case`write`:this.uninstall=PRr({cache:s})(this.fire);break;case`background`:c&&i.warn("Debounce is not recommended with `background` trigger"),this.debounce=c,this.uninstall=FRr({cache:s,log:i})(this.fire);break;default:if(typeof u==`function`)this.uninstall=u(this.fire);else throw Error(`Unrecognized trigger option: `+u)}}return e.prototype.pause=function(){this.paused=!0},e.prototype.resume=function(){this.paused=!1},e.prototype.remove=function(){this.uninstall&&(this.uninstall(),this.uninstall=null,this.paused=!0)},e.defaultDebounce=1e3,e}(),LRr=function(){function e(e){if(!e.cache)throw Error(`In order to persist your Apollo Cache, you need to pass in a cache. Please see https://www.apollographql.com/docs/react/basics/caching.html for our default InMemoryCache.`);if(!e.storage)throw Error(`In order to persist your Apollo Cache, you need to pass in an underlying storage provider. Please see https://github.com/apollographql/apollo-cache-persist#storage-providers`);var t=new ERr(e),n=new DRr(e),r=new ARr(e),i=new NRr({log:t,cache:n,storage:r},e),a=new IRr({log:t,persistor:i},e);this.log=t,this.cache=n,this.storage=r,this.persistor=i,this.trigger=a}return e.prototype.persist=function(){return this.persistor.persist()},e.prototype.restore=function(){return this.persistor.restore()},e.prototype.purge=function(){return this.persistor.purge()},e.prototype.pause=function(){this.trigger.pause()},e.prototype.resume=function(){this.trigger.resume()},e.prototype.remove=function(){this.trigger.remove()},e.prototype.getLogs=function(e){if(e===void 0&&(e=!1),e)this.log.tailLogs();else return this.log.getLogs()},e.prototype.getSize=function(){return this.storage.getSize()},e}(),RRr=(function(e){return new LRr(e).restore()}),zRr=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();(function(e){zRr(t,e);function t(t){var n=e.call(this,t)||this;return n.storage=new VRr(t),n.persistor=new BRr({log:n.log,cache:n.cache,storage:n.storage},t),n}return t.prototype.restoreSync=function(){this.persistor.restoreSync()},t})(LRr);var BRr=function(e){zRr(t,e);function t(t,n){var r=t.log,i=t.cache,a=t.storage;return e.call(this,{log:r,cache:i,storage:a},n)||this}return t.prototype.restoreSync=function(){this.cache.restore(this.storage.readSync())},t}(NRr),VRr=function(e){zRr(t,e);function t(t){return e.call(this,t)||this}return t.prototype.readSync=function(){return this.storage.getItem(this.key)},t}(ARr);(function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.setItem=function(e,t){return this.storage.setItem(e,t)},e})(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.get(e)},e.prototype.removeItem=function(e){return this.storage.remove(e)},e.prototype.setItem=function(e,t){return this.storage.set(e,t)},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.setItem=function(e,t){var n=this;return new Promise(function(r,i){n.storage.setItem(e,t).then(function(){return r()}).catch(function(){return i()})})},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.setItem=function(e,t){return t===null?this.removeItem(e):this.storage.setItem(e,t)},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)||null},e.prototype.removeItem=function(e){var t=this;return new Promise(function(n,r){Promise.resolve(t.storage.removeItem(e)).then(function(){return n()}).catch(function(){return r()})})},e.prototype.setItem=function(e,t){var n=this;return new Promise(function(r,i){n.storage.setItem(e,t).then(function(){return r()}).catch(function(){return i()})})},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getString(e)||null},e.prototype.removeItem=function(e){return this.storage.delete(e)},e.prototype.setItem=function(e,t){return t===null?this.removeItem(e):this.storage.set(e,t)},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.setItem=function(e,t){return t===null?this.removeItem(e):this.storage.setItem(e,t)},e}(),Ay();var HRr=async(e,{church:t})=>{let{data:n}=await(await fetch(fRr,{method:`POST`,headers:{"Content-Type":`application/json`,"x-church":t},body:JSON.stringify({query:`
|
|
1182
|
+
`,variables:{refreshToken:t}})})}var wRr=e=>!!e.filter(e=>e?.extensions?.code===`UNAUTHENTICATED`).length;function TRr(e){if(!e)return null;try{let t=e.split(`.`)[1],n=JSON.parse(pRr.default.decode(t)).exp,r=new Date().getTime();return n*1e3<r}catch{return null}}function ERr(e){let t=e.getContext()?.headers?.authorization,n=null;return t&&(n=t.replace(`Bearer `,``)),n}var DRr=(e,t)=>aRr(({graphQLErrors:n,networkError:r,operation:i,forward:a})=>{if(n){let r=wRr(n),o=ERr(i),s=TRr(o);if(r&&o&&s){if(!_Rr){yRr(!0);let n=null;return Og(CRr(t).then(e=>e.json()).then(e=>{if(n=e?.data?.refreshSession?.accessToken,n)return window.localStorage.setItem($y,n);throw Error(`Token could not be refreshed.`)}).then(()=>{let e=i.getContext().headers;return i.setContext({headers:{...e,authorization:`Bearer ${n}`}}),a(i)}).catch(()=>{SRr(),yRr(!1),e()})).flatMap(()=>(xRr(),yRr(!1),a(i)))}return Og(new Promise(e=>{bRr(()=>e())})).flatMap(()=>a(i))}}return null}),ORr=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r},kRr=function(){function e(e){var t=e.debug,n=t!==void 0&&t;this.debug=n,this.lines=[]}return e.prototype.emit=function(t,n){if(t in console){var r=e.prefix;console[t].apply(console,ORr([r],n))}},e.prototype.tailLogs=function(){var e=this;this.lines.forEach(function(t){var n=t[0],r=t[1];return e.emit(n,r)})},e.prototype.getLogs=function(){return this.lines},e.prototype.write=function(t,n){var r=e.buffer;this.lines=ORr(this.lines.slice(1-r),[[t,n]]),(this.debug||t!==`log`)&&this.emit(t,n)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.write(`log`,e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.write(`warn`,e)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.write(`error`,e)},e.buffer=30,e.prefix=`[apollo-cache-persist]`,e}(),ARr=function(){function e(e){var t=e.cache,n=e.serialize,r=n===void 0||n;this.cache=t,this.serialize=r}return e.prototype.extract=function(){var e=this.cache.extract();return this.serialize&&(e=JSON.stringify(e)),e},e.prototype.restore=function(e){this.serialize&&typeof e==`string`&&(e=JSON.parse(e)),e!=null&&this.cache.restore(e)},e}(),jRr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},MRr=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:s(0),throw:s(1),return:s(2)};return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},NRr=function(){function e(e){var t=e.storage,n=e.key,r=n===void 0?`apollo-cache-persist`:n;this.storage=t,this.key=r}return e.prototype.read=function(){return jRr(this,void 0,void 0,function(){return MRr(this,function(e){return[2,this.storage.getItem(this.key)]})})},e.prototype.write=function(e){return jRr(this,void 0,void 0,function(){return MRr(this,function(t){switch(t.label){case 0:return[4,this.storage.setItem(this.key,e)];case 1:return t.sent(),[2]}})})},e.prototype.purge=function(){return jRr(this,void 0,void 0,function(){return MRr(this,function(e){switch(e.label){case 0:return[4,this.storage.removeItem(this.key)];case 1:return e.sent(),[2]}})})},e.prototype.getSize=function(){return jRr(this,void 0,void 0,function(){var e;return MRr(this,function(t){switch(t.label){case 0:return[4,this.storage.getItem(this.key)];case 1:return e=t.sent(),e==null?[2,0]:[2,typeof e==`string`?e.length:null]}})})},e}(),PRr=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},FRr=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o={next:s(0),throw:s(1),return:s(2)};return typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}},IRr=function(){function e(e,t){var n=e.log,r=e.cache,i=e.storage,a=t.maxSize,o=a===void 0?1048576:a,s=t.persistenceMapper;this.log=n,this.cache=r,this.storage=i,this.paused=!1,s&&(this.persistenceMapper=s),o&&(this.maxSize=o)}return e.prototype.persist=function(){return PRr(this,void 0,void 0,function(){var e,t;return FRr(this,function(n){switch(n.label){case 0:return n.trys.push([0,6,,7]),e=this.cache.extract(),this.paused||!this.persistenceMapper?[3,2]:[4,this.persistenceMapper(e)];case 1:e=n.sent(),n.label=2;case 2:return this.maxSize!=null&&typeof e==`string`&&e.length>this.maxSize&&!this.paused?[4,this.purge()]:[3,4];case 3:return n.sent(),this.paused=!0,[2];case 4:return this.paused?[2]:[4,this.storage.write(e)];case 5:return n.sent(),this.log.info(typeof e==`string`?`Persisted cache of size `+e.length+` characters`:`Persisted cache`),[3,7];case 6:throw t=n.sent(),this.log.error(`Error persisting cache`,t),t;case 7:return[2]}})})},e.prototype.restore=function(){return PRr(this,void 0,void 0,function(){var e,t;return FRr(this,function(n){switch(n.label){case 0:return n.trys.push([0,5,,6]),[4,this.storage.read()];case 1:return e=n.sent(),e==null?[3,3]:[4,this.cache.restore(e)];case 2:return n.sent(),this.log.info(typeof e==`string`?`Restored cache of size `+e.length+` characters`:`Restored cache`),[3,4];case 3:this.log.info(`No stored cache to restore`),n.label=4;case 4:return[3,6];case 5:throw t=n.sent(),this.log.error(`Error restoring cache`,t),t;case 6:return[2]}})})},e.prototype.purge=function(){return PRr(this,void 0,void 0,function(){var e;return FRr(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.storage.purge()];case 1:return t.sent(),this.log.info(`Purged cache storage`),[3,3];case 2:throw e=t.sent(),this.log.error(`Error purging cache storage`,e),e;case 3:return[2]}})})},e}(),LRr=(function(e){var t=e.cache;return function(e){var n=t.write,r=t.evict,i=t.modify;return t.write=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=n.apply(t,r);return e(),a},t.evict=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=r.apply(t,n);return e(),a},t.modify=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var a=i.apply(t,n);return e(),a},function(){t.write=n,t.evict=r,t.modify=i}}}),RRr=(function(e){var t=e.log,n=e.cache;return function(e){return t.warn("Trigger option `background` not available on web; using `write` trigger"),LRr({cache:n})(e)}}),zRr=function(){function e(t,n){var r=this,i=t.log,a=t.persistor;this.fire=function(){if(!r.debounce){r.persist();return}r.timeout!=null&&clearTimeout(r.timeout),r.timeout=setTimeout(r.persist,r.debounce)},this.persist=function(){r.paused||r.persistor.persist()};var o=e.defaultDebounce,s=n.cache,c=n.debounce,l=n.trigger,u=l===void 0?`write`:l;if(u)switch(this.debounce=c??o,this.persistor=a,this.paused=!1,u){case`write`:this.uninstall=LRr({cache:s})(this.fire);break;case`background`:c&&i.warn("Debounce is not recommended with `background` trigger"),this.debounce=c,this.uninstall=RRr({cache:s,log:i})(this.fire);break;default:if(typeof u==`function`)this.uninstall=u(this.fire);else throw Error(`Unrecognized trigger option: `+u)}}return e.prototype.pause=function(){this.paused=!0},e.prototype.resume=function(){this.paused=!1},e.prototype.remove=function(){this.uninstall&&(this.uninstall(),this.uninstall=null,this.paused=!0)},e.defaultDebounce=1e3,e}(),BRr=function(){function e(e){if(!e.cache)throw Error(`In order to persist your Apollo Cache, you need to pass in a cache. Please see https://www.apollographql.com/docs/react/basics/caching.html for our default InMemoryCache.`);if(!e.storage)throw Error(`In order to persist your Apollo Cache, you need to pass in an underlying storage provider. Please see https://github.com/apollographql/apollo-cache-persist#storage-providers`);var t=new kRr(e),n=new ARr(e),r=new NRr(e),i=new IRr({log:t,cache:n,storage:r},e),a=new zRr({log:t,persistor:i},e);this.log=t,this.cache=n,this.storage=r,this.persistor=i,this.trigger=a}return e.prototype.persist=function(){return this.persistor.persist()},e.prototype.restore=function(){return this.persistor.restore()},e.prototype.purge=function(){return this.persistor.purge()},e.prototype.pause=function(){this.trigger.pause()},e.prototype.resume=function(){this.trigger.resume()},e.prototype.remove=function(){this.trigger.remove()},e.prototype.getLogs=function(e){if(e===void 0&&(e=!1),e)this.log.tailLogs();else return this.log.getLogs()},e.prototype.getSize=function(){return this.storage.getSize()},e}(),VRr=(function(e){return new BRr(e).restore()}),HRr=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();(function(e){HRr(t,e);function t(t){var n=e.call(this,t)||this;return n.storage=new WRr(t),n.persistor=new URr({log:n.log,cache:n.cache,storage:n.storage},t),n}return t.prototype.restoreSync=function(){this.persistor.restoreSync()},t})(BRr);var URr=function(e){HRr(t,e);function t(t,n){var r=t.log,i=t.cache,a=t.storage;return e.call(this,{log:r,cache:i,storage:a},n)||this}return t.prototype.restoreSync=function(){this.cache.restore(this.storage.readSync())},t}(IRr),WRr=function(e){HRr(t,e);function t(t){return e.call(this,t)||this}return t.prototype.readSync=function(){return this.storage.getItem(this.key)},t}(NRr);(function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.setItem=function(e,t){return this.storage.setItem(e,t)},e})(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.get(e)},e.prototype.removeItem=function(e){return this.storage.remove(e)},e.prototype.setItem=function(e,t){return this.storage.set(e,t)},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.setItem=function(e,t){var n=this;return new Promise(function(r,i){n.storage.setItem(e,t).then(function(){return r()}).catch(function(){return i()})})},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.setItem=function(e,t){return t===null?this.removeItem(e):this.storage.setItem(e,t)},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)||null},e.prototype.removeItem=function(e){var t=this;return new Promise(function(n,r){Promise.resolve(t.storage.removeItem(e)).then(function(){return n()}).catch(function(){return r()})})},e.prototype.setItem=function(e,t){var n=this;return new Promise(function(r,i){n.storage.setItem(e,t).then(function(){return r()}).catch(function(){return i()})})},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getString(e)||null},e.prototype.removeItem=function(e){return this.storage.delete(e)},e.prototype.setItem=function(e,t){return t===null?this.removeItem(e):this.storage.set(e,t)},e}(),function(){function e(e){this.storage=e}return e.prototype.getItem=function(e){return this.storage.getItem(e)},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.setItem=function(e,t){return t===null?this.removeItem(e):this.storage.setItem(e,t)},e}(),Ay();var GRr=async(e,{church:t})=>{let{data:n}=await(await fetch(hRr,{method:`POST`,headers:{"Content-Type":`application/json`,"x-church":t},body:JSON.stringify({query:`
|
|
1183
1183
|
{
|
|
1184
1184
|
__schema {
|
|
1185
1185
|
types {
|
|
@@ -1191,7 +1191,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1191
1191
|
}
|
|
1192
1192
|
}
|
|
1193
1193
|
}
|
|
1194
|
-
`})})).json();n.__schema.types=await n.__schema.types.filter(e=>e.possibleTypes!==null);let r={};n.__schema.types.forEach(e=>{e.possibleTypes&&(r[e.name]=[...e.possibleTypes.map(e=>e.name)])});let i=new qv({possibleTypes:r,typePolicies:{Query:{fields:{search:{keyArgs:[`query`],merge(e,t){return e?t?.pageInfo?.endCursor===e?.pageInfo?.endCursor||e?.edges.length===e?.totalCount?e:{...t,edges:[...e?.edges,...t?.edges]}:t}}}},ContentChannel:{fields:{childContentItemsConnection:{keyArgs:[`id`],merge(e,t){return e?t.pageInfo.endCursor===e.pageInfo.endCursor?e:{...t,edges:[...e?.edges,...t?.edges]}:t}}}}}}).restore(e||{});return typeof window<`u`&&RRr({cache:i,storage:window.localStorage}),i};ioe(),Kg();var URr=async e=>{let t=!1,n=async()=>{t||(t=!0,window.localStorage.clear($y),window.localStorage.clear(eb)),t=!1},r=await HRr(null,{church:e}),i=wRr(n,e),a=Gg.from([$Lr(e),i,tRr,pRr]);return new my({link:a,cache:r,queryDeduplication:!1,shouldBatch:!0,version:`0.0.1`,defaultOptions:{watchQuery:{fetchPolicy:`cache-and-network`}}})},WRr=(0,z.createContext)(),GRr=(0,z.createContext)(),KRr={isOpen:!1,content:null,modal:!0},qRr={open:`open`,close:`close`,set:`set`},JRr=()=>({type:`open`}),YRr=()=>({type:`close`}),XRr=e=>({type:`set`,payload:e}),ZRr=(e,t)=>{switch(t.type){case qRr.open:return{...e,isOpen:!0};case qRr.close:return{...e,isOpen:!1,content:null};case qRr.set:return{...e,content:ZBr(`${t.payload}`)};default:throw Error(`Unhandled action type: ${t.type}`)}};function QRr(e={}){let[t,n]=(0,z.useReducer)(ZRr,{...KRr,modal:e.modal!==`false`&&!!e.modal});return(0,q.jsx)(WRr.Provider,{value:t,children:(0,q.jsx)(GRr.Provider,{value:n,children:e.children})})}function $Rr(){let e=(0,z.useContext)(WRr);if(e===void 0)throw Error(`useModalState must be used within a ModalProvider`);return e}function ezr(){let e=(0,z.useContext)(GRr);if(e===void 0)throw Error(`useModalDispatch must be used within a ModalProvider`);return e}function tzr(){let e=[$Rr(),ezr()];if(e===void 0)throw Error(`useModal must be used within a ModalProvider`);return e}QRr.propTypes={children:Zy.default.oneOfType([Zy.default.element,Zy.default.node]),modal:Zy.default.string};var nzr=(0,z.createContext)(),rzr=(0,z.createContext)(),izr={church:null,searchFeed:null,searchProfileSize:null,hideApollosAuth:null,customPlaceholder:null,loading:!0},azr={set:`set`},ozr=e=>({type:`set`,payload:e}),szr=(e,t)=>{switch(t.type){case azr.set:return{...e,...t.payload};default:throw Error(`Unhandled action type: ${t.type}`)}};function czr(e={}){let[t,n]=(0,z.useReducer)(szr,{...izr,church:e.church,searchFeed:e.searchFeed,searchProfileSize:e.searchProfileSize,hideApollosAuth:e.hideApollosAuth,customPlaceholder:e.customPlaceholder});return(0,q.jsx)(nzr.Provider,{value:t,children:(0,q.jsx)(rzr.Provider,{value:n,children:e.children})})}function k7(){let e=(0,z.useContext)(nzr);if(e===void 0)throw Error(`useSearchState must be used within a SearchProvider`);return e}function lzr(){let e=(0,z.useContext)(rzr);if(e===void 0)throw Error(`useSearchDispatch must be used within a SearchProvider`);return e}function uzr(){let e=[k7(),lzr()];if(e===void 0)throw Error(`useSearch must be used within a SearchProvider`);return e}czr.propTypes={children:Zy.default.oneOfType([Zy.default.element,Zy.default.node])};var dzr=s(((e,t)=>{t.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<a.length;c++){var l=a[c];if(!s(l))return!1;var u=e[l],d=t[l];if(i=n?n.call(r,u,d,l):void 0,i===!1||i===void 0&&u!==d)return!1}return!0}})),fzr=lo(),pzr=u(dzr());function mzr(e){function t(e,r,c,l,u){for(var p=0,m=0,h=0,g=0,_,x,C=0,w=0,T,E=T=_=0,D=0,N=0,P=0,F=0,ne=c.length,I=ne-1,re,L=``,ie=``,ae=``,oe=``,se;D<ne;){if(x=c.charCodeAt(D),D===I&&m+g+h+p!==0&&(m!==0&&(x=m===47?10:47),g=h=p=0,ne++,I++),m+g+h+p===0){if(D===I&&(0<N&&(L=L.replace(f,``)),0<L.trim().length)){switch(x){case 32:case 9:case 59:case 13:case 10:break;default:L+=c.charAt(D)}x=59}switch(x){case 123:for(L=L.trim(),_=L.charCodeAt(0),T=1,F=++D;D<ne;){switch(x=c.charCodeAt(D)){case 123:T++;break;case 125:T--;break;case 47:switch(x=c.charCodeAt(D+1)){case 42:case 47:a:{for(E=D+1;E<I;++E)switch(c.charCodeAt(E)){case 47:if(x===42&&c.charCodeAt(E-1)===42&&D+2!==E){D=E+1;break a}break;case 10:if(x===47){D=E+1;break a}}D=E}}break;case 91:x++;case 40:x++;case 34:case 39:for(;D++<I&&c.charCodeAt(D)!==x;);}if(T===0)break;D++}switch(T=c.substring(F,D),_===0&&(_=(L=L.replace(d,``).trim()).charCodeAt(0)),_){case 64:switch(0<N&&(L=L.replace(f,``)),x=L.charCodeAt(1),x){case 100:case 109:case 115:case 45:N=r;break;default:N=M}if(T=t(r,N,T,x,u+1),F=T.length,0<ee&&(N=n(M,L,P),se=s(3,T,N,r,k,O,F,x,u,l),L=N.join(``),se!==void 0&&(F=(T=se.trim()).length)===0&&(x=0,T=``)),0<F)switch(x){case 115:L=L.replace(S,o);case 100:case 109:case 45:T=L+`{`+T+`}`;break;case 107:L=L.replace(v,`$1 $2`),T=L+`{`+T+`}`,T=j===1||j===2&&a(`@`+T,3)?`@-webkit-`+T+`@`+T:`@`+T;break;default:T=L+T,l===112&&(T=(ie+=T,``))}else T=``;break;default:T=t(r,n(r,L,P),T,l,u+1)}ae+=T,T=P=N=E=_=0,L=``,x=c.charCodeAt(++D);break;case 125:case 59:if(L=(0<N?L.replace(f,``):L).trim(),1<(F=L.length))switch(E===0&&(_=L.charCodeAt(0),_===45||96<_&&123>_)&&(F=(L=L.replace(` `,`:`)).length),0<ee&&(se=s(1,L,r,e,k,O,ie.length,l,u,l))!==void 0&&(F=(L=se.trim()).length)===0&&(L=`\0\0`),_=L.charCodeAt(0),x=L.charCodeAt(1),_){case 0:break;case 64:if(x===105||x===99){oe+=L+c.charAt(D);break}default:L.charCodeAt(F-1)!==58&&(ie+=i(L,_,x,L.charCodeAt(2)))}P=N=E=_=0,L=``,x=c.charCodeAt(++D)}}switch(x){case 13:case 10:m===47?m=0:1+_===0&&l!==107&&0<L.length&&(N=1,L+=`\0`),0<ee*te&&s(0,L,r,e,k,O,ie.length,l,u,l),O=1,k++;break;case 59:case 125:if(m+g+h+p===0){O++;break}default:switch(O++,re=c.charAt(D),x){case 9:case 32:if(g+p+m===0)switch(C){case 44:case 58:case 9:case 32:re=``;break;default:x!==32&&(re=` `)}break;case 0:re=`\\0`;break;case 12:re=`\\f`;break;case 11:re=`\\v`;break;case 38:g+m+p===0&&(N=P=1,re=`\f`+re);break;case 108:if(g+m+p+A===0&&0<E)switch(D-E){case 2:C===112&&c.charCodeAt(D-3)===58&&(A=C);case 8:w===111&&(A=w)}break;case 58:g+m+p===0&&(E=D);break;case 44:m+h+g+p===0&&(N=1,re+=`\r`);break;case 34:case 39:m===0&&(g=g===x?0:g===0?x:g);break;case 91:g+m+h===0&&p++;break;case 93:g+m+h===0&&p--;break;case 41:g+m+p===0&&h--;break;case 40:if(g+m+p===0){if(_===0)switch(2*C+3*w){case 533:break;default:_=1}h++}break;case 64:m+h+g+p+E+T===0&&(T=1);break;case 42:case 47:if(!(0<g+p+h))switch(m){case 0:switch(2*x+3*c.charCodeAt(D+1)){case 235:m=47;break;case 220:F=D,m=42}break;case 42:x===47&&C===42&&F+2!==D&&(c.charCodeAt(F+2)===33&&(ie+=c.substring(F,D+1)),re=``,m=0)}}m===0&&(L+=re)}w=C,C=x,D++}if(F=ie.length,0<F){if(N=r,0<ee&&(se=s(2,ie,N,e,k,O,F,l,u,l),se!==void 0&&(ie=se).length===0))return oe+ie+ae;if(ie=N.join(`,`)+`{`+ie+`}`,j*A!==0){switch(j!==2||a(ie,2)||(A=0),A){case 111:ie=ie.replace(b,`:-moz-$1`)+ie;break;case 112:ie=ie.replace(y,`::-webkit-input-$1`)+ie.replace(y,`::-moz-$1`)+ie.replace(y,`:-ms-input-$1`)+ie}A=0}}return oe+ie+ae}function n(e,t,n){var i=t.trim().split(g);t=i;var a=i.length,o=e.length;switch(o){case 0:case 1:var s=0;for(e=o===0?``:e[0]+` `;s<a;++s)t[s]=r(e,t[s],n).trim();break;default:var c=s=0;for(t=[];s<a;++s)for(var l=0;l<o;++l)t[c++]=r(e[l]+` `,i[s],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(_,`$1`+e.trim());case 58:return e.trim()+t.replace(_,`$1`+e.trim());default:if(0<1*n&&0<t.indexOf(`\f`))return t.replace(_,(e.charCodeAt(0)===58?``:`$1`)+e.trim())}return e+t}function i(e,t,n,r){var o=e+`;`,s=2*t+3*n+4*r;if(s===944){e=o.indexOf(`:`,9)+1;var c=o.substring(e,o.length-1).trim();return c=o.substring(0,e).trim()+c+`;`,j===1||j===2&&a(c,1)?`-webkit-`+c+c:c}if(j===0||j===2&&!a(o,1))return o;switch(s){case 1015:return o.charCodeAt(10)===97?`-webkit-`+o+o:o;case 951:return o.charCodeAt(3)===116?`-webkit-`+o+o:o;case 963:return o.charCodeAt(5)===110?`-webkit-`+o+o:o;case 1009:if(o.charCodeAt(4)!==100)break;case 969:case 942:return`-webkit-`+o+o;case 978:return`-webkit-`+o+`-moz-`+o+o;case 1019:case 983:return`-webkit-`+o+`-moz-`+o+`-ms-`+o+o;case 883:if(o.charCodeAt(8)===45)return`-webkit-`+o+o;if(0<o.indexOf(`image-set(`,11))return o.replace(D,`$1-webkit-$2`)+o;break;case 932:if(o.charCodeAt(4)===45)switch(o.charCodeAt(5)){case 103:return`-webkit-box-`+o.replace(`-grow`,``)+`-webkit-`+o+`-ms-`+o.replace(`grow`,`positive`)+o;case 115:return`-webkit-`+o+`-ms-`+o.replace(`shrink`,`negative`)+o;case 98:return`-webkit-`+o+`-ms-`+o.replace(`basis`,`preferred-size`)+o}return`-webkit-`+o+`-ms-`+o+o;case 964:return`-webkit-`+o+`-ms-flex-`+o+o;case 1023:if(o.charCodeAt(8)!==99)break;return c=o.substring(o.indexOf(`:`,15)).replace(`flex-`,``).replace(`space-between`,`justify`),`-webkit-box-pack`+c+`-webkit-`+o+`-ms-flex-pack`+c+o;case 1005:return m.test(o)?o.replace(p,`:-webkit-`)+o.replace(p,`:-moz-`)+o:o;case 1e3:switch(c=o.substring(13).trim(),t=c.indexOf(`-`)+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=o.replace(x,`tb`);break;case 232:c=o.replace(x,`tb-rl`);break;case 220:c=o.replace(x,`lr`);break;default:return o}return`-webkit-`+o+`-ms-`+c+o;case 1017:if(o.indexOf(`sticky`,9)===-1)break;case 975:switch(t=(o=e).length-10,c=(o.charCodeAt(t)===33?o.substring(0,t):o).substring(e.indexOf(`:`,7)+1).trim(),s=c.charCodeAt(0)+(c.charCodeAt(7)|0)){case 203:if(111>c.charCodeAt(8))break;case 115:o=o.replace(c,`-webkit-`+c)+`;`+o;break;case 207:case 102:o=o.replace(c,`-webkit-`+(102<s?`inline-`:``)+`box`)+`;`+o.replace(c,`-webkit-`+c)+`;`+o.replace(c,`-ms-`+c+`box`)+`;`+o}return o+`;`;case 938:if(o.charCodeAt(5)===45)switch(o.charCodeAt(6)){case 105:return c=o.replace(`-items`,``),`-webkit-`+o+`-webkit-box-`+c+`-ms-flex-`+c+o;case 115:return`-webkit-`+o+`-ms-flex-item-`+o.replace(w,``)+o;default:return`-webkit-`+o+`-ms-flex-line-pack`+o.replace(`align-content`,``).replace(w,``)+o}break;case 973:case 989:if(o.charCodeAt(3)!==45||o.charCodeAt(4)===122)break;case 931:case 953:if(!0===E.test(e))return(c=e.substring(e.indexOf(`:`)+1)).charCodeAt(0)===115?i(e.replace(`stretch`,`fill-available`),t,n,r).replace(`:fill-available`,`:stretch`):o.replace(c,`-webkit-`+c)+o.replace(c,`-moz-`+c.replace(`fill-`,``))+o;break;case 962:if(o=`-webkit-`+o+(o.charCodeAt(5)===102?`-ms-`+o:``)+o,n+r===211&&o.charCodeAt(13)===105&&0<o.indexOf(`transform`,10))return o.substring(0,o.indexOf(`;`,27)+1).replace(h,`$1-webkit-$2`)+o}return o}function a(e,t){var n=e.indexOf(t===1?`:`:`{`),r=e.substring(0,t===3?10:n);return n=e.substring(n+1,e.length-1),P(t===2?r.replace(T,`$1`):r,n,t)}function o(e,t){var n=i(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n===t+`;`?`(`+t+`)`:n.replace(C,` or ($1)`).substring(4)}function s(e,t,n,r,i,a,o,s,c,l){for(var d=0,f=t,p;d<ee;++d)switch(p=N[d].call(u,e,f,n,r,i,a,o,s,c,l)){case void 0:case!1:case!0:case null:break;default:f=p}if(f!==t)return f}function c(e){switch(e){case void 0:case null:ee=N.length=0;break;default:if(typeof e==`function`)N[ee++]=e;else if(typeof e==`object`)for(var t=0,n=e.length;t<n;++t)c(e[t]);else te=!!e|0}return c}function l(e){return e=e.prefix,e!==void 0&&(P=null,e?typeof e==`function`?(j=2,P=e):j=1:j=0),l}function u(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),F=r,r=[F],0<ee){var i=s(-1,n,r,r,k,O,0,0,0,0);i!==void 0&&typeof i==`string`&&(n=i)}var a=t(M,r,n,0,0);return 0<ee&&(i=s(-2,a,r,r,k,O,a.length,0,0,0),i!==void 0&&(a=i)),F=``,A=0,O=k=1,a}var d=/^\0+/g,f=/[\0\r\f]/g,p=/: */g,m=/zoo|gra/,h=/([,: ])(transform)/g,g=/,\r+?/g,_=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,b=/:(read-only)/g,x=/[svh]\w+-[tblr]{2}/,S=/\(\s*(.*)\s*\)/g,C=/([\s\S]*?);/g,w=/-self|flex-/g,T=/[^]*?(:[rp][el]a[\w-]+)[^]*/,E=/stretch|:\s*\w+\-(?:conte|avail)/,D=/([^-])(image-set\()/,O=1,k=1,A=0,j=1,M=[],N=[],ee=0,P=null,te=0,F=``;return u.use=c,u.set=l,e!==void 0&&l(e),u}var hzr={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function gzr(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var _zr=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,vzr=gzr(function(e){return _zr.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),yzr=u(uo());function A7(){return(A7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var bzr=function(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n},xzr=function(e){return typeof e==`object`&&!!e&&(e.toString?e.toString():Object.prototype.toString.call(e))===`[object Object]`&&!(0,fzr.typeOf)(e)},Szr=Object.freeze([]),j7=Object.freeze({});function M7(e){return typeof e==`function`}function N7(e){return process.env.NODE_ENV!==`production`&&typeof e==`string`&&e||e.displayName||e.name||`Component`}function Czr(e){return e&&typeof e.styledComponentId==`string`}var P7=typeof process<`u`&&({}.REACT_APP_SC_ATTR||{}.SC_ATTR)||`data-styled`,wzr=typeof window<`u`&&`HTMLElement`in window,Tzr=!!(typeof SC_DISABLE_SPEEDY==`boolean`?SC_DISABLE_SPEEDY:typeof process<`u`&&({}.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&{}.REACT_APP_SC_DISABLE_SPEEDY!==``?{}.REACT_APP_SC_DISABLE_SPEEDY!==`false`&&{}.REACT_APP_SC_DISABLE_SPEEDY:{}.SC_DISABLE_SPEEDY!==void 0&&{}.SC_DISABLE_SPEEDY!==``?{}.SC_DISABLE_SPEEDY!==`false`&&{}.SC_DISABLE_SPEEDY:process.env.NODE_ENV!==`production`)),Ezr=process.env.NODE_ENV===`production`?{}:{1:`Cannot create styled-component for component: %s.
|
|
1194
|
+
`})})).json();n.__schema.types=await n.__schema.types.filter(e=>e.possibleTypes!==null);let r={};n.__schema.types.forEach(e=>{e.possibleTypes&&(r[e.name]=[...e.possibleTypes.map(e=>e.name)])});let i=new qv({possibleTypes:r,typePolicies:{Query:{fields:{search:{keyArgs:[`query`],merge(e,t){return e?t?.pageInfo?.endCursor===e?.pageInfo?.endCursor||e?.edges.length===e?.totalCount?e:{...t,edges:[...e?.edges,...t?.edges]}:t}}}},ContentChannel:{fields:{childContentItemsConnection:{keyArgs:[`id`],merge(e,t){return e?t.pageInfo.endCursor===e.pageInfo.endCursor?e:{...t,edges:[...e?.edges,...t?.edges]}:t}}}}}}).restore(e||{});return typeof window<`u`&&VRr({cache:i,storage:window.localStorage}),i};ioe(),Kg();var KRr=async e=>{let t=!1,n=async()=>{t||(t=!0,window.localStorage.clear($y),window.localStorage.clear(eb)),t=!1},r=await GRr(null,{church:e}),i=DRr(n,e),a=Gg.from([nRr(e),i,iRr,gRr]);return new my({link:a,cache:r,queryDeduplication:!1,shouldBatch:!0,version:`0.0.1`,defaultOptions:{watchQuery:{fetchPolicy:`cache-and-network`}}})},qRr=(0,z.createContext)(),JRr=(0,z.createContext)(),YRr={isOpen:!1,content:null,modal:!0},XRr={open:`open`,close:`close`,set:`set`},ZRr=()=>({type:`open`}),QRr=()=>({type:`close`}),$Rr=e=>({type:`set`,payload:e}),ezr=(e,t)=>{switch(t.type){case XRr.open:return{...e,isOpen:!0};case XRr.close:return{...e,isOpen:!1,content:null};case XRr.set:return{...e,content:eVr(`${t.payload}`)};default:throw Error(`Unhandled action type: ${t.type}`)}};function tzr(e={}){let[t,n]=(0,z.useReducer)(ezr,{...YRr,modal:e.modal!==`false`&&!!e.modal});return(0,q.jsx)(qRr.Provider,{value:t,children:(0,q.jsx)(JRr.Provider,{value:n,children:e.children})})}function nzr(){let e=(0,z.useContext)(qRr);if(e===void 0)throw Error(`useModalState must be used within a ModalProvider`);return e}function rzr(){let e=(0,z.useContext)(JRr);if(e===void 0)throw Error(`useModalDispatch must be used within a ModalProvider`);return e}function izr(){let e=[nzr(),rzr()];if(e===void 0)throw Error(`useModal must be used within a ModalProvider`);return e}tzr.propTypes={children:Zy.default.oneOfType([Zy.default.element,Zy.default.node]),modal:Zy.default.string};var azr=(0,z.createContext)(),ozr=(0,z.createContext)(),szr={church:null,searchFeed:null,searchProfileSize:null,hideApollosAuth:null,customPlaceholder:null,loading:!0},czr={set:`set`},lzr=e=>({type:`set`,payload:e}),uzr=(e,t)=>{switch(t.type){case czr.set:return{...e,...t.payload};default:throw Error(`Unhandled action type: ${t.type}`)}};function dzr(e={}){let[t,n]=(0,z.useReducer)(uzr,{...szr,church:e.church,searchFeed:e.searchFeed,searchProfileSize:e.searchProfileSize,hideApollosAuth:e.hideApollosAuth,customPlaceholder:e.customPlaceholder});return(0,q.jsx)(azr.Provider,{value:t,children:(0,q.jsx)(ozr.Provider,{value:n,children:e.children})})}function k7(){let e=(0,z.useContext)(azr);if(e===void 0)throw Error(`useSearchState must be used within a SearchProvider`);return e}function fzr(){let e=(0,z.useContext)(ozr);if(e===void 0)throw Error(`useSearchDispatch must be used within a SearchProvider`);return e}function pzr(){let e=[k7(),fzr()];if(e===void 0)throw Error(`useSearch must be used within a SearchProvider`);return e}dzr.propTypes={children:Zy.default.oneOfType([Zy.default.element,Zy.default.node])};var mzr=s(((e,t)=>{t.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<a.length;c++){var l=a[c];if(!s(l))return!1;var u=e[l],d=t[l];if(i=n?n.call(r,u,d,l):void 0,i===!1||i===void 0&&u!==d)return!1}return!0}})),hzr=lo(),gzr=u(mzr());function _zr(e){function t(e,r,c,l,u){for(var p=0,m=0,h=0,g=0,_,x,C=0,w=0,T,E=T=_=0,D=0,N=0,P=0,F=0,ne=c.length,I=ne-1,re,L=``,ie=``,ae=``,oe=``,se;D<ne;){if(x=c.charCodeAt(D),D===I&&m+g+h+p!==0&&(m!==0&&(x=m===47?10:47),g=h=p=0,ne++,I++),m+g+h+p===0){if(D===I&&(0<N&&(L=L.replace(f,``)),0<L.trim().length)){switch(x){case 32:case 9:case 59:case 13:case 10:break;default:L+=c.charAt(D)}x=59}switch(x){case 123:for(L=L.trim(),_=L.charCodeAt(0),T=1,F=++D;D<ne;){switch(x=c.charCodeAt(D)){case 123:T++;break;case 125:T--;break;case 47:switch(x=c.charCodeAt(D+1)){case 42:case 47:a:{for(E=D+1;E<I;++E)switch(c.charCodeAt(E)){case 47:if(x===42&&c.charCodeAt(E-1)===42&&D+2!==E){D=E+1;break a}break;case 10:if(x===47){D=E+1;break a}}D=E}}break;case 91:x++;case 40:x++;case 34:case 39:for(;D++<I&&c.charCodeAt(D)!==x;);}if(T===0)break;D++}switch(T=c.substring(F,D),_===0&&(_=(L=L.replace(d,``).trim()).charCodeAt(0)),_){case 64:switch(0<N&&(L=L.replace(f,``)),x=L.charCodeAt(1),x){case 100:case 109:case 115:case 45:N=r;break;default:N=M}if(T=t(r,N,T,x,u+1),F=T.length,0<ee&&(N=n(M,L,P),se=s(3,T,N,r,k,O,F,x,u,l),L=N.join(``),se!==void 0&&(F=(T=se.trim()).length)===0&&(x=0,T=``)),0<F)switch(x){case 115:L=L.replace(S,o);case 100:case 109:case 45:T=L+`{`+T+`}`;break;case 107:L=L.replace(v,`$1 $2`),T=L+`{`+T+`}`,T=j===1||j===2&&a(`@`+T,3)?`@-webkit-`+T+`@`+T:`@`+T;break;default:T=L+T,l===112&&(T=(ie+=T,``))}else T=``;break;default:T=t(r,n(r,L,P),T,l,u+1)}ae+=T,T=P=N=E=_=0,L=``,x=c.charCodeAt(++D);break;case 125:case 59:if(L=(0<N?L.replace(f,``):L).trim(),1<(F=L.length))switch(E===0&&(_=L.charCodeAt(0),_===45||96<_&&123>_)&&(F=(L=L.replace(` `,`:`)).length),0<ee&&(se=s(1,L,r,e,k,O,ie.length,l,u,l))!==void 0&&(F=(L=se.trim()).length)===0&&(L=`\0\0`),_=L.charCodeAt(0),x=L.charCodeAt(1),_){case 0:break;case 64:if(x===105||x===99){oe+=L+c.charAt(D);break}default:L.charCodeAt(F-1)!==58&&(ie+=i(L,_,x,L.charCodeAt(2)))}P=N=E=_=0,L=``,x=c.charCodeAt(++D)}}switch(x){case 13:case 10:m===47?m=0:1+_===0&&l!==107&&0<L.length&&(N=1,L+=`\0`),0<ee*te&&s(0,L,r,e,k,O,ie.length,l,u,l),O=1,k++;break;case 59:case 125:if(m+g+h+p===0){O++;break}default:switch(O++,re=c.charAt(D),x){case 9:case 32:if(g+p+m===0)switch(C){case 44:case 58:case 9:case 32:re=``;break;default:x!==32&&(re=` `)}break;case 0:re=`\\0`;break;case 12:re=`\\f`;break;case 11:re=`\\v`;break;case 38:g+m+p===0&&(N=P=1,re=`\f`+re);break;case 108:if(g+m+p+A===0&&0<E)switch(D-E){case 2:C===112&&c.charCodeAt(D-3)===58&&(A=C);case 8:w===111&&(A=w)}break;case 58:g+m+p===0&&(E=D);break;case 44:m+h+g+p===0&&(N=1,re+=`\r`);break;case 34:case 39:m===0&&(g=g===x?0:g===0?x:g);break;case 91:g+m+h===0&&p++;break;case 93:g+m+h===0&&p--;break;case 41:g+m+p===0&&h--;break;case 40:if(g+m+p===0){if(_===0)switch(2*C+3*w){case 533:break;default:_=1}h++}break;case 64:m+h+g+p+E+T===0&&(T=1);break;case 42:case 47:if(!(0<g+p+h))switch(m){case 0:switch(2*x+3*c.charCodeAt(D+1)){case 235:m=47;break;case 220:F=D,m=42}break;case 42:x===47&&C===42&&F+2!==D&&(c.charCodeAt(F+2)===33&&(ie+=c.substring(F,D+1)),re=``,m=0)}}m===0&&(L+=re)}w=C,C=x,D++}if(F=ie.length,0<F){if(N=r,0<ee&&(se=s(2,ie,N,e,k,O,F,l,u,l),se!==void 0&&(ie=se).length===0))return oe+ie+ae;if(ie=N.join(`,`)+`{`+ie+`}`,j*A!==0){switch(j!==2||a(ie,2)||(A=0),A){case 111:ie=ie.replace(b,`:-moz-$1`)+ie;break;case 112:ie=ie.replace(y,`::-webkit-input-$1`)+ie.replace(y,`::-moz-$1`)+ie.replace(y,`:-ms-input-$1`)+ie}A=0}}return oe+ie+ae}function n(e,t,n){var i=t.trim().split(g);t=i;var a=i.length,o=e.length;switch(o){case 0:case 1:var s=0;for(e=o===0?``:e[0]+` `;s<a;++s)t[s]=r(e,t[s],n).trim();break;default:var c=s=0;for(t=[];s<a;++s)for(var l=0;l<o;++l)t[c++]=r(e[l]+` `,i[s],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(_,`$1`+e.trim());case 58:return e.trim()+t.replace(_,`$1`+e.trim());default:if(0<1*n&&0<t.indexOf(`\f`))return t.replace(_,(e.charCodeAt(0)===58?``:`$1`)+e.trim())}return e+t}function i(e,t,n,r){var o=e+`;`,s=2*t+3*n+4*r;if(s===944){e=o.indexOf(`:`,9)+1;var c=o.substring(e,o.length-1).trim();return c=o.substring(0,e).trim()+c+`;`,j===1||j===2&&a(c,1)?`-webkit-`+c+c:c}if(j===0||j===2&&!a(o,1))return o;switch(s){case 1015:return o.charCodeAt(10)===97?`-webkit-`+o+o:o;case 951:return o.charCodeAt(3)===116?`-webkit-`+o+o:o;case 963:return o.charCodeAt(5)===110?`-webkit-`+o+o:o;case 1009:if(o.charCodeAt(4)!==100)break;case 969:case 942:return`-webkit-`+o+o;case 978:return`-webkit-`+o+`-moz-`+o+o;case 1019:case 983:return`-webkit-`+o+`-moz-`+o+`-ms-`+o+o;case 883:if(o.charCodeAt(8)===45)return`-webkit-`+o+o;if(0<o.indexOf(`image-set(`,11))return o.replace(D,`$1-webkit-$2`)+o;break;case 932:if(o.charCodeAt(4)===45)switch(o.charCodeAt(5)){case 103:return`-webkit-box-`+o.replace(`-grow`,``)+`-webkit-`+o+`-ms-`+o.replace(`grow`,`positive`)+o;case 115:return`-webkit-`+o+`-ms-`+o.replace(`shrink`,`negative`)+o;case 98:return`-webkit-`+o+`-ms-`+o.replace(`basis`,`preferred-size`)+o}return`-webkit-`+o+`-ms-`+o+o;case 964:return`-webkit-`+o+`-ms-flex-`+o+o;case 1023:if(o.charCodeAt(8)!==99)break;return c=o.substring(o.indexOf(`:`,15)).replace(`flex-`,``).replace(`space-between`,`justify`),`-webkit-box-pack`+c+`-webkit-`+o+`-ms-flex-pack`+c+o;case 1005:return m.test(o)?o.replace(p,`:-webkit-`)+o.replace(p,`:-moz-`)+o:o;case 1e3:switch(c=o.substring(13).trim(),t=c.indexOf(`-`)+1,c.charCodeAt(0)+c.charCodeAt(t)){case 226:c=o.replace(x,`tb`);break;case 232:c=o.replace(x,`tb-rl`);break;case 220:c=o.replace(x,`lr`);break;default:return o}return`-webkit-`+o+`-ms-`+c+o;case 1017:if(o.indexOf(`sticky`,9)===-1)break;case 975:switch(t=(o=e).length-10,c=(o.charCodeAt(t)===33?o.substring(0,t):o).substring(e.indexOf(`:`,7)+1).trim(),s=c.charCodeAt(0)+(c.charCodeAt(7)|0)){case 203:if(111>c.charCodeAt(8))break;case 115:o=o.replace(c,`-webkit-`+c)+`;`+o;break;case 207:case 102:o=o.replace(c,`-webkit-`+(102<s?`inline-`:``)+`box`)+`;`+o.replace(c,`-webkit-`+c)+`;`+o.replace(c,`-ms-`+c+`box`)+`;`+o}return o+`;`;case 938:if(o.charCodeAt(5)===45)switch(o.charCodeAt(6)){case 105:return c=o.replace(`-items`,``),`-webkit-`+o+`-webkit-box-`+c+`-ms-flex-`+c+o;case 115:return`-webkit-`+o+`-ms-flex-item-`+o.replace(w,``)+o;default:return`-webkit-`+o+`-ms-flex-line-pack`+o.replace(`align-content`,``).replace(w,``)+o}break;case 973:case 989:if(o.charCodeAt(3)!==45||o.charCodeAt(4)===122)break;case 931:case 953:if(!0===E.test(e))return(c=e.substring(e.indexOf(`:`)+1)).charCodeAt(0)===115?i(e.replace(`stretch`,`fill-available`),t,n,r).replace(`:fill-available`,`:stretch`):o.replace(c,`-webkit-`+c)+o.replace(c,`-moz-`+c.replace(`fill-`,``))+o;break;case 962:if(o=`-webkit-`+o+(o.charCodeAt(5)===102?`-ms-`+o:``)+o,n+r===211&&o.charCodeAt(13)===105&&0<o.indexOf(`transform`,10))return o.substring(0,o.indexOf(`;`,27)+1).replace(h,`$1-webkit-$2`)+o}return o}function a(e,t){var n=e.indexOf(t===1?`:`:`{`),r=e.substring(0,t===3?10:n);return n=e.substring(n+1,e.length-1),P(t===2?r.replace(T,`$1`):r,n,t)}function o(e,t){var n=i(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n===t+`;`?`(`+t+`)`:n.replace(C,` or ($1)`).substring(4)}function s(e,t,n,r,i,a,o,s,c,l){for(var d=0,f=t,p;d<ee;++d)switch(p=N[d].call(u,e,f,n,r,i,a,o,s,c,l)){case void 0:case!1:case!0:case null:break;default:f=p}if(f!==t)return f}function c(e){switch(e){case void 0:case null:ee=N.length=0;break;default:if(typeof e==`function`)N[ee++]=e;else if(typeof e==`object`)for(var t=0,n=e.length;t<n;++t)c(e[t]);else te=!!e|0}return c}function l(e){return e=e.prefix,e!==void 0&&(P=null,e?typeof e==`function`?(j=2,P=e):j=1:j=0),l}function u(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),F=r,r=[F],0<ee){var i=s(-1,n,r,r,k,O,0,0,0,0);i!==void 0&&typeof i==`string`&&(n=i)}var a=t(M,r,n,0,0);return 0<ee&&(i=s(-2,a,r,r,k,O,a.length,0,0,0),i!==void 0&&(a=i)),F=``,A=0,O=k=1,a}var d=/^\0+/g,f=/[\0\r\f]/g,p=/: */g,m=/zoo|gra/,h=/([,: ])(transform)/g,g=/,\r+?/g,_=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,b=/:(read-only)/g,x=/[svh]\w+-[tblr]{2}/,S=/\(\s*(.*)\s*\)/g,C=/([\s\S]*?);/g,w=/-self|flex-/g,T=/[^]*?(:[rp][el]a[\w-]+)[^]*/,E=/stretch|:\s*\w+\-(?:conte|avail)/,D=/([^-])(image-set\()/,O=1,k=1,A=0,j=1,M=[],N=[],ee=0,P=null,te=0,F=``;return u.use=c,u.set=l,e!==void 0&&l(e),u}var vzr={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function yzr(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var bzr=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,xzr=yzr(function(e){return bzr.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Szr=u(uo());function A7(){return(A7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Czr=function(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n},wzr=function(e){return typeof e==`object`&&!!e&&(e.toString?e.toString():Object.prototype.toString.call(e))===`[object Object]`&&!(0,hzr.typeOf)(e)},Tzr=Object.freeze([]),j7=Object.freeze({});function M7(e){return typeof e==`function`}function N7(e){return process.env.NODE_ENV!==`production`&&typeof e==`string`&&e||e.displayName||e.name||`Component`}function Ezr(e){return e&&typeof e.styledComponentId==`string`}var P7=typeof process<`u`&&({}.REACT_APP_SC_ATTR||{}.SC_ATTR)||`data-styled`,Dzr=typeof window<`u`&&`HTMLElement`in window,Ozr=!!(typeof SC_DISABLE_SPEEDY==`boolean`?SC_DISABLE_SPEEDY:typeof process<`u`&&({}.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&{}.REACT_APP_SC_DISABLE_SPEEDY!==``?{}.REACT_APP_SC_DISABLE_SPEEDY!==`false`&&{}.REACT_APP_SC_DISABLE_SPEEDY:{}.SC_DISABLE_SPEEDY!==void 0&&{}.SC_DISABLE_SPEEDY!==``?{}.SC_DISABLE_SPEEDY!==`false`&&{}.SC_DISABLE_SPEEDY:process.env.NODE_ENV!==`production`)),kzr=process.env.NODE_ENV===`production`?{}:{1:`Cannot create styled-component for component: %s.
|
|
1195
1195
|
|
|
1196
1196
|
`,2:`Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
|
|
1197
1197
|
|
|
@@ -1242,12 +1242,12 @@ as for instance in your render method then you may be running into this limitati
|
|
|
1242
1242
|
|
|
1243
1243
|
`,17:`CSSStyleSheet could not be found on HTMLStyleElement.
|
|
1244
1244
|
Has styled-components' style tag been unmounted or altered by another script?
|
|
1245
|
-
`};function
|
|
1246
|
-
`;return t},e}(),
|
|
1247
|
-
`),r=[],i=0,a=n.length;i<a;i++){var o=n[i].trim();if(o){var s=o.match(
|
|
1248
|
-
`}}}return r}(this)},e}(),
|
|
1245
|
+
`};function Azr(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n<r;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach((function(t){e=e.replace(/%[a-z]/,t)})),e}function F7(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw process.env.NODE_ENV===`production`?Error(`An error occurred. See https://git.io/JUIaE#`+e+` for more information.`+(n.length>0?` Args: `+n.join(`, `):``)):Error(Azr.apply(void 0,[kzr[e]].concat(n)).trim())}var jzr=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)(i<<=1)<0&&F7(16,``+e);this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var a=r;a<i;a++)this.groupSizes[a]=0}for(var o=this.indexOfGroup(e+1),s=0,c=t.length;s<c;s++)this.tag.insertRule(o,t[s])&&(this.groupSizes[e]++,o++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var i=n;i<r;i++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t=``;if(e>=this.length||this.groupSizes[e]===0)return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,a=r;a<i;a++)t+=this.tag.getRule(a)+`/*!sc*/
|
|
1246
|
+
`;return t},e}(),Mzr=new Map,Nzr=new Map,I7=1,Pzr=function(e){if(Mzr.has(e))return Mzr.get(e);for(;Nzr.has(I7);)I7++;var t=I7++;return process.env.NODE_ENV!==`production`&&((0|t)<0||t>1<<30)&&F7(16,``+t),Mzr.set(e,t),Nzr.set(t,e),t},Fzr=function(e){return Nzr.get(e)},Izr=function(e,t){t>=I7&&(I7=t+1),Mzr.set(e,t),Nzr.set(t,e)},Lzr=`style[`+P7+`][data-styled-version="5.3.11"]`,Rzr=RegExp(`^`+P7+`\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),zzr=function(e,t,n){for(var r,i=n.split(`,`),a=0,o=i.length;a<o;a++)(r=i[a])&&e.registerName(t,r)},Bzr=function(e,t){for(var n=(t.textContent||``).split(`/*!sc*/
|
|
1247
|
+
`),r=[],i=0,a=n.length;i<a;i++){var o=n[i].trim();if(o){var s=o.match(Rzr);if(s){var c=0|parseInt(s[1],10),l=s[2];c!==0&&(Izr(l,c),zzr(e,l,s[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(o)}}},Vzr=function(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:null},Hzr=function(e){var t=document.head,n=e||t,r=document.createElement(`style`),i=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&r.nodeType===1&&r.hasAttribute(P7))return r}}(n),a=i===void 0?null:i.nextSibling;r.setAttribute(P7,`active`),r.setAttribute(`data-styled-version`,`5.3.11`);var o=Vzr();return o&&r.setAttribute(`nonce`,o),n.insertBefore(r,a),r},Uzr=function(){function e(e){var t=this.element=Hzr(e);t.appendChild(document.createTextNode(``)),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var i=t[n];if(i.ownerNode===e)return i}F7(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch{return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return t!==void 0&&typeof t.cssText==`string`?t.cssText:``},e}(),Wzr=function(){function e(e){var t=this.element=Hzr(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:``},e}(),Gzr=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:``},e}(),Kzr=Dzr,qzr={isServer:!Dzr,useCSSOMInjection:!Ozr},L7=function(){function e(e,t,n){e===void 0&&(e=j7),t===void 0&&(t={}),this.options=A7({},qzr,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&Dzr&&Kzr&&(Kzr=!1,function(e){for(var t=document.querySelectorAll(Lzr),n=0,r=t.length;n<r;n++){var i=t[n];i&&i.getAttribute(P7)!==`active`&&(Bzr(e,i),i.parentNode&&i.parentNode.removeChild(i))}}(this))}e.registerId=function(e){return Pzr(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return n===void 0&&(n=!0),new e(A7({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||=(n=(t=this.options).isServer,r=t.useCSSOMInjection,i=t.target,e=n?new Gzr(i):r?new Uzr(i):new Wzr(i),new jzr(e));var e,t,n,r,i},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(Pzr(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(Pzr(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(Pzr(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r=``,i=0;i<n;i++){var a=Fzr(i);if(a!==void 0){var o=e.names.get(a),s=t.getGroup(i);if(o&&s&&o.size){var c=P7+`.g`+i+`[id="`+a+`"]`,l=``;o!==void 0&&o.forEach((function(e){e.length>0&&(l+=e+`,`)})),r+=``+s+c+`{content:"`+l+`"}/*!sc*/
|
|
1248
|
+
`}}}return r}(this)},e}(),Jzr=/(a)(d)/gi,Yzr=function(e){return String.fromCharCode(e+(e>25?39:97))};function Xzr(e){var t,n=``;for(t=Math.abs(e);t>52;t=t/52|0)n=Yzr(t%52)+n;return(Yzr(t%52)+n).replace(Jzr,`$1-$2`)}var R7=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Zzr=function(e){return R7(5381,e)};function Qzr(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(M7(n)&&!Ezr(n))return!1}return!0}var $zr=Zzr(`5.3.11`),eBr=function(){function e(e,t,n){this.rules=e,this.staticRulesId=``,this.isStatic=process.env.NODE_ENV===`production`&&(n===void 0||n.isStatic)&&Qzr(e),this.componentId=t,this.baseHash=R7($zr,t),this.baseStyle=n,L7.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash){if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))i.push(this.staticRulesId);else{var a=z7(this.rules,e,t,n).join(``),o=Xzr(R7(this.baseHash,a)>>>0);if(!t.hasNameForId(r,o)){var s=n(a,`.`+o,void 0,r);t.insertRules(r,o,s)}i.push(o),this.staticRulesId=o}}else{for(var c=this.rules.length,l=R7(this.baseHash,n.hash),u=``,d=0;d<c;d++){var f=this.rules[d];if(typeof f==`string`)u+=f,process.env.NODE_ENV!==`production`&&(l=R7(l,f+d));else if(f){var p=z7(f,e,t,n),m=Array.isArray(p)?p.join(``):p;l=R7(l,m+d),u+=m}}if(u){var h=Xzr(l>>>0);if(!t.hasNameForId(r,h)){var g=n(u,`.`+h,void 0,r);t.insertRules(r,h,g)}i.push(h)}}return i.join(` `)},e}(),tBr=/^\s*\/\/.*$/gm,nBr=[`:`,`[`,`.`,`#`];function rBr(e){var t,n,r,i,a=e===void 0?j7:e,o=a.options,s=o===void 0?j7:o,c=a.plugins,l=c===void 0?Tzr:c,u=new _zr(s),d=[],f=function(e){function t(t){if(t)try{e(t+`}`)}catch{}}return function(n,r,i,a,o,s,c,l,u,d){switch(n){case 1:if(u===0&&r.charCodeAt(0)===64)return e(r+`;`),``;break;case 2:if(l===0)return r+`/*|*/`;break;case 3:switch(l){case 102:case 112:return e(i[0]+r),``;default:return r+(d===0?`/*|*/`:``)}case-2:r.split(`/*|*/}`).forEach(t)}}}((function(e){d.push(e)})),p=function(e,r,a){return r===0&&nBr.indexOf(a[n.length])!==-1||a.match(i)?e:`.`+t};function m(e,a,o,s){s===void 0&&(s=`&`);var c=e.replace(tBr,``),l=a&&o?o+` `+a+` { `+c+` }`:c;return t=s,n=a,r=RegExp(`\\`+n+`\\b`,`g`),i=RegExp(`(\\`+n+`\\b){2,}`),u(o||!a?``:a,l)}return u.use([].concat(l,[function(e,t,i){e===2&&i.length&&i[0].lastIndexOf(n)>0&&(i[0]=i[0].replace(r,p))},f,function(e){if(e===-2){var t=d;return d=[],t}}])),m.hash=l.length?l.reduce((function(e,t){return t.name||F7(15),R7(e,t.name)}),5381).toString():``,m}var iBr=z.createContext();iBr.Consumer;var aBr=z.createContext(),oBr=(aBr.Consumer,new L7),sBr=rBr();function cBr(){return(0,z.useContext)(iBr)||oBr}function lBr(){return(0,z.useContext)(aBr)||sBr}function uBr(e){var t=(0,z.useState)(e.stylisPlugins),n=t[0],r=t[1],i=cBr(),a=(0,z.useMemo)((function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),o=(0,z.useMemo)((function(){return rBr({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return(0,z.useEffect)((function(){(0,gzr.default)(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),z.createElement(iBr.Provider,{value:a},z.createElement(aBr.Provider,{value:o},process.env.NODE_ENV===`production`?e.children:z.Children.only(e.children)))}var dBr=function(){function e(e,t){var n=this;this.inject=function(e,t){t===void 0&&(t=sBr);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,`@keyframes`))},this.toString=function(){return F7(12,String(n.name))},this.name=e,this.id=`sc-keyframes-`+e,this.rules=t}return e.prototype.getName=function(e){return e===void 0&&(e=sBr),this.name+e.hash},e}(),fBr=/([A-Z])/,pBr=/([A-Z])/g,mBr=/^ms-/,hBr=function(e){return`-`+e.toLowerCase()};function gBr(e){return fBr.test(e)?e.replace(pBr,hBr).replace(mBr,`-ms-`):e}var _Br=function(e){return e==null||!1===e||e===``};function z7(e,t,n,r){if(Array.isArray(e)){for(var i,a=[],o=0,s=e.length;o<s;o+=1)(i=z7(e[o],t,n,r))!==``&&(Array.isArray(i)?a.push.apply(a,i):a.push(i));return a}if(_Br(e))return``;if(Ezr(e))return`.`+e.styledComponentId;if(M7(e)){if(typeof(l=e)!=`function`||l.prototype&&l.prototype.isReactComponent||!t)return e;var c=e(t);return process.env.NODE_ENV!==`production`&&(0,hzr.isElement)(c)&&console.warn(N7(e)+` is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.`),z7(c,t,n,r)}var l;return e instanceof dBr?n?(e.inject(n,r),e.getName(r)):e:wzr(e)?function e(t,n){var r,i,a=[];for(var o in t)t.hasOwnProperty(o)&&!_Br(t[o])&&(Array.isArray(t[o])&&t[o].isCss||M7(t[o])?a.push(gBr(o)+`:`,t[o],`;`):wzr(t[o])?a.push.apply(a,e(t[o],o)):a.push(gBr(o)+`: `+(r=o,(i=t[o])==null||typeof i==`boolean`||i===``?``:typeof i!=`number`||i===0||r in vzr||r.startsWith(`--`)?String(i).trim():i+`px`)+`;`));return n?[n+` {`].concat(a,[`}`]):a}(e):e.toString()}var vBr=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function B7(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return M7(e)||wzr(e)?vBr(z7(Czr(Tzr,[e].concat(n)))):n.length===0&&e.length===1&&typeof e[0]==`string`?e:vBr(z7(Czr(e,n)))}var yBr=/invalid hook call/i,bBr=new Set,xBr=function(e,t){if(process.env.NODE_ENV!==`production`){var n=`The component `+e+(t?` with the id of "`+t+`"`:``)+` has been created dynamically.
|
|
1249
1249
|
You may see this warning because you've called styled inside another component.
|
|
1250
|
-
To resolve this only create new StyledComponents outside of any render method and function component.`,r=console.error;try{var i=!0;console.error=function(e){if(
|
|
1250
|
+
To resolve this only create new StyledComponents outside of any render method and function component.`,r=console.error;try{var i=!0;console.error=function(e){if(yBr.test(e))i=!1,bBr.delete(n);else{for(var t=arguments.length,a=Array(t>1?t-1:0),o=1;o<t;o++)a[o-1]=arguments[o];r.apply(void 0,[e].concat(a))}},(0,z.useRef)(),i&&!bBr.has(n)&&(console.warn(n),bBr.add(n))}catch(e){yBr.test(e.message)&&bBr.delete(n)}finally{console.error=r}}},SBr=function(e,t,n){return n===void 0&&(n=j7),e.theme!==n.theme&&e.theme||t||n.theme},CBr=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,wBr=/(^-|-$)/g;function TBr(e){return e.replace(CBr,`-`).replace(wBr,``)}var EBr=function(e){return Xzr(Zzr(e)>>>0)};function DBr(e){return typeof e==`string`&&(process.env.NODE_ENV===`production`||e.charAt(0)===e.charAt(0).toLowerCase())}var OBr=function(e){return typeof e==`function`||typeof e==`object`&&!!e&&!Array.isArray(e)},kBr=function(e){return e!==`__proto__`&&e!==`constructor`&&e!==`prototype`};function ABr(e,t,n){var r=e[n];OBr(t)&&OBr(r)?jBr(r,t):e[n]=t}function jBr(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];if(OBr(o))for(var s in o)kBr(s)&&ABr(e,o[s],s)}return e}var V7=z.createContext();V7.Consumer;function MBr(e){var t=(0,z.useContext)(V7),n=(0,z.useMemo)((function(){return function(e,t){if(!e)return F7(14);if(M7(e)){var n=e(t);return process.env.NODE_ENV===`production`||n!==null&&!Array.isArray(n)&&typeof n==`object`?n:F7(7)}return Array.isArray(e)||typeof e!=`object`?F7(8):t?A7({},t,{},e):e}(e.theme,t)}),[e.theme,t]);return e.children?z.createElement(V7.Provider,{value:n},e.children):null}var NBr={};function PBr(e,t,n){var r=Ezr(e),i=!DBr(e),a=t.attrs,o=a===void 0?Tzr:a,s=t.componentId,c=s===void 0?function(e,t){var n=typeof e==`string`?TBr(e):`sc`;NBr[n]=(NBr[n]||0)+1;var r=n+`-`+EBr(`5.3.11`+n+NBr[n]);return t?t+`-`+r:r}(t.displayName,t.parentComponentId):s,l=t.displayName,u=l===void 0?function(e){return DBr(e)?`styled.`+e:`Styled(`+N7(e)+`)`}(e):l,d=t.displayName&&t.componentId?TBr(t.displayName)+`-`+t.componentId:t.componentId||c,f=r&&e.attrs?Array.prototype.concat(e.attrs,o).filter(Boolean):o,p=t.shouldForwardProp;r&&e.shouldForwardProp&&(p=t.shouldForwardProp?function(n,r,i){return e.shouldForwardProp(n,r,i)&&t.shouldForwardProp(n,r,i)}:e.shouldForwardProp);var m,h=new eBr(n,d,r?e.componentStyle:void 0),g=h.isStatic&&o.length===0,_=function(e,t){return function(e,t,n,r){var i=e.attrs,a=e.componentStyle,o=e.defaultProps,s=e.foldedComponentIds,c=e.shouldForwardProp,l=e.styledComponentId,u=e.target,d=function(e,t,n){e===void 0&&(e=j7);var r=A7({},t,{theme:e}),i={};return n.forEach((function(e){var t,n,a,o=e;for(t in M7(o)&&(o=o(r)),o)r[t]=i[t]=t===`className`?(n=i[t],a=o[t],n&&a?n+` `+a:n||a):o[t]})),[r,i]}(SBr(t,(0,z.useContext)(V7),o)||j7,t,i),f=d[0],p=d[1],m=function(e,t,n,r){var i=cBr(),a=lBr(),o=t?e.generateAndInjectStyles(j7,i,a):e.generateAndInjectStyles(n,i,a);return process.env.NODE_ENV!==`production`&&!t&&r&&r(o),o}(a,r,f,process.env.NODE_ENV===`production`?void 0:e.warnTooManyClasses),h=n,g=p.$as||t.$as||p.as||t.as||u,_=DBr(g),v=p===t?t:A7({},t,{},p),y={};for(var b in v)b[0]!==`$`&&b!==`as`&&(b===`forwardedAs`?y.as=v[b]:(c?c(b,xzr,g):!_||xzr(b))&&(y[b]=v[b]));return t.style&&p.style!==t.style&&(y.style=A7({},t.style,{},p.style)),y.className=Array.prototype.concat(s,l,m===l?null:m,t.className,p.className).filter(Boolean).join(` `),y.ref=h,(0,z.createElement)(g,y)}(m,e,t,g)};return _.displayName=u,(m=z.forwardRef(_)).attrs=f,m.componentStyle=h,m.displayName=u,m.shouldForwardProp=p,m.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):Tzr,m.styledComponentId=d,m.target=r?e.target:e,m.withComponent=function(e){var r=t.componentId,i=function(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,[`componentId`]),a=r&&r+`-`+(DBr(e)?e:TBr(N7(e)));return PBr(e,A7({},i,{attrs:f,componentId:a}),n)},Object.defineProperty(m,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?jBr({},e.defaultProps,t):t}}),process.env.NODE_ENV!==`production`&&(xBr(u,d),m.warnTooManyClasses=function(e,t){var n={},r=!1;return function(i){if(!r&&(n[i]=!0,Object.keys(n).length>=200)){var a=t?` with the id of "`+t+`"`:``;console.warn(`Over 200 classes were generated for component `+e+a+`.
|
|
1251
1251
|
Consider using the attrs method, together with a style object for frequently changed styles.
|
|
1252
1252
|
Example:
|
|
1253
1253
|
const Component = styled.div.attrs(props => ({
|
|
@@ -1256,14 +1256,14 @@ Example:
|
|
|
1256
1256
|
},
|
|
1257
1257
|
}))\`width: 100%;\`
|
|
1258
1258
|
|
|
1259
|
-
<Component />`),r=!0,n={}}}}(u,d)),Object.defineProperty(m,"toString",{value:function(){return`.`+m.styledComponentId}}),i&&(0,
|
|
1259
|
+
<Component />`),r=!0,n={}}}}(u,d)),Object.defineProperty(m,"toString",{value:function(){return`.`+m.styledComponentId}}),i&&(0,Szr.default)(m,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),m}var H7=function(e){return function e(t,n,r){if(r===void 0&&(r=j7),!(0,hzr.isValidElementType)(n))return F7(1,String(n));var i=function(){return t(n,r,B7.apply(void 0,arguments))};return i.withConfig=function(i){return e(t,n,A7({},r,{},i))},i.attrs=function(i){return e(t,n,A7({},r,{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)}))},i}(PBr,e)};`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.marquee.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.textPath.tspan`.split(`.`).forEach((function(e){H7[e]=H7(e)})),function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Qzr(e),L7.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var i=r(z7(this.rules,t,n,r).join(``),``),a=this.componentId+e;n.insertRules(a,a,i)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&L7.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function FBr(e){process.env.NODE_ENV!==`production`&&typeof navigator<`u`&&navigator.product===`ReactNative`&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=B7.apply(void 0,[e].concat(n)).join(``);return new dBr(EBr(i),i)}(function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return``;var n=Vzr();return`<style `+[n&&`nonce="`+n+`"`,P7+`="true"`,`data-styled-version="5.3.11"`].filter(Boolean).join(` `)+`>`+t+`</style>`},this.getStyleTags=function(){return e.sealed?F7(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return F7(2);var n=((t={})[P7]=``,t[`data-styled-version`]=`5.3.11`,t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=Vzr();return r&&(n.nonce=r),[z.createElement(`style`,A7({},n,{key:`sc-0-0`}))]},this.seal=function(){e.sealed=!0},this.instance=new L7({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?F7(2):z.createElement(uBr,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return F7(3)},e})();var U7=function(e){var t=z.forwardRef((function(t,n){var r=(0,z.useContext)(V7),i=e.defaultProps,a=SBr(t,r,i);return process.env.NODE_ENV!==`production`&&a===void 0&&console.warn(`[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "`+N7(e)+`"`),z.createElement(e,A7({},t,{theme:a,ref:n}))}));return(0,Szr.default)(t,e),t.displayName=`WithTheme(`+N7(e)+`)`,t};process.env.NODE_ENV!==`production`&&typeof navigator<`u`&&navigator.product===`ReactNative`&&console.warn(`It looks like you've imported 'styled-components' on React Native.
|
|
1260
1260
|
Perhaps you're looking to import 'styled-components/native'?
|
|
1261
1261
|
Read more about this at https://www.styled-components.com/docs/basics#react-native`),process.env.NODE_ENV!==`production`&&process.env.NODE_ENV!==`test`&&typeof window<`u`&&(window[`__styled-components-init__`]=window[`__styled-components-init__`]||0,window[`__styled-components-init__`]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
|
|
1262
1262
|
|
|
1263
|
-
See https://s-c.sh/2BAXzed for more info.`),window[`__styled-components-init__`]+=1);function W7(e,t=16){let n=e.split(`px`)[0]/t;return String(`${n}rem`)}var G7={breakpoints:{sm:W7(`428px`),md:W7(`800px`),lg:W7(`1280px`),xl:W7(`1440px`),xxl:W7(`2048px`)},colors:{dark:{base:{primary:`#00676D`,secondary:`#17B582`,tertiary:`#6EC5B8`,gray:`#8E8E93`,black:`#000000`,white:`#FFFFFF`,alert:`#C64F55`,warning:`#F4B740`,success:`#17B569`,wordOfChrist:`#8B0000`,live:`#cb1114`},neutral:{gray:`#8E8E93`,gray2:`#636366`,gray3:`#48484A`,gray4:`#3A3A3C`,gray5:`#2C2C2E`,gray6:`#1C1C1E`},fill:{paper:`#1C1C1E`,paperTransparent:`#1C1C1E00`,screen:`#000000`,system:`rgba(99, 99, 102, 0.36)`,system2:`rgba(99, 99, 102, 0.32)`,system3:`rgba(99, 99, 102, 0.24)`,system4:`rgba(99, 99, 102, 0.18)`},material:{thick:`rgba(28, 28, 30, 0.90)`,regular:`rgba(28, 28, 30, 0.70)`,thin:`rgba(28, 28, 30, 0.50)`,ultrathin:`rgba(28, 28, 30, 0.40)`,chrome:`rgba(28, 28, 30, 0.95)`},text:{primary:`#F4F7F8`,secondary:`rgba(244, 247, 248, 0.6)`,tertiary:`rgba(244, 247, 248, 0.33)`,quaternary:`rgba(244, 247, 248, 0.18)`,placeholder:`rgba(244, 247, 248, 0.3)`,action:`#17B582`}},light:{base:{primary:`#00676D`,secondary:`#17B582`,tertiary:`#6EC5B8`,gray:`#8E8E93`,black:`#000000`,white:`#FFFFFF`,alert:`#C64F55`,warning:`#F4B740`,success:`#17B569`,wordOfChrist:`#8B0000`,live:`#cb1114`},neutral:{gray:`#8E8E93`,gray2:`#AFAFB3`,gray3:`#C7C7CC`,gray4:`#D1D1D6`,gray5:`#E5E5EA`,gray6:`#F2F2F7`},fill:{paper:`#FFFFFF`,screen:`#F9F9FB`,system:`rgba(142, 142, 147, 0.2)`,system2:`rgba(142, 142, 147, 0.16)`,system3:`rgba(142, 142, 147, 0.12)`,system4:`rgba(142, 142, 147, 0.08)`},material:{thick:`rgba(28, 28, 30, 0.90)`,regular:`rgba(28, 28, 30, 0.70)`,thin:`rgba(28, 28, 30, 0.50)`,ultrathin:`rgba(28, 28, 30, 0.40)`,chrome:`rgba(28, 28, 30, 0.95)`},text:{primary:`#27272E`,secondary:`rgba(39, 39, 46, 0.6)`,tertiary:`rgba(39, 39, 46, 0.3)`,quaternary:`rgba(39, 39, 46, 0.18)`,placeholder:`rgba(229, 229, 234, 0.3)`,action:`#17B582`},shadow:{low:`0px 2px 8px rgba(0, 0, 0, 0.04)`,medium:`0px 5px 24px rgba(0, 0, 0, 0.05)`,high:`0px 20px 48px rgba(0, 0, 0, 0.09)`}}},radii:{xs:W7(`2px`),s:W7(`4px`),base:W7(`6px`),l:W7(`10px`),xl:W7(`16px`),xxl:W7(`30px`),round:W7(`999px`)},shadows:{low:`0px 3px 6px rgba(0, 0, 0, 0.25);`,medium:`0px 20px 48px rgba(0, 0, 0, 0.09);`,mediumBottom:`0px 60px 48px rgba(0, 0, 0, 0.09);`,high:`0px 16px 38px rgba(0, 0, 0, 0.22);`},space:{xxxs:W7(`4px`),xxs:W7(`6px`),xs:W7(`14px`),s:W7(`18px`),base:W7(`24px`),l:W7(`36px`),xl:W7(`48px`),xxl:W7(`66px`),xxxl:W7(`108px`)},timing:{base:`0.132s`,l:`0.2s`,xl:`0.3s`}},NBr=(0,z.createContext)(`light`),PBr=(0,z.createContext)(null),FBr=e=>{if(!e)return null;let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?`${parseInt(t[1],16)} ${parseInt(t[2],16)} ${parseInt(t[3],16)}`:null},IBr=e=>{if(typeof window<`u`){let t=document.documentElement;if(t&&t.classList)try{e===`dark`?t.classList.add(`dark`):t.classList.remove(`dark`)}catch(e){console.warn(`Failed to update HTML class:`,e)}}return e},LBr=()=>{if(typeof window>`u`)return`light`;let e=document.documentElement;return e.classList.contains(`dark`)?`dark`:e.classList.contains(`light`)?`light`:window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`};function RBr({theme:e=G7,...t}){let[n,r]=(0,z.useState)(()=>IBr(LBr())),[i,a]=(0,z.useState)({...G7,colors:{...G7.colors[n],base:{...G7.colors[n].base,primary:G7.colors[n].base.primary,secondary:G7.colors[n].base.secondary,tertiary:G7.colors[n].base.tertiary},text:{...G7.colors[n].text,action:G7.colors[n].text.action}}}),{currentChurch:o,loading:s,error:c}=ELr(),[l,u]=uzr();return(0,z.useEffect)(()=>{if(typeof window>`u`)return;let e=new MutationObserver(()=>{let e=LBr();e!==n&&(r(e),IBr(e))});e.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`]});let t=window.matchMedia(`(prefers-color-scheme: dark)`),i=e=>{let t=document.documentElement;if(!t.classList.contains(`dark`)&&!t.classList.contains(`light`)){let t=e.matches?`dark`:`light`;r(t),IBr(t)}};return t.addEventListener(`change`,i),()=>{e.disconnect(),t.removeEventListener(`change`,i)}},[n]),(0,z.useEffect)(()=>{a({...G7,colors:{...G7.colors[n],base:{...G7.colors[n].base,primary:G7.colors[n].base.primary,secondary:G7.colors[n].base.secondary,tertiary:G7.colors[n].base.tertiary},text:{...G7.colors[n].text,action:G7.colors[n].text.action}}})},[n]),(0,z.useEffect)(()=>{u(ozr({loading:s}))},[s]),(0,z.useEffect)(()=>{if(o&&o.theme)try{let e=JSON.parse(o?.theme);a({...G7,colors:{...G7.colors[n],base:{...G7.colors[n].base,primary:e?.colors?.primary||G7.colors[n].base.primary,secondary:e?.colors?.secondary||G7.colors[n].base.secondary,tertiary:e?.colors?.tertiary||G7.colors[n].base.tertiary},text:{...G7.colors[n].text,action:e?.colors?.secondary||G7.colors[n].text.action}}});let t=document.documentElement;if(e?.colors?.primary){let n=FBr(e.colors.primary);n&&t.style.setProperty(`--color-brand-primary`,n)}if(e?.colors?.secondary){let n=FBr(e.colors.secondary);n&&t.style.setProperty(`--color-brand-secondary`,n)}if(e?.colors?.tertiary){let n=FBr(e.colors.tertiary);n&&t.style.setProperty(`--color-brand-tertiary`,n)}}catch(e){console.error(`ThemeProvider - Error parsing church theme:`,e),console.error(`ThemeProvider - Raw theme string:`,o.theme)}},[o,n]),(0,q.jsx)(kBr,{theme:i,children:(0,q.jsx)(NBr.Provider,{value:n,children:(0,q.jsx)(PBr.Provider,{value:i,children:t.children})})})}RBr.propTypes={children:Zy.default.node.isRequired,theme:Zy.default.object};var K7=(0,z.createContext)({useApollosIdParam:!1,shouldUsePathRouter:!1,shouldUseModal:!1,apollosPageRoute:null,churchSlug:`apollos_global`}),zBr=()=>(0,z.useContext)(K7).useApollosIdParam,BBr=()=>(0,z.useContext)(K7).shouldUsePathRouter,VBr=()=>(0,z.useContext)(K7).shouldUseModal,HBr=()=>(0,z.useContext)(K7).apollosPageRoute,UBr=()=>(0,z.useContext)(K7).churchSlug;function WBr({children:e,churchSlug:t}){let{currentChurch:n}=ELr(),{currentUser:r}=O7();return(0,q.jsx)(tme,{coreSegmentKey:`YxKgDjmwjTQrTdm6mO34kArQIYFmfnAY`,churchSegmentKey:n?.webSegmentKey,currentChurch:{slug:t,name:n?.name},currentUser:r,children:e})}function GBr(e={}){let[t,n]=(0,z.useState)(null),[r,i]=(0,z.useState)(e.church||`apollos_global`);return(0,z.useEffect)(()=>{(async()=>{let e=await URr(r);n(e)})()},[r]),(0,z.useEffect)(()=>{let e=document.querySelector(`.apollos-widget[data-church]`)?.getAttribute(`data-church`);e&&i(e)},[]),(0,z.useEffect)(()=>{e.church&&e.church!==r&&i(e.church)},[e.church,r]),t?(0,q.jsx)(IIr,{church:r,children:(0,q.jsx)(K7.Provider,{value:{useApollosIdParam:e.useApollosIdParam,shouldUsePathRouter:e.shouldUsePathRouter,shouldUseModal:e.shouldUseModal,apollosPageRoute:e.apollosPageRoute,churchSlug:r},children:(0,q.jsx)(coe,{client:t,...e,children:(0,q.jsx)(Woe,{children:(0,q.jsx)(WBr,{churchSlug:r,children:(0,q.jsx)(czr,{church:r,searchFeed:e.searchFeed,searchProfileSize:e.searchProfileSize,hideApollosAuth:e.hideApollosAuth,customPlaceholder:e.customPlaceholder,children:(0,q.jsx)(QRr,{children:(0,q.jsx)(RBr,{children:e.children})})})})})})})}):null}GBr.propTypes={children:Zy.default.oneOfType([Zy.default.node,Zy.default.func,Zy.default.object]),client:Zy.default.shape({}),customTheme:Zy.default.shape({}),church:Zy.default.string};function KBr({Component:e,options:t,...n}){let{loading:r,error:i,content:a,fetchMore:o}=SLr(t);return(0,q.jsx)(e,{data:a,loading:r,error:i,fetchMore:o,...n})}KBr.propTypes={Component:Zy.default.oneOfType([Zy.default.node,Zy.default.func,Zy.default.object]),options:Zy.default.shape({})};function qBr(e){if(!e)return null;if(/^[A-Z]\w+-/.test(e)){let[t,n]=e.split(/-(.*)/s);if(t&&n)return{type:t,randomId:n}}else{let t=e.split(`-`).at(-1);if(!t)return null;try{let[e,n]=atob(t).split(/-(.*)/s);if(e&&n)return{type:e,randomId:n}}catch{return null}}return null}var JBr=({id:e})=>{let{item:t}=wLr({variables:{id:e}});return(0,q.jsx)(MIr,{content:t})},YBr=({id:e})=>{let{livestream:t}=NLr({variables:{id:e}});return t?(0,q.jsx)(PIr,{livestream:t}):null};function XBr({type:e,id:t}){switch(e){case`MediaContentItem`:case`WeekendContentItem`:case`Event`:case`UniversalContentItem`:case`ContentSeriesContentItem`:return(0,q.jsx)(JBr,{id:`${e}:${t}`});case`Livestream`:return(0,q.jsx)(YBr,{id:`${e}:${t}`});case`ContentChannel`:{let n={variables:{id:`${e}:${t}`}};return(0,q.jsx)(KBr,{Component:QLr,options:n})}case`Url`:return(0,q.jsx)(`h1`,{children:`External Url`});case`FeatureFeed`:return(0,q.jsx)(QLr,{id:`${e}:${t}`});default:return null}}function ZBr(e){let{type:t,randomId:n}=qBr(e)??{};return XBr({type:t,id:n})}function QBr(e){if(!e)return null;let t=`ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;`;return Array.from(e).map(e=>{let n=[...t].indexOf(e);return n>-1?e.replace(new RegExp(t.charAt(n),`g`),`aaaaaeeeeeiiiiooooouuuunc------`.charAt(n)):e}).join(``).toString().toLowerCase().trim().replace(/\s+/g,`-`).replace(/&/g,``).replace(/[^\w\-]+/g,``).replace(/\-\-+/g,`-`)}function $Br(e){let[t,n]=e?.id?.split(`:`);switch(t){case`Event`:case`MediaContentItem`:case`WeekendContentItem`:case`UniversalContentItem`:case`ContentChannel`:case`FeatureFeed`:case`Livestream`:case`ContentSeriesContentItem`:return e.title?`${QBr(e.title)}-${btoa(`${t}-${n}`)}`:`${t}-${n}`;case`Url`:return e.url;default:return console.warn(`Routing for node type ${t} not set up. Please add it to getURLFromType.js`),`/`}}function eVr(e){return typeof e!=`string`||!e.length?!1:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase())}function tVr(e){if(typeof e!=`string`||!e.length)return!1;let t=e.match(/^[0-9]{10,10}$/);return t?t.length===1:!1}var nVr=30;function rVr(e){let t=(e?.graphQLErrors||[]).find(e=>e?.extensions?.code===`RATE_LIMITED`)?.extensions;if(!t)return null;let n=t.retryAfter||null;return{retryAfter:n,seconds:LIr(n,nVr)}}var iVr=e=>{let[t,n]=(0,z.useState)(`IDLE`),[r,i]=(0,z.useState)(null),[a,o]=ob(),s=({identity:e,type:t,userExists:r,userProfile:i,nextStep:s})=>{n(`SUCCESS`),o(ib({identity:e,type:t,userExists:r,userProfile:i,step:s,prevStep:a.step}))},c=e=>{let t=rVr(e);n(`ERROR`),i({identity:t?`You just requested a code. Please wait ${t.seconds}s and try again.`:`Something went wrong. Please try again.`})},[l]=LLr({onError:c}),[u]=FLr({fetchPolicy:`network-only`,onError:c,onCompleted:async e=>{let{identity:t}=d,n=e?.requestLogin.result!==`NO_USER`,r=eVr(t);if(n)s({identity:r?{email:t}:{phone:t},userExists:!0,nextStep:Qy.Confirm,type:r?`email`:`phone`});else try{if(!(await l({variables:{identity:r?{email:t}:{phone:t}}}))?.data?.requestRegister)return;s({identity:r?{email:t}:{phone:t},userExists:!1,nextStep:Qy.Confirm,type:r?`email`:`phone`})}catch(e){console.log(JSON.stringify(e))}}}),{values:d,handleSubmit:f,setFieldValue:p}=jLr(()=>{let{identity:e}=d,t=eVr(e),r=tVr(e);t||r?(n(`LOADING`),u({variables:{identity:t?{email:d.identity}:{phone:d.identity}}})):(n(`ERROR`),i({identity:`Please enter a valid email or phone number.`}))}),m=t===`LOADING`,h=e=>{e.preventDefault(),f()};return(0,q.jsxs)(JLr,{...e,heading:a.type===`login`?`Welcome back!`:`We’re glad you’re here.`,subHeading:a.type===`login`?`Use the same phone number or email that you used when logging into the app before.`:`If you’ve attended with us before, we’ll sync your history and help personalize what’s next.`,children:[(0,q.jsxs)(`form`,{onSubmit:h,children:[(0,q.jsx)(RC,{id:`identity`,placeholder:`Phone or Email`,value:d.identity||``,onChange:e=>p(`identity`,e.target.value),required:!0,autoFocus:!0,error:r?.identity,className:`mb-4`}),(0,q.jsx)(kC,{className:`mb-4`,fg:`secondary`,children:`We’ll text or email you a code to continue.`}),(0,q.jsx)(bC,{type:`submit`,className:`w-full mt-6 mb-3`,surface:`solid`,disabled:!d.identity||m,children:m?`Submitting...`:`Next`})]}),a.type===`login`?(0,q.jsx)(q.Fragment,{children:(0,q.jsxs)(kC,{className:`flex gap-2 justify-center text-center`,fg:`secondary`,children:[`Having trouble?`,(0,q.jsx)(`div`,{className:`text-[theme(colors.action)] text-primary cursor-pointer`,onClick:()=>o(ib({type:`signup`})),children:`Create account →`})]})}):(0,q.jsx)(q.Fragment,{children:(0,q.jsxs)(kC,{className:`flex gap-2 justify-center text-center`,fg:`secondary`,children:[`Already have an account?`,` `,(0,q.jsx)(`div`,{className:`text-[theme(colors.action)] cursor-pointer`,onClick:()=>o(ib({type:`login`})),children:`Log in →`})]})})]})};function aVr(){let[e,t]=(0,z.useState)(`IDLE`),[n,r]=(0,z.useState)(null),[i,a]=ob(),[o,s]=(0,z.useState)(),c=(0,z.useMemo)(()=>({defaultSelection:{id:`none`,firstName:`None of these are me`}}),[]),l=(0,z.useMemo)(()=>[...i.sharedProfiles||[],c.defaultSelection],[c.defaultSelection,i.sharedProfiles]),[u]=bLr(),d=e=>{t(`ERROR`),r(e)},f=({birthDate:e,gender:n,firstName:r,lastName:i})=>{t(`SUCCESS`),a(ib(r===null||i===null||n===null||e===null?{user:{birthDate:e,gender:n,firstName:r,lastName:i},step:Qy.Details}:{step:Qy.Success}))},p=(0,z.useCallback)(e=>s(e.target.value),[]),{values:m,handleSubmit:h,setFieldValue:g}=jLr(async()=>{t(`LOADING`),o===`none`&&a(ib({step:Qy.Details}));try{await u({variables:{mergeProfileId:o},update:(e,{data:{completeRegistration:{birthDate:t,gender:n,firstName:r,lastName:i}={}}={}})=>{f({birthDate:t,gender:n,firstName:r,lastName:i})},onError:d})}catch(e){d(),console.log(JSON.stringify(e))}}),_=e===`LOADING`;return(0,q.jsx)(J7,{position:`fixed`,top:`0`,bottom:`0`,left:`0`,right:`0`,overflow:`scroll`,zIndex:9999,justifyContent:`center`,display:`flex`,alignItems:`center`,backgroundColor:`neutral.gray6`,children:(0,q.jsxs)(EC,{p:`l`,display:`flex`,flexDirection:`column`,width:`440px`,children:[(0,q.jsx)(kC,{children:`Are any of these people you?`}),(0,q.jsx)(kC,{children:`Based on your verified phone number or email, we've matched you to an existing profile.`}),l.map((e,t)=>(0,q.jsxs)(J7,{display:`flex`,alignItems:`center`,mb:`s`,children:[(0,q.jsx)(RC,{id:`merge`,type:`radio`,mr:`xxs`,value:e.id,checked:e.id===o,onChange:p},e.id),e.photo?.uri?(0,q.jsx)(SC,{src:e.photo?.uri,alt:`avatar`,mr:`s`}):null,(0,q.jsxs)(J7,{children:[(0,q.jsx)(Oqr,{children:e.firstName}),(0,q.jsx)(kC,{color:`text.secondary`,children:e.lastName})]})]},e.id)),(0,q.jsx)(bC,{disabled:!o,onClick:h,mt:`base`,children:_?`Submitting...`:`Next`})]})})}var oVr=aVr,q7=function(e,t){return t===void 0&&(t=null),function(n){return wu(n.theme,e,t)}},sVr=U7(H7.div`
|
|
1263
|
+
See https://s-c.sh/2BAXzed for more info.`),window[`__styled-components-init__`]+=1);function W7(e,t=16){let n=e.split(`px`)[0]/t;return String(`${n}rem`)}var G7={breakpoints:{sm:W7(`428px`),md:W7(`800px`),lg:W7(`1280px`),xl:W7(`1440px`),xxl:W7(`2048px`)},colors:{dark:{base:{primary:`#00676D`,secondary:`#17B582`,tertiary:`#6EC5B8`,gray:`#8E8E93`,black:`#000000`,white:`#FFFFFF`,alert:`#C64F55`,warning:`#F4B740`,success:`#17B569`,wordOfChrist:`#8B0000`,live:`#cb1114`},neutral:{gray:`#8E8E93`,gray2:`#636366`,gray3:`#48484A`,gray4:`#3A3A3C`,gray5:`#2C2C2E`,gray6:`#1C1C1E`},fill:{paper:`#1C1C1E`,paperTransparent:`#1C1C1E00`,screen:`#000000`,system:`rgba(99, 99, 102, 0.36)`,system2:`rgba(99, 99, 102, 0.32)`,system3:`rgba(99, 99, 102, 0.24)`,system4:`rgba(99, 99, 102, 0.18)`},material:{thick:`rgba(28, 28, 30, 0.90)`,regular:`rgba(28, 28, 30, 0.70)`,thin:`rgba(28, 28, 30, 0.50)`,ultrathin:`rgba(28, 28, 30, 0.40)`,chrome:`rgba(28, 28, 30, 0.95)`},text:{primary:`#F4F7F8`,secondary:`rgba(244, 247, 248, 0.6)`,tertiary:`rgba(244, 247, 248, 0.33)`,quaternary:`rgba(244, 247, 248, 0.18)`,placeholder:`rgba(244, 247, 248, 0.3)`,action:`#17B582`}},light:{base:{primary:`#00676D`,secondary:`#17B582`,tertiary:`#6EC5B8`,gray:`#8E8E93`,black:`#000000`,white:`#FFFFFF`,alert:`#C64F55`,warning:`#F4B740`,success:`#17B569`,wordOfChrist:`#8B0000`,live:`#cb1114`},neutral:{gray:`#8E8E93`,gray2:`#AFAFB3`,gray3:`#C7C7CC`,gray4:`#D1D1D6`,gray5:`#E5E5EA`,gray6:`#F2F2F7`},fill:{paper:`#FFFFFF`,screen:`#F9F9FB`,system:`rgba(142, 142, 147, 0.2)`,system2:`rgba(142, 142, 147, 0.16)`,system3:`rgba(142, 142, 147, 0.12)`,system4:`rgba(142, 142, 147, 0.08)`},material:{thick:`rgba(28, 28, 30, 0.90)`,regular:`rgba(28, 28, 30, 0.70)`,thin:`rgba(28, 28, 30, 0.50)`,ultrathin:`rgba(28, 28, 30, 0.40)`,chrome:`rgba(28, 28, 30, 0.95)`},text:{primary:`#27272E`,secondary:`rgba(39, 39, 46, 0.6)`,tertiary:`rgba(39, 39, 46, 0.3)`,quaternary:`rgba(39, 39, 46, 0.18)`,placeholder:`rgba(229, 229, 234, 0.3)`,action:`#17B582`},shadow:{low:`0px 2px 8px rgba(0, 0, 0, 0.04)`,medium:`0px 5px 24px rgba(0, 0, 0, 0.05)`,high:`0px 20px 48px rgba(0, 0, 0, 0.09)`}}},radii:{xs:W7(`2px`),s:W7(`4px`),base:W7(`6px`),l:W7(`10px`),xl:W7(`16px`),xxl:W7(`30px`),round:W7(`999px`)},shadows:{low:`0px 3px 6px rgba(0, 0, 0, 0.25);`,medium:`0px 20px 48px rgba(0, 0, 0, 0.09);`,mediumBottom:`0px 60px 48px rgba(0, 0, 0, 0.09);`,high:`0px 16px 38px rgba(0, 0, 0, 0.22);`},space:{xxxs:W7(`4px`),xxs:W7(`6px`),xs:W7(`14px`),s:W7(`18px`),base:W7(`24px`),l:W7(`36px`),xl:W7(`48px`),xxl:W7(`66px`),xxxl:W7(`108px`)},timing:{base:`0.132s`,l:`0.2s`,xl:`0.3s`}},IBr=(0,z.createContext)(`light`),LBr=(0,z.createContext)(null),RBr=e=>{if(!e)return null;let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?`${parseInt(t[1],16)} ${parseInt(t[2],16)} ${parseInt(t[3],16)}`:null},zBr=e=>{if(typeof window<`u`){let t=document.documentElement;if(t&&t.classList)try{e===`dark`?t.classList.add(`dark`):t.classList.remove(`dark`)}catch(e){console.warn(`Failed to update HTML class:`,e)}}return e},BBr=()=>{if(typeof window>`u`)return`light`;let e=document.documentElement;return e.classList.contains(`dark`)?`dark`:e.classList.contains(`light`)?`light`:window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`};function VBr({theme:e=G7,...t}){let[n,r]=(0,z.useState)(()=>zBr(BBr())),[i,a]=(0,z.useState)({...G7,colors:{...G7.colors[n],base:{...G7.colors[n].base,primary:G7.colors[n].base.primary,secondary:G7.colors[n].base.secondary,tertiary:G7.colors[n].base.tertiary},text:{...G7.colors[n].text,action:G7.colors[n].text.action}}}),{currentChurch:o,loading:s,error:c}=kLr(),[l,u]=pzr();return(0,z.useEffect)(()=>{if(typeof window>`u`)return;let e=new MutationObserver(()=>{let e=BBr();e!==n&&(r(e),zBr(e))});e.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`]});let t=window.matchMedia(`(prefers-color-scheme: dark)`),i=e=>{let t=document.documentElement;if(!t.classList.contains(`dark`)&&!t.classList.contains(`light`)){let t=e.matches?`dark`:`light`;r(t),zBr(t)}};return t.addEventListener(`change`,i),()=>{e.disconnect(),t.removeEventListener(`change`,i)}},[n]),(0,z.useEffect)(()=>{a({...G7,colors:{...G7.colors[n],base:{...G7.colors[n].base,primary:G7.colors[n].base.primary,secondary:G7.colors[n].base.secondary,tertiary:G7.colors[n].base.tertiary},text:{...G7.colors[n].text,action:G7.colors[n].text.action}}})},[n]),(0,z.useEffect)(()=>{u(lzr({loading:s}))},[s]),(0,z.useEffect)(()=>{if(o&&o.theme)try{let e=JSON.parse(o?.theme);a({...G7,colors:{...G7.colors[n],base:{...G7.colors[n].base,primary:e?.colors?.primary||G7.colors[n].base.primary,secondary:e?.colors?.secondary||G7.colors[n].base.secondary,tertiary:e?.colors?.tertiary||G7.colors[n].base.tertiary},text:{...G7.colors[n].text,action:e?.colors?.secondary||G7.colors[n].text.action}}});let t=document.documentElement;if(e?.colors?.primary){let n=RBr(e.colors.primary);n&&t.style.setProperty(`--color-brand-primary`,n)}if(e?.colors?.secondary){let n=RBr(e.colors.secondary);n&&t.style.setProperty(`--color-brand-secondary`,n)}if(e?.colors?.tertiary){let n=RBr(e.colors.tertiary);n&&t.style.setProperty(`--color-brand-tertiary`,n)}}catch(e){console.error(`ThemeProvider - Error parsing church theme:`,e),console.error(`ThemeProvider - Raw theme string:`,o.theme)}},[o,n]),(0,q.jsx)(MBr,{theme:i,children:(0,q.jsx)(IBr.Provider,{value:n,children:(0,q.jsx)(LBr.Provider,{value:i,children:t.children})})})}VBr.propTypes={children:Zy.default.node.isRequired,theme:Zy.default.object};var K7=(0,z.createContext)({useApollosIdParam:!1,shouldUsePathRouter:!1,shouldUseModal:!1,apollosPageRoute:null,churchSlug:`apollos_global`}),HBr=()=>(0,z.useContext)(K7).useApollosIdParam,UBr=()=>(0,z.useContext)(K7).shouldUsePathRouter,WBr=()=>(0,z.useContext)(K7).shouldUseModal,GBr=()=>(0,z.useContext)(K7).apollosPageRoute,KBr=()=>(0,z.useContext)(K7).churchSlug;function qBr({children:e,churchSlug:t}){let{currentChurch:n}=kLr(),{currentUser:r}=O7();return(0,q.jsx)(tme,{coreSegmentKey:`YxKgDjmwjTQrTdm6mO34kArQIYFmfnAY`,churchSegmentKey:n?.webSegmentKey,currentChurch:{slug:t,name:n?.name},currentUser:r,children:e})}function JBr(e={}){let[t,n]=(0,z.useState)(null),[r,i]=(0,z.useState)(e.church||`apollos_global`);return(0,z.useEffect)(()=>{(async()=>{let e=await KRr(r);n(e)})()},[r]),(0,z.useEffect)(()=>{let e=document.querySelector(`.apollos-widget[data-church]`)?.getAttribute(`data-church`);e&&i(e)},[]),(0,z.useEffect)(()=>{e.church&&e.church!==r&&i(e.church)},[e.church,r]),t?(0,q.jsx)(zIr,{church:r,children:(0,q.jsx)(K7.Provider,{value:{useApollosIdParam:e.useApollosIdParam,shouldUsePathRouter:e.shouldUsePathRouter,shouldUseModal:e.shouldUseModal,apollosPageRoute:e.apollosPageRoute,churchSlug:r},children:(0,q.jsx)(coe,{client:t,...e,children:(0,q.jsx)(Woe,{children:(0,q.jsx)(qBr,{churchSlug:r,children:(0,q.jsx)(dzr,{church:r,searchFeed:e.searchFeed,searchProfileSize:e.searchProfileSize,hideApollosAuth:e.hideApollosAuth,customPlaceholder:e.customPlaceholder,children:(0,q.jsx)(tzr,{children:(0,q.jsx)(VBr,{children:e.children})})})})})})})}):null}JBr.propTypes={children:Zy.default.oneOfType([Zy.default.node,Zy.default.func,Zy.default.object]),client:Zy.default.shape({}),customTheme:Zy.default.shape({}),church:Zy.default.string};function YBr({Component:e,options:t,...n}){let{loading:r,error:i,content:a,fetchMore:o}=TLr(t);return(0,q.jsx)(e,{data:a,loading:r,error:i,fetchMore:o,...n})}YBr.propTypes={Component:Zy.default.oneOfType([Zy.default.node,Zy.default.func,Zy.default.object]),options:Zy.default.shape({})};function XBr(e){if(!e)return null;if(/^[A-Z]\w+-/.test(e)){let[t,n]=e.split(/-(.*)/s);if(t&&n)return{type:t,randomId:n}}else{let t=e.split(`-`).at(-1);if(!t)return null;try{let[e,n]=atob(t).split(/-(.*)/s);if(e&&n)return{type:e,randomId:n}}catch{return null}}return null}var ZBr=({id:e})=>{let{item:t}=DLr({variables:{id:e}});return(0,q.jsx)(FIr,{content:t})},QBr=({id:e})=>{let{livestream:t}=ILr({variables:{id:e}});return t?(0,q.jsx)(LIr,{livestream:t}):null};function $Br({type:e,id:t}){switch(e){case`MediaContentItem`:case`WeekendContentItem`:case`Event`:case`UniversalContentItem`:case`ContentSeriesContentItem`:return(0,q.jsx)(ZBr,{id:`${e}:${t}`});case`Livestream`:return(0,q.jsx)(QBr,{id:`${e}:${t}`});case`ContentChannel`:{let n={variables:{id:`${e}:${t}`}};return(0,q.jsx)(YBr,{Component:tRr,options:n})}case`Url`:return(0,q.jsx)(`h1`,{children:`External Url`});case`FeatureFeed`:return(0,q.jsx)(tRr,{id:`${e}:${t}`});default:return null}}function eVr(e){let{type:t,randomId:n}=XBr(e)??{};return $Br({type:t,id:n})}function tVr(e){if(!e)return null;let t=`ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;`;return Array.from(e).map(e=>{let n=[...t].indexOf(e);return n>-1?e.replace(new RegExp(t.charAt(n),`g`),`aaaaaeeeeeiiiiooooouuuunc------`.charAt(n)):e}).join(``).toString().toLowerCase().trim().replace(/\s+/g,`-`).replace(/&/g,``).replace(/[^\w\-]+/g,``).replace(/\-\-+/g,`-`)}function nVr(e){let[t,n]=e?.id?.split(`:`);switch(t){case`Event`:case`MediaContentItem`:case`WeekendContentItem`:case`UniversalContentItem`:case`ContentChannel`:case`FeatureFeed`:case`Livestream`:case`ContentSeriesContentItem`:return e.title?`${tVr(e.title)}-${btoa(`${t}-${n}`)}`:`${t}-${n}`;case`Url`:return e.url;default:return console.warn(`Routing for node type ${t} not set up. Please add it to getURLFromType.js`),`/`}}function rVr(e){return typeof e!=`string`||!e.length?!1:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase())}function iVr(e){if(typeof e!=`string`||!e.length)return!1;let t=e.match(/^[0-9]{10,10}$/);return t?t.length===1:!1}var aVr=30;function oVr(e){let t=(e?.graphQLErrors||[]).find(e=>e?.extensions?.code===`RATE_LIMITED`)?.extensions;if(!t)return null;let n=t.retryAfter||null;return{retryAfter:n,seconds:BIr(n,aVr)}}var sVr=e=>{let[t,n]=(0,z.useState)(`IDLE`),[r,i]=(0,z.useState)(null),[a,o]=ob(),s=({identity:e,type:t,userExists:r,userProfile:i,nextStep:s})=>{n(`SUCCESS`),o(ib({identity:e,type:t,userExists:r,userProfile:i,step:s,prevStep:a.step}))},c=e=>{let t=oVr(e);n(`ERROR`),i({identity:t?`You just requested a code. Please wait ${t.seconds}s and try again.`:`Something went wrong. Please try again.`})},[l]=BLr({onError:c}),[u]=RLr({fetchPolicy:`network-only`,onError:c,onCompleted:async e=>{let{identity:t}=d,n=e?.requestLogin.result!==`NO_USER`,r=rVr(t);if(n)s({identity:r?{email:t}:{phone:t},userExists:!0,nextStep:Qy.Confirm,type:r?`email`:`phone`});else try{if(!(await l({variables:{identity:r?{email:t}:{phone:t}}}))?.data?.requestRegister)return;s({identity:r?{email:t}:{phone:t},userExists:!1,nextStep:Qy.Confirm,type:r?`email`:`phone`})}catch(e){console.log(JSON.stringify(e))}}}),{values:d,handleSubmit:f,setFieldValue:p}=PLr(()=>{let{identity:e}=d,t=rVr(e),r=iVr(e);t||r?(n(`LOADING`),u({variables:{identity:t?{email:d.identity}:{phone:d.identity}}})):(n(`ERROR`),i({identity:`Please enter a valid email or phone number.`}))}),m=t===`LOADING`,h=e=>{e.preventDefault(),f()};return(0,q.jsxs)(ZLr,{...e,heading:a.type===`login`?`Welcome back!`:`We’re glad you’re here.`,subHeading:a.type===`login`?`Use the same phone number or email that you used when logging into the app before.`:`If you’ve attended with us before, we’ll sync your history and help personalize what’s next.`,children:[(0,q.jsxs)(`form`,{onSubmit:h,children:[(0,q.jsx)(RC,{id:`identity`,placeholder:`Phone or Email`,value:d.identity||``,onChange:e=>p(`identity`,e.target.value),required:!0,autoFocus:!0,error:r?.identity,className:`mb-4`}),(0,q.jsx)(kC,{className:`mb-4`,fg:`secondary`,children:`We’ll text or email you a code to continue.`}),(0,q.jsx)(bC,{type:`submit`,className:`w-full mt-6 mb-3`,surface:`solid`,disabled:!d.identity||m,children:m?`Submitting...`:`Next`})]}),a.type===`login`?(0,q.jsx)(q.Fragment,{children:(0,q.jsxs)(kC,{className:`flex gap-2 justify-center text-center`,fg:`secondary`,children:[`Having trouble?`,(0,q.jsx)(`div`,{className:`text-[theme(colors.action)] text-primary cursor-pointer`,onClick:()=>o(ib({type:`signup`})),children:`Create account →`})]})}):(0,q.jsx)(q.Fragment,{children:(0,q.jsxs)(kC,{className:`flex gap-2 justify-center text-center`,fg:`secondary`,children:[`Already have an account?`,` `,(0,q.jsx)(`div`,{className:`text-[theme(colors.action)] cursor-pointer`,onClick:()=>o(ib({type:`login`})),children:`Log in →`})]})})]})};function cVr(){let[e,t]=(0,z.useState)(`IDLE`),[n,r]=(0,z.useState)(null),[i,a]=ob(),[o,s]=(0,z.useState)(),c=(0,z.useMemo)(()=>({defaultSelection:{id:`none`,firstName:`None of these are me`}}),[]),l=(0,z.useMemo)(()=>[...i.sharedProfiles||[],c.defaultSelection],[c.defaultSelection,i.sharedProfiles]),[u]=CLr(),d=e=>{t(`ERROR`),r(e)},f=({birthDate:e,gender:n,firstName:r,lastName:i})=>{t(`SUCCESS`),a(ib(r===null||i===null||n===null||e===null?{user:{birthDate:e,gender:n,firstName:r,lastName:i},step:Qy.Details}:{step:Qy.Success}))},p=(0,z.useCallback)(e=>s(e.target.value),[]),{values:m,handleSubmit:h,setFieldValue:g}=PLr(async()=>{t(`LOADING`),o===`none`&&a(ib({step:Qy.Details}));try{await u({variables:{mergeProfileId:o},update:(e,{data:{completeRegistration:{birthDate:t,gender:n,firstName:r,lastName:i}={}}={}})=>{f({birthDate:t,gender:n,firstName:r,lastName:i})},onError:d})}catch(e){d(),console.log(JSON.stringify(e))}}),_=e===`LOADING`;return(0,q.jsx)(J7,{position:`fixed`,top:`0`,bottom:`0`,left:`0`,right:`0`,overflow:`scroll`,zIndex:9999,justifyContent:`center`,display:`flex`,alignItems:`center`,backgroundColor:`neutral.gray6`,children:(0,q.jsxs)(EC,{p:`l`,display:`flex`,flexDirection:`column`,width:`440px`,children:[(0,q.jsx)(kC,{children:`Are any of these people you?`}),(0,q.jsx)(kC,{children:`Based on your verified phone number or email, we've matched you to an existing profile.`}),l.map((e,t)=>(0,q.jsxs)(J7,{display:`flex`,alignItems:`center`,mb:`s`,children:[(0,q.jsx)(RC,{id:`merge`,type:`radio`,mr:`xxs`,value:e.id,checked:e.id===o,onChange:p},e.id),e.photo?.uri?(0,q.jsx)(SC,{src:e.photo?.uri,alt:`avatar`,mr:`s`}):null,(0,q.jsxs)(J7,{children:[(0,q.jsx)(jqr,{children:e.firstName}),(0,q.jsx)(kC,{color:`text.secondary`,children:e.lastName})]})]},e.id)),(0,q.jsx)(bC,{disabled:!o,onClick:h,mt:`base`,children:_?`Submitting...`:`Next`})]})})}var lVr=cVr,q7=function(e,t){return t===void 0&&(t=null),function(n){return wu(n.theme,e,t)}},uVr=U7(H7.div`
|
|
1264
1264
|
transition: all ${q7(`timing.base`)} ease-out;
|
|
1265
1265
|
${Dd}
|
|
1266
|
-
`),
|
|
1266
|
+
`),dVr=z.forwardRef((e,t)=>(0,q.jsx)(uVr,{ref:t,...e}));dVr.propTypes={...Od},dVr.displayName=`Box`;var J7=dVr,fVr=e=>{let[t,n]=ob(),r=async({step:e,type:t})=>{n(ib({step:e,type:t}))};return(0,q.jsx)(ZLr,{...e,children:(0,q.jsxs)(J7,{display:`flex`,flexDirection:`row`,justifyContent:`start`,className:`gap-4`,children:[(0,q.jsx)(bC,{surface:`solid`,onClick:()=>r({step:Qy.Identity,type:`login`}),children:`Login`}),(0,q.jsx)(bC,{surface:`solid`,onClick:()=>r({step:Qy.Identity,type:`signup`}),children:`Sign up`})]})})};function pVr(e={}){let[{step:t}]=ob();return(0,q.jsx)(J7,{children:(()=>{switch(t){case Qy.Welcome:return(0,q.jsx)(fVr,{...e});case Qy.Identity:return(0,q.jsx)(sVr,{...e});case Qy.Details:return(0,q.jsx)(eRr,{...e});case Qy.Merge:return(0,q.jsx)(lVr,{...e});case Qy.Confirm:return(0,q.jsx)(QLr,{...e});case Qy.Success:return null;default:return(0,q.jsx)(fVr,{...e})}})()})}pVr.propTypes={};var mVr=pVr,hVr=(0,z.createContext)({id:null,navigate:()=>Aw}),gVr=(e={})=>{let[t]=mte(),{apollosId:n,contentId:r,feedId:i}=Al(),a=UBr(),o=WBr(),s=Ol(),c=GBr(),l=HBr(),u=l?n||r||i||t.get(`apollosId`):r||i||t.get(`id`),d=()=>Aw;return d=a&&o?({id:e}={})=>{let t=e?.includes(`FeatureFeed`)?`feed`:`content`;s(e?{pathname:`/${t===`content`?`ac`:`af`}/${e}`}:{pathname:`/`})}:({id:e}={})=>{e?window.location.pathname!==c&&!o&&!a?window.location.href=`${c}?${l?`apollosId`:`id`}=${e}`:s({search:`?${l?`apollosId`:`id`}=${e}`,...o?{}:{pathname:c}}):s({pathname:`/`})},(0,q.jsx)(hVr.Provider,{value:{id:u,navigate:d},children:e.children})},_Vr=()=>(0,z.useContext)(hVr),vVr={Container:U7(H7.div`
|
|
1267
1267
|
width: 100%;
|
|
1268
1268
|
height: 100%;
|
|
1269
1269
|
display: flex;
|
|
@@ -1277,7 +1277,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[`__styled-components-init__`]
|
|
|
1277
1277
|
}
|
|
1278
1278
|
position: relative;
|
|
1279
1279
|
${Dd};
|
|
1280
|
-
`)},
|
|
1280
|
+
`)},yVr=()=>{let[e,t]=izr(),n=(0,z.useRef)(),{id:r}=_Vr();return(0,z.useEffect)(()=>{r&&(t(ZRr()),t($Rr(r))),r===null&&t(QRr())},[t,r]),e.content?(0,q.jsx)(vVr.Container,{ref:n,role:`dialog`,tabIndex:-1,children:(0,q.jsx)(J7,{width:{_:`100%`,md:`750px`,lg:`1180px`},children:e.content})}):null};yVr.propTypes={...Od};var bVr=yVr,Y7={ListItem:U7(H7.div`
|
|
1281
1281
|
display: flex;
|
|
1282
1282
|
padding: ${q7(`space.xs`)};
|
|
1283
1283
|
border-radius: ${q7(`radii.xl`)};
|
|
@@ -1339,31 +1339,31 @@ See https://s-c.sh/2BAXzed for more info.`),window[`__styled-components-init__`]
|
|
|
1339
1339
|
overflow: hidden;
|
|
1340
1340
|
text-overflow: ellipsis;
|
|
1341
1341
|
${Dd};
|
|
1342
|
-
`)};function
|
|
1343
|
-
max-height: ${e||
|
|
1344
|
-
`,
|
|
1342
|
+
`)};function xVr({title:e,subtitle:t,leadingIcon:n,tailingIcon:r,node:i,onClick:a,...o}){let s=Ol(),c=()=>{s({id:nVr(i)})},l=(0,q.jsx)(`svg`,{width:`10`,height:`18`,viewBox:`0 0 10 18`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,q.jsx)(`path`,{d:`M1 1.5L8.5 9L1 16.5`,stroke:`#AFAFB3`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})}),u=(0,q.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,q.jsx)(`path`,{d:`M12.8412 4.35693L12.8413 4.35678C13.2869 3.90825 13.8168 3.55228 14.4004 3.30937C14.9841 3.06646 15.6101 2.94141 16.2423 2.94141C16.8745 2.94141 17.5005 3.06646 18.0842 3.30937C18.6679 3.55228 19.1977 3.90825 19.6433 4.35678L19.6436 4.35707C20.0921 4.80262 20.4481 5.33249 20.691 5.91618C20.9339 6.49986 21.0589 7.12583 21.0589 7.75804C21.0589 8.39026 20.9339 9.01623 20.691 9.59991C20.4481 10.1836 20.0921 10.7135 19.6436 11.159L19.6434 11.1592L16.9903 13.8123C16.088 14.7137 14.8647 15.22 13.5892 15.22C12.3137 15.22 11.0904 14.7137 10.188 13.8123L10.1881 13.8122L10.1858 13.8102C10.1168 13.7476 10.0612 13.6717 10.0224 13.5871C9.98365 13.5024 9.96246 13.4107 9.96017 13.3176C9.95788 13.2245 9.97453 13.1319 10.0091 13.0454C10.0437 12.959 10.0955 12.8804 10.1613 12.8146C10.2272 12.7487 10.3057 12.6969 10.3922 12.6623C10.4787 12.6278 10.5713 12.6111 10.6644 12.6134C10.7575 12.6157 10.8492 12.6369 10.9338 12.6757C11.0185 12.7145 11.0944 12.7701 11.1569 12.8391L11.1569 12.8391L11.1592 12.8414C11.805 13.4834 12.6786 13.8437 13.5892 13.8437C14.4998 13.8437 15.3734 13.4834 16.0192 12.8414L16.0193 12.8413L18.6723 10.1883C18.6724 10.1883 18.6724 10.1882 18.6724 10.1882C18.9926 9.86966 19.2466 9.491 19.42 9.07398C19.5934 8.65692 19.6826 8.20971 19.6826 7.75804C19.6826 7.30638 19.5934 6.85917 19.42 6.44211C19.2466 6.02505 18.9925 5.64636 18.6723 5.3278L18.6723 5.32778C18.0265 4.68583 17.1529 4.3255 16.2423 4.3255C15.3317 4.3255 14.4581 4.68583 13.8123 5.32778L13.8122 5.32791L11.957 7.18305C11.8264 7.3009 11.6555 7.36419 11.4796 7.35986C11.3032 7.35552 11.1352 7.2835 11.0104 7.15871C10.8856 7.03392 10.8136 6.86592 10.8092 6.68949C10.8049 6.51357 10.8682 6.3427 10.9861 6.21207L12.8412 4.35693Z`,fill:`#AFAFB3`,stroke:`#AFAFB3`,strokeWidth:`0.125`}),(0,q.jsx)(`path`,{d:`M12.0001 16.7719L10.1438 18.6282C9.50654 19.2387 8.65542 19.5754 7.77289 19.5659C6.89035 19.5564 6.04664 19.2017 5.42256 18.5776C4.79848 17.9535 4.44369 17.1098 4.43424 16.2273C4.42478 15.3447 4.76141 14.4936 5.37197 13.8563L8.0251 11.2032C8.6592 10.5729 9.51696 10.2191 10.411 10.2191C11.3051 10.2191 12.1629 10.5729 12.797 11.2032C12.9396 11.3324 13.1266 11.4019 13.319 11.3972C13.5115 11.3924 13.6948 11.3138 13.8309 11.1777C13.967 11.0416 14.0456 10.8583 14.0503 10.6658C14.0551 10.4734 13.9856 10.2865 13.8563 10.1438C12.9423 9.23068 11.7031 8.71777 10.411 8.71777C9.119 8.71777 7.87981 9.23068 6.96572 10.1438L4.3126 12.7969C3.83563 13.2438 3.45338 13.7819 3.18857 14.3795C2.92376 14.977 2.78181 15.6217 2.77116 16.2751C2.7605 16.9286 2.88135 17.5776 3.12653 18.1834C3.37172 18.7893 3.73622 19.3396 4.19836 19.8018C4.66051 20.2639 5.21087 20.6284 5.81671 20.8736C6.42255 21.1188 7.07151 21.2396 7.725 21.229C8.37849 21.2183 9.02316 21.0764 9.62069 20.8116C10.2182 20.5468 10.7564 20.1645 11.2032 19.6875L13.0595 17.8313C13.1887 17.6886 13.2582 17.5017 13.2535 17.3092C13.2487 17.1168 13.1702 16.9335 13.034 16.7974C12.8979 16.6612 12.7146 16.5827 12.5221 16.5779C12.3297 16.5732 12.1428 16.6427 12.0001 16.7719V16.7719Z`,fill:`#AFAFB3`})]}),d=n?.sources?(0,q.jsx)(Y7.LeadingIcon,{children:(0,q.jsx)(J7,{width:`100%`,height:`100%`,backgroundSize:`cover`,backgroundPosition:`center`,backgroundImage:`url(${n?.sources[0].uri?n.sources[0].uri:null})`})}):n||u;return(0,q.jsxs)(Y7.ListItem,{cursor:i||a?`pointer`:`default`,onClick:a||i&&c,children:[(0,q.jsx)(J7,{display:`flex`,justifyContent:`center`,alignItems:`center`,children:d}),(0,q.jsxs)(Y7.Wrapper,{children:[(0,q.jsxs)(Y7.Heading,{children:[(0,q.jsx)(Y7.Title,{children:(0,q.jsx)(Y7.Ellipse,{children:e})}),(0,q.jsx)(Y7.Subtitle,{children:(0,q.jsx)(Y7.Ellipse,{children:t})})]}),(0,q.jsx)(Y7.TailingIcon,{children:r||l})]})]})}xVr.propTypes={...Od};var SVr=xVr,CVr=`80px`,wVr=({size:e})=>B7`
|
|
1343
|
+
max-height: ${e||CVr};
|
|
1344
|
+
`,TVr={Image:U7(H7.img`
|
|
1345
1345
|
resizemode: "contain";
|
|
1346
1346
|
max-width: 80%;
|
|
1347
|
-
${
|
|
1347
|
+
${wVr};
|
|
1348
1348
|
`),WrappedImage:U7(H7.img`
|
|
1349
1349
|
resizemode: "contain";
|
|
1350
1350
|
max-width: 100%;
|
|
1351
|
-
${
|
|
1352
|
-
`)};function
|
|
1351
|
+
${wVr};
|
|
1352
|
+
`)};function EVr({size:e,source:t,href:n,ref:r}){return n?(0,q.jsx)(`a`,{href:n,ref:r,children:(0,q.jsx)(TVr.WrappedImage,{className:`wordmark`,src:t||`./icon.png`,alt:`Logo`,size:e})}):(0,q.jsx)(TVr.Image,{className:`wordmark`,src:t||`./icon.png`,alt:`Logo`,size:e})}EVr.propTypes={...Od,size:Zy.default.string,source:Zy.default.string};var DVr=U7(EVr),OVr=FBr`
|
|
1353
1353
|
from {
|
|
1354
1354
|
transform: translateY(100%);
|
|
1355
1355
|
}
|
|
1356
1356
|
to {
|
|
1357
1357
|
transform: translateY(0);
|
|
1358
1358
|
}
|
|
1359
|
-
`,
|
|
1359
|
+
`,kVr=FBr`
|
|
1360
1360
|
from {
|
|
1361
1361
|
transform: translateY(0);
|
|
1362
1362
|
}
|
|
1363
1363
|
to {
|
|
1364
1364
|
transform: translateY(100%);
|
|
1365
1365
|
}
|
|
1366
|
-
`,
|
|
1366
|
+
`,AVr={Modal:U7(H7.div`
|
|
1367
1367
|
width: 100%;
|
|
1368
1368
|
height: 100%;
|
|
1369
1369
|
@media screen and (max-width: ${q7(`breakpoints.sm`)}) {
|
|
@@ -1378,7 +1378,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[`__styled-components-init__`]
|
|
|
1378
1378
|
justify-content: center;
|
|
1379
1379
|
align-items: center;
|
|
1380
1380
|
z-index: 9999;
|
|
1381
|
-
animation: ${e=>e.show?
|
|
1381
|
+
animation: ${e=>e.show?OVr:kVr} 0.3s ease-in-out;
|
|
1382
1382
|
transform: translateY(${e=>e.show?`0`:`100%`});
|
|
1383
1383
|
${Dd};
|
|
1384
1384
|
`),ModalContainer:U7(H7.div`
|
|
@@ -1416,15 +1416,15 @@ See https://s-c.sh/2BAXzed for more info.`),window[`__styled-components-init__`]
|
|
|
1416
1416
|
cursor: pointer;
|
|
1417
1417
|
}
|
|
1418
1418
|
${Dd};
|
|
1419
|
-
`)};qC();function
|
|
1419
|
+
`)};qC();function jVr(e){let{currentChurch:t}=kLr(),{origin:n}=window.location;return(0,q.jsx)(DVr,{source:t?.wordmarkLightUrl,padding:10,...e,href:n})}var MVr=(e={})=>{let[t,n]=izr(),r=(0,z.useRef)(),i=(0,z.useRef)(),{id:a,navigate:o}=_Vr();(0,z.useEffect)(()=>{a&&(n(ZRr()),n($Rr(a))),a===null&&n(QRr())},[n,a]);function s(){n(QRr()),o()}return(0,z.useEffect)(()=>{let e=document.querySelector(`body`);e.style.overflow=t.isOpen?`hidden`:`auto`},[t.isOpen]),(0,z.useEffect)(()=>{t.content&&r.current&&r.current.scrollTo(0,0)},[t.content]),(0,z.useEffect)(()=>{r.current&&t.isOpen&&r.current.focus()},[r.current,t.isOpen]),(0,q.jsx)(J7,{children:(0,q.jsx)(AVr.Modal,{className:`apollos-modal`,show:t.isOpen,children:t.content?(0,q.jsx)(q.Fragment,{children:(0,q.jsxs)(AVr.ModalContainer,{ref:r,role:`dialog`,tabIndex:-1,"aria-dialog":!0,children:[(0,q.jsx)(J7,{width:`100%`,display:`flex`,mb:`base`,alignItems:`center`,justifyContent:`center`,flexDirection:{_:`column-reverse`,sm:`row`},maxWidth:{_:`100%`,xs:`70%`},children:(0,q.jsx)(jVr,{display:`flex`,alignSelf:`center`,justifyContent:`center`,margin:`20px`,p:`s`,size:`60px`,className:`rounded-xl`,ref:i})}),(0,q.jsx)(J7,{width:{_:`100%`,sm:`10%`},mb:{_:`xs`,sm:`0`},ml:{_:`0`,sm:`xs`},display:`flex`,justifyContent:`flex-end`,alignItems:`center`,position:`absolute`,top:`xs`,right:`xs`,children:(0,q.jsx)(AVr.Icon,{onClick:s,onKeyDown:e=>{e.key===`Enter`&&s()},ml:{_:`auto`,sm:`0`},tabIndex:1,children:(0,q.jsx)(KC,{size:16,weight:`bold`})})}),(0,q.jsxs)(J7,{width:`100%`,display:`flex`,mb:`base`,alignItems:`center`,justifyContent:`space-between`,flexDirection:{_:`column-reverse`,md:`row`},children:[(0,q.jsx)(J7,{width:{_:`0`,sm:`10%`}}),(0,q.jsx)(J7,{width:{_:`100%`,md:`700px`,lg:`750px`},mx:`auto`,justifyContent:`center`,alignItems:`center`,children:(0,q.jsx)(Eqr,{width:`100%`})}),(0,q.jsx)(J7,{width:{_:`0`,sm:`10%`}})]}),(0,q.jsx)(J7,{width:{_:`100%`,md:`750px`,lg:`1180px`},children:t.content})]})}):null})})};MVr.propTypes={...Od};var NVr=MVr;DNe(),X9e(),Hsn(),umr(),ahr();var PVr=`80px`,FVr=`white`,IVr={Image:U7(H7.img`
|
|
1420
1420
|
resizemode: "contain";
|
|
1421
|
-
${({size:e,fill:t,theme:n})=>{let r=e||
|
|
1421
|
+
${({size:e,fill:t,theme:n})=>{let r=e||PVr;return B7`
|
|
1422
1422
|
width: ${r};
|
|
1423
1423
|
height: ${r};
|
|
1424
|
-
tintcolor: ${q7(`colors.${t}`)({theme:n})||t||
|
|
1424
|
+
tintcolor: ${q7(`colors.${t}`)({theme:n})||t||FVr};
|
|
1425
1425
|
`}};
|
|
1426
1426
|
${Dd};
|
|
1427
|
-
`)};function PVr({fill:e,size:t,padding:n,theme:r,source:i,...a}){return(0,q.jsx)(J7,{backgroundColor:r?.colors?.primary??``,...a,children:(0,q.jsx)(NVr.Image,{src:i||`./icon.png`,alt:`Logo`,size:t,fill:e})})}PVr.propTypes={...Od,fill:Zy.default.string,size:Zy.default.number,source:Zy.default.string};var FVr=U7(PVr),IVr={x:0,y:0,width:0,height:0,unit:`px`},X7=(e,t,n)=>Math.min(Math.max(e,t),n),LVr=(...e)=>e.filter(e=>e&&typeof e==`string`).join(` `),RVr=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function zVr(e,t,n,r){let i=Q7(e,n,r);return e.width&&(i.height=i.width/t),e.height&&(i.width=i.height*t),i.y+i.height>r&&(i.height=r-i.y,i.width=i.height*t),i.x+i.width>n&&(i.width=n-i.x,i.height=i.width/t),e.unit===`%`?Z7(i,n,r):i}function BVr(e,t,n){let r=Q7(e,t,n);return r.x=(t-r.width)/2,r.y=(n-r.height)/2,e.unit===`%`?Z7(r,t,n):r}function Z7(e,t,n){return e.unit===`%`?{...IVr,...e,unit:`%`}:{unit:`%`,x:e.x?e.x/t*100:0,y:e.y?e.y/n*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/n*100:0}}function Q7(e,t,n){return e.unit?e.unit===`px`?{...IVr,...e,unit:`px`}:{unit:`px`,x:e.x?e.x*t/100:0,y:e.y?e.y*n/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*n/100:0}:{...IVr,...e,unit:`px`}}function VVr(e,t,n,r,i,a=0,o=0,s=r,c=i){let l={...e},u=Math.min(a,r),d=Math.min(o,i),f=Math.min(s,r),p=Math.min(c,i);t&&(t>1?(u=o?o*t:u,d=u/t,f=s*t):(d=a?a/t:d,u=d*t,p=c/t)),l.y<0&&(l.height=Math.max(l.height+l.y,d),l.y=0),l.x<0&&(l.width=Math.max(l.width+l.x,u),l.x=0);let m=r-(l.x+l.width);m<0&&(l.x=Math.min(l.x,r-u),l.width+=m);let h=i-(l.y+l.height);if(h<0&&(l.y=Math.min(l.y,i-d),l.height+=h),l.width<u&&((n===`sw`||n==`nw`)&&(l.x-=u-l.width),l.width=u),l.height<d&&((n===`nw`||n==`ne`)&&(l.y-=d-l.height),l.height=d),l.width>f&&((n===`sw`||n==`nw`)&&(l.x-=f-l.width),l.width=f),l.height>p&&((n===`nw`||n==`ne`)&&(l.y-=p-l.height),l.height=p),t){let e=l.width/l.height;if(e<t){let e=Math.max(l.width/t,d);(n===`nw`||n==`ne`)&&(l.y-=e-l.height),l.height=e}else if(e>t){let e=Math.max(l.height*t,u);(n===`sw`||n==`nw`)&&(l.x-=e-l.width),l.width=e}}return l}function HVr(e,t,n,r){let i={...e};return t===`ArrowLeft`?r===`nw`?(i.x-=n,i.y-=n,i.width+=n,i.height+=n):r===`w`?(i.x-=n,i.width+=n):r===`sw`?(i.x-=n,i.width+=n,i.height+=n):r===`ne`?(i.y+=n,i.width-=n,i.height-=n):r===`e`?i.width-=n:r===`se`&&(i.width-=n,i.height-=n):t===`ArrowRight`&&(r===`nw`?(i.x+=n,i.y+=n,i.width-=n,i.height-=n):r===`w`?(i.x+=n,i.width-=n):r===`sw`?(i.x+=n,i.width-=n,i.height-=n):r===`ne`?(i.y-=n,i.width+=n,i.height+=n):r===`e`?i.width+=n:r===`se`&&(i.width+=n,i.height+=n)),t===`ArrowUp`?r===`nw`?(i.x-=n,i.y-=n,i.width+=n,i.height+=n):r===`n`?(i.y-=n,i.height+=n):r===`ne`?(i.y-=n,i.width+=n,i.height+=n):r===`sw`?(i.x+=n,i.width-=n,i.height-=n):r===`s`?i.height-=n:r===`se`&&(i.width-=n,i.height-=n):t===`ArrowDown`&&(r===`nw`?(i.x+=n,i.y+=n,i.width-=n,i.height-=n):r===`n`?(i.y+=n,i.height-=n):r===`ne`?(i.y+=n,i.width-=n,i.height-=n):r===`sw`?(i.x-=n,i.width+=n,i.height+=n):r===`s`?i.height+=n:r===`se`&&(i.width+=n,i.height+=n)),i}var $7={capture:!0,passive:!1},e9=class e extends z.PureComponent{constructor(){super(...arguments),this.docMoveBound=!1,this.mouseDownOnCrop=!1,this.dragStarted=!1,this.evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0},this.componentRef=(0,z.createRef)(),this.mediaRef=(0,z.createRef)(),this.initChangeCalled=!1,this.state={cropIsActive:!1,newCropIsBeingDrawn:!1},this.onCropPointerDown=e=>{let{crop:t,disabled:n}=this.props,r=this.getBox();if(!t)return;let i=Q7(t,r.width,r.height);if(n)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let a=e.target.dataset.ord,o=!!a,s=e.clientX,c=e.clientY,l=i.x,u=i.y;if(a){let t=e.clientX-r.x,n=e.clientY-r.y,o=0,d=0;a===`ne`||a==`e`?(o=t-(i.x+i.width),d=n-i.y,l=i.x,u=i.y+i.height):a===`se`||a===`s`?(o=t-(i.x+i.width),d=n-(i.y+i.height),l=i.x,u=i.y):a===`sw`||a==`w`?(o=t-i.x,d=n-(i.y+i.height),l=i.x+i.width,u=i.y):(a===`nw`||a==`n`)&&(o=t-i.x,d=n-i.y,l=i.x+i.width,u=i.y+i.height),s=l+r.x+o,c=u+r.y+d}this.evData={startClientX:s,startClientY:c,startCropX:l,startCropY:u,clientX:e.clientX,clientY:e.clientY,isResize:o,ord:a},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})},this.onComponentPointerDown=e=>{let{crop:t,disabled:n,locked:r,keepSelection:i,onChange:a}=this.props,o=this.getBox();if(n||r||i&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let s=e.clientX-o.x,c=e.clientY-o.y,l={unit:`px`,x:s,y:c,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:s,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,a(Q7(l,o.width,o.height),Z7(l,o.width,o.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})},this.onDocPointerMove=e=>{let{crop:t,disabled:n,onChange:r,onDragStart:i}=this.props,a=this.getBox();if(n||!t||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,i&&i(e));let{evData:o}=this;o.clientX=e.clientX,o.clientY=e.clientY;let s;s=o.isResize?this.resizeCrop():this.dragCrop(),RVr(t,s)||r(Q7(s,a.width,a.height),Z7(s,a.width,a.height))},this.onComponentKeyDown=t=>{let{crop:n,disabled:r,onChange:i,onComplete:a}=this.props;if(r)return;let o=t.key,s=!1;if(!n)return;let c=this.getBox(),l=this.makePixelCrop(c),u=(navigator.platform.match(`Mac`)?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if(o===`ArrowLeft`?(l.x-=u,s=!0):o===`ArrowRight`?(l.x+=u,s=!0):o===`ArrowUp`?(l.y-=u,s=!0):o===`ArrowDown`&&(l.y+=u,s=!0),s){t.cancelable&&t.preventDefault(),l.x=X7(l.x,0,c.width-l.width),l.y=X7(l.y,0,c.height-l.height);let e=Q7(l,c.width,c.height),n=Z7(l,c.width,c.height);i(e,n),a&&a(e,n)}},this.onHandlerKeyDown=(t,n)=>{let{aspect:r=0,crop:i,disabled:a,minWidth:o=0,minHeight:s=0,maxWidth:c,maxHeight:l,onChange:u,onComplete:d}=this.props,f=this.getBox();if(a||!i)return;if(t.key===`ArrowUp`||t.key===`ArrowDown`||t.key===`ArrowLeft`||t.key===`ArrowRight`)t.stopPropagation(),t.preventDefault();else return;let p=(navigator.platform.match(`Mac`)?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,m=VVr(HVr(Q7(i,f.width,f.height),t.key,p,n),r,n,f.width,f.height,o,s,c,l);if(!RVr(i,m)){let e=Z7(m,f.width,f.height);u(m,e),d&&d(m,e)}},this.onDocPointerDone=e=>{let{crop:t,disabled:n,onComplete:r,onDragEnd:i}=this.props,a=this.getBox();this.unbindDocMove(),!n&&t&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,i&&i(e),r&&r(Q7(t,a.width,a.height),Z7(t,a.width,a.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))},this.onDragFocus=e=>{var t;(t=this.componentRef.current)==null||t.scrollTo(0,0)}}get document(){return document}getBox(){let e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};let{x:t,y:n,width:r,height:i}=e.getBoundingClientRect();return{x:t,y:n,width:r,height:i}}componentDidUpdate(e){let{crop:t,onComplete:n}=this.props;if(n&&!e.crop&&t){let{width:e,height:r}=this.getBox();e&&r&&n(Q7(t,e,r),Z7(t,e,r))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect()}bindDocMove(){this.docMoveBound||=(this.document.addEventListener(`pointermove`,this.onDocPointerMove,$7),this.document.addEventListener(`pointerup`,this.onDocPointerDone,$7),this.document.addEventListener(`pointercancel`,this.onDocPointerDone,$7),!0)}unbindDocMove(){this.docMoveBound&&=(this.document.removeEventListener(`pointermove`,this.onDocPointerMove,$7),this.document.removeEventListener(`pointerup`,this.onDocPointerDone,$7),this.document.removeEventListener(`pointercancel`,this.onDocPointerDone,$7),!1)}getCropStyle(){let{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){let{evData:e}=this,t=this.getBox(),n=this.makePixelCrop(t),r=e.clientX-e.startClientX,i=e.clientY-e.startClientY;return n.x=X7(e.startCropX+r,0,t.width-n.width),n.y=X7(e.startCropY+i,0,t.height-n.height),n}getPointRegion(e,t,n,r){let{evData:i}=this,a=i.clientX-e.x,o=i.clientY-e.y,s;s=r&&t?t===`nw`||t===`n`||t===`ne`:o<i.startCropY;let c;return c=n&&t?t===`nw`||t===`w`||t===`sw`:a<i.startCropX,c?s?`nw`:`sw`:s?`ne`:`se`}resolveMinDimensions(e,t,n=0,r=0){let i=Math.min(n,e.width),a=Math.min(r,e.height);return!t||!i&&!a?[i,a]:t>1?i?[i,i/t]:[a*t,a]:a?[a*t,a]:[i,i/t]}resizeCrop(){let{evData:t}=this,{aspect:n=0,maxWidth:r,maxHeight:i}=this.props,a=this.getBox(),[o,s]=this.resolveMinDimensions(a,n,this.props.minWidth,this.props.minHeight),c=this.makePixelCrop(a),l=this.getPointRegion(a,t.ord,o,s),u=t.ord||l,d=t.clientX-t.startClientX,f=t.clientY-t.startClientY;(o&&u===`nw`||u===`w`||u===`sw`)&&(d=Math.min(d,-o)),(s&&u===`nw`||u===`n`||u===`ne`)&&(f=Math.min(f,-s));let p={unit:`px`,x:0,y:0,width:0,height:0};l===`ne`?(p.x=t.startCropX,p.width=d,n?(p.height=p.width/n,p.y=t.startCropY-p.height):(p.height=Math.abs(f),p.y=t.startCropY-p.height)):l===`se`?(p.x=t.startCropX,p.y=t.startCropY,p.width=d,p.height=n?p.width/n:f):l===`sw`?(p.x=t.startCropX+d,p.y=t.startCropY,p.width=Math.abs(d),p.height=n?p.width/n:f):l===`nw`&&(p.x=t.startCropX+d,p.width=Math.abs(d),n?(p.height=p.width/n,p.y=t.startCropY-p.height):(p.height=Math.abs(f),p.y=t.startCropY+f));let m=VVr(p,n,l,a.width,a.height,o,s,r,i);return n||e.xyOrds.indexOf(u)>-1?c=m:e.xOrds.indexOf(u)>-1?(c.x=m.x,c.width=m.width):e.yOrds.indexOf(u)>-1&&(c.y=m.y,c.height=m.height),c.x=X7(c.x,0,a.width-c.width),c.y=X7(c.y,0,a.height-c.height),c}createCropSelection(){let{ariaLabels:t=e.defaultProps.ariaLabels,disabled:n,locked:r,renderSelectionAddon:i,ruleOfThirds:a,crop:o}=this.props,s=this.getCropStyle();if(o)return z.createElement(`div`,{style:s,className:`ReactCrop__crop-selection`,onPointerDown:this.onCropPointerDown,"aria-label":t.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:`group`},!n&&!r&&z.createElement(`div`,{className:`ReactCrop__drag-elements`,onFocus:this.onDragFocus},z.createElement(`div`,{className:`ReactCrop__drag-bar ord-n`,"data-ord":`n`}),z.createElement(`div`,{className:`ReactCrop__drag-bar ord-e`,"data-ord":`e`}),z.createElement(`div`,{className:`ReactCrop__drag-bar ord-s`,"data-ord":`s`}),z.createElement(`div`,{className:`ReactCrop__drag-bar ord-w`,"data-ord":`w`}),z.createElement(`div`,{className:`ReactCrop__drag-handle ord-nw`,"data-ord":`nw`,tabIndex:0,"aria-label":t.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`nw`),role:`button`}),z.createElement(`div`,{className:`ReactCrop__drag-handle ord-n`,"data-ord":`n`,tabIndex:0,"aria-label":t.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`n`),role:`button`}),z.createElement(`div`,{className:`ReactCrop__drag-handle ord-ne`,"data-ord":`ne`,tabIndex:0,"aria-label":t.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`ne`),role:`button`}),z.createElement(`div`,{className:`ReactCrop__drag-handle ord-e`,"data-ord":`e`,tabIndex:0,"aria-label":t.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`e`),role:`button`}),z.createElement(`div`,{className:`ReactCrop__drag-handle ord-se`,"data-ord":`se`,tabIndex:0,"aria-label":t.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`se`),role:`button`}),z.createElement(`div`,{className:`ReactCrop__drag-handle ord-s`,"data-ord":`s`,tabIndex:0,"aria-label":t.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`s`),role:`button`}),z.createElement(`div`,{className:`ReactCrop__drag-handle ord-sw`,"data-ord":`sw`,tabIndex:0,"aria-label":t.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`sw`),role:`button`}),z.createElement(`div`,{className:`ReactCrop__drag-handle ord-w`,"data-ord":`w`,tabIndex:0,"aria-label":t.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`w`),role:`button`})),i&&z.createElement(`div`,{className:`ReactCrop__selection-addon`,onMouseDown:e=>e.stopPropagation()},i(this.state)),a&&z.createElement(z.Fragment,null,z.createElement(`div`,{className:`ReactCrop__rule-of-thirds-hz`}),z.createElement(`div`,{className:`ReactCrop__rule-of-thirds-vt`})))}makePixelCrop(e){return Q7({...IVr,...this.props.crop||{}},e.width,e.height)}render(){let{aspect:e,children:t,circularCrop:n,className:r,crop:i,disabled:a,locked:o,style:s,ruleOfThirds:c}=this.props,{cropIsActive:l,newCropIsBeingDrawn:u}=this.state,d=i?this.createCropSelection():null,f=LVr(`ReactCrop`,r,l&&`ReactCrop--active`,a&&`ReactCrop--disabled`,o&&`ReactCrop--locked`,u&&`ReactCrop--new-crop`,i&&e&&`ReactCrop--fixed-aspect`,i&&n&&`ReactCrop--circular-crop`,i&&c&&`ReactCrop--rule-of-thirds`,!this.dragStarted&&i&&!i.width&&!i.height&&`ReactCrop--invisible-crop`,n&&`ReactCrop--no-animate`);return z.createElement(`div`,{ref:this.componentRef,className:f,style:s},z.createElement(`div`,{ref:this.mediaRef,className:`ReactCrop__child-wrapper`,onPointerDown:this.onComponentPointerDown},t),d)}};e9.xOrds=[`e`,`w`],e9.yOrds=[`n`,`s`],e9.xyOrds=[`nw`,`ne`,`se`,`sw`],e9.nudgeStep=1,e9.nudgeStepMedium=10,e9.nudgeStepLarge=100,e9.defaultProps={ariaLabels:{cropArea:`Use the arrow keys to move the crop selection area`,nwDragHandle:`Use the arrow keys to move the north west drag handle to change the crop selection area`,nDragHandle:`Use the up and down arrow keys to move the north drag handle to change the crop selection area`,neDragHandle:`Use the arrow keys to move the north east drag handle to change the crop selection area`,eDragHandle:`Use the up and down arrow keys to move the east drag handle to change the crop selection area`,seDragHandle:`Use the arrow keys to move the south east drag handle to change the crop selection area`,sDragHandle:`Use the up and down arrow keys to move the south drag handle to change the crop selection area`,swDragHandle:`Use the arrow keys to move the south west drag handle to change the crop selection area`,wDragHandle:`Use the up and down arrow keys to move the west drag handle to change the crop selection area`}};var UVr=e9,WVr=Math.PI/180;async function GVr(e,t,n,r=1,i=0){let a=t.getContext(`2d`);if(!a)throw Error(`No 2d context`);let o=e.naturalWidth/e.width,s=e.naturalHeight/e.height,c=window.devicePixelRatio;t.width=Math.floor(n.width*o*c),t.height=Math.floor(n.height*s*c),a.scale(c,c),a.imageSmoothingQuality=`high`;let l=n.x*o,u=n.y*s,d=i*WVr,f=e.naturalWidth/2,p=e.naturalHeight/2;a.save(),a.translate(-l,-u),a.translate(f,p),a.rotate(d),a.scale(r,r),a.translate(-f,-p),a.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),a.restore()}function KVr(e,t,n){(0,z.useEffect)(()=>{let r=setTimeout(()=>{e.apply(void 0,n)},t);return()=>{clearTimeout(r)}},[e,n,t])}function qVr(e,t,n){return BVr(zVr({unit:`%`,width:90},n,e,t),e,t)}function JVr(e){let[t,n]=(0,z.useState)(`IDLE`),r=(0,z.useRef)(null),i=(0,z.useRef)(null),a=(0,z.useRef)(``),[o]=VLr(),[s,c]=(0,z.useState)(),[l,u]=(0,z.useState)(1);function d(t){if(l){let{width:n,height:r}=t.currentTarget;e.setCrop(qVr(n,r,l))}}function f(){if(!r.current)throw Error(`Crop canvas does not exist`);r.current.toBlob(async t=>{if(!t)throw Error(`Failed to create blob`);try{n(`LOADING`);let r=Math.round(t.size/1024),{data:i}=await o({variables:{file:t,size:r}}),a=i.uploadProfileImage.photo.uri;e.handleCloseImageUploader(),console.log(`Uploaded photo URI:`,a)}catch(e){console.error(`Failed to upload profile image:`,e)}finally{a.current&&URL.revokeObjectURL(a.current)}})}let p=e=>{e.preventDefault(),f()};KVr(async()=>{s?.width&&s?.height&&i.current&&r.current&&GVr(i.current,r.current,s)},100,[s]);let m=t===`LOADING`;return(0,q.jsxs)(`form`,{onSubmit:p,className:`ImageUploader`,children:[e.imgSrc?(0,q.jsxs)(J7,{mb:`base`,children:[(0,q.jsx)(K9,{mb:`xs`,children:`Crop your new profile picture`}),(0,q.jsx)(UVr,{crop:e.crop,onChange:(t,n)=>e.setCrop(n),onComplete:e=>c(e),aspect:l,children:(0,q.jsx)(`img`,{ref:i,alt:`Crop me`,src:e.imgSrc,onLoad:d})})]}):null,s?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(J7,{display:`none`,children:(0,q.jsx)(`canvas`,{ref:r,style:{border:`1px solid black`,objectFit:`contain`,width:s.width,height:s.height}})}),(0,q.jsx)(J7,{justifyContent:`center`,display:`flex`,children:(0,q.jsx)(bC,{type:`submit`,surface:`solid`,disabled:!s||m,children:m?`Saving...`:`Set New Profile Image`})})]}):null]})}var YVr=U7(H7.div`
|
|
1427
|
+
`)};function LVr({fill:e,size:t,padding:n,theme:r,source:i,...a}){return(0,q.jsx)(J7,{backgroundColor:r?.colors?.primary??``,...a,children:(0,q.jsx)(IVr.Image,{src:i||`./icon.png`,alt:`Logo`,size:t,fill:e})})}LVr.propTypes={...Od,fill:Zy.default.string,size:Zy.default.number,source:Zy.default.string};var RVr=U7(LVr),zVr={x:0,y:0,width:0,height:0,unit:`px`},X7=(e,t,n)=>Math.min(Math.max(e,t),n),BVr=(...e)=>e.filter(e=>e&&typeof e==`string`).join(` `),VVr=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function HVr(e,t,n,r){let i=Q7(e,n,r);return e.width&&(i.height=i.width/t),e.height&&(i.width=i.height*t),i.y+i.height>r&&(i.height=r-i.y,i.width=i.height*t),i.x+i.width>n&&(i.width=n-i.x,i.height=i.width/t),e.unit===`%`?Z7(i,n,r):i}function UVr(e,t,n){let r=Q7(e,t,n);return r.x=(t-r.width)/2,r.y=(n-r.height)/2,e.unit===`%`?Z7(r,t,n):r}function Z7(e,t,n){return e.unit===`%`?{...zVr,...e,unit:`%`}:{unit:`%`,x:e.x?e.x/t*100:0,y:e.y?e.y/n*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/n*100:0}}function Q7(e,t,n){return e.unit?e.unit===`px`?{...zVr,...e,unit:`px`}:{unit:`px`,x:e.x?e.x*t/100:0,y:e.y?e.y*n/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*n/100:0}:{...zVr,...e,unit:`px`}}function WVr(e,t,n,r,i,a=0,o=0,s=r,c=i){let l={...e},u=Math.min(a,r),d=Math.min(o,i),f=Math.min(s,r),p=Math.min(c,i);t&&(t>1?(u=o?o*t:u,d=u/t,f=s*t):(d=a?a/t:d,u=d*t,p=c/t)),l.y<0&&(l.height=Math.max(l.height+l.y,d),l.y=0),l.x<0&&(l.width=Math.max(l.width+l.x,u),l.x=0);let m=r-(l.x+l.width);m<0&&(l.x=Math.min(l.x,r-u),l.width+=m);let h=i-(l.y+l.height);if(h<0&&(l.y=Math.min(l.y,i-d),l.height+=h),l.width<u&&((n===`sw`||n==`nw`)&&(l.x-=u-l.width),l.width=u),l.height<d&&((n===`nw`||n==`ne`)&&(l.y-=d-l.height),l.height=d),l.width>f&&((n===`sw`||n==`nw`)&&(l.x-=f-l.width),l.width=f),l.height>p&&((n===`nw`||n==`ne`)&&(l.y-=p-l.height),l.height=p),t){let e=l.width/l.height;if(e<t){let e=Math.max(l.width/t,d);(n===`nw`||n==`ne`)&&(l.y-=e-l.height),l.height=e}else if(e>t){let e=Math.max(l.height*t,u);(n===`sw`||n==`nw`)&&(l.x-=e-l.width),l.width=e}}return l}function GVr(e,t,n,r){let i={...e};return t===`ArrowLeft`?r===`nw`?(i.x-=n,i.y-=n,i.width+=n,i.height+=n):r===`w`?(i.x-=n,i.width+=n):r===`sw`?(i.x-=n,i.width+=n,i.height+=n):r===`ne`?(i.y+=n,i.width-=n,i.height-=n):r===`e`?i.width-=n:r===`se`&&(i.width-=n,i.height-=n):t===`ArrowRight`&&(r===`nw`?(i.x+=n,i.y+=n,i.width-=n,i.height-=n):r===`w`?(i.x+=n,i.width-=n):r===`sw`?(i.x+=n,i.width-=n,i.height-=n):r===`ne`?(i.y-=n,i.width+=n,i.height+=n):r===`e`?i.width+=n:r===`se`&&(i.width+=n,i.height+=n)),t===`ArrowUp`?r===`nw`?(i.x-=n,i.y-=n,i.width+=n,i.height+=n):r===`n`?(i.y-=n,i.height+=n):r===`ne`?(i.y-=n,i.width+=n,i.height+=n):r===`sw`?(i.x+=n,i.width-=n,i.height-=n):r===`s`?i.height-=n:r===`se`&&(i.width-=n,i.height-=n):t===`ArrowDown`&&(r===`nw`?(i.x+=n,i.y+=n,i.width-=n,i.height-=n):r===`n`?(i.y+=n,i.height-=n):r===`ne`?(i.y+=n,i.width-=n,i.height-=n):r===`sw`?(i.x-=n,i.width+=n,i.height+=n):r===`s`?i.height+=n:r===`se`&&(i.width+=n,i.height+=n)),i}var $7={capture:!0,passive:!1},e9=class e extends z.PureComponent{constructor(){super(...arguments),this.docMoveBound=!1,this.mouseDownOnCrop=!1,this.dragStarted=!1,this.evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0},this.componentRef=(0,z.createRef)(),this.mediaRef=(0,z.createRef)(),this.initChangeCalled=!1,this.state={cropIsActive:!1,newCropIsBeingDrawn:!1},this.onCropPointerDown=e=>{let{crop:t,disabled:n}=this.props,r=this.getBox();if(!t)return;let i=Q7(t,r.width,r.height);if(n)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let a=e.target.dataset.ord,o=!!a,s=e.clientX,c=e.clientY,l=i.x,u=i.y;if(a){let t=e.clientX-r.x,n=e.clientY-r.y,o=0,d=0;a===`ne`||a==`e`?(o=t-(i.x+i.width),d=n-i.y,l=i.x,u=i.y+i.height):a===`se`||a===`s`?(o=t-(i.x+i.width),d=n-(i.y+i.height),l=i.x,u=i.y):a===`sw`||a==`w`?(o=t-i.x,d=n-(i.y+i.height),l=i.x+i.width,u=i.y):(a===`nw`||a==`n`)&&(o=t-i.x,d=n-i.y,l=i.x+i.width,u=i.y+i.height),s=l+r.x+o,c=u+r.y+d}this.evData={startClientX:s,startClientY:c,startCropX:l,startCropY:u,clientX:e.clientX,clientY:e.clientY,isResize:o,ord:a},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})},this.onComponentPointerDown=e=>{let{crop:t,disabled:n,locked:r,keepSelection:i,onChange:a}=this.props,o=this.getBox();if(n||r||i&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let s=e.clientX-o.x,c=e.clientY-o.y,l={unit:`px`,x:s,y:c,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:s,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,a(Q7(l,o.width,o.height),Z7(l,o.width,o.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})},this.onDocPointerMove=e=>{let{crop:t,disabled:n,onChange:r,onDragStart:i}=this.props,a=this.getBox();if(n||!t||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,i&&i(e));let{evData:o}=this;o.clientX=e.clientX,o.clientY=e.clientY;let s;s=o.isResize?this.resizeCrop():this.dragCrop(),VVr(t,s)||r(Q7(s,a.width,a.height),Z7(s,a.width,a.height))},this.onComponentKeyDown=t=>{let{crop:n,disabled:r,onChange:i,onComplete:a}=this.props;if(r)return;let o=t.key,s=!1;if(!n)return;let c=this.getBox(),l=this.makePixelCrop(c),u=(navigator.platform.match(`Mac`)?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if(o===`ArrowLeft`?(l.x-=u,s=!0):o===`ArrowRight`?(l.x+=u,s=!0):o===`ArrowUp`?(l.y-=u,s=!0):o===`ArrowDown`&&(l.y+=u,s=!0),s){t.cancelable&&t.preventDefault(),l.x=X7(l.x,0,c.width-l.width),l.y=X7(l.y,0,c.height-l.height);let e=Q7(l,c.width,c.height),n=Z7(l,c.width,c.height);i(e,n),a&&a(e,n)}},this.onHandlerKeyDown=(t,n)=>{let{aspect:r=0,crop:i,disabled:a,minWidth:o=0,minHeight:s=0,maxWidth:c,maxHeight:l,onChange:u,onComplete:d}=this.props,f=this.getBox();if(a||!i)return;if(t.key===`ArrowUp`||t.key===`ArrowDown`||t.key===`ArrowLeft`||t.key===`ArrowRight`)t.stopPropagation(),t.preventDefault();else return;let p=(navigator.platform.match(`Mac`)?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,m=WVr(GVr(Q7(i,f.width,f.height),t.key,p,n),r,n,f.width,f.height,o,s,c,l);if(!VVr(i,m)){let e=Z7(m,f.width,f.height);u(m,e),d&&d(m,e)}},this.onDocPointerDone=e=>{let{crop:t,disabled:n,onComplete:r,onDragEnd:i}=this.props,a=this.getBox();this.unbindDocMove(),!n&&t&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,i&&i(e),r&&r(Q7(t,a.width,a.height),Z7(t,a.width,a.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))},this.onDragFocus=e=>{var t;(t=this.componentRef.current)==null||t.scrollTo(0,0)}}get document(){return document}getBox(){let e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};let{x:t,y:n,width:r,height:i}=e.getBoundingClientRect();return{x:t,y:n,width:r,height:i}}componentDidUpdate(e){let{crop:t,onComplete:n}=this.props;if(n&&!e.crop&&t){let{width:e,height:r}=this.getBox();e&&r&&n(Q7(t,e,r),Z7(t,e,r))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect()}bindDocMove(){this.docMoveBound||=(this.document.addEventListener(`pointermove`,this.onDocPointerMove,$7),this.document.addEventListener(`pointerup`,this.onDocPointerDone,$7),this.document.addEventListener(`pointercancel`,this.onDocPointerDone,$7),!0)}unbindDocMove(){this.docMoveBound&&=(this.document.removeEventListener(`pointermove`,this.onDocPointerMove,$7),this.document.removeEventListener(`pointerup`,this.onDocPointerDone,$7),this.document.removeEventListener(`pointercancel`,this.onDocPointerDone,$7),!1)}getCropStyle(){let{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){let{evData:e}=this,t=this.getBox(),n=this.makePixelCrop(t),r=e.clientX-e.startClientX,i=e.clientY-e.startClientY;return n.x=X7(e.startCropX+r,0,t.width-n.width),n.y=X7(e.startCropY+i,0,t.height-n.height),n}getPointRegion(e,t,n,r){let{evData:i}=this,a=i.clientX-e.x,o=i.clientY-e.y,s;s=r&&t?t===`nw`||t===`n`||t===`ne`:o<i.startCropY;let c;return c=n&&t?t===`nw`||t===`w`||t===`sw`:a<i.startCropX,c?s?`nw`:`sw`:s?`ne`:`se`}resolveMinDimensions(e,t,n=0,r=0){let i=Math.min(n,e.width),a=Math.min(r,e.height);return!t||!i&&!a?[i,a]:t>1?i?[i,i/t]:[a*t,a]:a?[a*t,a]:[i,i/t]}resizeCrop(){let{evData:t}=this,{aspect:n=0,maxWidth:r,maxHeight:i}=this.props,a=this.getBox(),[o,s]=this.resolveMinDimensions(a,n,this.props.minWidth,this.props.minHeight),c=this.makePixelCrop(a),l=this.getPointRegion(a,t.ord,o,s),u=t.ord||l,d=t.clientX-t.startClientX,f=t.clientY-t.startClientY;(o&&u===`nw`||u===`w`||u===`sw`)&&(d=Math.min(d,-o)),(s&&u===`nw`||u===`n`||u===`ne`)&&(f=Math.min(f,-s));let p={unit:`px`,x:0,y:0,width:0,height:0};l===`ne`?(p.x=t.startCropX,p.width=d,n?(p.height=p.width/n,p.y=t.startCropY-p.height):(p.height=Math.abs(f),p.y=t.startCropY-p.height)):l===`se`?(p.x=t.startCropX,p.y=t.startCropY,p.width=d,p.height=n?p.width/n:f):l===`sw`?(p.x=t.startCropX+d,p.y=t.startCropY,p.width=Math.abs(d),p.height=n?p.width/n:f):l===`nw`&&(p.x=t.startCropX+d,p.width=Math.abs(d),n?(p.height=p.width/n,p.y=t.startCropY-p.height):(p.height=Math.abs(f),p.y=t.startCropY+f));let m=WVr(p,n,l,a.width,a.height,o,s,r,i);return n||e.xyOrds.indexOf(u)>-1?c=m:e.xOrds.indexOf(u)>-1?(c.x=m.x,c.width=m.width):e.yOrds.indexOf(u)>-1&&(c.y=m.y,c.height=m.height),c.x=X7(c.x,0,a.width-c.width),c.y=X7(c.y,0,a.height-c.height),c}createCropSelection(){let{ariaLabels:t=e.defaultProps.ariaLabels,disabled:n,locked:r,renderSelectionAddon:i,ruleOfThirds:a,crop:o}=this.props,s=this.getCropStyle();if(o)return z.createElement(`div`,{style:s,className:`ReactCrop__crop-selection`,onPointerDown:this.onCropPointerDown,"aria-label":t.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:`group`},!n&&!r&&z.createElement(`div`,{className:`ReactCrop__drag-elements`,onFocus:this.onDragFocus},z.createElement(`div`,{className:`ReactCrop__drag-bar ord-n`,"data-ord":`n`}),z.createElement(`div`,{className:`ReactCrop__drag-bar ord-e`,"data-ord":`e`}),z.createElement(`div`,{className:`ReactCrop__drag-bar ord-s`,"data-ord":`s`}),z.createElement(`div`,{className:`ReactCrop__drag-bar ord-w`,"data-ord":`w`}),z.createElement(`div`,{className:`ReactCrop__drag-handle ord-nw`,"data-ord":`nw`,tabIndex:0,"aria-label":t.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`nw`),role:`button`}),z.createElement(`div`,{className:`ReactCrop__drag-handle ord-n`,"data-ord":`n`,tabIndex:0,"aria-label":t.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`n`),role:`button`}),z.createElement(`div`,{className:`ReactCrop__drag-handle ord-ne`,"data-ord":`ne`,tabIndex:0,"aria-label":t.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`ne`),role:`button`}),z.createElement(`div`,{className:`ReactCrop__drag-handle ord-e`,"data-ord":`e`,tabIndex:0,"aria-label":t.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`e`),role:`button`}),z.createElement(`div`,{className:`ReactCrop__drag-handle ord-se`,"data-ord":`se`,tabIndex:0,"aria-label":t.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`se`),role:`button`}),z.createElement(`div`,{className:`ReactCrop__drag-handle ord-s`,"data-ord":`s`,tabIndex:0,"aria-label":t.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`s`),role:`button`}),z.createElement(`div`,{className:`ReactCrop__drag-handle ord-sw`,"data-ord":`sw`,tabIndex:0,"aria-label":t.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`sw`),role:`button`}),z.createElement(`div`,{className:`ReactCrop__drag-handle ord-w`,"data-ord":`w`,tabIndex:0,"aria-label":t.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,`w`),role:`button`})),i&&z.createElement(`div`,{className:`ReactCrop__selection-addon`,onMouseDown:e=>e.stopPropagation()},i(this.state)),a&&z.createElement(z.Fragment,null,z.createElement(`div`,{className:`ReactCrop__rule-of-thirds-hz`}),z.createElement(`div`,{className:`ReactCrop__rule-of-thirds-vt`})))}makePixelCrop(e){return Q7({...zVr,...this.props.crop||{}},e.width,e.height)}render(){let{aspect:e,children:t,circularCrop:n,className:r,crop:i,disabled:a,locked:o,style:s,ruleOfThirds:c}=this.props,{cropIsActive:l,newCropIsBeingDrawn:u}=this.state,d=i?this.createCropSelection():null,f=BVr(`ReactCrop`,r,l&&`ReactCrop--active`,a&&`ReactCrop--disabled`,o&&`ReactCrop--locked`,u&&`ReactCrop--new-crop`,i&&e&&`ReactCrop--fixed-aspect`,i&&n&&`ReactCrop--circular-crop`,i&&c&&`ReactCrop--rule-of-thirds`,!this.dragStarted&&i&&!i.width&&!i.height&&`ReactCrop--invisible-crop`,n&&`ReactCrop--no-animate`);return z.createElement(`div`,{ref:this.componentRef,className:f,style:s},z.createElement(`div`,{ref:this.mediaRef,className:`ReactCrop__child-wrapper`,onPointerDown:this.onComponentPointerDown},t),d)}};e9.xOrds=[`e`,`w`],e9.yOrds=[`n`,`s`],e9.xyOrds=[`nw`,`ne`,`se`,`sw`],e9.nudgeStep=1,e9.nudgeStepMedium=10,e9.nudgeStepLarge=100,e9.defaultProps={ariaLabels:{cropArea:`Use the arrow keys to move the crop selection area`,nwDragHandle:`Use the arrow keys to move the north west drag handle to change the crop selection area`,nDragHandle:`Use the up and down arrow keys to move the north drag handle to change the crop selection area`,neDragHandle:`Use the arrow keys to move the north east drag handle to change the crop selection area`,eDragHandle:`Use the up and down arrow keys to move the east drag handle to change the crop selection area`,seDragHandle:`Use the arrow keys to move the south east drag handle to change the crop selection area`,sDragHandle:`Use the up and down arrow keys to move the south drag handle to change the crop selection area`,swDragHandle:`Use the arrow keys to move the south west drag handle to change the crop selection area`,wDragHandle:`Use the up and down arrow keys to move the west drag handle to change the crop selection area`}};var KVr=e9,qVr=Math.PI/180;async function JVr(e,t,n,r=1,i=0){let a=t.getContext(`2d`);if(!a)throw Error(`No 2d context`);let o=e.naturalWidth/e.width,s=e.naturalHeight/e.height,c=window.devicePixelRatio;t.width=Math.floor(n.width*o*c),t.height=Math.floor(n.height*s*c),a.scale(c,c),a.imageSmoothingQuality=`high`;let l=n.x*o,u=n.y*s,d=i*qVr,f=e.naturalWidth/2,p=e.naturalHeight/2;a.save(),a.translate(-l,-u),a.translate(f,p),a.rotate(d),a.scale(r,r),a.translate(-f,-p),a.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),a.restore()}function YVr(e,t,n){(0,z.useEffect)(()=>{let r=setTimeout(()=>{e.apply(void 0,n)},t);return()=>{clearTimeout(r)}},[e,n,t])}function XVr(e,t,n){return UVr(HVr({unit:`%`,width:90},n,e,t),e,t)}function ZVr(e){let[t,n]=(0,z.useState)(`IDLE`),r=(0,z.useRef)(null),i=(0,z.useRef)(null),a=(0,z.useRef)(``),[o]=WLr(),[s,c]=(0,z.useState)(),[l,u]=(0,z.useState)(1);function d(t){if(l){let{width:n,height:r}=t.currentTarget;e.setCrop(XVr(n,r,l))}}function f(){if(!r.current)throw Error(`Crop canvas does not exist`);r.current.toBlob(async t=>{if(!t)throw Error(`Failed to create blob`);try{n(`LOADING`);let r=Math.round(t.size/1024),{data:i}=await o({variables:{file:t,size:r}}),a=i.uploadProfileImage.photo.uri;e.handleCloseImageUploader(),console.log(`Uploaded photo URI:`,a)}catch(e){console.error(`Failed to upload profile image:`,e)}finally{a.current&&URL.revokeObjectURL(a.current)}})}let p=e=>{e.preventDefault(),f()};YVr(async()=>{s?.width&&s?.height&&i.current&&r.current&&JVr(i.current,r.current,s)},100,[s]);let m=t===`LOADING`;return(0,q.jsxs)(`form`,{onSubmit:p,className:`ImageUploader`,children:[e.imgSrc?(0,q.jsxs)(J7,{mb:`base`,children:[(0,q.jsx)(K9,{mb:`xs`,children:`Crop your new profile picture`}),(0,q.jsx)(KVr,{crop:e.crop,onChange:(t,n)=>e.setCrop(n),onComplete:e=>c(e),aspect:l,children:(0,q.jsx)(`img`,{ref:i,alt:`Crop me`,src:e.imgSrc,onLoad:d})})]}):null,s?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(J7,{display:`none`,children:(0,q.jsx)(`canvas`,{ref:r,style:{border:`1px solid black`,objectFit:`contain`,width:s.width,height:s.height}})}),(0,q.jsx)(J7,{justifyContent:`center`,display:`flex`,children:(0,q.jsx)(bC,{type:`submit`,surface:`solid`,disabled:!s||m,children:m?`Saving...`:`Set New Profile Image`})})]}):null]})}var QVr=U7(H7.div`
|
|
1428
1428
|
align-items: center;
|
|
1429
1429
|
display: flex;
|
|
1430
1430
|
justify-content: center;
|
|
@@ -1442,13 +1442,13 @@ See https://s-c.sh/2BAXzed for more info.`),window[`__styled-components-init__`]
|
|
|
1442
1442
|
}
|
|
1443
1443
|
|
|
1444
1444
|
${Dd};
|
|
1445
|
-
`)
|
|
1445
|
+
`),$Vr=U7(H7(EC)`
|
|
1446
1446
|
height: 100%;
|
|
1447
1447
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
1448
1448
|
padding: ${q7(`space.xs`)};
|
|
1449
1449
|
box-sizing: border-box;
|
|
1450
1450
|
${Dd};
|
|
1451
|
-
`),
|
|
1451
|
+
`),eHr={Profile:QVr,CloseIcon:U7(H7.div`
|
|
1452
1452
|
align-items: center;
|
|
1453
1453
|
border-radius: 50%;
|
|
1454
1454
|
display: flex;
|
|
@@ -1491,29 +1491,29 @@ See https://s-c.sh/2BAXzed for more info.`),window[`__styled-components-init__`]
|
|
|
1491
1491
|
justify-content: center;
|
|
1492
1492
|
align-items: center;
|
|
1493
1493
|
gap: ${q7(`space.s`)};
|
|
1494
|
-
`),ProfileCard
|
|
1495
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1496
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1497
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1498
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1494
|
+
`),ProfileCard:$Vr};function tHr({setShowDetails:e,...t}){let[n,r]=(0,z.useState)(`IDLE`),[i,a]=(0,z.useState)(null),{currentUser:o}=O7(),[s]=HLr();(0,z.useEffect)(()=>{r(`IDLE`),a(null)},[o]);let c=e=>{r(`ERROR`),a(e)},{values:l,handleSubmit:u,setFieldValue:d}=PLr(async()=>{r(`LOADING`);let t=Object.keys(l).map(e=>({field:$Lr(e),value:l[e]}));try{await s({variables:{input:t}}),e(!1),r(`SUCCESS`)}catch(e){c(e),console.log(JSON.stringify(e))}}),f=n===`LOADING`;return(0,q.jsx)(J7,{id:`profileDetails`,children:(0,q.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),u()},children:(0,q.jsxs)(J7,{mb:`l`,display:`flex`,flexDirection:`column`,children:[(0,q.jsx)(J7,{mb:`base`,children:(0,q.jsx)(RC,{id:`firstName`,placeholder:`First Name`,value:l.firstName||o?.profile?.firstName||``,onChange:e=>{d(`firstName`,e.target.value)},required:!0,error:i?.identity})}),(0,q.jsx)(J7,{mb:`xl`,children:(0,q.jsx)(RC,{id:`lastName`,placeholder:`Last Name`,value:l.lastName||o?.profile?.lastName||``,onChange:e=>{d(`lastName`,e.target.value)},required:!0,error:i?.identity})}),(0,q.jsx)(bC,{type:`submit`,surface:`solid`,disabled:!o||!(l.firstName||l.lastName)||f,children:f?`Saving`:`Save`})]})})})}tHr.propTypes={currentPerson:Zy.default.oneOfType([Zy.default.array,Zy.default.object])},wwe(),OOe(),jHe(),qC();var nHr=({theme:e,handleCloseProfile:t,size:n,...r})=>{let{currentUser:i}=O7(),{currentChurch:a}=kLr(),[o,s]=ob(),[c,l]=(0,z.useState)(!1),[u,d]=(0,z.useState)(!1),[f,p]=(0,z.useState)(``),[m,h]=(0,z.useState)(),[g,_]=(0,z.useState)(!1),[v,y]=(0,z.useState)(!1),b=(0,z.useRef)(null);(0,z.useEffect)(()=>{y(!0)},[]),(0,z.useEffect)(()=>{if(!c){let e=e=>{b.current&&!b.current.contains(e.target)&&(e.stopPropagation(),t())};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}}});let x=()=>{l(!1),s(ab())};function S(e){if(e.target.files&&e.target.files.length>0){h(void 0),_(!0);let t=new FileReader;t.addEventListener(`load`,()=>p(t.result?.toString()||``)),t.readAsDataURL(e.target.files[0])}}let C=()=>{_(!1),h(void 0),p(``)},{colors:w}=JSON.parse(a?.theme)||{};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(eHr.Profile,{ref:b,...n?{right:`-15px;`}:{},style:{opacity:+!!v,transform:v?`translateY(0)`:`translateY(-10px)`,transition:`opacity 0.3s ease, transform 0.3s ease`},children:(0,q.jsxs)(eHr.ProfileCard,{className:`rounded-none sm:rounded-xxl`,width:{_:`100%`,sm:`350px`,md:`520px`},children:[(0,q.jsx)(J7,{display:`flex`,alignItems:`center`,justifyContent:`end`,children:(0,q.jsx)(bC,{title:`Close`,circular:!0,surface:`tinted`,onClick:t,children:(0,q.jsx)(KC,{size:18,weight:`bold`})})}),(0,q.jsxs)(J7,{className:`flex items-center flex-col gap-1 pb-11`,children:[f&&g?(0,q.jsx)(ZVr,{crop:m,setCrop:h,imgSrc:f,handleCloseImageUploader:C}):null,f?null:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(J7,{position:`relative`,children:[i?.profile?.photo?.uri?(0,q.jsx)(SC,{src:i?.profile?.photo?.uri,alt:`avatar`,className:`size-[72px]`}):(0,q.jsx)(J7,{color:`base.primary`,position:`relative`,children:(0,q.jsx)(ihr,{size:90,weight:`fill`,color:q7(`colors.base.primary`)({theme:e})})}),i?(0,q.jsx)(J7,{children:f?null:(0,q.jsxs)(eHr.UploadIcon,{children:[(0,q.jsx)(Y9e,{size:12,weight:`fill`,color:q7(`colors.base.white`)({theme:e})}),(0,q.jsx)(`input`,{type:`file`,accept:`image/*`,onChange:S})]})}):null]}),i?.profile?.firstName?(0,q.jsxs)(K9,{mt:`xxs`,children:[`Hey `,i?.profile?.firstName]}):null,!o.token&&!f?(0,q.jsxs)(bC,{title:`Sign up or Login`,surface:`tinted`,pill:!0,onClick:()=>l(!0),children:[`Sign up or Login`,(0,q.jsx)(qw,{size:24})]}):null]})]}),o.token&&!u&&!f?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(K9,{color:`text.secondary`,mb:`xs`,children:`My Profile`}),(0,q.jsx)(J7,{children:(0,q.jsx)(SVr,{onClick:()=>d(!0),leadingIcon:(0,q.jsx)(lmr,{size:18,weight:`fill`,color:q7(`colors.text.secondary`)({theme:e})}),title:`Personal Details`})}),(0,q.jsx)(J7,{mt:`s`,mb:`base`,children:(0,q.jsx)(SVr,{leadingIcon:(0,q.jsx)(AHe,{size:18,weight:`fill`,color:q7(`colors.text.secondary`)({theme:e})}),onClick:x,title:`Logout`})})]}):null,u&&!f?(0,q.jsx)(tHr,{setShowDetails:d}):null,!u&&!f&&(a?.mobileAppStoreUrl||a?.mobilePlayStoreUrl)?(0,q.jsx)(q.Fragment,{children:(0,q.jsxs)(J7,{alignItems:`center`,display:`flex`,flexDirection:`column`,backgroundSize:`55%`,backgroundRepeat:`no-repeat`,backgroundPosition:`center 0`,backgroundImage:`linear-gradient(to top, white 0%, rgba(255, 255, 255, 0.85) 50%, rgba(255, 255, 255, 0) 100%), url('https://apollos-production-images.s3.us-east-1.amazonaws.com/hwwbvfvlv/image/upload/v1733759363/Apollos%2520Admin/New%20Embeds%20Assets/iphone-frame_yydnl6.png')`,className:`mt-7`,children:[(0,q.jsxs)(J7,{backgroundColor:`base.primary`,className:`mb-4 mt-16 overflow-hidden flex justify-center items-center rounded-xl`,children:[` `,(0,q.jsx)(RVr,{source:a?.logo,...w?.iconBackground?{backgroundColor:w?.iconBackground}:{}})]}),(0,q.jsx)(K9,{mb:`xxs`,children:r.adTitle||`Stay Connected`}),(0,q.jsx)(kC,{fg:`primary`,className:`text-sm text-center max-w-64 mb-8`,children:r.adBody||`Explore your faith and build daily habits with our online community.`}),(0,q.jsxs)(eHr.AppLinks,{children:[a?.mobileAppStoreUrl?(0,q.jsx)(`a`,{href:a?.mobileAppStoreUrl,children:(0,q.jsxs)(bC,{pill:!0,surface:`system`,className:`!text-sm !px-2.5 !py-1 text-fg-secondary dark:text-fg-secondary-dark`,children:[`Get it on iOS`,(0,q.jsx)(uw,{weight:`fill`,size:`24`})]})}):null,a?.mobilePlayStoreUrl?(0,q.jsx)(`a`,{href:a?.mobilePlayStoreUrl,children:(0,q.jsxs)(bC,{pill:!0,surface:`system`,className:`!text-sm !px-2.5 !py-1 text-fg-secondary dark:text-fg-secondary-dark`,children:[`Get it on Android`,(0,q.jsx)(ENe,{weight:`fill`,size:`24`})]})}):null]})]})}):null]})}),c&&o.step!==Qy.Success?(0,q.jsx)(mVr,{onClose:()=>l(!1)}):null]})};nHr.propTypes={...Od};var rHr=U7(nHr);umr();var iHr=e=>{let[t,n]=(0,z.useState)(!1),{currentUser:r}=O7();return(0,q.jsxs)(J7,{position:`relative`,children:[(0,q.jsx)(J7,{onClick:()=>{n(!t)},cursor:`pointer`,children:r?.profile?.photo?.uri?(0,q.jsx)(SC,{src:r?.profile?.photo?.uri,className:`size-[30px]`,alt:`avatar`}):(0,q.jsx)(J7,{backgroundColor:`fill.system`,height:30,width:30,alignItems:`center`,justifyContent:`center`,display:`flex`,color:`text.secondary`,className:`rounded-full`,children:(0,q.jsx)(lmr,{size:16,weight:`bold`})})}),t?(0,q.jsx)(rHr,{handleCloseProfile:()=>n(!1),size:e.popupSize}):null]})};function aHr(e){return{current:e}}function oHr(e,t){var n=void 0;return function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];n&&clearTimeout(n),n=setTimeout(function(){return e.apply(void 0,i)},t)}}function sHr(e,t){return fHr(e)||dHr(e,t)||lHr(e,t)||cHr()}function cHr(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1495
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lHr(e,t){if(e){if(typeof e==`string`)return uHr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uHr(e,t)}}function uHr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function dHr(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function fHr(e){if(Array.isArray(e))return e}function pHr(e){"@babel/helpers - typeof";return pHr=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},pHr(e)}function mHr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Set;if(process.env.NODE_ENV===`production`||!e||pHr(e)!==`object`)return e;if(t.has(e))return`[Circular]`;var n=t.add(e);return Array.isArray(e)?e.map(function(e){return mHr(e,n)}):Object.fromEntries(Object.entries(e).map(function(e){var t=sHr(e,2),r=t[0],i=t[1];return[r,mHr(i,n)]}))}function t9(e){return e.reduce(function(e,t){return e.concat(t)},[])}var hHr=0;function gHr(){return`autocomplete-${hHr++}`}function _Hr(e,t){return t.reduce(function(e,t){return e&&e[t]},e)}function vHr(e){return e.collections.length===0?0:e.collections.reduce(function(e,t){return e+t.items.length},0)}function n9(e,t){if(process.env.NODE_ENV!==`production`&&!e)throw Error(`[Autocomplete] ${typeof t==`function`?t():t}`)}function yHr(e){return e!==Object(e)}function bHr(e,t){if(e===t)return!0;if(yHr(e)||yHr(t)||typeof e==`function`||typeof t==`function`)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!(i in t)||!bHr(e[i],t[i]))return!1}return!0}var xHr=function(){};function SHr(e){if(typeof window<`u`)return e({window})}var CHr=`1.17.6`,wHr=[{segment:`autocomplete-core`,version:CHr}],THr={current:{}};function EHr(e,t){if(process.env.NODE_ENV!==`production`&&!e){var n=t.trim();THr.current[n]||(THr.current[n]=!0,console.warn(`[Autocomplete] ${n}`))}}function DHr(e){var t=e.item,n=e.items,r=n===void 0?[]:n;return{index:t.__autocomplete_indexName,items:[t],positions:[1+r.findIndex(function(e){return e.objectID===t.objectID})],queryID:t.__autocomplete_queryID,algoliaSource:[`autocomplete`]}}function OHr(e,t){return NHr(e)||MHr(e,t)||AHr(e,t)||kHr()}function kHr(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1496
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AHr(e,t){if(e){if(typeof e==`string`)return jHr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jHr(e,t)}}function jHr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function MHr(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function NHr(e){if(Array.isArray(e))return e}function PHr(e){var t=OHr((e.version||``).split(`.`).map(Number),2),n=t[0],r=t[1];return n>=3||n===2&&r>=4||n===1&&r>=10}var FHr=[`items`],IHr=[`items`];function r9(e){"@babel/helpers - typeof";return r9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},r9(e)}function LHr(e){return VHr(e)||BHr(e)||zHr(e)||RHr()}function RHr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1497
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zHr(e,t){if(e){if(typeof e==`string`)return HHr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return HHr(e,t)}}function BHr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function VHr(e){if(Array.isArray(e))return HHr(e)}function HHr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function UHr(e,t){if(e==null)return{};var n=WHr(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WHr(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function GHr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?GHr(Object(n),!0).forEach(function(t){KHr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GHr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function KHr(e,t,n){return t=qHr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qHr(e){var t=JHr(e,`string`);return r9(t)===`symbol`?t:String(t)}function JHr(e,t){if(r9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(r9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function YHr(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,n=[],r=0;r<e.objectIDs.length;r+=t)n.push(i9(i9({},e),{},{objectIDs:e.objectIDs.slice(r,r+t)}));return n}function XHr(e){return e.map(function(e){var t=e.items,n=UHr(e,FHr);return i9(i9({},n),{},{objectIDs:t?.map(function(e){return e.objectID})||n.objectIDs})})}function ZHr(e){var t=PHr(e);function n(n,r,i){if(t&&i!==void 0){var a=i[0].__autocomplete_algoliaCredentials,o={"X-Algolia-Application-Id":a.appId,"X-Algolia-API-Key":a.apiKey};e.apply(void 0,[n].concat(LHr(r),[{headers:o}]))}else e.apply(void 0,[n].concat(LHr(r)))}return{init:function(t,n){e(`init`,{appId:t,apiKey:n})},setAuthenticatedUserToken:function(t){e(`setAuthenticatedUserToken`,t)},setUserToken:function(t){e(`setUserToken`,t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];t.length>0&&n(`clickedObjectIDsAfterSearch`,XHr(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];t.length>0&&n(`clickedObjectIDs`,XHr(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,[`clickedFilters`].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];t.length>0&&n(`convertedObjectIDsAfterSearch`,XHr(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];t.length>0&&n(`convertedObjectIDs`,XHr(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,[`convertedFilters`].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];t.length>0&&t.reduce(function(e,t){var n=t.items,r=UHr(t,IHr);return[].concat(LHr(e),LHr(YHr(i9(i9({},r),{},{objectIDs:n?.map(function(e){return e.objectID})||r.objectIDs})).map(function(e){return{items:n,payload:e}})))},[]).forEach(function(e){var t=e.items,r=e.payload;return n(`viewedObjectIDs`,[r],t)})},viewedFilters:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,[`viewedFilters`].concat(n))}}}function QHr(e){var t=e.items.reduce(function(e,t){return e[t.__autocomplete_indexName]=(e[t.__autocomplete_indexName]??[]).concat(t),e},{});return Object.keys(t).map(function(e){return{index:e,items:t[e],algoliaSource:[`autocomplete`]}})}function a9(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function o9(e){"@babel/helpers - typeof";return o9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},o9(e)}function s9(e){return nUr(e)||tUr(e)||eUr(e)||$Hr()}function $Hr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1498
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eUr(e,t){if(e){if(typeof e==`string`)return rUr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rUr(e,t)}}function tUr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function nUr(e){if(Array.isArray(e))return rUr(e)}function rUr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function iUr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?iUr(Object(n),!0).forEach(function(t){aUr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iUr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function aUr(e,t,n){return t=oUr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oUr(e){var t=sUr(e,`string`);return o9(t)===`symbol`?t:String(t)}function sUr(e,t){if(o9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(o9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var cUr=400,lUr=`2.15.0`,uUr=`https://cdn.jsdelivr.net/npm/search-insights@${lUr}/dist/search-insights.min.js`,dUr=oHr(function(e){var t=e.onItemsChange,n=e.items,r=e.insights,i=e.state;t({insights:r,insightsEvents:QHr({items:n}).map(function(e){return c9({eventName:`Items Viewed`},e)}),state:i})},cUr);function fUr(e){var t=mUr(e),n=t.insightsClient,r=t.insightsInitParams,i=t.onItemsChange,a=t.onSelect,o=t.onActive,s=t.__autocomplete_clickAnalytics,c=n;if(n||SHr(function(e){var t=e.window,n=t.AlgoliaAnalyticsObject||`aa`;typeof n==`string`&&(c=t[n]),c||(t.AlgoliaAnalyticsObject=n,t[n]||(t[n]=function(){t[n].queue||(t[n].queue=[]);for(var e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i];t[n].queue.push(r)}),t[n].version=lUr,c=t[n],hUr(t))}),!c)return{};r&&c(`init`,c9({partial:!0},r));var l=ZHr(c),u=aHr([]),d=oHr(function(e){var t=e.state;if(t.isOpen){var n=t.collections.reduce(function(e,t){return[].concat(s9(e),s9(t.items))},[]).filter(a9);bHr(u.current.map(function(e){return e.objectID}),n.map(function(e){return e.objectID}))||(u.current=n,n.length>0&&dUr({onItemsChange:i,items:n,insights:l,state:t}))}},0);return{name:`aa.algoliaInsightsPlugin`,subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive,i=!1;function u(e){t({algoliaInsightsPlugin:{__algoliaSearchParameters:c9(c9({},s?{clickAnalytics:!0}:{}),e?{userToken:gUr(e)}:{}),insights:l}})}c(`addAlgoliaAgent`,`insights-plugin`),u(),c(`onUserTokenChange`,function(e){i||u(e)}),c(`getUserToken`,null,function(e,t){i||u(t)}),c(`onAuthenticatedUserTokenChange`,function(e){e?(i=!0,u(e)):(i=!1,c(`getUserToken`,null,function(e,t){return u(t)}))}),c(`getAuthenticatedUserToken`,null,function(e,t){t&&(i=!0,u(t))}),n(function(e){var t=e.item,n=e.state,r=e.event,i=e.source;a9(t)&&a({state:n,event:r,insights:l,item:t,insightsEvents:[c9({eventName:`Item Selected`},DHr({item:t,items:i.getItems().filter(a9)}))]})}),r(function(e){var t=e.item,n=e.source,r=e.state,i=e.event;a9(t)&&o({state:r,event:i,insights:l,item:t,insightsEvents:[c9({eventName:`Item Active`},DHr({item:t,items:n.getItems().filter(a9)}))]})})},onStateChange:function(e){var t=e.state;d({state:t})},__autocomplete_pluginOptions:e}}function pUr(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;return[].concat(s9(t),[`autocomplete-internal`],s9((e=n.algoliaInsightsPlugin)!=null&&e.__automaticInsights?[`autocomplete-automatic`]:[]))}function mUr(e){return c9({onItemsChange:function(e){var t=e.insights,n=e.insightsEvents,r=e.state;t.viewedObjectIDs.apply(t,s9(n.map(function(e){return c9(c9({},e),{},{algoliaSource:pUr(e.algoliaSource,r.context)})})))},onSelect:function(e){var t=e.insights,n=e.insightsEvents,r=e.state;t.clickedObjectIDsAfterSearch.apply(t,s9(n.map(function(e){return c9(c9({},e),{},{algoliaSource:pUr(e.algoliaSource,r.context)})})))},onActive:xHr,__autocomplete_clickAnalytics:!0},e)}function hUr(e){var t=`[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete`;try{var n=e.document.createElement(`script`);n.async=!0,n.src=uUr,n.onerror=function(){console.error(t)},document.body.appendChild(n)}catch{console.error(t)}}function gUr(e){return typeof e==`number`?e.toString():e}function _Ur(e){process.env.NODE_ENV!==`production`&&EHr(!e.debug,"The `debug` option is meant for development debugging and should not be used in production.")}function vUr(e,t){var n=t;return{then:function(t,r){return vUr(e.then(bUr(t,n,e),bUr(r,n,e)),n)},catch:function(t){return vUr(e.catch(bUr(t,n,e)),n)},finally:function(t){return t&&n.onCancelList.push(t),vUr(e.finally(bUr(t&&function(){return n.onCancelList=[],t()},n,e)),n)},cancel:function(){n.isCanceled=!0;var e=n.onCancelList;n.onCancelList=[],e.forEach(function(e){e()})},isCanceled:function(){return n.isCanceled===!0}}}function yUr(e){return vUr(e,{isCanceled:!1,onCancelList:[]})}function bUr(e,t,n){return e?function(n){return t.isCanceled?n:e(n)}:n}function xUr(){var e=[];return{add:function(t){return e.push(t),t.finally(function(){e=e.filter(function(e){return e!==t})})},cancelAll:function(){e.forEach(function(e){return e.cancel()})},isEmpty:function(){return e.length===0}}}function SUr(){var e=-1,t=-1,n=void 0;return function(r){e++;var i=e;return Promise.resolve(r).then(function(e){return n&&i<t?n:(t=i,n=e,e)})}}function CUr(e,t,n,r){if(!n)return null;if(e<0&&(t===null||r!==null&&t===0))return n+e;var i=(t===null?-1:t)+e;return i<=-1||i>=n?r===null?null:0:i}function wUr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function TUr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?wUr(Object(n),!0).forEach(function(t){EUr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wUr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function EUr(e,t,n){return t=DUr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DUr(e){var t=OUr(e,`string`);return l9(t)===`symbol`?t:String(t)}function OUr(e,t){if(l9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(l9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function l9(e){"@babel/helpers - typeof";return l9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},l9(e)}function kUr(e,t){var n=[];return Promise.resolve(e(t)).then(function(e){return n9(Array.isArray(e),function(){return`The \`getSources\` function must return an array of sources but returned type ${JSON.stringify(l9(e))}:
|
|
1499
1499
|
|
|
1500
|
-
${JSON.stringify(
|
|
1501
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1502
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1500
|
+
${JSON.stringify(mHr(e),null,2)}`}),Promise.all(e.filter(function(e){return!!e}).map(function(e){if(n9(typeof e.sourceId==`string`,"A source must provide a `sourceId` string."),n.includes(e.sourceId))throw Error(`[Autocomplete] The \`sourceId\` ${JSON.stringify(e.sourceId)} is not unique.`);n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){var t=e.setIsOpen;t(!1)},onActive:xHr,onResolve:xHr};Object.keys(t).forEach(function(e){t[e].__default=!0});var r=TUr(TUr({},t),e);return Promise.resolve(r)}))})}function AUr(e){var t=e.collections.map(function(e){return e.items.length}).reduce(function(e,t,n){var r=(e[n-1]||0)+t;return e.push(r),e},[]).reduce(function(t,n){return n<=e.activeItemId?t+1:t},0);return e.collections[t]}function jUr(e){for(var t=e.state,n=e.collection,r=!1,i=0,a=0;r===!1;){var o=t.collections[i];if(o===n){r=!0;break}a+=o.items.length,i++}return t.activeItemId-a}function u9(e){var t=AUr(e);if(!t)return null;var n=t.items[jUr({state:e,collection:t})],r=t.source;return{item:n,itemInputValue:r.getItemInputValue({item:n,state:e}),itemUrl:r.getItemUrl({item:n,state:e}),source:r}}function d9(e,t,n){return[e,n?.sourceId,t].filter(Boolean).join(`-`).replace(/\s/g,``)}function MUr(e,t){return e===t||e.contains(t)}var NUr=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function PUr(e){return!!(e&&e.match(NUr))}function FUr(e){return{results:e,hits:e.map(function(e){return e.hits}).filter(Boolean),facetHits:e.map(function(e){return e.facetHits?.map(function(e){return{label:e.value,count:e.count,_highlightResult:{label:{value:e.highlighted}}}})}).filter(Boolean)}}function IUr(e){return e.nativeEvent||e}function f9(e){"@babel/helpers - typeof";return f9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},f9(e)}function LUr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function RUr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?LUr(Object(n),!0).forEach(function(t){zUr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LUr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zUr(e,t,n){return t=BUr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BUr(e){var t=VUr(e,`string`);return f9(t)===`symbol`?t:String(t)}function VUr(e,t){if(f9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(f9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function HUr(e,t,n){var r=t.initialState;return{getState:function(){return r},dispatch:function(i,a){var o=RUr({},r);r=e(r,{type:i,props:t,payload:a}),n({state:r,prevState:o})},pendingRequests:xUr()}}function p9(e){"@babel/helpers - typeof";return p9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},p9(e)}function UUr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WUr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?UUr(Object(n),!0).forEach(function(t){GUr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UUr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function GUr(e,t,n){return t=KUr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KUr(e){var t=qUr(e,`string`);return p9(t)===`symbol`?t:String(t)}function qUr(e,t){if(p9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(p9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function JUr(e){var t=e.store;return{setActiveItemId:function(e){t.dispatch(`setActiveItemId`,e)},setQuery:function(e){t.dispatch(`setQuery`,e)},setCollections:function(e){var n=0,r=e.map(function(e){return WUr(WUr({},e),{},{items:t9(e.items).map(function(e){return WUr(WUr({},e),{},{__autocomplete_id:n++})})})});t.dispatch(`setCollections`,r)},setIsOpen:function(e){t.dispatch(`setIsOpen`,e)},setStatus:function(e){t.dispatch(`setStatus`,e)},setContext:function(e){t.dispatch(`setContext`,e)}}}function m9(e){"@babel/helpers - typeof";return m9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},m9(e)}function YUr(e){return $Ur(e)||QUr(e)||ZUr(e)||XUr()}function XUr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1501
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZUr(e,t){if(e){if(typeof e==`string`)return eWr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eWr(e,t)}}function QUr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function $Ur(e){if(Array.isArray(e))return eWr(e)}function eWr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tWr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?tWr(Object(n),!0).forEach(function(t){nWr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tWr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nWr(e,t,n){return t=rWr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rWr(e){var t=iWr(e,`string`);return m9(t)===`symbol`?t:String(t)}function iWr(e,t){if(m9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(m9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function aWr(e,t){var n=typeof window<`u`?window:{},r=e.plugins||[];return h9(h9({debug:!1,openOnFocus:!1,enterKeyHint:void 0,ignoreCompositionEvents:!1,placeholder:``,autoFocus:!1,defaultActiveItemId:null,stallThreshold:300,insights:void 0,environment:n,shouldPanelOpen:function(e){var t=e.state;return vHr(t)>0},reshape:function(e){return e.sources}},e),{},{id:e.id??gHr(),plugins:r,initialState:h9({activeItemId:null,query:``,completion:null,collections:[],isOpen:!1,status:`idle`,context:{}},e.initialState),onStateChange:function(t){var n;(n=e.onStateChange)==null||n.call(e,t),r.forEach(function(e){return e.onStateChange?.call(e,t)})},onSubmit:function(t){var n;(n=e.onSubmit)==null||n.call(e,t),r.forEach(function(e){return e.onSubmit?.call(e,t)})},onReset:function(t){var n;(n=e.onReset)==null||n.call(e,t),r.forEach(function(e){return e.onReset?.call(e,t)})},getSources:function(n){return Promise.all([].concat(YUr(r.map(function(e){return e.getSources})),[e.getSources]).filter(Boolean).map(function(e){return kUr(e,n)})).then(function(e){return t9(e)}).then(function(e){return e.map(function(e){return h9(h9({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach(function(e){return e.onSelect?.call(e,n)})},onActive:function(n){e.onActive(n),t.forEach(function(e){return e.onActive?.call(e,n)})},onResolve:function(n){e.onResolve(n),t.forEach(function(e){return e.onResolve?.call(e,n)})}})})})},navigator:h9({navigate:function(e){var t=e.itemUrl;n.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl;n.open(t,`_blank`,`noopener`)?.focus()},navigateNewWindow:function(e){var t=e.itemUrl;n.open(t,`_blank`,`noopener`)}},e.navigator)})}function g9(e){"@babel/helpers - typeof";return g9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},g9(e)}function oWr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sWr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?oWr(Object(n),!0).forEach(function(t){cWr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oWr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cWr(e,t,n){return t=lWr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lWr(e){var t=uWr(e,`string`);return g9(t)===`symbol`?t:String(t)}function uWr(e,t){if(g9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(g9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function dWr(e){var t=e.collections,n=e.props,r=e.state,i=t.reduce(function(e,t){return sWr(sWr({},e),{},cWr({},t.source.sourceId,sWr(sWr({},t.source),{},{getItems:function(){return t9(t.items)}})))},{}),a=n.plugins.reduce(function(e,t){return t.reshape?t.reshape(e):e},{sourcesBySourceId:i,state:r}).sourcesBySourceId;return t9(n.reshape({sourcesBySourceId:a,sources:Object.values(a),state:r})).filter(Boolean).map(function(e){return{source:e,items:e.getItems()}})}function _9(e){"@babel/helpers - typeof";return _9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_9(e)}function fWr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function v9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?fWr(Object(n),!0).forEach(function(t){pWr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fWr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pWr(e,t,n){return t=mWr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mWr(e){var t=hWr(e,`string`);return _9(t)===`symbol`?t:String(t)}function hWr(e,t){if(_9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(_9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function gWr(e){return bWr(e)||yWr(e)||vWr(e)||_Wr()}function _Wr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1502
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vWr(e,t){if(e){if(typeof e==`string`)return xWr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xWr(e,t)}}function yWr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function bWr(e){if(Array.isArray(e))return xWr(e)}function xWr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function SWr(e){return!!e.execute}function CWr(e){return!!e?.execute}function wWr(e,t,n){if(CWr(e)){var r=e.requesterId===`algolia`?Object.assign.apply(Object,[{}].concat(gWr(Object.keys(n.context).map(function(e){return n.context[e]?.__algoliaSearchParameters})))):{};return v9(v9({},e),{},{requests:e.queries.map(function(n){return{query:e.requesterId===`algolia`?v9(v9({},n),{},{params:v9(v9({},r),n.params)}):n,sourceId:t,transformResponse:e.transformResponse}})})}return{items:e,sourceId:t}}function TWr(e){var t=e.reduce(function(e,t){if(!SWr(t))return e.push(t),e;var n=t.searchClient,r=t.execute,i=t.requesterId,a=t.requests,o=e.find(function(e){return SWr(t)&&SWr(e)&&e.searchClient===n&&!!i&&e.requesterId===i});if(o){var s;(s=o.items).push.apply(s,gWr(a))}else{var c={execute:r,requesterId:i,items:a,searchClient:n};e.push(c)}return e},[]).map(function(e){if(!SWr(e))return Promise.resolve(e);var t=e,n=t.execute,r=t.items,i=t.searchClient;return n({searchClient:i,requests:r})});return Promise.all(t).then(function(e){return t9(e)})}function EWr(e,t,n){return t.map(function(t){var r=e.filter(function(e){return e.sourceId===t.sourceId}),i=r.map(function(e){return e.items}),a=r[0].transformResponse,o=a?a(FUr(i)):i;return t.onResolve({source:t,results:i,items:o,state:n.getState()}),n9(Array.isArray(o),function(){return`The \`getItems\` function from source "${t.sourceId}" must return an array of items but returned type ${JSON.stringify(_9(o))}:
|
|
1503
1503
|
|
|
1504
|
-
${JSON.stringify(
|
|
1504
|
+
${JSON.stringify(mHr(o),null,2)}.
|
|
1505
1505
|
|
|
1506
1506
|
See: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems`}),n9(o.every(Boolean),`The \`getItems\` function from source "${t.sourceId}" must return an array of items but returned ${JSON.stringify(void 0)}.
|
|
1507
1507
|
|
|
1508
1508
|
Did you forget to return items?
|
|
1509
1509
|
|
|
1510
|
-
See: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems`),{source:t,items:o}})}function y9(e){"@babel/helpers - typeof";return y9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},y9(e)}var wWr=[`event`,`nextState`,`props`,`query`,`refresh`,`store`];function TWr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function b9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?TWr(Object(n),!0).forEach(function(t){EWr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TWr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function EWr(e,t,n){return t=DWr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DWr(e){var t=OWr(e,`string`);return y9(t)===`symbol`?t:String(t)}function OWr(e,t){if(y9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(y9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function kWr(e,t){if(e==null)return{};var n=AWr(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function AWr(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var x9=null,jWr=yUr();function S9(e){var t=e.event,n=e.nextState,r=n===void 0?{}:n,i=e.props,a=e.query,o=e.refresh,s=e.store,c=kWr(e,wWr);x9&&i.environment.clearTimeout(x9);var l=c.setCollections,u=c.setIsOpen,d=c.setQuery,f=c.setActiveItemId,p=c.setStatus,m=c.setContext;if(d(a),f(i.defaultActiveItemId),!a&&i.openOnFocus===!1){var h=s.getState().collections.map(function(e){return b9(b9({},e),{},{items:[]})});p(`idle`),l(h),u(r.isOpen??i.shouldPanelOpen({state:s.getState()}));var g=gUr(jWr(h).then(function(){return Promise.resolve()}));return s.pendingRequests.add(g)}p(`loading`),x9=i.environment.setTimeout(function(){p(`stalled`)},i.stallThreshold);var _=gUr(jWr(i.getSources(b9({query:a,refresh:o,state:s.getState()},c)).then(function(e){return Promise.all(e.map(function(e){return Promise.resolve(e.getItems(b9({query:a,refresh:o,state:s.getState()},c))).then(function(t){return xWr(t,e.sourceId,s.getState())})})).then(SWr).then(function(t){var n=t.some(function(e){var t=e.items;return MWr(t)});return n&&m({algoliaInsightsPlugin:b9(b9({},s.getState().context?.algoliaInsightsPlugin||{}),{},{__automaticInsights:n})}),CWr(t,e,s)}).then(function(e){return cWr({collections:e,props:i,state:s.getState()})})}))).then(function(e){p(`idle`),l(e);var n=i.shouldPanelOpen({state:s.getState()});u(r.isOpen??(i.openOnFocus&&!a&&n||n));var d=u9(s.getState());if(s.getState().activeItemId!==null&&d){var f=d.item,m=d.itemInputValue,h=d.itemUrl,g=d.source;g.onActive(b9({event:t,item:f,itemInputValue:m,itemUrl:h,refresh:o,source:g,state:s.getState()},c))}}).finally(function(){p(`idle`),x9&&i.environment.clearTimeout(x9)});return s.pendingRequests.add(_)}function MWr(e){return!Array.isArray(e)&&!!e?._automaticInsights}function C9(e){"@babel/helpers - typeof";return C9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},C9(e)}var NWr=[`event`,`props`,`refresh`,`store`];function PWr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function w9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?PWr(Object(n),!0).forEach(function(t){FWr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PWr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function FWr(e,t,n){return t=IWr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IWr(e){var t=LWr(e,`string`);return C9(t)===`symbol`?t:String(t)}function LWr(e,t){if(C9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(C9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function RWr(e,t){if(e==null)return{};var n=zWr(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zWr(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function BWr(e){var t=e.event,n=e.props,r=e.refresh,i=e.store,a=RWr(e,NWr);if(t.key===`ArrowUp`||t.key===`ArrowDown`){var o=function(){var e=u9(i.getState()),t=n.environment.document.getElementById(d9(n.id,`item-${i.getState().activeItemId}`,e?.source));t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t.scrollIntoView(!1))},s=function(){var e=u9(i.getState());if(i.getState().activeItemId!==null&&e){var n=e.item,o=e.itemInputValue,s=e.itemUrl,c=e.source;c.onActive(w9({event:t,item:n,itemInputValue:o,itemUrl:s,refresh:r,source:c,state:i.getState()},a))}};t.preventDefault(),i.getState().isOpen===!1&&(n.openOnFocus||i.getState().query)?S9(w9({event:t,props:n,query:i.getState().query,refresh:r,store:i},a)).then(function(){i.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),s(),setTimeout(o,0)}):(i.dispatch(t.key,{}),s(),o())}else if(t.key===`Escape`)t.preventDefault(),i.dispatch(t.key,null),i.pendingRequests.cancelAll();else if(t.key===`Tab`)i.dispatch(`blur`,null),i.pendingRequests.cancelAll();else if(t.key===`Enter`){if(i.getState().activeItemId===null||i.getState().collections.every(function(e){return e.items.length===0})){n.debug||i.pendingRequests.cancelAll();return}t.preventDefault();var c=u9(i.getState()),l=c.item,u=c.itemInputValue,d=c.itemUrl,f=c.source;if(t.metaKey||t.ctrlKey)d!==void 0&&(f.onSelect(w9({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:i.getState()},a)),n.navigator.navigateNewTab({itemUrl:d,item:l,state:i.getState()}));else if(t.shiftKey)d!==void 0&&(f.onSelect(w9({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:i.getState()},a)),n.navigator.navigateNewWindow({itemUrl:d,item:l,state:i.getState()}));else if(!t.altKey){if(d!==void 0){f.onSelect(w9({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:i.getState()},a)),n.navigator.navigate({itemUrl:d,item:l,state:i.getState()});return}S9(w9({event:t,nextState:{isOpen:!1},props:n,query:u,refresh:r,store:i},a)).then(function(){f.onSelect(w9({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:i.getState()},a))})}}}function T9(e){"@babel/helpers - typeof";return T9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},T9(e)}var VWr=[`props`,`refresh`,`store`],HWr=[`inputElement`,`formElement`,`panelElement`],UWr=[`inputElement`],WWr=[`inputElement`,`maxLength`],GWr=[`source`],KWr=[`item`,`source`];function qWr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function E9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?qWr(Object(n),!0).forEach(function(t){JWr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qWr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function JWr(e,t,n){return t=YWr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YWr(e){var t=XWr(e,`string`);return T9(t)===`symbol`?t:String(t)}function XWr(e,t){if(T9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(T9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function D9(e,t){if(e==null)return{};var n=ZWr(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZWr(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function QWr(e){var t=e.props,n=e.refresh,r=e.store,i=D9(e,VWr);return{getEnvironmentProps:function(e){var n=e.inputElement,i=e.formElement,a=e.panelElement,o=D9(e,HWr);function s(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||[i,a].some(function(t){return kUr(t,e.target)})===!1&&(r.dispatch(`blur`,null),t.debug||r.pendingRequests.cancelAll())}return E9({onTouchStart:s,onMouseDown:s,onTouchMove:function(e){r.getState().isOpen!==!1&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},o)},getRootProps:function(e){return E9({role:`combobox`,"aria-expanded":r.getState().isOpen,"aria-haspopup":`listbox`,"aria-controls":r.getState().isOpen?r.getState().collections.map(function(e){var n=e.source;return d9(t.id,`list`,n)}).join(` `):void 0,"aria-labelledby":d9(t.id,`label`)},e)},getFormProps:function(e){return e.inputElement,E9({action:``,noValidate:!0,role:`search`,onSubmit:function(a){var o;a.preventDefault(),t.onSubmit(E9({event:a,refresh:n,state:r.getState()},i)),r.dispatch(`submit`,null),(o=e.inputElement)==null||o.blur()},onReset:function(a){var o;a.preventDefault(),t.onReset(E9({event:a,refresh:n,state:r.getState()},i)),r.dispatch(`reset`,null),(o=e.inputElement)==null||o.focus()}},D9(e,UWr))},getLabelProps:function(e){return E9({htmlFor:d9(t.id,`input`),id:d9(t.id,`label`)},e)},getInputProps:function(e){function a(e){(t.openOnFocus||r.getState().query)&&S9(E9({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},i)),r.dispatch(`focus`,null)}var o=e||{};o.inputElement;var s=o.maxLength,c=s===void 0?512:s,l=D9(o,WWr),u=u9(r.getState()),d=jUr(t.environment.navigator?.userAgent||``),f=t.enterKeyHint||(u!=null&&u.itemUrl&&!d?`go`:`search`);return E9({"aria-autocomplete":`both`,"aria-activedescendant":r.getState().isOpen&&r.getState().activeItemId!==null?d9(t.id,`item-${r.getState().activeItemId}`,u?.source):void 0,"aria-controls":r.getState().isOpen?r.getState().collections.map(function(e){var n=e.source;return d9(t.id,`list`,n)}).join(` `):void 0,"aria-labelledby":d9(t.id,`label`),value:r.getState().completion||r.getState().query,id:d9(t.id,`input`),autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,enterKeyHint:f,spellCheck:`false`,autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:c,type:`search`,onChange:function(e){var a=e.currentTarget.value;if(t.ignoreCompositionEvents&&NUr(e).isComposing){i.setQuery(a);return}S9(E9({event:e,props:t,query:a.slice(0,c),refresh:n,store:r},i))},onCompositionEnd:function(e){S9(E9({event:e,props:t,query:e.currentTarget.value.slice(0,c),refresh:n,store:r},i))},onKeyDown:function(e){NUr(e).isComposing||BWr(E9({event:e,props:t,refresh:n,store:r},i))},onFocus:a,onBlur:vHr,onClick:function(n){e.inputElement===t.environment.document.activeElement&&!r.getState().isOpen&&a(n)}},l)},getPanelProps:function(e){return E9({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch(`mouseleave`,null)}},e)},getListProps:function(e){var n=e||{},r=n.source,i=D9(n,GWr);return E9({role:`listbox`,"aria-labelledby":d9(t.id,`label`),id:d9(t.id,`list`,r)},i)},getItemProps:function(e){var a=e.item,o=e.source,s=D9(e,KWr);return E9({id:d9(t.id,`item-${a.__autocomplete_id}`,o),role:`option`,"aria-selected":r.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==r.getState().activeItemId){r.dispatch(`mousemove`,a.__autocomplete_id);var t=u9(r.getState());if(r.getState().activeItemId!==null&&t){var o=t.item,s=t.itemInputValue,c=t.itemUrl,l=t.source;l.onActive(E9({event:e,item:o,itemInputValue:s,itemUrl:c,refresh:n,source:l,state:r.getState()},i))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var s=o.getItemInputValue({item:a,state:r.getState()}),c=o.getItemUrl({item:a,state:r.getState()});(c?Promise.resolve():S9(E9({event:e,nextState:{isOpen:!1},props:t,query:s,refresh:n,store:r},i))).then(function(){o.onSelect(E9({event:e,item:a,itemInputValue:s,itemUrl:c,refresh:n,source:o,state:r.getState()},i))})}},s)}}}function O9(e){"@babel/helpers - typeof";return O9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},O9(e)}function $Wr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eGr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?$Wr(Object(n),!0).forEach(function(t){tGr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$Wr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tGr(e,t,n){return t=nGr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nGr(e){var t=rGr(e,`string`);return O9(t)===`symbol`?t:String(t)}function rGr(e,t){if(O9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(O9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function iGr(e){var t=e.plugins,n=e.options,r=(n.__autocomplete_metadata?.userAgents||[])[0]?.segment,i=r?tGr({},r,Object.keys(n.__autocomplete_metadata?.options||{})):{};return{plugins:t.map(function(e){return{name:e.name,options:Object.keys(e.__autocomplete_pluginOptions||[])}}),options:eGr({"autocomplete-core":Object.keys(n)},i),ua:xHr.concat(n.__autocomplete_metadata?.userAgents||[])}}function aGr(e){var t,n=e.metadata,r=e.environment;if((t=r.navigator)!=null&&t.userAgent?.includes(`Algolia Crawler`)){var i=r.document.createElement(`meta`),a=r.document.querySelector(`head`);i.name=`algolia:metadata`,setTimeout(function(){i.content=JSON.stringify(n),a.appendChild(i)},0)}}function oGr(e){var t=e.state;return t.isOpen===!1||t.activeItemId===null?null:u9(t)?.itemInputValue||null}function k9(e){"@babel/helpers - typeof";return k9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},k9(e)}function sGr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function A9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?sGr(Object(n),!0).forEach(function(t){cGr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sGr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cGr(e,t,n){return t=lGr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lGr(e){var t=uGr(e,`string`);return k9(t)===`symbol`?t:String(t)}function uGr(e,t){if(k9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(k9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var dGr=function(e,t){switch(t.type){case`setActiveItemId`:return A9(A9({},e),{},{activeItemId:t.payload});case`setQuery`:return A9(A9({},e),{},{query:t.payload,completion:null});case`setCollections`:return A9(A9({},e),{},{collections:t.payload});case`setIsOpen`:return A9(A9({},e),{},{isOpen:t.payload});case`setStatus`:return A9(A9({},e),{},{status:t.payload});case`setContext`:return A9(A9({},e),{},{context:A9(A9({},e.context),t.payload)});case`ArrowDown`:var n=A9(A9({},e),{},{activeItemId:t.payload.hasOwnProperty(`nextActiveItemId`)?t.payload.nextActiveItemId:bUr(1,e.activeItemId,hHr(e),t.props.defaultActiveItemId)});return A9(A9({},n),{},{completion:oGr({state:n})});case`ArrowUp`:var r=A9(A9({},e),{},{activeItemId:bUr(-1,e.activeItemId,hHr(e),t.props.defaultActiveItemId)});return A9(A9({},r),{},{completion:oGr({state:r})});case`Escape`:return e.isOpen?A9(A9({},e),{},{activeItemId:null,isOpen:!1,completion:null}):A9(A9({},e),{},{activeItemId:null,query:``,status:`idle`,collections:[]});case`submit`:return A9(A9({},e),{},{activeItemId:null,isOpen:!1,status:`idle`});case`reset`:return A9(A9({},e),{},{activeItemId:t.props.openOnFocus===!0?t.props.defaultActiveItemId:null,status:`idle`,completion:null,query:``});case`focus`:return A9(A9({},e),{},{activeItemId:t.props.defaultActiveItemId,isOpen:(t.props.openOnFocus||!!e.query)&&t.props.shouldPanelOpen({state:e})});case`blur`:return t.props.debug?e:A9(A9({},e),{},{isOpen:!1,activeItemId:null});case`mousemove`:return A9(A9({},e),{},{activeItemId:t.payload});case`mouseleave`:return A9(A9({},e),{},{activeItemId:t.props.defaultActiveItemId});default:return n9(!1,`The reducer action ${JSON.stringify(t.type)} is not supported.`),e}};function j9(e){"@babel/helpers - typeof";return j9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},j9(e)}function fGr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function M9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?fGr(Object(n),!0).forEach(function(t){pGr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fGr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pGr(e,t,n){return t=mGr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mGr(e){var t=hGr(e,`string`);return j9(t)===`symbol`?t:String(t)}function hGr(e,t){if(j9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(j9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function gGr(e){mUr(e);var t=[],n=nWr(e,t),r=zUr(dGr,n,o),i=GUr({store:r}),a=QWr(M9({props:n,refresh:s,store:r,navigator:n.navigator},i));function o(e){var t,r,a=e.prevState,o=e.state;if(n.onStateChange(M9({prevState:a,state:o,refresh:s,navigator:n.navigator},i)),!l()&&(t=o.context)!=null&&(r=t.algoliaInsightsPlugin)!=null&&r.__automaticInsights&&n.insights!==!1){var u=lUr({__autocomplete_clickAnalytics:!1});n.plugins.push(u),c([u])}}function s(){return S9(M9({event:new Event(`input`),nextState:{isOpen:r.getState().isOpen},props:n,navigator:n.navigator,query:r.getState().query,refresh:s,store:r},i))}function c(e){e.forEach(function(e){return e.subscribe?.call(e,M9(M9({},i),{},{navigator:n.navigator,refresh:s,onSelect:function(e){t.push({onSelect:e})},onActive:function(e){t.push({onActive:e})},onResolve:function(e){t.push({onResolve:e})}}))})}function l(){return n.plugins.some(function(e){return e.name===`aa.algoliaInsightsPlugin`})}if(n.insights&&!l()){var u=typeof n.insights==`boolean`?{}:n.insights;n.plugins.push(lUr(u))}return c(n.plugins),aGr({metadata:iGr({plugins:n.plugins,options:e}),environment:n.environment}),M9(M9({refresh:s,navigator:n.navigator},a),i)}var _Gr=`__aa-highlight__`,vGr=`__/aa-highlight__`;function yGr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return{get:function(){return e},add:function(t){var n=e[e.length-1];n?.isHighlighted===t.isHighlighted?e[e.length-1]={value:n.value+t.value,isHighlighted:n.isHighlighted}:e.push(t)}}}function bGr(e){var t=e.highlightedValue.split(_Gr),n=t.shift(),r=yGr(n?[{value:n,isHighlighted:!1}]:[]);return t.forEach(function(e){var t=e.split(vGr);r.add({value:t[0],isHighlighted:!0}),t[1]!==``&&r.add({value:t[1],isHighlighted:!1})}),r.get()}function xGr(e){return TGr(e)||wGr(e)||CGr(e)||SGr()}function SGr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1511
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1512
|
-
See https://www.algolia.com/doc/api-reference/api-parameters/attributesToHighlight/`),i=
|
|
1513
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1514
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function
|
|
1515
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1516
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LKr(e,t){if(e){if(typeof e==`string`)return BKr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return BKr(e,t)}}function RKr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function zKr(e){if(Array.isArray(e))return BKr(e)}function BKr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function VKr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function B9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?VKr(Object(n),!0).forEach(function(t){HKr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VKr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function HKr(e,t,n){return t=UKr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UKr(e){var t=WKr(e,`string`);return z9(t)===`symbol`?t:String(t)}function WKr(e,t){if(z9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(z9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function GKr(e){return function(t){var n=t.onSelect;n(function(t){var n=t.item,r=t.state,i=t.source,a=i.getItemInputValue({item:n,state:r});if(i.sourceId===`querySuggestionsPlugin`&&a){var o={id:a,label:a,category:n.__autocomplete_qsCategory};e.addItem(o)}})}}function KKr(e){var t=qKr(e),n=t.storage,r=t.transformSource,i=t.subscribe,a=NKr(n),o=nHr([]);return{name:`aa.recentSearchesPlugin`,subscribe:i??GKr(a),onSubmit:function(e){var t=e.state.query;if(t){var n={id:t,label:t};a.addItem(n)}},getSources:function(e){var t=e.query,n=e.setQuery,i=e.refresh,s=e.state;o.current=a.getAll(t);function c(e){a.removeItem(e),i()}function l(e){n(e.label),i()}return Promise.resolve(o.current).then(function(e){return e.length===0?[]:[r({source:{sourceId:`recentSearchesPlugin`,getItemInputValue:function(e){return e.item.label},getItems:function(){return e},templates:PKr({onRemove:c,onTapAhead:l})},onRemove:c,onTapAhead:l,state:s})]})},data:B9(B9({},a),{},{getAlgoliaSearchParams:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Array.isArray(o.current)?B9(B9({},e),{},{facetFilters:[].concat(FKr(e.facetFilters??[]),FKr(o.current.map(function(e){return[`objectID:-${e.label}`]}))),hitsPerPage:Math.max(1,(e.hitsPerPage??10)-o.current.length)}):(process.env.NODE_ENV!==`production`&&CHr(!1,"The `getAlgoliaSearchParams` function is not supported with storages that return promises in `getAll`."),e)}}),__autocomplete_pluginOptions:e}}function qKr(e){return B9({transformSource:function(e){return e.source}},e)}function JKr(e){var t=e.query,n=e.items,r=e.limit;return t?n.filter(function(e){return e.label.toLowerCase().includes(t.toLowerCase())}).slice(0,r).map(function(e){return xKr({item:e,query:t})}):n.slice(0,r).map(function(e){return xKr({item:e,query:t})})}function V9(e){"@babel/helpers - typeof";return V9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},V9(e)}function YKr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function XKr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?YKr(Object(n),!0).forEach(function(t){ZKr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YKr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ZKr(e,t,n){return t=QKr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QKr(e){var t=$Kr(e,`string`);return V9(t)===`symbol`?t:String(t)}function $Kr(e,t){if(V9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(V9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function eqr(e){var t=tqr(e),n=t.key,r=t.limit,i=t.transformSource,a=t.search,o=t.subscribe;return XKr(XKr({},KKr({transformSource:i,storage:MKr({key:[SKr,n].join(`:`),limit:r,search:a}),subscribe:o})),{},{name:`aa.localStorageRecentSearchesPlugin`,__autocomplete_pluginOptions:e})}function tqr(e){return XKr({limit:5,search:JKr,transformSource:function(e){return e.source}},e)}var nqr=u(s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n||=self).algoliasearch=r()})(e,(function(){"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(n){for(var r=1;r<arguments.length;r++){var i=arguments[r]==null?{}:arguments[r];r%2?t(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}function r(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)===`[object Arguments]`){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||s.return==null||s.return()}finally{if(i)throw a}}return n}}(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance`)}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)===`[object Arguments]`)return Array.from(e)}(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance`)}()}function o(e){var t,n=`algoliasearch-client-js-${e.key}`,r=function(){return t===void 0&&(t=e.localStorage||window.localStorage),t},a=function(){return JSON.parse(r().getItem(n)||`{}`)},o=function(e){r().setItem(n,JSON.stringify(e))},s=function(){var t=e.timeToLive?1e3*e.timeToLive:null,n=a(),r=Object.fromEntries(Object.entries(n).filter((function(e){return i(e,2)[1].timestamp!==void 0})));o(r),t&&o(Object.fromEntries(Object.entries(r).filter((function(e){var n=i(e,2)[1],r=new Date().getTime();return!(n.timestamp+t<r)}))))};return{get:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){s();var t=JSON.stringify(e);return a()[t]})).then((function(e){return Promise.all([e?e.value:t(),e!==void 0])})).then((function(e){var t=i(e,2),r=t[0],a=t[1];return Promise.all([r,a||n.miss(r)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]={timestamp:new Date().getTime(),value:t},r().setItem(n,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],r().setItem(n,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){r().removeItem(n)}))}}}function s(e){var t=a(e.caches),n=t.shift();return n===void 0?{get:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,n.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(e,r,i).catch((function(){return s({caches:t}).get(e,r,i)}))},set:function(e,r){return n.set(e,r).catch((function(){return s({caches:t}).set(e,r)}))},delete:function(e){return n.delete(e).catch((function(){return s({caches:t}).delete(e)}))},clear:function(){return n.clear().catch((function(){return s({caches:t}).clear()}))}}}function c(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var o=r(),s=i&&i.miss||function(){return Promise.resolve()};return o.then((function(e){return s(e)})).then((function(){return o}))},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function l(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e}function u(e,t){return t&&Object.keys(t).forEach((function(n){e[n]=t[n](e)})),e}function d(e){var t=[...arguments].slice(1),n=0;return e.replace(/%s/g,(function(){return encodeURIComponent(t[n++])}))}var f={WithinQueryParameters:0,WithinHeaders:1};function p(e,t){var n=e||{},r=n.data||{};return Object.keys(n).forEach((function(e){[`timeout`,`headers`,`queryParameters`,`data`,`cacheable`].indexOf(e)===-1&&(r[e]=n[e])})),{data:Object.entries(r).length>0?r:void 0,timeout:n.timeout||t,headers:n.headers||{},queryParameters:n.queryParameters||{},cacheable:n.cacheable}}var m={Read:1,Write:2,Any:3},h=1,g=2,_=3;function v(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h;return n(n({},e),{},{status:t,lastUpdate:Date.now()})}function y(e){return typeof e==`string`?{protocol:`https`,url:e,accept:m.Any}:{protocol:e.protocol||`https`,url:e.url,accept:e.accept||m.Any}}var b=`GET`,x=`POST`;function S(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(v(t))}))}))).then((function(e){var n=e.filter((function(e){return function(e){return e.status===h||Date.now()-e.lastUpdate>12e4}(e)})),r=e.filter((function(e){return function(e){return e.status===_&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(n),a(r));return{getTimeout:function(e,t){return(r.length===0&&e===0?1:r.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return y(e)})):t}}))}function C(e,t,r,i){var o=[],s=function(e,t){if(!(e.method===b||e.data===void 0&&t.data===void 0)){var r=Array.isArray(e.data)?e.data:n(n({},e.data),t.data);return JSON.stringify(r)}}(r,i),c=function(e,t){var r=n(n({},e.headers),t.headers),i={};return Object.keys(r).forEach((function(e){var t=r[e];i[e.toLowerCase()]=t})),i}(e,i),l=r.method,u=r.method===b?n(n({},r.data),i.data):{},d=n(n(n({"x-algolia-agent":e.userAgent.value},e.queryParameters),u),i.queryParameters),f=0,p=function t(n,a){var u=n.pop();if(u===void 0)throw{name:`RetryError`,message:`Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support .`,transporterStackTrace:D(o)};var p={data:s,headers:c,method:l,url:T(u,r.path,d),connectTimeout:a(f,e.timeouts.connect),responseTimeout:a(f,i.timeout)},m=function(e){var t={request:p,response:e,host:u,triesLeft:n.length};return o.push(t),t},h={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:`DeserializationError`,message:e,response:t}}(t.message,e)}}(e)},onRetry:function(r){var i=m(r);return r.isTimedOut&&f++,Promise.all([e.logger.info(`Retryable failure`,O(i)),e.hostsCache.set(u,v(u,r.isTimedOut?_:g))]).then((function(){return t(n,a)}))},onFail:function(e){throw m(e),function(e,t){var n=e.content,r=e.status,i=n;try{i=JSON.parse(n).message}catch{}return function(e,t,n){return{name:`ApiError`,message:e,status:t,transporterStackTrace:n}}(i,r,t)}(e,D(o))}};return e.requester.send(p).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,n=e.status;return!t&&~~n==0}(e)||~~(t/100)!=2&&~~(t/100)!=4}(e)?t.onRetry(e):~~(e.status/100)==2?t.onSuccess(e):t.onFail(e)}(e,h)}))};return S(e.hostsCache,t).then((function(e){return p(a(e.statelessHosts).reverse(),e.getTimeout)}))}function w(e){var t={value:`Algolia for JavaScript (${e})`,add:function(e){var n=`; ${e.segment}${e.version===void 0?``:` (${e.version})`}`;return t.value.indexOf(n)===-1&&(t.value=`${t.value}${n}`),t}};return t}function T(e,t,n){var r=E(n),i=`${e.protocol}://${e.url}/${t.charAt(0)===`/`?t.substr(1):t}`;return r.length&&(i+=`?${r}`),i}function E(e){return Object.keys(e).map((function(t){return d(`%s=%s`,t,(n=e[t],Object.prototype.toString.call(n)===`[object Object]`||Object.prototype.toString.call(n)===`[object Array]`?JSON.stringify(e[t]):e[t]));var n})).join(`&`)}function D(e){return e.map((function(e){return O(e)}))}function O(e){var t=e.request.headers[`x-algolia-api-key`]?{"x-algolia-api-key":`*****`}:{};return n(n({},e),{},{request:n(n({},e.request),{},{headers:n(n({},e.request.headers),t)})})}var k=function(e){var t=e.appId,r=function(e,t,n){var r={"x-algolia-api-key":n,"x-algolia-application-id":t};return{headers:function(){return e===f.WithinHeaders?r:{}},queryParameters:function(){return e===f.WithinQueryParameters?r:{}}}}(e.authMode===void 0?f.WithinHeaders:e.authMode,t,e.apiKey),a=function(e){var t=e.hostsCache,n=e.logger,r=e.requester,a=e.requestsCache,o=e.responsesCache,s=e.timeouts,c=e.userAgent,l=e.hosts,u=e.queryParameters,d={hostsCache:t,logger:n,requester:r,requestsCache:a,responsesCache:o,timeouts:s,userAgent:c,headers:e.headers,queryParameters:u,hosts:l.map((function(e){return y(e)})),read:function(e,t){var n=p(t,d.timeouts.read),r=function(){return C(d,d.hosts.filter((function(e){return(e.accept&m.Read)!=0})),e,n)};if(!0!==(n.cacheable===void 0?e.cacheable:n.cacheable))return r();var a={request:e,mappedRequestOptions:n,transporter:{queryParameters:d.queryParameters,headers:d.headers}};return d.responsesCache.get(a,(function(){return d.requestsCache.get(a,(function(){return d.requestsCache.set(a,r()).then((function(e){return Promise.all([d.requestsCache.delete(a),e])}),(function(e){return Promise.all([d.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return d.responsesCache.set(a,e)}})},write:function(e,t){return C(d,d.hosts.filter((function(e){return(e.accept&m.Write)!=0})),e,p(t,d.timeouts.write))}};return d}(n(n({hosts:[{url:`${t}-dsn.algolia.net`,accept:m.Read},{url:`${t}.algolia.net`,accept:m.Write}].concat(l([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}]))},e),{},{headers:n(n(n({},r.headers()),{"content-type":`application/x-www-form-urlencoded`}),e.headers),queryParameters:n(n({},r.queryParameters()),e.queryParameters)}));return u({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,n){return t.method===b?e.transporter.read(t,n):e.transporter.write(t,n)}},j=function(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return u({transporter:e.transporter,appId:e.appId,indexName:t},n.methods)}},M=function(e){return function(t,r){var i=t.map((function(e){return n(n({},e),{},{params:E(e.params||{})})}));return e.transporter.read({method:x,path:`1/indexes/*/queries`,data:{requests:i},cacheable:!0},r)}},N=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,o=a.facetName,s=a.facetQuery,c=r(a,[`facetName`,`facetQuery`]);return j(e)(t.indexName,{methods:{searchForFacetValues:te}}).searchForFacetValues(o,s,n(n({},i),c))})))}},ee=function(e){return function(t,n,r){return e.transporter.read({method:x,path:d(`1/answers/%s/prediction`,e.indexName),data:{query:t,queryLanguages:n},cacheable:!0},r)}},P=function(e){return function(t,n){return e.transporter.read({method:x,path:d(`1/indexes/%s/query`,e.indexName),data:{query:t},cacheable:!0},n)}},te=function(e){return function(t,n,r){return e.transporter.read({method:x,path:d(`1/indexes/%s/facets/%s/query`,e.indexName,t),data:{facetQuery:n},cacheable:!0},r)}},F=1,ne=2,I=3,re=function(e){return function(t,r){var i=t.map((function(e){return n(n({},e),{},{threshold:e.threshold||0})}));return e.transporter.read({method:x,path:`1/indexes/*/recommendations`,data:{requests:i},cacheable:!0},r)}};function L(e,t,r){var i;return k(n(n(n({},{appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return n.setRequestHeader(t,e.headers[t])}));var r,i=function(e,r){return setTimeout((function(){n.abort(),t({status:0,content:r,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,`Connection timeout`);n.onreadystatechange=function(){n.readyState>n.OPENED&&r===void 0&&(clearTimeout(a),r=i(e.responseTimeout,`Socket timeout`))},n.onerror=function(){n.status===0&&(clearTimeout(a),clearTimeout(r),t({content:n.responseText||`Network request failed`,status:n.status,isTimedOut:!1}))},n.onload=function(){clearTimeout(a),clearTimeout(r),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)}))}},logger:(i=I,{debug:function(e,t){return F>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return ne>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:c(),requestsCache:c({serializable:!1}),hostsCache:s({caches:[o({key:`4.24.0-${e}`}),c()]}),userAgent:w(`4.24.0`).add({segment:`Browser`,version:`lite`}),authMode:f.WithinQueryParameters}),r),{},{methods:{search:M,searchForFacetValues:N,multipleQueries:M,multipleSearchForFacetValues:N,customRequest:A,initIndex:function(e){return function(t){return j(e)(t,{methods:{search:P,searchForFacetValues:te,findAnswers:ee}})}},getRecommendations:re}}))}return L.version=`4.24.0`,L}))}))()),rqr=U7(H7.div`
|
|
1510
|
+
See: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems`),{source:t,items:o}})}function y9(e){"@babel/helpers - typeof";return y9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},y9(e)}var DWr=[`event`,`nextState`,`props`,`query`,`refresh`,`store`];function OWr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function b9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?OWr(Object(n),!0).forEach(function(t){kWr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OWr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kWr(e,t,n){return t=AWr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AWr(e){var t=jWr(e,`string`);return y9(t)===`symbol`?t:String(t)}function jWr(e,t){if(y9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(y9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function MWr(e,t){if(e==null)return{};var n=NWr(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function NWr(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var x9=null,PWr=SUr();function S9(e){var t=e.event,n=e.nextState,r=n===void 0?{}:n,i=e.props,a=e.query,o=e.refresh,s=e.store,c=MWr(e,DWr);x9&&i.environment.clearTimeout(x9);var l=c.setCollections,u=c.setIsOpen,d=c.setQuery,f=c.setActiveItemId,p=c.setStatus,m=c.setContext;if(d(a),f(i.defaultActiveItemId),!a&&i.openOnFocus===!1){var h=s.getState().collections.map(function(e){return b9(b9({},e),{},{items:[]})});p(`idle`),l(h),u(r.isOpen??i.shouldPanelOpen({state:s.getState()}));var g=yUr(PWr(h).then(function(){return Promise.resolve()}));return s.pendingRequests.add(g)}p(`loading`),x9=i.environment.setTimeout(function(){p(`stalled`)},i.stallThreshold);var _=yUr(PWr(i.getSources(b9({query:a,refresh:o,state:s.getState()},c)).then(function(e){return Promise.all(e.map(function(e){return Promise.resolve(e.getItems(b9({query:a,refresh:o,state:s.getState()},c))).then(function(t){return wWr(t,e.sourceId,s.getState())})})).then(TWr).then(function(t){var n=t.some(function(e){var t=e.items;return FWr(t)});return n&&m({algoliaInsightsPlugin:b9(b9({},s.getState().context?.algoliaInsightsPlugin||{}),{},{__automaticInsights:n})}),EWr(t,e,s)}).then(function(e){return dWr({collections:e,props:i,state:s.getState()})})}))).then(function(e){p(`idle`),l(e);var n=i.shouldPanelOpen({state:s.getState()});u(r.isOpen??(i.openOnFocus&&!a&&n||n));var d=u9(s.getState());if(s.getState().activeItemId!==null&&d){var f=d.item,m=d.itemInputValue,h=d.itemUrl,g=d.source;g.onActive(b9({event:t,item:f,itemInputValue:m,itemUrl:h,refresh:o,source:g,state:s.getState()},c))}}).finally(function(){p(`idle`),x9&&i.environment.clearTimeout(x9)});return s.pendingRequests.add(_)}function FWr(e){return!Array.isArray(e)&&!!e?._automaticInsights}function C9(e){"@babel/helpers - typeof";return C9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},C9(e)}var IWr=[`event`,`props`,`refresh`,`store`];function LWr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function w9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?LWr(Object(n),!0).forEach(function(t){RWr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LWr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function RWr(e,t,n){return t=zWr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zWr(e){var t=BWr(e,`string`);return C9(t)===`symbol`?t:String(t)}function BWr(e,t){if(C9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(C9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function VWr(e,t){if(e==null)return{};var n=HWr(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HWr(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function UWr(e){var t=e.event,n=e.props,r=e.refresh,i=e.store,a=VWr(e,IWr);if(t.key===`ArrowUp`||t.key===`ArrowDown`){var o=function(){var e=u9(i.getState()),t=n.environment.document.getElementById(d9(n.id,`item-${i.getState().activeItemId}`,e?.source));t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t.scrollIntoView(!1))},s=function(){var e=u9(i.getState());if(i.getState().activeItemId!==null&&e){var n=e.item,o=e.itemInputValue,s=e.itemUrl,c=e.source;c.onActive(w9({event:t,item:n,itemInputValue:o,itemUrl:s,refresh:r,source:c,state:i.getState()},a))}};t.preventDefault(),i.getState().isOpen===!1&&(n.openOnFocus||i.getState().query)?S9(w9({event:t,props:n,query:i.getState().query,refresh:r,store:i},a)).then(function(){i.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),s(),setTimeout(o,0)}):(i.dispatch(t.key,{}),s(),o())}else if(t.key===`Escape`)t.preventDefault(),i.dispatch(t.key,null),i.pendingRequests.cancelAll();else if(t.key===`Tab`)i.dispatch(`blur`,null),i.pendingRequests.cancelAll();else if(t.key===`Enter`){if(i.getState().activeItemId===null||i.getState().collections.every(function(e){return e.items.length===0})){n.debug||i.pendingRequests.cancelAll();return}t.preventDefault();var c=u9(i.getState()),l=c.item,u=c.itemInputValue,d=c.itemUrl,f=c.source;if(t.metaKey||t.ctrlKey)d!==void 0&&(f.onSelect(w9({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:i.getState()},a)),n.navigator.navigateNewTab({itemUrl:d,item:l,state:i.getState()}));else if(t.shiftKey)d!==void 0&&(f.onSelect(w9({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:i.getState()},a)),n.navigator.navigateNewWindow({itemUrl:d,item:l,state:i.getState()}));else if(!t.altKey){if(d!==void 0){f.onSelect(w9({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:i.getState()},a)),n.navigator.navigate({itemUrl:d,item:l,state:i.getState()});return}S9(w9({event:t,nextState:{isOpen:!1},props:n,query:u,refresh:r,store:i},a)).then(function(){f.onSelect(w9({event:t,item:l,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:i.getState()},a))})}}}function T9(e){"@babel/helpers - typeof";return T9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},T9(e)}var WWr=[`props`,`refresh`,`store`],GWr=[`inputElement`,`formElement`,`panelElement`],KWr=[`inputElement`],qWr=[`inputElement`,`maxLength`],JWr=[`source`],YWr=[`item`,`source`];function XWr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function E9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?XWr(Object(n),!0).forEach(function(t){ZWr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XWr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ZWr(e,t,n){return t=QWr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QWr(e){var t=$Wr(e,`string`);return T9(t)===`symbol`?t:String(t)}function $Wr(e,t){if(T9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(T9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function D9(e,t){if(e==null)return{};var n=eGr(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eGr(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function tGr(e){var t=e.props,n=e.refresh,r=e.store,i=D9(e,WWr);return{getEnvironmentProps:function(e){var n=e.inputElement,i=e.formElement,a=e.panelElement,o=D9(e,GWr);function s(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||[i,a].some(function(t){return MUr(t,e.target)})===!1&&(r.dispatch(`blur`,null),t.debug||r.pendingRequests.cancelAll())}return E9({onTouchStart:s,onMouseDown:s,onTouchMove:function(e){r.getState().isOpen!==!1&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},o)},getRootProps:function(e){return E9({role:`combobox`,"aria-expanded":r.getState().isOpen,"aria-haspopup":`listbox`,"aria-controls":r.getState().isOpen?r.getState().collections.map(function(e){var n=e.source;return d9(t.id,`list`,n)}).join(` `):void 0,"aria-labelledby":d9(t.id,`label`)},e)},getFormProps:function(e){return e.inputElement,E9({action:``,noValidate:!0,role:`search`,onSubmit:function(a){var o;a.preventDefault(),t.onSubmit(E9({event:a,refresh:n,state:r.getState()},i)),r.dispatch(`submit`,null),(o=e.inputElement)==null||o.blur()},onReset:function(a){var o;a.preventDefault(),t.onReset(E9({event:a,refresh:n,state:r.getState()},i)),r.dispatch(`reset`,null),(o=e.inputElement)==null||o.focus()}},D9(e,KWr))},getLabelProps:function(e){return E9({htmlFor:d9(t.id,`input`),id:d9(t.id,`label`)},e)},getInputProps:function(e){function a(e){(t.openOnFocus||r.getState().query)&&S9(E9({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},i)),r.dispatch(`focus`,null)}var o=e||{};o.inputElement;var s=o.maxLength,c=s===void 0?512:s,l=D9(o,qWr),u=u9(r.getState()),d=PUr(t.environment.navigator?.userAgent||``),f=t.enterKeyHint||(u!=null&&u.itemUrl&&!d?`go`:`search`);return E9({"aria-autocomplete":`both`,"aria-activedescendant":r.getState().isOpen&&r.getState().activeItemId!==null?d9(t.id,`item-${r.getState().activeItemId}`,u?.source):void 0,"aria-controls":r.getState().isOpen?r.getState().collections.map(function(e){var n=e.source;return d9(t.id,`list`,n)}).join(` `):void 0,"aria-labelledby":d9(t.id,`label`),value:r.getState().completion||r.getState().query,id:d9(t.id,`input`),autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,enterKeyHint:f,spellCheck:`false`,autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:c,type:`search`,onChange:function(e){var a=e.currentTarget.value;if(t.ignoreCompositionEvents&&IUr(e).isComposing){i.setQuery(a);return}S9(E9({event:e,props:t,query:a.slice(0,c),refresh:n,store:r},i))},onCompositionEnd:function(e){S9(E9({event:e,props:t,query:e.currentTarget.value.slice(0,c),refresh:n,store:r},i))},onKeyDown:function(e){IUr(e).isComposing||UWr(E9({event:e,props:t,refresh:n,store:r},i))},onFocus:a,onBlur:xHr,onClick:function(n){e.inputElement===t.environment.document.activeElement&&!r.getState().isOpen&&a(n)}},l)},getPanelProps:function(e){return E9({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch(`mouseleave`,null)}},e)},getListProps:function(e){var n=e||{},r=n.source,i=D9(n,JWr);return E9({role:`listbox`,"aria-labelledby":d9(t.id,`label`),id:d9(t.id,`list`,r)},i)},getItemProps:function(e){var a=e.item,o=e.source,s=D9(e,YWr);return E9({id:d9(t.id,`item-${a.__autocomplete_id}`,o),role:`option`,"aria-selected":r.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==r.getState().activeItemId){r.dispatch(`mousemove`,a.__autocomplete_id);var t=u9(r.getState());if(r.getState().activeItemId!==null&&t){var o=t.item,s=t.itemInputValue,c=t.itemUrl,l=t.source;l.onActive(E9({event:e,item:o,itemInputValue:s,itemUrl:c,refresh:n,source:l,state:r.getState()},i))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var s=o.getItemInputValue({item:a,state:r.getState()}),c=o.getItemUrl({item:a,state:r.getState()});(c?Promise.resolve():S9(E9({event:e,nextState:{isOpen:!1},props:t,query:s,refresh:n,store:r},i))).then(function(){o.onSelect(E9({event:e,item:a,itemInputValue:s,itemUrl:c,refresh:n,source:o,state:r.getState()},i))})}},s)}}}function O9(e){"@babel/helpers - typeof";return O9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},O9(e)}function nGr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rGr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?nGr(Object(n),!0).forEach(function(t){iGr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nGr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function iGr(e,t,n){return t=aGr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aGr(e){var t=oGr(e,`string`);return O9(t)===`symbol`?t:String(t)}function oGr(e,t){if(O9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(O9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function sGr(e){var t=e.plugins,n=e.options,r=(n.__autocomplete_metadata?.userAgents||[])[0]?.segment,i=r?iGr({},r,Object.keys(n.__autocomplete_metadata?.options||{})):{};return{plugins:t.map(function(e){return{name:e.name,options:Object.keys(e.__autocomplete_pluginOptions||[])}}),options:rGr({"autocomplete-core":Object.keys(n)},i),ua:wHr.concat(n.__autocomplete_metadata?.userAgents||[])}}function cGr(e){var t,n=e.metadata,r=e.environment;if((t=r.navigator)!=null&&t.userAgent?.includes(`Algolia Crawler`)){var i=r.document.createElement(`meta`),a=r.document.querySelector(`head`);i.name=`algolia:metadata`,setTimeout(function(){i.content=JSON.stringify(n),a.appendChild(i)},0)}}function lGr(e){var t=e.state;return t.isOpen===!1||t.activeItemId===null?null:u9(t)?.itemInputValue||null}function k9(e){"@babel/helpers - typeof";return k9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},k9(e)}function uGr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function A9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?uGr(Object(n),!0).forEach(function(t){dGr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uGr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dGr(e,t,n){return t=fGr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fGr(e){var t=pGr(e,`string`);return k9(t)===`symbol`?t:String(t)}function pGr(e,t){if(k9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(k9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var mGr=function(e,t){switch(t.type){case`setActiveItemId`:return A9(A9({},e),{},{activeItemId:t.payload});case`setQuery`:return A9(A9({},e),{},{query:t.payload,completion:null});case`setCollections`:return A9(A9({},e),{},{collections:t.payload});case`setIsOpen`:return A9(A9({},e),{},{isOpen:t.payload});case`setStatus`:return A9(A9({},e),{},{status:t.payload});case`setContext`:return A9(A9({},e),{},{context:A9(A9({},e.context),t.payload)});case`ArrowDown`:var n=A9(A9({},e),{},{activeItemId:t.payload.hasOwnProperty(`nextActiveItemId`)?t.payload.nextActiveItemId:CUr(1,e.activeItemId,vHr(e),t.props.defaultActiveItemId)});return A9(A9({},n),{},{completion:lGr({state:n})});case`ArrowUp`:var r=A9(A9({},e),{},{activeItemId:CUr(-1,e.activeItemId,vHr(e),t.props.defaultActiveItemId)});return A9(A9({},r),{},{completion:lGr({state:r})});case`Escape`:return e.isOpen?A9(A9({},e),{},{activeItemId:null,isOpen:!1,completion:null}):A9(A9({},e),{},{activeItemId:null,query:``,status:`idle`,collections:[]});case`submit`:return A9(A9({},e),{},{activeItemId:null,isOpen:!1,status:`idle`});case`reset`:return A9(A9({},e),{},{activeItemId:t.props.openOnFocus===!0?t.props.defaultActiveItemId:null,status:`idle`,completion:null,query:``});case`focus`:return A9(A9({},e),{},{activeItemId:t.props.defaultActiveItemId,isOpen:(t.props.openOnFocus||!!e.query)&&t.props.shouldPanelOpen({state:e})});case`blur`:return t.props.debug?e:A9(A9({},e),{},{isOpen:!1,activeItemId:null});case`mousemove`:return A9(A9({},e),{},{activeItemId:t.payload});case`mouseleave`:return A9(A9({},e),{},{activeItemId:t.props.defaultActiveItemId});default:return n9(!1,`The reducer action ${JSON.stringify(t.type)} is not supported.`),e}};function j9(e){"@babel/helpers - typeof";return j9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},j9(e)}function hGr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function M9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?hGr(Object(n),!0).forEach(function(t){gGr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hGr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gGr(e,t,n){return t=_Gr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _Gr(e){var t=vGr(e,`string`);return j9(t)===`symbol`?t:String(t)}function vGr(e,t){if(j9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(j9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function yGr(e){_Ur(e);var t=[],n=aWr(e,t),r=HUr(mGr,n,o),i=JUr({store:r}),a=tGr(M9({props:n,refresh:s,store:r,navigator:n.navigator},i));function o(e){var t,r,a=e.prevState,o=e.state;if(n.onStateChange(M9({prevState:a,state:o,refresh:s,navigator:n.navigator},i)),!l()&&(t=o.context)!=null&&(r=t.algoliaInsightsPlugin)!=null&&r.__automaticInsights&&n.insights!==!1){var u=fUr({__autocomplete_clickAnalytics:!1});n.plugins.push(u),c([u])}}function s(){return S9(M9({event:new Event(`input`),nextState:{isOpen:r.getState().isOpen},props:n,navigator:n.navigator,query:r.getState().query,refresh:s,store:r},i))}function c(e){e.forEach(function(e){return e.subscribe?.call(e,M9(M9({},i),{},{navigator:n.navigator,refresh:s,onSelect:function(e){t.push({onSelect:e})},onActive:function(e){t.push({onActive:e})},onResolve:function(e){t.push({onResolve:e})}}))})}function l(){return n.plugins.some(function(e){return e.name===`aa.algoliaInsightsPlugin`})}if(n.insights&&!l()){var u=typeof n.insights==`boolean`?{}:n.insights;n.plugins.push(fUr(u))}return c(n.plugins),cGr({metadata:sGr({plugins:n.plugins,options:e}),environment:n.environment}),M9(M9({refresh:s,navigator:n.navigator},a),i)}var bGr=`__aa-highlight__`,xGr=`__/aa-highlight__`;function SGr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return{get:function(){return e},add:function(t){var n=e[e.length-1];n?.isHighlighted===t.isHighlighted?e[e.length-1]={value:n.value+t.value,isHighlighted:n.isHighlighted}:e.push(t)}}}function CGr(e){var t=e.highlightedValue.split(bGr),n=t.shift(),r=SGr(n?[{value:n,isHighlighted:!1}]:[]);return t.forEach(function(e){var t=e.split(xGr);r.add({value:t[0],isHighlighted:!0}),t[1]!==``&&r.add({value:t[1],isHighlighted:!1})}),r.get()}function wGr(e){return OGr(e)||DGr(e)||EGr(e)||TGr()}function TGr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1511
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EGr(e,t){if(e){if(typeof e==`string`)return kGr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kGr(e,t)}}function DGr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function OGr(e){if(Array.isArray(e))return kGr(e)}function kGr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function AGr(e){var t=e.hit,n=e.attribute,r=Array.isArray(n)?n:[n],i=_Hr(t,[`_highlightResult`].concat(wGr(r),[`value`]));return typeof i!=`string`&&(process.env.NODE_ENV!==`production`&&EHr(!1,`The attribute "${r.join(`.`)}" described by the path ${JSON.stringify(r)} does not exist on the hit. Did you set it in \`attributesToHighlight\`?
|
|
1512
|
+
See https://www.algolia.com/doc/api-reference/api-parameters/attributesToHighlight/`),i=_Hr(t,r)||``),CGr({highlightedValue:i})}function N9(e){"@babel/helpers - typeof";return N9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},N9(e)}function jGr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function MGr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?jGr(Object(n),!0).forEach(function(t){NGr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jGr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function NGr(e,t,n){return t=PGr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PGr(e){var t=FGr(e,`string`);return N9(t)===`symbol`?t:String(t)}function FGr(e,t){if(N9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(N9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function IGr(e,t){function n(t){return e({searchClient:t.searchClient,queries:t.requests.map(function(e){return e.query})}).then(function(e){return e.map(function(e,n){var r=t.requests[n];return{items:e,sourceId:r.sourceId,transformResponse:r.transformResponse}})})}return function(e){return function(r){return MGr(MGr({requesterId:t,execute:n},e),r)}}}function LGr(e){var t=e.transporter||{},n=t.headers||t.baseHeaders||{},r=t.queryParameters||t.baseQueryParameters||{},i=`x-algolia-application-id`,a=`x-algolia-api-key`;return{appId:n[i]||r[i],apiKey:n[a]||r[a]}}function P9(e){"@babel/helpers - typeof";return P9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},P9(e)}var RGr=[`params`];function zGr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function F9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zGr(Object(n),!0).forEach(function(t){BGr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zGr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BGr(e,t,n){return t=VGr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VGr(e){var t=HGr(e,`string`);return P9(t)===`symbol`?t:String(t)}function HGr(e,t){if(P9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(P9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function UGr(e,t){if(e==null)return{};var n=WGr(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WGr(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function GGr(e){return YGr(e)||JGr(e)||qGr(e)||KGr()}function KGr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1513
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qGr(e,t){if(e){if(typeof e==`string`)return XGr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XGr(e,t)}}function JGr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function YGr(e){if(Array.isArray(e))return XGr(e)}function XGr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ZGr(e){var t=e.searchClient,n=e.queries,r=e.userAgents,i=r===void 0?[]:r;typeof t.addAlgoliaAgent==`function`&&[].concat(GGr(wHr),GGr(i)).forEach(function(e){var n=e.segment,r=e.version;t.addAlgoliaAgent(n,r)});var a=LGr(t),o=a.appId,s=a.apiKey;return n9(!!o,"The Algolia `appId` was not accessible from the searchClient passed."),n9(!!s,"The Algolia `apiKey` was not accessible from the searchClient passed."),t.search(n.map(function(e){var t=e.params;return F9(F9({},UGr(e,RGr)),{},{params:F9({hitsPerPage:5,highlightPreTag:bGr,highlightPostTag:xGr},t)})})).then(function(e){return e.results.map(function(e,t){return F9(F9({},e),{},{hits:e.hits?.map(function(r){return F9(F9({},r),{},{__autocomplete_indexName:e.index||n[t].indexName,__autocomplete_queryID:e.queryID,__autocomplete_algoliaCredentials:{appId:o,apiKey:s}})})})})})}var QGr=IGr(ZGr,`algolia`);function $Gr(e){"@babel/helpers - typeof";return $Gr=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},$Gr(e)}function eKr(e){return n9($Gr(e.searchClient)===`object`,"The `searchClient` parameter is required for getAlgoliaResults({ searchClient })."),QGr({transformResponse:function(e){return e.hits}})(e)}var tKr=[{segment:`autocomplete-js`,version:CHr}];function I9(e){"@babel/helpers - typeof";return I9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},I9(e)}function nKr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rKr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?nKr(Object(n),!0).forEach(function(t){iKr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nKr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function iKr(e,t,n){return t=aKr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aKr(e){var t=oKr(e,`string`);return I9(t)===`symbol`?t:String(t)}function oKr(e,t){if(I9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(I9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var sKr=IGr(function(e){return ZGr(rKr(rKr({},e),{},{userAgents:tKr}))},`algolia`)({transformResponse:function(e){return e.hits}});function cKr(e){var t=e.onTapAhead;return{item:function(e){var n=e.item,r=e.createElement,i=e.components;return n.__autocomplete_qsCategory?r(`div`,{className:`aa-ItemWrapper`},r(`div`,{className:`aa-ItemContent aa-ItemContent--indented`},r(`div`,{className:`aa-ItemContentSubtitle aa-ItemContentSubtitle--standalone`},r(`span`,{className:`aa-ItemContentSubtitleIcon`}),r(`span`,null,`in`,` `,r(`span`,{className:`aa-ItemContentSubtitleCategory`},n.__autocomplete_qsCategory))))):r(`div`,{className:`aa-ItemWrapper`},r(`div`,{className:`aa-ItemContent`},r(`div`,{className:`aa-ItemIcon aa-ItemIcon--noBorder`},r(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`},r(`path`,{d:`M16.041 15.856c-0.034 0.026-0.067 0.055-0.099 0.087s-0.060 0.064-0.087 0.099c-1.258 1.213-2.969 1.958-4.855 1.958-1.933 0-3.682-0.782-4.95-2.050s-2.050-3.017-2.050-4.95 0.782-3.682 2.050-4.95 3.017-2.050 4.95-2.050 3.682 0.782 4.95 2.050 2.050 3.017 2.050 4.95c0 1.886-0.745 3.597-1.959 4.856zM21.707 20.293l-3.675-3.675c1.231-1.54 1.968-3.493 1.968-5.618 0-2.485-1.008-4.736-2.636-6.364s-3.879-2.636-6.364-2.636-4.736 1.008-6.364 2.636-2.636 3.879-2.636 6.364 1.008 4.736 2.636 6.364 3.879 2.636 6.364 2.636c2.125 0 4.078-0.737 5.618-1.968l3.675 3.675c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414z`}))),r(`div`,{className:`aa-ItemContentBody`},r(`div`,{className:`aa-ItemContentTitle`},r(i.ReverseHighlight,{hit:n,attribute:`query`})))),r(`div`,{className:`aa-ItemActions`},r(`button`,{className:`aa-ItemActionButton`,title:`Fill query with "${n.query}"`,onClick:function(e){e.preventDefault(),e.stopPropagation(),t(n)}},r(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`},r(`path`,{d:`M8 17v-7.586l8.293 8.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-8.293-8.293h7.586c0.552 0 1-0.448 1-1s-0.448-1-1-1h-10c-0.552 0-1 0.448-1 1v10c0 0.552 0.448 1 1 1s1-0.448 1-1z`})))))}}}function L9(e){"@babel/helpers - typeof";return L9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},L9(e)}function lKr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uKr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?lKr(Object(n),!0).forEach(function(t){dKr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lKr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dKr(e,t,n){return t=fKr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fKr(e){var t=pKr(e,`string`);return L9(t)===`symbol`?t:String(t)}function pKr(e,t){if(L9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(L9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function mKr(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=hKr(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1514
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function hKr(e,t){if(e){if(typeof e==`string`)return gKr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gKr(e,t)}}function gKr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _Kr(e){var t=vKr(e),n=t.searchClient,r=t.indexName,i=t.getSearchParams,a=t.transformSource,o=t.categoryAttribute,s=t.itemsWithCategories,c=t.categoriesPerItem;return{name:`aa.querySuggestionsPlugin`,getSources:function(e){var t=e.query,l=e.setQuery,u=e.refresh,d=e.state;function f(e){l(`${e.query} `),u()}return[a({source:{sourceId:`querySuggestionsPlugin`,getItemInputValue:function(e){return e.item.query},getItems:function(){return sKr({searchClient:n,queries:[{indexName:r,query:t,params:i({state:d})}],transformResponse:function(e){var n=e.hits[0];if(!t||!o)return n;var r=0;return n.reduce(function(e,t){var n=[t];if(r<s){var i=(_Hr(t,Array.isArray(o)?o:[o])||[]).map(function(e){return e.value}).slice(0,c);i.length>0&&r++;var a=mKr(i),l;try{for(a.s();!(l=a.n()).done;){var u=l.value;n.push(uKr({__autocomplete_qsCategory:u},t))}}catch(e){a.e(e)}finally{a.f()}}return e.push.apply(e,n),e},[])}})},templates:cKr({onTapAhead:f})},onTapAhead:f,state:d})]},__autocomplete_pluginOptions:e}}function vKr(e){return uKr({getSearchParams:function(){return{}},transformSource:function(e){return e.source},itemsWithCategories:1,categoriesPerItem:1},e)}function R9(e){"@babel/helpers - typeof";return R9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},R9(e)}function yKr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bKr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?yKr(Object(n),!0).forEach(function(t){xKr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yKr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xKr(e,t,n){return t=SKr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SKr(e){var t=CKr(e,`string`);return R9(t)===`symbol`?t:String(t)}function CKr(e,t){if(R9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(R9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function wKr(e){var t=e.item,n=e.query;return bKr(bKr({},t),{},{_highlightResult:{label:{value:n?t.label.replace(new RegExp(n.replace(/[-/\\^$*+?.()|[\]{}]/g,`\\$&`),`gi`),function(e){return`__aa-highlight__${e}__/aa-highlight__`}):t.label}}})}var TKr=`AUTOCOMPLETE_RECENT_SEARCHES`,EKr=`__AUTOCOMPLETE_RECENT_SEARCHES_PLUGIN_TEST_KEY__`;function DKr(){try{return localStorage.setItem(EKr,``),localStorage.removeItem(EKr),!0}catch{return!1}}function OKr(e){var t=e.key;return DKr()?{setItem:function(e){return window.localStorage.setItem(t,JSON.stringify(e))},getItem:function(){var e=window.localStorage.getItem(t);return e?JSON.parse(e):[]}}:{setItem:function(){},getItem:function(){return[]}}}function kKr(e){return NKr(e)||MKr(e)||jKr(e)||AKr()}function AKr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1515
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jKr(e,t){if(e){if(typeof e==`string`)return PKr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return PKr(e,t)}}function MKr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function NKr(e){if(Array.isArray(e))return PKr(e)}function PKr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function FKr(e){var t=e.key,n=e.limit,r=e.search,i=OKr({key:t});return{onAdd:function(e){i.setItem([e].concat(kKr(i.getItem())))},onRemove:function(e){i.setItem(i.getItem().filter(function(t){return t.id!==e}))},getAll:function(){return r({query:arguments.length>0&&arguments[0]!==void 0?arguments[0]:``,items:i.getItem(),limit:n}).slice(0,n)}}}function IKr(e){return{addItem:function(t){e.onRemove(t.id),e.onAdd(t)},removeItem:function(t){e.onRemove(t)},getAll:function(t){return e.getAll(t)}}}function LKr(e){var t=e.onRemove,n=e.onTapAhead;return{item:function(e){var r=e.item,i=e.createElement,a=e.components;return i(`div`,{className:`aa-ItemWrapper`},i(`div`,{className:`aa-ItemContent`},i(`div`,{className:`aa-ItemIcon aa-ItemIcon--noBorder`},i(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`},i(`path`,{d:`M12.516 6.984v5.25l4.5 2.672-0.75 1.266-5.25-3.188v-6h1.5zM12 20.016q3.281 0 5.648-2.367t2.367-5.648-2.367-5.648-5.648-2.367-5.648 2.367-2.367 5.648 2.367 5.648 5.648 2.367zM12 2.016q4.125 0 7.055 2.93t2.93 7.055-2.93 7.055-7.055 2.93-7.055-2.93-2.93-7.055 2.93-7.055 7.055-2.93z`}))),i(`div`,{className:`aa-ItemContentBody`},i(`div`,{className:`aa-ItemContentTitle`},i(a.ReverseHighlight,{hit:r,attribute:`label`}),r.category&&i(`span`,{className:`aa-ItemContentSubtitle aa-ItemContentSubtitle--inline`},i(`span`,{className:`aa-ItemContentSubtitleIcon`}),` in`,` `,i(`span`,{className:`aa-ItemContentSubtitleCategory`},r.category))))),i(`div`,{className:`aa-ItemActions`},i(`button`,{className:`aa-ItemActionButton`,title:`Remove this search`,onClick:function(e){e.preventDefault(),e.stopPropagation(),t(r.id)}},i(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`},i(`path`,{d:`M18 7v13c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293h-10c-0.276 0-0.525-0.111-0.707-0.293s-0.293-0.431-0.293-0.707v-13zM17 5v-1c0-0.828-0.337-1.58-0.879-2.121s-1.293-0.879-2.121-0.879h-4c-0.828 0-1.58 0.337-2.121 0.879s-0.879 1.293-0.879 2.121v1h-4c-0.552 0-1 0.448-1 1s0.448 1 1 1h1v13c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h10c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-13h1c0.552 0 1-0.448 1-1s-0.448-1-1-1zM9 5v-1c0-0.276 0.111-0.525 0.293-0.707s0.431-0.293 0.707-0.293h4c0.276 0 0.525 0.111 0.707 0.293s0.293 0.431 0.293 0.707v1zM9 11v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1zM13 11v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1z`}))),i(`button`,{className:`aa-ItemActionButton`,title:`Fill query with "${r.label}"`,onClick:function(e){e.preventDefault(),e.stopPropagation(),n(r)}},i(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`},i(`path`,{d:`M8 17v-7.586l8.293 8.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-8.293-8.293h7.586c0.552 0 1-0.448 1-1s-0.448-1-1-1h-10c-0.552 0-1 0.448-1 1v10c0 0.552 0.448 1 1 1s1-0.448 1-1z`})))))}}}function z9(e){"@babel/helpers - typeof";return z9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},z9(e)}function RKr(e){return HKr(e)||VKr(e)||BKr(e)||zKr()}function zKr(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1516
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BKr(e,t){if(e){if(typeof e==`string`)return UKr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UKr(e,t)}}function VKr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function HKr(e){if(Array.isArray(e))return UKr(e)}function UKr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function WKr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function B9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?WKr(Object(n),!0).forEach(function(t){GKr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WKr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function GKr(e,t,n){return t=KKr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KKr(e){var t=qKr(e,`string`);return z9(t)===`symbol`?t:String(t)}function qKr(e,t){if(z9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(z9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function JKr(e){return function(t){var n=t.onSelect;n(function(t){var n=t.item,r=t.state,i=t.source,a=i.getItemInputValue({item:n,state:r});if(i.sourceId===`querySuggestionsPlugin`&&a){var o={id:a,label:a,category:n.__autocomplete_qsCategory};e.addItem(o)}})}}function YKr(e){var t=XKr(e),n=t.storage,r=t.transformSource,i=t.subscribe,a=IKr(n),o=aHr([]);return{name:`aa.recentSearchesPlugin`,subscribe:i??JKr(a),onSubmit:function(e){var t=e.state.query;if(t){var n={id:t,label:t};a.addItem(n)}},getSources:function(e){var t=e.query,n=e.setQuery,i=e.refresh,s=e.state;o.current=a.getAll(t);function c(e){a.removeItem(e),i()}function l(e){n(e.label),i()}return Promise.resolve(o.current).then(function(e){return e.length===0?[]:[r({source:{sourceId:`recentSearchesPlugin`,getItemInputValue:function(e){return e.item.label},getItems:function(){return e},templates:LKr({onRemove:c,onTapAhead:l})},onRemove:c,onTapAhead:l,state:s})]})},data:B9(B9({},a),{},{getAlgoliaSearchParams:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Array.isArray(o.current)?B9(B9({},e),{},{facetFilters:[].concat(RKr(e.facetFilters??[]),RKr(o.current.map(function(e){return[`objectID:-${e.label}`]}))),hitsPerPage:Math.max(1,(e.hitsPerPage??10)-o.current.length)}):(process.env.NODE_ENV!==`production`&&EHr(!1,"The `getAlgoliaSearchParams` function is not supported with storages that return promises in `getAll`."),e)}}),__autocomplete_pluginOptions:e}}function XKr(e){return B9({transformSource:function(e){return e.source}},e)}function ZKr(e){var t=e.query,n=e.items,r=e.limit;return t?n.filter(function(e){return e.label.toLowerCase().includes(t.toLowerCase())}).slice(0,r).map(function(e){return wKr({item:e,query:t})}):n.slice(0,r).map(function(e){return wKr({item:e,query:t})})}function V9(e){"@babel/helpers - typeof";return V9=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},V9(e)}function QKr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $Kr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?QKr(Object(n),!0).forEach(function(t){eqr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QKr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eqr(e,t,n){return t=tqr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tqr(e){var t=nqr(e,`string`);return V9(t)===`symbol`?t:String(t)}function nqr(e,t){if(V9(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(V9(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function rqr(e){var t=iqr(e),n=t.key,r=t.limit,i=t.transformSource,a=t.search,o=t.subscribe;return $Kr($Kr({},YKr({transformSource:i,storage:FKr({key:[TKr,n].join(`:`),limit:r,search:a}),subscribe:o})),{},{name:`aa.localStorageRecentSearchesPlugin`,__autocomplete_pluginOptions:e})}function iqr(e){return $Kr({limit:5,search:ZKr,transformSource:function(e){return e.source}},e)}var aqr=u(s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n||=self).algoliasearch=r()})(e,(function(){"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(n){for(var r=1;r<arguments.length;r++){var i=arguments[r]==null?{}:arguments[r];r%2?t(Object(i),!0).forEach((function(t){e(n,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))}))}return n}function r(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)===`[object Arguments]`){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||s.return==null||s.return()}finally{if(i)throw a}}return n}}(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance`)}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)===`[object Arguments]`)return Array.from(e)}(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance`)}()}function o(e){var t,n=`algoliasearch-client-js-${e.key}`,r=function(){return t===void 0&&(t=e.localStorage||window.localStorage),t},a=function(){return JSON.parse(r().getItem(n)||`{}`)},o=function(e){r().setItem(n,JSON.stringify(e))},s=function(){var t=e.timeToLive?1e3*e.timeToLive:null,n=a(),r=Object.fromEntries(Object.entries(n).filter((function(e){return i(e,2)[1].timestamp!==void 0})));o(r),t&&o(Object.fromEntries(Object.entries(r).filter((function(e){var n=i(e,2)[1],r=new Date().getTime();return!(n.timestamp+t<r)}))))};return{get:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){s();var t=JSON.stringify(e);return a()[t]})).then((function(e){return Promise.all([e?e.value:t(),e!==void 0])})).then((function(e){var t=i(e,2),r=t[0],a=t[1];return Promise.all([r,a||n.miss(r)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]={timestamp:new Date().getTime(),value:t},r().setItem(n,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],r().setItem(n,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){r().removeItem(n)}))}}}function s(e){var t=a(e.caches),n=t.shift();return n===void 0?{get:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,n.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(e,r,i).catch((function(){return s({caches:t}).get(e,r,i)}))},set:function(e,r){return n.set(e,r).catch((function(){return s({caches:t}).set(e,r)}))},delete:function(e){return n.delete(e).catch((function(){return s({caches:t}).delete(e)}))},clear:function(){return n.clear().catch((function(){return s({caches:t}).clear()}))}}}function c(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(n);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var o=r(),s=i&&i.miss||function(){return Promise.resolve()};return o.then((function(e){return s(e)})).then((function(){return o}))},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function l(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e}function u(e,t){return t&&Object.keys(t).forEach((function(n){e[n]=t[n](e)})),e}function d(e){var t=[...arguments].slice(1),n=0;return e.replace(/%s/g,(function(){return encodeURIComponent(t[n++])}))}var f={WithinQueryParameters:0,WithinHeaders:1};function p(e,t){var n=e||{},r=n.data||{};return Object.keys(n).forEach((function(e){[`timeout`,`headers`,`queryParameters`,`data`,`cacheable`].indexOf(e)===-1&&(r[e]=n[e])})),{data:Object.entries(r).length>0?r:void 0,timeout:n.timeout||t,headers:n.headers||{},queryParameters:n.queryParameters||{},cacheable:n.cacheable}}var m={Read:1,Write:2,Any:3},h=1,g=2,_=3;function v(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h;return n(n({},e),{},{status:t,lastUpdate:Date.now()})}function y(e){return typeof e==`string`?{protocol:`https`,url:e,accept:m.Any}:{protocol:e.protocol||`https`,url:e.url,accept:e.accept||m.Any}}var b=`GET`,x=`POST`;function S(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(v(t))}))}))).then((function(e){var n=e.filter((function(e){return function(e){return e.status===h||Date.now()-e.lastUpdate>12e4}(e)})),r=e.filter((function(e){return function(e){return e.status===_&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(n),a(r));return{getTimeout:function(e,t){return(r.length===0&&e===0?1:r.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return y(e)})):t}}))}function C(e,t,r,i){var o=[],s=function(e,t){if(!(e.method===b||e.data===void 0&&t.data===void 0)){var r=Array.isArray(e.data)?e.data:n(n({},e.data),t.data);return JSON.stringify(r)}}(r,i),c=function(e,t){var r=n(n({},e.headers),t.headers),i={};return Object.keys(r).forEach((function(e){var t=r[e];i[e.toLowerCase()]=t})),i}(e,i),l=r.method,u=r.method===b?n(n({},r.data),i.data):{},d=n(n(n({"x-algolia-agent":e.userAgent.value},e.queryParameters),u),i.queryParameters),f=0,p=function t(n,a){var u=n.pop();if(u===void 0)throw{name:`RetryError`,message:`Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support .`,transporterStackTrace:D(o)};var p={data:s,headers:c,method:l,url:T(u,r.path,d),connectTimeout:a(f,e.timeouts.connect),responseTimeout:a(f,i.timeout)},m=function(e){var t={request:p,response:e,host:u,triesLeft:n.length};return o.push(t),t},h={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:`DeserializationError`,message:e,response:t}}(t.message,e)}}(e)},onRetry:function(r){var i=m(r);return r.isTimedOut&&f++,Promise.all([e.logger.info(`Retryable failure`,O(i)),e.hostsCache.set(u,v(u,r.isTimedOut?_:g))]).then((function(){return t(n,a)}))},onFail:function(e){throw m(e),function(e,t){var n=e.content,r=e.status,i=n;try{i=JSON.parse(n).message}catch{}return function(e,t,n){return{name:`ApiError`,message:e,status:t,transporterStackTrace:n}}(i,r,t)}(e,D(o))}};return e.requester.send(p).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,n=e.status;return!t&&~~n==0}(e)||~~(t/100)!=2&&~~(t/100)!=4}(e)?t.onRetry(e):~~(e.status/100)==2?t.onSuccess(e):t.onFail(e)}(e,h)}))};return S(e.hostsCache,t).then((function(e){return p(a(e.statelessHosts).reverse(),e.getTimeout)}))}function w(e){var t={value:`Algolia for JavaScript (${e})`,add:function(e){var n=`; ${e.segment}${e.version===void 0?``:` (${e.version})`}`;return t.value.indexOf(n)===-1&&(t.value=`${t.value}${n}`),t}};return t}function T(e,t,n){var r=E(n),i=`${e.protocol}://${e.url}/${t.charAt(0)===`/`?t.substr(1):t}`;return r.length&&(i+=`?${r}`),i}function E(e){return Object.keys(e).map((function(t){return d(`%s=%s`,t,(n=e[t],Object.prototype.toString.call(n)===`[object Object]`||Object.prototype.toString.call(n)===`[object Array]`?JSON.stringify(e[t]):e[t]));var n})).join(`&`)}function D(e){return e.map((function(e){return O(e)}))}function O(e){var t=e.request.headers[`x-algolia-api-key`]?{"x-algolia-api-key":`*****`}:{};return n(n({},e),{},{request:n(n({},e.request),{},{headers:n(n({},e.request.headers),t)})})}var k=function(e){var t=e.appId,r=function(e,t,n){var r={"x-algolia-api-key":n,"x-algolia-application-id":t};return{headers:function(){return e===f.WithinHeaders?r:{}},queryParameters:function(){return e===f.WithinQueryParameters?r:{}}}}(e.authMode===void 0?f.WithinHeaders:e.authMode,t,e.apiKey),a=function(e){var t=e.hostsCache,n=e.logger,r=e.requester,a=e.requestsCache,o=e.responsesCache,s=e.timeouts,c=e.userAgent,l=e.hosts,u=e.queryParameters,d={hostsCache:t,logger:n,requester:r,requestsCache:a,responsesCache:o,timeouts:s,userAgent:c,headers:e.headers,queryParameters:u,hosts:l.map((function(e){return y(e)})),read:function(e,t){var n=p(t,d.timeouts.read),r=function(){return C(d,d.hosts.filter((function(e){return(e.accept&m.Read)!=0})),e,n)};if(!0!==(n.cacheable===void 0?e.cacheable:n.cacheable))return r();var a={request:e,mappedRequestOptions:n,transporter:{queryParameters:d.queryParameters,headers:d.headers}};return d.responsesCache.get(a,(function(){return d.requestsCache.get(a,(function(){return d.requestsCache.set(a,r()).then((function(e){return Promise.all([d.requestsCache.delete(a),e])}),(function(e){return Promise.all([d.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return d.responsesCache.set(a,e)}})},write:function(e,t){return C(d,d.hosts.filter((function(e){return(e.accept&m.Write)!=0})),e,p(t,d.timeouts.write))}};return d}(n(n({hosts:[{url:`${t}-dsn.algolia.net`,accept:m.Read},{url:`${t}.algolia.net`,accept:m.Write}].concat(l([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}]))},e),{},{headers:n(n(n({},r.headers()),{"content-type":`application/x-www-form-urlencoded`}),e.headers),queryParameters:n(n({},r.queryParameters()),e.queryParameters)}));return u({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,n){return t.method===b?e.transporter.read(t,n):e.transporter.write(t,n)}},j=function(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return u({transporter:e.transporter,appId:e.appId,indexName:t},n.methods)}},M=function(e){return function(t,r){var i=t.map((function(e){return n(n({},e),{},{params:E(e.params||{})})}));return e.transporter.read({method:x,path:`1/indexes/*/queries`,data:{requests:i},cacheable:!0},r)}},N=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,o=a.facetName,s=a.facetQuery,c=r(a,[`facetName`,`facetQuery`]);return j(e)(t.indexName,{methods:{searchForFacetValues:te}}).searchForFacetValues(o,s,n(n({},i),c))})))}},ee=function(e){return function(t,n,r){return e.transporter.read({method:x,path:d(`1/answers/%s/prediction`,e.indexName),data:{query:t,queryLanguages:n},cacheable:!0},r)}},P=function(e){return function(t,n){return e.transporter.read({method:x,path:d(`1/indexes/%s/query`,e.indexName),data:{query:t},cacheable:!0},n)}},te=function(e){return function(t,n,r){return e.transporter.read({method:x,path:d(`1/indexes/%s/facets/%s/query`,e.indexName,t),data:{facetQuery:n},cacheable:!0},r)}},F=1,ne=2,I=3,re=function(e){return function(t,r){var i=t.map((function(e){return n(n({},e),{},{threshold:e.threshold||0})}));return e.transporter.read({method:x,path:`1/indexes/*/recommendations`,data:{requests:i},cacheable:!0},r)}};function L(e,t,r){var i;return k(n(n(n({},{appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return n.setRequestHeader(t,e.headers[t])}));var r,i=function(e,r){return setTimeout((function(){n.abort(),t({status:0,content:r,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,`Connection timeout`);n.onreadystatechange=function(){n.readyState>n.OPENED&&r===void 0&&(clearTimeout(a),r=i(e.responseTimeout,`Socket timeout`))},n.onerror=function(){n.status===0&&(clearTimeout(a),clearTimeout(r),t({content:n.responseText||`Network request failed`,status:n.status,isTimedOut:!1}))},n.onload=function(){clearTimeout(a),clearTimeout(r),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)}))}},logger:(i=I,{debug:function(e,t){return F>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return ne>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:c(),requestsCache:c({serializable:!1}),hostsCache:s({caches:[o({key:`4.24.0-${e}`}),c()]}),userAgent:w(`4.24.0`).add({segment:`Browser`,version:`lite`}),authMode:f.WithinQueryParameters}),r),{},{methods:{search:M,searchForFacetValues:N,multipleQueries:M,multipleSearchForFacetValues:N,customRequest:A,initIndex:function(e){return function(t){return j(e)(t,{methods:{search:P,searchForFacetValues:te,findAnswers:ee}})}},getRecommendations:re}}))}return L.version=`4.24.0`,L}))}))()),oqr=U7(H7.div`
|
|
1517
1517
|
background: ${q7(`colors.base.white`)};
|
|
1518
1518
|
box-shadow: ${q7(`shadows.medium`)};
|
|
1519
1519
|
height: 60px;
|
|
@@ -1598,7 +1598,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1598
1598
|
margin-right: 1rem;
|
|
1599
1599
|
}
|
|
1600
1600
|
}
|
|
1601
|
-
`),
|
|
1601
|
+
`),sqr=U7(H7.div`
|
|
1602
1602
|
display: flex;
|
|
1603
1603
|
overflow: hidden;
|
|
1604
1604
|
pointer-events: none;
|
|
@@ -1618,7 +1618,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1618
1618
|
}
|
|
1619
1619
|
|
|
1620
1620
|
${Dd}
|
|
1621
|
-
`),
|
|
1621
|
+
`),cqr=U7(H7.div`
|
|
1622
1622
|
background: ${e=>e.theme.colors.base.primary};
|
|
1623
1623
|
border-radius: 50%;
|
|
1624
1624
|
color: ${e=>e.theme.colors.base.white};
|
|
@@ -1626,39 +1626,39 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1626
1626
|
padding: 9px;
|
|
1627
1627
|
|
|
1628
1628
|
${Dd}
|
|
1629
|
-
`),
|
|
1629
|
+
`),lqr=U7(H7.div`
|
|
1630
1630
|
background: ${e=>e.theme.colors.base.primary};
|
|
1631
1631
|
padding: 9px;
|
|
1632
1632
|
border-radius: 50%;
|
|
1633
1633
|
line-height: 0;
|
|
1634
1634
|
color: ${e=>e.theme.colors.base.white};
|
|
1635
1635
|
${Dd}
|
|
1636
|
-
`),
|
|
1636
|
+
`),uqr=U7(H7.div`
|
|
1637
1637
|
width: 100%;
|
|
1638
1638
|
display: flex;
|
|
1639
1639
|
justify-content: space-between;
|
|
1640
1640
|
align-items: center;
|
|
1641
1641
|
${Dd}
|
|
1642
|
-
`),
|
|
1642
|
+
`),dqr=U7(H7.div`
|
|
1643
1643
|
width: 100%;
|
|
1644
1644
|
height: 100%;
|
|
1645
1645
|
display: flex;
|
|
1646
1646
|
align-items: center;
|
|
1647
1647
|
${Dd}
|
|
1648
|
-
`),
|
|
1648
|
+
`),fqr=U7(H7.input`
|
|
1649
1649
|
width: 100%;
|
|
1650
1650
|
height: 100%;
|
|
1651
1651
|
border: none;
|
|
1652
1652
|
font-size: 20px;
|
|
1653
1653
|
${Dd}
|
|
1654
|
-
`),
|
|
1654
|
+
`),pqr=U7(H7.div`
|
|
1655
1655
|
color: #27272e54;
|
|
1656
1656
|
&:hover {
|
|
1657
1657
|
color: ${q7(`colors.base.secondary`)};
|
|
1658
1658
|
cursor: pointer;
|
|
1659
1659
|
}
|
|
1660
1660
|
${Dd}
|
|
1661
|
-
`),H9={Input:
|
|
1661
|
+
`),H9={Input:fqr,Interface:uqr,InterfaceWrapper:dqr,IconWrapper:U7(H7.div`
|
|
1662
1662
|
color: #27272e54;
|
|
1663
1663
|
transition: 0.2s;
|
|
1664
1664
|
&:hover {
|
|
@@ -1666,11 +1666,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1666
1666
|
cursor: pointer;
|
|
1667
1667
|
}
|
|
1668
1668
|
${Dd}
|
|
1669
|
-
`),Profile:
|
|
1669
|
+
`),Profile:cqr,SearchIcon:lqr,TextPrompt:sqr,Wrapper:oqr,X:pqr};qC();var mqr=428,hqr=(0,aqr.default)(`Z0GWPR8XBE`,`251ec8d76f6c62ac793c1337b39bda58`),gqr=rqr({key:`navbar`,transformSource({source:e}){return{...e,onSelect({setIsOpen:e}){e(!0)}}}});function _qr({autocompleteState:e,setAutocompleteState:t,setShowTextPrompt:n,getAutocompleteInstance:r}){let i=k7(),a=(0,z.useRef)(null);function o(t,n,r){let i=document.querySelectorAll(t),a=document.querySelector(r);if(e.isOpen){if(i.length===0||!a)return;a.addEventListener(`mouseover`,function(){i.forEach(function(e){let t=e.querySelectorAll(n);for(let e=0;e<t.length;e++)t[e].setAttribute(`aria-selected`,`false`)})})}}let s=()=>{let e=p.value;e&&gqr.data.addItem({id:e,label:e,_highLightResult:{label:{value:e}}}),u.setQuery(``),u.refresh()},c=e=>{e.preventDefault();let t=p.value;t&&(gqr.data.addItem({id:t,label:t,_highLightResult:{label:{value:t}}}),u.setQuery(t)),u.refresh()},l=_Kr({searchClient:hqr,indexName:`ContentItem_${i.church}`,transformSource({source:e}){return{...e,onSelect({setQuery:e,item:t,setIsOpen:n,refresh:r,event:i}){i.preventDefault(),i.stopPropagation(),n(!0),e(t.title),r()}}}}),u=(0,z.useMemo)(()=>yGr({openOnFocus:!0,plugins:[l],shouldPanelOpen({state:e}){return e.query!==``||e.collections?.length>0},onStateChange({state:e,...n}){let r=window.innerWidth<mqr&&e.query!==n.prevState.query?document.getElementById(`panel-top`):null;r&&r.scrollIntoView({behavior:`instant`,block:`start`}),t(e)},getSources({query:e}){return e?[{sourceId:`pages`,getItemInputValue({item:e}){return e.query},getItems({query:e}){return eKr({searchClient:hqr,queries:[{indexName:`WebPages_Global`,query:e,params:{facetFilters:[`church:${i.church}`],hitsPerPage:4,clickAnalytics:!0,getRankingInfo:!0}}]})},getItemUrl({item:e}){return e?.name?`/?query=${e.name}`:e.url}},{sourceId:`content`,getItemInputValue({item:e}){return e.query},getItems({query:e}){return eKr({searchClient:hqr,queries:[{indexName:`ContentItem_${i.church}`,query:e,params:{hitsPerPage:8,clickAnalytics:!0,getRankingInfo:!0}}]})},getItemUrl({item:e}){return e?.name?`/?query=${e.name}`:`?id=${nVr(e)}`}}]:[]}}),[]),d=`autocomplete-1-label`,f=u.getRootProps({}),p=u.getInputProps({}),m=u.getPanelProps({}),h=u.getFormProps({inputElement:a.current});return p.id=`autocomplete-1-input`,p.onFocus=()=>{u.setIsOpen(!0),u.refresh()},h.onSubmit=c,f[`aria-labelledby`]=d,p[`aria-labelledby`]=d,m[`aria-labelledby`]=d,(0,z.useEffect)(()=>{function t(t){e.isOpen&&!t.target.closest(`#search`)&&(u.setIsOpen(!1),u.setQuery(``),n(!0))}function r(){document.body.style.overflow=`hidden`}function i(){document.body.style.overflow=``}return e.isOpen&&window.innerWidth<mqr?r():i(),o(`.aa-List`,`.aa-Item`,`.empty-feed`),document.addEventListener(`click`,t),()=>{document.removeEventListener(`click`,t)}},[e.isOpen,u,n]),(0,z.useEffect)(()=>{r&&r(u)},[u]),(0,q.jsx)(`div`,{className:`aa-Autocomplete`,...f,children:(0,q.jsxs)(`form`,{className:`aa-Form`,...h,children:[(0,q.jsx)(`input`,{ref:a,className:`aa-Input`,...p}),p.value===``?null:(0,q.jsx)(`div`,{className:`aa-ClearButton`,onClick:s,children:(0,q.jsx)(H9.IconWrapper,{children:(0,q.jsx)(KC,{size:18,weight:`fill`})})})]})})}Ww(),Vpt();var vqr=H7.div`
|
|
1670
1670
|
.aa-Panel button {
|
|
1671
1671
|
all: unset; /* Reset styles for buttons leaking from .aa-Panel */
|
|
1672
1672
|
}
|
|
1673
|
-
`;function
|
|
1673
|
+
`;function yqr({hit:e}){return e?.title}function bqr({hit:e,attribute:t,tagName:n=`mark`}){return(0,z.createElement)(z.Fragment,{},AGr({hit:e,attribute:t}).map(({value:e,isHighlighted:t},r)=>t?(0,z.createElement)(n,{key:r},e):e))}function xqr({item:e,autocomplete:t,handleActionPress:n}){return(0,q.jsxs)(J7,{className:`aa-ItemWrapper`,px:`xs`,children:[(0,q.jsxs)(`div`,{className:`aa-ItemContent`,children:[(0,q.jsx)(`div`,{className:`aa-ItemIcon aa-ItemIcon--noBorder`,children:(0,q.jsx)(pq,{size:24,weight:`bold`})}),(0,q.jsx)(`div`,{className:`aa-ItemContentBody`,children:(0,q.jsx)(`div`,{className:`aa-ItemContentTitle`,children:(0,q.jsx)(yqr,{hit:e})})})]}),(0,q.jsx)(`div`,{className:`aa-ItemActions`,children:(0,q.jsx)(`button`,{className:`aa-ItemActionButton`,title:`Fill query with "${e.title}"`,onClick:n=>{n.preventDefault(),n.stopPropagation(),t.setQuery(e.title),t.refresh()},children:(0,q.jsx)(Uw,{size:24,weight:`bold`})})})]})}function Sqr({item:e,autocomplete:t}){function n(e){t.refresh()}function r(e){t.setQuery(e.label),t.setIsOpen(!0),t.refresh()}return(0,q.jsxs)(J7,{className:`aa-ItemWrapper`,px:`xs`,children:[(0,q.jsxs)(`div`,{className:`aa-ItemContent`,children:[(0,q.jsx)(`div`,{className:`aa-ItemIcon aa-ItemIcon--noBorder`,children:(0,q.jsx)(Bpt,{size:24,weight:`bold`})}),(0,q.jsx)(`div`,{className:`aa-ItemContentBody`,children:(0,q.jsx)(`div`,{className:`aa-ItemContentTitle`,children:(0,q.jsx)(bqr,{hit:e,attribute:`label`})})})]}),(0,q.jsxs)(`div`,{className:`aa-ItemActions`,children:[(0,q.jsx)(`button`,{className:`aa-ItemActionButton`,title:`Remove this search`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n(e.id)},children:(0,q.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,q.jsx)(`path`,{d:`M18 7v13c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293h-10c-0.276 0-0.525-0.111-0.707-0.293s-0.293-0.431-0.293-0.707v-13zM17 5v-1c0-0.828-0.337-1.58-0.879-2.121s-1.293-0.879-2.121-0.879h-4c-0.828 0-1.58 0.337-2.121 0.879s-0.879 1.293-0.879 2.121v1h-4c-0.552 0-1 0.448-1 1s0.448 1 1 1h1v13c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h10c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-13h1c0.552 0 1-0.448 1-1s-0.448-1-1-1zM9 5v-1c0-0.276 0.111-0.525 0.293-0.707s0.431-0.293 0.707-0.293h4c0.276 0 0.525 0.111 0.707 0.293s0.293 0.431 0.293 0.707v1zM9 11v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1zM13 11v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1z`})})}),(0,q.jsx)(`button`,{className:`aa-ItemActionButton`,title:`Fill query with "${e.label}"`,onClick:t=>{t.preventDefault(),t.stopPropagation(),r(e)},children:(0,q.jsx)(Uw,{size:24,weight:`bold`})})]})]})}var Cqr=({autocompleteState:e,autocomplete:t})=>{let n=k7(),[r,i]=izr(),{navigate:a}=_Vr(),[o,s]=(0,z.useState)(!1);(0,z.useEffect)(()=>{let t=e.collections.find(e=>e.source.sourceId===`pages`)?.items||[],n=e.collections.find(e=>e.source.sourceId===`content`)?.items||[];s(t.length===0&&n.length===0)},[e.collections]);let c=e=>{if(a({id:nVr(e)}),r.modal){let t=nVr(e);i($Rr(t)),i(ZRr())}};if(!e||!t)return null;let l=t.getInputProps({}),u=[];return e.collections.filter(e=>[`pages`,`content`].includes(e.source.sourceId)).forEach(e=>{u.push(...e.items.map(t=>({...t,source:e.source})))}),u.sort((e,t)=>e._rankingInfo.nbExactWords>t._rankingInfo.nbExactWords?-1:e._rankingInfo.nbExactWords<t._rankingInfo.nbExactWords?1:e._rankingInfo.proximityDistance<t._rankingInfo.proximityDistance?-1:e._rankingInfo.proximityDistance>t._rankingInfo.proximityDistance?1:e._rankingInfo.userScore>t._rankingInfo.userScore?-1:+(e._rankingInfo.userScore<t._rankingInfo.userScore)),(0,q.jsxs)(J7,{id:`panel`,className:`aa-Panel`,dropdown:e.isOpen,...t.getPanelProps({}),children:[e.isOpen?(0,q.jsx)(`div`,{id:`panel-top`}):null,o&&e.collections.some(e=>[`pages`,`content`].includes(e.source.sourceId))?(0,q.jsx)(J7,{padding:`xs`,fontWeight:`500`,color:`base.gray`,textAlign:`center`,fontStyle:`italic`,children:`No results found`}):null,e.isOpen?e.collections.map((e,n)=>{let{source:r,items:i}=e;if([`querySuggestionsPlugin`].includes(e.source.sourceId))return(0,q.jsxs)(`div`,{className:`aa-Source`,children:[e.source.sourceId===`querySuggestionsPlugin`&&!l.value?(0,q.jsx)(J7,{padding:`xs`,fontWeight:`600`,color:`base.gray`,children:`Trending Searches`}):null,e.source.sourceId===`recentSearchesPlugin`&&!l.value?(0,q.jsx)(J7,{padding:`xs`,fontWeight:`600`,color:`base.gray`,children:`Search History`}):null,(0,q.jsx)(`ul`,{className:`aa-List`,...t.getListProps(),children:i.map((n,i)=>{if(e.source.sourceId===`querySuggestionsPlugin`&&!l.value)return(0,q.jsx)(`li`,{className:`aa-Item`,...t.getItemProps({item:n,source:r}),children:(0,q.jsx)(xqr,{item:n,autocomplete:t,handleActionPress:c,...t.getItemProps({item:n,source:r})})},`${n.objectID?n.objectID:i}-${e.source.sourceId}`);if(e.source.sourceId===`recentSearchesPlugin`&&!l.value)return(0,q.jsx)(`li`,{className:`aa-Item`,...t.getItemProps({item:n,source:r}),children:(0,q.jsx)(Sqr,{item:n,autocomplete:t,...t.getItemProps({item:n,source:r})})},`${n.objectID?n.objectID:i}-${e.source.sourceId}`)})})]},`source-${n}`)}):null,e.query===``?null:(0,q.jsx)(`div`,{className:`aa-Source`,children:(0,q.jsx)(`ul`,{className:`aa-List`,...t.getListProps(),children:u.map(e=>(0,q.jsx)(J7,{as:`li`,padding:`4px`,...t.getItemProps({item:e,source:e.source}),children:(0,q.jsx)(UC,{as:uT,action:e?.id?.includes(`:`)?`OPEN_NODE`:e?.url?`OPEN_URL`:void 0,relatedNode:e,title:e?.title??void 0,subtitle:e?.summary,leadingAccessory:(0,q.jsx)(ow,{src:e?.coverImage?.sources?.at(0)?.uri??void 0}),trailingAccessory:(0,q.jsx)(Uw,{})})},e.objectID))})}),e.isOpen&&e.query===``&&n.searchFeed?(0,q.jsx)(vqr,{children:(0,q.jsx)(J7,{className:`empty-feed m-4`,children:(0,q.jsx)(tRr,{id:n.searchFeed})})}):null]})};VBe(),Hsn();var wqr=428,Tqr=(e={})=>{let t=k7(),[n,r]=(0,z.useState)(!0),[i,a]=(0,z.useState)(null),[o,s]=(0,z.useState)({activeItemId:null,collections:[],completion:null,context:{},isOpen:!1,query:``,status:`idle`}),{currentUser:c}=O7(),l=!!c,u=c?.profile?.firstName||``,[d,f]=(0,z.useState)(!1),[p,m]=(0,z.useState)(0),h=(0,q.jsxs)(`strong`,{style:{marginRight:`0.35ch`},children:[`Hey`,u===``?``:` ${u}`,`!`]}),g=d?{width:`400px`}:{width:`225px`},_=t.customPlaceholder?(0,q.jsx)(H9.TextPrompt,{children:(0,q.jsx)(J7,{as:`span`,style:{overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,...g},children:t.customPlaceholder})}):(0,q.jsxs)(H9.TextPrompt,{children:[d?null:h,(0,q.jsx)(J7,{as:`span`,style:{overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`,...g},children:`What are you looking for?`})]});(0,z.useEffect)(()=>{function e(){f(window.innerWidth<wqr)}return e(),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[]),(0,z.useEffect)(()=>{o.isOpen&&r(!1)},[o.isOpen]),(0,z.useEffect)(()=>(d&&o.isOpen?(m(window.scrollY),document.body.style.position=`fixed`):document.body.style.position=``,()=>{document.body.style.position=``}),[o.isOpen,p,d]);let v=e=>{a(e)},y=()=>{d&&o.isOpen&&(i.setIsOpen(!1),i.setQuery(``),r(!0))};return(0,q.jsx)(J7,{position:`relative`,alignItems:`center`,display:`flex`,flexDirection:`column`,id:`search`,...e,children:(0,q.jsxs)(H9.Wrapper,{dropdown:o.isOpen,children:[(0,q.jsxs)(J7,{display:`flex`,flexDirection:`row`,h:`60px`,w:`100%`,children:[(0,q.jsx)(H9.Interface,{children:(0,q.jsxs)(H9.InterfaceWrapper,{children:[(0,q.jsx)(J7,{padding:`12px`,onClick:y,children:(0,q.jsx)(H9.SearchIcon,{children:d&&o.isOpen?(0,q.jsx)(BBe,{size:18,weight:`bold`,color:l?`white`:null}):(0,q.jsx)(pq,{size:18,weight:`bold`,color:l?`white`:null})})}),(0,q.jsxs)(J7,{width:`100%`,children:[(0,q.jsx)(_qr,{autocompleteState:o,setAutocompleteState:s,setShowTextPrompt:r,getAutocompleteInstance:v}),n?_:null]})]})}),(0,q.jsx)(J7,{p:16,children:t.hideApollosAuth?null:(0,q.jsx)(iHr,{popupSize:t.searchProfileSize})})]}),(0,q.jsx)(Cqr,{autocompleteState:o,autocomplete:i})]})})};Tqr.propTypes={...Od,dropdown:Zy.default.bool};var Eqr=Tqr;function U9(e,t=16){let n=e.split(`px`)[0]/t;return String(`${n}rem`)}var W9=B7`
|
|
1674
1674
|
color: ${q7(`colors.text.primary`)};
|
|
1675
1675
|
transition: all ${q7(`timing.base`)};
|
|
1676
1676
|
margin: 0;
|
|
@@ -1800,32 +1800,32 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1800
1800
|
font-size: ${U9(`16px`)};
|
|
1801
1801
|
line-height: ${U9(`24px`)};
|
|
1802
1802
|
font-weight: 400;
|
|
1803
|
-
`},
|
|
1803
|
+
`},Dqr=U7(H7.h1.attrs({className:`heading-style-h1`})`
|
|
1804
1804
|
${G9.H1}
|
|
1805
1805
|
${Dd}
|
|
1806
|
-
`);
|
|
1806
|
+
`);Dqr.propTypes={...Od};var Oqr=U7(H7.h2.attrs({className:`heading-style-h2`})`
|
|
1807
1807
|
${G9.H2}
|
|
1808
1808
|
${Dd}
|
|
1809
|
-
`);
|
|
1809
|
+
`);Oqr.propTypes={...Od};var kqr=U7(H7.h3.attrs({className:`heading-style-h3`})`
|
|
1810
1810
|
${G9.H3}
|
|
1811
1811
|
${Dd}
|
|
1812
|
-
`);
|
|
1812
|
+
`);kqr.propTypes={...Od};var K9=U7(H7.h4.attrs({className:`heading-style-h4`})`
|
|
1813
1813
|
${G9.H4}
|
|
1814
1814
|
${Dd}
|
|
1815
|
-
`);K9.propTypes={...Od};var
|
|
1815
|
+
`);K9.propTypes={...Od};var Aqr=U7(H7.h5.attrs({className:`heading-style-h5`})`
|
|
1816
1816
|
${G9.H5}
|
|
1817
1817
|
${Dd}
|
|
1818
|
-
`);
|
|
1818
|
+
`);Aqr.propTypes={...Od};var jqr=U7(H7.h6.attrs({className:`heading-style-h6`})`
|
|
1819
1819
|
${G9.H6}
|
|
1820
1820
|
${Dd}
|
|
1821
|
-
`);
|
|
1821
|
+
`);jqr.propTypes={...Od};var Mqr=U7(H7.p`
|
|
1822
1822
|
${G9.LargeSystemText}
|
|
1823
1823
|
${Dd}
|
|
1824
|
-
`);kqr.propTypes={...Od};function Aqr(...e){for(let t of e)if(typeof t==`string`&&t.trim().length>0)return t.trim()}var jqr=`https://apollos.site`;function Mqr(){if(typeof window<`u`){let e=Aqr(window.APOLLOS_WEB_APP_URL,window.APOLLOS_WEB_URL,window.WEB_APP_URL,window.APOLLOS_PUBLIC_APP_URL);if(e)return e}{let e=Aqr(void 0,void 0,void 0,void 0);if(e)return e}return jqr}var Nqr=(0,z.forwardRef)(function({to:e,href:t,isExternal:n,...r},i){let{navigate:a}=mVr(),o=zBr(),s=BBr(),c=HBr(),l=VBr(),u=UBr();if(n&&t||!e)return(0,q.jsx)(`a`,{ref:i,href:t,...r});let d,f=!1,p=e=>typeof e==`string`&&e.startsWith(`/`)?e:`/${e}`,m=e=>typeof e==`string`?e?.split(`/`).filter(Boolean).slice(-1)[0]:null;if(typeof e==`object`){if(!e.contentId)return null;d=e.contentId.split(`:`).join(`-`),f=d?.startsWith(`FeatureFeed-`)}else if(typeof e==`string`){let t=p(e),n=m(t);if(t.includes(`/f/`)){if(!c&&!l){let e=Mqr();return(0,q.jsx)(`a`,{ref:i,...r,href:`${e}${t}`,target:`_blank`,rel:`noopener noreferrer`})}if(!n)return null;d=n.startsWith(`FeatureFeed-`)?n:`FeatureFeed-${n}`,f=!0}else if(t.includes(`/live/`)){if(!n)return null;d=n.startsWith(`Livestream-`)?n:`Livestream-${n}`}else if(n?.includes(`-`))d=n,f=d.startsWith(`FeatureFeed-`);else if(n?.includes(`:`))d=n.split(`:`).join(`-`),f=d.startsWith(`FeatureFeed-`);else return null}else return null;if(!c&&!l)return(0,q.jsx)(`a`,{ref:i,...r,href:`https://apollos.site/@${u}/c/${d}`,target:`_blank`,rel:`noopener noreferrer`});let h=s&&l?`/${f?`af`:`ac`}/${d}`:`?${o?`apollosId`:`id`}=${d}`;return l||(h=`${c}${t}`),(0,q.jsx)(`a`,{ref:i,...r,href:h,onClick:e=>{e.preventDefault(),a({id:d})}})}),Pqr=({children:e})=>(0,q.jsx)(eAe,{useParams:Al,useRevalidator:Gl,children:(0,q.jsx)(Hxe,{linkComponent:Nqr,children:e})}),Fqr=()=>window.localStorage.getItem(`auth-token`)?null:(0,q.jsx)(dVr,{});Fqr.propTypes={};function Iqr(){return Iqr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Iqr.apply(null,arguments)}function Lqr(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Rqr(e,t){return Rqr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rqr(e,t)}function zqr(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Rqr(e,t)}function Bqr(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function Vqr(e,t){e.classList?e.classList.add(t):Bqr(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function Hqr(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function Uqr(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=Hqr(e.className,t):e.setAttribute(`class`,Hqr(e.className&&e.className.baseVal||``,t))}var Wqr={disabled:!1},Gqr=process.env.NODE_ENV===`production`?null:Zy.default.oneOfType([Zy.default.number,Zy.default.shape({enter:Zy.default.number,exit:Zy.default.number,appear:Zy.default.number}).isRequired]),Kqr=process.env.NODE_ENV===`production`?null:Zy.default.oneOfType([Zy.default.string,Zy.default.shape({enter:Zy.default.string,exit:Zy.default.string,active:Zy.default.string}),Zy.default.shape({enter:Zy.default.string,enterDone:Zy.default.string,enterActive:Zy.default.string,exit:Zy.default.string,exitDone:Zy.default.string,exitActive:Zy.default.string})]),qqr=z.createContext(null),Jqr=function(e){return e.scrollTop},Yqr=`unmounted`,q9=`exited`,Xqr=`entering`,Zqr=`entered`,Qqr=`exiting`,J9=function(e){zqr(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=q9,r.appearStatus=Xqr):o=Zqr:o=t.unmountOnExit||t.mountOnEnter?Yqr:q9,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:q9}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=Xqr):(n===`entering`||n===`entered`)&&(t=Qqr)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null){if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:bu.findDOMNode(this);n&&Jqr(n)}this.performEnter(e)}else this.performExit()}else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:Yqr})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[bu.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||Wqr.disabled){this.safeSetState({status:Zqr},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:Xqr},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:Zqr},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:bu.findDOMNode(this);if(!t||Wqr.disabled){this.safeSetState({status:q9},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:Qqr},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:q9},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:bu.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Lqr(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return z.createElement(qqr.Provider,{value:null},typeof n==`function`?n(e,r):z.cloneElement(z.Children.only(n),r))},t}(z.Component);J9.contextType=qqr,J9.propTypes=process.env.NODE_ENV===`production`?{}:{nodeRef:Zy.default.shape({current:typeof Element>`u`?Zy.default.any:function(e,t,n,r,i,a){var o=e[t];return Zy.default.instanceOf(o&&`ownerDocument`in o?o.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,a)}}),children:Zy.default.oneOfType([Zy.default.func.isRequired,Zy.default.element.isRequired]).isRequired,in:Zy.default.bool,mountOnEnter:Zy.default.bool,unmountOnExit:Zy.default.bool,appear:Zy.default.bool,enter:Zy.default.bool,exit:Zy.default.bool,timeout:function(e){var t=Gqr;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.apply(void 0,[e].concat(r))},addEndListener:Zy.default.func,onEnter:Zy.default.func,onEntering:Zy.default.func,onEntered:Zy.default.func,onExit:Zy.default.func,onExiting:Zy.default.func,onExited:Zy.default.func};function Y9(){}J9.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Y9,onEntering:Y9,onEntered:Y9,onExit:Y9,onExiting:Y9,onExited:Y9},J9.UNMOUNTED=Yqr,J9.EXITED=q9,J9.ENTERING=Xqr,J9.ENTERED=Zqr,J9.EXITING=Qqr;var $qr=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Vqr(e,t)})},eJr=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Uqr(e,t)})},tJr=function(e){zqr(t,e);function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&Jqr(e),r&&(this.appliedClasses[t][n]=r,$qr(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&eJr(e,r),i&&eJr(e,i),a&&eJr(e,a)},n.render=function(){var e=this.props;e.classNames;var t=Lqr(e,[`classNames`]);return z.createElement(J9,Iqr({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(z.Component);tJr.defaultProps={classNames:``},tJr.propTypes=process.env.NODE_ENV===`production`?{}:Iqr({},J9.propTypes,{classNames:Kqr,onEnter:Zy.default.func,onEntering:Zy.default.func,onEntered:Zy.default.func,onExit:Zy.default.func,onExiting:Zy.default.func,onExited:Zy.default.func});var nJr={Search:H7(tJr)`
|
|
1824
|
+
`);Mqr.propTypes={...Od};function Nqr(...e){for(let t of e)if(typeof t==`string`&&t.trim().length>0)return t.trim()}var Pqr=`https://apollos.site`;function Fqr(){if(typeof window<`u`){let e=Nqr(window.APOLLOS_WEB_APP_URL,window.APOLLOS_WEB_URL,window.WEB_APP_URL,window.APOLLOS_PUBLIC_APP_URL);if(e)return e}{let e=Nqr(void 0,void 0,void 0,void 0);if(e)return e}return Pqr}var Iqr=(0,z.forwardRef)(function({to:e,href:t,isExternal:n,...r},i){let{navigate:a}=_Vr(),o=HBr(),s=UBr(),c=GBr(),l=WBr(),u=KBr();if(n&&t||!e)return(0,q.jsx)(`a`,{ref:i,href:t,...r});let d,f=!1,p=e=>typeof e==`string`&&e.startsWith(`/`)?e:`/${e}`,m=e=>typeof e==`string`?e?.split(`/`).filter(Boolean).slice(-1)[0]:null;if(typeof e==`object`){if(!e.contentId)return null;d=e.contentId.split(`:`).join(`-`),f=d?.startsWith(`FeatureFeed-`)}else if(typeof e==`string`){let t=p(e),n=m(t);if(t.includes(`/f/`)){if(!c&&!l){let e=Fqr();return(0,q.jsx)(`a`,{ref:i,...r,href:`${e}${t}`,target:`_blank`,rel:`noopener noreferrer`})}if(!n)return null;d=n.startsWith(`FeatureFeed-`)?n:`FeatureFeed-${n}`,f=!0}else if(t.includes(`/live/`)){if(!n)return null;d=n.startsWith(`Livestream-`)?n:`Livestream-${n}`}else if(n?.includes(`-`))d=n,f=d.startsWith(`FeatureFeed-`);else if(n?.includes(`:`))d=n.split(`:`).join(`-`),f=d.startsWith(`FeatureFeed-`);else return null}else return null;if(!c&&!l)return(0,q.jsx)(`a`,{ref:i,...r,href:`https://apollos.site/@${u}/c/${d}`,target:`_blank`,rel:`noopener noreferrer`});let h=s&&l?`/${f?`af`:`ac`}/${d}`:`?${o?`apollosId`:`id`}=${d}`;return l||(h=`${c}${t}`),(0,q.jsx)(`a`,{ref:i,...r,href:h,onClick:e=>{e.preventDefault(),a({id:d})}})}),Lqr=({children:e})=>(0,q.jsx)(eAe,{useParams:Al,useRevalidator:Gl,children:(0,q.jsx)(Hxe,{linkComponent:Iqr,children:e})}),Rqr=()=>window.localStorage.getItem(`auth-token`)?null:(0,q.jsx)(mVr,{});Rqr.propTypes={};function zqr(){return zqr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zqr.apply(null,arguments)}function Bqr(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Vqr(e,t){return Vqr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vqr(e,t)}function Hqr(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Vqr(e,t)}function Uqr(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function Wqr(e,t){e.classList?e.classList.add(t):Uqr(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function Gqr(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function Kqr(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=Gqr(e.className,t):e.setAttribute(`class`,Gqr(e.className&&e.className.baseVal||``,t))}var qqr={disabled:!1},Jqr=process.env.NODE_ENV===`production`?null:Zy.default.oneOfType([Zy.default.number,Zy.default.shape({enter:Zy.default.number,exit:Zy.default.number,appear:Zy.default.number}).isRequired]),Yqr=process.env.NODE_ENV===`production`?null:Zy.default.oneOfType([Zy.default.string,Zy.default.shape({enter:Zy.default.string,exit:Zy.default.string,active:Zy.default.string}),Zy.default.shape({enter:Zy.default.string,enterDone:Zy.default.string,enterActive:Zy.default.string,exit:Zy.default.string,exitDone:Zy.default.string,exitActive:Zy.default.string})]),Xqr=z.createContext(null),Zqr=function(e){return e.scrollTop},Qqr=`unmounted`,q9=`exited`,$qr=`entering`,eJr=`entered`,tJr=`exiting`,J9=function(e){Hqr(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=q9,r.appearStatus=$qr):o=eJr:o=t.unmountOnExit||t.mountOnEnter?Qqr:q9,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:q9}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=$qr):(n===`entering`||n===`entered`)&&(t=tJr)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null){if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:bu.findDOMNode(this);n&&Zqr(n)}this.performEnter(e)}else this.performExit()}else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:Qqr})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[bu.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||qqr.disabled){this.safeSetState({status:eJr},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:$qr},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:eJr},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:bu.findDOMNode(this);if(!t||qqr.disabled){this.safeSetState({status:q9},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:tJr},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:q9},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:bu.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Bqr(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return z.createElement(Xqr.Provider,{value:null},typeof n==`function`?n(e,r):z.cloneElement(z.Children.only(n),r))},t}(z.Component);J9.contextType=Xqr,J9.propTypes=process.env.NODE_ENV===`production`?{}:{nodeRef:Zy.default.shape({current:typeof Element>`u`?Zy.default.any:function(e,t,n,r,i,a){var o=e[t];return Zy.default.instanceOf(o&&`ownerDocument`in o?o.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,a)}}),children:Zy.default.oneOfType([Zy.default.func.isRequired,Zy.default.element.isRequired]).isRequired,in:Zy.default.bool,mountOnEnter:Zy.default.bool,unmountOnExit:Zy.default.bool,appear:Zy.default.bool,enter:Zy.default.bool,exit:Zy.default.bool,timeout:function(e){var t=Jqr;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.apply(void 0,[e].concat(r))},addEndListener:Zy.default.func,onEnter:Zy.default.func,onEntering:Zy.default.func,onEntered:Zy.default.func,onExit:Zy.default.func,onExiting:Zy.default.func,onExited:Zy.default.func};function Y9(){}J9.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Y9,onEntering:Y9,onEntered:Y9,onExit:Y9,onExiting:Y9,onExited:Y9},J9.UNMOUNTED=Qqr,J9.EXITED=q9,J9.ENTERING=$qr,J9.ENTERED=eJr,J9.EXITING=tJr;var nJr=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Wqr(e,t)})},rJr=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Kqr(e,t)})},iJr=function(e){Hqr(t,e);function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&Zqr(e),r&&(this.appliedClasses[t][n]=r,nJr(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&rJr(e,r),i&&rJr(e,i),a&&rJr(e,a)},n.render=function(){var e=this.props;e.classNames;var t=Bqr(e,[`classNames`]);return z.createElement(J9,zqr({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(z.Component);iJr.defaultProps={classNames:``},iJr.propTypes=process.env.NODE_ENV===`production`?{}:zqr({},J9.propTypes,{classNames:Yqr,onEnter:Zy.default.func,onEntering:Zy.default.func,onEntered:Zy.default.func,onExit:Zy.default.func,onExiting:Zy.default.func,onExited:Zy.default.func});var aJr={Search:H7(iJr)`
|
|
1825
1825
|
opacity: 0;
|
|
1826
1826
|
transition: opacity 0.3s ease-in-out;
|
|
1827
1827
|
|
|
1828
1828
|
&.fade-enter-done {
|
|
1829
1829
|
opacity: 1;
|
|
1830
1830
|
}
|
|
1831
|
-
`};function
|
|
1831
|
+
`};function oJr(e){let t=k7();switch(e.type){case`FeatureFeed`:return(0,q.jsx)(tRr,{id:e.featureFeed,...e});case`Search`:return(0,q.jsx)(aJr.Search,{in:!t.loading,timeout:300,classNames:`fade`,unmountOnExit:!0,children:(0,q.jsx)(Eqr,{width:`100%`})});case`Auth`:return(0,q.jsx)(Rqr,{});case`Donation`:return null;default:return(0,q.jsx)(aJr.Search,{in:!t.loading,timeout:300,classNames:`fade`,unmountOnExit:!0,children:(0,q.jsx)(Eqr,{width:`100%`})})}}var sJr=()=>{let e=Array.from(document.querySelectorAll(`.apollos-widget`)||[]),t=WBr();return(0,q.jsx)(gVr,{children:(0,q.jsx)(Lqr,{children:(0,q.jsx)(J7,{children:(0,q.jsxs)(J7,{children:[t?(0,q.jsx)(NVr,{}):(0,q.jsx)(bVr,{}),e.map((e,t)=>{let n=e;return(0,bu.createPortal)((0,q.jsx)(oJr,{type:e.dataset.type,church:e.dataset.church,searchFeed:e.dataset.searchFeed,searchProfileSize:e.dataset.searchProfileSize,hideApollosAuth:e.dataset.hideApollosAuth,featureFeed:e.dataset.featureFeed,modal:e.dataset.modal,emptyPlaceholderText:e.dataset.emptyPlaceholderText},t),n)})]})})})})};sJr.propTypes={};function cJr(){let e=ql();return console.error(e),(0,q.jsxs)(`div`,{id:`error-page`,children:[(0,q.jsx)(`h1`,{children:`Oops!`}),(0,q.jsx)(`p`,{children:`Sorry, an unexpected error has occurred.`}),(0,q.jsx)(`p`,{children:(0,q.jsx)(`i`,{children:e.statusText||e.message})})]})}oo({dsn:void 0});function lJr(){let e=document.querySelector(`[data-search-feed]`),t=document.querySelector(`[data-church]`),n=document.querySelector(`[data-placeholder]`),r=document.querySelector(`[data-use-path-router]`),i=document.querySelector(`[data-apollos-id-param]`),a=e?e.getAttribute(`data-search-feed`):null,o=e?e.getAttribute(`data-search-profile-size`):null,s=e?e.getAttribute(`data-hide-apollos-auth`):null,c=t?t.getAttribute(`data-church`):null,l=n?n.getAttribute(`data-placeholder`):null,u=r?r.getAttribute(`data-use-path-router`)===`true`:!1,d=i?i.getAttribute(`data-apollos-id-param`)===`true`:!1,f=document.querySelectorAll(`[data-apollos-modal]`)?.[0]?.dataset?.apollosModal===`true`,p=document.querySelectorAll(`[data-apollos-route]`)?.[0]?.dataset?.apollosRoute,m=ute([{path:`*`,element:(0,q.jsx)(sJr,{}),errorElement:(0,q.jsx)(cJr,{})},{path:`/ac/:contentId`,element:(0,q.jsx)(sJr,{type:`content`}),errorElement:(0,q.jsx)(cJr,{})},{path:`/af/:feedId`,element:(0,q.jsx)(sJr,{type:`feed`}),errorElement:(0,q.jsx)(cJr,{})}]);return(0,q.jsx)(JBr,{church:c,searchFeed:a,searchProfileSize:o,hideApollosAuth:s,customPlaceholder:l,usePathRouter:u,useApollosIdParam:d,shouldUseModal:f,apollosPageRoute:p,children:(0,q.jsx)(Nee,{router:m})})}var uJr=c({getCLS:()=>vJr,getFCP:()=>bJr,getFID:()=>xJr,getLCP:()=>CJr,getTTFB:()=>wJr}),dJr,fJr,pJr,X9,Z9,mJr,hJr,gJr,_Jr,Q9,$9,vJr,yJr,bJr,xJr,SJr,CJr,wJr,TJr=o((()=>{pJr=function(){return`${Date.now()}-${Math.floor(8999999999999*Math.random())+0xe8d4a51000}`},X9=function(e){return{name:e,value:arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,delta:0,entries:[],id:pJr(),isFinal:!1}},Z9=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch{}},mJr=!1,hJr=!1,gJr=function(e){mJr=!e.persisted},_Jr=function(){addEventListener(`pagehide`,gJr),addEventListener(`beforeunload`,(function(){}))},Q9=function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];hJr||=(_Jr(),!0),addEventListener(`visibilitychange`,(function(t){var n=t.timeStamp;document.visibilityState===`hidden`&&e({timeStamp:n,isUnloading:mJr})}),{capture:!0,once:t})},$9=function(e,t,n,r){var i;return function(){n&&t.isFinal&&n.disconnect(),t.value>=0&&(r||t.isFinal||document.visibilityState===`hidden`)&&(t.delta=t.value-(i||0),(t.delta||t.isFinal||i===void 0)&&(e(t),i=t.value))}},vJr=function(e){var t,n=arguments.length>1&&arguments[1]!==void 0&&arguments[1],r=X9(`CLS`,0),i=function(e){e.hadRecentInput||(r.value+=e.value,r.entries.push(e),t())},a=Z9(`layout-shift`,i);a&&(t=$9(e,r,a,n),Q9((function(e){var n=e.isUnloading;a.takeRecords().map(i),n&&(r.isFinal=!0),t()})))},yJr=function(){return dJr===void 0&&(dJr=document.visibilityState===`hidden`?0:1/0,Q9((function(e){return dJr=e.timeStamp}),!0)),{get timeStamp(){return dJr}}},bJr=function(e){var t,n=X9(`FCP`),r=yJr(),i=Z9(`paint`,(function(e){e.name===`first-contentful-paint`&&e.startTime<r.timeStamp&&(n.value=e.startTime,n.isFinal=!0,n.entries.push(e),t())}));i&&(t=$9(e,n,i))},xJr=function(e){var t=X9(`FID`),n=yJr(),r=function(e){e.startTime<n.timeStamp&&(t.value=e.processingStart-e.startTime,t.entries.push(e),t.isFinal=!0,a())},i=Z9(`first-input`,r),a=$9(e,t,i);i?Q9((function(){i.takeRecords().map(r),i.disconnect()}),!0):window.perfMetrics&&window.perfMetrics.onFirstInputDelay&&window.perfMetrics.onFirstInputDelay((function(e,r){r.timeStamp<n.timeStamp&&(t.value=e,t.isFinal=!0,t.entries=[{entryType:`first-input`,name:r.type,target:r.target,cancelable:r.cancelable,startTime:r.timeStamp,processingStart:r.timeStamp+e}],a())}))},SJr=function(){return fJr||=new Promise((function(e){return[`scroll`,`keydown`,`pointerdown`].map((function(t){addEventListener(t,e,{once:!0,passive:!0,capture:!0})}))})),fJr},CJr=function(e){var t,n=arguments.length>1&&arguments[1]!==void 0&&arguments[1],r=X9(`LCP`),i=yJr(),a=function(e){var n=e.startTime;n<i.timeStamp?(r.value=n,r.entries.push(e)):r.isFinal=!0,t()},o=Z9(`largest-contentful-paint`,a);if(o){t=$9(e,r,o,n);var s=function(){r.isFinal||(o.takeRecords().map(a),r.isFinal=!0,t())};SJr().then(s),Q9(s,!0)}},wJr=function(e){var t,n=X9(`TTFB`);t=function(){try{var t=performance.getEntriesByType(`navigation`)[0]||function(){var e=performance.timing,t={entryType:`navigation`,startTime:0};for(var n in e)n!==`navigationStart`&&n!==`toJSON`&&(t[n]=Math.max(e[n]-e.navigationStart,0));return t}();n.value=n.delta=t.responseStart,n.entries=[t],n.isFinal=!0,e(n)}catch{}},document.readyState===`complete`?setTimeout(t,0):addEventListener(`pageshow`,t)}}));window.process={env:{NODE_ENV:typeof process<`u`&&process.env.NODE_ENV||`production`}},window.document.querySelector(`#apollos-canvas-widget`)||window.document.body.insertAdjacentHTML(`afterbegin`,`<div id="apollos-canvas-widget"></div>`),bte.default.createRoot(document.getElementById(`apollos-canvas-widget`)).render((0,q.jsx)(z.StrictMode,{children:(0,q.jsx)(lJr,{})})),(e=>{e&&e instanceof Function&&Promise.resolve().then(()=>(TJr(),uJr)).then(({getCLS:t,getFID:n,getFCP:r,getLCP:i,getTTFB:a})=>{t(e),n(e),r(e),i(e),a(e)})})()});
|