PageSourceSearch

https://www.freelancerllm.com/assets/SettingsPage-Bby734-o.js

js freelancerllm.com collected 2026-10-02 01:30:02 UTC 44,960 bytes, 728 lines download raw bytes

1import{r as a,j as e}from"./react-CHTGUyAX.js";import{a as x,u as me}from"./index-COIxwMRP.js";import{i as he,n as xe}from"./extensionConnect-CCtv1X-2.js";import{i as fe}from"./isDevEnvironment-DbjHDiIg.js";import{L as be}from"./router-D1a9Ug87.js";import{V as ye}from"./VisilyPageHeader-CPWTaaQe.js";function je(t={}){const s=t.skills||[],c=t.niches||[],p=String(t.icpSummary||"").trim(),m=t.excludeRoles||[];return!!(s.length||c.length||p||m.length||t.minBudget!=null||t.requirePaymentVerified||t.maxProposals!=null||t.maxPostedHours!=null)}function ke({variant:t="settings"}){const s=t==="setup",[c,p]=a.useState(!0),[m,b]=a.useState(""),[u,g]=a.useState(""),[l,y]=a.useState(""),[k,T]=a.useState(""),[v,z]=a.useState("20"),[w,n]=a.useState("72"),[B,R]=a.useState(!1),[I,L]=a.useState(""),[P,j]=a.useState(""),[N,E]=a.useState(!1),[S,A]=a.useState(""),[o,C]=a.useState(!1),[h,O]=a.useState(!0),V=a.useCallback(r=>{b((r.skills||[]).join(", ")),g((r.niches||[]).join(", ")),y(r.icpSummary||""),T(r.minBudget!=null?String(r.minBudget):""),z(r.maxProposals!=null?String(r.maxProposals):"20"),n(r.maxPostedHours!=null?String(r.maxPostedHours):"72"),R(!!r.requirePaymentVerified),L((r.excludeRoles||[]).join(`
2`));const F=Array.isArray(r.toneSamples)?r.toneSamples:[];j(F.join(`
3
4---
5
6`));const q=je(r);C(q),O(!q)},[]),H=a.useCallback(async()=>{p(!0),A("");const r=await x("/api/agent/icp");if(r.ok){const F=await r.json();V(F.icp||{})}p(!1)},[V]);a.useEffect(()=>{H()},[H]),a.useEffect(()=>{var F;if(c)return;const r=window.location.hash;(r==="#job-hunt-profile"||r==="#agent-icp")&&((F=document.getElementById("job-hunt-profile"))==null||F.scrollIntoView({behavior:"smooth",block:"start"}))},[c]);async function G(r){r.preventDefault(),E(!0),A("");const F=m.split(/[,;\n]+/).map(M=>M.trim()).filter(Boolean),q=u.split(/[,;\n]+/).map(M=>M.trim()).filter(Boolean),J=await x("/api/agent/icp",{method:"PUT",body:{platforms:["upwork"],skills:F,niches:q,icpSummary:l,minBudget:k===""?null:Number(k),currency:"USD",proposalTone:"premium_expert",maxProposals:v===""?null:Number(v),maxPostedHours:w===""?null:Number(w),requirePaymentVerified:B,excludeRoles:I.split(/[\n,]+/).map(M=>M.trim()).filter(Boolean),autoRunEnabled:!1,toneSamples:P}});if(E(!1),J.ok){let M="";he()&&(M=(await xe()).ok?" Extension updated with your new ICP.":" Could not reach the extension — reload it on chrome://extensions, then start the agent."),C(!0),O(!1),A("Job hunt profile saved. Open the extension and click Start agent when you want to scan your feed."+M)}else{const M=await J.json().catch(()=>({}));A(M.message||"Could not save ICP.")}}function $(){A(""),H().then(()=>O(!1))}const _=e.jsxs("div",{className:s?"ccs-icp-intro-wrap":"agent-icp-intro-wrap",children:[e.jsx("p",{className:s?"settings-section-lead ccs-icp-intro":"settings-section-lead agent-icp-intro",children:s?e.jsx(e.Fragment,{children:"Step 1 — tell the agent what work you want: skills, niches, and a short summary. Required before scanning and AI fit scoring work."}):e.jsxs(e.Fragment,{children:["Step 1 — ",e.jsx("strong",{children:"what to hunt"})," on Upwork: your skills, niches, and feed filters. The extension uses this to scan, score jobs (fit %), and sync to Job Intelligence."]})}),s?null:e.jsxs("p",{className:"agent-icp-alerts-callout",role:"note",children:[e.jsx("span",{className:"agent-icp-alerts-callout-label",children:"Next:"})," ",e.jsx("strong",{children:"Set your alert thresholds"})," in"," ",e.jsx("a",{href:"#alerts-apply",className:"agent-icp-alerts-callout-link",children:"Alerts & apply (Step 2)"})," ","below — choose fit % and Telegram so high-match jobs reach your phone."]})]}),Q=e.jsxs("div",{className:"agent-icp-saved",children:[e.jsxs("div",{className:"agent-icp-saved-head",children:[e.jsx("span",{className:"agent-icp-saved-badge","aria-label":"Job hunt profile saved",children:"✓ Job hunt profile saved"}),e.jsx("button",{type:"button",className:"agent-icp-edit-btn",onClick:()=>{A(""),O(!0)},children:"Edit"})]}),e.jsxs("dl",{className:"agent-icp-saved-dl",children:[m&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:"Skills"}),e.jsx("dd",{children:m})]}),u&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:"Niches"}),e.jsx("dd",{children:u})]}),l&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:"Profile summary"}),e.jsx("dd",{children:l})]}),k&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:"Min budget"}),e.jsxs("dd",{children:["$",k," USD"]})]}),e.jsx("dt",{children:"Max proposals"}),e.jsx("dd",{children:v||"—"}),e.jsx("dt",{children:"Max age"}),e.jsx("dd",{children:w?`${w} hours`:"—"}),e.jsx("dt",{children:"Payment verified"}),e.jsx("dd",{children:B?"Required":"Not required"}),I.trim()&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:"Excluded roles"}),e.jsx("dd",{children:I.split(`
7`).filter(Boolean).join(", ")})]}),!s&&P.trim()&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:"Proposal samples"}),e.jsx("dd",{children:P.length>120?`${P.slice(0,117)}…`:P})]})]}),S&&e.jsx("p",{className:S.toLowerCase().includes("saved")?"agent-icp-ok":"agent-icp-err",role:"status",children:S})]}),Y=c?e.jsx("p",{className:"agent-icp-muted",children:"Loading your job hunt profile…"}):!h&&o?Q:e.jsxs("form",{onSubmit:G,className:s?"ccs-icp-form":"agent-icp-form",children:[e.jsxs("label",{className:s?"ccs-field":"agent-icp-field",children:[e.jsx("span",{children:"Skills (comma-separated)"}),e.jsx("input",{type:"text",value:m,onChange:r=>b(r.target.value),placeholder:"React, Node, technical writing"})]}),e.jsxs("label",{className:s?"ccs-field":"agent-icp-field",children:[e.jsx("span",{children:"Niches (comma-separated)"}),e.jsx("input",{type:"text",value:u,onChange:r=>g(r.target.value),placeholder:"SaaS, healthcare, AI automation"})]}),e.jsxs("label",{className:s?"ccs-field":"agent-icp-field",children:[e.jsx("span",{children:"Profile summary (ideal client & projects)"}),e.jsx("textarea",{rows:4,value:l,onChange:r=>y(r.target.value),placeholder:"Ideal client, project size, geography, red lines…"})]}),e.jsxs("label",{className:s?"ccs-field":"agent-icp-field",children:[e.jsx("span",{children:"Minimum budget (optional, USD)"}),e.jsx("input",{type:"number",min:0,value:k,onChange:r=>T(r.target.value),placeholder:"e.g. 500"})]}),e.jsx("h4",{className:"agent-icp-subhead",children:"Feed filters (before AI scoring)"}),e.jsxs("label",{className:s?"ccs-field":"agent-icp-field",children:[e.jsx("span",{children:"Max proposals on listing"}),e.jsx("input",{type:"number",min:0,value:v,onChange:r=>z(r.target.value),placeholder:"20"})]}),e.jsxs("label",{className:s?"ccs-field":"agent-icp-field",children:[e.jsx("span",{children:"Max age (hours since posted)"}),e.jsx("input",{type:"number",min:1,value:w,onChange:r=>n(r.target.value),placeholder:"72"})]}),e.jsxs("label",{className:s?"ccs-field ccs-check":"agent-icp-field agent-icp-check",children:[e.jsx("input",{type:"checkbox",checked:B,onChange:r=>R(r.target.checked)}),e.jsx("span",{children:"Skip jobs where payment is explicitly not verified"})]}),e.jsxs("label",{className:s?"ccs-field":"agent-icp-field",children:[e.jsx("span",{children:"Exclude roles (one per line)"}),e.jsx("textarea",{rows:2,value:I,onChange:r=>L(r.target.value),placeholder:`virtual assistant
8data entry`})]}),!s&&e.jsxs("label",{className:"agent-icp-field",children:[e.jsx("span",{children:"Winning proposal samples (optional, for Humanize / tone sync)"}),e.jsx("textarea",{rows:6,value:P,onChange:r=>j(r.target.value),placeholder:`Paste proposals that worked…
9
10---
11
12Another sample…`})]}),e.jsxs("div",{className:"agent-icp-actions",children:[o&&e.jsx("button",{type:"button",className:"agent-icp-cancel-btn",onClick:$,disabled:N,children:"Cancel"}),e.jsx("button",{type:"submit",className:"agent-icp-save-btn",disabled:N,children:N?"Saving…":o?"Save changes":"Save job hunt profile"})]}),S&&h&&e.jsx("p",{className:S.toLowerCase().includes("saved")?"agent-icp-ok":"agent-icp-err",role:"status",children:S})]});return s?e.jsxs("section",{className:"settings-section ccs-card-icp",id:"job-hunt-profile",children:[e.jsxs("header",{className:"settings-section-header",children:[e.jsxs("h2",{className:"settings-section-title",children:["Job hunt profile ",e.jsx("span",{className:"settings-step-pill",children:"Step 1"})]}),_]}),Y,e.jsxs("style",{children:[ve,ne,se]})]}):e.jsxs("div",{className:"settings-section agent-icp-section",id:"job-hunt-profile",children:[e.jsxs("header",{className:"settings-section-header",children:[e.jsxs("h2",{className:"settings-section-title",children:["Job hunt profile ",e.jsx("span",{className:"settings-step-pill",children:"Step 1"})]}),_]}),Y,e.jsxs("style",{children:[we,ne,se]})]})}const ve=`
13  .ccs-card-icp { grid-column: 1 / -1; }
14  .ccs-icp-form { display: grid; gap: 12px; }
15  .ccs-field { display: grid; gap: 6px; }
16  .ccs-field > span { font-size: 13px; font-weight: 600; color: #0f172a; }
17  .ccs-field input:not([type="checkbox"]),
18  .ccs-field textarea {
19    width: 100%;
20    padding: 12px 14px;
21    border: 1px solid #e2e8f0;
22    border-radius: 8px;
23    font-size: 14px;
24    font-family: inherit;
25  }
26  .ccs-field.ccs-check {
27    display: flex;
28    flex-direction: row;
29    align-items: flex-start;
30    gap: 10px;
31    padding: 12px 14px;
32    background: #f8fafc;
33    border-radius: 8px;
34    border: 1px solid #e2e8f0;
35    cursor: pointer;
36  }
37  .ccs-field.ccs-check input[type="checkbox"] {
38    width: 18px;
39    height: 18px;
40    margin: 2px 0 0;
41    flex-shrink: 0;
42    accent-color: var(--app-ink, #151515);
43    cursor: pointer;
44  }
45  .ccs-field.ccs-check > span {
46    font-size: 14px;
47    font-weight: 500;
48    line-height: 1.45;
49    color: #0f172a;
50  }
51`,we=`
52  .agent-icp-intro-wrap {
53    display: flex;
54    flex-direction: column;
55    gap: 12px;
56    margin-bottom: 4px;
57  }
58  .agent-icp-intro {
59    color: var(--muted);
60    font-size: 0.9rem;
61    line-height: 1.55;
62    margin: 0;
63  }
64  .agent-icp-alerts-callout {
65    margin: 0;
66    padding: 12px 14px;
67    border-radius: 10px;
68    border: 2px solid var(--brand, #f15a24);
69    background: rgba(241, 90, 36, 0.08);
70    color: var(--app-ink, #151515);
71    font-size: 0.9375rem;
72    line-height: 1.5;
73  }
74  .agent-icp-alerts-callout-label {
75    display: inline-block;
76    font-size: 0.72rem;
77    font-weight: 800;
78    letter-spacing: 0.06em;
79    text-transform: uppercase;
80    color: var(--brand, #f15a24);
81    margin-right: 4px;
82  }
83  .agent-icp-alerts-callout-link {
84    color: var(--brand, #f15a24);
85    font-weight: 800;
86    text-decoration: underline;
87    text-underline-offset: 3px;
88  }
89  .agent-icp-alerts-callout-link:hover {
90    color: #b9472a;
91  }
92  .agent-icp-muted {
93    color: var(--muted);
94    margin: 0;
95  }
96  .agent-icp-form {
97    display: grid;
98    gap: 0;
99  }
100  .agent-icp-field {
101    display: flex;
102    flex-direction: column;
103    gap: 6px;
104    margin-bottom: 16px;
105  }
106  .agent-icp-field > span {
107    font-size: 0.8125rem;
108    color: var(--muted);
109    font-weight: 500;
110  }
111  .agent-icp-field input:not([type="checkbox"]),
112  .agent-icp-field textarea {
113    padding: 10px 12px;
114    border-radius: 8px;
115    border: 1px solid var(--border);
116    background: var(--bg);
117    color: var(--text);
118    font: inherit;
119    font-size: 0.875rem;
120    transition: border-color 120ms ease, box-shadow 120ms ease;
121  }
122  .agent-icp-field input:not([type="checkbox"]):focus,
123  .agent-icp-field textarea:focus {
124    outline: none;
125    border-color: var(--app-ink, #151515);
126    box-shadow: 0 0 0 3px rgba(21, 21, 21, 0.1);
127  }
128  .agent-icp-field textarea {
129    resize: vertical;
130    min-height: 72px;
131  }
132  .agent-icp-field.agent-icp-check {
133    flex-direction: row;
134    align-items: flex-start;
135    gap: 10px;
136    padding: 12px 14px;
137    margin-bottom: 16px;
138    background: rgba(255, 255, 255, 0.03);
139    border: 1px solid var(--border);
140    border-radius: 8px;
141    cursor: pointer;
142  }
143  .agent-icp-field.agent-icp-check input[type="checkbox"] {
144    width: 18px;
145    height: 18px;
146    min-width: 18px;
147    margin: 2px 0 0;
148    padding: 0;
149    flex-shrink: 0;
150    accent-color: var(--app-ink, #151515);
151    cursor: pointer;
152  }
153  .agent-icp-field.agent-icp-check > span {
154    color: var(--text);
155    font-size: 0.875rem;
156    line-height: 1.45;
157  }
158  .agent-icp-subhead {
159    margin: 8px 0 12px;
160    font-size: 0.95rem;
161  }
162  .agent-icp-ok {
163    color: var(--app-ink, #151515);
164    font-size: 0.875rem;
165    font-weight: 600;
166    margin: 12px 0 0;
167  }
168  .agent-icp-err {
169    color: #f87171;
170    font-size: 0.875rem;
171    margin: 12px 0 0;
172  }
173`,ne=`
174  .agent-icp-actions {
175    display: flex;
176    flex-direction: row;
177    flex-wrap: nowrap;
178    gap: 12px;
179    align-items: stretch;
180    margin-top: 8px;
181  }
182  .agent-icp-actions .agent-icp-cancel-btn,
183  .agent-icp-actions .agent-icp-save-btn {
184    flex: 1 1 0;
185    min-width: 0;
186    min-height: 44px;
187    display: inline-flex;
188    align-items: center;
189    justify-content: center;
190    padding: 10px 18px;
191    border-radius: 8px;
192    font-weight: 600;
193    font-size: 0.9375rem;
194    font-family: inherit;
195    cursor: pointer;
196    box-sizing: border-box;
197  }
198  .agent-icp-save-btn {
199    border: 1px solid var(--app-ink, #151515);
200    background: var(--app-ink, #151515);
201    color: #fff;
202    transition: background-color 150ms ease, border-color 150ms ease;
203  }
204  .agent-icp-save-btn:hover:not(:disabled) {
205    background: var(--brand, #f15a24);
206    border-color: var(--brand, #f15a24);
207  }
208  .agent-icp-save-btn:disabled {
209    opacity: 0.4;
210    cursor: not-allowed;
211  }
212  .agent-icp-cancel-btn {
213    border: 1px solid var(--app-border, rgba(21, 21, 21, 0.08));
214    background: #fff;
215    color: var(--app-ink, #151515);
216    transition: border-color 150ms ease, color 150ms ease;
217  }
218  .agent-icp-cancel-btn:hover:not(:disabled) {
219    border-color: var(--brand, #f15a24);
220    color: var(--brand, #f15a24);
221  }
222  .agent-icp-cancel-btn:disabled {
223    opacity: 0.6;
224    cursor: not-allowed;
225  }
226`,se=`
227  .agent-icp-saved {
228    border: 1px solid var(--app-border, rgba(21, 21, 21, 0.08));
229    border-radius: 10px;
230    padding: 16px 18px;
231    background: rgba(21, 21, 21, 0.03);
232  }
233  .agent-icp-saved-head {
234    display: flex;
235    align-items: center;
236    justify-content: space-between;
237    gap: 12px;
238    margin-bottom: 14px;
239  }
240  .agent-icp-saved-badge {
241    display: inline-flex;
242    align-items: center;
243    gap: 6px;
244    padding: 6px 12px;
245    border-radius: 999px;
246    background: var(--app-ink, #151515);
247    color: #fff;
248    font-size: 0.8125rem;
249    font-weight: 700;
250  }
251  .agent-icp-edit-btn {
252    padding: 8px 16px;
253    border-radius: 8px;
254    border: 1px solid var(--app-border, rgba(21, 21, 21, 0.08));
255    background: #fff;
256    color: var(--app-ink, #151515);
257    font-weight: 600;
258    font-size: 0.875rem;
259    cursor: pointer;
260    transition: border-color 150ms ease, color 150ms ease;
261  }
262  .agent-icp-edit-btn:hover {
263    border-color: var(--brand, #f15a24);
264    color: var(--brand, #f15a24);
265  }
266  .agent-icp-saved-dl {
267    margin: 0;
268    display: grid;
269    grid-template-columns: minmax(120px, 140px) 1fr;
270    gap: 8px 16px;
271    font-size: 0.875rem;
272  }
273  .agent-icp-saved-dl dt {
274    margin: 0;
275    color: var(--muted, #64748b);
276    font-weight: 500;
277  }
278  .agent-icp-saved-dl dd {
279    margin: 0;
280    color: var(--text, #0f172a);
281    line-height: 1.45;
282  }
283`;function Ne(){const t=fe(),[s,c]=a.useState(!0),[p,m]=a.useState(!1),[b,u]=a.useState(""),[g,l]=a.useState(""),[y,k]=a.useState(!1),[T,v]=a.useState(3600),[z,w]=a.useState(75),[n,B]=a.useState(5),[R,I]=a.useState(!1),[L,P]=a.useState(!0),[j,N]=a.useState(["upwork"]),E=a.useCallback(async()=>{c(!0),l("");try{const o=await x("/api/autonomous/settings");if(!o.ok)throw new Error("Failed to load");const h=(await o.json()).settings||{};k(!!h.enabled),v(Number(h.intervalSec??3600)),w(Number(h.minFitScore??75)),B(Number(h.maxJobsPerRun??5)),I(!!h.allowAllPlans),P(!!(h.dryRun??!0)),N(Array.isArray(h.platforms)&&h.platforms.length?h.platforms:["upwork"])}catch(o){console.error(o),l("Could not load autonomous agent settings.")}finally{c(!1)}},[]);a.useEffect(()=>{E()},[E]);async function S(o){o.preventDefault(),m(!0),l(""),u("");try{const C=await x("/api/autonomous/settings",{method:"PATCH",body:{enabled:y,intervalSec:T,minFitScore:z,maxJobsPerRun:n,allowAllPlans:t?R:!1,dryRun:L,platforms:j}});if(!C.ok){const h=await C.json().catch(()=>({}));throw new Error(h.message||"Save failed")}u("Autonomous agent settings saved.")}catch(C){l(C.message||"Could not save settings.")}finally{m(!1)}}async function A(){u(""),l("");try{if(!(await x("/api/autonomous/run-once",{method:"POST"})).ok)throw new Error("Run failed");u("Pipeline triggered — check the pipeline page for results.")}catch(o){l(o.message||"Could not trigger pipeline.")}}return s?e.jsxs("section",{className:"settings-section",id:"autonomous-agent",children:[e.jsxs("header",{className:"settings-section-header",children:[e.jsxs("h2",{className:"settings-section-title",children:["Auto Agent ",e.jsx("span",{className:"settings-step-pill",children:"Auto"})]}),e.jsx("p",{className:"settings-section-lead",children:"Loading…"})]}),e.jsx("style",{children:re})]}):e.jsxs("section",{className:"settings-section",id:"autonomous-agent",children:[e.jsxs("header",{className:"settings-section-header",children:[e.jsxs("h2",{className:"settings-section-title",children:["Auto Agent ",e.jsx("span",{className:"settings-step-pill",children:"Auto"})]}),e.jsxs("p",{className:"settings-section-lead",children:["Background job hunter: scans your feed, scores with AI, and queues high-fit jobs for review.",t&&e.jsx("span",{className:"aa-dev-badge",children:"Dev: all settings unlocked"})]})]}),e.jsxs("form",{onSubmit:S,className:"aa-form",children:[e.jsxs("div",{className:"aa-grid",children:[e.jsxs("label",{className:"aa-field aa-toggle",children:[e.jsx("input",{type:"checkbox",checked:y,onChange:o=>k(o.target.checked)}),e.jsx("span",{children:"Enable autonomous scanning"})]}),e.jsxs("label",{className:"aa-field",children:[e.jsx("span",{children:"Scan interval (seconds)"}),e.jsx("input",{type:"number",min:60,max:86400,value:T,onChange:o=>v(Math.max(60,Number(o.target.value)||3600)),className:"aa-input"}),e.jsx("span",{className:"aa-hint",children:"How often to run the pipeline (min 60s, default 3600s = 1 hour)"})]}),e.jsxs("label",{className:"aa-field",children:[e.jsx("span",{children:"Minimum fit score to queue"}),e.jsx("input",{type:"number",min:50,max:95,value:z,onChange:o=>w(Math.min(95,Math.max(50,Number(o.target.value)||75))),className:"aa-input"}),e.jsx("span",{className:"aa-hint",children:"Only jobs at or above this AI fit % are queued (50–95)"})]}),e.jsxs("label",{className:"aa-field",children:[e.jsx("span",{children:"Max jobs per run"}),e.jsx("input",{type:"number",min:1,max:20,value:n,onChange:o=>B(Math.min(20,Math.max(1,Number(o.target.value)||5))),className:"aa-input"}),e.jsx("span",{className:"aa-hint",children:"Limit new items added to your desk each scan"})]}),t&&e.jsxs("label",{className:"aa-field aa-toggle",children:[e.jsx("input",{type:"checkbox",checked:R,onChange:o=>I(o.target.checked)}),e.jsx("span",{children:"Allow on all plans (dev only)"})]}),e.jsxs("label",{className:"aa-field aa-toggle",children:[e.jsx("input",{type:"checkbox",checked:L,onChange:o=>P(o.target.checked)}),e.jsx("span",{children:"Dry run (queue only, no auto-apply)"})]}),e.jsxs("label",{className:"aa-field",children:[e.jsx("span",{children:"Platforms"}),e.jsx("div",{className:"aa-platforms",children:e.jsxs("label",{className:"aa-platform",children:[e.jsx("input",{type:"checkbox",checked:j.includes("upwork"),onChange:o=>N(o.target.checked?[...j,"upwork"]:j.filter(C=>C!=="upwork"))}),"Upwork"]})}),e.jsx("span",{className:"aa-hint",children:"More platforms coming soon"})]})]}),e.jsxs("div",{className:"aa-actions",children:[e.jsx("button",{type:"button",className:"aa-btn aa-btn-outline",onClick:A,disabled:p||!y,children:"Run pipeline once"}),e.jsx("button",{type:"submit",className:"aa-btn aa-btn-primary",disabled:p,children:p?"Saving…":"Save Auto Agent settings"})]}),b&&e.jsx("p",{className:"aa-msg aa-ok",children:b}),g&&e.jsx("p",{className:"aa-msg aa-err",children:g})]}),e.jsx("style",{children:re})]})}const re=`
284  .aa-dev-badge {
285    display: inline-block;
286    margin-left: 10px;
287    padding: 2px 8px;
288    border-radius: 999px;
289    font-size: 0.65rem;
290    font-weight: 700;
291    text-transform: uppercase;
292    letter-spacing: 0.04em;
293    background: #fef3c7;
294    color: #92400e;
295    border: 1px solid #fde68a;
296  }
297  .aa-form {
298    display: grid;
299    gap: 16px;
300  }
301  .aa-grid {
302    display: grid;
303    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
304    gap: 16px;
305  }
306  .aa-field {
307    display: flex;
308    flex-direction: column;
309    gap: 6px;
310    font-size: 0.8125rem;
311    font-weight: 500;
312    color: var(--muted, #64748b);
313  }
314  .aa-field > span:first-child {
315    color: var(--ink, #151515);
316  }
317  .aa-toggle {
318    flex-direction: row;
319    align-items: center;
320    gap: 10px;
321    padding: 12px 14px;
322    background: rgba(21, 21, 21, 0.03);
323    border: 1px solid var(--border, #e2e8f0);
324    border-radius: 8px;
325    cursor: pointer;
326  }
327  .aa-toggle input[type="checkbox"] {
328    width: 18px;
329    height: 18px;
330    accent-color: var(--ink, #151515);
331  }
332  .aa-toggle > span {
333    color: var(--ink, #151515);
334    font-weight: 500;
335    font-size: 0.875rem;
336  }
337  .aa-input {
338    padding: 10px 12px;
339    border-radius: 8px;
340    border: 1px solid var(--border, #e2e8f0);
341    background: var(--bg, #fff);
342    color: var(--ink, #151515);
343    font: inherit;
344    font-size: 0.875rem;
345  }
346  .aa-input:focus {
347    outline: none;
348    border-color: var(--ink, #151515);
349    box-shadow: 0 0 0 3px rgba(21, 21, 21, 0.1);
350  }
351  .aa-hint {
352    font-size: 0.72rem;
353    font-weight: 400;
354    color: var(--muted, #94a3b8);
355    margin-top: 2px;
356  }
357  .aa-platforms {
358    display: flex;
359    flex-wrap: wrap;
360    gap: 12px;
361  }
362  .aa-platform {
363    display: flex;
364    align-items: center;
365    gap: 8px;
366    font-size: 0.875rem;
367    color: var(--ink, #151515);
368    cursor: pointer;
369  }
370  .aa-platform input[type="checkbox"] {
371    width: 16px;
372    height: 16px;
373    accent-color: var(--ink, #151515);
374  }
375  .aa-actions {
376    display: flex;
377    flex-wrap: wrap;
378    gap: 12px;
379    margin-top: 8px;
380  }
381  .aa-btn {
382    display: inline-flex;
383    align-items: center;
384    justify-content: center;
385    gap: 8px;
386    padding: 10px 18px;
387    border-radius: 8px;
388    font-weight: 600;
389    font-size: 0.875rem;
390    cursor: pointer;
391    font-family: inherit;
392    border: 1px solid var(--border, #e2e8f0);
393    background: #fff;
394    color: var(--ink, #151515);
395    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
396  }
397  .aa-btn:hover:not(:disabled) {
398    border-color: var(--brand, #f15a24);
399    color: var(--brand, #f15a24);
400  }
401  .aa-btn:disabled { opacity: 0.5;
401 cursor: not-allowed; }
402  .aa-btn-primary {
403    background: var(--ink, #151515);
404    border-color: var(--ink, #151515);
405    color: #fff;
406  }
407  .aa-btn-primary:hover:not(:disabled) {
408    background: var(--brand, #f15a24);
409    border-color: var(--brand, #f15a24);
410  }
411  .aa-msg {
412    margin: 12px 0 0;
413    font-size: 0.875rem;
414    font-weight: 600;
415  }
416  .aa-ok { color: var(--ink, #151515); }
417  .aa-err { color: #b91c1c; }
418`;function Se(){const[t,s]=a.useState(null),[c,p]=a.useState(!1),[m,b]=a.useState("");a.useEffect(()=>{let g=!1;return(async()=>{const l=await x("/api/benchmark/me");if(!l.ok||g)return;const y=await l.json();g||s(!!y.optedOut)})(),()=>{g=!0}},[]);const u=a.useCallback(async()=>{const g=!t;s(g),p(!0),b("");try{(await x("/api/settings/benchmark-opt-out",{method:"PATCH",body:{optedOut:g}})).ok?b(g?"Opted out. You won't appear in peer cohorts.":"Re-enabled — you'll appear in cohorts next time benchmarks refresh."):(s(!g),b("Failed to update — please try again."))}catch{s(!g),b("Network error — please try again.")}p(!1)},[t]);return e.jsxs("section",{className:"settings-section",id:"peer-benchmark-settings",children:[e.jsxs("header",{className:"settings-section-header",children:[e.jsx("h2",{className:"settings-section-title",children:"Peer benchmark"}),e.jsx("p",{className:"settings-section-lead",children:"Compare your win-rate, proposal length, and time to apply against freelancers with similar skills. Your data is only ever aggregated with 20+ people — never shown individually."})]}),e.jsxs("label",{className:"agent-icp-field agent-icp-check",children:[e.jsx("input",{type:"checkbox",checked:t??!1,onChange:u,disabled:t===null||c}),e.jsx("span",{children:"Opt out of peer benchmarks"})]}),m&&e.jsx("p",{className:m.toLowerCase().includes("failed")||m.toLowerCase().includes("error")?"agent-icp-err":"agent-icp-ok",role:"status",children:m})]})}function Ce(t){return{minFit:Number((t==null?void 0:t.agentMinFitScore)??75),connectBudgetDaily:(t==null?void 0:t.connectBudgetDaily)!=null?Number(t.connectBudgetDaily):20,notifyChannel:String((t==null?void 0:t.notifyChannel)||"telegram")}}function Me(t,s){return!t||!s?!1:t.minFit===s.minFit&&t.connectBudgetDaily===s.connectBudgetDaily&&t.notifyChannel===s.notifyChannel}function Te(t){return t==="telegram"?"Telegram only":t==="email"?"Email only":"Email + Telegram"}function Ie(t,s){const c=String(t||"telegram").toLowerCase();return s&&(c==="both"||!c)?"telegram":["email","telegram","both"].includes(c)?c:"telegram"}function Ae(t){return Math.min(95,Math.max(50,Math.round(t)))}function ze(t){return Math.min(200,Math.max(0,Math.round(t)))}function Z(t,s=75){const c=String(t??"").trim();if(!c)return s;const p=Number(c);return Number.isFinite(p)?Ae(p):s}function ee(t,s=20){const c=String(t??"").trim();if(!c)return s;const p=Number(c);return Number.isFinite(p)?ze(p):s}function ie(t){return String(t??"").replace(/[^\d]/g,"")}function Pe(){const{tenant:t}=me(),[s,c]=a.useState(!0),[p,m]=a.useState(!1),[b,u]=a.useState(""),[g,l]=a.useState(""),[y,k]=a.useState("75"),[T,v]=a.useState("20"),[z,w]=a.useState("telegram"),[n,B]=a.useState(null),[R,I]=a.useState(!0),[L,P]=a.useState(""),[j,N]=a.useState(!1),[E,S]=a.useState(""),[A,o]=a.useState(""),[C,h]=a.useState(!1),[O,V]=a.useState(!1),[H,G]=a.useState(!1),[$,_]=a.useState(!0),[Q,Y]=a.useState(!0),r=a.useMemo(()=>Z(y,(n==null?void 0:n.minFit)??75),[y,n==null?void 0:n.minFit]),F=a.useMemo(()=>ee(T,(n==null?void 0:n.connectBudgetDaily)??20),[T,n==null?void 0:n.connectBudgetDaily]),q=n!=null&&(y!==String(n.minFit)||T!==String(n.connectBudgetDaily)||z!==n.notifyChannel),J=a.useCallback(async()=>{const i=await x("/api/autonomous/telegram/link-token");if(i.ok){const d=await i.json();d.deepLink&&P(d.deepLink),d.telegramLinked!=null&&N(!!d.telegramLinked),d.chatIdMasked&&S(d.chatIdMasked)}const f=await x("/api/autonomous/telegram/status");if(f.ok){const d=await f.json();N(!!d.telegramLinked),S(d.chatIdMasked||""),_(d.telegramConfigured!==!1),Y(d.pollingActive!==!1)}},[]),M=a.useCallback(async()=>{c(!0),l("");const[i,f]=await Promise.all([x("/api/autonomous/settings"),x("/api/autonomous/telegram/status")]);if(!i.ok){l("Could not load alerts & apply settings. Refresh and try again."),c(!1);return}const U=(await i.json()).settings||{};let D=!!U.telegramLinked;if(f.ok){const W=await f.json();D=!!W.telegramLinked,N(D),S(W.chatIdMasked||""),_(W.telegramConfigured!==!1),Y(W.pollingActive!==!1)}else N(D);const K=Ce(U),te=Ie(K.notifyChannel,D),X={...K,notifyChannel:te};k(String(X.minFit)),v(String(X.connectBudgetDaily)),w(te),B(X),I(!1),D&&String(U.notifyChannel||"both").toLowerCase()==="both"&&x("/api/autonomous/sales-rules",{method:"PATCH",body:{notifyChannel:"telegram",autoSubmitEnabled:!1}}).catch(()=>{}),c(!1)},[t==null?void 0:t.plan]);a.useEffect(()=>{M(),J()},[M,J]),a.useEffect(()=>{var i;s||(window.location.hash==="#alerts-apply"||window.location.hash==="#sales-rules")&&((i=document.getElementById("alerts-apply"))==null||i.scrollIntoView({behavior:"smooth",block:"start"}))},[s]);async function ae(){const i=A.trim();if(!i){l("Paste your Telegram chat id from @userinfobot first.");return}h(!0),l("");const f=await x("/api/autonomous/telegram/link-manual",{method:"POST",body:{chatId:i}});if(h(!1),!f.ok){const d=await f.json().catch(()=>({}));l(d.message||"Could not link Telegram.");return}N(!0),o(""),w("telegram"),B(d=>d&&{...d,notifyChannel:"telegram"}),u("Telegram linked — alerts will go to Telegram only. Check your bot chat for a test message."),x("/api/autonomous/sales-rules",{method:"PATCH",body:{notifyChannel:"telegram",autoSubmitEnabled:!1}}).catch(()=>{}),await J()}async function le(){V(!0);const i=await x("/api/autonomous/telegram/unlink",{method:"POST",body:{}});if(V(!1),!i.ok){l("Could not unlink Telegram.");return}N(!1),S(""),u("Telegram unlinked — you won't get job alerts until you reconnect.")}async function ce(){G(!0);const i=await x("/api/autonomous/telegram/test",{method:"POST",body:{}});G(!1);const f=await i.json().catch(()=>({}));if(!i.ok){l(f.message||"Test notification failed.");return}u(f.sent?"Test message sent — check Telegram.":f.error||"Not delivered.")}
418async function de(i){i.preventDefault();const f=Z(y,(n==null?void 0:n.minFit)??75),d=ee(T,(n==null?void 0:n.connectBudgetDaily)??20);k(String(f)),v(String(d));const U={minFit:f,connectBudgetDaily:d,notifyChannel:z};if(n!=null&&Me(U,n))return;m(!0),l(""),u("");const D=await x("/api/autonomous/sales-rules",{method:"PATCH",body:{agentMinFitScore:f,connectBudgetDaily:d,autoSubmitEnabled:!1,notifyChannel:z}});if(m(!1),!D.ok){const K=await D.json().catch(()=>({}));l(K.message||"Could not save settings.");return}B({...U}),I(!1),u("Alerts & apply settings saved.")}function pe(){n&&(k(String(n.minFit)),v(String(n.connectBudgetDaily)),w(n.notifyChannel),o(""),u(""),l(""),I(!1))}if(s)return e.jsxs("section",{id:"alerts-apply",className:"settings-section sr-section",children:[e.jsx("p",{className:"sr-muted",children:"Loading alerts & apply…"}),e.jsx("style",{children:oe})]});const ge=e.jsxs("div",{className:"sr-saved",children:[e.jsxs("div",{className:"sr-saved-head",children:[e.jsx("span",{className:"sr-saved-badge","aria-label":"Alerts and apply settings saved",children:"✓ Alerts & apply settings saved"}),e.jsx("button",{type:"button",className:"sr-edit-btn",onClick:()=>{u(""),l(""),I(!0)},children:"Edit"})]}),e.jsxs("dl",{className:"sr-saved-dl",children:[e.jsx("dt",{children:"Minimum fit score"}),e.jsxs("dd",{children:[(n==null?void 0:n.minFit)??r,"%"]}),e.jsx("dt",{children:"Connect budget / day"}),e.jsx("dd",{children:(n==null?void 0:n.connectBudgetDaily)??F}),e.jsx("dt",{children:"Notify via"}),e.jsx("dd",{children:Te(z)}),e.jsx("dt",{children:"Telegram"}),e.jsx("dd",{children:j?`Connected${E?` (${E})`:""}`:"Not linked"}),e.jsx("dt",{children:"Apply mode"}),e.jsx("dd",{children:"Manual apply active"})]}),b&&e.jsx("p",{className:"sr-ok",children:b}),g&&e.jsx("p",{className:"sr-err",children:g})]}),ue=e.jsxs("form",{onSubmit:i=>void de(i),className:"sr-form",children:[e.jsxs("div",{className:"sr-block",children:[e.jsx("h3",{className:"sr-block-title",children:"Alert thresholds"}),e.jsxs("p",{className:"sr-block-hint sr-block-hint-strong",children:["Set these so you only get notified for strong matches. They run ",e.jsx("em",{children:"after"})," the extension scans and AI scores each job. Skills and niches live in"," ",e.jsx("a",{href:"#job-hunt-profile",children:"Job hunt profile"})," above."]}),e.jsxs("div",{className:"sr-row",children:[e.jsxs("label",{children:["Minimum fit score for alerts",e.jsx("input",{type:"text",inputMode:"numeric",value:y,onChange:i=>k(ie(i.target.value)),onBlur:()=>{const i=Z(y,(n==null?void 0:n.minFit)??75);k(String(i))},className:"sr-input","aria-label":"Minimum fit score for alerts"}),e.jsx("span",{className:"sr-field-hint",children:"Only jobs at or above this AI fit % trigger Telegram/email (50–95, e.g. 75 = strong matches only)."})]}),e.jsxs("label",{children:["Connect budget / day",e.jsx("input",{type:"text",inputMode:"numeric",value:T,onChange:i=>v(ie(i.target.value)),onBlur:()=>{const i=ee(T,(n==null?void 0:n.connectBudgetDaily)??20);v(String(i))},className:"sr-input","aria-label":"Connect budget per day"}),e.jsx("span",{className:"sr-field-hint",children:"Max Connects to spend on bids per day."})]})]}),e.jsxs("label",{children:["Notify via",e.jsxs("select",{value:z,onChange:i=>w(i.target.value),className:"sr-input",children:[e.jsx("option",{value:"telegram",children:"Telegram only"}),e.jsx("option",{value:"both",children:"Email + Telegram"}),e.jsx("option",{value:"email",children:"Email only"})]}),e.jsx("span",{className:"sr-field-hint",children:j?"Telegram is connected — we recommend Telegram only for phone alerts.":"Connect Telegram below so high-fit jobs reach your phone."})]})]}),e.jsxs("div",{className:"sr-block",children:[e.jsx("h3",{className:"sr-block-title",children:"Telegram"}),e.jsx("p",{className:"sr-block-hint",children:"Approve or decline jobs from your phone — your daily money desk."}),!$&&e.jsxs("p",{className:"sr-warn",children:["Server Telegram bot is not configured. Ask your admin to set ",e.jsx("code",{children:"TELEGRAM_BOT_TOKEN"})," in backend"," ",e.jsx("code",{children:".env"}),"."]}),e.jsxs("div",{className:"sr-telegram",children:[e.jsxs("div",{className:"sr-tg-header",children:[e.jsx("span",{className:`sr-tg-badge ${j?"on":"off"}`,children:j?"Connected":"Not linked"}),j&&E&&e.jsxs("span",{className:"sr-tg-chat",children:["Chat ",e.jsx("code",{children:E})]})]}),j?e.jsxs("div",{className:"sr-tg-actions",children:[e.jsx("button",{type:"button",className:"sr-btn sr-btn-primary",disabled:H||!$,onClick:()=>void ce(),children:H?"Sending…":"Send test"}),e.jsx("button",{type:"button",className:"sr-btn sr-btn-muted",disabled:O,onClick:()=>void le(),children:O?"Unlinking…":"Unlink"})]}):e.jsxs(e.Fragment,{children:[L&&e.jsx("a",{className:"sr-btn sr-btn-primary",href:L,target:"_blank",rel:"noreferrer",children:"Connect Telegram bot"}),e.jsxs("p",{className:"sr-tg-or",children:["or paste chat id from"," ",e.jsx("a",{href:"https://t.me/userinfobot",target:"_blank",rel:"noreferrer",className:"sr-tg-bot-link",children:"@userinfobot"})]}),e.jsxs("div",{className:"sr-tg-row",children:[e.jsx("input",{type:"text",className:"sr-input",placeholder:"e.g. 123456789",value:A,onChange:i=>o(i.target.value)}),e.jsx("button",{type:"button",className:"sr-btn sr-btn-primary",disabled:C||!A.trim(),onClick:()=>void ae(),children:C?"Linking…":"Link"})]})]}),j&&Q===!1&&$&&e.jsx("p",{className:"sr-warn",children:"Bot polling is inactive — Approve buttons may not work until the API restarts."})]})]}),e.jsxs("div",{className:"sr-block",children:[e.jsx("h3",{className:"sr-block-title",children:"Apply mode"}),e.jsxs("div",{className:"sr-manual-on",children:[e.jsx("span",{className:"sr-manual-badge",children:"Manual apply active"}),e.jsxs("p",{children:["Approve on Telegram → open ",e.jsx(be,{to:"/app",children:"Today"})," → copy your proposal → submit on Upwork yourself. The extension still scans and scores jobs; it will not auto-submit."]})]})]}),e.jsxs("div",{className:"sr-actions",children:[n&&e.jsx("button",{type:"button",className:"sr-btn sr-btn-cancel",onClick:pe,disabled:p,children:"Cancel"}),e.jsx("button",{type:"submit",className:"sr-btn sr-btn-primary sr-btn-save",disabled:p||!q,children:p?"Saving…":n?"Save changes":"Save alerts & apply"})]}),b&&e.jsx("p",{className:"sr-ok",children:b}),g&&e.jsx("p",{className:"sr-err",children:g})]});return e.jsxs("section",{id:"alerts-apply",className:"settings-section sr-section",children:[e.jsxs("header",{className:"settings-section-header sr-head",children:[e.jsxs("h2",{className:"settings-section-title",children:["Alerts & apply ",e.jsx("span",{className:"settings-step-pill",children:"Step 2"})]}),e.jsxs("p",{className:"settings-section-lead sr-lead",children:["Step 2 — after jobs are scored from your"," ",e.jsx("a",{href:"#job-hunt-profile",children:"job hunt profile"}),", choose when we alert you and how you submit proposals."]})]}),R?ue:ge,e.jsx("style",{children:oe})]})}const oe=`
419  .sr-head {
420    margin-bottom: 0;
421  }
422  .sr-lead a {
423    color: var(--app-ink, #151515);
424    font-weight: 600;
425    text-decoration: none;
426  }
427  .sr-lead a:hover {
428    color: var(--brand, #f15a24);
429    text-decoration: underline;
430  }
431  .sr-saved {
432    border: 1px solid var(--app-border, rgba(21, 21, 21, 0.08));
433    border-radius: 10px;
434    padding: 16px 18px;
435    background: rgba(21, 21, 21, 0.03);
436  }
437  .sr-saved-head {
438    display: flex;
439    align-items: center;
440    justify-content: space-between;
441    gap: 12px;
442    margin-bottom: 14px;
443  }
444  .sr-saved-badge {
445    display: inline-flex;
446    align-items: center;
447    gap: 6px;
448    padding: 6px 12px;
449    border-radius: 999px;
450    background: var(--app-ink, #151515);
451    color: #fff;
452    font-size: 0.8125rem;
453    font-weight: 700;
454    border: 1px solid var(--app-ink, #151515);
455  }
456  .sr-edit-btn {
457    padding: 8px 16px;
458    border-radius: 8px;
459    border: 1px solid var(--app-border, rgba(21, 21, 21, 0.08));
460    background: #fff;
461    color: var(--app-ink, #151515);
462    font-weight: 600;
463    font-size: 0.875rem;
464    cursor: pointer;
465    font-family: inherit;
466    transition: border-color 150ms ease, color 150ms ease;
467  }
468  .sr-edit-btn:hover {
469    border-color: var(--brand, #f15a24);
470    color: var(--brand, #f15a24);
471  }
472  .sr-saved-dl {
473    margin: 0;
474    display: grid;
475    grid-template-columns: minmax(140px, 180px) 1fr;
476    gap: 8px 16px;
477    font-size: 0.875rem;
478  }
479  .sr-saved-dl dt {
480    margin: 0;
481    color: var(--muted, #64748b);
482    font-weight: 500;
483  }
484  .sr-saved-dl dd {
485    margin: 0;
486    color: var(--text, #334155);
487    line-height: 1.45;
488  }
489  .sr-actions {
490    display: flex;
491    flex-direction: row;
492    flex-wrap: nowrap;
493    gap: 12px;
494    align-items: stretch;
495    margin-top: 8px;
496  }
497  .sr-actions .sr-btn-cancel,
498  .sr-actions .sr-btn-save {
499    flex: 1 1 0;
500    min-width: 0;
501    min-height: 44px;
502    box-sizing: border-box;
503  }
504  .sr-btn-cancel {
505    background: #fff;
506    color: var(--app-ink, #151515);
507  }
508  .sr-block {
509    padding: 18px 0;
510    border-top: 1px solid var(--app-border, #e2e8f0);
511  }
512  .sr-block:first-of-type { border-top: none; padding-top: 0; }
513  .sr-block-title { margin: 0 0 4px; font-size: 1rem; }
514  .sr-block-hint { margin: 0 0 14px; font-size: 0.84rem; color: var(--muted, #64748b); line-height: 1.45; }
515  .sr-block-hint-strong {
516    color: var(--app-ink, #151515);
517    font-weight: 600;
518    padding: 10px 12px;
519    border-radius: 8px;
520    background: rgba(241, 90, 36, 0.06);
521    border: 1px solid rgba(241, 90, 36, 0.22);
522  }
523  .sr-block-hint-strong a {
524    color: var(--brand, #f15a24);
525    font-weight: 800;
526    text-decoration: underline;
527    text-underline-offset: 2px;
528  }
529  .sr-form label {
530    display: flex;
531    flex-direction: column;
532    gap: 6px;
533    font-size: 0.84rem;
534    font-weight: 600;
535    color: var(--text, #334155);
536    margin-bottom: 12px;
537  }
538  .sr-row {
539    display: grid;
540    grid-template-columns: 1fr 1fr;
541    gap: 16px;
542  }
543  @media (max-width: 640px) { .sr-row { grid-template-columns: 1fr; } }
544  .sr-input {
545    padding: 10px 12px;
546    border-radius: 8px;
547    border: 1px solid var(--app-border, #e2e8f0);
548    font-size: 0.9rem;
549    font-family: inherit;
550    font-weight: 400;
551  }
552  .sr-field-hint {
553    font-size: 0.75rem;
554    font-weight: 400;
555    color: var(--muted, #94a3b8);
556  }
557  .sr-check {
558    flex-direction: row !important;
559    align-items: flex-start;
560    gap: 10px !important;
561    cursor: pointer;
562  }
563  .sr-check input { margin-top: 3px; }
564  .sr-telegram {
565    padding: 16px;
566    border-radius: 12px;
567    border: 1px solid var(--app-border, rgba(21, 21, 21, 0.08));
568    background: rgba(21, 21, 21, 0.03);
569    display: flex;
570    flex-direction: column;
571    gap: 12px;
572    max-width: 520px;
573  }
574  .sr-tg-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
575  .sr-tg-badge {
576    font-size: 0.72rem;
577    font-weight: 700;
578    padding: 4px 10px;
579    border-radius: 999px;
580  }
581  .sr-tg-badge.on { background: var(--app-ink, #151515); color: #fff; border: 1px solid var(--app-ink, #151515); }
582  .sr-tg-badge.off { background: #fff; color: var(--muted, rgba(21, 21, 21, 0.55)); border: 1px solid var(--app-border, rgba(21, 21, 21, 0.12)); }
583  .sr-tg-chat { font-size: 0.84rem; color: var(--muted, #64748b); }
584  .sr-tg-actions, .sr-tg-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
585  .sr-tg-row .sr-input { flex: 1; min-width: 160px; margin: 0; }
586  .sr-tg-or { margin: 0; font-size: 0.8rem; color: var(--muted, #94a3b8); }
587  .sr-tg-bot-link {
588    color: var(--app-ink, #151515);
589    font-weight: 600;
590    text-decoration: none;
591  }
592  .sr-tg-bot-link:hover { color: var(--brand, #f15a24); text-decoration: underline; }
593  .sr-btn {
594    display: inline-flex;
595    align-items: center;
596    justify-content: center;
597    padding: 10px 16px;
598    border-radius: 10px;
599    border: 1px solid var(--app-border, rgba(21, 21, 21, 0.08));
600    background: #fff;
601    font-weight: 600;
602    font-size: 0.875rem;
603    cursor: pointer;
604    font-family: inherit;
605    text-decoration: none;
606    color: var(--app-ink, #151515);
607    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
608  }
609  .sr-btn:hover:not(:disabled) {
610    border-color: var(--brand, #f15a24);
611    color: var(--brand, #f15a24);
612  }
613  .sr-btn-primary {
614    background: var(--app-ink, #151515);
615    border-color: var(--app-ink, #151515);
616    color: #fff !important;
617  }
618  .sr-btn-primary:hover:not(:disabled) {
619    background: var(--brand, #f15a24);
620    border-color: var(--brand, #f15a24);
621  }
622  .sr-btn-muted { color: var(--muted, #64748b); }
623  .sr-btn:disabled { opacity: 0.4; cursor: wait; }
624  .sr-ok { color: var(--app-ink, #151515); font-weight: 600; font-size: 0.875rem; margin: 12px 0 0; }
625  .sr-err { color: #b91c1c; font-size: 0.875rem; margin: 12px 0 0; }
626  .sr-warn {
627    font-size: 0.84rem;
628    color: var(--app-ink, #151515);
629    background: rgba(241, 90, 36, 0.06);
630    border: 1px solid rgba(241, 90, 36, 0.2);
631    border-radius: 8px;
632    padding: 10px 12px;
633    margin: 0 0 12px;
634    line-height: 1.45;
635  }
636  .sr-muted { color: var(--muted, #64748b); margin: 0; }
637  .sr-manual-on {
638    padding: 14px 16px;
639    border-radius: 10px;
640    background: rgba(21, 21, 21, 0.03);
641    border: 1px solid var(--app-border, rgba(21, 21, 21, 0.08));
642    margin-bottom: 12px;
643  }
644  .sr-manual-badge {
645    display: inline-block;
646    font-size: 0.72rem;
647    font-weight: 700;
648    text-transform: uppercase;
649    letter-spacing: 0.04em;
650    color: var(--app-ink, #151515);
651    margin-bottom: 8px;
652  }
653  .sr-manual-on p { margin: 0; font-size: 0.875rem; line-height: 1.5; color: var(--app-ink, #151515); }
654`;function He(){return e.jsxs("div",{className:"settings-page-stack",children:[e.jsx(ye,{title:"Settings",subtitle:"1) Job hunt profile → 2) Alerts & apply (Telegram + manual apply)."}),e.jsxs("div",{className:"settings-sections",children:[e.jsx(ke,{variant:"settings"}),e.jsx(Pe,{}),e.jsx(Ne,{}),e.jsx(Se,{})]}),e.jsx("style",{children:Be})]})}const Be=`
655  .settings-page-stack {
656    display: flex;
657    flex-direction: column;
658    gap: 0;
659    width: 100%;
660  }
661  .settings-sections {
662    display: flex;
663    flex-direction: column;
664    gap: 20px;
665    width: 100%;
666    max-width: 1100px;
667  }
668  .settings-page-stack .settings-section {
669    margin: 0;
670    padding: 24px 26px;
671    border-radius: 14px;
672    border: 1px solid var(--app-border, #e2e8f0);
673    background: var(--app-surface, #fff);
674    box-sizing: border-box;
675    width: 100%;
676  }
677  .settings-page-stack .settings-section-header {
678    margin-bottom: 20px;
679  }
680  .settings-page-stack .settings-section-title {
681    margin: 0 0 8px;
682    font-size: 1.25rem;
683    font-weight: 700;
684    letter-spacing: -0.01em;
685    color: var(--app-ink, #0f172a);
686    display: flex;
687    align-items: center;
688    gap: 10px;
689    flex-wrap: wrap;
690    line-height: 1.3;
691  }
692  .settings-page-stack .settings-section-lead {
693    margin: 0;
694    color: var(--app-muted, #64748b);
695    font-size: 0.9rem;
696    line-height: 1.55;
697    max-width: 42rem;
698  }
699  .settings-page-stack .settings-step-pill {
700    display: inline-flex;
701    align-items: center;
702    font-size: 0.68rem;
703    font-weight: 700;
704    text-transform: uppercase;
705    letter-spacing: 0.04em;
706    color: var(--app-muted, rgba(21, 21, 21, 0.55));
707    padding: 4px 10px;
708    border-radius: 999px;
709    background: #fff;
710    border: 1px solid var(--app-border, rgba(21, 21, 21, 0.12));
711    line-height: 1.2;
712  }
713  .settings-page-stack .sr-block-title,
714  .settings-page-stack .agent-icp-subhead {
715    margin: 0 0 6px;
716    font-size: 1rem;
717    font-weight: 600;
718    color: var(--app-ink, #0f172a);
719  }
720  .settings-page-stack .sr-block-hint,
721  .settings-page-stack .agent-icp-field > span {
722    font-size: 0.84rem;
723  }
724  .settings-page-stack .agent-icp-saved,
725  .settings-page-stack .sr-saved {
726    margin-top: 4px;
727  }
728`;export{He as default};

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.