efficient-shell 13.12.0 → 13.14.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.
Files changed (101) hide show
  1. package/README.md +10 -0
  2. package/dist/{Browser-TPLE4RMX.js → Browser-FJSOZLWR.js} +16 -16
  3. package/dist/{Calculator-3PVLP3UK.js → Calculator-ZHINQHFI.js} +22 -22
  4. package/dist/{CurrencyConverter-JLRIAP2Z.js → CurrencyConverter-AAXS7RPC.js} +10 -10
  5. package/dist/{Files-4UFXW2K7.js → Files-XLDCJ7DO.js} +76 -76
  6. package/dist/{Notepad-MASOWEW7.js → Notepad-NENKOSXJ.js} +9 -9
  7. package/dist/{PomodoroTimer-I575OSRR.js → PomodoroTimer-XKSYNHS7.js} +45 -45
  8. package/dist/{Preview-TX6BB4UW.js → Preview-24XTJDIR.js} +35 -35
  9. package/dist/{Stock-EPJQJ3XE.js → Stock-TCQSVSSY.js} +7 -7
  10. package/dist/{Weather-RPCD2UW3.js → Weather-IWM5XTE5.js} +23 -23
  11. package/dist/{WorldClock-AC3EUSVG.js → WorldClock-35TNXAJM.js} +6 -6
  12. package/dist/ai/index.d.ts +25 -1
  13. package/dist/ai/index.js +64 -64
  14. package/dist/apps/index.js +1 -1
  15. package/dist/bin/browser-check.js +1 -1
  16. package/dist/bin/media-host-check.js +1 -1
  17. package/dist/bin/ui-check.js +1 -1
  18. package/dist/{chunk-U7WDBCVV.js → chunk-36UB4MJX.js} +1 -1
  19. package/dist/{chunk-3PLQKRD4.js → chunk-64PPKUJG.js} +14 -14
  20. package/dist/{chunk-EMRTVPQ5.js → chunk-6CDWPEND.js} +7 -7
  21. package/dist/{chunk-L3BECLHD.js → chunk-6LS6Q77E.js} +1 -1
  22. package/dist/{chunk-XRTH47EO.js → chunk-775K6APE.js} +66 -66
  23. package/dist/chunk-A7ZYFJ6V.js +28 -0
  24. package/dist/{chunk-PKXHAF43.js → chunk-ALHYNNE2.js} +6 -6
  25. package/dist/{chunk-NEHVW324.js → chunk-AWWNMSDN.js} +8 -8
  26. package/dist/{chunk-B53VREFW.js → chunk-DVHRL3G6.js} +5 -5
  27. package/dist/chunk-EV5BEEVO.js +1 -0
  28. package/dist/chunk-F6UJLCMI.js +19 -0
  29. package/dist/chunk-FHNQC2MA.js +1 -0
  30. package/dist/{chunk-SR6DDTUN.js → chunk-FUP2J2OX.js} +1 -1
  31. package/dist/{chunk-AHMYBYXJ.js → chunk-G4PPHQ23.js} +1 -1
  32. package/dist/{chunk-EHNQGKW4.js → chunk-GTT7LIWK.js} +1 -1
  33. package/dist/{chunk-GITRDCHS.js → chunk-GURY4WS5.js} +1 -1
  34. package/dist/{chunk-LURBH6G4.js → chunk-HTANBHNV.js} +1 -1
  35. package/dist/{chunk-2QE6QD4Y.js → chunk-HVHIXX6O.js} +8 -8
  36. package/dist/{chunk-NJD7HVTP.js → chunk-IQDHVQAQ.js} +10 -10
  37. package/dist/{chunk-QQGNTDMO.js → chunk-KBQNMQCK.js} +1 -1
  38. package/dist/chunk-KY3KGRGC.js +1 -0
  39. package/dist/chunk-LHHJHTWP.js +1 -0
  40. package/dist/{chunk-AI4A7GYI.js → chunk-NISLELJF.js} +1 -1
  41. package/dist/{chunk-IG7JPSBG.js → chunk-OYXA7SWV.js} +1 -1
  42. package/dist/{chunk-JDSOHBO7.js → chunk-QNQLKGBC.js} +1 -1
  43. package/dist/{chunk-WX5MRNAY.js → chunk-RT77WNRB.js} +1 -1
  44. package/dist/{chunk-JHGBFZHL.js → chunk-S6YEPA4I.js} +5 -5
  45. package/dist/{chunk-UKBXQXDZ.js → chunk-U6DRRCCG.js} +1 -1
  46. package/dist/chunk-UVCMV2TL.js +1 -0
  47. package/dist/{chunk-HK53EKZH.js → chunk-WLG7BE55.js} +1 -1
  48. package/dist/{chunk-WBXPA7TY.js → chunk-WP43XYL6.js} +1 -1
  49. package/dist/{chunk-JMGDGNM7.js → chunk-WU2ZA6J2.js} +1 -1
  50. package/dist/{chunk-AQUHVWWO.js → chunk-YBYJUBWE.js} +2 -2
  51. package/dist/chunk-YDQBELHJ.js +6 -0
  52. package/dist/{chunk-TNNH6F3V.js → chunk-YUDBB7VC.js} +7 -7
  53. package/dist/{chunk-6LYKIC7W.js → chunk-ZDYIVU5R.js} +7 -7
  54. package/dist/data/EntityList.js +1 -1
  55. package/dist/data/ResizableTable.js +1 -1
  56. package/dist/data/statusColumn.d.ts +30 -0
  57. package/dist/data/statusColumn.js +1 -0
  58. package/dist/data/useColumnConfig.js +1 -1
  59. package/dist/forms/BrandAssetEditor.js +1 -1
  60. package/dist/forms/ComposerAttachments.js +1 -1
  61. package/dist/forms/FilePicker.js +1 -1
  62. package/dist/forms/MediaLibrary.js +1 -1
  63. package/dist/forms/MediaUploadField.js +1 -1
  64. package/dist/forms/MediaUploadGrid.js +1 -1
  65. package/dist/forms/MediaUsedInList.js +1 -1
  66. package/dist/forms/TagInput.js +1 -1
  67. package/dist/forms/WidthsBar.js +1 -1
  68. package/dist/icons/brands.node.js +1 -1
  69. package/dist/icons/efficient-glyphs.js +1 -1
  70. package/dist/icons/efficient-looks.js +1 -1
  71. package/dist/icons/efficient.js +1 -1
  72. package/dist/icons/looks/map.js +1 -1
  73. package/dist/icons/payment.js +1 -1
  74. package/dist/icons/sets.js +1 -1
  75. package/dist/index.d.ts +2 -1
  76. package/dist/index.js +103 -103
  77. package/dist/shell/ColoredBadge.js +1 -1
  78. package/dist/shell/EditableGrid.js +1 -1
  79. package/dist/shell/ImageLightbox.js +1 -1
  80. package/dist/shell/SidebarLayout.js +1 -1
  81. package/dist/shell/StatusBadge.d.ts +7 -1
  82. package/dist/shell/StatusBadge.js +1 -1
  83. package/dist/shell/TransferProgress.js +1 -1
  84. package/dist/shell/Tree.js +1 -1
  85. package/dist/telemetry/index.js +1 -1
  86. package/dist/templates/ChatTemplate.js +1 -1
  87. package/dist/templates/DashboardTemplate.js +1 -1
  88. package/dist/templates/DataTablePage.js +1 -1
  89. package/dist/templates/EmailTemplate.js +1 -1
  90. package/dist/templates/GalleryTemplate.js +1 -1
  91. package/dist/ui/index.d.ts +2 -1
  92. package/dist/ui/index.js +1 -1
  93. package/dist/version.js +1 -1
  94. package/package.json +1 -1
  95. package/dist/chunk-AEEK74UI.js +0 -6
  96. package/dist/chunk-EX34TQ3V.js +0 -28
  97. package/dist/chunk-EZQHUQOP.js +0 -1
  98. package/dist/chunk-GYPYOBG5.js +0 -19
  99. package/dist/chunk-S5AGWCMT.js +0 -1
  100. package/dist/chunk-VP64XZR6.js +0 -1
  101. /package/dist/{chunk-CLEMKDRO.js → chunk-VG6BT2UG.js} +0 -0
@@ -1,18 +1,18 @@
1
- import{MOVE_KEYS as e,MoveGrip as t,MoveHint as r,moveFromKey as a}from"./chunk-WF4A2HSB.js";import{ItemCount as n}from"./chunk-FTKLODQK.js";import{GROUP_COLORS as o}from"./chunk-JMGDGNM7.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{OneLineLabel as s}from"./chunk-G67CJAQ2.js";import{Tooltip as l}from"./chunk-SOZCWT6I.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{useShellStrings as d}from"./chunk-IUVGHHR3.js";import{useRef as u,useCallback as p,useId as m,isValidElement as f}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";var b='[role="treeitem"]';function v(e){return[...e.querySelectorAll(b)].filter(t=>{for(let r=t.parentElement?.closest('[role="group"]');r&&e.contains(r);r=r.parentElement?.closest('[role="group"]')??null)if(r.hasAttribute("hidden"))return!1;return!0})}function y({"aria-label":e,"aria-labelledby":t,children:r,className:a="",rootProps:n}){const o=u(null);c(()=>{const e=o.current;if(!e)return;const t=[...e.querySelectorAll(b)];if(0===t.length)return;const r=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-selected"))??v(e)[0]??t[0];for(const e of t)e.tabIndex=e===r?0:-1});const i=p(e=>{n?.onKeyDown?.(e);const t=o.current,r=e.target.closest?.(b);if(!t||!r||e.target!==r||e.defaultPrevented)return;if(e.altKey||e.ctrlKey||e.metaKey)return;const a=v(t),i=a.indexOf(r),s=Number(r.getAttribute("aria-level")??"1"),l=r=>{e.preventDefault(),function(e,t){if(t){for(const r of e.querySelectorAll(b))r.tabIndex=r===t?0:-1;t.focus()}}(t,r)};switch(e.key){case"ArrowDown":l(a[i+1]);break;case"ArrowUp":l(a[i-1]);break;case"Home":l(a[0]);break;case"End":l(a[a.length-1]);break;case"ArrowRight":if("true"===r.getAttribute("aria-expanded")){const t=a[i+1];t&&Number(t.getAttribute("aria-level")??"1")>s?l(t):e.preventDefault()}break;case"ArrowLeft":if("true"!==r.getAttribute("aria-expanded"))for(let e=i-1;e>=0;e--)if(Number(a[e].getAttribute("aria-level")??"1")<s){l(a[e]);break}}},[n]);/* @__PURE__ */
1
+ import{MOVE_KEYS as e,MoveGrip as t,MoveHint as r,moveFromKey as a}from"./chunk-WF4A2HSB.js";import{ItemCount as n}from"./chunk-FTKLODQK.js";import{GROUP_COLORS as o}from"./chunk-WU2ZA6J2.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{OneLineLabel as s}from"./chunk-G67CJAQ2.js";import{Tooltip as l}from"./chunk-SOZCWT6I.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{useShellStrings as d}from"./chunk-IUVGHHR3.js";import{useRef as u,useCallback as p,useId as m,isValidElement as f}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";var b='[role="treeitem"]';function v(e){return[...e.querySelectorAll(b)].filter(t=>{for(let r=t.parentElement?.closest('[role="group"]');r&&e.contains(r);r=r.parentElement?.closest('[role="group"]')??null)if(r.hasAttribute("hidden"))return!1;return!0})}function y({"aria-label":e,"aria-labelledby":t,children:r,className:a="",rootProps:n}){const o=u(null);c(()=>{const e=o.current;if(!e)return;const t=[...e.querySelectorAll(b)];if(0===t.length)return;const r=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-selected"))??v(e)[0]??t[0];for(const e of t)e.tabIndex=e===r?0:-1});const i=p(e=>{n?.onKeyDown?.(e);const t=o.current,r=e.target.closest?.(b);if(!t||!r||e.target!==r||e.defaultPrevented)return;if(e.altKey||e.ctrlKey||e.metaKey)return;const a=v(t),i=a.indexOf(r),s=Number(r.getAttribute("aria-level")??"1"),l=r=>{e.preventDefault(),function(e,t){if(t){for(const r of e.querySelectorAll(b))r.tabIndex=r===t?0:-1;t.focus()}}(t,r)};switch(e.key){case"ArrowDown":l(a[i+1]);break;case"ArrowUp":l(a[i-1]);break;case"Home":l(a[0]);break;case"End":l(a[a.length-1]);break;case"ArrowRight":if("true"===r.getAttribute("aria-expanded")){const t=a[i+1];t&&Number(t.getAttribute("aria-level")??"1")>s?l(t):e.preventDefault()}break;case"ArrowLeft":if("true"!==r.getAttribute("aria-expanded"))for(let e=i-1;e>=0;e--)if(Number(a[e].getAttribute("aria-level")??"1")<s){l(a[e]);break}}},[n]);/* @__PURE__ */
2
2
  return h("div",{...n,ref:o,role:"tree","aria-label":t?void 0:e,"aria-labelledby":t,onKeyDown:i,className:`flex flex-col gap-1 ${a}`.trim(),children:r})}function x({children:e,hidden:t,className:r=""}){/* @__PURE__ */
3
3
  return h("div",{role:"group",hidden:t,className:`ml-4 flex flex-col gap-1 border-l border-gray-200 pl-2 ${r}`.trim(),children:e})}var k=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full px-2","text-2xs font-medium normal-case tabular-nums tracking-normal"].join(" "),w=`${k} bg-[color:color-mix(in_srgb,var(--ink-faint)_12%,transparent)] text-gray-600`;function N(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&!f(e)&&"label"in e}function A(e){if(null==e||!1===e||"number"==typeof e)return null;const t=Array.isArray(e)&&e.length>0&&e.every(N)?e:N(e)?[e]:null;return t?t.map((e,t)=>/* @__PURE__ */h("span",{"data-tree-count":"","data-tone":e.tone,className:e.tone?`${k} ${o[e.tone]}`:w,children:e.label},t)):/* @__PURE__ */h("span",{"data-tree-count":"",className:w,children:e})}function j({children:e,count:t,countLabel:r,expanded:a,onToggle:o}){const i=void 0!==a,l=
