!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="38bb0a83-5b3e-47c3-b013-9a640f608479",e._sentryDebugIdIdentifier="sentry-dbid-38bb0a83-5b3e-47c3-b013-9a640f608479")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5386],{15386:function(e,t,r){r.d(t,{default:function(){return j}});var n={};r.r(n),r.d(n,{getPlaybackId:function(){return f},getPosterURLFromPlaybackId:function(){return p},transform:function(){return u}});var o={};r.r(o),r.d(o,{transform:function(){return w}});var i={};r.r(i),r.d(i,{transform:function(){return C}});var a={};r.r(a),r.d(a,{transform:function(){return x}});var l={};r.r(l),r.d(l,{amazonS3:function(){return a},backblaze:function(){return i},mux:function(){return n},vercelBlob:function(){return o}});var s=r(55863),c=r(54809);let d="mux.com";function u(e,t){let r=f(e);if(!r)return e;let n=e.providerMetadata?.mux?.thumbnailTime??t?.thumbnailTime??t?.startTime,o={...e,sources:[{src:`https://stream.${t?.customDomain??d}/${r}.m3u8`,type:"application/x-mpegURL"}],poster:p(r,{thumbnailTime:n,customDomain:t?.customDomain,token:t?.tokens?.thumbnail})};return n>=0&&(o.thumbnailTime=n),o}function f(e){let t=e.providerMetadata?.mux??e.externalIds;return t?.playbackId}let p=(e,{token:t,thumbnailTime:r,width:n,customDomain:o=d}={})=>{let i=null==t?r:void 0,{aud:a}=function(e){let t=(e??"").split(".")[1];return t?JSON.parse(decodeURIComponent(atob(t.replace(/-/g,"+").replace(/_/g,"/")).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))):{}}(t);if(!t||"t"===a)return`https://image.${o}/${e}/thumbnail.webp${function(e){let t=(function(e){let t={};for(let r in e)null!=e[r]&&(t[r]=e[r]);return new URLSearchParams(t)})(e).toString();return t?"?"+t:""}({token:t,time:i,width:n})}`},h=JSON.parse(r(28070).env.NEXT_PUBLIC_DEV_VIDEO_OPTS??'{"path":"/api/video","folder":"videos","provider":"mux"}'??"{}"),v=`${h.folder??"videos"}/`,b=(0,c.lazy)(()=>Promise.all([r.e(4693),r.e(9892)]).then(r.bind(r,29892))),m=(0,c.forwardRef)((e,t)=>{let r,{style:n,children:o,asset:i,controls:a,poster:l,blurDataURL:d,...u}=e,h=c.Children.toArray(o).find(e=>"object"==typeof e&&"type"in e&&"poster"===e.props.slot);(0,c.isValidElement)(h)&&(l="",d=void 0);let v={},m=i?f(i):void 0,y=!0;if(!m||(null==i?void 0:i.status)!=="ready"||(u.src=null,u.playbackId=m,!l||(y=l!==p(m,u))||(r="".concat(p(m,{...u,width:480})," 480w,").concat(p(m,{...u,width:640})," 640w,").concat(p(m,{...u,width:960})," 960w,").concat(p(m,{...u,width:1280})," 1280w,").concat(p(m,{...u,width:1600})," 1600w,").concat(p(m,{...u})," 1920w"))),d){let e=!y&&d===(null==i?void 0:i.blurDataURL),t=y&&d!==(null==i?void 0:i.blurDataURL);if(e||t){var g;v.width="100%",v.height="100%",v.color="transparent",v.backgroundSize="cover",v.backgroundPosition="center",v.backgroundRepeat="no-repeat",v.backgroundImage="url('data:image/svg+xml;charset=utf-8,".concat((g=d,`<svg xmlns="http://www.w3.org/2000/svg"><filter id="b" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="20"/><feComponentTransfer><feFuncA type="discrete" tableValues="1 1"/></feComponentTransfer></filter><g filter="url(#b)"><image width="100%" height="100%" preserveAspectRatio="xMidYMid slice" href="${g}"/></g></svg>`.replace(/#/g,"%23")),"')")}}return l&&(o=(0,s.jsxs)(s.Fragment,{children:[o,(0,s.jsx)("img",{slot:"poster",src:y?l:void 0,srcSet:r,style:v,decoding:"async","aria-hidden":"true"})]}),l=""),(0,s.jsx)(c.Suspense,{fallback:null,children:(0,s.jsx)(b,{ref:t,style:{"--controls":!1===a?"none":void 0,...n},children:o,poster:l,...u})})});function y({status:e,hidden:t}){let r="",n="";switch(e){case"error":r="Error",n="An error occurred while uploading your video. Please check the CLI logs for more info.";break;case"sourced":r="Video is not processing",n="Make sure to run next-video sync. The currently loaded video is the source file.";break;default:r="Upload in progress...",n="Your video file is being uploaded. The currently loaded video is the source file."}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{children:`
        .next-video-alert {
          position: absolute;
          inset: 1em;
          bottom: auto;
          padding: .75rem 1rem;
          border-radius: 1rem;
          color: hsl(0, 0%, 100%);
          background-color: hsl(240 10% 3.9% / .7);
          border: 1px solid hsl(240 3.7% 15.9%);
          transition: visibility 0s, opacity .25s;
          visibility: visible;
          opacity: 1;
        }

        .next-video-alert[hidden] {
          display: block;
          transition: visibility 1s, opacity 1s;
          visibility: hidden;
          opacity: 0;
        }

        .next-video-alert svg {
          position: absolute;
        }

        .next-video-alert h5 {
          line-height: 1;
          font-weight: 500;
          margin-bottom: 0.25rem;
          padding-left: 1.75rem;
          font-size: inherit;
        }

        .next-video-alert div {
          padding-left: 1.75rem;
          font-size: 0.875rem;
          line-height: 1.25rem;
        }
        `}),(0,s.jsxs)("div",{role:"alert",className:`next-video-alert next-video-alert-${e}`,hidden:t,children:["error"===e?(0,s.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",children:(0,s.jsx)("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}):(0,s.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",children:(0,s.jsx)("path",{d:"M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),(0,s.jsx)("h5",{children:r}),(0,s.jsx)("div",{children:n})]})]})}async function g({config:e,src:t,width:r,height:n}){let o=`${e.path}?url=${encodeURIComponent(`${t}`)}`;return r&&(o+=`&w=${r}`),n&&(o+=`&h=${n}`),`${o}`}function w(e){let t=e.providerMetadata?.["vercel-blob"]??e.externalIds;if(!t)return e;let r={src:t.url};return t.contentType&&(r.type=t.contentType),{...e,sources:[r]}}function C(e){let t=e.providerMetadata?.backblaze;if(!t)return e;let r=new URL(t.endpoint);r.hostname=`${t.bucket}.${r.hostname}`,r.pathname=t.key;let n={src:`${r}`};return{...e,sources:[n]}}function x(e){let t=e.providerMetadata?.["amazon-s3"];if(!t)return e;let r=new URL(t.endpoint);r.hostname=`${t.bucket}.${r.hostname}`,r.pathname=t.key;let n={src:`${r}`};return{...e,sources:[n]}}function k(e,t){var r;let n=null!==(r=e.provider)&&void 0!==r?r:h.provider;for(let[r,o]of Object.entries(l))if(r===n.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase()))return o.transform(e,t)}var j=(0,c.forwardRef)((e,t)=>{var r;let{as:n=m,loader:o=g,transform:i=k,className:a,style:l,src:d,width:u,height:f}=e,[p,b]=(0,c.useState)("object"==typeof d?d:void 0),[w,C]=(0,c.useState)(!1);"object"==typeof d&&(p=d,d=void 0);let x={src:d,width:u,height:f},j=(r=e=>b(e),async e=>{if("string"==typeof x.src)try{let t=await o({...x,config:h}),n=await fetch(t,{signal:e}),i=await n.json();if(n.ok)r(i);else{let e=`[next-video] The request to ${n.url} failed. `;throw e+=`Did you configure the \`${h.path}\` route to handle video API requests?
`,Error(e)}}catch(t){e.aborted||console.error(t)}}),L=null==p?void 0:p.status,R=function(e){if("string"==typeof e)return e.split(/[#?]/)[0].split(".").pop()?.trim()}(d);!function(e,t=5e3){let r=(0,c.useRef)(new AbortController);(0,c.useEffect)(()=>(r.current=new AbortController,e(r.current.signal),()=>{r.current.abort()}),[]),function(e,t){let r=(0,c.useRef)();(0,c.useEffect)(()=>{r.current=e},[e]),(0,c.useEffect)(()=>{let e;let n=async()=>{await r.current?.(),null!=t&&(e=setTimeout(n,t))};if(null!=t)return e=setTimeout(n,t),()=>clearTimeout(e)},[t])}((0,c.useCallback)(()=>e(r.current.signal),[]),t)}(j,"string"!=typeof d||"ready"==L||["m3u8","mpd"].includes(null!=R?R:"")?null:1e3);let $=function(e,t){var r,n,o,i,a,l,s;let{asset:c}=t,{controls:d=!0,as:u,className:f,style:p,src:h,poster:b,blurDataURL:m,loader:y,transform:g,...w}=e,C={src:h,controls:d,blurDataURL:m,...w};if("object"==typeof b?(C.poster=b.src,null!==(r=C.blurDataURL)&&void 0!==r||(C.blurDataURL=b.blurDataURL)):C.poster=b,c){if("ready"===c.status){null!==(n=C.blurDataURL)&&void 0!==n||(C.blurDataURL=c.blurDataURL);let e=g(c,C);e&&(C.src=null===(i=e.sources)||void 0===i?void 0:null===(o=i[0])||void 0===o?void 0:o.src,null!==(a=C.poster)&&void 0!==a||(C.poster=e.poster),null!==(l=C.thumbnailTime)&&void 0!==l||(C.thumbnailTime=e.thumbnailTime))}else C.src=(s=c.originalFilePath,s?.startsWith(v)?s?.replace(v,"_next-video/"):s)}return C}({...e,transform:i,src:d},{asset:p});return!("function"==typeof n&&(()=>{let e=Object.getPrototypeOf(n);return e.prototype&&e.prototype.isReactComponent})()||"function"==typeof n||"object"==typeof n&&"symbol"==typeof n.$$typeof&&["react.memo","react.forward_ref"].includes(n.$$typeof.description))&&console.warn("The `as` property is not a valid component:",n),(0,s.jsxs)("div",{className:"".concat(a?"".concat(a," "):"","next-video-container"),style:l,children:[(0,s.jsx)("style",{children:"\n        .next-video-container {\n          position: relative;\n          width: 100%;\n          aspect-ratio: 16 / 9;\n        }\n\n        [data-next-video] {\n          display: block;\n          position: relative;\n          width: 100%;\n          height: 100%;\n        }\n\n        [data-next-video] img {\n          object-fit: var(--media-object-fit, contain);\n          object-position: var(--media-object-position, center);\n        }\n        "}),(0,s.jsx)(n,{ref:t,"data-next-video":null!=L?L:"",style:{width:u,height:f},asset:p,onPlaying:()=>C(!0),onPause:()=>C(!1),...$}),(0,s.jsx)(y,{hidden:!!(w||!L||"ready"===L),status:L})]})})}}]);