@orgsdk/cli 0.1.0 → 0.2.0
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/README.md +21 -7
- package/bin/orgsdk.mjs +1 -1
- package/dist/THIRD_PARTY_NOTICES.txt +278 -0
- package/dist/runtime/README.md +9 -7
- package/dist/runtime/cli.js +12 -13
- package/dist/runtime/client.js +79 -17
- package/dist/runtime/contract.js +39 -6
- package/dist/runtime/executor-configuration.js +1 -1
- package/dist/runtime/isolated-actions.js +4 -5
- package/dist/runtime/isolated-worker.js +5 -0
- package/dist/runtime/mcp/aliases.js +29 -0
- package/dist/runtime/mcp/client.js +239 -0
- package/dist/runtime/mcp/contract.js +57 -0
- package/dist/runtime/mcp/functions.js +40 -0
- package/dist/runtime/mcp/network.js +61 -0
- package/dist/runtime/mcp/schema-types.js +35 -0
- package/dist/runtime/mcp/transport.js +18 -0
- package/dist/runtime/project-data.js +1 -1
- package/dist/runtime/register-executor.js +23 -0
- package/dist/runtime/runner.js +30 -24
- package/dist/runtime/sdk-declarations.js +8 -1
- package/dist/runtime/session-job-contract.js +29 -0
- package/dist/runtime/session-job.js +256 -0
- package/dist/runtime/session-plugin-call.js +33 -0
- package/dist/runtime/sessions/manager.js +5 -3
- package/dist/runtime/sessions/process.js +3 -3
- package/dist/runtime/sessions/session-runtime.js +7 -3
- package/dist/runtime/sessions/worker-guard.js +20 -0
- package/dist/runtime/spawn-job.js +69 -0
- package/dist/runtime/supervisor.js +102 -146
- package/dist/runtime/worker.js +48 -45
- package/dist/server/{bun-driver-JKOGHIVX.js → bun-driver-DTZUUCI3.js} +1 -1
- package/dist/server/{chunk-WCVBLUNL.js → chunk-S5SFX3JM.js} +24 -0
- package/dist/server/index.js +2628 -1230
- package/dist/server/migrations/0003_remote-mcp.sql +17 -0
- package/dist/server/migrations/meta/0003_snapshot.json +3395 -0
- package/dist/server/migrations/meta/_journal.json +7 -0
- package/dist/server/{node-driver-FRDSYDBU.js → node-driver-HDJKKWXQ.js} +1 -1
- package/dist/server/out/404/index.html +1 -1
- package/dist/server/out/404.html +1 -1
- package/dist/server/out/__next.!KHdvcmtzcGFjZSk.__PAGE__.txt +10 -10
- package/dist/server/out/__next._full.txt +10 -10
- package/dist/server/out/__next._tree.txt +2 -2
- package/dist/server/out/_next/static/chunks/0ay0b1lpy734z.js +1 -0
- package/dist/server/out/_next/static/chunks/0c-3k17txbh0-.js +1 -0
- package/dist/server/out/_next/static/chunks/0cwfl2xanfapu.js +1 -0
- package/dist/server/out/_next/static/chunks/0e7s8ie0wlk66.js +1 -0
- package/dist/server/out/_next/static/chunks/0ey-6hb0za4r_.js +1 -0
- package/dist/server/out/_next/static/chunks/0huhp5j8dlai8.js +1 -0
- package/dist/server/out/_next/static/chunks/0khjy8qh1ll42.js +1 -0
- package/dist/server/out/_next/static/chunks/0r0572w1rwpcv.js +1 -0
- package/dist/server/out/_next/static/chunks/0rlc9tihf4po6.css +1 -0
- package/dist/server/out/_next/static/chunks/0u_9k8f7709np.js +1 -0
- package/dist/server/out/_next/static/chunks/0w34iczo7r1v5.js +1 -0
- package/dist/server/out/_next/static/chunks/{280w168xxgtwt.js → 0y5lgqdwpeabb.js} +4 -4
- package/dist/server/out/_next/static/chunks/0zfiikazg0_ga.js +1 -0
- package/dist/server/out/_next/static/chunks/1-75euysc3lin.js +22 -0
- package/dist/server/out/_next/static/chunks/10aam78qxauw0.js +1 -0
- package/dist/server/out/_next/static/chunks/12ro_nqb83zku.js +1 -0
- package/dist/server/out/_next/static/chunks/19ue6x5c3f_38.js +3 -0
- package/dist/server/out/_next/static/chunks/1c1ayx3fqtub5.js +31 -0
- package/dist/server/out/_next/static/chunks/1c2xcwifk3vhh.js +1 -0
- package/dist/server/out/_next/static/chunks/1dwr62uuyceq-.js +1 -0
- package/dist/server/out/_next/static/chunks/1fweh1ttncdlv.js +1 -0
- package/dist/server/out/_next/static/chunks/1iklteprcoims.js +1 -0
- package/dist/server/out/_next/static/chunks/1qaow7bdy3oid.js +1 -0
- package/dist/server/out/_next/static/chunks/1tnzhqkfwk7l8.js +1 -0
- package/dist/server/out/_next/static/chunks/1wn9ohqcnx8y8.js +3 -0
- package/dist/server/out/_next/static/chunks/1zieh-zxgxmcp.js +1 -0
- package/dist/server/out/_next/static/chunks/25qsan0t-_of0.js +1 -0
- package/dist/server/out/_next/static/chunks/26yareaaj1kyr.js +1 -0
- package/dist/server/out/_next/static/chunks/2bkkmnhngpacd.js +1 -0
- package/dist/server/out/_next/static/chunks/2e39uy7huhczu.js +1 -0
- package/dist/server/out/_next/static/chunks/2lxgam-nk-e9a.js +3 -0
- package/dist/server/out/_next/static/chunks/{3dx108d0g6032.js → 2navy2mx7--vk.js} +1 -1
- package/dist/server/out/_next/static/chunks/2ngzwwqeitkk7.js +1 -0
- package/dist/server/out/_next/static/chunks/2rp65hq6bmpxv.js +1 -0
- package/dist/server/out/_next/static/chunks/2z60o39-yshg2.js +1 -0
- package/dist/server/out/_next/static/chunks/3_d6w25_b15kx.js +1 -0
- package/dist/server/out/_next/static/chunks/3d8gkwu9nszjk.js +1 -0
- package/dist/server/out/_next/static/chunks/3l-16g1y6k5rs.js +1 -0
- package/dist/server/out/_next/static/chunks/3obu_9-ka7u_h.js +1 -0
- package/dist/server/out/_next/static/chunks/3xs2ji0dgkbmc.js +1 -0
- package/dist/server/out/_next/static/chunks/{turbopack-3-ry682tkyiqk.js → turbopack-2u1d16houkiyo.js} +1 -1
- package/dist/server/out/_not-found/__next._full.txt +3 -3
- package/dist/server/out/_not-found/__next._not-found.__PAGE__.txt +3 -3
- package/dist/server/out/_not-found/__next._tree.txt +2 -2
- package/dist/server/out/_not-found/index.html +1 -1
- package/dist/server/out/_not-found/index.txt +3 -3
- package/dist/server/out/accounts/2fa/__next._full.txt +8 -8
- package/dist/server/out/accounts/2fa/__next._tree.txt +2 -2
- package/dist/server/out/accounts/2fa/__next.accounts.2fa.__PAGE__.txt +8 -8
- package/dist/server/out/accounts/2fa/index.html +1 -1
- package/dist/server/out/accounts/2fa/index.txt +8 -8
- package/dist/server/out/accounts/email/__next._full.txt +7 -7
- package/dist/server/out/accounts/email/__next._tree.txt +2 -2
- package/dist/server/out/accounts/email/__next.accounts.email.__PAGE__.txt +7 -7
- package/dist/server/out/accounts/email/index.html +1 -1
- package/dist/server/out/accounts/email/index.txt +7 -7
- package/dist/server/out/accounts/login/__next._full.txt +7 -7
- package/dist/server/out/accounts/login/__next._tree.txt +2 -2
- package/dist/server/out/accounts/login/__next.accounts.login.__PAGE__.txt +7 -7
- package/dist/server/out/accounts/login/index.html +1 -1
- package/dist/server/out/accounts/login/index.txt +7 -7
- package/dist/server/out/accounts/logout/__next._full.txt +7 -7
- package/dist/server/out/accounts/logout/__next._tree.txt +2 -2
- package/dist/server/out/accounts/logout/__next.accounts.logout.__PAGE__.txt +7 -7
- package/dist/server/out/accounts/logout/index.html +1 -1
- package/dist/server/out/accounts/logout/index.txt +7 -7
- package/dist/server/out/accounts/password/change/__next._full.txt +7 -7
- package/dist/server/out/accounts/password/change/__next._tree.txt +2 -2
- package/dist/server/out/accounts/password/change/__next.accounts.password.change.__PAGE__.txt +7 -7
- package/dist/server/out/accounts/password/change/index.html +1 -1
- package/dist/server/out/accounts/password/change/index.txt +7 -7
- package/dist/server/out/accounts/password/reset/__next._full.txt +5 -5
- package/dist/server/out/accounts/password/reset/__next._tree.txt +2 -2
- package/dist/server/out/accounts/password/reset/__next.accounts.password.reset.__PAGE__.txt +5 -5
- package/dist/server/out/accounts/password/reset/index.html +1 -1
- package/dist/server/out/accounts/password/reset/index.txt +5 -5
- package/dist/server/out/accounts/signup/__next._full.txt +7 -7
- package/dist/server/out/accounts/signup/__next._tree.txt +2 -2
- package/dist/server/out/accounts/signup/__next.accounts.signup.__PAGE__.txt +7 -7
- package/dist/server/out/accounts/signup/index.html +1 -1
- package/dist/server/out/accounts/signup/index.txt +7 -7
- package/dist/server/out/actions/__next.!KHdvcmtzcGFjZSk.actions.__PAGE__.txt +15 -15
- package/dist/server/out/actions/__next._full.txt +15 -15
- package/dist/server/out/actions/__next._tree.txt +2 -2
- package/dist/server/out/actions/index.html +1 -1
- package/dist/server/out/actions/index.txt +15 -15
- package/dist/server/out/agents/__next.!KHdvcmtzcGFjZSk.agents.__PAGE__.txt +8 -8
- package/dist/server/out/agents/__next._full.txt +8 -8
- package/dist/server/out/agents/__next._tree.txt +2 -2
- package/dist/server/out/agents/index.html +1 -1
- package/dist/server/out/agents/index.txt +8 -8
- package/dist/server/out/approvals/__next.!KHdvcmtzcGFjZSk.approvals.__PAGE__.txt +10 -10
- package/dist/server/out/approvals/__next._full.txt +10 -10
- package/dist/server/out/approvals/__next._tree.txt +2 -2
- package/dist/server/out/approvals/index.html +1 -1
- package/dist/server/out/approvals/index.txt +10 -10
- package/dist/server/out/artifacts/__next.!KHdvcmtzcGFjZSk.artifacts.__PAGE__.txt +12 -12
- package/dist/server/out/artifacts/__next._full.txt +12 -12
- package/dist/server/out/artifacts/__next._tree.txt +2 -2
- package/dist/server/out/artifacts/index.html +1 -1
- package/dist/server/out/artifacts/index.txt +12 -12
- package/dist/server/out/audit/__next.!KHdvcmtzcGFjZSk.audit.__PAGE__.txt +10 -10
- package/dist/server/out/audit/__next._full.txt +10 -10
- package/dist/server/out/audit/__next._tree.txt +2 -2
- package/dist/server/out/audit/index.html +1 -1
- package/dist/server/out/audit/index.txt +10 -10
- package/dist/server/out/chat/__next.!KHdvcmtzcGFjZSk.chat.__PAGE__.txt +8 -8
- package/dist/server/out/chat/__next._full.txt +8 -8
- package/dist/server/out/chat/__next._tree.txt +2 -2
- package/dist/server/out/chat/index.html +1 -1
- package/dist/server/out/chat/index.txt +8 -8
- package/dist/server/out/connections/__next.!KHdvcmtzcGFjZSk.connections.__PAGE__.txt +10 -10
- package/dist/server/out/connections/__next._full.txt +10 -10
- package/dist/server/out/connections/__next._tree.txt +2 -2
- package/dist/server/out/connections/index.html +1 -1
- package/dist/server/out/connections/index.txt +10 -10
- package/dist/server/out/credentials/__next.!KHdvcmtzcGFjZSk.credentials.__PAGE__.txt +11 -11
- package/dist/server/out/credentials/__next._full.txt +11 -11
- package/dist/server/out/credentials/__next._tree.txt +2 -2
- package/dist/server/out/credentials/index.html +1 -1
- package/dist/server/out/credentials/index.txt +11 -11
- package/dist/server/out/documents/__next.!KHdvcmtzcGFjZSk.documents.__PAGE__.txt +10 -10
- package/dist/server/out/documents/__next._full.txt +10 -10
- package/dist/server/out/documents/__next._tree.txt +2 -2
- package/dist/server/out/documents/index.html +1 -1
- package/dist/server/out/documents/index.txt +10 -10
- package/dist/server/out/index.html +1 -1
- package/dist/server/out/index.txt +10 -10
- package/dist/server/out/people/__next.!KHdvcmtzcGFjZSk.people.__PAGE__.txt +10 -10
- package/dist/server/out/people/__next._full.txt +10 -10
- package/dist/server/out/people/__next._tree.txt +2 -2
- package/dist/server/out/people/index.html +1 -1
- package/dist/server/out/people/index.txt +10 -10
- package/dist/server/out/plugins/__next.!KHdvcmtzcGFjZSk.plugins.__PAGE__.txt +13 -13
- package/dist/server/out/plugins/__next._full.txt +13 -13
- package/dist/server/out/plugins/__next._tree.txt +2 -2
- package/dist/server/out/plugins/index.html +1 -1
- package/dist/server/out/plugins/index.txt +13 -13
- package/dist/server/out/projects/__next.!KHdvcmtzcGFjZSk.projects.__PAGE__.txt +10 -10
- package/dist/server/out/projects/__next._full.txt +10 -10
- package/dist/server/out/projects/__next._tree.txt +2 -2
- package/dist/server/out/projects/index.html +1 -1
- package/dist/server/out/projects/index.txt +10 -10
- package/dist/server/out/runs/__next.!KHdvcmtzcGFjZSk.runs.__PAGE__.txt +12 -12
- package/dist/server/out/runs/__next._full.txt +12 -12
- package/dist/server/out/runs/__next._tree.txt +2 -2
- package/dist/server/out/runs/index.html +1 -1
- package/dist/server/out/runs/index.txt +12 -12
- package/dist/server/out/schedules/__next.!KHdvcmtzcGFjZSk.schedules.__PAGE__.txt +12 -12
- package/dist/server/out/schedules/__next._full.txt +12 -12
- package/dist/server/out/schedules/__next._tree.txt +2 -2
- package/dist/server/out/schedules/index.html +1 -1
- package/dist/server/out/schedules/index.txt +12 -12
- package/dist/server/out/settings/__next.!KHdvcmtzcGFjZSk.settings.__PAGE__.txt +10 -10
- package/dist/server/out/settings/__next._full.txt +10 -10
- package/dist/server/out/settings/__next._tree.txt +2 -2
- package/dist/server/out/settings/index.html +1 -1
- package/dist/server/out/settings/index.txt +10 -10
- package/dist/server/out/setup/__next._full.txt +7 -7
- package/dist/server/out/setup/__next._tree.txt +2 -2
- package/dist/server/out/setup/__next.setup.__PAGE__.txt +7 -7
- package/dist/server/out/setup/index.html +1 -1
- package/dist/server/out/setup/index.txt +7 -7
- package/dist/server/out/tables/__next.!KHdvcmtzcGFjZSk.tables.__PAGE__.txt +10 -10
- package/dist/server/out/tables/__next._full.txt +10 -10
- package/dist/server/out/tables/__next._tree.txt +2 -2
- package/dist/server/out/tables/index.html +1 -1
- package/dist/server/out/tables/index.txt +10 -10
- package/dist/server/out/webhooks/__next.!KHdvcmtzcGFjZSk.webhooks.__PAGE__.txt +10 -10
- package/dist/server/out/webhooks/__next._full.txt +10 -10
- package/dist/server/out/webhooks/__next._tree.txt +2 -2
- package/dist/server/out/webhooks/index.html +1 -1
- package/dist/server/out/webhooks/index.txt +10 -10
- package/dist/server/out/workspaces/invite/__next._full.txt +6 -6
- package/dist/server/out/workspaces/invite/__next._tree.txt +2 -2
- package/dist/server/out/workspaces/invite/__next.workspaces.invite.__PAGE__.txt +6 -6
- package/dist/server/out/workspaces/invite/index.html +1 -1
- package/dist/server/out/workspaces/invite/index.txt +6 -6
- package/docs/browser-sessions.md +85 -0
- package/docs/npm-distribution.md +13 -11
- package/docs/remote-mcp.md +51 -0
- package/package.json +53 -20
- package/runtime/README.md +9 -7
- package/dist/runtime/generated/schema.d.ts +0 -6443
- package/dist/server/out/THIRD_PARTY_NOTICES.md +0 -13
- package/dist/server/out/_next/static/chunks/016glzdsa3q5_.js +0 -1
- package/dist/server/out/_next/static/chunks/05i1qq0mw887k.js +0 -1
- package/dist/server/out/_next/static/chunks/06tt8wiyre1ez.js +0 -1
- package/dist/server/out/_next/static/chunks/0cm9i2msjsy--.js +0 -1
- package/dist/server/out/_next/static/chunks/0hq5dvj7fy64b.js +0 -1
- package/dist/server/out/_next/static/chunks/0ma4vl-fj0tmu.js +0 -1
- package/dist/server/out/_next/static/chunks/0noal-jqjivtf.js +0 -1
- package/dist/server/out/_next/static/chunks/0spckmsiek0gd.js +0 -1
- package/dist/server/out/_next/static/chunks/103sekujf0rxr.js +0 -1
- package/dist/server/out/_next/static/chunks/10h8kpcnjfe_v.js +0 -1
- package/dist/server/out/_next/static/chunks/16_aurf9162_6.js +0 -1
- package/dist/server/out/_next/static/chunks/1c48yx15nlt6w.js +0 -1
- package/dist/server/out/_next/static/chunks/1jp827_2p_wkf.js +0 -1
- package/dist/server/out/_next/static/chunks/1kdk-viqnjs3j.js +0 -1
- package/dist/server/out/_next/static/chunks/1mlfee105fhl7.js +0 -1
- package/dist/server/out/_next/static/chunks/1q9jpzm9b6zy9.js +0 -1
- package/dist/server/out/_next/static/chunks/1v0-a7pehktp9.js +0 -22
- package/dist/server/out/_next/static/chunks/24qxhh2dqvhaa.js +0 -1
- package/dist/server/out/_next/static/chunks/253gnn8ai3i89.js +0 -1
- package/dist/server/out/_next/static/chunks/27umf0z4povug.js +0 -1
- package/dist/server/out/_next/static/chunks/2a_c2xcjy62fq.css +0 -1
- package/dist/server/out/_next/static/chunks/2mvlvogrl6o0u.js +0 -1
- package/dist/server/out/_next/static/chunks/2xzrcwr9q6195.js +0 -1
- package/dist/server/out/_next/static/chunks/2yi6lq56xoijl.js +0 -31
- package/dist/server/out/_next/static/chunks/30g0jo299pr8e.js +0 -1
- package/dist/server/out/_next/static/chunks/36tf56rgybjz0.js +0 -3
- package/dist/server/out/_next/static/chunks/39dofrhzg_uju.js +0 -1
- package/dist/server/out/_next/static/chunks/3a8aanmz3kfof.js +0 -1
- package/dist/server/out/_next/static/chunks/3bd3k15tx3lj1.js +0 -1
- package/dist/server/out/_next/static/chunks/3d34pxerfr389.js +0 -1
- package/dist/server/out/_next/static/chunks/3elab9vgx7_ok.js +0 -1
- package/dist/server/out/_next/static/chunks/3gvae9c-5pi5z.js +0 -1
- package/dist/server/out/_next/static/chunks/3hzia782sc9pf.js +0 -1
- package/dist/server/out/_next/static/chunks/3jl4k-15i8847.js +0 -1
- package/dist/server/out/_next/static/chunks/3lb23el6qno6s.js +0 -1
- package/dist/server/out/_next/static/chunks/3prum3lr5470i.js +0 -3
- package/dist/server/out/_next/static/chunks/3prwkrciuqwjg.js +0 -1
- package/dist/server/out/_next/static/chunks/3txmqtuo5xgfd.js +0 -3
- package/dist/server/out/third-party-licenses/monaco-editor.txt +0 -21
- package/dist/server/out/third-party-licenses/zod.txt +0 -21
- /package/dist/server/out/_next/static/{F49bfPs3jKhcIuc95hqZh → -qfuCDzkIvBZY_UFsMHnB}/_buildManifest.js +0 -0
- /package/dist/server/out/_next/static/{F49bfPs3jKhcIuc95hqZh → -qfuCDzkIvBZY_UFsMHnB}/_clientMiddlewareManifest.js +0 -0
- /package/dist/server/out/_next/static/{F49bfPs3jKhcIuc95hqZh → -qfuCDzkIvBZY_UFsMHnB}/_ssgManifest.js +0 -0
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Third-party notices
|
|
2
|
-
|
|
3
|
-
The action editor includes the following third-party software. The linked files
|
|
4
|
-
contain the copyright and permission notices supplied by the installed packages.
|
|
5
|
-
|
|
6
|
-
- Zod: declaration sources embedded in `src/generated/zod-libraries.json` for
|
|
7
|
-
editor type information. [MIT license](third-party-licenses/zod.txt).
|
|
8
|
-
- Monaco Editor: browser editor assets served from `monaco/vs/`.
|
|
9
|
-
[MIT license](third-party-licenses/monaco-editor.txt).
|
|
10
|
-
|
|
11
|
-
The build copies these license texts from the locked dependencies. These notices
|
|
12
|
-
cover the listed redistributed sources and assets; they do not assign a license
|
|
13
|
-
to OrgSDK or replace notices supplied by other dependencies.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22016,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return m},useLinkStatus:function(){return v}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(90809),a=e.r(18050),i=u._(e.r(71645)),l=e.r(95057),c=e.r(8372),s=e.r(18581),f=e.r(18967),p=e.r(5550),d=e.r(88540),h=e.r(91949),g=e.r(73668),y=e.r(9396);function m(t){var r;let n,o,u,[m,v]=(0,i.useOptimistic)(h.IDLE_LINK_STATUS),P=(0,i.useRef)(null),{href:S,as:E,children:C,prefetch:_=null,passHref:j,replace:O,shallow:T,scroll:x,onClick:L,onMouseEnter:N,onTouchStart:R,legacyBehavior:w=!1,onNavigate:$,transitionTypes:M,ref:U,unstable_dynamicOnHover:A,...I}=t;n=C,w&&("string"==typeof n||"number"==typeof n)&&(n=(0,a.jsx)("a",{children:n}));let k=i.default.useContext(c.AppRouterContext),B=!1!==_,F=!1===_?"none":!0===_?"full":"auto",K="none"!==F?"auto"===F?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,D="string"==typeof(r=E||S)?r:(0,l.formatUrl)(r);if(w){if(n?.$$typeof===Symbol.for("react.lazy"))throw Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag.");o=i.default.Children.only(n)}let z=w?o&&"object"==typeof o&&o.ref:U,W,q=i.default.useCallback(e=>(null!==k&&(P.current=(0,h.mountLinkInstance)(e,D,k,K,B,v,W)),()=>{P.current&&((0,h.unmountLinkForCurrentNavigation)(P.current),P.current=null),(0,h.unmountPrefetchableInstance)(e)}),[B,D,k,K,v,W]),J={ref:(0,s.useMergedRef)(q,z),onClick(t){w||"function"!=typeof L||L(t),w&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!k||t.defaultPrevented||function(t,r,n,o,u,a,i,l="none"){if("u">typeof window){let c,{nodeName:s}=t.currentTarget;if("A"===s.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{navigate:f}=e.r(32916);f(r,o?"replace":"push",!1===u?d.ScrollBehavior.NoScroll:d.ScrollBehavior.Default,n.current,i,l)}}(t,D,P,O,x,$,M,F)},onMouseEnter(e){w||"function"!=typeof N||N(e),w&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),k&&B&&(0,h.onNavigationIntent)(e.currentTarget,!0===A)},onTouchStart:function(e){w||"function"!=typeof R||R(e),w&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),k&&B&&(0,h.onNavigationIntent)(e.currentTarget,!0===A)}};return(0,f.isAbsoluteUrl)(D)?J.href=D:w&&!j&&("a"!==o.type||"href"in o.props)||(J.href=(0,p.addBasePath)(D)),u=w?i.default.cloneElement(o,J):(0,a.jsx)("a",{...I,...J,children:n}),(0,a.jsx)(b.Provider,{value:m,children:u})}let b=(0,i.createContext)(h.IDLE_LINK_STATUS),v=()=>(0,i.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=e.r(71645);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=u(e,n)),t&&(o.current=u(t,n))},[e,t])}function u(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},95057,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return c},urlObjectKeys:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",i=e.hash||"",l=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),l&&"object"==typeof l&&(l=String(u.urlQueryToSearchParams(l)));let s=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||a.test(n))&&!1!==c?(c="//"+(c||""),o&&"/"!==o[0]&&(o="/"+o)):c||(c=""),i&&"#"!==i[0]&&(i="#"+i),s&&"?"!==s[0]&&(s="?"+s),o=o.replace(/[?#]/g,encodeURIComponent),s=s.replace("#","%23"),`${n}${c}${o}${s}${i}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return i(e)}},73668,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return u}});let n=e.r(18967),o=e.r(52817);function u(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},18967,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return m},MiddlewareNotFoundError:function(){return S},MissingStaticPage:function(){return P},NormalizeError:function(){return b},PageNotFoundError:function(){return v},SP:function(){return g},ST:function(){return y},WEB_VITALS:function(){return u},execOnce:function(){return a},getDisplayName:function(){return f},getLocationOrigin:function(){return c},getURL:function(){return s},isAbsoluteUrl:function(){return l},isResSent:function(){return p},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return d},stringifyError:function(){return E}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=["CLS","FCP","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&i.test(e)};function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function s(){let{href:e}=window.location,t=c();return e.substring(t.length)}function f(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function p(e){return e.finished||e.headersSent}function d(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&p(r))return n;if(!n)throw Error(`"${f(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`);return n}let g="u">typeof performance,y=g&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class m extends Error{}class b extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class P extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class S extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function E(e){return JSON.stringify({message:e.message,stack:e.stack})}}])})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,5506,e=>{var t=e.i(36635);e.s(["f",()=>t.n])},75514,73199,e=>{var t=e.i(85813);e.s(["f",()=>t.t],75514);var r=e.i(12311);e.s(["f",()=>r.t],73199)},44362,12311,36635,85813,e=>{let t;function r(e){let t={subscribe(t){let r=null,n=!1,o=!1,i=!1;function s(){if(null===r){i=!0;return}!o&&(o=!0,"function"==typeof r?r():r&&r.unsubscribe())}return r=e({next(e){var r;n||null==(r=t.next)||r.call(t,e)},error(e){var r;n||(n=!0,null==(r=t.error)||r.call(t,e),s())},complete(){var e;n||(n=!0,null==(e=t.complete)||e.call(t),s())}}),i&&s(),{unsubscribe:s}},pipe:(...e)=>e.reduce(n,t)};return t}function n(e,t){return t(e)}function o(e){return r(t=>(function t(r=0,n=e.op){let o=e.links[r];if(!o)throw Error("No more links to execute - did you forget to add an ending link?");return o({op:n,next:e=>t(r+1,e)})})().subscribe(t))}function i(e){return Array.isArray(e)?e:[e]}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t,r){var n;return(n=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==s(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach(function(t){l(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function c(e){return!!e&&!Array.isArray(e)&&"object"==typeof e}function f(){return Object.create(null)}e.s(["n",0,o,"t",0,function(e){return t=>{let n=i(e.true).map(e=>e(t)),s=i(e.false).map(e=>e(t));return t=>r(r=>{let i=e.condition(t.op)?n:s;return o({op:t.op,links:i}).subscribe(r)})}}],12311);let p=[-32603,-32603,-32603,-32603];function y(e){return e instanceof b}var d,h,b=class e extends Error{constructor(t,r){var n,o;let i=null==r?void 0:r.cause;super(t,{cause:i}),l(this,"cause",void 0),l(this,"shape",void 0),l(this,"data",void 0),l(this,"meta",void 0),this.meta=null==r?void 0:r.meta,this.cause=i,this.shape=null==r||null==(n=r.result)?void 0:n.error,this.data=null==r||null==(o=r.result)?void 0:o.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,e.prototype)}static from(t,r={}){return y(t)?(r.meta&&(t.meta=u(u({},t.meta),r.meta)),t):c(t)&&c(t.error)&&"number"==typeof t.error.code&&"string"==typeof t.error.message?new e(t.error.message,u(u({},r),{},{result:t,cause:r.cause})):new e("string"==typeof t?t:c(t)&&"string"==typeof t.message?t.message:"Unknown error",u(u({},r),{},{cause:t}))}};function m(e){return e?"input"in e?e:{input:e,output:e}:{input:{serialize:e=>e,deserialize:e=>e},output:{serialize:e=>e,deserialize:e=>e}}}function v(...e){let t=new AbortController;for(let r of e)(null==r?void 0:r.aborted)?t.abort():null==r||r.addEventListener("abort",()=>t.abort(),{once:!0});return t.signal}e.s(["n",0,y,"t",0,b],36635);let w={query:"GET",mutation:"POST",subscription:"PATCH"};function g(e){return"input"in e?e.transformer.input.serialize(e.input):function(e){let t={};for(let r=0;r<e.length;r++){let n=e[r];t[r]=n}return t}(e.inputs.map(t=>e.transformer.input.serialize(t)))}let S=e=>{let t=e.url.split("?"),r=t[0].replace(/\/$/,"")+"/"+e.path,n=[];if(t[1]&&n.push(t[1]),"inputs"in e&&n.push("batch=1"),"query"===e.type||"subscription"===e.type){let t=g(e);void 0!==t&&"POST"!==e.methodOverride&&n.push(`input=${encodeURIComponent(JSON.stringify(t))}`)}return n.length&&(r+="?"+n.join("&")),r},P=e=>{if("query"===e.type&&"POST"!==e.methodOverride)return;let t=g(e);return void 0!==t?JSON.stringify(t):void 0};var O=class extends Error{constructor(){let e="AbortError";super(e),this.name=e,this.message=e}};async function j(e){var t,r,n,o=e.signal;if(null==o?void 0:o.aborted){if(null==(n=o.throwIfAborted)||n.call(o),"u">typeof DOMException)throw new DOMException("AbortError","AbortError");throw new O}let i=e.getUrl(e),s=e.getBody(e),l=null!=(t=e.methodOverride)?t:w[e.type],a=await (async()=>{let t=await e.headers();return Symbol.iterator in t?Object.fromEntries(t):t})(),c=u(u(u({},e.contentTypeHeader&&"GET"!==l?{"content-type":e.contentTypeHeader}:{}),e.trpcAcceptHeader?{[null!=(r=e.trpcAcceptHeaderKey)?r:"trpc-accept"]:e.trpcAcceptHeader}:void 0),a);return(function(e){if(e)return e;if("u">typeof window&&"function"==typeof window.fetch)return window.fetch.bind(window);if("u">typeof globalThis&&"function"==typeof globalThis.fetch)return globalThis.fetch;throw Error("No fetch implementation found")})(e.fetch)(i,{method:l,signal:e.signal,body:s,headers:c})}async function k(e){let t={},r=await j(e);t.response=r;let n=await r.json();return t.responseJSON=n,{json:n,meta:t}}let E=()=>{},x=e=>{Object.freeze&&Object.freeze(e)};function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(e,t,r){var n;return(n=function(e,t){if("object"!=T(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=T(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==T(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach(function(t){A(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var q=class extends Error{constructor(){super("Unable to transform response from server")}};Symbol();let I=()=>{throw Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function D(e){let t=null,r=null;function n(){let n=function(t){let r=[[]],n=0;for(;;){var o,i;let s=t[n];if(!s)break;let l=r[r.length-1];if(s.aborted){null==(o=s.reject)||o.call(s,Error("Aborted")),n++;continue}if(e.validate(l.concat(s).map(e=>e.key))){l.push(s),n++;continue}if(0===l.length){null==(i=s.reject)||i.call(s,Error("Input is too big for a single dispatch")),n++;continue}r.push([])}return r}(t);for(let o of(clearTimeout(r),r=null,t=null,n)){if(!o.length)continue;let t={items:o};for(let e of o)e.batch=t;e.fetch(t.items.map(e=>e.key)).then(async e=>{for(let n of(await Promise.all(e.map(async(e,r)=>{var n,o;let i=t.items[r];try{let t=await Promise.resolve(e);null==(n=i.resolve)||n.call(i,t)}catch(e){null==(o=i.reject)||o.call(i,e)}i.batch=null,i.reject=null,i.resolve=null})),t.items)){var r;null==(r=n.reject)||r.call(n,Error("Missing result")),n.batch=null}}).catch(e=>{for(let n of t.items){var r;null==(r=n.reject)||r.call(n,e),n.batch=null}})}}return{load:function(e){let o={aborted:!1,key:e,batch:null,resolve:I,reject:I},i=new Promise((e,r)=>{o.reject=r,o.resolve=e,null!=t||(t=[]),t.push(o)});return null!=r||(r=setTimeout(n)),i}}}function N(e){let t=e,n=[],o=r(e=>(void 0!==t&&e.next(t),n.push(e),()=>{n.splice(n.indexOf(e),1)}));return o.next=e=>{if(t!==e)for(let r of(t=e,n))r.next(e)},o.get=()=>t,o}e.s(["n",0,D,"t",0,function(e){var t,n;let o={url:e.url.toString(),fetch:e.fetch,transformer:m(e.transformer),methodOverride:e.methodOverride},i=null!=(t=e.maxURLLength)?t:1/0,s=null!=(n=e.maxItems)?n:1/0;return()=>{let t=t=>({validate(e){if(1/0===i&&1/0===s)return!0;if(e.length>s)return!1;let r=e.map(e=>e.path).join(","),n=e.map(e=>e.input);return S(u(u({},o),{},{type:t,path:r,inputs:n,signal:null})).length<=i},async fetch(r){let n,i=r.map(e=>e.path).join(","),s=r.map(e=>e.input),l=function(...e){let t=new AbortController,r=e.length,n=0,o=()=>{++n===r&&t.abort()};for(let t of e)(null==t?void 0:t.aborted)?o():null==t||t.addEventListener("abort",o,{once:!0});return t.signal}(...r.map(e=>e.signal)),a=await (n=u(u({},o),{},{path:i,inputs:s,type:t,headers:()=>e.headers?"function"==typeof e.headers?e.headers({opList:r}):e.headers:{},signal:l}),k(u(u({},n),{},{contentTypeHeader:"application/json",getUrl:S,getBody:P})));return(Array.isArray(a.json)?a.json:r.map(()=>a.json)).map(e=>({meta:a.meta,json:e}))}}),n={query:D(t("query")),mutation:D(t("mutation"))};return({op:e})=>r(t=>{let r;if("subscription"===e.type)throw Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");let i=new AbortController,s=n[e.type].load(u(u({},e),{},{signal:v(e.signal,i.signal)})),l=!1;return s.then(e=>{l=!0,r=e;let n=function(e,t){let r;try{r=function(e,t){if("error"in e){let r=t.deserialize(e.error);return{ok:!1,error:C(C({},e),{},{error:r})}}return{ok:!0,result:C(C({},e.result),(!e.result.type||"data"===e.result.type)&&{type:"data",data:t.deserialize(e.result.data)})}}(e,t)}catch(e){throw new q}if(!r.ok&&(!c(r.error.error)||"number"!=typeof r.error.error.code)||r.ok&&!c(r.result))throw new q;return r}(e.json,o.transformer.output);n.ok?(t.next({context:e.meta,result:n.result}),t.complete()):t.error(b.from(n.error,{meta:e.meta}))}).catch(e=>{l=!0,t.error(b.from(e,{meta:null==r?void 0:r.meta}))}),()=>{l||i.abort()}})}}],85813),Symbol();let z=(e,...t)=>"function"==typeof e?e(...t):e;async function R(e){let t=await z(e.url);return e.connectionParams?t+`${t.includes("?")?"&":"?"}connectionParams=1`:t}async function _(e,t){let r={method:"connectionParams",data:await z(e)};return t.encode(r)}var W=class e{constructor(t){var r;if(l(this,"id",++e.connectCount),l(this,"WebSocketPonyfill",void 0),l(this,"urlOptions",void 0),l(this,"keepAliveOpts",void 0),l(this,"encoder",void 0),l(this,"wsObservable",N(null)),l(this,"openPromise",null),this.WebSocketPonyfill=null!=(r=t.WebSocketPonyfill)?r:WebSocket,!this.WebSocketPonyfill)throw Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=t.urlOptions,this.keepAliveOpts=t.keepAlive,this.encoder=t.encoder}get ws(){return this.wsObservable.get()}set ws(e){this.wsObservable.next(e)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){if(this.openPromise)return this.openPromise;this.id=++e.connectCount;let t=R(this.urlOptions).then(e=>new this.WebSocketPonyfill(e));this.openPromise=t.then(async e=>{this.ws=e,e.binaryType="arraybuffer",e.addEventListener("message",function({data:e}){"PING"===e&&this.send("PONG")}),this.keepAliveOpts.enabled&&function(e,{intervalMs:t,pongTimeoutMs:r}){let n,o;function i(){n=setTimeout(()=>{e.send("PING"),o=setTimeout(()=>{e.close()},r)},t)}e.addEventListener("open",i),e.addEventListener("message",({data:e})=>{clearTimeout(n),i(),"PONG"===e&&(clearTimeout(o),clearTimeout(n),i())}),e.addEventListener("close",()=>{clearTimeout(n),clearTimeout(o)})}(e,this.keepAliveOpts),e.addEventListener("close",()=>{this.ws===e&&(this.ws=null)}),await function(e){let t,r,{promise:n,resolve:o,reject:i}={promise:new Promise((e,n)=>{t=e,r=n}),resolve:t,reject:r};return e.addEventListener("open",()=>{e.removeEventListener("error",i),o()}),e.addEventListener("error",i),n}(e),this.urlOptions.connectionParams&&e.send(await _(this.urlOptions.connectionParams,this.encoder))});try{await this.openPromise}finally{this.openPromise=null}}async close(){try{await this.openPromise}finally{var e;null==(e=this.ws)||e.close()}}};l(W,"connectCount",0);let U=new WeakMap,$=()=>{};t=Symbol.toStringTag;var J=class e{constructor(e){A(this,"promise",void 0),A(this,"subscribers",[]),A(this,"settlement",null),A(this,t,"Unpromise"),"function"==typeof e?this.promise=new Promise(e):this.promise=e;let r=this.promise.then(e=>{let{subscribers:t}=this;this.subscribers=null,this.settlement={status:"fulfilled",value:e},null==t||t.forEach(({resolve:t})=>{t(e)})});"catch"in r&&r.catch(e=>{let{subscribers:t}=this;this.subscribers=null,this.settlement={status:"rejected",reason:e},null==t||t.forEach(({reject:t})=>{t(e)})})}subscribe(){let e,t,{settlement:r}=this;if(null===r){var n;let r,o;if(null===this.subscribers)throw Error("Unpromise settled but still has subscribers");let i={promise:new Promise((e,t)=>{r=e,o=t}),resolve:r,reject:o};this.subscribers=(n=this.subscribers,[...n,i]),e=i.promise,t=()=>{null!==this.subscribers&&(this.subscribers=function(e,t){let r=e.indexOf(t);if(-1!==r)return[...e.slice(0,r),...e.slice(r+1)];return e}(this.subscribers,i))}}else{let{status:n}=r;e="fulfilled"===n?Promise.resolve(r.value):Promise.reject(r.reason),t=$}return Object.assign(e,{unsubscribe:t})}then(e,t){let r=this.subscribe(),{unsubscribe:n}=r;return Object.assign(r.then(e,t),{unsubscribe:n})}catch(e){let t=this.subscribe(),{unsubscribe:r}=t;return Object.assign(t.catch(e),{unsubscribe:r})}finally(e){let t=this.subscribe(),{unsubscribe:r}=t;return Object.assign(t.finally(e),{unsubscribe:r})}static proxy(t){let r=e.getSubscribablePromise(t);return void 0!==r?r:e.createSubscribablePromise(t)}static createSubscribablePromise(t){let r=new e(t);return U.set(t,r),U.set(r,r),r}static getSubscribablePromise(e){return U.get(e)}static resolve(t){let r="object"==typeof t&&null!==t&&"then"in t&&"function"==typeof t.then?t:Promise.resolve(t);return e.proxy(r).subscribe()}static async any(t){let r=(Array.isArray(t)?t:[...t]).map(e.resolve);try{return await Promise.any(r)}finally{r.forEach(({unsubscribe:e})=>{e()})}}static async race(t){let r=(Array.isArray(t)?t:[...t]).map(e.resolve);try{return await Promise.race(r)}finally{r.forEach(({unsubscribe:e})=>{e()})}}static async raceReferences(e){let t=e.map(G);try{return await Promise.race(t)}finally{for(let e of t)e.unsubscribe()}}};function G(e){return J.proxy(e).then(()=>[e])}null!=(d=Symbol).dispose||(d.dispose=Symbol()),null!=(h=Symbol).asyncDispose||(h.asyncDispose=Symbol());let H=Symbol();function M(){var e="function"==typeof SuppressedError?SuppressedError:function(e,t){var r=Error();return r.name="SuppressedError",r.error=e,r.suppressed=t,r},t={},r=[];function n(e,t){if(null!=t){if(Object(t)!==t)throw TypeError("using declarations can only be used with objects, functions, null, or undefined.");if(e)var n=t[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose")];if(void 0===n&&(n=t[Symbol.dispose||Symbol.for("Symbol.dispose")],e))var o=n;if("function"!=typeof n)throw TypeError("Object is not disposable.");o&&(n=function(){try{o.call(t)}catch(e){return Promise.reject(e)}}),r.push({v:t,d:n,a:e})}else e&&r.push({d:t,a:e});return t}return{e:t,u:n.bind(null,!1),a:n.bind(null,!0),d:function(){var n,o=this.e,i=0;function s(){for(;n=r.pop();)try{if(!n.a&&1===i)return i=0,r.push(n),Promise.resolve().then(s);if(n.d){var e=n.d.call(n.v);if(n.a)return i|=2,Promise.resolve(e).then(s,l)}else i|=1}catch(e){return l(e)}if(1===i)return o!==t?Promise.reject(o):Promise.resolve();if(o!==t)throw o}function l(r){return o=o!==t?new e(r,o):r,s()}return s()}}}function B(e,t){this.v=e,this.k=t}function K(e){var t,r;function n(t,r){try{var i=e[t](r),s=i.value,l=s instanceof B;Promise.resolve(l?s.v:s).then(function(r){if(l){var a="return"===t?"return":"next";if(!s.k||r.done)return n(a,r);r=e[a](r).value}o(i.done?"return":"normal",r)},function(e){n("throw",e)})}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,o){return new Promise(function(i,s){var l={key:e,arg:o,resolve:i,reject:s,next:null};r?r=r.next=l:(t=r=l,n(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}async function F(e){try{let i,s;var t,r,n,o=M();let l=o.u((t=e.timeoutMs,i=null,r={start(){if(i)throw Error("Timer already started");return new Promise(e=>{i=setTimeout(()=>e(H),t)})}},n=()=>{i&&clearTimeout(i)},s=r[Symbol.dispose],r[Symbol.dispose]=()=>{n(),null==s||s.call(r)},r)),a=await J.race([e.promise,l.start()]);if(a===H)return await e.onTimeout();return a}catch(e){o.e=e}finally{o.d()}}K.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},K.prototype.next=function(e){return this._invoke("next",e)},K.prototype.throw=function(e){return this._invoke("throw",e)},K.prototype.return=function(e){return this._invoke("return",e)},Symbol("ping");var X=class{constructor(e){l(this,"links",void 0),l(this,"runtime",void 0),l(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=e.links.map(e=>e(this.runtime))}$request(e){var t;return o({links:this.links,op:u(u({},e),{},{context:null!=(t=e.context)?t:{},id:++this.requestId})}).pipe(e=>{let t=0,n=null,o=[];return r(r=>(t++,o.push(r),n||(n=e.subscribe({next(e){for(let r of o){var t;null==(t=r.next)||t.call(r,e)}},error(e){for(let r of o){var t;null==(t=r.error)||t.call(r,e)}},complete(){for(let t of o){var e;null==(e=t.complete)||e.call(t)}}})),{unsubscribe(){if(0==--t&&n){let e=n;n=null,e.unsubscribe()}let e=o.findIndex(e=>e===r);e>-1&&o.splice(e,1)}}))})}async requestAsPromise(e){try{let t,r=this.$request(e);return(await (t=new AbortController,new Promise((e,n)=>{let o=!1;function i(){o||(o=!0,s.unsubscribe())}t.signal.addEventListener("abort",()=>{n(t.signal.reason)});let s=r.subscribe({next(t){o=!0,e(t),i()},error(e){n(e)},complete(){t.abort(),i()}})}))).result.data}catch(e){throw b.from(e)}}query(e,t,r){return this.requestAsPromise({type:"query",path:e,input:t,context:null==r?void 0:r.context,signal:null==r?void 0:r.signal})}mutation(e,t,r){return this.requestAsPromise({type:"mutation",path:e,input:t,context:null==r?void 0:r.context,signal:null==r?void 0:r.signal})}subscription(e,t,r){return this.$request({type:"subscription",path:e,input:t,context:r.context,signal:r.signal}).subscribe({next(e){var t,n,o,i;switch(e.result.type){case"state":null==(t=r.onConnectionStateChange)||t.call(r,e.result);break;case"started":null==(n=r.onStarted)||n.call(r,{context:e.context});break;case"stopped":null==(o=r.onStopped)||o.call(r);break;case"data":case void 0:null==(i=r.onData)||i.call(r,e.result.data)}},error(e){var t;null==(t=r.onError)||t.call(r,e)},complete(){var e;null==(e=r.onComplete)||e.call(r)}})}};let Q=Symbol.for("trpc_untypedClient"),V={query:"query",mutate:"mutation",subscribe:"subscription"};function Y(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return(Y=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new Y(e)}async function Z(e){let t=await z(e.url);if(e.connectionParams){let r=await z(e.connectionParams),n=t.includes("?")?"&":"?";t+=n+"connectionParams="+encodeURIComponent(JSON.stringify(r))}return t}function ee(e,t){this.v=e,this.k=t}function et(e){var t,r;function n(t,r){try{var i=e[t](r),s=i.value,l=s instanceof ee;Promise.resolve(l?s.v:s).then(function(r){if(l){var a="return"===t?"return":"next";if(!s.k||r.done)return n(a,r);r=e[a](r).value}o(i.done?"return":"normal",r)},function(e){n("throw",e)})}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,o){return new Promise(function(i,s){var l={key:e,arg:o,resolve:i,reject:s,next:null};r?r=r.next=l:(t=r=l,n(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}et.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},et.prototype.next=function(e){return this._invoke("next",e)},et.prototype.throw=function(e){return this._invoke("throw",e)},et.prototype.return=function(e){return this._invoke("return",e)},e.s(["$",0,function(e){let t;var r=new X(e);let n=function e(t,r,n){let o=r.join(".");return null!=n[o]||(n[o]=new Proxy(E,{get(o,i){if("string"==typeof i&&"then"!==i)return e(t,[...r,i],n)},apply(e,n,o){let i=r[r.length-1];if("valueOf"===i||"toString"===i||"toJSON"===i)return`tRPC.proxy(${r.slice(0,-1).join(".")})`;let s={args:o,path:r};return"call"===i?s={args:o.length>=2?[o[1]]:[],path:r.slice(0,-1)}:"apply"===i&&(s={args:o.length>=2?o[1]:[],path:r.slice(0,-1)}),x(s.args),x(s.path),t(s)}})),n[o]}(({path:e,args:t})=>{let n=[...e],o=V[n.pop()],i=n.join(".");return r[o](i,...t)},[],f());return t=e=>e===Q?r:n[e],new Proxy(E,{get(e,r){if("then"!==r)return t(r)}})},"I",0,function(e){let t=m(e.transformer);return()=>({op:n})=>r(r=>{var o;let i,{type:s,path:l,input:a}=n;if("subscription"!==s)throw Error("httpSubscriptionLink only supports subscriptions");let c=new AbortController,y=function(e){var t;let{deserialize:r=e=>e}=e,n=f(),o=e.signal,i=null,s=()=>new ReadableStream({async start(t){let[s,l]=await Promise.all([e.url(),e.init()]),a=i=new e.EventSource(s,l);t.enqueue({type:"connecting",eventSource:i,event:null}),a.addEventListener("connected",e=>{let r=JSON.parse(e.data);n=r,t.enqueue({type:"connected",options:r,eventSource:a})}),a.addEventListener("serialized-error",e=>{t.enqueue({type:"serialized-error",error:r(JSON.parse(e.data)),eventSource:a})}),a.addEventListener("ping",()=>{t.enqueue({type:"ping",eventSource:a})}),a.addEventListener("return",()=>{a.close(),t.close(),i=null}),a.addEventListener("error",e=>{a.readyState===a.CLOSED?t.error(e):t.enqueue({type:"connecting",eventSource:a,event:e})}),a.addEventListener("message",e=>{let n={data:r(JSON.parse(e.data))};e.lastEventId&&(n.id=e.lastEventId),t.enqueue({type:"data",data:n,eventSource:a})});let u=()=>{try{a.close(),t.close()}catch(e){}};o.aborted?u():o.addEventListener("abort",u)},cancel(){null==i||i.close()}});return t=function*(){try{var e,t=M();let r=t.a((()=>{var e;let t,r=s(),n=r.getReader();async function o(){await n.cancel(),i=null}return e={read:()=>n.read(),async recreate(){await o(),n=(r=s()).getReader()}},t=e[Symbol.asyncDispose],e[Symbol.asyncDispose]=async()=>{await o(),await (null==t?void 0:t.call(e))},e})());for(;;){let t=r.read(),o=n.reconnectAfterInactivityMs;o&&(t=F({promise:t,timeoutMs:o,onTimeout:async()=>{let e={value:{type:"timeout",ms:o,eventSource:i},done:!1};return await r.recreate(),e}}));let s=yield(e=t,new B(e,0));if(s.done)return s.value;yield s.value}}catch(e){t.e=e}finally{yield new B(t.d(),0)}},function(){return new K(t.apply(this,arguments))}()}({url:async()=>{var r;return S({transformer:t,url:await Z(e),input:(r=i)&&(null==a||"object"==typeof a)?u(u({},null!=a?a:{}),{},{lastEventId:r}):a,path:l,type:s,signal:null})},init:()=>z(e.eventSourceOptions,{op:n}),signal:v(n.signal,c.signal),deserialize:e=>t.output.deserialize(e),EventSource:null!=(o=e.EventSource)?o:globalThis.EventSource}),d=N({type:"state",state:"connecting",error:null}),h=d.subscribe({next(e){r.next({result:e})}});return(async()=>{var e=!1,t=!1;try{for(var n,o,s=function(e){var t,r,n,o=2;for("u">typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);o--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new Y(t.call(e));r="@@asyncIterator",n="@@iterator"}throw TypeError("Object is not async iterable")}(y);e=!(o=await s.next()).done;e=!1){let e=o.value;switch(e.type){case"ping":break;case"data":let t,n=e.data;n.id?(i=n.id,t={id:n.id,data:n}):t={data:n.data},r.next({result:t,context:{eventSource:e.eventSource}});break;case"connected":r.next({result:{type:"started"},context:{eventSource:e.eventSource}}),d.next({type:"state",state:"pending",error:null});break;case"serialized-error":{let t=b.from({error:e.error});if(p.includes(e.error.code)){d.next({type:"state",state:"connecting",error:t});break}throw t}case"connecting":{let t=d.get(),r=e.event&&b.from(e.event);if(!r&&"connecting"===t.state)break;d.next({type:"state",state:"connecting",error:r});break}case"timeout":d.next({type:"state",state:"connecting",error:new b(`Timeout of ${e.ms}ms reached while waiting for a response`)})}}}catch(e){t=!0,n=e}finally{try{e&&null!=s.return&&await s.return()}finally{if(t)throw n}}r.next({result:{type:"stopped"}}),d.next({type:"state",state:"idle",error:null}),r.complete()})().catch(e=>{r.error(b.from(e))}),()=>{r.complete(),c.abort(),h.unsubscribe()}})}],44362)},95813,e=>{e.s(["f",0,function(e,t="The request failed. Please try again."){return e instanceof Error?e.message:t}])},73656,e=>{var t=e.i(44362),r=e.i(75514),n=e.i(73199),o=e.i(5506);let i=function(e={}){let o=e.url??"/trpc";return(0,t.$)({links:[(0,n.f)({condition:e=>"subscription"===e.type,true:(0,t.I)({url:o,eventSourceOptions:{withCredentials:!0}}),false:(0,r.f)({url:o,fetch:(t,r)=>(e.fetch??globalThis.fetch)(t,{...r,signal:r?.signal??null,credentials:"same-origin"}),headers(){let t=(e.csrfToken??function(){return"u"<typeof document?void 0:document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith("csrftoken="))?.slice(10)})();return t?{"X-CSRFToken":t}:{}}})})]})}();async function s(e){try{return await i.auth.session.query(void 0,e?{signal:e}:void 0)}catch(e){throw(0,o.f)(e)&&e.data?.code==="PRECONDITION_FAILED"&&location.assign(new URL("/setup/",location.origin).href),e}}e.s(["m",0,s,"U",0,i])}])})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13581,90629,e=>{var s=e.i(71645),r=e.i(95813);e.s(["f",0,function(e,t=0){let[i,a]=(0,s.useState)(),[l,n]=(0,s.useState)(""),[c,d]=(0,s.useState)(!0),o=(0,s.useRef)(void 0),u=(0,s.useRef)(!1),m=(0,s.useCallback)(async()=>{o.current?.abort();let s=new AbortController;o.current=s;try{let r=await e(s.signal);if(s.signal.aborted||!u.current)return;a(r),n("")}catch(e){!s.signal.aborted&&u.current&&n((0,r.f)(e))}finally{!s.signal.aborted&&u.current&&d(!1)}},[e]);return(0,s.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&m()});let e=t>0?setInterval(()=>{m()},t):void 0;return()=>{u.current=!1,o.current?.abort(),clearInterval(e)}},[m,t]),{data:i,error:l,isLoading:c,refresh:m}}],13581);var t=e.i(18050),i=e.i(19455);e.s(["f",0,function({isLoading:e,error:s,refresh:r}){return(0,t.jsxs)(t.Fragment,{children:[e?(0,t.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,s?(0,t.jsxs)("div",{className:"error",role:"alert",children:[(0,t.jsx)("p",{children:s}),(0,t.jsx)(i.f,{variant:"outline",onClick:()=>{r()},children:"Try again"})]}):void 0]})}],90629)},93479,e=>{var s=e.i(18050),r=e.i(71645),t=e.i(39689);let i=r.forwardRef(({className:e,type:r,...i},a)=>(0,s.jsx)("input",{type:r,className:(0,t.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...i}));i.displayName="Input",e.s(["f",0,i])},44727,e=>{var s=e.i(18050),r=e.i(71645),t=e.i(73656),i=e.i(13581),a=e.i(18879),l=e.i(19455),n=e.i(93479),c=e.i(94757),d=e.i(90629),o=e.i(69212);let u={};function m({filters:e}){let a=(0,r.useCallback)(async s=>await t.U.audit.list.query(e,{signal:s}),[e]),{data:l,error:n,isLoading:c,refresh:o}=(0,i.f)(a);return(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Recorded events"}),(0,s.jsx)("p",{className:"small",children:"Newest first. Only event metadata is shown; values and credentials are never included."}),(0,s.jsx)(d.f,{isLoading:c,error:n,refresh:o}),l&&!c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{role:"status",children:[l.count," matching events"]}),0===l.results.length?(0,s.jsx)("p",{children:"No audit events match these filters."}):(0,s.jsx)("ol",{className:"grid gap-3","aria-label":"Audit events",children:l.results.map(e=>(0,s.jsxs)("li",{className:"rounded-md border p-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap justify-between gap-2",children:[(0,s.jsx)("strong",{children:e.kind}),(0,s.jsx)("time",{dateTime:e.created_at,children:new Date(e.created_at).toLocaleString()})]}),(0,s.jsxs)("p",{className:"small",children:[e.actor_label,e.actor_id?` \xb7 Actor ID ${String(e.actor_id)}`:""]}),(0,s.jsxs)("p",{className:"break-all text-sm",children:["Object: ",e.object_id||"—"]}),(0,s.jsxs)("p",{className:"small break-all",children:["Event: ",e.id]})]},e.id))})]}):void 0]})}e.s(["AuditLog",0,function(){let{canManage:e,workspace:t}=(0,c.useWorkspace)(),[i,d]=(0,r.useState)(u);return e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.K,{children:(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{children:"Audit log"}),(0,s.jsx)("p",{className:"small",children:"Review recorded workspace changes."})]})}),(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Filter events"}),(0,s.jsx)("p",{className:"small",children:"Exact matches for action, actor ID and object ID. Times use your local timezone; the start is included and the end is excluded."}),(0,s.jsxs)("form",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",onSubmit:e=>{e.preventDefault();let s=new FormData(e.currentTarget),r=e=>(0,a.f)(s,e).trim(),t={};r("kind")&&(t.kind=r("kind")),r("actor")&&(t.actor=Number(r("actor"))),r("object_id")&&(t.object_id=r("object_id")),r("since")&&(t.since=new Date(r("since")).toISOString()),r("before")&&(t.before=new Date(r("before")).toISOString()),d(t)},children:[(0,s.jsxs)("label",{children:["Action / kind",(0,s.jsx)(n.f,{name:"kind",placeholder:"document.updated",maxLength:100})]}),(0,s.jsxs)("label",{children:["Actor ID",(0,s.jsx)(n.f,{name:"actor",type:"number",min:1,step:1,placeholder:"Numeric member ID"})]}),(0,s.jsxs)("label",{children:["Object ID",(0,s.jsx)(n.f,{name:"object_id",maxLength:100})]}),(0,s.jsxs)("label",{children:["From (inclusive)",(0,s.jsx)(n.f,{name:"since",type:"datetime-local"})]}),(0,s.jsxs)("label",{children:["Before (exclusive)",(0,s.jsx)(n.f,{name:"before",type:"datetime-local"})]}),(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsx)(l.f,{type:"submit",children:"Apply filters"}),(0,s.jsx)(l.f,{variant:"outline",type:"reset",onClick:()=>{d(u)},children:"Clear"})]})]})]}),(0,s.jsx)(m,{filters:i},`${t}:${JSON.stringify(i)}`)]}):(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Audit log"}),(0,s.jsx)("p",{children:"Only workspace owners and admins can view the audit log."})]})}])},18879,e=>{e.s(["f",0,function(e,s){let r=e.get(s);return"string"==typeof r?r:""}])}])})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22016,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return b}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(90809),i=e.r(18050),s=a._(e.r(71645)),u=e.r(95057),l=e.r(8372),c=e.r(18581),f=e.r(18967),d=e.r(5550),h=e.r(88540),p=e.r(91949),m=e.r(73668),g=e.r(9396);function y(t){var r;let n,o,a,[y,b]=(0,s.useOptimistic)(p.IDLE_LINK_STATUS),j=(0,s.useRef)(null),{href:v,as:w,children:S,prefetch:P=null,passHref:N,replace:C,shallow:E,scroll:_,onClick:T,onMouseEnter:O,onTouchStart:R,legacyBehavior:U=!1,onNavigate:$,transitionTypes:L,ref:k,unstable_dynamicOnHover:A,...I}=t;n=S,U&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let M=s.default.useContext(l.AppRouterContext),F=!1!==P,B=!1===P?"none":!0===P?"full":"auto",D="none"!==B?"auto"===B?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,K="string"==typeof(r=w||v)?r:(0,u.formatUrl)(r);if(U){if(n?.$$typeof===Symbol.for("react.lazy"))throw Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag.");o=s.default.Children.only(n)}let z=U?o&&"object"==typeof o&&o.ref:k,W,q=s.default.useCallback(e=>(null!==M&&(j.current=(0,p.mountLinkInstance)(e,K,M,D,F,b,W)),()=>{j.current&&((0,p.unmountLinkForCurrentNavigation)(j.current),j.current=null),(0,p.unmountPrefetchableInstance)(e)}),[F,K,M,D,b,W]),Z={ref:(0,c.useMergedRef)(q,z),onClick(t){U||"function"!=typeof T||T(t),U&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!M||t.defaultPrevented||function(t,r,n,o,a,i,s,u="none"){if("u">typeof window){let l,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((l=t.currentTarget.getAttribute("target"))&&"_self"!==l||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{navigate:f}=e.r(32916);f(r,o?"replace":"push",!1===a?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,s,u)}}(t,K,j,C,_,$,L,B)},onMouseEnter(e){U||"function"!=typeof O||O(e),U&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),M&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===A)},onTouchStart:function(e){U||"function"!=typeof R||R(e),U&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),M&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===A)}};return(0,f.isAbsoluteUrl)(K)?Z.href=K:U&&!N&&("a"!==o.type||"href"in o.props)||(Z.href=(0,d.addBasePath)(K)),a=U?s.default.cloneElement(o,Z):(0,i.jsx)("a",{...I,...Z,children:n}),(0,i.jsx)(x.Provider,{value:y,children:a})}let x=(0,s.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,s.useContext)(x);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=e.r(71645);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=a(e,n)),t&&(o.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},95057,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return l},urlObjectKeys:function(){return u}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(90809)._(e.r(98183)),i=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",s=e.hash||"",u=e.query||"",l=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?l=t+e.host:r&&(l=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(l+=":"+e.port)),u&&"object"==typeof u&&(u=String(a.urlQueryToSearchParams(u)));let c=e.search||u&&`?${u}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==l?(l="//"+(l||""),o&&"/"!==o[0]&&(o="/"+o)):l||(l=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),o=o.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${l}${o}${c}${s}`}let u=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(e){return s(e)}},73668,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(18967),o=e.r(52817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},18967,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return v},MissingStaticPage:function(){return j},NormalizeError:function(){return x},PageNotFoundError:function(){return b},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return a},execOnce:function(){return i},getDisplayName:function(){return f},getLocationOrigin:function(){return l},getURL:function(){return c},isAbsoluteUrl:function(){return u},isResSent:function(){return d},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return w}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=["CLS","FCP","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,u=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&s.test(e)};function l(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=l();return e.substring(t.length)}function f(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&d(r))return n;if(!n)throw Error(`"${f(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`);return n}let m="u">typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class x extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class j extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class v extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function w(e){return JSON.stringify({message:e.message,stack:e.stack})}},76046,e=>{e.i(44362);var t=e.i(5506);e.s(["k",0,function(){location.assign(function(e){let t=new URLSearchParams(e).get("next");if(!t||!t.startsWith("/")||t.startsWith("//")||t.includes("\\"))return"/";for(let e of t)if((e.codePointAt(0)??0)<=32)return"/";let r=new URL(t,location.origin);return r.origin===location.origin?`${r.pathname}${r.search}${r.hash}`:"/"}(location.search))},"z",0,"Confirm your identity below, then retry your change.","$",0,function(e){return(0,t.f)(e)&&e.data?.code==="UNAUTHORIZED"},"y",0,function(){let e=`${location.pathname}${location.search}${location.hash}`;location.replace(`/accounts/login/?next=${encodeURIComponent(e)}`)},"u",0,function(e){return!e.is_authenticated&&e.flows.some(e=>"mfa_authenticate"===e.id)}])},86441,e=>{var t=e.i(18050),r=e.i(22016),n=e.i(73656),o=e.i(71645),a=e.i(896),i=e.i(18879),s=e.i(11105);function u(){return(0,t.jsxs)("details",{open:!0,className:"mt-6 border-t border-slate-200 pt-4",children:[(0,t.jsx)("summary",{className:"cursor-pointer text-sm font-medium",children:"Confirm your identity"}),(0,t.jsxs)("p",{className:"text-sm",children:["Session expired? ",(0,t.jsx)(r.default,{href:"/accounts/login/",children:"Sign in again"}),"."]}),(0,t.jsx)("p",{className:"text-sm",children:"If a security change asks you to confirm your identity, enter your password or an authenticator code, then retry the change."}),(0,t.jsx)(s.F,{submitLabel:"Confirm password",onSubmit:async e=>(await n.U.auth.reauthenticate.mutate({password:(0,i.f)(e,"password")}),"Identity confirmed. Retry your change."),children:(0,t.jsx)(s.j,{label:"Password",type:"password",name:"password",autoComplete:"current-password",required:!0})}),(0,t.jsx)("div",{className:"mt-5",children:(0,t.jsx)(s.F,{submitLabel:"Confirm code",onSubmit:async e=>(await n.U.auth.mfaReauthenticate.mutate({code:(0,i.f)(e,"code")}),"Identity confirmed. Retry your change."),children:(0,t.jsx)(s.j,{label:"Authenticator or recovery code",name:"code",autoComplete:"one-time-code",required:!0})})})]})}e.s(["f",0,function({children:e}){let[i,s]=(0,o.useState)(),[l,c]=(0,o.useState)(!1);(0,o.useEffect)(()=>{let e=new AbortController;return(0,n.m)(e.signal).then(t=>{e.signal.aborted||s(t)}).catch(()=>{e.signal.aborted||c(!0)}),()=>{e.abort()}},[]);let[f,d]=(0,o.useState)(!1);return l?(0,t.jsx)("p",{role:"alert",children:"Unable to load your account. Reload to try again."}):i?i.is_authenticated?(0,t.jsxs)(a.T,{value:()=>{d(!0)},children:[e,f&&(0,t.jsx)(u,{})]}):(0,t.jsxs)("p",{children:["Please ",(0,t.jsx)(r.default,{href:"/accounts/login/",children:"sign in"})," to manage your account."]}):(0,t.jsx)("p",{role:"status",children:"Loading your account…"})}],86441)},11105,896,e=>{var t=e.i(18050),r=e.i(71645),n=e.i(76046),o=e.i(95813);let a=(0,r.createContext)(void 0);function i(){let e=(0,r.useContext)(a);return(t,r)=>e&&(0,n.$)(t)?(e(),n.z):(0,o.f)(t,r)}e.s(["T",0,a,"G",0,i],896);var s=e.i(19455),u=e.i(93479);e.s(["j",0,function({label:e,...r}){return(0,t.jsxs)("label",{children:[e,(0,t.jsx)(u.f,{...r})]})},"F",0,function({children:e,submitLabel:n,onSubmit:o}){let a=i(),[u,l]=(0,r.useState)(!1),[c,f]=(0,r.useState)(""),[d,h]=(0,r.useState)("");async function p(e){e.preventDefault();let t=new FormData(e.currentTarget);l(!0),f(""),h("");try{h(await o(t)??"")}catch(e){f(a(e,"Unable to save. Please try again."))}finally{l(!1)}}return(0,t.jsxs)("form",{onSubmit:e=>{p(e)},children:[(0,t.jsxs)("fieldset",{disabled:u,className:"min-w-0 border-0 p-0",children:[e,(0,t.jsx)(s.f,{type:"submit",disabled:u,children:u?"Please wait…":n})]}),c&&(0,t.jsx)("p",{role:"alert",className:"error mt-4",children:c}),d&&(0,t.jsx)("p",{role:"status",className:"notice mt-4",children:d})]})}],11105)},15448,e=>{var t=e.i(18050),r=e.i(22016),n=e.i(2716);e.s(["f",0,function({title:e,description:o,children:a,showAccountNavigation:i=!1}){return(0,t.jsxs)("div",{className:"min-h-screen",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between border-b border-slate-200 bg-white px-6 py-4 sm:px-10",children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-2 text-lg font-semibold text-slate-900",children:[(0,t.jsx)(n.f,{className:"h-9 w-9"}),"OrgSDK"]}),(0,t.jsx)(r.default,{href:"/",className:"text-sm",children:"Back to app"})]}),(0,t.jsxs)("main",{className:"mx-auto w-full max-w-xl px-4 py-10 sm:py-16",children:[i&&(0,t.jsxs)("nav",{"aria-label":"Account",className:"mb-6 flex flex-wrap gap-4 text-sm",children:[(0,t.jsx)(r.default,{href:"/accounts/email/",children:"Account"}),(0,t.jsx)(r.default,{href:"/accounts/password/change/",children:"Password"}),(0,t.jsx)(r.default,{href:"/accounts/2fa/",children:"Two-factor authentication"}),(0,t.jsx)(r.default,{href:"/accounts/logout/",children:"Sign out"})]}),(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h1",{className:"!text-2xl",children:e}),o&&(0,t.jsx)("p",{className:"mb-6 text-sm",children:o}),a]})]})]})}])},42498,e=>{var t=e.i(18050),r=e.i(76046),n=e.i(73656),o=e.i(15448),a=e.i(86441),i=e.i(11105);e.s(["SignOut",0,function(){return(0,t.jsx)(o.f,{title:"Sign out",description:"Sign out of your account on this browser.",children:(0,t.jsx)(a.f,{children:(0,t.jsx)(i.F,{submitLabel:"Sign out",onSubmit:async()=>(await n.U.auth.logout.mutate(),(0,r.k)(),""),children:null})})})}])},93479,e=>{var t=e.i(18050),r=e.i(71645),n=e.i(39689);let o=r.forwardRef(({className:e,type:r,...o},a)=>(0,t.jsx)("input",{type:r,className:(0,n.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...o}));o.displayName="Input",e.s(["f",0,o])},2716,e=>{var t=e.i(18050);e.s(["f",0,function({className:e,...r}){return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",className:e,...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"19",stroke:"#4f46e5",strokeWidth:"12"}),(0,t.jsx)("circle",{cx:"50",cy:"14",r:"6",fill:"#8b5cf6"})]})}])},18879,e=>{e.s(["f",0,function(e,t){let r=e.get(t);return"string"==typeof r?r:""}])}])})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,29417,e=>{var t=e.i(18050),a=e.i(19455),r=e.i(93479),i=e.i(24687),s=e.i(71645),l=e.i(15080),n=e.i(73656),o=e.i(95813);function d(){let[e,d]=(0,s.useState)([]),[u,c]=(0,s.useState)(""),[f,m]=(0,s.useState)(""),[b,p]=(0,s.useState)(""),[x,h]=(0,s.useState)(""),v=(0,s.useCallback)(async()=>{d(await (0,l.l)(new AbortController().signal))},[]);(0,s.useEffect)(()=>{(async()=>{try{await v()}catch(e){h((0,o.f)(e))}})()},[v]);let g=async()=>{try{let e={title:f,content:b};u?await n.U.documents.update.mutate({id:u,...e}):await n.U.documents.create.mutate({...e,kind:"document"}),await v(),h("")}catch(e){h((0,o.f)(e))}};return(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:"Documents & memory"}),(0,t.jsx)("p",{children:"Create shared workspace documents and review saved memory."}),x?(0,t.jsx)("p",{role:"alert",className:"error",children:x}):void 0,(0,t.jsxs)("label",{children:["Document",(0,t.jsxs)("select",{value:u,onChange:t=>{c(t.target.value);let a=e.find(e=>e.id===t.target.value);m(a?.title??""),p(a?.content??"")},children:[(0,t.jsx)("option",{value:"",children:"New document"}),e.map(e=>(0,t.jsxs)("option",{value:e.id,children:[e.title," · ",e.kind]},e.id))]})]}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),g()},children:[(0,t.jsxs)("label",{children:["Title",(0,t.jsx)(r.f,{required:!0,value:f,onChange:e=>{m(e.target.value)}})]}),(0,t.jsxs)("label",{children:["Content",(0,t.jsx)(i.f,{rows:12,value:b,onChange:e=>{p(e.target.value)}})]}),(0,t.jsx)(a.f,{type:"submit",children:"Save document"})]})]})}e.s(["default",0,function(){return(0,t.jsx)(d,{})}],29417)},93479,e=>{var t=e.i(18050),a=e.i(71645),r=e.i(39689);let i=a.forwardRef(({className:e,type:a,...i},s)=>(0,t.jsx)("input",{type:a,className:(0,r.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:s,...i}));i.displayName="Input",e.s(["f",0,i])},24687,e=>{var t=e.i(18050),a=e.i(71645),r=e.i(39689);let i=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)("textarea",{className:(0,r.f)("flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:i,...a}));i.displayName="Textarea",e.s(["f",0,i])}])})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95468,e=>{let t=(0,e.i(75254).f)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["f",0,t],95468)},13581,90629,e=>{var t=e.i(71645),a=e.i(95813);e.s(["f",0,function(e,i=0){let[s,l]=(0,t.useState)(),[r,n]=(0,t.useState)(""),[d,o]=(0,t.useState)(!0),c=(0,t.useRef)(void 0),u=(0,t.useRef)(!1),h=(0,t.useCallback)(async()=>{c.current?.abort();let t=new AbortController;c.current=t;try{let a=await e(t.signal);if(t.signal.aborted||!u.current)return;l(a),n("")}catch(e){!t.signal.aborted&&u.current&&n((0,a.f)(e))}finally{!t.signal.aborted&&u.current&&o(!1)}},[e]);return(0,t.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&h()});let e=i>0?setInterval(()=>{h()},i):void 0;return()=>{u.current=!1,c.current?.abort(),clearInterval(e)}},[h,i]),{data:s,error:r,isLoading:d,refresh:h}}],13581);var i=e.i(18050),s=e.i(19455);e.s(["f",0,function({isLoading:e,error:t,refresh:a}){return(0,i.jsxs)(i.Fragment,{children:[e?(0,i.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,t?(0,i.jsxs)("div",{className:"error",role:"alert",children:[(0,i.jsx)("p",{children:t}),(0,i.jsx)(s.f,{variant:"outline",onClick:()=>{a()},children:"Try again"})]}):void 0]})}],90629)},93479,e=>{var t=e.i(18050),a=e.i(71645),i=e.i(39689);let s=a.forwardRef(({className:e,type:a,...s},l)=>(0,t.jsx)("input",{type:a,className:(0,i.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:l,...s}));s.displayName="Input",e.s(["f",0,s])},10505,21218,e=>{var t=e.i(18050),a=e.i(75254);let i=(0,a.f)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);e.s(["f",0,i],21218);var s=e.i(95468);let l=(0,a.f)("clock-3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]),r=(0,a.f)("shield-alert",[["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"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),n=(0,a.f)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);function d(e){return({chat:"Chat task",code:"Code execution",action:"Action run",validate:"Code validation",test:"Action tests"})[e]??e.replaceAll("_"," ")}e.s(["k",0,function({status:e}){let a={succeeded:s.f,waiting_approval:r,running:i,queued:l,failed:n,cancelled:n,interrupted:n}[e]??l;return(0,t.jsxs)("span",{className:`run-status status-${e}`,children:[(0,t.jsx)(a,{size:13,"aria-hidden":"true"}),e.replaceAll("_"," ")]})},"B",0,["queued","running","waiting_approval"],"A",0,function(e){return void 0===e?"":"string"==typeof e?e:JSON.stringify(e,void 0,2)},"N",0,function(e,t){let a=t.find(t=>t.id===e.project)?.name??"Project";return"chat"===e.operation?`${a} \xb7 ${(function(e,t){if(null!==e&&"object"==typeof e&&Object.hasOwn(e,t)){let a=Reflect.get(e,t);if("string"==typeof a)return a}return""})(e.inputs,"message").slice(0,70)}`:`${a} \xb7 ${d(e.operation)}`},"T",0,d],10505)},57743,e=>{var t=e.i(18050),a=e.i(71645),i=e.i(73656),s=e.i(95813),l=e.i(13581),r=e.i(19455),n=e.i(93479),d=e.i(94757),o=e.i(87309),c=e.i(90629),u=e.i(10505);let h={key:"name",type:"text",required:!0};function v({table:e,onSaved:l}){let o=(0,a.useId)(),{setDirty:c}=(0,d.useWorkspace)(),[u,x]=(0,a.useState)(e?.name??""),[f,m]=(0,a.useState)(e?.columns??[h]),[p,b]=(0,a.useState)(!1),[y,j]=(0,a.useState)(""),[w,k]=(0,a.useState)("");function g(e,t){m(a=>a.map((a,i)=>i===e?{...a,...t}:a))}return(0,t.jsxs)("form",{onChange:()=>{c(!0)},onSubmit:t=>{t.preventDefault(),b(!0),j(""),k(""),(async()=>{try{let t={name:u,columns:f};e?await i.U.tables.update.mutate({id:e.id,...t,revision:e.revision}):(await i.U.tables.create.mutate(t),x(""),m([h])),c(!1),await l(),k("Table saved.")}catch(e){j((0,s.f)(e))}finally{b(!1)}})()},children:[(0,t.jsxs)("fieldset",{disabled:p,className:"space-y-3",children:[(0,t.jsx)("legend",{className:"mb-3 font-semibold",children:e?"Edit table definition":"Create a table"}),(0,t.jsxs)("label",{children:["Table name",(0,t.jsx)(n.f,{required:!0,maxLength:120,value:u,onChange:e=>{x(e.target.value)}})]}),(0,t.jsx)("p",{className:"small",children:"Column keys use lowercase letters, digits and underscores, starting with a letter. Existing rows must remain valid when a definition changes."}),f.map((e,a)=>(0,t.jsxs)("div",{className:"flex flex-wrap items-end gap-3",children:[(0,t.jsxs)("label",{className:"min-w-40 flex-1",children:["Column ",a+1," key",(0,t.jsx)(n.f,{required:!0,pattern:"[a-z][a-z0-9_]{0,47}",maxLength:48,value:e.key,onChange:e=>{g(a,{key:e.target.value})}})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:`${o}-type-${String(a)}`,children:"Type"}),(0,t.jsxs)("select",{id:`${o}-type-${String(a)}`,value:e.type,onChange:e=>{let t=e.target.value;["text","number","boolean","date"].includes(t)&&g(a,{type:t})},children:[(0,t.jsx)("option",{value:"text",children:"Text"}),(0,t.jsx)("option",{value:"number",children:"Number"}),(0,t.jsx)("option",{value:"boolean",children:"Boolean"}),(0,t.jsx)("option",{value:"date",children:"Date"})]})]}),(0,t.jsxs)("label",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:e.required,onChange:e=>{g(a,{required:e.target.checked})}}),"Required"]}),(0,t.jsxs)(r.f,{type:"button",variant:"outline",disabled:1===f.length,onClick:()=>{c(!0),m(e=>e.filter((e,t)=>t!==a))},children:["Remove column ",a+1]})]},a)),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(r.f,{type:"button",variant:"outline",disabled:f.length>=50,onClick:()=>{c(!0),m(e=>[...e,{key:"",type:"text",required:!1}])},children:"Add column"}),(0,t.jsx)(r.f,{type:"submit",children:p?"Saving…":"Save table"})]})]}),y?(0,t.jsx)("p",{className:"error",role:"alert",children:y}):void 0,w?(0,t.jsx)("p",{className:"notice",role:"status",children:w}):void 0]})}function x({table:e,row:l,onSaved:o,onCancel:c}){let h=(0,a.useId)(),{setDirty:v}=(0,d.useWorkspace)(),[f,m]=(0,a.useState)(()=>Object.fromEntries(e.columns.map(e=>[e.key,l?.values[e.key]===void 0||null===l.values[e.key]?"":(0,u.A)(l.values[e.key])]))),[p,b]=(0,a.useState)(!1),[y,j]=(0,a.useState)("");return(0,t.jsxs)("form",{className:"panel",onChange:()=>{v(!0)},onSubmit:t=>{t.preventDefault(),b(!0),j(""),(async()=>{try{let t=Object.fromEntries(e.columns.map(e=>{let t=f[e.key]??"";return""!==t||e.required?"boolean"===e.type?[e.key,"true"===t]:"number"===e.type?[e.key,Number(t)]:[e.key,t]:[e.key,null]})),a={table_revision:e.revision,values:t};l?await i.U.tables.updateRow.mutate({id:e.id,rowId:l.id,...a,revision:l.revision}):await i.U.tables.createRow.mutate({id:e.id,...a}),v(!1),await o()}catch(e){j((0,s.f)(e))}finally{b(!1)}})()},children:[(0,t.jsx)("h3",{children:l?"Edit row":"Add row"}),(0,t.jsxs)("fieldset",{disabled:p,className:"space-y-3",children:[e.columns.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{htmlFor:`${h}-${e.key}`,children:[e.key,e.required?" (required)":" (optional)"]}),"boolean"===e.type?(0,t.jsxs)("select",{id:`${h}-${e.key}`,required:e.required,value:f[e.key]??"",onChange:t=>{m(a=>({...a,[e.key]:t.target.value}))},children:[(0,t.jsx)("option",{value:"",children:"No value"}),(0,t.jsx)("option",{value:"true",children:"True"}),(0,t.jsx)("option",{value:"false",children:"False"})]}):(0,t.jsx)(n.f,{id:`${h}-${e.key}`,type:"text"===e.type?"text":e.type,required:e.required,step:"number"===e.type?"any":void 0,maxLength:"text"===e.type?1e4:void 0,value:f[e.key]??"",onChange:t=>{m(a=>({...a,[e.key]:t.target.value}))}})]},e.key)),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(r.f,{type:"submit",children:p?"Saving…":"Save row"}),(0,t.jsx)(r.f,{type:"button",variant:"outline",onClick:c,children:"Cancel"})]})]}),y?(0,t.jsxs)("p",{className:"error",role:"alert",children:[y," After a conflict, cancel this edit, reload rows and definition, then reopen the row to reconcile your changes."]}):void 0]})}function f({table:e,refreshTables:n}){let{canManage:h,isDirty:m,setDirty:p}=(0,d.useWorkspace)(),b=(0,o.h)(),[y,j]=(0,a.useState)(1),[w,k]=(0,a.useState)(),[g,N]=(0,a.useState)(!1),[C,S]=(0,a.useState)(""),[q,A]=(0,a.useState)(!1),$=(0,a.useCallback)(async t=>{let a=await i.U.tables.listRows.query({id:e.id},{signal:t});return{...a,results:a.results.slice((y-1)*50,50*y),next:a.count>50*y}},[e.id,y]),T=(0,l.f)($);async function R(t){if(await b({title:"Delete this row?",description:"The saved values in this row will be permanently deleted.",actionLabel:"Delete row"})){A(!0),S("");try{await i.U.tables.deleteRow.mutate({id:e.id,rowId:t.id,revision:t.revision}),T.data?.results.length===1&&y>1?j(y-1):await T.refresh()}catch(e){S((0,s.f)(e))}finally{A(!1)}}}return(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsxs)("div",{className:"panel-title",children:[(0,t.jsx)("h2",{children:e.name}),(0,t.jsx)(r.f,{disabled:q||void 0!==w||g,onClick:()=>{k("new")},children:"Add row"})]}),(0,t.jsx)(c.f,{...T}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(r.f,{variant:"outline",disabled:q,onClick:()=>{(async()=>{(!m||await b())&&(p(!1),k(void 0),N(!1),await T.refresh(),await n())})()},children:"Reload rows and definition"}),(0,t.jsxs)("span",{children:[T.data?.count??0," rows · Page ",y]})]}),T.data?.results.length===0?(0,t.jsx)("p",{children:"No rows on this page. Add a row to start collecting data."}):void 0,(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)("table",{className:"w-full text-left",children:[(0,t.jsxs)("caption",{className:"sr-only",children:["Rows in ",e.name]}),(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[e.columns.map(e=>(0,t.jsxs)("th",{className:"p-2",scope:"col",children:[e.key," ",(0,t.jsxs)("small",{children:["(",e.type,")"]})]},e.key)),(0,t.jsx)("th",{scope:"col",children:"Actions"})]})}),(0,t.jsx)("tbody",{children:T.data?.results.map(a=>(0,t.jsxs)("tr",{className:"border-t",children:[e.columns.map(e=>(0,t.jsx)("td",{className:"max-w-72 break-words p-2",children:void 0===a.values[e.key]||null===a.values[e.key]?"—":(0,u.A)(a.values[e.key])},e.key)),(0,t.jsx)("td",{children:(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(r.f,{variant:"outline",disabled:q||void 0!==w||g,onClick:()=>{k(a)},children:"Edit row"}),(0,t.jsx)(r.f,{variant:"destructive",disabled:q,onClick:()=>{R(a)},children:"Delete row"})]})})]},a.id))})]})}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(r.f,{variant:"outline",disabled:1===y||void 0!==w,onClick:()=>{j(y-1)},children:"Previous rows"}),(0,t.jsx)(r.f,{variant:"outline",disabled:!T.data?.next||void 0!==w,onClick:()=>{j(y+1)},children:"Next rows"})]}),void 0===w?void 0:(0,t.jsx)(x,{table:e,..."new"===w?{}:{row:w},onCancel:()=>{(async()=>{(!m||await b())&&(p(!1),k(void 0))})()},onSaved:async()=>{k(void 0),await T.refresh()}},"new"===w?"new":w.id),C?(0,t.jsx)("p",{className:"error",role:"alert",children:C}):void 0,h?(0,t.jsxs)("div",{className:"mt-5",children:[(0,t.jsx)(r.f,{variant:"outline",disabled:void 0!==w,onClick:()=>{(async()=>{(!g||!m||await b())&&(p(!1),N(!g))})()},children:g?"Close definition editor":"Edit table definition"}),g?(0,t.jsx)(v,{table:e,onSaved:n}):void 0]}):(0,t.jsx)("p",{className:"small",children:"Owners and admins manage table definitions. Members can edit rows."})]})}e.s(["Tables",0,function(){let{canManage:e,isDirty:n,setDirty:u}=(0,d.useWorkspace)();(0,a.useEffect)(()=>()=>{u(!1)},[u]);let h=(0,o.h)(),[x,m]=(0,a.useState)(1),[p,b]=(0,a.useState)(""),[y,j]=(0,a.useState)(""),[w,k]=(0,a.useState)(!1),g=(0,a.useCallback)(async e=>{let t=await i.U.tables.list.query(void 0,{signal:e});return{...t,results:t.results.slice((x-1)*50,50*x),next:t.count>50*x}},[x]),N=(0,l.f)(g),C=N.data?.results.find(e=>e.id===p);async function S(){if(C&&await h({title:`Delete ${C.name}?`,description:"This permanently deletes the table definition and every row in this table.",actionLabel:"Delete table"})){k(!0),j("");try{await i.U.tables.delete.mutate({id:C.id,revision:C.revision}),u(!1),b(""),N.data?.results.length===1&&x>1?m(x-1):await N.refresh()}catch(e){j((0,s.f)(e))}finally{k(!1)}}}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:"Workspace tables"}),(0,t.jsx)("p",{children:"Store shared records in tables with text, number, boolean and date columns."}),(0,t.jsx)(c.f,{...N}),N.isLoading||N.data?.count!==0?void 0:(0,t.jsx)("p",{children:"No tables yet. A workspace owner or admin can create your first table below."}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"workspace-table",children:"Table"}),(0,t.jsxs)("select",{id:"workspace-table",value:C?.id??"",disabled:w,onChange:e=>{let t=e.target.value;(async()=>{(!n||await h())&&(u(!1),b(t))})()},children:[(0,t.jsx)("option",{value:"",children:"Choose a table"}),N.data?.results.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(r.f,{variant:"outline",disabled:1===x||w||n,onClick:()=>{b(""),m(x-1)},children:"Previous tables"}),(0,t.jsxs)("span",{children:["Page ",x]}),(0,t.jsx)(r.f,{variant:"outline",disabled:!N.data?.next||w||n,onClick:()=>{b(""),m(x+1)},children:"Next tables"}),e&&C?(0,t.jsx)(r.f,{variant:"destructive",disabled:w,onClick:()=>{S()},children:"Delete table"}):void 0]}),y?(0,t.jsx)("p",{className:"error",role:"alert",children:y}):void 0]}),C?(0,t.jsx)(f,{table:C,refreshTables:N.refresh},`${C.id}:${String(C.revision)}`):void 0,e&&!C?(0,t.jsx)("section",{className:"panel",children:(0,t.jsx)(v,{onSaved:N.refresh})}):void 0]})}])}])})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,91918,20783,e=>{var r=e.i(71645),o=Object.defineProperty,t=(e,r)=>o(e,"name",{value:r,configurable:!0});function l(e,r){if("function"==typeof e)return e(r);null!=e&&(e.current=r)}function n(...e){return r=>{let o=!1,t=e.map(e=>{let t=l(e,r);return o||"function"!=typeof t||(o=!0),t});if(o)return()=>{for(let r=0;r<t.length;r++){let o=t[r];"function"==typeof o?o():l(e[r],null)}}}}function s(...e){return r.useCallback(n(...e),e)}t(l,"setRef"),t(n,"composeRefs"),t(s,"useComposedRefs"),e.s(["f",0,s],20783);var a=Object.defineProperty,i=(e,r)=>a(e,"name",{value:r,configurable:!0});function c(e){let o=r.forwardRef((o,t)=>{let{children:l,...n}=o,a=null,i=!1,c=[];l=v(l),r.Children.forEach(l,e=>{if(f(e)){i=!0;let r="child"in e.props?e.props.child:e.props.children;for(;h(r)&&"function"==typeof z;)r=z(r._payload);a=p(e,r),c.push(a?.props?.children)}else c.push(e)}),a?a=r.cloneElement(a,void 0,c):!i&&1===r.Children.count(l)&&r.isValidElement(l)&&(a=l);let d=a?u(a):void 0,m=s(t,d);if(!a){if(l||0===l)throw Error(i?w(e):x(e));return l}let g=b(n,a.props??{});return a.type!==r.Fragment&&(g.ref=t?m:d),r.cloneElement(a,g)});return o.displayName=`${e}.Slot`,o}i(c,"createSlot");var d=c("Slot"),m=Symbol.for("radix.slottable");i(function(e){let r=i(e=>"child"in e?e.children(e.child):e.children,"Slottable");return r.displayName=`${e}.Slottable`,r.__radixId=m,r},"createSlottable");var p=i((e,o)=>"child"in e.props?r.isValidElement(o)?r.cloneElement(o,void 0,e.props.children(o.props.children)):null:r.isValidElement(o)?o:null,"getSlottableElementFromSlottable");function b(e,r){let o={...r};for(let t in r){let l=e[t],n=r[t];/^on[A-Z]/.test(t)?l&&n?o[t]=(...e)=>{let r=n(...e);return l(...e),r}:l&&(o[t]=l):"style"===t?o[t]={...l,...n}:"className"===t?o[t]=[l,n].filter(Boolean).join(" "):"aria-describedby"===t&&(o[t]=k(n,l))}return{...e,...o}}function u(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(o=(r=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in r&&r.isReactWarning)?e.props.ref:e.props.ref||e.ref}function f(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===m}i(b,"mergeProps"),i(u,"getElementRef"),i(f,"isSlottable");var g=Symbol.for("react.lazy");function h(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===g&&"_payload"in e&&y(e._payload)}function y(e){return"object"==typeof e&&null!==e&&"then"in e}function v(e){let r=e;for(;h(r)&&"function"==typeof z;)r=z(r._payload);return r}function k(...e){let r=new Set;for(let o of e)if("string"==typeof o)for(let e of String(o).trim().split(/\s+/))e&&r.add(e);return r.size>0?Array.from(r).join(" "):void 0}i(h,"isLazyComponent"),i(y,"isPromiseLike"),i(v,"useUnwrappedLazy"),i(k,"concatAriaDescribedby");var x=i(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),w=i(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),z=r[" use ".trim().toString()];e.s(["M",0,d,"B",0,c],91918)},25913,e=>{var r=e.i(7670);let o=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,t=r.f;e.s(["f",0,(e,r)=>l=>{var n;if((null==r?void 0:r.variants)==null)return t(e,null==l?void 0:l.class,null==l?void 0:l.className);let{variants:s,defaultVariants:a}=r,i=Object.keys(s).map(e=>{let r=null==l?void 0:l[e],t=null==a?void 0:a[e];if(null===r)return null;let n=o(r)||o(t);return s[e][n]}),c=l&&Object.entries(l).reduce((e,r)=>{let[o,t]=r;return void 0===t||(e[o]=t),e},{});return t(e,i,null==r||null==(n=r.compoundVariants)?void 0:n.reduce((e,r)=>{let{class:o,className:t,...l}=r;return Object.entries(l).every(e=>{let[r,o]=e;return Array.isArray(o)?o.includes({...a,...c}[r]):({...a,...c})[r]===o})?[...e,o,t]:e},[]),null==l?void 0:l.class,null==l?void 0:l.className)}])},7670,e=>{e.s(["f",0,function(){for(var e,r,o=0,t="",l=arguments.length;o<l;o++)(e=arguments[o])&&(r=function e(r){var o,t,l="";if("string"==typeof r||"number"==typeof r)l+=r;else if("object"==typeof r)if(Array.isArray(r)){var n=r.length;for(o=0;o<n;o++)r[o]&&(t=e(r[o]))&&(l&&(l+=" "),l+=t)}else for(t in r)r[t]&&(l&&(l+=" "),l+=t);return l}(e))&&(t&&(t+=" "),t+=r);return t}])},19455,e=>{var r=e.i(18050),o=e.i(91918),t=e.i(25913),l=e.i(71645),n=e.i(39689);let s=(0,t.f)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),a=l.forwardRef(({className:e,variant:t,size:l,asChild:a=!1,...i},c)=>{let d=a?o.M:"button";return(0,r.jsx)(d,{"data-slot":"button",className:(0,n.f)(s({variant:t,size:l,className:e})),ref:c,...i})});a.displayName="Button",e.s(["f",0,a])},39689,e=>{let r,o,t,l,n;var s,a=e.i(7670);let i=(e=new Map,r=null,o)=>({nextPart:e,validators:r,classGroupId:o}),c=[],d=(e,r,o)=>{if(0==e.length-r)return o.classGroupId;let t=e[r],l=o.nextPart.get(t);if(l){let o=d(e,r+1,l);if(o)return o}let n=o.validators;if(null===n)return;let s=0===r?e.join("-"):e.slice(r).join("-"),a=n.length;for(let e=0;e<a;e++){let r=n[e];if(r.validator(s))return r.classGroupId}},m=(e,r)=>{let o=i();for(let t in e)p(e[t],o,t,r);return o},p=(e,r,o,t)=>{let l=e.length;for(let n=0;n<l;n++)b(e[n],r,o,t)},b=(e,r,o,t)=>{"string"==typeof e?u(e,r,o):"function"==typeof e?f(e,r,o,t):g(e,r,o,t)},u=(e,r,o)=>{(""===e?r:h(r,e)).classGroupId=o},f=(e,r,o,t)=>{y(e)?p(e(t),r,o,t):(null===r.validators&&(r.validators=[]),r.validators.push({classGroupId:o,validator:e}))},g=(e,r,o,t)=>{let l=Object.entries(e),n=l.length;for(let e=0;e<n;e++){let[n,s]=l[e];p(s,h(r,n),o,t)}},h=(e,r)=>{let o=e,t=r.split("-"),l=t.length;for(let e=0;e<l;e++){let r=t[e],l=o.nextPart.get(r);l||(l=i(),o.nextPart.set(r,l)),o=l}return o},y=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,v=[],k=(e,r,o,t,l)=>({modifiers:e,hasImportantModifier:r,baseClassName:o,maybePostfixModifierPosition:t,isExternal:l}),x=/\s+/,w=e=>{let r;if("string"==typeof e)return e;let o="";for(let t=0;t<e.length;t++)e[t]&&(r=w(e[t]))&&(o&&(o+=" "),o+=r);return o},z=[],j=e=>{let r=r=>r[e]||z;return r.isThemeGetter=!0,r.themeKey=e,r},S=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,O=/^\((?:(\w[\w-]*):)?(.+)\)$/i,C=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,E=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,N=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,G=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,R=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,W=e=>C.test(e),_=e=>!!e&&!Number.isNaN(Number(e)),I=e=>!!e&&Number.isInteger(Number(e)),P=e=>e.endsWith("%")&&_(e.slice(0,-1)),A=e=>E.test(e),M=()=>!0,T=e=>N.test(e)&&!$.test(e),L=()=>!1,V=e=>G.test(e),B=e=>R.test(e),D=e=>!q(e)&&!ee(e),K=e=>e.startsWith("@container")&&("/"===e[10]&&void 0!==e[11]||"s"===e[11]&&void 0!==e[16]&&e.startsWith("-size/",10)||"n"===e[11]&&void 0!==e[18]&&e.startsWith("-normal/",10)),U=e=>ei(e,ep,L),q=e=>S.test(e),F=e=>ei(e,eb,T),Z=e=>ei(e,eu,_),H=e=>ei(e,eg,M),J=e=>ei(e,ef,L),Q=e=>ei(e,ed,L),X=e=>ei(e,em,B),Y=e=>ei(e,eh,V),ee=e=>O.test(e),er=e=>ec(e,eb),eo=e=>ec(e,ef),et=e=>ec(e,ed),el=e=>ec(e,ep),en=e=>ec(e,em),es=e=>ec(e,eh,!0),ea=e=>ec(e,eg,!0),ei=(e,r,o)=>{let t=S.exec(e);return!!t&&(t[1]?r(t[1]):o(t[2]))},ec=(e,r,o=!1)=>{let t=O.exec(e);return!!t&&(t[1]?r(t[1]):o)},ed=e=>"position"===e||"percentage"===e,em=e=>"image"===e||"url"===e,ep=e=>"length"===e||"size"===e||"bg-size"===e,eb=e=>"length"===e,eu=e=>"number"===e,ef=e=>"family-name"===e,eg=e=>"number"===e||"weight"===e,eh=e=>"shadow"===e,ey=(s=()=>{let e=j("color"),r=j("font"),o=j("text"),t=j("font-weight"),l=j("tracking"),n=j("leading"),s=j("breakpoint"),a=j("container"),i=j("spacing"),c=j("radius"),d=j("shadow"),m=j("inset-shadow"),p=j("text-shadow"),b=j("drop-shadow"),u=j("blur"),f=j("perspective"),g=j("aspect"),h=j("ease"),y=j("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],x=()=>[...k(),ee,q],w=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],S=()=>[ee,q,i],O=()=>[W,"full","auto",...S()],C=()=>[I,"none","subgrid",ee,q],E=()=>["auto",{span:["full",I,ee,q]},I,ee,q],N=()=>[I,"auto",ee,q],$=()=>["auto","min","max","fr",ee,q],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],R=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...S()],L=()=>[W,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],V=()=>[a,W,"screen","full","dvw","lvw","svw","min","max","fit",...S()],B=()=>[W,"screen","full","lh","dvh","lvh","svh","min","max","fit",...S()],ei=()=>[e,ee,q],ec=()=>[...k(),et,Q,{position:[ee,q]}],ed=()=>["no-repeat",{repeat:["","x","y","space","round"]}],em=()=>["auto","cover","contain",el,U,{size:[ee,q]}],ep=()=>[P,er,F],eb=()=>["","none","full",c,ee,q],eu=()=>["",_,er,F],ef=()=>["solid","dashed","dotted","double"],eg=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],eh=()=>[_,P,et,Q],ey=()=>["","none",u,ee,q],ev=()=>["none",_,ee,q],ek=()=>["none",_,ee,q],ex=()=>[_,ee,q],ew=()=>[W,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[A],breakpoint:[A],color:[M],container:[A],"drop-shadow":[A],ease:["in","out","in-out"],font:[D],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[A],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[A],shadow:[A],spacing:["px",_],text:[A],"text-shadow":[A],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",W,q,ee,g]}],container:["container"],"container-type":[{"@container":["","normal","size",ee,q]}],"container-named":[K],columns:[{columns:[_,"auto",q,ee,a]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:x()}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{"inset-s":O(),start:O()}],end:[{"inset-e":O(),end:O()}],"inset-bs":[{"inset-bs":O()}],"inset-be":[{"inset-be":O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[I,"auto",ee,q]}],basis:[{basis:[W,"full","auto",a,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[_,W,"auto","initial","none",q]}],grow:[{grow:["",_,ee,q]}],shrink:[{shrink:["",_,ee,q]}],order:[{order:[I,"first","last","none",ee,q]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...R(),"normal"]}],"justify-self":[{"justify-self":["auto",...R()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...R(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...R(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...R(),"baseline"]}],"place-self":[{"place-self":["auto",...R()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mbs:[{mbs:T()}],mbe:[{mbe:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],"inline-size":[{inline:["auto",...V()]}],"min-inline-size":[{"min-inline":["auto",...V()]}],"max-inline-size":[{"max-inline":["none",...V()]}],"block-size":[{block:["auto",...B()]}],"min-block-size":[{"min-block":["auto",...B()]}],"max-block-size":[{"max-block":["none",...B()]}],w:[{w:[a,"screen",...L()]}],"min-w":[{"min-w":[a,"screen","none",...L()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh","none",...L()]}],"font-size":[{text:["base",o,er,F]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[t,ea,H]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",P,q]}],"font-family":[{font:[eo,J,r]}],"font-features":[{"font-features":[q]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,ee,q]}],"line-clamp":[{"line-clamp":[_,"none",ee,Z]}],leading:[{leading:["none",n,...S()]}],"list-image":[{"list-image":["none",ee,q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ei()}],"text-color":[{text:ei()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ef(),"wavy"]}],"text-decoration-thickness":[{decoration:[_,"from-font","auto",ee,F]}],"text-decoration-color":[{decoration:ei()}],"underline-offset":[{"underline-offset":[_,"auto",ee,q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"tab-size":[{tab:[I,ee,q]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee,q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ec()}],"bg-repeat":[{bg:ed()}],"bg-size":[{bg:em()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},I,ee,q],radial:["",ee,q],conic:["",I,ee,q]},en,X]}],"bg-color":[{bg:ei()}],"gradient-from-pos":[{from:ep()}],"gradient-via-pos":[{via:ep()}],"gradient-to-pos":[{to:ep()}],"gradient-from":[{from:ei()}],"gradient-via":[{via:ei()}],"gradient-to":[{to:ei()}],rounded:[{rounded:eb()}],"rounded-s":[{"rounded-s":eb()}],"rounded-e":[{"rounded-e":eb()}],"rounded-t":[{"rounded-t":eb()}],"rounded-r":[{"rounded-r":eb()}],"rounded-b":[{"rounded-b":eb()}],"rounded-l":[{"rounded-l":eb()}],"rounded-ss":[{"rounded-ss":eb()}],"rounded-se":[{"rounded-se":eb()}],"rounded-ee":[{"rounded-ee":eb()}],"rounded-es":[{"rounded-es":eb()}],"rounded-tl":[{"rounded-tl":eb()}],"rounded-tr":[{"rounded-tr":eb()}],"rounded-br":[{"rounded-br":eb()}],"rounded-bl":[{"rounded-bl":eb()}],"border-w":[{border:eu()}],"border-w-x":[{"border-x":eu()}],"border-w-y":[{"border-y":eu()}],"border-w-s":[{"border-s":eu()}],"border-w-e":[{"border-e":eu()}],"border-w-bs":[{"border-bs":eu()}],"border-w-be":[{"border-be":eu()}],"border-w-t":[{"border-t":eu()}],"border-w-r":[{"border-r":eu()}],"border-w-b":[{"border-b":eu()}],"border-w-l":[{"border-l":eu()}],"divide-x":[{"divide-x":eu()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":eu()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ef(),"hidden","none"]}],"divide-style":[{divide:[...ef(),"hidden","none"]}],"border-color":[{border:ei()}],"border-color-x":[{"border-x":ei()}],"border-color-y":[{"border-y":ei()}],"border-color-s":[{"border-s":ei()}],"border-color-e":[{"border-e":ei()}],"border-color-bs":[{"border-bs":ei()}],"border-color-be":[{"border-be":ei()}],"border-color-t":[{"border-t":ei()}],"border-color-r":[{"border-r":ei()}],"border-color-b":[{"border-b":ei()}],"border-color-l":[{"border-l":ei()}],"divide-color":[{divide:ei()}],"outline-style":[{outline:[...ef(),"none","hidden"]}],"outline-offset":[{"outline-offset":[_,ee,q]}],"outline-w":[{outline:["",_,er,F]}],"outline-color":[{outline:ei()}],shadow:[{shadow:["","inner","none",d,es,Y]}],"shadow-color":[{shadow:ei()}],"inset-shadow":[{"inset-shadow":["none",m,es,Y]}],"inset-shadow-color":[{"inset-shadow":ei()}],"ring-w":[{ring:eu()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ei()}],"ring-offset-w":[{"ring-offset":[_,F]}],"ring-offset-color":[{"ring-offset":ei()}],"inset-ring-w":[{"inset-ring":eu()}],"inset-ring-color":[{"inset-ring":ei()}],"text-shadow":[{"text-shadow":["none",p,es,Y]}],"text-shadow-color":[{"text-shadow":ei()}],opacity:[{opacity:[_,ee,q]}],"mix-blend":[{"mix-blend":[...eg(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":eg()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[_]}],"mask-image-linear-from-pos":[{"mask-linear-from":eh()}],"mask-image-linear-to-pos":[{"mask-linear-to":eh()}],"mask-image-linear-from-color":[{"mask-linear-from":ei()}],"mask-image-linear-to-color":[{"mask-linear-to":ei()}],"mask-image-t-from-pos":[{"mask-t-from":eh()}],"mask-image-t-to-pos":[{"mask-t-to":eh()}],"mask-image-t-from-color":[{"mask-t-from":ei()}],"mask-image-t-to-color":[{"mask-t-to":ei()}],"mask-image-r-from-pos":[{"mask-r-from":eh()}],"mask-image-r-to-pos":[{"mask-r-to":eh()}],"mask-image-r-from-color":[{"mask-r-from":ei()}],"mask-image-r-to-color":[{"mask-r-to":ei()}],"mask-image-b-from-pos":[{"mask-b-from":eh()}],"mask-image-b-to-pos":[{"mask-b-to":eh()}],"mask-image-b-from-color":[{"mask-b-from":ei()}],"mask-image-b-to-color":[{"mask-b-to":ei()}],"mask-image-l-from-pos":[{"mask-l-from":eh()}],"mask-image-l-to-pos":[{"mask-l-to":eh()}],"mask-image-l-from-color":[{"mask-l-from":ei()}],"mask-image-l-to-color":[{"mask-l-to":ei()}],"mask-image-x-from-pos":[{"mask-x-from":eh()}],"mask-image-x-to-pos":[{"mask-x-to":eh()}],"mask-image-x-from-color":[{"mask-x-from":ei()}],"mask-image-x-to-color":[{"mask-x-to":ei()}],"mask-image-y-from-pos":[{"mask-y-from":eh()}],"mask-image-y-to-pos":[{"mask-y-to":eh()}],"mask-image-y-from-color":[{"mask-y-from":ei()}],"mask-image-y-to-color":[{"mask-y-to":ei()}],"mask-image-radial":[{"mask-radial":[ee,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":eh()}],"mask-image-radial-to-pos":[{"mask-radial-to":eh()}],"mask-image-radial-from-color":[{"mask-radial-from":ei()}],"mask-image-radial-to-color":[{"mask-radial-to":ei()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[_]}],"mask-image-conic-from-pos":[{"mask-conic-from":eh()}],"mask-image-conic-to-pos":[{"mask-conic-to":eh()}],"mask-image-conic-from-color":[{"mask-conic-from":ei()}],"mask-image-conic-to-color":[{"mask-conic-to":ei()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ec()}],"mask-repeat":[{mask:ed()}],"mask-size":[{mask:em()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,q]}],filter:[{filter:["","none",ee,q]}],blur:[{blur:ey()}],brightness:[{brightness:[_,ee,q]}],contrast:[{contrast:[_,ee,q]}],"drop-shadow":[{"drop-shadow":["","none",b,es,Y]}],"drop-shadow-color":[{"drop-shadow":ei()}],grayscale:[{grayscale:["",_,ee,q]}],"hue-rotate":[{"hue-rotate":[_,ee,q]}],invert:[{invert:["",_,ee,q]}],saturate:[{saturate:[_,ee,q]}],sepia:[{sepia:["",_,ee,q]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,q]}],"backdrop-blur":[{"backdrop-blur":ey()}],"backdrop-brightness":[{"backdrop-brightness":[_,ee,q]}],"backdrop-contrast":[{"backdrop-contrast":[_,ee,q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",_,ee,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[_,ee,q]}],"backdrop-invert":[{"backdrop-invert":["",_,ee,q]}],"backdrop-opacity":[{"backdrop-opacity":[_,ee,q]}],"backdrop-saturate":[{"backdrop-saturate":[_,ee,q]}],"backdrop-sepia":[{"backdrop-sepia":["",_,ee,q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[_,"initial",ee,q]}],ease:[{ease:["linear","initial",h,ee,q]}],delay:[{delay:[_,ee,q]}],animate:[{animate:["none",y,ee,q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,ee,q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ev()}],"rotate-x":[{"rotate-x":ev()}],"rotate-y":[{"rotate-y":ev()}],"rotate-z":[{"rotate-z":ev()}],scale:[{scale:ek()}],"scale-x":[{"scale-x":ek()}],"scale-y":[{"scale-y":ek()}],"scale-z":[{"scale-z":ek()}],"scale-3d":["scale-3d"],skew:[{skew:ex()}],"skew-x":[{"skew-x":ex()}],"skew-y":[{"skew-y":ex()}],transform:[{transform:[ee,q,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ew()}],"translate-x":[{"translate-x":ew()}],"translate-y":[{"translate-y":ew()}],"translate-z":[{"translate-z":ew()}],"translate-none":["translate-none"],zoom:[{zoom:[I,ee,q]}],accent:[{accent:ei()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ei()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ee,q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":ei()}],"scrollbar-track-color":[{"scrollbar-track":ei()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee,q]}],fill:[{fill:["none",...ei()]}],"stroke-w":[{stroke:[_,er,F,Z]}],stroke:[{stroke:["none",...ei()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},n=e=>{let l=o(e);if(l)return l;let n=((e,r)=>{let{parseClassName:o,getClassGroupId:t,getConflictingClassGroupIds:l,sortModifiers:n,postfixLookupClassGroupIds:s}=r,a=[],i=e.trim().split(x),c="";for(let e=i.length-1;e>=0;e-=1){let r,d=i[e],{isExternal:m,modifiers:p,hasImportantModifier:b,baseClassName:u,maybePostfixModifierPosition:f}=o(d);if(m){c=d+(c.length>0?" "+c:c);continue}let g=!!f;if(g){let e=(r=t(u.substring(0,f)))&&s[r]?t(u):void 0;e&&e!==r&&(r=e,g=!1)}else r=t(u);if(!r){if(!g||!(r=t(u))){c=d+(c.length>0?" "+c:c);continue}g=!1}let h=0===p.length?"":1===p.length?p[0]:n(p).join(":"),y=b?h+"!":h,v=y+r;if(a.indexOf(v)>-1)continue;a.push(v);let k=l(r,g);for(let e=0;e<k.length;++e){let r=k[e];a.push(y+r)}c=d+(c.length>0?" "+c:c)}return c})(e,r);return t(e,n),n},l=e=>{var a;let i;return o=(r={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let r=0,o=Object.create(null),t=Object.create(null),l=(l,n)=>{o[l]=n,++r>e&&(r=0,t=o,o=Object.create(null))};return{get(e){let r=o[e];return void 0!==r?r:void 0!==(r=t[e])?(l(e,r),r):void 0},set(e,r){e in o?o[e]=r:l(e,r)}}})((a=[].reduce((e,r)=>r(e),s())).cacheSize),parseClassName:(e=>{let{prefix:r,experimentalParseClassName:o}=e,t=e=>{let r,o=[],t=0,l=0,n=0,s=e.length;for(let a=0;a<s;a++){let s=e[a];if(0===t&&0===l){if(":"===s){o.push(e.slice(n,a)),n=a+1;continue}if("/"===s){r=a;continue}}"["===s?t++:"]"===s?t--:"("===s?l++:")"===s&&l--}let a=0===o.length?e:e.slice(n),i=a,c=!1;return a.endsWith("!")?(i=a.slice(0,-1),c=!0):a.startsWith("!")&&(i=a.slice(1),c=!0),k(o,c,i,r&&r>n?r-n:void 0)};if(r){let e=r+":",o=t;t=r=>r.startsWith(e)?o(r.slice(e.length)):k(v,!1,r,void 0,!0)}if(o){let e=t;t=r=>o({className:r,parseClassName:e})}return t})(a),sortModifiers:(i=new Map,a.orderSensitiveModifiers.forEach((e,r)=>{i.set(e,1e6+r)}),e=>{let r=[],o=[];for(let t=0;t<e.length;t++){let l=e[t],n="["===l[0],s=i.has(l);n||s?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(l)):o.push(l)}return o.length>0&&(o.sort(),r.push(...o)),r}),postfixLookupClassGroupIds:(e=>{let r=Object.create(null),o=e.postfixLookupClassGroups;if(o)for(let e=0;e<o.length;e++)r[o[e]]=!0;return r})(a),...(e=>{let r=(e=>{let{theme:r,classGroups:o}=e;return m(o,r)})(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:t}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]")){var o;let r,t,l;return -1===(o=e).slice(1,-1).indexOf(":")?void 0:(t=(r=o.slice(1,-1)).indexOf(":"),(l=r.slice(0,t))?"arbitrary.."+l:void 0)}let t=e.split("-"),l=+(""===t[0]&&t.length>1);return d(t,l,r)},getConflictingClassGroupIds:(e,r)=>{if(r){let r=t[e],l=o[e];if(r){if(l){let e=Array(l.length+r.length);for(let r=0;r<l.length;r++)e[r]=l[r];for(let o=0;o<r.length;o++)e[l.length+o]=r[o];return e}return r}return l||c}return o[e]||c}}})(a)}).cache.get,t=r.cache.set,l=n,n(e)},(...e)=>l(((...e)=>{let r,o,t=0,l="";for(;t<e.length;)(r=e[t++])&&(o=w(r))&&(l&&(l+=" "),l+=o);return l})(...e)));e.s(["f",0,function(...e){return ey((0,a.f)(e))}],39689)}])})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96001,t=>{t.v(o=>Promise.all(["static/chunks/280w168xxgtwt.js"].map(o=>t.l(o))).then(()=>o(160)))}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,71689,e=>{let t=(0,e.i(75254).f)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["f",0,t],71689)},95468,e=>{let t=(0,e.i(75254).f)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["f",0,t],95468)},40160,e=>{let t=(0,e.i(75254).f)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["f",0,t],40160)},67240,52044,e=>{var t=e.i(75254);let s=(0,t.f)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["f",0,s],67240);let i=(0,t.f)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["f",0,i],52044)},55436,e=>{let t=(0,e.i(75254).f)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["f",0,t],55436)},13581,90629,e=>{var t=e.i(71645),s=e.i(95813);e.s(["f",0,function(e,i=0){let[r,a]=(0,t.useState)(),[n,l]=(0,t.useState)(""),[c,d]=(0,t.useState)(!0),o=(0,t.useRef)(void 0),u=(0,t.useRef)(!1),h=(0,t.useCallback)(async()=>{o.current?.abort();let t=new AbortController;o.current=t;try{let s=await e(t.signal);if(t.signal.aborted||!u.current)return;a(s),l("")}catch(e){!t.signal.aborted&&u.current&&l((0,s.f)(e))}finally{!t.signal.aborted&&u.current&&d(!1)}},[e]);return(0,t.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&h()});let e=i>0?setInterval(()=>{h()},i):void 0;return()=>{u.current=!1,o.current?.abort(),clearInterval(e)}},[h,i]),{data:r,error:n,isLoading:c,refresh:h}}],13581);var i=e.i(18050),r=e.i(19455);e.s(["f",0,function({isLoading:e,error:t,refresh:s}){return(0,i.jsxs)(i.Fragment,{children:[e?(0,i.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,t?(0,i.jsxs)("div",{className:"error",role:"alert",children:[(0,i.jsx)("p",{children:t}),(0,i.jsx)(r.f,{variant:"outline",onClick:()=>{s()},children:"Try again"})]}):void 0]})}],90629)},3340,e=>{var t=e.i(18050),s=e.i(18566),i=e.i(59140),r=e.i(55436),a=e.i(71645),n=e.i(73656),l=e.i(13581),c=e.i(15080),d=e.i(19455),o=e.i(93479),u=e.i(90629),h=e.i(10505),p=e.i(94757),x=e.i(36174);function j({projects:e,selected:s,onSelect:i,actionId:f=""}){let{selected:m}=(0,p.useWorkspace)(),v=(0,a.useCallback)(async e=>{let[t,s]=await Promise.all([(0,c.f)(e),f?n.U.actions.versions.query({id:f},{signal:e}):void 0]),i=new Set(s?.map(e=>e.id));return t.filter(e=>e.project===m&&(!f||null!==e.action_version&&i.has(e.action_version)))},[f,m]),g=(0,l.f)(v,5e3),[y,b]=(0,a.useState)(""),[k,w]=(0,a.useState)(""),[N,S]=(0,a.useState)(""),C=g.data?.filter(t=>t.project===m&&(!k||t.status===k)&&(!N||t.operation===N)&&`${(0,h.N)(t,e)} ${t.id}`.toLowerCase().includes(y.toLowerCase()))??[];return s&&!g.data?.some(e=>e.id===s)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.f,{...g}),g.isLoading||g.error?null:(0,t.jsx)("p",{role:"alert",children:"This run is not available in this action or project."})]}):s?(0,t.jsx)(x.T,{id:s,projects:e,back:()=>{i("")},openRun:i},s):(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsxs)("div",{className:"panel-title",children:[(0,t.jsx)("h2",{children:"Run history"}),(0,t.jsxs)("span",{className:"badge",children:[C.length," runs"]})]}),(0,t.jsxs)("p",{className:"small",children:["Project:"," ",e.find(e=>e.id===m)?.name??"Choose a project"]}),(0,t.jsxs)("div",{className:"resource-toolbar",children:[(0,t.jsxs)("label",{className:"search-field",children:[(0,t.jsx)(r.f,{size:15}),(0,t.jsx)(o.f,{"aria-label":"Search runs",placeholder:"Search by project or run ID…",value:y,onChange:e=>{b(e.target.value)}})]}),(0,t.jsxs)("select",{"aria-label":"Run status",value:k,onChange:e=>{w(e.target.value)},children:[(0,t.jsx)("option",{value:"",children:"All statuses"}),["queued","running","waiting_approval","succeeded","failed","cancelled","interrupted"].map(e=>(0,t.jsx)("option",{value:e,children:e.replaceAll("_"," ")},e))]}),(0,t.jsxs)("select",{"aria-label":"Run type",value:N,onChange:e=>{S(e.target.value)},children:[(0,t.jsx)("option",{value:"",children:"All work"}),(0,t.jsx)("option",{value:"action",children:"Actions"}),(0,t.jsx)("option",{value:"code",children:"Code execution"}),(0,t.jsx)("option",{value:"validate",children:"Code validation"}),(0,t.jsx)("option",{value:"test",children:"Action tests"}),(0,t.jsx)("option",{value:"chat",children:"Chat tasks"})]})]}),(0,t.jsx)(u.f,{...g}),g.isLoading||0!==C.length?void 0:(0,t.jsxs)("div",{className:"resource-empty",children:[(0,t.jsx)("h3",{children:"No matching runs"}),(0,t.jsx)("p",{children:"Execute code from an external client or run a saved action, then follow its progress here."})]}),(0,t.jsx)("div",{className:"table-wrap",children:(0,t.jsxs)("table",{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:"Work"}),(0,t.jsx)("th",{children:"Status"}),(0,t.jsx)("th",{children:"Created"}),(0,t.jsx)("th",{})]})}),(0,t.jsx)("tbody",{children:C.map(s=>(0,t.jsxs)("tr",{children:[(0,t.jsxs)("td",{children:[(0,t.jsx)("strong",{children:(0,h.N)(s,e)}),(0,t.jsx)("small",{className:"block muted",children:s.id.slice(0,8)})]}),(0,t.jsx)("td",{children:(0,t.jsx)(h.k,{status:s.status})}),(0,t.jsx)("td",{children:new Date(s.created_at).toLocaleString()}),(0,t.jsx)("td",{children:(0,t.jsx)(d.f,{variant:"outline",size:"sm",onClick:()=>{i(s.id)},children:"View run"})})]},s.id))})]})})]})}e.s(["default",0,function(){let{projects:e,selected:r,navigateTo:a}=(0,p.useWorkspace)(),n=(0,s.useSearchParams)();return(0,t.jsx)(i.c,{current:"runs",children:s=>(0,t.jsx)(j,{projects:e,actionId:s,selected:n.get("run")??"",onSelect:e=>{let t=new URLSearchParams({project:r});s&&t.set("action",s),e&&t.set("run",e),a(`/runs/?${t.toString()}`)}},`${r}:${s}`)})}],3340)},93479,e=>{var t=e.i(18050),s=e.i(71645),i=e.i(39689);let r=s.forwardRef(({className:e,type:s,...r},a)=>(0,t.jsx)("input",{type:s,className:(0,i.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...r}));r.displayName="Input",e.s(["f",0,r])},24687,e=>{var t=e.i(18050),s=e.i(71645),i=e.i(39689);let r=s.forwardRef(({className:e,...s},r)=>(0,t.jsx)("textarea",{className:(0,i.f)("flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...s}));r.displayName="Textarea",e.s(["f",0,r])},12102,e=>{var t=e.i(40192),s=e.i(54105),i=e.i(19877),r=e.i(22219),r=r;let a=t.z.record(s.z.string(),i.z.json());e.s(["z",0,function(e){let t=JSON.parse(e);return r.array(a).min(1).max(50).parse(t)},"J",0,function(e){let t=JSON.parse(e);return a.parse(t)}],12102)},59140,e=>{var t=e.i(18050),s=e.i(71645),i=e.i(18566),r=e.i(71689),a=e.i(73656),n=e.i(13581),l=e.i(94757),c=e.i(75016),d=e.i(90629);let o=[{id:"editor",label:"Code & configuration",path:"/actions/"},{id:"runs",label:"Runs",path:"/runs/"},{id:"schedules",label:"Schedule",path:"/schedules/"},{id:"webhooks",label:"Webhooks",path:"/webhooks/"}];function u({action:e,current:s}){let i=e.project,a=new URLSearchParams({project:i,action:e.id});return(0,t.jsxs)("div",{className:"mb-6 min-w-0 space-y-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsxs)(c.f,{className:"inline-flex items-center gap-1 text-sm",href:`/actions/?${new URLSearchParams({project:i}).toString()}`,children:[(0,t.jsx)(r.f,{size:14,"aria-hidden":"true"})," All actions"]}),(0,t.jsx)("span",{className:"text-slate-300","aria-hidden":"true",children:"/"}),(0,t.jsx)("strong",{className:"min-w-0 break-words",children:e.name})]}),(0,t.jsx)("nav",{className:"flex flex-wrap gap-2","aria-label":"Action sections",children:o.map(e=>(0,t.jsx)(c.f,{href:`${e.path}?${a.toString()}`,"aria-current":s===e.id?"page":void 0,className:s===e.id?"rounded-md bg-indigo-50 px-3 py-2 text-sm font-medium text-indigo-700":"rounded-md px-3 py-2 text-sm text-slate-600 hover:bg-slate-100",children:e.label},e.id))})]})}function h({project:e,actionId:i,current:r,children:l}){let o=(0,s.useCallback)(async t=>{if(!i)return;let s=await a.U.actions.get.query({id:i},{signal:t});if(s.project!==e)throw Error("This action is not available in the selected project.");return s},[i,e]),p=(0,n.f)(o);return i&&(p.isLoading||p.error||p.data?.id!==i)?(0,t.jsx)(d.f,{...p}):(0,t.jsxs)(t.Fragment,{children:[p.data?(0,t.jsx)(u,{action:p.data,current:r}):(0,t.jsx)("p",{className:"mb-5",children:(0,t.jsx)(c.f,{href:`/actions/?${new URLSearchParams({project:e}).toString()}`,children:"Back to project actions"})}),l(i)]})}e.s(["F",0,u,"c",0,function({current:e,children:s}){let{selected:r}=(0,l.useWorkspace)(),a=(0,i.useSearchParams)().get("action")??"";return(0,t.jsx)(h,{project:r,actionId:a,current:e,children:s},`${r}:${a}`)}])},44555,e=>{var t=e.i(18050);let s=(0,e.i(75254).f)("shield-check",[["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"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var i=e.i(71645),r=e.i(73656),a=e.i(95813),n=e.i(13581),l=e.i(15080),c=e.i(19455),d=e.i(90629);e.s(["f",0,function({runId:e,openRun:o}){let u=(0,n.f)(l.i,5e3),[h,p]=(0,i.useState)(""),[x,j]=(0,i.useState)(""),f=u.data?.filter(t=>"pending"===t.status&&(!e||t.run===e))??[],m=async(e,t)=>{p(e),j("");try{await r.U.approvals.decide.mutate({id:e,decision:t}),await u.refresh()}catch(e){j((0,a.f)(e))}finally{p("")}};return(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsxs)("div",{className:"panel-title",children:[(0,t.jsxs)("h2",{children:[(0,t.jsx)(s,{size:18})," ",e?"Run approvals":"Approval queue"]}),(0,t.jsxs)("span",{className:"badge",children:[f.length," pending"]})]}),(0,t.jsx)(d.f,{...u}),x?(0,t.jsx)("p",{className:"error",role:"alert",children:x}):void 0,u.isLoading||0!==f.length?void 0:(0,t.jsxs)("div",{className:"resource-empty",children:[(0,t.jsx)(s,{size:28}),(0,t.jsx)("h3",{children:"All caught up"}),(0,t.jsx)("p",{children:"No decisions are waiting for you."})]}),f.map(e=>(0,t.jsxs)("article",{className:"approval-card",children:[(0,t.jsx)("span",{className:"eyebrow",children:"Human approval required"}),(0,t.jsx)("p",{className:"approval-prompt",children:e.prompt}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(c.f,{disabled:!!h,onClick:()=>{m(e.id,"approved")},children:h===e.id?"Saving decision…":"Approve"}),(0,t.jsx)(c.f,{variant:"outline",disabled:!!h,onClick:()=>{m(e.id,"denied")},children:"Deny"}),o?(0,t.jsx)(c.f,{variant:"ghost",onClick:()=>{o(e.run)},children:"Inspect run"}):void 0]})]},e.id))]})}],44555)},36174,e=>{var t=e.i(18050),s=e.i(71689),i=e.i(40160),r=e.i(67240),a=e.i(52044),n=e.i(71645),l=e.i(73656),c=e.i(95813),d=e.i(13581),o=e.i(15080),u=e.i(19455),h=e.i(85951),p=e.i(10505),x=e.i(90629),j=e.i(90409),f=e.i(59241),m=e.i(12102),v=e.i(75016),g=e.i(93479),y=e.i(24687);function b({id:e}){let[s,i]=(0,n.useState)(""),[r,a]=(0,n.useState)('{"type":"object"}'),[d,o]=(0,n.useState)("{}"),[h,p]=(0,n.useState)(!1),[x,j]=(0,n.useState)(""),[f,k]=(0,n.useState)(""),[w,N]=(0,n.useState)("");async function S(){p(!0),N(""),j("");try{let t=await l.U.runs.promote.mutate({id:e,name:s.trim(),input_schema:(0,m.J)(r),output_schema:(0,m.J)(d)});k(t.action),j(`Saved exact run source as version ${String(t.version.number)} of ${s.trim()} (action ${t.action}).`)}catch(e){N((0,c.f)(e))}finally{p(!1)}}return(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Promote accepted source to a saved action"}),(0,t.jsx)("p",{children:"The server copies this run’s exact source and SDK provenance. Run inputs remain examples and are not saved as defaults."}),(0,t.jsxs)("label",{children:["New action name",(0,t.jsx)(g.f,{value:s,disabled:h,onChange:e=>{i(e.target.value)}})]}),(0,t.jsxs)("label",{children:["Input schema (JSON)",(0,t.jsx)(y.f,{className:"code",value:r,disabled:h,onChange:e=>{a(e.target.value)}})]}),(0,t.jsxs)("label",{children:["Output schema (JSON)",(0,t.jsx)(y.f,{className:"code",value:d,disabled:h,onChange:e=>{o(e.target.value)}})]}),(0,t.jsx)(u.f,{disabled:h||!s.trim(),onClick:()=>{S()},children:"Promote exact source"}),w?(0,t.jsx)("p",{role:"alert",className:"error",children:w}):null,x?(0,t.jsx)("p",{role:"status",children:x}):null,f?(0,t.jsx)(v.f,{href:`/actions/?action=${encodeURIComponent(f)}`,children:"Open saved action"}):null]})}var k=e.i(44555);function w(e){let t=new Blob([e.content],{type:e.media_type}),s=URL.createObjectURL(t),i=document.createElement("a");i.href=s,i.download=e.name,i.click(),URL.revokeObjectURL(s)}function N({run:e,hasCheckReport:s}){return s?(0,t.jsx)(f.f,{output:e.output}):"succeeded"!==e.status?(0,t.jsx)("p",{children:p.B.includes(e.status)?"This run is still in progress. Its result will appear here.":`This run ${e.status}. Review the trace before retrying.`}):"chat"===e.operation?(0,t.jsx)(h.f,{content:(0,p.A)(e.output)}):(0,t.jsx)("pre",{children:(0,p.A)(e.output)||"Completed without output."})}let S={test:"Mocked test results",validate:"Semantic validation diagnostics"};e.s(["T",0,function({id:e,projects:h,back:f,openRun:m}){let v=(0,j.f)(e),g=(0,d.f)(o.K),[y,C]=(0,n.useState)(!1),[A,_]=(0,n.useState)(""),R=v.data?.run,U=void 0!==R&&("test"===R.operation||"validate"===R.operation)&&null!==R.output&&"object"==typeof R.output&&Object.hasOwn(R.output,"result"),z=async t=>{C(!0),_("");try{if("cancel"===t)await l.U.runs.cancel.mutate({id:e});else{let t=await l.U.runs.retry.mutate({id:e,idempotency_key:crypto.randomUUID()});m(t.id)}await v.refresh()}catch(e){_((0,c.f)(e))}finally{C(!1)}};return(0,t.jsxs)("div",{className:"run-detail",children:[(0,t.jsxs)(u.f,{variant:"ghost",onClick:f,children:[(0,t.jsx)(s.f,{size:14})," All runs"]}),(0,t.jsx)(x.f,{...v}),A?(0,t.jsx)("p",{className:"error",role:"alert",children:A}):void 0,R?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsxs)("div",{className:"panel-title",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"eyebrow",children:["RUN ",R.id.slice(0,8)]}),(0,t.jsxs)("h2",{children:[h.find(e=>e.id===R.project)?.name??"Project"," ","· ",(0,p.T)(R.operation)]})]}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(p.k,{status:R.status}),p.B.includes(R.status)?(0,t.jsxs)(u.f,{variant:"outline",disabled:y||R.cancel_requested,onClick:()=>{z("cancel")},children:[(0,t.jsx)(a.f,{size:13}),R.cancel_requested?"Cancellation requested":"Cancel run"]}):void 0,"chat"!==R.operation&&["failed","interrupted","cancelled"].includes(R.status)?(0,t.jsxs)(u.f,{variant:"outline",disabled:y,onClick:()=>{z("retry")},children:[(0,t.jsx)(r.f,{size:13})," Retry run"]}):void 0]})]}),(0,t.jsxs)("p",{className:"small",children:["Created ",new Date(R.created_at).toLocaleString()," · Updated"," ",new Date(R.updated_at).toLocaleString()]}),R.retry_of?(0,t.jsx)(u.f,{variant:"link",onClick:()=>{m(R.retry_of??"")},children:"View original run"}):void 0,R.error?(0,t.jsx)("div",{className:"error",role:"alert",children:R.error}):void 0,(0,t.jsxs)("dl",{children:[(0,t.jsx)("dt",{children:"Origin"}),(0,t.jsxs)("dd",{children:[R.origin," ",R.origin_reference]}),(0,t.jsx)("dt",{children:"Originating client"}),(0,t.jsx)("dd",{children:R.client_token??"No client token (historical attribution may be unknown)"}),(0,t.jsx)("dt",{children:"SDK revision"}),(0,t.jsx)("dd",{children:(0,p.A)(R.sdk_revision)||"Unknown"}),(0,t.jsx)("dt",{children:"Configuration revision"}),(0,t.jsx)("dd",{children:(0,p.A)(R.configuration_revision)||"Unknown"}),(0,t.jsx)("dt",{children:"Immutable action version"}),(0,t.jsx)("dd",{children:R.action_version??"One-off source / none"}),(0,t.jsx)("dt",{children:"Source digest"}),(0,t.jsx)("dd",{children:(0,p.A)(R.source_digest)||"Unknown"})]}),null===R.source?null:(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Accepted source"}),(0,t.jsx)("pre",{children:(0,p.A)(R.source)})]}),"code"===R.operation&&null!==R.source?(0,t.jsx)(b,{id:R.id},R.id):null,(0,t.jsx)("h3",{children:S[R.operation]??"Outcome"}),(0,t.jsx)(N,{run:R,hasCheckReport:U}),(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Run inputs"}),(0,t.jsx)("pre",{children:(0,p.A)(R.inputs)})]})]}),"waiting_approval"===R.status?(0,t.jsx)(k.f,{runId:e}):void 0,(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:"Artifacts"}),(0,t.jsx)(x.f,{...g}),g.data?.filter(t=>t.run===e).length===0?(0,t.jsx)("p",{className:"small",children:"No artifacts were saved by this run."}):void 0,g.data?.filter(t=>t.run===e).map(e=>(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:e.name}),(0,t.jsxs)(u.f,{variant:"outline",size:"sm",onClick:()=>{w(e)},children:[(0,t.jsx)(i.f,{size:13}),"Download"]}),(0,t.jsx)("pre",{children:e.content})]},e.id))]}),(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:"Execution trace"}),v.data?.events.length===0?(0,t.jsx)("p",{className:"small",children:"Waiting for the first execution event."}):void 0,(0,t.jsx)("ol",{className:"run-timeline",children:v.data?.events.map(e=>(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{className:"timeline-dot"}),(0,t.jsxs)("details",{children:[(0,t.jsxs)("summary",{children:[(0,t.jsx)("strong",{children:e.kind.replaceAll("."," ")}),(0,t.jsx)("time",{children:new Date(e.created_at).toLocaleTimeString()})]}),(0,t.jsx)("pre",{children:(0,p.A)(e.data)})]})]},e.sequence))})]})]}):void 0]})},"t",0,w],36174)},10505,21218,e=>{var t=e.i(18050),s=e.i(75254);let i=(0,s.f)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);e.s(["f",0,i],21218);var r=e.i(95468);let a=(0,s.f)("clock-3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]),n=(0,s.f)("shield-alert",[["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"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),l=(0,s.f)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);function c(e){return({chat:"Chat task",code:"Code execution",action:"Action run",validate:"Code validation",test:"Action tests"})[e]??e.replaceAll("_"," ")}e.s(["k",0,function({status:e}){let s={succeeded:r.f,waiting_approval:n,running:i,queued:a,failed:l,cancelled:l,interrupted:l}[e]??a;return(0,t.jsxs)("span",{className:`run-status status-${e}`,children:[(0,t.jsx)(s,{size:13,"aria-hidden":"true"}),e.replaceAll("_"," ")]})},"B",0,["queued","running","waiting_approval"],"A",0,function(e){return void 0===e?"":"string"==typeof e?e:JSON.stringify(e,void 0,2)},"N",0,function(e,t){let s=t.find(t=>t.id===e.project)?.name??"Project";return"chat"===e.operation?`${s} \xb7 ${(function(e,t){if(null!==e&&"object"==typeof e&&Object.hasOwn(e,t)){let s=Reflect.get(e,t);if("string"==typeof s)return s}return""})(e.inputs,"message").slice(0,70)}`:`${s} \xb7 ${c(e.operation)}`},"T",0,c],10505)},90409,59241,e=>{var t=e.i(71645),s=e.i(73656),i=e.i(13581);e.s(["f",0,function(e){let r=(0,t.useCallback)(async t=>{let[i,r]=await Promise.all([s.U.runs.get.query({id:e},{signal:t}),s.U.runs.events.query({id:e},{signal:t})]);return{run:i,events:r}},[e]),a=(0,i.f)(r,3e3),n=a.data?.run.id===e?a.data:void 0,l=void 0!==n,{refresh:c}=a;return(0,t.useEffect)(()=>{if(l)return function(e,t,i=s.U.runs.stream.subscribe){let r,a=!0,n=()=>{a&&!r&&(r=setTimeout(()=>{r=void 0,a&&t()},400))},l=i({id:e},{onData:n,onComplete(){a&&(clearTimeout(r),r=void 0,t())},onError:n});return()=>{a=!1,clearTimeout(r),l.unsubscribe()}}(e,c)},[e,l,c]),{...a,data:n}}],90409);var r=e.i(18050),a=e.i(10505);function n(e){return"object"!=typeof e||null===e||Array.isArray(e)?void 0:e}e.s(["f",0,function({output:e}){let t=n(e),s=n(t?.result)??t;if(!s)return null;let i=n(s.validation)??s,l=Array.isArray(i.diagnostics)?i.diagnostics:[],c=Array.isArray(s.cases)?s.cases:[];return(0,r.jsxs)("div",{children:["boolean"==typeof i.valid?(0,r.jsx)("p",{children:i.valid?"Source passed semantic validation.":"Source failed semantic validation."}):null,l.length>0?(0,r.jsx)("ul",{children:l.map((e,t)=>{let s=n(e);return(0,r.jsxs)("li",{children:["Line ",(0,a.A)(s?.line),", column"," ",(0,a.A)(s?.column),":"," ",(0,a.A)(s?.message)]},t)})}):null,c.length>0?(0,r.jsxs)("table",{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"Case"}),(0,r.jsx)("th",{children:"Result"}),(0,r.jsx)("th",{children:"Details"})]})}),(0,r.jsx)("tbody",{children:c.map((e,t)=>{let s=n(e);return(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,a.A)(s?.name)}),(0,r.jsx)("td",{children:s?.passed===!0?"Passed":"Failed"}),(0,r.jsxs)("td",{children:["string"==typeof s?.error&&""!==s.error?(0,r.jsx)("p",{children:s.error}):null,Array.isArray(s?.violations)?(0,r.jsx)("pre",{children:(0,a.A)(s.violations)}):null,(0,r.jsxs)("details",{children:[(0,r.jsx)("summary",{children:"Actual output and logs"}),(0,r.jsx)("pre",{children:(0,a.A)(s?.actual)}),(0,r.jsx)("pre",{children:(0,a.A)(s?.logs)})]})]})]},t)})})]}):null]})}],59241)}])})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22016,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return b}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(90809),s=e.r(18050),i=o._(e.r(71645)),l=e.r(95057),u=e.r(8372),c=e.r(18581),d=e.r(18967),f=e.r(5550),p=e.r(88540),h=e.r(91949),m=e.r(73668),g=e.r(9396);function y(t){var r;let n,a,o,[y,b]=(0,i.useOptimistic)(h.IDLE_LINK_STATUS),w=(0,i.useRef)(null),{href:j,as:v,children:S,prefetch:C=null,passHref:N,replace:P,shallow:_,scroll:E,onClick:T,onMouseEnter:U,onTouchStart:R,legacyBehavior:L=!1,onNavigate:O,transitionTypes:$,ref:A,unstable_dynamicOnHover:I,...k}=t;n=S,L&&("string"==typeof n||"number"==typeof n)&&(n=(0,s.jsx)("a",{children:n}));let M=i.default.useContext(u.AppRouterContext),F=!1!==C,B=!1===C?"none":!0===C?"full":"auto",D="none"!==B?"auto"===B?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,K="string"==typeof(r=v||j)?r:(0,l.formatUrl)(r);if(L){if(n?.$$typeof===Symbol.for("react.lazy"))throw Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag.");a=i.default.Children.only(n)}let q=L?a&&"object"==typeof a&&a.ref:A,z,W=i.default.useCallback(e=>(null!==M&&(w.current=(0,h.mountLinkInstance)(e,K,M,D,F,b,z)),()=>{w.current&&((0,h.unmountLinkForCurrentNavigation)(w.current),w.current=null),(0,h.unmountPrefetchableInstance)(e)}),[F,K,M,D,b,z]),V={ref:(0,c.useMergedRef)(W,q),onClick(t){L||"function"!=typeof T||T(t),L&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!M||t.defaultPrevented||function(t,r,n,a,o,s,i,l="none"){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{navigate:d}=e.r(32916);d(r,a?"replace":"push",!1===o?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,i,l)}}(t,K,w,P,E,O,$,B)},onMouseEnter(e){L||"function"!=typeof U||U(e),L&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),M&&F&&(0,h.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){L||"function"!=typeof R||R(e),L&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),M&&F&&(0,h.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,d.isAbsoluteUrl)(K)?V.href=K:L&&!N&&("a"!==a.type||"href"in a.props)||(V.href=(0,f.addBasePath)(K)),o=L?i.default.cloneElement(a,V):(0,s.jsx)("a",{...k,...V,children:n}),(0,s.jsx)(x.Provider,{value:y,children:o})}let x=(0,i.createContext)(h.IDLE_LINK_STATUS),b=()=>(0,i.useContext)(x);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(71645);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=o(e,n)),t&&(a.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},95057,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(90809)._(e.r(98183)),s=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",i=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(o.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||s.test(n))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),i&&"#"!==i[0]&&(i="#"+i),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${a}${c}${i}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return i(e)}},73668,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(18967),a=e.r(52817);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},18967,(e,t,r)=>{e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return j},MissingStaticPage:function(){return w},NormalizeError:function(){return x},PageNotFoundError:function(){return b},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return o},execOnce:function(){return s},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return v}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=["CLS","FCP","INP","LCP","TTFB"];function s(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&i.test(e)};function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`);return n}let m="u">typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class x extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class w extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class j extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function v(e){return JSON.stringify({message:e.message,stack:e.stack})}},76046,e=>{e.i(44362);var t=e.i(5506);e.s(["k",0,function(){location.assign(function(e){let t=new URLSearchParams(e).get("next");if(!t||!t.startsWith("/")||t.startsWith("//")||t.includes("\\"))return"/";for(let e of t)if((e.codePointAt(0)??0)<=32)return"/";let r=new URL(t,location.origin);return r.origin===location.origin?`${r.pathname}${r.search}${r.hash}`:"/"}(location.search))},"z",0,"Confirm your identity below, then retry your change.","$",0,function(e){return(0,t.f)(e)&&e.data?.code==="UNAUTHORIZED"},"y",0,function(){let e=`${location.pathname}${location.search}${location.hash}`;location.replace(`/accounts/login/?next=${encodeURIComponent(e)}`)},"u",0,function(e){return!e.is_authenticated&&e.flows.some(e=>"mfa_authenticate"===e.id)}])},86441,e=>{var t=e.i(18050),r=e.i(22016),n=e.i(73656),a=e.i(71645),o=e.i(896),s=e.i(18879),i=e.i(11105);function l(){return(0,t.jsxs)("details",{open:!0,className:"mt-6 border-t border-slate-200 pt-4",children:[(0,t.jsx)("summary",{className:"cursor-pointer text-sm font-medium",children:"Confirm your identity"}),(0,t.jsxs)("p",{className:"text-sm",children:["Session expired? ",(0,t.jsx)(r.default,{href:"/accounts/login/",children:"Sign in again"}),"."]}),(0,t.jsx)("p",{className:"text-sm",children:"If a security change asks you to confirm your identity, enter your password or an authenticator code, then retry the change."}),(0,t.jsx)(i.F,{submitLabel:"Confirm password",onSubmit:async e=>(await n.U.auth.reauthenticate.mutate({password:(0,s.f)(e,"password")}),"Identity confirmed. Retry your change."),children:(0,t.jsx)(i.j,{label:"Password",type:"password",name:"password",autoComplete:"current-password",required:!0})}),(0,t.jsx)("div",{className:"mt-5",children:(0,t.jsx)(i.F,{submitLabel:"Confirm code",onSubmit:async e=>(await n.U.auth.mfaReauthenticate.mutate({code:(0,s.f)(e,"code")}),"Identity confirmed. Retry your change."),children:(0,t.jsx)(i.j,{label:"Authenticator or recovery code",name:"code",autoComplete:"one-time-code",required:!0})})})]})}e.s(["f",0,function({children:e}){let[s,i]=(0,a.useState)(),[u,c]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=new AbortController;return(0,n.m)(e.signal).then(t=>{e.signal.aborted||i(t)}).catch(()=>{e.signal.aborted||c(!0)}),()=>{e.abort()}},[]);let[d,f]=(0,a.useState)(!1);return u?(0,t.jsx)("p",{role:"alert",children:"Unable to load your account. Reload to try again."}):s?s.is_authenticated?(0,t.jsxs)(o.T,{value:()=>{f(!0)},children:[e,d&&(0,t.jsx)(l,{})]}):(0,t.jsxs)("p",{children:["Please ",(0,t.jsx)(r.default,{href:"/accounts/login/",children:"sign in"})," to manage your account."]}):(0,t.jsx)("p",{role:"status",children:"Loading your account…"})}],86441)},11105,896,e=>{var t=e.i(18050),r=e.i(71645),n=e.i(76046),a=e.i(95813);let o=(0,r.createContext)(void 0);function s(){let e=(0,r.useContext)(o);return(t,r)=>e&&(0,n.$)(t)?(e(),n.z):(0,a.f)(t,r)}e.s(["T",0,o,"G",0,s],896);var i=e.i(19455),l=e.i(93479);e.s(["j",0,function({label:e,...r}){return(0,t.jsxs)("label",{children:[e,(0,t.jsx)(l.f,{...r})]})},"F",0,function({children:e,submitLabel:n,onSubmit:a}){let o=s(),[l,u]=(0,r.useState)(!1),[c,d]=(0,r.useState)(""),[f,p]=(0,r.useState)("");async function h(e){e.preventDefault();let t=new FormData(e.currentTarget);u(!0),d(""),p("");try{p(await a(t)??"")}catch(e){d(o(e,"Unable to save. Please try again."))}finally{u(!1)}}return(0,t.jsxs)("form",{onSubmit:e=>{h(e)},children:[(0,t.jsxs)("fieldset",{disabled:l,className:"min-w-0 border-0 p-0",children:[e,(0,t.jsx)(i.f,{type:"submit",disabled:l,children:l?"Please wait…":n})]}),c&&(0,t.jsx)("p",{role:"alert",className:"error mt-4",children:c}),f&&(0,t.jsx)("p",{role:"status",className:"notice mt-4",children:f})]})}],11105)},15448,e=>{var t=e.i(18050),r=e.i(22016),n=e.i(2716);e.s(["f",0,function({title:e,description:a,children:o,showAccountNavigation:s=!1}){return(0,t.jsxs)("div",{className:"min-h-screen",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between border-b border-slate-200 bg-white px-6 py-4 sm:px-10",children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-2 text-lg font-semibold text-slate-900",children:[(0,t.jsx)(n.f,{className:"h-9 w-9"}),"OrgSDK"]}),(0,t.jsx)(r.default,{href:"/",className:"text-sm",children:"Back to app"})]}),(0,t.jsxs)("main",{className:"mx-auto w-full max-w-xl px-4 py-10 sm:py-16",children:[s&&(0,t.jsxs)("nav",{"aria-label":"Account",className:"mb-6 flex flex-wrap gap-4 text-sm",children:[(0,t.jsx)(r.default,{href:"/accounts/email/",children:"Account"}),(0,t.jsx)(r.default,{href:"/accounts/password/change/",children:"Password"}),(0,t.jsx)(r.default,{href:"/accounts/2fa/",children:"Two-factor authentication"}),(0,t.jsx)(r.default,{href:"/accounts/logout/",children:"Sign out"})]}),(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h1",{className:"!text-2xl",children:e}),a&&(0,t.jsx)("p",{className:"mb-6 text-sm",children:a}),o]})]})]})}])},86108,e=>{var t=e.i(18050),r=e.i(71645),n=e.i(73656),a=e.i(95813),o=e.i(18879),s=e.i(15448),i=e.i(86441),l=e.i(11105);function u(){let[e,s]=(0,r.useState)(""),[i,u]=(0,r.useState)("");return(0,r.useEffect)(()=>{let e=!0;return n.U.auth.emails.query().then(t=>{e&&s(t.find(e=>e.primary)?.email??"")}).catch(t=>{e&&u((0,a.f)(t,"Unable to load email address."))}),()=>{e=!1}},[]),(0,t.jsxs)(t.Fragment,{children:[i&&(0,t.jsx)("p",{role:"alert",className:"error",children:i}),(0,t.jsx)(l.F,{submitLabel:"Save email address",onSubmit:async e=>(await n.U.auth.changeEmail.mutate({email:(0,o.f)(e,"email")}),s((0,o.f)(e,"email")),"Email address saved."),children:(0,t.jsx)(l.j,{label:"Email address",name:"email",type:"email",defaultValue:e,autoComplete:"email",required:!0},e)})]})}e.s(["ChangePassword",0,function(){return(0,t.jsx)(s.f,{title:"Change password",description:"Choose a strong password you do not use elsewhere.",showAccountNavigation:!0,children:(0,t.jsx)(i.f,{children:(0,t.jsxs)(l.F,{submitLabel:"Change password",onSubmit:async e=>{let t=(0,o.f)(e,"new_password");if(t!==(0,o.f)(e,"confirm_password"))throw Error("The new passwords do not match.");return await n.U.auth.changePassword.mutate({current_password:(0,o.f)(e,"current_password"),new_password:t}),"Your password has been changed."},children:[(0,t.jsx)(l.j,{label:"Current password",name:"current_password",type:"password",autoComplete:"current-password",required:!0}),(0,t.jsx)(l.j,{label:"New password",name:"new_password",type:"password",autoComplete:"new-password",required:!0}),(0,t.jsx)(l.j,{label:"Confirm new password",name:"confirm_password",type:"password",autoComplete:"new-password",required:!0})]})})})},"ManageAccount",0,function(){return(0,t.jsx)(s.f,{title:"Account settings",description:"Manage the email address you use to sign in.",showAccountNavigation:!0,children:(0,t.jsx)(i.f,{children:(0,t.jsx)(u,{})})})}])},93479,e=>{var t=e.i(18050),r=e.i(71645),n=e.i(39689);let a=r.forwardRef(({className:e,type:r,...a},o)=>(0,t.jsx)("input",{type:r,className:(0,n.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));a.displayName="Input",e.s(["f",0,a])},2716,e=>{var t=e.i(18050);e.s(["f",0,function({className:e,...r}){return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",className:e,...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"19",stroke:"#4f46e5",strokeWidth:"12"}),(0,t.jsx)("circle",{cx:"50",cy:"14",r:"6",fill:"#8b5cf6"})]})}])},18879,e=>{e.s(["f",0,function(e,t){let r=e.get(t);return"string"==typeof r?r:""}])}])})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13581,90629,e=>{var s=e.i(71645),a=e.i(95813);e.s(["f",0,function(e,r=0){let[t,n]=(0,s.useState)(),[i,l]=(0,s.useState)(""),[c,d]=(0,s.useState)(!0),o=(0,s.useRef)(void 0),u=(0,s.useRef)(!1),h=(0,s.useCallback)(async()=>{o.current?.abort();let s=new AbortController;o.current=s;try{let a=await e(s.signal);if(s.signal.aborted||!u.current)return;n(a),l("")}catch(e){!s.signal.aborted&&u.current&&l((0,a.f)(e))}finally{!s.signal.aborted&&u.current&&d(!1)}},[e]);return(0,s.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&h()});let e=r>0?setInterval(()=>{h()},r):void 0;return()=>{u.current=!1,o.current?.abort(),clearInterval(e)}},[h,r]),{data:t,error:i,isLoading:c,refresh:h}}],13581);var r=e.i(18050),t=e.i(19455);e.s(["f",0,function({isLoading:e,error:s,refresh:a}){return(0,r.jsxs)(r.Fragment,{children:[e?(0,r.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,s?(0,r.jsxs)("div",{className:"error",role:"alert",children:[(0,r.jsx)("p",{children:s}),(0,r.jsx)(t.f,{variant:"outline",onClick:()=>{a()},children:"Try again"})]}):void 0]})}],90629)},40067,e=>{var s=e.i(18050),a=e.i(18566),r=e.i(27025),t=e.i(7233),n=e.i(71645),i=e.i(73656),l=e.i(95813),c=e.i(19455),d=e.i(93479),o=e.i(15080),u=e.i(13581),h=e.i(1101),m=e.i(87309);function p({project:e,refresh:a}){let[r,t]=(0,n.useState)("http://localhost"),[d,o]=(0,n.useState)(""),[u,h]=(0,n.useState)(!1),[j,x]=(0,n.useState)(""),[f,b]=(0,n.useState)(""),g=(0,m.h)(),v=async(s,r=!1)=>{if(await g({title:s?"Revoke this project’s runner?":"Register a replacement runner?",description:"The current runner will lose access. Running tasks may stop. This affects only this project.",actionLabel:s?"Revoke runner":"Generate token"})){h(!0),x(""),b(""),o("");try{if(s)await i.U.projects.disconnectExecutor.mutate({id:e.id}),b("Runner access revoked.");else{let s=await i.U.projects.connectExecutor.mutate({id:e.id,locally_managed:r});r?b("Local runner enabled. It will connect when the installation’s runner is running."):o(s.token)}await a()}catch(e){x((0,l.f)(e))}finally{h(!1)}}},w="orgsdk executor register --url "+r+"\norgsdk executor start --mode docker",[N,y]=(0,n.useState)(0);(0,n.useEffect)(()=>{let e=()=>{y(Date.now())};e();let s=setInterval(()=>{e(),a().catch(e=>{x((0,l.f)(e))})},1e4);return()=>{clearInterval(s)}},[a]);let k=e.runner.last_seen_at?new Date(e.runner.last_seen_at).getTime():void 0,C="Registered · waiting for connection";return void 0!==k&&(C=N-k>6e4?"Unavailable · no recent heartbeat":"Available"),e.runner.enabled||(C="Revoked"),(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Project runner"}),(0,s.jsxs)("p",{className:"mb-4",children:["This project uses its own runner to execute actions in its persistent working folder. Starting OrgSDK with ",(0,s.jsx)("code",{children:"orgsdk start"})," also starts the local runner."]}),(0,s.jsxs)("p",{children:[e.runner.registered?C:"Not registered"," ·"," ",e.runner.locally_managed?"Managed by this installation":"Linked runner"]}),e.runner.last_seen_at?(0,s.jsxs)("p",{className:"small",children:["Last connected:"," ",new Date(e.runner.last_seen_at).toLocaleString()]}):(0,s.jsx)("p",{className:"small",children:"Waiting for the runner to connect."}),(0,s.jsxs)("div",{className:"mt-5 flex flex-wrap gap-3",children:[(0,s.jsx)(c.f,{disabled:u,onClick:()=>{v(!1)},children:"Generate registration token"}),(0,s.jsx)(c.f,{variant:"outline",disabled:u,onClick:()=>{v(!1,!0)},children:"Use local runner"}),(0,s.jsx)(c.f,{variant:"outline",disabled:u||!e.runner.registered||!e.runner.enabled,onClick:()=>{v(!0)},children:"Revoke runner"})]}),d?(0,s.jsxs)("div",{className:"mt-5 grid gap-3",children:[(0,s.jsx)("p",{children:"Copy this token now. It is shown once. Paste it at the registration prompt."}),(0,s.jsx)("code",{className:"break-all",children:d}),(0,s.jsx)(c.f,{variant:"outline",onClick:()=>{navigator.clipboard.writeText(d).then(()=>{b("Token copied.")}).catch(()=>{x("Clipboard unavailable. Select and copy the token.")})},children:"Copy token"})]}):null,(0,s.jsxs)("details",{className:"mt-4",onToggle:()=>{t(location.origin)},children:[(0,s.jsx)("summary",{children:"Link a separate runner"}),(0,s.jsx)("p",{className:"mt-4",children:"The npm-installed OrgSDK command includes the runner. A separate runner machine needs Linux and Node.js 22.22 or newer. Docker mode also requires Docker and an executor image, network and storage configured by your administrator."}),(0,s.jsx)("pre",{className:"my-4 overflow-auto",children:w}),(0,s.jsx)(c.f,{variant:"outline",onClick:()=>{navigator.clipboard.writeText(w).then(()=>{b("Commands copied.")}).catch(()=>{x("Clipboard unavailable. Select and copy the commands.")})},children:"Copy commands"}),(0,s.jsxs)("p",{className:"small mt-3",children:["Use ",(0,s.jsx)("code",{children:"--mode host"})," only when you intend to let tools run directly under your operating system account."]})]}),j?(0,s.jsx)("p",{role:"alert",className:"error",children:j}):null,f?(0,s.jsx)("p",{role:"status",className:"notice",children:f}):null]})}var j=e.i(59037),x=e.i(94757),f=e.i(75016),b=e.i(90629);let g=[{id:"overview",label:"Overview"},{id:"access",label:"Data access"},{id:"runner",label:"Runner"},{id:"settings",label:"Settings"}],v=[{field:"readable_tables",label:"Read tables",resource:"tables"},{field:"writable_tables",label:"Write tables",resource:"tables"},{field:"readable_documents",label:"Read documents",resource:"documents"},{field:"writable_documents",label:"Write documents",resource:"documents"}];async function w(e){let[s,a]=await Promise.all([(0,o.f)(e),(0,o.t)(e)]);return{runs:s,actions:a}}async function N(e){let[s,a,r]=await Promise.all([(0,o.p)(e),(0,o.l)(e),i.U.tables.list.query(void 0,{signal:e})]);return{plugins:s,documents:a,tables:r.results}}function y({project:e,tab:a,refresh:r,onDirtyChange:t}){let{canManage:n}=(0,x.useWorkspace)(),i=`project=${encodeURIComponent(e.id)}`;return(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"mb-5 flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"!mb-1 !text-xl",children:e.name}),(0,s.jsx)("p",{className:"small",children:"Configure the tools and data your MCP agent can use."})]}),(0,s.jsx)("span",{className:"badge",children:e.enabled?"Enabled":"Disabled"})]}),(0,s.jsx)("nav",{className:"mb-6 flex flex-wrap gap-2 border-b border-slate-200 pb-4","aria-label":"Project configuration",children:g.map(e=>(0,s.jsx)(c.f,{asChild:!0,variant:a===e.id?"secondary":"ghost",children:(0,s.jsx)(f.f,{href:`/projects/?${i}${"overview"===e.id?"":`&tab=${e.id}`}`,"aria-current":a===e.id?"page":void 0,children:e.label})},e.id))}),"overview"===a?(0,s.jsx)(k,{project:e}):void 0,"access"===a?(0,s.jsx)(S,{project:e,refresh:r,onDirtyChange:t}):void 0,"runner"===a?n?(0,s.jsx)(p,{project:e,refresh:r}):(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Project runner"}),(0,s.jsxs)("p",{children:[e.runner.registered?"Registered":"Not registered"," ·"," ",e.runner.enabled?"Enabled":"Revoked"]}),(0,s.jsx)("p",{className:"small mt-3",children:"An owner or admin can configure this project’s runner."})]}):void 0,"settings"===a?(0,s.jsx)(_,{project:e,refresh:r,onDirtyChange:t}):void 0]})}function k({project:e}){let a=(0,u.f)(w),r=`project=${encodeURIComponent(e.id)}`,t=a.data?.actions.filter(s=>s.project===e.id),n=a.data?.runs.filter(s=>s.project===e.id).slice(0,5);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsxs)("div",{className:"grid gap-5 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-center",children:[(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("h2",{className:"!mb-0",children:"Connect your agent over MCP"}),(0,s.jsx)("p",{className:"max-w-2xl",children:"Connect an external agent to this project to build and run actions. Choose the plugins and workspace data it can access, then use saved actions to review runs, add schedules and receive webhooks."})]}),(0,s.jsx)(c.f,{asChild:!0,children:(0,s.jsx)(f.f,{href:`/connections/?${r}`,children:"Connect agent"})})]}),(0,s.jsxs)("div",{className:"mt-5 flex flex-wrap gap-3 border-t border-slate-200 pt-4",children:[(0,s.jsx)(c.f,{asChild:!0,variant:"outline",children:(0,s.jsx)(f.f,{href:`/projects/?${r}&tab=access`,children:"Configure data access"})}),(0,s.jsx)(c.f,{asChild:!0,variant:"outline",children:(0,s.jsx)(f.f,{href:`/plugins/?${r}`,children:"Manage plugins"})}),(0,s.jsx)(c.f,{asChild:!0,variant:"outline",children:(0,s.jsx)(f.f,{href:`/projects/?${r}&tab=runner`,children:e.runner.registered?"Manage runner":"Set up runner"})})]})]}),(0,s.jsx)(b.f,{...a}),(0,s.jsxs)("section",{className:"panel","aria-labelledby":"project-actions-heading",children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{id:"project-actions-heading",className:"!mb-1",children:"Saved actions"}),(0,s.jsx)("p",{className:"small",children:"Open an action to manage its code, runs, schedule and webhook."})]}),(0,s.jsx)(c.f,{asChild:!0,variant:"outline",children:(0,s.jsx)(f.f,{href:`/actions/?${r}`,children:"View all actions"})})]}),(0,s.jsx)("div",{className:"grid gap-3 xl:grid-cols-2",children:t?.slice(0,4).map(e=>(0,s.jsx)(h.f,{action:e},e.id))}),t?.length===0?(0,s.jsxs)("div",{className:"rounded-lg border border-dashed border-slate-200 p-5",children:[(0,s.jsx)("h3",{children:"No saved actions yet"}),(0,s.jsx)("p",{className:"small mt-2",children:"Create an action or ask your connected agent to build one."}),(0,s.jsx)(c.f,{asChild:!0,variant:"outline",className:"mt-4",children:(0,s.jsx)(f.f,{href:`/actions/?${r}&new=1`,children:"Create action"})})]}):void 0]}),(0,s.jsxs)("section",{className:"panel","aria-labelledby":"project-runs-heading",children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsx)("h2",{id:"project-runs-heading",className:"!mb-0",children:"Recent runs"}),(0,s.jsx)(c.f,{asChild:!0,variant:"outline",children:(0,s.jsx)(f.f,{href:`/runs/?${r}`,children:"View all runs"})})]}),(0,s.jsx)("div",{className:"grid gap-3",children:n?.map(e=>(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-slate-200 p-4",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("span",{className:"text-sm font-medium",children:[e.operation," · ",e.status]}),(0,s.jsx)("p",{className:"small mt-1",children:new Date(e.created_at).toLocaleString()})]}),(0,s.jsx)(c.f,{asChild:!0,variant:"outline",children:(0,s.jsx)(f.f,{href:`/runs/?${r}&run=${encodeURIComponent(e.id)}`,children:"Inspect run"})})]},e.id))}),n?.length===0?(0,s.jsx)("p",{children:"No runs yet. Run an action to see its results here."}):void 0]})]})}function C(e){return{readable_tables:"readable_tables"in e?e.readable_tables:[],writable_tables:"writable_tables"in e?e.writable_tables:[],readable_documents:"readable_documents"in e?e.readable_documents:[],writable_documents:"writable_documents"in e?e.writable_documents:[]}}function S({project:e,refresh:a,onDirtyChange:r}){let{canManage:t}=(0,x.useWorkspace)(),d=(0,u.f)(N),o=C(e),[h,m]=(0,n.useState)(()=>C(e)),[p,g]=(0,n.useState)(!1),[w,y]=(0,n.useState)(""),[k,_]=(0,n.useState)("");(0,j.f)(v.some(({field:e})=>JSON.stringify(h[e])!==JSON.stringify(o[e])),r);let R=async()=>{g(!0),y(""),_("");try{let s=await i.U.projects.update.mutate({id:e.id,...h});await a(),m(C(s)),_("Project data access saved.")}catch(e){y((0,l.f)(e))}finally{g(!1)}},D=d.data?.plugins.filter(s=>s.project===e.id);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Workspace data access"}),(0,s.jsx)("p",{className:"mb-5 max-w-3xl",children:"Choose the shared tables and documents available to this project’s actions. Changes apply to new runs; adding access cannot widen a run that has already been submitted."}),t?void 0:(0,s.jsx)("p",{className:"small mb-5",children:"Only owners and admins can change project data access."}),(0,s.jsx)(b.f,{...d}),(0,s.jsxs)("form",{onSubmit:e=>{e.preventDefault(),R()},children:[(0,s.jsx)("div",{className:"grid gap-4 md:grid-cols-2",children:v.map(({field:e,label:a,resource:r})=>{let n=d.data?.[r];return(0,s.jsx)("div",{className:"min-w-0 rounded-lg border border-slate-200 p-4",children:(0,s.jsxs)("fieldset",{className:"!m-0 min-w-0 !border-0 !p-0",disabled:!t||p,children:[(0,s.jsx)("legend",{className:"!mb-3 !text-sm font-semibold",children:a}),(0,s.jsx)("div",{className:"grid gap-3",children:n?.map(a=>(0,s.jsxs)("label",{className:"check !m-0 !items-start gap-2",children:[(0,s.jsx)("input",{type:"checkbox",className:"mt-1 shrink-0",checked:h[e].includes(a.id),onChange:s=>{m(r=>({...r,[e]:s.target.checked?[...r[e],a.id]:r[e].filter(e=>e!==a.id)}))}}),(0,s.jsx)("span",{className:"min-w-0 break-words",children:"name"in a?a.name:a.title})]},a.id))}),n?.length===0?(0,s.jsxs)("p",{className:"small",children:["No workspace ",r," yet."]}):void 0]})},e)})}),(0,s.jsxs)("div",{className:"mt-5 flex flex-wrap items-center gap-3",children:[t?(0,s.jsx)(c.f,{type:"submit",disabled:p||d.isLoading||!d.data,children:p?"Saving…":"Save data access"}):void 0,(0,s.jsx)(f.f,{href:"/tables/",children:"Manage workspace tables"}),(0,s.jsx)(f.f,{href:"/documents/",children:"Manage workspace documents"})]})]}),w?(0,s.jsx)("p",{className:"error mt-4",role:"alert",children:w}):void 0,k?(0,s.jsx)("p",{className:"notice mt-4",role:"status",children:k}):void 0]}),(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Project plugins"}),(0,s.jsx)("p",{children:"Plugins add tools your agent can use in this project. Configure each plugin’s credentials separately."}),(0,s.jsxs)("div",{className:"my-4 grid gap-2",children:[D?.map(e=>(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 rounded-md border border-slate-200 p-3",children:[(0,s.jsxs)("span",{className:"text-sm",children:[e.slug," · ",e.version]}),(0,s.jsx)("span",{className:"badge",children:e.enabled?"Enabled":"Disabled"})]},e.id)),D?.length===0?(0,s.jsx)("p",{className:"small",children:"No plugins installed in this project."}):void 0]}),(0,s.jsx)(c.f,{asChild:!0,variant:"outline",children:(0,s.jsx)(f.f,{href:`/plugins/?project=${encodeURIComponent(e.id)}`,children:"Manage project plugins"})})]})]})}function _({project:e,refresh:a,onDirtyChange:r}){let{canManage:t,navigateTo:o}=(0,x.useWorkspace)(),[u,h]=(0,n.useState)(e.name),[p,f]=(0,n.useState)(e.enabled),[b,g]=(0,n.useState)(!1),[v,w]=(0,n.useState)(""),[N,y]=(0,n.useState)(""),k=(0,m.h)();(0,j.f)(u!==e.name||p!==e.enabled,r);let C=async()=>{g(!0),w(""),y("");try{let s=await i.U.projects.update.mutate({id:e.id,name:u.trim(),enabled:p});await a(),h(s.name),y("Project settings saved.")}catch(e){w((0,l.f)(e))}finally{g(!1)}},S=async()=>{if(await k({title:"Delete this project?",description:"Its actions and versions will be removed. Projects referenced by retained run history cannot be deleted.",actionLabel:"Delete project"})){g(!0),w(""),y("");try{await i.U.projects.delete.mutate({id:e.id}),r(!1),await a(),await o("/projects/")}catch(e){w((0,l.f)(e))}finally{g(!1)}}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Project settings"}),(0,s.jsxs)("form",{className:"max-w-2xl",onSubmit:e=>{e.preventDefault(),C()},children:[(0,s.jsxs)("label",{children:["Project name",(0,s.jsx)(d.f,{value:u,disabled:b,onChange:e=>{h(e.target.value)},required:!0})]}),(0,s.jsxs)("label",{className:"check",children:[(0,s.jsx)("input",{type:"checkbox",disabled:b,checked:p,onChange:e=>{f(e.target.checked)}}),"Enabled for new work"]}),(0,s.jsx)("p",{className:"small mt-2",children:"Actions execute serially in this project’s persistent working folder."}),(0,s.jsx)(c.f,{className:"mt-5",type:"submit",disabled:b||!u.trim(),children:b?"Saving…":"Save project"})]}),v?(0,s.jsx)("p",{className:"error mt-4",role:"alert",children:v}):void 0,N?(0,s.jsx)("p",{className:"notice mt-4",role:"status",children:N}):void 0]}),t?(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Delete project"}),(0,s.jsx)("p",{children:"Delete this project and its saved actions. Projects with retained run history cannot be deleted."}),(0,s.jsx)(c.f,{className:"mt-4",variant:"outline",disabled:b,onClick:()=>{S()},children:"Delete project"})]}):void 0]})}function R({onCancel:e}){let{setSelected:r,setDirty:t,refresh:o}=(0,x.useWorkspace)(),u=(0,a.useRouter)(),[h,m]=(0,n.useState)(""),[p,f]=(0,n.useState)(!1),[b,g]=(0,n.useState)("");(0,j.f)(""!==h.trim(),t);let v=async()=>{f(!0),g("");try{let e=await i.U.projects.create.mutate({name:h.trim()});r(e.id),await o(),t(!1),u.push(`/projects/?project=${encodeURIComponent(e.id)}`)}catch(e){g((0,l.f)(e))}finally{f(!1)}};return(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Create a project"}),(0,s.jsx)("p",{className:"small mb-5",children:"Give your project a name, configure its runner and data access, then connect your agent over MCP."}),(0,s.jsxs)("form",{className:"max-w-2xl",onSubmit:e=>{e.preventDefault(),v()},children:[(0,s.jsxs)("label",{children:["Project name",(0,s.jsx)(d.f,{autoFocus:!0,required:!0,value:h,disabled:p,placeholder:"e.g. Operations",onChange:e=>{m(e.target.value)}})]}),(0,s.jsxs)("div",{className:"row",children:[(0,s.jsx)(c.f,{type:"submit",disabled:p||!h.trim(),children:p?"Creating…":"Create project"}),(0,s.jsx)(c.f,{type:"button",variant:"outline",disabled:p,onClick:e,children:"Cancel"})]})]}),b?(0,s.jsx)("p",{role:"alert",className:"error mt-4",children:b}):void 0]})}e.s(["default",0,function(){let{projects:e,selected:n,setDirty:i,refresh:l,navigateTo:d}=(0,x.useWorkspace)(),o=(0,a.useSearchParams)(),u=e.find(e=>e.id===n);if("1"===o.get("new"))return(0,s.jsx)(R,{onCancel:()=>{d(u?`/projects/?project=${encodeURIComponent(u.id)}`:"/projects/")}});if(u){let e=["access","runner","settings"].find(e=>e===o.get("tab"))??"overview";return(0,s.jsx)(y,{project:u,tab:e,refresh:l,onDirtyChange:i},u.id)}return(0,s.jsxs)("section",{className:"empty",children:[(0,s.jsx)(r.f,{className:"mx-auto",size:32}),(0,s.jsx)("h2",{className:"!mt-4",children:"Create your first project"}),(0,s.jsx)("p",{children:"A project gives your MCP agent a place to build actions, run work and access the data you choose."}),(0,s.jsx)(c.f,{asChild:!0,className:"mt-5",children:(0,s.jsxs)(f.f,{href:"/projects/?new=1",children:[(0,s.jsx)(t.f,{size:16}),"Create project"]})})]})}],40067)},93479,e=>{var s=e.i(18050),a=e.i(71645),r=e.i(39689);let t=a.forwardRef(({className:e,type:a,...t},n)=>(0,s.jsx)("input",{type:a,className:(0,r.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));t.displayName="Input",e.s(["f",0,t])},1101,15057,e=>{var s=e.i(18050);let a=(0,e.i(75254).f)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);e.s(["f",0,a],15057);var r=e.i(97625),t=e.i(75016);e.s(["f",0,function({action:e}){let n=e.description.trim(),i=new URLSearchParams({project:e.project,action:e.id}).toString();return(0,s.jsxs)("article",{className:"flex min-w-0 flex-col gap-4 rounded-xl border border-slate-200 bg-white p-5",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsx)(r.f,{size:20,className:"shrink-0 text-indigo-600","aria-hidden":"true"}),(0,s.jsx)("span",{className:e.enabled?"rounded-full bg-emerald-50 px-2.5 py-1 text-xs font-medium text-emerald-700":"rounded-full bg-slate-100 px-2.5 py-1 text-xs font-medium text-slate-600",children:e.enabled?"Enabled":"Disabled"})]}),(0,s.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,s.jsx)("h3",{className:"text-base font-semibold",children:(0,s.jsxs)(t.f,{href:`/actions/?${i}`,className:"flex items-start justify-between gap-3 hover:underline",children:[(0,s.jsx)("span",{className:"break-words",children:e.name}),(0,s.jsx)(a,{size:17,className:"mt-0.5 shrink-0","aria-hidden":"true"})]})}),(0,s.jsx)("p",{className:"text-sm leading-relaxed",children:n.length>0?n:"Open this action to review its code, inputs and saved versions."})]}),(0,s.jsxs)("nav",{className:"flex flex-wrap gap-x-4 gap-y-2 border-t border-slate-100 pt-3 text-sm","aria-label":`${e.name} related records`,children:[(0,s.jsx)(t.f,{href:`/runs/?${i}`,className:"hover:underline",children:"Runs"}),(0,s.jsx)(t.f,{href:`/schedules/?${i}`,className:"hover:underline",children:"Schedules"}),(0,s.jsx)(t.f,{href:`/webhooks/?${i}`,className:"hover:underline",children:"Webhooks"})]})]})}],1101)},59037,e=>{var s=e.i(71645);e.s(["f",0,function(e,a){(0,s.useEffect)(()=>{a(e);let s=e=>{e.preventDefault()};return e&&addEventListener("beforeunload",s),()=>{removeEventListener("beforeunload",s),a(!1)}},[e,a])}])}])})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13581,90629,e=>{var r=e.i(71645),a=e.i(95813);e.s(["f",0,function(e,i=0){let[s,n]=(0,r.useState)(),[t,l]=(0,r.useState)(""),[c,d]=(0,r.useState)(!0),o=(0,r.useRef)(void 0),u=(0,r.useRef)(!1),p=(0,r.useCallback)(async()=>{o.current?.abort();let r=new AbortController;o.current=r;try{let a=await e(r.signal);if(r.signal.aborted||!u.current)return;n(a),l("")}catch(e){!r.signal.aborted&&u.current&&l((0,a.f)(e))}finally{!r.signal.aborted&&u.current&&d(!1)}},[e]);return(0,r.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&p()});let e=i>0?setInterval(()=>{p()},i):void 0;return()=>{u.current=!1,o.current?.abort(),clearInterval(e)}},[p,i]),{data:s,error:t,isLoading:c,refresh:p}}],13581);var i=e.i(18050),s=e.i(19455);e.s(["f",0,function({isLoading:e,error:r,refresh:a}){return(0,i.jsxs)(i.Fragment,{children:[e?(0,i.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,r?(0,i.jsxs)("div",{className:"error",role:"alert",children:[(0,i.jsx)("p",{children:r}),(0,i.jsx)(s.f,{variant:"outline",onClick:()=>{a()},children:"Try again"})]}):void 0]})}],90629)},94586,e=>{var r=e.i(18050),a=e.i(44555),i=e.i(94757);e.s(["default",0,function(){let{openRun:e}=(0,i.useWorkspace)();return(0,r.jsx)(a.f,{openRun:e})}])},44555,e=>{var r=e.i(18050);let a=(0,e.i(75254).f)("shield-check",[["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"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var i=e.i(71645),s=e.i(73656),n=e.i(95813),t=e.i(13581),l=e.i(15080),c=e.i(19455),d=e.i(90629);e.s(["f",0,function({runId:e,openRun:o}){let u=(0,t.f)(l.i,5e3),[p,h]=(0,i.useState)(""),[v,f]=(0,i.useState)(""),j=u.data?.filter(r=>"pending"===r.status&&(!e||r.run===e))??[],x=async(e,r)=>{h(e),f("");try{await s.U.approvals.decide.mutate({id:e,decision:r}),await u.refresh()}catch(e){f((0,n.f)(e))}finally{h("")}};return(0,r.jsxs)("section",{className:"panel",children:[(0,r.jsxs)("div",{className:"panel-title",children:[(0,r.jsxs)("h2",{children:[(0,r.jsx)(a,{size:18})," ",e?"Run approvals":"Approval queue"]}),(0,r.jsxs)("span",{className:"badge",children:[j.length," pending"]})]}),(0,r.jsx)(d.f,{...u}),v?(0,r.jsx)("p",{className:"error",role:"alert",children:v}):void 0,u.isLoading||0!==j.length?void 0:(0,r.jsxs)("div",{className:"resource-empty",children:[(0,r.jsx)(a,{size:28}),(0,r.jsx)("h3",{children:"All caught up"}),(0,r.jsx)("p",{children:"No decisions are waiting for you."})]}),j.map(e=>(0,r.jsxs)("article",{className:"approval-card",children:[(0,r.jsx)("span",{className:"eyebrow",children:"Human approval required"}),(0,r.jsx)("p",{className:"approval-prompt",children:e.prompt}),(0,r.jsxs)("div",{className:"row",children:[(0,r.jsx)(c.f,{disabled:!!p,onClick:()=>{x(e.id,"approved")},children:p===e.id?"Saving decision…":"Approve"}),(0,r.jsx)(c.f,{variant:"outline",disabled:!!p,onClick:()=>{x(e.id,"denied")},children:"Deny"}),o?(0,r.jsx)(c.f,{variant:"ghost",onClick:()=>{o(e.run)},children:"Inspect run"}):void 0]})]},e.id))]})}],44555)}])})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,71689,e=>{let i=(0,e.i(75254).f)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["f",0,i],71689)},13581,90629,e=>{var i=e.i(71645),t=e.i(95813);e.s(["f",0,function(e,a=0){let[r,s]=(0,i.useState)(),[n,l]=(0,i.useState)(""),[o,c]=(0,i.useState)(!0),d=(0,i.useRef)(void 0),h=(0,i.useRef)(!1),u=(0,i.useCallback)(async()=>{d.current?.abort();let i=new AbortController;d.current=i;try{let t=await e(i.signal);if(i.signal.aborted||!h.current)return;s(t),l("")}catch(e){!i.signal.aborted&&h.current&&l((0,t.f)(e))}finally{!i.signal.aborted&&h.current&&c(!1)}},[e]);return(0,i.useEffect)(()=>{h.current=!0,queueMicrotask(()=>{h.current&&u()});let e=a>0?setInterval(()=>{u()},a):void 0;return()=>{h.current=!1,d.current?.abort(),clearInterval(e)}},[u,a]),{data:r,error:n,isLoading:o,refresh:u}}],13581);var a=e.i(18050),r=e.i(19455);e.s(["f",0,function({isLoading:e,error:i,refresh:t}){return(0,a.jsxs)(a.Fragment,{children:[e?(0,a.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,i?(0,a.jsxs)("div",{className:"error",role:"alert",children:[(0,a.jsx)("p",{children:i}),(0,a.jsx)(r.f,{variant:"outline",onClick:()=>{t()},children:"Try again"})]}):void 0]})}],90629)},65983,e=>{var i=e.i(18050),t=e.i(71645),a=e.i(73656),r=e.i(95813),s=e.i(13581),n=e.i(15080),l=e.i(19455),o=e.i(93479),c=e.i(90629),d=e.i(94757),h=e.i(75016),u=e.i(87309),p=e.i(59037);async function x(e){let[i,t]=await Promise.all([a.U.webhooks.list.query(void 0,{signal:e}),(0,n.t)(e)]);return{hooks:i.results,actions:t}}function f(e){return e?new Date(e).toLocaleString():"Never"}function b({actionId:e=""}){let{canManage:n,selected:j,setDirty:m}=(0,d.useWorkspace)(),v=(0,s.f)(x,1e4),g=(v.data?.actions??[]).filter(i=>i.project===j&&(!e||i.id===e)),w=new Set(g.map(e=>e.id)),k=(v.data?.hooks??[]).filter(e=>w.has(e.action_id)),y=(0,u.h)(),[S,N]=(0,t.useState)(""),[R,_]=(0,t.useState)(e),[C,L]=(0,t.useState)(!1),[U,T]=(0,t.useState)(""),[$,E]=(0,t.useState)(""),[W,q]=(0,t.useState)();async function P(e){L(!0),T(""),E("");try{await e(),await v.refresh()}catch(e){T((0,r.f)(e))}finally{L(!1)}}return(0,p.f)(""!==S.trim()||R!==e||!!W,m),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("section",{className:"panel",children:[(0,i.jsx)("h2",{children:"Webhook triggers"}),(0,i.jsx)("p",{children:"Send JSON inputs to queue an action. Each registration keeps its saved action version. Delivery acceptance and action execution are tracked separately."}),(0,i.jsxs)("p",{children:["Send ",(0,i.jsx)("code",{children:"X-Webhook-Secret"})," and a stable, unique"," ",(0,i.jsx)("code",{children:"X-Webhook-Delivery"})," header with"," ",(0,i.jsx)("code",{children:'{"inputs": {}}'}),". JSON bodies are limited to 200 KB. Retrying the same delivery never queues another run."]}),(0,i.jsx)(c.f,{...v}),v.isLoading||v.error||0!==k.length?void 0:(0,i.jsx)("p",{children:"No webhook triggers yet."}),k.map(e=>(0,i.jsxs)("article",{className:"panel",children:[(0,i.jsxs)("div",{className:"panel-title",children:[(0,i.jsx)("h3",{children:e.name}),(0,i.jsx)("span",{className:"badge",children:e.enabled?"Enabled":"Disabled"})]}),(0,i.jsxs)("p",{children:[(0,i.jsx)(h.f,{href:`/actions/?${new URLSearchParams({project:j,action:e.action_id}).toString()}`,children:e.action_name})," ","· Version ",e.version]}),(0,i.jsxs)("label",{children:["Endpoint",(0,i.jsx)(o.f,{readOnly:!0,value:location.origin+e.endpoint})]}),(0,i.jsxs)("div",{className:"row",children:[(0,i.jsx)(l.f,{variant:"outline",disabled:C,onClick:()=>{P(async()=>{await navigator.clipboard.writeText(location.origin+e.endpoint),E("Endpoint copied.")})},children:"Copy endpoint"}),n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.f,{variant:"outline",disabled:C,onClick:()=>{P(async()=>{await a.U.webhooks.update.mutate({id:e.id,enabled:!e.enabled}),E(e.enabled?"Webhook disabled.":"Webhook enabled.")})},children:e.enabled?"Disable":"Enable"}),(0,i.jsx)(l.f,{variant:"outline",disabled:C,onClick:()=>{P(async()=>{await y({title:"Rotate webhook secret?",description:"The previous secret will stop working immediately. Update the sending service with the new secret.",actionLabel:"Rotate secret"})&&q(await a.U.webhooks.rotate.mutate({id:e.id}))})},children:"Rotate secret"})]}):void 0]}),(0,i.jsxs)("p",{children:["Last receipt: ",f(e.last_received_at)," · Last accepted:"," ",f(e.last_accepted_at)]}),(0,i.jsxs)("p",{children:["Last rejection: ",e.last_rejection||"None",e.last_rejected_at?` (${f(e.last_rejected_at)})`:""," ","· Secret rotated: ",f(e.rotated_at)]}),(0,i.jsxs)("details",{children:[(0,i.jsxs)("summary",{children:["Recent deliveries (",e.deliveries.length,")"]}),0===e.deliveries.length?(0,i.jsx)("p",{children:"No authenticated deliveries recorded."}):void 0,e.deliveries.map(t=>(0,i.jsxs)("div",{className:"resource-row",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("strong",{children:t.delivery_id}),(0,i.jsxs)("small",{children:[f(t.received_at)," · ",t.outcome]})]}),t.run?(0,i.jsxs)(h.f,{href:`/runs/?${new URLSearchParams({project:j,action:e.action_id,run:t.run}).toString()}`,children:["Run: ",t.run_status??"Unavailable"]}):(0,i.jsx)("span",{children:"No run queued"})]},t.id))]})]},e.id))]}),n?(0,i.jsxs)("section",{className:"panel",children:[(0,i.jsx)("h2",{children:"Register a webhook"}),(0,i.jsxs)("form",{onSubmit:i=>{i.preventDefault(),P(async()=>{q(await a.U.webhooks.create.mutate({name:S,action:R})),N(""),_(e)})},children:[(0,i.jsxs)("label",{children:["Name",(0,i.jsx)(o.f,{required:!0,maxLength:100,value:S,disabled:C,onChange:e=>{N(e.target.value)}})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"webhook-action",children:"Action"}),(0,i.jsxs)("select",{id:"webhook-action",required:!0,value:R,disabled:C,onChange:e=>{_(e.target.value)},children:[(0,i.jsx)("option",{value:"",children:"Choose an action"}),g.filter(e=>e.enabled).map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,i.jsx)("p",{children:"The latest saved version is pinned at registration. Register a new webhook to use a different version."}),(0,i.jsx)(l.f,{disabled:C||g.every(e=>e.id!==R||!e.enabled),type:"submit",children:"Register webhook"})]})]}):(0,i.jsx)("p",{children:"Workspace owners and admins manage webhook registrations."}),W?(0,i.jsxs)("section",{className:"panel","aria-label":"One-time webhook secret",children:[(0,i.jsxs)("h2",{children:["Save the secret for ",W.webhook.name]}),(0,i.jsx)("p",{children:"This secret is shown once. Store it in your sending service and keep it out of URLs."}),(0,i.jsxs)("label",{children:["Secret",(0,i.jsx)(o.f,{readOnly:!0,type:"password",value:W.secret})]}),(0,i.jsxs)("div",{className:"row",children:[(0,i.jsx)(l.f,{disabled:C,onClick:()=>{P(async()=>{await navigator.clipboard.writeText(W.secret),E("Secret copied.")})},children:"Copy secret"}),(0,i.jsx)(l.f,{variant:"outline",onClick:()=>{q(void 0)},children:"Dismiss secret"})]})]}):void 0,U?(0,i.jsx)("p",{className:"error",role:"alert",children:U}):void 0,$?(0,i.jsx)("p",{className:"notice",role:"status",children:$}):void 0]})}var j=e.i(59140);e.s(["default",0,function(){let{selected:e}=(0,d.useWorkspace)();return(0,i.jsx)(j.c,{current:"webhooks",children:t=>(0,i.jsx)(b,{actionId:t},`${e}:${t}`)})}],65983)},93479,e=>{var i=e.i(18050),t=e.i(71645),a=e.i(39689);let r=t.forwardRef(({className:e,type:t,...r},s)=>(0,i.jsx)("input",{type:t,className:(0,a.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:s,...r}));r.displayName="Input",e.s(["f",0,r])},59140,e=>{var i=e.i(18050),t=e.i(71645),a=e.i(18566),r=e.i(71689),s=e.i(73656),n=e.i(13581),l=e.i(94757),o=e.i(75016),c=e.i(90629);let d=[{id:"editor",label:"Code & configuration",path:"/actions/"},{id:"runs",label:"Runs",path:"/runs/"},{id:"schedules",label:"Schedule",path:"/schedules/"},{id:"webhooks",label:"Webhooks",path:"/webhooks/"}];function h({action:e,current:t}){let a=e.project,s=new URLSearchParams({project:a,action:e.id});return(0,i.jsxs)("div",{className:"mb-6 min-w-0 space-y-3",children:[(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,i.jsxs)(o.f,{className:"inline-flex items-center gap-1 text-sm",href:`/actions/?${new URLSearchParams({project:a}).toString()}`,children:[(0,i.jsx)(r.f,{size:14,"aria-hidden":"true"})," All actions"]}),(0,i.jsx)("span",{className:"text-slate-300","aria-hidden":"true",children:"/"}),(0,i.jsx)("strong",{className:"min-w-0 break-words",children:e.name})]}),(0,i.jsx)("nav",{className:"flex flex-wrap gap-2","aria-label":"Action sections",children:d.map(e=>(0,i.jsx)(o.f,{href:`${e.path}?${s.toString()}`,"aria-current":t===e.id?"page":void 0,className:t===e.id?"rounded-md bg-indigo-50 px-3 py-2 text-sm font-medium text-indigo-700":"rounded-md px-3 py-2 text-sm text-slate-600 hover:bg-slate-100",children:e.label},e.id))})]})}function u({project:e,actionId:a,current:r,children:l}){let d=(0,t.useCallback)(async i=>{if(!a)return;let t=await s.U.actions.get.query({id:a},{signal:i});if(t.project!==e)throw Error("This action is not available in the selected project.");return t},[a,e]),p=(0,n.f)(d);return a&&(p.isLoading||p.error||p.data?.id!==a)?(0,i.jsx)(c.f,{...p}):(0,i.jsxs)(i.Fragment,{children:[p.data?(0,i.jsx)(h,{action:p.data,current:r}):(0,i.jsx)("p",{className:"mb-5",children:(0,i.jsx)(o.f,{href:`/actions/?${new URLSearchParams({project:e}).toString()}`,children:"Back to project actions"})}),l(a)]})}e.s(["F",0,h,"c",0,function({current:e,children:t}){let{selected:r}=(0,l.useWorkspace)(),s=(0,a.useSearchParams)().get("action")??"";return(0,i.jsx)(u,{project:r,actionId:s,current:e,children:t},`${r}:${s}`)}])},59037,e=>{var i=e.i(71645);e.s(["f",0,function(e,t){(0,i.useEffect)(()=>{t(e);let i=e=>{e.preventDefault()};return e&&addEventListener("beforeunload",i),()=>{removeEventListener("beforeunload",i),t(!1)}},[e,t])}])}])})();
|