@peasant-labs/fairtrade 0.0.19 → 0.0.21

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.
@@ -1,4 +1,4 @@
1
- import { At as e, Bn as t, In as n, Mt as r, Nn as i, Nt as a, Ot as o, Pt as s, Rn as c, at as l, bn as u, gn as d, it as f, kt as p, rt as m, st as h, tt as g, zn as _ } from "./ui-DkPbLhcp.js";
1
+ import { At as e, Dn as t, Ft as n, Nt as r, Pt as i, Wn as a, Xn as o, Yn as s, Zn as c, at as l, it as u, jn as d, jt as f, kt as p, qn as m, rt as h, st as g, tt as _ } from "./ui-w7Ju5ccI.js";
2
2
  import { dt as v, lt as y, xt as b } from "./GraphLegend-BB0V2w59.js";
3
3
  import { useEffect as x, useId as S, useMemo as C, useRef as w, useState as T } from "react";
4
4
  import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
@@ -222,7 +222,7 @@ function be({ transcript: e, href: t, onOpen: n }) {
222
222
  className: "mono",
223
223
  children: e.modelName || e.modelProvider
224
224
  })]
225
- }), /* @__PURE__ */ D(g, { visibility: e.visibility })]
225
+ }), /* @__PURE__ */ D(_, { visibility: e.visibility })]
226
226
  }),
227
227
  /* @__PURE__ */ D("h3", {
228
228
  className: "cex-title",
@@ -288,7 +288,7 @@ function xe({ transcript: e, href: t, onOpen: n }) {
288
288
  className: "cex-trow-date mono tnum",
289
289
  children: fe(e.sessionStart || e.sessionEnd || "")
290
290
  }),
291
- /* @__PURE__ */ D(g, { visibility: e.visibility })
291
+ /* @__PURE__ */ D(_, { visibility: e.visibility })
292
292
  ] });
293
293
  return t ? /* @__PURE__ */ D("a", {
294
294
  href: t,
@@ -339,7 +339,7 @@ function Se({ collective: e, href: t, onOpen: n }) {
339
339
  });
340
340
  }
