reflex-agent 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +89 -89
- package/.next/app-path-routes-manifest.json +7 -7
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +3 -3
- package/.next/react-loadable-manifest.json +1 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +3 -3
- package/.next/server/app/agents/[agentId]/page.js +1 -1
- package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/[agentId]/respond/route.js +1 -1
- package/.next/server/app/api/agents/[agentId]/respond/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/images/[rootId]/[file]/route.js +1 -1
- package/.next/server/app/api/images/[rootId]/[file]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/oauth/callback/route.js +1 -1
- package/.next/server/app/api/oauth/callback/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/oauth/start/route.js +1 -1
- package/.next/server/app/api/oauth/start/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/attachments/route.js +0 -0
- package/.next/server/app/api/roots/[id]/attachments/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/send/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stop/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route.js +1 -1
- package/.next/server/app/api/roots/[id]/chat/[topicId]/stream/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/dashboard/route.js +1 -1
- package/.next/server/app/api/roots/[id]/dashboard/route.js.nft.json +1 -1
- package/.next/server/app/api/roots/[id]/dashboard/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/roots/[id]/suggestions/route.js +1 -1
- package/.next/server/app/api/roots/[id]/suggestions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/bundle.js/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host/route.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host-api.mjs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/host-ui.mjs/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/iframe/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/utilities/[scope]/[id]/style.css/route_client-reference-manifest.js +1 -1
- package/.next/server/app/audit/page.js +2 -2
- package/.next/server/app/audit/page.js.nft.json +1 -1
- package/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +3 -3
- package/.next/server/app/onboarding/page.js +3 -3
- package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/chat/[topicId]/page.js +3 -3
- package/.next/server/app/roots/[id]/chat/[topicId]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/chat/[topicId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/kb/[...slug]/page.js +3 -3
- package/.next/server/app/roots/[id]/kb/[...slug]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/kb/[...slug]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/page.js +3 -3
- package/.next/server/app/roots/[id]/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/workflows/[wfId]/page.js +2 -2
- package/.next/server/app/roots/[id]/workflows/[wfId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/[id]/workflows/page.js +1 -1
- package/.next/server/app/roots/[id]/workflows/page.js.nft.json +1 -1
- package/.next/server/app/roots/[id]/workflows/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/new/page.js +2 -2
- package/.next/server/app/roots/new/page_client-reference-manifest.js +1 -1
- package/.next/server/app/roots/new.html +1 -1
- package/.next/server/app/roots/new.rsc +5 -5
- package/.next/server/app/settings/page.js +5 -5
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +6 -6
- package/.next/server/app/share/[id]/file/page.js +2 -2
- package/.next/server/app/share/[id]/file/page_client-reference-manifest.js +1 -1
- package/.next/server/app/share/[id]/page.js +2 -2
- package/.next/server/app/share/[id]/page.js.nft.json +1 -1
- package/.next/server/app/share/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/utilities/[scope]/[id]/page.js +2 -2
- package/.next/server/app/utilities/[scope]/[id]/page.js.nft.json +1 -1
- package/.next/server/app/utilities/[scope]/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/utilities/page.js +4 -4
- package/.next/server/app/utilities/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +7 -7
- package/.next/server/chunks/1105.js +1 -1
- package/.next/server/chunks/1223.js +1 -1
- package/.next/server/chunks/133.js +5 -5
- package/.next/server/chunks/1455.js +1 -0
- package/.next/server/chunks/1888.js +1 -1
- package/.next/server/chunks/1986.js +1 -1
- package/.next/server/chunks/2433.js +1 -1
- package/.next/server/chunks/2485.js +1 -1
- package/.next/server/chunks/2503.js +1 -1
- package/.next/server/chunks/2977.js +1 -0
- package/.next/server/chunks/3076.js +1 -0
- package/.next/server/chunks/3332.js +1 -1
- package/.next/server/chunks/3610.js +1 -0
- package/.next/server/chunks/4031.js +1 -1
- package/.next/server/chunks/4567.js +3 -0
- package/.next/server/chunks/4925.js +1 -1
- package/.next/server/chunks/5243.js +1 -1
- package/.next/server/chunks/6730.js +1 -1
- package/.next/server/chunks/6809.js +3 -0
- package/.next/server/chunks/6909.js +3 -3
- package/.next/server/chunks/8514.js +1 -1
- package/.next/server/chunks/9098.js +1 -1
- package/.next/server/chunks/9293.js +1 -1
- package/.next/server/chunks/9328.js +2 -2
- package/.next/server/chunks/9731.js +4 -0
- package/.next/server/chunks/9905.js +1 -0
- package/.next/server/functions-config-manifest.json +2 -2
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/_error.js +2 -2
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/1521-747af538ca131a44.js +1 -0
- package/.next/static/chunks/{6734-9d524ec49e4ba49c.js → 2641-a7e626d59cd967e8.js} +1 -1
- package/.next/static/chunks/2994-8b82d24eeb6d4a3d.js +1 -0
- package/.next/static/chunks/4108.610ef39d7984f25f.js +1 -0
- package/.next/static/chunks/6330-d46c4ceb6e522567.js +1 -0
- package/.next/static/chunks/9837-49687140bc7ce084.js +1 -0
- package/.next/static/chunks/app/layout-e51afdc17d552d1a.js +1 -0
- package/.next/static/chunks/app/onboarding/page-21cb4c231aa388b2.js +1 -0
- package/.next/static/chunks/app/page-1fa224b4a5160227.js +1 -0
- package/.next/static/chunks/app/roots/[id]/chat/[topicId]/page-495551937b420b76.js +1 -0
- package/.next/static/chunks/app/roots/[id]/kb/[...slug]/page-1b67558878e2cc43.js +1 -0
- package/.next/static/chunks/app/roots/[id]/page-0431ab3465b742f1.js +1 -0
- package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/page-62fa8cfbf3c85457.js +1 -0
- package/.next/static/chunks/app/roots/new/page-918f809668694de6.js +1 -0
- package/.next/static/chunks/app/settings/page-9cf2f101424ec84c.js +1 -0
- package/.next/static/chunks/app/share/[id]/page-325593b9c70ca17c.js +1 -0
- package/.next/static/chunks/app/utilities/[scope]/[id]/page-fe0e445961d83cc2.js +1 -0
- package/.next/static/chunks/app/utilities/page-a1359423e5a9e7de.js +1 -0
- package/.next/static/chunks/{webpack-2e8cca5826414cc6.js → webpack-5a9c11af9261dd8a.js} +1 -1
- package/.next/trace +46 -46
- package/README.md +12 -1
- package/dist/bin/cli.js +1 -0
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/preload.js +14 -0
- package/dist/bin/preload.js.map +1 -0
- package/dist/lib/reflex/commands/start.js +2 -0
- package/dist/lib/reflex/commands/start.js.map +1 -1
- package/dist/lib/reflex/home.js +18 -0
- package/dist/lib/reflex/home.js.map +1 -0
- package/dist/lib/reflex/prompts/store.js +2 -2
- package/dist/lib/reflex/prompts/store.js.map +1 -1
- package/package.json +1 -1
- package/.next/server/chunks/5152.js +0 -1
- package/.next/server/chunks/5373.js +0 -1
- package/.next/server/chunks/5401.js +0 -1
- package/.next/server/chunks/5436.js +0 -1
- package/.next/server/chunks/5986.js +0 -3
- package/.next/server/chunks/613.js +0 -1
- package/.next/server/chunks/6536.js +0 -3
- package/.next/server/chunks/6602.js +0 -4
- package/.next/static/chunks/4108.d6ed46bc2fcab462.js +0 -1
- package/.next/static/chunks/4895-712004156efeccf2.js +0 -1
- package/.next/static/chunks/6489-ecde2d94e57eb8a9.js +0 -1
- package/.next/static/chunks/6727-d38536774bdb32d5.js +0 -1
- package/.next/static/chunks/6744-dbfe3cc4ce461613.js +0 -1
- package/.next/static/chunks/app/layout-c7a35075cfbfa3e3.js +0 -1
- package/.next/static/chunks/app/onboarding/page-cde5b92b13b03c63.js +0 -1
- package/.next/static/chunks/app/page-ddaeffdc9a15f597.js +0 -1
- package/.next/static/chunks/app/roots/[id]/chat/[topicId]/page-1b55f68984817d29.js +0 -1
- package/.next/static/chunks/app/roots/[id]/kb/[...slug]/page-d4358cb6042740c4.js +0 -1
- package/.next/static/chunks/app/roots/[id]/page-703d96bf8208af2f.js +0 -1
- package/.next/static/chunks/app/roots/[id]/workflows/[wfId]/page-738e8e4128baa722.js +0 -1
- package/.next/static/chunks/app/roots/new/page-534769dce46d0d29.js +0 -1
- package/.next/static/chunks/app/settings/page-86ee3d07ea1acbc7.js +0 -1
- package/.next/static/chunks/app/share/[id]/page-5bbc8503cb9a9eeb.js +0 -1
- package/.next/static/chunks/app/utilities/[scope]/[id]/page-72546d245b840091.js +0 -1
- package/.next/static/chunks/app/utilities/page-9f949d831421d314.js +0 -1
- /package/.next/static/{p8t15rbWhT5Rrs5fOXWZ6 → 6-mOMrzbiPmI97utKVIuW}/_buildManifest.js +0 -0
- /package/.next/static/{p8t15rbWhT5Rrs5fOXWZ6 → 6-mOMrzbiPmI97utKVIuW}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6388],{13506:(e,t,s)=>{"use strict";s.d(t,{cn:()=>i});var a=s(47989),r=s(55701);function i(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,r.QP)((0,a.$)(t))}},15523:(e,t,s)=>{"use strict";s.d(t,{p:()=>i});var a=s(4624);s(99356);var r=s(13506);function i(e){let{className:t,type:s,...i}=e;return(0,a.jsx)("input",{type:s,"data-slot":"input",className:(0,r.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",t),...i})}},22841:(e,t,s)=>{"use strict";s.d(t,{bq:()=>u,eb:()=>m,gC:()=>p,l6:()=>d,yv:()=>c});var a=s(4624);s(99356);var r=s(69709),i=s(43153),n=s(59728),l=s(85314),o=s(13506);function d(e){let{...t}=e;return(0,a.jsx)(l.Root,{"data-slot":"select",...t})}function c(e){let{...t}=e;return(0,a.jsx)(l.Value,{"data-slot":"select-value",...t})}function u(e){let{className:t,size:s="default",children:i,...n}=e;return(0,a.jsxs)(l.Trigger,{"data-slot":"select-trigger","data-size":s,className:(0,o.cn)("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",t),...n,children:[i,(0,a.jsx)(l.Icon,{asChild:!0,children:(0,a.jsx)(r.A,{className:"size-4 opacity-50"})})]})}function p(e){let{className:t,children:s,position:r="item-aligned",align:i="center",...n}=e;return(0,a.jsx)(l.Portal,{children:(0,a.jsxs)(l.Content,{"data-slot":"select-content",className:(0,o.cn)("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,align:i,...n,children:[(0,a.jsx)(h,{}),(0,a.jsx)(l.Viewport,{className:(0,o.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:s}),(0,a.jsx)(x,{})]})})}function m(e){let{className:t,children:s,...r}=e;return(0,a.jsxs)(l.Item,{"data-slot":"select-item",className:(0,o.cn)("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...r,children:[(0,a.jsx)("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,a.jsx)(l.ItemIndicator,{children:(0,a.jsx)(i.A,{className:"size-4"})})}),(0,a.jsx)(l.ItemText,{children:s})]})}function h(e){let{className:t,...s}=e;return(0,a.jsx)(l.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:(0,o.cn)("flex cursor-default items-center justify-center py-1",t),...s,children:(0,a.jsx)(n.A,{className:"size-4"})})}function x(e){let{className:t,...s}=e;return(0,a.jsx)(l.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:(0,o.cn)("flex cursor-default items-center justify-center py-1",t),...s,children:(0,a.jsx)(r.A,{className:"size-4"})})}},28310:(e,t,s)=>{"use strict";s.d(t,{E:()=>o});var a=s(4624);s(99356);var r=s(60621),i=s(50362),n=s(13506);let l=(0,r.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:s="default",asChild:r=!1,...o}=e,d=r?i.bL:"span";return(0,a.jsx)(d,{"data-slot":"badge","data-variant":s,className:(0,n.cn)(l({variant:s}),t),...o})}},41379:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(45804).A)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},43153:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(45804).A)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},46972:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(45804).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},52515:(e,t,s)=>{Promise.resolve().then(s.bind(s,72849)),Promise.resolve().then(s.bind(s,91074)),Promise.resolve().then(s.bind(s,96253)),Promise.resolve().then(s.bind(s,28050)),Promise.resolve().then(s.bind(s,94904)),Promise.resolve().then(s.bind(s,13270)),Promise.resolve().then(s.bind(s,99730)),Promise.resolve().then(s.bind(s,89146)),Promise.resolve().then(s.bind(s,19078)),Promise.resolve().then(s.bind(s,67854)),Promise.resolve().then(s.bind(s,69050)),Promise.resolve().then(s.bind(s,63739)),Promise.resolve().then(s.bind(s,33976)),Promise.resolve().then(s.bind(s,12537)),Promise.resolve().then(s.bind(s,97485)),Promise.resolve().then(s.bind(s,41923)),Promise.resolve().then(s.bind(s,73868)),Promise.resolve().then(s.bind(s,53511)),Promise.resolve().then(s.bind(s,2018)),Promise.resolve().then(s.bind(s,18487)),Promise.resolve().then(s.bind(s,98346)),Promise.resolve().then(s.bind(s,14884)),Promise.resolve().then(s.bind(s,85314)),Promise.resolve().then(s.bind(s,17280)),Promise.resolve().then(s.bind(s,8855)),Promise.resolve().then(s.bind(s,86631)),Promise.resolve().then(s.bind(s,2604)),Promise.resolve().then(s.bind(s,27237)),Promise.resolve().then(s.bind(s,49455)),Promise.resolve().then(s.bind(s,39211)),Promise.resolve().then(s.bind(s,56360)),Promise.resolve().then(s.t.bind(s,54400,23))},59728:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(45804).A)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},60621:(e,t,s)=>{"use strict";s.d(t,{F:()=>n});var a=s(47989);let r=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,i=a.$,n=(e,t)=>s=>{var a;if((null==t?void 0:t.variants)==null)return i(e,null==s?void 0:s.class,null==s?void 0:s.className);let{variants:n,defaultVariants:l}=t,o=Object.keys(n).map(e=>{let t=null==s?void 0:s[e],a=null==l?void 0:l[e];if(null===t)return null;let i=r(t)||r(a);return n[e][i]}),d=s&&Object.entries(s).reduce((e,t)=>{let[s,a]=t;return void 0===a||(e[s]=a),e},{});return i(e,o,null==t||null==(a=t.compoundVariants)?void 0:a.reduce((e,t)=>{let{class:s,className:a,...r}=t;return Object.entries(r).every(e=>{let[t,s]=e;return Array.isArray(s)?s.includes({...l,...d}[t]):({...l,...d})[t]===s})?[...e,s,a]:e},[]),null==s?void 0:s.class,null==s?void 0:s.className)}},65714:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(45804).A)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},67805:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(45804).A)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},69285:(e,t,s)=>{"use strict";var a=s(48849);s.o(a,"usePathname")&&s.d(t,{usePathname:function(){return a.usePathname}}),s.o(a,"useRouter")&&s.d(t,{useRouter:function(){return a.useRouter}})},69709:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(45804).A)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},71651:(e,t,s)=>{"use strict";s.d(t,{T:()=>i});var a=s(4624);s(99356);var r=s(13506);function i(e){let{className:t,...s}=e;return(0,a.jsx)("textarea",{"data-slot":"textarea",className:(0,r.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",t),...s})}},72849:(e,t,s)=>{"use strict";s.d(t,{WorkflowEditor:()=>C});var a=s(4624),r=s(99356),i=s(69285),n=s(3239),l=s(46972),o=s(67805),d=s(41379),c=s(59728),u=s(69709),p=s(76974),m=s(65714),h=s(54400),x=s.n(h),v=s(56221),f=s(28310),b=s(85253),g=s(15523),y=s(71651),j=s(22841),k=s(7911);let N=(0,k.createServerReference)("60798c245bfd593509ce7906040f04b93d557290ed",k.callServer,void 0,k.findSourceMapURL,"saveWorkflowAction"),w=(0,k.createServerReference)("60c2bfae9bd18990aaea4c5f7012742739f03c4664",k.callServer,void 0,k.findSourceMapURL,"listRunsAction"),P=(0,k.createServerReference)("70aa8fe9f35734300166e79557fee7b6492aca8f58",k.callServer,void 0,k.findSourceMapURL,"runWorkflowAction"),z=(0,k.createServerReference)("608da09670edda37f46ac717ebd10585e3b4842758",k.callServer,void 0,k.findSourceMapURL,"deleteWorkflowAction"),A=[{kind:"text-template",label:"Шаблон текста",description:"Собирает текст из шаблона с подстановками из предыдущих шагов. Используй как \xabсклейку\xbb данных перед следующим шагом.",defaultParams:{template:"Hello {{prev}}"},fields:[{key:"template",label:"Шаблон",type:"text",hint:"Подстановки: {{prev}}, {{steps.<id>.output}}, {{input.<field>}}",placeholder:"Сводка: {{prev}}"}]},{kind:"http-request",label:"HTTP-запрос",description:"Делает HTTP-запрос (GET по умолчанию). Тело ответа кладёт в output как строку или JSON, если application/json.",defaultParams:{url:"https://api.example.com/",method:"GET"},fields:[{key:"url",label:"URL",type:"url",placeholder:"https://…"},{key:"method",label:"Метод",type:"select",options:["GET","POST","PUT","PATCH","DELETE"]},{key:"headers",label:"Headers (JSON)",type:"json",hint:'Например: {"Authorization":"Bearer …"}'},{key:"body",label:"Body",type:"text",hint:"Пусто для GET"}]},{kind:"web-fetch",label:"Скачать страницу",description:"Запрашивает URL и возвращает текстовое содержимое. Удобно для парсинга страниц без боли HTTP-настроек.",defaultParams:{url:"https://example.com"},fields:[{key:"url",label:"URL",type:"url",placeholder:"https://…"}]},{kind:"ask-agent",label:"Спросить агента",description:"Запустить headless orchestrator-агента с указанным вопросом. Output — ответ агента (полный текст ассистента).",defaultParams:{prompt:"Кратко суммаризируй: {{prev}}"},fields:[{key:"prompt",label:"Вопрос агенту",type:"text",placeholder:"Используй {{prev}} чтобы передать вход"}]},{kind:"kb-write",label:"Записать в KB",description:"Сохраняет в базу знаний как Markdown-файл с frontmatter (kind, title, body). Используй output предыдущего шага как `body`.",defaultParams:{kind:"note",title:"Из workflow {{workflow.label}}",body:"{{prev}}"},fields:[{key:"kind",label:"Kind",type:"string",placeholder:"note"},{key:"title",label:"Title",type:"string",placeholder:"{{workflow.label}}"},{key:"body",label:"Body (Markdown)",type:"text",placeholder:"{{prev}}"}]},{kind:"utility-call",label:"Вызвать мини-приложение",description:"Запускает named server-action установленной утилиты с переданными args. Output = результат action. utility-call позволяет workflow'у пользоваться функциями мини-приложений как библиотекой.",defaultParams:{utilityId:"",utilityScope:"global",actionName:"",args:"{}"},fields:[{key:"utilityId",label:"Утилита (id)",type:"string",placeholder:"my-utility"},{key:"utilityScope",label:"Scope",type:"select",options:["global","project"]},{key:"actionName",label:"Действие",type:"string",placeholder:"имя из manifest.serverActions"},{key:"args",label:"Аргументы (JSON)",type:"json",hint:"Передаются как первый аргумент action. Подстановки {{prev}} работают внутри строк JSON."}]},{kind:"image-generate",label:"Сгенерировать картинку",description:"Генерирует картинку через Gemini Nano Banana или Codex `$imagegen`. Output: {url, sha, mime, provider} — `url` можно вставить в kb-write body как ``.",defaultParams:{prompt:"симпатичный енот в скафандре, акварель",provider:"gemini",aspectRatio:"1:1"},fields:[{key:"prompt",label:"Промпт",type:"text",placeholder:"Описание картинки"},{key:"provider",label:"Провайдер",type:"select",options:["gemini","codex"]},{key:"aspectRatio",label:"Соотношение",type:"select",options:["1:1","16:9","9:16","4:3","3:4","21:9"]},{key:"size",label:"Размер (опц.)",type:"string",placeholder:"1024x1024"}]},{kind:"image-search",label:"Найти картинки в сети",description:"Ищет готовые изображения по запросу (Unsplash по умолчанию, Pexels как fallback). Output: {results: [{url, thumb, attribution}…]}.",defaultParams:{query:"mountains sunrise",provider:"unsplash",count:6},fields:[{key:"query",label:"Запрос",type:"string",placeholder:"mountains sunrise"},{key:"provider",label:"Провайдер",type:"select",options:["unsplash","pexels","brave"]},{key:"count",label:"Сколько результатов",type:"string",placeholder:"6"}]}];function S(e){var t;return null!=(t=A.find(t=>t.kind===e))?t:null}function C(e){var t;let{rootId:s,initial:c,initialRuns:u}=e,p=(0,i.useRouter)(),[m,h]=(0,r.useState)(c),[f,y]=(0,r.useState)(u),[k,C]=(0,r.useState)(null),[O,_]=(0,r.useState)("closed"),[M,E]=(0,r.useTransition)(),[I,$]=(0,r.useTransition)(),L=e=>{h(e),$(async()=>{var t;let a=await N(s,e);a.ok||v.oR.error(null!=(t=a.error)?t:"Не удалось сохранить")})},U=async()=>{let e=await w(s,m.id);e.ok&&y(e.runs)},V=(e,t)=>{let s=e+t;if(s<0||s>=m.steps.length)return;let a=[...m.steps],r=a[e],i=a[s];a[e]=i,a[s]=r,L({...m,steps:a,updatedAt:new Date().toISOString()})};return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"rounded-md border bg-card p-4 space-y-3",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:"Название"}),(0,a.jsx)(g.p,{value:m.label,onChange:e=>L({...m,label:e.target.value}),className:"text-sm"})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:"Описание"}),(0,a.jsx)(g.p,{value:null!=(t=m.description)?t:"",onChange:e=>L({...m,description:e.target.value}),className:"text-sm",placeholder:"Что делает workflow"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:"Триггер"}),(0,a.jsxs)(j.l6,{value:m.trigger,onValueChange:e=>L({...m,trigger:e}),children:[(0,a.jsx)(j.bq,{className:"h-8 w-32",children:(0,a.jsx)(j.yv,{})}),(0,a.jsxs)(j.gC,{children:[(0,a.jsx)(j.eb,{value:"manual",children:"Вручную"}),(0,a.jsx)(j.eb,{value:"hourly",children:"Раз в час"}),(0,a.jsx)(j.eb,{value:"daily",children:"Раз в день"}),(0,a.jsx)(j.eb,{value:"weekly",children:"Раз в неделю"})]})]})]}),m.sourceTopicId&&(0,a.jsx)(x(),{href:"/roots/".concat(s,"/chat/").concat(m.sourceTopicId),className:"text-xs text-muted-foreground hover:underline self-end pb-2",children:"Редактировать через топик →"}),(0,a.jsxs)("div",{className:"ml-auto flex items-center gap-2 self-end pb-1",children:[I&&(0,a.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:[(0,a.jsx)(n.A,{className:"h-3 w-3 animate-spin inline mr-1"}),"сохранение…"]}),(0,a.jsxs)(b.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>{confirm("Удалить workflow \xab".concat(m.label,"\xbb? Это необратимо."))&&$(async()=>{let e=await z(s,m.id);if(!e.ok)return void v.oR.error(e.error);p.push("/roots/".concat(s,"/workflows"))})},disabled:I,className:"text-muted-foreground hover:text-destructive",children:[(0,a.jsx)(l.A,{className:"h-3.5 w-3.5 mr-1"}),"Удалить"]}),(0,a.jsxs)(b.$,{type:"button",size:"sm",onClick:()=>{E(async()=>{let e=await P(s,m.id);if(!e.ok)return void v.oR.error(e.error);"completed"===e.run.status?v.oR.success("Workflow выполнен"):"failed"===e.run.status&&v.oR.error("Workflow упал — детали в run history"),U()})},disabled:M||0===m.steps.length,className:"gap-1",children:[M?(0,a.jsx)(n.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,a.jsx)(o.A,{className:"h-3.5 w-3.5"}),"Запустить"]})]})]})]}),(0,a.jsxs)("section",{className:"space-y-2",children:[(0,a.jsxs)("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:["Шаги (",m.steps.length,")"]}),m.steps.map((e,t)=>(0,a.jsx)(R,{step:e,idx:t,total:m.steps.length,editing:k===e.id,onToggleEdit:()=>C(k===e.id?null:e.id),onMoveUp:()=>V(t,-1),onMoveDown:()=>V(t,1),onRemove:()=>(e=>{let t=m.steps.filter((t,s)=>s!==e);L({...m,steps:t,updatedAt:new Date().toISOString()})})(t),onChange:e=>((e,t)=>{let s=m.steps.map((s,a)=>a===e?{...s,...t}:s);L({...m,steps:s,updatedAt:new Date().toISOString()})})(t,e)},e.id)),"open"===O?(0,a.jsxs)("div",{className:"rounded-md border bg-card p-3 space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-xs font-medium",children:"Выбери тип шага"}),(0,a.jsx)(b.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>_("closed"),className:"h-6 text-xs",children:"Отмена"})]}),(0,a.jsx)("div",{className:"grid gap-1.5",children:A.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let t=S(e);if(!t)return;let s=function(e,t){let s=t.replace(/[^a-z0-9]/gi,"-"),a=1;for(;e.some(e=>e.id==="".concat(s,"-").concat(a));)a+=1;return"".concat(s,"-").concat(a)}(m.steps,e);L({...m,steps:[...m.steps,{id:s,kind:e,label:t.label,params:{...t.defaultParams}}],updatedAt:new Date().toISOString()}),_("closed"),C(s)})(e.kind),className:"text-left rounded-md border px-3 py-2 hover:bg-accent/60 transition",children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:e.label}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:e.description})]},e.kind))})]}):(0,a.jsxs)(b.$,{type:"button",variant:"outline",size:"sm",onClick:()=>_("open"),className:"w-full gap-1 border-dashed",children:[(0,a.jsx)(d.A,{className:"h-3.5 w-3.5"}),"Добавить шаг"]})]}),(0,a.jsx)(T,{runs:f,onRefresh:U})]})}function R(e){let{step:t,idx:s,total:r,editing:i,onToggleEdit:n,onMoveUp:o,onMoveDown:d,onRemove:h,onChange:x}=e,v=S(t.kind);return(0,a.jsxs)("div",{className:"rounded-md border bg-card overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 group",children:[(0,a.jsx)("span",{className:"text-[10px] font-mono text-muted-foreground w-6 text-center shrink-0",children:s+1}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"text-sm font-medium truncate",children:t.label}),(0,a.jsx)(f.E,{variant:"outline",className:"text-[10px] font-mono",children:t.kind})]}),v&&(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground line-clamp-1 mt-0.5",children:v.description})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[(0,a.jsx)(b.$,{type:"button",size:"icon",variant:"ghost",onClick:o,disabled:0===s,className:"h-7 w-7",children:(0,a.jsx)(c.A,{className:"h-3.5 w-3.5"})}),(0,a.jsx)(b.$,{type:"button",size:"icon",variant:"ghost",onClick:d,disabled:s===r-1,className:"h-7 w-7",children:(0,a.jsx)(u.A,{className:"h-3.5 w-3.5"})}),(0,a.jsx)(b.$,{type:"button",size:"icon",variant:"ghost",onClick:n,className:"h-7 w-7",children:(0,a.jsx)(p.A,{className:"h-3.5 w-3.5"})}),(0,a.jsx)(b.$,{type:"button",size:"icon",variant:"ghost",onClick:h,className:"h-7 w-7 text-muted-foreground hover:text-destructive",children:(0,a.jsx)(l.A,{className:"h-3.5 w-3.5"})})]})]}),i&&(0,a.jsxs)("div",{className:"border-t bg-muted/30 px-3 py-3 space-y-2.5",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium text-muted-foreground",children:"Label"}),(0,a.jsx)(g.p,{value:t.label,onChange:e=>x({label:e.target.value}),className:"h-8 text-sm"})]}),null==v?void 0:v.fields.map(e=>{var s;let r=null!=(s=t.params[e.key])?s:"";return(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("label",{className:"text-[11px] font-medium text-muted-foreground",children:e.label}),"select"===e.type&&e.options?(0,a.jsxs)(j.l6,{value:String(r||e.options[0]),onValueChange:s=>x({params:{...t.params,[e.key]:s}}),children:[(0,a.jsx)(j.bq,{className:"h-8 text-sm",children:(0,a.jsx)(j.yv,{})}),(0,a.jsx)(j.gC,{children:e.options.map(e=>(0,a.jsx)(j.eb,{value:e,children:e},e))})]}):"text"===e.type||"json"===e.type?(0,a.jsx)(y.T,{value:String(r),onChange:s=>x({params:{...t.params,[e.key]:s.target.value}}),placeholder:e.placeholder,rows:3,className:"text-sm font-mono"}):(0,a.jsx)(g.p,{value:String(r),onChange:s=>x({params:{...t.params,[e.key]:s.target.value}}),placeholder:e.placeholder,className:"h-8 text-sm font-mono"}),e.hint&&(0,a.jsx)("p",{className:"text-[10px] text-muted-foreground",children:e.hint})]},e.key)}),(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsxs)(b.$,{type:"button",size:"sm",variant:"ghost",onClick:n,className:"h-7 text-xs gap-1",children:[(0,a.jsx)(m.A,{className:"h-3 w-3"}),"Готово"]})})]})]})}function T(e){let{runs:t,onRefresh:s}=e,[i,l]=(0,r.useTransition)();return 0===t.length?(0,a.jsxs)("section",{className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"История запусков"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Пока пусто."})]}):(0,a.jsxs)("section",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"История запусков"}),(0,a.jsx)(b.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>l(async()=>s()),disabled:i,className:"h-7 text-xs",children:i?(0,a.jsx)(n.A,{className:"h-3 w-3 animate-spin"}):"Обновить"})]}),(0,a.jsx)("ul",{className:"space-y-1.5",children:t.map(e=>(0,a.jsx)("li",{children:(0,a.jsxs)("details",{className:"rounded-md border bg-card",children:[(0,a.jsxs)("summary",{className:"cursor-pointer list-none flex items-center gap-2 px-3 py-2",children:[(0,a.jsx)(f.E,{variant:"completed"===e.status?"secondary":"failed"===e.status?"destructive":"outline",className:"text-[10px]",children:e.status}),(0,a.jsx)("span",{className:"text-xs font-mono truncate",children:e.id}),(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground ml-auto",children:new Date(e.startedAt).toLocaleString()})]}),(0,a.jsx)("div",{className:"px-3 pb-3 space-y-1.5",children:e.steps.map(e=>(0,a.jsxs)("div",{className:"text-xs rounded border bg-muted/30 px-2 py-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(f.E,{variant:"completed"===e.status?"secondary":"failed"===e.status?"destructive":"outline",className:"text-[10px]",children:e.status}),(0,a.jsx)("span",{className:"font-mono",children:e.stepId})]}),e.error&&(0,a.jsx)("pre",{className:"mt-1 text-[10px] text-destructive whitespace-pre-wrap",children:e.error}),void 0!==e.output&&(0,a.jsx)("pre",{className:"mt-1 text-[10px] text-muted-foreground whitespace-pre-wrap max-h-32 overflow-y-auto font-mono",children:function(e){try{if("string"==typeof e)return e.length>800?e.slice(0,800)+"…":e;let t=JSON.stringify(e,null,2);return t.length>800?t.slice(0,800)+"…":t}catch(t){return String(e)}}(e.output)})]},e.stepId))})]})},e.id))})]})}},76974:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(45804).A)("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},85253:(e,t,s)=>{"use strict";s.d(t,{$:()=>o});var a=s(4624);s(99356);var r=s(60621),i=s(50362),n=s(13506);let l=(0,r.F)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:s="default",size:r="default",asChild:o=!1,...d}=e,c=o?i.bL:"button";return(0,a.jsx)(c,{"data-slot":"button","data-variant":s,"data-size":r,className:(0,n.cn)(l({variant:s,size:r,className:t})),...d})}},91074:(e,t,s)=>{"use strict";s.d(t,{Separator:()=>n});var a=s(4624);s(99356);var r=s(44188),i=s(13506);function n(e){let{className:t,orientation:s="horizontal",decorative:n=!0,...l}=e;return(0,a.jsx)(r.b,{"data-slot":"separator",decorative:n,orientation:s,className:(0,i.cn)("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...l})}}},e=>{e.O(0,[4400,1217,3335,5097,4933,146,7358],()=>e(e.s=52515)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9429],{3747:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},4959:(e,t,r)=>{"use strict";r.d(t,{BT:()=>l,Wu:()=>d,ZB:()=>o,Zp:()=>n,aR:()=>i,wL:()=>c});var s=r(4624);r(99356);var a=r(13506);function n(e){let{className:t,...r}=e;return(0,s.jsx)("div",{"data-slot":"card",className:(0,a.cn)("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",t),...r})}function i(e){let{className:t,...r}=e;return(0,s.jsx)("div",{"data-slot":"card-header",className:(0,a.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...r})}function o(e){let{className:t,...r}=e;return(0,s.jsx)("div",{"data-slot":"card-title",className:(0,a.cn)("leading-none font-semibold",t),...r})}function l(e){let{className:t,...r}=e;return(0,s.jsx)("div",{"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",t),...r})}function d(e){let{className:t,...r}=e;return(0,s.jsx)("div",{"data-slot":"card-content",className:(0,a.cn)("px-6",t),...r})}function c(e){let{className:t,...r}=e;return(0,s.jsx)("div",{"data-slot":"card-footer",className:(0,a.cn)("flex items-center px-6 [.border-t]:pt-6",t),...r})}},9923:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]])},13506:(e,t,r)=>{"use strict";r.d(t,{cn:()=>n});var s=r(47989),a=r(55701);function n(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,a.QP)((0,s.$)(t))}},13561:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},15523:(e,t,r)=>{"use strict";r.d(t,{p:()=>n});var s=r(4624);r(99356);var a=r(13506);function n(e){let{className:t,type:r,...n}=e;return(0,s.jsx)("input",{type:r,"data-slot":"input",className:(0,a.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",t),...n})}},32740:(e,t,r)=>{Promise.resolve().then(r.bind(r,41372)),Promise.resolve().then(r.bind(r,96253)),Promise.resolve().then(r.bind(r,28050)),Promise.resolve().then(r.bind(r,94904)),Promise.resolve().then(r.bind(r,13270)),Promise.resolve().then(r.bind(r,99730)),Promise.resolve().then(r.bind(r,89146)),Promise.resolve().then(r.bind(r,19078)),Promise.resolve().then(r.bind(r,67854)),Promise.resolve().then(r.bind(r,69050)),Promise.resolve().then(r.bind(r,63739)),Promise.resolve().then(r.bind(r,33976)),Promise.resolve().then(r.bind(r,12537)),Promise.resolve().then(r.bind(r,97485)),Promise.resolve().then(r.bind(r,41923)),Promise.resolve().then(r.bind(r,73868)),Promise.resolve().then(r.bind(r,53511)),Promise.resolve().then(r.bind(r,2018)),Promise.resolve().then(r.bind(r,18487)),Promise.resolve().then(r.bind(r,98346)),Promise.resolve().then(r.bind(r,14884)),Promise.resolve().then(r.bind(r,85314)),Promise.resolve().then(r.bind(r,17280)),Promise.resolve().then(r.bind(r,8855)),Promise.resolve().then(r.bind(r,86631)),Promise.resolve().then(r.bind(r,2604)),Promise.resolve().then(r.bind(r,27237)),Promise.resolve().then(r.bind(r,49455)),Promise.resolve().then(r.bind(r,39211)),Promise.resolve().then(r.bind(r,56360)),Promise.resolve().then(r.t.bind(r,54400,23))},41372:(e,t,r)=>{"use strict";r.d(t,{DirectoryPicker:()=>S});var s=r(4624),a=r(99356),n=r(69285);let i=(0,r(45804).A)("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);var o=r(3747),l=r(59728),d=r(42146),c=r(72754),u=r(3239),h=r(13561),m=r(69709),x=r(69205),v=r(9923),p=r(56221),f=r(85253),b=r(4959),g=r(15523),j=r(80192),y=r(91074),w=r(7911);let k=(0,w.createServerReference)("404575294f71a7ea865a16ef72c6a4c90a6516112c",w.callServer,void 0,w.findSourceMapURL,"addRootAction");var N=r(63514);let P=(0,w.createServerReference)("400addb0ef2d99d42eabe890f969a2b5a864caafcf",w.callServer,void 0,w.findSourceMapURL,"browseAction"),A=(0,w.createServerReference)("60cd50d727cdcf3c21d895644f3535576faaf265ed",w.callServer,void 0,w.findSourceMapURL,"createDirectoryAction");function S(e){let{initialPath:t}=e,[r,m]=(0,a.useState)(t),[x,v]=(0,a.useState)(t),[w,S]=(0,a.useState)(null),[C,D]=(0,a.useState)([]),[$,_]=(0,a.useState)(t),[F,E]=(0,a.useState)(!1),[H,T]=(0,a.useTransition)(),[Z,O]=(0,a.useTransition)(),[V,B]=(0,a.useState)(!1),[U,q]=(0,a.useState)(""),[W,K]=(0,a.useTransition)(),Q=(0,n.useRouter)();(0,a.useEffect)(()=>{X(t)},[]);let X=e=>{T(async()=>{let t=await P(e);if(!t.ok){var r;p.oR.error(null!=(r=t.error)?r:"Failed to browse");return}m(t.path),v(t.path),S(t.parent),_(t.path),D(t.entries.filter(e=>e.isDir).map(e=>R(e.name,e.absPath,e.hidden)))})},G=async e=>{let t=function e(t,r){for(let s of t){if(s.absPath===r)return s;if(s.expanded){let t=e(s.children,r);if(t)return t}}return null}(C,e);if(!t)return;if(t.expanded)return void D(t=>L(t,e,e=>({...e,expanded:!1})));if(t.loaded)return void D(t=>L(t,e,e=>({...e,expanded:!0})));D(t=>L(t,e,e=>({...e,loading:!0})));let r=await P(e);if(!r.ok){var s;p.oR.error(null!=(s=r.error)?s:"Failed to browse"),D(t=>L(t,e,e=>({...e,loading:!1})));return}let a=r.entries.filter(e=>e.isDir).map(e=>R(e.name,e.absPath,e.hidden));D(t=>L(t,e,e=>({...e,loading:!1,loaded:!0,expanded:!0,children:a})))},I=async e=>{if(e===r){let t=await P(e);t.ok&&D(t.entries.filter(e=>e.isDir).map(e=>R(e.name,e.absPath,e.hidden)));return}let t=await P(e);if(!t.ok)return;let s=t.entries.filter(e=>e.isDir).map(e=>R(e.name,e.absPath,e.hidden));D(t=>L(t,e,e=>({...e,children:s,loaded:!0,expanded:!0})))};return(0,s.jsxs)(b.Zp,{children:[(0,s.jsxs)(b.aR,{children:[(0,s.jsxs)(b.ZB,{className:"flex items-center justify-between gap-4",children:[(0,s.jsx)("span",{children:"Browse"}),(0,s.jsxs)(f.$,{variant:"ghost",size:"sm",onClick:()=>X(t),disabled:H,children:[(0,s.jsx)(i,{className:"mr-1 h-4 w-4"})," Home"]})]}),(0,s.jsxs)("form",{className:"flex gap-2 mt-2",onSubmit:e=>{e.preventDefault(),X(x)},children:[(0,s.jsx)(g.p,{value:x,onChange:e=>v(e.target.value),placeholder:"/absolute/path",className:"font-mono text-xs"}),(0,s.jsx)(f.$,{type:"submit",variant:"secondary",disabled:H,children:(0,s.jsx)(o.A,{className:"h-4 w-4 ".concat(H?"animate-spin":"")})})]})]}),(0,s.jsx)(y.Separator,{}),(0,s.jsx)(b.Wu,{className:"px-2 py-2",children:(0,s.jsxs)(j.F,{className:"h-[460px]",children:[(0,s.jsxs)("div",{className:"px-2 py-1 flex items-center gap-2",children:[(0,s.jsxs)(f.$,{variant:"ghost",size:"sm",disabled:!w||H,onClick:()=>w&&X(w),className:"h-8",children:[(0,s.jsx)(l.A,{className:"mr-1 h-4 w-4"})," Up"]}),(0,s.jsxs)("button",{type:"button",onClick:()=>_(r),className:"flex-1 flex items-center gap-2 px-2 py-1 text-sm rounded-md hover:bg-accent ".concat($===r?"bg-accent":""),title:r,children:[(0,s.jsx)(d.A,{className:"h-4 w-4 text-muted-foreground shrink-0"}),(0,s.jsx)("span",{className:"truncate font-mono text-xs",children:"."}),(0,s.jsxs)("span",{className:"text-muted-foreground text-[11px] truncate",children:["(",M(r),")"]})]}),(0,s.jsxs)(f.$,{variant:"ghost",size:"sm",disabled:H||W,onClick:()=>{B(e=>!e),q("")},className:"h-8",title:"Создать папку в ".concat(M($)),children:[(0,s.jsx)(c.A,{className:"mr-1 h-4 w-4"})," Создать"]}),(0,s.jsxs)("label",{className:"flex items-center gap-1 text-xs text-muted-foreground select-none",children:[(0,s.jsx)("input",{type:"checkbox",checked:F,onChange:e=>E(e.target.checked)}),"hidden"]})]}),V&&(0,s.jsxs)("form",{className:"px-2 pb-2 flex items-center gap-2",onSubmit:e=>{e.preventDefault();let t=U.trim();t&&K(async()=>{let e=await A($,t);if(!e.ok){var r;p.oR.error(null!=(r=e.error)?r:"Не удалось создать папку");return}p.oR.success("Папка создана"),B(!1),q(""),await I($),_(e.path)})},children:[(0,s.jsxs)("span",{className:"text-[11px] text-muted-foreground font-mono truncate max-w-[40%]",children:[$,"/"]}),(0,s.jsx)(g.p,{autoFocus:!0,value:U,onChange:e=>q(e.target.value),placeholder:"имя новой папки",className:"h-8 text-sm flex-1",disabled:W,onKeyDown:e=>{"Escape"===e.key&&(e.preventDefault(),B(!1),q(""))}}),(0,s.jsxs)(f.$,{type:"submit",size:"sm",disabled:W||!U.trim(),className:"h-8",children:[W?(0,s.jsx)(u.A,{className:"mr-1 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(c.A,{className:"mr-1 h-3.5 w-3.5"}),"Создать"]}),(0,s.jsx)(f.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>{B(!1),q("")},className:"h-8",children:(0,s.jsx)(h.A,{className:"h-3.5 w-3.5"})})]}),(0,s.jsx)(y.Separator,{className:"my-1"}),H?(0,s.jsxs)("div",{className:"flex items-center justify-center py-10 text-sm text-muted-foreground",children:[(0,s.jsx)(u.A,{className:"mr-2 h-4 w-4 animate-spin"})," Loading…"]}):0===C.length?(0,s.jsx)("div",{className:"px-4 py-10 text-center text-sm text-muted-foreground",children:"No subdirectories."}):(0,s.jsx)(z,{nodes:C,selected:$,onSelect:_,onToggle:G,showHidden:F,depth:0})]})}),(0,s.jsx)(y.Separator,{}),(0,s.jsxs)(b.wL,{className:"flex items-center justify-between gap-4",children:[(0,s.jsxs)("div",{className:"text-xs text-muted-foreground font-mono truncate",children:["Selected: ",$]}),(0,s.jsx)(f.$,{onClick:()=>{O(async()=>{let e=await k($);if(!e.ok){var t;p.oR.error(null!=(t=e.error)?t:"Failed to add");return}p.oR.success("Directory added"),(0,N.$d)(N.Zi.rootsChanged),Q.push("/roots/".concat(e.id))})},disabled:Z||H,children:Z?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.A,{className:"mr-2 h-4 w-4 animate-spin"})," Adding…"]}):"Add this directory"})]})]})}function z(e){let{nodes:t,selected:r,onSelect:a,onToggle:n,showHidden:i,depth:o}=e;return(0,s.jsx)("ul",{children:t.filter(e=>i||!e.hidden).map(e=>(0,s.jsxs)("li",{children:[(0,s.jsx)(C,{node:e,depth:o,selected:r,onSelect:a,onToggle:n}),e.expanded&&e.children.length>0&&(0,s.jsx)(z,{nodes:e.children,selected:r,onSelect:a,onToggle:n,showHidden:i,depth:o+1}),e.expanded&&e.loaded&&0===e.children.length&&(0,s.jsx)("div",{className:"text-xs text-muted-foreground italic px-2 py-1",style:{paddingLeft:16*o+44},children:"(empty)"})]},e.absPath))})}function C(e){let{node:t,depth:r,selected:a,onSelect:n,onToggle:i}=e,o=a===t.absPath;return(0,s.jsxs)("div",{className:"group flex items-center gap-1 pr-2 py-1 rounded-md hover:bg-accent/60 ".concat(o?"bg-accent":""),style:{paddingLeft:16*r+4},children:[(0,s.jsx)("button",{type:"button",onClick:()=>i(t.absPath),className:"h-6 w-6 flex items-center justify-center text-muted-foreground hover:text-foreground shrink-0","aria-label":t.expanded?"Collapse":"Expand",children:t.loading?(0,s.jsx)(u.A,{className:"h-3.5 w-3.5 animate-spin"}):t.expanded?(0,s.jsx)(m.A,{className:"h-3.5 w-3.5"}):(0,s.jsx)(x.A,{className:"h-3.5 w-3.5"})}),(0,s.jsxs)("button",{type:"button",onClick:()=>n(t.absPath),onDoubleClick:()=>i(t.absPath),className:"flex-1 min-w-0 flex items-center gap-2 text-left text-sm",children:[t.expanded?(0,s.jsx)(d.A,{className:"h-4 w-4 text-muted-foreground shrink-0"}):(0,s.jsx)(v.A,{className:"h-4 w-4 text-muted-foreground shrink-0"}),(0,s.jsx)("span",{className:"truncate ".concat(t.hidden?"opacity-60":""),children:t.name})]})]})}function R(e,t,r){return{name:e,absPath:t,hidden:r,loaded:!1,loading:!1,expanded:!1,children:[]}}function L(e,t,r){return e.map(e=>e.absPath===t?r(e):e.children.length>0?{...e,children:L(e.children,t,r)}:e)}function M(e){var t;let r=e.split("/").filter(Boolean);return null!=(t=r[r.length-1])?t:e}},42146:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]])},59728:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},60621:(e,t,r)=>{"use strict";r.d(t,{F:()=>i});var s=r(47989);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=s.$,i=(e,t)=>r=>{var s;if((null==t?void 0:t.variants)==null)return n(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(e=>{let t=null==r?void 0:r[e],s=null==o?void 0:o[e];if(null===t)return null;let n=a(t)||a(s);return i[e][n]}),d=r&&Object.entries(r).reduce((e,t)=>{let[r,s]=t;return void 0===s||(e[r]=s),e},{});return n(e,l,null==t||null==(s=t.compoundVariants)?void 0:s.reduce((e,t)=>{let{class:r,className:s,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...o,...d}[t]):({...o,...d})[t]===r})?[...e,r,s]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},63514:(e,t,r)=>{"use strict";r.d(t,{$d:()=>n,S9:()=>i,Zi:()=>a});var s=r(99356);let a={rootsChanged:"reflex:roots-changed",topicsChanged:e=>"reflex:topics-changed:".concat(e),kbChanged:e=>"reflex:kb-changed:".concat(e)};function n(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}function i(e,t){(0,s.useEffect)(()=>{let r=e=>t(e.detail);return window.addEventListener(e,r),()=>window.removeEventListener(e,r)},[e,t])}},69205:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},69285:(e,t,r)=>{"use strict";var s=r(48849);r.o(s,"usePathname")&&r.d(t,{usePathname:function(){return s.usePathname}}),r.o(s,"useRouter")&&r.d(t,{useRouter:function(){return s.useRouter}})},69709:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},72754:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]])},80192:(e,t,r)=>{"use strict";r.d(t,{F:()=>i});var s=r(4624);r(99356);var a=r(14884),n=r(13506);function i(e){let{className:t,children:r,...i}=e;return(0,s.jsxs)(a.Root,{"data-slot":"scroll-area",className:(0,n.cn)("relative",t),...i,children:[(0,s.jsx)(a.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:r}),(0,s.jsx)(o,{}),(0,s.jsx)(a.Corner,{})]})}function o(e){let{className:t,orientation:r="vertical",...i}=e;return(0,s.jsx)(a.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar",orientation:r,className:(0,n.cn)("flex touch-none p-px transition-colors select-none","vertical"===r&&"h-full w-2.5 border-l border-l-transparent","horizontal"===r&&"h-2.5 flex-col border-t border-t-transparent",t),...i,children:(0,s.jsx)(a.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}},85253:(e,t,r)=>{"use strict";r.d(t,{$:()=>l});var s=r(4624);r(99356);var a=r(60621),n=r(50362),i=r(13506);let o=(0,a.F)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function l(e){let{className:t,variant:r="default",size:a="default",asChild:l=!1,...d}=e,c=l?n.bL:"button";return(0,s.jsx)(c,{"data-slot":"button","data-variant":r,"data-size":a,className:(0,i.cn)(o({variant:r,size:a,className:t})),...d})}},91074:(e,t,r)=>{"use strict";r.d(t,{Separator:()=>i});var s=r(4624);r(99356);var a=r(44188),n=r(13506);function i(e){let{className:t,orientation:r="horizontal",decorative:i=!0,...o}=e;return(0,s.jsx)(a.b,{"data-slot":"separator",decorative:i,orientation:r,className:(0,n.cn)("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...o})}}},e=>{e.O(0,[4400,1217,3335,5097,4933,146,7358],()=>e(e.s=32740)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4662],{896:(e,t,a)=>{"use strict";a.d(t,{T:()=>r});var s=a(7911);let r=(0,s.createServerReference)("60e3090027a3d5604202b6d8326408b1a1c7f2da7d",s.callServer,void 0,s.findSourceMapURL,"beginOAuthAction")},4959:(e,t,a)=>{"use strict";a.d(t,{BT:()=>o,Wu:()=>c,ZB:()=>l,Zp:()=>n,aR:()=>i,wL:()=>d});var s=a(4624);a(99356);var r=a(13506);function n(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card",className:(0,r.cn)("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",t),...a})}function i(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...a})}function l(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("leading-none font-semibold",t),...a})}function o(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",t),...a})}function c(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-6",t),...a})}function d(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"card-footer",className:(0,r.cn)("flex items-center px-6 [.border-t]:pt-6",t),...a})}},13506:(e,t,a)=>{"use strict";a.d(t,{cn:()=>n});var s=a(47989),r=a(55701);function n(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,r.QP)((0,s.$)(t))}},15523:(e,t,a)=>{"use strict";a.d(t,{p:()=>n});var s=a(4624);a(99356);var r=a(13506);function n(e){let{className:t,type:a,...n}=e;return(0,s.jsx)("input",{type:a,"data-slot":"input",className:(0,r.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",t),...n})}},17121:(e,t,a)=>{Promise.resolve().then(a.bind(a,89134)),Promise.resolve().then(a.bind(a,91074)),Promise.resolve().then(a.bind(a,96253)),Promise.resolve().then(a.bind(a,28050)),Promise.resolve().then(a.bind(a,94904)),Promise.resolve().then(a.bind(a,13270)),Promise.resolve().then(a.bind(a,99730)),Promise.resolve().then(a.bind(a,89146)),Promise.resolve().then(a.bind(a,19078)),Promise.resolve().then(a.bind(a,67854)),Promise.resolve().then(a.bind(a,69050)),Promise.resolve().then(a.bind(a,63739)),Promise.resolve().then(a.bind(a,33976)),Promise.resolve().then(a.bind(a,12537)),Promise.resolve().then(a.bind(a,97485)),Promise.resolve().then(a.bind(a,41923)),Promise.resolve().then(a.bind(a,73868)),Promise.resolve().then(a.bind(a,53511)),Promise.resolve().then(a.bind(a,2018)),Promise.resolve().then(a.bind(a,18487)),Promise.resolve().then(a.bind(a,98346)),Promise.resolve().then(a.bind(a,14884)),Promise.resolve().then(a.bind(a,85314)),Promise.resolve().then(a.bind(a,17280)),Promise.resolve().then(a.bind(a,8855)),Promise.resolve().then(a.bind(a,86631)),Promise.resolve().then(a.bind(a,2604)),Promise.resolve().then(a.bind(a,27237)),Promise.resolve().then(a.bind(a,49455)),Promise.resolve().then(a.bind(a,39211)),Promise.resolve().then(a.bind(a,56360)),Promise.resolve().then(a.t.bind(a,54400,23))},22841:(e,t,a)=>{"use strict";a.d(t,{bq:()=>m,eb:()=>x,gC:()=>u,l6:()=>c,yv:()=>d});var s=a(4624);a(99356);var r=a(69709),n=a(43153),i=a(59728),l=a(85314),o=a(13506);function c(e){let{...t}=e;return(0,s.jsx)(l.Root,{"data-slot":"select",...t})}function d(e){let{...t}=e;return(0,s.jsx)(l.Value,{"data-slot":"select-value",...t})}function m(e){let{className:t,size:a="default",children:n,...i}=e;return(0,s.jsxs)(l.Trigger,{"data-slot":"select-trigger","data-size":a,className:(0,o.cn)("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",t),...i,children:[n,(0,s.jsx)(l.Icon,{asChild:!0,children:(0,s.jsx)(r.A,{className:"size-4 opacity-50"})})]})}function u(e){let{className:t,children:a,position:r="item-aligned",align:n="center",...i}=e;return(0,s.jsx)(l.Portal,{children:(0,s.jsxs)(l.Content,{"data-slot":"select-content",className:(0,o.cn)("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,align:n,...i,children:[(0,s.jsx)(h,{}),(0,s.jsx)(l.Viewport,{className:(0,o.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:a}),(0,s.jsx)(p,{})]})})}function x(e){let{className:t,children:a,...r}=e;return(0,s.jsxs)(l.Item,{"data-slot":"select-item",className:(0,o.cn)("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...r,children:[(0,s.jsx)("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,s.jsx)(l.ItemIndicator,{children:(0,s.jsx)(n.A,{className:"size-4"})})}),(0,s.jsx)(l.ItemText,{children:a})]})}function h(e){let{className:t,...a}=e;return(0,s.jsx)(l.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:(0,o.cn)("flex cursor-default items-center justify-center py-1",t),...a,children:(0,s.jsx)(i.A,{className:"size-4"})})}function p(e){let{className:t,...a}=e;return(0,s.jsx)(l.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:(0,o.cn)("flex cursor-default items-center justify-center py-1",t),...a,children:(0,s.jsx)(r.A,{className:"size-4"})})}},28310:(e,t,a)=>{"use strict";a.d(t,{E:()=>o});var s=a(4624);a(99356);var r=a(60621),n=a(50362),i=a(13506);let l=(0,r.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:a="default",asChild:r=!1,...o}=e,c=r?n.bL:"span";return(0,s.jsx)(c,{"data-slot":"badge","data-variant":a,className:(0,i.cn)(l({variant:a}),t),...o})}},35101:(e,t,a)=>{"use strict";a.d(t,{N:()=>r});var s=a(7911);let r=(0,s.createServerReference)("005adec00ada04c63ac5fd3676f300faaa566baba2",s.callServer,void 0,s.findSourceMapURL,"getTunnelStatusAction")},37232:(e,t,a)=>{"use strict";a.d(t,{J:()=>r});var s=a(7911);let r=(0,s.createServerReference)("408c94e084cce2b605b8c18c8fe0bd5c81ddd06919",s.callServer,void 0,s.findSourceMapURL,"getOAuthClientAction")},45394:(e,t,a)=>{"use strict";a.d(t,{o:()=>r});var s=a(7911);let r=(0,s.createServerReference)("00836cc3059073482c3919ef173b7f92521f4f56c9",s.callServer,void 0,s.findSourceMapURL,"listOAuthStatusesAction")},49881:(e,t,a)=>{"use strict";a.d(t,{Xi:()=>d,av:()=>m,j7:()=>c,tU:()=>l});var s=a(4624);a(99356);var r=a(60621),n=a(86631),i=a(13506);function l(e){let{className:t,orientation:a="horizontal",...r}=e;return(0,s.jsx)(n.Root,{"data-slot":"tabs","data-orientation":a,orientation:a,className:(0,i.cn)("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",t),...r})}let o=(0,r.F)("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function c(e){let{className:t,variant:a="default",...r}=e;return(0,s.jsx)(n.List,{"data-slot":"tabs-list","data-variant":a,className:(0,i.cn)(o({variant:a}),t),...r})}function d(e){let{className:t,...a}=e;return(0,s.jsx)(n.Trigger,{"data-slot":"tabs-trigger",className:(0,i.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",t),...a})}function m(e){let{className:t,...a}=e;return(0,s.jsx)(n.Content,{"data-slot":"tabs-content",className:(0,i.cn)("flex-1 outline-none",t),...a})}},66459:(e,t,a)=>{"use strict";a.d(t,{O:()=>c});var s=a(4624),r=a(99356),n=a(43153),i=a(9598),l=a(56221),o=a(85253);function c(e){let{steps:t}=e;return t&&0!==t.length?(0,s.jsx)("ol",{className:"space-y-2 text-xs",children:t.map((e,t)=>(0,s.jsxs)("li",{className:"flex gap-2",children:[(0,s.jsxs)("span",{className:"font-mono text-muted-foreground shrink-0 w-5 text-right",children:[t+1,"."]}),(0,s.jsxs)("div",{className:"space-y-1 flex-1 min-w-0",children:[(0,s.jsx)("div",{children:e.title}),e.choice&&(0,s.jsxs)("div",{className:"text-[11px]",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Выбери: "}),(0,s.jsx)("span",{className:"font-medium bg-muted/60 rounded px-1.5 py-0.5",children:e.choice})]}),e.body&&(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground",children:e.body}),e.copy&&(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[e.field&&(0,s.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:[e.field,":"]}),(0,s.jsx)("code",{className:"font-mono text-[11px] bg-muted/60 rounded px-1.5 py-0.5 break-all flex-1 min-w-0",children:e.copy}),(0,s.jsx)(d,{value:e.copy})]})]})]},t))}):null}function d(e){let{value:t}=e,[a,c]=(0,r.useState)(!1);return(0,s.jsx)(o.$,{type:"button",size:"icon",variant:"ghost",className:"h-6 w-6 shrink-0",onClick:async()=>{try{await navigator.clipboard.writeText(t),c(!0),l.oR.success("Скопировано"),setTimeout(()=>c(!1),1200)}catch(e){l.oR.error("Не удалось скопировать")}},title:"Скопировать",children:a?(0,s.jsx)(n.A,{className:"h-3 w-3 text-emerald-600"}):(0,s.jsx)(i.A,{className:"h-3 w-3"})})}},68682:(e,t,a)=>{"use strict";function s(e){return"".concat(e.lat,",").concat(e.lng)}function r(e){return"".concat(e.lng,",").concat(e.lat)}a.d(t,{JY:()=>i,yp:()=>n});let n=[{id:"google",label:"Google Maps",description:"Глобальный, navigation+street view. Работает везде кроме РФ-блокировок.",brand:"#4285F4",glyph:"G",urlFor:(e,t)=>"https://www.google.com/maps/dir/?api=1&destination=".concat(e,",").concat(t),routeUrlFor:e=>{if(e.length<2)return"";let t=s(e[0]),a=s(e[e.length-1]),r=e.slice(1,-1).map(s).join("|"),n=r?"&waypoints=".concat(encodeURIComponent(r)):"";return"https://www.google.com/maps/dir/?api=1&origin=".concat(t,"&destination=").concat(a).concat(n)}},{id:"yandex",label:"Яндекс.Карты",description:"СНГ, лучшая детализация по РФ и пробки в реальном времени.",brand:"#FFCC00",glyph:"Я",urlFor:(e,t)=>"https://yandex.ru/maps/?rtext=~".concat(e,",").concat(t,"&rtt=auto"),routeUrlFor:e=>"https://yandex.ru/maps/?rtext=".concat(e.map(s).join("~"),"&rtt=auto")},{id:"2gis",label:"2ГИС",description:"СНГ, точные адреса и POI. Уникальная свойственность РФ-городов.",brand:"#1BA049",glyph:"2",urlFor:(e,t)=>"https://2gis.ru/routeSearch/to/".concat(t,",").concat(e),routeUrlFor:e=>{let t=r(e[0]),a=r(e[e.length-1]),s=e.slice(1,-1).map(e=>"/via/".concat(r(e))).join("");return"https://2gis.ru/routeSearch/rsType/car/from/".concat(t).concat(s,"/to/").concat(a)}},{id:"apple",label:"Apple Maps",description:"Откроется в нативном приложении на iOS/macOS, иначе на сайте.",brand:"#1d1d1f",glyph:"A",urlFor:(e,t)=>"https://maps.apple.com/?daddr=".concat(e,",").concat(t),routeUrlFor:e=>{let t=s(e[0]),a=e.slice(1).map(e=>"+to:".concat(s(e))).join("");return"https://maps.apple.com/?saddr=".concat(t,"&daddr=").concat(t).concat(a)}},{id:"osm",label:"OpenStreetMap",description:"Открытые данные, без аккаунта. Базовая навигация.",brand:"#7EB73F",glyph:"OSM",urlFor:(e,t)=>"https://www.openstreetmap.org/directions?to=".concat(e,",").concat(t),routeUrlFor:e=>{let t=e.map(s).join(";");return"https://www.openstreetmap.org/directions?route=".concat(encodeURIComponent(t))}},{id:"waze",label:"Waze",description:"Авто-навигация с краудсорсингом пробок и предупреждений.",brand:"#33CCFF",glyph:"W",urlFor:(e,t)=>"https://waze.com/ul?ll=".concat(e,",").concat(t,"&navigate=yes"),routeUrlFor:e=>{let t=e[e.length-1];return"https://waze.com/ul?ll=".concat(t.lat,",").concat(t.lng,"&navigate=yes")}},{id:"organic",label:"Organic Maps",description:"Офлайн-карты с открытыми данными. Открывается в приложении.",brand:"#006C35",glyph:"OM",urlFor:(e,t)=>"om://map?ll=".concat(e,",").concat(t),routeUrlFor:e=>{let t=e[0],a=e[e.length-1];return"om://route?sll=".concat(t.lat,",").concat(t.lng,"&saddr=&dll=").concat(a.lat,",").concat(a.lng,"&daddr=&type=vehicle")}}],i=["google","yandex","apple","osm"]},71651:(e,t,a)=>{"use strict";a.d(t,{T:()=>n});var s=a(4624);a(99356);var r=a(13506);function n(e){let{className:t,...a}=e;return(0,s.jsx)("textarea",{"data-slot":"textarea",className:(0,r.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",t),...a})}},78825:(e,t,a)=>{"use strict";a.d(t,{J:()=>i});var s=a(4624);a(99356);var r=a(33976),n=a(13506);function i(e){let{className:t,...a}=e;return(0,s.jsx)(r.Root,{"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...a})}},85171:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var s=a(7911);let r=(0,s.createServerReference)("409d333d3e7b13a505853122dbd9a15ab36b9a90a4",s.callServer,void 0,s.findSourceMapURL,"saveGeminiKeyAction")},85253:(e,t,a)=>{"use strict";a.d(t,{$:()=>o});var s=a(4624);a(99356);var r=a(60621),n=a(50362),i=a(13506);let l=(0,r.F)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:a="default",size:r="default",asChild:o=!1,...c}=e,d=o?n.bL:"button";return(0,s.jsx)(d,{"data-slot":"button","data-variant":a,"data-size":r,className:(0,i.cn)(l({variant:a,size:r,className:t})),...c})}},89134:(e,t,a)=>{"use strict";a.d(t,{SettingsForm:()=>eY});var s=a(4624),r=a(99356),n=a(3747),i=a(3239),l=a(65714),o=a(58726),c=a(52584),d=a(56221),m=a(85253),u=a(4959),x=a(15523),h=a(78825),p=a(8855),f=a(13506);function g(e){let{className:t,size:a="default",...r}=e;return(0,s.jsx)(p.Root,{"data-slot":"switch","data-size":a,className:(0,f.cn)("peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",t),...r,children:(0,s.jsx)(p.Thumb,{"data-slot":"switch-thumb",className:(0,f.cn)("pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground")})})}var v=a(17280);function b(e){let{className:t,defaultValue:a,value:n,min:i=0,max:l=100,...o}=e,c=r.useMemo(()=>Array.isArray(n)?n:Array.isArray(a)?a:[i,l],[n,a,i,l]);return(0,s.jsxs)(v.Root,{"data-slot":"slider",defaultValue:a,value:n,min:i,max:l,className:(0,f.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",t),...o,children:[(0,s.jsx)(v.Track,{"data-slot":"slider-track",className:(0,f.cn)("relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,s.jsx)(v.Range,{"data-slot":"slider-range",className:(0,f.cn)("absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:c.length},(e,t)=>(0,s.jsx)(v.Thumb,{"data-slot":"slider-thumb",className:"block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},t))]})}var j=a(28310),N=a(22841),y=a(22281);let w=["analyze","chat","rag","embed","quick"],k={analyze:{title:"Analyze",help:"Builds and refreshes the knowledge base. Agentic — runs through Claude Code or Codex with file-write tools."},chat:{title:"Chat",help:"Interactive chat over a folder's KB. Agentic — uses the same harness as analyze by default."},rag:{title:"RAG",help:"Answer questions over the KB without an agent loop. Single-shot LLM call against indexed content."},embed:{title:"Embeddings",help:"Vectorize MD files for retrieval. Ollama runs embedding models locally (e.g. nomic-embed-text)."},quick:{title:"Quick actions",help:"Tiny one-shot calls — generates topic titles, summary snippets, labels. Pick a fast/cheap model."}},S=y.Ik({"claude-code":y.Ik({enabled:y.zM().default(!0)}),codex:y.Ik({enabled:y.zM().default(!0)}),ollama:y.Ik({enabled:y.zM().default(!0),baseUrl:y.Yj().url().default("http://localhost:11434")})}),R=y.Ik({harness:y.k5(["claude-code","codex","ollama"]),model:y.Yj().min(1),allowedTools:y.YO(y.Yj()).default([])}),A=["english","русский","espa\xf1ol","deutsch","fran\xe7ais","中文","日本語"],C=["auto","jpeg","webp","original"],z=y.Ik({enabled:y.zM().default(!0),maxDimension:y.ai().int().min(256).max(8192).default(2e3),quality:y.ai().int().min(40).max(100).default(85),format:y.k5(C).default("auto")});y.Ik({version:y.eu(1).default(1),language:y.Yj().min(1).default("english"),onboardedAt:y.Yj().optional(),userName:y.Yj().default(""),timezone:y.Yj().default(""),uiMode:y.k5(["simple","advanced"]).default("simple"),imageProcessing:z.default({enabled:!0,maxDimension:2e3,quality:85,format:"auto"}),harnesses:S.default({"claude-code":{enabled:!0},codex:{enabled:!0},ollama:{enabled:!0,baseUrl:"http://localhost:11434"}}),assignments:y.Ik({analyze:R,chat:R,rag:R,embed:R,quick:R}).default({analyze:{harness:"claude-code",model:"claude-opus-4-7",allowedTools:["Read","Write","Edit","LS","Glob","Grep","WebSearch","WebFetch"]},chat:{harness:"claude-code",model:"claude-sonnet-4-6",allowedTools:["Read","LS","Glob","Grep","WebSearch","WebFetch"]},rag:{harness:"ollama",model:"llama3.1:8b",allowedTools:[]},embed:{harness:"ollama",model:"nomic-embed-text",allowedTools:[]},quick:{harness:"claude-code",model:"claude-haiku-4-5",allowedTools:[]}}),mapServices:y.Ik({enabled:y.YO(y.Yj()).default(["google","yandex","apple","osm"])}).default({enabled:["google","yandex","apple","osm"]}),ngrok:y.Ik({authtoken:y.Yj().default(""),apiKey:y.Yj().default(""),domain:y.Yj().default(""),port:y.ai().int().min(1).max(65535).default(3210)}).default({authtoken:"",apiKey:"",domain:"",port:3210})}).parse({});var P=a(8096),T=a(13704),U=a(57118),M=a(71651),L=a(49881),_=a(7911);let J=(0,_.createServerReference)("00221ffb49d16f68eabe8c8fa5d4e7b635b9370f9f",_.callServer,void 0,_.findSourceMapURL,"listTemplatesAction"),F=(0,_.createServerReference)("400d426f3c79372aaab4a69d6bcbcabb5917285c01",_.callServer,void 0,_.findSourceMapURL,"loadTemplateAction"),E=(0,_.createServerReference)("40783a95564e3df6c2c79ecfdb5befa2bf3be6de26",_.callServer,void 0,_.findSourceMapURL,"mergeTemplateAction"),I=(0,_.createServerReference)("60f0f6d0a20a184b4a52f981712e41ee63ff612017",_.callServer,void 0,_.findSourceMapURL,"saveTemplateAction"),O=(0,_.createServerReference)("40d453946b3b40cf8158efe6466bd2fb52080606ed",_.callServer,void 0,_.findSourceMapURL,"resetTemplateAction"),W={body:"",defaultBody:"",missingSections:[],path:"",loading:!0,saving:!1,resetting:!1,merging:!1,variables:[]};function $(){let[e,t]=(0,r.useState)([]),[a,n]=(0,r.useState)(null),[o,c]=(0,r.useState)({}),[,x]=(0,r.useTransition)(),[,h]=(0,r.useTransition)();(0,r.useEffect)(()=>{(async()=>{let e=await J();t(e),e[0]&&n(e[0].name);let a={};for(let t of e)a[t.name]={...W};for(let t of(c(a),e))p(t.name)})()},[]);let p=async e=>{c(t=>{var a;return{...t,[e]:{...null!=(a=t[e])?a:W,loading:!0}}});let t=await F(e);if(!t.ok){d.oR.error("Load failed: ".concat(t.error)),c(t=>{var a;return{...t,[e]:{...null!=(a=t[e])?a:W,loading:!1}}});return}c(a=>({...a,[e]:{body:t.body,defaultBody:t.defaultBody,missingSections:t.missingSections,path:t.path,loading:!1,saving:!1,resetting:!1,merging:!1,variables:t.variables}}))};return 0===e.length?(0,s.jsx)(u.Zp,{children:(0,s.jsxs)(u.Wu,{className:"py-6 text-sm text-muted-foreground",children:[(0,s.jsx)(i.A,{className:"inline h-4 w-4 animate-spin mr-2"})," Loading templates…"]})}):(0,s.jsxs)(L.tU,{value:null!=a?a:e[0].name,onValueChange:n,children:[(0,s.jsx)(L.j7,{children:e.map(e=>(0,s.jsx)(L.Xi,{value:e.name,children:e.label},e.name))}),e.map(e=>{var t;let a=null!=(t=o[e.name])?t:W;return(0,s.jsx)(L.av,{value:e.name,className:"mt-3",children:(0,s.jsx)(u.Zp,{children:(0,s.jsxs)(u.Wu,{className:"pt-6 space-y-3",children:[a.missingSections.length>0&&(0,s.jsxs)("div",{className:"rounded border border-amber-300 bg-amber-50 p-3 text-xs text-amber-900 flex items-start gap-2",children:[(0,s.jsx)(P.A,{className:"h-4 w-4 mt-0.5 shrink-0"}),(0,s.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,s.jsxs)("div",{className:"font-medium",children:["Шаблон по умолчанию обновился (",a.missingSections.length," ","новых секций)"]}),(0,s.jsxs)("div",{className:"text-amber-800/80",children:["Отсутствует в твоём файле:"," ",a.missingSections.map((e,t)=>(0,s.jsxs)("span",{children:[(0,s.jsxs)("code",{className:"font-mono",children:["## ",e]}),t<a.missingSections.length-1?", ":""]},e))]})]}),(0,s.jsxs)(m.$,{size:"sm",variant:"outline",onClick:()=>{var t;o[t=e.name]&&(c(e=>{var a;return{...e,[t]:{...null!=(a=e[t])?a:W,merging:!0}}}),(async()=>{let e=await E(t);if(!e.ok){d.oR.error("Merge failed: ".concat(e.error)),c(e=>{var a;return{...e,[t]:{...null!=(a=e[t])?a:W,merging:!1}}});return}d.oR.success(0===e.appended.length?"Уже актуально":"Добавлено ".concat(e.appended.length," секций: ").concat(e.appended.join(", "))),c(a=>{var s;return{...a,[t]:{...null!=(s=a[t])?s:W,body:e.body,missingSections:[],merging:!1}}})})())},disabled:a.merging||a.saving||a.resetting,className:"border-amber-400 hover:bg-amber-100 shrink-0",children:[a.merging?(0,s.jsx)(i.A,{className:"mr-1 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(T.A,{className:"mr-1 h-3.5 w-3.5"}),"Добавить недостающее"]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Variables:"}),a.variables.map(e=>(0,s.jsx)(j.E,{variant:"outline",className:"font-mono",children:"{{".concat(e,"}}")},e))]}),(0,s.jsx)(M.T,{value:a.body,onChange:t=>{var a,s;return a=e.name,s=t.target.value,void c(e=>{var t;let r=null!=(t=e[a])?t:W;return{...e,[a]:{...r,body:s}}})},rows:18,className:"font-mono text-xs",disabled:a.loading,placeholder:a.loading?"loading…":""}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground font-mono truncate",children:a.path}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)(m.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{var t;return t=e.name,void(confirm("Reset ".concat(t,".md to the default template?"))&&h(async()=>{var e;let a=null!=(e=o[t])?e:W;c(e=>({...e,[t]:{...a,resetting:!0}}));let s=await O(t);c(e=>{var a;let r=null!=(a=e[t])?a:W;return{...e,[t]:{...r,resetting:!1,...s.ok&&s.body?{body:s.body}:{}}}}),s.ok?d.oR.success("".concat(t,".md reset")):d.oR.error("Reset failed: ".concat(s.error))}))},disabled:a.resetting||a.saving,children:[(0,s.jsx)(U.A,{className:"mr-1 h-4 w-4 ".concat(a.resetting?"animate-spin":"")}),"Reset to default"]}),(0,s.jsx)(m.$,{type:"button",size:"sm",onClick:()=>{var t;return t=e.name,void x(async()=>{let e=o[t];if(!e)return;c(a=>({...a,[t]:{...e,saving:!0}}));let a=await I(t,e.body);c(e=>{var a;let s=null!=(a=e[t])?a:W;return{...e,[t]:{...s,saving:!1}}}),a.ok?d.oR.success("".concat(t,".md saved")):d.oR.error("Save failed: ".concat(a.error))})},disabled:a.saving||a.loading,children:a.saving?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.A,{className:"mr-1 h-4 w-4 animate-spin"})," ","Saving…"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.A,{className:"mr-1 h-4 w-4"})," Save template"]})})]})]})]})})},e.name)})]})}var D=a(69285),B=a(487),G=a(35687),K=a(46972),Z=a(41379),q=a(13561);let V=(0,_.createServerReference)("4084031b7cda8d9195b4cd955d316112559c7cbf34",_.callServer,void 0,_.findSourceMapURL,"startMcpSetupAction"),Y=(0,_.createServerReference)("000a0be797e54ad8923f1a41ae97ec91836352dc88",_.callServer,void 0,_.findSourceMapURL,"listMcpServersAction"),H=(0,_.createServerReference)("40e6bcebbb2be2804866be07cc05e56ba89bacde4d",_.callServer,void 0,_.findSourceMapURL,"removeMcpServerAction"),X=(0,_.createServerReference)("40150a07c207939536776efe9789d1a7e3b81cb028",_.callServer,void 0,_.findSourceMapURL,"testMcpServerAction"),Q=(0,_.createServerReference)("4009c865d324196dd047dce582cdbae58b934ef4d7",_.callServer,void 0,_.findSourceMapURL,"addMcpServerAction");function ee(){let[e,t]=(0,r.useState)([]),[a,n]=(0,r.useTransition)(),[l,o]=(0,r.useState)(!1),[c,h]=(0,r.useState)(""),[p,f]=(0,r.useTransition)(),g=(0,D.useRouter)(),v=()=>{let e=c.trim();if(!e)return void d.oR.error("Опиши что подключить");f(async()=>{let t=await V(e);if(!t.ok)return void d.oR.error(t.error);d.oR.success("Открываю чат с агентом-установщиком"),h(""),g.push("/roots/".concat(t.rootId,"/chat/").concat(t.topicId))})},b=()=>{n(async()=>{let e=await Y();if(!e.ok)return void d.oR.error(e.error);t(e.servers)})};(0,r.useEffect)(()=>{b()},[]);let N=async e=>{if(!confirm('Удалить MCP-сервер "'.concat(e,'"?')))return;let t=await H(e);if(!t.ok){var a;d.oR.error(null!=(a=t.error)?a:"fail");return}d.oR.success("Удалён"),b()};return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)(u.Zp,{className:"reflex-gradient p-[2px]",children:(0,s.jsxs)("div",{className:"rounded-[7px] bg-background/95 p-4 space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,s.jsx)(B.A,{className:"h-4 w-4"}),(0,s.jsx)("span",{children:"Подключить через AI-мастер"})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Скажи человеческим языком (\xabподключи google calendar\xbb, \xabдобавь github mcp\xbb). Агент сам найдёт нужный пакет, объяснит где взять токен/выйти на OAuth, и выдаст готовую карточку — тебе останется только её одобрить."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(x.p,{value:c,onChange:e=>h(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),v())},placeholder:"Например: подключи google calendar",disabled:p,className:"flex-1"}),(0,s.jsxs)(m.$,{type:"button",onClick:v,disabled:p||!c.trim(),className:"gap-2",children:[p?(0,s.jsx)(i.A,{className:"h-4 w-4 animate-spin"}):(0,s.jsx)(P.A,{className:"h-4 w-4"}),"Запустить"]})]}),(0,s.jsx)("p",{className:"text-[10px] text-muted-foreground",children:"Откроется чат в твоём первом проекте — там агент задаст уточнения и предложит конфиг. Конфиг сохранится в реестр после твоего \xabЗарегистрировать\xbb."})]})}),a&&0===e.length?(0,s.jsx)(u.Zp,{children:(0,s.jsxs)(u.Wu,{className:"py-6 text-sm text-muted-foreground",children:[(0,s.jsx)(i.A,{className:"inline h-4 w-4 animate-spin mr-2"})," Loading…"]})}):0===e.length?(0,s.jsx)(u.Zp,{className:"border-dashed",children:(0,s.jsxs)(u.Wu,{className:"py-6 text-sm text-muted-foreground text-center",children:["Пока ни одного MCP-сервера. Добавь свой первый — он станет доступен утилитам (через ",(0,s.jsx)("code",{children:"manifest.mcpServers"}),") и чату."]})}):(0,s.jsx)("div",{className:"space-y-2",children:e.map(e=>{var t;return(0,s.jsx)(u.Zp,{children:(0,s.jsxs)(u.Wu,{className:"py-3 px-4 flex items-center gap-3",children:[(0,s.jsx)(G.A,{className:"h-4 w-4 text-muted-foreground"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"font-mono text-sm",children:e.id}),(0,s.jsx)(j.E,{variant:"outline",className:"text-[10px]",children:e.config.transport}),(0,s.jsx)("span",{className:"text-sm text-muted-foreground truncate",children:e.label})]}),(0,s.jsx)("div",{className:"text-[11px] text-muted-foreground font-mono truncate",children:"stdio"===e.config.transport?"".concat(e.config.command," ").concat((null!=(t=e.config.args)?t:[]).join(" ")):e.config.url}),e.description&&(0,s.jsx)("div",{className:"text-[11px] text-muted-foreground truncate",children:e.description})]}),(0,s.jsx)(m.$,{type:"button",size:"icon",variant:"ghost",onClick:()=>void N(e.id),title:"Удалить",className:"h-8 w-8",children:(0,s.jsx)(K.A,{className:"h-3.5 w-3.5"})})]})},e.id)})}),l?(0,s.jsx)(et,{existingIds:e.map(e=>e.id),onCancel:()=>o(!1),onAdded:()=>{o(!1),b()}}):(0,s.jsxs)(m.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>o(!0),className:"gap-2 text-muted-foreground",children:[(0,s.jsx)(Z.A,{className:"h-4 w-4"}),"Добавить вручную"]})]})}function et(e){var t;let{existingIds:a,onCancel:n,onAdded:l}=e,[c,p]=(0,r.useState)(""),[f,g]=(0,r.useState)(""),[v,b]=(0,r.useState)(""),[j,y]=(0,r.useState)("stdio"),[w,k]=(0,r.useState)(""),[S,R]=(0,r.useState)(""),[A,C]=(0,r.useState)(""),[z,P]=(0,r.useState)(""),[T,U]=(0,r.useState)(""),[L,_]=(0,r.useState)(null),[J,F]=(0,r.useTransition)(),[E,I]=(0,r.useTransition)(),O=()=>{if("stdio"===j){if(!w.trim())return{ok:!1,error:"command required"};try{let e=A.trim()?JSON.parse(A):{};return{ok:!0,config:{transport:"stdio",command:w.trim(),args:S.trim()?S.trim().split(/\s+/).filter(Boolean):[],env:e}}}catch(e){return{ok:!1,error:"env must be JSON object"}}}if(!z.trim())return{ok:!1,error:"URL required"};try{let e=T.trim()?JSON.parse(T):{};return{ok:!0,config:{transport:j,url:z.trim(),headers:e}}}catch(e){return{ok:!1,error:"headers must be JSON object"}}};return(0,s.jsx)(u.Zp,{children:(0,s.jsxs)(u.Wu,{className:"pt-5 space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("h3",{className:"text-sm font-medium flex items-center gap-2",children:[(0,s.jsx)(G.A,{className:"h-4 w-4"})," Новый MCP-сервер"]}),(0,s.jsx)(m.$,{type:"button",size:"icon",variant:"ghost",onClick:n,className:"h-7 w-7",children:(0,s.jsx)(q.A,{className:"h-3.5 w-3.5"})})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(h.J,{className:"text-xs",children:"ID (kebab-case)"}),(0,s.jsx)(x.p,{value:c,onChange:e=>p(e.target.value),placeholder:"github",className:"font-mono text-sm"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(h.J,{className:"text-xs",children:"Label"}),(0,s.jsx)(x.p,{value:f,onChange:e=>g(e.target.value),placeholder:"GitHub",className:"text-sm"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(h.J,{className:"text-xs",children:"Description (optional)"}),(0,s.jsx)(x.p,{value:v,onChange:e=>b(e.target.value),placeholder:"Доступ к репам, issues, PR-ам.",className:"text-sm"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(h.J,{className:"text-xs",children:"Transport"}),(0,s.jsxs)(N.l6,{value:j,onValueChange:e=>y(e),children:[(0,s.jsx)(N.bq,{className:"w-48",children:(0,s.jsx)(N.yv,{})}),(0,s.jsxs)(N.gC,{children:[(0,s.jsx)(N.eb,{value:"stdio",children:"stdio (subprocess)"}),(0,s.jsx)(N.eb,{value:"http",children:"HTTP (Streamable)"}),(0,s.jsx)(N.eb,{value:"sse",children:"SSE (legacy)"})]})]})]}),"stdio"===j?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(h.J,{className:"text-xs",children:"Command"}),(0,s.jsx)(x.p,{value:w,onChange:e=>k(e.target.value),placeholder:"npx",className:"font-mono text-sm"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(h.J,{className:"text-xs",children:"Args"}),(0,s.jsx)(x.p,{value:S,onChange:e=>R(e.target.value),placeholder:"-y @modelcontextprotocol/server-github",className:"font-mono text-sm"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(h.J,{className:"text-xs",children:"Env (JSON, optional)"}),(0,s.jsx)(M.T,{value:A,onChange:e=>C(e.target.value),placeholder:'{"GITHUB_TOKEN": "ghp_…"}',className:"font-mono text-xs",rows:3})]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(h.J,{className:"text-xs",children:"URL"}),(0,s.jsx)(x.p,{value:z,onChange:e=>P(e.target.value),placeholder:"https://example.com/mcp",className:"font-mono text-sm"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(h.J,{className:"text-xs",children:"Headers (JSON, optional)"}),(0,s.jsx)(M.T,{value:T,onChange:e=>U(e.target.value),placeholder:'{"Authorization": "Bearer …"}',className:"font-mono text-xs",rows:3})]})]}),L&&(0,s.jsxs)("div",{className:"rounded border border-emerald-300 bg-emerald-50 px-3 py-2 text-xs flex items-center gap-2 text-emerald-900",children:[(0,s.jsx)(o.A,{className:"h-3.5 w-3.5"}),(0,s.jsxs)("span",{children:["Подключился к"," ",(0,s.jsx)("span",{className:"font-mono",children:null!=(t=L.serverName)?t:"(anonymous)"})," ","\xb7 ",L.toolsCount," tools"]})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[(0,s.jsxs)(m.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{let e=O();if(!e.ok)return void d.oR.error(e.error);_(null),F(async()=>{var t;let a=await X(e.config);if(!a.ok)return void d.oR.error("Connect failed: "+a.error);_({...a.serverName?{serverName:a.serverName}:{},toolsCount:a.tools.length}),f||g(null!=(t=a.serverName)?t:c)})},disabled:J,children:[J?(0,s.jsx)(i.A,{className:"mr-1 h-3.5 w-3.5 animate-spin"}):null,"Проверить"]}),(0,s.jsxs)(m.$,{type:"button",size:"sm",onClick:()=>{let e=c.trim().toLowerCase();if(!e)return void d.oR.error("id required");if(a.includes(e))return void d.oR.error('id "'.concat(e,'" already used'));if(!f.trim())return void d.oR.error("label required");let t=O();if(!t.ok)return void d.oR.error(t.error);I(async()=>{let a=await Q({id:e,label:f.trim(),description:v.trim(),config:t.config});if(!a.ok)return void d.oR.error(a.error);d.oR.success('MCP-сервер "'.concat(e,'" добавлен')),l()})},disabled:E||!L,children:[E?(0,s.jsx)(i.A,{className:"mr-1 h-3.5 w-3.5 animate-spin"}):null,"Сохранить"]})]}),!L&&(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Сначала \xabПроверить\xbb чтобы убедиться, что сервер запускается."})]})})}var ea=a(94151),es=a(43153),er=a(69709),en=a(85924),ei=a(39783),el=a(25104),eo=a(66459),ec=a(45394),ed=a(37232),em=a(98485),eu=a(896);let ex=(0,_.createServerReference)("40812bbb3ae7151cca55ae636201a36059b80b43c1",_.callServer,void 0,_.findSourceMapURL,"probeOAuthAction"),eh=(0,_.createServerReference)("40e207674f6889cbdfe631e1ccdc6ef5f2d4cfd67e",_.callServer,void 0,_.findSourceMapURL,"disconnectOAuthAction"),ep=(0,_.createServerReference)("40fdd245f212c95b203223ec223c02cdc16789521b",_.callServer,void 0,_.findSourceMapURL,"deleteOAuthClientAction"),ef=(0,_.createServerReference)("40809a53941ea7f39534737148255eba3a5efa2c6a",_.callServer,void 0,_.findSourceMapURL,"removeCustomOAuthProviderAction"),eg=(0,_.createServerReference)("40da24e8b6ef8a66a05907d28bd647117e40e20547",_.callServer,void 0,_.findSourceMapURL,"addCustomOAuthProviderAction");function ev(){let[e,t]=(0,r.useState)([]),[a,n]=(0,r.useTransition)(),[l,o]=(0,r.useState)(!1),c=()=>{n(async()=>{let e=await (0,ec.o)();if(!e.ok)return void d.oR.error(e.error);t(e.statuses)})};return((0,r.useEffect)(()=>{c()},[]),a&&0===e.length)?(0,s.jsx)(u.Zp,{children:(0,s.jsxs)(u.Wu,{className:"py-6 text-sm text-muted-foreground",children:[(0,s.jsx)(i.A,{className:"inline h-4 w-4 animate-spin mr-2"})," Loading…"]})}):(0,s.jsxs)("div",{className:"space-y-2",children:[e.map(e=>(0,s.jsx)(eb,{status:e,onChanged:c},e.id)),l?(0,s.jsx)(ej,{existingIds:e.map(e=>e.id),onCancel:()=>o(!1),onAdded:()=>{o(!1),c()}}):(0,s.jsxs)(m.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>o(!0),className:"gap-2 text-muted-foreground",children:[(0,s.jsx)(Z.A,{className:"h-4 w-4"}),"Добавить кастомный provider"]})]})}function eb(e){let{status:t,onChanged:a}=e,[n,o]=(0,r.useState)(!1),[c,p]=(0,r.useState)(null),[f,g]=(0,r.useState)([]),[v,b]=(0,r.useState)(""),[N,y]=(0,r.useState)(""),[w,k]=(0,r.useState)(""),[S,R]=(0,r.useTransition)(),[A,C]=(0,r.useTransition)(),[z,P]=(0,r.useTransition)();(0,r.useEffect)(()=>{n&&(async()=>{let e=await (0,ed.J)(t.id);if(!e.ok)return d.oR.error(e.error);p(e.client),g(e.defaultScopes),e.client&&(b(e.client.clientId),k(e.client.scopes.join(" ")))})()},[n]);let T=async()=>{if(!confirm("Удалить сохранённые токены для ".concat(t.label,"?")))return;let e=await eh(t.id);if(!e.ok)return void d.oR.error(e.error);d.oR.success("Disconnected"),a()},M=async()=>{if(!confirm("Удалить весь OAuth-конфиг для ".concat(t.label," (client_id, secret и токены)?")))return;let e=await ep(t.id);if(!e.ok)return void d.oR.error(e.error);d.oR.success("Forgotten"),p(null),b(""),k(""),a()};return(0,s.jsx)(u.Zp,{children:(0,s.jsxs)(u.Wu,{className:"py-3 px-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(ea.A,{className:"h-4 w-4 text-muted-foreground shrink-0"}),(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("span",{className:"text-sm font-medium",children:t.label}),(0,s.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground",children:t.id}),"user"===t.origin&&(0,s.jsx)(j.E,{variant:"outline",className:"text-[10px]",children:"custom"}),t.hasClient?t.hasTokens?(0,s.jsxs)(j.E,{variant:"secondary",className:"gap-1",children:[(0,s.jsx)(es.A,{className:"h-3 w-3"})," авторизован"]}):(0,s.jsx)(j.E,{variant:"outline",className:"border-amber-400 text-amber-700",children:"готов к авторизации"}):(0,s.jsx)(j.E,{variant:"outline",children:"не настроен"}),t.hasTokens&&t.expiresAt&&(0,s.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:["истекает"," ",new Date(t.expiresAt).toLocaleTimeString()]})]})}),(0,s.jsxs)(m.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>o(e=>!e),className:"gap-1",children:[(0,s.jsx)(er.A,{className:"h-3.5 w-3.5 transition-transform ".concat(n?"rotate-180":"")}),n?"Свернуть":"Настроить"]})]}),n&&(0,s.jsxs)("div",{className:"mt-4 pl-7 space-y-3 border-l-2 ml-1.5",children:[t.setupHint&&(0,s.jsxs)("div",{className:"rounded border border-amber-200 bg-amber-50 px-3 py-2 text-[11px] text-amber-900 flex items-start gap-2",children:[(0,s.jsx)(en.A,{className:"h-3.5 w-3.5 mt-0.5 shrink-0"}),(0,s.jsx)("span",{children:t.setupHint})]}),(0,s.jsxs)("a",{href:t.consoleUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-violet-700 hover:underline",children:[(0,s.jsx)(ei.A,{className:"h-3 w-3"}),"Открыть консоль ",t.label]}),t.setupSteps&&t.setupSteps.length>0&&(0,s.jsxs)("div",{className:"rounded border border-violet-200 bg-violet-50/30 p-3",children:[(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-2",children:"Пошагово"}),(0,s.jsx)(eo.O,{steps:t.setupSteps})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(h.J,{className:"text-xs",children:"Client ID"}),(0,s.jsx)(x.p,{value:v,onChange:e=>b(e.target.value),placeholder:"123456789-xxxxx.apps.googleusercontent.com",className:"font-mono text-xs h-8"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(h.J,{className:"text-xs",children:["Client secret",(null==c?void 0:c.hasSecret)&&(0,s.jsx)("span",{className:"ml-2 text-muted-foreground",children:"(сохранён, оставь пустым чтобы не менять)"})]}),(0,s.jsx)(x.p,{type:"password",value:N,onChange:e=>y(e.target.value),placeholder:(null==c?void 0:c.hasSecret)?"••••":"GOCSPX-…",className:"font-mono text-xs h-8"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(h.J,{className:"text-xs",children:["Scopes"," ",(0,s.jsxs)("span",{className:"text-muted-foreground",children:["(по умолчанию: ",f.join(" ")||"—",")"]})]}),(0,s.jsx)(x.p,{value:w,onChange:e=>k(e.target.value),placeholder:f.join(" "),className:"font-mono text-xs h-8"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 pt-1",children:[(0,s.jsxs)(m.$,{type:"button",size:"sm",onClick:()=>{R(async()=>{let e=w.trim().split(/[\s,]+/).filter(e=>e.length>0),s=await (0,em.S)({provider:t.id,clientId:v,...N?{clientSecret:N}:{},...e.length>0?{scopes:e}:{}});if(!s.ok)return void d.oR.error(s.error);d.oR.success("Client config saved"),y(""),a();let r=await (0,ed.J)(t.id);r.ok&&p(r.client)})},disabled:S||!v.trim(),children:[S?(0,s.jsx)(i.A,{className:"mr-1 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(l.A,{className:"mr-1 h-3.5 w-3.5"}),"Сохранить"]}),(0,s.jsxs)(m.$,{type:"button",size:"sm",variant:"outline",onClick:()=>{C(async()=>{let e=await (0,eu.T)(t.id);if(!e.ok)return void d.oR.error(e.error);window.open(e.authorizeUrl,"reflex-oauth","width=600,height=720,noopener=no")||window.open(e.authorizeUrl,"_blank","noopener");let s=Date.now(),r=async()=>{if(Date.now()-s>3e5)return void d.oR.error("Authorization timed out");let e=await (0,ec.o)();if(e.ok){let s=e.statuses.find(e=>e.id===t.id);if((null==s?void 0:s.hasTokens)&&!t.hasTokens){d.oR.success("Authorized"),a();return}}setTimeout(()=>void r(),1500)};r()})},disabled:A||!c,className:"gap-1",children:[A?(0,s.jsx)(i.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(ei.A,{className:"h-3.5 w-3.5"}),t.hasTokens?"Re-authorize":"Authorize"]}),t.hasTokens&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(m.$,{type:"button",size:"sm",variant:"outline",onClick:()=>{P(async()=>{let e=await ex(t.id);if(!e.ok){var a;d.oR.error(null!=(a=e.error)?a:"probe failed");return}d.oR.success("Access token живой")})},disabled:z,children:[z&&(0,s.jsx)(i.A,{className:"mr-1 h-3.5 w-3.5 animate-spin"}),(0,s.jsx)(G.A,{className:"mr-1 h-3.5 w-3.5"})," Проверить токен"]}),(0,s.jsxs)(m.$,{type:"button",size:"sm",variant:"ghost",onClick:T,children:[(0,s.jsx)(el.A,{className:"mr-1 h-3.5 w-3.5"}),"Disconnect"]})]}),c&&(0,s.jsxs)(m.$,{type:"button",size:"sm",variant:"ghost",onClick:M,className:"text-muted-foreground",children:[(0,s.jsx)(U.A,{className:"mr-1 h-3.5 w-3.5"}),"Forget client"]}),"user"===t.origin&&(0,s.jsxs)(m.$,{type:"button",size:"sm",variant:"ghost",className:"text-destructive ml-auto",onClick:async()=>{if(!confirm('Удалить custom provider "'.concat(t.id,'" полностью (вместе с client + tokens)?')))return;let e=await ef(t.id);if(!e.ok)return void d.oR.error(e.error);await ep(t.id),d.oR.success("Provider удалён"),a()},children:[(0,s.jsx)(K.A,{className:"mr-1 h-3.5 w-3.5"}),"Удалить provider"]})]}),(0,s.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["Используй ",(0,s.jsxs)("code",{className:"font-mono",children:["$oauth:",t.id]})," в env/headers любого MCP-сервера — Reflex подставит свежий access_token при каждом вызове (с авто-refresh'ем)."]})]})]})})}function ej(e){let{existingIds:t,onCancel:a,onAdded:n}=e,[l,o]=(0,r.useState)(""),[c,p]=(0,r.useState)(""),[f,g]=(0,r.useState)(""),[v,b]=(0,r.useState)(""),[j,N]=(0,r.useState)(""),[y,w]=(0,r.useState)(""),[k,S]=(0,r.useState)(""),[R,A]=(0,r.useState)(!0),[C,z]=(0,r.useState)(!0),[P,T]=(0,r.useState)(!0),[U,L]=(0,r.useState)(""),[_,J]=(0,r.useTransition)();return(0,s.jsx)(u.Zp,{children:(0,s.jsxs)(u.Wu,{className:"pt-5 space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("h3",{className:"text-sm font-medium flex items-center gap-2",children:[(0,s.jsx)(Z.A,{className:"h-4 w-4"})," Кастомный OAuth provider"]}),(0,s.jsx)(m.$,{type:"button",size:"icon",variant:"ghost",onClick:a,className:"h-7 w-7",children:(0,s.jsx)(q.A,{className:"h-3.5 w-3.5"})})]}),(0,s.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["Любой OAuth 2.0 сервис со стандартным Authorization Code flow. Redirect URI:"," ",(0,s.jsx)("code",{className:"font-mono",children:"http://localhost:3210/api/oauth/callback"}),"."]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(h.J,{className:"text-xs",children:"ID (kebab-case)"}),(0,s.jsx)(x.p,{value:l,onChange:e=>o(e.target.value),placeholder:"dropbox",className:"font-mono text-sm h-8"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(h.J,{className:"text-xs",children:"Label"}),(0,s.jsx)(x.p,{value:c,onChange:e=>p(e.target.value),placeholder:"Dropbox",className:"text-sm h-8"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(h.J,{className:"text-xs",children:"Authorize URL"}),(0,s.jsx)(x.p,{value:f,onChange:e=>g(e.target.value),placeholder:"https://example.com/oauth/authorize",className:"font-mono text-sm h-8"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(h.J,{className:"text-xs",children:"Token URL"}),(0,s.jsx)(x.p,{value:v,onChange:e=>b(e.target.value),placeholder:"https://example.com/oauth/token",className:"font-mono text-sm h-8"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(h.J,{className:"text-xs",children:"Default scopes (space-separated)"}),(0,s.jsx)(x.p,{value:j,onChange:e=>N(e.target.value),placeholder:"read write",className:"font-mono text-sm h-8"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(h.J,{className:"text-xs",children:"Console URL (где брать credentials)"}),(0,s.jsx)(x.p,{value:y,onChange:e=>w(e.target.value),placeholder:"https://www.dropbox.com/developers/apps",className:"font-mono text-sm h-8"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(h.J,{className:"text-xs",children:"Setup hint (показывается пользователю)"}),(0,s.jsx)(M.T,{value:k,onChange:e=>S(e.target.value),placeholder:"Иди в Dropbox App Console → Create App → Permission type: Scoped access. Redirect URI: http://localhost:3210/api/oauth/callback.",className:"text-xs",rows:3})]}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-3 text-xs",children:[(0,s.jsxs)("label",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",checked:R,onChange:e=>A(e.target.checked)}),"PKCE"]}),(0,s.jsxs)("label",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",checked:C,onChange:e=>z(e.target.checked)}),"refresh_token"]}),(0,s.jsxs)("label",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",checked:P,onChange:e=>T(e.target.checked)}),"client_secret"]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(h.J,{className:"text-xs",children:"Extra authorize params (JSON, optional)"}),(0,s.jsx)(M.T,{value:U,onChange:e=>L(e.target.value),placeholder:'{"access_type": "offline", "prompt": "consent"}',className:"font-mono text-xs",rows:2})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[(0,s.jsx)(m.$,{type:"button",variant:"ghost",size:"sm",onClick:a,children:"Отмена"}),(0,s.jsxs)(m.$,{type:"button",size:"sm",onClick:()=>{let e=l.trim().toLowerCase();if(!e)return void d.oR.error("id обязателен");if(t.includes(e))return void d.oR.error('provider "'.concat(e,'" уже существует'));if(!f.trim()||!v.trim())return void d.oR.error("authorizeUrl и tokenUrl обязательны");let a={};if(U.trim())try{a=JSON.parse(U)}catch(e){d.oR.error("extraAuthorizeParams должен быть JSON-объектом");return}let s=j.trim().split(/[\s,]+/).filter(e=>e.length>0);J(async()=>{let t=await eg({id:e,label:c.trim()||e,authorizeUrl:f.trim(),tokenUrl:v.trim(),defaultScopes:s,supportsPKCE:R,refreshTokenSupported:C,needsClientSecret:P,extraAuthorizeParams:a,setupHint:k.trim(),consoleUrl:y.trim()||"http://localhost:3210/api/oauth/callback"});if(!t.ok)return void d.oR.error(t.error);d.oR.success('Provider "'.concat(e,'" добавлен')),n()})},disabled:_||!l.trim()||!f.trim()||!v.trim(),children:[_&&(0,s.jsx)(i.A,{className:"mr-1 h-3.5 w-3.5 animate-spin"}),"Создать provider"]})]})]})})}let eN=(0,_.createServerReference)("40005cf3d13239849c55972ebb98aacb986e67de11",_.callServer,void 0,_.findSourceMapURL,"hasApiKeyAction"),ey=(0,_.createServerReference)("40d982925be69266f12ff9cbf16f52d32c99cf7e09",_.callServer,void 0,_.findSourceMapURL,"listGeminiModelsAction");var ew=a(85171);let ek=(0,_.createServerReference)("402911dc86b1ac898af85fb3251818acdd51a6f4e4",_.callServer,void 0,_.findSourceMapURL,"saveGeminiModelChoiceAction");function eS(){let[e,t]=(0,r.useState)(!1),[a,o]=(0,r.useState)(""),[c,p]=(0,r.useState)([]),[f,g]=(0,r.useState)(""),[v,b]=(0,r.useState)(""),[N,y]=(0,r.useTransition)(),[w,k]=(0,r.useTransition)(),[S,R]=(0,r.useTransition)(),A=async()=>{t((await eN("gemini")).present)},C=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];y(async()=>{let a=await ey(t);if(!a.ok){if(!e)return;d.oR.error(a.error);return}p(a.models),g(a.currentModel),b(a.currentVideoModel)})};(0,r.useEffect)(()=>{(async()=>{await A()})()},[]),(0,r.useEffect)(()=>{e&&C(!1)},[e]);let z=(e,t)=>{R(async()=>{let a=await ek({[e]:t||null});if(!a.ok)return void d.oR.error(a.error);d.oR.success("Сохранено"),"model"===e?g(t):b(t)})};return(0,s.jsx)(u.Zp,{children:(0,s.jsxs)(u.Wu,{className:"pt-5 space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,s.jsx)(P.A,{className:"h-4 w-4"}),(0,s.jsx)("span",{children:"Gemini API"}),e?(0,s.jsxs)(j.E,{variant:"secondary",className:"gap-1",children:[(0,s.jsx)(es.A,{className:"h-3 w-3"})," key сохранён"]}):(0,s.jsx)(j.E,{variant:"outline",children:"не настроен"})]}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Используется для суммаризации YouTube (нативная поддержка мультимодальных URL) ",(0,s.jsx)("strong",{children:"и для генерации картинок"})," ","через модель Nano Banana (",(0,s.jsx)("code",{className:"font-mono",children:"gemini-2.5-flash-image"}),", ~$0.04 за картинку). Ключ хранится локально в"," ",(0,s.jsx)("code",{className:"font-mono",children:"~/.reflex/api-keys/gemini.json"})," ","(0600), агентам не передаётся. Возьми ключ в"," ",(0,s.jsxs)("a",{href:"https://aistudio.google.com/apikey",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-violet-700 hover:underline",children:["aistudio.google.com/apikey",(0,s.jsx)(ei.A,{className:"h-3 w-3"})]})," ","— есть бесплатный tier (15 RPM / 1500 RPD)."]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsxs)(h.J,{className:"text-xs flex items-center gap-1",children:[(0,s.jsx)(ea.A,{className:"h-3 w-3"}),e?"Заменить ключ":"API key"]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(x.p,{type:"password",value:a,onChange:e=>o(e.target.value),placeholder:e?"••••":"AIza…",className:"font-mono text-sm flex-1 h-8",disabled:w}),(0,s.jsxs)(m.$,{type:"button",size:"sm",onClick:()=>{if(!a.trim())return void d.oR.error("Введи ключ");k(async()=>{let e=await (0,ew.A)(a.trim());if(!e.ok)return void d.oR.error(e.error);d.oR.success("Gemini key сохранён"),o(""),t(!0),C(!0)})},disabled:w||!a.trim(),className:"h-8 gap-1",children:[w?(0,s.jsx)(i.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(l.A,{className:"h-3 w-3"}),"Сохранить"]})]})]}),e&&(0,s.jsxs)("div",{className:"space-y-3 pt-1 border-t",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:["Модели подтянуты с"," ",(0,s.jsx)("code",{className:"font-mono",children:"v1beta/models"})," ",c.length>0&&"(".concat(c.length,")")]}),(0,s.jsxs)(m.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>C(!0),disabled:N,className:"h-7 text-xs gap-1",children:[N?(0,s.jsx)(i.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(n.A,{className:"h-3 w-3"}),"Обновить"]})]}),(0,s.jsx)(eR,{label:"Default model",hint:"Используется для общих вызовов Gemini, когда конкретная задача не указана.",value:f,models:c,disabled:S||N,onChange:e=>z("model",e)}),(0,s.jsx)(eR,{label:"Модель для YouTube",hint:"Для суммаризации видео. Flash-варианты быстрее и обычно достаточно умные.",value:v,models:c,disabled:S||N,onChange:e=>z("videoModel",e)})]})]})})}function eR(e){let{label:t,hint:a,value:r,models:n,disabled:i,onChange:l}=e,o=new Set(n.map(e=>e.id)).has(r)?n:r?[{id:r,displayName:"".concat(r," (saved)")},...n]:n;return(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(h.J,{className:"text-xs",children:t}),(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground",children:a}),(0,s.jsxs)(N.l6,{value:r,onValueChange:l,disabled:i,children:[(0,s.jsx)(N.bq,{className:"h-8 w-full",children:(0,s.jsx)(N.yv,{placeholder:"(default)"})}),(0,s.jsx)(N.gC,{children:o.map(e=>(0,s.jsx)(N.eb,{value:e.id,children:(0,s.jsxs)("span",{className:"flex items-baseline gap-2",children:[(0,s.jsx)("span",{className:"font-mono text-xs",children:e.id}),e.displayName&&e.displayName!==e.id&&(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:e.displayName})]})},e.id))})]})]})}var eA=a(39160);let eC=(0,_.createServerReference)("0069ccf3064400ffff18e3bf53711fd72333b49d4a",_.callServer,void 0,_.findSourceMapURL,"braveKeyStatusAction"),ez=(0,_.createServerReference)("60ae82b56eb541f747e94888660b96304508eaed62",_.callServer,void 0,_.findSourceMapURL,"saveImageProviderKeyAction");function eP(){return(0,s.jsx)(u.Zp,{children:(0,s.jsxs)(u.Wu,{className:"pt-5 space-y-5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,s.jsx)(eA.A,{className:"h-4 w-4"}),(0,s.jsx)("span",{children:"Картинки из сети"})]}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Ключи к API stock-фотобанков. Используются виджетом \xabКартинка в KB\xbb и хост-API утилит (",(0,s.jsx)("code",{className:"font-mono",children:"reflex.images.search"}),"). Хранятся локально в ",(0,s.jsx)("code",{className:"font-mono",children:"~/.reflex/api-keys/"})," (0600)."]}),(0,s.jsx)(eT,{provider:"unsplash",label:"Unsplash",docsHref:"https://unsplash.com/developers",hint:"Бесплатно 50 запросов/час. Атрибуция авторов обязательна — модалка вставляет её автоматически."}),(0,s.jsx)(eT,{provider:"pexels",label:"Pexels",docsHref:"https://pexels.com/api/",hint:"Без жёсткого лимита для разумного использования. Атрибуция рекомендована."}),(0,s.jsx)(eT,{provider:"brave",label:"Brave (весь веб)",docsHref:"https://api-dashboard.search.brave.com/app/keys",hint:"Поиск картинок по всему вебу (не только stock). Если у тебя уже подключён Brave Search MCP — ключ оттуда подхватится автоматически, поле можно не заполнять."})]})})}function eT(e){let{provider:t,label:a,docsHref:n,hint:o}=e,[c,u]=(0,r.useState)(!1),[p,f]=(0,r.useState)(!1),[g,v]=(0,r.useState)(""),[b,N]=(0,r.useTransition)();return(0,r.useEffect)(()=>{(async()=>{let e=await eN(t);u(e.present),"brave"!==t||e.present||f((await eC()).viaMcp)})()},[t]),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-medium",children:a}),c?(0,s.jsxs)(j.E,{variant:"secondary",className:"gap-1",children:[(0,s.jsx)(es.A,{className:"h-3 w-3"})," key сохранён"]}):p?(0,s.jsxs)(j.E,{variant:"secondary",className:"gap-1",children:[(0,s.jsx)(es.A,{className:"h-3 w-3"})," ключ найден через MCP"]}):(0,s.jsx)(j.E,{variant:"outline",children:"не настроен"}),(0,s.jsxs)("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"ml-auto inline-flex items-center gap-1 text-xs text-violet-700 hover:underline",children:["docs ",(0,s.jsx)(ei.A,{className:"h-3 w-3"})]})]}),(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground",children:o}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsxs)(h.J,{className:"sr-only",htmlFor:"".concat(t,"-key"),children:[(0,s.jsx)(ea.A,{className:"h-3 w-3"})," ",a," key"]}),(0,s.jsx)(x.p,{id:"".concat(t,"-key"),type:"password",value:g,onChange:e=>v(e.target.value),placeholder:c?"••••":"".concat(a," access key"),className:"font-mono text-sm flex-1 h-8",disabled:b}),(0,s.jsxs)(m.$,{type:"button",size:"sm",onClick:()=>{if(!g.trim())return void d.oR.error("Введи ключ");N(async()=>{let e=await ez(t,g.trim());if(!e.ok)return void d.oR.error(e.error);d.oR.success("".concat(a," key сохранён")),v(""),u(!0)})},disabled:b||!g.trim(),className:"h-8 gap-1",children:[b?(0,s.jsx)(i.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(l.A,{className:"h-3 w-3"}),"Сохранить"]})]})]})}var eU=a(23559),eM=a(68682);function eL(e){let{settings:t,onChange:a}=e,r=new Set(t.mapServices.enabled);return(0,s.jsx)(u.Zp,{children:(0,s.jsxs)(u.Wu,{className:"pt-5 space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,s.jsx)(eU.A,{className:"h-4 w-4 text-emerald-700"}),(0,s.jsx)("span",{children:"Сервисы маршрутов"})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Выбранные сервисы появятся в попапе на каждой точке карта-виджета — \xabМаршрут в…\xbb. Ссылка генерится прямо из координат, без посредников. Можно проверить превью-ссылку (точка по умолчанию — центр Москвы)."}),(0,s.jsx)("ul",{className:"space-y-1.5",children:eM.yp.map(e=>{let t=r.has(e.id);return(0,s.jsxs)("li",{className:"flex items-start gap-2 rounded-md border bg-card px-3 py-2",children:[(0,s.jsx)("input",{id:"map-svc-".concat(e.id),type:"checkbox",checked:t,onChange:()=>(e=>{let t=new Set(r);t.has(e)?t.delete(e):t.add(e),a({mapServices:{enabled:[...t]}})})(e.id),className:"mt-1 h-3.5 w-3.5"}),(0,s.jsxs)("label",{htmlFor:"map-svc-".concat(e.id),className:"min-w-0 flex-1 cursor-pointer",children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:e.label}),(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground mt-0.5 leading-snug",children:e.description})]}),(0,s.jsxs)("a",{href:e.urlFor(55.7558,37.6173),target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-muted-foreground hover:underline inline-flex items-center gap-0.5 shrink-0 mt-1",title:"Открыть превью-ссылку",children:["превью",(0,s.jsx)(ei.A,{className:"h-2.5 w-2.5"})]})]},e.id)})})]})})}var e_=a(2136),eJ=a(84860),eF=a(67805),eE=a(35101);let eI=(0,_.createServerReference)("007586d80d3d9afecdd15a851ec6b13b2984a6600d",_.callServer,void 0,_.findSourceMapURL,"refreshReservedDomainsAction"),eO=(0,_.createServerReference)("40f1ee513b299e663498197ffcdae6b859fb9f5187",_.callServer,void 0,_.findSourceMapURL,"patchNgrokSettingsAction"),eW=(0,_.createServerReference)("0064965602a92a7e6738f2dd50c9c8649e58098591",_.callServer,void 0,_.findSourceMapURL,"startTunnelAction"),e$=(0,_.createServerReference)("00d90c83ff3818ac4300bbac96d6eb8cc271e49800",_.callServer,void 0,_.findSourceMapURL,"stopTunnelAction"),eD=(0,_.createServerReference)("006be381f3bd84d5b49ca424fdcbdd5ba7aa2732e5",_.callServer,void 0,_.findSourceMapURL,"listSharesAction"),eB=(0,_.createServerReference)("40c646e8ace5a31f08b0a566acfd6617e206ed1651",_.callServer,void 0,_.findSourceMapURL,"deleteShareAction");function eG(e){let{settings:t,onChange:a}=e,l=t.ngrok,[c,m]=(0,r.useState)({running:!1}),[x,h]=(0,r.useState)(null),[p,f]=(0,r.useState)(null),[g,v]=(0,r.useState)([]),[b,j]=(0,r.useTransition)(),[N,y]=(0,r.useTransition)(),[w,k]=(0,r.useState)(0),S=(0,r.useRef)(null),R=(0,r.useRef)(""),A=async()=>{let e=await (0,eE.N)();m(e.status),h(e.cliVersion),v((await eD()).shares)};(0,r.useEffect)(()=>{A();let e=setInterval(()=>void A(),1e4);return()=>clearInterval(e)},[]);let C=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=await eI();if(!t.ok){e||d.oR.error(t.error);return}f(t.domains),e||d.oR.success("Загружено доменов: ".concat(t.domains.length))},z=e=>{a({ngrok:{...l,...e}}),S.current&&clearTimeout(S.current),S.current=setTimeout(async()=>{let t=await eO(e);if(!t.ok){var a;d.oR.error("ngrok settings: "+(null!=(a=t.error)?a:"save failed"));return}k(e=>e+1),"string"==typeof e.apiKey&&e.apiKey.trim()&&e.apiKey!==R.current&&(R.current=e.apiKey,C(!0))},600)};(0,r.useEffect)(()=>{l.apiKey.trim()&&""===R.current&&(R.current=l.apiKey,C(!0))},[]);let P=async()=>{S.current&&(clearTimeout(S.current),S.current=null,await eO(l))},T=()=>{y(async()=>{await P(),await e$(),await new Promise(e=>setTimeout(e,400));let e=await eW();if(!e.ok)return void d.oR.error(e.error);d.oR.success(e.publicUrl?"Tunnel перезапущен: ".concat(e.publicUrl):"Tunnel перезапущен, URL формируется..."),await A()})},U=(()=>{try{return c.publicUrl?new URL(c.publicUrl).hostname:""}catch(e){return""}})(),M=l.domain.trim(),L=c.running&&M&&U!==M,_=c.running&&c.port!==l.port;return(0,s.jsx)(u.Zp,{children:(0,s.jsxs)(u.Wu,{className:"pt-5 space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,s.jsx)(e_.A,{className:"h-4 w-4 text-violet-600"}),(0,s.jsx)("span",{children:"Публичные ссылки через ngrok"}),x?(0,s.jsx)("span",{className:"text-[10px] font-mono text-muted-foreground ml-1",children:x.split("\n")[0]}):(0,s.jsxs)("span",{className:"text-[10px] text-destructive ml-1 inline-flex items-center gap-0.5",children:[(0,s.jsx)(en.A,{className:"h-3 w-3"}),"ngrok CLI не найден"]}),w>0&&(0,s.jsxs)("span",{className:"ml-auto text-[10px] text-emerald-700 inline-flex items-center gap-0.5",title:"Изменения сохранены автоматически",children:[(0,s.jsx)(o.A,{className:"h-3 w-3"}),"сохранено"]},w)]}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Reflex запускает ",(0,s.jsx)("code",{className:"font-mono",children:"ngrok http"})," с твоим токеном; на ngrok-домене разрешены только пути"," ",(0,s.jsx)("code",{className:"font-mono",children:"/share/*"}),". Установи"," ",(0,s.jsx)("a",{href:"https://ngrok.com/download",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"ngrok CLI"})," ","в PATH перед запуском."]}),(0,s.jsxs)("div",{className:"grid gap-2",children:[(0,s.jsx)("label",{className:"text-xs font-medium",htmlFor:"ngrok-token",children:"Authtoken (agent)"}),(0,s.jsx)("input",{id:"ngrok-token",type:"password",autoComplete:"off",value:l.authtoken,onChange:e=>z({authtoken:e.target.value}),placeholder:"2abc...xyz",className:"rounded border bg-background px-2 py-1.5 text-xs font-mono focus:outline-none focus:ring-1 focus:ring-violet-400"}),(0,s.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["Найди в"," ",(0,s.jsx)("a",{href:"https://dashboard.ngrok.com/get-started/your-authtoken",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"ngrok dashboard → Your Authtoken"}),". Сохраняется в ",(0,s.jsx)("code",{className:"font-mono",children:"~/.reflex/ngrok.yml"})," ","(0600)."]})]}),(0,s.jsxs)("div",{className:"grid gap-2",children:[(0,s.jsx)("label",{className:"text-xs font-medium",htmlFor:"ngrok-apikey",children:"API key (для списка доменов, опционально)"}),(0,s.jsx)("input",{id:"ngrok-apikey",type:"password",autoComplete:"off",value:l.apiKey,onChange:e=>z({apiKey:e.target.value}),placeholder:"2abc...xyz",className:"rounded border bg-background px-2 py-1.5 text-xs font-mono focus:outline-none focus:ring-1 focus:ring-violet-400"}),(0,s.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["Возьми в"," ",(0,s.jsx)("a",{href:"https://dashboard.ngrok.com/api",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"dashboard → API → API keys"}),". Используется только для GET-запроса списка reserved-доменов."]})]}),(0,s.jsxs)("div",{className:"grid gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("label",{className:"text-xs font-medium",htmlFor:"ngrok-domain",children:"Reserved domain (если есть)"}),(0,s.jsxs)("button",{type:"button",onClick:()=>{j(async()=>{await C()})},disabled:b||!l.apiKey,className:"text-[11px] inline-flex items-center gap-1 text-violet-700 hover:underline disabled:opacity-50",children:[b?(0,s.jsx)(i.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(n.A,{className:"h-3 w-3"}),"Обновить список"]})]}),p&&p.length>0?(0,s.jsxs)("select",{id:"ngrok-domain",value:l.domain,onChange:e=>z({domain:e.target.value}),className:"rounded border bg-background px-2 py-1.5 text-xs focus:outline-none focus:ring-1 focus:ring-violet-400",children:[(0,s.jsx)("option",{value:"",children:"— random subdomain (free tier) —"}),p.map(e=>(0,s.jsxs)("option",{value:e.domain,children:[e.domain,e.region?" (".concat(e.region,")"):""]},e.id))]}):(0,s.jsx)("input",{id:"ngrok-domain",type:"text",value:l.domain,onChange:e=>z({domain:e.target.value}),placeholder:"my-app.ngrok-free.app или оставь пустым",className:"rounded border bg-background px-2 py-1.5 text-xs font-mono focus:outline-none focus:ring-1 focus:ring-violet-400"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-end",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs font-medium",htmlFor:"ngrok-port",children:"Локальный порт"}),(0,s.jsx)("input",{id:"ngrok-port",type:"number",min:1,max:65535,value:l.port,onChange:e=>z({port:Math.max(1,Number(e.target.value)||3210)}),className:"mt-1 w-32 rounded border bg-background px-2 py-1.5 text-xs font-mono focus:outline-none focus:ring-1 focus:ring-violet-400"})]}),c.running?(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsxs)("button",{type:"button",onClick:T,disabled:N,className:"rounded border px-3 py-1.5 text-xs font-medium hover:bg-accent disabled:opacity-50 inline-flex items-center gap-1",title:"Остановить и снова запустить с текущими настройками",children:[N?(0,s.jsx)(i.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(n.A,{className:"h-3 w-3"}),"Перезапустить"]}),(0,s.jsxs)("button",{type:"button",onClick:()=>{y(async()=>{await e$(),d.oR.success("Tunnel остановлен"),await A()})},disabled:N,className:"rounded bg-destructive px-3 py-1.5 text-xs font-medium text-white hover:bg-destructive/90 disabled:opacity-50 inline-flex items-center gap-1",children:[N?(0,s.jsx)(i.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(eJ.A,{className:"h-3 w-3"}),"Остановить"]})]}):(0,s.jsxs)("button",{type:"button",onClick:()=>{y(async()=>{await P();let e=await eW();if(!e.ok)return void d.oR.error(e.error);d.oR.success(e.publicUrl?"Tunnel запущен: ".concat(e.publicUrl):"Tunnel запущен, URL ещё формируется..."),await A()})},disabled:N||!l.authtoken,className:"rounded bg-violet-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-violet-700 disabled:opacity-50 inline-flex items-center gap-1",children:[N?(0,s.jsx)(i.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(eF.A,{className:"h-3 w-3"}),"Запустить"]})]}),c.running&&(0,s.jsxs)("div",{className:"rounded border border-emerald-300 bg-emerald-50 dark:bg-emerald-950/30 dark:border-emerald-900/50 px-3 py-2 text-xs space-y-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-emerald-800 dark:text-emerald-200",children:[(0,s.jsx)(o.A,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:"Tunnel активен"})]}),c.publicUrl?(0,s.jsx)("a",{href:c.publicUrl,target:"_blank",rel:"noopener noreferrer",className:"block font-mono text-violet-700 hover:underline truncate",children:c.publicUrl}):(0,s.jsx)("p",{className:"text-muted-foreground",children:"URL ещё формируется…"}),(0,s.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["Запущен ",c.startedAt&&new Date(c.startedAt).toLocaleTimeString()," ","\xb7 порт ",c.port]})]}),(L||_)&&(0,s.jsxs)("div",{className:"rounded border border-amber-300 bg-amber-50 dark:bg-amber-950/30 dark:border-amber-900/50 px-3 py-2 text-xs space-y-1.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-amber-800 dark:text-amber-200 font-medium",children:[(0,s.jsx)(en.A,{className:"h-3.5 w-3.5"}),"Настройки изменились — перезапусти туннель"]}),(0,s.jsxs)("ul",{className:"text-[11px] text-amber-900 dark:text-amber-100 list-disc pl-4 space-y-0.5",children:[L&&(0,s.jsxs)("li",{children:["Сейчас на хосте ",(0,s.jsx)("code",{className:"font-mono",children:U}),", в настройках выбран"," ",(0,s.jsx)("code",{className:"font-mono",children:M}),"."]}),_&&(0,s.jsxs)("li",{children:["Tunnel слушает порт ",(0,s.jsx)("code",{className:"font-mono",children:c.port}),", в настройках указан ",(0,s.jsx)("code",{className:"font-mono",children:l.port}),"."]})]}),(0,s.jsxs)("button",{type:"button",onClick:T,disabled:N,className:"inline-flex items-center gap-1 rounded bg-amber-600 px-2 py-1 text-white hover:bg-amber-700 disabled:opacity-50",children:[N?(0,s.jsx)(i.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(n.A,{className:"h-3 w-3"}),"Перезапустить с новыми настройками"]})]}),(0,s.jsx)("hr",{className:"my-3"}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("h3",{className:"text-xs font-semibold mb-2",children:["Активные ссылки (",g.length,")"]}),0===g.length?(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Пока ничего не расшарено. На странице утилиты, KB-файла или дашборда появится кнопка \xabПоделиться\xbb."}):(0,s.jsx)("ul",{className:"space-y-1",children:g.map(e=>(0,s.jsx)(eK,{share:e,publicHost:c.publicUrl,onDeleted:()=>void A()},e.id))})]})]})})}function eK(e){let{share:t,publicHost:a,onDeleted:n}=e,[l,o]=(0,r.useTransition)(),c=a?new URL("/share/".concat(t.id),a).toString():"/share/".concat(t.id),m=t.label||("utility"===t.kind?"Утилита ".concat(t.utilityId):"kb-file"===t.kind?"KB ".concat(t.kbRelPath):"kb-tree"===t.kind?"Вся база знаний":"Дашборд проекта");return(0,s.jsxs)("li",{className:"flex items-start gap-2 rounded border bg-card px-2 py-1.5 text-xs",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"font-medium truncate",children:m}),(0,s.jsx)("span",{className:"text-[9px] uppercase tracking-wider text-muted-foreground",children:t.kind}),t.passwordHash&&(0,s.jsx)("span",{className:"text-[9px] uppercase tracking-wider text-violet-600",children:"\uD83D\uDD12"})]}),(0,s.jsx)("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"block text-[10px] font-mono text-violet-700 hover:underline truncate",children:c})]}),(0,s.jsx)("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(c).then(()=>d.oR.success("Ссылка скопирована"))},className:"text-[10px] text-muted-foreground hover:text-foreground rounded px-1 py-0.5",children:"copy"}),(0,s.jsx)("button",{type:"button",onClick:()=>{confirm('Удалить ссылку "'.concat(m,'"?'))&&o(async()=>{await eB(t.id),n()})},disabled:l,className:"text-muted-foreground hover:text-destructive rounded px-1",title:"Удалить ссылку",children:l?(0,s.jsx)(i.A,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(K.A,{className:"h-3 w-3"})})]})}let eZ=(0,_.createServerReference)("400647f16fc8d03d61378fc4fb7712ed26335e4ba1",_.callServer,void 0,_.findSourceMapURL,"listModelsAction"),eq=(0,_.createServerReference)("406d3fa6bfdc6ac8c7e8a689f86c1f674d29497eb7",_.callServer,void 0,_.findSourceMapURL,"probeHarnessAction"),eV=(0,_.createServerReference)("40accb39a92c9344fd42d43b8b83cd882396c8cdcf",_.callServer,void 0,_.findSourceMapURL,"saveSettingsAction");function eY(e){let{initialSettings:t,harnesses:a}=e,[o,c]=(0,r.useState)(t),[p,f]=(0,r.useState)({"claude-code":null,codex:null,ollama:null}),[v,y]=(0,r.useState)({"claude-code":null,codex:null,ollama:null}),[S,R]=(0,r.useState)({"claude-code":!1,codex:!1,ollama:!1}),[z,P]=(0,r.useState)({"claude-code":null,codex:null,ollama:null}),[T,U]=(0,r.useTransition)(),M=(0,r.useCallback)(async e=>{R(t=>({...t,[e]:!0})),y(t=>({...t,[e]:null}));let t=await eZ(e);R(t=>({...t,[e]:!1})),t.ok?f(a=>({...a,[e]:t.models})):(y(a=>({...a,[e]:t.error})),f(t=>({...t,[e]:[]})))},[]),L=(0,r.useCallback)(async e=>{let t=await eq(e);P(a=>({...a,[e]:t}))},[]);(0,r.useEffect)(()=>{a.forEach(e=>{L(e.id),M(e.id)})},[a,L,M]);let _=(e,t)=>{c(a=>({...a,assignments:{...a.assignments,[e]:{...a.assignments[e],...t}}}))},J=e=>{c(t=>({...t,language:e}))},F=e=>{c(t=>({...t,imageProcessing:{...t.imageProcessing,...e}}))},E=A.includes(o.language),I="advanced"===o.uiMode;return(0,s.jsxs)("div",{className:"space-y-8",children:[(0,s.jsx)(u.Zp,{className:"border-violet-200 dark:border-violet-900/50 bg-violet-50/40 dark:bg-violet-950/20",children:(0,s.jsxs)(u.Wu,{className:"pt-5 pb-5 flex items-center gap-3",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:I?"Расширенный режим":"Простой режим"}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:I?"Видны все секции — модели, MCP-серверы, prompt-шаблоны, инструменты.":"Видны только основные настройки. Включи расширенный, чтобы поменять модели, подключения и промпты."})]}),(0,s.jsx)(m.$,{type:"button",variant:I?"outline":"default",size:"sm",onClick:()=>{let e={...o,uiMode:I?"simple":"advanced"};c(e),eV(e)},children:I?"Простой режим":"Расширенный режим"})]})}),(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Output language"}),(0,s.jsx)(u.Zp,{children:(0,s.jsxs)(u.Wu,{className:"pt-6",children:[(0,s.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:"The agent injects this into every system prompt and writes all Markdown artifacts in this language. Code, paths, and quoted source stay verbatim."}),(0,s.jsxs)("div",{className:"flex items-center gap-3 max-w-xl",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)(h.J,{className:"text-xs text-muted-foreground",children:"Preset"}),(0,s.jsxs)(N.l6,{value:E?o.language:"__custom__",onValueChange:e=>{"__custom__"===e?J(E?"":o.language):J(e)},children:[(0,s.jsx)(N.bq,{className:"mt-1",children:(0,s.jsx)(N.yv,{})}),(0,s.jsxs)(N.gC,{children:[A.map(e=>(0,s.jsx)(N.eb,{value:e,children:e},e)),(0,s.jsx)(N.eb,{value:"__custom__",children:"custom…"})]})]})]}),!E&&(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)(h.J,{className:"text-xs text-muted-foreground",children:"Custom"}),(0,s.jsx)(x.p,{value:o.language,onChange:e=>J(e.target.value),placeholder:"e.g. portugu\xeas, latviešu",className:"mt-1"})]})]})]})})]}),(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Обработка изображений"}),(0,s.jsx)(u.Zp,{children:(0,s.jsxs)(u.Wu,{className:"pt-6 space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-sm",children:["Reflex автоматически ресайзит и перекодирует прикреплённые изображения перед сохранением в"," ",(0,s.jsx)("code",{className:"font-mono text-xs",children:".reflex/attachments/"}),"."]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Сокращает токены модели и место на диске. Векторы (SVG) и анимированные GIF/WebP остаются как есть."})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,s.jsx)(h.J,{htmlFor:"img-enabled",className:"text-xs",children:"включено"}),(0,s.jsx)(g,{id:"img-enabled",checked:o.imageProcessing.enabled,onCheckedChange:e=>F({enabled:e})})]})]}),(0,s.jsxs)("div",{className:o.imageProcessing.enabled?"space-y-4":"space-y-4 opacity-50 pointer-events-none",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)(h.J,{className:"text-xs text-muted-foreground",children:"Макс. сторона"}),(0,s.jsxs)("span",{className:"font-mono text-xs",children:[o.imageProcessing.maxDimension,"px"]})]}),(0,s.jsx)(b,{min:256,max:8192,step:64,value:[o.imageProcessing.maxDimension],onValueChange:e=>{var t;return F({maxDimension:null!=(t=e[0])?t:2e3})}}),(0,s.jsxs)("div",{className:"flex justify-between text-[10px] text-muted-foreground mt-1",children:[(0,s.jsx)("span",{children:"256"}),(0,s.jsx)("span",{children:"2048"}),(0,s.jsx)("span",{children:"4096"}),(0,s.jsx)("span",{children:"8192"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)(h.J,{className:"text-xs text-muted-foreground",children:"Качество (JPEG / WebP)"}),(0,s.jsx)("span",{className:"font-mono text-xs",children:o.imageProcessing.quality})]}),(0,s.jsx)(b,{min:40,max:100,step:1,value:[o.imageProcessing.quality],onValueChange:e=>{var t;return F({quality:null!=(t=e[0])?t:85})}})]}),(0,s.jsxs)("div",{className:"max-w-xs",children:[(0,s.jsx)(h.J,{className:"text-xs text-muted-foreground",children:"Формат"}),(0,s.jsxs)(N.l6,{value:o.imageProcessing.format,onValueChange:e=>F({format:e}),children:[(0,s.jsx)(N.bq,{className:"mt-1",children:(0,s.jsx)(N.yv,{})}),(0,s.jsx)(N.gC,{children:C.map(e=>(0,s.jsxs)(N.eb,{value:e,children:[(0,s.jsx)("span",{className:"font-mono",children:e}),(0,s.jsx)("span",{className:"ml-2 text-muted-foreground text-xs",children:"auto"===e?"JPEG, PNG для прозрачных":"jpeg"===e?"всё в JPEG (альфа → белый фон)":"webp"===e?"всё в WebP":"оставить исходный контейнер"})]},e))})]})]})]})]})})]}),I&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Harnesses"}),(0,s.jsx)("div",{className:"grid gap-4",children:a.map(e=>{var t,a,r,l,d,f;let b=z[e.id],j=o.harnesses[e.id].enabled;return(0,s.jsxs)(u.Zp,{children:[(0,s.jsx)(u.aR,{children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(u.ZB,{className:"flex items-center gap-2",children:[e.label,(0,s.jsx)(eQ,{probe:b})]}),(0,s.jsx)(u.BT,{children:b?b.detail:"checking…"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsxs)(m.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{L(e.id),M(e.id)},disabled:S[e.id],children:[(0,s.jsx)(n.A,{className:"mr-1 h-4 w-4 ".concat(S[e.id]?"animate-spin":"")}),"Refresh"]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(h.J,{htmlFor:"enable-".concat(e.id),className:"text-xs",children:"enabled"}),(0,s.jsx)(g,{id:"enable-".concat(e.id),checked:j,onCheckedChange:t=>{var a;return a=e.id,void c(e=>({...e,harnesses:{...e.harnesses,[a]:{...e.harnesses[a],enabled:t}}}))}})]})]})]})}),(0,s.jsxs)(u.Wu,{children:["ollama"===e.id&&(0,s.jsxs)("div",{className:"mb-3 flex items-center gap-2 max-w-md",children:[(0,s.jsx)(h.J,{htmlFor:"ollama-url",className:"text-xs w-24 shrink-0",children:"Base URL"}),(0,s.jsx)(x.p,{id:"ollama-url",value:o.harnesses.ollama.baseUrl,onChange:e=>{var t;return t=e.target.value,void c(e=>({...e,harnesses:{...e.harnesses,ollama:{...e.harnesses.ollama,baseUrl:t}}}))},placeholder:"http://localhost:11434",className:"font-mono text-xs"})]}),(0,s.jsxs)("div",{className:"text-xs text-muted-foreground",children:["Models loaded:"," ",S[e.id]?(0,s.jsxs)("span",{children:[(0,s.jsx)(i.A,{className:"inline h-3 w-3 animate-spin mr-1"}),"loading…"]}):v[e.id]?(0,s.jsx)("span",{className:"text-destructive",children:v[e.id]}):"".concat(null!=(d=null==(t=p[e.id])?void 0:t.length)?d:0),(null!=(f=null==(a=p[e.id])?void 0:a.length)?f:0)>0&&(0,s.jsxs)("span",{className:"ml-2",children:["(",null==(l=p[e.id])||null==(r=l[0])?void 0:r.source,")"]})]})]})]},e.id)})})]}),I&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Task assignments"}),(0,s.jsx)("div",{className:"grid gap-4",children:w.map(e=>{var t,r;let n=o.assignments[e],i=a.filter(t=>t.supports.includes(e)&&o.harnesses[t.id].enabled),l=null!=(r=p[n.harness])?r:[],c=null==(t=l[0])?void 0:t.source;return(0,s.jsxs)(u.Zp,{children:[(0,s.jsxs)(u.aR,{children:[(0,s.jsx)(u.ZB,{className:"text-base",children:k[e].title}),(0,s.jsx)(u.BT,{children:k[e].help})]}),(0,s.jsxs)(u.Wu,{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex flex-col md:flex-row md:items-end gap-3",children:[(0,s.jsxs)("div",{className:"flex-1 max-w-[200px]",children:[(0,s.jsx)(h.J,{className:"text-xs text-muted-foreground",children:"Harness"}),(0,s.jsxs)(N.l6,{value:n.harness,onValueChange:t=>{var a,s,r;return _(e,{harness:t,model:null!=(r=null==(s=p[t])||null==(a=s[0])?void 0:a.id)?r:""})},children:[(0,s.jsx)(N.bq,{className:"mt-1",children:(0,s.jsx)(N.yv,{})}),(0,s.jsx)(N.gC,{children:i.map(e=>(0,s.jsx)(N.eb,{value:e.id,children:e.label},e.id))})]})]}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)(h.J,{className:"text-xs text-muted-foreground",children:"Model"}),c&&(0,s.jsx)(j.E,{variant:"live"===c?"default":"secondary",className:"text-[10px] uppercase",children:c})]}),l.length>0?(0,s.jsxs)(N.l6,{value:n.model,onValueChange:t=>_(e,{model:t}),children:[(0,s.jsx)(N.bq,{className:"mt-1",children:(0,s.jsx)(N.yv,{placeholder:"select model"})}),(0,s.jsx)(N.gC,{children:l.map(e=>(0,s.jsxs)(N.eb,{value:e.id,children:[(0,s.jsx)("span",{className:"font-mono",children:e.id}),e.size&&(0,s.jsx)("span",{className:"ml-2 text-muted-foreground text-xs",children:e.size})]},e.id))})]}):(0,s.jsx)(x.p,{value:n.model,onChange:t=>_(e,{model:t.target.value}),placeholder:"model id",className:"mt-1 font-mono text-xs"})]})]}),"claude-code"===n.harness&&(0,s.jsx)(eX,{tools:n.allowedTools,onChange:t=>_(e,{allowedTools:t})})]})]},e)})})]}),(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Gemini"}),(0,s.jsx)(eS,{})]}),(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Картинки"}),(0,s.jsx)(eP,{})]}),(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"OAuth providers"}),(0,s.jsxs)("p",{className:"text-sm text-muted-foreground mb-3",children:["Reflex держит локально access/refresh-токены и сам обновляет их при истечении. Используй ",(0,s.jsx)("code",{children:"$oauth:<provider>"})," в env/headers MCP-сервера — Reflex подставит свежий токен при каждом вызове. Redirect URI:"," ",(0,s.jsx)("code",{className:"font-mono",children:"http://localhost:3210/api/oauth/callback"}),"."]}),(0,s.jsx)(ev,{})]}),I&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"MCP servers"}),(0,s.jsxs)("p",{className:"text-sm text-muted-foreground mb-3",children:["Зарегистрированные MCP-серверы доступны утилитам (через"," ",(0,s.jsx)("code",{children:"manifest.mcpServers"}),") и чату напрямую (orchestrator получает их через ",(0,s.jsx)("code",{children:"--mcp-config"}),"). Config хранится в"," ",(0,s.jsx)("code",{children:"~/.reflex/mcp/servers.json"})," с perms ",(0,s.jsx)("code",{children:"0600"}),"."]}),(0,s.jsx)(ee,{})]}),(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Сервисы маршрутов"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:"Какие сервисы навигации появятся в попапе \xabМаршрут в…\xbb на каждой точке map-виджета. Reflex генерирует deep-link из координат — без посредников, без аккаунтов."}),(0,s.jsx)(eL,{settings:o,onChange:e=>c(t=>({...t,...e}))})]}),(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Публичные ссылки (ngrok)"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:"Сделать утилиту, KB-файл или дашборд доступным из интернета через ngrok-туннель. Каждая ссылка опционально защищена паролем; middleware закрывает все остальные пути на ngrok-хосте."}),(0,s.jsx)(eG,{settings:o,onChange:e=>c(t=>({...t,...e}))})]}),I&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Prompt templates"}),(0,s.jsxs)("p",{className:"text-sm text-muted-foreground mb-3",children:["Stored on disk under ",(0,s.jsx)("code",{children:"~/.reflex/prompts/"}),". Edit here or directly in any editor. Use ",(0,s.jsx)("code",{children:"{{language}}"}),","," ",(0,s.jsx)("code",{children:"{{scope}}"}),", etc. — variable list is shown per template."]}),(0,s.jsx)($,{})]}),(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)(m.$,{onClick:()=>{U(async()=>{var e;let t=await eV(o);t.ok?d.oR.success("Settings saved"):d.oR.error(null!=(e=t.error)?e:"Save failed")})},disabled:T,children:T?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.A,{className:"mr-2 h-4 w-4 animate-spin"})," Saving…"]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.A,{className:"mr-2 h-4 w-4"})," Save settings"]})})})]})}let eH=["Read","Write","Edit","LS","Glob","Grep","Bash","WebSearch","WebFetch","TodoWrite","Task","NotebookEdit"];function eX(e){let{tools:t,onChange:a}=e,n=e=>{let s=e.trim();s&&(t.includes(s)||a([...t,s]))},[i,l]=(0,r.useState)(""),o=eH.filter(e=>!t.includes(e));return(0,s.jsxs)("div",{className:"rounded-md border bg-muted/30 p-3 space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,s.jsx)(h.J,{className:"text-xs text-muted-foreground",children:"Allowed tools (claude-code)"}),(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:"без них агент попросит разрешение и зависнет в headless-режиме"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[0===t.length&&(0,s.jsx)("span",{className:"text-[11px] italic text-muted-foreground",children:"используются дефолты harness'а"}),t.map(e=>(0,s.jsxs)(j.E,{variant:"secondary",className:"gap-1 font-mono",children:[e,(0,s.jsx)("button",{type:"button",className:"text-muted-foreground hover:text-foreground",onClick:()=>a(t.filter(t=>t!==e)),children:"\xd7"})]},e))]}),o.length>0&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:o.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>n(e),className:"text-[11px] font-mono rounded px-1.5 py-0.5 border border-dashed border-muted-foreground/40 text-muted-foreground hover:border-foreground hover:text-foreground",children:["+ ",e]},e))}),(0,s.jsxs)("form",{className:"flex gap-1",onSubmit:e=>{e.preventDefault(),n(i),l("")},children:[(0,s.jsx)(x.p,{value:i,onChange:e=>l(e.target.value),placeholder:"custom tool name…",className:"h-7 text-xs font-mono"}),(0,s.jsx)(m.$,{type:"submit",size:"sm",variant:"ghost",className:"h-7",children:"+"})]})]})}function eQ(e){let{probe:t}=e;return t?t.available?(0,s.jsxs)(j.E,{variant:"default",className:"gap-1 bg-emerald-600",children:[(0,s.jsx)(o.A,{className:"h-3 w-3"})," available"]}):(0,s.jsxs)(j.E,{variant:"destructive",className:"gap-1",children:[(0,s.jsx)(c.A,{className:"h-3 w-3"})," unavailable"]}):(0,s.jsxs)(j.E,{variant:"outline",className:"gap-1",children:[(0,s.jsx)(i.A,{className:"h-3 w-3 animate-spin"})," checking"]})}},91074:(e,t,a)=>{"use strict";a.d(t,{Separator:()=>i});var s=a(4624);a(99356);var r=a(44188),n=a(13506);function i(e){let{className:t,orientation:a="horizontal",decorative:i=!0,...l}=e;return(0,s.jsx)(r.b,{"data-slot":"separator",decorative:i,orientation:a,className:(0,n.cn)("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...l})}},98485:(e,t,a)=>{"use strict";a.d(t,{S:()=>r});var s=a(7911);let r=(0,s.createServerReference)("40f6801f3ea78f166da7a2ed774ca49c0b18e2a13b",s.callServer,void 0,s.findSourceMapURL,"saveOAuthClientAction")}},e=>{e.O(0,[4400,1217,3335,5097,5235,4933,146,7358],()=>e(e.s=17121)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8580],{16381:(e,s,t)=>{"use strict";t.d(s,{ShareAuthForm:()=>c});var a=t(4624),r=t(99356),n=t(3239);let o=(0,t(45804).A)("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);var i=t(7911);let l=(0,i.createServerReference)("60eb23ca3c5e455b702431dc88ac2dc31dcf2bab93",i.callServer,void 0,i.findSourceMapURL,"submitSharePasswordAction");function c(e){let{shareId:s,error:t}=e,[i,c]=(0,r.useTransition)();return(0,a.jsxs)("form",{action:e=>c(async()=>{var t;await l(s,(null!=(t=e.get("password"))?t:"").toString())}),className:"space-y-2",children:[(0,a.jsx)("label",{className:"block text-xs text-muted-foreground",htmlFor:"pw-".concat(s),children:"Введите пароль"}),(0,a.jsx)("input",{id:"pw-".concat(s),name:"password",type:"password",autoFocus:!0,className:"w-full rounded border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-violet-400",placeholder:"••••••••"}),"bad"===t&&(0,a.jsx)("p",{className:"text-xs text-destructive",children:"Неверный пароль."}),(0,a.jsxs)("button",{type:"submit",disabled:i,className:"w-full rounded bg-violet-600 px-3 py-2 text-sm font-medium text-white hover:bg-violet-700 disabled:opacity-50 inline-flex items-center justify-center gap-2",children:[i?(0,a.jsx)(n.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,a.jsx)(o,{className:"h-3.5 w-3.5"}),"Открыть"]})]})}},55861:(e,s,t)=>{Promise.resolve().then(t.bind(t,86727)),Promise.resolve().then(t.bind(t,16381)),Promise.resolve().then(t.t.bind(t,54400,23))}},e=>{e.O(0,[4400,5097,6727,4933,146,7358],()=>e(e.s=55861)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[526],{3024:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},3747:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},9598:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},13506:(e,t,r)=>{"use strict";r.d(t,{cn:()=>i});var s=r(47989),a=r(55701);function i(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,a.QP)((0,s.$)(t))}},15523:(e,t,r)=>{"use strict";r.d(t,{p:()=>i});var s=r(4624);r(99356);var a=r(13506);function i(e){let{className:t,type:r,...i}=e;return(0,s.jsx)("input",{type:r,"data-slot":"input",className:(0,a.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",t),...i})}},28310:(e,t,r)=>{"use strict";r.d(t,{E:()=>o});var s=r(4624);r(99356);var a=r(60621),i=r(50362),n=r(13506);let l=(0,a.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:r="default",asChild:a=!1,...o}=e,d=a?i.bL:"span";return(0,s.jsx)(d,{"data-slot":"badge","data-variant":r,className:(0,n.cn)(l({variant:r}),t),...o})}},30441:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]])},35101:(e,t,r)=>{"use strict";r.d(t,{N:()=>a});var s=r(7911);let a=(0,s.createServerReference)("005adec00ada04c63ac5fd3676f300faaa566baba2",s.callServer,void 0,s.findSourceMapURL,"getTunnelStatusAction")},41280:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},43153:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},43831:(e,t,r)=>{"use strict";r.d(t,{ManifestPanel:()=>C});var s=r(4624),a=r(99356),i=r(45804);let n=(0,i.A)("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);var l=r(76974),o=r(3239);let d=(0,i.A)("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]]);var c=r(3747),u=r(56221),v=r(69285),h=r(28310),m=r(85253),x=r(71651),p=r(7911);let f=(0,p.createServerReference)("702d15b9ace2262ece44db6727e46c6cad833f4ecb",p.callServer,void 0,p.findSourceMapURL,"rebuildUtilityAction"),b=(0,p.createServerReference)("70ac02314e6ca01a568db94b9a3ccf46ade9038e8d",p.callServer,void 0,p.findSourceMapURL,"checkUpdateAction"),g=(0,p.createServerReference)("40c162a66a03d4a646079dd6e77a1e93f7c2022e01",p.callServer,void 0,p.findSourceMapURL,"editUtilityAction");var y=r(94151),k=r(43153),j=r(41280),w=r(84784),N=r(46972),A=r(15523),S=r(78825);let P=(0,p.createServerReference)("400db4e15da3acc3df3f48815dc7cdf9edb50d99d9",p.callServer,void 0,p.findSourceMapURL,"listUtilitySecretsAction"),R=(0,p.createServerReference)("403f57c294212361496c5a9ea50e46ee54acd13000",p.callServer,void 0,p.findSourceMapURL,"setUtilitySecretAction"),z=(0,p.createServerReference)("4032ab42fd454a3006bd38a108f93ce6dd32c65a1e",p.callServer,void 0,p.findSourceMapURL,"deleteUtilitySecretAction");function M(e){let{scope:t,id:r,rootId:i,declared:n}=e,[l,d]=(0,a.useState)(()=>{let e={};for(let t of n)e[t.key]={set:!1,draft:"",reveal:!1};return e}),[c,v]=(0,a.useState)(null),[,x]=(0,a.useTransition)();(0,a.useEffect)(()=>{x(async()=>{let e=await P({scope:t,id:r,...i?{rootId:i}:{}});if(!e.ok)return void u.oR.error(e.error);d(t=>{let r={};for(let i of e.secrets){var s,a;r[i.key]={set:i.set,draft:"",reveal:null!=(a=null==(s=t[i.key])?void 0:s.reveal)&&a}}return r})})},[t,r,i]);let p=async e=>{let s=l[e];if(!s||!s.draft)return void u.oR.error("Введи значение");v(e);try{let a=await R({scope:t,id:r,...i?{rootId:i}:{},key:e,value:s.draft});if(!a.ok)return void u.oR.error(a.error);u.oR.success("".concat(e," сохранён")),d(t=>({...t,[e]:{set:!0,draft:"",reveal:!1}}))}finally{v(null)}},f=async e=>{v(e);try{let s=await z({scope:t,id:r,...i?{rootId:i}:{},key:e});if(!s.ok)return void u.oR.error(s.error);u.oR.success("".concat(e," удалён")),d(t=>({...t,[e]:{set:!1,draft:"",reveal:!1}}))}finally{v(null)}};return 0===n.length?null:(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground flex items-center gap-1",children:[(0,s.jsx)(y.A,{className:"h-3 w-3"})," Секреты"]}),(0,s.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["Значения хранятся локально (",(0,s.jsx)("code",{className:"font-mono",children:"~/.reflex/secrets/"}),") и не передаются агенту. Утилита читает их через"," ",(0,s.jsx)("code",{className:"font-mono",children:"reflex.secrets.get"}),"."]}),(0,s.jsx)("ul",{className:"space-y-3",children:n.map(e=>{var t;let r=null!=(t=l[e.key])?t:{set:!1,draft:"",reveal:!1},a=c===e.key;return(0,s.jsxs)("li",{className:"space-y-1.5",children:[(0,s.jsxs)(S.J,{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"font-mono",children:e.key}),r.set?(0,s.jsxs)(h.E,{variant:"secondary",className:"gap-1",children:[(0,s.jsx)(k.A,{className:"h-2.5 w-2.5"})," set"]}):e.required?(0,s.jsx)(h.E,{variant:"destructive",children:"missing (required)"}):(0,s.jsx)(h.E,{variant:"outline",children:"empty"})]}),(0,s.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:[e.label,e.description?" \xb7 ".concat(e.description):""]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(A.p,{type:r.reveal?"text":"password",value:r.draft,onChange:t=>d(s=>({...s,[e.key]:{...r,draft:t.target.value}})),placeholder:r.set?"•••• (сохранено, введи новое для замены)":"новое значение",className:"font-mono text-xs flex-1 h-8",disabled:a}),(0,s.jsx)(m.$,{type:"button",size:"icon",variant:"ghost",className:"h-8 w-8 shrink-0",onClick:()=>d(t=>({...t,[e.key]:{...r,reveal:!r.reveal}})),title:r.reveal?"Скрыть":"Показать",children:r.reveal?(0,s.jsx)(j.A,{className:"h-3.5 w-3.5"}):(0,s.jsx)(w.A,{className:"h-3.5 w-3.5"})})]}),(0,s.jsxs)("div",{className:"flex gap-1",children:[(0,s.jsx)(m.$,{type:"button",size:"sm",variant:"default",className:"h-7 text-xs flex-1",onClick:()=>void p(e.key),disabled:a||!r.draft,children:a?(0,s.jsx)(o.A,{className:"h-3 w-3 animate-spin"}):"Сохранить"}),r.set&&(0,s.jsx)(m.$,{type:"button",size:"sm",variant:"outline",className:"h-7 text-xs",onClick:()=>void f(e.key),disabled:a,children:(0,s.jsx)(N.A,{className:"h-3 w-3"})})]})]},e.key)})})]})}function C(e){var t,r,i,p,y,k,j,w,N;let{scope:A,id:S,rootId:P,manifest:R,dir:z}=e,[C,U]=(0,a.useTransition)(),[E,T]=(0,a.useTransition)(),[_,V]=(0,a.useTransition)(),$=(0,v.useRouter)(),[I,O]=(0,a.useState)(null),[q,F]=(0,a.useState)(""),H=null==(r=R.source)||null==(t=r.origin)?void 0:t.startsWith("github:");return(0,s.jsxs)("div",{className:"space-y-4 text-xs",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:"Источник"}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(h.E,{variant:"secondary",className:"capitalize",children:null!=(j=null==(i=R.source)?void 0:i.type)?j:"unknown"}),(null==(p=R.source)?void 0:p.origin)&&(0,s.jsx)("div",{className:"font-mono break-all text-muted-foreground",children:R.source.origin}),(null==(y=R.source)?void 0:y.fetchedAt)&&(0,s.jsx)("div",{className:"text-muted-foreground",children:new Date(R.source.fetchedAt).toLocaleString()})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:"Файлы на диске"}),(0,s.jsx)("div",{className:"font-mono break-all text-muted-foreground",children:z})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1 flex items-center gap-1",children:[(0,s.jsx)(n,{className:"h-3 w-3"})," Permissions"]}),(0,s.jsx)(L,{manifest:R})]}),(null!=(w=null==(k=R.secrets)?void 0:k.length)?w:0)>0&&(0,s.jsx)("div",{className:"pt-2 border-t",children:(0,s.jsx)(M,{scope:A,id:S,...P?{rootId:P}:{},declared:null!=(N=R.secrets)?N:[]})}),R.serverActions.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1",children:"Server actions"}),(0,s.jsx)("ul",{className:"space-y-1",children:R.serverActions.map(e=>(0,s.jsxs)("li",{children:[(0,s.jsx)(h.E,{variant:"outline",className:"font-mono mr-1",children:e.name}),(0,s.jsxs)("span",{className:"text-muted-foreground",children:["→ ",e.entry]})]},e.name))})]}),(0,s.jsxs)("div",{className:"pt-2 border-t space-y-2",children:[(0,s.jsxs)("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground flex items-center gap-1",children:[(0,s.jsx)(l.A,{className:"h-3 w-3"})," Изменить"]}),(0,s.jsx)(x.T,{value:q,onChange:e=>F(e.target.value),placeholder:"Что доработать? Напр.: добавь dark mode, кешируй результаты в data/cache.json, поменяй валидацию ввода…",className:"text-xs min-h-[80px]",disabled:_}),(0,s.jsxs)(m.$,{type:"button",size:"sm",className:"w-full",onClick:()=>{let e=q.trim();if(!e)return void u.oR.error("Опиши, что изменить");V(async()=>{let t=await g({scope:A,id:S,...P?{rootId:P}:{},instruction:e});if(!t.ok)return void u.oR.error(t.error);u.oR.success("Топик стартовал — переходим в чат"),F(""),$.push("/roots/".concat(t.rootId,"/chat/").concat(t.topicId))})},disabled:_||!q.trim(),children:[_?(0,s.jsx)(o.A,{className:"mr-2 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(l.A,{className:"mr-2 h-3.5 w-3.5"}),"Изменить (стартует /goal)"]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t",children:[(0,s.jsxs)(m.$,{type:"button",size:"sm",variant:"outline",onClick:()=>U(async()=>{var e;let t=await f(A,S,P);t.ok?(u.oR.success("Bundle перезобрана"),$.refresh()):u.oR.error(null!=(e=t.error)?e:"fail")}),disabled:C,children:[C?(0,s.jsx)(o.A,{className:"mr-2 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(d,{className:"mr-2 h-3.5 w-3.5"}),"Перебилдить bundle"]}),H&&(0,s.jsxs)(m.$,{type:"button",size:"sm",variant:"outline",onClick:()=>T(async()=>{let e=await b(A,S,P);if(!e.ok)return void u.oR.error(e.error);if(e.upToDate)O(null),u.oR.success("Уже последняя версия");else{var t;O("Доступен новый sha ".concat(null==(t=e.latestSha)?void 0:t.slice(0,7)))}}),disabled:E,children:[E?(0,s.jsx)(o.A,{className:"mr-2 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(c.A,{className:"mr-2 h-3.5 w-3.5"}),"Проверить обновления"]}),I&&(0,s.jsxs)("div",{className:"rounded border border-emerald-400 bg-emerald-50 px-2 py-1 text-emerald-900",children:[I," — переустанови утилиту, чтобы применить."]})]})]})}function L(e){var t,r,a,i,n,l,o,d,c,u,v,h,m,x;let{manifest:p}=e,f=p.permissions,b=[];return((null==(r=f.llm)||null==(t=r.tasks)?void 0:t.length)&&b.push("llm.tasks = [".concat(f.llm.tasks.join(", "),"]")),(null==(a=f.kb)?void 0:a.read)&&b.push("kb.read"),(null==(i=f.kb)?void 0:i.write)&&b.push("kb.write"),(null==(l=f.kb)||null==(n=l.kinds)?void 0:n.length)&&b.push("kb.kinds = [".concat(f.kb.kinds.join(", "),"]")),(null==(o=f.fs)?void 0:o.sandbox)&&b.push("fs (sandboxed in data/)"),(null==(u=f.web)||null==(c=u.fetch)||null==(d=c.domains)?void 0:d.length)&&b.push("web.fetch = [".concat(f.web.fetch.domains.join(", "),"]")),(null==(v=f.web)?void 0:v.search)&&b.push("web.search"),(null==(h=f.audit)?void 0:h.write)&&b.push("audit.write"),(null==(m=f.workers)?void 0:m.enabled)&&b.push("workers (max ".concat(null!=(x=f.workers.maxConcurrent)?x:1,")")),0===b.length)?(0,s.jsx)("p",{className:"text-muted-foreground italic",children:"Без разрешений."}):(0,s.jsx)("ul",{className:"space-y-0.5 font-mono",children:b.map(e=>(0,s.jsx)("li",{children:e},e))})}},45407:(e,t,r)=>{"use strict";r.d(t,{ShareButton:()=>m});var s=r(4624),a=r(99356),i=r(30441),n=r(43153),l=r(9598),o=r(13561),d=r(3024),c=r(56221),u=r(7911);let v=(0,u.createServerReference)("403ed4d14b11a90cacc5b9f70460c86f0b95c3568a",u.callServer,void 0,u.findSourceMapURL,"createShareAction");var h=r(35101);function m(e){let[t,r]=(0,a.useState)(!1),[u,m]=(0,a.useState)(""),[x,p]=(0,a.useTransition)(),[f,b]=(0,a.useState)(null);return t?f?(0,s.jsxs)("div",{className:"rounded border bg-card p-2 text-xs space-y-1.5 w-full max-w-sm",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-emerald-700",children:[(0,s.jsx)(n.A,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{className:"font-medium",children:"Ссылка создана"})]}),(0,s.jsx)("a",{href:f.url,target:"_blank",rel:"noopener noreferrer",className:"block font-mono text-[11px] text-violet-700 hover:underline break-all",children:f.url}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>void navigator.clipboard.writeText(f.url).then(()=>c.oR.success("Скопировано")),className:"inline-flex items-center gap-1 rounded border px-2 py-0.5 hover:bg-accent",children:[(0,s.jsx)(l.A,{className:"h-3 w-3"}),"Скопировать"]}),(0,s.jsx)("button",{type:"button",onClick:()=>{b(null),r(!1),m("")},className:"text-muted-foreground hover:text-foreground",children:"Готово"})]})]}):(0,s.jsxs)("div",{className:"rounded border bg-card p-2 text-xs space-y-1.5 w-full max-w-sm",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(i.A,{className:"h-3.5 w-3.5 text-violet-600"}),(0,s.jsx)("span",{className:"font-medium",children:"Новая публичная ссылка"}),(0,s.jsx)("button",{type:"button",onClick:()=>r(!1),className:"ml-auto text-muted-foreground hover:text-foreground",children:(0,s.jsx)(o.A,{className:"h-3 w-3"})})]}),(0,s.jsx)("label",{className:"block text-[10px] text-muted-foreground",children:"Пароль (опционально)"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(d.A,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground pointer-events-none"}),(0,s.jsx)("input",{type:"password",value:u,onChange:e=>m(e.target.value),autoFocus:!0,placeholder:"пусто = открытая ссылка",className:"w-full rounded border bg-background pl-6 pr-2 py-1 text-xs focus:outline-none focus:ring-1 focus:ring-violet-400"})]}),(0,s.jsx)("button",{type:"button",onClick:()=>{p(async()=>{var t;let r=await (0,h.N)(),s=await v({kind:e.kind,...e.rootId?{rootId:e.rootId}:{},...e.utilityScope?{utilityScope:e.utilityScope}:{},...e.utilityId?{utilityId:e.utilityId}:{},...e.kbRelPath?{kbRelPath:e.kbRelPath}:{},...e.label?{label:e.label}:{},...u.trim()?{password:u.trim()}:{}});if(!s.ok)return void c.oR.error(s.error);let a=null!=(t=r.status.publicUrl)?t:window.location.origin,i=new URL("/share/".concat(s.share.id),a).toString();b({share:s.share,url:i}),navigator.clipboard.writeText(i).catch(()=>null),c.oR.success(r.status.running?"Ссылка создана и скопирована":"Ссылка создана; запусти ngrok-туннель в настройках чтобы открыть извне")})},disabled:x,className:"w-full rounded bg-violet-600 text-white px-2 py-1 hover:bg-violet-700 disabled:opacity-50 inline-flex items-center justify-center gap-1",children:x?"Создание…":"Создать ссылку"}),(0,s.jsx)("p",{className:"text-[10px] text-muted-foreground",children:"Ссылку будет видно только после старта ngrok-туннеля (Настройки → Публичные ссылки)."})]}):(0,s.jsxs)("button",{type:"button",onClick:()=>r(!0),className:e.iconOnly?"p-1 rounded hover:bg-accent text-muted-foreground hover:text-violet-700":"inline-flex items-center gap-1 rounded border px-2 py-1 text-xs hover:bg-accent",title:"Создать публичную ссылку",children:[(0,s.jsx)(i.A,{className:"h-3.5 w-3.5"}),!e.iconOnly&&"Поделиться"]})}},46972:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},49833:(e,t,r)=>{"use strict";r.d(t,{UtilityFrame:()=>i});var s=r(4624),a=r(86727);function i(e){let{scope:t,id:r,rootId:i,agentChat:n,utilityName:l}=e;return(0,s.jsx)(a.UtilityIframe,{scope:t,id:r,...i?{rootId:i}:{},...n?{agentChat:!0}:{},...l?{utilityName:l}:{}})}},53931:(e,t,r)=>{Promise.resolve().then(r.bind(r,45407)),Promise.resolve().then(r.bind(r,43831)),Promise.resolve().then(r.bind(r,49833)),Promise.resolve().then(r.bind(r,91074)),Promise.resolve().then(r.bind(r,96253)),Promise.resolve().then(r.bind(r,28050)),Promise.resolve().then(r.bind(r,94904)),Promise.resolve().then(r.bind(r,13270)),Promise.resolve().then(r.bind(r,99730)),Promise.resolve().then(r.bind(r,89146)),Promise.resolve().then(r.bind(r,19078)),Promise.resolve().then(r.bind(r,67854)),Promise.resolve().then(r.bind(r,69050)),Promise.resolve().then(r.bind(r,63739)),Promise.resolve().then(r.bind(r,33976)),Promise.resolve().then(r.bind(r,12537)),Promise.resolve().then(r.bind(r,97485)),Promise.resolve().then(r.bind(r,41923)),Promise.resolve().then(r.bind(r,73868)),Promise.resolve().then(r.bind(r,53511)),Promise.resolve().then(r.bind(r,2018)),Promise.resolve().then(r.bind(r,18487)),Promise.resolve().then(r.bind(r,98346)),Promise.resolve().then(r.bind(r,14884)),Promise.resolve().then(r.bind(r,85314)),Promise.resolve().then(r.bind(r,17280)),Promise.resolve().then(r.bind(r,8855)),Promise.resolve().then(r.bind(r,86631)),Promise.resolve().then(r.bind(r,2604)),Promise.resolve().then(r.bind(r,27237)),Promise.resolve().then(r.bind(r,49455)),Promise.resolve().then(r.bind(r,39211)),Promise.resolve().then(r.bind(r,56360)),Promise.resolve().then(r.t.bind(r,54400,23))},60621:(e,t,r)=>{"use strict";r.d(t,{F:()=>n});var s=r(47989);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,i=s.$,n=(e,t)=>r=>{var s;if((null==t?void 0:t.variants)==null)return i(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:n,defaultVariants:l}=t,o=Object.keys(n).map(e=>{let t=null==r?void 0:r[e],s=null==l?void 0:l[e];if(null===t)return null;let i=a(t)||a(s);return n[e][i]}),d=r&&Object.entries(r).reduce((e,t)=>{let[r,s]=t;return void 0===s||(e[r]=s),e},{});return i(e,o,null==t||null==(s=t.compoundVariants)?void 0:s.reduce((e,t)=>{let{class:r,className:s,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...l,...d}[t]):({...l,...d})[t]===r})?[...e,r,s]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},69285:(e,t,r)=>{"use strict";var s=r(48849);r.o(s,"usePathname")&&r.d(t,{usePathname:function(){return s.usePathname}}),r.o(s,"useRouter")&&r.d(t,{useRouter:function(){return s.useRouter}})},71651:(e,t,r)=>{"use strict";r.d(t,{T:()=>i});var s=r(4624);r(99356);var a=r(13506);function i(e){let{className:t,...r}=e;return(0,s.jsx)("textarea",{"data-slot":"textarea",className:(0,a.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",t),...r})}},76974:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},78825:(e,t,r)=>{"use strict";r.d(t,{J:()=>n});var s=r(4624);r(99356);var a=r(33976),i=r(13506);function n(e){let{className:t,...r}=e;return(0,s.jsx)(a.Root,{"data-slot":"label",className:(0,i.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...r})}},84784:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},85253:(e,t,r)=>{"use strict";r.d(t,{$:()=>o});var s=r(4624);r(99356);var a=r(60621),i=r(50362),n=r(13506);let l=(0,a.F)("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:r="default",size:a="default",asChild:o=!1,...d}=e,c=o?i.bL:"button";return(0,s.jsx)(c,{"data-slot":"button","data-variant":r,"data-size":a,className:(0,n.cn)(l({variant:r,size:a,className:t})),...d})}},91074:(e,t,r)=>{"use strict";r.d(t,{Separator:()=>n});var s=r(4624);r(99356);var a=r(44188),i=r(13506);function n(e){let{className:t,orientation:r="horizontal",decorative:n=!0,...l}=e;return(0,s.jsx)(a.b,{"data-slot":"separator",decorative:n,orientation:r,className:(0,i.cn)("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...l})}},94151:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(45804).A)("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]])}},e=>{e.O(0,[4400,1217,3335,5097,6727,4933,146,7358],()=>e(e.s=53931)),_N_E=e.O()}]);
|