(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5884,4964],{6803:function(t){var e;e=function(){function t(){return(t=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=Array(e);n=t.length?{done:!0}:{done:!1,value:t[n++]}};throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=t[Symbol.iterator]()).next.bind(n)}(i);!(n=r()).done;){var o=n.value,a=o[0],s=o[1];if(t===a||t===s)return a}return t}(a)]=n[a]);return new l(this,t({baseUrl:r},o))},c.image=function(t){return this.withOptions({source:t})},c.dataset=function(t){return this.withOptions({dataset:t})},c.projectId=function(t){return this.withOptions({projectId:t})},c.bg=function(t){return this.withOptions({bg:t})},c.dpr=function(t){return this.withOptions({dpr:t})},c.width=function(t){return this.withOptions({width:t})},c.height=function(t){return this.withOptions({height:t})},c.focalPoint=function(t,e){return this.withOptions({focalPoint:{x:t,y:e}})},c.maxWidth=function(t){return this.withOptions({maxWidth:t})},c.minWidth=function(t){return this.withOptions({minWidth:t})},c.maxHeight=function(t){return this.withOptions({maxHeight:t})},c.minHeight=function(t){return this.withOptions({minHeight:t})},c.size=function(t,e){return this.withOptions({width:t,height:e})},c.blur=function(t){return this.withOptions({blur:t})},c.sharpen=function(t){return this.withOptions({sharpen:t})},c.rect=function(t,e,n,r){return this.withOptions({rect:{left:t,top:e,width:n,height:r}})},c.format=function(t){return this.withOptions({format:t})},c.invert=function(t){return this.withOptions({invert:t})},c.orientation=function(t){return this.withOptions({orientation:t})},c.quality=function(t){return this.withOptions({quality:t})},c.forceDownload=function(t){return this.withOptions({download:t})},c.flipHorizontal=function(){return this.withOptions({flipHorizontal:!0})},c.flipVertical=function(){return this.withOptions({flipVertical:!0})},c.ignoreImageParams=function(){return this.withOptions({ignoreImageParams:!0})},c.fit=function(t){if(-1===o.indexOf(t))throw Error('Invalid fit mode "'+t+'"');return this.withOptions({fit:t})},c.crop=function(t){if(-1===a.indexOf(t))throw Error('Invalid crop mode "'+t+'"');return this.withOptions({crop:t})},c.saturation=function(t){return this.withOptions({saturation:t})},c.auto=function(t){if(-1===s.indexOf(t))throw Error('Invalid auto mode "'+t+'"');return this.withOptions({auto:t})},c.pad=function(t){return this.withOptions({pad:t})},c.url=function(){return function(e){var o=t({},e||{}),a=o.source;delete o.source;var s=function(e){var n;if(!e)return null;if("string"==typeof e&&/^https?:\/\//.test(""+e))n={asset:{_ref:r(e)}};else if("string"==typeof e)n={asset:{_ref:e}};else if(e&&"string"==typeof e._ref)n={asset:e};else if(e&&"string"==typeof e._id)n={asset:{_ref:e._id||""}};else if(e&&e.asset&&"string"==typeof e.asset.url)n={asset:{_ref:r(e.asset.url)}};else{if("object"!=typeof e.asset)return null;n=e}return e.crop&&(n.crop=e.crop),e.hotspot&&(n.hotspot=e.hotspot),function(e){if(e.crop&&e.hotspot)return e;var n=t({},e);return n.crop||(n.crop={left:0,top:0,bottom:0,right:0}),n.hotspot||(n.hotspot={x:.5,y:.5,height:1,width:1}),n}(n)}(a);if(!s)return null;var l=function(t){var e=t.split("-"),r=e[1],i=e[2],o=e[3];if(!r||!i||!o)throw Error("Malformed asset _ref '"+t+"'. Expected an id like \""+n+'".');var a=i.split("x"),s=a[0],l=a[1],c=+s,u=+l;if(!(isFinite(c)&&isFinite(u)))throw Error("Malformed asset _ref '"+t+"'. Expected an id like \""+n+'".');return{id:r,width:c,height:u,format:o}}(s.asset._ref||s.asset._id||""),c=Math.round(s.crop.left*l.width),u=Math.round(s.crop.top*l.height),d={left:c,top:u,width:Math.round(l.width-s.crop.right*l.width-c),height:Math.round(l.height-s.crop.bottom*l.height-u)},h=s.hotspot.height*l.height/2,f=s.hotspot.width*l.width/2,m=s.hotspot.x*l.width,p=s.hotspot.y*l.height;return o.rect||o.focalPoint||o.ignoreImageParams||o.crop||(o=t(t({},o),function(t,e){var n,r=e.width,i=e.height;if(!(r&&i))return{width:r,height:i,rect:t.crop};var o=t.crop,a=t.hotspot,s=r/i;if(o.width/o.height>s){var l=o.height,c=l*s,u=o.top,d=(a.right-a.left)/2+a.left-c/2;do.left+o.width&&(d=o.left+o.width-c),n={left:Math.round(d),top:Math.round(u),width:Math.round(c),height:Math.round(l)}}else{var h=o.width,f=h/s,m=o.left,p=(a.bottom-a.top)/2+a.top-f/2;po.top+o.height&&(p=o.top+o.height-f),n={left:Math.max(0,Math.floor(m)),top:Math.max(0,Math.floor(p)),width:Math.round(h),height:Math.round(f)}}return{width:r,height:i,rect:n}}({crop:d,hotspot:{left:m-f,top:p-h,right:m+f,bottom:p+h}},o))),function(t){var e=t.baseUrl||"https://cdn.sanity.io",n=t.asset.id+"-"+t.asset.width+"x"+t.asset.height+"."+t.asset.format,r=e+"/images/"+t.projectId+"/"+t.dataset+"/"+n,o=[];if(t.rect){var a=t.rect,s=a.left,l=a.top,c=a.width,u=a.height;(0!==s||0!==l||u!==t.asset.height||c!==t.asset.width)&&o.push("rect="+s+","+l+","+c+","+u)}t.bg&&o.push("bg="+t.bg),t.focalPoint&&(o.push("fp-x="+t.focalPoint.x),o.push("fp-y="+t.focalPoint.y));var d=[t.flipHorizontal&&"h",t.flipVertical&&"v"].filter(Boolean).join("");return(d&&o.push("flip="+d),i.forEach(function(e){var n=e[0],r=e[1];void 0!==t[n]?o.push(r+"="+encodeURIComponent(t[n])):void 0!==t[r]&&o.push(r+"="+encodeURIComponent(t[r]))}),0===o.length)?r:r+"?"+o.join("&")}(t(t({},o),{},{asset:l}))}(this.options)},c.toString=function(){return this.url()},l}();return function(t){if(t&&"object"==typeof t.clientConfig){var e=t.clientConfig,n=e.apiHost,r=e.projectId,i=e.dataset;return new l(null,{baseUrl:(n||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:r,dataset:i})}return new l(null,t)}},t.exports=e()},12870:function(t){"use strict";t.exports=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r0&&w(function(t){return t-1})},k={0:"violet",1:"blue",2:"magenta",3:"green",4:"violet",5:"blue",6:"magenta",7:"green",8:"violet",9:"blue",10:"magenta",11:"green"},O=d.cloneElement((0,i.jsx)(h.Z,{card:a[0],font:c,index:-1===b,themeColor:k[0],themeColorMode:g},"cloneFirst")),S=d.cloneElement((0,i.jsx)(h.Z,{card:a[a.length-1],font:c,index:b===a.length,prev:N,style:{transform:"translate3d(-100%, 0, 0)"},themeColor:k[(null==a?void 0:a.length)-1],themeColorMode:g},"cloneLast")),C=function(){0===b?(M(!1),w(a.length)):b===a.length+1&&(M(!1),w(1))};return(0,i.jsx)("section",{className:u()(p().container,s,"sm:gap-fluid-sm pb-fluid-lg lg:pb-0 lg:mb-fluid-lg overflow-x-hidden"),style:{"--gradientColor":n},children:(0,i.jsxs)("div",{className:"flex relative h-full w-full",children:[(0,i.jsx)("button",{"aria-label":"Previous testimonial",className:p().left,onClick:N,type:"button",children:(0,i.jsx)(l.Z,{icon:(0,i.jsx)(o.Z,{}),size:"1.5em"})}),(0,i.jsx)("div",{className:"flex h-full w-full overflow-hidden",children:(0,i.jsxs)("div",{className:u()(p().content),onTransitionEnd:function(){return C()},style:{"--cardCount":a.length+2,"--transformValue":b,transition:j?void 0:"none","--curtainGradient":null===(e=(0,f.b)(null!=n?n:"white"))||void 0===e?void 0:e.bgVar},children:[S,null==a?void 0:a.map(function(t,e){return(0,i.jsx)(h.Z,{hideLogos:v,card:t,font:c,index:b===e+1,lineLength:m,themeColor:k[e],themeColorMode:g},e)}),O]})}),(0,i.jsx)("button",{"aria-label":"Next testimonial",className:p().right,onClick:function(){b1&&n<2:i=Math.round((r=Math.round(e))*n);break;case n>=2&&n<=5.5:r=Math.round((i=Math.round(1.25*t))/n);break;case n>5.5&&n<=8:r=Math.round((i=Math.round(1.5*t))/n);break;case n>8&&n<=10:r=Math.round(1.8*e),i=Math.round(2*t);break;case n>10:i=Math.round((r=Math.round(.75*e))*n)}return{width:i,height:r}},i=function(t,e,n){var r,i;switch(!0){case n<1:i=Math.round((r=Math.round(1.5*e))*n);break;case 1===n:i=r=1.25*e;break;case n>1&&n<=2.5:i=Math.round((r=Math.round(1.25*e))*n);break;case n>2.5&&n<=3.5:i=Math.round((r=Math.round(1.3*e))*n);break;case n>3.5&&n<=5.5:i=Math.round((r=e)*n);break;case n>5.5&&n<=8:r=Math.round((i=Math.round(1.2*t))/n);break;case n>8&&n<=8.5:case n>8.5:r=Math.round((i=Math.round(1.5*t))/n)}return{width:i,height:r}},o=function(t,e,n){var r,i;switch(!0){case n<1:r=Math.round(e/n),i=Math.round(1.5*t);break;case 1===n:r=e,i=t;break;case n>1&&n<=4:i=Math.round((r=e)*n);break;case n>4&&n<=5.5:i=Math.round((r=Math.round(1.25*e))*n);break;case n>5.5&&n<=8:i=Math.round((r=Math.round(1.5*e))*n);break;case n>8:r=Math.round(1.8*e),i=Math.round(2*t)}return{width:i,height:r}},a=function(t,e,n){var r,i;switch(!0){case n<1:r=e/n,i=1.5*t;break;case 1===n:r=e,i=t;break;case n>1&&n<=6.5:i=Math.round((r=e)*n);break;case n>6.5&&n<=8:i=Math.round((r=Math.round(1.2*e))*n);break;case n>8&&n<=10:r=Math.round(1.8*e),i=Math.round(2*t);break;case n>10:i=Math.round((r=Math.round(1.2*e))*n)}return{width:i,height:r}},s=function(t,e,n){var r,i;switch(!0){case n<1:r=Math.round(e/n),i=Math.round(1.5*t);break;case 1===n:r=e,i=t;break;case n>1&&n<=2.5:i=Math.round((r=e)*n);break;case n>2.5&&n<=5.5:i=Math.round((r=Math.round(1.25*e))*n);break;case n>5.5&&n<=8:r=Math.round(1.5*e),i=Math.round(1.5*t);break;case n>8:r=Math.round(1.8*e),i=Math.round(2*t)}return{width:i,height:r}},l=function(t,e,n){var r,i;switch(!0){case n<1:i=Math.round((r=Math.round(1.5*e))*n);break;case 1===n:i=r=1.25*e;break;case n>1&&n<=2.5:i=Math.round((r=Math.round(1.25*e))*n);break;case n>2.5&&n<=3.5:i=Math.round((r=Math.round(1.3*e))*n);break;case n>3.5&&n<=5.5:i=Math.round((r=e)*n);break;case n>5.5&&n<=8:r=Math.round((i=Math.round(1.2*t))/n);break;case n>8&&n<=8.5:case n>8.5:r=Math.round((i=Math.round(1.5*t))/n)}return{width:i,height:r}};function c(t,e,n){switch(n.type){case"horizontal-optimized":return r(t,e,n.aspectRatio);case"normalized":return o(t,e,null==n?void 0:n.aspectRatio);case"normalized-horizontal":return a(t,e,null==n?void 0:n.aspectRatio);case"homepage-carousel":return i(t,e,null==n?void 0:n.aspectRatio);case"normalized-square":return s(t,e,null==n?void 0:n.aspectRatio);default:return l(t,e,null==n?void 0:n.aspectRatio)}}},61204:function(t,e,n){"use strict";n.d(e,{l:function(){return l}});var r=n(82729),i=n(12870),o=n.n(i),a=n(9818);function s(){var t=(0,r._)(["\n byline-> {\n ...,\n avatar {\n altText,\n ","\n }\n }\n"]);return s=function(){return t},t}var l=o()(s(),a.i)},9818:function(t,e,n){"use strict";n.d(e,{i:function(){return a}});var r=n(82729),i=n(12870);function o(){var t=(0,r._)(["\n asset-> {\n url,\n metadata {\n dimensions {\n height,\n width,\n aspectRatio\n }\n }\n }\n"]);return o=function(){return t},t}var a=n.n(i)()(o())},77331:function(t,e,n){"use strict";n.d(e,{k:function(){return l}});var r=n(82729),i=n(12870),o=n.n(i),a=n(9818);function s(){var t=(0,r._)(["\n image {\n altText,\n ","\n }\n"]);return s=function(){return t},t}var l=o()(s(),a.i)},84143:function(t,e,n){"use strict";n.r(e),n.d(e,{__N_SSG:function(){return T},default:function(){return E}});var r=n(24043),i=n(85893),o=n(74356),a=n(82729),s=n(34764),l=n(61204),c=n(77331);function u(){var t=(0,a._)(["\n{\n 'webinarsList': *[_type == \"webinarsList\"] | order(webinarDate asc) {\n webinarRegistrationUrl,\n ondemandUrl,\n webinarDate,\n webinarLabel,\n title,\n upcomingWebinarImage {\n asset\n },\n hosts {\n list[]-> {\n name,\n avatar {\n asset\n }\n }\n }\n },\n 'webinarsPage': *[_type == \"webinarsPage\"][0] {\n meta,\n heroHeadline,\n heroParagraph,\n upcomingWebinarsHeadline,\n upcomingWebinarsParagraph,\n ondemandWebinarsHeadline,\n ondemandWebinarsParagraph,\n testimonialsHeader,\n testimonials[]-> {\n ...,\n logo-> {\n ","\n },\n ","\n },\n endOfPageModule-> {\n cta,\n heading,\n ...,\n },\n }\n}\n"]);return u=function(){return t},t}var d=(0,s.Z)(u(),c.k,l.l),h=n(42666),f=n(25675),m=n.n(f),p=n(55118);new Intl.DateTimeFormat("en-US",{dateStyle:"long"});var g=function(t){return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})},v=function(t){return new Date(t).toLocaleTimeString("en-US",{hour:"numeric",hour12:!0,timeZone:"America/Los_Angeles"})},x=function(t){return new Date(t).toLocaleTimeString("en-US",{hour:"numeric",hour12:!0,timeZone:"America/New_York"})},b=n(9334);function w(t){var e,n=t.upcomingWebinar,r=t.heroHeadline,o=t.heroParagraph,a=new Date,s=(null==n?void 0:null===(e=n.upcomingWebinarImage)||void 0===e?void 0:e.asset)?(0,p.ZP)(null==n?void 0:n.upcomingWebinarImage.asset).url():void 0,l=new Date(null==n?void 0:n.webinarDate),c=g(l),u=new Date(l.getTime()+36e5).getTime()-a.getTime()<36e5,d="".concat(v(null==n?void 0:n.webinarDate)," PT | ").concat(x(null==n?void 0:n.webinarDate))+" ET";return(0,i.jsx)("header",{className:"".concat(n?"py-fluid-md bg-gradient-to-r from-white via-thd-color-violet-20 to-thd-color-violet-20":"py-fluid-sm bg-thd-color-violet-20"),children:(0,i.jsx)("div",{className:"thd-container-max ",children:(0,i.jsxs)("div",{className:"flex flex-wrap ".concat(n?"justify-between":"justify-center"," items-center"),children:[(0,i.jsxs)("div",{className:"mb-24 lg:mb-0 ".concat(n?"lg:w-3/12":"text-center lg:w-4/12"),children:[(0,i.jsx)("h1",{className:"text-5xl md:text-7xl font-medium text-thd-color-violet-90 tracking-tighter mb-lg",children:null!=r?r:"Webinars"}),(0,i.jsx)("p",{className:"text-xl text-thd-color-grey-90 leading-normal",children:null!=o?o:"Tune in to webinars live, or watch them on-demand. Our monthly webinar series spotlights Loom experts, partners, and friends."})]}),n&&(0,i.jsx)("div",{className:"lg:w-8/12 ",children:(0,i.jsx)("div",{className:"bg-white thd-shadow lg:shadow-none thd-rounded-int p-24 xl:p-40",children:(0,i.jsxs)("div",{className:"flex items-center flex-wrap -mx-12 xl:-mx-24",children:[(0,i.jsx)("div",{className:"w-full lg:w-7/12 px-12 xl:px-24 mb-24 lg:mb-0",children:s&&(0,i.jsx)("div",{children:(0,i.jsx)(m(),{src:s,alt:null==n?void 0:n.title,width:600,height:400,className:"rounded-md w-full"})})}),(0,i.jsxs)("div",{className:"w-ful lg:w-5/12 px-12 xl:px-24",children:[(0,i.jsx)(b.DRh,{className:"text-xs mb-18 uppercase font-medium\n ".concat(u?"bg-thd-color-green-20 text-thd-color-green-90":"bg-thd-color-violet-20 text-thd-color-violet-90"),children:u?"In Progress":"Upcoming"}),(0,i.jsx)("h2",{className:"text-thd-color-grey-90 tracking-tighter text-3xl md:text-4xl font-medium mb-md",children:null==n?void 0:n.title}),(0,i.jsxs)("p",{className:"uppercase text-sm mb-lg text-thd-color-grey-80 font-medium",children:[c," ",d]}),n.webinarRegistrationUrl&&(0,i.jsx)(h.Z,{buttonType:"primary",color:"violet-60",cta:{copy:"".concat(u?"Join in progress webinar":"Register Now"),link:n.webinarRegistrationUrl},size:"lg",type:"primary",icon:"arrow-right",iconPosition:"right",iconGap:"gap-[.5em]"})]})]})})})]})})})}var y=n(31267),j={"violet-20":{pillBgColor:"bg-thd-color-violet-80",bgColor:"bg-thd-color-violet-20",textColor:"text-thd-color-violet-90",dateTextColor:"text-thd-color-violet-90"},"violet-60":{pillBgColor:"bg-thd-color-violet-80",bgColor:"bg-thd-color-violet-60",textColor:"text-thd-color-violet-10",dateTextColor:"text-thd-color-violet-20"},"violet-80":{pillBgColor:"bg-thd-color-violet-70",bgColor:"bg-thd-color-violet-80",textColor:"text-thd-color-violet-10",dateTextColor:"text-thd-color-violet-20"}};function M(t){var e=t.webinar,n=function(t){switch(t){case"Speaker Notes":default:return"violet-20";case"Loom 101":return"violet-60";case"Atlassian Webinar":return"violet-80"}}(e.webinarLabel),r=g(null==e?void 0:e.webinarDate),o="".concat(v(null==e?void 0:e.webinarDate)," PT | ").concat(x(null==e?void 0:e.webinarDate)," ET"),a=new Date,s=new Date(e.webinarDate)u}),E=T[0],D=T.slice(1),P=h.filter(function(t){return new Date(t.webinarDate)0&&(0,i.jsx)("section",{className:"py-fluid-sm lg:py-fluid-md",children:(0,i.jsxs)("div",{className:"thd-container-max",children:[x&&(0,i.jsx)(k,{headline:x,paragraph:b}),(0,i.jsx)(N,{webinars:D})]})}),P.length>0&&(0,i.jsx)("section",{id:"on-demand",className:"py-fluid-sm lg:py-fluid-md scroll-my-100 ".concat(D.length>0&&"bg-thd-color-violet-10"),children:(0,i.jsxs)("div",{className:"thd-container-max",children:[g&&(0,i.jsx)(k,{headline:g,paragraph:v}),(0,i.jsx)(N,{webinars:U})]})}),(0,i.jsx)("section",{className:"pt-fluid-sm lg:pt-fluid-md",children:(0,i.jsx)("div",{className:"thd-container-max",children:(0,i.jsx)(k,{headline:j})})}),M&&(0,i.jsx)(_.Z,{bgVar:"white",cards:M}),(null==y?void 0:y.cta)&&(0,i.jsx)(C.Z,{cta:null==y?void 0:y.cta,heading:null==y?void 0:y.heading})]})}},69524:function(t){t.exports={container:"ThreadTestimonialCarousel_container__3hu57",left:"ThreadTestimonialCarousel_left__ioRt3",right:"ThreadTestimonialCarousel_right__9bhB0",content:"ThreadTestimonialCarousel_content__ODboU",avatar:"ThreadTestimonialCarousel_avatar__3d3SV"}},40275:function(t,e,n){"use strict";let r;n.d(e,{Kx:function(){return m},T:function(){return f},o_:function(){return p}});var i=n(67294);let o=new Uint8Array(16),a=[];for(let t=0;t<256;++t)a.push((t+256).toString(16).slice(1));var s={randomUUID:"u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let l=["channel/disconnect","channel/response","channel/heartbeat"],c=["handshake/syn","handshake/syn-ack","handshake/ack"],u=t=>l.some(e=>e===t),d=t=>c.some(e=>e===t),h=({data:t={}})=>"object"==typeof t&&null!==t&&!Array.isArray(t)&&!("domain"in t)&&["id","type","from","to"].every(e=>e in t)&&t.type.startsWith("handshake/");function f(t,e,n){let[l,c]=(0,i.useState)(),[f,m]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(window.self===window.top&&!window.opener)return;let t=function(t){let e=window.self!==window.top||window.opener,n={buffer:[],id:null,origin:null,source:null,status:"connecting"};function i(e,i){if(d(e)||u(e)||"connecting"!==n.status&&"reconnecting"!==n.status){if(n.id&&n.origin&&n.source){let l={connectionId:n.id,data:i,domain:"sanity/channels",from:t.id,id:function(t,e,n){if(s.randomUUID&&!t)return s.randomUUID();let i=(t=t||{}).random||(t.rng||function(){if(!r&&!(r="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)})();return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(t,e=0){return a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]}(i)}(),to:t.connectTo,type:e};try{n.source.postMessage(l,{targetOrigin:n.origin})}catch{throw Error(`Failed to postMessage '${l.id}' on '${t.id}'`)}}}else n.buffer.push({type:e,data:i})}function l(e){if(h(e))console.error("Visual editing package mismatch detected! Please ensure you are using the latest version of Sanity Studio and any packages listed here:\nhttps://github.com/sanity-io/visual-editing");else if(function(e){let{data:n}=e;return"sanity/channels"===n.domain&&n.to===t.id&&n.from===t.connectTo&&"channel/response"!==n.type}(e)){let{data:t}=e;if(n.origin&&e.origin!==n.origin)return;if(e.source&&n.source!==e.source&&(n.source=e.source),d(t.type)&&t.data){if("handshake/syn"===t.type)return n.origin=e.origin,n.id=t.data.id,m("connecting"),void i("handshake/syn-ack",{id:n.id});if("handshake/ack"===t.type&&t.data.id===n.id)return void m("connected")}else if(t.connectionId===n.id&&e.origin===n.origin){if("channel/disconnect"===t.type)return void m("disconnected");{let e=[t.type,t.data];c.forEach(t=>{t(...e)}),i("channel/response",{responseTo:t.id})}return}}}let c=new Set,f=new Set;function m(t){n.status=t,f.forEach(e=>{e(t)}),"connected"===t&&function(){let t=[...n.buffer];n.buffer.splice(0,n.buffer.length),t.forEach(({type:t,data:e})=>{i(t,e)})}()}return window.addEventListener("message",l,!1),m("connecting"),{destroy:function(){["disconnected"].includes(n.status)||m("disconnected"),c.clear(),f.clear(),window.removeEventListener("message",l,!1)},inFrame:e,send:function(t,e){i(t,e)},subscribe:function(t){return c.add(t),()=>c.delete(t)},onStatusUpdate:function(t){return f.add(t),()=>f.delete(t)}}}({id:"preview-kit",connectTo:"presentation"});t.onStatusUpdate(t=>{"connected"===t?m(!0):"disconnected"===t&&m(!1)});let e=setTimeout(()=>c(t),0);return()=>{clearTimeout(e),t.destroy(),c(void 0)}},[n,e]);let p=JSON.stringify(Array.from(t.keys()));(0,i.useEffect)(()=>{"[]"!==p&&l&&f&&l.send("preview-kit/documents",{projectId:e,dataset:n,perspective:"previewDrafts",documents:Array.from(t.values())})},[p,l,f,n,t,e])}function m(t){let e=(0,i.useMemo)(()=>JSON.stringify(t||{}),[t]);return(0,i.useMemo)(()=>JSON.parse(e),[e])}function p(t){let{refreshInterval:e}=t,n=function(){let[t,e]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e(navigator.onLine);let t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t),window.addEventListener("offline",n),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}},[]);let n=(0,i.useSyncExternalStore)(g,()=>document.visibilityState,()=>"hidden");return!t||"hidden"===n}(),[r,o]=(0,i.useState)("hit"),a=(0,i.useCallback)(()=>(o("inflight"),()=>o("hit")),[]);return(0,i.useEffect)(()=>{if(!e||"hit"!==r)return;let t=setTimeout(()=>o("stale"),e);return()=>clearTimeout(t)},[e,r]),(0,i.useEffect)(()=>{if("hit"!==r)return;let t=()=>o("stale");return window.addEventListener("focus",t),()=>window.removeEventListener("focus",t)},[e,r]),(0,i.useEffect)(()=>{n&&"hit"===r&&o("stale"),n||"stale"!==r||o("refresh")},[n,r]),[r,a]}function g(t){return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)}},80684:function(t,e,n){"use strict";n.d(e,{d:function(){return r}});let r=(0,n(67294).createContext)(null)},74356:function(t,e,n){"use strict";n.d(e,{Ji:function(){return v},yR:function(){return g}});var r,i,o=n(40275),a=n(67294),s=n(80684),l="u">typeof Element,c="function"==typeof Map,u="function"==typeof Set,d="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView,h=(r=function(t,e){try{return function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){var r,i,o,a;if(e.constructor!==n.constructor)return!1;if(Array.isArray(e)){if((r=e.length)!=n.length)return!1;for(i=r;0!=i--;)if(!t(e[i],n[i]))return!1;return!0}if(c&&e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(a=e.entries();!(i=a.next()).done;)if(!n.has(i.value[0]))return!1;for(a=e.entries();!(i=a.next()).done;)if(!t(i.value[1],n.get(i.value[0])))return!1;return!0}if(u&&e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(a=e.entries();!(i=a.next()).done;)if(!n.has(i.value[0]))return!1;return!0}if(d&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){if((r=e.length)!=n.length)return!1;for(i=r;0!=i--;)if(e[i]!==n[i])return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof n.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof n.toString)return e.toString()===n.toString();if((r=(o=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;if(l&&e instanceof Element)return!1;for(i=r;0!=i--;)if(("_owner"!==o[i]&&"__v"!==o[i]&&"__o"!==o[i]||!e.$$typeof)&&!t(e[o[i]],n[o[i]]))return!1;return!0}return e!=e&&n!=n}(t,e)}catch(t){if((t.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw t}}).__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r,f={exports:{}},m={};f.exports=function(){if(i)return m;i=1;var t="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},e=a.useSyncExternalStore,n=a.useRef,r=a.useEffect,o=a.useMemo,s=a.useDebugValue;return m.useSyncExternalStoreWithSelector=function(i,a,l,c,u){var d=n(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;var f=e(i,(d=o(function(){function e(e){if(!i){if(i=!0,n=e,e=c(e),void 0!==u&&h.hasValue){var o=h.value;if(u(o,e))return r=o}return r=e}if(o=r,t(n,e))return o;var a=c(e);return void 0!==u&&u(o,a)?o:(n=e,r=a)}var n,r,i=!1,o=void 0===l?null:l;return[function(){return e(a())},null===o?void 0:function(){return e(o())}]},[a,l,c,u]))[0],d[1]);return r(function(){h.hasValue=!0,h.value=f},[f]),s(f),f},m}();var p=f.exports;function g(t,e,n,r){let{isEqual:i=h}=r||{},l=(0,a.useContext)(s.d),c=(0,o.Kx)(n),u=(0,a.useMemo)(()=>({subscribe:()=>()=>{},getSnapshot:()=>t}),[t]),d=(0,a.useMemo)(()=>(null==l?void 0:l(t,e,c))||{subscribe:()=>()=>{},getSnapshot:()=>t},[l,t,c,e]),[f]=(0,a.useState)(()=>{if(void 0===t)throw Error("initialSnapshot can't be undefined, if you don't want an initial value use null instead");try{return JSON.parse(JSON.stringify(t))}catch(e){return console.warn("Failed to deep clone initialSnapshot, this is likely an error and an indication that the snapshot isn't JSON serializable",{initialSnapshot:t,error:e}),t}}),m=(0,a.useCallback)(()=>f,[f]),g=(0,a.useCallback)(t=>t,[]),v=p.useSyncExternalStoreWithSelector((null==d?void 0:d.subscribe)||u.subscribe,(null==d?void 0:d.getSnapshot)||u.getSnapshot,m,g,i),x=null!==l;return[v,x&&f===v,x]}let v=(0,a.lazy)(()=>n.e(6166).then(n.bind(n,46166)))},34764:function(t,e,n){"use strict";function r(t,...e){let n=t.length-1;return t.slice(0,n).reduce((t,n,r)=>t+n+e[r],"")+t[n]}n.d(e,{Z:function(){return r}})}},function(t){t.O(0,[7200,9756,7436,5675,2391,3141,9334,7979,8037,2888,9774,179],function(){return t(t.s=56749)}),_N_E=t.O()}]);