4
4
  /* @__PURE__ */h("span",{"data-tree-label-text":"",className:"flex min-w-0 flex-1 text-left",children:/* @__PURE__ */h(s,{children:e})}),c="number"==typeof t?/* @__PURE__ */h(n,{count:t,label:r,showZero:!0}):null!=t&&!1!==t&&/* @__PURE__ */h("span",{"data-tree-count":"",className:w,children:t}),d="text-xs font-semibold uppercase tracking-wide text-ink-faint";return i?/* @__PURE__ */h("div",{role:"presentation",className:"pb-1 pt-3",children:/* @__PURE__ */g("button",{type:"button","aria-expanded":a,onClick:o,className:["flex w-full items-center gap-2 rounded-md px-2 hover:text-ink-strongest","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",d].join(" "),children:[
5
- /* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-caret":"",className:"flex h-4 w-4 shrink-0 items-center justify-center",children:D(!!a)}),l,c]})}):/* @__PURE__ */g("div",{role:"presentation",className:`flex items-center gap-2 px-2 pb-1 pt-3 ${d}`,children:[
6
- /* @__PURE__ */h("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),l,c]})}var D=e=>/* @__PURE__ */h(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3 transition-transform "+(e?"rotate-90":"")}),$={backgroundColor:"inherit",maskImage:"linear-gradient(to right, transparent, black 12px)",WebkitMaskImage:"linear-gradient(to right, transparent, black 12px)"};function P({label:o,level:i=1,icon:l,preview:c,selected:d=!1,tone:u,expanded:p,onToggle:f,onSelect:b,muted:v=!1,badge:y,count:x,countLabel:k,actions:w,actionsPinned:N=!1,actionsOverlay:j=!0,rename:P,drop:C,dragging:K=!1,draggable:I=!1,dragHint:H,onMove:S,rowProps:T,className:E=""}){const L=void 0!==p,O=m(),W=x??("number"==typeof y?y:void 0),G=[T?.["aria-describedby"],S?O:void 0].filter(Boolean).join(" ")||void 0,M="shared"===u?"text-[color:var(--status-success-soft-ink)]":null,R=d?M?`bg-[var(--status-success-soft)] ${M}`:"bg-accent-tint text-blue-700":"into"===C?`bg-accent-tint ${M??"text-ink-strongest"}`:`${M??"text-ink"} hover:bg-gray-100`;/* @__PURE__ */
7
- return g("div",{...T,role:"treeitem","aria-level":i,"aria-selected":d,"aria-expanded":L?p:void 0,"data-tone":u,tabIndex:d?0:-1,"aria-keyshortcuts":T?.["aria-keyshortcuts"]??(S?e:void 0),"aria-describedby":G,"data-drop":C,"data-draggable":I||void 0,onKeyDown:e=>{if(T?.onKeyDown?.(e),e.target!==e.currentTarget||e.defaultPrevented)return;const t=a(e);t&&S?(e.preventDefault(),S(t)):"Enter"!==e.key&&" "!==e.key||!b?("ArrowRight"===e.key&&L&&!p&&f||"ArrowLeft"===e.key&&L&&p&&f)&&(e.preventDefault(),f()):(e.preventDefault(),b())},onClick:e=>{T?.onClick?.(e),e.defaultPrevented||b?.()},className:["group/treerow relative flex h-8 shrink-0 select-none items-center gap-2 rounded-md px-2 text-sm",I?"cursor-grab active:cursor-grabbing":"cursor-pointer","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",R,"into"===C?"ring-2 ring-inset ring-[color:var(--rosh-drop-ring)]":"",K?"opacity-40":"",E].filter(Boolean).join(" "),children:["before"===C&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -top-0.5 h-0.5 rounded-full bg-blue-500"}),"after"===C&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -bottom-0.5 h-0.5 rounded-full bg-blue-500"}),I&&
5
+ /* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-caret":"",className:"flex h-4 w-4 shrink-0 items-center justify-center",children:$(!!a)}),l,c]})}):/* @__PURE__ */g("div",{role:"presentation",className:`flex items-center gap-2 px-2 pb-1 pt-3 ${d}`,children:[
6
+ /* @__PURE__ */h("span",{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),l,c]})}var $=e=>/* @__PURE__ */h(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:2.6,className:"h-3 w-3 transition-transform "+(e?"rotate-90":"")}),D={backgroundColor:"inherit",maskImage:"linear-gradient(to right, transparent, black 12px)",WebkitMaskImage:"linear-gradient(to right, transparent, black 12px)"};function P({label:o,level:i=1,icon:l,preview:c,selected:d=!1,tone:u,expanded:p,onToggle:f,onSelect:b,muted:v=!1,badge:y,count:x,countLabel:k,actions:w,actionsPinned:N=!1,actionsOverlay:j=!0,rename:P,drop:C,dragging:K=!1,draggable:I=!1,dragHint:H,onMove:S,rowProps:T,className:W=""}){const E=void 0!==p,L=m(),O=x??("number"==typeof y?y:void 0),R=[T?.["aria-describedby"],S?L:void 0].filter(Boolean).join(" ")||void 0,Z="shared"===u?"text-[color:var(--status-success-soft-ink)]":null,q=d?Z?`bg-[var(--status-success-soft)] ${Z}`:"bg-accent-tint text-blue-700":"into"===C?`bg-accent-tint ${Z??"text-ink-strongest"}`:`${Z??"text-ink"} hover:bg-gray-100`;/* @__PURE__ */
7
+ return g("div",{...T,role:"treeitem","aria-level":i,"aria-selected":d,"aria-expanded":E?p:void 0,"data-tone":u,tabIndex:d?0:-1,"aria-keyshortcuts":T?.["aria-keyshortcuts"]??(S?e:void 0),"aria-describedby":R,"data-drop":C,"data-draggable":I||void 0,onKeyDown:e=>{if(T?.onKeyDown?.(e),e.target!==e.currentTarget||e.defaultPrevented)return;const t=a(e);t&&S?(e.preventDefault(),S(t)):"Enter"!==e.key&&" "!==e.key||!b?("ArrowRight"===e.key&&E&&!p&&f||"ArrowLeft"===e.key&&E&&p&&f)&&(e.preventDefault(),f()):(e.preventDefault(),b())},onClick:e=>{T?.onClick?.(e),e.defaultPrevented||b?.()},className:["group/treerow relative flex h-8 shrink-0 select-none items-center gap-2 rounded-md px-2 text-sm",I?"cursor-grab active:cursor-grabbing":"cursor-pointer","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",q,"into"===C?"ring-2 ring-inset ring-[color:var(--rosh-drop-ring)]":"",K?"opacity-40":"",W].filter(Boolean).join(" "),children:["before"===C&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -top-0.5 h-0.5 rounded-full bg-blue-500"}),"after"===C&&/* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-drop-line":"",className:"pointer-events-none absolute inset-x-2 -bottom-0.5 h-0.5 rounded-full bg-blue-500"}),I&&
8
8
  /* @__PURE__ */h(t,{marker:"tree",hint:H,dragging:K,revealClassName:"group-hover/treerow:opacity-100"}),
9
- /* @__PURE__ */h("span",L?{"aria-hidden":"true","data-tree-caret":"",onClick:e=>{e.stopPropagation(),f?.()},className:"flex h-4 w-4 shrink-0 items-center justify-center rounded text-gray-500 hover:bg-gray-200 hover:text-gray-900",children:D(!!p)}:{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),null!=l&&/* @__PURE__ */h("span",{"aria-hidden":"true",className:"flex h-4 w-4 shrink-0 items-center justify-center "+(v?"text-ink-faintest":""),children:l}),
9
+ /* @__PURE__ */h("span",E?{"aria-hidden":"true","data-tree-caret":"",onClick:e=>{e.stopPropagation(),f?.()},className:"flex h-4 w-4 shrink-0 items-center justify-center rounded text-gray-500 hover:bg-gray-200 hover:text-gray-900",children:$(!!p)}:{"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),null!=l&&/* @__PURE__ */h("span",{"aria-hidden":"true",className:"flex h-4 w-4 shrink-0 items-center justify-center "+(v?"text-ink-faintest":""),children:l}),
10
10
  /* @__PURE__ */g("span",{className:"relative flex min-w-0 flex-1 items-center gap-2",children:[P??
11
- /* @__PURE__ */h("span",{"data-tree-name":"",className:`flex min-w-0 ${d?"font-semibold":"font-medium"} ${v?"text-ink-faintest line-through":""}`,children:/* @__PURE__ */g(s,{children:[o,null!=c&&/* @__PURE__ */h("span",{className:"ml-2 font-normal text-ink-faint",children:c})]})}),A(y),null!=W&&/* @__PURE__ */h(n,{count:W,label:k,active:d,showZero:!0,className:"ml-auto"}),null!=w&&!j&&/* @__PURE__ */h("span",{"data-tree-actions":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),className:`${null!=W?"":"ml-auto "}flex shrink-0 items-center gap-0.5 transition-opacity ${N||v?"opacity-100":"opacity-0 group-hover/treerow:opacity-100 group-focus-within/treerow:opacity-100"}`,children:w})]}),null!=w&&j&&
12
- /* @__PURE__ */g("span",{"data-tree-actions":"","data-tree-actions-overlay":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),style:$,className:"absolute inset-y-0 right-0 grid rounded-r-md transition-opacity "+(N||v||d?"opacity-100":"pointer-events-none opacity-0 group-hover/treerow:pointer-events-auto group-hover/treerow:opacity-100 group-focus-within/treerow:pointer-events-auto group-focus-within/treerow:opacity-100"),children:[
11
+ /* @__PURE__ */h("span",{"data-tree-name":"",className:`flex min-w-0 ${d?"font-semibold":"font-medium"} ${v?"text-ink-faintest line-through":""}`,children:/* @__PURE__ */g(s,{children:[o,null!=c&&/* @__PURE__ */h("span",{className:"ml-2 font-normal text-ink-faint",children:c})]})}),A(y),null!=O&&/* @__PURE__ */h(n,{count:O,label:k,active:d,showZero:!0,className:"ml-auto"}),null!=w&&!j&&/* @__PURE__ */h("span",{"data-tree-actions":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),className:`${null!=O?"":"ml-auto "}flex shrink-0 items-center gap-0.5 transition-opacity ${N||v?"opacity-100":"opacity-0 group-hover/treerow:opacity-100 group-focus-within/treerow:opacity-100"}`,children:w})]}),null!=w&&j&&
12
+ /* @__PURE__ */g("span",{"data-tree-actions":"","data-tree-actions-overlay":"",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),style:D,className:"absolute inset-y-0 right-0 grid rounded-r-md transition-opacity "+(N||v||d?"opacity-100":"pointer-events-none opacity-0 group-hover/treerow:pointer-events-auto group-hover/treerow:opacity-100 group-focus-within/treerow:pointer-events-auto group-focus-within/treerow:opacity-100"),children:[
13
13
  /* @__PURE__ */h("span",{"aria-hidden":"true","data-tree-actions-scrim":"",className:"col-start-1 row-start-1",style:{background:"var(--rosh-tree-ground, var(--surface))"}}),
14
14
  /* @__PURE__ */h("span",{"aria-hidden":"true",className:"col-start-1 row-start-1",style:{backgroundColor:"inherit"}}),
15
- /* @__PURE__ */h("span",{className:"col-start-1 row-start-1 flex items-center gap-0.5 pl-4 pr-2",children:w})]}),S&&/* @__PURE__ */h(r,{id:O})]})}function C({onAdd:e,label:t,drop:r=!1,slotProps:a}){const n=d().tree,o=r?n.dropHere:t??n.empty,i="flex min-h-8 w-full items-center gap-2 rounded-md border border-dashed px-3 text-sm "+(r?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-300 text-gray-500");/* @__PURE__ */
15
+ /* @__PURE__ */h("span",{className:"col-start-1 row-start-1 flex items-center gap-0.5 pl-4 pr-2",children:w})]}),S&&/* @__PURE__ */h(r,{id:L})]})}function C({onAdd:e,label:t,drop:r=!1,slotProps:a}){const n=d().tree,o=r?n.dropHere:t??n.empty,i="flex min-h-8 w-full items-center gap-2 rounded-md border border-dashed px-3 text-sm "+(r?"border-blue-500 bg-blue-50 text-blue-700":"border-gray-300 text-gray-500");/* @__PURE__ */
16
16
  return h("div",{...a,role:"presentation","data-drop":r||void 0,children:e?/* @__PURE__ */g("button",{type:"button",onClick:e,className:`${i} text-left hover:bg-gray-100 hover:text-gray-900 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]`,children:[
17
17
  /* @__PURE__ */h("span",{"aria-hidden":"true",children:"+"}),o]}):/* @__PURE__ */h("span",{className:i,children:o})})}function K({onInsert:e,label:t,drop:r=!1,seamProps:a}){const n=d().tree,o=t??n.insertHere,s=r?"opacity-100":e?"opacity-0 group-hover/seam:opacity-100 group-focus-within/seam:opacity-100":"opacity-0";/* @__PURE__ */
18
18
  return g("div",{...a,role:"presentation","data-tree-seam":"","data-drop":r||void 0,className:`group/seam relative z-10 -my-1 h-1 shrink-0 ${a?.className??""}`.trim(),children:[
@@ -1,14 +1,14 @@
1
- import{SidebarBarContext as e,SidebarSheetContext as l}from"./chunk-QWK6DRSN.js";import{readStoredWidth as r,ResizeHandle as t}from"./chunk-LXPDURUL.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-ISVODSRP.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-IUVGHHR3.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:e,sidebarTop:l,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:D=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:P="bg-white"}){const R="right"===m,j=i().sidebar,z=a(),C=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[I,O]=o(()=>(x?r(x,w,k):null)??b(N,w,k),b(N,w,k)),W=null!=l||null!=n,S=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:I},children:[
2
- /* @__PURE__ */f("div",{className:`flex h-full flex-col ${W?"overflow-hidden":"overflow-y-auto"} ${D}`,children:[null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:l}),W?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e}):e,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
3
- /* @__PURE__ */p(t,{side:m,width:I,onResize:O,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:j.resize})]}),E=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${P}`,children:u});/* @__PURE__ */
1
+ import{readStoredWidth as e,ResizeHandle as l}from"./chunk-LXPDURUL.js";import{SidebarBarContext as r,SidebarSheetContext as t}from"./chunk-QWK6DRSN.js";import{useIsPhone as a}from"./chunk-UGTRSRIW.js";import{Icon as n}from"./chunk-ISVODSRP.js";import{useBrowserState as o}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-IUVGHHR3.js";import{useState as s,useRef as c,useReducer as d,useMemo as h,Fragment as u,useEffect as m}from"react";import{jsxs as f,jsx as p}from"react/jsx-runtime";var b=(e,l,r)=>Math.min(Math.max(e,l),r);function x({sidebar:r,sidebarTop:t,sidebarBottom:n,children:u,side:m="left",storageKey:x,defaultWidth:N=256,minWidth:w=180,maxWidth:k=480,className:y="",sidebarClassName:D=("right"===m?"border-l border-gray-200 bg-gray-50":"border-r border-gray-200 bg-gray-50"),contentClassName:P="bg-white"}){const R="right"===m,j=i().sidebar,z=a(),C=function(){const[e,l]=s(!1),r=c(null),t=c(/* @__PURE__ */new Map),[,a]=d(e=>e+1,0),n=h(()=>({report(e,l,r){const n={label:l,el:r};return t.current.set(e,n),a(),()=>{t.current.get(e)===n&&(t.current.delete(e),a())}}}),[]);return{api:n,open:e,setOpen:l,current:()=>[...t.current.values()].sort((e,l)=>e.el&&l.el&&e.el.compareDocumentPosition(l.el)&Node.DOCUMENT_POSITION_PRECEDING?1:-1).map(e=>e.label()),trigger:r}}(),[I,O]=o(()=>(x?e(x,w,k):null)??b(N,w,k),b(N,w,k)),W=null!=t||null!=n,S=/* @__PURE__ */f("div",{className:"relative flex h-full shrink-0 flex-col",style:{width:I},children:[
2
+ /* @__PURE__ */f("div",{className:`flex h-full flex-col ${W?"overflow-hidden":"overflow-y-auto"} ${D}`,children:[null!=t&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 px-2 pt-3 pb-2",children:t}),W?/* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto",children:r}):r,null!=n&&/* @__PURE__ */p("div",{className:"mt-auto flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:n})]}),
3
+ /* @__PURE__ */p(l,{side:m,width:I,onResize:O,min:w,max:k,defaultWidth:b(N,w,k),storageKey:x,hint:j.resize})]}),E=/* @__PURE__ */p("div",{className:`flex min-w-0 flex-1 flex-col ${P}`,children:u});/* @__PURE__ */
4
4
  return f("div",z?{className:`relative flex h-full w-full flex-col overflow-hidden ${y}`,children:[
5
- /* @__PURE__ */p(g,{phone:C,top:l,fallback:j.sections}),E,
6
- /* @__PURE__ */p(v,{phone:C,bottom:n,label:j.sections,closeLabel:j.closeSections,children:e})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[R?null:S,E,R?S:null]})}function g({phone:l,top:r,fallback:t}){const a=l.current();/* @__PURE__ */
5
+ /* @__PURE__ */p(g,{phone:C,top:t,fallback:j.sections}),E,
6
+ /* @__PURE__ */p(v,{phone:C,bottom:n,label:j.sections,closeLabel:j.closeSections,children:r})]}:{className:`flex h-full w-full overflow-hidden ${y}`,children:[R?null:S,E,R?S:null]})}function g({phone:e,top:l,fallback:t}){const a=e.current();/* @__PURE__ */
7
7
  return f("div",{"data-sidebar-section-bar":!0,className:"flex h-11 shrink-0 items-center gap-2 border-b border-gray-200 bg-white px-3",children:[
8
- /* @__PURE__ */f("button",{ref:l.trigger,type:"button","aria-haspopup":"dialog","aria-expanded":l.open,onClick:()=>l.setOpen(!0),className:"flex h-8 min-w-0 flex-1 items-center gap-1 text-left text-sm font-semibold text-gray-900",children:[
8
+ /* @__PURE__ */f("button",{ref:e.trigger,type:"button","aria-haspopup":"dialog","aria-expanded":e.open,onClick:()=>e.setOpen(!0),className:"flex h-8 min-w-0 flex-1 items-center gap-1 text-left text-sm font-semibold text-gray-900",children:[
9
9
  /* @__PURE__ */p("span",{className:"min-w-0 truncate",children:0===a.length?t:a.map((e,l)=>/* @__PURE__ */f(u,{children:[l>0&&" · ",e]},l))}),
10
- /* @__PURE__ */p(n,{name:"chevron-down",className:"size-4 shrink-0",strokeWidth:2,"aria-hidden":"true"})]}),null!=r&&/* @__PURE__ */p(e.Provider,{value:!0,children:/* @__PURE__ */p("div",{className:"flex min-w-0 max-w-[60%] shrink-0 items-center gap-2",children:r})})]})}function v({phone:e,bottom:r,label:t,closeLabel:a,children:n}){const o=c(null),{open:i,setOpen:s,trigger:d}=e,h=()=>{s(!1),o.current?.contains(document.activeElement)&&d.current?.focus()};return m(()=>{i&&o.current?.focus()},[i]),
11
- /* @__PURE__ */f(l.Provider,{value:e.api,children:[i&&/* @__PURE__ */p("button",{type:"button","aria-label":a,onClick:h,className:"absolute inset-0 z-(--z-in-box) cursor-default bg-gray-900/40"}),
12
- /* @__PURE__ */f("div",{ref:o,role:"dialog","aria-modal":"true","aria-label":t,tabIndex:-1,"data-sidebar-section-sheet":!0,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),h())},onClick:e=>{const l=e.target.closest("button, a");!l||l.hasAttribute("aria-expanded")||l.closest("[data-sheet-keep-open]")||h()},className:(i?"flex":"hidden")+" absolute inset-x-0 bottom-0 z-(--z-in-box) max-h-[75%] flex-col rounded-t-2xl bg-white pt-2 shadow-(--elevation-dialog)",children:[
10
+ /* @__PURE__ */p(n,{name:"chevron-down",className:"size-4 shrink-0",strokeWidth:2,"aria-hidden":"true"})]}),null!=l&&/* @__PURE__ */p(r.Provider,{value:!0,children:/* @__PURE__ */p("div",{className:"flex min-w-0 max-w-[60%] shrink-0 items-center gap-2",children:l})})]})}function v({phone:e,bottom:l,label:r,closeLabel:a,children:n}){const o=c(null),{open:i,setOpen:s,trigger:d}=e,h=()=>{s(!1),o.current?.contains(document.activeElement)&&d.current?.focus()};return m(()=>{i&&o.current?.focus()},[i]),
11
+ /* @__PURE__ */f(t.Provider,{value:e.api,children:[i&&/* @__PURE__ */p("button",{type:"button","aria-label":a,onClick:h,className:"absolute inset-0 z-(--z-in-box) cursor-default bg-gray-900/40"}),
12
+ /* @__PURE__ */f("div",{ref:o,role:"dialog","aria-modal":"true","aria-label":r,tabIndex:-1,"data-sidebar-section-sheet":!0,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),h())},onClick:e=>{const l=e.target.closest("button, a");!l||l.hasAttribute("aria-expanded")||l.closest("[data-sheet-keep-open]")||h()},className:(i?"flex":"hidden")+" absolute inset-x-0 bottom-0 z-(--z-in-box) max-h-[75%] flex-col rounded-t-2xl bg-white pt-2 shadow-(--elevation-dialog)",children:[
13
13
  /* @__PURE__ */p("div",{className:"mx-auto mb-2 h-1 w-9 shrink-0 rounded-full bg-gray-300","aria-hidden":"true"}),
14
- /* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto px-2 pb-3",children:n}),null!=r&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:r})]})]})}export{x as SidebarLayout};
14
+ /* @__PURE__ */p("div",{className:"min-h-0 flex-1 overflow-y-auto px-2 pb-3",children:n}),null!=l&&/* @__PURE__ */p("div",{className:"flex shrink-0 flex-col gap-2 border-t border-gray-200 px-2 py-3",children:l})]})]})}export{x as SidebarLayout};
@@ -1,4 +1,4 @@
1
- import{Card as e}from"./chunk-4S3E3VJH.js";import{Select_default as a}from"./chunk-DEYVAMJQ.js";import{Pagination as r}from"./chunk-223XYIIH.js";import{Input_default as t}from"./chunk-PT4GMPUB.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-JMGDGNM7.js";import{Button_default as l}from"./chunk-EVYD6UFQ.js";import{Icon as c}from"./chunk-ISVODSRP.js";import{TH_ONE_LINE as m}from"./chunk-G67CJAQ2.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[c,u]=n(1),[g,f]=n(""),[y,v]=n("");/* @__PURE__ */
1
+ import{Card as e}from"./chunk-4S3E3VJH.js";import{Select_default as a}from"./chunk-DEYVAMJQ.js";import{Pagination as r}from"./chunk-223XYIIH.js";import{Input_default as t}from"./chunk-PT4GMPUB.js";import{StatusBadgeProvider as i,StatusBadge as s}from"./chunk-WU2ZA6J2.js";import{Button_default as l}from"./chunk-EVYD6UFQ.js";import{Icon as c}from"./chunk-ISVODSRP.js";import{TH_ONE_LINE as m}from"./chunk-G67CJAQ2.js";import{useState as n}from"react";import{jsx as d,jsxs as o}from"react/jsx-runtime";var h={active:"success",invited:"queued",suspended:"danger",pending:"pending"},p=[{name:"Alice Nguyen",email:"alice@acme.co",role:"Admin",status:"active"},{name:"Marco Reyes",email:"marco@acme.co",role:"Editor",status:"invited"},{name:"Priya Patel",email:"priya@acme.co",role:"Editor",status:"active"},{name:"Tom Becker",email:"tom@acme.co",role:"Viewer",status:"suspended"},{name:"Sara Lind",email:"sara@acme.co",role:"Viewer",status:"pending"},{name:"Yuki Tanaka",email:"yuki@acme.co",role:"Editor",status:"active"}];function u(){const[c,u]=n(1),[g,f]=n(""),[y,v]=n("");/* @__PURE__ */
2
2
  return d(i,{groups:h,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */o("div",{className:"mx-auto max-w-5xl space-y-4",children:[
3
3
  /* @__PURE__ */o("div",{className:"flex items-center justify-between gap-4",children:[
4
4
  /* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Members"}),
@@ -0,0 +1 @@
1
+ var r="13.14.0",a=r;export{a as APP_VERSION,r as VERSION};
@@ -0,0 +1 @@
1
+ import{TYPE_SCALE as t,FONT_WEIGHTS as o}from"./chunk-LH7IKIGE.js";import{textWidth as n}from"./chunk-UVCMV2TL.js";import{SPACING_ROLES as e,SPACING_SCALE as m}from"./chunk-AW7TOB6N.js";import{statusLabel as r}from"./chunk-WU2ZA6J2.js";var c=e.controlX,u=m[4],i=t[2],d=o.control,f=.625*i,h=m[1];function p(t){const o="undefined"!=typeof document&&document.body?getComputedStyle(document.body).fontFamily:"";return o?n(t,`${d} ${i}px ${o}`)??t.length*f:t.length*f}function a(t){const o=Object.entries(t).map(([t,o])=>!0===o?r(t):o),n=Math.max(0,...o.map(p)),e=Math.ceil((n+2*c+2*u)/h)*h;return{defaultWidth:e,minWidth:e}}export{c as BADGE_X,u as CELL_X,a as statusColumn};
@@ -1 +1 @@
1
- import{BrandVisaIcon as a}from"./chunk-WYDD26UO.js";import{BrandWechatIcon as r}from"./chunk-44F7JLNV.js";import{BrandPaypalIcon as n}from"./chunk-7P3DXO3E.js";import{BrandMastercardIcon as p}from"./chunk-JMWKD4R5.js";import{BrandJcbIcon as b}from"./chunk-WH6NPZ6B.js";import{BrandKlarnaIcon as d}from"./chunk-DS6R5R3O.js";import{BrandGooglepayIcon as e}from"./chunk-ZEN67DFI.js";import{BrandDinersclubIcon as s}from"./chunk-A5SPSAWW.js";import{BrandApplepayIcon as c}from"./chunk-RAHDUMQ5.js";import{BrandAfterpayIcon as o}from"./chunk-BZR43D3G.js";import{BrandAlipayIcon as i}from"./chunk-SVUOPZCB.js";import{BrandAmericanexpressIcon as l}from"./chunk-PRJJK7VR.js";var m={afterpay:"brand-afterpay",alipay:"brand-alipay",americanexpress:"brand-americanexpress",applepay:"brand-applepay",dinersclub:"brand-dinersclub",googlepay:"brand-googlepay",jcb:"brand-jcb",klarna:"brand-klarna",mastercard:"brand-mastercard",paypal:"brand-paypal",visa:"brand-visa",wechat:"brand-wechat"},t=new Set(["brand-afterpay","brand-alipay","brand-americanexpress","brand-applepay","brand-dinersclub","brand-googlepay","brand-jcb","brand-klarna","brand-mastercard","brand-paypal","brand-visa","brand-wechat"]),y=a=>"string"==typeof a&&t.has(a),f={"brand-afterpay":o,"brand-alipay":i,"brand-americanexpress":l,"brand-applepay":c,"brand-dinersclub":s,"brand-googlepay":e,"brand-jcb":b,"brand-klarna":d,"brand-mastercard":p,"brand-paypal":n,"brand-visa":a,"brand-wechat":r},h={"brand-afterpay":"Afterpay","brand-alipay":"Alipay","brand-americanexpress":"American Express","brand-applepay":"Apple Pay","brand-dinersclub":"Diners Club","brand-googlepay":"Google Pay","brand-jcb":"JCB","brand-klarna":"Klarna","brand-mastercard":"MasterCard","brand-paypal":"PayPal","brand-visa":"Visa","brand-wechat":"WeChat"};export{m as PAYMENT_BRAND,f as PAYMENT_BRAND_DRAWINGS,h as PAYMENT_BRAND_TITLES,y as isPaymentBrand};
1
+ import{BrandWechatIcon as a}from"./chunk-44F7JLNV.js";import{BrandVisaIcon as r}from"./chunk-WYDD26UO.js";import{BrandPaypalIcon as n}from"./chunk-7P3DXO3E.js";import{BrandMastercardIcon as p}from"./chunk-JMWKD4R5.js";import{BrandJcbIcon as b}from"./chunk-WH6NPZ6B.js";import{BrandKlarnaIcon as d}from"./chunk-DS6R5R3O.js";import{BrandGooglepayIcon as e}from"./chunk-ZEN67DFI.js";import{BrandDinersclubIcon as s}from"./chunk-A5SPSAWW.js";import{BrandApplepayIcon as c}from"./chunk-RAHDUMQ5.js";import{BrandAfterpayIcon as o}from"./chunk-BZR43D3G.js";import{BrandAlipayIcon as i}from"./chunk-SVUOPZCB.js";import{BrandAmericanexpressIcon as l}from"./chunk-PRJJK7VR.js";var m={afterpay:"brand-afterpay",alipay:"brand-alipay",americanexpress:"brand-americanexpress",applepay:"brand-applepay",dinersclub:"brand-dinersclub",googlepay:"brand-googlepay",jcb:"brand-jcb",klarna:"brand-klarna",mastercard:"brand-mastercard",paypal:"brand-paypal",visa:"brand-visa",wechat:"brand-wechat"},t=new Set(["brand-afterpay","brand-alipay","brand-americanexpress","brand-applepay","brand-dinersclub","brand-googlepay","brand-jcb","brand-klarna","brand-mastercard","brand-paypal","brand-visa","brand-wechat"]),y=a=>"string"==typeof a&&t.has(a),f={"brand-afterpay":o,"brand-alipay":i,"brand-americanexpress":l,"brand-applepay":c,"brand-dinersclub":s,"brand-googlepay":e,"brand-jcb":b,"brand-klarna":d,"brand-mastercard":p,"brand-paypal":n,"brand-visa":r,"brand-wechat":a},h={"brand-afterpay":"Afterpay","brand-alipay":"Alipay","brand-americanexpress":"American Express","brand-applepay":"Apple Pay","brand-dinersclub":"Diners Club","brand-googlepay":"Google Pay","brand-jcb":"JCB","brand-klarna":"Klarna","brand-mastercard":"MasterCard","brand-paypal":"PayPal","brand-visa":"Visa","brand-wechat":"WeChat"};export{m as PAYMENT_BRAND,f as PAYMENT_BRAND_DRAWINGS,h as PAYMENT_BRAND_TITLES,y as isPaymentBrand};
@@ -1 +1 @@
1
- import{client_default as a}from"./chunk-XRTH47EO.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
1
+ import{client_default as a}from"./chunk-775K6APE.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
@@ -1 +1 @@
1
- import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-EZQHUQOP.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},E=class{l},C=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);C(()=>{const s=p(t,E),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,Z=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},_=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();C(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,Z),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{_(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],U=[800,1800],B=e=>{document.prerendering?C(()=>B(e)):"complete"!==document.readyState?addEventListener("load",()=>B(e),!0):setTimeout(e)};var N=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,O=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,V=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,Q=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,G=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(G,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&O.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(G,"").split(/[?#]/,1)[0].replace(Q,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&N.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);C(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;_(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,U,t.reportAllChanges);B(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,U,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,U,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(V,"[url]").replace(W,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
1
+ import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-KY3KGRGC.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},R=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},Z=[200,500],F=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,Z,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{R(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,Z,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,O=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var K=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},q=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,J=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,G=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,V=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,W=/\d{4,}/g,D=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Y=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,Q=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function X(e,t,n){const i=e.replace(Y,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=Q.exec(n.trim()),i=e&&X(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&O.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Y,"").split(/[?#]/,1)[0].replace(D,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&U.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;R(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),F(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new K({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(q,"[redacted]").replace(J,"[redacted]").replace(G,"[url]").replace(V,"[id]").replace(W,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
@@ -1,4 +1,4 @@
1
- import{StatCard as e,Card as a}from"./chunk-4S3E3VJH.js";import{Sparkline as t}from"./chunk-CKCDGSTC.js";import{PieChart as r}from"./chunk-FMERX3PG.js";import{Avatar as s}from"./chunk-W2TPXKCV.js";import{ColumnChart as l}from"./chunk-YDFDTRZF.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-JMGDGNM7.js";import{Button_default as c}from"./chunk-EVYD6UFQ.js";import{TH_ONE_LINE as n}from"./chunk-G67CJAQ2.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
1
+ import{StatCard as e,Card as a}from"./chunk-4S3E3VJH.js";import{Sparkline as t}from"./chunk-CKCDGSTC.js";import{PieChart as r}from"./chunk-FMERX3PG.js";import{Avatar as s}from"./chunk-W2TPXKCV.js";import{ColumnChart as l}from"./chunk-YDFDTRZF.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-WU2ZA6J2.js";import{Button_default as c}from"./chunk-EVYD6UFQ.js";import{TH_ONE_LINE as n}from"./chunk-G67CJAQ2.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
2
2
  return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */m("div",{className:"mx-auto max-w-6xl space-y-6",children:[
3
3
  /* @__PURE__ */m("div",{className:"flex items-center justify-between gap-4",children:[
4
4
  /* @__PURE__ */m("div",{children:[
@@ -1,11 +1,11 @@
1
- import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-AHMYBYXJ.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-VFSAJMNX.js";import{useShellStrings as l}from"./chunk-IUVGHHR3.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},H){const $=m(),z=l().files,B=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),C=j?`${$}-error`:N?`${$}-hint`:void 0;/* @__PURE__ */
1
+ import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-G4PPHQ23.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-VFSAJMNX.js";import{useShellStrings as l}from"./chunk-IUVGHHR3.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},H){const $=m(),z=l().files,C=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),F=j?`${$}-error`:N?`${$}-hint`:void 0;/* @__PURE__ */
2
2
  return o(e,{label:g,htmlFor:$,hint:N,error:j,required:k,className:v,children:[
3
- /* @__PURE__ */o("button",{ref:H,type:"button",id:$,disabled:y,onClick:B.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":C,...B.zoneProps,className:t(B.dragOver,y,a(y),"px-4 py-6"),children:[
3
+ /* @__PURE__ */o("button",{ref:H,type:"button",id:$,disabled:y,onClick:C.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":F,...C.zoneProps,className:t(C.dragOver,y,a(y),"px-4 py-6"),children:[
4
4
  /* @__PURE__ */o("span",{children:[
5
5
  /* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?z.chooseMany:z.chooseOne}),
6
6
  /* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?z.dragMany:z.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),
7
- /* @__PURE__ */d("input",{...B.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
7
+ /* @__PURE__ */d("input",{...C.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
8
8
  /* @__PURE__ */d("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-800",title:e.name,children:e.name}),
9
9
  /* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,z)}),
10
- /* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{B.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":z.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
11
- /* @__PURE__ */d(s,{rejections:B.rejections})]})});export{p as FilePicker_default};
10
+ /* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{C.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":z.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
11
+ /* @__PURE__ */d(s,{rejections:C.rejections})]})});export{p as FilePicker_default};
@@ -1 +1 @@
1
- import{useDefaultColumnConfig as e}from"./chunk-ULJQYXHB.js";import{useShellPrefs as t}from"./chunk-KC3EX26K.js";import{useState as n,useRef as r,useCallback as i,useEffect as d}from"react";function l(e,t){return e.length===t.length&&e.every((e,n)=>e.key===t[n].key&&e.width===t[n].width&&!!e.hidden==!!t[n].hidden)}function o(e){const t=e.findIndex(e=>"_select"===e.key);if(t>=0){const[n]=e.splice(t,1);n.hidden=!1,e.unshift(n)}return e}function u(u,c){const{prefs:s,save:a}=t(),f=`columns_${u}`,y=s[f],{defaultConfig:h}=e(u),[k,m]=n(()=>{const e="undefined"==typeof window?null:localStorage.getItem(`col-config-${u}`);if(e)try{const t=JSON.parse(e),n=new Set(t.map(e=>e.key));return o([...t.filter(e=>c.some(t=>t.key===e.key)),...c.filter(e=>!n.has(e.key)).map(e=>({key:e.key,width:e.defaultWidth||150,hidden:e.defaultHidden}))])}catch{}return o(c.map(e=>({key:e.key,width:e.defaultWidth||150,hidden:e.defaultHidden})))}),[p,g]=n(null),[w,v]=n(null),S=r(null),x=r(!1),I=r(y);I.current=y;const W=r(null),C=r(a);C.current=a;const D=i(e=>{x.current=!0,localStorage.setItem(`col-config-${u}`,JSON.stringify(e)),W.current&&clearTimeout(W.current),W.current=setTimeout(()=>{C.current({[f]:e})},1e3)},[u,f]);d(()=>{if(x.current||!Array.isArray(y))return;const e=new Set(y.map(e=>e.key)),t=o([...y.filter(e=>c.some(t=>t.key===e.key)).map(e=>({...e})),...c.filter(t=>!e.has(t.key)).map(e=>({key:e.key,width:e.defaultWidth||150,hidden:e.defaultHidden}))]);m(e=>l(e,t)?e:t),localStorage.setItem(`col-config-${u}`,JSON.stringify(t))},[u,y]),d(()=>{if(x.current||Array.isArray(I.current))return;const e=h?.visible_columns;if(!Array.isArray(e)||0===e.length)return;const t=new Set(e),n=o(c.map(e=>({key:e.key,width:e.defaultWidth||150,hidden:!t.has(e.key)})));m(e=>l(e,n)?e:n),localStorage.setItem(`col-config-${u}`,JSON.stringify(n))},[u,h]);const X=r(/* @__PURE__ */new Map);d(()=>{m(e=>function(e,t,n){const r=new Set(t.map(e=>e.key)),i=new Set(e.map(e=>e.key)),d=t.filter(e=>!i.has(e.key)),l=e.filter(e=>"_select"===e.key||r.has(e.key));if(!d.length&&l.length===e.length)return e;for(const t of e)"_select"===t.key||r.has(t.key)||n.set(t.key,t);const u=[...l];for(const e of d){let r=-1;for(let n=t.indexOf(e)-1;n>=0;n-=1){const e=u.findIndex(e=>e.key===t[n].key);if(e>=0){r=e;break}}u.splice(r+1,0,n.get(e.key)??{key:e.key,width:e.defaultWidth||150,hidden:e.defaultHidden}),n.delete(e.key)}return o(u)}(e,c,X.current))},[c]);const A=k.filter(e=>!e.hidden),E=i((e,t)=>{t.preventDefault(),t.stopPropagation();const n=A[e],r=k.findIndex(e=>e.key===n.key);S.current={idx:r,startX:t.clientX,startWidth:k[r].width};const i=e=>{if(!S.current)return;const{idx:t,startX:n,startWidth:r}=S.current,i=c.find(e=>e.key===k[t].key)?.minWidth||30,d=Math.max(i,r+e.clientX-n);m(e=>{const n=[...e];return n[t]={...n[t],width:d},n})},d=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",d),S.current=null,m(e=>(D(e),e))};document.addEventListener("mousemove",i),document.addEventListener("mouseup",d)},[k,A,c,D]),H=i(e=>{g(e)},[]),O=i((e,t)=>{if(t.preventDefault(),null===p)return;const n=t.currentTarget.getBoundingClientRect();let r=t.clientX<n.left+n.width/2?e:e+1;const i=k.filter(e=>!e.hidden);"_select"===i[0]?.key&&0===r&&(r=1),v(r)},[p,k]),_=i((e,t)=>(t.preventDefault(),null===p||null===w||w===p||w===p+1?(g(null),void v(null)):(m(e=>{const t=e.filter(e=>!e.hidden),n=t[p];if(!n)return e;const r=e.findIndex(e=>e.key===n.key);let i;i=w<t.length?e.findIndex(e=>e.key===t[w].key):e.findIndex(e=>e.key===t[t.length-1].key)+1;const d=[...e],[l]=d.splice(r,1);return d.splice(i>r?i-1:i,0,l),D(d),d}),g(null),void v(null))),[p,w,D]),J=i(()=>{g(null),v(null)},[]),L=i(e=>{m(t=>{const n=t.map(t=>t.key===e?{...t,hidden:!t.hidden}:t);return 0===n.filter(e=>!e.hidden).length?t:(D(n),n)})},[D]),$=i(()=>{const e=o(c.map(e=>({key:e.key,width:e.defaultWidth||150,hidden:e.defaultHidden})));m(e),D(e)},[c,D]);return{orderedColumns:A.map(e=>({...c.find(t=>t.key===e.key),width:e.width})).filter(Boolean),allColumns:k.map(e=>{const t=c.find(t=>t.key===e.key);return{key:e.key,label:t?.label||e.key,hidden:!!e.hidden}}),onResizeStart:E,onDragStart:H,onDragOver:O,onDrop:_,onDragEnd:J,toggleColumn:L,resetColumns:$,draggedIdx:p,dropGap:w}}export{u as useColumnConfig};
1
+ import{useDefaultColumnConfig as e}from"./chunk-ULJQYXHB.js";import{useShellPrefs as t}from"./chunk-KC3EX26K.js";import{useState as n,useRef as r,useCallback as i,useEffect as d}from"react";function l(e,t){return e.length===t.length&&e.every((e,n)=>e.key===t[n].key&&e.width===t[n].width&&!!e.hidden==!!t[n].hidden)}function o(e){const t=e.findIndex(e=>"_select"===e.key);if(t>=0){const[n]=e.splice(t,1);n.hidden=!1,e.unshift(n)}return e}function u(u,c){const{prefs:s,save:a}=t(),f=`columns_${u}`,y=s[f],{defaultConfig:h}=e(u),[k,m]=n(()=>{const e="undefined"==typeof window?null:localStorage.getItem(`col-config-${u}`);if(e)try{const t=JSON.parse(e),n=new Set(t.map(e=>e.key));return o([...t.filter(e=>c.some(t=>t.key===e.key)),...c.filter(e=>!n.has(e.key)).map(e=>({key:e.key,width:e.defaultWidth||150,hidden:e.defaultHidden}))])}catch{}return o(c.map(e=>({key:e.key,width:e.defaultWidth||150,hidden:e.defaultHidden})))}),[p,g]=n(null),[w,v]=n(null),S=r(null),x=r(!1),I=r(y);I.current=y;const W=r(null),C=r(a);C.current=a;const D=i(e=>{x.current=!0,localStorage.setItem(`col-config-${u}`,JSON.stringify(e)),W.current&&clearTimeout(W.current),W.current=setTimeout(()=>{C.current({[f]:e})},1e3)},[u,f]);d(()=>{if(x.current||!Array.isArray(y))return;const e=new Set(y.map(e=>e.key)),t=o([...y.filter(e=>c.some(t=>t.key===e.key)).map(e=>({...e})),...c.filter(t=>!e.has(t.key)).map(e=>({key:e.key,width:e.defaultWidth||150,hidden:e.defaultHidden}))]);m(e=>l(e,t)?e:t),localStorage.setItem(`col-config-${u}`,JSON.stringify(t))},[u,y]),d(()=>{if(x.current||Array.isArray(I.current))return;const e=h?.visible_columns;if(!Array.isArray(e)||0===e.length)return;const t=new Set(e),n=o(c.map(e=>({key:e.key,width:e.defaultWidth||150,hidden:!t.has(e.key)})));m(e=>l(e,n)?e:n),localStorage.setItem(`col-config-${u}`,JSON.stringify(n))},[u,h]);const X=r(/* @__PURE__ */new Map);d(()=>{m(e=>function(e,t,n){const r=new Set(t.map(e=>e.key)),i=new Set(e.map(e=>e.key)),d=t.filter(e=>!i.has(e.key)),l=e.filter(e=>"_select"===e.key||r.has(e.key));if(!d.length&&l.length===e.length)return e;for(const t of e)"_select"===t.key||r.has(t.key)||n.set(t.key,t);const u=[...l];for(const e of d){let r=-1;for(let n=t.indexOf(e)-1;n>=0;n-=1){const e=u.findIndex(e=>e.key===t[n].key);if(e>=0){r=e;break}}u.splice(r+1,0,n.get(e.key)??{key:e.key,width:e.defaultWidth||150,hidden:e.defaultHidden}),n.delete(e.key)}return o(u)}(e,c,X.current))},[c]);const A=k.filter(e=>!e.hidden),E=i((e,t)=>{t.preventDefault(),t.stopPropagation();const n=A[e],r=k.findIndex(e=>e.key===n.key),i=c.find(e=>e.key===k[r].key)?.minWidth??0;S.current={idx:r,startX:t.clientX,startWidth:Math.max(k[r].width,i)};const d=e=>{if(!S.current)return;const{idx:t,startX:n,startWidth:r}=S.current,i=c.find(e=>e.key===k[t].key)?.minWidth||30,d=Math.max(i,r+e.clientX-n);m(e=>{const n=[...e];return n[t]={...n[t],width:d},n})},l=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",l),S.current=null,m(e=>(D(e),e))};document.addEventListener("mousemove",d),document.addEventListener("mouseup",l)},[k,A,c,D]),H=i(e=>{g(e)},[]),O=i((e,t)=>{if(t.preventDefault(),null===p)return;const n=t.currentTarget.getBoundingClientRect();let r=t.clientX<n.left+n.width/2?e:e+1;const i=k.filter(e=>!e.hidden);"_select"===i[0]?.key&&0===r&&(r=1),v(r)},[p,k]),_=i((e,t)=>(t.preventDefault(),null===p||null===w||w===p||w===p+1?(g(null),void v(null)):(m(e=>{const t=e.filter(e=>!e.hidden),n=t[p];if(!n)return e;const r=e.findIndex(e=>e.key===n.key);let i;i=w<t.length?e.findIndex(e=>e.key===t[w].key):e.findIndex(e=>e.key===t[t.length-1].key)+1;const d=[...e],[l]=d.splice(r,1);return d.splice(i>r?i-1:i,0,l),D(d),d}),g(null),void v(null))),[p,w,D]),J=i(()=>{g(null),v(null)},[]),L=i(e=>{m(t=>{const n=t.map(t=>t.key===e?{...t,hidden:!t.hidden}:t);return 0===n.filter(e=>!e.hidden).length?t:(D(n),n)})},[D]),$=i(()=>{const e=o(c.map(e=>({key:e.key,width:e.defaultWidth||150,hidden:e.defaultHidden})));m(e),D(e)},[c,D]);return{orderedColumns:A.map(e=>{const t=c.find(t=>t.key===e.key);return{...t,width:Math.max(e.width,t?.minWidth??0)}}).filter(Boolean),allColumns:k.map(e=>{const t=c.find(t=>t.key===e.key);return{key:e.key,label:t?.label||e.key,hidden:!!e.hidden}}),onResizeStart:E,onDragStart:H,onDragOver:O,onDrop:_,onDragEnd:J,toggleColumn:L,resetColumns:$,draggedIdx:p,dropGap:w}}export{u as useColumnConfig};
@@ -0,0 +1 @@
1
+ var e;function t(t,n){if(void 0===e&&(e=null,"undefined"!=typeof document))try{e=document.createElement("canvas").getContext("2d")}catch{e=null}return e?(e.font=n,e.measureText(t).width):null}export{t as textWidth};
@@ -1,3 +1,3 @@
1
- import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-JMGDGNM7.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{OneLineLabel as r}from"./chunk-G67CJAQ2.js";import{useShellStrings as s}from"./chunk-IUVGHHR3.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";function l({colorClass:l,tone:c,children:a,size:m="sm",capitalize:p=!1,closable:u=!1,onClose:f,closeLabel:h,className:x=""}){const d=l??e[c??"neutral"],y="xs"===m?"px-2 py-0.5 text-3xs":"md"===m?"px-3 py-0.5 text-xs":"px-2 py-0.5 text-xs",b=p?"capitalize":"",g=s().badge,j=h??("string"==typeof a?g.removeItem(a):g.remove),k="xs"===m?"h-2.5 w-2.5":"h-3 w-3";/* @__PURE__ */
1
+ import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-WU2ZA6J2.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{OneLineLabel as r}from"./chunk-G67CJAQ2.js";import{useShellStrings as s}from"./chunk-IUVGHHR3.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";function l({colorClass:l,tone:c,children:a,size:m="sm",capitalize:p=!1,closable:u=!1,onClose:f,closeLabel:h,className:x=""}){const d=l??e[c??"neutral"],y="xs"===m?"px-2 py-0.5 text-3xs":"md"===m?"px-3 py-0.5 text-xs":"px-2 py-0.5 text-xs",b=p?"capitalize":"",g=s().badge,j=h??("string"==typeof a?g.removeItem(a):g.remove),k="xs"===m?"h-2.5 w-2.5":"h-3 w-3";/* @__PURE__ */
2
2
  return t("span",{className:[o,"font-medium",y,b,d,x].filter(Boolean).join(" "),children:[
3
3
  /* @__PURE__ */n(r,{children:a}),u&&/* @__PURE__ */n("button",{type:"button",onClick:f,"aria-label":j,className:"-mr-0.5 ml-1 inline-flex shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-strong)]",children:/* @__PURE__ */n(i,{name:"close",look:"mini",className:k,"aria-hidden":"true"})})]})}export{l as ColoredBadge};
@@ -1,4 +1,4 @@
1
- import{IconButton_default as e}from"./chunk-SV5RRBVA.js";import{CloseGlyph as t}from"./chunk-AHMYBYXJ.js";import{humanSize as n,useFileIntake as r,FileIntakeAlert as a}from"./chunk-VFSAJMNX.js";import{Button_default as s}from"./chunk-EVYD6UFQ.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{useShellStrings as c}from"./chunk-IUVGHHR3.js";import{useRef as l,useEffect as o}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function m({className:e="h-4 w-4"}){/* @__PURE__ */
1
+ import{IconButton_default as e}from"./chunk-SV5RRBVA.js";import{CloseGlyph as t}from"./chunk-G4PPHQ23.js";import{humanSize as n,useFileIntake as r,FileIntakeAlert as a}from"./chunk-VFSAJMNX.js";import{Button_default as s}from"./chunk-EVYD6UFQ.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{useShellStrings as c}from"./chunk-IUVGHHR3.js";import{useRef as l,useEffect as o}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function m({className:e="h-4 w-4"}){/* @__PURE__ */
2
2
  return d(i,{name:"attach",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function p({className:e="h-4 w-4"}){/* @__PURE__ */
3
3
  return d(i,{name:"page",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function h({intake:e,dropLabel:t,className:n="",children:r}){const a=c().files;/* @__PURE__ */
4
4
  return u("div",{...e.zoneProps,...e.pasteProps,className:`relative ${n}`,children:[r,
@@ -1,3 +1,3 @@
1
1
  import{OneLineLabel as t}from"./chunk-G67CJAQ2.js";import{createContext as s,useContext as a,useCallback as r}from"react";import{jsx as o}from"react/jsx-runtime";var e="inline-flex max-w-full items-center whitespace-nowrap rounded-full",n={success:"bg-[var(--status-success-soft)] text-[color:var(--status-success-soft-ink)]",active:"bg-[var(--status-active-soft)] text-[color:var(--status-active-soft-ink)]",queued:"bg-[var(--status-queued-soft)] text-[color:var(--status-queued-soft-ink)]",info:"bg-[var(--status-info-soft)] text-[color:var(--status-info-soft-ink)]",pending:"bg-[var(--status-pending-soft)] text-[color:var(--status-pending-soft-ink)]",warning:"bg-[var(--status-warning-soft)] text-[color:var(--status-warning-soft-ink)]",danger:"bg-[var(--status-danger-soft)] text-[color:var(--status-danger-soft-ink)]",draft:"bg-[var(--status-draft-soft)] text-[color:var(--status-draft-soft-ink)]",neutral:"bg-[var(--status-neutral-soft)] text-[color:var(--status-neutral-soft-ink)]"},u={success:"bg-[var(--status-success-solid)] text-[color:var(--status-on-solid)]",active:"bg-[var(--status-active-solid)] text-[color:var(--status-on-solid)]",queued:"bg-[var(--status-queued-solid)] text-[color:var(--status-on-solid)]",info:"bg-[var(--status-info-solid)] text-[color:var(--status-on-solid)]",pending:"bg-[var(--status-pending-solid)] text-[color:var(--status-on-solid)]",warning:"bg-[var(--status-warning-solid)] text-[color:var(--status-on-solid)]",danger:"bg-[var(--status-danger-solid)] text-[color:var(--status-on-solid)]",draft:"bg-[var(--status-draft-solid)] text-[color:var(--status-on-solid)]",neutral:"bg-[var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function i(t,s="subtle"){return"solid"===s?u[t]:n[t]}var l=s({}),c=s(void 0);function d(t){return t.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}function v({groups:t,labelFor:s,children:a}){/* @__PURE__ */
2
2
  return o(l.Provider,{value:t,children:/* @__PURE__ */o(c.Provider,{value:s,children:a})})}function f(){const t=a(c);return r(s=>t?.(s)??d(s),[t])}function g({status:s,label:r,emphasis:n="subtle"}){const u=i(a(l)[s]??"neutral",n),v=a(c),f=r??v?.(s)??d(s);/* @__PURE__ */
3
- return o("span",{className:`${e} px-3 py-0.5 text-xs font-medium ${u}`,children:/* @__PURE__ */o(t,{children:f})})}export{e as BADGE_PILL,n as GROUP_COLORS,u as GROUP_COLORS_SOLID,g as StatusBadge,v as StatusBadgeProvider,i as groupColors,f as useStatusLabel};
3
+ return o("span",{className:`${e} px-3 py-0.5 text-xs font-medium ${u}`,children:/* @__PURE__ */o(t,{children:f})})}export{e as BADGE_PILL,n as GROUP_COLORS,u as GROUP_COLORS_SOLID,g as StatusBadge,v as StatusBadgeProvider,i as groupColors,d as statusLabel,f as useStatusLabel};
@@ -1,4 +1,4 @@
1
- import{useWindowMenuItem as e,Modal as t}from"./chunk-XRTH47EO.js";import{navIcons as r}from"./chunk-4LXCCZDM.js";import{VERSION as n}from"./chunk-EZQHUQOP.js";import{Icon as s}from"./chunk-ISVODSRP.js";import{DEFAULT_SHELL_STRINGS as i,useShellStrings as o,splitAround as a}from"./chunk-IUVGHHR3.js";import{useState as l,useCallback as m,isValidElement as c,cloneElement as p}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var h=i.aboutApp,x={notepad:{name:"Notepad",version:"1.1.0",route:"/notepad",description:h.notepad},preview:{name:"Preview",version:"1.5.0",route:"/preview",description:h.preview},files:{name:"Files",version:"2.0.1",route:"/files",description:h.files},browser:{name:"Browser",version:"1.0.3",route:"/browser",description:h.browser}},u=/* @__PURE__ */d(s,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),w=/* @__PURE__ */d(s,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function v({app:s}){const i=x[s],[h,v]=l(!1),N=m(()=>v(!0),[]),b=o().aboutApp,k=b.title(i.name);if(e(k,N,u),!h)return null;const g=r[i.route],y=c(g)?p(g,{className:"h-9 w-9"}):w,[j,H]=a(b.partOf);/* @__PURE__ */
1
+ import{useWindowMenuItem as e,Modal as t}from"./chunk-775K6APE.js";import{navIcons as r}from"./chunk-4LXCCZDM.js";import{VERSION as n}from"./chunk-KY3KGRGC.js";import{Icon as s}from"./chunk-ISVODSRP.js";import{DEFAULT_SHELL_STRINGS as i,useShellStrings as o,splitAround as a}from"./chunk-IUVGHHR3.js";import{useState as l,useCallback as m,isValidElement as c,cloneElement as p}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var h=i.aboutApp,x={notepad:{name:"Notepad",version:"1.1.0",route:"/notepad",description:h.notepad},preview:{name:"Preview",version:"1.5.0",route:"/preview",description:h.preview},files:{name:"Files",version:"2.0.1",route:"/files",description:h.files},browser:{name:"Browser",version:"1.0.3",route:"/browser",description:h.browser}},u=/* @__PURE__ */d(s,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),w=/* @__PURE__ */d(s,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function v({app:s}){const i=x[s],[h,v]=l(!1),N=m(()=>v(!0),[]),b=o().aboutApp,k=b.title(i.name);if(e(k,N,u),!h)return null;const g=r[i.route],y=c(g)?p(g,{className:"h-9 w-9"}):w,[j,C]=a(b.partOf);/* @__PURE__ */
2
2
  return d(t,{open:!0,onClose:()=>v(!1),title:k,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */f("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
3
3
  /* @__PURE__ */d("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:y}),
4
4
  /* @__PURE__ */d("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:i.name}),
@@ -6,4 +6,4 @@ return d(t,{open:!0,onClose:()=>v(!1),title:k,size:"sm",compact:!0,bodyScroll:!1
6
6
  /* @__PURE__ */d("p",{className:"mt-2 text-xs text-gray-500 leading-relaxed",children:b[s]}),
7
7
  /* @__PURE__ */f("div",{className:"mt-4 pt-3 border-t border-gray-200 w-full",children:[
8
8
  /* @__PURE__ */f("p",{className:"text-2xs text-ink-faint",children:[j,
9
- /* @__PURE__ */d("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),H]}),n&&/* @__PURE__ */d("p",{className:"mt-0.5 text-2xs font-mono text-ink-faintest",children:b.shellVersion(n)})]})]})})}export{v as AboutApp,x as BUILTIN_APP_INFO};
9
+ /* @__PURE__ */d("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),C]}),n&&/* @__PURE__ */d("p",{className:"mt-0.5 text-2xs font-mono text-ink-faintest",children:b.shellVersion(n)})]})]})})}export{v as AboutApp,x as BUILTIN_APP_INFO};
@@ -0,0 +1,6 @@
1
+ import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as r,COLUMN_SHARE_MIN as t,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-F5B5WOQ7.js";import{textWidth as l}from"./chunk-UVCMV2TL.js";import{Tooltip as i}from"./chunk-SOZCWT6I.js";import{useShellStrings as a}from"./chunk-IUVGHHR3.js";import{useId as s,useRef as c,useState as u,useEffect as d,Fragment as h}from"react";import{jsxs as f,jsx as m}from"react/jsx-runtime";var p=(e,r,t)=>Math.min(t,Math.max(r,e)),g=e=>e.reduce((e,r)=>e+r,0),v=(e,r)=>e.length===r.length&&e.every((e,t)=>e===r[t]);var b="w-0.5",y=`${b} group-hover/widths:w-1 group-focus-visible/widths:w-1`;var w=["text-blue-700","text-gray-600"];function x({count:x,value:$,onChange:k,label:C,"aria-labelledby":N,readOnly:P=!1,disabled:M=!1,className:j=""}){const R=a().widths,z=s(),B=p(Math.round(x)||1,1,n),O=e($,B),S=O??[...r[B]??[]],A=[...S,100-g(S)],T=P||M,D=c(null),H=c({onChange:k,shown:S,locked:T,n:B,stored:O});H.current={onChange:k,shown:S,locked:T,n:B,stored:O};const I=r=>{const{onChange:t,shown:n,locked:o,n:l}=H.current;if(o)return!1;const i=e(r,l);return!(!i||v(i,n))&&(t(i),!0)},K=(e,r,n)=>{const o=e[r]+e[r+1],l=[...e];l[r]=p(Math.round(n),t,o-t),l[r+1]=o-l[r],I(l.slice(0,-1))&&(ne.current=null)},L=e=>r=>{if(r.altKey||r.ctrlKey||r.metaKey)return;const n=r.shiftKey?10:1,o=A[e]+A[e+1],l="ArrowRight"===r.key?A[e]+n:"ArrowLeft"===r.key?A[e]-n:"PageUp"===r.key?A[e]+10:"PageDown"===r.key?A[e]-10:"Home"===r.key?t:"End"===r.key?o-t:null;null!==l&&(r.preventDefault(),K(A,e,l))},U=c(null),[V,W]=u(null),E=()=>{U.current=null,W(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};d(()=>E,[]);const F=e=>r=>{if(0!==r.button||T)return;r.preventDefault();const t=D.current?.getBoundingClientRect().width??0;t<=0||(U.current={i:e,x:r.clientX,width:t,from:A,moved:!1,pointer:r.pointerId},W(e),r.currentTarget.setPointerCapture?.(r.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},G=e=>{const r=U.current;if(!r)return;if(0===e.buttons)return void E();const t=e.clientX-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}K(r.from,r.i,r.from[r.i]+t/r.width*100)},X=e=>{const r=U.current;r&&(e.currentTarget.hasPointerCapture?.(r.pointer)&&e.currentTarget.releasePointerCapture(r.pointer),E())},q=(e,r)=>{const{shown:n}=H.current,o=function(e,r,n){const o=e.length,l=[...e];if(o<2)return l;const i=p(Math.round(n),t,100-(o-1)*t);let a=i-l[r];l[r]=i;const s=[...Array.from({length:o-1-r},(e,t)=>r+1+t),...Array.from({length:r},(e,t)=>r-1-t)];if(a<0)return l[s[0]]-=a,l;for(const e of s){if(a<=0)break;const r=Math.min(a,l[e]-t);l[e]-=r,a-=r}return l}([...n,100-g(n)],e,r);return I(o.slice(0,-1))?o:null},[J,Q]=u(0);d(()=>{const e=D.current;if(!e||"undefined"==typeof ResizeObserver)return;const r=new ResizeObserver(()=>Q(e.getBoundingClientRect().width));return r.observe(e),()=>r.disconnect()},[]);const Z=c(null),[Y,_]=u(null),[ee,re]=u([]),te=(e,r)=>_(t=>r?e:t===e?null:t),ne=c(null),oe=(e,r)=>{const t=ne.current;if(!t||t.column!==e||t.share!==r)return!1;const{onChange:n,locked:o,stored:l}=H.current;var i,a;return o||(i=l,a=t.stored,void 0===i||void 0===a?i===a:v(i,a))||n(t.stored),!0},le=A.join(",");d(()=>{const e=null===Y?[]:function(e,r){if(!e)return[];const t=Array.from(e.querySelectorAll("input[data-widths-label]")),n=t[r]?.getBoundingClientRect();return n&&0!==n.width?null===l("","12px sans-serif")?[]:t.flatMap((e,t)=>{if(t===r)return[];const o=e.getBoundingClientRect(),i=getComputedStyle(e),a=(l(e.value,`${i.fontWeight} ${i.fontSize} ${i.fontFamily}`)??0)/2,s=(o.left+o.right)/2;return s+a>n.left&&s-a<n.right?[t]:[]}):[]}(Z.current,Y);re(r=>v(r,e)?r:e)},[Y,le,J]);const ie=R.hint(B,t),ae=A.slice(0,-1).map((e,r)=>g(A.slice(0,r+1)));/* @__PURE__ */
2
+ return f("div",{role:"group","aria-label":N?void 0:C,"aria-labelledby":N,"aria-describedby":B>1?z:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${M?"opacity-60":""} ${j}`.trim(),children:[
3
+ /* @__PURE__ */f("div",{ref:Z,"data-widths-bar":"",className:"relative h-8",children:[
4
+ /* @__PURE__ */m("div",{ref:D,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-surface",children:A.map((e,r)=>/* @__PURE__ */m("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${w[r%2]} ${r%2==0?"bg-accent-tint":""}`,children:1===B&&/* @__PURE__ */m("span",{"data-widths-label":"",children:`${e}%`})},r))}),
5
+ /* @__PURE__ */m("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-line-strong"}),B>1&&A.map((e,r)=>/* @__PURE__ */f(h,{children:[(()=>{const n=Y===r,l=g(A.slice(0,r)),a=n?`max(${e}%, 40px)`:`${e}%`;/* @__PURE__ */
6
+ return m("div",{"data-widths-tip":"",className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${l+e/2}% - ${a} / 2), calc(100% - ${a}))`,width:a},children:/* @__PURE__ */m(i,{content:ie,delay:600,describe:!1,className:"absolute inset-0",children:/* @__PURE__ */m(o,{appearance:"bare",value:e,display:()=>(e=>J>0&&J*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:t,max:100-(B-1)*t,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:P,disabled:M,"aria-label":R.column(r+1),"aria-describedby":z,"data-widths-label":"",onChange:e=>{null===e||oe(r,e)||q(r,e)},onRevert:e=>((e,r)=>{H.current.locked||null===r||oe(e,r)||q(e,r)})(r,e),onFocus:()=>{ne.current={column:r,share:e,stored:H.current.stored},te(r,!0)},onBlur:()=>te(r,!1),className:`absolute inset-0 text-xs font-medium ${w[r%2]} ${ee.includes(r)&&!n?"opacity-0":""}`})})})})(),r<B-1&&/* @__PURE__ */m("div",{className:"absolute inset-y-0 z-10 w-3 -translate-x-1/2",style:{left:`${ae[r]}%`},children:/* @__PURE__ */m(i,{content:R.dragHint,delay:600,className:"relative flex h-full w-full",children:/* @__PURE__ */m("div",{role:"separator",tabIndex:M?-1:0,"aria-orientation":"vertical","aria-label":R.divider(r+1,r+2),"aria-valuenow":A[r],"aria-valuemin":t,"aria-valuemax":A[r]+A[r+1]-t,"aria-valuetext":R.dividerValue(r+1,A[r],r+2,A[r+1]),"aria-disabled":T||void 0,onKeyDown:T?void 0:L(r),onPointerDown:F(r),onPointerMove:G,onPointerUp:X,onPointerCancel:X,onLostPointerCapture:()=>{U.current&&E()},className:"group/widths flex h-full w-full touch-none justify-center rounded-(--radius-control) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(T?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */m("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(T?`${b} bg-gray-300`:`bg-accent-fill transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${V===r?"w-1":y}`)})})})})]},r))]}),B>1&&/* @__PURE__ */m("span",{id:z,className:"sr-only",children:ie})]})}export{x as WidthsBar};
@@ -1,11 +1,11 @@
1
- import{FormField as e}from"./chunk-6KBDNYRW.js";import{ImageFocusPoint as i}from"./chunk-5POQCJL6.js";import{Segmented as a}from"./chunk-HNIIDDLJ.js";import{isVideoUrl as t,mediaPromptLine as r,mediaFileName as o,FilenameBadge as n,BusyOverlay as s,UploadGlyph as l,zoneFocusClass as c,dropzoneClass as d}from"./chunk-AHMYBYXJ.js";import{TransferProgress as u}from"./chunk-L3BECLHD.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-VFSAJMNX.js";import{Icon as p}from"./chunk-ISVODSRP.js";import{useShellStrings as b}from"./chunk-IUVGHHR3.js";import{useState as f,useRef as g,useEffect as v,useId as y}from"react";import{jsxs as k,jsx as x,Fragment as j}from"react/jsx-runtime";var N=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:R,onFile:C,label:$,hint:F,error:U,required:z,className:H,accept:P="image/*",maxSizeBytes:O,fit:I="cover",height:B,shape:D="rect",placeholder:S,cta:q,acceptHint:J,showFilename:V=!0,allowReplace:A=!0,allowRemove:Y=!0,replaceLabel:K,removeLabel:M,busy:W=!1,busyLabel:X,choosingLabel:_,pickFailedLabel:E,progress:G,disabled:Q=!1,kind:T,onKindChange:Z,focus:ee,onFocusChange:ie,focusLabel:ae}){const te=b().media,re="circle"===D,oe=B??(re?96:112),ne=q??te.cta,se=T??(/video/.test(P)&&!/image/.test(P)?"video":"image"),le="string"==typeof M&&M?M:te.remove,[ce,de]=f(!1),[ue,me]=f(!1),he=g(!0);v(()=>()=>{he.current=!1},[]);const pe=W||ce,be=ce&&!W?_??te.choosing:X??te.uploading,fe=U??(ue?E??te.pickFailed:void 0),ge=e=>{if(!R)return;me(!1);const i=R(e);i&&"function"==typeof i.then&&(de(!0),i.then(e=>{he.current&&(de(!1),"string"==typeof e&&e&&L(e))},()=>{he.current&&(de(!1),me(!0))}))},ve=y(),ye=g(null),[ke,xe]=f(null);v(()=>()=>{ye.current&&URL.revokeObjectURL(ye.current)},[]);const je=Q||pe,Ne=!!w&&(t(w,P)||w===ke),we=S??r(P,te),Le=K??(Ne||"video"===se?te.changeVideo:te.changeImage),Re=e=>{R?ge(e):C?C(e):(e=>{ye.current&&URL.revokeObjectURL(ye.current);const i=URL.createObjectURL(e);ye.current=i,xe(e.type.startsWith("video/")?i:null),L(i)})(e)},Ce=m({accept:P,maxSizeBytes:O,acceptHint:J,multiple:!1,disabled:je,onAccept:([e])=>Re(e)}),{dragOver:$e}=Ce,Fe=()=>{je||(R?ge():Ce.open())},Ue=w?o(w):"",ze=!re&&!Ne&&!!ie,He=Q||!A&&!Y?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:[re?"absolute inset-0 flex items-center justify-center gap-1 p-1 text-(--status-on-solid)":"absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[A&&/* @__PURE__ */k("button",{id:ze?void 0:ve,type:"button","aria-labelledby":`${ve}-change`,onClick:()=>Fe(),disabled:pe,className:re?`w-8 shrink-0 ${N}`:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${N}`,children:[
1
+ import{FormField as e}from"./chunk-6KBDNYRW.js";import{ImageFocusPoint as i}from"./chunk-5POQCJL6.js";import{Segmented as a}from"./chunk-HNIIDDLJ.js";import{isVideoUrl as t,mediaPromptLine as r,mediaFileName as o,FilenameBadge as n,BusyOverlay as s,UploadGlyph as l,zoneFocusClass as c,dropzoneClass as d}from"./chunk-G4PPHQ23.js";import{TransferProgress as u}from"./chunk-6LS6Q77E.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-VFSAJMNX.js";import{Icon as p}from"./chunk-ISVODSRP.js";import{useShellStrings as b}from"./chunk-IUVGHHR3.js";import{useState as f,useRef as g,useEffect as v,useId as y}from"react";import{jsxs as k,jsx as x,Fragment as j}from"react/jsx-runtime";var N=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:R,onFile:C,label:P,hint:$,error:F,required:U,className:z,accept:H="image/*",maxSizeBytes:O,fit:I="cover",height:S,shape:q="rect",placeholder:D,cta:V,acceptHint:B,showFilename:J=!0,allowReplace:Q=!0,allowRemove:A=!0,replaceLabel:G,removeLabel:K,busy:W=!1,busyLabel:_,choosingLabel:E,pickFailedLabel:M,progress:X,disabled:Y=!1,kind:T,onKindChange:Z,focus:ee,onFocusChange:ie,focusLabel:ae}){const te=b().media,re="circle"===q,oe=S??(re?96:112),ne=V??te.cta,se=T??(/video/.test(H)&&!/image/.test(H)?"video":"image"),le="string"==typeof K&&K?K:te.remove,[ce,de]=f(!1),[ue,me]=f(!1),he=g(!0);v(()=>()=>{he.current=!1},[]);const pe=W||ce,be=ce&&!W?E??te.choosing:_??te.uploading,fe=F??(ue?M??te.pickFailed:void 0),ge=e=>{if(!R)return;me(!1);const i=R(e);i&&"function"==typeof i.then&&(de(!0),i.then(e=>{he.current&&(de(!1),"string"==typeof e&&e&&L(e))},()=>{he.current&&(de(!1),me(!0))}))},ve=y(),ye=g(null),[ke,xe]=f(null);v(()=>()=>{ye.current&&URL.revokeObjectURL(ye.current)},[]);const je=Y||pe,Ne=!!w&&(t(w,H)||w===ke),we=D??r(H,te),Le=G??(Ne||"video"===se?te.changeVideo:te.changeImage),Re=e=>{R?ge(e):C?C(e):(e=>{ye.current&&URL.revokeObjectURL(ye.current);const i=URL.createObjectURL(e);ye.current=i,xe(e.type.startsWith("video/")?i:null),L(i)})(e)},Ce=m({accept:H,maxSizeBytes:O,acceptHint:B,multiple:!1,disabled:je,onAccept:([e])=>Re(e)}),{dragOver:Pe}=Ce,$e=()=>{je||(R?ge():Ce.open())},Fe=w?o(w):"",Ue=!re&&!Ne&&!!ie,ze=Y||!Q&&!A?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:[re?"absolute inset-0 flex items-center justify-center gap-1 p-1 text-(--status-on-solid)":"absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[Q&&/* @__PURE__ */k("button",{id:Ue?void 0:ve,type:"button","aria-labelledby":`${ve}-change`,onClick:()=>$e(),disabled:pe,className:re?`w-8 shrink-0 ${N}`:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${N}`,children:[
2
2
  /* @__PURE__ */x(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
3
- /* @__PURE__ */x("span",{id:`${ve}-change`,className:re?"sr-only":"truncate",children:Le})]}),Y&&/* @__PURE__ */x("button",{type:"button","aria-label":le,onClick:()=>{ye.current&&(URL.revokeObjectURL(ye.current),ye.current=null),xe(null),L("")},disabled:pe,className:`${re?"":"ml-auto "}w-8 shrink-0 ${N}`,children:/* @__PURE__ */x(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Pe=/* @__PURE__ */k("div",{...Ce.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden border transition-colors",re?"shrink-0 rounded-full":"rounded-(--radius-control)",ze?"":"bg-gray-100",$e?"border-blue-500":"border-line"].join(" "),style:ze?void 0:re?{height:oe,width:oe}:{height:oe},children:[ze?
4
- /* @__PURE__ */x(i,{value:ee??"",onChange:e=>ie?.(e),label:ae??te.focus,image:w,hint:null,id:ve,disabled:je,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):Ne?/* @__PURE__ */x("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Ue||void 0,className:"h-full w-full",style:{objectFit:I}}):/* @__PURE__ */x("img",{src:w??void 0,alt:Ue,className:"h-full w-full",style:{objectFit:I,objectPosition:ee||void 0}}),V&&!re&&w&&/* @__PURE__ */x(n,{children:Ue}),He,pe&&/* @__PURE__ */x(s,{label:be,progress:G,rounded:re?"rounded-full":"rounded-md"})]}),Oe=/* @__PURE__ */k(j,{children:[
3
+ /* @__PURE__ */x("span",{id:`${ve}-change`,className:re?"sr-only":"truncate",children:Le})]}),A&&/* @__PURE__ */x("button",{type:"button","aria-label":le,onClick:()=>{ye.current&&(URL.revokeObjectURL(ye.current),ye.current=null),xe(null),L("")},disabled:pe,className:`${re?"":"ml-auto "}w-8 shrink-0 ${N}`,children:/* @__PURE__ */x(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),He=/* @__PURE__ */k("div",{...Ce.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden border transition-colors",re?"shrink-0 rounded-full":"rounded-(--radius-control)",Ue?"":"bg-gray-100",Pe?"border-blue-500":"border-line"].join(" "),style:Ue?void 0:re?{height:oe,width:oe}:{height:oe},children:[Ue?
4
+ /* @__PURE__ */x(i,{value:ee??"",onChange:e=>ie?.(e),label:ae??te.focus,image:w,hint:null,id:ve,disabled:je,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):Ne?/* @__PURE__ */x("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Fe||void 0,className:"h-full w-full",style:{objectFit:I}}):/* @__PURE__ */x("img",{src:w??void 0,alt:Fe,className:"h-full w-full",style:{objectFit:I,objectPosition:ee||void 0}}),J&&!re&&w&&/* @__PURE__ */x(n,{children:Fe}),ze,pe&&/* @__PURE__ */x(s,{label:be,progress:X,rounded:re?"rounded-full":"rounded-md"})]}),Oe=/* @__PURE__ */k(j,{children:[
5
5
  /* @__PURE__ */x("span",{className:"px-3 text-xs text-ink-faint",children:we}),
6
- /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:ne}),J&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:J})]}),Ie=/* @__PURE__ */k("button",{type:"button",id:ve,onClick:()=>Fe(),disabled:je,"aria-label":"string"==typeof we?we:te.upload,"aria-busy":pe||void 0,"aria-invalid":!!fe||void 0,"aria-required":z||void 0,"aria-describedby":fe?`${ve}-error`:F?`${ve}-hint`:void 0,...Ce.zoneProps,"data-media-circle":"",className:["group/zone flex w-full items-center gap-4 rounded-lg text-left",je?"cursor-not-allowed opacity-60":"cursor-pointer",c(je)].join(" "),children:[
7
- /* @__PURE__ */x("span",{className:["flex shrink-0 items-center justify-center rounded-full border-2 border-dashed text-ink-faintest transition-colors",$e?"border-accent-fill bg-accent-tint":"border-line-strong bg-surface-sunken group-hover/zone:bg-accent-tint"].join(" "),style:{height:oe,width:oe},children:/* @__PURE__ */x(l,{})}),
8
- /* @__PURE__ */x("span",{className:"flex min-w-0 flex-col items-start gap-1 [&>span]:px-0",children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:G}):Oe})]}),Be=re?Ie:/* @__PURE__ */x("button",{type:"button",id:ve,onClick:()=>Fe(),disabled:je,"aria-label":"string"==typeof we?we:te.upload,"aria-busy":pe||void 0,"aria-invalid":!!fe||void 0,"aria-required":z||void 0,"aria-describedby":fe?`${ve}-error`:F?`${ve}-hint`:void 0,...Ce.zoneProps,className:d($e,je,c(je)),style:{minHeight:oe},children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:G}):/* @__PURE__ */k(j,{children:[
6
+ /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:ne}),B&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:B})]}),Ie=/* @__PURE__ */k("button",{type:"button",id:ve,onClick:()=>$e(),disabled:je,"aria-label":"string"==typeof we?we:te.upload,"aria-busy":pe||void 0,"aria-invalid":!!fe||void 0,"aria-required":U||void 0,"aria-describedby":fe?`${ve}-error`:$?`${ve}-hint`:void 0,...Ce.zoneProps,"data-media-circle":"",className:["group/zone flex w-full items-center gap-4 rounded-lg text-left",je?"cursor-not-allowed opacity-60":"cursor-pointer",c(je)].join(" "),children:[
7
+ /* @__PURE__ */x("span",{className:["flex shrink-0 items-center justify-center rounded-full border-2 border-dashed text-ink-faintest transition-colors",Pe?"border-accent-fill bg-accent-tint":"border-line-strong bg-surface-sunken group-hover/zone:bg-accent-tint"].join(" "),style:{height:oe,width:oe},children:/* @__PURE__ */x(l,{})}),
8
+ /* @__PURE__ */x("span",{className:"flex min-w-0 flex-col items-start gap-1 [&>span]:px-0",children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:X}):Oe})]}),Se=re?Ie:/* @__PURE__ */x("button",{type:"button",id:ve,onClick:()=>$e(),disabled:je,"aria-label":"string"==typeof we?we:te.upload,"aria-busy":pe||void 0,"aria-invalid":!!fe||void 0,"aria-required":U||void 0,"aria-describedby":fe?`${ve}-error`:$?`${ve}-hint`:void 0,...Ce.zoneProps,className:d(Pe,je,c(je)),style:{minHeight:oe},children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:X}):/* @__PURE__ */k(j,{children:[
9
9
  /* @__PURE__ */x("span",{className:"text-ink-faintest",children:/* @__PURE__ */x(l,{})}),Oe]})});/* @__PURE__ */
