1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[86442],{92295:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/informative-doc/[slug]",function(){return r(24466)}])},29167:function(e,t,r){"use strict";r.d(t,{Z:function(){return d}});var n=r(85893),s=r(67294),a=r(61258),o=r(4307),l=r(28660);let i=(e,t)=>{let r=[1],n=Math.max(2,e-1),s=Math.min(t-1,e+1);n>2&&r.push("ellipsis");for(let e=n;e<=s;e++)r.push(e);return s<t-1&&r.push("ellipsis"),t>1&&r.push(t),r};function d(e){let{currentPage:t,totalPages:r,onPageChange:d,pageSize:c,pageSizeOptions:u,onPageSizeChange:m,totalItems:h}=e,[x,p]=(0,s.useState)(null),y=e=>{e<1||e>r||e===t||(p(e),d(e))};(0,s.useEffect)(()=>{p(null)},[t]);let g=!!(m&&(null==u?void 0:u.length));if(r<=1&&!g)return null;let f="number"==typeof c?(t-1)*c+1:null,b="number"==typeof c&&"number"==typeof h?Math.min(t*c,h):null;return(0,n.jsxs)("div",{className:"my-6 flex flex-col items-center justify-between gap-3 px-1 sm:flex-row",children:[(0,n.jsx)("div",{className:"order-2 text-sm text-gray-500 sm:order-1",children:null!==f&&null!==b&&(0,n.jsxs)("span",{children:["Showing"," ",(0,n.jsx)("span",{className:"font-medium text-gray-700",children:f}),"â",(0,n.jsx)("span",{className:"font-medium text-gray-700",children:b})," of"," ",(0,n.jsx)("span",{className:"font-medium text-gray-700",children:h})]})}),r>1&&(0,n.jsxs)("div",{className:"order-1 flex items-center gap-1.5 sm:order-2",children:[(0,n.jsx)("button",{onClick:()=>y(t-1),disabled:1===t,"aria-label":"Previous page",className:"flex h-8 w-8 items-center justify-center rounded-md border border-gray-300 text-gray-500 transition-colors hover:border-sky-300 hover:bg-sky-50 hover:text-sky-600 disabled:opacity-40 disabled:hover:border-gray-300 disabled:hover:bg-transparent",children:(0,n.jsx)(a.Z,{size:16})}),i(t,r).map((e,r)=>"ellipsis"===e?(0,n.jsx)("span",{className:"select-none px-1 text-gray-400",children:"â¦"},"ellipsis-".concat(r)):(0,n.jsx)("button",{onClick:()=>y(e),disabled:x===e,className:(0,l.Z)("h-8 min-w-8 rounded-md border px-2 text-sm font-medium transition-all duration-200",x===e?"animate-pulse border-sky-500 bg-sky-400 text-white":e===t?"border-sky-600 bg-sky-600 text-white shadow-sm":"border-gray-300 bg-white text-gray-600 hover:border-sky-300 hover:bg-sky-50"),children:e},e)),(0,n.jsx)("button",{onClick:()=>y(t+1),disabled:t===r,"aria-label":"Next page",className:"flex h-8 w-8 items-center justify-center rounded-md border border-gray-300 text-gray-500 transition-colors hover:border-sky-300 hover:bg-sky-50 hover:text-sky-600 disabled:opacity-40 disabled:hover:border-gray-300 disabled:hover:bg-transparent",children:(0,n.jsx)(o.Z,{size:16})})]}),g&&(0,n.jsxs)("div",{className:"order-3 flex items-center gap-2 text-sm text-gray-500",children:[(0,n.jsx)("label",{htmlFor:"pagination-page-size",className:"whitespace-nowrap",children:"Rows per page"}),(0,n.jsx)("select",{id:"pagination-page-size",value:c,onChange:e=>null==m?void 0:m(Number(e.target.value)),className:"rounded-md border border-gray-300 bg-white px-2 py-1 text-sm text-gray-700 transition-colors hover:border-sky-400 focus:border-sky-500 focus:outline-none focus:ring-2 focus:ring-sky-500",children:null==u?void 0:u.map(e=>(0,n.jsx)("option",{value:e,children:e},e))})]})]})}},61323:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(85893);r(67294);var s=r(12779);function a(e){let{columns:t,data:r,maxHeight:a="60vh",stickyCols:o=[]}=e,l={},i=0;return t.forEach(e=>{o.includes(e)&&(l[e]=i,i+=0)}),(0,n.jsxs)("div",{className:"group relative overflow-x-auto rounded-lg border border-gray-300 shadow-md",children:[(0,n.jsx)("button",{onClick:()=>{let e=new Blob([[t.join(","),...r.map(e=>e.map(e=>'"'.concat(String(e),'"')).join(","))].join("\n")],{type:"text/csv;charset=utf-8;"}),n=URL.createObjectURL(e),s=document.createElement("a");s.href=n,s.setAttribute("download","submissions.csv"),document.body.appendChild(s),s.click(),document.body.removeChild(s)},className:"absolute right-2 top-2 z-[40] rounded-full bg-blue-600 p-2 text-white opacity-0 shadow-md transition-opacity duration-200 group-hover:opacity-100 hover:bg-blue-700",title:"Download CSV",children:(0,n.jsx)(s.Z,{className:"h-4 w-4"})}),(0,n.jsx)("div",{className:"overflow-y-auto",style:{maxHeight:a},children:(0,n.jsxs)("table",{className:"min-w-full table-auto border-collapse divide-y divide-gray-300",children:[(0,n.jsx)("thead",{className:"sticky top-0 z-30 bg-gray-200",children:(0,n.jsx)("tr",{children:t.map((e,t)=>{var r;let s=o.includes(e),a=null!==(r=l[e])&&void 0!==r?r:0;return(0,n.jsx)("th",{className:"border-b border-gray-300 px-4 py-3 text-left text-sm font-semibold tracking-wide text-gray-800 ".concat(s?"sticky z-40 bg-gray-200":""),style:s?{left:a}:{},children:e},t)})})}),(0,n.jsx)("tbody",{className:"divide-y divide-gray-200 bg-white",children:r.length>0?r.map((e,r)=>(0,n.jsx)("tr",{className:"transition-colors duration-150 hover:bg-blue-50",children:e.map((e,r)=>{var s;let a=t[r],i=o.includes(a),d=null!==(s=l[a])&&void 0!==s?s:0;return(0,n.jsx)("td",{className:"whitespace-nowrap border-b border-gray-100 px-4 py-3 text-sm text-gray-700 ".concat(i?"sticky z-20 bg-white":""),style:i?{left:d}:{},children:e},r)})},r)):(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:t.length,className:"py-6 text-center text-gray-500",children:"No submissions foun
1d."})})})]})})]})}},31134:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(67294);let s=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),a=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()),o=e=>{let t=a(e);return t.charAt(0).toUpperCase()+t.slice(1)},l=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()};var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let d=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:s=24,strokeWidth:a=2,absoluteStrokeWidth:o,className:d="",children:c,iconNode:u,...m}=e;return(0,n.createElement)("svg",{ref:t,...i,width:s,height:s,stroke:r,strokeWidth:o?24*Number(a)/Number(s):a,className:l("lucide",d),...m},[...u.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(c)?c:[c]])}),c=(e,t)=>{let r=(0,n.forwardRef)((r,a)=>{let{className:i,...c}=r;return(0,n.createElement)(d,{ref:a,iconNode:t,className:l("lucide-".concat(s(o(e))),"lucide-".concat(e),i),...c})});return r.displayName=o(e),r}},61258:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(31134).Z)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},4307:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(31134).Z)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},12779:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(31134).Z)("download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},78497:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(31134).Z)("menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]])},24466:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return d},default:function(){return c}});var n=r(85893),s=r(29167),a=r(61323),o=r(97629),l=r(11163),i=r(67294),d=!0;function c(e){let{documentData:t,submissions:r,currentPage:o,totalPages:d,from:c,to:u}=e,m=(0,l.useRouter)(),[h,x]=(0,i.useState)(c||""),[p,y]=(0,i.useState)(u||"");return(0,n.jsxs)("div",{className:"mx-auto flex max-w-6xl flex-col gap-2 px-4 py-10",children:[(0,n.jsx)("h1",{className:"text-2xl font-bold",children:t.title}),(0,n.jsx)("p",{className:"text-lg text-gray-600",children:t.description}),(0,n.jsxs)("div",{className:"flex items-center gap-x-4",children:[t.createdAt&&(0,n.jsxs)("p",{className:"text-sm text-gray-500",children:[(0,n.jsx)("strong",{children:"Created At:"})," ",new Date(t.createdAt).toLocaleString()]}),(0,n.jsxs)("p",{className:"text-sm text-gray-500",children:[(0,n.jsx)("strong",{children:"Category:"})," ",t.category]}),(0,n.jsxs)("p",{className:"text-sm text-gray-500",children:[(0,n.jsx)("strong",{children:"Downloads:"})," ",t.downloads]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("input",{type:"date",value:h,onChange:e=>x(e.target.value),className:"rounded border px-2 py-1"}),(0,n.jsx)("input",{type:"date",value:p,onChange:e=>y(e.target.value),className:"rounded border px-2 py-1"}),(0,n.jsx)("button",{onClick:()=>{m.push({pathname:m.pathname,query:{...m.query,page:1,from:h,to:p}})},className:"rounded bg-blue-600 px-4 py-1 text-white",children:"Apply"}),(0,n.jsx)("button",{onClick:()=>{let{slug:e}=m.query;x(""),y(""),m.push({pathname:"/admin/informative-doc/".concat(e),query:{page:1}})},className:"rounded bg-gray-400 px-4 py-1 text-white",children:"Clear"})]}),(0,n.jsx)("h2",{className:"text-xl font-semibold",children:"User Submissions"}),(0,n.jsx)(a.Z,{stickyCols:["Index"],columns:["Index","Name","Email","Created At","Topic Of Interest","referral","utm_source","utm_medium","utm_campaign","utm_term"],data:r.map((e,t)=>[(o-1)*500+t+1,e.name||"-",e.email||"-",e.createdAt?new Date(e.createdAt).toLocaleStr
1ing("en-IN",{timeZone:"Asia/Kolkata",dateStyle:"medium",timeStyle:"short"}):"-",e.topicOfInterest||"-",e.referral||"-",e.utm_source||"-",e.utm_medium||"-",e.utm_campaign||"-",e.utm_term||"-"])}),(0,n.jsx)(s.Z,{currentPage:o,totalPages:d,onPageChange:e=>{m.push({pathname:m.pathname,query:{...m.query,page:e,from:h,to:p}})}})]})}c.getLayout=e=>(0,n.jsx)(o.Z,{children:e})},28660:function(e,t,r){"use strict";function n(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter(Boolean).join(" ")}r.d(t,{Z:function(){return n}})}},function(e){e.O(0,[25675,97629,92888,49774,40179],function(){return e(e.s=92295)}),_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.