1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6898],{4873:(e,t,r)=>{"use strict";var s=r(12115).__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;t.c=function(e){return s.H.useMemoCache(e)}},13284:(e,t,r)=>{"use strict";r.d(t,{profileService:()=>a});var s=r(14005);let a={getProfile:async e=>(await s.A.get(`/user/profile/${e}`)).data,updateProfile:async(e,t)=>(await s.A.put(`/user/profile/${e}`,t)).data}},14005:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var s=r(52707),a=r(64510);let o=s.A.create({baseURL:"https://backend.droppr.ai/api/v1",headers:{"Content-Type":"application/json"}});o.interceptors.request.use(e=>{try{{let t=localStorage.getItem("auth-storage");if(t){let{state:r}=JSON.parse(t),s=r?.token;s&&(e.headers.Authorization=`Bearer ${s}`)}}}catch(e){console.error("Error setting auth header:",e)}return e},e=>Promise.reject(e)),o.interceptors.response.use(e=>e,e=>e.response?(401===e.response.status&&(console.warn("\uD83D\uDD10 401 Unauthorized detected. Logging out user..."),a.default.getState().logout(),"/user/auth"!==window.location.pathname&&(window.location.href="/user/auth")),Promise.reject({success:!1,message:e.response.data?.message||"Something went wrong. Please try again."})):e.request?Promise.reject({success:!1,message:"Network error: No response from server. Please check your connection."}):Promise.reject({success:!1,message:e.message||"An unexpected error occurred during the request."}));let n=o},19749:(e,t,r)=>{"use strict";e.exports=r(4873)},36530:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={default:function(){return u},getImageProps:function(){return c}};for(var a in s)Object.defineProperty(t,a,{enumerable:!0,get:s[a]});let o=r(54730),n=r(68154),i=r(42402),l=o._(r(19434));function c(e){let{props:t}=(0,n.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let u=i.Image},47779:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>P});var s=r(95155),a=r(19749),o=r(12115),n=r(82222),i=r(37100),l=r(73981),c=r(73549),u=r.n(c),d=r(25780),m=r(14950),h=r(58079),g=r(72775),x=r(14547),f=r(32177),b=r(30091),p=r(13320),y=r(14005);let v=async e=>(await y.A.post("/user/feedback",e)).data;var j=r(78614);let w=["Give feedback","Report a bug","Suggest an improvement","Other"];function N({isOpen:e,onClose:t,user:r}){let[a,n]=(0,o.useState)(w[0]),[i,l]=(0,o.useState)(0),[c,u]=(0,o.useState)(0),[d,m]=(0,o.useState)(""),[y,N]=(0,o.useState)(!1),[k,S]=(0,o.useState)(!1);if(!e)return null;let A=async e=>{if(e.preventDefault(),!d.trim())return void j.oR.error("Please enter a message");if("Give feedback"===a&&0===i)return void j.oR.error("Please provide a rating");N(!0);try{await v({type:a,rating:"Give feedback"===a?i:void 0,message:d,userId:r?._id||r?.id}),j.oR.success("Feedback submitted successfully"),n(w[0]),l(0),m(""),t()}catch(e){j.oR.error(e.response?.data?.message||"Failed to submit feedback")}finally{N(!1)}};return(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm",children:(0,s.jsxs)("div",{className:"bg-white rounded-xl shadow-xl w-full max-w-md overflow-hidden flex flex-col max-h-[90vh]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Feedback"}),(0,s.jsx)("button",{onClick:t,className:"p-1 text-gray-400 hover:text-gray-600 rounded-lg hover:bg-gray-100 transition-colors",children:(0,s.jsx)(h.A,{className:"w-5 h-5"})})]}),(0,s.jsxs)("form",{onSubmit:A,className:"p-4 overflow-y-auto space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Feedback Type"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>S(!k),className:"w-full flex items-center justify-between px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-brand-blue/20 focu
1s:border-brand-blue bg-white text-gray-700 text-sm transition-all",children:[(0,s.jsx)("span",{className:"truncate",children:a}),(0,s.jsx)(g.A,{className:`w-4 h-4 text-gray-400 shrink-0 transition-transform duration-200 ${k?"rotate-180":""}`})]}),(0,s.jsx)(b.N,{children:k&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>S(!1)}),(0,s.jsx)(p.P.div,{initial:{opacity:0,y:10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:10,scale:.95},transition:{duration:.15},className:"absolute left-0 right-0 top-full mt-2 bg-white border border-gray-100 rounded-xl shadow-xl z-50 overflow-hidden p-1.5",children:w.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>{n(e),S(!1)},className:`w-full flex items-center justify-between px-3 py-2 rounded-lg text-sm transition-all ${a===e?"bg-brand-light text-brand-dark font-medium":"text-gray-600 hover:bg-gray-50 hover:text-brand-blue"}`,children:[e,a===e&&(0,s.jsx)(x.A,{className:"w-4 h-4 shrink-0"})]},e))})]})})]})]}),"Give feedback"===a&&(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Rating"}),(0,s.jsxs)("div",{className:"flex items-center space-x-1",onMouseLeave:()=>{u(0)},children:[[void 0,void 0,void 0,void 0,void 0].map((e,t)=>{let r=c||i,a=r>=t+1,o=r>=t+.5&&!a;return(0,s.jsx)("div",{className:"cursor-pointer p-1",onClick:e=>{let r;return r=e.currentTarget.getBoundingClientRect(),void l(e.clientX-r.left<r.width/2?t+.5:t+1)},onMouseMove:e=>{let r;return r=e.currentTarget.getBoundingClientRect(),void u(e.clientX-r.left<r.width/2?t+.5:t+1)},children:a?(0,s.jsx)(f.A,{className:"w-8 h-8 fill-yellow-400 text-yellow-400"}):o?(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(f.A,{className:"w-8 h-8 text-gray-300"}),(0,s.jsx)("div",{className:"absolute top-0 left-0 w-1/2 overflow-hidden",children:(0,s.jsx)(f.A,{className:"w-8 h-8 fill-yellow-400 text-yellow-400"})})]}):(0,s.jsx)(f.A,{className:"w-8 h-8 text-gray-300"})},t)}),(0,s.jsx)("span",{className:"ml-2 text-sm text-gray-500 font-medium",children:i>0?i:c>0?c:""})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message"}),(0,s.jsx)("textarea",{value:d,onChange:e=>m(e.target.value),placeholder:"Tell us what you think...",rows:4,maxLength:500,className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-brand-blue resize-none"}),(0,s.jsxs)("div",{className:"text-right text-xs text-gray-400 mt-1",children:[d.length,"/500 characters"]})]}),(0,s.jsx)("div",{className:"flex justify-end pt-2",children:(0,s.jsx)("button",{type:"submit",disabled:y,className:"px-4 py-2 bg-brand-blue text-white rounded-lg hover:bg-brand-blue/90 disabled:opacity-50 transition-colors",children:y?"Submitting...":"Submit"})})]})]})})}var k=r(64510),S=r(37031);function A({setMobileMenuOpen:e}){let t=(0,n.useRouter)(),{user:r,logout:a}=(0,k.default)(),[i,c]=(0,o.useState)(!1),[h,g]=(0,o.useState)(!1),[x,f]=(0,o.useState)(!1),b=async()=>{f(!0);try{await a(),t.push("/")}catch(e){console.error("Logout failed",e)}finally{f(!1),c(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("header",{className:"bg-white shadow-sm border-b border-gray-200 h-16 md:h-20 flex items-center justify-between px-4 lg:px-8",children:[(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsxs)(u(),{href:"/",className:"shrink-0 flex flex-col justify-center",children:[(0,s.jsx)(l.default,{src:"/logo.png",alt:"DropPR.ai",width:140,height:42,className:"h-9 md:h-12 w-auto object-contain",priority:!0}),(0,s.jsx)("span",{className:"text-[10px] text-slate-500 font-medium tracking-wide leading-none pl-1 mt-1",children:"AI-Powered Press Releases"})]})}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 sm:gap-3",children:[(0,s.jsx)(S.A,{text:"Submit your feedback",position:"bottom",children:(0,s.jsxs)("button",{onClick:()=>g(!0),className:"flex items-center justify-center bg-gray-50 hover:bg-gray-100 text-gray-600 p-2 sm:px-4 sm:py-2.5 rounded-full sm:rounded-lg border border-gray-100 transition-all duration-200 shadow-xs hover:shadow-sm active:scale-95 group",children:[(0,s.jsx)(d.A,{className:"w-5 h-5 group-hover:text-blue-600 transition-colors"}),(0,s.jsx)("span",{className:"hidden sm:block ml-2 text-sm font-semibold",children:"Provide Feedback"})]})}),(0,s.jsx)("button",{onClick:()=>e(!0),className:"lg:hidden p-2 rounded-full bg-gray-50 hover:bg-gray-100 text-gray-600 border border-gray-100 transition-all duration-200 shadow-xs active:scale-95","aria-label":"Open menu",children:(0,s.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),(0,s.jsx)(m.A,{isOpen:i,onClose:()=>{c(!1)},onConfirm:b,title:"Logout Confirmation",message:"Are you sure you want to logout?",confirmText:"Logout",cancelText:"Cancel",confirmColor:"bg-red-600 hover:bg-red-700",isLoading:x}),(0,s.jsx)(N,{isOpen:h,onClose:()=>g(!1),user:r})]})}function P(e){let t,r,l,c,u,d,m,h=(0,a.c)(14),{children:g}=e,x=(0,n.usePathname)(),[f,b]=(0,o.useState)(!1);h[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{b(!1)},h[0]=t):t=h[0],h[1]!==x?(r=[x],h[1]=x,h[2]=r):r=h[2],(0,o.useEffect)(t,r),h[3]!==f?(l=(0,s.jsx)(i.A,{mobileMenuOpen:f,setMobileMenuOpen:b}),h[3]=f,h[4]=l):l=h[4],h[5]===Symbol.for("react.memo_cache_sentinel")?(c=(0,s.jsx)(A,{setMobileMenuOpen:b}),h[5]=c):c=h[5];let p=`flex-1 ${x?.includes("/droppr-gpt")?"overflow-hidden":"overflow-y-auto"}`;return h[6]!==g?(u=(0,s.jsx)("div",{className:" min-h-full bg-white ",children:(0,s.jsx)("div",{className:"bg-white p-3 sm:p-6 ",children:g})}),h[6]=g,h[7]=u):u=h[7],h[8]!==p||h[9]!==u?(d=(0,s.jsxs)("div",{className:"fixed top-0 bottom-0 left-0 lg:left-72 right-0 flex flex-col",children:[c,(0,s.jsx)("main",{className:p,children:u})]}),h[8]=p,h[9]=u,h[10]=d):d=h[10],h[11]!==l||h[12]!==d?(m=(0,s.jsxs)("div",{className:"h-screen w-screen overflow-hidden bg-gray-50",children:[l,d]}),h[11]=l,h[12]=d,h[13]=m):m=h[13],m}},58079:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71858).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
1],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},64510:(e,t,r)=>{"use strict";r.d(t,{default:()=>n});var s=r(49723),a=r(13229);r(14005);var o=r(13284);let n=(0,s.v)((0,a.Zr)((e,t)=>({user:null,token:null,isAuthenticated:!1,isLoading:!1,error:null,setAuth:(t,r)=>{document.cookie=`auth_token=${r}; path=/; max-age=2592000; SameSite=Lax; Secure`,e({user:t,token:r,isAuthenticated:!0,isLoading:!1,error:null})},logout:async()=>{let{signOut:t}=await r.e(9319).then(r.t.bind(r,79319,23));try{await t({redirect:!1})}catch(e){}document.cookie="auth_token=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Lax; Secure",e({user:null,token:null,isAuthenticated:!1,isLoading:!1,error:null})},clearError:()=>{e({error:null})},checkAuthSync:()=>{let r=document.cookie.split(";").some(e=>e.trim().startsWith("auth_token=")),{token:s,isAuthenticated:a}=t();return a&&!r?(console.warn("Auth cookie missing, logging out..."),t().logout(),!1):(!a&&r&&s&&e({isAuthenticated:!0}),r)},updateUser:t=>{e(e=>({user:{...e.user,...t}}))},refreshUser:async()=>{let r=t().user?._id||t().user?.id;if(r)try{let t=await o.profileService.getProfile(r);t.success&&e({user:t.data})}catch(e){console.error("Failed to refresh user profile:",e,e.response?.data)}}}),{name:"auth-storage",storage:(0,a.KU)(()=>localStorage),partialize:e=>({user:e.user,token:e.token,isAuthenticated:e.isAuthenticated})}))},73981:(e,t,r)=>{"use strict";r.d(t,{default:()=>a.a});var s=r(36530),a=r.n(s)},82222:(e,t,r)=>{"use strict";var s=r(55042);r.o(s,"notFound")&&r.d(t,{notFound:function(){return s.notFound}}),r.o(s,"useParams")&&r.d(t,{useParams:function(){return s.useParams}}),r.o(s,"usePathname")&&r.d(t,{usePathname:function(){return s.usePathname}}),r.o(s,"useRouter")&&r.d(t,{useRouter:function(){return s.useRouter}}),r.o(s,"useSearchParams")&&r.d(t,{useSearchParams:function(){return s.useSearchParams}})},97664:(e,t,r)=>{Promise.resolve().then(r.bind(r,47779))}},e=>{e.O(0,[965,8614,3320,3549,2402,9652,9441,8441,4454,7358],()=>e(e.s=97664)),_N_E=e.O()}]);
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.