PageSourceSearch

https://rov-qa.vercel.app/_next/static/chunks/6507.556475338ae2633a.js

js rov-qa.vercel.app collected 2026-10-03 07:42:50 UTC 6,182 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6507],{10969:(e,t,n)=>{n.d(t,{A:()=>a});var l=n(95155),o=n(17398);function a(e){let{open:t,onClose:n,onConfirm:a,title:i,description:r,confirmText:s="Confirm",cancelText:c="Cancel",confirmVariant:d="danger",loading:u=!1}=e;return(0,l.jsx)(o.A,{open:t,onClose:n,showCloseIcon:!1,contPadding:"p-0",contStyle:{overflow:"hidden"},children:(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,l.jsxs)("div",{className:"p-6 text-center",children:[(0,l.jsx)("p",{className:"text-lg font-medium text-[var(--text)]",children:i}),r&&(0,l.jsx)("p",{className:"text-sm text-neutral-one mt-1 whitespace-pre-line",children:r})]}),(0,l.jsx)("button",{disabled:u,onClick:a,className:"w-full py-3 text-base font-medium border-t border-[var(--brandBorderOne)]\n            ".concat("danger"===d?"text-red-400 hover:bg-[var(--brandBorderTwo)]":"hover:bg-[var(--brandBorderTwo)]","\n          "),children:s}),(0,l.jsx)("button",{onClick:n,className:"w-full py-3 text-base font-medium border-t border-[var(--brandBorderOne)] text-[var(--text)] hover:bg-[var(--brandBorderTwo)]",children:c})]})})}},36507:(e,t,n)=>{n.r(t),n.d(t,{default:()=>j});var l=n(95155),o=n(12115),a=n(24274),i=n(88288),r=n(49730),s=n(27685),c=n(99517),d=n(17398),u=n(75317),m=n(82866),x=n(60920),f=n(6045),p=n(71928),v=n(93118),h=n(68369),g=n(57577);function b(e){let{activeTab:t,setActiveTab:n}=e,{t:i}=(0,a.Bd)("common"),r=(0,o.useMemo)(()=>[{id:"",name:i("tabs.allTopics")},{id:"approved",name:i("tabs.approved")},{id:"draft",name:i("tabs.draft")},{id:"pending",name:i("tabs.pending")},{id:"rejected",name:i("tabs.rejected")}],[i]);return(0,l.jsx)("div",{className:"flex flex-col gap-4",children:(0,l.jsx)("div",{className:" flex gap-3 sm:gap-4  overflow-x-auto sm:overflow-x-visible scrollbar-hide p-[5px] ",children:r.map(e=>(0,l.jsx)("button",{onClick:()=>n(e.id),className:"\n                  cursor-pointer flex gap-1 flex-shrink-0 px-4 py-2 \n                  font-medium font-semibold rounded-3xl \n                  transition-all duration-300\n                  hover:scale-105\n                  ".concat(t===e.id?"bg-brand-gradient text-[var(--secondary)] shadow-md scale-105":"bg-[var(--borderThree)] text-tertiary","\n                "),children:e.name},e.id))})})}function w(e){let{show:t,onClose:n,topicInfo:o}=e;return(0,l.jsx)(d.A,{open:t,onClose:n,titleClass:"font-rajdhani",contClass:"w-[98%] max-w-4xl",closeIconClass:"top-3 right-4",contPadding:"p-6",children:(0,l.jsx)(u.y,{topicInfo:o})})}function j(){var e;let t=new URLSearchParams(window.location.search).get("highlight"),n=(0,v.A7)(t),d=(0,o.useRef)({}),{headerSearchValue:u,isAuthenticated:j}=(0,r.A)(),{confirm:C}=(0,x.Q)(),{t:y}=(0,a.Bd)("common"),{t:T}=(0,a.Bd)("screen"),{showAlert:N}=(0,p.M)(),[A,S]=(0,o.useState)(""),[k,P]=(0,o.useState)(null),[_,B]=(0,o.useState)(null),[I,E]=(0,o.useState)(1),[V]=(0,o.useState)(10),[L,Q]=(0,o.useState)(!1),R=(0,h.Fi)(["topics","my"]),{data:M,isLoading:U}=(0,g.hq)({page:I,per_page:V,search:(null==u?void 0:u.trim())||void 0,status:(null==A?void 0:A.trim())||void 0},j),q=Array.isArray(null==M?void 0:M.data)?M.data:[],D=null!=(e=null==M?void 0:M.meta)?e:null;async function K(e){try{Q(!0);let t=await (0,s.do)(e);t&&(0,f.aK)(null==t?void 0:t.message,N,t.success?"success":"error"),(null==t?void 0:t.success)&&R()}catch(e){console.error(e),(0,f.aK)("Topic delete failed",N,"error")}finally{Q(!1)}}return(0,o.useEffect)(()=>{if(!n||!(null==q?void 0:q.length))return;let e=d.current[n];if(!e)return;let t=setTimeout(()=>{e.scrollIntoView({behavior:"smooth",block:"center"})},300);return()=>clearTimeout(t)},[n,q]),(0,l.jsxs)("div",{className:"mx-auto py-10 w-full",children:[(0,l.jsx)(w,{show:!!k,onClose:()=>P(null),topicInfo:k}),(0,l.jsx)(m.A,{show:!!_,initData:_,onClose:()=>B(null),onUpdate:R}),(0,l.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center justify-between mb-8 gap-4",children:[(0,l.jsx)("div",{className:"flex-1 min-w-[170px] sm:w-auto",children:(0,l.jsx)(b,{activeTab:A,setActiveTab:S})}),(0,l.jsx)(i.W,{currentPage:(null==D?void 0:D.current_page)||1,pageSize:(null==D?void 0:D.per_page)||V,totalItems:(null==D?void 0:D.total)||0,className:"ml-auto mt-2 sm:mt-0",label:y("topics")})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-3 max-w-2xl mx-auto",children:[U&&Array.from({length:5}).map((e,t)=>(0,l.jsx)(c.R,{},"skeleton-".concat(t))),(null==q?void 0:q.length)>0&&(null==q?void 0:q.map((e,t)=>(0,l.jsx)(c.Q,{ref:t=>{d.current[e.id]=t},removeClaimQueryParam:()=>{n===(null==e?void 0:e.id)&&function(e){if(!e)return;let t=new URL(window.location.href);t.searchParams.delete("highlight"),window.history.replaceState({},"",t.toString())}(n)},isHighlight:n===(null==e?void 0:e.id),topicInfo:e,onClickDelete:()=>{C({title:y("actions.deleteTitle",{title:T("community.labels.topic")}),description:T("community.labels.deleteTopicMessage",{topic_title:":\n ".concat(null==e?void 0:e.title)}),confirmText:y("actions.delete"),confirmVariant:"danger",onConfirm:()=>K(null==e?void 0:e.id)})},onClickEdit:()=>B(e),onClickView:()=>P(e),deleteLoading:L},"my-topic-".concat(null==e?void 0:e.id,"-").concat(t)))),!U&&(null==q?void 0:q.length)===0&&(0,l.jsx)("p",{className:"text-neutral-one",children:y("messages.noTopics")})]}),(0,l.jsx)(i.A,{currentPage:(null==D?void 0:D.current_page)||I,totalPages:(null==D?void 0:D.last_page)||1,onPageChange:E,loading:U})]})}},60920:(e,t,n)=>{n.d(t,{Q:()=>s,q:()=>r});var l=n(95155),o=n(10969),a=n(12115);let i=(0,a.createContext)(null);function r(e){let{children:t}=e,[n,r]=(0,a.useState)(!1),[s,c]=(0,a.useState)(!1),[d,u]=(0,a.useState)(null),m=()=>{r(!1),c(!1)},x=async()=>
1{if(null==d?void 0:d.onConfirm)try{c(!0),await d.onConfirm()}finally{m()}};return(0,l.jsxs)(i.Provider,{value:{confirm:e=>{u(e),r(!0)}},children:[t,n&&d&&(0,l.jsx)(o.A,{open:n,onClose:m,onConfirm:x,title:d.title,description:d.description,confirmText:d.confirmText,cancelText:d.cancelText,confirmVariant:d.confirmVariant,loading:s})]})}function s(){let e=(0,a.useContext)(i);if(!e)throw Error("useConfirmAction must be used within ConfirmActionProvider");return e}}}]);

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.