10
- return k(e,{label:$,htmlFor:ve,hint:F,error:fe,required:z,className:H,children:[Z&&/* @__PURE__ */x("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */x(a,{value:se,onChange:e=>Z(e),options:[{value:"image",label:te.image,icon:/* @__PURE__ */x(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:je},{value:"video",label:te.video,icon:/* @__PURE__ */x(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:je}],block:!0,size:"md",label:"string"==typeof $&&$?$:te.upload})}),w?Pe:Be,!R&&/* @__PURE__ */x("input",{...Ce.inputProps}),
10
+ return k(e,{label:P,htmlFor:ve,hint:$,error:fe,required:U,className:z,children:[Z&&/* @__PURE__ */x("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */x(a,{value:se,onChange:e=>Z(e),options:[{value:"image",label:te.image,icon:/* @__PURE__ */x(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:je},{value:"video",label:te.video,icon:/* @__PURE__ */x(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:je}],block:!0,size:"md",label:"string"==typeof P&&P?P:te.upload})}),w?He:Se,!R&&/* @__PURE__ */x("input",{...Ce.inputProps}),
11
11
  /* @__PURE__ */x(h,{rejections:Ce.rejections})]})}export{w as MediaUploadField};
@@ -1,13 +1,13 @@
1
- import{copyToClipboard as e,selectionAt as t}from"./chunk-UFX7F3KG.js";import{useTableNav as n}from"./chunk-ATMJ5ZPK.js";import{escapeHtml as r}from"./chunk-G6DKCCWH.js";import{ListFooter as o}from"./chunk-DO3DSSAW.js";import{ListLoadError as l}from"./chunk-VCR3RADH.js";import{ResizableTable as i}from"./chunk-3PLQKRD4.js";import{Checkbox_default as a}from"./chunk-CGZBDI6C.js";import{LoadingSpinner as c}from"./chunk-4U5M37SF.js";import{PopupMenu as d,PopupMenuLabel as s,PopupMenuItem as h,PopupMenuDivider as m}from"./chunk-GOAFMGUI.js";import{keepsNativeMenu as u}from"./chunk-5QFPTDQF.js";import{LoadingSpinner as p}from"./chunk-R2VKEMZH.js";import{shellHttp as f}from"./chunk-STKJA4PV.js";import{toast_default as g}from"./chunk-VQ35LXDC.js";import{useShellStrings as y}from"./chunk-IUVGHHR3.js";import{useState as k,useRef as b}from"react";import{jsx as x,Fragment as w,jsxs as C}from"react/jsx-runtime";function j(e){return Array.from(e.children).filter(e=>void 0!==e.dataset?.colKey&&"_select"!==e.dataset.colKey)}function v(e){return("string"==typeof e.innerText?e.innerText:e.textContent??"").replace(/\s+/g," ").trim()}function S(S){const{items:R,isLoading:L,emptyState:N,totalCount:A,isError:$,onRetry:D,errorTitle:F,errorMessage:K,tableId:M,columns:T,renderCell:U,getRowId:E=e=>e.id,sort:P,onSort:I,selected:H,setSelected:G,onRowClick:O,onRowHover:V,getRowClassName:W,footerLabel:Q,footerExtra:_,footerExtraAfter:B,sentinelRef:J,isFetchingNextPage:X,saveDefaultPerms:Z,exportEndpoint:z,exportFilename:q="export.csv",contextActions:Y}=S,[ee,te]=k(null),ne=b(null),re=y(),oe=re.entityList,le=e=>{G(t=>{const n=new Set(t),r=E(e);return n.has(r)?n.delete(r):n.add(r),n})},ie=()=>{G(e=>{const t=R.map(E),n=new Set(e);return t.every(t=>e.has(t))?t.forEach(e=>n.delete(e)):t.forEach(e=>n.add(e)),n})},ae=n(R,O,le,ie,(e,t)=>{G(n=>{const r=new Set(n);for(let n=e;n<=t;n++)r.add(E(R[n]));return r})},ne),ce=R.filter(e=>H.has(E(e))),de=()=>{const e=[...ne.current?.querySelectorAll("tr[data-row-idx]")??[]].filter(e=>{const t=R[Number(e.dataset.rowIdx)];return void 0!==t&&H.has(E(t))}),t=e.length?j(e[0]).map(e=>e.dataset.colKey??""):[],n=new Map(T.map(e=>[e.key,e.label]));return{keys:t,header:t.map(e=>n.get(e)??e),body:e.map(e=>j(e).map(v))}},se=()=>{te(null);const{header:t,body:n}=de();if(!n.length)return;const o=[t,...n].map(e=>e.join("\t")).join("\n"),l="<table><thead><tr>"+t.map(e=>`<th>${r(e)}</th>`).join("")+"</tr></thead><tbody>"+n.map(e=>`<tr>${e.map(e=>`<td>${r(e)}</td>`).join("")}</tr>`).join("")+"</tbody></table>";e(oe.copiedRows(n.length),o,l)},he=async()=>{te(null);const e=ce.map(E);if(!e.length||!z)return;const t=new URLSearchParams({ids:e.join(",")}),n=(()=>{const e=new Map(T.map(e=>[e.key,e.exportLabel??e.label]));try{const t=localStorage.getItem(`col-config-${M}`);if(t){const n=JSON.parse(t).filter(t=>!t.hidden&&"_select"!==t.key&&e.has(t.key)).map(t=>`${t.key}|${e.get(t.key)}`);if(n.length)return n.join(",")}}catch{}return T.filter(e=>!e.defaultHidden).map(e=>`${e.key}|${e.exportLabel??e.label}`).join(",")})();n&&t.set("cols",n);const r=z.includes("?")?"&":"?";try{const n=await f.get(`${z}${r}${t}`,{responseType:"blob"}),o=window.URL.createObjectURL(new Blob([n.data],{type:"text/csv"})),l=document.createElement("a");l.href=o,l.download=q,l.click(),window.URL.revokeObjectURL(o);const i=n.headers??{},a=Number(i["x-row-count"]);if("true"===String(i["x-truncated"]))return void g.notify(Number.isFinite(a)?oe.exportTruncated(a,e.length):oe.exportTruncatedUnknown(e.length));g.success(oe.exported(e.length))}catch{g.error(oe.exportFailed)}};if(L)/* @__PURE__ */return x(c,{});if($&&0===R.length)/* @__PURE__ */
2
- return x(l,{title:F,message:K,onRetry:D});if(0===R.length)/* @__PURE__ */return x(w,{children:N});const me=R.length>0&&ce.length===R.length,ue=ce.length>0&&!me,pe=H.size-ce.length,fe=[{key:"_select",label:"",defaultWidth:52,minWidth:52,headerNode:/* @__PURE__ */x(a,{"aria-label":re.table.selectAll,checked:me,indeterminate:ue,onChange:ie,style:{height:14,width:14}})},...T],ge=/* @__PURE__ */x(o,{selectedCount:ce.length,hiddenSelectedCount:pe,loadedCount:R.length,totalCount:A,label:Q,isFetchingMore:X,extra:_,extraAfter:B}),ye=J?/* @__PURE__ */C(w,{children:[
3
- /* @__PURE__ */x("div",{ref:J}),X&&/* @__PURE__ */x(p,{size:"sm",padding:"py-3",label:re.list.loadingMore})]}):void 0;let ke=null;if(ee){const{x:t,y:n,item:r,text:o,firstColumn:l}=ee,i=Y?Y(ce):[],a=ce.length,c=()=>te(null),u=void 0!==A&&A>R.length;ke=/* @__PURE__ */C(d,{portal:!0,style:{left:t,top:n},onClose:c,minWidth:210,children:[
1
+ import{copyToClipboard as e,selectionAt as t}from"./chunk-UFX7F3KG.js";import{useTableNav as n}from"./chunk-ATMJ5ZPK.js";import{escapeHtml as r}from"./chunk-G6DKCCWH.js";import{ListFooter as o}from"./chunk-DO3DSSAW.js";import{ListLoadError as l}from"./chunk-VCR3RADH.js";import{ResizableTable as i}from"./chunk-64PPKUJG.js";import{Checkbox_default as a}from"./chunk-CGZBDI6C.js";import{LoadingSpinner as c}from"./chunk-4U5M37SF.js";import{PopupMenu as d,PopupMenuLabel as s,PopupMenuItem as h,PopupMenuDivider as m}from"./chunk-GOAFMGUI.js";import{keepsNativeMenu as u}from"./chunk-5QFPTDQF.js";import{LoadingSpinner as p}from"./chunk-R2VKEMZH.js";import{shellHttp as f}from"./chunk-STKJA4PV.js";import{toast_default as g}from"./chunk-VQ35LXDC.js";import{useShellStrings as y}from"./chunk-IUVGHHR3.js";import{useState as k,useRef as b}from"react";import{jsx as x,Fragment as w,jsxs as C}from"react/jsx-runtime";function j(e){return Array.from(e.children).filter(e=>void 0!==e.dataset?.colKey&&"_select"!==e.dataset.colKey)}function v(e){return("string"==typeof e.innerText?e.innerText:e.textContent??"").replace(/\s+/g," ").trim()}function S(S){const{items:R,isLoading:N,emptyState:A,totalCount:L,isError:$,onRetry:F,errorTitle:K,errorMessage:M,tableId:T,columns:U,renderCell:D,getRowId:P=e=>e.id,sort:E,onSort:I,selected:G,setSelected:H,onRowClick:O,onRowHover:V,getRowClassName:W,footerLabel:J,footerExtra:_,footerExtraAfter:B,sentinelRef:Q,isFetchingNextPage:X,saveDefaultPerms:Z,exportEndpoint:z,exportFilename:q="export.csv",contextActions:Y}=S,[ee,te]=k(null),ne=b(null),re=y(),oe=re.entityList,le=e=>{H(t=>{const n=new Set(t),r=P(e);return n.has(r)?n.delete(r):n.add(r),n})},ie=()=>{H(e=>{const t=R.map(P),n=new Set(e);return t.every(t=>e.has(t))?t.forEach(e=>n.delete(e)):t.forEach(e=>n.add(e)),n})},ae=n(R,O,le,ie,(e,t)=>{H(n=>{const r=new Set(n);for(let n=e;n<=t;n++)r.add(P(R[n]));return r})},ne),ce=R.filter(e=>G.has(P(e))),de=()=>{const e=[...ne.current?.querySelectorAll("tr[data-row-idx]")??[]].filter(e=>{const t=R[Number(e.dataset.rowIdx)];return void 0!==t&&G.has(P(t))}),t=e.length?j(e[0]).map(e=>e.dataset.colKey??""):[],n=new Map(U.map(e=>[e.key,e.label]));return{keys:t,header:t.map(e=>n.get(e)??e),body:e.map(e=>j(e).map(v))}},se=()=>{te(null);const{header:t,body:n}=de();if(!n.length)return;const o=[t,...n].map(e=>e.join("\t")).join("\n"),l="<table><thead><tr>"+t.map(e=>`<th>${r(e)}</th>`).join("")+"</tr></thead><tbody>"+n.map(e=>`<tr>${e.map(e=>`<td>${r(e)}</td>`).join("")}</tr>`).join("")+"</tbody></table>";e(oe.copiedRows(n.length),o,l)},he=async()=>{te(null);const e=ce.map(P);if(!e.length||!z)return;const t=new URLSearchParams({ids:e.join(",")}),n=(()=>{const e=new Map(U.map(e=>[e.key,e.exportLabel??e.label]));try{const t=localStorage.getItem(`col-config-${T}`);if(t){const n=JSON.parse(t).filter(t=>!t.hidden&&"_select"!==t.key&&e.has(t.key)).map(t=>`${t.key}|${e.get(t.key)}`);if(n.length)return n.join(",")}}catch{}return U.filter(e=>!e.defaultHidden).map(e=>`${e.key}|${e.exportLabel??e.label}`).join(",")})();n&&t.set("cols",n);const r=z.includes("?")?"&":"?";try{const n=await f.get(`${z}${r}${t}`,{responseType:"blob"}),o=window.URL.createObjectURL(new Blob([n.data],{type:"text/csv"})),l=document.createElement("a");l.href=o,l.download=q,l.click(),window.URL.revokeObjectURL(o);const i=n.headers??{},a=Number(i["x-row-count"]);if("true"===String(i["x-truncated"]))return void g.notify(Number.isFinite(a)?oe.exportTruncated(a,e.length):oe.exportTruncatedUnknown(e.length));g.success(oe.exported(e.length))}catch{g.error(oe.exportFailed)}};if(N)/* @__PURE__ */return x(c,{});if($&&0===R.length)/* @__PURE__ */
2
+ return x(l,{title:K,message:M,onRetry:F});if(0===R.length)/* @__PURE__ */return x(w,{children:A});const me=R.length>0&&ce.length===R.length,ue=ce.length>0&&!me,pe=G.size-ce.length,fe=[{key:"_select",label:"",defaultWidth:52,minWidth:52,headerNode:/* @__PURE__ */x(a,{"aria-label":re.table.selectAll,checked:me,indeterminate:ue,onChange:ie,style:{height:14,width:14}})},...U],ge=/* @__PURE__ */x(o,{selectedCount:ce.length,hiddenSelectedCount:pe,loadedCount:R.length,totalCount:L,label:J,isFetchingMore:X,extra:_,extraAfter:B}),ye=Q?/* @__PURE__ */C(w,{children:[
3
+ /* @__PURE__ */x("div",{ref:Q}),X&&/* @__PURE__ */x(p,{size:"sm",padding:"py-3",label:re.list.loadingMore})]}):void 0;let ke=null;if(ee){const{x:t,y:n,item:r,text:o,firstColumn:l}=ee,i=Y?Y(ce):[],a=ce.length,c=()=>te(null),u=void 0!==L&&L>R.length;ke=/* @__PURE__ */C(d,{portal:!0,style:{left:t,top:n},onClose:c,minWidth:210,children:[
4
4
  /* @__PURE__ */x(s,{children:pe>0?re.list.selectedNotShown(a,pe):re.list.selected(a)}),
5
5
  /* @__PURE__ */x(h,{className:"font-medium",onClick:()=>{c(),O(r)},children:oe.open}),
6
6
  /* @__PURE__ */x(m,{}),o&&/* @__PURE__ */x(h,{onClick:()=>{c(),e(oe.copiedText,o.text,o.html)},children:oe.copy}),l&&/* @__PURE__ */x(h,{onClick:()=>(t=>{te(null);const{keys:n,body:r}=de(),o=n.indexOf(t.key);o<0||!r.length||e(t.label,r.map(e=>e[o]).join("\n"))})(l),children:oe.copyColumn(l.label)}),
7
7
  /* @__PURE__ */x(h,{disabled:0===a,onClick:se,children:oe.copyRows(a)}),z&&/* @__PURE__ */x(h,{onClick:he,children:oe.exportSelected}),i.map((e,t)=>/* @__PURE__ */C("div",{children:[(e.divider||0===t)&&/* @__PURE__ */x(m,{}),
8
8
  /* @__PURE__ */x(h,{danger:e.danger,disabled:e.disabled,onClick:()=>{c(),e.onClick(ce)},children:e.label})]},t)),
9
- /* @__PURE__ */x(m,{}),!me&&/* @__PURE__ */x(h,{onClick:()=>{c(),G(e=>/* @__PURE__ */new Set([...e,...R.map(E)]))},children:u?oe.selectAllLoaded(R.length):oe.selectAll}),
10
- /* @__PURE__ */x(h,{onClick:()=>{c(),G(/* @__PURE__ */new Set)},children:oe.clearSelection}),D&&/* @__PURE__ */x(h,{onClick:()=>{c(),D()},children:oe.refresh})]})}/* @__PURE__ */
9
+ /* @__PURE__ */x(m,{}),!me&&/* @__PURE__ */x(h,{onClick:()=>{c(),H(e=>/* @__PURE__ */new Set([...e,...R.map(P)]))},children:u?oe.selectAllLoaded(R.length):oe.selectAll}),
10
+ /* @__PURE__ */x(h,{onClick:()=>{c(),H(/* @__PURE__ */new Set)},children:oe.clearSelection}),F&&/* @__PURE__ */x(h,{onClick:()=>{c(),F()},children:oe.refresh})]})}/* @__PURE__ */
11
11
  return C("div",{className:"flex-1 flex flex-col mb-1 bg-white rounded-lg shadow overflow-hidden",children:[
12
- /* @__PURE__ */x("div",{className:"flex-1 min-h-0 flex flex-col",children:/* @__PURE__ */x(i,{tableId:M,columns:fe,sort:P,onSort:I,footer:ge,afterBody:ye,saveDefaultPerms:Z,children:e=>/* @__PURE__ */x("tbody",{ref:ne,className:"divide-y divide-gray-100",children:R.map((n,r)=>{const o=E(n);/* @__PURE__ */
13
- return x("tr",{"data-row-idx":r,className:`cursor-pointer ${ae===r?"bg-blue-50 ring-1 ring-inset ring-blue-300":H.has(o)?"bg-blue-50 hover:bg-blue-100":"hover:bg-gray-50"} ${W?.(n)??""}`,onClick:()=>O(n),onContextMenu:e=>((e,n)=>{if(e.shiftKey||u(e.target))return;e.preventDefault();const r=E(n);H.has(r)||G(/* @__PURE__ */new Set([r]));const o=j(e.currentTarget)[0]?.dataset.colKey,l=o?T.find(e=>e.key===o)?.label:void 0;te({x:e.clientX,y:e.clientY,item:n,text:t(e.target),firstColumn:o&&l?{key:o,label:l}:null})})(e,n),onMouseEnter:V?()=>V(n):void 0,children:e.map(e=>/* @__PURE__ */x("td",{"data-col-key":e.key,className:"px-4 py-3 whitespace-nowrap text-sm overflow-hidden",children:"_select"===e.key?/* @__PURE__ */x(a,{"aria-label":re.table.selectRow,checked:H.has(o),onChange:()=>le(n),onClick:e=>e.stopPropagation(),style:{height:14,width:14}}):U(n,e.key)},e.key))},o)})})})}),ke]})}export{S as EntityList};
12
+ /* @__PURE__ */x("div",{className:"flex-1 min-h-0 flex flex-col",children:/* @__PURE__ */x(i,{tableId:T,columns:fe,sort:E,onSort:I,footer:ge,afterBody:ye,saveDefaultPerms:Z,children:e=>/* @__PURE__ */x("tbody",{ref:ne,className:"divide-y divide-gray-100",children:R.map((n,r)=>{const o=P(n);/* @__PURE__ */
13
+ return x("tr",{"data-row-idx":r,className:`cursor-pointer ${ae===r?"bg-blue-50 ring-1 ring-inset ring-blue-300":G.has(o)?"bg-blue-50 hover:bg-blue-100":"hover:bg-gray-50"} ${W?.(n)??""}`,onClick:()=>O(n),onContextMenu:e=>((e,n)=>{if(e.shiftKey||u(e.target))return;e.preventDefault();const r=P(n);G.has(r)||H(/* @__PURE__ */new Set([r]));const o=j(e.currentTarget)[0]?.dataset.colKey,l=o?U.find(e=>e.key===o)?.label:void 0;te({x:e.clientX,y:e.clientY,item:n,text:t(e.target),firstColumn:o&&l?{key:o,label:l}:null})})(e,n),onMouseEnter:V?()=>V(n):void 0,children:e.map(e=>/* @__PURE__ */x("td",{"data-col-key":e.key,className:"px-4 py-3 whitespace-nowrap text-sm overflow-hidden",children:"_select"===e.key?/* @__PURE__ */x(a,{"aria-label":re.table.selectRow,checked:G.has(o),onChange:()=>le(n),onClick:e=>e.stopPropagation(),style:{height:14,width:14}}):D(n,e.key)},e.key))},o)})})})}),ke]})}export{S as EntityList};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{EntityList as default}from"../chunk-6LYKIC7W.js";import"../chunk-UFX7F3KG.js";import"../chunk-ATMJ5ZPK.js";import"../chunk-G6DKCCWH.js";import"../chunk-DO3DSSAW.js";import"../chunk-VCR3RADH.js";import"../chunk-3PLQKRD4.js";import"../chunk-SI26KESU.js";import"../chunk-UKBXQXDZ.js";import"../chunk-ULJQYXHB.js";import"../chunk-CGZBDI6C.js";import"../chunk-4U5M37SF.js";import"../chunk-F3ZOO23R.js";import"../chunk-2QY5BJLA.js";import"../chunk-UGTRSRIW.js";import"../chunk-KC3EX26K.js";import"../chunk-GOAFMGUI.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-STKJA4PV.js";import"../chunk-VQ35LXDC.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-IUVGHHR3.js";import"../chunk-C3QOHMR6.js";
2
+ export{EntityList as default}from"../chunk-ZDYIVU5R.js";import"../chunk-UFX7F3KG.js";import"../chunk-ATMJ5ZPK.js";import"../chunk-G6DKCCWH.js";import"../chunk-DO3DSSAW.js";import"../chunk-VCR3RADH.js";import"../chunk-64PPKUJG.js";import"../chunk-U6DRRCCG.js";import"../chunk-ULJQYXHB.js";import"../chunk-SI26KESU.js";import"../chunk-CGZBDI6C.js";import"../chunk-4U5M37SF.js";import"../chunk-F3ZOO23R.js";import"../chunk-2QY5BJLA.js";import"../chunk-UGTRSRIW.js";import"../chunk-KC3EX26K.js";import"../chunk-GOAFMGUI.js";import"../chunk-URHGHXDN.js";import"../chunk-5QFPTDQF.js";import"../chunk-EVYD6UFQ.js";import"../chunk-M5K4AX4E.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-R2VKEMZH.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-STKJA4PV.js";import"../chunk-VQ35LXDC.js";import"../chunk-UQYNPYF4.js";import"../chunk-MRJKZWWV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-IUVGHHR3.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{ResizableTable as default}from"../chunk-3PLQKRD4.js";import"../chunk-SI26KESU.js";import"../chunk-UKBXQXDZ.js";import"../chunk-ULJQYXHB.js";import"../chunk-2QY5BJLA.js";import"../chunk-UGTRSRIW.js";import"../chunk-KC3EX26K.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-STKJA4PV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-IUVGHHR3.js";import"../chunk-C3QOHMR6.js";
2
+ export{ResizableTable as default}from"../chunk-64PPKUJG.js";import"../chunk-U6DRRCCG.js";import"../chunk-ULJQYXHB.js";import"../chunk-SI26KESU.js";import"../chunk-2QY5BJLA.js";import"../chunk-UGTRSRIW.js";import"../chunk-KC3EX26K.js";import"../chunk-ISVODSRP.js";import"../chunk-J75ZT2JQ.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-STKJA4PV.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";import"../chunk-IUVGHHR3.js";import"../chunk-C3QOHMR6.js";
@@ -0,0 +1,30 @@
1
+ /** The badge's side padding: StatusBadge draws it as a control's side padding.
2
+ * tests/statusColumn.test.tsx fails if the badge's class stops matching. */
3
+ declare const BADGE_X: 12;
4
+ /** The list cell's side padding: EntityList's body cell. That cell is wider
5
+ * than the token role `cellX` (12); this follows what EntityList draws, and
6
+ * tests/statusColumn.test.tsx fails if its class stops matching. */
7
+ declare const CELL_X: 16;
8
+ /**
9
+ * The width of a list's Status column: its longest status badge plus the
10
+ * badge's and the cell's padding, so no status is cut ("Cancel…").
11
+ *
12
+ * Pass the column's WHOLE status set, keyed by the stored value; type the key
13
+ * from the row (`statusColumn<Row['status']>({ … })`) and a status the backend
14
+ * adds later is a type error until the column lists it. `true` = the badge's
15
+ * derived words (`statusLabel`); a string = the `label` the cell passes to
16
+ * `StatusBadge`. Spread the result into the column:
17
+ *
18
+ * { key: 'status', label: 'Status', ...statusColumn<Row['status']>({ draft: true, posted: true }) }
19
+ *
20
+ * `minWidth` equals the fit, so a layout a user saved narrower before still
21
+ * opens wide enough (`useColumnConfig` never shows a width below `minWidth`).
22
+ * A provider `labelFor` is not seen here (it lives in a render); a host that
23
+ * renames statuses passes its words as strings.
24
+ */
25
+ declare function statusColumn<S extends string>(statuses: Record<S, true | string>): {
26
+ defaultWidth: number;
27
+ minWidth: number;
28
+ };
29
+
30
+ export { BADGE_X, CELL_X, statusColumn };
@@ -0,0 +1 @@
1
+ export{BADGE_X,CELL_X,statusColumn}from"../chunk-LHHJHTWP.js";import"../chunk-LH7IKIGE.js";import"../chunk-UVCMV2TL.js";import"../chunk-AW7TOB6N.js";import"../chunk-WU2ZA6J2.js";import"../chunk-G67CJAQ2.js";import"../chunk-SOZCWT6I.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-TWVUQUUD.js";import"../chunk-5FYDNH4Y.js";import"../chunk-LNXBTK7Q.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{useColumnConfig}from"../chunk-UKBXQXDZ.js";import"../chunk-ULJQYXHB.js";import"../chunk-KC3EX26K.js";import"../chunk-D65T4H6J.js";import"../chunk-STKJA4PV.js";
2
+ export{useColumnConfig}from"../chunk-U6DRRCCG.js";import"../chunk-ULJQYXHB.js";import"../chunk-KC3EX26K.js";import"../chunk-D65T4H6J.js";import"../chunk-STKJA4PV.js";