(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9747],{67028:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/community/collections/[slug]",function(){return n(77697)}])},56967:function(e,t,n){"use strict";n.d(t,{Z:function(){return ThreadBreadcrumb}});var o=n(85893),l=n(45697),i=n.n(l),a=n(51882),r=n(67329);function ThreadBreadcrumb(e){var t=e.heading;return(0,o.jsx)("div",{className:"w-full",children:(0,o.jsx)(r.Z,{href:"/community",children:(0,o.jsx)(a.Z,{background:!0,className:"mb-fixed-xl",iconBg:"white",iconSize:"sm",item:{heading:t,icon:"arrow-left"},scaleIcons:"inline",themeColor:"grey-20"})})})}ThreadBreadcrumb.defaultProps={heading:"Learn to Loom"},ThreadBreadcrumb.propTypes={heading:i().string}},12387:function(e,t,n){"use strict";n.d(t,{Z:function(){return ThreadTestimonialCard}});var o=n(85893),l=n(93967),i=n.n(l),a=n(45697),r=n.n(a),d=n(55395);function TestimonialQuotation(e){var t=e.font,n=e.quotation,l=e.lineLength,a=e.transparent;return(0,o.jsx)("blockquote",{className:i()((0,d.h)(t).heading,a?"text-center":"md:text-center","thd-quote py-lg",l?"thd-max-".concat(l):"thd-max-2xl"),children:n})}var s=n(99577),u=n(30867),c=n(72917),m=n(33322),h=n(13608),v=n(84834);function ThreadTestimonialCard(e){var t,n,l,a,r,d,g,f,b,p=e.card,x=e.caseStudy,y=e.className,_=e.font,C=e.hideAvatar,T=e.hideLogos,j=e.themeColor,w=e.themeColorMode,N="white"===j,L=null==p?void 0:null===(a=p.logo)||void 0===a?void 0:null===(l=a.image)||void 0===l?void 0:null===(n=l.asset)||void 0===n?void 0:null===(t=n.metadata)||void 0===t?void 0:t.dimensions,Z=null==L?void 0:L.aspectRatio,k=(0,c.Z)(90,30,{aspectRatio:Z,type:"horizontal-optimized"}),S=k.width,D=k.height,E="".concat(j,"-").concat({dark:"90",light:"10"}[w]),A="".concat(j,"-").concat({dark:"10",light:"90"}[w]);return(0,o.jsx)("figure",{className:i()(y,(0,m.b)(E).headerText,(0,m.b)(E).bg,"mx-auto thd-rounded-static",!N&&"p-fluid-sm lg:p-fluid-lg"),children:(0,o.jsxs)("div",{className:i()(N?"items-center":"md:items-center","flex flex-col justify-center md:h-full md:px-0"),style:{"--filter-color":null===(r=(0,m.b)(E))||void 0===r?void 0:r.logoFilter,"--logo-height":D?D+"px":null,"--logo-width":S?S+"px":null},children:[x&&(null==p?void 0:p.byline)&&(0,o.jsx)(u.Z,{byline:null==p?void 0:p.byline,themeColor:E}),(null==p?void 0:null===(d=p.logo)||void 0===d?void 0:d.image)&&!x&&!T&&(0,o.jsx)("img",{alt:null==p?void 0:null===(g=p.byline)||void 0===g?void 0:g.company,className:"thd-filter thd-logo w-full h-full",height:D,src:(0,h.ZP)(null==p?void 0:null===(f=p.logo)||void 0===f?void 0:f.image).url(),width:S,loading:"lazy"}),(null==p?void 0:p.quotation)&&(0,o.jsx)(TestimonialQuotation,{font:_,quotation:null==p?void 0:p.quotation,transparent:N}),!x&&(null==p?void 0:p.byline)&&(0,o.jsx)(u.Z,{byline:null==p?void 0:p.byline,hideAvatar:C,themeColor:E,transparent:N}),x&&(0,o.jsx)(s.Z,{buttonType:"secondary",color:A,cta:{link:"/customers/".concat((0,v.Z)(null==p?void 0:null===(b=p.byline)||void 0===b?void 0:b.company)),copy:"View Case Study"},size:"lg",type:"primary"})]})})}ThreadTestimonialCard.propTypes={card:r().object.isRequired,caseStudy:r().bool,className:r().string,font:r().string,hideAvatar:r().bool,hideLogos:r().bool,themeColor:r().string,themeColorMode:r().string},ThreadTestimonialCard.defaultProps={caseStudy:!1,themeColor:"violet",themeColorMode:"light",font:"xs"}},13736:function(e,t,n){"use strict";n.d(t,{Z:function(){return ThreadTestimonialCarousel}});var o=n(24043),l=n(85893),i=n(80868),a=n(45697),r=n.n(a),d=n(34297),s=n(93967),u=n.n(s),c=n(67294),m=n(12387),h=n(33322),v=n(22828),g=n.n(v);function ThreadTestimonialCarousel(e){var t,n=e.bgVar,a=e.cards,r=e.className,s=e.font,v=e.lineLength,f=e.themeColorMode,b=e.hideLogos,p=(0,o._)((0,c.useState)(1),2),x=p[0],y=p[1],_=(0,o._)((0,c.useState)(!0),2),C=_[0],T=_[1];(0,c.useEffect)(function(){(1===x||x===a.length)&&T(!0)},[x,1,a.length]);var prev=function(){x>0&&y(function(e){return e-1})},j={0:"violet",1:"blue",2:"magenta",3:"green",4:"violet",5:"blue",6:"magenta",7:"green",8:"violet",9:"blue",10:"magenta",11:"green"},w=c.cloneElement((0,l.jsx)(m.Z,{card:a[0],font:s,index:-1===x,themeColor:j[0],themeColorMode:f},"cloneFirst")),N=c.cloneElement((0,l.jsx)(m.Z,{card:a[a.length-1],font:s,index:x===a.length,prev:prev,style:{transform:"translate3d(-100%, 0, 0)"},themeColor:j[(null==a?void 0:a.length)-1],themeColorMode:f},"cloneLast")),handleTransitionEnd=function(){0===x?(T(!1),y(a.length)):x===a.length+1&&(T(!1),y(1))};return(0,l.jsx)("section",{className:u()(g().container,r,"sm:gap-fluid-sm pb-fluid-lg lg:pb-0 lg:mb-fluid-lg overflow-x-hidden"),style:{"--gradientColor":n},children:(0,l.jsxs)("div",{className:"flex relative h-full w-full",children:[(0,l.jsx)("button",{"aria-label":"Previous testimonial",className:g().left,onClick:prev,type:"button",children:(0,l.jsx)(d.Z,{icon:(0,l.jsx)(i.Z,{}),size:"1.5em"})}),(0,l.jsx)("div",{className:"flex h-full w-full overflow-hidden",children:(0,l.jsxs)("div",{className:u()(g().content),onTransitionEnd:function(){return handleTransitionEnd()},style:{"--cardCount":a.length+2,"--transformValue":x,transition:C?void 0:"none","--curtainGradient":null===(t=(0,h.b)(null!=n?n:"white"))||void 0===t?void 0:t.bgVar},children:[N,null==a?void 0:a.map(function(e,t){return(0,l.jsx)(m.Z,{hideLogos:b,card:e,font:s,index:x===t+1,lineLength:v,themeColor:j[t],themeColorMode:f},t)}),w]})}),(0,l.jsx)("button",{"aria-label":"Next testimonial",className:g().right,onClick:function(){xslug.current)[@ in [$slug]]) > 0 && (\n _createdAt < $lastCreatedAt\n || (_createdAt == $lastCreatedAt && _id > $lastId)\n )] | order(_createdAt desc) [0...44] {\n "loomPage": *[_type=="learnLoomTemplate" && references(^._id)] {\n "slug": meta.slug.current,\n },\n _id,\n length,\n _createdAt,\n meta,\n categories[]->,\n loom {\n ...,\n thumbnail {\n altText,\n asset-> {\n url,\n metadata {\n dimensions {\n height,\n width\n }\n },\n }\n },\n },\n author-> {\n ...,\n avatar {\n altText,\n asset-> {\n url,\n metadata {\n dimensions {\n height,\n width\n }\n },\n }\n }\n },\n }\n}\n']);return _templateObject=function(){return e},e}var D=v()(function(){return Promise.all([n.e(8570),n.e(8247)]).then(n.bind(n,78247))},{loadableGenerated:{webpack:function(){return[78247]}}}),E=m()(_templateObject()),A=!0;function LearnCategoryTemplate(e){var t,n,i,s,c,m,h,v,A,P,M,B,O,q,z,I,V=e.accountNavData,$=e.eopData,F=e.footerNavData,R=e.initialData,G=e.logoData,U=e.navData,J=e.postData,Q=e.testimonialData,X=null==R?void 0:R.$slug,H=(0,l._)((0,g.useState)(J?J.looms:[]),2),K=H[0],W=H[1],Y=(0,l._)((0,g.useState)((null==J?void 0:null===(n=J.looms)||void 0===n?void 0:n.length)>0?J.looms[J.looms.length-1]._createdAt:""),2),ee=Y[0],et=Y[1],en=(0,l._)((0,g.useState)((null==J?void 0:null===(i=J.looms)||void 0===i?void 0:i.length)>0?J.looms[J.looms.length-1]._id:null),2),eo=en[0],el=en[1],ei=(0,l._)((0,g.useState)([]),2),ea=ei[0],er=ei[1],ed=(0,g.useRef)();(0,g.useMemo)(function(){var e=(null==R?void 0:R.pinnedLooms)||[];er(e.filter(function(e){return!!e}).map(function(e){return e.loom._id}));var t=(null==J?void 0:J.looms)||[];ea.length&&t.length&&(t=t.filter(function(e){var t=e._id;return!ea.includes(t)})),W((0,a._)(e).concat((0,a._)(t)))},[J,W,R,er]);var es=(t=(0,o._)(function(){var e;return(0,r.Jh)(this,function(t){switch(t.label){case 0:if(null===eo)return[2,[]];return[4,(0,k.gn)(E,{lastCreatedAt:ee,lastId:eo,slug:X})];case 1:return(null==(e=t.sent().looms)?void 0:e.length)>0?(et(e[e.length-1]._createdAt),el(e[e.length-1]._id),ea.length&&(e=e.filter(function(e){var t=e._id;return!ea.includes(t)})),W((0,a._)(K).concat((0,a._)(e)))):el(null),[2]}})}),function(){return t.apply(this,arguments)});(0,g.useEffect)(function(){if(ed&&ed.current){var e=new IntersectionObserver(function(e){e.some(function(e){return e.isIntersecting})&&es()},{threshold:.1});return ed.current&&e.observe(ed.current),function(){return e.disconnect()}}},[ed,es]);var eu=(null==R?void 0:R.category)&&(null==R?void 0:null===(s=R.category)||void 0===s?void 0:s._id)==="bb7a0cbb-1c2f-42c4-b6f8-048507de3390";return((0,g.useEffect)(function(){var e,t,n=(0,S.Z)();(0,N.L9)(w.lJ,{source:"Learn to Loom Page ".concat(X),category:null==R?void 0:null===(e=R.category)||void 0===e?void 0:e.title,isCommunityCollection:eu,tempBulkTestUuid:n}),(0,L._)("track",{action:"visit",actionSubject:w.c0,attributes:{eventSource:"Learn to Loom Page ".concat(X),category:null==R?void 0:null===(t=R.category)||void 0===t?void 0:t.title,isCommunityCollection:eu,tempBulkTestUuid:n}})},[X]),null==R?void 0:R.category)?(0,d.jsxs)(b.Z,{accountNavData:V,footerNavData:F,name:"Learn to Loom Category [".concat(null==R?void 0:null===(m=R.meta)||void 0===m?void 0:null===(c=m.slug)||void 0===c?void 0:c.current,"]"),navData:U,children:[(0,d.jsx)(x.Z,{data:null==R?void 0:R.meta,customDescription:null!==(I=null==R?void 0:null===(h=R.meta)||void 0===h?void 0:h.description)&&void 0!==I?I:(0,f.blockContentToPlainText)(null==R?void 0:null===(v=R.category)||void 0===v?void 0:v.description),customOgImage:"https://cdn.sanity.io/images/pvn35iyy/production/74d348fb150b2f37076655b04c36ddf68eed23d5-1200x675.png",customTitle:"".concat(null==R?void 0:null===(A=R.category)||void 0===A?void 0:A.title," | From The Loom Community | Community"),url:"https://patgrady.indiedemos.com/community/collections/".concat(null==R?void 0:null===(M=R.meta)||void 0===M?void 0:null===(P=M.slug)||void 0===P?void 0:P.current)}),(0,d.jsxs)("section",{className:"mx-auto mb-fluid-lg relative pt-fluid-md overflow-hidden translate-x-0",children:[(0,d.jsx)("div",{className:"absolute h-full left-0 pointer-events-none overflow-hidden top-0 w-full",children:(0,d.jsx)("div",{className:u()("thd-gradient-bubble-t",null===(B=(0,Z.b)("violet-20"))||void 0===B?void 0:B.bg)})}),(0,d.jsxs)("div",{className:"thd-container-max",children:[(0,d.jsx)(_.Z,{heading:"Community"}),(0,d.jsx)(T.Z,{bFont:"lg",gap:"mb-md",hFont:"xl",hLevel:"h1",header:{heading:null==R?void 0:null===(O=R.category)||void 0===O?void 0:O.title,subhead:null==R?void 0:null===(q=R.category)||void 0===q?void 0:q.description}})]}),(0,d.jsx)(p.Z,{allowInfiniteScroll:!0,cards:K,heading:null==R?void 0:null===(z=R.recommendedBlock)||void 0===z?void 0:z.heading,section:"collection",showCommunity:!0,showVideoCount:"12"}),eo?(0,d.jsx)("div",{ref:ed}):null]}),G&&(0,d.jsx)(y.Z,{data:G,gradient:!0,lineLength:"xl",themeColor:"grey-10"}),Q&&(0,d.jsx)(j.Z,{cards:null==Q?void 0:Q.list,className:"mb-fluid-lg",themeColorMode:"light"}),(null==$?void 0:$.cta)?(0,d.jsx)(C.Z,{cta:null==$?void 0:$.cta,heading:null==$?void 0:$.heading}):(0,d.jsx)("div",{className:"h-fluid-lg thd-prefooter",style:{"--footer-bg":"var(--thd-color-violet-10)"}})]}):(0,d.jsx)(D,{})}},22828:function(e){e.exports={container:"ThreadTestimonialCarousel_container__3hu57",left:"ThreadTestimonialCarousel_left__ioRt3",right:"ThreadTestimonialCarousel_right__9bhB0",content:"ThreadTestimonialCarousel_content__ODboU",avatar:"ThreadTestimonialCarousel_avatar__3d3SV"}}},function(e){e.O(0,[3662,4526,2842,476,4762,3003,1866,174,7837,6671,2361,2703,327,2315,9774,2888,179],function(){return e(e.s=67028)}),_N_E=e.O()}]);