PageSourceSearch

https://mimel-ai.com/_next/static/chunks/2320-b55c6d04033f1a9b.js

js mimel-ai.com collected 2026-09-25 02:59:52 UTC 97,333 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2320],{2320:function(e,t,n){n.d(t,{default:function(){return $}});var r=n(7437),l=n(2265),s=n(4887),a=n(9376),i=n(7648),o=n(9234),c=n(8706),d=n(3121),u=n(8919),m=n(7782),x=n(6211),p=n(6348),h=n(6337),f=n(7769),g=n(2208);function b(e){let{storyId:t,containerClassName:n,customSchemeUrl:s,appStoreUrl:a,playStoreUrl:i,onOpenInAppClick:d,onUnlocked:u}=e,m=(0,o.bU)(),x=(0,c.T)("storyDetail"),[p,b]=(0,l.useState)(""),[y,v]=(0,l.useState)(!1),[w,j]=(0,l.useState)(!1),[N,C]=(0,l.useState)(null),k=async e=>{if(e.preventDefault(),w)return;let n=p.trim();if(!n){C(x("passwordRequired"));return}j(!0),C(null);try{var r,l,s,a;let e=await fetch("/api/public/story-detail/".concat(encodeURIComponent(t),"?includeSocial=0"),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({password:n,locale:m})}),i=await e.json().catch(()=>null);if(!e.ok){C((null==i?void 0:i.code)==="wrong_password"?x("passwordWrong"):x("passwordUnlockFailed"));return}if(!(null==i?void 0:i.story)||i.isPasswordProtected){C(x("passwordUnlockFailed"));return}b(""),u({story:i.story,isPasswordProtected:!1,creator:null!==(r=i.creator)&&void 0!==r?r:null,relatedStories:null!==(l=i.relatedStories)&&void 0!==l?l:[],genreMaster:null!==(s=i.genreMaster)&&void 0!==s?s:null,socialBundle:null!==(a=i.socialBundle)&&void 0!==a?a:null})}catch(e){console.error("Story password unlock failed",e),C(x("passwordUnlockFailed"))}finally{j(!1)}};return(0,r.jsx)("div",{className:n,children:(0,r.jsxs)("div",{className:"mx-auto w-full max-w-md text-center",children:[(0,r.jsxs)("div",{className:"rounded-lg border border-[#ECE3EA] bg-white p-6 shadow-[0px_16px_40px_rgba(77,50,72,0.08)]",children:[(0,r.jsx)("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-[#FFF0F6] text-[#D45A9D]",children:(0,r.jsx)(h.Z,{className:"h-6 w-6","aria-hidden":"true"})}),(0,r.jsx)("h1",{className:"text-lg font-semibold text-[#423C47]",children:x("passwordProtectedTitle")}),(0,r.jsx)("p",{className:"mt-2 text-sm leading-relaxed text-[#6F6776]",children:x("passwordProtectedDescription")}),(0,r.jsxs)("form",{className:"mt-5 space-y-3 text-left",onSubmit:k,children:[(0,r.jsx)("label",{htmlFor:"story-access-password-unlock",className:"block text-xs font-semibold text-[#8E8597]",children:x("passwordInputLabel")}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{id:"story-access-password-unlock",type:y?"text":"password",value:p,onChange:e=>{b(e.target.value),C(null)},placeholder:x("passwordInputPlaceholder"),autoComplete:"current-password",disabled:w,className:"h-12 w-full rounded-lg border border-[#ECE3EA] bg-[#FFFBFD] px-4 pr-12 text-sm text-[#423C47] outline-none transition placeholder:text-[#B8AFBE] focus:border-[#E477B1] focus:bg-white focus:ring-2 focus:ring-[#F9D4E6]"}),(0,r.jsx)("button",{type:"button",onClick:()=>v(e=>!e),className:"absolute inset-y-0 right-0 flex w-11 items-center justify-center text-[#8E8597] transition hover:text-[#D45A9D]","aria-label":y?x("hidePassword"):x("showPassword"),disabled:w,children:y?(0,r.jsx)(f.Z,{className:"h-4 w-4"}):(0,r.jsx)(g.Z,{className:"h-4 w-4"})})]}),N?(0,r.jsx)("p",{className:"text-xs font-medium leading-5 text-[#D13F72]",children:N}):null,(0,r.jsx)("button",{type:"submit",disabled:w,className:"inline-flex h-12 w-full items-center justify-center rounded-full bg-[#E477B1] px-5 text-sm font-semibold text-white transition hover:bg-[#d96aa5] disabled:cursor-not-allowed disabled:opacity-60",children:w?x("checking"):x("passwordConfirm")})]})]}),(0,r.jsxs)("div",{className:"mt-6 flex flex-col gap-3",children:[(0,r.jsx)("p",{className:"text-sm font-semibold text-[#423C47]",children:x("openInApp")}),(0,r.jsx)("a",{href:s,onClick:d,className:"inline-flex items-center justify-center rounded-full border border-[#F0E3EB] bg-white px-5 py-2.5 text-sm font-semibold text-[#D45A9D] transition hover:bg-[#FFF7FB]",children:x("openApp")}),(0,r.jsxs)("div",{className:"flex flex-col items-center gap-2 pt-2",children:[(0,r.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center rounded-full bg-[#E477B1] px-5 py-2.5 text-sm font-semibold text-white transition hover:bg-[#d96aa5]",children:x("downloadOnAppStore")}),(0,r.jsx)("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center rounded-full bg-[#E477B1] px-5 py-2.5 text-sm font-semibold text-white transition hover:bg-[#d96aa5]",children:x("downloadOnGooglePlay")})]})]})]})})}var y=n(6281),v=n(1701),w=n(2198),j=n(9686),N=n(362),C=n(3705),k=n(7768),F=n(381),E=n(5849),S=n(2781),A=n(1202),L=n(1301),D=n(613),I=n(1779),B=n(5775),P=n(7385),M=n(9165);let T="https://apps.apple.com/app/id6745084867",U="https://play.google.com/store/apps/details?id=com.liume.mimel",z={isAuthenticated:!1,hasLiked:!1,isFollowingCreator:!1,can
1FollowCreator:!1,isBlockingCreator:!1,isMutingCreator:!1},R=(e,t)=>{let n=[],r="en"===t?null:t.toLowerCase();return r&&n.push(r),n.push("story",e),"mimel://".concat(n.join("/"))},_=e=>{let t=null==e?void 0:e.accessPasswordHash;return"string"==typeof t&&t.trim().length>0},W=e=>(null==e?void 0:e.visibility)==="invitation"&&_(e),O=e=>{let t=new Set,n=[];return e.forEach(e=>{let r="string"==typeof e?e.trim():"";!r||t.has(r)||(t.add(r),n.push(r))}),n},J=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:140,n=e.replace(/\s+/g," ").trim();return n.length<=t?n:"".concat(n.slice(0,t-1),"…")},q=(e,t)=>{if(!e)return 0;let n=e[t];if("number"==typeof n&&Number.isFinite(n))return n;if("string"==typeof n&&n.trim()){let e=Number(n);if(Number.isFinite(e))return e}return 0},G=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e)return t;let n=e.commentCount;if("number"==typeof n&&Number.isFinite(n))return n;if("string"==typeof n&&n.trim()){let e=Number(n);if(Number.isFinite(e))return e}return t},H=(e,t)=>{let n=new Date(e);return Number.isNaN(n.getTime())?"-":new Intl.DateTimeFormat(t,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(n)},V=e=>{let{label:t,muted:n=!1,prefixHash:l=!0}=e;return(0,r.jsx)("span",{className:"rounded-full border px-3 py-1 text-xs font-medium ".concat(n?"border-[#ECE3EA] bg-white text-[#6F6776]":"border-[#F0E3EB] bg-[#FFF0F6] text-[#D45A9D]"),children:l?"#".concat(t):t})},Z=e=>{let{title:t,items:n}=e;return n.length?(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-[#423C47]",children:t}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(e=>(0,r.jsx)(V,{label:e,muted:!0,prefixHash:!1},"".concat(t,"-").concat(e)))})]}):null},Q=e=>{let{icon:t,value:n}=e;return(0,r.jsxs)("div",{className:"flex items-center gap-1.5 text-sm text-[#6F6776]",children:[(0,r.jsx)("span",{className:"text-[#8E8597]",children:t}),(0,r.jsx)("span",{children:n})]})},Y=e=>{var t,n;let{story:l,href:s}=e,a=l.coverImageUrl||(null===(n=l.characters)||void 0===n?void 0:null===(t=n.find(e=>e.image))||void 0===t?void 0:t.image)||null,o=(0,k.V)(a)||a,c=O([...l.category||[],...l.tags||[]]).slice(0,3);return(0,r.jsxs)(i.default,{href:s,className:"group flex w-[220px] shrink-0 flex-col overflow-hidden rounded-[18px] border border-[#ECE3EA] bg-white transition-colors hover:border-white/15 hover:shadow-[0px_12px_30px_rgba(77,50,72,0.08)]",children:[(0,r.jsxs)("div",{className:"relative aspect-[4/5] overflow-hidden",children:[o?(0,r.jsx)("img",{src:o,alt:l.title,loading:"lazy",decoding:"async",className:"h-full w-full object-cover transition-transform duration-300 group-hover:scale-[1.02]"}):(0,r.jsx)("div",{className:"h-full w-full bg-[radial-gradient(circle_at_top,rgba(228,119,177,0.25),rgba(248,247,255,1)_68%)]"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/20 to-transparent"}),(0,r.jsx)("div",{className:"absolute bottom-3 left-3 right-3",children:(0,r.jsx)("h3",{className:"line-clamp-2 text-lg font-semibold text-white",children:l.title})})]}),(0,r.jsxs)("div",{className:"space-y-3 px-3 py-3",children:[(0,r.jsx)("p",{className:"line-clamp-2 text-sm leading-5 text-[#6F6776]",children:J((0,A.Qw)(l),88)}),c.length?(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:c.map(e=>(0,r.jsxs)("span",{className:"rounded-full bg-[#FBF6FA] px-2.5 py-1 text-[11px] text-[#8E8597]",children:["#",e]},"".concat(l.storyId,"-").concat(e)))}):null]})]})};function $(e){var t,n,h,f,g,_,J,V,$,K,X,ee,et,en;let{initialStory:er=null,isPasswordProtected:el=!1,initialCreator:es=null,initialRelatedStories:ea=[],initialGenreMaster:ei=null,initialSocialBundle:eo=null,storyIdOverride:ec,initialCharacterId:ed,characterOnly:eu=!1,hideCharacterModalActions:em=!1,hideStoryStartAction:ex=!1,presentation:ep="page",onRequestClose:eh,disableClientStoryLoad:ef=!1}=e,eg=(0,a.useRouter)(),eb=(0,a.useParams)(),ey=(0,a.usePathname)()||"",ev=(0,a.useSearchParams)(),ew=ec||eb.storyId,ej=(0,o.bU)(),eN=(0,c.T)("common"),eC=(0,c.T)("storyDetail"),ek=(0,c.T)("character"),{user:eF,userProfile:eE,loading:eS}=(0,y.a)(),eA="modal"===ep,eL=(0,E.WU)("/",ej),eD=(0,l.useMemo)(()=>R(ew,ej),[ew,ej]),eI=(null==ev?void 0:null===(t=ev.get("character"))||void 0===t?void 0:t.trim())||("string"==typeof ed?ed.trim():null),eB=eA&&eu&&!!eI,eP=!em,eM=!ex,eT=eB?"bg-transparent":"bg-black/80",eU=e=>(0,L.IH)({storyId:e,locale:ej}),ez=(e,t)=>(0,L.L$)({storyId:e,locale:ej,visibility:t}),eR=e=>(0,N.Y)(e,ej),[e_,eW]=(0,l.useState)(er),[eO,eJ]=(0,l.useState)(el),[eq,eG]=(0,l.useState)(es),[eH,eV]=(0,l.useState)(ea),[eZ,eQ]=(0,l.useState)(!er&&!el&&!ef),[eY,e$]=(0,l.useState)(!1),[eK,eX]=(0,l.useState)(!1),[,e0]=(0,l.useState)(!1),[e1,e2]=(0,l.useState)(null),[e4,e3]=(0,l.useState)(null!==(V=null==eo?void 0:eo.summary)&&void 0!==V?V:null),[e5,e6]=(0,l.useState)(null!==($=null==eo?void 0:eo.comments)&&void 0!==$?$:[]),[e8,e7]=(0,l.useState)(null!==(K=null==eo?void 0:eo.summary.shareCount)&&void 0!==K?K:0),[e9,te]=(0,l.useState)(null!==(X=null==eo?void 0:eo.viewerState)&&void 0!==X?X:z),[tt,tn]=(0,l.useState)(""),[tr,tl]=(0,l.useState)({}),[ts,ta]=(0,l.useState)(null),[ti,to]=(0,l.useState)(null),[tc,td]=(0,l.useState)(""),[tu,tm]=(0,l.useState)(null),[tx,tp]=(0,l.useState)(!1),[th,tf]=(0,l.useState)(null),[tg,tb]=(0,l.useState)(!1),[ty,tv]=(0,l.useState)(!1),[tw,tj]=(0,l.useState)(!1),[tN,tC]=(0,l.useState)(!1),[tk,tF]=(0,l.useState)({}),[tE,tS]=(0,l.useState)({}),[tA,tL]=(0,l.useState)({}),[tD,tI]=(0,l.useState)({}),[tB,tP]=(0,l.useState)(!1),[tM,tT]=(0,l.useState)(!1),[tU,tz]=(0,l.useState)(!1),[tR,t_]=(0,l.useState)(!0),tW=(0,l.useRef)(null),tO=(0,l.useRef)(null),tJ=(0,l.useRef)(null),tq=(0,l.useRef)(null),tG=(0,l.useRef)(null),tH=(0,l.useMemo)(()=>!!eO||W(e_),[eO,e_]),tV=(null==e_?void 0:e_.visibility)==="draft",tZ=!!(eF&&!eF.isAnonymous),tQ=tZ?(null==eF?void 0:eF.uid)||"user":"guest",tY=tZ?"user:".concat(null==eF?void 0:eF.uid):"guest",t$=j.XJ&&(!(null==e_?void 0:e_.visibility)||"public"===e_.visibility),tK=(0,N.j)(),{genreLabelMap:tX}=(0,v.d)(ej,[],{initialData:ei});(0,l.useEffect)(()=>
1{if("undefined"==typeof navigator)return;let e=navigator.userAgent||"",t=navigator.platform||"",n=/iPad|iPhone|iPod/.test(e)||"MacIntel"===t&&navigator.maxTouchPoints>1,r=/Android/i.test(e);tT(n),tz(r)},[]),(0,l.useEffect)(()=>{if(!tN)return;let e=e=>{var t;(null===(t=tG.current)||void 0===t?void 0:t.contains(e.target))||tC(!1)},t=e=>{"Escape"===e.key&&tC(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[tN]),(0,l.useEffect)(()=>{var e,t,n,r;eW(er),eJ(el),eG(es),eV(ea),e3(null!==(e=null==eo?void 0:eo.summary)&&void 0!==e?e:null),e6(null!==(t=null==eo?void 0:eo.comments)&&void 0!==t?t:[]),e7(null!==(n=null==eo?void 0:eo.summary.shareCount)&&void 0!==n?n:0),te(null!==(r=null==eo?void 0:eo.viewerState)&&void 0!==r?r:z),eQ(!er&&!el&&!ef)},[ef,es,ea,eo,er,el]),(0,l.useEffect)(()=>{tW.current=null,tO.current=null,tJ.current=null,tn(""),tl({}),ta(null),to(null),td(""),tm(null),tf(null),tF({}),tS({})},[ew]),(0,l.useEffect)(()=>{var e;if(!e_||!eI){null!==tW.current&&(e2(null),tW.current=null);return}let t=null===(e=e_.characters)||void 0===e?void 0:e.find(e=>e.characterId===eI);if(!t){null!==tW.current&&(e2(null),tW.current=null);return}tW.current!==eI&&(e2(t),tW.current=eI)},[eI,e_]),(0,l.useEffect)(()=>{if(ef||er||tH||eS)return;let e="".concat(ew,":").concat(tQ);tO.current!==e&&(tO.current=e,t0())},[eS,ef,er,tH,ew,tQ]),(0,l.useEffect)(()=>{if(tH)return;if(!t$){e3(null),e6([]),e7(0),te(z);return}if(eS)return;tZ||te(z);let e="".concat(ew,":").concat(tY);if(tq.current===e)return;tq.current=e;let t=!0;return e0(!0),w.p.getBundle(ew,eF).then(e=>{t&&(e6(e.comments),e7(e.summary.shareCount),e3(e.summary),te(e.viewerState),e.summary.creatorSummary&&eG(t=>t?{...t,...e.summary.creatorSummary}:e.summary.creatorSummary))}).catch(e=>{t&&console.error("Failed to load story social bundle",e)}).finally(()=>{t&&e0(!1)}),()=>{t=!1}},[eS,tZ,tH,tY,ew,t$,eF]),(0,l.useEffect)(()=>{if(eA||!e1)return;let e=document.body.style.overflow,t=document.documentElement.style.overflow;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",()=>{document.body.style.overflow=e,document.documentElement.style.overflow=t}},[eA,e1]);let t0=async()=>{if(!eY){e$(!0);try{let e=await C.G.getStoryById(ew,void 0,ej);e?eW(e):console.error("Story not found:",ew)}catch(e){console.error("Story load failed:",e)}finally{eQ(!1),e$(!1)}}},t1=()=>{let e=G(e_,e5.length);return{creatorSummary:eq,likeCount:q(e_,"likeCount"),playCount:q(e_,"playCount"),rootCommentCount:e,replyCount:0,commentCount:e,shareCount:e8,lastCommentAt:null,lastInteractionAt:null,recentCommentPreview:null}},t2=e=>{e3(t=>({...null!=t?t:t1(),...e}))},t4=(e,t)=>{e6(n=>n.map(n=>n.id===e?t(n):n))},t3=(e,t,n)=>{t4(e,e=>({...e,replies:e.replies.map(e=>e.id===t?n(e):e)}))},t5=e=>{e6(t=>t.filter(t=>t.id!==e))},t6=(e,t)=>{t4(e,e=>({...e,replyCount:Math.max(0,e.replyCount-1),replies:e.replies.filter(e=>e.id!==t)}))},t8=()=>new URL(ez(ew,null==e_?void 0:e_.visibility),window.location.origin).toString(),t7=()=>{if(!tK){tP(!0);return}let e=null==ev?void 0:ev.toString(),t=ez(ew,null==e_?void 0:e_.visibility),n=ey?"".concat(ey).concat(e?"?".concat(e):""):"".concat(t).concat(e?"?".concat(e):"");(0,S.z)(n,{appDeepLinkPath:t})},t9=()=>!e9.isBlockingCreator||((0,P.GF)({message:eC("unblockToInteract"),tone:"danger"}),!1),ne=e=>{(0,P.GF)({message:e instanceof Error?e.message:eC("socialActionFailed"),tone:"danger"})},nt=async()=>{var e;if(tg||!t$)return;if(!eF||eF.isAnonymous){t7();return}if(!t9())return;let t=null!==(e=null==e4?void 0:e4.likeCount)&&void 0!==e?e:q(e_,"likeCount"),n=!e9.hasLiked;tb(!0),te(e=>({...e,isAuthenticated:!0,hasLiked:n})),t2({likeCount:Math.max(0,t+(n?1:-1))});try{let e=await w.p.toggleLike(ew,eF);te(t=>({...t,isAuthenticated:!0,hasLiked:e.liked})),t2({likeCount:e.likeCount})}catch(e){console.error("Failed to toggle story like",e),te(e=>({...e,hasLiked:!n})),t2({likeCount:t}),ne()}finally{tb(!1)}},nn=async()=>{if(tw||!t$)return;if(!eF||eF.isAnonymous){t7();return}let e=await (0,P.Se)({title:eC("reportAction")});if(e){tj(!0);try{await w.p.reportStory(ew,e.reasonCode,e.reasonText,eF),(0,M.q)(eC("reportSubmitted"))}catch(e){console.error("Failed to report story",e),ne(e)}finally{tj(!1)}}},nr=async()=>
1{if(!t$)return;let e=tt.trim();if(!e){(0,P.GF)({message:eC("commentEmpty"),tone:"danger"});return}if(e.length>280){(0,P.GF)({message:eC("commentMaxLength",{max:280}),tone:"danger"});return}if(!tx){if(!eF||eF.isAnonymous){t7();return}if(t9()){tp(!0);try{let t=await w.p.addComment(ew,e,eF);e6(e=>[t.comment,...e]),t2({commentCount:t.commentCount}),tn("")}catch(e){console.error("Failed to submit comment",e),ne(e)}finally{tp(!1)}}}},nl=async e=>{if(!t$)return;let t=(tr[e]||"").trim();if(!t){(0,P.GF)({message:eC("replyEmpty"),tone:"danger"});return}if(t.length>280){(0,P.GF)({message:eC("commentMaxLength",{max:280}),tone:"danger"});return}if(th!==e){if(!eF||eF.isAnonymous){t7();return}if(t9()){tf(e);try{let n=await w.p.addReply(ew,e,t,eF);t4(e,e=>({...e,replyCount:Math.max(n.replyCount,e.replyCount+1),replies:[...e.replies,n.reply]})),t2({commentCount:n.commentCount}),tl(t=>({...t,[e]:""})),ta(null)}catch(e){console.error("Failed to submit reply",e),ne(e)}finally{tf(null)}}}},ns=async e=>{if(tk[e]||!t$)return;if(!eF||eF.isAnonymous){t7();return}if(!t9())return;let t=e5.find(t=>t.id===e);if(!t)return;let n=!t.viewerState.hasLiked,r=Math.max(0,t.likeCount+(n?1:-1));tF(t=>({...t,[e]:!0})),t4(e,e=>({...e,likeCount:r,viewerState:{...e.viewerState,hasLiked:n}}));try{let t=await w.p.toggleCommentLike(ew,e,eF);t4(e,e=>({...e,likeCount:t.likeCount,viewerState:{...e.viewerState,hasLiked:t.liked}}))}catch(n){console.error("Failed to toggle comment like",n),t4(e,e=>({...e,likeCount:t.likeCount,viewerState:{...e.viewerState,hasLiked:t.viewerState.hasLiked}})),ne()}finally{tF(t=>{let n={...t};return delete n[e],n})}},na=async(e,t)=>{var n;let r="".concat(e,":").concat(t);if(tE[r]||!t$)return;if(!eF||eF.isAnonymous){t7();return}if(!t9())return;let l=null===(n=e5.find(t=>t.id===e))||void 0===n?void 0:n.replies.find(e=>e.id===t);if(!l)return;let s=!l.viewerState.hasLiked,a=Math.max(0,l.likeCount+(s?1:-1));tS(e=>({...e,[r]:!0})),t3(e,t,e=>({...e,likeCount:a,viewerState:{...e.viewerState,hasLiked:s}}));try{let n=await w.p.toggleReplyLike(ew,e,t,eF);t3(e,t,e=>({...e,likeCount:n.likeCount,viewerState:{...e.viewerState,hasLiked:n.liked}}))}catch(n){console.error("Failed to toggle reply like",n),t3(e,t,e=>({...e,likeCount:l.likeCount,viewerState:{...e.viewerState,hasLiked:l.viewerState.hasLiked}})),ne()}finally{tS(e=>{let t={...e};return delete t[r],t})}},ni=()=>{to(null),td(""),tm(null)},no=e=>{if(tA[e]||!t$)return;if(!eF||eF.isAnonymous){t7();return}let t=e5.find(t=>t.id===e);t&&(ta(null),to({type:"comment",commentId:e}),td(t.content),tm(null))},nc=(e,t)=>{var n;if(tD["".concat(e,":").concat(t)]||!t$)return;if(!eF||eF.isAnonymous){t7();return}let r=null===(n=e5.find(t=>t.id===e))||void 0===n?void 0:n.replies.find(e=>e.id===t);r&&(to({type:"reply",commentId:e,replyId:t}),td(r.content),tm(null))},nd=async()=>{var e;if(!ti||!t$)return;if(!eF||eF.isAnonymous){t7();return}let t=tc.trim();if(!t){tm("comment"===ti.type?eC("commentEmpty"):eC("replyEmpty"));return}if(t.length>280){tm(eC("commentMaxLength",{max:280}));return}if("comment"===ti.type){let e=e5.find(e=>e.id===ti.commentId);if(!e||t===e.content.trim()){ni();return}tL(e=>({...e,[ti.commentId]:!0}));try{let e=await w.p.editComment(ew,ti.commentId,t,eF);t4(ti.commentId,t=>({...t,content:e.content,updatedAt:e.updatedAt})),ni()}catch(e){console.error("Failed to edit comment",e),ne(e)}finally{tL(e=>{let t={...e};return delete t[ti.commentId],t})}return}let n="".concat(ti.commentId,":").concat(ti.replyId),r=null===(e=e5.find(e=>e.id===ti.commentId))||void 0===e?void 0:e.replies.find(e=>e.id===ti.replyId);if(!r||t===r.content.trim()){ni();return}tI(e=>({...e,[n]:!0}));try{let e=await w.p.editReply(ew,ti.commentId,ti.replyId,t,eF);t3(ti.commentId,ti.replyId,t=>({...t,content:e.content,updatedAt:e.updatedAt})),ni()}catch(e){console.error("Failed to edit reply",e),ne(e)}finally{tI(e=>{let t={...e};return delete t[n],t})}},nu=async e=>{if(!tA[e]&&t$){if(!eF||eF.isAnonymous){t7();return}if(await (0,P.A)({message:eC("hideCommentConfirm"),confirmLabel:eC("hideAction"),tone:"danger"})){tL(t=>({...t,[e]:!0}));try{let t=await w.p.hideComment(ew,e,eF);t5(e),t2({commentCount:t.commentCount})}catch(e){console.error("Failed to hide comment",e),ne(e)}finally{tL(t=>{let n={...t};return delete n[e],n})}}}}
1,nm=async e=>{if(!tA[e]&&t$){if(!eF||eF.isAnonymous){t7();return}if(await (0,P.A)({message:eC("deleteCommentConfirm"),confirmLabel:eC("deleteAction"),tone:"danger"})){tL(t=>({...t,[e]:!0}));try{let t=await w.p.deleteComment(ew,e,eF);t5(e),t2({commentCount:t.commentCount})}catch(e){console.error("Failed to delete comment",e),ne(e)}finally{tL(t=>{let n={...t};return delete n[e],n})}}}},nx=async e=>{if(tA[e]||!t$)return;if(!eF||eF.isAnonymous){t7();return}let t=await (0,P.Se)({title:eC("reportAction")});if(t){tL(t=>({...t,[e]:!0}));try{await w.p.reportComment(ew,e,t.reasonCode,t.reasonText,eF),(0,M.q)(eC("reportSubmitted"))}catch(e){console.error("Failed to report comment",e),ne(e)}finally{tL(t=>{let n={...t};return delete n[e],n})}}},np=async(e,t)=>{let n="".concat(e,":").concat(t);if(!tD[n]&&t$){if(!eF||eF.isAnonymous){t7();return}if(await (0,P.A)({message:eC("hideReplyConfirm"),confirmLabel:eC("hideAction"),tone:"danger"})){tI(e=>({...e,[n]:!0}));try{let n=await w.p.hideReply(ew,e,t,eF);t6(e,t),t2({commentCount:n.commentCount})}catch(e){console.error("Failed to hide reply",e),ne(e)}finally{tI(e=>{let t={...e};return delete t[n],t})}}}},nh=async(e,t)=>{let n="".concat(e,":").concat(t);if(!tD[n]&&t$){if(!eF||eF.isAnonymous){t7();return}if(await (0,P.A)({message:eC("deleteReplyConfirm"),confirmLabel:eC("deleteAction"),tone:"danger"})){tI(e=>({...e,[n]:!0}));try{let n=await w.p.deleteReply(ew,e,t,eF);t6(e,t),t2({commentCount:n.commentCount})}catch(e){console.error("Failed to delete reply",e),ne(e)}finally{tI(e=>{let t={...e};return delete t[n],t})}}}},nf=async(e,t)=>{let n="".concat(e,":").concat(t);if(tD[n]||!t$)return;if(!eF||eF.isAnonymous){t7();return}let r=await (0,P.Se)({title:eC("reportAction")});if(r){tI(e=>({...e,[n]:!0}));try{await w.p.reportReply(ew,e,t,r.reasonCode,r.reasonText,eF),(0,M.q)(eC("reportSubmitted"))}catch(e){console.error("Failed to report reply",e),ne(e)}finally{tI(e=>{let t={...e};return delete t[n],t})}}},ng=async()=>{if(ty)return;if(!eF||eF.isAnonymous){t7();return}let e=t8(),t=(0,A.Qw)(e_)||void 0;tv(!0);try{if("undefined"!=typeof navigator&&"function"==typeof navigator.share){if(await navigator.share({title:null==e_?void 0:e_.title,text:t,url:e}),t$){let e=await w.p.recordShare(ew,"native",eF);e7(e.shareCount)}}else{if(await navigator.clipboard.writeText(e),t$){let e=await w.p.recordShare(ew,"copy_link",eF);e7(e.shareCount)}(0,M.q)(eC("shareCopySuccess"))}}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return;console.error("Failed to share story",e),ne()}finally{tv(!1)}},nb=async e=>{var t,n;if(!e_||tJ.current===e_.storyId||!eF||eF.isAnonymous)return;let r=null!==(t=null==e4?void 0:e4.playCount)&&void 0!==t?t:q(e_,"playCount");tJ.current=e_.storyId,t2({playCount:r+1});try{let t=await w.p.startStory(e_.storyId,eF,{initializeSession:!0,characterId:e,apiVersion:(0,D.I9)(),locale:ej});(null===(n=t.session)||void 0===n?void 0:n.isExistingSession)===!1&&(0,I.S)(e_.storyId),"number"==typeof t.playCount?t2({playCount:t.playCount}):!1===t.accepted&&(tJ.current=null,t2({playCount:r}))}catch(e){throw console.error("Failed to start story",e),tJ.current=null,t2({playCount:r}),e}},ny=e=>{if(!e)return null;let t=(0,F.u)(e);return"male"===t||"female"===t||"other"===t||"unknown"===t?ek("gender.".concat(t)):String(e)},nv=(e,t)=>{let n="number"==typeof e?String(e):null==e?void 0:e.toString().trim(),r=ny(t),l="number"==typeof e||!!(n&&/^\d+$/.test(n));return n&&r&&l?ek("ageGender",{age:n,gender:r}):n&&l?ek("ageOnly",{age:n}):n&&r?"".concat(n,"・").concat(r):n||(r?ek("genderOnly",{gender:r}):"")},nw=(e,t)=>nv(e,t)||ek("unknown"),nj=e=>"string"==typeof e?e.trim():"",nN=e=>{let t=e.exampleDialogues;if(!Array.isArray(t))return"";let n=t.find(e=>"string"==typeof e&&e.trim());return"string"==typeof n?n.trim():""},nC=e=>nv(e.age,e.gender),nk=e=>nj(e.occupation),nF=tZ&&((null==eE?void 0:null===(n=eE.displayName)||void 0===n?void 0:n.trim())||(null==eF?void 0:null===(h=eF.displayName)||void 0===h?void 0:h.trim()))||"",nE=nF?ek("relationshipWithPlayer",{name:nF}):ek("relationshipWithProtagonist"),nS=(e,t,n)=>"h3"===e?(0,r.jsxs)("h3",{className:t,children:["# ",n]}):(0,r.jsxs)("h4",{className:t,children:["# ",n]}),nA=function(e,t,n){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"h4",s=nj(t);return s?(0,r.jsxs)("div",{className:"space-y-2.5",children:[nS(l,n,e),(0,r.jsx)("p",{className:"whitespace-pre-wrap text-[15px] leading-[26px] text-[#f5f5f5]",children:s})]}):null},nL=function(e,t,n){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"h4",s=Array.isArray(t)?t.map(e=>
1nj(e)).filter(Boolean):[];return s.length?(0,r.jsxs)("div",{className:"space-y-2",children:[nS(l,n,e),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map((e,t)=>(0,r.jsx)("span",{className:"rounded-full bg-white/20 px-3 py-1 text-sm text-[#f5f5f5]",children:e},"".concat(e,"-").concat(t)))})]}):null},nD="text-[13px] font-bold leading-[22px] text-[#f5f5f5]",nI="text-[15px] leading-[19px] text-[#c9c3cf]",nB="mx-auto max-w-2xl px-3 text-center text-[19px] font-bold leading-[31px] text-white drop-shadow-lg sm:text-[21px] sm:leading-[34px]",nP=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"h4",l=arguments.length>3?arguments[3]:void 0;return(0,r.jsxs)(r.Fragment,{children:[nA(nE,e.relationshipWithProtagonist,t,n),nA(ek("personality"),e.personality,t,n),nA(ek("appearance"),e.appearance,t,n),nA(ek("backstory"),e.backstory,t,n),nA(ek("romanceStyle"),e.romanceStyle,t,n),l,nL(ek("likes"),e.skills,t,n),nL(ek("dislikes"),e.dislikes,t,n)]})},nM=(e,t,n,l)=>{let s=nC(e),a=nk(e);if(!s&&!a)return null;let i=(0,r.jsxs)("div",{className:"flex max-w-full flex-col items-center gap-1.5",children:[s?(0,r.jsx)("p",{className:t,children:s}):null,a?(0,r.jsx)("p",{className:n,children:a}):null]});return l?(0,r.jsx)("div",{className:l,children:i}):i},nT=(e,t,n)=>{let l=nN(e);if(!l)return null;let s=(0,r.jsxs)("p",{className:t,children:["「",l,"」"]});return n?(0,r.jsx)("div",{className:n,children:s}):s},nU=async()=>{if(!e_||tV||eK)return;if(!eF||eF.isAnonymous){t7();return}let e=(0,L.jg)(e_.storyId,null==e1?void 0:e1.characterId,ej);eX(!0);try{await nb(null==e1?void 0:e1.characterId),eg.push(e)}catch(e){ne(e),eX(!1)}},nz=e=>{e.preventDefault();let t=tU?U:T;if(!tM&&!tU){window.location.href=t;return}let n=window.setTimeout(()=>{window.location.href=t},1200);window.location.href=eD,window.setTimeout(()=>{window.clearTimeout(n)},2e3)},nR=eA?"min-h-full":"min-h-screen",n_=()=>{eA&&eh&&eh(),eg.push(ez(ew,null==e_?void 0:e_.visibility))}
1,nW=eK?(0,r.jsx)("div",{className:"fixed inset-0 z-[260] flex items-center justify-center bg-[rgba(20,18,22,0.72)] backdrop-blur-sm",children:(0,r.jsxs)("div",{className:"flex flex-col items-center gap-3 rounded-[24px] border border-white/10 bg-[rgba(35,30,38,0.84)] px-8 py-7 shadow-[0_24px_80px_rgba(0,0,0,0.32)]",children:[(0,r.jsx)("div",{className:"h-9 w-9 animate-spin rounded-full border-2 border-white/25 border-t-white"}),(0,r.jsx)("p",{className:"text-sm font-semibold text-white",children:eC("loading")})]})}):null,nO=()=>{if(eB&&eh){eh();return}e2(null)};if(tH)return(0,r.jsx)(b,{storyId:ew,containerClassName:"".concat(nR," bg-[#F8F7FF] px-6 py-12 text-[#423C47]"),customSchemeUrl:eD,appStoreUrl:T,playStoreUrl:U,onOpenInAppClick:nz,onUnlocked:e=>{var t,n,r,l,s,a,i,o,c,d;eW(e.story),eJ(!1),eG(null!==(s=e.creator)&&void 0!==s?s:null),eV(null!==(a=e.relatedStories)&&void 0!==a?a:[]),e3(null!==(i=null===(t=e.socialBundle)||void 0===t?void 0:t.summary)&&void 0!==i?i:null),e6(null!==(o=null===(n=e.socialBundle)||void 0===n?void 0:n.comments)&&void 0!==o?o:[]),e7(null!==(c=null===(r=e.socialBundle)||void 0===r?void 0:r.summary.shareCount)&&void 0!==c?c:0),te(null!==(d=null===(l=e.socialBundle)||void 0===l?void 0:l.viewerState)&&void 0!==d?d:z),eQ(!1),e$(!1)}});if(eZ)return(0,r.jsx)("div",{className:"flex ".concat(nR," items-center justify-center bg-[#F8F7FF] px-6 text-[#423C47]"),children:(0,r.jsxs)("div",{className:"rounded-3xl border border-[#ECE3EA] bg-white p-8 text-center shadow-[0px_16px_40px_rgba(77,50,72,0.08)]",children:[(0,r.jsx)("div",{className:"mx-auto mb-4 h-8 w-8 animate-spin rounded-full border-2 border-[#F0E3EB] border-t-[#E477B1]"}),(0,r.jsx)("p",{className:"text-[#6F6776]",children:eC("loading")})]})});if(!e_)return(0,r.jsx)("div",{className:"flex ".concat(nR," items-center justify-center bg-[#F8F7FF] px-6 text-[#423C47]"),children:(0,r.jsxs)("div",{className:"rounded-3xl border border-[#ECE3EA] bg-white p-8 text-center shadow-[0px_16px_40px_rgba(77,50,72,0.08)]",children:[(0,r.jsx)("p",{className:"mb-4 text-[#6F6776]",children:eC("notFound")}),(0,r.jsx)(i.default,{href:eL,className:"inline-flex items-center justify-center rounded-full bg-[#E477B1] px-5 py-2.5 text-sm font-semibold text-white transition hover:bg-[#d96aa5]",children:eC("backToHome")})]})});if(eB)return eZ?(0,r.jsx)("div",{className:"flex ".concat(nR," items-center justify-center bg-[#F8F7FF] px-6 text-[#423C47]"),children:(0,r.jsxs)("div",{className:"rounded-3xl border border-[#ECE3EA] bg-white p-8 text-center shadow-[0px_16px_40px_rgba(77,50,72,0.08)]",children:[(0,r.jsx)("div",{className:"mx-auto mb-4 h-8 w-8 animate-spin rounded-full border-2 border-[#F0E3EB] border-t-[#E477B1]"}),(0,r.jsx)("p",{className:"text-[#6F6776]",children:eC("loading")})]})}):e1?(0,r.jsx)("div",{className:"animate-overlay-in fixed inset-0 ".concat(eA?"z-[100]":"z-[60]"," flex items-center justify-center overflow-y-auto ").concat(eT," p-3 md:p-4"),onClick:nO,children:(0,r.jsxs)("div",{className:"animate-modal-pop-in relative flex h-[calc(100vh-24px)] w-full max-h-[calc(100vh-24px)] max-w-4xl flex-col overflow-hidden rounded-[32px] shadow-xl md:h-[calc(100vh-48px)] md:max-h-[calc(100vh-48px)]",style:{backgroundColor:"#3b3533"},onClick:e=>e.stopPropagation(),children:[e1.image&&e1.image.trim()?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"absolute inset-0",children:(0,r.jsx)("img",{src:(0,k.V)(e1.image)||e1.image,alt:e1.name,loading:"lazy",decoding:"async",className:"h-full w-full object-cover"})}),(0,r.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.72) 50%, rgba(0, 0, 0, 0.92) 100%)"}})]}):null,(0,r.jsx)("button",{type:"button",onClick:nO,className:"absolute right-4 top-4 z-10 flex h-10 w-10 items-center justify-center rounded-full bg-[rgba(43,34,37,0.52)] backdrop-blur-sm shadow-lg transition-colors hover:bg-[rgba(43,34,37,0.7)]",children:(0,r.jsx)("svg",{className:"h-6 w-6 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,r.jsxs)("div",{className:"relative flex-1 overflow-y-auto px-2 py-4 ".concat(eP?"pb-28":"pb-6"),children:[(0,r.jsx)("div",{className:"mb-4 mt-12 flex justify-center overflow-hidden rounded-full",children:(0,r.jsx)(p.B7,{character:e1,size:200,className:"h-[200px] w-[200px] rounded-full",tone:"dark",style:{border:"2px s
1olid rgba(156, 163, 175, 0.3)"}})}),(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"space-y-3 px-2 text-center",children:[(0,r.jsx)("h2",{className:"text-center text-[18px] font-semibold leading-[22px] tracking-[-0.43px] text-[#f5f5f5]",children:e1.name}),nM(e1,nI,nI),nT(e1,nB)]}),(0,r.jsx)("div",{className:"grid gap-7 px-2",children:nP(e1,nD,"h4",(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("h4",{className:nD,children:["# ",ek("appearingStory")]}),(0,r.jsx)("p",{className:"whitespace-pre-wrap text-[14px] leading-[22px] text-[#f5f5f5]",children:e_.title}),eP?(0,r.jsx)("button",{type:"button",onClick:n_,className:"mt-2 inline-flex w-full items-center justify-center rounded-[26px] border border-white/10 px-6 py-3 text-[15px] font-semibold leading-[18px] text-[#c1bcc6] transition hover:bg-white/5",children:eC("viewStoryAction")}):null]}))})]})]}),eP?(0,r.jsx)("div",{className:"relative z-10 px-4 pb-4 pt-2 backdrop-blur-sm",children:(0,r.jsx)("div",{className:"flex flex-col gap-3 sm:flex-row",children:(0,r.jsxs)("button",{type:"button",onClick:nU,disabled:tV||eK,className:"inline-flex min-h-[52px] flex-1 items-center justify-center gap-0 rounded-[26px] px-4 py-2 text-[15px] font-semibold leading-[18px] text-white shadow-lg transition-all active:scale-95 disabled:cursor-not-allowed disabled:opacity-50",style:{backgroundImage:"linear-gradient(142.61deg, rgb(183, 125, 255) 1.4664%, rgb(255, 141, 160) 100%)"},children:[(0,r.jsx)("svg",{className:"mr-1 inline h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),eC("startStoryWithCharacter")]})})}):null]})}):(0,r.jsx)("div",{className:"flex ".concat(nR," items-center justify-center bg-[#F8F7FF] px-6 text-[#423C47]"),children:(0,r.jsxs)("div",{className:"rounded-3xl border border-[#ECE3EA] bg-white p-8 text-center shadow-[0px_16px_40px_rgba(77,50,72,0.08)]",children:[(0,r.jsx)("p",{className:"mb-4 text-[#6F6776]",children:eC("notFound")}),(0,r.jsx)("button",{type:"button",onClick:nO,className:"inline-flex rounded-full bg-[#E477B1] px-5 py-2.5 text-sm font-semibold text-white transition hover:bg-[#d96aa5]",children:eN("close")})]})});let nJ=(0,A.Qw)(e_),nq=e_.coverImageUrl||(null===(g=e_.characters)||void 0===g?void 0:null===(f=g.find(e=>e.image))||void 0===f?void 0:f.image)||null,nG=(0,k.V)(nq)||nq,nH=(0,k.V)((null==eq?void 0:eq.profileImageUrl)||void 0)||(null==eq?void 0:eq.profileImageUrl)||null,nV=null!==(ee=null==e4?void 0:e4.playCount)&&void 0!==ee?ee:q(e_,"playCount"),nZ=null!==(et=null==e4?void 0:e4.likeCount)&&void 0!==et?et:q(e_,"likeCount"),nQ=null!==(en=null==e4?void 0:e4.commentCount)&&void 0!==en?en:G(e_,e5.length),nY=(()=>{let e=e_.characters.filter(e=>(0,B.isRomanceableRole)(e.role));return e.length>0?e:e_.characters})(),n$=O([...e_.category||[],...e_.tags||[]].map(e=>{let t=e.trim();return t?tX.get(t)||t:""})),nK=O(nY.map(e=>e.occupation)).slice(0,12),nX=O([...(null===(_=e_.storyBible)||void 0===_?void 0:_.themes)||[],...n$]).slice(0,12),n0=O(nY.flatMap(e=>e.skills||[])).slice(0,12),n1=O(nY.flatMap(e=>e.dislikes||[])).slice(0,12),n2=O(((null===(J=e_.storyBible)||void 0===J?void 0:J.locales)||[]).map(e=>e.name)).slice(0,4),n4=(null==eq?void 0:eq.displayName)||eC("creatorFallback");"number"==typeof(null==eq?void 0:eq.followerCount)&&eq.followerCount;let n3=j.Cv&&(null==eq?void 0:eq.uid)?eR(eq.uid):null,n5=tU?U:T,n6=tU?eC("downloadOnGooglePlay"):eC("downloadOnAppStore"),n8=!!((null==eF?void 0:eF.uid)&&(e_.uid===eF.uid||(null==eq?void 0:eq.uid)===eF.uid)),n7="generating"===e_.dramaScriptStatus,n9=(0,E.WU)((0,E.bY)("/story-creator/".concat(e_.storyId)),ej),re="bg-white px-5 py-6 md:px-6",rt=n8?(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,r.jsxs)(i.default,{href:n9,className:"inline-flex min-h-[52px] items-center justify-center gap-2 rounded-[18px] border border-[#8A7B96] bg-[#6A6073] px-4 py-3 text-[15px] font-semibold text-white transition hover:bg-[#746A7D]",children:[(0,r.jsx)(d.Z,{className:"h-5 w-5"}),eC("editAction")]}),(0,r.jsxs)("button",{type:"button",onClick:ng,disabled:ty,className:"inline-flex min-h-[52px] items-center justify-center gap-2 rounded-[18px] border border-[#8A7B96] bg-[#6A6073] px-4 py-3 text-[15px] font-semibold text-white transition hover:bg-[#746A7D] disabled:opacity-70",children:[(0,r.jsx)(u.Z,{className:"h-5 w-5"}),eC("shareAction")]})]}):null,rn=n8&&n7?(0,r.jsx)("div",{className:"rounded-[18px] border border-[#7D6A8A] bg-[#242229] px-4 py-4 text-white",children:(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[#8D63CC]",children:(0,r.jsx)("span",{className:"h-5 w-5 animate-spin rounded-full border-2 border-white/60 border-t-white"})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"text-[16px] font-bold leading-6",children:eC("storyGeneratingNoticeTitle")}),(0,r.jsx)("p",{className:"mt-0.5 text-[13px] leading-5 text-[#E7DFF0
1]",children:eC("storyGeneratingNoticeDescription")})]})]})}):null,rr=t$||j.jG?(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-4 text-sm text-[#6F6776]",children:[t$&&j.Mv?(0,r.jsxs)("button",{type:"button",onClick:nt,disabled:tg,className:"inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 transition ".concat(e9.hasLiked?"bg-[#FFF0F6] text-[#D45A9D]":"bg-[#F8F8F8] text-[#6F6776] hover:bg-[#F2EDF1]"," ").concat(tg?"opacity-70":""),"aria-label":e9.hasLiked?eC("likedAction"):eC("likeAction"),children:[(0,r.jsx)("svg",{className:"h-4 w-4",fill:e9.hasLiked?"currentColor":"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:e9.hasLiked?0:2,d:"M12.1 21.35l-1.1-1.02C5.14 14.88 2 12.03 2 8.5 2 5.64 4.24 3.4 7.1 3.4c1.63 0 3.2.76 4.2 1.96a5.55 5.55 0 014.2-1.96C18.36 3.4 20.6 5.64 20.6 8.5c0 3.53-3.14 6.38-8.99 11.83z"})}),(0,r.jsx)("span",{children:nZ.toLocaleString(ej)})]}):null,t$?(0,r.jsxs)("button",{type:"button",onClick:ng,disabled:ty,className:"inline-flex items-center gap-1.5 rounded-full bg-[#F8F8F8] px-2.5 py-1 text-[#6F6776] transition hover:bg-[#F2EDF1] ".concat(ty?"opacity-70":""),"aria-label":eC("shareAction"),children:[(0,r.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.5 12.5l7-4m-7 3l7 4M6 14a2.5 2.5 0 110-5 2.5 2.5 0 010 5zm12 7a2.5 2.5 0 110-5 2.5 2.5 0 010 5zm0-14a2.5 2.5 0 110-5 2.5 2.5 0 010 5z"})}),(0,r.jsx)("span",{children:eC("shareAction")})]}):null,j.jG?(0,r.jsx)(Q,{icon:(0,r.jsxs)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z"}),(0,r.jsx)("circle",{cx:"12",cy:"12",r:"3",strokeWidth:2})]}),value:nV.toLocaleString(ej)}):null,t$&&j.ht?(0,r.jsx)(Q,{icon:(0,r.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 10h8M8 14h5m-7 7l1.7-3.4A8 8 0 1120 12a8 8 0 01-12 6.9L6 21z"})}),value:nQ.toLocaleString(ej)}):null]}):null,rl=t$?(0,r.jsxs)("div",{className:"relative shrink-0",ref:tG,children:[(0,r.jsx)("button",{type:"button",onClick:()=>tC(e=>!e),disabled:tw,className:"inline-flex h-7 w-7 items-center justify-center rounded-full bg-transparent text-[#5B5463] transition hover:bg-[#FAF7FA] ".concat(tw?"cursor-not-allowed opacity-60":""),"aria-label":eC("moreActions"),"aria-haspopup":"menu","aria-expanded":tN,children:(0,r.jsx)(m.Z,{className:"h-4 w-4","aria-hidden":"true"})}),tN?(0,r.jsx)("div",{className:"absolute right-0 top-full z-30 mt-2 min-w-[160px] overflow-hidden rounded-[14px] border border-[#E7D9E1] bg-white p-1.5 shadow-[0_18px_40px_rgba(61,40,82,0.14)]",role:"menu",children:(0,r.jsxs)("button",{type:"button",onClick:()=>{tC(!1),nn()},disabled:tw,className:"flex w-full items-center gap-2 rounded-[10px] px-3 py-2.5 text-left text-sm font-medium text-[#C24C80] transition hover:bg-[#FFF5F8] ".concat(tw?"cursor-not-allowed opacity-60":""),role:"menuitem",children:[(0,r.jsx)(x.Z,{className:"h-4 w-4","aria-hidden":"true"}),(0,r.jsx)("span",{children:eC("reportAction")})]})}):null]}):null,rs=j.Cv?(0,r.jsx)("div",{className:"rounded-[16px] bg-[#FAF7FA] px-4 py-4",children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,r.jsx)("div",{className:"flex min-w-0 items-center gap-3",children:n3?(0,r.jsxs)(i.default,{href:n3,className:"flex items-center gap-3 min-w-0",children:[(0,r.jsx)("div",{className:"flex h-11 w-11 items-center justify-center overflow-hidden rounded-full border border-[#ECE3EA] bg-white",children:nH?(0,r.jsx)("img",{src:nH,alt:n4,width:44,height:44,loading:"lazy",decoding:"async",className:"h-full w-full object-cover"}):(0,r.jsx)("span",{className:"text-sm font-semibold text-[#8E8597]",children:n4.slice(0,1).toUpperCase()})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"text-xs text-[#8E8597]",children:eC("creatorLabel")}),(0,r.jsx)("p",{className:"truncate text-[15px] font-semibold text-[#423C47]",children:n4})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"flex h-11 w-11 items-center justify-center overflow-hidden rounded-full border border-[#
1ECE3EA] bg-white",children:nH?(0,r.jsx)("img",{src:nH,alt:n4,width:44,height:44,loading:"lazy",decoding:"async",className:"h-full w-full object-cover"}):(0,r.jsx)("span",{className:"text-sm font-semibold text-[#8E8597]",children:n4.slice(0,1).toUpperCase()})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"text-xs text-[#8E8597]",children:eC("creatorLabel")}),(0,r.jsx)("p",{className:"truncate text-[15px] font-semibold text-[#423C47]",children:n4})]})]})}),n3?(0,r.jsx)(i.default,{href:n3,className:"inline-flex shrink-0 items-center justify-center rounded-full border border-[#ECDCE5] bg-white px-4 py-2 text-xs font-semibold text-[#5B5463] transition hover:bg-white/10 active:bg-white/10",children:eC("viewProfileAction")}):null]})}):null,ra=e=>(0,r.jsxs)("div",{className:"mt-2 space-y-3 rounded-lg border border-[#ECE3EA] bg-white px-3 py-3",children:[(0,r.jsx)("textarea",{value:tc,onChange:e=>{td(e.target.value),tm(null)},maxLength:280,rows:3,disabled:e,className:"w-full rounded-lg border border-[#ECE3EA] bg-[#FCFAFC] px-3 py-2 text-sm text-[#423C47] outline-none transition focus:border-[#E477B1] focus:bg-white disabled:opacity-70"}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("span",{className:"text-xs text-[#8E8597]",children:[tc.trim().length,"/280"]}),tu?(0,r.jsx)("p",{className:"mt-1 text-xs font-medium text-[#D94F68]",children:tu}):null]}),(0,r.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:ni,disabled:e,className:"inline-flex items-center justify-center rounded-full border border-[#ECE3EA] px-3 py-1.5 text-xs font-medium text-[#6F6776] transition hover:bg-[#F8F4F7] disabled:opacity-60",children:eN("cancel")}),(0,r.jsx)("button",{type:"button",onClick:nd,disabled:e,className:"inline-flex items-center justify-center rounded-full bg-[#E477B1] px-3 py-1.5 text-xs font-semibold text-white transition hover:bg-[#d96aa5] disabled:opacity-70",children:e?eN("loading"):eN("save")})]})]})]}),ri=j.ht&&t$?(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"flex items-center justify-between gap-3",children:(0,r.jsx)("h3",{className:"text-[17px] font-bold leading-[25px] tracking-[0.4px] text-[#423C47]",children:eC("commentsCountTitle",{count:nQ.toLocaleString(ej)})})}),tK?eF&&!eF.isAnonymous?(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("textarea",{value:tt,onChange:e=>tn(e.target.value),placeholder:eC("commentPlaceholder"),maxLength:280,rows:3,className:"w-full rounded-[14px] border border-[#ECE3EA] bg-[#FCFAFC] px-4 py-3 text-sm text-[#423C47] outline-none transition focus:border-[#E477B1] focus:bg-white"}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,r.jsxs)("span",{className:"text-xs text-[#8E8597]",children:[tt.trim().length,"/280"]}),(0,r.jsx)("button",{type:"button",onClick:nr,disabled:tx,className:"inline-flex items-center justify-center rounded-full bg-[#E477B1] px-4 py-2 text-sm font-semibold text-white transition hover:bg-[#d96aa5] disabled:cursor-not-allowed disabled:opacity-70",children:tx?eN("loading"):eN("send")})]})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-3 rounded-[14px] bg-[#FCFAFC] px-4 py-4 text-sm text-[#6F6776]",children:[(0,r.jsx)("p",{children:eC("loginToInteract")}),(0,r.jsx)("button",{type:"button",onClick:t7,className:"inline-flex w-fit items-center justify-center rounded-full border border-[#F0E3EB] bg-[#FFF0F6] px-4 py-2 font-medium text-[#D45A9D] transition hover:bg-[#FFE7F1]",children:eN("login")})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-3 rounded-[14px] bg-[#FCFAFC] px-4 py-4 text-sm text-[#6F6776]",children:[(0,r.jsx)("p",{children:eC("interactInApp")}),(0,r.jsx)("button",{type:"button",onClick:()=>tP(!0),className:"inline-flex w-fit items-center justify-center rounded-full border border-[#F0E3EB] bg-[#FFF0F6] px-4 py-2 font-medium text-[#D45A9D] transition hover:bg-[#FFE7F1]",children:eC("openInApp")})]}),(0,r.jsx)("div",{className:"space-y-3",children:e5.length?e5.map(e=>(0,r.jsx)("div",{className:"rounded-[14px] bg-[#FCFAFC] px-2 py-3",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)(i.default,{href:eR(e.uid),className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-full border border-[#
1ECE3EA] bg-white",children:e.authorIconUrl?(0,r.jsx)("img",{src:(0,k.V)(e.authorIconUrl)||e.authorIconUrl,alt:e.authorName,width:40,height:40,loading:"lazy",decoding:"async",className:"h-full w-full object-cover"}):(0,r.jsx)("span",{className:"text-sm font-semibold text-[#A8A2AE]",children:e.authorName.slice(0,1).toUpperCase()})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,r.jsx)(i.default,{href:eR(e.uid),className:"text-sm font-semibold text-[#423C47] transition hover:text-[#D45A9D]",children:e.authorName}),(0,r.jsx)("span",{className:"text-xs text-[#8E8597]",children:H(e.createdAt,ej)})]}),(null==ti?void 0:ti.type)==="comment"&&ti.commentId===e.id?ra(!!tA[e.id]):(0,r.jsx)("p",{className:"mt-2 whitespace-pre-wrap text-sm leading-6 text-[#423C47]",children:e.content}),(0,r.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-1 text-xs text-[#8E8597]",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>ns(e.id),disabled:!!tk[e.id],className:"inline-flex items-center gap-1 rounded-full px-2 py-1 transition ".concat(e.viewerState.hasLiked?"bg-[#FFF0F6] text-[#D45A9D]":"bg-white text-[#6F6776] hover:bg-[#F6F1F4]"),children:[(0,r.jsx)("svg",{className:"h-3.5 w-3.5",fill:e.viewerState.hasLiked?"currentColor":"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:e.viewerState.hasLiked?0:2,d:"M12.1 21.35l-1.1-1.02C5.14 14.88 2 12.03 2 8.5 2 5.64 4.24 3.4 7.1 3.4c1.63 0 3.2.76 4.2 1.96a5.55 5.55 0 014.2-1.96C18.36 3.4 20.6 5.64 20.6 8.5c0 3.53-3.14 6.38-8.99 11.83z"})}),(0,r.jsx)("span",{children:e.likeCount.toLocaleString(ej)})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>{if(!eF||eF.isAnonymous){t7();return}t9()&&ta(t=>t===e.id?null:e.id)},className:"inline-flex items-center gap-1 rounded-full bg-white px-2 py-1 text-[#6F6776] transition hover:bg-[#F6F1F4]",children:[(0,r.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 10h8M8 14h5m-7 7l1.7-3.4A8 8 0 1120 12a8 8 0 01-12 6.9L6 21z"})}),(0,r.jsx)("span",{children:eC("replyAction")}),(0,r.jsx)("span",{children:e.replyCount.toLocaleString(ej)})]}),e.viewerState.canEdit?(0,r.jsx)("button",{type:"button",onClick:()=>no(e.id),disabled:!!tA[e.id],className:"inline-flex items-center gap-1 rounded-full bg-white px-2 py-1 text-[#6F6776] transition hover:bg-[#F6F1F4] disabled:opacity-60",children:(0,r.jsx)("span",{children:eC("editAction")})}):null,e.viewerState.canHide?(0,r.jsx)("button",{type:"button",onClick:()=>nu(e.id),disabled:!!tA[e.id],className:"inline-flex items-center gap-1 rounded-full bg-white px-2 py-1 text-[#6F6776] transition hover:bg-[#F6F1F4] disabled:opacity-60",children:(0,r.jsx)("span",{children:eC("hideAction")})}):null,e.viewerState.canDelete?(0,r.jsx)("button",{type:"button",onClick:()=>nm(e.id),disabled:!!tA[e.id],className:"inline-flex items-center gap-1 rounded-full bg-white px-2 py-1 text-[#6F6776] transition hover:bg-[#F6F1F4] disabled:opacity-60",children:(0,r.jsx)("span",{children:eC("deleteAction")})}):null,tZ?(0,r.jsx)("button",{type:"button",onClick:()=>nx(e.id),disabled:!!tA[e.id],className:"inline-flex items-center gap-1 rounded-full bg-white px-2 py-1 text-[#6F6776] transition hover:bg-[#F6F1F4] disabled:opacity-60",children:(0,r.jsx)("span",{children:eC("reportAction")})}):null]}),ts===e.id?(0,r.jsxs)("div",{className:"mt-3 space-y-3 rounded-lg border border-[#ECE3EA] bg-white px-3 py-3",children:[(0,r.jsx)("textarea",{value:tr[e.id]||"",onChange:t=>tl(n=>({...n,[e.id]:t.target.value})),placeholder:eC("replyPlaceholder"),maxLength:280,rows:2,className:"w-full rounded-lg border border-[#ECE3EA] bg-[#FCFAFC] px-3 py-2 text-sm text-[#423C47] outline-none transition focus:border-[#E477B1] focus:bg-white"}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,r.jsxs)("span",{className:"text-xs text-[#8E8597]",children:[(tr[e.id]||"").trim().length,"/280"]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:()=>ta(null),className:"inline-flex items-center justify-center rounded-full border border-[#
1ECE3EA] px-3 py-1.5 text-xs font-medium text-[#6F6776] transition hover:bg-[#F8F4F7]",children:eN("cancel")}),(0,r.jsx)("button",{type:"button",onClick:()=>nl(e.id),disabled:th===e.id,className:"inline-flex items-center justify-center rounded-full bg-[#E477B1] px-3 py-1.5 text-xs font-semibold text-white transition hover:bg-[#d96aa5] disabled:opacity-70",children:th===e.id?eN("loading"):eN("send")})]})]})]}):null,e.replies.length?(0,r.jsx)("div",{className:"mt-4 space-y-3",children:e.replies.map(t=>(0,r.jsx)("div",{className:"rounded-lg bg-white px-3 py-3",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)(i.default,{href:eR(t.uid),className:"flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-full border border-[#ECE3EA] bg-[#FCFAFC]",children:t.authorIconUrl?(0,r.jsx)("img",{src:(0,k.V)(t.authorIconUrl)||t.authorIconUrl,alt:t.authorName,width:32,height:32,loading:"lazy",decoding:"async",className:"h-full w-full object-cover"}):(0,r.jsx)("span",{className:"text-xs font-semibold text-[#A8A2AE]",children:t.authorName.slice(0,1).toUpperCase()})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[(0,r.jsx)(i.default,{href:eR(t.uid),className:"text-sm font-semibold text-[#423C47] transition hover:text-[#D45A9D]",children:t.authorName}),(0,r.jsx)("span",{className:"text-xs text-[#8E8597]",children:H(t.createdAt,ej)})]}),(null==ti?void 0:ti.type)==="reply"&&ti.commentId===e.id&&ti.replyId===t.id?ra(!!tD["".concat(e.id,":").concat(t.id)]):(0,r.jsx)("p",{className:"mt-2 whitespace-pre-wrap text-sm leading-6 text-[#423C47]",children:t.content}),(0,r.jsxs)("div",{className:"mt-3 flex items-center gap-1 text-xs text-[#8E8597]",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>na(e.id,t.id),disabled:!!tE["".concat(e.id,":").concat(t.id)],className:"inline-flex items-center gap-1 rounded-full px-2 py-1 transition ".concat(t.viewerState.hasLiked?"bg-[#FFF0F6] text-[#D45A9D]":"bg-[#FCFAFC] text-[#6F6776] hover:bg-[#F6F1F4]"),children:[(0,r.jsx)("svg",{className:"h-3.5 w-3.5",fill:t.viewerState.hasLiked?"currentColor":"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:t.viewerState.hasLiked?0:2,d:"M12.1 21.35l-1.1-1.02C5.14 14.88 2 12.03 2 8.5 2 5.64 4.24 3.4 7.1 3.4c1.63 0 3.2.76 4.2 1.96a5.55 5.55 0 014.2-1.96C18.36 3.4 20.6 5.64 20.6 8.5c0 3.53-3.14 6.38-8.99 11.83z"})}),(0,r.jsx)("span",{children:t.likeCount.toLocaleString(ej)})]}),t.viewerState.canEdit?(0,r.jsx)("button",{type:"button",onClick:()=>nc(e.id,t.id),disabled:!!tD["".concat(e.id,":").concat(t.id)],className:"inline-flex items-center gap-1 rounded-full bg-[#FCFAFC] px-2 py-1 text-[#6F6776] transition hover:bg-[#F6F1F4] disabled:opacity-60",children:(0,r.jsx)("span",{children:eC("editAction")})}):null,t.viewerState.canHide?(0,r.jsx)("button",{type:"button",onClick:()=>np(e.id,t.id),disabled:!!tD["".concat(e.id,":").concat(t.id)],className:"inline-flex items-center gap-1 rounded-full bg-[#FCFAFC] px-2 py-1 text-[#6F6776] transition hover:bg-[#F6F1F4] disabled:opacity-60",children:(0,r.jsx)("span",{children:eC("hideAction")})}):null,t.viewerState.canDelete?(0,r.jsx)("button",{type:"button",onClick:()=>nh(e.id,t.id),disabled:!!tD["".concat(e.id,":").concat(t.id)],className:"inline-flex items-center gap-1 rounded-full bg-[#FCFAFC] px-2 py-1 text-[#6F6776] transition hover:bg-[#F6F1F4] disabled:opacity-60",children:(0,r.jsx)("span",{children:eC("deleteAction")})}):null,tZ?(0,r.jsx)("button",{type:"button",onClick:()=>nf(e.id,t.id),disabled:!!tD["".concat(e.id,":").concat(t.id)],className:"inline-flex items-center gap-1 rounded-full bg-[#FCFAFC] px-2 py-1 text-[#6F6776] transition hover:bg-[#F6F1F4] disabled:opacity-60",children:(0,r.jsx)("span",{children:eC("reportAction")})}):null]})]})]})},t.id))}):null]})]})},e.id)):(0,r.jsx)("p",{className:"text-sm text-[#8E8597]",children:eC("commentsEmpty")})})]}):null;return eA?(0,r.jsxs)("div",{className:"relative story-detail-page ".concat(nR," bg-[#141416] text-[#fafafa]"),children:[(0,r.jsxs)("div",{className:"absolute inset-x-0 top-0 ".concat(eA?"h-[44vh]":"h-[52vh]"," overflow-hidden"),children:[nG?(0,r.jsx)("img",{src:nG,alt:e_.title,loading:eA?"lazy":"eager",fetchPriority:eA?"auto":"high",decoding:eA?"async":"sync",className:"h-full w-full object-cover"}):(0,r.jsx)("div",{className:"h-full w-full bg-[radial-gradient(circle_at_top,rgba(255,112,148,0.42),rgba(38,30,33,1)_72%)]"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent from-50% to-[#1d1c20]"})]}),eA?(0,r.jsx)("div",{className:"pointer-events-none absolute inset-x-0 top-0 z-20",children:(0,r.jsx)("div",{className:"mx-auto flex h-[44vh] max-w-[560px] items-end px-4 pb-4 md:max-w-[980px] md:px-6 md:pb-5",children:(0,r.jsx)("div",{children:(0,r.jsx)("h1",{className:"text-[24px] font-bold leading-[30px] tracking-[0.4px] text-white [text-shadow:0_6px_24px_rgba(0,0,0,0.35)]",children:e_.title})})})}):null,(0,r.jsx)("div",{className:eA?"mx-auto max-w-[560px] pt-[42vh] md:max-w-[980px]":"mx-auto px-4 pb-28 pt-[44vh
1] md:px-6 md:pt-[46vh] lg:max-w-4xl",children:(0,r.jsxs)("div",{className:"rounded-t-[24px] bg-white shadow-[0_-12px_28px_rgba(84,59,80,0.16)]",children:[(0,r.jsxs)("div",{className:"space-y-6 px-4 pb-0 pt-5 md:px-6 md:pt-6",children:[(0,r.jsxs)("div",{className:"space-y-3",children:[eA?null:(0,r.jsx)("h2",{className:"text-[20px] font-bold leading-[25px] tracking-[0.4px] text-[#423C47]",children:e_.title}),n$.length?(0,r.jsx)("div",{className:"flex flex-wrap gap-1",children:n$.map(e=>(0,r.jsxs)("span",{className:"rounded-lg bg-[#F8F8F8] px-[6px] py-[4px] text-[11px] leading-[14px] text-[#8E8597]",children:["#",e]},e))}):null,rt,rn,rr]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("h3",{className:"text-[17px] font-bold leading-[25px] tracking-[0.4px] text-[#423C47]",children:eC("storySection")}),(0,r.jsx)("p",{className:"whitespace-pre-wrap text-[15px] leading-[26px] text-[#423C47]",children:nJ})]}),tK?null:(0,r.jsx)("div",{className:"rounded-[16px] border border-[#ECE3EA] bg-white px-4 py-4 text-sm text-[#6F6776]",children:(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)("span",{children:n6}),(0,r.jsx)("a",{href:n5,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center rounded-full border border-[#F0E3EB] bg-[#FFF0F6] px-4 py-2 font-medium text-[#D45A9D] transition hover:bg-[#FFE7F1]",children:n6})]})})]}),eA?(0,r.jsx)("section",{className:re,children:(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("h2",{className:"text-[17px] font-bold leading-[25px] tracking-[0.4px] text-[#423C47]",children:ek("appearingCharacters")}),(0,r.jsx)("div",{className:"space-y-3",children:nY.map(e=>{let t=nN(e);return(0,r.jsxs)("button",{type:"button",onClick:()=>e2(e),className:"flex w-full flex-col gap-3 rounded-[16px] bg-[#F8F8F8] p-3 text-left transition-colors hover:bg-[#EEEEEE]",children:[(0,r.jsxs)("div",{className:"flex w-full items-start gap-4",children:[(0,r.jsx)(p.GW,{character:e,className:"flex h-[72px] w-[72px] shrink-0 items-center justify-center overflow-hidden rounded-full",tone:"bare"}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col items-start gap-0.5 pt-1",children:[(0,r.jsx)("p",{className:"text-[16px] font-bold leading-[22px] tracking-[0.4px] text-[#423C47]",children:e.name}),(0,r.jsx)("p",{className:"text-[13px] font-normal leading-[20px] text-[#423C47]",children:nw(e.age,e.gender)})]})]}),t?(0,r.jsxs)("div",{className:"relative w-full",children:[(0,r.jsx)("div",{className:"absolute -top-1.5 left-7 h-2.5 w-2.5 rotate-45 bg-[#5b5463]"}),(0,r.jsx)("div",{className:"relative rounded-[18px] bg-[#5b5463] px-3.5 py-2",children:(0,r.jsx)("p",{className:"text-[15px] font-normal leading-[24px] text-white",children:t})})]}):null,e.personality?(0,r.jsx)("p",{className:"line-clamp-2 text-[13px] leading-[20px] text-[#8E8597]",children:e.personality}):null]},e.characterId)})})]})}):(0,r.jsxs)("section",{className:"mt-10 rounded-[28px] border border-[#ECE3EA] bg-white px-5 py-6 shadow-[0px_12px_30px_rgba(77,50,72,0.05)] md:px-6",children:[tR?(0,r.jsxs)("div",{className:"space-y-8",children:[(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("h2",{className:"text-2xl font-semibold text-[#423C47]",children:eC("detailsSectionTitle")}),n2.length?(0,r.jsx)("div",{className:"flex flex-wrap gap-3 text-sm text-[#8E8597]",children:(0,r.jsx)("span",{children:n2.join(" | ")})}):null,(0,r.jsx)("p",{className:"whitespace-pre-wrap text-base leading-8 text-[#5B5463]",children:nJ})]}),(0,r.jsx)(Z,{title:eC("occupations"),items:nK}),(0,r.jsx)(Z,{title:eC("interests"),items:nX}),(0,r.jsx)(Z,{title:ek("likes"),items:n0}),(0,r.jsx)(Z,{title:ek("dislikes"),items:n1}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,r.jsx)("h3",{className:"text-xl font-semibold text-[#423C47]",children:eC("characterInfo")}),(0,r.jsx)("span",{className:"text-sm text-[#8E8597]",children:ek("count",{count:nY.length})})]}),(0,r.jsx)("div",{className:"grid gap-4 md:grid-cols-2",children:nY.map(e=>{let t=nN(e);return(0,r.jsxs)("button",{type:"button",onClick:()=>
1e2(e),className:"flex items-start gap-4 rounded-[20px] border border-[#ECE3EA] bg-[#FBF6FA] p-4 text-left transition hover:border-[#E6DAE2] hover:bg-white",children:[(0,r.jsx)(p.GW,{character:e,className:"flex h-[72px] w-[72px] shrink-0 items-center justify-center rounded-full",tone:"bare"}),(0,r.jsxs)("div",{className:"min-w-0 space-y-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-lg font-semibold text-[#423C47]",children:e.name}),(0,r.jsx)("p",{className:"text-sm text-[#8E8597]",children:nw(e.age,e.gender)})]}),t?(0,r.jsxs)("p",{className:"line-clamp-2 text-sm italic leading-6 text-[#5B5463]",children:["「",t,"」"]}):null,e.personality?(0,r.jsx)("p",{className:"line-clamp-2 text-sm leading-6 text-[#6F6776]",children:e.personality}):null]})]},e.characterId)})})]})]}):null,(0,r.jsxs)("button",{type:"button",onClick:()=>t_(e=>!e),className:"mt-8 flex w-full items-center justify-center gap-2 rounded-[16px] border border-[#E477B1] px-4 py-3 text-sm font-semibold text-[#D45A9D] transition hover:bg-[#FFF0F6]",children:[(0,r.jsx)("span",{children:tR?eC("hideDetails"):eC("showDetails")}),(0,r.jsx)("svg",{className:"h-4 w-4 transition-transform ".concat(tR?"":"rotate-180"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),eA?(0,r.jsx)("div",{className:"".concat(re," pt-0"),children:(0,r.jsx)("button",{type:"button",onClick:n_,className:"inline-flex w-full items-center justify-center rounded-[26px] border border-white/10 px-6 py-3 text-[15px] font-semibold leading-[18px] text-[#c1bcc6] transition hover:bg-white/5",children:eC("showAll")})}):null,(0,r.jsx)("section",{className:eA?re:"mt-8",children:rs}),eH.length?(0,r.jsxs)("section",{className:eA?"".concat(re," space-y-5"):"mt-10 space-y-5",children:[(0,r.jsx)("h2",{className:"text-base font-semibold text-[#423C47]",children:eC("creatorCollection")}),(0,r.jsx)("div",{className:"flex gap-4 overflow-x-auto pb-2 -mr-5 md:-mr-6",children:eH.map(e=>(0,r.jsx)(Y,{story:e,href:eU(e.storyId)},e.storyId))})]}):null,(0,r.jsx)("section",{className:eA?"".concat(re," space-y-4"):"mt-10 space-y-4",children:ri}),eA&&eM?(0,r.jsx)("div",{className:"sticky bottom-0 z-20 mt-8 px-4 py-4 backdrop-blur",children:(0,r.jsx)("div",{className:"flex flex-col gap-3 sm:flex-row",children:(0,r.jsxs)("button",{type:"button",onClick:nU,disabled:tV||eK,className:"inline-flex h-[52px] w-full items-center justify-center gap-2 rounded-[26px] px-6 text-[15px] font-semibold leading-[18px] text-white shadow-lg transition-all active:scale-95 disabled:cursor-not-allowed disabled:opacity-50 sm:flex-1",style:{backgroundImage:"linear-gradient(142.61deg, rgb(183, 125, 255) 1.4664%, rgb(255, 141, 160) 100%)"},children:[(0,r.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),eC("openStoryWorld")]})})}):null]})}),!eA&&eM?(0,r.jsx)("div",{className:"fixed bottom-0 left-0 right-0 z-20 backdrop-blur",children:(0,r.jsx)("div",{className:"mx-auto px-4 pb-4 pt-2 md:px-6 lg:max-w-4xl",children:(0,r.jsxs)("button",{type:"button",onClick:nU,disabled:tV||eK,className:"inline-flex h-[52px] w-full items-center justify-center gap-2 rounded-[26px] px-6 text-[15px] font-semibold leading-[18px] text-white shadow-lg transition-all active:scale-95 disabled:cursor-not-allowed disabled:opacity-50",style:{backgroundImage:"linear-gradient(142.61deg, rgb(183, 125, 255) 1.4664%, rgb(255, 141, 160) 100%)"},children:[(0,r.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),eC("startStory")]})})}):null,e1&&"undefined"!=typeof document?(0,s.createPortal)((0,r.jsx)("div",{className:"animate-overlay-in fixed inset-0 ".concat(eA?"z-[200]":"z-[60]"," flex items-start justify-center overflow-y-auto bg-black/80 p-4"),onClick:nO,children:(0,r.jsxs)("div",{className:"animate-modal-pop-in relative flex max-h-[90vh] min-h-0 w-full max-w-4xl flex-col overflow-hidden rounded-[32px] shadow-xl",style:{backgroundColor:"#3b3533"},onClick:e=>e.stopPropagation(),children:[e1.image&&e1.image.trim()?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"absolute inset-0",children:(0,r.jsx)("img",{src:(0,k.V)(e1.image)||e1.image,alt:e1.name,loading:"lazy",decoding:"async",className:"h-full w-full object-cover"})}),(0,r.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, rgba(59, 53, 51, 0.3) 0%, rgba(59, 53, 51, 0.7) 50%, rgba(59, 53, 51, 0.95) 100%)"}})]}):null,(0,r.jsx)("button",{type:"button",onClick:nO,className:"absolute right-4 top-4 z-10 flex h-10 w-10 items-center justify-center rounded-full bg-[rgba(43,34,37,0.52)] backdrop-blur-sm shadow-lg transition-colors hover:bg-[rgba(43,34,37,0.7)]",children:(0,r.jsx)("svg",{className:"h-6 w-6 text-white",f
1ill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,r.jsxs)("div",{className:"relative flex-1 overflow-y-auto px-2 py-4 pb-28",children:[(0,r.jsx)("div",{className:"mb-4 mt-12 flex justify-center overflow-hidden rounded-full",children:(0,r.jsx)(p.B7,{character:e1,size:200,className:"h-[200px] w-[200px] rounded-full",tone:"dark",style:{border:"2px solid rgba(156, 163, 175, 0.3)"}})}),(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"space-y-3 text-center",children:[(0,r.jsx)("h2",{className:"text-center text-[18px] font-semibold leading-[22px] tracking-[-0.43px] text-[#f5f5f5]",children:e1.name}),nM(e1,nI,nI),nT(e1,nB)]}),(0,r.jsx)("div",{className:"grid gap-7 px-2",children:nP(e1,nD)})]})]}),(0,r.jsx)("div",{className:"relative z-10 px-4 pb-4 pt-2 backdrop-blur-sm",children:(0,r.jsx)("div",{className:"flex flex-col gap-3 sm:flex-row",children:(0,r.jsxs)("button",{type:"button",onClick:nU,disabled:tV||eK,className:"inline-flex min-h-[52px] flex-1 items-center justify-center gap-0 rounded-[26px] px-4 py-2 text-[15px] font-semibold leading-[18px] text-white shadow-lg transition-all active:scale-95 disabled:cursor-not-allowed disabled:opacity-50",style:{backgroundImage:"linear-gradient(142.61deg, rgb(183, 125, 255) 1.4664%, rgb(255, 141, 160) 100%)"},children:[(0,r.jsx)("svg",{className:"mr-1 inline h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),eC("startStoryWithCharacter")]})})})]})}),document.body):null,tB?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"animate-overlay-in fixed inset-0 ".concat(eA?"z-[110]":"z-[70]"," bg-black/60"),onClick:()=>tP(!1)}),(0,r.jsx)("div",{className:"animate-sheet-in fixed bottom-0 left-0 right-0 ".concat(eA?"z-[111]":"z-[71]"," rounded-t-[24px] bg-white"),children:(0,r.jsxs)("div",{className:"mx-auto max-w-lg px-6 py-6",children:[(0,r.jsx)("div",{className:"mb-4 flex justify-center",children:(0,r.jsx)("div",{className:"h-1 w-10 rounded-full bg-gray-300"})}),(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsxs)("h3",{className:"mb-2 text-[15px] font-semibold text-gray-800",children:["1. ",eC("downloadApp")]}),(0,r.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,r.jsx)("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"flex h-[52px] w-full items-center justify-center rounded-[26px] bg-[#E477B1] px-4 text-[15px] font-medium text-white transition hover:bg-[#d96aa5]",children:eC("downloadOnAppStore")}),(0,r.jsx)("a",{href:U,target:"_blank",rel:"noopener noreferrer",className:"flex h-[52px] w-full items-center justify-center rounded-[26px] bg-[#E477B1] px-4 text-[15px] font-medium text-white transition hover:bg-[#d96aa5]",children:eC("downloadOnGooglePlay")})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("h3",{className:"mb-2 text-[15px] font-semibold text-gray-800",children:["2. ",eC("openInApp")]}),(0,r.jsx)("a",{href:eD,onClick:nz,className:"flex h-[52px] w-full items-center justify-center rounded-[26px] border border-[#F0E3EB] px-4 text-[15px] font-medium text-[#D45A9D] transition hover:bg-[#FFF0F6]",children:eC("openApp")})]})]})})]}):null,nW]}):(0,r.jsxs)("div",{className:"relative story-detail-page bg-[#141416]",children:[(0,r.jsx)("div",{className:"fixed inset-x-0 top-[62px] z-0 h-[36vh] min-h-[240px] max-h-[420px] md:left-[var(--app-content-left,88px)] md:h-[calc(36vh+100px)] md:min-h-[340px] md:max-h-[520px] md:transition-[left] md:duration-300 md:ease-in-out overflow-hidden bg-black",children:nG?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("img",{src:nG,alt:e_.title,loading:"eager",fetchPriority:"high",decoding:"sync",className:"h-full w-full object-cover object-[50%_28%] lg:object-[50%_34%]"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/40 via-trans
1parent to-transparent"})]}):(0,r.jsx)("div",{className:"h-full w-full bg-black"})}),(0,r.jsx)("button",{type:"button",onClick:()=>{if(eA&&eh){eh();return}eg.back()},className:"fixed left-4 top-[78px] z-50 flex items-center justify-center rounded-full bg-gray-500/60 p-2 backdrop-blur-sm transition-colors hover:bg-gray-600/80 md:hidden","aria-label":eC("backToHome"),children:(0,r.jsx)("svg",{className:"h-5 w-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),(0,r.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none h-[36vh] min-h-[240px] max-h-[420px] md:h-[calc(36vh+100px)] md:min-h-[340px] md:max-h-[520px]"}),(0,r.jsx)("div",{className:"relative z-10 -mt-10 md:-mt-14",children:(0,r.jsx)("div",{className:"rounded-t-[10px] bg-white shadow-[0_-12px_28px_rgba(0,0,0,0.08)]",children:(0,r.jsx)("div",{className:"mx-auto lg:max-w-4xl px-0",children:(0,r.jsxs)("div",{className:"px-4 pb-0 pt-4 md:pt-8",children:[(0,r.jsxs)("div",{className:"mb-3 flex items-start justify-between gap-3",children:[(0,r.jsx)("h1",{className:"min-w-0 text-[20px] font-bold leading-[25px] tracking-[0.4px] text-[#423c47]",children:e_.title}),rl]}),n$.length?(0,r.jsx)("div",{className:"mb-4 flex flex-wrap gap-1",children:n$.map(e=>(0,r.jsxs)("span",{className:"rounded-lg bg-[#f8f8f8] px-[6px] py-[4px] text-[11px] font-normal leading-[14px] text-[#8e8597]",children:["#",e]},e))}):null,rt?(0,r.jsx)("div",{className:"mb-4",children:rt}):null,rn?(0,r.jsx)("div",{className:"mb-4",children:rn}):null,(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsx)("h2",{className:"mb-2 text-[17px] font-bold leading-[25px] tracking-[0.4px] text-[#423c47]",children:eC("storySection")}),(0,r.jsx)("p",{className:"whitespace-pre-wrap text-[15px] font-normal leading-[26px] text-[#423c47]",children:nJ})]}),(0,r.jsx)("div",{className:"mb-4",children:rr}),(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsx)("h2",{className:"mb-3 text-[17px] font-bold leading-[25px] tracking-[0.4px] text-[#423c47]",children:ek("appearingCharacters")}),(0,r.jsx)("div",{className:"space-y-3",children:e_.characters.map(e=>{let t=nN(e),n=nj(e.relationshipWithProtagonist),l=nj(e.backstory),s=nj(e.romanceStyle),a=nC(e),i=nk(e);return(0,r.jsxs)("div",{className:"flex cursor-pointer flex-col gap-4 roun
1ded-[16px] bg-[#f8f8f8] p-3 transition-colors hover:bg-[#eeeeee]",onClick:()=>e2(e),children:[(0,r.jsxs)("div",{className:"flex w-full items-start gap-4",children:[(0,r.jsx)(p.GW,{character:e,className:"flex h-[90px] w-[90px] flex-shrink-0 items-center justify-center overflow-hidden rounded-full",tone:"bare"}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col items-start gap-0.5 pt-1",children:[(0,r.jsx)("h3",{className:"text-[18px] font-bold leading-[25px] tracking-[0.4px] text-[#423c47]",children:e.name}),a?(0,r.jsx)("p",{className:"text-[14px] font-normal leading-[22px] text-[#423c47]",children:a}):null,i?(0,r.jsx)("p",{className:"text-[13px] font-semibold leading-[20px] text-[#5b5463]",children:i}):null]})]}),t?(0,r.jsxs)("div",{className:"relative w-full",children:[(0,r.jsx)("div",{className:"absolute -top-1.5 left-8 h-3 w-3 rotate-45 bg-[#5b5463]"}),(0,r.jsx)("div",{className:"relative rounded-[20px] bg-[#5b5463] px-4 py-2.5",children:(0,r.jsx)("p",{className:"text-[15px] font-normal leading-[24px] text-white",children:t})})]}):null,(0,r.jsxs)("div",{className:"flex w-full flex-col gap-8",children:[n?(0,r.jsxs)("div",{className:"flex w-full flex-col gap-1",children:[(0,r.jsxs)("p",{className:"text-[12px] font-bold leading-[22px] text-[#8e8597]",children:["# ",nE]}),(0,r.jsx)("p",{className:"whitespace-pre-wrap text-[14px] font-normal leading-[22px] text-[#423c47]",children:n})]}):null,e.personality?(0,r.jsxs)("div",{className:"flex w-full flex-col gap-1",children:[(0,r.jsxs)("p",{className:"text-[12px] font-bold leading-[22px] text-[#8e8597]",children:["# ",ek("personality")]}),(0,r.jsx)("p",{className:"whitespace-pre-wrap text-[14px] font-normal leading-[22px] text-[#423c47]",children:e.personality})]}):null,l?(0,r.jsxs)("div",{className:"flex w-full flex-col gap-1",children:[(0,r.jsxs)("p",{className:"text-[12px] font-bold leading-[22px] text-[#8e8597]",children:["# ",ek("backstory")]}),(0,r.jsx)("p",{className:"whitespace-pre-wrap text-[14px] font-normal leading-[22px] text-[#423c47]",children:l})]}
1):null,s?(0,r.jsxs)("div",{className:"flex w-full flex-col gap-1",children:[(0,r.jsxs)("p",{className:"text-[12px] font-bold leading-[22px] text-[#8e8597]",children:["# ",ek("romanceStyle")]}),(0,r.jsx)("p",{className:"whitespace-pre-wrap text-[14px] font-normal leading-[22px] text-[#423c47]",children:s})]}):null]})]},e.characterId)})})]}),(0,r.jsx)("div",{className:"mb-8",children:rs}),(0,r.jsx)("div",{className:"mb-6",children:ri}),(0,r.jsx)("div",{className:"h-24"})]})})})}),e1?(0,r.jsx)("div",{className:"animate-overlay-in fixed inset-0 z-[60] flex items-start justify-center overflow-y-auto bg-black bg-opacity-75 p-4",onClick:nO,children:(0,r.jsxs)("div",{className:"animate-modal-pop-in relative flex max-h-[90vh] min-h-0 w-full max-w-4xl flex-col overflow-hidden rounded-[32px] shadow-xl",style:{backgroundColor:"#3b3533"},onClick:e=>e.stopPropagation(),children:[e1.image&&""!==e1.image.trim()?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"absolute inset-0",children:(0,r.jsx)("img",{src:(0,k.V)(e1.image)||e1.image,alt:e1.name,loading:"lazy",decoding:"async",className:"h-full w-full object-cover"})}),(0,r.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.72) 50%, rgba(0, 0, 0, 0.92) 100%)"}})]}):null,(0,r.jsx)("button",{type:"button",onClick:nO,className:"absolute right-4 top-4 z-10 flex h-10 w-10 items-center justify-center rounded-full bg-[rgba(43,34,37,0.52)] backdrop-blur-sm shadow-lg transition-colors hover:bg-[rgba(43,34,37,0.7)]",children:(0,r.jsx)("svg",{className:"h-6 w-6 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,r.jsxs)("div",{className:"relative flex-1 overflow-y-auto px-2 py-4 pb-28",children:[(0,r.jsx)("div",{className:"mb-4 mt-12 flex justify-center overflow-hidden rounded-full",children:(0,r.jsx)(p.B7,{character:e1,size:200,className:"h-[200px] w-[200px] rounded-full",tone:"dark",style:{border:"2px solid rgba(156, 163, 175, 0.3)"}})}),(0,r.jsx)("div",{className:"mb-1 flex justify-center",children:(0,r.jsx)("h2",{className:"text-center text-[18px] font-semibold leading-[22px] tracking-[-0.43px] text-[#f5f5f5]",children:e1.name})}),nM(e1,nI,nI,"mb-4 flex justify-center"),nT(e1,nB,"mb-5 flex justify-center"),(0,r.jsx)("div",{className:"space-y-7 px-2 pb-4",children:nP(e1,"text-[13px] font-bold leading-[22px] text-[#8e8597]","h3")})]}),(0,r.jsx)("div",{className:"relative z-10 px-4 pb-4 pt-2 backdrop-blur-sm",children:(0,r.jsx)("div",{className:"flex flex-col gap-3 sm:flex-row",children:(0,r.jsxs)("button",{type:"button",onClick:nU,disabled:tV||eK,className:"flex min-h-[52px] flex-1 items-center justify-center gap-0 rounded-[26px] px-4 py-2 text-[15px] font-semibold leading-[18px] text-white shadow-lg transition-all active:scale-95 disabled:cursor-not-allowed disabled:opacity-50",style:{backgroundImage:"linear-gradient(142.61deg, rgb(183, 125, 255) 1.4664%, rgb(255, 141, 160) 100%)"},children:[(0,r.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),(0,r.jsx)("span",{children:eC("startStoryWithCharacter")})]})})})]})}):null,eM?(0,r.jsx)("div",{className:"sticky bottom-0 z-20 bg-white/95 backdrop-blur",children:(0,r.jsx)("div",{className:"mx-auto px-4 pb-4 pt-0 sm:px-6 lg:px-8 lg:max-w-4xl",children:(0,r.jsxs)("button",{type:"button",onClick:nU,disabled:tV||eK,className:"inline-flex h-[52px] w-full items-center justify-center gap-2 rounded-[26px] px-6 text-[15px] font-semibold leading-[18px] text-white shadow-lg transition-all active:scale-95 disabled:cursor-not-allowed disabled:opacity-50",style:{backgroundImage:"linear-gradient(142.61deg, rgb(183, 125, 255) 1.4664%, rgb(255, 141, 160) 100%)"},children:[(0,r.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.25
15-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),(0,r.jsx)("span",{children:eC("startStory")})]})})}):null,tB?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"animate-overlay-in fixed inset-0 z-[70] bg-black/50",onClick:()=>tP(!1)}),(0,r.jsx)("div",{className:"animate-sheet-in fixed bottom-0 left-0 right-0 z-[71] rounded-t-[24px] bg-white",children:(0,r.jsxs)("div",{className:"mx-auto max-w-lg px-6 py-6",children:[(0,r.jsx)("div",{className:"mb-4 flex justify-center",children:(0,r.jsx)("div",{className:"h-1 w-10 rounded-full bg-gray-300"})}),(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsxs)("h3",{className:"mb-2 text-[15px] font-semibold text-gray-800",children:["1. ",eC("downloadApp")]}),(0,r.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,r.jsxs)("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"flex h-[52px] w-full items-center justify-center gap-2 rounded-[26px] text-[15px] font-medium text-white shadow-md transition-all active:scale-95",style:{backgroundImage:"linear-gradient(142.61deg, rgb(183, 125, 255) 1.4664%, rgb(255, 141, 160) 100%)"},children:[(0,r.jsx)("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"})}),(0,r.jsx)("span",{children:eC("downloadOnAppStore")})]}),(0,r.jsxs)("a",{href:U,target:"_blank",rel:"noopener noreferrer",className:"flex h-[52px] w-full items-center justify-center gap-2 rounded-[26px] text-[15px] font-medium text-white shadow-md transition-all active:scale-95",style:{backgroundImage:"linear-gradient(142.61deg, rgb(183, 125, 255) 1.4664%, rgb(255, 141, 160) 100%)"},children:[(0,r.jsx)("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M3.609 1.814L13.792 12 3.61 22.186a.996.996 0 0 1-.61-.92V2.734a1 1 0 0 1 .609-.92zm10.89 10.893l2.302 2.302-10.937 6.333 8.635-8.635zm3.199-3.198l2.807 1.626a1 1 0 0 1 0 1.73l-2.808 1.626L15.206 12l2.492-2.491zM5.864 2.658L16.8 9.99l-2.302 2.302-8.634-8.634z"})}),(0,r.jsx)("span",{children:eC("downloadOnGooglePlay")})]})]})]}),(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsxs)("h3",{className:"mb-2 text-[15px] font-semibold text-gray-800",children:["2. ",eC("openInApp")]}),(0,r.jsxs)("a",{href:eD,onClick:nz,className:"flex h-[52px] w-full items-center justify-center gap-2 rounded-[26px] border-2 border-primary bg-white text-[15px] font-medium text-primary shadow-sm transition-all active:scale-95",children:[(0,r.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),(0,r.jsx)("span",{children:eC("openApp")})]})]})]})})]}):null,nW]})}},9927:function(e,t,n){n.d(t,{L:function(){return r.L}});var r=n(923)},419:function(e,t,n){n.d(t,{LA:function(){return o},getDramaScript:function(){return p},VR:function(){return x},EW:function(){return i}});var r=n(923),l=n(4257);class s{static getInstance(){return s.instance||(s.instance=new s),s.instance}setEnabled(e){this.enabled=e}log(e,t,n,r){if(!this.enabled)return;let l=n?"".concat(t,"/").concat(n):t,s={operation:e,collection:t,documentId:n,path:l,data:r,timestamp:new Date().toISOString()};this.logs.push(s);let a=this.getOperationEmoji(e),i=this.getOperationColor(e);console.log("%c".concat(a," Firestore ").concat(e,": ").concat(l),"color: ".concat(i,"; font-weight: bold"),r||"")}getOperationEmoji(e){switch(e){case"CREATE":return"➕";case"READ":return"\uD83D\uDCD6";case"UPDATE":return"✏️";case"DELETE":return"\uD83D\uDDD1️";case"QUERY":return"\uD83D\uDD0D";default:return"❓"}}getOperationColor(e){switch(e){case"CREATE":return"#4CAF50";case"READ":return"#2196F3";case"UPDATE":return"#FF9800";case"DELETE":return"#F44336";case"QUERY":return"#9C27B0";default:return"#757575"}}getLogs(){return[...this.logs]}clearLogs(){this.logs=[]}getLogsSummary(){let e={CREATE:0,READ:0,UPDATE:0,DELETE:0,QUERY:0};
1return this.logs.forEach(t=>{e[t.operation]++}),e}printSummary(){let e=this.getLogsSummary();console.log("\uD83D\uDCCA Firestore Operations Summary:"),Object.entries(e).forEach(e=>{let[t,n]=e;n>0&&console.log("  ".concat(this.getOperationEmoji(t)," ").concat(t,": ").concat(n))})}constructor(){this.logs=[],this.enabled=!0}}s.getInstance();let a=()=>{let e=l.I.currentUser;if(!e)throw Error("認証が必要です。ログインしてください。");return e};async function i(){let e=a();return await r.L.getStories(e.uid)}async function o(e){return a(),await r.L.deleteStory(e),!0}let c=e=>!!e&&!e.forcedHidden&&(!e.visibility||"public"===e.visibility),d=(e,t)=>(null==t?void 0:t.includeHidden)?e:e.filter(c),u=new Map;async function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"popular";try{let n=new URLSearchParams({locale:e,category:t,limit:"100",offset:"0"}),r=await fetch("/api/public/story-search?".concat(n));if(!r.ok)throw Error("API error: ".concat(r.status));let l=await r.json();return Array.isArray(l.stories)?l.stories:[]}catch(e){return console.error("共有ストーリー検索エラー:",e),[]}}async function x(e){let t=(null==e?void 0:e.locale)||"en",n=u.get(t);if(n&&Date.now()-n.timestamp<3e5)return console.log("\uD83D\uDCE6 共有ストーリーをキャッシュから取得 (".concat(t,")")),d(n.data,e);let r=await m(t);return u.set(t,{data:r,timestamp:Date.now()}),d(r,e)}async function p(e){return a(),await r.L.getDramaScript(e)}},9686:function(e,t,n){n.d(t,{Cv:function(){return a},Mv:function(){return r},XJ:function(){return o},ZF:function(){return i},ht:function(){return l},jG:function(){return s}});let r=!1,l=!1,s=!1,a=!1,i=!1,o=!1},923:function(e,t,n){n.d(t,{L:function(){return d}});var r=n(3405),l=n(4257);let s=()=>{let e=l.I.currentUser;if(!e)throw Error("User not authenticated");return e},a=e=>{if(s().uid!==e)throw Error("User not authenticated or unauthorized")},i=e=>{if(e instanceof Date)return Number.isNaN(e.getTime())?new Date:e;if("string"==typeof e||"number"==typeof e){let t=new Date(e);return Number.isNaN(t.getTime())?new Date:t}return new Date},o=e=>({...e,timestamp:i(e.timestamp)}),c=e=>({...e,messages:Array.isArray(e.messages)?e.messages.map(o):[],lastUserMessage:e.lastUserMessage?o(e.lastUserMessage):e.lastUserMessage}),d={async getStories(e){a(e);let{stories:t}=await (0,r.N)("/api/v1/me/stories");return t},async createStory(e){s();let{story:t}=await (0,r.N)("/api/v1/me/stories",{method:"POST",body:{story:e}});return t},async updateStory(e,t){s();let{story:n}=await (0,r.N)("/api/v1/me/stories/".concat(encodeURIComponent(e)),{method:"PATCH",body:{updates:t}});return n},async getStoryById(e){s();try{let{story:t}=await (0,r.N)("/api/v1/me/stories/".concat(encodeURIComponent(e)));return t}catch(e){if(e instanceof Error&&"Story not found"===e.message)return null;throw e}},async deleteStory(e){s(),await (0,r.N)("/api/v1/me/stories/".concat(encodeURIComponent(e)),{method:"DELETE"})},async getGameSessions(e){a(e);let{sessions:t}=await (0,r.N)("/api/v1/me/game-sessions");return t.map(c)},async createOrUpdateGameSession(e){s();let{session:t}=await (0,r.N)("/api/v1/me/game-sessions",{method:"POST",body:{session:e}});return c(t)},async createGameSessionFromStory(e){s();let{session:t}=await (0,r.N)("/api/v1/me/game-sessions",{method:"POST",body:e});return c(t)},async getGameSessionById(e){s();try{let{session:t}=await (0,r.N)("/api/v1/me/game-sessions/".concat(encodeURIComponent(e)));return c(t)}catch(e){if(e instanceof Error&&"Game session not found"===e.message)return null;throw e}},async updateGameSession(e,t){s();let{session:n}=await (0,r.N)("/api/v1/me/game-sessions/".concat(encodeURIComponent(e)),{method:"PATCH",body:{updates:t}});return c(n)},async deleteGameSession(e){s(),await (0,r.N)("/api/v1/me/game-sessions/".concat(encodeURIComponent(e)),{method:"DELETE"})},async getDramaScript(e){s();let{dramaScript:t}=await (0,r.N)("/api/v1/me/drama-scripts/".concat(encodeURIComponent(e)));return t}}},3705:function(e,t,n){n.d(t,{G:function(){return d}});var r=n(419),l=n(9927),s=n(4257),a=n(8984),i=n(9323),o=n(5849);class c{async getStoryById(e,t,n){i.k.debug("\uD83D\uDD0D [storyService.getStoryById] 検索開始",{storyId:e,userId:t});let r=n||(()=>{if("undefined"!=typeof document){let e=document.cookie.split("; ").find(e=>e.startsWith("locale="));if(e){let t=e.split("=")[1];if(t)return t}}return(0,o.bL)(window.location.pathname)})();try{i.k.debug("\uD83C\uDF10 [storyService] localized playable story を検索中",{storyId:e,userId:t,locale:r});let n=await a.x.getSharedStoryById(e,r||void 0);if(i.k.debug("\uD83C\uDF10 [storyService] localized playable story 結果",{storyId:e,userId:t,foun
1d:!!n}),n)return i.k.info("✅ [storyService] localized playable story を返します",{storyId:e,userId:t,title:n.title}),n}catch(n){i.k.error("❌ [storyService] localized playable story 取得エラー",{storyId:e,userId:t,error:n})}if(s.I.currentUser)try{i.k.debug("\uD83D\uDCDA [storyService] ローカルストーリーを検索中",{storyId:e,userId:t});let n=await l.L.getStoryById(e);if(i.k.debug("\uD83D\uDCDA [storyService] ローカルストーリー結果",{storyId:e,userId:t,found:!!n}),n)return i.k.info("✅ [storyService] ローカルストーリーを返します",{storyId:e,userId:t,title:n.title}),n}catch(n){i.k.error("❌ [storyService] ローカルストーリー取得エラー",{storyId:e,userId:t,error:n})}else i.k.debug("\uD83D\uDCDA [storyService] 未ログインのためローカルストーリー検索をスキップ",{storyId:e,userId:t});return i.k.warn("❌ [storyService] ストーリーが見つかりませんでした",{storyId:e,userId:t}),null}async getAllStories(e){let t=await (0,r.EW)();try{let e=await (0,r.VR)(),n=new Set(t.map(e=>e.storyId)),l=e.filter(e=>!n.has(e.storyId));return[...t,...l]}catch(n){return i.k.error("共有ストーリー取得エラー",{userId:e,error:n}),t}}async getLocalStories(e){return await (0,r.EW)()}async getSharedStories(){try{return await (0,r.VR)()}catch(e){return i.k.error("共有ストーリー取得エラー",{error:e}),[]}}}let d=new c},2198:function(e,t,n){n.d(t,{p:function(){return a}});let r=async e=>{let t={"Content-Type":"application/json"};if(e&&!e.isAnonymous){let n=await e.getIdToken();t.Authorization="Bearer ".concat(n)}return t},l=async e=>{let t=await e.json().catch(()=>null);if(!e.ok)throw Error(t&&"object"==typeof t&&"error"in t&&"string"==typeof t.error?t.error:"Request failed");return t};class s{async getBundle(e,t){return this.requestJson("/api/public/story-social/".concat(encodeURIComponent(e)),{method:"GET",user:t})}async getCreatorSocialSummary(e,t){return this.requestJson("/api/creators/".concat(encodeURIComponent(e),"/social-summary"),{method:"GET",user:t})}async requestJson(e,t){return l(await fetch(e,{method:t.method,headers:await r(t.user),body:void 0===t.body?void 0:JSON.stringify(t.body),cache:"no-store",keepalive:t.keepalive}))}async toggleLike(e,t){return this.requestJson("/api/stories/".concat(e,"/like"),{method:"POST",user:t})}async toggleFollow(e,t){return this.requestJson("/api/stories/".concat(e,"/follow"),{method:"POST",user:t})}async addComment(e,t,n){return this.requestJson("/api/stories/".concat(e,"/comments"),{method:"POST",user:n,body:{content:t}})}async editComment(e,t,n,r){return this.requestJson("/api/stories/".concat(e,"/comments/").concat(t),{method:"PATCH",user:r,body:{content:n}})}async addReply(e,t,n,r){return this.requestJson("/api/stories/".concat(e,"/comments/").concat(t,"/replies"),{method:"POST",user:r,body:{content:n}})}async editReply(e,t,n,r,l){return this.requestJson("/api/stories/".concat(e,"/comments/").concat(t,"/replies/").concat(n),{method:"PATCH",user:l,body:{content:r}})}async toggleCommentLike(e,t,n){return this.requestJson("/api/stories/".concat(e,"/comments/").concat(t,"/like"),{method:"POST",user:n})}async toggleReplyLike(e,t,n,r){return this.requestJson("/api/stories/".concat(e,"/comments/").concat(t,"/replies/").concat(n,"/like"),{method:"POST",user:r})}async hideComment(e,t,n){return this.requestJson("/api/stories/".concat(e,"/comments/").concat(t,"/hide"),{method:"POST",user:n})}async deleteComment(e,t,n){return this.requestJson("/api/stories/".concat(e,"/comments/").concat(t),{method:"DELETE",user:n})}async reportComment(e,t,n,r,l){return this.requestJson("/api/stories/".concat(e,"/comments/").concat(t,"/report"),{method:"POST",user:l,body:{reasonCode:n,reasonText:r}})}async reportStory(e,t,n,r){return this.requestJson("/api/stories/".concat(e,"/report"),{method:"POST",user:r,body:{reasonCode:t,reasonText:n}})}async hideReply(e,t,n,r){return this.requestJson("/api/stories/".concat(e,"/comments/").concat(t,"/replies/").concat(n,"/hide"),{method:"POST",user:r})}async deleteReply(e,t,n,r){return this.requestJson("/api/stories/".concat(e,"/comments/").concat(t,"/replies/").concat(n),{method:"DELETE",user:r})}async reportReply(e,t,n,r,l,s){return this.requestJson("/api/stories/".concat(e,"/comments/").concat(t,"/replies/").concat(n,"/report"),{method:"POST",user:s,body:{reasonCode:r,reasonText:l}})}async recordShare(e,t,n){return this.requestJson("/api/public/stories/".concat(e,"/share"),{method:"POST",user:n,body:{channel:t},keepalive:!0})}async recordPlay(e,t){return this.requestJson("/api/public/stories/".concat(e,"/play-start"),{method:"POST",user:t,keepalive:!0})}
1async startStory(e,t,n){return this.requestJson("/api/public/stories/".concat(e,"/play-start"),{method:"POST",user:t,body:n})}async setCreatorBlock(e,t,n){return this.requestJson("/api/me/social/blocks/".concat(encodeURIComponent(e)),{method:t?"POST":"DELETE",user:n})}async setCreatorMute(e,t,n){return this.requestJson("/api/me/social/mutes/".concat(encodeURIComponent(e)),{method:t?"POST":"DELETE",user:n})}async reportCreator(e,t,n){return this.requestJson("/api/me/social/reports/".concat(encodeURIComponent(e)),{method:"POST",user:t,body:n})}}let a=new s},613:function(e,t,n){n.d(t,{A2:function(){return r},I9:function(){return l}});let r=e=>{let t=null==e?void 0:e.trim().toLowerCase();return"v1"===t||"v2"===t||"v3"===t||"v4"===t?t:null},l=()=>r("v4")||"v2"},381:function(e,t,n){n.d(t,{u:function(){return r}});function r(e){if(!e)return e;let t=String(e).toLowerCase().trim();return"男性"===t||"male"===t?"male":"女性"===t||"female"===t?"female":"その他"===t||"other"===t?"other":"不明"===t||"unknown"===t?"unknown":e}},2781:function(e,t,n){n.d(t,{I:function(){return l},z:function(){return s}});var r=n(9736);let l="mimel:login-modal-request";function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};e&&(n.nextPath=(0,r.K2)(e,"/"));let s=(0,r.K2)(t.appDeepLinkPath,"");return s&&(n.appDeepLinkPath=s),window.dispatchEvent(new CustomEvent(l,{detail:n})),!0}},9736:function(e,t,n){n.d(t,{$8:function(){return x},K2:function(){return m},UT:function(){return f},Vr:function(){return p},XK:function(){return l},kV:function(){return g}});var r=n(5849);let l="mimel:login-success-toast",s="mimel.login.attempt",a="mimel.login.successToast",i=e=>e.startsWith("/")&&!e.startsWith("//")&&!e.includes("\n")&&!e.includes("\r"),o=e=>{try{let t=new URL(e,"https://mimel.local");return"".concat(t.pathname).concat(t.search).concat(t.hash)}catch(t){return e}},c=e=>{try{let t=new URL(e,"https://mimel.local");return(0,r.tW)(t.pathname).replace(/\/+$/,"")||"/"}catch(l){let[t]=e.split("#"),[n="/"]=t.split("?");return(0,r.tW)(n).replace(/\/+$/,"")||"/"}},d=e=>{let t=c(e);return"/login"===t||t.startsWith("/login/")||"/app"===t||t.startsWith("/app/")},u=e=>{if("string"!=typeof e)return"/";let t=e.trim();if(!t)return"";let n=o(t);return i(n)?n:"/"};function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",n=u(t),r="string"==typeof e?e.trim():"";if(!r)return n;let l=r;try{let e=decodeURIComponent(r);e.startsWith("/")&&(l=e)}catch(e){l=r}if(!i(l))return n;let s=o(l);return!i(s)||d(s)?n:s}function x(e){let t={targetPath:m(e),createdAt:Date.now()};window.sessionStorage.setItem(s,JSON.stringify(t))}function p(){window.sessionStorage.removeItem(s)}let h=()=>{let e=window.sessionStorage.getItem(s);if(!e)return null;try{let t=JSON.parse(e);if("string"!=typeof t.targetPath||"number"!=typeof t.createdAt||!i(t.targetPath)||Date.now()-t.createdAt>6e5)return null;return{targetPath:t.targetPath,createdAt:t.createdAt}}catch(e){return null}};function f(e){let t=h();if(window.sessionStorage.removeItem(s),!t)return!1;let n={message:"ログインが完了しました!",targetPath:m(e),createdAt:Date.now()};return window.sessionStorage.setItem(a,JSON.stringify(n)),window.dispatchEvent(new CustomEvent(l)),!0}function g(e){let t=window.sessionStorage.getItem(a);if(!t)return null;try{let n=JSON.parse(t);if("string"!=typeof n.message||"string"!=typeof n.targetPath||"number"!=typeof n.createdAt||!i(n.targetPath))return null;if(Date.now()-n.createdAt>6e5)return window.sessionStorage.removeItem(a),null;let r=o(e);if(o(n.targetPath)!==r)return null;return window.sessionStorage.removeItem(a),{message:n.message,targetPath:n.targetPath,createdAt:n.createdAt}}catch(e){return window.sessionStorage.removeItem(a),null}}},1202:function(e,t,n){n.d(t,{Qw:function(){return l},S5:function(){return a},Wo:function(){return s}});let r=e=>"string"!=typeof e?"":e.trim(),l=e=>r(null==e?void 0:e.introduction)||r(null==e?void 0:e.summary),s=e=>r(null==e?void 0:e.introduction),a=e=>s(e)||r(null==e?void 0:e.title)},5775:function(e,t,n){n.d(t,{isRomanceableRole:function(){return r}});function r(e){return"romanceable"===function(e){if(!e)return e;let t=String(e).toLowerCase().trim();return"攻略対象"===t||"romanceable"===t||"romance target"===t||"romance-target"===t?"romanceable":"サブキャラクター"===t||"supporting"===t||"supporting character"===t||"supporting-character"===t?"supporting":e}(e)}},362:function(e,t,n){n.d(t,{Y:function(){return a},j:function(){return s}});var r=n(5849),l=n(257);let s=()=>{var e;let t=((null===(e=l.env.NEXT_PUBLIC_SIMULATE_HOSTNAME)||void 0===e?void 0:e.trim())||window.location.host).split(":")[0].toLowerCase(),n="mimel-ai.com".split(",").map(e=>
1e.trim().toLowerCase()).filter(Boolean).map(e=>e.split(":")[0]);return n.length>0?n.includes(t):"mimel-ai.com"!==t},a=(e,t)=>{let n=encodeURIComponent(e);return(0,r.WU)("/creator/".concat(n),t)}},1301:function(e,t,n){n.d(t,{IH:function(){return s},L$:function(){return a},RB:function(){return i},jg:function(){return l}});var r=n(5849);function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en",l=(0,r.WU)("/story/".concat(encodeURIComponent(e),"/play"),n),s=new URLSearchParams,a=null==t?void 0:t.trim();a&&s.set("character",a);let i=s.toString();return"".concat(l).concat(i?"?".concat(i):"")}function s(e){let{storyId:t,locale:n}=e;return(0,r.WU)("/story/".concat(encodeURIComponent(t)),n)}function a(e){let{storyId:t,locale:n,visibility:l}=e;return"private"===l||"invitation"===l||"draft"===l?function(e){let{storyId:t,locale:n}=e;return(0,r.WU)("/story-access/".concat(encodeURIComponent(t)),n)}({storyId:t,locale:n}):s({storyId:t,locale:n})}function i(e){var t;let n=e.split("/").filter(Boolean),r=["en","ja","ko","zh-cn","zh-tw"].includes(null===(t=n[0])||void 0===t?void 0:t.toLowerCase())?1:0;if(n.length!==r+3||"story"!==n[r]||"play"!==n[r+2])return null;let l=n[r+1];if(!l)return null;try{return decodeURIComponent(l)}catch(e){return l}}},1779:function(e,t,n){n.d(t,{L:function(){return s},S:function(){return l}});let r=e=>"".concat("mimel:start-context-review:").concat(e);function l(e){let t=e.trim();if(t)try{window.sessionStorage.setItem(r(t),"1")}catch(e){}}function s(e){let t=e.trim();if(!t)return!1;try{let e=r(t),n="1"===window.sessionStorage.getItem(e);return n&&window.sessionStorage.removeItem(e),n}catch(e){return!1}}}}]);

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.