1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2892bb85-59d1-419e-8d26-6c9743e089d2",e._sentryDebugIdIdentifier="sentry-dbid-2892bb85-59d1-419e-8d26-6c9743e089d2")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7472],{66485:function(e){function t(){return new DOMException("The request is not allowed","NotAllowedError")}async function r(e){if(!navigator.clipboard)throw t();return navigator.clipboard.writeText(e)}async function a(e){let r=document.createElement("span");r.textContent=e,r.style.whiteSpace="pre",r.style.webkitUserSelect="auto",r.style.userSelect="all",document.body.appendChild(r);let a=window.getSelection(),n=window.document.createRange();a.removeAllRanges(),n.selectNode(r),a.addRange(n);let i=!1;try{i=window.document.execCommand("copy")}finally{a.removeAllRanges(),window.document.body.removeChild(r)}if(!i)throw t()}async function n(e){try{await r(e)}catch(r){try{await a(e)}catch(e){throw e||r||t()}}}e.exports=n},55386:function(e,t,r){"use strict";var a=r(85893),n=r(67294),i=r(99603),c=r(59417),o=r(76569),s=r(47747),l=r(68144),d=r(64771);t.Z=e=>{let{episode:t}
1=e,r=(0,n.useRef)(null),[u,p]=(0,n.useState)(!1),[h,m]=(0,n.useState)(""),[f,w]=(0,n.useState)(0),{setErrorMessage:b}=(0,o.s)();(0,n.useEffect)(()=>{t&&(async()=>{let e=await (0,s.Cg)(t);e&&m(e)})()},[t]);let g=e=>{let t=Math.floor(e/60);return e=Math.floor(e%60),"".concat(t,":").concat(e.toString().padStart(2,"0"))},y=async()=>{try{await (0,d.WC)(t.publicationType,t.originalAudioFileUrl)}catch(e){b("ãã¦ã³ãã¼ãã«å¤±æãã¾ãã")}};return(0,a.jsxs)("div",{className:"bg-white p-4 flex flex-col items-center",children:[(0,a.jsx)("div",{className:"flex items-center justify-end w-full mb-4",children:(0,a.jsx)("div",{className:"w-10 h-10 rounded-full bg-primary text-white flex items-center justify-center hover:bg-primary-200",children:(0,a.jsx)("button",{onClick:y,className:"text-white h-8 w-8 flex items-center justify-center",children:(0,a.jsx)(i.G,{icon:c.q7m,className:"h-5 w-5"})})})}),(0,a.jsx)("audio",{ref:r,src:h,onTimeUpdate:()=>{r.current&&w(r.current.currentTime)},onEnded:()=>{r.current&&(r.current.currentTime=0,p(!1))}}),(0,a.jsxs)("div",{className:"flex items-center w-full mb-2",children:[(0,a.jsx)("button",{onClick:()=>{r.current&&(u?r.current.pause():r.current.play(),p(!u))},className:"w-[40px] h-[40px] rounded-full p-2 bg-primary text-white mr-4 hover:bg-primary-200 flex items-center justify-center",children:(0,a.jsx)(i.G,{icon:u?c.XQY:c.zc,className:"h-5 w-5"})}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(l.Z,{min:0,max:t.duration,value:f,onChange:e=>{r.current&&(r.current.currentTime=parseFloat(e.target.value))}})}),(0,a.jsxs)("div",{className:"text-sm ml-4",children:[g(f)," / ",g(t.duration)]})]})]})}},35231:function(e,t,r){"use strict";var a=r(85893);r(67294);var n=r(99603),i=r(59417),c=r(76569),o=r(76447),s=r(80918),l=r(12011),d=r(34875),u=r(52445),p=r(84657);t.Z=e=>{let{episode:t,isAdminPage:r=!0,isSuspended:h=!1}=e,{setSuccessMessage:m,setErrorMessage:f}=(0,c.s)(),w=new Date,b=t.publishedAt?new Date(t.publishedAt):null,g="publish"===t.status&&b?b<=w?"å
¬éæ¸ã¿":"å
¬éäºç´ä¸":"䏿¸ã",y="PRIVATE"===t.publicationType?"ãã©ã¤ãã¼ã":"PASSWORD"===t.publicationType?"ãã¹ã¯ã¼ãä»ãå
¬é":"Webä¸ã«å
¬é",x=async()=>{let e;e="".concat("https://link.coenoma.com","/").concat(t.comId,"/").concat(t.id);try{await (0,d.v)(e),m("ã¯ãªãããã¼ãã«ã¨ãã½ã¼ãURLãã³ãã¼ãã¾ãã")}catch(e){f((0,l.x)(p.V.URL_COPY,e))}};return(0,a.jsxs)("div",{className:"box-container flex flex-col md:flex-row",children:[(0,a.jsx)("div",{className:"aspect-w-1 aspect-h-1 mx-auto md:mx-0 w-[200px] h-[200px] mb-4 md:mb-0 md:mr-12 flex-shrink-0 overflow-hidden",children:(0,a.jsx)("img",{src:t.displayThumbnailUrl||"/images/default_community_icon.png",alt:"Thumbnail for ".concat(t.title),className:"object-cover rounded-md w-full h-auto"})}),(0,a.jsxs)("div",{className:"flex-grow",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col md:flex-row items-center mb-4 w-full flex-wrap mb-2",children:[!h&&(0,a.jsx)(o.x,{href:r?"/".concat(t.comId,"/admin/episodes/").concat(t.id,"/edit"):"/".concat(t.comId,"/manage-episodes/").concat(t.id,"/edit"),className:"w-10 h-10 rounded-full bg-primary text-white flex items-center justify-center md:mr-2 mb-2",children:(0,a.jsxs)("div",{className:"w-4 h-4ãflex items-center justify-center",children:[(0,a.jsx)(n.G,{icon:i.Xcf,className:"w-4 h-4"})," "]})}),(0,a.jsxs)("button",{className:"w-[250px] h-10 rounded-full bg-primary text-white flex items-center justify-center hover:bg-primary-200 md:mr-2 mb-2",onClick:x,children:[(0,a.jsx)("div",{className:"w-4 h-4ãflex items-center justify-center",children:(0,a.jsx)(n.G,{icon:i.nNP,className:"w-4 h-4"})}),(0,a.jsx)("div",{className:"ml-2",children:"è´åURLãã³ãã¼"})]})]}),(0,a.jsx)("h2",{className:"text-xl font-semibold mb-2 w-full",children:t.title}),t.groups&&t.groups.map((e,t)=>(0,a.jsx)("div",{className:"text-xs border border-primary text-primary px-2 py-1 rounded-full mb-2 inline-block mr-2",children:e.value},t))]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-xs text-gray-600 mb-2",children:["ãã®ã¨ãã½ã¼ãã®å
¬éã¿ã¤ãã¯ã",y,"ãã§ã","publish"===t.status&&t.publishedAt&&(0,a.jsxs)(a.Fragment,{children:[(0,s.o)(t.publishedAt,!0),"ã«"]}),"ã",g,"ãã§ãã"]}),(0,a.jsx)("p",{className:"text-xs text-gray-600 mb-2",children:t.speakerNames}),(0,a.jsx)("div",{className:"text-base h-[160px] overflow-y-scroll leading-relaxed tracking-wide",children:(0,a.jsx)("div",{className:"text-gray-600 leading-relaxed tracking-wide",dangerouslySetInnerHTML:{__html:(0,u.$)(t.description)}})})]})]})]})}},45363:function(e,t,r){"use strict";r.d(t,{x:function(){return o}});var a=r(85893);r(67294);var n=r(11163),i=r(95332);let c=["/login","/sso-callback"],o=e=>{let{fallbackPath:t,skipPaths:r=[],disableDefaultSkipPaths:o=!1,className:s="py-0.5 mb-2 rounded-md text-sm underline font-medium text-gray-500 hover:opacity-70 focus:outline-none focus:ring-2 focus:ring-offset-2"}=e,l=(0,n.useRouter)();return(0,a.jsx)("button",{onClick:()=>{let e=window.location.origin,a=document.referrer;i.Z.debug("BackButton - currentOrigin",e),i.Z.debug("BackButton - referrer",a);let n=l.asPath,s=n.split("/").filter(e=>e),d=s.length>0?"/"+s.slice(0,-1).join("/"):"/",u=t||d;i.Z.debug("BackButton - currentPath",n),i.Z.debug("BackButton - parentPath",d),i.Z.debug("BackButton - effectiveFallback",u);let p=window.history.length>1,h=a.startsWith(e),m=p&&h,f="";if(m&&window.history.state){let e=window.history.state;f=(null==e?void 0:e.url)||"",i.Z.debug("BackButton - prevUrl from history",f)}let w=o?r:[...c,...r],b=f&&w.some(e=>f===e||f.startsWith(e+"?")||f.startsWith(e+"/"));i.Z.debug("BackButton - effectiveSkipPaths",w),i.Z.debug("BackButton - isSkipPath",b),m&&!b?(i.Z.debug("BackButton - using browser back"),l.back()):(i.Z.debug("BackButton - using fallback path",u),l.push(u))},className:s,children:"ãã©ã"})}},82498:function(e,t,r){"use strict";r.d(t,{s:function(){return i}});var a=r(85893);r(67294);var n=r(89291);let i=e=>{let{isOpen:t,onRequestClose:r,onConfirm:i,title:c,content:o,confirmText:s,cancelText:l}=e;return(0,a.jsx)(n.P,{isOpen:t,onRequestClose:r,title:c,children:(0,a.jsxs)("div",{className:"h-40 relative",children:[(0,a.jsx)("p",{className:"text-sm mb-6",children:o}),(0,a.jsx)("div",{className:"absolute bottom-0 right-0",children:(0,a.jsxs)("div",{className:"flex justify-end",children:[(0,a.jsx)("button",{className:"mr-2 px-4 py-2 border-2 border-gray-300 text-gray-700 rounded-full",onClick:r,children:l}),(0,a.jsx)("button",{className:"px-4 py-2 border-2 border-red-500 text-red-500 rounded-full",onClick:i,children:s})]})})]})})}},49170:function(e,t,r){"use strict";r.d(t,{p:function(){return s}});var a=r(85893);r(67294);var n=r(9008),i=r.n(n),c=r(11163),o=r(76569);let s=e=>
1{let{pageTitle:t,pageDescription:r,pageImg:n,pageImgWidth:s,pageImgHeight:l}=e,d=(0,c.useRouter)(),{currentPlayingEpisode:u,community:p}=(0,o.s)(),h="éå®å
¬éã®ã©ã¸ãªé
ä¿¡ãªããã³ã¨ããã",m=null==u?void 0:u.title,f=null==p?void 0:p.displayName,w=m?f?"".concat(m," | ").concat(f):m:t?"".concat(t," | ").concat(h):h,b=r||"ã³ã¨ããã¯ããã¼ã ãã³ãã¥ããã£éå®ã«å
±æãã§ããããã¡ã°ãç°¡åãªã©ã¸ãªé
ä¿¡ãã¼ã«ã§ãã",g="".concat("https://coenoma.com").concat(d.asPath.split(/[?#]/)[0]),y=n||"".concat("https://coenoma.com").concat("/images/ogp.png");return(0,a.jsxs)(i(),{children:[(0,a.jsx)("title",{children:w}),(0,a.jsx)("meta",{name:"viewport",content:"width=device-width,initial-scale=1.0"}),(0,a.jsx)("meta",{name:"description",content:b}),(0,a.jsx)("meta",{property:"og:url",content:g}),(0,a.jsx)("meta",{property:"og:title",content:w}),(0,a.jsx)("meta",{property:"og:site_name",content:w}),(0,a.jsx)("meta",{property:"og:description",content:b}),(0,a.jsx)("meta",{property:"og:type",content:"website"}),(0,a.jsx)("meta",{property:"og:image",content:y}),(0,a.jsx)("meta",{property:"og:image:width",content:String(s||1200)}),(0,a.jsx)("meta",{property:"og:image:height",content:String(l||630)}),(0,a.jsx)("link",{rel:"canonical",href:g})]})}},49287:function(e,t,r){"use strict";r.d(t,{s:function(){return i}});var a=r(81657),n=r(20285);let i=async e=>{let{data:t,error:r}=await a.O.from("episodes").select("original_audio_file_url, publication_type").eq("id",e).single();if(r)throw r;if(t&&t.original_audio_file_url){let e="PRIVATE"===t.publication_type?"private":"public",r=t.original_audio_file_url.replace(/\/[^\/]*$/,""),a="".concat(e,"/").concat(r);try{await (0,n._)(a),await (0,n._)("".concat(a,"/hls"),"coenoma-hls-prod")}catch(e){throw console.error("Failed to delete episode files:",e),Error("Failed to delete episode files")}}let{error:i}=await a.O.from("episode_speakers").delete().eq("episode_id",e);if(i||({error:i}=await a.O.from("episode_groups").delete().eq("episode_id",e),i)||({error:i}=await a.O.from("user_episodes").delete().eq("episode_id",e),i)||({error:i}=await a.O.from("playlist_episodes").delete().eq("episode_id",e),i)||({error:i}=await a.O.from("playback_events").delete().eq("episode_id",e),i)||({error:i}=await a.O.from("episodes").delete().eq("id",e),i))throw i}},20482:function(e,t,r){"use strict";r.d(t,{K:function(){return a}});let a=async e=>{let t=await fetch("/api/shared/get_base_episode",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({episodeId:e})});if(!t.ok)throw Error((await t.json()).error||"Failed to fetch episode");return await t.json()}},52445:function(e,t,r){"use strict";r.d(t,{$:function(){return i}});var a=r(27856),n=r.n(a);let i=e=>{let t=e.replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,'<a href="$1" target="_blank" rel="noopener noreferrer" class="text-primary" >$1</a>');return t=t.replace(/\n/g,"<br />"),n().sanitize(t,{ADD_ATTR:["target"]})}},34875:function(e,t,r){"use strict";r.d(t,{v:function(){return i}});var a=r(66485),n=r.n(a);let i=async e=>{try{return await n()(e),!0}catch(e){return!1}}},20285:function(e,t,r){"use strict";r.d(t,{_:function(){return i}});var a=r(87066),n=r(95332);let i=async(e,t)=>{try{n.Z.debug("directory",e),n.Z.debug("bucket",t);let r=await a.Z.post("/api/shared/delete_directory",{directory:e,bucket:t||"coenoma-prod"});n.Z.debug("Directory deleted successfully:",r.data.message)}catch(e){if(a.Z.isAxiosError(e)){var r;throw Error("ãã£ã¬ã¯ããªã®åé¤ã«å¤±æãã¾ãã: ".concat((null===(r=e.response)||void 0===r?void 0:r.data.error)||e.message))}throw Error("ãã£ã¬ã¯ããªã®åé¤ä¸ã«æªç¥ã®ã¨ã©ã¼ãçºçãã¾ããã")}}},80571:function(e,t,r){"use strict";r.d(t,{c:function(){return i}});var a=r(87066),n=r(95332);let i=async(e,t,r)=>{if(Array.isArray(t)||(t=[t]),(t=t.filter(e=>e)).length)try{let i=await a.Z.post("/api/shared/delete_files",{directory:e,filePaths:t,bucket:r||"coenoma-prod"});n.Z.debug("Deleted objects:",i.data.deletedObjects)}catch(e){if(a.Z.isAxiosError(e))throw Error("ãã¡ã¤ã«ã®åé¤ã«å¤±æãã¾ãã: ".concat(e.message));throw Error("ãã¡ã¤ã«ã®åé¤ä¸ã«æªç¥ã®ã¨ã©ã¼ãçºçãã¾ããã")}}},64771:function(e,t,r){"use strict";r.d(t,{Nx:function(){return p},WC:function(){return h},ct:function(){return d},q5:function(){return l},r8:function(){return u}});var a=r(70852),n=r(80571),i=r(34526),c=r(95332),o=r(20285);let s=async(e,t)=>{if(t.startsWith("http://")||t.startsWith("https://"))return t;try{return await (0,i.q)("PRIVATE"!==e.publicationType,t)}catch(e){throw Error("ãã¡ã¤ã«ã®åå¾ã«å¤±æãã¾ãã: ".concat(e))}},l=async function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],a=arguments.length>3?arguments[3]:void 0,n={};return t&&e.thumbnailUrl?n.displayThumbnailUrl=await s(e,e.thumbnailUrl):t&&a&&(n.displayThumbnailUrl=a.displayIconUrl?a.displayIconUrl:"/images/default_community_icon.png"),r&&e.originalAudioFileUrl&&(n.displayOriginalAudioFileUrl=await s(e,e.originalAudioFileUrl)),n},d=async function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";try{return await (0,a.c)("PRIVATE"===e?"private":"public",t,r,n)}catch(e){throw Error("ãã¡ã¤ã«ã®ã¢ãããã¼ãã§ã¨ã©ã¼ãçºçãã¾ãã: ".concat(e))}},u=async(e,t,r)=>{try{let a="PRIVATE"===t?"private":"public";await (0,n.c)(a,r);let i=r.replace(/\/[^\/]*$/,""),s="".concat(a,"/").concat(i,"/hls");c.Z.debug("hlsPath",s),"audio"===e&&await (0,o._)(s,"coenoma-hls-prod")}catch(e){throw Error("ãã¡ã¤ã«ã®åé¤ã§ã¨ã©ã¼ãçºçãã¾ãã: ".concat(e))}},p=async(e,t,r,a)=>{let n="PRIVATE"===t.publicationType?"private":"public";if(n!==("PRIVATE"===r?"private":"public"))try{let c=await (0,i.q)("public"===n,a),o="PRIVATE"!==t.publicationType,s=await fetch(c,o?{}:{credentials:"include"}),l=await s.blob(),p=new File([l],a.split("/").pop()||"download",{type:l.type}),h=a.replace(/\/[^\/]*$/,"");await d(r,p,p.name,h),await u(e,t.publicationType,a)}catch(e){throw Error("å
¬éã¿ã¤ãã®å¤æ´ä¸ã«ã¨ã©ã¼ãçºçãã¾ãã: ".concat(e))}},h=async(e,t)=>{try{let r=await (0,i.q)("public"==("PRIVATE"===e?"private":"public"),t),a=new URL(r).pathname.split("/")[1],n=await fetch(r,"private"===a?{credentials:"include"}:{});if(!n.ok)throw Error("ãã¡ã¤ã«ã®ãã¦ã³ãã¼ãã«å¤±æãã¾ããã");let c=await n.blob(),o=window.URL.createObjectURL(c),s=document.createElement("a");s.href=o,s.download=t.split("/").pop()||"download",document.body.appendChild(s),s.click(),window.URL.revokeObjectURL(o)}catch(e){throw Error("ãã¡ã¤ã«ã®ãã¦ã³ãã¼ãã§ã¨ã©ã¼ãçºçãã¾ãã: ".concat(e))}}},80918:function(e,t,r){"use strict";function a(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];"string"==typeof e&&(e=new Date(e));let r=e.getFullYear(),a=(e.getMonth()+1).toString().padStart(2,"0"),n=e.getDate().toString().padStart(2,"0"),i=e.getHours().toString().padStart(2,"0"),c=e.getMinutes().toString().padStart(2,"0");return t?"".concat(r,"-").concat(a,"-").concat(n," ").concat(i,":").concat(c):"".concat(r,"-").concat(a,"-").concat(n)}r.d(t,{o:function(){return a}})},70852:function(e,t,r){"use strict";r.d(t,{c:function(){return c}});var a=r(57632);let n=e=>{let t=e.split(".").pop(),r=e.replace(/\.[^/.]+$/,"");if(!/^[a-zA-Z0-9_\-.]+$/.test(r)){let e=(0,a.Z)();return t?"".concat(e,".").concat(t):e}return e};var i=r(95332);let c=async function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=r?n(r):(0,a.Z)(),s=c?"".concat(e,"/").concat(c,"/").concat(o):"".concat(e,"/").concat(o),l=c?"".concat(c,"/").concat(o):"".concat(o);i.Z.debug("s3 objectPath",s);try{let e=await fetch("/api/shared/get_s3_presigned_url",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({objectPath:s})});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error("äºåç½²åä»ãURLã®åå¾ã«å¤±æãã¾ãã: ".concat(t.error||e.statusText))}let r=await e.json();i.Z.debug("s3 presignedPostData",r);let a=new FormData;
1Object.entries(r.fields).forEach(e=>{let[t,r]=e;a.append(t,r)}),a.append("file",t);let n=await fetch(r.url,{method:"POST",body:a});if(!n.ok&&204!==n.status)throw Error("S3ã¸ã®ãã¡ã¤ã«ã¢ãããã¼ãã«å¤±æãã¾ããï¼ã¹ãã¼ã¿ã¹: ".concat(n.status,"ï¼"));return l}catch(e){throw console.error("Failed to upload file: ".concat(e)),Error("ãã¡ã¤ã«ã®ã¢ãããã¼ãã§ã¨ã©ã¼ãçºçãã¾ããã\n".concat(e.message))}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.