341
341
  function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript: r, onOpenProfile: i, onOpenCollective: a, transcriptHref: o, profileHref: s, collectiveHref: c }) {
342
- let d = ve(e), f = d.transcripts.transcripts, [p, m] = T(""), [_, y] = T(""), [b, S] = T("recent"), [E, k] = T("all"), [A, j] = T(() => /* @__PURE__ */ new Set()), [M, N] = T("grid"), [P, I] = T(() => ye(d.transcripts.page)), [L, R] = T(null), [z, V] = T("browse"), H = w(!0), U = w(null);
342
+ let u = ve(e), f = u.transcripts.transcripts, [p, m] = T(""), [h, y] = T(""), [b, S] = T("recent"), [E, k] = T("all"), [A, j] = T(() => /* @__PURE__ */ new Set()), [M, N] = T("grid"), [P, I] = T(() => ye(u.transcripts.page)), [L, R] = T(null), [z, V] = T("browse"), H = w(!0), U = w(null);
343
343
  x(() => {
344
344
  if (H.current) {
345
345
  H.current = !1, y(p);
@@ -349,7 +349,7 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
349
349
  return () => clearTimeout(e);
350
350
  }, [H, p]), x(() => {
351
351
  let e = JSON.stringify([
352
- _,
352
+ h,
353
353
  b,
354
354
  E,
355
355
  [...A].sort()
@@ -360,13 +360,13 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
360
360
  }
361
361
  U.current = e, I(1);
362
362
  }, [
363
- _,
363
+ h,
364
364
  b,
365
365
  E,
366
366
  A
367
367
  ]), x(() => {
368
368
  n?.({
369
- query: _,
369
+ query: h,
370
370
  provider: E,
371
371
  topics: [...A],
372
372
  order: b,
@@ -377,7 +377,7 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
377
377
  n,
378
378
  P,
379
379
  E,
380
- _,
380
+ h,
381
381
  A
382
382
  ]);
383
383
  let W = f.find((e) => e.id === L) ?? f[0] ?? null, G = W?.owner ?? null, K = G ? f.filter((e) => e.owner.githubUsername === G.githubUsername) : [], re = C(() => {
@@ -395,13 +395,13 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
395
395
  L && !f.some((e) => e.id === L) && (R(null), V("browse"));
396
396
  }, [L, f]);
397
397
  let q = C(() => {
398
- let e = me(_);
399
- return e ? d.collectives.filter((t) => [
398
+ let e = me(h);
399
+ return e ? u.collectives.filter((t) => [
400
400
  t.name,
401
401
  t.description,
402
402
  t.linkedGithubOrg
403
403
  ].filter(Boolean).join(" ").toLowerCase().includes(e)) : null;
404
- }, [d.collectives, _]), J = f, ie = A.size, Y = d.transcripts.total ?? f.length, X = P, Z = d.transcripts.limit || f.length || 1, oe = (e) => {
404
+ }, [u.collectives, h]), J = f, ie = A.size, Y = u.transcripts.total ?? f.length, X = P, Z = u.transcripts.limit || f.length || 1, oe = (e) => {
405
405
  if (r) {
406
406
  r(e);
407
407
  return;
@@ -480,7 +480,7 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
480
480
  children: [/* @__PURE__ */ D("h2", {
481
481
  className: "win-title cex-vtitle",
482
482
  children: he(W.title || "untitled transcript")
483
- }), /* @__PURE__ */ D(g, { visibility: W.visibility })]
483
+ }), /* @__PURE__ */ D(_, { visibility: W.visibility })]
484
484
  }),
485
485
  /* @__PURE__ */ O("p", {
486
486
  className: "cex-vdesc",
@@ -770,13 +770,13 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
770
770
  ]
771
771
  }), /* @__PURE__ */ O("div", {
772
772
  className: "cex-explore-body",
773
- children: [/* @__PURE__ */ D(h, {
773
+ children: [/* @__PURE__ */ D(g, {
774
774
  order: b,
775
775
  onOrder: (e) => S(e),
776
776
  providers: re,
777
777
  activeProviders: E === "all" ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([E]),
778
778
  onProvider: (e) => k((t) => t === e ? "all" : e),
779
- topics: d.popularTags.map((e) => ({
779
+ topics: u.popularTags.map((e) => ({
780
780
  tag: e.name,
781
781
  count: e.usageCount
782
782
  })),
@@ -859,7 +859,7 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
859
859
  ]
860
860
  })]
861
861
  }),
862
- J.length === 0 ? _.trim() || E !== "all" || ie ? /* @__PURE__ */ O("div", {
862
+ J.length === 0 ? h.trim() || E !== "all" || ie ? /* @__PURE__ */ O("div", {
863
863
  className: "empty cex-empty",
864
864
  children: [
865
865
  /* @__PURE__ */ D("div", {
@@ -906,7 +906,7 @@ function Ce({ data: e, className: t = "", onFiltersChange: n, onOpenTranscript:
906
906
  onOpen: oe
907
907
  }, e.id))
908
908
  }),
909
- Y > Z && /* @__PURE__ */ D(u, {
909
+ Y > Z && /* @__PURE__ */ D(d, {
910
910
  page: X,
911
911
  totalItems: Y,
912
912
  pageSize: Z,
@@ -1370,7 +1370,7 @@ function Fe({ mode: e }) {
1370
1370
  });
1371
1371
  }
1372
1372
  function Ie({ data: e = {}, actions: t = {} } = {}) {
1373
- let { collectives: n = Pe, linkedOrgs: r = Ne, title: i = "collectives", deck: o = "groups that govern shared data together.", crumb: s = "collectives", createLabel: c = "new collective", createBusy: l = !1 } = e, { onCreateCollective: u, onOpenCollective: d } = t, [f, p] = T(!1), [m, h] = T(""), [g, _] = T(""), [v, y] = T("open"), [b, x] = T("members_only"), [C, w] = T(""), k = S();
1373
+ let { collectives: n = Pe, linkedOrgs: r = Ne, title: a = "collectives", deck: o = "groups that govern shared data together.", crumb: s = "collectives", createLabel: c = "new collective", createBusy: l = !1 } = e, { onCreateCollective: u, onOpenCollective: d } = t, [f, p] = T(!1), [m, h] = T(""), [g, _] = T(""), [v, y] = T("open"), [b, x] = T("members_only"), [C, w] = T(""), k = S();
1374
1374
  return /* @__PURE__ */ D("div", {
1375
1375
  className: "cmg-root",
1376
1376
  children: /* @__PURE__ */ O("div", {
@@ -1395,7 +1395,7 @@ function Ie({ data: e = {}, actions: t = {} } = {}) {
1395
1395
  className: "cmg-head",
1396
1396
  children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h2", {
1397
1397
  className: "cmg-title",
1398
- children: i
1398
+ children: a
1399
1399
  }), /* @__PURE__ */ D("p", {
1400
1400
  className: "cmg-deck",
1401
1401
  children: o
@@ -1450,7 +1450,7 @@ function Ie({ data: e = {}, actions: t = {} } = {}) {
1450
1450
  }),
1451
1451
  /* @__PURE__ */ D("div", {
1452
1452
  className: "cmg-field",
1453
- children: /* @__PURE__ */ D(a, {
1453
+ children: /* @__PURE__ */ D(i, {
1454
1454
  variant: "select",
1455
1455
  label: "acceptance mode",
1456
1456
  name: "acceptance-mode",
@@ -1461,7 +1461,7 @@ function Ie({ data: e = {}, actions: t = {} } = {}) {
1461
1461
  }),
1462
1462
  /* @__PURE__ */ D("div", {
1463
1463
  className: "cmg-field",
1464
- children: /* @__PURE__ */ D(a, {
1464
+ children: /* @__PURE__ */ D(i, {
1465
1465
  variant: "select",
1466
1466
  label: "data access policy",
1467
1467
  name: "data-access",
@@ -1845,12 +1845,12 @@ function He({ item: e }) {
1845
1845
  ]
1846
1846
  });
1847
1847
  }
1848
- function Ue({ data: t = {}, actions: n = {} } = {}) {
1849
- let { collective: i = {
1848
+ function Ue({ data: e = {}, actions: t = {} } = {}) {
1849
+ let { collective: n = {
1850
1850
  name: "AI Research Team",
1851
1851
  description: "Sharing transcripts related to AI research",
1852
1852
  linkedGithubOrg: "@anthropic-labs"
1853
- }, providerShare: a = Re, pendingReview: o = ze, members: s = Be, redactions: c = Ve, browseRows: u = [
1853
+ }, providerShare: i = Re, pendingReview: a = ze, members: o = Be, redactions: s = Ve, browseRows: c = [
1854
1854
  {
1855
1855
  title: "Building a REST API from scratch",
1856
1856
  contributor: "@alice-dev",
@@ -1878,14 +1878,14 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
1878
1878
  tokens: "121K",
1879
1879
  date: "Jun 12"
1880
1880
  }
1881
- ], roleOptions: d = Le, initialRole: p = "owner", initialShowRedaction: h = !0, initialBrowseGated: g = !1, targetCollective: _ = Ke, stats: v = {
1881
+ ], roleOptions: d = Le, initialRole: p = "owner", initialShowRedaction: m = !0, initialBrowseGated: g = !1, targetCollective: _ = Ke, stats: v = {
1882
1882
  transcripts: "248",
1883
1883
  projects: "31 projects",
1884
1884
  tokens: "4.2M",
1885
1885
  turns: "18.4K turns",
1886
1886
  contributors: "12",
1887
1887
  hours: "63h total"
1888
- } } = t, { onRoleChange: b, onJoin: x, onLeave: S, onSettings: C, onToggleBrowse: w, onContribute: k } = n, [A, j] = T(p), [F, I] = T(h), [L, z] = T(g), B = A === "owner", H = A === "guest", U = (e) => {
1888
+ } } = e, { onRoleChange: b, onJoin: x, onLeave: S, onSettings: C, onToggleBrowse: w, onContribute: k } = t, [A, j] = T(p), [F, I] = T(m), [L, z] = T(g), B = A === "owner", H = A === "guest", U = (e) => {
1889
1889
  j(e), b?.(e);
1890
1890
  };
1891
1891
  return /* @__PURE__ */ D("div", {
@@ -1911,7 +1911,7 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
1911
1911
  " ",
1912
1912
  /* @__PURE__ */ D("span", {
1913
1913
  className: "cur",
1914
- children: i.name
1914
+ children: n.name
1915
1915
  })
1916
1916
  ]
1917
1917
  }), /* @__PURE__ */ O("div", {
@@ -1919,11 +1919,11 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
1919
1919
  children: [/* @__PURE__ */ O("div", { children: [
1920
1920
  /* @__PURE__ */ D("h2", {
1921
1921
  className: "cmg-title",
1922
- children: i.name
1922
+ children: n.name
1923
1923
  }),
1924
1924
  /* @__PURE__ */ D("p", {
1925
1925
  className: "cmg-deck",
1926
- children: i.description
1926
+ children: n.description
1927
1927
  }),
1928
1928
  /* @__PURE__ */ O("span", {
1929
1929
  className: "cmg-orgpill mono",
@@ -1933,7 +1933,7 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
1933
1933
  "aria-hidden": "true"
1934
1934
  }),
1935
1935
  " ",
1936
- i.linkedGithubOrg || "not linked"
1936
+ n.linkedGithubOrg || "not linked"
1937
1937
  ]
1938
1938
  })
1939
1939
  ] }), /* @__PURE__ */ O("div", {
@@ -1994,17 +1994,17 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
1994
1994
  /* @__PURE__ */ O("div", {
1995
1995
  className: "cmg-tiles",
1996
1996
  children: [
1997
- /* @__PURE__ */ D(m, {
1997
+ /* @__PURE__ */ D(h, {
1998
1998
  label: "contributions",
1999
- value: i.acceptanceMode || "open",
1999
+ value: n.acceptanceMode || "open",
2000
2000
  tone: "teal"
2001
2001
  }),
2002
- /* @__PURE__ */ D(m, {
2002
+ /* @__PURE__ */ D(h, {
2003
2003
  label: "access",
2004
- value: i.dataAccess || "members only",
2004
+ value: n.dataAccess || "members only",
2005
2005
  tone: "amber"
2006
2006
  }),
2007
- /* @__PURE__ */ D(m, {
2007
+ /* @__PURE__ */ D(h, {
2008
2008
  label: "your role",
2009
2009
  value: A
2010
2010
  })
@@ -2042,10 +2042,10 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
2042
2042
  id: "cmg-share-h",
2043
2043
  className: "cmg-sub",
2044
2044
  children: "provider share"
2045
- }), /* @__PURE__ */ D(f, {
2045
+ }), /* @__PURE__ */ D(u, {
2046
2046
  label: "provider share",
2047
2047
  total: 100,
2048
- data: a.map((e) => ({
2048
+ data: i.map((e) => ({
2049
2049
  label: Te(e.id),
2050
2050
  value: e.pct
2051
2051
  }))
@@ -2059,7 +2059,7 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
2059
2059
  children: /* @__PURE__ */ D(r, {
2060
2060
  title: "pending review",
2061
2061
  emptyLabel: "no shares awaiting review.",
2062
- items: o.map((e) => ({
2062
+ items: a.map((e) => ({
2063
2063
  id: e.id,
2064
2064
  kind: "share",
2065
2065
  who: e.title,
@@ -2097,7 +2097,7 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
2097
2097
  }), /* @__PURE__ */ D("div", { children: "safe by default: every detected item stays redacted unless you opt out per item. there is no bulk accept." })]
2098
2098
  }), /* @__PURE__ */ D("div", {
2099
2099
  className: "cmg-redact-list",
2100
- children: c.map((e) => /* @__PURE__ */ D(He, { item: e }, e.id))
2100
+ children: s.map((e) => /* @__PURE__ */ D(He, { item: e }, e.id))
2101
2101
  })] })]
2102
2102
  }),
2103
2103
  /* @__PURE__ */ O("section", {
@@ -2174,7 +2174,7 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
2174
2174
  scope: "col",
2175
2175
  children: "date"
2176
2176
  })
2177
- ] }) }), /* @__PURE__ */ D("tbody", { children: u.map((e) => /* @__PURE__ */ O("tr", { children: [
2177
+ ] }) }), /* @__PURE__ */ D("tbody", { children: c.map((e) => /* @__PURE__ */ O("tr", { children: [
2178
2178
  /* @__PURE__ */ D("td", { children: e.title }),
2179
2179
  /* @__PURE__ */ D("td", {
2180
2180
  className: "mono",
@@ -2225,10 +2225,10 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
2225
2225
  overflow: "auto",
2226
2226
  maxWidth: "100%"
2227
2227
  },
2228
- children: /* @__PURE__ */ D(e, {
2228
+ children: /* @__PURE__ */ D(f, {
2229
2229
  title: "members",
2230
2230
  roles: ["member", "contributor"],
2231
- members: s.map((e) => ({
2231
+ members: o.map((e) => ({
2232
2232
  handle: e.handle,
2233
2233
  name: e.name,
2234
2234
  role: e.role,
@@ -2253,7 +2253,7 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
2253
2253
  children: [/* @__PURE__ */ D(P, {
2254
2254
  size: 16,
2255
2255
  "aria-hidden": "true"
2256
- }), /* @__PURE__ */ D("div", { children: i.linkedGithubOrg ? `linked to ${i.linkedGithubOrg}.` : "the github connection isn't set up. an admin must register the github app to overlay commit timelines." })]
2256
+ }), /* @__PURE__ */ D("div", { children: n.linkedGithubOrg ? `linked to ${n.linkedGithubOrg}.` : "the github connection isn't set up. an admin must register the github app to overlay commit timelines." })]
2257
2257
  })]
2258
2258
  })
2259
2259
  ]
@@ -2264,7 +2264,7 @@ function Ue({ data: t = {}, actions: n = {} } = {}) {
2264
2264
  });
2265
2265
  }
2266
2266
  function We() {
2267
- let [r, a] = T("AI Research Team"), [s, l] = T("Sharing transcripts related to AI research"), [u, f] = T("curated"), [m, h] = T("members_only"), [g, v] = T(!0), [y, b] = T("user_choice"), [x, S] = T(!1);
2267
+ let [n, r] = T("AI Research Team"), [i, l] = T("Sharing transcripts related to AI research"), [u, d] = T("curated"), [h, g] = T("members_only"), [_, v] = T(!0), [y, b] = T("user_choice"), [x, S] = T(!1);
2268
2268
  return /* @__PURE__ */ D("div", {
2269
2269
  className: "cmg-root cmg-settings",
2270
2270
  children: /* @__PURE__ */ O("div", {
@@ -2299,7 +2299,7 @@ function We() {
2299
2299
  }), /* @__PURE__ */ D("p", {
2300
2300
  className: "cmg-deck",
2301
2301
  children: "edit how this collective accepts contributions and shares data."
2302
- })] }), /* @__PURE__ */ D(d, { children: "settings" })]
2302
+ })] }), /* @__PURE__ */ D(t, { children: "settings" })]
2303
2303
  })
2304
2304
  }),
2305
2305
  /* @__PURE__ */ O("div", {
@@ -2323,25 +2323,25 @@ function We() {
2323
2323
  }), /* @__PURE__ */ O("div", {
2324
2324
  className: "cmg-settings-stack",
2325
2325
  children: [
2326
- /* @__PURE__ */ D(c, {
2326
+ /* @__PURE__ */ D(s, {
2327
2327
  label: "Name",
2328
2328
  id: "cmg-name",
2329
- value: r,
2330
- onChange: (e) => a(e.target.value),
2329
+ value: n,
2330
+ onChange: (e) => r(e.target.value),
2331
2331
  required: !0
2332
2332
  }),
2333
- /* @__PURE__ */ D(t, {
2333
+ /* @__PURE__ */ D(c, {
2334
2334
  label: "Description",
2335
2335
  id: "cmg-description",
2336
- value: s,
2336
+ value: i,
2337
2337
  onChange: (e) => l(e.target.value),
2338
2338
  rows: 2
2339
2339
  }),
2340
- /* @__PURE__ */ D(_, {
2340
+ /* @__PURE__ */ D(o, {
2341
2341
  label: "Acceptance mode",
2342
2342
  id: "cmg-acceptance",
2343
2343
  value: u,
2344
- onChange: (e) => f(e.target.value),
2344
+ onChange: (e) => d(e.target.value),
2345
2345
  options: [
2346
2346
  {
2347
2347
  value: "open",
@@ -2357,11 +2357,11 @@ function We() {
2357
2357
  }
2358
2358
  ]
2359
2359
  }),
2360
- /* @__PURE__ */ D(_, {
2360
+ /* @__PURE__ */ D(o, {
2361
2361
  label: "Data access",
2362
2362
  id: "cmg-access",
2363
- value: m,
2364
- onChange: (e) => h(e.target.value),
2363
+ value: h,
2364
+ onChange: (e) => g(e.target.value),
2365
2365
  options: [
2366
2366
  {
2367
2367
  value: "members_only",
@@ -2391,15 +2391,15 @@ function We() {
2391
2391
  }),
2392
2392
  /* @__PURE__ */ D("div", {
2393
2393
  className: "sw-toggle-row",
2394
- children: /* @__PURE__ */ D(i, {
2394
+ children: /* @__PURE__ */ D(a, {
2395
2395
  id: "cmg-display-members",
2396
- checked: g,
2396
+ checked: _,
2397
2397
  onChange: (e) => v(e)
2398
2398
  })
2399
2399
  })
2400
2400
  ]
2401
2401
  }),
2402
- /* @__PURE__ */ D(n, {
2402
+ /* @__PURE__ */ D(m, {
2403
2403
  name: "cmg-deletion-policy",
2404
2404
  ariaLabel: "Transcript retention on leave",
2405
2405
  value: y,
@@ -2436,19 +2436,19 @@ function We() {
2436
2436
  type: "submit",
2437
2437
  className: "btn btn-sm btn-primary",
2438
2438
  children: "save changes"
2439
- }), /* @__PURE__ */ D(o, {
2439
+ }), /* @__PURE__ */ D(p, {
2440
2440
  label: "reset form",
2441
2441
  onConfirm: () => S(!1)
2442
2442
  })]
2443
2443
  })
2444
2444
  ]
2445
2445
  })]
2446
- }), /* @__PURE__ */ O(p, {
2446
+ }), /* @__PURE__ */ O(e, {
2447
2447
  title: "danger zone",
2448
2448
  children: [/* @__PURE__ */ D("p", {
2449
2449
  className: "mono",
2450
2450
  children: "deleting this collective removes the governance settings and member roster."
2451
- }), /* @__PURE__ */ D(o, {
2451
+ }), /* @__PURE__ */ D(p, {
2452
2452
  label: "delete collective",
2453
2453
  confirmLabel: "delete",
2454
2454
  onConfirm: () => S(!1)
@@ -2462,7 +2462,7 @@ function We() {
2462
2462
  overflow: "auto",
2463
2463
  maxWidth: "100%"
2464
2464
  },
2465
- children: /* @__PURE__ */ D(e, {
2465
+ children: /* @__PURE__ */ D(f, {
2466
2466
  title: "members",
2467
2467
  roles: ["member", "contributor"],
2468
2468
  members: [
@@ -2550,7 +2550,7 @@ var Ge = [
2550
2550
  members: 12
2551
2551
  };
2552
2552
  function qe() {
2553
- let [e, t] = T(() => /* @__PURE__ */ new Set(["v1"])), [n, r] = T(() => new Set(Ge.map((e) => e.id))), [i, a] = T(!1), o = C(() => {
2553
+ let [e, t] = T(() => /* @__PURE__ */ new Set(["v1"])), [r, i] = T(() => new Set(Ge.map((e) => e.id))), [a, o] = T(!1), s = C(() => {
2554
2554
  let e = {};
2555
2555
  return Ge.forEach((t) => t.transcripts.forEach((n) => e[n.id] = {
2556
2556
  ...n,
@@ -2575,12 +2575,12 @@ function qe() {
2575
2575
  });
2576
2576
  }
2577
2577
  function d(e) {
2578
- r((t) => {
2578
+ i((t) => {
2579
2579
  let n = new Set(t);
2580
2580
  return n.has(e) ? n.delete(e) : n.add(e), n;
2581
2581
  });
2582
2582
  }
2583
- let f = [...e].map((e) => o[e]).filter(Boolean), p = f.filter((e) => e.visibility === "private").length;
2583
+ let f = [...e].map((e) => s[e]).filter(Boolean), p = f.filter((e) => e.visibility === "private").length;
2584
2584
  return /* @__PURE__ */ O("div", {
2585
2585
  className: "cmg-root",
2586
2586
  children: [/* @__PURE__ */ O("div", {
@@ -2620,7 +2620,7 @@ function qe() {
2620
2620
  className: "card cmg-contribute",
2621
2621
  "aria-label": "your transcripts by project",
2622
2622
  children: Ge.map((t) => {
2623
- let r = l(t), i = n.has(t.id);
2623
+ let n = l(t), i = r.has(t.id);
2624
2624
  return /* @__PURE__ */ O("div", {
2625
2625
  className: "cmg-proj",
2626
2626
  children: [/* @__PURE__ */ O("div", {
@@ -2630,8 +2630,8 @@ function qe() {
2630
2630
  children: /* @__PURE__ */ D("input", {
2631
2631
  type: "checkbox",
2632
2632
  className: "check-box",
2633
- checked: r === "all",
2634
- ref: (e) => e && (e.indeterminate = r === "some"),
2633
+ checked: n === "all",
2634
+ ref: (e) => e && (e.indeterminate = n === "some"),
2635
2635
  onChange: () => u(t),
2636
2636
  "aria-label": `select all in ${t.name}`
2637
2637
  })
@@ -2735,7 +2735,7 @@ function qe() {
2735
2735
  type: "button",
2736
2736
  className: "btn btn-sm btn-primary",
2737
2737
  disabled: e.size === 0,
2738
- onClick: () => a(!0),
2738
+ onClick: () => o(!0),
2739
2739
  children: [
2740
2740
  /* @__PURE__ */ D(ie, {
2741
2741
  size: 14,
@@ -2749,8 +2749,8 @@ function qe() {
2749
2749
  })]
2750
2750
  })
2751
2751
  ]
2752
- }), /* @__PURE__ */ D(s, {
2753
- open: i,
2752
+ }), /* @__PURE__ */ D(n, {
2753
+ open: a,
2754
2754
  title: /* @__PURE__ */ O(E, { children: [
2755
2755
  "make ",
2756
2756
  p > 1 ? "these" : "this",
@@ -2789,8 +2789,8 @@ function qe() {
2789
2789
  requireConsent: p > 0,
2790
2790
  confirmLabel: p > 0 ? "contribute & make visible" : "contribute",
2791
2791
  confirmIcon: A,
2792
- onCancel: () => a(!1),
2793
- onConfirm: () => a(!1),
2792
+ onCancel: () => o(!1),
2793
+ onConfirm: () => o(!1),
2794
2794
  children: /* @__PURE__ */ O("ul", {
2795
2795
  className: "cmg-confirm-list",
2796
2796
  children: [f.slice(0, 5).map((e) => /* @__PURE__ */ O("li", {
@@ -2858,8 +2858,8 @@ function Qe(e) {
2858
2858
  day: "numeric"
2859
2859
  }).format(t);
2860
2860
  }
2861
- function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
2862
- let { collective: a = Je, providerShare: o = [], pendingReview: s = [], members: c = [], redactions: u = [], browseRows: p = [], roleOptions: h = [], initialRole: g = "", initialShowRedaction: _ = !1, initialBrowseGated: v = !1, stats: y = Ye } = t || Xe, { onRoleChange: b, onJoin: x, onLeave: S, onSettings: w, onContribute: E, onToggleBrowse: k } = n || {}, [A, j] = T(g || a.role || ""), [M, P] = T(!!_), [F, I] = T(!!v), L = A || a.role || "guest", B = L === "owner", H = L === "guest", U = i && h.length > 0, ee = C(() => U ? h : [], [U, h]), te = (e) => {
2861
+ function $e({ data: e = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
2862
+ let { collective: a = Je, providerShare: o = [], pendingReview: s = [], members: c = [], redactions: d = [], browseRows: p = [], roleOptions: m = [], initialRole: g = "", initialShowRedaction: _ = !1, initialBrowseGated: v = !1, stats: y = Ye } = e || Xe, { onRoleChange: b, onJoin: x, onLeave: S, onSettings: w, onContribute: E, onToggleBrowse: k } = n || {}, [A, j] = T(g || a.role || ""), [M, P] = T(!!_), [F, I] = T(!!v), L = A || a.role || "guest", B = L === "owner", H = L === "guest", U = i && m.length > 0, ee = C(() => U ? m : [], [U, m]), te = (e) => {
2863
2863
  j(e), b?.(e);
2864
2864
  };
2865
2865
  return /* @__PURE__ */ D("div", {
@@ -2979,17 +2979,17 @@ function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
2979
2979
  /* @__PURE__ */ O("div", {
2980
2980
  className: "cmg-tiles",
2981
2981
  children: [
2982
- /* @__PURE__ */ D(m, {
2982
+ /* @__PURE__ */ D(h, {
2983
2983
  label: "contributions",
2984
2984
  value: a.acceptanceMode || "open",
2985
2985
  tone: "teal"
2986
2986
  }),
2987
- /* @__PURE__ */ D(m, {
2987
+ /* @__PURE__ */ D(h, {
2988
2988
  label: "access",
2989
2989
  value: a.dataAccess || "members only",
2990
2990
  tone: "amber"
2991
2991
  }),
2992
- /* @__PURE__ */ D(m, {
2992
+ /* @__PURE__ */ D(h, {
2993
2993
  label: "your role",
2994
2994
  value: L
2995
2995
  })
@@ -3027,7 +3027,7 @@ function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
3027
3027
  id: "cmg-share-h",
3028
3028
  className: "cmg-sub",
3029
3029
  children: "provider share"
3030
- }), /* @__PURE__ */ D(f, {
3030
+ }), /* @__PURE__ */ D(u, {
3031
3031
  label: "provider share",
3032
3032
  total: 100,
3033
3033
  data: o.map((e) => ({
@@ -3052,7 +3052,7 @@ function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
3052
3052
  }))
3053
3053
  })
3054
3054
  }) : null,
3055
- u.length > 0 ? /* @__PURE__ */ O("section", {
3055
+ d.length > 0 ? /* @__PURE__ */ O("section", {
3056
3056
  className: "card cmg-redact-sec",
3057
3057
  "aria-labelledby": "cmg-redact-h",
3058
3058
  children: [/* @__PURE__ */ O("div", {
@@ -3076,14 +3076,14 @@ function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
3076
3076
  })]
3077
3077
  }), M ? /* @__PURE__ */ D("div", {
3078
3078
  className: "cmg-redact-list",
3079
- children: u.map((e) => /* @__PURE__ */ O("article", {
3079
+ children: d.map((e) => /* @__PURE__ */ O("article", {
3080
3080
  className: "cmg-redact",
3081
3081
  children: [
3082
3082
  /* @__PURE__ */ O("div", {
3083
3083
  className: "cmg-redact-head",
3084
3084
  children: [/* @__PURE__ */ D("span", {
3085
3085
  className: "cmg-redact-badges",
3086
- children: /* @__PURE__ */ D(d, { children: String(e.catLabel || e.cat || "item").toLowerCase() })
3086
+ children: /* @__PURE__ */ D(t, { children: String(e.catLabel || e.cat || "item").toLowerCase() })
3087
3087
  }), /* @__PURE__ */ D("span", {
3088
3088
  className: "cmg-redact-file mono",
3089
3089
  children: e.file || "unknown"
@@ -3230,7 +3230,7 @@ function $e({ data: t = Xe, actions: n = {}, demoRoleSwitcher: i = !1 } = {}) {
3230
3230
  overflow: "auto",
3231
3231
  maxWidth: "100%"
3232
3232
  },
3233
- children: /* @__PURE__ */ D(e, {
3233
+ children: /* @__PURE__ */ D(f, {
3234
3234
  title: "members",
3235
3235
  roles: ["member", "contributor"],
3236
3236
  members: c.map((e) => ({