PageSourceSearch

https://www.avivremagazine.fr/_next/static/chunks/3h9pu8xo6179l.js

js avivremagazine.fr collected 2026-10-02 11:56:40 UTC 29,593 bytes, 25 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,464718,783219,863431,892112,522455,455678,648950,966606,540656,744596,e=>{"use strict";var t=e.i(843476),s=e.i(632137),a=e.i(16715),r=e.i(271645);let n={default:"bg-[#146BFF] text-white hover:bg-[#146BFF]/90 shadow-[0_10px_30px_rgba(20,107,255,0.25)] hover:shadow-[0_15px_40px_rgba(20,107,255,0.35)]",outline:"border border-[#E5E7EB] bg-white text-[#111111]/70 hover:border-[#146BFF]/30 hover:bg-[#146BFF]/5 hover:text-[#146BFF] dark:border-white/10 dark:bg-white/5 dark:text-white/70 dark:hover:bg-[#146BFF]/10",destructive:"bg-red-500 text-white hover:bg-red-600 shadow-[0_10px_30px_rgba(239,68,68,0.25)]",ghost:"text-[#111111]/60 hover:bg-[#111111]/5 hover:text-[#111111] dark:text-white/60 dark:hover:bg-white/5 dark:hover:text-white"},i={default:"h-10 px-5 text-[14px]",sm:"h-8 px-4 text-[13px]",lg:"h-12 px-6 text-[15px]",icon:"h-9 w-9 p-0"};e.s(["f",0,function({onClick:e,loading:l,disabled:o,variant:d="default",size:c="default",icon:x,children:h,className:u}){let[m,p]=(0,r.useState)(!1),f=l||m,b=async()=>{if(!f&&!o)try{p(!0),await e()}finally{p(!1)}};return(0,t.jsx)("button",{"aria-busy":f,disabled:o||f,onClick:b,className:(0,s.f)("inline-flex items-center justify-center gap-2 rounded-full font-medium transition-all duration-200 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#146BFF]/50 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",n[d],i[c],u),children:f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.f,{className:"h-4 w-4 animate-spin"}),(0,t.jsx)("span",{children:"Chargement..."})]}):(0,t.jsxs)(t.Fragment,{children:[x&&(0,t.jsx)("span",{className:"flex-shrink-0",children:x}),h]})})}],783219);var l=e.i(164243),o=e.i(607486),d=e.i(643531),c=e.i(678784),x=e.i(118366),h=e.i(248256),u=e.i(367240),m=e.i(555436),p=e.i(618393),f=e.i(727612),b=e.i(37727);function g({configData:e,pendingContext:s,setPendingContext:a,hasPendingChanges:n,switchingContext:i,onContextSwitch:w,onResetPendingChanges:k,onClearCookies:v,className:j=""}){let[N,y]=(0,r.useState)(""),[F,C]=(0,r.useState)(!1),E=(0,r.useMemo)(()=>{if(!e||"none"===s.site)return[];let t=e.database.sites.find(e=>e.id===s.site);return t?.domains||[]},[e,s.site]),B=(0,r.useMemo)(()=>{if(!e)return[];let t=[];return e.database.sites.forEach(s=>{s.domains.forEach(a=>{let r=e.database.tenants.find(e=>e.id===s.tenantId),n="active"===a.status?"●":"○",i="active"===a.status?"Actif":"inactive"===a.status?"Inactif":a.status;t.push({group:`${r?.name||"Inconnu"}  ›  ${s.name}`,label:`${a.name}  \xb7  ${n} ${i}`,value:`${s.id}-${a.name}`,tenantId:s.tenantId,siteId:s.id,domainName:a.name})})}),t},[e]),S=(0,r.useMemo)(()=>e?[{label:"Aucun",value:"none"},...e.database.tenants.map(e=>{let t="active"===e.status?"●":"○";return{label:`${e.name}
2${e.code}  \xb7  ${t} ${"active"===e.status?"Actif":e.status}  \xb7  ${e.sitesCount} site${1!==e.sitesCount?"s":""}`,value:e.id}})]:[],[e]),$=(0,r.useMemo)(()=>{if(!e)return[];let t=e.database.sites;return"none"!==s.tenant&&(t=t.filter(e=>e.tenantId===s.tenant)),[{label:"Aucun",value:"none"},...t.map(e=>{let t="active"===e.status?"●":"○";return{label:`${e.name}
3${t} ${"active"===e.status?"Actif":e.status}  \xb7  ${e.domainCount} domaine${1!==e.domainCount?"s":""}`,value:e.id,group:"none"===s.tenant?e.tenantName:void 0}})]},[e,s.tenant]),T=(0,r.useMemo)(()=>E.length?[{label:"Aucun",value:"none"},...E.map(e=>{let t="active"===e.status?"●":"○";return{label:`${e.name}
4${t} ${"active"===e.status?"Actif":e.status}`,value:e.name}})]:[{label:"Aucun",value:"none"}],[E]);if(!e)return null;let _=e.session.cookies.selectedTenant,A=e.session.cookies.selectedSite,I=e.session.cookies.selectedHost,O=async()=>{let t=e.session.cookies.selectedTenant,s=e.session.cookies.selectedSite,a=e.session.cookies.selectedHost,r=`# Auth Context & Cookies
5
6## Headers
7X-Auth-Bypass: true
8X-Test-Bypass: true
9X-Skip-Middleware: true
10
11## Cookies
12selected_host=${a||"none"}
13selected_tenant=${t||"none"}
14
15## Context Info
16Tenant ID: ${t||"N/A"}
17Tenant Name: ${t&&e.database.tenants.find(e=>e.id===t)?.name||"N/A"}
18Site ID: ${s||"N/A"}
19Site Name: ${s&&e.database.sites.find(e=>e.id===s)?.name||"N/A"}
20Domain: ${a||"N/A"}
21
22## cURL Example
23curl -H "X-Auth-Bypass: true" \\
24     -H "Cookie: selected_host=${a||"localhost"}; selected_tenant=${t||"none"}" \\
25     http://localhost:3060/api/trpc/YOUR_ENDPOINT`;try{await navigator.clipboard.writeText(r),C(!0),setTimeout(()=>C(!1),2e3)}catch(e){console.error("Failed to copy:",e)}};return(0,t.jsxs)("div",{className:`flex flex-col gap-5 ${j}`,children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full bg-[#146BFF]/10",children:(0,t.jsx)(m.f,{className:"h-4 w-4 text-[#146BFF]"})}),(0,t.jsx)("span",{className:"font-medium text-[14px] text-[#111111] dark:text-white",children:"Recherche rapide"})]}),(0,t.jsx)(l.f,{contentClassName:"min-w-[360px]",emptyMessage:"Aucun domaine trouvé pour cette recherche.",onQueryChange:y,onValueChange:t=>{if(!(t&&e))return;let s=B.find(e=>e.value===t);s&&(a({tenant:s.tenantId,site:s.siteId,host:s.domainName}),y(""))},options:B,placeholder:"Rechercher un domaine, site ou tenant...",query:N,searchPlaceholder:"Tapez pour filtrer les domaines...",triggerClassName:"w-full h-12 rounded-2xl border-[#
25E5E7EB] bg-[#111111]/[0.02] px-4 text-[15px] dark:border-white/10 dark:bg-white/5",value:N})]}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full bg-[#146BFF]/10",children:(0,t.jsx)(o.f,{className:"h-4 w-4 text-[#146BFF]"})}),(0,t.jsx)("span",{className:"font-medium text-[14px] text-[#111111] dark:text-white",children:"Sélection manuelle"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(o.f,{className:"h-3.5 w-3.5 text-[#111111]/30 dark:text-white/30"}),(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-[#111111]/40 dark:text-white/40",children:"Tenant"})]}),(0,t.jsx)(l.f,{emptyMessage:"Aucun tenant.",onValueChange:t=>{let r=s.site;if("none"!==t&&"none"!==r){let s=e?.database.sites.find(e=>e.id===r);s&&s.tenantId!==t&&(r="none")}a({...s,tenant:t,site:r,host:"none"})},options:S,placeholder:"Sélectionner...",searchPlaceholder:"Rechercher un tenant...",triggerClassName:"w-full h-10 rounded-xl border-[#E5E7EB] bg-[#111111]/[0.02] text-[13px] dark:border-white/10 dark:bg-white/5",value:s.tenant})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(h.f,{className:"h-3.5 w-3.5 text-[#111111]/30 dark:text-white/30"}),(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-[#111111]/40 dark:text-white/40",children:"Site"})]}),(0,t.jsx)(l.f,{disabled:"none"===s.tenant,emptyMessage:"Aucun site.",onValueChange:e=>{a({...s,site:e,host:"none"})},options:$,placeholder:"Sélectionner...",searchPlaceholder:"Rechercher un site...",triggerClassName:"w-full h-10 rounded-xl border-[#E5E7EB] bg-[#111111]/[0.02] text-[13px] disabled:opacity-40 dark:border-white/10 dark:bg-white/5",value:s.site})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 text-[#111111]/30 dark:text-white/30"}),(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-[#111111]/40 dark:text-white/40",children:"Domaine"})]}),(0,t.jsx)(l.f,{disabled:"none"===s.site,emptyMessage:"Aucun domaine.",onValueChange:e=>{a({...s,host:e})},options:T,placeholder:"Sélectionner...",searchPlaceholder:"Rechercher un domaine...",triggerClassName:"w-full h-10 rounded-xl border-[#E5E7EB] bg-[#111111]/[0.02] text-[13px] disabled:opacity-40 dark:border-white/10 dark:bg-white/5",value:s.host})]})]})]}),(0,t.jsx)("div",{className:"flex items-center justify-between border-t border-[#E5E7EB] pt-4 dark:border-white/10",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full text-[#111111]/40 transition-colors hover:bg-[#111111]/5 hover:text-[#111111]/60 disabled:opacity-50 dark:text-white/40 dark:hover:bg-white/5 dark:hover:text-white/60",disabled:i,onClick:v,title:"Effacer les cookies",children:i?(0,t.jsx)(u.f,{className:"h-4 w-4 animate-spin"}):(0,t.jsx)(f.f,{className:"h-4 w-4"})}),n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full text-[#111111]/40 transition-colors hover:bg-[#111111]/5 hover:text-[#111111]/60 dark:text-white/40 dark:hover:bg-white/5 dark:hover:text-white/60",onClick:k,title:"Annuler les modifications",children:(0,t.jsx)(b.X,{className:"h-4 w-4"})}),(0,t.jsx)("button",{className:"inline-flex h-8 items-center gap-2 rounded-full bg-[#146BFF] px-4 text-[13px] font-medium text-white shadow-[0_10px_30px_rgba(20,107,255,0.25)] transition-all duration-200 hover:bg-[#146BFF]/90 hover:shadow-[0_15px_40px_rgba(20,107,255,0.35)] disabled:opacity-50",disabled:i,onClick:w,title:"Appliquer les modifications",children:i?(0,t.jsx)(u.f,{className:"h-4 w-4 animate-spin"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.f,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"Appliquer"})]})})]})]})}),(0,t.jsxs)("div",{className:"rounded-[16px] bg-[#111111]/[0.02] p-4 dark:bg-white/[0.02]",children:[(0,t.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wider text-[#111111]/40 dark:text-white/40",children:"Contexte actuel"}),(0,t.jsx)("button",{onClick:O,className:`inline-flex h-7 items-center gap-1.5 rounded-full px-3 text-[11px] font-medium transition-all duration-200 ${F?"bg-emerald-500/10 text-emerald-600 dark:bg-emerald-500/20 dark:text-emerald-400":"bg-[#146BFF]/10 text-[#146BFF] hover:bg-[#146BFF]/20"}`,title:"Copier le contexte d'authentification",children:F?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.f,{className:"h-3 w-3"}),(0,t.jsx)("span",{children:"Copié"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.f,{className:"h-3 w-3"}),(0,t.jsx)("span",{children:"Copier"})]})})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-2 text-[13px]",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o.f,{className:"h-4 w-4 text-[#146BFF]"}),(0,t.jsx)("span",{className:"text-[#111111]/70 dark:text-white/70",children:_?e.database.tenants.find(e=>e.id===_)?.name||"Inconnu":"—"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(h.f,{className:"h-4 w-4 text-[#146BFF]"}),(0,t.jsx)("span",{className:"text-[#111111]/70 dark:text-white/70",children:A?e.database.sites.find(e=>e.id===A)?.name||"Inconnu":"—"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(p.f,{className:"h-4 w-4 text-[#146BFF]"}),(0,t.jsx)("span",{className:"font-mono text-[#111111]/70 dark:text-white/70",children:I||"—"})]})]})]})]})}var w=e.i(239616);e.s(["f",0,function({configData:e,hasPendingChanges:s,onClearCookies:a,onContextSwitch:r,onResetPendingChanges:n,pendingContext:i,setPendingContext:l,switchingContext:o}){return(0,t.jsxs)("div",{className:"mb-8 rounded-[24px] border border-[#
25E5E7EB] bg-white p-6 shadow-[0_10px_30px_rgba(0,0,0,0.04)] dark:border-white/10 dark:bg-[#0E0F12]",children:[(0,t.jsxs)("div",{className:"mb-5 flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-[16px] bg-[#146BFF]/10",children:(0,t.jsx)(w.f,{className:"h-5 w-5 text-[#146BFF]"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"font-semibold text-[18px] text-[#111111] dark:text-white",children:"Contexte de développement"}),(0,t.jsx)("p",{className:"text-[13px] text-[#111111]/50 dark:text-white/50",children:"Basculer entre tenants, sites et domaines"})]})]}),(0,t.jsx)(g,{configData:e,hasPendingChanges:s,onClearCookies:a,onContextSwitch:r,onResetPendingChanges:n,pendingContext:i,setPendingContext:l,switchingContext:o})]})}],863431);var k=e.i(63209),v=r;function j({error:e,reset:s}){return(0,t.jsx)("div",{className:"rounded-[24px] border border-red-500/20 bg-red-500/5 p-6 dark:bg-red-500/10",children:(0,t.jsxs)("div",{className:"flex items-start gap-4",children:[(0,t.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-red-500/10 dark:bg-red-500/20",children:(0,t.jsx)(k.f,{className:"h-5 w-5 text-red-600 dark:text-red-400"})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("h3",{className:"mb-1 font-semibold text-[16px] text-red-700 dark:text-red-400",children:"Quelque chose s'est mal passé"}),(0,t.jsx)("p",{className:"mb-4 text-[14px] text-red-600/80 dark:text-red-400/80",children:e.message||"Une erreur inattendue s'est produite"}),(0,t.jsxs)("button",{onClick:s,className:"inline-flex h-9 items-center gap-2 rounded-full border border-red-500/30 bg-white px-4 text-[13px] font-medium text-red-700 transition-all duration-200 hover:bg-red-50 dark:border-red-500/30 dark:bg-red-500/10 dark:text-red-400 dark:hover:bg-red-500/20",children:[(0,t.jsx)(a.f,{className:"h-4 w-4"}),"Réessayer"]})]})]})})}class N extends v.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("ErrorBoundary caught an error:",e,t),this.props.onError&&this.props.onError(e,t)}handleReset=()=>{this.setState({hasError:!1,error:void 0})};render(){if(this.state.hasError&&this.state.error){let e=this.props.fallback||j;return(0,t.jsx)(e,{error:this.state.error,reset:this.handleReset})}return this.props.children}}e.s(["f",0,N],892112);var y=e.i(664659),F=e.i(463059),C=e.i(174886),E=e.i(846696);function B({isCollapsed:e,onToggle:s}){return(0,t.jsx)("button",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full text-[#111111]/50 transition-colors hover:bg-[#111111]/5 hover:text-[#111111] dark:text-white/50 dark:hover:bg-white/5 dark:hover:text-white",onClick:s,children:e?(0,t.jsx)(F.f,{className:"h-4 w-4"}):(0,t.jsx)(y.f,{className:"h-4 w-4"})})}function S({onClick:e,isCopying:a}){return(0,t.jsx)("button",{disabled:a,onClick:e,className:(0,s.f)("inline-flex h-8 items-center gap-1.5 rounded-full border px-3 text-[12px] font-medium transition-all duration-200",a?"border-emerald-500/20 bg-emerald-500/10 text-emerald-600 dark:bg-emerald-500/20 dark:text-emerald-400":"border-[#E5E7EB] bg-white text-[#111111]/60 hover:border-[#146BFF]/30 hover:bg-[#146BFF]/5 hover:text-[#146BFF] dark:border-white/10 dark:bg-white/5 dark:text-white/60 dark:hover:bg-[#146BFF]/10"),children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.f,{className:"h-3 w-3"}),(0,t.jsx)("span",{children:"Copié"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(C.f,{className:"h-3 w-3"}),(0,t.jsx)("span",{children:"Copier"})]})})}function $({jsonString:e,data:a,isCollapsed:r,collapsible:n,maxHeight:i}){return(0,t.jsx)("pre",{className:(0,s.f)("overflow-auto rounded-[16px] border border-[#E5E7EB] bg-[#111111]/[0.02] p-5 font-mono text-[13px] leading-relaxed text-[#111111]/80 transition-all duration-200 dark:border-white/10 dark:bg-white/[0.02] dark:text-white/80",n&&r&&"opacity-60"),style:{minHeight:n&&r?"60px":"150px",maxHeight:n&&r?"60px":i},children:n&&r?(0,t.jsxs)("span",{className:"text-[#111111]/40 italic dark:text-white/40",children:[Object.keys(a||{}).length," propriétés (réduit)"]}):e})}e.s(["f",0,function({data:e,title:s,copyable:a=!0,collapsible:n=!1,maxHeight:i="400px"}){let[l,o]=(0,r.useState)(!1),[d,c]=(0,r.useState)(!1),x=(0,r.useMemo)(()=>{try{return JSON.stringify(e,null,2)}catch{return"Données JSON invalides"}},[e]),h=async()=>
25{if(!d)try{c(!0),await navigator.clipboard.writeText(x),E.toast.success(`${s||"Données JSON"} copi\xe9 dans le presse-papiers`)}catch{E.toast.error("Échec de la copie dans le presse-papiers")}finally{setTimeout(()=>c(!1),1500)}},u=(0,t.jsx)($,{collapsible:n,data:e,isCollapsed:l,jsonString:x,maxHeight:i});return s?(0,t.jsxs)("div",{className:"rounded-[24px] border border-[#E5E7EB] bg-white p-6 shadow-[0_10px_30px_rgba(0,0,0,0.04)] dark:border-white/10 dark:bg-[#0E0F12]",children:[(0,t.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[n&&(0,t.jsx)(B,{isCollapsed:l,onToggle:()=>o(!l)}),(0,t.jsx)("h3",{className:"font-semibold text-[16px] text-[#111111] dark:text-white",children:s})]}),a&&(0,t.jsx)(S,{isCopying:d,onClick:h})]}),u]}):(0,t.jsxs)("div",{className:"relative",children:[a&&(0,t.jsx)("div",{className:"absolute right-3 top-3 z-10",children:(0,t.jsx)(S,{isCopying:d,onClick:h})}),u]})}],522455);let T={ACTIVE:"success",INACTIVE:"neutral",PENDING:"warning",ERROR:"error",DISABLED:"neutral",CONNECTED:"success",DISCONNECTED:"error",hit:"success",miss:"warning",empty:"neutral",true:"success",false:"error",yes:"success",no:"error",Oui:"success",Non:"error",Complète:"success",Incomplète:"warning",Défini:"success","Non défini":"neutral"},_={success:"bg-emerald-500/10 text-emerald-600 border-emerald-500/20 dark:bg-emerald-500/20 dark:text-emerald-400 dark:border-emerald-500/30",warning:"bg-amber-500/10 text-amber-600 border-amber-500/20 dark:bg-amber-500/20 dark:text-amber-400 dark:border-amber-500/30",error:"bg-red-500/10 text-red-600 border-red-500/20 dark:bg-red-500/20 dark:text-red-400 dark:border-red-500/30",info:"bg-[#146BFF]/10 text-[#146BFF] border-[#146BFF]/20 dark:bg-[#146BFF]/20 dark:border-[#146BFF]/30",neutral:"bg-[#111111]/5 text-[#111111]/60 border-[#111111]/10 dark:bg-white/5 dark:text-white/60 dark:border-white/10"};async function A(e){let t="localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname;await Promise.all(e.map(async e=>{let s={"Content-Type":"application/json"};if(t&&(s["x-auth-bypass"]="true"),!(await fetch("/api/session",{method:"POST",headers:s,body:JSON.stringify({action:"set",key:`selected_${e.type}`,value:e.value})})).ok)throw Error(`Failed to switch ${e.type}`)}))}e.s(["f",0,function({status:e,type:a,className:r}){let n,i=a||(n=e.toLowerCase(),T[e]?T[e]:T[n]?T[n]:n.includes("success")||n.includes("active")||n.includes("connected")?"success":n.includes("error")||n.includes("failed")||n.includes("disconnected")?"error":n.includes("warning")||n.includes("pending")||n.includes("incomplete")?"warning":n.includes("info")||n.includes("information")?"info":"neutral"),l=_[i];return(0,t.jsxs)("span",{"aria-label":`Status: ${e}`,className:(0,s.f)("inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-[12px] font-medium transition-colors",l,r),children:[(0,t.jsx)("span",{className:(0,s.f)("h-1.5 w-1.5 rounded-full",{"bg-emerald-500":"success"===i,"bg-amber-500":"warning"===i,"bg-red-500":"error"===i,"bg-[#146BFF]":"info"===i,"bg-[#111111]/40 dark:bg-white/40":"neutral"===i})}),e]})}],455678),e.s([],464718),e.s(["f",0,function(e){let[t,s]=(0,r.useState)(!1),[a,n]=(0,r.useState)(null);return{handleCacheAction:(0,r.useCallback)(async(t,a)=>{try{s(!0),n(null);let r=await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:t,cacheType:a})});if(!r.ok)throw Error(`HTTP ${r.status}: ${r.statusText}`);let i=await r.json();E.toast.success(i.message||`${t} ${a} cache successful`),await e()}catch(t){let e=t instanceof Error?t.message:"Cache action failed";console.error("Cache action failed:",t),n(e),E.toast.error(e)}finally{s(!1)}},[e]),loading:t,error:a}}],648950),e.s(["f",0,function(){let[e,t]=(0,r.useState)(null),[s,a]=(0,r.useState)(!0),[n,i]=(0,r.useState)(null),l=(0,r.useCallback)(e=>{console.error("Failed to fetch config data:",e),i(e instanceof Error?e.message:"Failed to fetch config data")},[]),o=(0,r.useCallback)(async()=>{try{a(!0),i(null);let e=await fetch("/api/config",{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok){let t=await e.json();throw Error(t.details||`HTTP ${e.status}: ${e.statusText}`)}let s=await e.json();t(s)}catch(e){l(e)}finally{a(!1)}},[l]),d=(0,r.useCallback)(async()=>{await o()},[o]);return(0,r.useEffect)(()=>{o()},[o]),{configData:e,loading:s,error:n,refetch:d}}],966606),e.s(["f",0,function(e,t){let[s,a]=(0,r.useState)({tenant:"none",site:"none",host:"none"}),[n,i]=(0,r.useState)(!1);(0,r.useEffect)(()=>{e&&a({tenant:e.session.cookies.selectedTenant||"none",site:e.session.cookies.selectedSite||"none",host:e.session.cookies.selectedHost||"none"})},[e]);let l=!!e&&(s.tenant!==(e.session.cookies.selectedTenant||"none")||s.site!==(e.session.cookies.selectedSite||"none")||s.host!==(e.session.cookies.selectedHost||"none")),o=(0,r.useCallback)(async()=>
25{if(e)try{let a;i(!0);let r=(a=[],s.tenant!==(e.session.cookies.selectedTenant||"none")&&a.push({type:"tenant",value:"none"===s.tenant?null:s.tenant}),s.site!==(e.session.cookies.selectedSite||"none")&&a.push({type:"site",value:"none"===s.site?null:s.site}),s.host!==(e.session.cookies.selectedHost||"none")&&a.push({type:"host",value:"none"===s.host?null:s.host}),a);await A(r),E.toast.success("Context switched successfully"),await t(),setTimeout(()=>{window.location.reload()},500)}catch(e){console.error("Failed to switch context:",e),E.toast.error(e instanceof Error?e.message:"Failed to switch context"),i(!1)}},[s,e,t]),d=(0,r.useCallback)(()=>{e&&a({tenant:e.session.cookies.selectedTenant||"none",site:e.session.cookies.selectedSite||"none",host:e.session.cookies.selectedHost||"none"})},[e]);return{pendingContext:s,setPendingContext:a,hasPendingChanges:l,switchingContext:n,handleContextSwitch:o,handleResetPendingChanges:d,handleClearCookies:(0,r.useCallback)(async()=>{if(e)try{i(!0);let e="localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname,s={"Content-Type":"application/json"};e&&(s["x-auth-bypass"]="true"),await Promise.all([fetch("/api/session",{method:"POST",headers:s,body:JSON.stringify({action:"delete",key:"selected_tenant"})}),fetch("/api/session",{method:"POST",headers:s,body:JSON.stringify({action:"delete",key:"selected_site"})}),fetch("/api/session",{method:"POST",headers:s,body:JSON.stringify({action:"delete",key:"selected_host"})})]),E.toast.success("Cookies cleared successfully"),await t(),setTimeout(()=>{window.location.reload()},500)}catch(e){console.error("Failed to clear cookies:",e),E.toast.error(e instanceof Error?e.message:"Failed to clear cookies"),i(!1)}},[e,t])}}],540656),e.s([],744596)},118366,e=>{"use strict";var t=e.i(991124);e.s(["f",()=>t.default])},164243,e=>{"use strict";var t=e.i(843476),s=e.i(770352),a=e.i(643531),r=e.i(664659),n=e.i(555436),i=e.i(271645),l=e.i(632137),o=e.i(677607),d=e.i(171056);function c({options:e,value:x,onValueChange:h,placeholder:u="Select option...",searchPlaceholder:m="Search...",emptyMessage:p="No option found.",disabled:f=!1,className:b,triggerClassName:g,contentClassName:w,children:k,query:v,onQueryChange:j}){let[N,y]=i.useState(!1),[F,C]=i.useState(""),E=void 0!==v?v:F,B=j||C,S=void 0!==k,$=e?.find(e=>e.value===x),T=i.useMemo(()=>e?E?e.filter(e=>{let t=E.toLowerCase();return e.label.toLowerCase().includes(t)||e.group&&e.group.toLowerCase().includes(t)}):e:[],[e,E]),_=i.useMemo(()=>{if(!T.some(e=>e.group))return null;let e=new Map;for(let t of T){let s=t.group||"";e.has(s)||e.set(s,[]),e.get(s).push(t)}return e},[T]),A=i.useCallback((e,s)=>{if(!s.trim())return e;let a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=RegExp(`(${a})`,"gi");return e.split(r).map((e,a)=>e.toLowerCase()===s.toLowerCase()&&e.length>0?(0,t.jsx)("mark",{className:"bg-[#146BFF]/20 text-[#146BFF] font-medium px-0.5 rounded",children:e},a):(0,t.jsx)("span",{children:e},a))},[]),I=e=>{h?.(e===x?"":e),y(!1),void 0===v&&B("")};return S?(0,t.jsx)("div",{className:(0,l.f)("relative",b),children:(0,t.jsxs)(s.f,{className:"overflow-hidden rounded-xl border border-[#E5E7EB] bg-white dark:border-white/10 dark:bg-[#1a1a1f]",children:[(0,t.jsxs)("div",{className:"flex items-center border-b border-[#E5E7EB] px-3 dark:border-white/10",children:[(0,t.jsx)(n.f,{className:"mr-2 h-4 w-4 shrink-0 text-[#111111]/40 dark:text-white/40"}),(0,t.jsx)("input",{className:"flex h-10 w-full rounded-md bg-transparent py-3 text-[14px] text-[#111111] outline-none placeholder:text-[#111111]/40 disabled:cursor-not-allowed disabled:opacity-50 dark:text-white dark:placeholder:text-white/40",onChange:e=>B(e.target.value),placeholder:m,value:E})]}),(0,t.jsx)("div",{className:"max-h-64 overflow-auto",children:0===i.Children.count(k)?(0,t.jsx)("div",{className:"py-6 text-center text-[13px] text-[#111111]/50 dark:text-white/50",children:p}):(0,t.jsx)("div",{className:"p-1.5",children:k})})]})}):(0,t.jsx)("div",{className:(0,l.f)("relative",b),children:(0,t.jsxs)(d.V,{onOpenChange:y,open:N,children:[(0,t.jsx)(d.J,{asChild:!0,children:(0,t.jsxs)(o.K,{"aria-expanded":N,className:(0,l.f)("w-full justify-between text-left font-normal border-[#
25E5E7EB] bg-white hover:bg-[#111111]/[0.02] dark:border-white/10 dark:bg-white/5 dark:hover:bg-white/10",!$&&"text-[#111111]/50 dark:text-white/50",$&&"text-[#111111] dark:text-white",N&&"ring-2 ring-[#146BFF]/20 border-[#146BFF]/50",g),disabled:f,role:"combobox",variant:"outline",children:[(0,t.jsx)("span",{className:"truncate text-[13px]",children:$?$.label:u}),(0,t.jsx)(r.f,{className:(0,l.f)("ml-2 h-4 w-4 shrink-0 text-[#111111]/40 transition-transform duration-200 dark:text-white/40",N&&"rotate-180")})]})}),(0,t.jsx)(d.T,{align:"start",className:(0,l.f)("min-w-[200px] p-0 border-[#E5E7EB] bg-white shadow-[0_10px_40px_rgba(0,0,0,0.12)] dark:border-white/10 dark:bg-[#1a1a1f] dark:shadow-[0_10px_40px_rgba(0,0,0,0.4)]",w),sideOffset:4,style:{width:"var(--radix-popover-trigger-width)",minWidth:"200px"},children:(0,t.jsxs)(s.f,{className:"overflow-hidden rounded-lg",children:[(0,t.jsxs)("div",{className:"flex items-center border-b border-[#E5E7EB] px-3 dark:border-white/10",children:[(0,t.jsx)(n.f,{className:"mr-2 h-4 w-4 shrink-0 text-[#111111]/40 dark:text-white/40"}),(0,t.jsx)("input",{className:"flex h-10 w-full rounded-md bg-transparent py-3 text-[13px] text-[#111111] outline-none placeholder:text-[#111111]/40 disabled:cursor-not-allowed disabled:opacity-50 dark:text-white dark:placeholder:text-white/40",onChange:e=>B(e.target.value),placeholder:m,value:E})]}),(0,t.jsx)("div",{className:"max-h-72 overflow-auto",children:0===T.length?(0,t.jsx)("div",{className:"py-6 text-center text-[13px] text-[#111111]/50 dark:text-white/50",children:p}):_?(0,t.jsx)("div",{className:"py-1",children:Array.from(_.entries()).map(([e,s],r)=>(0,t.jsxs)("div",{children:[e&&(0,t.jsx)("div",{className:"sticky top-0 z-10 bg-white/95 px-3 pb-1 pt-2.5 text-[11px] font-semibold uppercase tracking-wider text-[#111111]/40 backdrop-blur-sm first:pt-1.5 dark:bg-[#1a1a1f]/95 dark:text-white/40",children:E?A(e,E):e}),(0,t.jsx)("div",{className:"px-1.5 pb-1",children:s.map((e,s)=>(0,t.jsxs)("div",{className:(0,l.f)("relative flex cursor-pointer select-none items-center rounded-lg px-3 py-2 text-[13px] outline-none transition-colors duration-100",e.disabled&&"pointer-events-none opacity-50",x===e.value?"bg-[#146BFF]/10 text-[#146BFF]":"text-[#111111] hover:bg-[#111111]/[0.04] dark:text-white dark:hover:bg-white/[0.06]"),onClick:()=>!e.disabled&&I(e.value),children:[(0,t.jsx)("div",{className:(0,l.f)("mr-2.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full transition-colors",x===e.value?"bg-[#146BFF] text-white":"border border-[#E5E7EB] dark:border-white/20"),children:x===e.value&&(0,t.jsx)(a.f,{className:"h-2.5 w-2.5",strokeWidth:3})}),(0,t.jsx)("span",{className:"whitespace-pre-line",children:E?A(e.label,E):e.label})]},`${e.value}-${s}`))})]},e||r))}):(0,t.jsx)("div",{className:"p-1.5",children:T.map((e,s)=>(0,t.jsxs)("div",{className:(0,l.f)("relative flex cursor-pointer select-none items-center rounded-lg px-3 py-2 text-[13px] outline-none transition-colors duration-100",e.disabled&&"pointer-events-none opacity-50",x===e.value?"bg-[#146BFF]/10 text-[#146BFF]":"text-[#111111] hover:bg-[#111111]/[0.04] dark:text-white dark:hover:bg-white/[0.06]"),onClick:()=>!e.disabled&&I(e.value),children:[(0,t.jsx)("div",{className:(0,l.f)("mr-2.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full transition-colors",x===e.value?"bg-[#146BFF] text-white":"border border-[#E5E7EB] dark:border-white/20"),children:x===e.value&&(0,t.jsx)(a.f,{className:"h-2.5 w-2.5",strokeWidth:3})}),(0,t.jsx)("span",{className:"whitespace-pre-line",children:E?A(e.label,E):e.label})]},`${e.value}-${s}`))})})]})})]})})}let x=i.forwardRef(({children:e,onSelect:s,className:a,disabled:r,...n},i)=>(0,t.jsx)("div",{className:(0,l.f)("relative flex cursor-pointer select-none items-center rounded-lg px-3 py-2 text-[13px] text-[#111111] outline-none transition-colors duration-100 hover:bg-[#111111]/[0.04] dark:text-white dark:hover:bg-white/[0.06]",r&&"pointer-events-none opacity-50",a),onClick:()=>!r&&s?.(),ref:i,...n,children:e}));x.displayName="ComboboxItem",c.Item=x,e.s(["f",0,c])}]);

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.