@apollosproject/canvas-embeds 2.1.494 → 2.1.495
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 +1 -1
package/package.json
CHANGED
package/widget/index.js
CHANGED
|
@@ -1076,7 +1076,7 @@ Example:
|
|
|
1076
1076
|
Perhaps you're looking to import 'styled-components/native'?
|
|
1077
1077
|
Read more about this at https://www.styled-components.com/docs/basics#react-native`),_2.NODE_ENV!=="production"&&_2.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.
|
|
1078
1078
|
|
|
1079
|
-
See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]+=1);function ct(a,e=16){return`${a.split("px")[0]/e}rem`}const UJ1={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)"}}},Ye={breakpoints:{sm:ct("428px"),md:ct("800px"),lg:ct("1280px"),xl:ct("1440px"),xxl:ct("2048px")},colors:UJ1,radii:{xs:ct("2px"),s:ct("4px"),base:ct("6px"),l:ct("10px"),xl:ct("16px"),xxl:ct("30px"),round:ct("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:ct("4px"),xxs:ct("6px"),xs:ct("14px"),s:ct("18px"),base:ct("24px"),l:ct("36px"),xl:ct("48px"),xxl:ct("66px"),xxxl:ct("108px")},timing:{base:"0.132s",l:"0.2s",xl:"0.3s"}},xQ=p.createContext("light"),RQ=p.createContext(null),zQ=()=>{const a=p.useContext(xQ);if(a===void 0)throw new Error("useColorScheme must be used within a ThemeProvider");return a},BJ1=()=>{const a=p.useContext(RQ);if(a===void 0)throw new Error("useTheme must be used within a ThemeProvider");return a},GS=a=>{if(!a)return null;const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return e?`${parseInt(e[1],16)} ${parseInt(e[2],16)} ${parseInt(e[3],16)}`:null},UQ=()=>typeof window>"u"?"light":document.documentElement.classList.contains("dark")||window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";function BQ({theme:a=Ye,...e}){const[r,n]=p.useState(UQ),[l,o]=p.useState({...Ye,colors:{...Ye.colors[r],base:{...Ye.colors[r].base,primary:Ye.colors[r].base.primary,secondary:Ye.colors[r].base.secondary,tertiary:Ye.colors[r].base.tertiary},text:{...Ye.colors[r].text,action:Ye.colors[r].text.action}}}),{currentChurch:c,loading:m,error:u}=Dc(),[h,g]=nJ1();return p.useEffect(()=>{if(typeof window>"u")return;const A=()=>{const O=UQ();O!==r&&n(O)},y=new MutationObserver(A);y.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]});const E=window.matchMedia("(prefers-color-scheme: dark)"),M=O=>{document.documentElement.classList.contains("dark")||n(O.matches?"dark":"light")};return E.addEventListener("change",M),()=>{y.disconnect(),E.removeEventListener("change",M)}},[r]),p.useEffect(()=>{o({...Ye,colors:{...Ye.colors[r],base:{...Ye.colors[r].base,primary:Ye.colors[r].base.primary,secondary:Ye.colors[r].base.secondary,tertiary:Ye.colors[r].base.tertiary},text:{...Ye.colors[r].text,action:Ye.colors[r].text.action}}})},[r]),p.useEffect(()=>{g(tJ1({loading:m}))},[m]),p.useEffect(()=>{var A,y,E,M,O,S,F;if(c&&c.theme)try{const j=JSON.parse(c==null?void 0:c.theme);o({...Ye,colors:{...Ye.colors[r],base:{...Ye.colors[r].base,primary:((A=j==null?void 0:j.colors)==null?void 0:A.primary)||Ye.colors[r].base.primary,secondary:((y=j==null?void 0:j.colors)==null?void 0:y.secondary)||Ye.colors[r].base.secondary,tertiary:((E=j==null?void 0:j.colors)==null?void 0:E.tertiary)||Ye.colors[r].base.tertiary},text:{...Ye.colors[r].text,action:((M=j==null?void 0:j.colors)==null?void 0:M.secondary)||Ye.colors[r].text.action}}});const k=document.documentElement;if((O=j==null?void 0:j.colors)!=null&&O.primary){const N=GS(j.colors.primary);N&&k.style.setProperty("--color-brand-primary",N)}if((S=j==null?void 0:j.colors)!=null&&S.secondary){const N=GS(j.colors.secondary);N&&k.style.setProperty("--color-brand-secondary",N)}if((F=j==null?void 0:j.colors)!=null&&F.tertiary){const N=GS(j.colors.tertiary);N&&k.style.setProperty("--color-brand-tertiary",N)}}catch(j){console.error("ThemeProvider - Error parsing church theme:",j),console.error("ThemeProvider - Raw theme string:",c.theme)}},[c,r]),w.jsx(zJ1,{theme:l,children:w.jsx(xQ.Provider,{value:r,children:w.jsx(RQ.Provider,{value:l,children:e.children})})})}BQ.propTypes={children:j0.node.isRequired,theme:j0.object};const o9=p.createContext({useApollosIdParam:!1,shouldUsePathRouter:!1,shouldUseModal:!1,apollosPageRoute:null,churchSlug:"apollos_global"}),qQ=()=>p.useContext(o9).useApollosIdParam,WQ=()=>p.useContext(o9).shouldUsePathRouter,YS=()=>p.useContext(o9).shouldUseModal,GQ=()=>p.useContext(o9).apollosPageRoute,qJ1=()=>p.useContext(o9).churchSlug;function YQ(a={}){const[e,r]=p.useState(null),[n,l]=p.useState(a.church||"apollos_global");return p.useEffect(()=>{(async()=>{const c=await GX1(n);r(c)})()},[n]),p.useEffect(()=>{const o=document.querySelector(".apollos-widget[data-church]"),c=o==null?void 0:o.getAttribute("data-church");c&&l(c)},[]),p.useEffect(()=>{a.church&&a.church!==n&&l(a.church)},[a.church,n]),e?w.jsx(Jz1,{church:n,children:w.jsx(o9.Provider,{value:{useApollosIdParam:a.useApollosIdParam,shouldUsePathRouter:a.shouldUsePathRouter,shouldUseModal:a.shouldUseModal,apollosPageRoute:a.apollosPageRoute,churchSlug:n},children:w.jsx(_H1,{client:e,...a,children:w.jsx(vx,{children:w.jsx(nX1,{church:n,children:w.jsx(bQ,{church:n,searchFeed:a.searchFeed,searchProfileSize:a.searchProfileSize,hideApollosAuth:a.hideApollosAuth,customPlaceholder:a.customPlaceholder,children:w.jsx(AQ,{children:w.jsx(BQ,{children:a.children})})})})})})})}):null}YQ.propTypes={children:j0.oneOfType([j0.node,j0.func,j0.object]),client:j0.shape({}),customTheme:j0.shape({}),church:j0.string};function QQ({Component:a,options:e,...r}){const{loading:n,error:l,content:o,fetchMore:c}=oW1(e);return w.jsx(a,{data:o,loading:n,error:l,fetchMore:c,...r})}QQ.propTypes={Component:j0.oneOfType([j0.node,j0.func,j0.object]),options:j0.shape({})};const KQ=p.createContext({id:null,navigate:()=>gu}),WJ1=(a={})=>{const[e]=PA1(),{apollosId:r,contentId:n,feedId:l}=Ug1(),o=WQ(),c=YS(),m=$f(),u=GQ(),h=qQ(),g=h?r||n||l||e.get("apollosId"):n||l||e.get("id");let A=()=>gu;return o&&c?A=({id:y}={})=>{const E=y!=null&&y.includes("FeatureFeed")?"feed":"content";m(y?{pathname:`/${E==="content"?"ac":"af"}/${y}`}:{pathname:"/"})}:A=({id:y}={})=>{y?window.location.pathname!==u&&!c&&!o?window.location.href=`${u}?${h?"apollosId":"id"}=${y}`:m({search:`?${h?"apollosId":"id"}=${y}`,...c?{}:{pathname:u}}):m({pathname:"/"})},w.jsx(KQ.Provider,{value:{id:g,navigate:A},children:a.children})},GA=()=>p.useContext(KQ),GJ1=/^[A-Z](\w)+\-/,YJ1=a=>{if(!a)return null;if(GJ1.test(a)){const[r,n]=(a==null?void 0:a.split(/-(.*)/s))??[];if(r&&n)return{type:r,randomId:n}}else{const r=a.split("-").at(-1),n=atob(r),[l,o]=(n==null?void 0:n.split(/-(.*)/s))??[];if(l&&o)return{type:l,randomId:o}}},QJ1=({id:a})=>{const{item:e}=cW1({variables:{id:a}});return w.jsx(Qz1,{content:e})};function KJ1({type:a,id:e}){switch(a){case"MediaContentItem":case"WeekendContentItem":case"Event":case"UniversalContentItem":case"ContentSeriesContentItem":case"Livestream":return w.jsx(QJ1,{id:`${a}:${e}`});case"ContentChannel":{const r={variables:{id:`${a}:${e}`}};return w.jsx(QQ,{Component:uA,options:r})}case"Url":return w.jsx("h1",{children:"External Url"});case"FeatureFeed":return w.jsx(uA,{id:`${a}:${e}`});default:return null}}function XJ1(a){const{type:e,randomId:r}=YJ1(a)??{};return KJ1({type:e,id:r})}var XQ=rw,JQ=XQ?XQ.prototype:void 0;JQ&&JQ.toString;var JJ1=kl;JJ1.isFinite;function e0e(a){if(!a)return null;const e="ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;",r="aaaaaeeeeeiiiiooooouuuunc------";return Array.from(a).map(l=>{const o=[...e].indexOf(l);return o>-1?l.replace(new RegExp(e.charAt(o),"g"),r.charAt(o)):l}).join("").toString().toLowerCase().trim().replace(/\s+/g,"-").replace(/&/g,"").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-")}function YA(a){var n;const[e,r]=(n=a==null?void 0:a.id)==null?void 0:n.split(":");switch(e){case"Event":case"MediaContentItem":case"WeekendContentItem":case"UniversalContentItem":case"ContentChannel":case"FeatureFeed":case"Livestream":case"ContentSeriesContentItem":return a.title?`${e0e(a.title)}-${btoa(`${e}-${r}`)}`:`${e}-${r}`;case"Url":return a.url;default:return console.warn(`Routing for node type ${e} not set up. Please add it to getURLFromType.js`),"/"}}function eK(a){return typeof a!="string"||!a.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(a).toLowerCase())}function tK(a){if(typeof a!="string"||!a.length)return!1;const e=a.match(/^[0-9]{10,10}$/);return e?e.length===1:!1}function t0e(a){return a?a.toLowerCase().replace(/[^a-z0-9\s]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,""):""}function a0e(a,e){if(!a||!e)return!1;const r=t0e(e);return a===r||a===r.replace(/-/g,"_")||a===r.replace(/_/g,"-")}U8`
|
|
1079
|
+
See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]+=1);function ct(a,e=16){return`${a.split("px")[0]/e}rem`}const UJ1={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)"}}},Ye={breakpoints:{sm:ct("428px"),md:ct("800px"),lg:ct("1280px"),xl:ct("1440px"),xxl:ct("2048px")},colors:UJ1,radii:{xs:ct("2px"),s:ct("4px"),base:ct("6px"),l:ct("10px"),xl:ct("16px"),xxl:ct("30px"),round:ct("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:ct("4px"),xxs:ct("6px"),xs:ct("14px"),s:ct("18px"),base:ct("24px"),l:ct("36px"),xl:ct("48px"),xxl:ct("66px"),xxxl:ct("108px")},timing:{base:"0.132s",l:"0.2s",xl:"0.3s"}},xQ=p.createContext("light"),RQ=p.createContext(null),zQ=()=>{const a=p.useContext(xQ);if(a===void 0)throw new Error("useColorScheme must be used within a ThemeProvider");return a},BJ1=()=>{const a=p.useContext(RQ);if(a===void 0)throw new Error("useTheme must be used within a ThemeProvider");return a},GS=a=>{if(!a)return null;const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return e?`${parseInt(e[1],16)} ${parseInt(e[2],16)} ${parseInt(e[3],16)}`:null},UQ=()=>{if(typeof window>"u")return"light";const a=document.documentElement;return a.classList.contains("dark")?"dark":a.classList.contains("light")?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"};function BQ({theme:a=Ye,...e}){const[r,n]=p.useState(UQ),[l,o]=p.useState({...Ye,colors:{...Ye.colors[r],base:{...Ye.colors[r].base,primary:Ye.colors[r].base.primary,secondary:Ye.colors[r].base.secondary,tertiary:Ye.colors[r].base.tertiary},text:{...Ye.colors[r].text,action:Ye.colors[r].text.action}}}),{currentChurch:c,loading:m,error:u}=Dc(),[h,g]=nJ1();return p.useEffect(()=>{if(typeof window>"u")return;const A=()=>{const O=UQ();O!==r&&n(O)},y=new MutationObserver(A);y.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]});const E=window.matchMedia("(prefers-color-scheme: dark)"),M=O=>{const S=document.documentElement;!S.classList.contains("dark")&&!S.classList.contains("light")&&n(O.matches?"dark":"light")};return E.addEventListener("change",M),()=>{y.disconnect(),E.removeEventListener("change",M)}},[r]),p.useEffect(()=>{o({...Ye,colors:{...Ye.colors[r],base:{...Ye.colors[r].base,primary:Ye.colors[r].base.primary,secondary:Ye.colors[r].base.secondary,tertiary:Ye.colors[r].base.tertiary},text:{...Ye.colors[r].text,action:Ye.colors[r].text.action}}})},[r]),p.useEffect(()=>{g(tJ1({loading:m}))},[m]),p.useEffect(()=>{var A,y,E,M,O,S,F;if(c&&c.theme)try{const j=JSON.parse(c==null?void 0:c.theme);o({...Ye,colors:{...Ye.colors[r],base:{...Ye.colors[r].base,primary:((A=j==null?void 0:j.colors)==null?void 0:A.primary)||Ye.colors[r].base.primary,secondary:((y=j==null?void 0:j.colors)==null?void 0:y.secondary)||Ye.colors[r].base.secondary,tertiary:((E=j==null?void 0:j.colors)==null?void 0:E.tertiary)||Ye.colors[r].base.tertiary},text:{...Ye.colors[r].text,action:((M=j==null?void 0:j.colors)==null?void 0:M.secondary)||Ye.colors[r].text.action}}});const k=document.documentElement;if((O=j==null?void 0:j.colors)!=null&&O.primary){const N=GS(j.colors.primary);N&&k.style.setProperty("--color-brand-primary",N)}if((S=j==null?void 0:j.colors)!=null&&S.secondary){const N=GS(j.colors.secondary);N&&k.style.setProperty("--color-brand-secondary",N)}if((F=j==null?void 0:j.colors)!=null&&F.tertiary){const N=GS(j.colors.tertiary);N&&k.style.setProperty("--color-brand-tertiary",N)}}catch(j){console.error("ThemeProvider - Error parsing church theme:",j),console.error("ThemeProvider - Raw theme string:",c.theme)}},[c,r]),w.jsx(zJ1,{theme:l,children:w.jsx(xQ.Provider,{value:r,children:w.jsx(RQ.Provider,{value:l,children:e.children})})})}BQ.propTypes={children:j0.node.isRequired,theme:j0.object};const o9=p.createContext({useApollosIdParam:!1,shouldUsePathRouter:!1,shouldUseModal:!1,apollosPageRoute:null,churchSlug:"apollos_global"}),qQ=()=>p.useContext(o9).useApollosIdParam,WQ=()=>p.useContext(o9).shouldUsePathRouter,YS=()=>p.useContext(o9).shouldUseModal,GQ=()=>p.useContext(o9).apollosPageRoute,qJ1=()=>p.useContext(o9).churchSlug;function YQ(a={}){const[e,r]=p.useState(null),[n,l]=p.useState(a.church||"apollos_global");return p.useEffect(()=>{(async()=>{const c=await GX1(n);r(c)})()},[n]),p.useEffect(()=>{const o=document.querySelector(".apollos-widget[data-church]"),c=o==null?void 0:o.getAttribute("data-church");c&&l(c)},[]),p.useEffect(()=>{a.church&&a.church!==n&&l(a.church)},[a.church,n]),e?w.jsx(Jz1,{church:n,children:w.jsx(o9.Provider,{value:{useApollosIdParam:a.useApollosIdParam,shouldUsePathRouter:a.shouldUsePathRouter,shouldUseModal:a.shouldUseModal,apollosPageRoute:a.apollosPageRoute,churchSlug:n},children:w.jsx(_H1,{client:e,...a,children:w.jsx(vx,{children:w.jsx(nX1,{church:n,children:w.jsx(bQ,{church:n,searchFeed:a.searchFeed,searchProfileSize:a.searchProfileSize,hideApollosAuth:a.hideApollosAuth,customPlaceholder:a.customPlaceholder,children:w.jsx(AQ,{children:w.jsx(BQ,{children:a.children})})})})})})})}):null}YQ.propTypes={children:j0.oneOfType([j0.node,j0.func,j0.object]),client:j0.shape({}),customTheme:j0.shape({}),church:j0.string};function QQ({Component:a,options:e,...r}){const{loading:n,error:l,content:o,fetchMore:c}=oW1(e);return w.jsx(a,{data:o,loading:n,error:l,fetchMore:c,...r})}QQ.propTypes={Component:j0.oneOfType([j0.node,j0.func,j0.object]),options:j0.shape({})};const KQ=p.createContext({id:null,navigate:()=>gu}),WJ1=(a={})=>{const[e]=PA1(),{apollosId:r,contentId:n,feedId:l}=Ug1(),o=WQ(),c=YS(),m=$f(),u=GQ(),h=qQ(),g=h?r||n||l||e.get("apollosId"):n||l||e.get("id");let A=()=>gu;return o&&c?A=({id:y}={})=>{const E=y!=null&&y.includes("FeatureFeed")?"feed":"content";m(y?{pathname:`/${E==="content"?"ac":"af"}/${y}`}:{pathname:"/"})}:A=({id:y}={})=>{y?window.location.pathname!==u&&!c&&!o?window.location.href=`${u}?${h?"apollosId":"id"}=${y}`:m({search:`?${h?"apollosId":"id"}=${y}`,...c?{}:{pathname:u}}):m({pathname:"/"})},w.jsx(KQ.Provider,{value:{id:g,navigate:A},children:a.children})},GA=()=>p.useContext(KQ),GJ1=/^[A-Z](\w)+\-/,YJ1=a=>{if(!a)return null;if(GJ1.test(a)){const[r,n]=(a==null?void 0:a.split(/-(.*)/s))??[];if(r&&n)return{type:r,randomId:n}}else{const r=a.split("-").at(-1),n=atob(r),[l,o]=(n==null?void 0:n.split(/-(.*)/s))??[];if(l&&o)return{type:l,randomId:o}}},QJ1=({id:a})=>{const{item:e}=cW1({variables:{id:a}});return w.jsx(Qz1,{content:e})};function KJ1({type:a,id:e}){switch(a){case"MediaContentItem":case"WeekendContentItem":case"Event":case"UniversalContentItem":case"ContentSeriesContentItem":case"Livestream":return w.jsx(QJ1,{id:`${a}:${e}`});case"ContentChannel":{const r={variables:{id:`${a}:${e}`}};return w.jsx(QQ,{Component:uA,options:r})}case"Url":return w.jsx("h1",{children:"External Url"});case"FeatureFeed":return w.jsx(uA,{id:`${a}:${e}`});default:return null}}function XJ1(a){const{type:e,randomId:r}=YJ1(a)??{};return KJ1({type:e,id:r})}var XQ=rw,JQ=XQ?XQ.prototype:void 0;JQ&&JQ.toString;var JJ1=kl;JJ1.isFinite;function e0e(a){if(!a)return null;const e="ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;",r="aaaaaeeeeeiiiiooooouuuunc------";return Array.from(a).map(l=>{const o=[...e].indexOf(l);return o>-1?l.replace(new RegExp(e.charAt(o),"g"),r.charAt(o)):l}).join("").toString().toLowerCase().trim().replace(/\s+/g,"-").replace(/&/g,"").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-")}function YA(a){var n;const[e,r]=(n=a==null?void 0:a.id)==null?void 0:n.split(":");switch(e){case"Event":case"MediaContentItem":case"WeekendContentItem":case"UniversalContentItem":case"ContentChannel":case"FeatureFeed":case"Livestream":case"ContentSeriesContentItem":return a.title?`${e0e(a.title)}-${btoa(`${e}-${r}`)}`:`${e}-${r}`;case"Url":return a.url;default:return console.warn(`Routing for node type ${e} not set up. Please add it to getURLFromType.js`),"/"}}function eK(a){return typeof a!="string"||!a.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(a).toLowerCase())}function tK(a){if(typeof a!="string"||!a.length)return!1;const e=a.match(/^[0-9]{10,10}$/);return e?e.length===1:!1}function t0e(a){return a?a.toLowerCase().replace(/[^a-z0-9\s]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,""):""}function a0e(a,e){if(!a||!e)return!1;const r=t0e(e);return a===r||a===r.replace(/-/g,"_")||a===r.replace(/_/g,"-")}U8`
|
|
1080
1080
|
mutation interactWithNodeEmbeds(
|
|
1081
1081
|
$nodeId: ID!
|
|
1082
1082
|
$action: InteractionAction!
|