@aiquants/console-ui 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/chunk-5TCPOLTI.js +1 -0
- package/dist/chunk-WKYOVFUG.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.cts +5 -1
- package/dist/core.d.ts +5 -1
- package/dist/core.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/styles/console-ui.css +7 -0
- package/package.json +1 -1
- package/dist/chunk-4IQKQ7WF.js +0 -1
- package/dist/chunk-S6DFKVUV.cjs +0 -1
package/README.md
CHANGED
|
@@ -28,6 +28,7 @@ The `/core` exports:
|
|
|
28
28
|
- Tones and the CSS text of a colour (see Tokens and colours): `TONES`, `TONE_HUES`, `TONE_ROLES` and the types `Tone`, `ToneHue` and `ToneRole`; `lightDark(color)` and `placeholderRule(rootAttribute)`.
|
|
29
29
|
- The geometry the tokens are computed on: `LATTICE_PX` (4), `TARGET_PX` (44), `ROW_WITH_CONTROL_PX` (52), `COMPACT_ROW_PX` (28) and `ceilToLattice(px)` (the smallest lattice multiple at or above a length).
|
|
30
30
|
- Layout arithmetic: `textWidthEm`, `monoTextWidthEm` (the type `TextFace` names the face each model sizes), `ceil8`, `tileGridPlan`, `tableMinInlinePx`, `tableFrameMinInlinePx` (the narrowest a `DataTable` is while its table shows without scrolling: the table's minimum and the scroll frame's 4 px inline padding on both sides), `masterDetailPlan`.
|
|
31
|
+
- The golden section and rem: `goldenSectionPx(lengthPx, step)` (the length / φ^step for a step at or above 0: step 1 is the larger part of one golden cut and step 2 its smaller part, which add back up to the length; φ itself is not exported) and `pxToRem(px)` (a px length written as the rem length the stylesheet uses, at the 16 px root the formulas assume).
|
|
31
32
|
- Widths sized from what a box holds (see Layout): `fixedColumnPx({ header, note }, contents)` (a `DataTable` fixed column; the first argument, type `ColumnHeaderText`, mirrors `ColumnDef`'s `header` and, for a column with a note, lists every line its `note` may show; `contents` are `CellContent` values, measured one by one with `cellContentInlinePx(content)`), `FLEXIBLE_COLUMN_MIN_PX` (160: the one minimum every flexible column shares), `comparisonAttributePx(labels)` (a `ComparisonGrid`'s `attributePx`), `tileMinInlinePx(captions, values)` (a `TileGrid`'s `minInlinePx`),
|
|
32
33
|
`instantSampleText(formatLocale, timeZone)` (the text an instant column is measured with) and `countSampleText(formatLocale, unit?)` (the text a count column or a tile's count is measured with).
|
|
33
34
|
- Figure formulas (see Figures): `spacedTextWidthEm(text, face)` (a line's width under the widest letter and word spacing WCAG 1.4.12 allows), `figureBoxPlan({ name, notes })` (the narrowest width and the height of a figure node's box, types `FigureBoxLines` and `FigureBoxPlan`), `figureDiscLabelPlan(label, radiusPx)` (the width of the name under a disc and its reach below the centre; for `null`, a disc drawn without a name, width 0 and the reach of its focus ring; type `FigureDiscLabelPlan`) and `FIGURE_RING_REACH_PX` (4: how far a node's focus ring reaches beyond the node).
|
|
@@ -37,6 +38,9 @@ The `/core` exports:
|
|
|
37
38
|
It covers the white space of both JavaScript (`\s`) and Python (`\s`), so a record written in either language that reads as blank in it is not readable here either.
|
|
38
39
|
It is the one rule of a blank text: `Measured` refuses a `text` or `unit` it rejects, and a host decides with it whether a text is worth drawing at all.
|
|
39
40
|
- Labels: `CONSOLE_UI_LABEL_CATALOGS`, `resolveConsoleUiLabels` (a UI language's catalog, whose `loadFailed`, `refreshFailed` and `forbiddenBecause` build the failure sentences and whose `failureSentence` is the one rule that chooses between them), `reasonAside` (a failure's reason as a parenthetical).
|
|
41
|
+
- Label templates: `fillLabel(template, values)` is the one filler of a label that carries a value (a count, a name) as a `{key}` placeholder (a key is ASCII letters, digits and `_`), so the label's language, not the code that draws it, decides where the value stands; a label that crosses a loader as a plain string carries its values this way.
|
|
42
|
+
It scans the template once and writes every value as plain text: a `{key}` inside a value is not filled again, and `$&`, `$1` or `` $` `` in a value are not replacement patterns, so a name a user controls cannot pull another value in or forge another sentence.
|
|
43
|
+
A placeholder whose key `values` does not own (an inherited key such as `{constructor}` included) stays as written, so a forgotten value shows instead of leaving a sentence with a word missing. A number is written with `String`: format a count with `formatCount` first when it should follow a locale.
|
|
40
44
|
- The read contract: the types `ResourceOutcome<T>` / `ResourceState<T>` / `ReloadCause`, `HTTP_FORBIDDEN` (the status of a refusal), `keepLastGood`, `beginReload`, `mapOutcome` and `flatMapOutcome`.
|
|
41
45
|
- The command contract: the type `CommandOutcome<T, R>` (a command the host can refuse with a structured body, which the failure carries as `rejection`).
|
|
42
46
|
- The keyset paging machine: the types `KeysetPage<T, C, M>` / `NextPage<T, C>` / `PagedValue<T, C, M>` / `PagedState<T, C, M>` / `PageFailure` / `PagedContent<T, M>`, `beginPagedReload`, `settleFirstPage`, `beginPage`, `settlePage` and `mapPagedList`.
|
|
@@ -116,7 +120,7 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
|
|
|
116
120
|
|
|
117
121
|
- Every length, type step and duration is computed from a few formulas (no value is written by hand):
|
|
118
122
|
- a 4 px lattice (`LATTICE_PX`) and the spaces 4, 8, 12, 16, 24, 32, 48, 64 and 96 (`space-1` … `space-24`, multipliers whose prime factors are 2 and 3);
|
|
119
|
-
- type steps of round(16 × 1.25^k) px, never below 11 px, each line the smallest lattice multiple at or above 1.5 times its size (WCAG 1.4.8; `title`, beside controls, and `prose`, the reading line, at 1.75): `caption` 11/20, `body` 13/20, `prose` 13/24, `title` 16/28, `heading` 20/32, `display` 25/40, `display-lg` 31/48;
|
|
123
|
+
- type steps of round(16 × 1.25^k) px, never below 11 px, each line the smallest lattice multiple at or above 1.5 times its size (WCAG 1.4.8; `title`, beside controls, and `prose`, the reading line, at 1.75): `caption` 11/20, `body` 13/20, `prose` 13/24, `body-lg` 16/24 (the body of a surface read at length, such as a conversation or an article: the 16 px base step with the 1.5 line), `title` 16/28, `heading` 20/32, `display` 25/40, `display-lg` 31/48;
|
|
120
124
|
- the 44 px target (`TARGET_PX`: a `body` line with 12 px above and below), which is also the height of a control and of a table row (`size-target`, `size-control`, `size-row`), the 52 px row that holds a control (`ROW_WITH_CONTROL_PX`: the target with one lattice unit above and below, `size-row-control`) and the 28 px compact row of a read-only line table (`COMPACT_ROW_PX`: a `body` line with one lattice unit above and below, `size-row-compact`);
|
|
121
125
|
- motion of 120, 180 and 270 ms (`motion-1` … `motion-3`, 120 × 1.5^(k − 1)).
|
|
122
126
|
Only `body` (20) and `title` (28) lines, whose difference from 44 is a multiple of 8, can be centred in a 44 px box on the lattice, so every control draws its text in `body` or `title`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var j=new Map,O=(e,n)=>{if(!(Number.isSafeInteger(e)&&e>=0))throw new RangeError(`A count must be a non-negative safe integer: ${e}`);let t=j.get(n);return t===void 0&&(t=new Intl.NumberFormat(n,{maximumFractionDigits:0,useGrouping:!0}),j.set(n,t)),t.format(e)},Y=(e,n)=>n===void 0?e:`${e} ${n}`;var Ce=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Ee=/[!-~]/g;var Pe=/^[^eE]*[1-9]/,K=e=>{let n=e.replace(Ee,r=>String.fromCharCode(r.charCodeAt(0)-65248)).trim();if(!Ce.test(n))return null;let t=Number(n);return Number.isFinite(t)?t===0?Pe.test(n)?null:0:t:null},Se=e=>{let n=K(e);return n!==null&&Number.isSafeInteger(n)?n:null};var _e=/[^\p{White_Space}\p{Cc}\p{Cf}\p{Default_Ignorable_Code_Point}]/u,f=e=>_e.test(e);var l=class extends RangeError{reason;constructor(n,t){super(t),this.name="ZonedTimeError",this.reason=n}},Oe=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/,we=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2}):(\d{2}))$/,Ie=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(?:(Z)|([+-])(\d{2}):?(\d{2}))$/,V=864e5,I=6e4,C={min:1,max:9999},J=new Map,q=new Map,Ne=e=>{let n=J.get(e);return n===void 0&&(n=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),J.set(e,n)),n},Z=e=>{let n=new Date(0);return n.setUTCFullYear(e.year,e.month-1,e.day),n.setUTCHours(e.hour,e.minute,e.second,0),n.getUTCFullYear()===e.year&&n.getUTCMonth()===e.month-1&&n.getUTCDate()===e.day&&n.getUTCHours()===e.hour&&n.getUTCMinutes()===e.minute&&n.getUTCSeconds()===e.second?n.getTime():null},N=(e,n)=>{let[t,r,o,s,c,i,R]=n;if(R!==void 0&&/[1-9]/.test(R))throw new l("subsecond",`Fractions of a second cannot be kept: ${e}`);let g={year:Number(t),month:Number(r),day:Number(o),hour:Number(s),minute:Number(c),second:i===void 0?0:Number(i)},G=g.year>=C.min?Z(g):null;if(G===null)throw new l("malformed",`Not a calendar date and time: ${e}`);return{fields:g,millis:G}},M=(e,n)=>{let t=new Map(Ne(n).formatToParts(new Date(e)).map(o=>[o.type,o.value])),r={year:Number(t.get("year")),month:Number(t.get("month")),day:Number(t.get("day")),hour:Number(t.get("hour")),minute:Number(t.get("minute")),second:Number(t.get("second"))};if(t.get("era")!=="AD"||r.year>C.max)throw new l("malformed",`The wall clock falls outside years ${C.min}-${C.max}: ${new Date(e).toISOString()}`);return r},w=(e,n)=>Z(M(e,n))-e,p=e=>String(e).padStart(2,"0"),Q=(e,n)=>{let t=`${String(e.year).padStart(4,"0")}-${p(e.month)}-${p(e.day)}T${p(e.hour)}:${p(e.minute)}`;return n||e.second!==0?`${t}:${p(e.second)}`:t},Me=e=>{if(e%I!==0)throw new l("malformed",`The zone's offset is not a whole number of minutes: ${e} ms`);let n=Math.abs(e)/I;return`${e<0?"-":"+"}${p(Math.floor(n/60))}:${p(n%60)}`},Le=(e,n)=>{let t=Oe.exec(e);if(t===null)throw new l("malformed",`Not a wall time (YYYY-MM-DDTHH:mm[:ss]): ${e}`);let{fields:r,millis:o}=N(e,t.slice(1)),c=[...new Set([w(o-V,n),w(o+V,n)])].filter(i=>w(o-i,n)===i);if(c.length===0)throw new l("nonexistent",`${e} does not exist in ${n}`);if(c.length>1)throw new l("ambiguous",`${e} occurs twice in ${n}`);return`${Q(r,!0)}${Me(c[0])}`},ee=(e,n)=>{let[t,r,o,s]=n;if(t!==void 0)return 0;if(Number(o)>23||Number(s)>59)throw new l("malformed",`Not a valid offset: ${e}`);return(r==="-"?-1:1)*(Number(o)*60+Number(s))*I},Fe=(e,n)=>{let t=we.exec(e);if(t===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:r}=N(e,t.slice(1,8));return Q(M(r-ee(e,t.slice(8)),n),!1)},$e=(e,n)=>{let t=JSON.stringify([e,n]),r=q.get(t);return r===void 0&&(r=new Intl.DateTimeFormat(e,{timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),q.set(t,r)),r},L=(e,n,t)=>{let r=Ie.exec(e);if(r===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:o}=N(e,[...r.slice(1,7),void 0]),s=o-ee(e,r.slice(7));return M(s,t),$e(n,t).format(s)};function Ae(e,n){return e.replace(/\{(\w+)\}/g,(t,r)=>Object.hasOwn(n,r)?String(n[r]):t)}var ne=403,De=(e,n)=>e.ok?{ok:!0,value:n(e.value)}:e,ve=(e,n)=>e.ok?n(e.value):e,zn={kind:"idle"},Ue={kind:"loading"},F=(e,n)=>e.kind==="ready"?{...e,refreshing:!0}:e.kind==="failed"?n==="reload"?{...e,retrying:!0}:e:Ue,$=(e,n)=>n.ok?{kind:"ready",value:n.value,refreshing:!1,refreshFailure:null}:e.kind==="failed"&&e.status===403?e.retrying?{...e,retrying:!1}:e:e.kind==="ready"&&n.status!==403?{kind:"ready",value:e.value,refreshing:!1,refreshFailure:{status:n.status,reason:n.reason}}:{kind:"failed",status:n.status,reason:n.reason,occurrence:e.kind==="failed"?e.occurrence+1:1,retrying:!1};var T=e=>e===""?"":` (${e})`,te=e=>(n,t,r)=>n.status===403?e(t,n.reason):r(n.reason),re=(e,n)=>n===""?e:`${e} Reason: ${n}.`,oe=(e,n)=>n===""?e:`${e}${n}\u3002`,E={en:{unmeasured:"Not measured",loading:"Loading",loadFailed:e=>`Could not load${T(e)}.`,refreshFailed:e=>`Could not refresh${T(e)}.`,forbiddenBecause:re,failureSentence:te(re),loadMore:e=>`Show ${e} more`,endOfRecords:"No more records",close:"Close",cancel:"Cancel",reload:"Reload",breadcrumb:"Breadcrumb",stepDone:"Done",stepPending:"Not started"},ja:{unmeasured:"\u672A\u6E2C\u5B9A",loading:"\u8AAD\u307F\u8FBC\u307F\u4E2D",loadFailed:e=>`\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F${T(e)}\u3002`,refreshFailed:e=>`\u66F4\u65B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F${T(e)}\u3002`,forbiddenBecause:oe,failureSentence:te(oe),loadMore:e=>`\u3055\u3089\u306B ${e} \u4EF6\u3092\u8868\u793A`,endOfRecords:"\u3053\u308C\u4EE5\u4E0A\u306E\u8A18\u9332\u306F\u3042\u308A\u307E\u305B\u3093",close:"\u9589\u3058\u308B",cancel:"\u3084\u3081\u308B",reload:"\u518D\u8AAD\u307F\u8FBC\u307F",breadcrumb:"\u30D1\u30F3\u304F\u305A",stepDone:"\u5B8C\u4E86",stepPending:"\u672A\u7740\u624B"}},He=e=>{if(!Object.hasOwn(E,e))throw new RangeError(`No console UI labels for locale "${e}"; supported: ${Object.keys(E).join(", ")}`);return E[e]};var We=4,Be=[1,2,3,4,6,8,12,16,24],ze=16,Xe=5/4,D={caption:-2,body:-1,"body-lg":0,title:0,heading:1,display:2,"display-lg":3},Ge=11,ae=3/2,je=7/4,Ye=7/4,Ke=120,Ve=3/2,Je=[1,2,3],ie=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`A length must be a finite number of px at or above 0: ${e}`);return Math.ceil(e/4)*4},v=e=>{if(!Number.isInteger(e))throw new RangeError(`A type step must be an integer: ${e}`);return Math.max(Ge,Math.round(ze*Xe**e))},U=(e,n)=>ie(e*n),se=U(v(D.body),ae),b=se+24,le=b+8,de=se+8,A={weight:{regular:400,medium:500,bold:700},radius:{"radius-control":4,"radius-item":8,"radius-container":12,"radius-pill":9999},stroke:{"border-width":1,"focus-width":2,"focus-offset":2,"marker-width":2}},qe=()=>Object.fromEntries(Be.map(e=>[`space-${e}`,e*4])),Ze=()=>{let e=Object.fromEntries(Object.entries(D).map(([t,r])=>{let o=v(r);return[t,{size:o,lineHeight:U(o,t==="title"?Ye:ae)}]})),n=v(D.body);return{...e,prose:{size:n,lineHeight:U(n,je)}}},Qe=()=>Object.fromEntries(Je.map(e=>[`motion-${e}`,Ke*Ve**(e-1)])),ce=e=>Object.freeze({space:Object.freeze(qe()),type:Object.freeze(Ze()),weight:A.weight,radius:A.radius,size:Object.freeze({"size-target":b,"size-control":b,"size-row":b,"size-row-control":le,"size-row-compact":de}),stroke:A.stroke,motion:Object.freeze(Qe()),color:Object.freeze({...e})});var en={fg:{light:"#0f172b",dark:"#f8fafc"},"fg-secondary":{light:"#314158",dark:"#e2e8f0"},"fg-muted":{light:"#44536a",dark:"#cad5e2"},"danger-fg":{light:"#9f0712",dark:"#ffc9c9"},"warning-fg":{light:"#7b3306",dark:"#fee685"},"success-fg":{light:"#006045",dark:"#a4f4cf"},"info-fg":{light:"#193cb8",dark:"#bedbff"},"on-solid":{light:"#ffffff",dark:"#0f172b"},surface:{light:"#ffffff",dark:"#0f172b"},subtle:{light:"#f8fafc",dark:"#1d293d"},sunken:{light:"#f1f5f9",dark:"#020618"},"danger-tint":{light:"#fef2f2",dark:"#460809"},"warning-tint":{light:"#fffbeb",dark:"#461901"},"success-tint":{light:"#ecfdf5",dark:"#002c22"},"info-tint":{light:"#eff6ff",dark:"#162456"},"neutral-solid":{light:"#314158",dark:"#cad5e2"},"danger-solid":{light:"#9f0712",dark:"#ffa2a2"},"success-solid":{light:"#006045",dark:"#5ee9b5"},"info-solid":{light:"#193cb8",dark:"#8ec5ff"},"warning-solid":{light:"#7b3306",dark:"#ffd230"},"danger-accent":{light:"#e7000b",dark:"#ff6467"},"warning-accent":{light:"#bb4d00",dark:"#fcbb00"},"success-accent":{light:"#009966",dark:"#00d492"},"info-accent":{light:"#155dfc",dark:"#51a2ff"},focus:{light:"#155dfc",dark:"#51a2ff"},"border-control":{light:"#62748e",dark:"#90a1b9"},"border-subtle":{light:"#e2e8f0",dark:"#314158"}},a=ce(en),nn="--cui-",tn=e=>`var(${nn}${e})`;var rn=e=>e>=32&&e<=126||e>=65377&&e<=65500||e>=65512&&e<=65518,ue=(e,n)=>{let t=0,r=0;for(let o of e)rn(o.codePointAt(0))?r+=1:t+=1;return t*1+r*n},h=e=>ue(e,.55),x=e=>ue(e,.6),u=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return Math.max(0,Math.ceil((e-1e-9)/8))*8};var me="caption",B="body",z=2*a.space["space-3"],fe={type:"caption",paddingInlinePx:2*a.space["space-2"]},H={type:"body",paddingInlinePx:2*a.space["space-3"]+2*a.stroke["border-width"],minInlinePx:a.size["size-control"]},pe={type:"body",minInlinePx:a.size["size-target"]},P={trackInlinePx:2*a.type.body.lineHeight+3*a.space["space-1"],labelGapPx:a.space["space-2"],type:"body"},W={captionType:"caption",valueType:"heading",paddingInlinePx:2*a.space["space-3"]},on=10,an="2000-01-01T00:00:00Z",sn=9999999,ge=(e,n,t)=>(n==="mono"?x(e):h(e))*a.type[t].size,ln=(e,n)=>{if(e.length===0)throw new RangeError(`A ${n} needs at least one text to be measured with`);for(let t of e)if(!f(t))throw new RangeError(`A ${n} sample must hold a readable character: ${JSON.stringify(t)}`);return e},d=(e,n,t,r)=>Math.max(...ln(e,n).map(o=>ge(o,t,r))),X=e=>{switch(e.kind){case"text":return d(e.texts,"text",e.face,e.type);case"measured":return d(e.texts,"measured value","sans",B);case"pill":return d(e.labels,"pill","sans",fe.type)+fe.paddingInlinePx;case"button":return Math.max(H.minInlinePx,d(e.labels,"button","sans",H.type)+H.paddingInlinePx);case"link":return Math.max(pe.minInlinePx,d(e.labels,"link","sans",pe.type));case"switch":return e.labelHidden?P.trackInlinePx:P.trackInlinePx+P.labelGapPx+d(e.labels,"switch","sans",P.type);case"cluster":{if(e.items.length===0)throw new RangeError("A cluster needs at least one item to be measured with");return e.items.reduce((n,t)=>n+X(t),0)+(e.items.length-1)*a.space[e.gap]}}},dn=(e,n)=>{let t=d([e.header],"column header","sans",me),r=e.note===void 0?0:d(e.note,"column header note","sans",me);return u(Math.max(t,r,...n.map(X))+z)},cn=u(ge("\u3042".repeat(on),"sans",B)+z),un=e=>u(d(e,"comparison attribute","sans",B)+z),mn=(e,n)=>L(an,e,n),fn=(e,n)=>{if(n!==void 0&&!f(n))throw new RangeError(`A count sample's unit must hold a readable character: ${JSON.stringify(n)}`);return Y(O(sn,e),n)},pn=(e,n)=>u(Math.max(d(e,"tile caption","sans",W.captionType),d(n,"tile value","sans",W.valueType))+W.paddingInlinePx);var gn=.12,yn=.16,Tn=/[\u0020\u00a0\u1361\u{10100}\u{10101}\u{1039f}\u{1091f}]/u,k=a.space["space-3"],S=(e,n)=>{let t=0,r=0;for(let s of e)t+=1,Tn.test(s)&&(r+=1);return(n==="mono"?x(e):h(e))+gn*t+yn*r},bn=e=>{for(let t of[e.name,...e.notes])if(!f(t))throw new RangeError(`A figure node's name and notes must hold a readable character: ${JSON.stringify(t)}`);let n=Math.max(S(e.name,"sans")*a.type.body.size,...e.notes.map(t=>S(t,"sans")*a.type.caption.size));return{minWidthPx:u(n)+2*k,heightPx:2*k+a.type.body.lineHeight+e.notes.length*a.type.caption.lineHeight}},at=e=>{let n=k+a.type.body.lineHeight;return{insetPx:k,namePx:k+a.type.body.lineHeight/2,notesPx:Array.from({length:e},(t,r)=>n+r*a.type.caption.lineHeight+a.type.caption.lineHeight/2)}},hn=(e,n)=>{if(e!==null&&!f(e))throw new RangeError(`A disc's name must hold a readable character: ${JSON.stringify(e)}`);if(!(Number.isFinite(n)&&n>0))throw new RangeError(`A disc's radius must be a positive finite px value: ${n}`);return e===null?{widthPx:0,extentBelowPx:n+ye}:{widthPx:u(S(e,"sans")*a.type.caption.size),extentBelowPx:n+a.space["space-1"]+a.type.caption.lineHeight}},ye=a.stroke["focus-offset"]+a.stroke["focus-width"],it=a.stroke["focus-offset"]+a.stroke["focus-width"]/2;var _=(1+Math.sqrt(5))/2,xn=(e,n)=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`A length must be a finite number of px at or above 0: ${e}`);if(!(Number.isInteger(n)&&n>=0))throw new RangeError(`A golden section step must be an integer at or above 0: ${n}`);return e/_**n};var kn=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return e},m=e=>`${kn(e)/16}rem`;var Te=({masterMinPx:e,detailMinPx:n,gapPx:t})=>{for(let r of[e,n])if(!(Number.isFinite(r)&&r>0))throw new RangeError(`Pane minimum must be a positive px value: ${r}`);if(!(Number.isFinite(t)&&t>=0))throw new RangeError(`Gap must be a px value >= 0: ${t}`);return e+t+n},Rn=(e,n)=>{let t=Te(n);if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Container width must be a px value >= 0: ${e}`);if(e<t)return{sideBySide:!1,sideBySideFromPx:t,masterInlinePx:e,detailInlinePx:e};let r=(e-n.gapPx)/(1+_),o=Math.min(Math.max(n.masterMinPx,r),e-n.gapPx-n.detailMinPx);return{sideBySide:!0,sideBySideFromPx:t,masterInlinePx:o,detailInlinePx:e-n.gapPx-o}},mt=e=>{let n=Te(e),t=`cui-master-detail-m${e.masterMinPx}-d${e.detailMinPx}-g${e.gapPx}`,r=`[data-cui-master-detail="${t}"]`,o=m(e.gapPx),s=`${r}{grid-template-columns:minmax(0,1fr);gap:${o}}`,c=`clamp(${m(e.masterMinPx)},calc((100% - ${o}) / ${1+_}),calc(100% - ${o} - ${m(e.detailMinPx)}))`,i=`@container (min-width:${m(n)}){${r}{grid-template-columns:${c} minmax(0,1fr)}}`;return{key:t,css:s+i}};var Cn=2*a.space["space-1"],be=e=>{if(!(Number.isFinite(e)&&e>0))throw new RangeError(`Column width must be a positive px value: ${e}`);return e},he=e=>{if(e.length===0)throw new RangeError("A table needs at least one column");let n=0,t=null;for(let{width:r}of e){if(r.fixedPx!==void 0){n+=be(r.fixedPx);continue}let o=be(r.minPx);if(t!==null&&t!==o)throw new RangeError(`Flexible columns share the remaining width equally, so their minimums must be equal: ${t} and ${o}`);t=o,n+=o}return n},En=e=>he(e)+Cn;var Pn=(e,n,t)=>{if(!(Number.isSafeInteger(e)&&e>0))throw new RangeError(`Tile count must be a positive integer: ${e}`);if(!(Number.isFinite(n)&&n>0))throw new RangeError(`Tile minimum width must be a positive px value: ${n}`);if(!(Number.isFinite(t)&&t>=0))throw new RangeError(`Tile gap must be a px value >= 0: ${t}`);let r=[];for(let i=1;i<=e;i+=1)e%i===0&&r.push({columns:i,minContainerPx:i*n+(i-1)*t});let o=`cui-tiles-n${e}-m${n}-g${t}`,s=`[data-cui-tile-grid="${o}"]`,c=r.map(({columns:i,minContainerPx:R})=>{let g=`${s}{grid-template-columns:repeat(${i},minmax(0,1fr))}`;return i===1?g:`@container (min-width:${m(R)}){${g}}`});return{key:o,steps:r,css:c.join("")}};var Sn=(e,n)=>{let t=F(e,n);return t.kind==="ready"?{...t,value:{...t.value,loadingMore:!1}}:t},_n=(e,n)=>$(e,n.ok?{ok:!0,value:{rows:n.value.rows,next:n.value.next,meta:n.value.meta,loadingMore:!1,moreFailure:null}}:n),On=e=>e.kind==="ready"&&!e.refreshing&&e.value.next!==null&&!e.value.loadingMore?{...e,value:{...e.value,loadingMore:!0}}:e,wn=(e,n,t)=>{if(!(e.kind==="ready"&&e.value.loadingMore&&Object.is(e.value.next,n)))return e;if(t.ok)return{...e,value:{...e.value,rows:[...e.value.rows,...t.value.rows],next:t.value.next,loadingMore:!1,moreFailure:null}};let r=e.value.moreFailure===null?1:e.value.moreFailure.occurrence+1;return{...e,value:{...e.value,loadingMore:!1,moreFailure:{reason:t.reason,occurrence:r}}}},In=(e,n)=>{if(e.kind!=="ready")return e;let{rows:t,meta:r}=n({rows:e.value.rows,meta:e.value.meta});return{...e,value:{...e.value,rows:t,meta:r}}};var Nn=/^#[0-9a-f]{6}$/i,Mn=/^[a-z][a-z0-9-]*$/,xe=e=>{if(!Nn.test(e))throw new RangeError(`A palette colour must be #rrggbb: ${e}`);return e},ke=({light:e,dark:n})=>`light-dark(${xe(e)}, ${xe(n)})`,Ln=e=>{if(!Mn.test(e))throw new RangeError(`A root attribute must be lowercase letters, digits and hyphens, starting with a letter: ${e}`);return`[${e}] ::placeholder { color: ${ke(a.color["fg-muted"])}; opacity: 1; }`};var Re=["indigo","violet","purple","fuchsia","pink","rose","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue"],Fn=["fg","tint","accent","line","solid","solid-hover"],$n={indigo:{fg:{light:"#372aac",dark:"#c6d2ff"},tint:{light:"#eff3ff",dark:"#1e1a4d"},accent:{light:"#4f39f6",dark:"#7c86ff"}},violet:{fg:{light:"#5d0ec0",dark:"#ddd6ff"},tint:{light:"#f5f3ff",dark:"#2f0d68"},accent:{light:"#7f22fe",dark:"#a684ff"}},purple:{fg:{light:"#6e11b0",dark:"#e9d4ff"},tint:{light:"#faf5ff",dark:"#3c0366"},accent:{light:"#9810fa",dark:"#c27aff"}},fuchsia:{fg:{light:"#8a0194",dark:"#f6cfff"},tint:{light:"#fdf4ff",dark:"#4b004f"},accent:{light:"#c800de",dark:"#ed6aff"}},pink:{fg:{light:"#a3004c",dark:"#fccee8"},tint:{light:"#fdf2f8",dark:"#510424"},accent:{light:"#e60076",dark:"#fb64b6"}},rose:{fg:{light:"#a50036",dark:"#ffccd3"},tint:{light:"#fff1f2",dark:"#4d0218"},accent:{light:"#ec003f",dark:"#ff637e"}},red:{fg:{light:"#9f0712",dark:"#ffc9c9"},tint:{light:"#fef2f2",dark:"#460809"},accent:{light:"#e7000b",dark:"#ff6467"}},orange:{fg:{light:"#7e2a0c",dark:"#ffd6a7"},tint:{light:"#fff7ed",dark:"#441306"},accent:{light:"#f54900",dark:"#ff8904"}},amber:{fg:{light:"#7b3306",dark:"#fee685"},tint:{light:"#fffbeb",dark:"#461901"},accent:{light:"#bb4d00",dark:"#fcbb00"}},yellow:{fg:{light:"#733e0a",dark:"#fff085"},tint:{light:"#fefce8",dark:"#432004"},accent:{light:"#a65f00",dark:"#fdc700"}},lime:{fg:{light:"#35530e",dark:"#d8f999"},tint:{light:"#f7fee7",dark:"#192e03"},accent:{light:"#497d00",dark:"#9ae600"}},green:{fg:{light:"#0d542b",dark:"#b9f8cf"},tint:{light:"#f0fdf4",dark:"#032e15"},accent:{light:"#008236",dark:"#05df72"}},emerald:{fg:{light:"#004f3b",dark:"#a4f4cf"},tint:{light:"#ecfdf5",dark:"#002c22"},accent:{light:"#009966",dark:"#00d492"}},teal:{fg:{light:"#0b4f4a",dark:"#96f7e4"},tint:{light:"#f0fdfa",dark:"#022f2e"},accent:{light:"#009689",dark:"#00d5be"}},cyan:{fg:{light:"#104e64",dark:"#a2f4fd"},tint:{light:"#ecfeff",dark:"#053345"},accent:{light:"#0092b8",dark:"#00d3f2"}},sky:{fg:{light:"#024a70",dark:"#b8e6fe"},tint:{light:"#f0f9ff",dark:"#052f4a"},accent:{light:"#0084d1",dark:"#00bcff"}},blue:{fg:{light:"#193cb8",dark:"#bedbff"},tint:{light:"#eff6ff",dark:"#162456"},accent:{light:"#155dfc",dark:"#51a2ff"}}},y=({light:e,dark:n})=>Object.freeze({light:e,dark:n}),An=({fg:e,tint:n,accent:t})=>Object.freeze({fg:y(e),tint:y(n),accent:y(t),line:y({light:e.dark,dark:e.light}),solid:y(e),"solid-hover":y({light:n.dark,dark:n.light})}),Dn=Object.freeze(Object.fromEntries(Re.map(e=>[e,An($n[e])])));export{O as a,Y as b,K as c,Se as d,f as e,l as f,Le as g,Fe as h,L as i,Ae as j,ne as k,De as l,ve as m,zn as n,Ue as o,F as p,$ as q,T as r,E as s,He as t,We as u,ie as v,b as w,le as x,de as y,a as z,tn as A,h as B,x as C,u as D,X as E,dn as F,cn as G,un as H,mn as I,fn as J,pn as K,S as L,bn as M,at as N,hn as O,ye as P,it as Q,xn as R,m as S,Rn as T,mt as U,he as V,En as W,Pn as X,Sn as Y,_n as Z,On as _,wn as $,In as aa,ke as ba,Ln as ca,Re as da,Fn as ea,Dn as fa};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var j=new Map,O= exports.a =(e,n)=>{if(!(Number.isSafeInteger(e)&&e>=0))throw new RangeError(`A count must be a non-negative safe integer: ${e}`);let t=j.get(n);return t===void 0&&(t=new Intl.NumberFormat(n,{maximumFractionDigits:0,useGrouping:!0}),j.set(n,t)),t.format(e)},Y= exports.b =(e,n)=>n===void 0?e:`${e} ${n}`;var Ce=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Ee=/[!-~]/g;var Pe=/^[^eE]*[1-9]/,K= exports.c =e=>{let n=e.replace(Ee,r=>String.fromCharCode(r.charCodeAt(0)-65248)).trim();if(!Ce.test(n))return null;let t=Number(n);return Number.isFinite(t)?t===0?Pe.test(n)?null:0:t:null},Se= exports.d =e=>{let n=K(e);return n!==null&&Number.isSafeInteger(n)?n:null};var _e=/[^\p{White_Space}\p{Cc}\p{Cf}\p{Default_Ignorable_Code_Point}]/u,f= exports.e =e=>_e.test(e);var l=class extends RangeError{constructor(n,t){super(t),this.name="ZonedTimeError",this.reason=n}},Oe=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/,we=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2}):(\d{2}))$/,Ie=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(?:(Z)|([+-])(\d{2}):?(\d{2}))$/,V=864e5,I=6e4,C={min:1,max:9999},J=new Map,q=new Map,Ne=e=>{let n=J.get(e);return n===void 0&&(n=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),J.set(e,n)),n},Z=e=>{let n=new Date(0);return n.setUTCFullYear(e.year,e.month-1,e.day),n.setUTCHours(e.hour,e.minute,e.second,0),n.getUTCFullYear()===e.year&&n.getUTCMonth()===e.month-1&&n.getUTCDate()===e.day&&n.getUTCHours()===e.hour&&n.getUTCMinutes()===e.minute&&n.getUTCSeconds()===e.second?n.getTime():null},N=(e,n)=>{let[t,r,o,s,c,i,R]=n;if(R!==void 0&&/[1-9]/.test(R))throw new l("subsecond",`Fractions of a second cannot be kept: ${e}`);let g={year:Number(t),month:Number(r),day:Number(o),hour:Number(s),minute:Number(c),second:i===void 0?0:Number(i)},G=g.year>=C.min?Z(g):null;if(G===null)throw new l("malformed",`Not a calendar date and time: ${e}`);return{fields:g,millis:G}},M=(e,n)=>{let t=new Map(Ne(n).formatToParts(new Date(e)).map(o=>[o.type,o.value])),r={year:Number(t.get("year")),month:Number(t.get("month")),day:Number(t.get("day")),hour:Number(t.get("hour")),minute:Number(t.get("minute")),second:Number(t.get("second"))};if(t.get("era")!=="AD"||r.year>C.max)throw new l("malformed",`The wall clock falls outside years ${C.min}-${C.max}: ${new Date(e).toISOString()}`);return r},w=(e,n)=>Z(M(e,n))-e,p=e=>String(e).padStart(2,"0"),Q=(e,n)=>{let t=`${String(e.year).padStart(4,"0")}-${p(e.month)}-${p(e.day)}T${p(e.hour)}:${p(e.minute)}`;return n||e.second!==0?`${t}:${p(e.second)}`:t},Me=e=>{if(e%I!==0)throw new l("malformed",`The zone's offset is not a whole number of minutes: ${e} ms`);let n=Math.abs(e)/I;return`${e<0?"-":"+"}${p(Math.floor(n/60))}:${p(n%60)}`},Le= exports.g =(e,n)=>{let t=Oe.exec(e);if(t===null)throw new l("malformed",`Not a wall time (YYYY-MM-DDTHH:mm[:ss]): ${e}`);let{fields:r,millis:o}=N(e,t.slice(1)),c=[...new Set([w(o-V,n),w(o+V,n)])].filter(i=>w(o-i,n)===i);if(c.length===0)throw new l("nonexistent",`${e} does not exist in ${n}`);if(c.length>1)throw new l("ambiguous",`${e} occurs twice in ${n}`);return`${Q(r,!0)}${Me(c[0])}`},ee=(e,n)=>{let[t,r,o,s]=n;if(t!==void 0)return 0;if(Number(o)>23||Number(s)>59)throw new l("malformed",`Not a valid offset: ${e}`);return(r==="-"?-1:1)*(Number(o)*60+Number(s))*I},Fe= exports.h =(e,n)=>{let t=we.exec(e);if(t===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:r}=N(e,t.slice(1,8));return Q(M(r-ee(e,t.slice(8)),n),!1)},$e=(e,n)=>{let t=JSON.stringify([e,n]),r=q.get(t);return r===void 0&&(r=new Intl.DateTimeFormat(e,{timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),q.set(t,r)),r},L= exports.i =(e,n,t)=>{let r=Ie.exec(e);if(r===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:o}=N(e,[...r.slice(1,7),void 0]),s=o-ee(e,r.slice(7));return M(s,t),$e(n,t).format(s)};function Ae(e,n){return e.replace(/\{(\w+)\}/g,(t,r)=>Object.hasOwn(n,r)?String(n[r]):t)}var ne=403,De= exports.l =(e,n)=>e.ok?{ok:!0,value:n(e.value)}:e,ve= exports.m =(e,n)=>e.ok?n(e.value):e,zn= exports.n ={kind:"idle"},Ue= exports.o ={kind:"loading"},F= exports.p =(e,n)=>e.kind==="ready"?{...e,refreshing:!0}:e.kind==="failed"?n==="reload"?{...e,retrying:!0}:e:Ue,$= exports.q =(e,n)=>n.ok?{kind:"ready",value:n.value,refreshing:!1,refreshFailure:null}:e.kind==="failed"&&e.status===403?e.retrying?{...e,retrying:!1}:e:e.kind==="ready"&&n.status!==403?{kind:"ready",value:e.value,refreshing:!1,refreshFailure:{status:n.status,reason:n.reason}}:{kind:"failed",status:n.status,reason:n.reason,occurrence:e.kind==="failed"?e.occurrence+1:1,retrying:!1};var T=e=>e===""?"":` (${e})`,te=e=>(n,t,r)=>n.status===403?e(t,n.reason):r(n.reason),re=(e,n)=>n===""?e:`${e} Reason: ${n}.`,oe=(e,n)=>n===""?e:`${e}${n}\u3002`,E= exports.s ={en:{unmeasured:"Not measured",loading:"Loading",loadFailed:e=>`Could not load${T(e)}.`,refreshFailed:e=>`Could not refresh${T(e)}.`,forbiddenBecause:re,failureSentence:te(re),loadMore:e=>`Show ${e} more`,endOfRecords:"No more records",close:"Close",cancel:"Cancel",reload:"Reload",breadcrumb:"Breadcrumb",stepDone:"Done",stepPending:"Not started"},ja:{unmeasured:"\u672A\u6E2C\u5B9A",loading:"\u8AAD\u307F\u8FBC\u307F\u4E2D",loadFailed:e=>`\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F${T(e)}\u3002`,refreshFailed:e=>`\u66F4\u65B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F${T(e)}\u3002`,forbiddenBecause:oe,failureSentence:te(oe),loadMore:e=>`\u3055\u3089\u306B ${e} \u4EF6\u3092\u8868\u793A`,endOfRecords:"\u3053\u308C\u4EE5\u4E0A\u306E\u8A18\u9332\u306F\u3042\u308A\u307E\u305B\u3093",close:"\u9589\u3058\u308B",cancel:"\u3084\u3081\u308B",reload:"\u518D\u8AAD\u307F\u8FBC\u307F",breadcrumb:"\u30D1\u30F3\u304F\u305A",stepDone:"\u5B8C\u4E86",stepPending:"\u672A\u7740\u624B"}},He= exports.t =e=>{if(!Object.hasOwn(E,e))throw new RangeError(`No console UI labels for locale "${e}"; supported: ${Object.keys(E).join(", ")}`);return E[e]};var We=4,Be=[1,2,3,4,6,8,12,16,24],ze=16,Xe=5/4,D={caption:-2,body:-1,"body-lg":0,title:0,heading:1,display:2,"display-lg":3},Ge=11,ae=3/2,je=7/4,Ye=7/4,Ke=120,Ve=3/2,Je=[1,2,3],ie= exports.v =e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`A length must be a finite number of px at or above 0: ${e}`);return Math.ceil(e/4)*4},v=e=>{if(!Number.isInteger(e))throw new RangeError(`A type step must be an integer: ${e}`);return Math.max(Ge,Math.round(ze*Xe**e))},U=(e,n)=>ie(e*n),se=U(v(D.body),ae),b= exports.w =se+24,le= exports.x =b+8,de= exports.y =se+8,A={weight:{regular:400,medium:500,bold:700},radius:{"radius-control":4,"radius-item":8,"radius-container":12,"radius-pill":9999},stroke:{"border-width":1,"focus-width":2,"focus-offset":2,"marker-width":2}},qe=()=>Object.fromEntries(Be.map(e=>[`space-${e}`,e*4])),Ze=()=>{let e=Object.fromEntries(Object.entries(D).map(([t,r])=>{let o=v(r);return[t,{size:o,lineHeight:U(o,t==="title"?Ye:ae)}]})),n=v(D.body);return{...e,prose:{size:n,lineHeight:U(n,je)}}},Qe=()=>Object.fromEntries(Je.map(e=>[`motion-${e}`,Ke*Ve**(e-1)])),ce=e=>Object.freeze({space:Object.freeze(qe()),type:Object.freeze(Ze()),weight:A.weight,radius:A.radius,size:Object.freeze({"size-target":b,"size-control":b,"size-row":b,"size-row-control":le,"size-row-compact":de}),stroke:A.stroke,motion:Object.freeze(Qe()),color:Object.freeze({...e})});var en={fg:{light:"#0f172b",dark:"#f8fafc"},"fg-secondary":{light:"#314158",dark:"#e2e8f0"},"fg-muted":{light:"#44536a",dark:"#cad5e2"},"danger-fg":{light:"#9f0712",dark:"#ffc9c9"},"warning-fg":{light:"#7b3306",dark:"#fee685"},"success-fg":{light:"#006045",dark:"#a4f4cf"},"info-fg":{light:"#193cb8",dark:"#bedbff"},"on-solid":{light:"#ffffff",dark:"#0f172b"},surface:{light:"#ffffff",dark:"#0f172b"},subtle:{light:"#f8fafc",dark:"#1d293d"},sunken:{light:"#f1f5f9",dark:"#020618"},"danger-tint":{light:"#fef2f2",dark:"#460809"},"warning-tint":{light:"#fffbeb",dark:"#461901"},"success-tint":{light:"#ecfdf5",dark:"#002c22"},"info-tint":{light:"#eff6ff",dark:"#162456"},"neutral-solid":{light:"#314158",dark:"#cad5e2"},"danger-solid":{light:"#9f0712",dark:"#ffa2a2"},"success-solid":{light:"#006045",dark:"#5ee9b5"},"info-solid":{light:"#193cb8",dark:"#8ec5ff"},"warning-solid":{light:"#7b3306",dark:"#ffd230"},"danger-accent":{light:"#e7000b",dark:"#ff6467"},"warning-accent":{light:"#bb4d00",dark:"#fcbb00"},"success-accent":{light:"#009966",dark:"#00d492"},"info-accent":{light:"#155dfc",dark:"#51a2ff"},focus:{light:"#155dfc",dark:"#51a2ff"},"border-control":{light:"#62748e",dark:"#90a1b9"},"border-subtle":{light:"#e2e8f0",dark:"#314158"}},a= exports.z =ce(en),nn="--cui-",tn= exports.A =e=>`var(${nn}${e})`;var rn=e=>e>=32&&e<=126||e>=65377&&e<=65500||e>=65512&&e<=65518,ue=(e,n)=>{let t=0,r=0;for(let o of e)rn(o.codePointAt(0))?r+=1:t+=1;return t*1+r*n},h= exports.B =e=>ue(e,.55),x= exports.C =e=>ue(e,.6),u= exports.D =e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return Math.max(0,Math.ceil((e-1e-9)/8))*8};var me="caption",B="body",z=2*a.space["space-3"],fe={type:"caption",paddingInlinePx:2*a.space["space-2"]},H={type:"body",paddingInlinePx:2*a.space["space-3"]+2*a.stroke["border-width"],minInlinePx:a.size["size-control"]},pe={type:"body",minInlinePx:a.size["size-target"]},P={trackInlinePx:2*a.type.body.lineHeight+3*a.space["space-1"],labelGapPx:a.space["space-2"],type:"body"},W={captionType:"caption",valueType:"heading",paddingInlinePx:2*a.space["space-3"]},on=10,an="2000-01-01T00:00:00Z",sn=9999999,ge=(e,n,t)=>(n==="mono"?x(e):h(e))*a.type[t].size,ln=(e,n)=>{if(e.length===0)throw new RangeError(`A ${n} needs at least one text to be measured with`);for(let t of e)if(!f(t))throw new RangeError(`A ${n} sample must hold a readable character: ${JSON.stringify(t)}`);return e},d=(e,n,t,r)=>Math.max(...ln(e,n).map(o=>ge(o,t,r))),X= exports.E =e=>{switch(e.kind){case"text":return d(e.texts,"text",e.face,e.type);case"measured":return d(e.texts,"measured value","sans",B);case"pill":return d(e.labels,"pill","sans",fe.type)+fe.paddingInlinePx;case"button":return Math.max(H.minInlinePx,d(e.labels,"button","sans",H.type)+H.paddingInlinePx);case"link":return Math.max(pe.minInlinePx,d(e.labels,"link","sans",pe.type));case"switch":return e.labelHidden?P.trackInlinePx:P.trackInlinePx+P.labelGapPx+d(e.labels,"switch","sans",P.type);case"cluster":{if(e.items.length===0)throw new RangeError("A cluster needs at least one item to be measured with");return e.items.reduce((n,t)=>n+X(t),0)+(e.items.length-1)*a.space[e.gap]}}},dn= exports.F =(e,n)=>{let t=d([e.header],"column header","sans",me),r=e.note===void 0?0:d(e.note,"column header note","sans",me);return u(Math.max(t,r,...n.map(X))+z)},cn= exports.G =u(ge("\u3042".repeat(on),"sans",B)+z),un= exports.H =e=>u(d(e,"comparison attribute","sans",B)+z),mn= exports.I =(e,n)=>L(an,e,n),fn= exports.J =(e,n)=>{if(n!==void 0&&!f(n))throw new RangeError(`A count sample's unit must hold a readable character: ${JSON.stringify(n)}`);return Y(O(sn,e),n)},pn= exports.K =(e,n)=>u(Math.max(d(e,"tile caption","sans",W.captionType),d(n,"tile value","sans",W.valueType))+W.paddingInlinePx);var gn=.12,yn=.16,Tn=/[\u0020\u00a0\u1361\u{10100}\u{10101}\u{1039f}\u{1091f}]/u,k=a.space["space-3"],S= exports.L =(e,n)=>{let t=0,r=0;for(let s of e)t+=1,Tn.test(s)&&(r+=1);return(n==="mono"?x(e):h(e))+gn*t+yn*r},bn= exports.M =e=>{for(let t of[e.name,...e.notes])if(!f(t))throw new RangeError(`A figure node's name and notes must hold a readable character: ${JSON.stringify(t)}`);let n=Math.max(S(e.name,"sans")*a.type.body.size,...e.notes.map(t=>S(t,"sans")*a.type.caption.size));return{minWidthPx:u(n)+2*k,heightPx:2*k+a.type.body.lineHeight+e.notes.length*a.type.caption.lineHeight}},at= exports.N =e=>{let n=k+a.type.body.lineHeight;return{insetPx:k,namePx:k+a.type.body.lineHeight/2,notesPx:Array.from({length:e},(t,r)=>n+r*a.type.caption.lineHeight+a.type.caption.lineHeight/2)}},hn= exports.O =(e,n)=>{if(e!==null&&!f(e))throw new RangeError(`A disc's name must hold a readable character: ${JSON.stringify(e)}`);if(!(Number.isFinite(n)&&n>0))throw new RangeError(`A disc's radius must be a positive finite px value: ${n}`);return e===null?{widthPx:0,extentBelowPx:n+ye}:{widthPx:u(S(e,"sans")*a.type.caption.size),extentBelowPx:n+a.space["space-1"]+a.type.caption.lineHeight}},ye= exports.P =a.stroke["focus-offset"]+a.stroke["focus-width"],it= exports.Q =a.stroke["focus-offset"]+a.stroke["focus-width"]/2;var _=(1+Math.sqrt(5))/2,xn= exports.R =(e,n)=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`A length must be a finite number of px at or above 0: ${e}`);if(!(Number.isInteger(n)&&n>=0))throw new RangeError(`A golden section step must be an integer at or above 0: ${n}`);return e/_**n};var kn=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return e},m= exports.S =e=>`${kn(e)/16}rem`;var Te=({masterMinPx:e,detailMinPx:n,gapPx:t})=>{for(let r of[e,n])if(!(Number.isFinite(r)&&r>0))throw new RangeError(`Pane minimum must be a positive px value: ${r}`);if(!(Number.isFinite(t)&&t>=0))throw new RangeError(`Gap must be a px value >= 0: ${t}`);return e+t+n},Rn= exports.T =(e,n)=>{let t=Te(n);if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Container width must be a px value >= 0: ${e}`);if(e<t)return{sideBySide:!1,sideBySideFromPx:t,masterInlinePx:e,detailInlinePx:e};let r=(e-n.gapPx)/(1+_),o=Math.min(Math.max(n.masterMinPx,r),e-n.gapPx-n.detailMinPx);return{sideBySide:!0,sideBySideFromPx:t,masterInlinePx:o,detailInlinePx:e-n.gapPx-o}},mt= exports.U =e=>{let n=Te(e),t=`cui-master-detail-m${e.masterMinPx}-d${e.detailMinPx}-g${e.gapPx}`,r=`[data-cui-master-detail="${t}"]`,o=m(e.gapPx),s=`${r}{grid-template-columns:minmax(0,1fr);gap:${o}}`,c=`clamp(${m(e.masterMinPx)},calc((100% - ${o}) / ${1+_}),calc(100% - ${o} - ${m(e.detailMinPx)}))`,i=`@container (min-width:${m(n)}){${r}{grid-template-columns:${c} minmax(0,1fr)}}`;return{key:t,css:s+i}};var Cn=2*a.space["space-1"],be=e=>{if(!(Number.isFinite(e)&&e>0))throw new RangeError(`Column width must be a positive px value: ${e}`);return e},he= exports.V =e=>{if(e.length===0)throw new RangeError("A table needs at least one column");let n=0,t=null;for(let{width:r}of e){if(r.fixedPx!==void 0){n+=be(r.fixedPx);continue}let o=be(r.minPx);if(t!==null&&t!==o)throw new RangeError(`Flexible columns share the remaining width equally, so their minimums must be equal: ${t} and ${o}`);t=o,n+=o}return n},En= exports.W =e=>he(e)+Cn;var Pn=(e,n,t)=>{if(!(Number.isSafeInteger(e)&&e>0))throw new RangeError(`Tile count must be a positive integer: ${e}`);if(!(Number.isFinite(n)&&n>0))throw new RangeError(`Tile minimum width must be a positive px value: ${n}`);if(!(Number.isFinite(t)&&t>=0))throw new RangeError(`Tile gap must be a px value >= 0: ${t}`);let r=[];for(let i=1;i<=e;i+=1)e%i===0&&r.push({columns:i,minContainerPx:i*n+(i-1)*t});let o=`cui-tiles-n${e}-m${n}-g${t}`,s=`[data-cui-tile-grid="${o}"]`,c=r.map(({columns:i,minContainerPx:R})=>{let g=`${s}{grid-template-columns:repeat(${i},minmax(0,1fr))}`;return i===1?g:`@container (min-width:${m(R)}){${g}}`});return{key:o,steps:r,css:c.join("")}};var Sn=(e,n)=>{let t=F(e,n);return t.kind==="ready"?{...t,value:{...t.value,loadingMore:!1}}:t},_n= exports.Z =(e,n)=>$(e,n.ok?{ok:!0,value:{rows:n.value.rows,next:n.value.next,meta:n.value.meta,loadingMore:!1,moreFailure:null}}:n),On= exports._ =e=>e.kind==="ready"&&!e.refreshing&&e.value.next!==null&&!e.value.loadingMore?{...e,value:{...e.value,loadingMore:!0}}:e,wn= exports.$ =(e,n,t)=>{if(!(e.kind==="ready"&&e.value.loadingMore&&Object.is(e.value.next,n)))return e;if(t.ok)return{...e,value:{...e.value,rows:[...e.value.rows,...t.value.rows],next:t.value.next,loadingMore:!1,moreFailure:null}};let r=e.value.moreFailure===null?1:e.value.moreFailure.occurrence+1;return{...e,value:{...e.value,loadingMore:!1,moreFailure:{reason:t.reason,occurrence:r}}}},In= exports.aa =(e,n)=>{if(e.kind!=="ready")return e;let{rows:t,meta:r}=n({rows:e.value.rows,meta:e.value.meta});return{...e,value:{...e.value,rows:t,meta:r}}};var Nn=/^#[0-9a-f]{6}$/i,Mn=/^[a-z][a-z0-9-]*$/,xe=e=>{if(!Nn.test(e))throw new RangeError(`A palette colour must be #rrggbb: ${e}`);return e},ke= exports.ba =({light:e,dark:n})=>`light-dark(${xe(e)}, ${xe(n)})`,Ln= exports.ca =e=>{if(!Mn.test(e))throw new RangeError(`A root attribute must be lowercase letters, digits and hyphens, starting with a letter: ${e}`);return`[${e}] ::placeholder { color: ${ke(a.color["fg-muted"])}; opacity: 1; }`};var Re=["indigo","violet","purple","fuchsia","pink","rose","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue"],Fn= exports.ea =["fg","tint","accent","line","solid","solid-hover"],$n={indigo:{fg:{light:"#372aac",dark:"#c6d2ff"},tint:{light:"#eff3ff",dark:"#1e1a4d"},accent:{light:"#4f39f6",dark:"#7c86ff"}},violet:{fg:{light:"#5d0ec0",dark:"#ddd6ff"},tint:{light:"#f5f3ff",dark:"#2f0d68"},accent:{light:"#7f22fe",dark:"#a684ff"}},purple:{fg:{light:"#6e11b0",dark:"#e9d4ff"},tint:{light:"#faf5ff",dark:"#3c0366"},accent:{light:"#9810fa",dark:"#c27aff"}},fuchsia:{fg:{light:"#8a0194",dark:"#f6cfff"},tint:{light:"#fdf4ff",dark:"#4b004f"},accent:{light:"#c800de",dark:"#ed6aff"}},pink:{fg:{light:"#a3004c",dark:"#fccee8"},tint:{light:"#fdf2f8",dark:"#510424"},accent:{light:"#e60076",dark:"#fb64b6"}},rose:{fg:{light:"#a50036",dark:"#ffccd3"},tint:{light:"#fff1f2",dark:"#4d0218"},accent:{light:"#ec003f",dark:"#ff637e"}},red:{fg:{light:"#9f0712",dark:"#ffc9c9"},tint:{light:"#fef2f2",dark:"#460809"},accent:{light:"#e7000b",dark:"#ff6467"}},orange:{fg:{light:"#7e2a0c",dark:"#ffd6a7"},tint:{light:"#fff7ed",dark:"#441306"},accent:{light:"#f54900",dark:"#ff8904"}},amber:{fg:{light:"#7b3306",dark:"#fee685"},tint:{light:"#fffbeb",dark:"#461901"},accent:{light:"#bb4d00",dark:"#fcbb00"}},yellow:{fg:{light:"#733e0a",dark:"#fff085"},tint:{light:"#fefce8",dark:"#432004"},accent:{light:"#a65f00",dark:"#fdc700"}},lime:{fg:{light:"#35530e",dark:"#d8f999"},tint:{light:"#f7fee7",dark:"#192e03"},accent:{light:"#497d00",dark:"#9ae600"}},green:{fg:{light:"#0d542b",dark:"#b9f8cf"},tint:{light:"#f0fdf4",dark:"#032e15"},accent:{light:"#008236",dark:"#05df72"}},emerald:{fg:{light:"#004f3b",dark:"#a4f4cf"},tint:{light:"#ecfdf5",dark:"#002c22"},accent:{light:"#009966",dark:"#00d492"}},teal:{fg:{light:"#0b4f4a",dark:"#96f7e4"},tint:{light:"#f0fdfa",dark:"#022f2e"},accent:{light:"#009689",dark:"#00d5be"}},cyan:{fg:{light:"#104e64",dark:"#a2f4fd"},tint:{light:"#ecfeff",dark:"#053345"},accent:{light:"#0092b8",dark:"#00d3f2"}},sky:{fg:{light:"#024a70",dark:"#b8e6fe"},tint:{light:"#f0f9ff",dark:"#052f4a"},accent:{light:"#0084d1",dark:"#00bcff"}},blue:{fg:{light:"#193cb8",dark:"#bedbff"},tint:{light:"#eff6ff",dark:"#162456"},accent:{light:"#155dfc",dark:"#51a2ff"}}},y=({light:e,dark:n})=>Object.freeze({light:e,dark:n}),An=({fg:e,tint:n,accent:t})=>Object.freeze({fg:y(e),tint:y(n),accent:y(t),line:y({light:e.dark,dark:e.light}),solid:y(e),"solid-hover":y({light:n.dark,dark:n.light})}),Dn= exports.fa =Object.freeze(Object.fromEntries(Re.map(e=>[e,An($n[e])])));exports.a = O; exports.b = Y; exports.c = K; exports.d = Se; exports.e = f; exports.f = l; exports.g = Le; exports.h = Fe; exports.i = L; exports.j = Ae; exports.k = ne; exports.l = De; exports.m = ve; exports.n = zn; exports.o = Ue; exports.p = F; exports.q = $; exports.r = T; exports.s = E; exports.t = He; exports.u = We; exports.v = ie; exports.w = b; exports.x = le; exports.y = de; exports.z = a; exports.A = tn; exports.B = h; exports.C = x; exports.D = u; exports.E = X; exports.F = dn; exports.G = cn; exports.H = un; exports.I = mn; exports.J = fn; exports.K = pn; exports.L = S; exports.M = bn; exports.N = at; exports.O = hn; exports.P = ye; exports.Q = it; exports.R = xn; exports.S = m; exports.T = Rn; exports.U = mt; exports.V = he; exports.W = En; exports.X = Pn; exports.Y = Sn; exports.Z = _n; exports._ = On; exports.$ = wn; exports.aa = In; exports.ba = ke; exports.ca = Ln; exports.da = Re; exports.ea = Fn; exports.fa = Dn;
|
package/dist/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKYOVFUGcjs = require('./chunk-WKYOVFUG.cjs');var _chunk7M4I26BScjs = require('./chunk-7M4I26BS.cjs');exports.COMPACT_ROW_PX = _chunkWKYOVFUGcjs.y; exports.CONSOLE_UI_LABEL_CATALOGS = _chunkWKYOVFUGcjs.s; exports.CONTRAST_MINIMUM = _chunk7M4I26BScjs.c; exports.CONTRAST_PAIRS = _chunk7M4I26BScjs.d; exports.FIGURE_RING_REACH_PX = _chunkWKYOVFUGcjs.P; exports.FLEXIBLE_COLUMN_MIN_PX = _chunkWKYOVFUGcjs.G; exports.HTTP_FORBIDDEN = _chunkWKYOVFUGcjs.k; exports.LATTICE_PX = _chunkWKYOVFUGcjs.u; exports.ROW_WITH_CONTROL_PX = _chunkWKYOVFUGcjs.x; exports.TARGET_PX = _chunkWKYOVFUGcjs.w; exports.TOKENS = _chunkWKYOVFUGcjs.z; exports.TONES = _chunkWKYOVFUGcjs.fa; exports.TONE_HUES = _chunkWKYOVFUGcjs.da; exports.TONE_ROLES = _chunkWKYOVFUGcjs.ea; exports.ZonedTimeError = _chunkWKYOVFUGcjs.f; exports.beginPage = _chunkWKYOVFUGcjs._; exports.beginPagedReload = _chunkWKYOVFUGcjs.Y; exports.beginReload = _chunkWKYOVFUGcjs.p; exports.ceil8 = _chunkWKYOVFUGcjs.D; exports.ceilToLattice = _chunkWKYOVFUGcjs.v; exports.cellContentInlinePx = _chunkWKYOVFUGcjs.E; exports.comparisonAttributePx = _chunkWKYOVFUGcjs.H; exports.contrastRatio = _chunk7M4I26BScjs.b; exports.countSampleText = _chunkWKYOVFUGcjs.J; exports.cssVar = _chunkWKYOVFUGcjs.A; exports.figureBoxPlan = _chunkWKYOVFUGcjs.M; exports.figureDiscLabelPlan = _chunkWKYOVFUGcjs.O; exports.fillLabel = _chunkWKYOVFUGcjs.j; exports.fixedColumnPx = _chunkWKYOVFUGcjs.F; exports.flatMapOutcome = _chunkWKYOVFUGcjs.m; exports.formatCount = _chunkWKYOVFUGcjs.a; exports.formatInstant = _chunkWKYOVFUGcjs.i; exports.goldenSectionPx = _chunkWKYOVFUGcjs.R; exports.hexToSrgb = _chunk7M4I26BScjs.a; exports.instantSampleText = _chunkWKYOVFUGcjs.I; exports.isReadableText = _chunkWKYOVFUGcjs.e; exports.keepLastGood = _chunkWKYOVFUGcjs.q; exports.lightDark = _chunkWKYOVFUGcjs.ba; exports.mapOutcome = _chunkWKYOVFUGcjs.l; exports.mapPagedList = _chunkWKYOVFUGcjs.aa; exports.masterDetailPlan = _chunkWKYOVFUGcjs.T; exports.monoTextWidthEm = _chunkWKYOVFUGcjs.C; exports.placeholderRule = _chunkWKYOVFUGcjs.ca; exports.pxToRem = _chunkWKYOVFUGcjs.S; exports.readDecimalText = _chunkWKYOVFUGcjs.c; exports.readIntegerText = _chunkWKYOVFUGcjs.d; exports.reasonAside = _chunkWKYOVFUGcjs.r; exports.resolveConsoleUiLabels = _chunkWKYOVFUGcjs.t; exports.settleFirstPage = _chunkWKYOVFUGcjs.Z; exports.settlePage = _chunkWKYOVFUGcjs.$; exports.spacedTextWidthEm = _chunkWKYOVFUGcjs.L; exports.tableFrameMinInlinePx = _chunkWKYOVFUGcjs.W; exports.tableMinInlinePx = _chunkWKYOVFUGcjs.V; exports.textWidthEm = _chunkWKYOVFUGcjs.B; exports.tileGridPlan = _chunkWKYOVFUGcjs.X; exports.tileMinInlinePx = _chunkWKYOVFUGcjs.K; exports.toOffsetIso = _chunkWKYOVFUGcjs.g; exports.toWallTime = _chunkWKYOVFUGcjs.h;
|
package/dist/core.d.cts
CHANGED
|
@@ -10,6 +10,7 @@ declare class ZonedTimeError extends RangeError {
|
|
|
10
10
|
declare const toOffsetIso: (wallTime: string, timeZone: string) => string;
|
|
11
11
|
declare const toWallTime: (offsetIso: string, timeZone: string) => string;
|
|
12
12
|
declare const formatInstant: (instant: string, formatLocale: string, timeZone: string) => string;
|
|
13
|
+
declare function fillLabel(template: string, values: Readonly<Record<string, string | number>>): string;
|
|
13
14
|
type ConsoleUiLocale = "en" | "ja";
|
|
14
15
|
type ConsoleUiLabels = {
|
|
15
16
|
readonly unmeasured: string;
|
|
@@ -48,6 +49,7 @@ declare const SPACE_MULTIPLIERS: readonly [
|
|
|
48
49
|
declare const TYPE_STEPS: {
|
|
49
50
|
readonly caption: -2;
|
|
50
51
|
readonly body: -1;
|
|
52
|
+
readonly "body-lg": 0;
|
|
51
53
|
readonly title: 0;
|
|
52
54
|
readonly heading: 1;
|
|
53
55
|
readonly display: 2;
|
|
@@ -265,6 +267,7 @@ type FigureDiscLabelPlan = {
|
|
|
265
267
|
};
|
|
266
268
|
declare const figureDiscLabelPlan: (label: string | null, radiusPx: number) => FigureDiscLabelPlan;
|
|
267
269
|
declare const FIGURE_RING_REACH_PX: number;
|
|
270
|
+
declare const goldenSectionPx: (lengthPx: number, step: number) => number;
|
|
268
271
|
type MasterDetailOptions = {
|
|
269
272
|
readonly masterMinPx: number;
|
|
270
273
|
readonly detailMinPx: number;
|
|
@@ -277,6 +280,7 @@ type MasterDetailPlan = {
|
|
|
277
280
|
readonly detailInlinePx: number;
|
|
278
281
|
};
|
|
279
282
|
declare const masterDetailPlan: (containerPx: number, options: MasterDetailOptions) => MasterDetailPlan;
|
|
283
|
+
declare const pxToRem: (px: number) => string;
|
|
280
284
|
type ColumnWidth = {
|
|
281
285
|
readonly fixedPx: number;
|
|
282
286
|
readonly minPx?: never;
|
|
@@ -583,4 +587,4 @@ declare const TONE_ROLES: readonly [
|
|
|
583
587
|
type ToneRole = (typeof TONE_ROLES)[number];
|
|
584
588
|
type Tone = Readonly<Record<ToneRole, SchemeColor>>;
|
|
585
589
|
declare const TONES: Readonly<Record<ToneHue, Tone>>;
|
|
586
|
-
export { type AccentRole, COMPACT_ROW_PX, CONSOLE_UI_LABEL_CATALOGS, CONTRAST_MINIMUM, CONTRAST_PAIRS, type CellContent, type ColorScheme, type ColorToken, type ColumnHeaderText, type ColumnWidth, type ColumnWidthSource, type CommandOutcome, type ConsoleUiLabels, type ConsoleUiLocale, type ConsoleUiTokens, type ContrastRole, FIGURE_RING_REACH_PX, FLEXIBLE_COLUMN_MIN_PX, type FgRole, type FigureBoxLines, type FigureBoxPlan, type FigureDiscLabelPlan, HTTP_FORBIDDEN, type KeysetPage, LATTICE_PX, type MasterDetailOptions, type MasterDetailPlan, type MotionToken, type NextPage, type PageFailure, type PagedContent, type PagedState, type PagedValue, ROW_WITH_CONTROL_PX, type RadiusToken, type ReloadCause, type ResourceFailure, type ResourceOutcome, type ResourceState, type SchemeColor, type SizeToken, type SpaceToken, type Srgb, type StrokeToken, type SurfaceRole, TARGET_PX, TOKENS, TONES, TONE_HUES, TONE_ROLES, type TextFace, type TileGridPlan, type TileGridStep, type TokenName, type Tone, type ToneHue, type ToneRole, type TypeToken, type WeightToken, ZonedTimeError, type ZonedTimeErrorReason, beginPage, beginPagedReload, beginReload, ceil8, ceilToLattice, cellContentInlinePx, comparisonAttributePx, contrastRatio, countSampleText, cssVar, figureBoxPlan, figureDiscLabelPlan, fixedColumnPx, flatMapOutcome, formatCount, formatInstant, hexToSrgb, instantSampleText, isReadableText, keepLastGood, lightDark, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, placeholderRule, readDecimalText, readIntegerText, reasonAside, resolveConsoleUiLabels, settleFirstPage, settlePage, spacedTextWidthEm, tableFrameMinInlinePx, tableMinInlinePx, textWidthEm, tileGridPlan, tileMinInlinePx, toOffsetIso, toWallTime };
|
|
590
|
+
export { type AccentRole, COMPACT_ROW_PX, CONSOLE_UI_LABEL_CATALOGS, CONTRAST_MINIMUM, CONTRAST_PAIRS, type CellContent, type ColorScheme, type ColorToken, type ColumnHeaderText, type ColumnWidth, type ColumnWidthSource, type CommandOutcome, type ConsoleUiLabels, type ConsoleUiLocale, type ConsoleUiTokens, type ContrastRole, FIGURE_RING_REACH_PX, FLEXIBLE_COLUMN_MIN_PX, type FgRole, type FigureBoxLines, type FigureBoxPlan, type FigureDiscLabelPlan, HTTP_FORBIDDEN, type KeysetPage, LATTICE_PX, type MasterDetailOptions, type MasterDetailPlan, type MotionToken, type NextPage, type PageFailure, type PagedContent, type PagedState, type PagedValue, ROW_WITH_CONTROL_PX, type RadiusToken, type ReloadCause, type ResourceFailure, type ResourceOutcome, type ResourceState, type SchemeColor, type SizeToken, type SpaceToken, type Srgb, type StrokeToken, type SurfaceRole, TARGET_PX, TOKENS, TONES, TONE_HUES, TONE_ROLES, type TextFace, type TileGridPlan, type TileGridStep, type TokenName, type Tone, type ToneHue, type ToneRole, type TypeToken, type WeightToken, ZonedTimeError, type ZonedTimeErrorReason, beginPage, beginPagedReload, beginReload, ceil8, ceilToLattice, cellContentInlinePx, comparisonAttributePx, contrastRatio, countSampleText, cssVar, figureBoxPlan, figureDiscLabelPlan, fillLabel, fixedColumnPx, flatMapOutcome, formatCount, formatInstant, goldenSectionPx, hexToSrgb, instantSampleText, isReadableText, keepLastGood, lightDark, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, placeholderRule, pxToRem, readDecimalText, readIntegerText, reasonAside, resolveConsoleUiLabels, settleFirstPage, settlePage, spacedTextWidthEm, tableFrameMinInlinePx, tableMinInlinePx, textWidthEm, tileGridPlan, tileMinInlinePx, toOffsetIso, toWallTime };
|
package/dist/core.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ declare class ZonedTimeError extends RangeError {
|
|
|
10
10
|
declare const toOffsetIso: (wallTime: string, timeZone: string) => string;
|
|
11
11
|
declare const toWallTime: (offsetIso: string, timeZone: string) => string;
|
|
12
12
|
declare const formatInstant: (instant: string, formatLocale: string, timeZone: string) => string;
|
|
13
|
+
declare function fillLabel(template: string, values: Readonly<Record<string, string | number>>): string;
|
|
13
14
|
type ConsoleUiLocale = "en" | "ja";
|
|
14
15
|
type ConsoleUiLabels = {
|
|
15
16
|
readonly unmeasured: string;
|
|
@@ -48,6 +49,7 @@ declare const SPACE_MULTIPLIERS: readonly [
|
|
|
48
49
|
declare const TYPE_STEPS: {
|
|
49
50
|
readonly caption: -2;
|
|
50
51
|
readonly body: -1;
|
|
52
|
+
readonly "body-lg": 0;
|
|
51
53
|
readonly title: 0;
|
|
52
54
|
readonly heading: 1;
|
|
53
55
|
readonly display: 2;
|
|
@@ -265,6 +267,7 @@ type FigureDiscLabelPlan = {
|
|
|
265
267
|
};
|
|
266
268
|
declare const figureDiscLabelPlan: (label: string | null, radiusPx: number) => FigureDiscLabelPlan;
|
|
267
269
|
declare const FIGURE_RING_REACH_PX: number;
|
|
270
|
+
declare const goldenSectionPx: (lengthPx: number, step: number) => number;
|
|
268
271
|
type MasterDetailOptions = {
|
|
269
272
|
readonly masterMinPx: number;
|
|
270
273
|
readonly detailMinPx: number;
|
|
@@ -277,6 +280,7 @@ type MasterDetailPlan = {
|
|
|
277
280
|
readonly detailInlinePx: number;
|
|
278
281
|
};
|
|
279
282
|
declare const masterDetailPlan: (containerPx: number, options: MasterDetailOptions) => MasterDetailPlan;
|
|
283
|
+
declare const pxToRem: (px: number) => string;
|
|
280
284
|
type ColumnWidth = {
|
|
281
285
|
readonly fixedPx: number;
|
|
282
286
|
readonly minPx?: never;
|
|
@@ -583,4 +587,4 @@ declare const TONE_ROLES: readonly [
|
|
|
583
587
|
type ToneRole = (typeof TONE_ROLES)[number];
|
|
584
588
|
type Tone = Readonly<Record<ToneRole, SchemeColor>>;
|
|
585
589
|
declare const TONES: Readonly<Record<ToneHue, Tone>>;
|
|
586
|
-
export { type AccentRole, COMPACT_ROW_PX, CONSOLE_UI_LABEL_CATALOGS, CONTRAST_MINIMUM, CONTRAST_PAIRS, type CellContent, type ColorScheme, type ColorToken, type ColumnHeaderText, type ColumnWidth, type ColumnWidthSource, type CommandOutcome, type ConsoleUiLabels, type ConsoleUiLocale, type ConsoleUiTokens, type ContrastRole, FIGURE_RING_REACH_PX, FLEXIBLE_COLUMN_MIN_PX, type FgRole, type FigureBoxLines, type FigureBoxPlan, type FigureDiscLabelPlan, HTTP_FORBIDDEN, type KeysetPage, LATTICE_PX, type MasterDetailOptions, type MasterDetailPlan, type MotionToken, type NextPage, type PageFailure, type PagedContent, type PagedState, type PagedValue, ROW_WITH_CONTROL_PX, type RadiusToken, type ReloadCause, type ResourceFailure, type ResourceOutcome, type ResourceState, type SchemeColor, type SizeToken, type SpaceToken, type Srgb, type StrokeToken, type SurfaceRole, TARGET_PX, TOKENS, TONES, TONE_HUES, TONE_ROLES, type TextFace, type TileGridPlan, type TileGridStep, type TokenName, type Tone, type ToneHue, type ToneRole, type TypeToken, type WeightToken, ZonedTimeError, type ZonedTimeErrorReason, beginPage, beginPagedReload, beginReload, ceil8, ceilToLattice, cellContentInlinePx, comparisonAttributePx, contrastRatio, countSampleText, cssVar, figureBoxPlan, figureDiscLabelPlan, fixedColumnPx, flatMapOutcome, formatCount, formatInstant, hexToSrgb, instantSampleText, isReadableText, keepLastGood, lightDark, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, placeholderRule, readDecimalText, readIntegerText, reasonAside, resolveConsoleUiLabels, settleFirstPage, settlePage, spacedTextWidthEm, tableFrameMinInlinePx, tableMinInlinePx, textWidthEm, tileGridPlan, tileMinInlinePx, toOffsetIso, toWallTime };
|
|
590
|
+
export { type AccentRole, COMPACT_ROW_PX, CONSOLE_UI_LABEL_CATALOGS, CONTRAST_MINIMUM, CONTRAST_PAIRS, type CellContent, type ColorScheme, type ColorToken, type ColumnHeaderText, type ColumnWidth, type ColumnWidthSource, type CommandOutcome, type ConsoleUiLabels, type ConsoleUiLocale, type ConsoleUiTokens, type ContrastRole, FIGURE_RING_REACH_PX, FLEXIBLE_COLUMN_MIN_PX, type FgRole, type FigureBoxLines, type FigureBoxPlan, type FigureDiscLabelPlan, HTTP_FORBIDDEN, type KeysetPage, LATTICE_PX, type MasterDetailOptions, type MasterDetailPlan, type MotionToken, type NextPage, type PageFailure, type PagedContent, type PagedState, type PagedValue, ROW_WITH_CONTROL_PX, type RadiusToken, type ReloadCause, type ResourceFailure, type ResourceOutcome, type ResourceState, type SchemeColor, type SizeToken, type SpaceToken, type Srgb, type StrokeToken, type SurfaceRole, TARGET_PX, TOKENS, TONES, TONE_HUES, TONE_ROLES, type TextFace, type TileGridPlan, type TileGridStep, type TokenName, type Tone, type ToneHue, type ToneRole, type TypeToken, type WeightToken, ZonedTimeError, type ZonedTimeErrorReason, beginPage, beginPagedReload, beginReload, ceil8, ceilToLattice, cellContentInlinePx, comparisonAttributePx, contrastRatio, countSampleText, cssVar, figureBoxPlan, figureDiscLabelPlan, fillLabel, fixedColumnPx, flatMapOutcome, formatCount, formatInstant, goldenSectionPx, hexToSrgb, instantSampleText, isReadableText, keepLastGood, lightDark, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, placeholderRule, pxToRem, readDecimalText, readIntegerText, reasonAside, resolveConsoleUiLabels, settleFirstPage, settlePage, spacedTextWidthEm, tableFrameMinInlinePx, tableMinInlinePx, textWidthEm, tileGridPlan, tileMinInlinePx, toOffsetIso, toWallTime };
|
package/dist/core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as
|
|
1
|
+
import{$ as V,A as x,B as y,C as z,D as A,E as B,F as C,G as D,H as E,I as F,J as G,K as H,L as I,M as J,O as K,P as L,R as M,S as N,T as O,V as P,W as Q,X as R,Y as S,Z as T,_ as U,a,aa as W,ba as $,c as b,ca as aa,d as c,da as ba,e as d,ea as ca,f as e,fa as da,g as f,h as g,i as h,j as i,k as j,l as k,m as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t,x as u,y as v,z as w}from"./chunk-5TCPOLTI.js";import{a as X,b as Y,c as Z,d as _}from"./chunk-FXEGLGL7.js";export{v as COMPACT_ROW_PX,p as CONSOLE_UI_LABEL_CATALOGS,Z as CONTRAST_MINIMUM,_ as CONTRAST_PAIRS,L as FIGURE_RING_REACH_PX,D as FLEXIBLE_COLUMN_MIN_PX,j as HTTP_FORBIDDEN,r as LATTICE_PX,u as ROW_WITH_CONTROL_PX,t as TARGET_PX,w as TOKENS,da as TONES,ba as TONE_HUES,ca as TONE_ROLES,e as ZonedTimeError,U as beginPage,S as beginPagedReload,m as beginReload,A as ceil8,s as ceilToLattice,B as cellContentInlinePx,E as comparisonAttributePx,Y as contrastRatio,G as countSampleText,x as cssVar,J as figureBoxPlan,K as figureDiscLabelPlan,i as fillLabel,C as fixedColumnPx,l as flatMapOutcome,a as formatCount,h as formatInstant,M as goldenSectionPx,X as hexToSrgb,F as instantSampleText,d as isReadableText,n as keepLastGood,$ as lightDark,k as mapOutcome,W as mapPagedList,O as masterDetailPlan,z as monoTextWidthEm,aa as placeholderRule,N as pxToRem,b as readDecimalText,c as readIntegerText,o as reasonAside,q as resolveConsoleUiLabels,T as settleFirstPage,V as settlePage,I as spacedTextWidthEm,Q as tableFrameMinInlinePx,P as tableMinInlinePx,y as textWidthEm,R as tileGridPlan,H as tileMinInlinePx,f as toOffsetIso,g as toWallTime};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkS6DFKVUVcjs = require('./chunk-S6DFKVUV.cjs');var _chunk7M4I26BScjs = require('./chunk-7M4I26BS.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var Me=_react.createContext.call(void 0, null),vt=" ",ht='[inert], [aria-hidden="true" i]',Et="dialog:modal",$e="data-cui-dialog-announcer",mr=`:scope > [${$e}]`,gr=e=>{if(e.closest(ht)!==null)return{hidden:'an ancestor is inert or aria-hidden="true"'};let t=e.ownerDocument,r=[...t.querySelectorAll(Et)],n=t.activeElement,a=r.filter(s=>s.contains(n)),o=a.length>0?a:r;if(o.every(s=>s.contains(e)))return{region:e};let i=o.find(s=>o.every(l=>l.contains(s)));if(i===void 0)return{hidden:"focus is in no open modal dialog and they do not nest, so which one is topmost cannot be told"};let d=i.querySelector(mr);return d===null?{hidden:"the topmost open modal dialog neither contains the console nor is a Dialog"}:d.closest(ht)!==null?{hidden:'the topmost open modal dialog is a Dialog whose live region has an inert or aria-hidden="true" ancestor'}:{region:d}},br=e=>{try{e.querySelectorAll(Et)}catch(t){throw typeof t=="object"&&t!==null&&"name"in t&&t.name==="SyntaxError"?new Error("ConsoleUiRoot requires the :modal selector (Chrome 105, Firefox 103, Safari 15.6, jsdom 27 or later): announcements check whether a modal dialog hides the live region",{cause:t}):t}},ue= exports.ANNOUNCE_SETTLE_MS =150,hr=1e3,Rt=new WeakMap,Rr=(e,t)=>{let r=_nullishCoalesce(Rt.get(e), () => (new Set)),n={text:t};Rt.set(e,r.add(n)),setTimeout(()=>r.delete(n),ue);let a=e.ownerDocument.createElement("span");a.textContent=[...r].map(o=>o.text).join(vt),e.replaceChildren(a)},Tr= exports.ConsoleUiRoot =({locale:e,formatLocale:t,timeZone:r,testId:n,children:a})=>{if(_react.useContext.call(void 0, Me)!==null)throw new Error("ConsoleUiRoot must not be rendered inside another ConsoleUiRoot (a console has exactly one root)");let i=_chunkS6DFKVUVcjs.s.call(void 0, e),[d]=Intl.getCanonicalLocales(t),s=_react.useMemo.call(void 0, ()=>new Intl.DateTimeFormat(d,{timeZone:r}).resolvedOptions().timeZone,[d,r]),l=_react.useRef.call(void 0, null),p=_react.useRef.call(void 0, null);_react.useLayoutEffect.call(void 0, ()=>{br(l.current.ownerDocument)},[]);let u=_react.useCallback.call(void 0, y=>{if(y.trim()==="")throw new RangeError("announce: text must be a non-empty sentence");let R=()=>{let{texts:h,settle:T,deadline:x}=p.current;p.current=null,clearTimeout(T),clearTimeout(x);let g=l.current;if(g===null)return;let b=h.join(vt),v=gr(g);if("hidden"in v)throw new Error(`announce: the live region is hidden from assistive technology (${v.hidden}), so this announcement would be lost: ${b}`);Rr(v.region,b)},f=p.current;if(f===null){p.current={texts:[y],settle:setTimeout(R,ue),deadline:setTimeout(R,hr)};return}f.texts.push(y),clearTimeout(f.settle),f.settle=setTimeout(R,ue)},[]),c=_react.useMemo.call(void 0, ()=>({locale:e,formatLocale:d,timeZone:s,labels:i,announce:u}),[e,d,s,i,u]);return _jsxruntime.jsx.call(void 0, Me.Provider,{value:c,children:_jsxruntime.jsxs.call(void 0, "div",{"data-cui-root":"","data-cui-surface":"surface","data-cui-fg":"fg","data-testid":n,children:[a,_jsxruntime.jsx.call(void 0, "div",{className:"cui-visually-hidden",role:"status","aria-live":"polite","aria-atomic":"true","data-testid":`${n}-announcer`,ref:l})]})})},k= exports.useConsoleUi =()=>{let e=_react.useContext.call(void 0, Me);if(e===null)throw new Error("useConsoleUi must be called inside ConsoleUiRoot");return e},m=()=>{k()},xr= exports.useAnnounce =()=>k().announce;var ce=(e,t,r)=>{e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),r(t))};var Er=({items:e,current:t,onNavigate:r,testId:n})=>{let{labels:a}=k();if(new Set(e.map(o=>o.id)).size!==e.length)throw new RangeError(`Breadcrumb keys must be unique: ${e.map(o=>o.id).join(", ")}`);return _jsxruntime.jsx.call(void 0, "nav",{className:"cui-breadcrumb","aria-label":a.breadcrumb,"data-testid":n,children:_jsxruntime.jsxs.call(void 0, "ol",{className:"cui-breadcrumb-list",role:"list","data-cui-type":"body",children:[e.map(o=>_jsxruntime.jsxs.call(void 0, "li",{className:"cui-breadcrumb-item",children:[_jsxruntime.jsx.call(void 0, "a",{className:"cui-link",href:o.href,"data-cui-fg":"info-fg","data-cui-type":"body","data-testid":`${n}-${o.id}`,onClick:i=>ce(i,o.href,r),children:o.label}),_jsxruntime.jsx.call(void 0, "span",{className:"cui-breadcrumb-separator","aria-hidden":"true","data-cui-fg":"fg-muted",children:"\u203A"})]},o.id)),_jsxruntime.jsx.call(void 0, "li",{className:"cui-breadcrumb-item",children:_jsxruntime.jsx.call(void 0, "span",{"aria-current":"page","data-cui-fg":"fg","data-testid":`${n}-current`,children:t})})]})})};var w=e=>{if(e===void 0)return{};for(let t of Object.keys(e))if(!t.startsWith("data-")||t.startsWith("data-cui-")||t==="data-testid")throw new RangeError(`Caller attributes must be data-* and must not override data-cui-* or data-testid: ${t}`);return e};var Pr=new Set(["abbr","b","bdi","bdo","br","cite","code","data","del","dfn","em","i","ins","kbd","mark","q","s","samp","small","span","strong","sub","sup","time","u","var","wbr"]),Cr=e=>{for(let t of e.querySelectorAll("*")){let r=t.localName;if(!Pr.has(r)||t.hasAttribute("tabindex")||t.hasAttribute("contenteditable"))return r}return null},H=(e,{testId:t,part:r,host:n})=>{_react.useLayoutEffect.call(void 0, ()=>{let a=Cr(e.current);if(a!==null)throw new RangeError(`${t}: the ${r} is the content of a ${n} and holds only non-interactive phrasing content, not <${a}>`)})};var P=({fg:e,type:t,face:r,as:n="span",space:a,testId:o,id:i,tabIndex:d,ref:s,children:l})=>(m(),_jsxruntime.jsx.call(void 0, n,{className:"cui-text","data-cui-fg":e,"data-cui-type":t,"data-cui-face":r,"data-cui-space":a,"data-cui-measure":n==="p"?"reading":void 0,"data-testid":o,id:i,tabIndex:d,ref:s,children:l}));var kr=/\s/,Fe=(e,t)=>{if(e===""||kr.test(e))throw new RangeError(`The id of ${t} must be one token without whitespace: "${e}"`);return e},W=(e,t)=>{if(e!==void 0){if(e.reason!==void 0){if(e.reason.trim()==="")throw new RangeError("An unavailable control needs a reason that is not blank");return t}return Fe(e.reasonId,"an unavailable control's reason")}},K=(...e)=>{let t=e.filter(r=>r!==void 0);return t.length===0?void 0:t.join(" ")};var Ir={primary:{fg:"on-solid",surface:"info-solid",type:"body"},secondary:{fg:"fg",surface:void 0,type:"body"},danger:{fg:"on-solid",surface:"danger-solid",type:"body"},link:{fg:"info-fg",surface:void 0,type:"body"}},Ae=({subject:e,children:t})=>{let r=_react.useRef.call(void 0, null);return H(r,e),_jsxruntime.jsx.call(void 0, "span",{ref:r,children:t})},F= exports.Button =({variant:e,children:t,testId:r,type:n="button",onClick:a,unavailable:o,describedBy:i,expanded:d,controls:s,ref:l,dataAttributes:p,busy:u,busyLabel:c})=>{m();let y=_react.useId.call(void 0, ),R=W(o,y),f=u===!0||o!==void 0,h=Ir[e],T=x=>{if(f){x.preventDefault();return}_optionalChain([a, 'optionalCall', _2 => _2(x)])};return _jsxruntime.jsxs.call(void 0, "span",{className:"cui-button-group",children:[_jsxruntime.jsx.call(void 0, "button",{className:"cui-button",type:n==="submit"?"submit":"button","data-cui-variant":e,"data-cui-fg":h.fg,"data-cui-surface":h.surface,"data-cui-type":h.type,"data-testid":r,"aria-disabled":f?!0:void 0,"aria-busy":u===!0?!0:void 0,"aria-describedby":K(i,R),"aria-expanded":d,"aria-controls":s,onClick:T,ref:l,...w(p),children:_jsxruntime.jsx.call(void 0, Ae,{subject:{testId:r,part:"label",host:"button"},children:u===!0?c:t})}),_optionalChain([o, 'optionalAccess', _3 => _3.reason])===void 0?null:_jsxruntime.jsx.call(void 0, P,{fg:"fg-muted",type:"body",id:y,testId:`${r}-reason`,children:o.reason})]})},Mr= exports.Link =({onNavigate:e,children:t,testId:r,ref:n})=>(m(),_jsxruntime.jsx.call(void 0, "button",{className:"cui-link",type:"button","data-cui-fg":"info-fg","data-cui-type":"body","data-testid":r,onClick:e,ref:n,children:_jsxruntime.jsx.call(void 0, Ae,{subject:{testId:r,part:"label",host:"button"},children:t})})),$r=/^[^\s#]+$/,Fr= exports.FragmentLink =({targetId:e,children:t,testId:r,onFollow:n,dataAttributes:a})=>{if(m(),!$r.test(e))throw new RangeError(`A fragment link needs the target's id without "#" or white space: "${e}"`);return _jsxruntime.jsx.call(void 0, "a",{className:"cui-link",href:`#${e}`,"data-cui-fg":"info-fg","data-cui-type":"body","data-testid":r,onClick:n,...w(a),children:_jsxruntime.jsx.call(void 0, Ae,{subject:{testId:r,part:"label",host:"link"},children:t})})};var Hr=229,Or=new Set(["text","search","email","url","tel","password","number","date","datetime-local","month","time","week"]),De=e=>e instanceof HTMLTextAreaElement?e.value!=="":e instanceof HTMLInputElement&&Or.has(e.type)&&(e.value!==""||e.validity.badInput),te=(e,t)=>{e.key!=="Escape"||e.nativeEvent.isComposing||e.keyCode===Hr||De(e.target)||(e.stopPropagation(),t())},Ur= exports.useEscapeToClose =e=>_react.useCallback.call(void 0, t=>te(t,e),[e]);var Ct=e=>e===void 0?void 0:t=>te(t,e),He= exports.Card =({id:e,title:t,description:r,actions:n,onEscape:a,testId:o,headingRef:i,ref:d,dataAttributes:s,children:l})=>{m();let p=_react.useId.call(void 0, ),u=Ct(a);return _jsxruntime.jsxs.call(void 0, "section",{className:"cui-card",id:e,"aria-labelledby":p,"data-cui-surface":"surface","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"sans","data-testid":o,ref:d,onKeyDown:u,...w(s),children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-card-header",children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-card-heading",children:[_jsxruntime.jsx.call(void 0, "h2",{className:"cui-card-title",id:p,"data-cui-type":"title","data-testid":`${o}-heading`,ref:i,tabIndex:i===void 0?void 0:-1,children:t}),r===void 0?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-card-description","data-cui-fg":"fg-muted","data-cui-type":"body","data-cui-measure":"reading",children:r})]}),n===void 0?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-card-actions",children:n})]}),l]})},Kr={3:"h3",4:"h4"},Br= exports.CardSection =({id:e,title:t,subtitle:r,level:n=3,region:a=!1,onEscape:o,testId:i,headingRef:d,ref:s,dataAttributes:l,children:p})=>{m();let u=_react.useId.call(void 0, ),c=Ct(o),y=Kr[n],R=_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-card-section-heading",children:[_jsxruntime.jsx.call(void 0, y,{className:"cui-card-section-title",id:u,"data-cui-type":"body","data-testid":`${i}-heading`,ref:d,tabIndex:d===void 0?void 0:-1,children:t}),r===void 0?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-card-section-subtitle","data-cui-fg":"fg-muted","data-cui-type":"body","data-cui-measure":"reading",children:r})]}),p]});return a?_jsxruntime.jsx.call(void 0, "section",{className:"cui-card-section",id:e,"aria-labelledby":u,"data-testid":i,ref:s,onKeyDown:c,...w(l),children:R}):_jsxruntime.jsx.call(void 0, "div",{className:"cui-card-section",id:e,"data-testid":i,ref:s,...w(l),children:R})};var qr=({label:e,code:t,testId:r})=>(m(),_jsxruntime.jsx.call(void 0, "section",{className:"cui-code-frame",tabIndex:0,"aria-label":e,"data-cui-surface":"sunken","data-testid":r,children:_jsxruntime.jsx.call(void 0, "pre",{className:"cui-code","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"mono","data-testid":`${r}-code`,children:t})}));var z=({ruleKey:e,css:t})=>_jsxruntime.jsx.call(void 0, "style",{href:e,precedence:"cui",children:t});var Wr=({caption:e,attributes:t,columns:r,attributePx:n,columnMinPx:a,testId:o})=>{m();let i=_react.useId.call(void 0, );for(let u of[n,a])if(!(Number.isFinite(u)&&u>0))throw new RangeError(`ComparisonGrid widths must be positive px values: ${u}`);if(r.length===0)throw new RangeError("ComparisonGrid needs at least one column");for(let u of r)for(let c of t)if(!Object.hasOwn(u.cells,c.key))throw new RangeError(`Column "${u.key}" has no value for attribute "${c.key}"`);let d=n+r.length*a,s=`cui-comparison-a${n}-c${a}-n${r.length}`,l=u=>`[data-cui-comparison="${s}"][data-cui-comparison-layout="${u}"]`,p=`${l("table")}{display:none}@container (min-width:${_chunkS6DFKVUVcjs.Q.call(void 0, d)}){${l("table")}{display:block}${l("stack")}{display:none}}`;return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-container","data-cui-stack-below-px":d,"data-testid":o,children:[_jsxruntime.jsx.call(void 0, z,{ruleKey:s,css:p}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-comparison-frame","data-cui-comparison":s,"data-cui-comparison-layout":"table",children:_jsxruntime.jsxs.call(void 0, "table",{className:"cui-comparison-table","data-cui-type":"body",children:[_jsxruntime.jsx.call(void 0, "caption",{className:"cui-visually-hidden",children:e}),_jsxruntime.jsxs.call(void 0, "colgroup",{children:[_jsxruntime.jsx.call(void 0, "col",{style:{width:_chunkS6DFKVUVcjs.Q.call(void 0, n)}}),r.map(u=>_jsxruntime.jsx.call(void 0, "col",{},u.key))]}),_jsxruntime.jsx.call(void 0, "thead",{children:_jsxruntime.jsxs.call(void 0, "tr",{children:[_jsxruntime.jsx.call(void 0, "td",{}),r.map(u=>_jsxruntime.jsx.call(void 0, "th",{scope:"col",children:u.heading},u.key))]})}),_jsxruntime.jsx.call(void 0, "tbody",{children:t.map(u=>_jsxruntime.jsxs.call(void 0, "tr",{children:[_jsxruntime.jsx.call(void 0, "th",{scope:"row",children:u.label}),r.map(c=>_jsxruntime.jsx.call(void 0, "td",{children:c.cells[u.key]("table")},c.key))]},u.key))})]})}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-comparison-stack","data-cui-comparison":s,"data-cui-comparison-layout":"stack",children:r.map((u,c)=>{let y=`${i}-column-${c}`;return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-comparison-column",role:"group","aria-labelledby":y,"data-cui-type":"body",children:[_jsxruntime.jsx.call(void 0, "div",{className:"cui-comparison-heading",id:y,children:u.heading}),_jsxruntime.jsx.call(void 0, "dl",{className:"cui-comparison-list",children:t.map(R=>_jsxruntime.jsxs.call(void 0, "div",{children:[_jsxruntime.jsx.call(void 0, "dt",{children:R.label}),_jsxruntime.jsx.call(void 0, "dd",{children:u.cells[R.key]("stack")})]},R.key))})]},u.key)})})]})};var ne="[data-cui-row-focus]",Oe="[data-cui-row-detail]",zr=e=>e===null?[]:[...e.querySelectorAll(`:scope > ${ne}`)],kt=(e,t)=>{let r=new Map;t!==null&&r.set(t,0);let n=-1;for(let a of e===null?[]:e.children)a.matches(ne)?(n+=1,r.set(a,n)):n>=0&&a.matches(Oe)&&r.set(a,n);return r},Lt=(e,t,r,n)=>{let a=zr(t);if(a.length===0)return r;let o=n.get(e);if(o===void 0)throw new RangeError(`rowFocusTarget: <${e.localName}> left holding focus with no position in the table (only its rows, row details and empty text hold one)`);return a[Math.min(o,a.length-1)]};var jr=e=>e+1,oe= exports.useFocusRescue =e=>{let t=_react.useRef.call(void 0, e),r=_react.useRef.call(void 0, null),n=_react.useRef.call(void 0, !1),[,a]=_react.useReducer.call(void 0, jr,0),o=_react.useCallback.call(void 0, (i=>()=>{n.current&&i.contains(document.activeElement)&&(r.current=i,a())}),[]);return _react.useLayoutEffect.call(void 0, ()=>(n.current=!0,()=>{n.current=!1,r.current=null}),[]),_react.useLayoutEffect.call(void 0, ()=>{t.current=e}),_react.useLayoutEffect.call(void 0, ()=>{let i=r.current;if(i===null)return;r.current=null;let d=[null,document.body].includes(document.activeElement);i.isConnected||!d||_optionalChain([t, 'access', _4 => _4.current, 'call', _5 => _5(i), 'optionalAccess', _6 => _6.focus, 'call', _7 => _7()])}),o};var en=new Map,tn='a[href], audio[controls], button, details, embed, iframe, img[usemap], input:not([type="hidden"]), label, select, textarea, video[controls], [tabindex], [contenteditable]',rn=(e,t,r)=>{_react.useLayoutEffect.call(void 0, ()=>{let n=e.current;if(t!=="row-compact"||n===null)return;let a=[...n.querySelectorAll(tn)].find(o=>o.parentElement!==n);if(a!==void 0)throw new RangeError(`${r}: a compact row holds no control or focus target (a ${_chunkS6DFKVUVcjs.v} px target does not fit its ${_chunkS6DFKVUVcjs.x} px; use row-control), not <${a.localName}>`)})},nn=(e,t)=>{let r=e.filter(a=>a.rowHeader===!0).map(a=>a.key);if(r.length>1)throw new RangeError(`${t}: a table has at most one row header column, not ${r.length} (${r.join(", ")})`);let n=e.find(a=>a.rowHeader!==!0&&a.rowHeaderNote!==void 0);if(n!==void 0)throw new RangeError(`${t}: a row header note belongs to the row header column, not to ${n.key}`)},on=e=>e==null?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-table-header-note",children:e}),an=(e,t,r,n,a)=>{let o=e.open(t);return _jsxruntime.jsx.call(void 0, "tr",{ref:a,hidden:!o,"data-cui-row-detail":o?"open":"closed","data-testid":`${n}-detail`,children:_jsxruntime.jsx.call(void 0, "td",{colSpan:r,id:e.id(t),children:o?e.render(t):null})})},sn= exports.DataTable =({caption:e,captionHidden:t,columns:r,rows:n,rowKey:a,rowTestId:o,rowData:i,rowSize:d,rowDetail:s,empty:l,testId:p,ref:u})=>{m();let c=_react.useId.call(void 0, ),y=_react.useRef.call(void 0, null);rn(y,d,p);let R=_react.useRef.call(void 0, null),f=_react.useRef.call(void 0, en),h=oe(g=>Lt(g,y.current,R.current,f.current));_react.useLayoutEffect.call(void 0, ()=>{f.current=kt(y.current,R.current)});let T=_react.useCallback.call(void 0, g=>{R.current=g;let b=h(g);return()=>{R.current=null,b()}},[h]),x=_chunkS6DFKVUVcjs.T.call(void 0, r);return nn(r,p),_jsxruntime.jsx.call(void 0, "div",{className:"cui-container","data-testid":p,ref:u,children:n.length===0?_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"prose",tabIndex:-1,ref:T,testId:`${p}-empty`,children:l}):_jsxruntime.jsx.call(void 0, "section",{ref:h,className:"cui-table-frame",tabIndex:0,"aria-labelledby":c,"data-testid":`${p}-frame`,children:_jsxruntime.jsxs.call(void 0, "table",{className:"cui-table","data-cui-type":"body","data-cui-row-size":d,style:{"--cui-table-min":_chunkS6DFKVUVcjs.Q.call(void 0, x)},children:[_jsxruntime.jsx.call(void 0, "caption",{className:t?"cui-visually-hidden":"cui-table-caption",id:c,children:e}),_jsxruntime.jsx.call(void 0, "colgroup",{children:r.map(g=>_jsxruntime.jsx.call(void 0, "col",{style:g.width.fixedPx===void 0?void 0:{width:_chunkS6DFKVUVcjs.Q.call(void 0, g.width.fixedPx)}},g.key))}),_jsxruntime.jsx.call(void 0, "thead",{children:_jsxruntime.jsx.call(void 0, "tr",{children:r.map(g=>_jsxruntime.jsxs.call(void 0, "th",{scope:"col","data-cui-align":g.align,"data-cui-surface":"subtle","data-cui-type":"caption",children:[g.header,g.note===void 0?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-table-header-note",children:g.note})]},g.key))})}),_jsxruntime.jsx.call(void 0, "tbody",{ref:y,children:n.map(g=>_jsxruntime.jsxs.call(void 0, _react.Fragment,{children:[_jsxruntime.jsx.call(void 0, "tr",{ref:h,tabIndex:-1,"data-cui-row-focus":"","data-testid":o,...w(_optionalChain([i, 'optionalCall', _8 => _8(g)])),children:r.map(b=>b.rowHeader===!0?_jsxruntime.jsxs.call(void 0, "th",{scope:"row","data-cui-align":b.align,children:[b.cell(g),b.rowHeaderNote===void 0?null:on(b.rowHeaderNote(g))]},b.key):_jsxruntime.jsx.call(void 0, "td",{"data-cui-align":b.align,children:b.cell(g)},b.key))}),s===void 0?null:an(s,g,r.length,o,h)]},a(g)))})]})})})};var dn=({items:e,testId:t})=>{if(m(),new Set(e.map(r=>r.key)).size!==e.length)throw new RangeError(`Description keys must be unique: ${e.map(r=>r.key).join(", ")}`);return _jsxruntime.jsx.call(void 0, "dl",{className:"cui-description-list","data-cui-type":"body","data-testid":t,children:e.map(r=>_jsxruntime.jsxs.call(void 0, "div",{className:"cui-description-row","data-testid":`${t}-${r.key}`,children:[_jsxruntime.jsx.call(void 0, "dt",{"data-cui-fg":"fg-secondary",children:r.term}),_jsxruntime.jsx.call(void 0, "dd",{"data-cui-fg":"fg",children:r.description})]},r.key))})};var Ft=e=>{e instanceof HTMLElement&&e.isConnected&&e.focus()},un= exports.Dialog =({title:e,description:t,open:r,onClose:n,testId:a,children:o})=>{let{labels:i}=k(),d=_react.useId.call(void 0, ),s=_react.useId.call(void 0, ),l=_react.useRef.call(void 0, null),p=_react.useRef.call(void 0, null);return _react.useLayoutEffect.call(void 0, ()=>{let y=l.current;r&&!y.open?(p.current=y.ownerDocument.activeElement,y.showModal()):!r&&y.open&&y.close()},[r]),_react.useLayoutEffect.call(void 0, ()=>{let y=l.current;return()=>{y.open&&(y.close(),Ft(p.current),p.current=null)}},[]),_jsxruntime.jsxs.call(void 0, "dialog",{className:"cui-dialog","aria-labelledby":d,"aria-describedby":t===void 0?void 0:s,"data-cui-surface":"surface","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"sans","data-testid":a,ref:l,onClose:y=>{y.currentTarget.open||(Ft(p.current),p.current=null,r&&n())},onCancel:y=>{De(y.currentTarget.ownerDocument.activeElement)&&y.preventDefault()},children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-dialog-header",children:[_jsxruntime.jsx.call(void 0, "h2",{className:"cui-dialog-title",id:d,"data-cui-type":"title",children:e}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-dialog-actions",children:_jsxruntime.jsx.call(void 0, F,{variant:"secondary",testId:`${a}-close`,onClick:()=>_optionalChain([l, 'access', _9 => _9.current, 'optionalAccess', _10 => _10.close, 'call', _11 => _11()]),children:i.close})})]}),t===void 0?null:_jsxruntime.jsx.call(void 0, "div",{id:s,"data-cui-measure":"reading","data-testid":`${a}-description`,children:t}),o,_jsxruntime.jsx.call(void 0, "div",{className:"cui-visually-hidden",role:"status","aria-live":"polite","aria-atomic":"true",[$e]:"","data-testid":`${a}-announcer`})]})};var yn=({summary:e,open:t,onOpenChange:r,testId:n,children:a})=>{m();let o=_react.useId.call(void 0, ),i=_react.useRef.call(void 0, null);return H(i,{testId:n,part:"summary",host:"button"}),_jsxruntime.jsxs.call(void 0, "div",{className:"cui-disclosure","data-testid":n,children:[_jsxruntime.jsxs.call(void 0, "button",{className:"cui-disclosure-button",type:"button","aria-expanded":t,"aria-controls":o,"data-cui-fg":"fg","data-cui-type":"body","data-testid":`${n}-button`,onClick:()=>r(!t),children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-disclosure-marker","aria-hidden":"true",children:t?"\u25BE":"\u25B8"}),_jsxruntime.jsx.call(void 0, "span",{ref:i,children:e})]}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-disclosure-panel",id:o,hidden:!t,"data-testid":`${n}-panel`,children:a})]})};var X=({description:e,error:t,errorId:r})=>{m();let n=_react.useId.call(void 0, ),a=_react.useId.call(void 0, ),o=_react.useId.call(void 0, ),i=r===void 0?o:Fe(r,"a field's error"),d=[e===void 0?null:a,t===void 0?null:i].filter(l=>l!==null).join(" ");return{control:{id:n,"aria-describedby":d===""?void 0:d,"aria-invalid":t===void 0?void 0:!0},descriptionId:a,errorId:i}},j=({description:e,error:t,descriptionId:r,errorId:n,testId:a})=>_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[e===void 0?null:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"body",id:r,testId:`${a}-description`,children:e}),t===void 0?null:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"danger-fg",type:"body",id:n,testId:`${a}-error`,children:t})]}),ye=({htmlFor:e,hidden:t,children:r})=>_jsxruntime.jsx.call(void 0, "label",{className:t===!0?"cui-visually-hidden":"cui-field-label",htmlFor:e,"data-cui-type":"body",children:r}),fn= exports.Field =({label:e,description:t,error:r,errorId:n,testId:a,children:o})=>{let{control:i,descriptionId:d,errorId:s}=X({label:e,description:t,error:r,errorId:n});return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-invalid":r!==void 0,"data-testid":a,children:[_jsxruntime.jsx.call(void 0, ye,{htmlFor:i.id,hidden:void 0,children:e}),o(i),_jsxruntime.jsx.call(void 0, j,{description:t,error:r,descriptionId:d,errorId:s,testId:a})]})},Ht=({label:e,description:t,error:r,errorId:n,value:a,onValueChange:o,type:i,list:d,autoComplete:s,inputMode:l,prefix:p,labelHidden:u,required:c,testId:y,ref:R})=>{let{control:f,descriptionId:h,errorId:T}=X({label:e,description:t,error:r,errorId:n}),x=_react.useId.call(void 0, );if(p!==void 0&&p.trim()==="")throw new RangeError("An input's prefix must not be blank");let g=i==="password",b=_jsxruntime.jsx.call(void 0, "input",{className:"cui-input",type:i,value:a,list:d,autoComplete:s,inputMode:l,spellCheck:g?!1:void 0,autoCapitalize:g?"none":void 0,required:c,onChange:v=>o(v.target.value),"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"body","data-testid":y,ref:R,...f,"aria-describedby":K(p===void 0?void 0:x,f["aria-describedby"])});return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-invalid":r!==void 0,"data-testid":`${y}-field`,children:[_jsxruntime.jsx.call(void 0, ye,{htmlFor:f.id,hidden:u,children:e}),p===void 0?b:_jsxruntime.jsxs.call(void 0, "div",{className:"cui-input-group",children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-input-prefix",id:x,"data-cui-fg":"fg-secondary","data-cui-surface":"sunken","data-cui-type":"body","data-testid":`${y}-prefix`,children:p}),b]}),_jsxruntime.jsx.call(void 0, j,{description:t,error:r,descriptionId:h,errorId:T,testId:y})]})},mn= exports.TextInput =e=>_jsxruntime.jsx.call(void 0, Ht,{...e}),gn= exports.PasswordInput =e=>_jsxruntime.jsx.call(void 0, Ht,{...e,type:"password"}),bn= exports.TextArea =({label:e,description:t,error:r,errorId:n,value:a,onValueChange:o,required:i,testId:d,ref:s})=>{let{control:l,descriptionId:p,errorId:u}=X({label:e,description:t,error:r,errorId:n});return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-invalid":r!==void 0,"data-testid":`${d}-field`,children:[_jsxruntime.jsx.call(void 0, ye,{htmlFor:l.id,hidden:void 0,children:e}),_jsxruntime.jsx.call(void 0, "textarea",{className:"cui-input cui-textarea",value:a,required:i,onChange:c=>o(c.target.value),"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"prose","data-testid":d,ref:s,...l}),_jsxruntime.jsx.call(void 0, j,{description:t,error:r,descriptionId:p,errorId:u,testId:d})]})},hn= exports.Select =({label:e,description:t,error:r,errorId:n,value:a,options:o,onValueChange:i,labelHidden:d,unavailable:s,testId:l,ref:p})=>{let{control:u,descriptionId:c,errorId:y}=X({label:e,description:t,error:r,errorId:n}),R=_react.useId.call(void 0, ),f=W(s,R);return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-invalid":r!==void 0,"data-testid":`${l}-field`,children:[_jsxruntime.jsx.call(void 0, ye,{htmlFor:u.id,hidden:d,children:e}),_jsxruntime.jsx.call(void 0, "select",{className:"cui-input",value:a,onChange:h=>{s===void 0&&i(h.target.value)},"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"body","data-testid":l,ref:p,...u,"aria-disabled":s===void 0?void 0:!0,"aria-describedby":K(u["aria-describedby"],f),children:o.map(h=>_jsxruntime.jsx.call(void 0, "option",{value:h.value,children:h.label},h.value))}),_jsxruntime.jsx.call(void 0, j,{description:t,error:r,descriptionId:c,errorId:y,testId:l}),_optionalChain([s, 'optionalAccess', _12 => _12.reason])===void 0?null:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"body",id:R,testId:`${l}-reason`,children:s.reason})]})},Rn= exports.RadioGroup =({legend:e,description:t,error:r,errorId:n,value:a,options:o,onValueChange:i,testId:d,ref:s})=>{let l=_react.useId.call(void 0, ),{control:p,descriptionId:u,errorId:c}=X({label:e,description:t,error:r,errorId:n});return _jsxruntime.jsxs.call(void 0, "fieldset",{className:"cui-radio-group","aria-describedby":p["aria-describedby"],"data-invalid":r!==void 0,"data-testid":d,children:[_jsxruntime.jsx.call(void 0, "legend",{className:"cui-radio-group-legend","data-cui-type":"body",children:e}),o.map((y,R)=>_jsxruntime.jsxs.call(void 0, "label",{className:"cui-radio","data-cui-type":"body",children:[_jsxruntime.jsx.call(void 0, "input",{type:"radio",name:l,value:y.value,checked:y.value===a,onChange:()=>i(y.value),"aria-invalid":p["aria-invalid"],"data-testid":`${d}-option-${y.value}`,ref:R===0?s:void 0}),_jsxruntime.jsx.call(void 0, "span",{children:y.label})]},y.value)),_jsxruntime.jsx.call(void 0, j,{description:t,error:r,descriptionId:u,errorId:c,testId:d})]})},Tn= exports.CheckboxGroup =({legend:e,description:t,error:r,errorId:n,values:a,options:o,onValuesChange:i,testId:d,ref:s})=>{let{control:l,descriptionId:p,errorId:u}=X({label:e,description:t,error:r,errorId:n}),c=o.map(f=>f.value);if(c.length===0||new Set(c).size!==c.length)throw new RangeError(`A check box group needs at least one option with unique values: ${c.join(", ")}`);let y=a.filter(f=>!c.includes(f));if(y.length>0)throw new RangeError(`The chosen values are not options: ${y.join(", ")}`);let R=new Set(a);return _jsxruntime.jsxs.call(void 0, "fieldset",{className:"cui-checkbox-group","aria-describedby":l["aria-describedby"],"data-invalid":r!==void 0,"data-testid":d,children:[_jsxruntime.jsx.call(void 0, "legend",{className:"cui-checkbox-group-legend","data-cui-type":"body",children:e}),o.map((f,h)=>_jsxruntime.jsxs.call(void 0, "label",{className:"cui-checkbox","data-cui-type":"body",children:[_jsxruntime.jsx.call(void 0, "input",{type:"checkbox",value:f.value,checked:R.has(f.value),onChange:()=>i(c.filter(T=>T===f.value?!R.has(T):R.has(T))),"aria-invalid":l["aria-invalid"],"data-testid":`${d}-option-${f.value}`,ref:h===0?s:void 0}),_jsxruntime.jsx.call(void 0, "span",{children:f.label})]},f.value)),_jsxruntime.jsx.call(void 0, j,{description:t,error:r,descriptionId:p,errorId:u,testId:d})]})};var qt=_react.createContext.call(void 0, null),Ot="surface",Ut={neutral:{face:"surface",line:"border-control"},info:{face:"info-tint",line:"info-accent"},success:{face:"success-tint",line:"success-accent"},warning:{face:"warning-tint",line:"warning-accent"},danger:{face:"danger-tint",line:"danger-accent"}},Kt={face:"info-tint",line:"info-accent"},Gt={normal:"border-control",high:"info-accent"},Pn=["normal","high"],Cn=[1,2,3,4],A=_chunkS6DFKVUVcjs.y.space["space-2"],Nn="fg",kn="fg-secondary",Vt=e=>{let t=_react.useContext.call(void 0, qt);if(t===null)throw new Error(`${e} must be rendered inside Figure`);return t},Ge=(e,t,r)=>{if(!(Number.isFinite(r)&&r>0&&r%4===0))throw new RangeError(`${e}: ${t} must be a positive multiple of the ${4} px lattice: ${r}`)},Ln= exports.Figure =e=>{m();let t=_react.useId.call(void 0, ),{kind:r,widthPx:n,heightPx:a,testId:o,dataAttributes:i,children:d}=e;Ge(o,"widthPx",n),Ge(o,"heightPx",a);let s=_react.useMemo.call(void 0, ()=>({kind:r,widthPx:n,heightPx:a,arrowIds:{normal:`${t}-arrow-normal`,high:`${t}-arrow-high`}}),[r,n,a,t]),l=_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "defs",{children:Pn.map(y=>_jsxruntime.jsx.call(void 0, "marker",{id:s.arrowIds[y],viewBox:`0 0 ${A} ${A}`,refX:A,refY:A/2,markerWidth:A,markerHeight:A,markerUnits:"userSpaceOnUse",orient:"auto","data-cui-emphasis":y,children:_jsxruntime.jsx.call(void 0, "path",{d:`M 0 0 L ${A} ${A/2} L 0 ${A} z`,"data-cui-stroke":Gt[y],"data-testid":`${o}-arrow-${y}`})},y))}),_jsxruntime.jsx.call(void 0, qt.Provider,{value:s,children:d})]});if(e.kind==="group"){let{label:y,onEscape:R}=e;if(!_chunkS6DFKVUVcjs.e.call(void 0, y))throw new RangeError(`${o}: a group figure's label must hold a readable character: ${JSON.stringify(y)}`);return _jsxruntime.jsx.call(void 0, "div",{className:"cui-figure-frame","data-testid":`${o}-frame`,children:_jsxruntime.jsx.call(void 0, "svg",{className:"cui-figure",role:"group","aria-label":y,viewBox:`0 0 ${n} ${a}`,"data-cui-figure":"group","data-cui-surface":Ot,"data-cui-face":"sans",style:{"--cui-figure-inline":_chunkS6DFKVUVcjs.Q.call(void 0, n),"--cui-figure-block":_chunkS6DFKVUVcjs.Q.call(void 0, a)},onKeyDown:R===void 0?void 0:f=>te(f,R),"data-testid":o,...w(i),children:l})})}let{viewBox:p,pointer:u,svgRef:c}=e;return _jsxruntime.jsx.call(void 0, "div",{className:"cui-container","data-testid":`${o}-frame`,children:_jsxruntime.jsx.call(void 0, "svg",{ref:c,className:"cui-figure","aria-hidden":"true",viewBox:p===void 0?`0 0 ${n} ${a}`:p,"data-cui-figure":"decorative","data-cui-surface":Ot,"data-cui-face":"sans","data-cui-pan":u===void 0?void 0:"true","data-cui-cursor":_optionalChain([u, 'optionalAccess', _13 => _13.cursor]),style:{"--cui-figure-inline":_chunkS6DFKVUVcjs.Q.call(void 0, n),"--cui-figure-ratio":String(a/n)},"data-testid":o,...w(i),..._optionalChain([u, 'optionalAccess', _14 => _14.handlers]),children:l})})},Bt=(e,t)=>{try{return t()}catch(r){throw new RangeError(`${e}: ${r.message}`,{cause:r})}},Sn=(e,t,r)=>{for(let n of t){let a=_chunk7M4I26BScjs.d.light[n.fg],o=r.find(i=>a[i]===void 0);if(o!==void 0)throw new RangeError(`${e}: the note ${JSON.stringify(n.text)} in ${n.fg} is not in the contrast table on ${o}, a face the node takes`)}},In= exports.FigureNode =e=>{m();let t=Vt("FigureNode"),r=_react.useId.call(void 0, ),{x:n,y:a,shape:o,tone:i,outline:d,selected:s,name:l,title:p,press:u,testId:c,dataAttributes:y}=e,R=e.notes===void 0?[]:e.notes;if(!(Number.isFinite(n)&&Number.isFinite(a)))throw new RangeError(`${c}: a node's position must be finite: ${n}, ${a}`);if(t.kind==="group"&&u===void 0)throw new RangeError(`${c}: every node of a group figure must be pressable (pass press)`);if(t.kind==="decorative"&&u!==void 0)throw new RangeError(`${c}: a node of a decorative figure cannot be pressed (it is hidden from assistive technology)`);if(u!==void 0&&!_chunkS6DFKVUVcjs.e.call(void 0, u.label))throw new RangeError(`${c}: a pressable node's label must hold a readable character: ${JSON.stringify(u.label)}`);let f=s?Kt:Ut[i];Sn(c,R,[Ut[i].face,Kt.face]);let h,T,x;if(o.kind==="box"){if(l===null)throw new RangeError(`${c}: a box's name is drawn inside the box and sizes it, so it cannot be null (only a disc may be drawn without a name)`);let b=Bt(c,()=>_chunkS6DFKVUVcjs.L.call(void 0, {name:l,notes:R.map(I=>I.text)}));if(Ge(c,"a box's widthPx",o.widthPx),o.widthPx<b.minWidthPx)throw new RangeError(`${c}: a box ${o.widthPx} px wide is narrower than its lines under the widest 1.4.12 spacing (${b.minWidthPx} px)`);h={width:o.widthPx,height:b.heightPx,left:n,top:a};let v=_chunkS6DFKVUVcjs.M.call(void 0, R.length);T=_jsxruntime.jsxs.call(void 0, "g",{"data-cui-surface":f.face,children:[_jsxruntime.jsx.call(void 0, "rect",{className:"cui-figure-plate",width:o.widthPx,height:b.heightPx,rx:_chunkS6DFKVUVcjs.y.radius["radius-item"],"data-cui-fill":f.face,"data-cui-stroke":f.line,"data-testid":`${c}-plate`}),_jsxruntime.jsx.call(void 0, "text",{className:"cui-figure-name",x:v.insetPx,y:v.namePx,fontSize:_chunkS6DFKVUVcjs.y.type.body.size,"data-cui-fg":Nn,"data-cui-figure-type":"body","data-testid":`${c}-name`,children:l}),R.map((I,Q)=>_jsxruntime.jsx.call(void 0, "text",{x:v.insetPx,y:v.notesPx[Q],fontSize:_chunkS6DFKVUVcjs.y.type.caption.size,"data-cui-fg":I.fg,"data-cui-figure-type":"caption","data-testid":`${c}-note-${Q}`,children:I.text},Q))]}),x=_jsxruntime.jsx.call(void 0, "rect",{className:"cui-figure-ring",x:-_chunkS6DFKVUVcjs.P,y:-_chunkS6DFKVUVcjs.P,width:o.widthPx+2*_chunkS6DFKVUVcjs.P,height:b.heightPx+2*_chunkS6DFKVUVcjs.P,rx:_chunkS6DFKVUVcjs.y.radius["radius-item"]+_chunkS6DFKVUVcjs.P,"data-cui-stroke":"focus","data-testid":`${c}-ring`})}else{let b=Bt(c,()=>_chunkS6DFKVUVcjs.N.call(void 0, l,o.radiusPx));h={width:2*o.radiusPx,height:2*o.radiusPx,left:n-o.radiusPx,top:a-o.radiusPx},T=_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "g",{"data-cui-surface":f.face,children:_jsxruntime.jsx.call(void 0, "circle",{className:"cui-figure-plate",r:o.radiusPx,"data-cui-fill":f.face,"data-cui-stroke":f.line,"data-testid":`${c}-plate`})}),l===null?null:_jsxruntime.jsx.call(void 0, "text",{className:"cui-figure-label",x:0,y:b.extentBelowPx-_chunkS6DFKVUVcjs.y.type.caption.lineHeight/2,fontSize:_chunkS6DFKVUVcjs.y.type.caption.size,"data-cui-fg":kn,"data-cui-figure-type":"caption","data-testid":`${c}-name`,children:l})]}),x=_jsxruntime.jsx.call(void 0, "circle",{className:"cui-figure-ring",r:o.radiusPx+_chunkS6DFKVUVcjs.P,"data-cui-stroke":"focus","data-testid":`${c}-ring`})}if(u!==void 0){if(h.width<_chunkS6DFKVUVcjs.v||h.height<_chunkS6DFKVUVcjs.v)throw new RangeError(`${c}: a pressable node must be at least the ${_chunkS6DFKVUVcjs.v} px target: ${h.width} \xD7 ${h.height}`);if(h.left<_chunkS6DFKVUVcjs.O||h.top<_chunkS6DFKVUVcjs.O||h.left+h.width+_chunkS6DFKVUVcjs.O>t.widthPx||h.top+h.height+_chunkS6DFKVUVcjs.O>t.heightPx)throw new RangeError(`${c}: a pressable node must keep ${_chunkS6DFKVUVcjs.O} px to the figure's edge for its focus ring`)}let g=u===void 0?{}:{role:"button",tabIndex:0,"aria-label":u.label,"aria-describedby":u.description===void 0?void 0:r,"aria-expanded":u.expanded,"aria-controls":u.expanded?u.controls:void 0,onClick:b=>{b.currentTarget.focus(),u.onPress()},onKeyDown:b=>{b.key!=="Enter"&&b.key!==" "||(b.preventDefault(),b.repeat||u.onPress())}};return _jsxruntime.jsxs.call(void 0, "g",{className:"cui-figure-node",transform:`translate(${n} ${a})`,"data-cui-tone":i,"data-cui-outline":d,"data-selected":String(s),...g,"data-testid":c,...w(y),children:[p===void 0?null:_jsxruntime.jsx.call(void 0, "title",{children:p}),_optionalChain([u, 'optionalAccess', _15 => _15.description])===void 0?null:_jsxruntime.jsx.call(void 0, "desc",{id:r,"data-testid":`${c}-description`,children:u.description}),u===void 0?null:x,T]})},Mn= exports.FigureEdge =({d:e,emphasis:t,weight:r,arrow:n,title:a,testId:o,dataAttributes:i})=>{m();let d=Vt("FigureEdge");if(!Cn.includes(r))throw new RangeError(`${o}: an edge's weight must be 1, 2, 3 or 4: ${r}`);return _jsxruntime.jsx.call(void 0, "path",{className:"cui-figure-edge",d:e,markerEnd:n?`url(#${d.arrowIds[t]})`:void 0,"data-cui-stroke":Gt[t],"data-cui-weight":r,"data-cui-emphasis":t,"data-testid":o,...w(i),children:a===void 0?null:_jsxruntime.jsx.call(void 0, "title",{children:a})})};var $n={1:"h1",2:"h2",3:"h3"},Fn= exports.Heading =({level:e,type:t,testId:r,headingRef:n,children:a})=>{m();let o=$n[e];return _jsxruntime.jsx.call(void 0, o,{className:"cui-heading","data-cui-type":t,"data-cui-fg":"fg","data-testid":r,ref:n,tabIndex:n===void 0?void 0:-1,children:a})};var Dn={removed:"danger-tint",added:"success-tint"},Hn= exports.InlineChange =({kind:e,testId:t,children:r})=>{if(m(),r==="")throw new RangeError(`${t}: a changed fragment must hold at least one character`);return _jsxruntime.jsx.call(void 0, e==="removed"?"del":"ins",{className:"cui-change","data-cui-change":e,"data-cui-surface":Dn[e],"data-cui-fg":"fg","data-testid":t,children:r})};var Un={neutral:{fg:"fg-secondary",surface:"sunken"},info:{fg:"info-fg",surface:"info-tint"},success:{fg:"success-fg",surface:"success-tint"},warning:{fg:"warning-fg",surface:"warning-tint"},danger:{fg:"danger-fg",surface:"danger-tint"}},Kn={neutral:"neutral-solid",info:"info-solid",success:"success-solid",warning:"warning-solid",danger:"danger-solid"},Ve= exports.Pill =({tone:e,variant:t,testId:r,dataAttributes:n,children:a})=>{m();let o=t==="tint"?Un[e]:{fg:"on-solid",surface:Kn[e]};return _jsxruntime.jsx.call(void 0, "span",{className:"cui-pill","data-cui-tone":e,"data-cui-variant":t,"data-cui-fg":o.fg,"data-cui-surface":o.surface,"data-cui-type":"caption","data-testid":r,...w(n),children:a})};var We=({label:e,valueText:t,value:r,max:n,testId:a})=>{m();let o=_react.useId.call(void 0, );if(n!==null){if(!(Number.isFinite(n)&&n>0))throw new RangeError(`Progress maximum must be positive: ${n}`);if(r===null||!(Number.isFinite(r)&&r>=0))throw new RangeError(`A determinate progress value must be a number >= 0: ${r}`)}let i=n===null?null:{max:n,now:Math.min(r,n)};return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-progress","data-testid":a,children:[_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg",type:"body",id:o,children:e}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-progress-track",role:"progressbar","aria-labelledby":o,"aria-valuetext":t,"aria-valuemin":i===null?void 0:0,"aria-valuemax":_optionalChain([i, 'optionalAccess', _16 => _16.max]),"aria-valuenow":_optionalChain([i, 'optionalAccess', _17 => _17.now]),"data-cui-surface":"sunken","data-cui-indeterminate":i===null,"data-testid":`${a}-bar`,children:_jsxruntime.jsx.call(void 0, "div",{className:"cui-progress-fill","data-cui-accent":"info-accent",style:i===null?void 0:{inlineSize:`${i.now/i.max*100}%`},"data-testid":`${a}-fill`})}),_jsxruntime.jsx.call(void 0, "div",{"aria-hidden":"true",children:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-secondary",type:"body",testId:`${a}-value`,children:t})})]})};var Gn=({title:e,status:t,progress:r,cancel:n,testId:a,children:o})=>_jsxruntime.jsxs.call(void 0, He,{title:e,actions:n===void 0?void 0:_jsxruntime.jsx.call(void 0, F,{variant:"secondary",busy:n.busy,busyLabel:n.busyLabel,onClick:n.onCancel,testId:`${a}-cancel`,children:n.label}),testId:a,children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-job-status",role:"status","aria-live":"polite","aria-atomic":"true","data-testid":`${a}-status`,children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-visually-hidden",children:`${e} `}),_jsxruntime.jsx.call(void 0, Ve,{tone:t.tone,variant:"tint",testId:`${a}-status-pill`,children:t.label})]}),r===void 0?null:_jsxruntime.jsx.call(void 0, We,{...r,testId:`${a}-progress`}),o]});var ze=_react.createContext.call(void 0, null),zn="space-2",Jn= exports.List =e=>{m();let{gap:t,label:r,id:n,hidden:a,testId:o,children:i}=e;if(r!==void 0&&!_chunkS6DFKVUVcjs.e.call(void 0, r))throw new RangeError(`${o}: a list's label must hold a readable character: ${JSON.stringify(r)}`);let d=e.marker==="none"?void 0:e.type,s=d!==void 0,l=e.marker==="number"||e.marker==="none"&&e.ordered?"ol":"ul";return _jsxruntime.jsx.call(void 0, ze.Provider,{value:e.marker,children:_jsxruntime.jsx.call(void 0, l,{className:"cui-list",role:"list","aria-label":r,id:n,hidden:a,"data-cui-gap":s?void 0:t,"data-cui-row-gap":s?t:void 0,"data-cui-column-gap":s?zn:void 0,"data-cui-marker":s?e.marker:void 0,"data-cui-type":d,"data-testid":o,children:i})})},Xn= exports.ListItem =({testId:e,dataAttributes:t,children:r})=>{m();let n=_react.useContext.call(void 0, ze);if(n===null)throw new Error("ListItem must be rendered inside List, not inside another ListItem");return _jsxruntime.jsx.call(void 0, "li",{className:"cui-list-item","data-testid":e,...w(t),children:_jsxruntime.jsx.call(void 0, "div",{className:"cui-list-body","data-cui-measure":n==="none"?void 0:"reading",children:_jsxruntime.jsx.call(void 0, ze.Provider,{value:null,children:r})})})};var jn=({tone:e,testId:t,children:r})=>(m(),_jsxruntime.jsx.call(void 0, "div",{className:"cui-notice","data-cui-tone":e,"data-cui-surface":e==="info"?"info-tint":"warning-tint","data-cui-fg":"fg","data-cui-type":"prose","data-cui-measure":"reading","data-testid":t,children:r})),de= exports.AlertMessage =({occurrence:e,testId:t,children:r})=>(m(),_jsxruntime.jsx.call(void 0, "div",{className:"cui-alert",role:"alert","data-cui-surface":"danger-tint","data-cui-fg":"danger-fg","data-cui-type":"prose","data-cui-measure":"reading","data-cui-occurrence":e,"data-testid":t,children:r},e));var jt=e=>[...e.querySelectorAll(ne)].filter(t=>{let r=t.closest(Oe);return r===null||!e.contains(r)}),Zn=e=>{let t=e.ref.current;if(t===null)throw new Error("LoadMore: rows.ref is not attached to the element holding the rows");let r=jt(t);if(r.length!==e.count)throw new Error(`LoadMore: rows.ref holds ${r.length} ${ne} elements for ${e.count} rows`);return r},Qn=(e,t)=>{let r=-1;return e.forEach((n,a)=>{t.has(n)&&(r=a)}),e[r+1]},eo= exports.LoadMore =({onLoad:e,busy:t,done:r,failure:n,limit:a,rows:o,testId:i})=>{let{formatLocale:d,labels:s}=k(),l=_react.useRef.call(void 0, null),p=_react.useRef.call(void 0, null),u=_react.useRef.call(void 0, null),c=_react.useRef.call(void 0, !1),y=()=>{let T=o.ref.current;l.current={shown:new Set(T===null?[]:jt(T)),failureOccurrence:n===null?null:n.occurrence,busySeen:!1},e()};_react.useLayoutEffect.call(void 0, ()=>{let T=c.current;c.current=!1;let x=l.current;if(x===null)return;let g=Zn(o);if(t){x.busySeen=!0,x.shown=new Set(g);return}let b=Qn(g,x.shown),v=n!==null&&n.occurrence!==x.failureOccurrence;if(!(x.busySeen||b!==void 0||v||r)||(l.current=null,v||b===void 0))return;let I=[null,document.body].includes(document.activeElement);(u.current!==null&&document.activeElement===u.current||T&&I)&&b.focus()});let R=oe(()=>r?p.current:u.current),f=_react.useCallback.call(void 0, (T=>{u.current=T;let x=R(T);return()=>{u.current=null,c.current=T===document.activeElement,x()}}),[R]),h=_react.useCallback.call(void 0, (T=>{p.current=T;let x=R(T);return()=>{p.current=null,x()}}),[R]);return r?_jsxruntime.jsx.call(void 0, "div",{className:"cui-load-more","data-testid":i,children:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"body",tabIndex:-1,ref:h,testId:`${i}-end`,children:s.endOfRecords})}):_jsxruntime.jsxs.call(void 0, "div",{className:"cui-load-more","data-testid":i,children:[_jsxruntime.jsx.call(void 0, F,{variant:"secondary",busy:t,busyLabel:s.loading,onClick:y,ref:f,testId:`${i}-button`,children:s.loadMore(_chunkS6DFKVUVcjs.a.call(void 0, a,d))}),n===null?null:_jsxruntime.jsx.call(void 0, de,{occurrence:n.occurrence,testId:`${i}-failure`,children:s.loadFailed(n.reason)})]})};var ro=({master:e,detail:t,masterMinPx:r,detailMinPx:n,testId:a})=>{m();let o=_chunkS6DFKVUVcjs.S.call(void 0, {masterMinPx:r,detailMinPx:n,gapPx:_chunkS6DFKVUVcjs.y.space["space-6"]});return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-container","data-testid":a,children:[_jsxruntime.jsx.call(void 0, z,{ruleKey:o.key,css:o.css}),_jsxruntime.jsxs.call(void 0, "div",{className:"cui-master-detail","data-cui-master-detail":o.key,children:[_jsxruntime.jsx.call(void 0, "div",{className:"cui-master-detail-pane","data-testid":`${a}-master`,children:e}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-master-detail-pane","data-testid":`${a}-detail`,children:t})]})]})};var Re=e=>{let{formatLocale:t,labels:r}=k(),{testId:n}=e;if(e.keep===void 0){let{value:i,unit:d}=e;if(d!==void 0&&!_chunkS6DFKVUVcjs.e.call(void 0, d))throw new RangeError(`${n}: a unit must hold a readable character: ${JSON.stringify(d)}`);if(i===null)return _jsxruntime.jsx.call(void 0, "span",{className:"cui-measured","data-measured":"false","data-testid":n,children:r.unmeasured});let s=_chunkS6DFKVUVcjs.a.call(void 0, i,t);return _jsxruntime.jsx.call(void 0, "span",{className:"cui-measured","data-measured":"true","data-testid":n,children:_chunkS6DFKVUVcjs.b.call(void 0, s,d)})}let{text:a,keep:o}=e;if(a===null)return _jsxruntime.jsx.call(void 0, "span",{className:"cui-measured","data-measured":"false","data-cui-keep":o,"data-testid":n,children:r.unmeasured});if(!_chunkS6DFKVUVcjs.e.call(void 0, a))throw new RangeError(`${n}: a measured text must hold a readable character (pass null when the value was not measured): ${JSON.stringify(a)}`);return _jsxruntime.jsx.call(void 0, "span",{className:"cui-measured","data-measured":"true","data-cui-keep":o,"data-testid":n,children:a})};var no=({label:e,value:t,min:r,max:n,valueText:a,testId:o})=>{if(m(),!(Number.isFinite(r)&&Number.isFinite(n)&&r<n))throw new RangeError(`Meter needs a finite range with min below max: min ${r}, max ${n}`);if(!(Number.isFinite(t)&&t>=r&&t<=n))throw new RangeError(`Meter value must be a finite number in its range: value ${t}, min ${r}, max ${n}`);return _jsxruntime.jsxs.call(void 0, "span",{className:"cui-meter","data-testid":o,children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-meter-track",role:"meter","aria-label":e,"aria-valuemin":r,"aria-valuemax":n,"aria-valuenow":t,"aria-valuetext":a,"data-cui-surface":"sunken","data-testid":`${o}-bar`,children:_jsxruntime.jsx.call(void 0, "span",{className:"cui-meter-fill","data-cui-accent":"info-accent",style:{inlineSize:`${(t-r)/(n-r)*100}%`},"data-testid":`${o}-fill`})}),_jsxruntime.jsx.call(void 0, "span",{"aria-hidden":"true",children:_jsxruntime.jsx.call(void 0, P,{fg:"fg",type:"body",testId:`${o}-value`,children:a})})]})};var so={ArrowLeft:-1,ArrowRight:1},lo= exports.PanelTabs =({label:e,items:t,value:r,onValueChange:n,testId:a,panelDescribedBy:o,children:i})=>{m();let d=_react.useId.call(void 0, ),s=_react.useRef.call(void 0, new Map);if(t.length===0)throw new RangeError("PanelTabs needs at least one tab");let l=t.map(f=>f.id);if(new Set(l).size!==l.length)throw new RangeError(`Tab keys must be unique: ${l.join(", ")}`);let p=l.indexOf(r);if(p<0)throw new RangeError(`The selected tab "${r}" is not one of the tabs: ${l.join(", ")}`);let u=f=>`${d}-tab-${f}`,c=`${d}-panel`,y=f=>{let h=t[f];h.id!==r&&n(h.id),_optionalChain([s, 'access', _18 => _18.current, 'access', _19 => _19.get, 'call', _20 => _20(h.id), 'optionalAccess', _21 => _21.focus, 'call', _22 => _22()])};return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-panel-tabs","data-testid":a,children:[_jsxruntime.jsx.call(void 0, "div",{className:"cui-tabs-list",role:"tablist","aria-label":e,onKeyDown:f=>{let h=t.findIndex(b=>s.current.get(b.id)===f.target),T=h<0?p:h,x=so[f.key],g;if(x!==void 0){let b=getComputedStyle(f.currentTarget).direction==="rtl"?-x:x;g=(T+b+t.length)%t.length}else if(f.key==="Home")g=0;else if(f.key==="End")g=t.length-1;else return;f.preventDefault(),y(g)},children:t.map((f,h)=>{let T=h===p;return _jsxruntime.jsx.call(void 0, "button",{className:"cui-tab cui-panel-tab",type:"button",role:"tab",id:u(h),"aria-selected":T,"aria-controls":c,tabIndex:T?0:-1,"data-cui-fg":T?"fg":"fg-secondary","data-cui-type":"body","data-testid":`${a}-${f.id}`,ref:x=>{x===null?s.current.delete(f.id):s.current.set(f.id,x)},onClick:()=>y(h),children:f.label},f.id)})}),_jsxruntime.jsx.call(void 0, "div",{role:"tabpanel",id:c,"aria-labelledby":u(p),"aria-describedby":o,"data-testid":`${a}-panel`,children:i})]})};var co=({failure:e,onReload:t,forbiddenMessage:r,failureMessage:n,rescueRef:a,testId:o})=>{let{labels:i}=k();return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-resource-failed","data-testid":o,children:[_jsxruntime.jsx.call(void 0, de,{occurrence:e.occurrence,testId:`${o}-alert`,children:i.failureSentence(e,r,n===void 0?i.loadFailed:n)}),e.status===403?null:_jsxruntime.jsx.call(void 0, F,{variant:"secondary",busy:e.retrying,busyLabel:i.loading,onClick:t,ref:a,testId:`${o}-reload`,children:i.reload})]})};var yo=({label:e,options:t,value:r,onValueChange:n,testId:a})=>{m();let o=new Set(t.map(i=>i.value));if(t.length<2||o.size!==t.length)throw new RangeError(`A segmented control needs at least two options with unique values: ${t.map(i=>i.value).join(", ")}`);if(!o.has(r))throw new RangeError(`The pressed value "${r}" is not one of the options: ${[...o].join(", ")}`);return _jsxruntime.jsxs.call(void 0, "fieldset",{className:"cui-segmented-group","data-testid":a,children:[_jsxruntime.jsx.call(void 0, "legend",{className:"cui-segmented-legend","data-cui-type":"body",children:e}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-segmented",children:t.map(i=>{let d=i.value===r;return _jsxruntime.jsx.call(void 0, "button",{className:"cui-segment",type:"button","aria-pressed":d,"data-cui-fg":d?"on-solid":"fg","data-cui-surface":d?"info-solid":void 0,"data-cui-type":"body","data-testid":`${a}-${i.value}`,onClick:()=>{d||n(i.value)},children:i.label},i.value)})})]})};var Qt=({selected:e,controls:t,onSelect:r,testId:n,dataAttributes:a,ref:o,children:i})=>{m();let d=_react.useRef.call(void 0, null);H(d,{testId:n,part:"row",host:"button"});let s=_react.useCallback.call(void 0, l=>{if(d.current=l,typeof o=="function")return o(l);o!=null&&(o.current=l)},[o]);return _jsxruntime.jsx.call(void 0, "button",{className:"cui-row-button",type:"button","data-selected":e,"aria-expanded":e,"aria-controls":t,"data-cui-row-focus":"","data-cui-surface":e?"info-tint":"surface","data-cui-fg":"fg","data-cui-type":"body","data-testid":n,onClick:r,ref:s,...w(a),children:i})},bo= exports.SelectableList =({label:e,items:t,itemKey:r,selectedKey:n,onSelect:a,detailId:o,renderRow:i,rowTestId:d,rowData:s,empty:l,testId:p,ref:u})=>(m(),_jsxruntime.jsx.call(void 0, "div",{className:"cui-selectable","data-testid":p,ref:u,children:t.length===0?_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"prose",testId:`${p}-empty`,children:l}):_jsxruntime.jsx.call(void 0, "ul",{className:"cui-selectable-list",role:"list","aria-label":e,children:t.map(c=>{let y=r(c);return _jsxruntime.jsx.call(void 0, "li",{children:_jsxruntime.jsx.call(void 0, Qt,{selected:y===n,controls:o,onSelect:()=>a(c),testId:d,dataAttributes:_optionalChain([s, 'optionalCall', _23 => _23(c)]),children:i(c)})},y)})})}));var Ro=({label:e,value:t,min:r,max:n,step:a,valueText:o,onValueChange:i,testId:d})=>{m();let s=_react.useId.call(void 0, );if(!([t,r,n,a].every(Number.isFinite)&&r<n&&a>0&&r<=t&&t<=n))throw new RangeError(`Slider needs finite min < max, a positive step and min <= value <= max: value ${t}, min ${r}, max ${n}, step ${a}`);let l=o(t);return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-testid":`${d}-field`,children:[_jsxruntime.jsx.call(void 0, "label",{className:"cui-field-label",htmlFor:s,"data-cui-type":"body",children:e}),_jsxruntime.jsxs.call(void 0, "div",{className:"cui-slider",children:[_jsxruntime.jsx.call(void 0, "input",{className:"cui-slider-input",id:s,type:"range",min:r,max:n,step:a,value:t,"aria-valuetext":l,"data-testid":d,onChange:p=>i(p.currentTarget.valueAsNumber)}),_jsxruntime.jsx.call(void 0, "span",{className:"cui-slider-value","aria-hidden":"true",children:_jsxruntime.jsx.call(void 0, P,{fg:"fg",type:"body",testId:`${d}-value`,children:l})})]})]})};var To=({gap:e,testId:t,children:r})=>(m(),_jsxruntime.jsx.call(void 0, "div",{className:"cui-stack","data-cui-gap":e,"data-testid":t,children:r})),xo= exports.Cluster =({gap:e,as:t="div",testId:r,children:n})=>(m(),_jsxruntime.jsx.call(void 0, t,{className:"cui-cluster","data-cui-gap":e,"data-testid":r,children:n}));var rr={done:0,current:1,pending:2},vo={done:{fg:"on-solid",surface:"success-solid"},current:{fg:"on-solid",surface:"info-solid"},pending:{fg:"fg-secondary",surface:void 0}},Eo= exports.Stepper =({label:e,steps:t,testId:r})=>{let{labels:n}=k();if(t.length===0||new Set(t.map(o=>o.id)).size!==t.length)throw new RangeError(`A stepper needs at least one step with unique keys: ${t.map(o=>o.id).join(", ")}`);if(t.filter(o=>o.state==="current").length>1||t.some((o,i)=>i>0&&rr[o.state]<rr[t[i-1].state]))throw new RangeError(`Step states must run done, at most one current, then pending: ${t.map(o=>o.state).join(", ")}`);let a={done:n.stepDone,current:null,pending:n.stepPending};return _jsxruntime.jsx.call(void 0, "ol",{className:"cui-stepper",role:"list","aria-label":e,"data-cui-type":"body","data-testid":r,children:t.map((o,i)=>{let d=vo[o.state],s=a[o.state];return _jsxruntime.jsxs.call(void 0, "li",{className:"cui-step","aria-current":o.state==="current"?"step":void 0,"data-cui-step":o.state,"data-testid":`${r}-${o.id}`,children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-step-marker","aria-hidden":"true","data-cui-fg":d.fg,"data-cui-surface":d.surface,"data-cui-type":"caption",children:o.state==="done"?"\u2713":i+1}),_jsxruntime.jsxs.call(void 0, "span",{className:"cui-step-label","data-cui-fg":"fg",children:[o.label,s===null?null:_jsxruntime.jsx.call(void 0, "span",{className:"cui-visually-hidden",children:` (${s})`})]})]},o.id)})})};var Co=({label:e,labelHidden:t,checked:r,onCheckedChange:n,unavailable:a,testId:o,ref:i,dataAttributes:d})=>{m();let s=_react.useId.call(void 0, ),l=_react.useRef.call(void 0, null);H(l,{testId:o,part:"label",host:"button"});let p=W(a,s),u=a!==void 0,c=_jsxruntime.jsxs.call(void 0, "button",{className:"cui-switch",type:"button",role:"switch","aria-checked":r,"aria-disabled":u?!0:void 0,"aria-describedby":K(p),"data-cui-fg":"fg","data-cui-type":"body","data-testid":o,ref:i,onClick:()=>{u||n(!r)},...w(d),children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-switch-track","aria-hidden":"true","data-cui-surface":r?"info-solid":"sunken","data-testid":`${o}-track`,children:_jsxruntime.jsx.call(void 0, "span",{className:"cui-switch-thumb","data-cui-surface":r?"surface":"neutral-solid","data-testid":`${o}-thumb`})}),_jsxruntime.jsx.call(void 0, "span",{className:t===!0?"cui-visually-hidden":void 0,ref:l,children:e})]});return _optionalChain([a, 'optionalAccess', _24 => _24.reason])===void 0?c:_jsxruntime.jsxs.call(void 0, "span",{className:"cui-button-group",children:[c,_jsxruntime.jsx.call(void 0, P,{fg:"fg-muted",type:"body",id:s,testId:`${o}-reason`,children:a.reason})]})};var No=({label:e,items:t,currentId:r,onNavigate:n,testId:a})=>{if(m(),t.length===0)throw new RangeError("Tabs needs at least one tab");let o=new Set(t.map(i=>i.id));if(o.size!==t.length)throw new RangeError(`Tab keys must be unique: ${t.map(i=>i.id).join(", ")}`);if(!o.has(r))throw new RangeError(`The current tab "${r}" is not one of the tabs: ${[...o].join(", ")}`);return _jsxruntime.jsx.call(void 0, "nav",{className:"cui-tabs","aria-label":e,"data-testid":a,children:_jsxruntime.jsx.call(void 0, "ul",{className:"cui-tabs-list",role:"list",children:t.map(i=>{let d=i.id===r;return _jsxruntime.jsx.call(void 0, "li",{className:"cui-tabs-item",children:_jsxruntime.jsx.call(void 0, "a",{className:"cui-tab",href:i.href,"aria-current":d?"page":void 0,"data-cui-fg":d?"fg":"fg-secondary","data-cui-type":"body","data-testid":`${a}-${i.id}`,onClick:s=>ce(s,i.href,n),children:i.label})},i.id)})})})};var Io={neutral:"fg",danger:"danger-fg",warning:"warning-fg",success:"success-fg"},Mo= exports.MetricTile =e=>{m();let{label:t,sublabel:r,tone:n,testId:a,dataAttributes:o}=e;if((e.text===void 0?e.value===null:e.text===null)&&n!=="neutral")throw new RangeError(`An unmeasured tile value carries no tone: ${n}`);let d=`${a}-value`;return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-tile","data-cui-surface":"subtle","data-cui-fg":"fg","data-cui-tone":n,"data-testid":a,...w(o),children:[_jsxruntime.jsx.call(void 0, "p",{className:"cui-tile-label","data-cui-type":"caption","data-cui-measure":"reading",children:t}),_jsxruntime.jsx.call(void 0, "p",{className:"cui-tile-sublabel","data-cui-fg":"fg-muted","data-cui-type":"caption","data-cui-measure":"reading",children:r}),_jsxruntime.jsx.call(void 0, "p",{className:"cui-tile-value","data-cui-fg":Io[n],"data-cui-type":"heading","data-cui-measure":"reading",children:e.text===void 0?_jsxruntime.jsx.call(void 0, Re,{value:e.value,unit:e.unit,testId:d}):_jsxruntime.jsx.call(void 0, Re,{text:e.text,keep:"wrap",testId:d})})]})},ar=e=>_react.Children.toArray(e).flatMap(t=>{if(!_react.isValidElement.call(void 0, t))throw new RangeError(`TileGrid children must be tile elements, not text: ${String(t)}`);return t.type===_react.Fragment?ar(t.props.children):[t]}),$o= exports.TileGrid =({count:e,minInlinePx:t,testId:r,children:n})=>{m();let a=_chunkS6DFKVUVcjs.V.call(void 0, e,t,_chunkS6DFKVUVcjs.y.space["space-2"]),o=ar(n).length;if(o!==e)throw new RangeError(`TileGrid has ${o} tiles but count is ${e}`);return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-container","data-testid":r,children:[_jsxruntime.jsx.call(void 0, z,{ruleKey:a.key,css:a.css}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-tile-grid","data-cui-tile-grid":a.key,"data-cui-gap":"space-2",children:n})]})};var we=e=>[...e.querySelectorAll("button")],Ao= exports.Toolbar =({label:e,testId:t,children:r})=>{m();let n=_react.useRef.call(void 0, null),a=_react.useRef.call(void 0, null);_react.useLayoutEffect.call(void 0, ()=>{let s=we(n.current),l=a.current!==null&&s.includes(a.current)?a.current:_nullishCoalesce(s[0], () => (null));a.current=l;for(let p of s)p.tabIndex=p===l?0:-1});let o=s=>{for(let l of we(n.current))l.tabIndex=l===s?0:-1;a.current=s};return _jsxruntime.jsx.call(void 0, "div",{className:"cui-toolbar",role:"toolbar","aria-label":e,"aria-orientation":"horizontal","data-testid":t,ref:n,onFocus:s=>{let l=we(s.currentTarget).find(p=>p.contains(s.target));l!==void 0&&o(l)},onKeyDown:s=>{let l=we(s.currentTarget),p=l.indexOf(s.target);if(p===-1)return;let u=getComputedStyle(s.currentTarget).direction==="rtl"?"ArrowLeft":"ArrowRight",c=u==="ArrowRight"?"ArrowLeft":"ArrowRight",R={[u]:(p+1)%l.length,[c]:(p-1+l.length)%l.length,Home:0,End:l.length-1}[s.key];if(R===void 0)return;s.preventDefault();let f=l[R];o(f),f.focus()},children:r})};var dr=e=>e===null?_chunkS6DFKVUVcjs.m:_chunkS6DFKVUVcjs.n,Ce=(e,t,r,n,a)=>{let[o,i]=_react.useState.call(void 0, ()=>({key:e,state:dr(e)})),[d,s]=_react.useState.call(void 0, 0),[l,p]=_react.useState.call(void 0, 0),u=_react.useRef.call(void 0, t),c=_react.useRef.call(void 0, null),y=_react.useRef.call(void 0, d);_react.useLayoutEffect.call(void 0, ()=>{u.current=t}),_react.useEffect.call(void 0, ()=>{if(e===null){i({key:null,state:_chunkS6DFKVUVcjs.m});return}let g=new AbortController;c.current=e;let b=d===y.current?"revision":"reload";return y.current=d,i(v=>Object.is(v.key,e)?{key:e,state:n(v.state,b)}:{key:e,state:_chunkS6DFKVUVcjs.n}),u.current(g.signal).then(v=>{g.signal.aborted||(c.current=null,i(I=>({key:e,state:a(I.state,v)})))},v=>{g.signal.aborted||i(()=>{throw v})}),()=>{g.abort(),c.current=null}},[e,r,d,l]);let R=_react.useCallback.call(void 0, ()=>s(g=>g+1),[]),f=_react.useCallback.call(void 0, ()=>p(g=>g+1),[]),h=_react.useCallback.call(void 0, (g,b)=>{i(v=>Object.is(v.key,g)?{key:g,state:b(v.state)}:v)},[]),T=_react.useCallback.call(void 0, (g,b)=>{h(g,b),Object.is(c.current,g)&&f()},[h,f]);return{state:Object.is(o.key,e)?o.state:dr(e),reload:R,refresh:f,update:h,write:T}};var Ko=(e,t,r)=>{let n=_react.useRef.call(void 0, t);_react.useLayoutEffect.call(void 0, ()=>{n.current=t});let a=_react.useCallback.call(void 0, T=>n.current.first(T),[]),{state:o,reload:i,refresh:d,update:s,write:l}=Ce(e,a,r,_chunkS6DFKVUVcjs.W,_chunkS6DFKVUVcjs.X),p=_react.useRef.call(void 0, {key:e,state:o});_react.useLayoutEffect.call(void 0, ()=>{p.current={key:e,state:o}});let u=_react.useRef.call(void 0, null),c=_react.useCallback.call(void 0, ()=>{_optionalChain([u, 'access', _25 => _25.current, 'optionalAccess', _26 => _26.controller, 'access', _27 => _27.abort, 'call', _28 => _28()]),u.current=null},[]);_react.useEffect.call(void 0, ()=>c,[e,r,c]);let y=_react.useCallback.call(void 0, ()=>{c(),i()},[c,i]),R=_react.useCallback.call(void 0, ()=>{c(),d()},[c,d]),f=_react.useCallback.call(void 0, ()=>{let{key:T,state:x}=p.current;if(T===null||x.kind!=="ready"||x.refreshing||x.value.next===null||x.value.loadingMore)throw new Error("usePagedResource: loadMore needs a shown list with a next cursor, no page in flight and no re-read in flight");let g=x.value.next,b={key:T,controller:new AbortController,maps:[]};u.current=b,s(T,_chunkS6DFKVUVcjs.Y),n.current.next(g,b.controller.signal).then(v=>{u.current===b&&(u.current=null,s(T,I=>b.maps.reduce((Q,ur)=>_chunkS6DFKVUVcjs._.call(void 0, Q,ur),_chunkS6DFKVUVcjs.Z.call(void 0, I,g,v))))},v=>{u.current===b&&s(T,()=>{throw v})})},[s]),h=_react.useCallback.call(void 0, (T,x)=>{let g=u.current;g!==null&&Object.is(g.key,T)&&g.maps.push(x),l(T,b=>_chunkS6DFKVUVcjs._.call(void 0, b,x))},[l]);return{state:o,reload:y,refresh:R,loadMore:f,updateList:h}};var Go=e=>typeof e=="object"&&e!==null&&typeof e.then=="function",Vo= exports.usePendingPress =()=>{let[e,t]=_react.useState.call(void 0, null),r=_react.useRef.call(void 0, null),n=_react.useCallback.call(void 0, (a,o)=>{let i=o();if(!Go(i))return;let d=Symbol(a);r.current=d,t(a);let s=()=>{r.current===d&&(r.current=null,t(null))};i.then(s,s)},[]);return{pendingKey:e,press:n}};var zo=(e,t,r)=>{let{state:n,reload:a,refresh:o,write:i}=Ce(e,t,r,_chunkS6DFKVUVcjs.o,_chunkS6DFKVUVcjs.p),d=_react.useCallback.call(void 0, (s,l)=>i(s,p=>_chunkS6DFKVUVcjs.p.call(void 0, p,{ok:!0,value:l})),[i]);return{state:n,reload:a,refresh:o,put:d}};var Jo=({testId:e,children:t})=>(m(),_jsxruntime.jsx.call(void 0, "span",{className:"cui-visually-hidden","data-testid":e,children:t}));exports.ANNOUNCE_SETTLE_MS = ue; exports.AlertMessage = de; exports.Breadcrumb = Er; exports.Button = F; exports.COMPACT_ROW_PX = _chunkS6DFKVUVcjs.x; exports.CONSOLE_UI_LABEL_CATALOGS = _chunkS6DFKVUVcjs.r; exports.CONTRAST_MINIMUM = _chunk7M4I26BScjs.c; exports.CONTRAST_PAIRS = _chunk7M4I26BScjs.d; exports.Card = He; exports.CardSection = Br; exports.CheckboxGroup = Tn; exports.Cluster = xo; exports.CodeBlock = qr; exports.ComparisonGrid = Wr; exports.ConsoleUiRoot = Tr; exports.DataTable = sn; exports.DescriptionList = dn; exports.Dialog = un; exports.Disclosure = yn; exports.FIGURE_RING_REACH_PX = _chunkS6DFKVUVcjs.O; exports.FLEXIBLE_COLUMN_MIN_PX = _chunkS6DFKVUVcjs.F; exports.Field = fn; exports.Figure = Ln; exports.FigureEdge = Mn; exports.FigureNode = In; exports.FragmentLink = Fr; exports.HTTP_FORBIDDEN = _chunkS6DFKVUVcjs.j; exports.Heading = Fn; exports.InlineChange = Hn; exports.JobCard = Gn; exports.LATTICE_PX = _chunkS6DFKVUVcjs.t; exports.Link = Mr; exports.List = Jn; exports.ListItem = Xn; exports.LoadMore = eo; exports.MasterDetail = ro; exports.Measured = Re; exports.Meter = no; exports.MetricTile = Mo; exports.Notice = jn; exports.PanelTabs = lo; exports.PasswordInput = gn; exports.Pill = Ve; exports.ProgressBar = We; exports.ROW_WITH_CONTROL_PX = _chunkS6DFKVUVcjs.w; exports.RadioGroup = Rn; exports.ResourceFailed = co; exports.RowButton = Qt; exports.SegmentedControl = yo; exports.Select = hn; exports.SelectableList = bo; exports.Slider = Ro; exports.Stack = To; exports.Stepper = Eo; exports.Switch = Co; exports.TARGET_PX = _chunkS6DFKVUVcjs.v; exports.TOKENS = _chunkS6DFKVUVcjs.y; exports.TONES = _chunkS6DFKVUVcjs.da; exports.TONE_HUES = _chunkS6DFKVUVcjs.ba; exports.TONE_ROLES = _chunkS6DFKVUVcjs.ca; exports.Tabs = No; exports.Text = P; exports.TextArea = bn; exports.TextInput = mn; exports.TileGrid = $o; exports.Toolbar = Ao; exports.VisuallyHidden = Jo; exports.ZonedTimeError = _chunkS6DFKVUVcjs.f; exports.beginPage = _chunkS6DFKVUVcjs.Y; exports.beginPagedReload = _chunkS6DFKVUVcjs.W; exports.beginReload = _chunkS6DFKVUVcjs.o; exports.ceil8 = _chunkS6DFKVUVcjs.C; exports.ceilToLattice = _chunkS6DFKVUVcjs.u; exports.cellContentInlinePx = _chunkS6DFKVUVcjs.D; exports.comparisonAttributePx = _chunkS6DFKVUVcjs.G; exports.contrastRatio = _chunk7M4I26BScjs.b; exports.countSampleText = _chunkS6DFKVUVcjs.I; exports.cssVar = _chunkS6DFKVUVcjs.z; exports.figureBoxPlan = _chunkS6DFKVUVcjs.L; exports.figureDiscLabelPlan = _chunkS6DFKVUVcjs.N; exports.fixedColumnPx = _chunkS6DFKVUVcjs.E; exports.flatMapOutcome = _chunkS6DFKVUVcjs.l; exports.formatCount = _chunkS6DFKVUVcjs.a; exports.formatInstant = _chunkS6DFKVUVcjs.i; exports.hexToSrgb = _chunk7M4I26BScjs.a; exports.instantSampleText = _chunkS6DFKVUVcjs.H; exports.isReadableText = _chunkS6DFKVUVcjs.e; exports.keepLastGood = _chunkS6DFKVUVcjs.p; exports.lightDark = _chunkS6DFKVUVcjs.$; exports.mapOutcome = _chunkS6DFKVUVcjs.k; exports.mapPagedList = _chunkS6DFKVUVcjs._; exports.masterDetailPlan = _chunkS6DFKVUVcjs.R; exports.monoTextWidthEm = _chunkS6DFKVUVcjs.B; exports.placeholderRule = _chunkS6DFKVUVcjs.aa; exports.readDecimalText = _chunkS6DFKVUVcjs.c; exports.readIntegerText = _chunkS6DFKVUVcjs.d; exports.reasonAside = _chunkS6DFKVUVcjs.q; exports.resolveConsoleUiLabels = _chunkS6DFKVUVcjs.s; exports.settleFirstPage = _chunkS6DFKVUVcjs.X; exports.settlePage = _chunkS6DFKVUVcjs.Z; exports.spacedTextWidthEm = _chunkS6DFKVUVcjs.K; exports.tableFrameMinInlinePx = _chunkS6DFKVUVcjs.U; exports.tableMinInlinePx = _chunkS6DFKVUVcjs.T; exports.textWidthEm = _chunkS6DFKVUVcjs.A; exports.tileGridPlan = _chunkS6DFKVUVcjs.V; exports.tileMinInlinePx = _chunkS6DFKVUVcjs.J; exports.toOffsetIso = _chunkS6DFKVUVcjs.g; exports.toWallTime = _chunkS6DFKVUVcjs.h; exports.useAnnounce = xr; exports.useConsoleUi = k; exports.useEscapeToClose = Ur; exports.useFocusRescue = oe; exports.usePagedResource = Ko; exports.usePendingPress = Vo; exports.useResource = zo;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkWKYOVFUGcjs = require('./chunk-WKYOVFUG.cjs');var _chunk7M4I26BScjs = require('./chunk-7M4I26BS.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var Me=_react.createContext.call(void 0, null),vt=" ",ht='[inert], [aria-hidden="true" i]',Et="dialog:modal",$e="data-cui-dialog-announcer",mr=`:scope > [${$e}]`,gr=e=>{if(e.closest(ht)!==null)return{hidden:'an ancestor is inert or aria-hidden="true"'};let t=e.ownerDocument,r=[...t.querySelectorAll(Et)],n=t.activeElement,a=r.filter(s=>s.contains(n)),o=a.length>0?a:r;if(o.every(s=>s.contains(e)))return{region:e};let i=o.find(s=>o.every(l=>l.contains(s)));if(i===void 0)return{hidden:"focus is in no open modal dialog and they do not nest, so which one is topmost cannot be told"};let d=i.querySelector(mr);return d===null?{hidden:"the topmost open modal dialog neither contains the console nor is a Dialog"}:d.closest(ht)!==null?{hidden:'the topmost open modal dialog is a Dialog whose live region has an inert or aria-hidden="true" ancestor'}:{region:d}},br=e=>{try{e.querySelectorAll(Et)}catch(t){throw typeof t=="object"&&t!==null&&"name"in t&&t.name==="SyntaxError"?new Error("ConsoleUiRoot requires the :modal selector (Chrome 105, Firefox 103, Safari 15.6, jsdom 27 or later): announcements check whether a modal dialog hides the live region",{cause:t}):t}},ue= exports.ANNOUNCE_SETTLE_MS =150,hr=1e3,Rt=new WeakMap,Rr=(e,t)=>{let r=_nullishCoalesce(Rt.get(e), () => (new Set)),n={text:t};Rt.set(e,r.add(n)),setTimeout(()=>r.delete(n),ue);let a=e.ownerDocument.createElement("span");a.textContent=[...r].map(o=>o.text).join(vt),e.replaceChildren(a)},Tr= exports.ConsoleUiRoot =({locale:e,formatLocale:t,timeZone:r,testId:n,children:a})=>{if(_react.useContext.call(void 0, Me)!==null)throw new Error("ConsoleUiRoot must not be rendered inside another ConsoleUiRoot (a console has exactly one root)");let i=_chunkWKYOVFUGcjs.t.call(void 0, e),[d]=Intl.getCanonicalLocales(t),s=_react.useMemo.call(void 0, ()=>new Intl.DateTimeFormat(d,{timeZone:r}).resolvedOptions().timeZone,[d,r]),l=_react.useRef.call(void 0, null),p=_react.useRef.call(void 0, null);_react.useLayoutEffect.call(void 0, ()=>{br(l.current.ownerDocument)},[]);let u=_react.useCallback.call(void 0, y=>{if(y.trim()==="")throw new RangeError("announce: text must be a non-empty sentence");let R=()=>{let{texts:h,settle:T,deadline:x}=p.current;p.current=null,clearTimeout(T),clearTimeout(x);let g=l.current;if(g===null)return;let b=h.join(vt),v=gr(g);if("hidden"in v)throw new Error(`announce: the live region is hidden from assistive technology (${v.hidden}), so this announcement would be lost: ${b}`);Rr(v.region,b)},f=p.current;if(f===null){p.current={texts:[y],settle:setTimeout(R,ue),deadline:setTimeout(R,hr)};return}f.texts.push(y),clearTimeout(f.settle),f.settle=setTimeout(R,ue)},[]),c=_react.useMemo.call(void 0, ()=>({locale:e,formatLocale:d,timeZone:s,labels:i,announce:u}),[e,d,s,i,u]);return _jsxruntime.jsx.call(void 0, Me.Provider,{value:c,children:_jsxruntime.jsxs.call(void 0, "div",{"data-cui-root":"","data-cui-surface":"surface","data-cui-fg":"fg","data-testid":n,children:[a,_jsxruntime.jsx.call(void 0, "div",{className:"cui-visually-hidden",role:"status","aria-live":"polite","aria-atomic":"true","data-testid":`${n}-announcer`,ref:l})]})})},k= exports.useConsoleUi =()=>{let e=_react.useContext.call(void 0, Me);if(e===null)throw new Error("useConsoleUi must be called inside ConsoleUiRoot");return e},m=()=>{k()},xr= exports.useAnnounce =()=>k().announce;var ce=(e,t,r)=>{e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),r(t))};var Er=({items:e,current:t,onNavigate:r,testId:n})=>{let{labels:a}=k();if(new Set(e.map(o=>o.id)).size!==e.length)throw new RangeError(`Breadcrumb keys must be unique: ${e.map(o=>o.id).join(", ")}`);return _jsxruntime.jsx.call(void 0, "nav",{className:"cui-breadcrumb","aria-label":a.breadcrumb,"data-testid":n,children:_jsxruntime.jsxs.call(void 0, "ol",{className:"cui-breadcrumb-list",role:"list","data-cui-type":"body",children:[e.map(o=>_jsxruntime.jsxs.call(void 0, "li",{className:"cui-breadcrumb-item",children:[_jsxruntime.jsx.call(void 0, "a",{className:"cui-link",href:o.href,"data-cui-fg":"info-fg","data-cui-type":"body","data-testid":`${n}-${o.id}`,onClick:i=>ce(i,o.href,r),children:o.label}),_jsxruntime.jsx.call(void 0, "span",{className:"cui-breadcrumb-separator","aria-hidden":"true","data-cui-fg":"fg-muted",children:"\u203A"})]},o.id)),_jsxruntime.jsx.call(void 0, "li",{className:"cui-breadcrumb-item",children:_jsxruntime.jsx.call(void 0, "span",{"aria-current":"page","data-cui-fg":"fg","data-testid":`${n}-current`,children:t})})]})})};var w=e=>{if(e===void 0)return{};for(let t of Object.keys(e))if(!t.startsWith("data-")||t.startsWith("data-cui-")||t==="data-testid")throw new RangeError(`Caller attributes must be data-* and must not override data-cui-* or data-testid: ${t}`);return e};var Pr=new Set(["abbr","b","bdi","bdo","br","cite","code","data","del","dfn","em","i","ins","kbd","mark","q","s","samp","small","span","strong","sub","sup","time","u","var","wbr"]),Cr=e=>{for(let t of e.querySelectorAll("*")){let r=t.localName;if(!Pr.has(r)||t.hasAttribute("tabindex")||t.hasAttribute("contenteditable"))return r}return null},H=(e,{testId:t,part:r,host:n})=>{_react.useLayoutEffect.call(void 0, ()=>{let a=Cr(e.current);if(a!==null)throw new RangeError(`${t}: the ${r} is the content of a ${n} and holds only non-interactive phrasing content, not <${a}>`)})};var P=({fg:e,type:t,face:r,as:n="span",space:a,testId:o,id:i,tabIndex:d,ref:s,children:l})=>(m(),_jsxruntime.jsx.call(void 0, n,{className:"cui-text","data-cui-fg":e,"data-cui-type":t,"data-cui-face":r,"data-cui-space":a,"data-cui-measure":n==="p"?"reading":void 0,"data-testid":o,id:i,tabIndex:d,ref:s,children:l}));var kr=/\s/,Fe=(e,t)=>{if(e===""||kr.test(e))throw new RangeError(`The id of ${t} must be one token without whitespace: "${e}"`);return e},W=(e,t)=>{if(e!==void 0){if(e.reason!==void 0){if(e.reason.trim()==="")throw new RangeError("An unavailable control needs a reason that is not blank");return t}return Fe(e.reasonId,"an unavailable control's reason")}},K=(...e)=>{let t=e.filter(r=>r!==void 0);return t.length===0?void 0:t.join(" ")};var Ir={primary:{fg:"on-solid",surface:"info-solid",type:"body"},secondary:{fg:"fg",surface:void 0,type:"body"},danger:{fg:"on-solid",surface:"danger-solid",type:"body"},link:{fg:"info-fg",surface:void 0,type:"body"}},Ae=({subject:e,children:t})=>{let r=_react.useRef.call(void 0, null);return H(r,e),_jsxruntime.jsx.call(void 0, "span",{ref:r,children:t})},F= exports.Button =({variant:e,children:t,testId:r,type:n="button",onClick:a,unavailable:o,describedBy:i,expanded:d,controls:s,ref:l,dataAttributes:p,busy:u,busyLabel:c})=>{m();let y=_react.useId.call(void 0, ),R=W(o,y),f=u===!0||o!==void 0,h=Ir[e],T=x=>{if(f){x.preventDefault();return}_optionalChain([a, 'optionalCall', _2 => _2(x)])};return _jsxruntime.jsxs.call(void 0, "span",{className:"cui-button-group",children:[_jsxruntime.jsx.call(void 0, "button",{className:"cui-button",type:n==="submit"?"submit":"button","data-cui-variant":e,"data-cui-fg":h.fg,"data-cui-surface":h.surface,"data-cui-type":h.type,"data-testid":r,"aria-disabled":f?!0:void 0,"aria-busy":u===!0?!0:void 0,"aria-describedby":K(i,R),"aria-expanded":d,"aria-controls":s,onClick:T,ref:l,...w(p),children:_jsxruntime.jsx.call(void 0, Ae,{subject:{testId:r,part:"label",host:"button"},children:u===!0?c:t})}),_optionalChain([o, 'optionalAccess', _3 => _3.reason])===void 0?null:_jsxruntime.jsx.call(void 0, P,{fg:"fg-muted",type:"body",id:y,testId:`${r}-reason`,children:o.reason})]})},Mr= exports.Link =({onNavigate:e,children:t,testId:r,ref:n})=>(m(),_jsxruntime.jsx.call(void 0, "button",{className:"cui-link",type:"button","data-cui-fg":"info-fg","data-cui-type":"body","data-testid":r,onClick:e,ref:n,children:_jsxruntime.jsx.call(void 0, Ae,{subject:{testId:r,part:"label",host:"button"},children:t})})),$r=/^[^\s#]+$/,Fr= exports.FragmentLink =({targetId:e,children:t,testId:r,onFollow:n,dataAttributes:a})=>{if(m(),!$r.test(e))throw new RangeError(`A fragment link needs the target's id without "#" or white space: "${e}"`);return _jsxruntime.jsx.call(void 0, "a",{className:"cui-link",href:`#${e}`,"data-cui-fg":"info-fg","data-cui-type":"body","data-testid":r,onClick:n,...w(a),children:_jsxruntime.jsx.call(void 0, Ae,{subject:{testId:r,part:"label",host:"link"},children:t})})};var Hr=229,Or=new Set(["text","search","email","url","tel","password","number","date","datetime-local","month","time","week"]),De=e=>e instanceof HTMLTextAreaElement?e.value!=="":e instanceof HTMLInputElement&&Or.has(e.type)&&(e.value!==""||e.validity.badInput),te=(e,t)=>{e.key!=="Escape"||e.nativeEvent.isComposing||e.keyCode===Hr||De(e.target)||(e.stopPropagation(),t())},Ur= exports.useEscapeToClose =e=>_react.useCallback.call(void 0, t=>te(t,e),[e]);var Ct=e=>e===void 0?void 0:t=>te(t,e),He= exports.Card =({id:e,title:t,description:r,actions:n,onEscape:a,testId:o,headingRef:i,ref:d,dataAttributes:s,children:l})=>{m();let p=_react.useId.call(void 0, ),u=Ct(a);return _jsxruntime.jsxs.call(void 0, "section",{className:"cui-card",id:e,"aria-labelledby":p,"data-cui-surface":"surface","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"sans","data-testid":o,ref:d,onKeyDown:u,...w(s),children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-card-header",children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-card-heading",children:[_jsxruntime.jsx.call(void 0, "h2",{className:"cui-card-title",id:p,"data-cui-type":"title","data-testid":`${o}-heading`,ref:i,tabIndex:i===void 0?void 0:-1,children:t}),r===void 0?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-card-description","data-cui-fg":"fg-muted","data-cui-type":"body","data-cui-measure":"reading",children:r})]}),n===void 0?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-card-actions",children:n})]}),l]})},Kr={3:"h3",4:"h4"},Br= exports.CardSection =({id:e,title:t,subtitle:r,level:n=3,region:a=!1,onEscape:o,testId:i,headingRef:d,ref:s,dataAttributes:l,children:p})=>{m();let u=_react.useId.call(void 0, ),c=Ct(o),y=Kr[n],R=_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-card-section-heading",children:[_jsxruntime.jsx.call(void 0, y,{className:"cui-card-section-title",id:u,"data-cui-type":"body","data-testid":`${i}-heading`,ref:d,tabIndex:d===void 0?void 0:-1,children:t}),r===void 0?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-card-section-subtitle","data-cui-fg":"fg-muted","data-cui-type":"body","data-cui-measure":"reading",children:r})]}),p]});return a?_jsxruntime.jsx.call(void 0, "section",{className:"cui-card-section",id:e,"aria-labelledby":u,"data-testid":i,ref:s,onKeyDown:c,...w(l),children:R}):_jsxruntime.jsx.call(void 0, "div",{className:"cui-card-section",id:e,"data-testid":i,ref:s,...w(l),children:R})};var qr=({label:e,code:t,testId:r})=>(m(),_jsxruntime.jsx.call(void 0, "section",{className:"cui-code-frame",tabIndex:0,"aria-label":e,"data-cui-surface":"sunken","data-testid":r,children:_jsxruntime.jsx.call(void 0, "pre",{className:"cui-code","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"mono","data-testid":`${r}-code`,children:t})}));var z=({ruleKey:e,css:t})=>_jsxruntime.jsx.call(void 0, "style",{href:e,precedence:"cui",children:t});var Wr=({caption:e,attributes:t,columns:r,attributePx:n,columnMinPx:a,testId:o})=>{m();let i=_react.useId.call(void 0, );for(let u of[n,a])if(!(Number.isFinite(u)&&u>0))throw new RangeError(`ComparisonGrid widths must be positive px values: ${u}`);if(r.length===0)throw new RangeError("ComparisonGrid needs at least one column");for(let u of r)for(let c of t)if(!Object.hasOwn(u.cells,c.key))throw new RangeError(`Column "${u.key}" has no value for attribute "${c.key}"`);let d=n+r.length*a,s=`cui-comparison-a${n}-c${a}-n${r.length}`,l=u=>`[data-cui-comparison="${s}"][data-cui-comparison-layout="${u}"]`,p=`${l("table")}{display:none}@container (min-width:${_chunkWKYOVFUGcjs.S.call(void 0, d)}){${l("table")}{display:block}${l("stack")}{display:none}}`;return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-container","data-cui-stack-below-px":d,"data-testid":o,children:[_jsxruntime.jsx.call(void 0, z,{ruleKey:s,css:p}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-comparison-frame","data-cui-comparison":s,"data-cui-comparison-layout":"table",children:_jsxruntime.jsxs.call(void 0, "table",{className:"cui-comparison-table","data-cui-type":"body",children:[_jsxruntime.jsx.call(void 0, "caption",{className:"cui-visually-hidden",children:e}),_jsxruntime.jsxs.call(void 0, "colgroup",{children:[_jsxruntime.jsx.call(void 0, "col",{style:{width:_chunkWKYOVFUGcjs.S.call(void 0, n)}}),r.map(u=>_jsxruntime.jsx.call(void 0, "col",{},u.key))]}),_jsxruntime.jsx.call(void 0, "thead",{children:_jsxruntime.jsxs.call(void 0, "tr",{children:[_jsxruntime.jsx.call(void 0, "td",{}),r.map(u=>_jsxruntime.jsx.call(void 0, "th",{scope:"col",children:u.heading},u.key))]})}),_jsxruntime.jsx.call(void 0, "tbody",{children:t.map(u=>_jsxruntime.jsxs.call(void 0, "tr",{children:[_jsxruntime.jsx.call(void 0, "th",{scope:"row",children:u.label}),r.map(c=>_jsxruntime.jsx.call(void 0, "td",{children:c.cells[u.key]("table")},c.key))]},u.key))})]})}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-comparison-stack","data-cui-comparison":s,"data-cui-comparison-layout":"stack",children:r.map((u,c)=>{let y=`${i}-column-${c}`;return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-comparison-column",role:"group","aria-labelledby":y,"data-cui-type":"body",children:[_jsxruntime.jsx.call(void 0, "div",{className:"cui-comparison-heading",id:y,children:u.heading}),_jsxruntime.jsx.call(void 0, "dl",{className:"cui-comparison-list",children:t.map(R=>_jsxruntime.jsxs.call(void 0, "div",{children:[_jsxruntime.jsx.call(void 0, "dt",{children:R.label}),_jsxruntime.jsx.call(void 0, "dd",{children:u.cells[R.key]("stack")})]},R.key))})]},u.key)})})]})};var ne="[data-cui-row-focus]",Oe="[data-cui-row-detail]",zr=e=>e===null?[]:[...e.querySelectorAll(`:scope > ${ne}`)],kt=(e,t)=>{let r=new Map;t!==null&&r.set(t,0);let n=-1;for(let a of e===null?[]:e.children)a.matches(ne)?(n+=1,r.set(a,n)):n>=0&&a.matches(Oe)&&r.set(a,n);return r},Lt=(e,t,r,n)=>{let a=zr(t);if(a.length===0)return r;let o=n.get(e);if(o===void 0)throw new RangeError(`rowFocusTarget: <${e.localName}> left holding focus with no position in the table (only its rows, row details and empty text hold one)`);return a[Math.min(o,a.length-1)]};var jr=e=>e+1,oe= exports.useFocusRescue =e=>{let t=_react.useRef.call(void 0, e),r=_react.useRef.call(void 0, null),n=_react.useRef.call(void 0, !1),[,a]=_react.useReducer.call(void 0, jr,0),o=_react.useCallback.call(void 0, (i=>()=>{n.current&&i.contains(document.activeElement)&&(r.current=i,a())}),[]);return _react.useLayoutEffect.call(void 0, ()=>(n.current=!0,()=>{n.current=!1,r.current=null}),[]),_react.useLayoutEffect.call(void 0, ()=>{t.current=e}),_react.useLayoutEffect.call(void 0, ()=>{let i=r.current;if(i===null)return;r.current=null;let d=[null,document.body].includes(document.activeElement);i.isConnected||!d||_optionalChain([t, 'access', _4 => _4.current, 'call', _5 => _5(i), 'optionalAccess', _6 => _6.focus, 'call', _7 => _7()])}),o};var en=new Map,tn='a[href], audio[controls], button, details, embed, iframe, img[usemap], input:not([type="hidden"]), label, select, textarea, video[controls], [tabindex], [contenteditable]',rn=(e,t,r)=>{_react.useLayoutEffect.call(void 0, ()=>{let n=e.current;if(t!=="row-compact"||n===null)return;let a=[...n.querySelectorAll(tn)].find(o=>o.parentElement!==n);if(a!==void 0)throw new RangeError(`${r}: a compact row holds no control or focus target (a ${_chunkWKYOVFUGcjs.w} px target does not fit its ${_chunkWKYOVFUGcjs.y} px; use row-control), not <${a.localName}>`)})},nn=(e,t)=>{let r=e.filter(a=>a.rowHeader===!0).map(a=>a.key);if(r.length>1)throw new RangeError(`${t}: a table has at most one row header column, not ${r.length} (${r.join(", ")})`);let n=e.find(a=>a.rowHeader!==!0&&a.rowHeaderNote!==void 0);if(n!==void 0)throw new RangeError(`${t}: a row header note belongs to the row header column, not to ${n.key}`)},on=e=>e==null?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-table-header-note",children:e}),an=(e,t,r,n,a)=>{let o=e.open(t);return _jsxruntime.jsx.call(void 0, "tr",{ref:a,hidden:!o,"data-cui-row-detail":o?"open":"closed","data-testid":`${n}-detail`,children:_jsxruntime.jsx.call(void 0, "td",{colSpan:r,id:e.id(t),children:o?e.render(t):null})})},sn= exports.DataTable =({caption:e,captionHidden:t,columns:r,rows:n,rowKey:a,rowTestId:o,rowData:i,rowSize:d,rowDetail:s,empty:l,testId:p,ref:u})=>{m();let c=_react.useId.call(void 0, ),y=_react.useRef.call(void 0, null);rn(y,d,p);let R=_react.useRef.call(void 0, null),f=_react.useRef.call(void 0, en),h=oe(g=>Lt(g,y.current,R.current,f.current));_react.useLayoutEffect.call(void 0, ()=>{f.current=kt(y.current,R.current)});let T=_react.useCallback.call(void 0, g=>{R.current=g;let b=h(g);return()=>{R.current=null,b()}},[h]),x=_chunkWKYOVFUGcjs.V.call(void 0, r);return nn(r,p),_jsxruntime.jsx.call(void 0, "div",{className:"cui-container","data-testid":p,ref:u,children:n.length===0?_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"prose",tabIndex:-1,ref:T,testId:`${p}-empty`,children:l}):_jsxruntime.jsx.call(void 0, "section",{ref:h,className:"cui-table-frame",tabIndex:0,"aria-labelledby":c,"data-testid":`${p}-frame`,children:_jsxruntime.jsxs.call(void 0, "table",{className:"cui-table","data-cui-type":"body","data-cui-row-size":d,style:{"--cui-table-min":_chunkWKYOVFUGcjs.S.call(void 0, x)},children:[_jsxruntime.jsx.call(void 0, "caption",{className:t?"cui-visually-hidden":"cui-table-caption",id:c,children:e}),_jsxruntime.jsx.call(void 0, "colgroup",{children:r.map(g=>_jsxruntime.jsx.call(void 0, "col",{style:g.width.fixedPx===void 0?void 0:{width:_chunkWKYOVFUGcjs.S.call(void 0, g.width.fixedPx)}},g.key))}),_jsxruntime.jsx.call(void 0, "thead",{children:_jsxruntime.jsx.call(void 0, "tr",{children:r.map(g=>_jsxruntime.jsxs.call(void 0, "th",{scope:"col","data-cui-align":g.align,"data-cui-surface":"subtle","data-cui-type":"caption",children:[g.header,g.note===void 0?null:_jsxruntime.jsx.call(void 0, "div",{className:"cui-table-header-note",children:g.note})]},g.key))})}),_jsxruntime.jsx.call(void 0, "tbody",{ref:y,children:n.map(g=>_jsxruntime.jsxs.call(void 0, _react.Fragment,{children:[_jsxruntime.jsx.call(void 0, "tr",{ref:h,tabIndex:-1,"data-cui-row-focus":"","data-testid":o,...w(_optionalChain([i, 'optionalCall', _8 => _8(g)])),children:r.map(b=>b.rowHeader===!0?_jsxruntime.jsxs.call(void 0, "th",{scope:"row","data-cui-align":b.align,children:[b.cell(g),b.rowHeaderNote===void 0?null:on(b.rowHeaderNote(g))]},b.key):_jsxruntime.jsx.call(void 0, "td",{"data-cui-align":b.align,children:b.cell(g)},b.key))}),s===void 0?null:an(s,g,r.length,o,h)]},a(g)))})]})})})};var dn=({items:e,testId:t})=>{if(m(),new Set(e.map(r=>r.key)).size!==e.length)throw new RangeError(`Description keys must be unique: ${e.map(r=>r.key).join(", ")}`);return _jsxruntime.jsx.call(void 0, "dl",{className:"cui-description-list","data-cui-type":"body","data-testid":t,children:e.map(r=>_jsxruntime.jsxs.call(void 0, "div",{className:"cui-description-row","data-testid":`${t}-${r.key}`,children:[_jsxruntime.jsx.call(void 0, "dt",{"data-cui-fg":"fg-secondary",children:r.term}),_jsxruntime.jsx.call(void 0, "dd",{"data-cui-fg":"fg",children:r.description})]},r.key))})};var Ft=e=>{e instanceof HTMLElement&&e.isConnected&&e.focus()},un= exports.Dialog =({title:e,description:t,open:r,onClose:n,testId:a,children:o})=>{let{labels:i}=k(),d=_react.useId.call(void 0, ),s=_react.useId.call(void 0, ),l=_react.useRef.call(void 0, null),p=_react.useRef.call(void 0, null);return _react.useLayoutEffect.call(void 0, ()=>{let y=l.current;r&&!y.open?(p.current=y.ownerDocument.activeElement,y.showModal()):!r&&y.open&&y.close()},[r]),_react.useLayoutEffect.call(void 0, ()=>{let y=l.current;return()=>{y.open&&(y.close(),Ft(p.current),p.current=null)}},[]),_jsxruntime.jsxs.call(void 0, "dialog",{className:"cui-dialog","aria-labelledby":d,"aria-describedby":t===void 0?void 0:s,"data-cui-surface":"surface","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"sans","data-testid":a,ref:l,onClose:y=>{y.currentTarget.open||(Ft(p.current),p.current=null,r&&n())},onCancel:y=>{De(y.currentTarget.ownerDocument.activeElement)&&y.preventDefault()},children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-dialog-header",children:[_jsxruntime.jsx.call(void 0, "h2",{className:"cui-dialog-title",id:d,"data-cui-type":"title",children:e}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-dialog-actions",children:_jsxruntime.jsx.call(void 0, F,{variant:"secondary",testId:`${a}-close`,onClick:()=>_optionalChain([l, 'access', _9 => _9.current, 'optionalAccess', _10 => _10.close, 'call', _11 => _11()]),children:i.close})})]}),t===void 0?null:_jsxruntime.jsx.call(void 0, "div",{id:s,"data-cui-measure":"reading","data-testid":`${a}-description`,children:t}),o,_jsxruntime.jsx.call(void 0, "div",{className:"cui-visually-hidden",role:"status","aria-live":"polite","aria-atomic":"true",[$e]:"","data-testid":`${a}-announcer`})]})};var yn=({summary:e,open:t,onOpenChange:r,testId:n,children:a})=>{m();let o=_react.useId.call(void 0, ),i=_react.useRef.call(void 0, null);return H(i,{testId:n,part:"summary",host:"button"}),_jsxruntime.jsxs.call(void 0, "div",{className:"cui-disclosure","data-testid":n,children:[_jsxruntime.jsxs.call(void 0, "button",{className:"cui-disclosure-button",type:"button","aria-expanded":t,"aria-controls":o,"data-cui-fg":"fg","data-cui-type":"body","data-testid":`${n}-button`,onClick:()=>r(!t),children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-disclosure-marker","aria-hidden":"true",children:t?"\u25BE":"\u25B8"}),_jsxruntime.jsx.call(void 0, "span",{ref:i,children:e})]}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-disclosure-panel",id:o,hidden:!t,"data-testid":`${n}-panel`,children:a})]})};var X=({description:e,error:t,errorId:r})=>{m();let n=_react.useId.call(void 0, ),a=_react.useId.call(void 0, ),o=_react.useId.call(void 0, ),i=r===void 0?o:Fe(r,"a field's error"),d=[e===void 0?null:a,t===void 0?null:i].filter(l=>l!==null).join(" ");return{control:{id:n,"aria-describedby":d===""?void 0:d,"aria-invalid":t===void 0?void 0:!0},descriptionId:a,errorId:i}},j=({description:e,error:t,descriptionId:r,errorId:n,testId:a})=>_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[e===void 0?null:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"body",id:r,testId:`${a}-description`,children:e}),t===void 0?null:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"danger-fg",type:"body",id:n,testId:`${a}-error`,children:t})]}),ye=({htmlFor:e,hidden:t,children:r})=>_jsxruntime.jsx.call(void 0, "label",{className:t===!0?"cui-visually-hidden":"cui-field-label",htmlFor:e,"data-cui-type":"body",children:r}),fn= exports.Field =({label:e,description:t,error:r,errorId:n,testId:a,children:o})=>{let{control:i,descriptionId:d,errorId:s}=X({label:e,description:t,error:r,errorId:n});return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-invalid":r!==void 0,"data-testid":a,children:[_jsxruntime.jsx.call(void 0, ye,{htmlFor:i.id,hidden:void 0,children:e}),o(i),_jsxruntime.jsx.call(void 0, j,{description:t,error:r,descriptionId:d,errorId:s,testId:a})]})},Ht=({label:e,description:t,error:r,errorId:n,value:a,onValueChange:o,type:i,list:d,autoComplete:s,inputMode:l,prefix:p,labelHidden:u,required:c,testId:y,ref:R})=>{let{control:f,descriptionId:h,errorId:T}=X({label:e,description:t,error:r,errorId:n}),x=_react.useId.call(void 0, );if(p!==void 0&&p.trim()==="")throw new RangeError("An input's prefix must not be blank");let g=i==="password",b=_jsxruntime.jsx.call(void 0, "input",{className:"cui-input",type:i,value:a,list:d,autoComplete:s,inputMode:l,spellCheck:g?!1:void 0,autoCapitalize:g?"none":void 0,required:c,onChange:v=>o(v.target.value),"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"body","data-testid":y,ref:R,...f,"aria-describedby":K(p===void 0?void 0:x,f["aria-describedby"])});return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-invalid":r!==void 0,"data-testid":`${y}-field`,children:[_jsxruntime.jsx.call(void 0, ye,{htmlFor:f.id,hidden:u,children:e}),p===void 0?b:_jsxruntime.jsxs.call(void 0, "div",{className:"cui-input-group",children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-input-prefix",id:x,"data-cui-fg":"fg-secondary","data-cui-surface":"sunken","data-cui-type":"body","data-testid":`${y}-prefix`,children:p}),b]}),_jsxruntime.jsx.call(void 0, j,{description:t,error:r,descriptionId:h,errorId:T,testId:y})]})},mn= exports.TextInput =e=>_jsxruntime.jsx.call(void 0, Ht,{...e}),gn= exports.PasswordInput =e=>_jsxruntime.jsx.call(void 0, Ht,{...e,type:"password"}),bn= exports.TextArea =({label:e,description:t,error:r,errorId:n,value:a,onValueChange:o,required:i,testId:d,ref:s})=>{let{control:l,descriptionId:p,errorId:u}=X({label:e,description:t,error:r,errorId:n});return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-invalid":r!==void 0,"data-testid":`${d}-field`,children:[_jsxruntime.jsx.call(void 0, ye,{htmlFor:l.id,hidden:void 0,children:e}),_jsxruntime.jsx.call(void 0, "textarea",{className:"cui-input cui-textarea",value:a,required:i,onChange:c=>o(c.target.value),"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"prose","data-testid":d,ref:s,...l}),_jsxruntime.jsx.call(void 0, j,{description:t,error:r,descriptionId:p,errorId:u,testId:d})]})},hn= exports.Select =({label:e,description:t,error:r,errorId:n,value:a,options:o,onValueChange:i,labelHidden:d,unavailable:s,testId:l,ref:p})=>{let{control:u,descriptionId:c,errorId:y}=X({label:e,description:t,error:r,errorId:n}),R=_react.useId.call(void 0, ),f=W(s,R);return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-invalid":r!==void 0,"data-testid":`${l}-field`,children:[_jsxruntime.jsx.call(void 0, ye,{htmlFor:u.id,hidden:d,children:e}),_jsxruntime.jsx.call(void 0, "select",{className:"cui-input",value:a,onChange:h=>{s===void 0&&i(h.target.value)},"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"body","data-testid":l,ref:p,...u,"aria-disabled":s===void 0?void 0:!0,"aria-describedby":K(u["aria-describedby"],f),children:o.map(h=>_jsxruntime.jsx.call(void 0, "option",{value:h.value,children:h.label},h.value))}),_jsxruntime.jsx.call(void 0, j,{description:t,error:r,descriptionId:c,errorId:y,testId:l}),_optionalChain([s, 'optionalAccess', _12 => _12.reason])===void 0?null:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"body",id:R,testId:`${l}-reason`,children:s.reason})]})},Rn= exports.RadioGroup =({legend:e,description:t,error:r,errorId:n,value:a,options:o,onValueChange:i,testId:d,ref:s})=>{let l=_react.useId.call(void 0, ),{control:p,descriptionId:u,errorId:c}=X({label:e,description:t,error:r,errorId:n});return _jsxruntime.jsxs.call(void 0, "fieldset",{className:"cui-radio-group","aria-describedby":p["aria-describedby"],"data-invalid":r!==void 0,"data-testid":d,children:[_jsxruntime.jsx.call(void 0, "legend",{className:"cui-radio-group-legend","data-cui-type":"body",children:e}),o.map((y,R)=>_jsxruntime.jsxs.call(void 0, "label",{className:"cui-radio","data-cui-type":"body",children:[_jsxruntime.jsx.call(void 0, "input",{type:"radio",name:l,value:y.value,checked:y.value===a,onChange:()=>i(y.value),"aria-invalid":p["aria-invalid"],"data-testid":`${d}-option-${y.value}`,ref:R===0?s:void 0}),_jsxruntime.jsx.call(void 0, "span",{children:y.label})]},y.value)),_jsxruntime.jsx.call(void 0, j,{description:t,error:r,descriptionId:u,errorId:c,testId:d})]})},Tn= exports.CheckboxGroup =({legend:e,description:t,error:r,errorId:n,values:a,options:o,onValuesChange:i,testId:d,ref:s})=>{let{control:l,descriptionId:p,errorId:u}=X({label:e,description:t,error:r,errorId:n}),c=o.map(f=>f.value);if(c.length===0||new Set(c).size!==c.length)throw new RangeError(`A check box group needs at least one option with unique values: ${c.join(", ")}`);let y=a.filter(f=>!c.includes(f));if(y.length>0)throw new RangeError(`The chosen values are not options: ${y.join(", ")}`);let R=new Set(a);return _jsxruntime.jsxs.call(void 0, "fieldset",{className:"cui-checkbox-group","aria-describedby":l["aria-describedby"],"data-invalid":r!==void 0,"data-testid":d,children:[_jsxruntime.jsx.call(void 0, "legend",{className:"cui-checkbox-group-legend","data-cui-type":"body",children:e}),o.map((f,h)=>_jsxruntime.jsxs.call(void 0, "label",{className:"cui-checkbox","data-cui-type":"body",children:[_jsxruntime.jsx.call(void 0, "input",{type:"checkbox",value:f.value,checked:R.has(f.value),onChange:()=>i(c.filter(T=>T===f.value?!R.has(T):R.has(T))),"aria-invalid":l["aria-invalid"],"data-testid":`${d}-option-${f.value}`,ref:h===0?s:void 0}),_jsxruntime.jsx.call(void 0, "span",{children:f.label})]},f.value)),_jsxruntime.jsx.call(void 0, j,{description:t,error:r,descriptionId:p,errorId:u,testId:d})]})};var qt=_react.createContext.call(void 0, null),Ot="surface",Ut={neutral:{face:"surface",line:"border-control"},info:{face:"info-tint",line:"info-accent"},success:{face:"success-tint",line:"success-accent"},warning:{face:"warning-tint",line:"warning-accent"},danger:{face:"danger-tint",line:"danger-accent"}},Kt={face:"info-tint",line:"info-accent"},Gt={normal:"border-control",high:"info-accent"},Pn=["normal","high"],Cn=[1,2,3,4],A=_chunkWKYOVFUGcjs.z.space["space-2"],Nn="fg",kn="fg-secondary",Vt=e=>{let t=_react.useContext.call(void 0, qt);if(t===null)throw new Error(`${e} must be rendered inside Figure`);return t},Ge=(e,t,r)=>{if(!(Number.isFinite(r)&&r>0&&r%4===0))throw new RangeError(`${e}: ${t} must be a positive multiple of the ${4} px lattice: ${r}`)},Ln= exports.Figure =e=>{m();let t=_react.useId.call(void 0, ),{kind:r,widthPx:n,heightPx:a,testId:o,dataAttributes:i,children:d}=e;Ge(o,"widthPx",n),Ge(o,"heightPx",a);let s=_react.useMemo.call(void 0, ()=>({kind:r,widthPx:n,heightPx:a,arrowIds:{normal:`${t}-arrow-normal`,high:`${t}-arrow-high`}}),[r,n,a,t]),l=_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "defs",{children:Pn.map(y=>_jsxruntime.jsx.call(void 0, "marker",{id:s.arrowIds[y],viewBox:`0 0 ${A} ${A}`,refX:A,refY:A/2,markerWidth:A,markerHeight:A,markerUnits:"userSpaceOnUse",orient:"auto","data-cui-emphasis":y,children:_jsxruntime.jsx.call(void 0, "path",{d:`M 0 0 L ${A} ${A/2} L 0 ${A} z`,"data-cui-stroke":Gt[y],"data-testid":`${o}-arrow-${y}`})},y))}),_jsxruntime.jsx.call(void 0, qt.Provider,{value:s,children:d})]});if(e.kind==="group"){let{label:y,onEscape:R}=e;if(!_chunkWKYOVFUGcjs.e.call(void 0, y))throw new RangeError(`${o}: a group figure's label must hold a readable character: ${JSON.stringify(y)}`);return _jsxruntime.jsx.call(void 0, "div",{className:"cui-figure-frame","data-testid":`${o}-frame`,children:_jsxruntime.jsx.call(void 0, "svg",{className:"cui-figure",role:"group","aria-label":y,viewBox:`0 0 ${n} ${a}`,"data-cui-figure":"group","data-cui-surface":Ot,"data-cui-face":"sans",style:{"--cui-figure-inline":_chunkWKYOVFUGcjs.S.call(void 0, n),"--cui-figure-block":_chunkWKYOVFUGcjs.S.call(void 0, a)},onKeyDown:R===void 0?void 0:f=>te(f,R),"data-testid":o,...w(i),children:l})})}let{viewBox:p,pointer:u,svgRef:c}=e;return _jsxruntime.jsx.call(void 0, "div",{className:"cui-container","data-testid":`${o}-frame`,children:_jsxruntime.jsx.call(void 0, "svg",{ref:c,className:"cui-figure","aria-hidden":"true",viewBox:p===void 0?`0 0 ${n} ${a}`:p,"data-cui-figure":"decorative","data-cui-surface":Ot,"data-cui-face":"sans","data-cui-pan":u===void 0?void 0:"true","data-cui-cursor":_optionalChain([u, 'optionalAccess', _13 => _13.cursor]),style:{"--cui-figure-inline":_chunkWKYOVFUGcjs.S.call(void 0, n),"--cui-figure-ratio":String(a/n)},"data-testid":o,...w(i),..._optionalChain([u, 'optionalAccess', _14 => _14.handlers]),children:l})})},Bt=(e,t)=>{try{return t()}catch(r){throw new RangeError(`${e}: ${r.message}`,{cause:r})}},Sn=(e,t,r)=>{for(let n of t){let a=_chunk7M4I26BScjs.d.light[n.fg],o=r.find(i=>a[i]===void 0);if(o!==void 0)throw new RangeError(`${e}: the note ${JSON.stringify(n.text)} in ${n.fg} is not in the contrast table on ${o}, a face the node takes`)}},In= exports.FigureNode =e=>{m();let t=Vt("FigureNode"),r=_react.useId.call(void 0, ),{x:n,y:a,shape:o,tone:i,outline:d,selected:s,name:l,title:p,press:u,testId:c,dataAttributes:y}=e,R=e.notes===void 0?[]:e.notes;if(!(Number.isFinite(n)&&Number.isFinite(a)))throw new RangeError(`${c}: a node's position must be finite: ${n}, ${a}`);if(t.kind==="group"&&u===void 0)throw new RangeError(`${c}: every node of a group figure must be pressable (pass press)`);if(t.kind==="decorative"&&u!==void 0)throw new RangeError(`${c}: a node of a decorative figure cannot be pressed (it is hidden from assistive technology)`);if(u!==void 0&&!_chunkWKYOVFUGcjs.e.call(void 0, u.label))throw new RangeError(`${c}: a pressable node's label must hold a readable character: ${JSON.stringify(u.label)}`);let f=s?Kt:Ut[i];Sn(c,R,[Ut[i].face,Kt.face]);let h,T,x;if(o.kind==="box"){if(l===null)throw new RangeError(`${c}: a box's name is drawn inside the box and sizes it, so it cannot be null (only a disc may be drawn without a name)`);let b=Bt(c,()=>_chunkWKYOVFUGcjs.M.call(void 0, {name:l,notes:R.map(I=>I.text)}));if(Ge(c,"a box's widthPx",o.widthPx),o.widthPx<b.minWidthPx)throw new RangeError(`${c}: a box ${o.widthPx} px wide is narrower than its lines under the widest 1.4.12 spacing (${b.minWidthPx} px)`);h={width:o.widthPx,height:b.heightPx,left:n,top:a};let v=_chunkWKYOVFUGcjs.N.call(void 0, R.length);T=_jsxruntime.jsxs.call(void 0, "g",{"data-cui-surface":f.face,children:[_jsxruntime.jsx.call(void 0, "rect",{className:"cui-figure-plate",width:o.widthPx,height:b.heightPx,rx:_chunkWKYOVFUGcjs.z.radius["radius-item"],"data-cui-fill":f.face,"data-cui-stroke":f.line,"data-testid":`${c}-plate`}),_jsxruntime.jsx.call(void 0, "text",{className:"cui-figure-name",x:v.insetPx,y:v.namePx,fontSize:_chunkWKYOVFUGcjs.z.type.body.size,"data-cui-fg":Nn,"data-cui-figure-type":"body","data-testid":`${c}-name`,children:l}),R.map((I,Q)=>_jsxruntime.jsx.call(void 0, "text",{x:v.insetPx,y:v.notesPx[Q],fontSize:_chunkWKYOVFUGcjs.z.type.caption.size,"data-cui-fg":I.fg,"data-cui-figure-type":"caption","data-testid":`${c}-note-${Q}`,children:I.text},Q))]}),x=_jsxruntime.jsx.call(void 0, "rect",{className:"cui-figure-ring",x:-_chunkWKYOVFUGcjs.Q,y:-_chunkWKYOVFUGcjs.Q,width:o.widthPx+2*_chunkWKYOVFUGcjs.Q,height:b.heightPx+2*_chunkWKYOVFUGcjs.Q,rx:_chunkWKYOVFUGcjs.z.radius["radius-item"]+_chunkWKYOVFUGcjs.Q,"data-cui-stroke":"focus","data-testid":`${c}-ring`})}else{let b=Bt(c,()=>_chunkWKYOVFUGcjs.O.call(void 0, l,o.radiusPx));h={width:2*o.radiusPx,height:2*o.radiusPx,left:n-o.radiusPx,top:a-o.radiusPx},T=_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "g",{"data-cui-surface":f.face,children:_jsxruntime.jsx.call(void 0, "circle",{className:"cui-figure-plate",r:o.radiusPx,"data-cui-fill":f.face,"data-cui-stroke":f.line,"data-testid":`${c}-plate`})}),l===null?null:_jsxruntime.jsx.call(void 0, "text",{className:"cui-figure-label",x:0,y:b.extentBelowPx-_chunkWKYOVFUGcjs.z.type.caption.lineHeight/2,fontSize:_chunkWKYOVFUGcjs.z.type.caption.size,"data-cui-fg":kn,"data-cui-figure-type":"caption","data-testid":`${c}-name`,children:l})]}),x=_jsxruntime.jsx.call(void 0, "circle",{className:"cui-figure-ring",r:o.radiusPx+_chunkWKYOVFUGcjs.Q,"data-cui-stroke":"focus","data-testid":`${c}-ring`})}if(u!==void 0){if(h.width<_chunkWKYOVFUGcjs.w||h.height<_chunkWKYOVFUGcjs.w)throw new RangeError(`${c}: a pressable node must be at least the ${_chunkWKYOVFUGcjs.w} px target: ${h.width} \xD7 ${h.height}`);if(h.left<_chunkWKYOVFUGcjs.P||h.top<_chunkWKYOVFUGcjs.P||h.left+h.width+_chunkWKYOVFUGcjs.P>t.widthPx||h.top+h.height+_chunkWKYOVFUGcjs.P>t.heightPx)throw new RangeError(`${c}: a pressable node must keep ${_chunkWKYOVFUGcjs.P} px to the figure's edge for its focus ring`)}let g=u===void 0?{}:{role:"button",tabIndex:0,"aria-label":u.label,"aria-describedby":u.description===void 0?void 0:r,"aria-expanded":u.expanded,"aria-controls":u.expanded?u.controls:void 0,onClick:b=>{b.currentTarget.focus(),u.onPress()},onKeyDown:b=>{b.key!=="Enter"&&b.key!==" "||(b.preventDefault(),b.repeat||u.onPress())}};return _jsxruntime.jsxs.call(void 0, "g",{className:"cui-figure-node",transform:`translate(${n} ${a})`,"data-cui-tone":i,"data-cui-outline":d,"data-selected":String(s),...g,"data-testid":c,...w(y),children:[p===void 0?null:_jsxruntime.jsx.call(void 0, "title",{children:p}),_optionalChain([u, 'optionalAccess', _15 => _15.description])===void 0?null:_jsxruntime.jsx.call(void 0, "desc",{id:r,"data-testid":`${c}-description`,children:u.description}),u===void 0?null:x,T]})},Mn= exports.FigureEdge =({d:e,emphasis:t,weight:r,arrow:n,title:a,testId:o,dataAttributes:i})=>{m();let d=Vt("FigureEdge");if(!Cn.includes(r))throw new RangeError(`${o}: an edge's weight must be 1, 2, 3 or 4: ${r}`);return _jsxruntime.jsx.call(void 0, "path",{className:"cui-figure-edge",d:e,markerEnd:n?`url(#${d.arrowIds[t]})`:void 0,"data-cui-stroke":Gt[t],"data-cui-weight":r,"data-cui-emphasis":t,"data-testid":o,...w(i),children:a===void 0?null:_jsxruntime.jsx.call(void 0, "title",{children:a})})};var $n={1:"h1",2:"h2",3:"h3"},Fn= exports.Heading =({level:e,type:t,testId:r,headingRef:n,children:a})=>{m();let o=$n[e];return _jsxruntime.jsx.call(void 0, o,{className:"cui-heading","data-cui-type":t,"data-cui-fg":"fg","data-testid":r,ref:n,tabIndex:n===void 0?void 0:-1,children:a})};var Dn={removed:"danger-tint",added:"success-tint"},Hn= exports.InlineChange =({kind:e,testId:t,children:r})=>{if(m(),r==="")throw new RangeError(`${t}: a changed fragment must hold at least one character`);return _jsxruntime.jsx.call(void 0, e==="removed"?"del":"ins",{className:"cui-change","data-cui-change":e,"data-cui-surface":Dn[e],"data-cui-fg":"fg","data-testid":t,children:r})};var Un={neutral:{fg:"fg-secondary",surface:"sunken"},info:{fg:"info-fg",surface:"info-tint"},success:{fg:"success-fg",surface:"success-tint"},warning:{fg:"warning-fg",surface:"warning-tint"},danger:{fg:"danger-fg",surface:"danger-tint"}},Kn={neutral:"neutral-solid",info:"info-solid",success:"success-solid",warning:"warning-solid",danger:"danger-solid"},Ve= exports.Pill =({tone:e,variant:t,testId:r,dataAttributes:n,children:a})=>{m();let o=t==="tint"?Un[e]:{fg:"on-solid",surface:Kn[e]};return _jsxruntime.jsx.call(void 0, "span",{className:"cui-pill","data-cui-tone":e,"data-cui-variant":t,"data-cui-fg":o.fg,"data-cui-surface":o.surface,"data-cui-type":"caption","data-testid":r,...w(n),children:a})};var We=({label:e,valueText:t,value:r,max:n,testId:a})=>{m();let o=_react.useId.call(void 0, );if(n!==null){if(!(Number.isFinite(n)&&n>0))throw new RangeError(`Progress maximum must be positive: ${n}`);if(r===null||!(Number.isFinite(r)&&r>=0))throw new RangeError(`A determinate progress value must be a number >= 0: ${r}`)}let i=n===null?null:{max:n,now:Math.min(r,n)};return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-progress","data-testid":a,children:[_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg",type:"body",id:o,children:e}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-progress-track",role:"progressbar","aria-labelledby":o,"aria-valuetext":t,"aria-valuemin":i===null?void 0:0,"aria-valuemax":_optionalChain([i, 'optionalAccess', _16 => _16.max]),"aria-valuenow":_optionalChain([i, 'optionalAccess', _17 => _17.now]),"data-cui-surface":"sunken","data-cui-indeterminate":i===null,"data-testid":`${a}-bar`,children:_jsxruntime.jsx.call(void 0, "div",{className:"cui-progress-fill","data-cui-accent":"info-accent",style:i===null?void 0:{inlineSize:`${i.now/i.max*100}%`},"data-testid":`${a}-fill`})}),_jsxruntime.jsx.call(void 0, "div",{"aria-hidden":"true",children:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-secondary",type:"body",testId:`${a}-value`,children:t})})]})};var Gn=({title:e,status:t,progress:r,cancel:n,testId:a,children:o})=>_jsxruntime.jsxs.call(void 0, He,{title:e,actions:n===void 0?void 0:_jsxruntime.jsx.call(void 0, F,{variant:"secondary",busy:n.busy,busyLabel:n.busyLabel,onClick:n.onCancel,testId:`${a}-cancel`,children:n.label}),testId:a,children:[_jsxruntime.jsxs.call(void 0, "div",{className:"cui-job-status",role:"status","aria-live":"polite","aria-atomic":"true","data-testid":`${a}-status`,children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-visually-hidden",children:`${e} `}),_jsxruntime.jsx.call(void 0, Ve,{tone:t.tone,variant:"tint",testId:`${a}-status-pill`,children:t.label})]}),r===void 0?null:_jsxruntime.jsx.call(void 0, We,{...r,testId:`${a}-progress`}),o]});var ze=_react.createContext.call(void 0, null),zn="space-2",Jn= exports.List =e=>{m();let{gap:t,label:r,id:n,hidden:a,testId:o,children:i}=e;if(r!==void 0&&!_chunkWKYOVFUGcjs.e.call(void 0, r))throw new RangeError(`${o}: a list's label must hold a readable character: ${JSON.stringify(r)}`);let d=e.marker==="none"?void 0:e.type,s=d!==void 0,l=e.marker==="number"||e.marker==="none"&&e.ordered?"ol":"ul";return _jsxruntime.jsx.call(void 0, ze.Provider,{value:e.marker,children:_jsxruntime.jsx.call(void 0, l,{className:"cui-list",role:"list","aria-label":r,id:n,hidden:a,"data-cui-gap":s?void 0:t,"data-cui-row-gap":s?t:void 0,"data-cui-column-gap":s?zn:void 0,"data-cui-marker":s?e.marker:void 0,"data-cui-type":d,"data-testid":o,children:i})})},Xn= exports.ListItem =({testId:e,dataAttributes:t,children:r})=>{m();let n=_react.useContext.call(void 0, ze);if(n===null)throw new Error("ListItem must be rendered inside List, not inside another ListItem");return _jsxruntime.jsx.call(void 0, "li",{className:"cui-list-item","data-testid":e,...w(t),children:_jsxruntime.jsx.call(void 0, "div",{className:"cui-list-body","data-cui-measure":n==="none"?void 0:"reading",children:_jsxruntime.jsx.call(void 0, ze.Provider,{value:null,children:r})})})};var jn=({tone:e,testId:t,children:r})=>(m(),_jsxruntime.jsx.call(void 0, "div",{className:"cui-notice","data-cui-tone":e,"data-cui-surface":e==="info"?"info-tint":"warning-tint","data-cui-fg":"fg","data-cui-type":"prose","data-cui-measure":"reading","data-testid":t,children:r})),de= exports.AlertMessage =({occurrence:e,testId:t,children:r})=>(m(),_jsxruntime.jsx.call(void 0, "div",{className:"cui-alert",role:"alert","data-cui-surface":"danger-tint","data-cui-fg":"danger-fg","data-cui-type":"prose","data-cui-measure":"reading","data-cui-occurrence":e,"data-testid":t,children:r},e));var jt=e=>[...e.querySelectorAll(ne)].filter(t=>{let r=t.closest(Oe);return r===null||!e.contains(r)}),Zn=e=>{let t=e.ref.current;if(t===null)throw new Error("LoadMore: rows.ref is not attached to the element holding the rows");let r=jt(t);if(r.length!==e.count)throw new Error(`LoadMore: rows.ref holds ${r.length} ${ne} elements for ${e.count} rows`);return r},Qn=(e,t)=>{let r=-1;return e.forEach((n,a)=>{t.has(n)&&(r=a)}),e[r+1]},eo= exports.LoadMore =({onLoad:e,busy:t,done:r,failure:n,limit:a,rows:o,testId:i})=>{let{formatLocale:d,labels:s}=k(),l=_react.useRef.call(void 0, null),p=_react.useRef.call(void 0, null),u=_react.useRef.call(void 0, null),c=_react.useRef.call(void 0, !1),y=()=>{let T=o.ref.current;l.current={shown:new Set(T===null?[]:jt(T)),failureOccurrence:n===null?null:n.occurrence,busySeen:!1},e()};_react.useLayoutEffect.call(void 0, ()=>{let T=c.current;c.current=!1;let x=l.current;if(x===null)return;let g=Zn(o);if(t){x.busySeen=!0,x.shown=new Set(g);return}let b=Qn(g,x.shown),v=n!==null&&n.occurrence!==x.failureOccurrence;if(!(x.busySeen||b!==void 0||v||r)||(l.current=null,v||b===void 0))return;let I=[null,document.body].includes(document.activeElement);(u.current!==null&&document.activeElement===u.current||T&&I)&&b.focus()});let R=oe(()=>r?p.current:u.current),f=_react.useCallback.call(void 0, (T=>{u.current=T;let x=R(T);return()=>{u.current=null,c.current=T===document.activeElement,x()}}),[R]),h=_react.useCallback.call(void 0, (T=>{p.current=T;let x=R(T);return()=>{p.current=null,x()}}),[R]);return r?_jsxruntime.jsx.call(void 0, "div",{className:"cui-load-more","data-testid":i,children:_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"body",tabIndex:-1,ref:h,testId:`${i}-end`,children:s.endOfRecords})}):_jsxruntime.jsxs.call(void 0, "div",{className:"cui-load-more","data-testid":i,children:[_jsxruntime.jsx.call(void 0, F,{variant:"secondary",busy:t,busyLabel:s.loading,onClick:y,ref:f,testId:`${i}-button`,children:s.loadMore(_chunkWKYOVFUGcjs.a.call(void 0, a,d))}),n===null?null:_jsxruntime.jsx.call(void 0, de,{occurrence:n.occurrence,testId:`${i}-failure`,children:s.loadFailed(n.reason)})]})};var ro=({master:e,detail:t,masterMinPx:r,detailMinPx:n,testId:a})=>{m();let o=_chunkWKYOVFUGcjs.U.call(void 0, {masterMinPx:r,detailMinPx:n,gapPx:_chunkWKYOVFUGcjs.z.space["space-6"]});return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-container","data-testid":a,children:[_jsxruntime.jsx.call(void 0, z,{ruleKey:o.key,css:o.css}),_jsxruntime.jsxs.call(void 0, "div",{className:"cui-master-detail","data-cui-master-detail":o.key,children:[_jsxruntime.jsx.call(void 0, "div",{className:"cui-master-detail-pane","data-testid":`${a}-master`,children:e}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-master-detail-pane","data-testid":`${a}-detail`,children:t})]})]})};var Re=e=>{let{formatLocale:t,labels:r}=k(),{testId:n}=e;if(e.keep===void 0){let{value:i,unit:d}=e;if(d!==void 0&&!_chunkWKYOVFUGcjs.e.call(void 0, d))throw new RangeError(`${n}: a unit must hold a readable character: ${JSON.stringify(d)}`);if(i===null)return _jsxruntime.jsx.call(void 0, "span",{className:"cui-measured","data-measured":"false","data-testid":n,children:r.unmeasured});let s=_chunkWKYOVFUGcjs.a.call(void 0, i,t);return _jsxruntime.jsx.call(void 0, "span",{className:"cui-measured","data-measured":"true","data-testid":n,children:_chunkWKYOVFUGcjs.b.call(void 0, s,d)})}let{text:a,keep:o}=e;if(a===null)return _jsxruntime.jsx.call(void 0, "span",{className:"cui-measured","data-measured":"false","data-cui-keep":o,"data-testid":n,children:r.unmeasured});if(!_chunkWKYOVFUGcjs.e.call(void 0, a))throw new RangeError(`${n}: a measured text must hold a readable character (pass null when the value was not measured): ${JSON.stringify(a)}`);return _jsxruntime.jsx.call(void 0, "span",{className:"cui-measured","data-measured":"true","data-cui-keep":o,"data-testid":n,children:a})};var no=({label:e,value:t,min:r,max:n,valueText:a,testId:o})=>{if(m(),!(Number.isFinite(r)&&Number.isFinite(n)&&r<n))throw new RangeError(`Meter needs a finite range with min below max: min ${r}, max ${n}`);if(!(Number.isFinite(t)&&t>=r&&t<=n))throw new RangeError(`Meter value must be a finite number in its range: value ${t}, min ${r}, max ${n}`);return _jsxruntime.jsxs.call(void 0, "span",{className:"cui-meter","data-testid":o,children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-meter-track",role:"meter","aria-label":e,"aria-valuemin":r,"aria-valuemax":n,"aria-valuenow":t,"aria-valuetext":a,"data-cui-surface":"sunken","data-testid":`${o}-bar`,children:_jsxruntime.jsx.call(void 0, "span",{className:"cui-meter-fill","data-cui-accent":"info-accent",style:{inlineSize:`${(t-r)/(n-r)*100}%`},"data-testid":`${o}-fill`})}),_jsxruntime.jsx.call(void 0, "span",{"aria-hidden":"true",children:_jsxruntime.jsx.call(void 0, P,{fg:"fg",type:"body",testId:`${o}-value`,children:a})})]})};var so={ArrowLeft:-1,ArrowRight:1},lo= exports.PanelTabs =({label:e,items:t,value:r,onValueChange:n,testId:a,panelDescribedBy:o,children:i})=>{m();let d=_react.useId.call(void 0, ),s=_react.useRef.call(void 0, new Map);if(t.length===0)throw new RangeError("PanelTabs needs at least one tab");let l=t.map(f=>f.id);if(new Set(l).size!==l.length)throw new RangeError(`Tab keys must be unique: ${l.join(", ")}`);let p=l.indexOf(r);if(p<0)throw new RangeError(`The selected tab "${r}" is not one of the tabs: ${l.join(", ")}`);let u=f=>`${d}-tab-${f}`,c=`${d}-panel`,y=f=>{let h=t[f];h.id!==r&&n(h.id),_optionalChain([s, 'access', _18 => _18.current, 'access', _19 => _19.get, 'call', _20 => _20(h.id), 'optionalAccess', _21 => _21.focus, 'call', _22 => _22()])};return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-panel-tabs","data-testid":a,children:[_jsxruntime.jsx.call(void 0, "div",{className:"cui-tabs-list",role:"tablist","aria-label":e,onKeyDown:f=>{let h=t.findIndex(b=>s.current.get(b.id)===f.target),T=h<0?p:h,x=so[f.key],g;if(x!==void 0){let b=getComputedStyle(f.currentTarget).direction==="rtl"?-x:x;g=(T+b+t.length)%t.length}else if(f.key==="Home")g=0;else if(f.key==="End")g=t.length-1;else return;f.preventDefault(),y(g)},children:t.map((f,h)=>{let T=h===p;return _jsxruntime.jsx.call(void 0, "button",{className:"cui-tab cui-panel-tab",type:"button",role:"tab",id:u(h),"aria-selected":T,"aria-controls":c,tabIndex:T?0:-1,"data-cui-fg":T?"fg":"fg-secondary","data-cui-type":"body","data-testid":`${a}-${f.id}`,ref:x=>{x===null?s.current.delete(f.id):s.current.set(f.id,x)},onClick:()=>y(h),children:f.label},f.id)})}),_jsxruntime.jsx.call(void 0, "div",{role:"tabpanel",id:c,"aria-labelledby":u(p),"aria-describedby":o,"data-testid":`${a}-panel`,children:i})]})};var co=({failure:e,onReload:t,forbiddenMessage:r,failureMessage:n,rescueRef:a,testId:o})=>{let{labels:i}=k();return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-resource-failed","data-testid":o,children:[_jsxruntime.jsx.call(void 0, de,{occurrence:e.occurrence,testId:`${o}-alert`,children:i.failureSentence(e,r,n===void 0?i.loadFailed:n)}),e.status===403?null:_jsxruntime.jsx.call(void 0, F,{variant:"secondary",busy:e.retrying,busyLabel:i.loading,onClick:t,ref:a,testId:`${o}-reload`,children:i.reload})]})};var yo=({label:e,options:t,value:r,onValueChange:n,testId:a})=>{m();let o=new Set(t.map(i=>i.value));if(t.length<2||o.size!==t.length)throw new RangeError(`A segmented control needs at least two options with unique values: ${t.map(i=>i.value).join(", ")}`);if(!o.has(r))throw new RangeError(`The pressed value "${r}" is not one of the options: ${[...o].join(", ")}`);return _jsxruntime.jsxs.call(void 0, "fieldset",{className:"cui-segmented-group","data-testid":a,children:[_jsxruntime.jsx.call(void 0, "legend",{className:"cui-segmented-legend","data-cui-type":"body",children:e}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-segmented",children:t.map(i=>{let d=i.value===r;return _jsxruntime.jsx.call(void 0, "button",{className:"cui-segment",type:"button","aria-pressed":d,"data-cui-fg":d?"on-solid":"fg","data-cui-surface":d?"info-solid":void 0,"data-cui-type":"body","data-testid":`${a}-${i.value}`,onClick:()=>{d||n(i.value)},children:i.label},i.value)})})]})};var Qt=({selected:e,controls:t,onSelect:r,testId:n,dataAttributes:a,ref:o,children:i})=>{m();let d=_react.useRef.call(void 0, null);H(d,{testId:n,part:"row",host:"button"});let s=_react.useCallback.call(void 0, l=>{if(d.current=l,typeof o=="function")return o(l);o!=null&&(o.current=l)},[o]);return _jsxruntime.jsx.call(void 0, "button",{className:"cui-row-button",type:"button","data-selected":e,"aria-expanded":e,"aria-controls":t,"data-cui-row-focus":"","data-cui-surface":e?"info-tint":"surface","data-cui-fg":"fg","data-cui-type":"body","data-testid":n,onClick:r,ref:s,...w(a),children:i})},bo= exports.SelectableList =({label:e,items:t,itemKey:r,selectedKey:n,onSelect:a,detailId:o,renderRow:i,rowTestId:d,rowData:s,empty:l,testId:p,ref:u})=>(m(),_jsxruntime.jsx.call(void 0, "div",{className:"cui-selectable","data-testid":p,ref:u,children:t.length===0?_jsxruntime.jsx.call(void 0, P,{as:"p",fg:"fg-muted",type:"prose",testId:`${p}-empty`,children:l}):_jsxruntime.jsx.call(void 0, "ul",{className:"cui-selectable-list",role:"list","aria-label":e,children:t.map(c=>{let y=r(c);return _jsxruntime.jsx.call(void 0, "li",{children:_jsxruntime.jsx.call(void 0, Qt,{selected:y===n,controls:o,onSelect:()=>a(c),testId:d,dataAttributes:_optionalChain([s, 'optionalCall', _23 => _23(c)]),children:i(c)})},y)})})}));var Ro=({label:e,value:t,min:r,max:n,step:a,valueText:o,onValueChange:i,testId:d})=>{m();let s=_react.useId.call(void 0, );if(!([t,r,n,a].every(Number.isFinite)&&r<n&&a>0&&r<=t&&t<=n))throw new RangeError(`Slider needs finite min < max, a positive step and min <= value <= max: value ${t}, min ${r}, max ${n}, step ${a}`);let l=o(t);return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-field","data-testid":`${d}-field`,children:[_jsxruntime.jsx.call(void 0, "label",{className:"cui-field-label",htmlFor:s,"data-cui-type":"body",children:e}),_jsxruntime.jsxs.call(void 0, "div",{className:"cui-slider",children:[_jsxruntime.jsx.call(void 0, "input",{className:"cui-slider-input",id:s,type:"range",min:r,max:n,step:a,value:t,"aria-valuetext":l,"data-testid":d,onChange:p=>i(p.currentTarget.valueAsNumber)}),_jsxruntime.jsx.call(void 0, "span",{className:"cui-slider-value","aria-hidden":"true",children:_jsxruntime.jsx.call(void 0, P,{fg:"fg",type:"body",testId:`${d}-value`,children:l})})]})]})};var To=({gap:e,testId:t,children:r})=>(m(),_jsxruntime.jsx.call(void 0, "div",{className:"cui-stack","data-cui-gap":e,"data-testid":t,children:r})),xo= exports.Cluster =({gap:e,as:t="div",testId:r,children:n})=>(m(),_jsxruntime.jsx.call(void 0, t,{className:"cui-cluster","data-cui-gap":e,"data-testid":r,children:n}));var rr={done:0,current:1,pending:2},vo={done:{fg:"on-solid",surface:"success-solid"},current:{fg:"on-solid",surface:"info-solid"},pending:{fg:"fg-secondary",surface:void 0}},Eo= exports.Stepper =({label:e,steps:t,testId:r})=>{let{labels:n}=k();if(t.length===0||new Set(t.map(o=>o.id)).size!==t.length)throw new RangeError(`A stepper needs at least one step with unique keys: ${t.map(o=>o.id).join(", ")}`);if(t.filter(o=>o.state==="current").length>1||t.some((o,i)=>i>0&&rr[o.state]<rr[t[i-1].state]))throw new RangeError(`Step states must run done, at most one current, then pending: ${t.map(o=>o.state).join(", ")}`);let a={done:n.stepDone,current:null,pending:n.stepPending};return _jsxruntime.jsx.call(void 0, "ol",{className:"cui-stepper",role:"list","aria-label":e,"data-cui-type":"body","data-testid":r,children:t.map((o,i)=>{let d=vo[o.state],s=a[o.state];return _jsxruntime.jsxs.call(void 0, "li",{className:"cui-step","aria-current":o.state==="current"?"step":void 0,"data-cui-step":o.state,"data-testid":`${r}-${o.id}`,children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-step-marker","aria-hidden":"true","data-cui-fg":d.fg,"data-cui-surface":d.surface,"data-cui-type":"caption",children:o.state==="done"?"\u2713":i+1}),_jsxruntime.jsxs.call(void 0, "span",{className:"cui-step-label","data-cui-fg":"fg",children:[o.label,s===null?null:_jsxruntime.jsx.call(void 0, "span",{className:"cui-visually-hidden",children:` (${s})`})]})]},o.id)})})};var Co=({label:e,labelHidden:t,checked:r,onCheckedChange:n,unavailable:a,testId:o,ref:i,dataAttributes:d})=>{m();let s=_react.useId.call(void 0, ),l=_react.useRef.call(void 0, null);H(l,{testId:o,part:"label",host:"button"});let p=W(a,s),u=a!==void 0,c=_jsxruntime.jsxs.call(void 0, "button",{className:"cui-switch",type:"button",role:"switch","aria-checked":r,"aria-disabled":u?!0:void 0,"aria-describedby":K(p),"data-cui-fg":"fg","data-cui-type":"body","data-testid":o,ref:i,onClick:()=>{u||n(!r)},...w(d),children:[_jsxruntime.jsx.call(void 0, "span",{className:"cui-switch-track","aria-hidden":"true","data-cui-surface":r?"info-solid":"sunken","data-testid":`${o}-track`,children:_jsxruntime.jsx.call(void 0, "span",{className:"cui-switch-thumb","data-cui-surface":r?"surface":"neutral-solid","data-testid":`${o}-thumb`})}),_jsxruntime.jsx.call(void 0, "span",{className:t===!0?"cui-visually-hidden":void 0,ref:l,children:e})]});return _optionalChain([a, 'optionalAccess', _24 => _24.reason])===void 0?c:_jsxruntime.jsxs.call(void 0, "span",{className:"cui-button-group",children:[c,_jsxruntime.jsx.call(void 0, P,{fg:"fg-muted",type:"body",id:s,testId:`${o}-reason`,children:a.reason})]})};var No=({label:e,items:t,currentId:r,onNavigate:n,testId:a})=>{if(m(),t.length===0)throw new RangeError("Tabs needs at least one tab");let o=new Set(t.map(i=>i.id));if(o.size!==t.length)throw new RangeError(`Tab keys must be unique: ${t.map(i=>i.id).join(", ")}`);if(!o.has(r))throw new RangeError(`The current tab "${r}" is not one of the tabs: ${[...o].join(", ")}`);return _jsxruntime.jsx.call(void 0, "nav",{className:"cui-tabs","aria-label":e,"data-testid":a,children:_jsxruntime.jsx.call(void 0, "ul",{className:"cui-tabs-list",role:"list",children:t.map(i=>{let d=i.id===r;return _jsxruntime.jsx.call(void 0, "li",{className:"cui-tabs-item",children:_jsxruntime.jsx.call(void 0, "a",{className:"cui-tab",href:i.href,"aria-current":d?"page":void 0,"data-cui-fg":d?"fg":"fg-secondary","data-cui-type":"body","data-testid":`${a}-${i.id}`,onClick:s=>ce(s,i.href,n),children:i.label})},i.id)})})})};var Io={neutral:"fg",danger:"danger-fg",warning:"warning-fg",success:"success-fg"},Mo= exports.MetricTile =e=>{m();let{label:t,sublabel:r,tone:n,testId:a,dataAttributes:o}=e;if((e.text===void 0?e.value===null:e.text===null)&&n!=="neutral")throw new RangeError(`An unmeasured tile value carries no tone: ${n}`);let d=`${a}-value`;return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-tile","data-cui-surface":"subtle","data-cui-fg":"fg","data-cui-tone":n,"data-testid":a,...w(o),children:[_jsxruntime.jsx.call(void 0, "p",{className:"cui-tile-label","data-cui-type":"caption","data-cui-measure":"reading",children:t}),_jsxruntime.jsx.call(void 0, "p",{className:"cui-tile-sublabel","data-cui-fg":"fg-muted","data-cui-type":"caption","data-cui-measure":"reading",children:r}),_jsxruntime.jsx.call(void 0, "p",{className:"cui-tile-value","data-cui-fg":Io[n],"data-cui-type":"heading","data-cui-measure":"reading",children:e.text===void 0?_jsxruntime.jsx.call(void 0, Re,{value:e.value,unit:e.unit,testId:d}):_jsxruntime.jsx.call(void 0, Re,{text:e.text,keep:"wrap",testId:d})})]})},ar=e=>_react.Children.toArray(e).flatMap(t=>{if(!_react.isValidElement.call(void 0, t))throw new RangeError(`TileGrid children must be tile elements, not text: ${String(t)}`);return t.type===_react.Fragment?ar(t.props.children):[t]}),$o= exports.TileGrid =({count:e,minInlinePx:t,testId:r,children:n})=>{m();let a=_chunkWKYOVFUGcjs.X.call(void 0, e,t,_chunkWKYOVFUGcjs.z.space["space-2"]),o=ar(n).length;if(o!==e)throw new RangeError(`TileGrid has ${o} tiles but count is ${e}`);return _jsxruntime.jsxs.call(void 0, "div",{className:"cui-container","data-testid":r,children:[_jsxruntime.jsx.call(void 0, z,{ruleKey:a.key,css:a.css}),_jsxruntime.jsx.call(void 0, "div",{className:"cui-tile-grid","data-cui-tile-grid":a.key,"data-cui-gap":"space-2",children:n})]})};var we=e=>[...e.querySelectorAll("button")],Ao= exports.Toolbar =({label:e,testId:t,children:r})=>{m();let n=_react.useRef.call(void 0, null),a=_react.useRef.call(void 0, null);_react.useLayoutEffect.call(void 0, ()=>{let s=we(n.current),l=a.current!==null&&s.includes(a.current)?a.current:_nullishCoalesce(s[0], () => (null));a.current=l;for(let p of s)p.tabIndex=p===l?0:-1});let o=s=>{for(let l of we(n.current))l.tabIndex=l===s?0:-1;a.current=s};return _jsxruntime.jsx.call(void 0, "div",{className:"cui-toolbar",role:"toolbar","aria-label":e,"aria-orientation":"horizontal","data-testid":t,ref:n,onFocus:s=>{let l=we(s.currentTarget).find(p=>p.contains(s.target));l!==void 0&&o(l)},onKeyDown:s=>{let l=we(s.currentTarget),p=l.indexOf(s.target);if(p===-1)return;let u=getComputedStyle(s.currentTarget).direction==="rtl"?"ArrowLeft":"ArrowRight",c=u==="ArrowRight"?"ArrowLeft":"ArrowRight",R={[u]:(p+1)%l.length,[c]:(p-1+l.length)%l.length,Home:0,End:l.length-1}[s.key];if(R===void 0)return;s.preventDefault();let f=l[R];o(f),f.focus()},children:r})};var dr=e=>e===null?_chunkWKYOVFUGcjs.n:_chunkWKYOVFUGcjs.o,Ce=(e,t,r,n,a)=>{let[o,i]=_react.useState.call(void 0, ()=>({key:e,state:dr(e)})),[d,s]=_react.useState.call(void 0, 0),[l,p]=_react.useState.call(void 0, 0),u=_react.useRef.call(void 0, t),c=_react.useRef.call(void 0, null),y=_react.useRef.call(void 0, d);_react.useLayoutEffect.call(void 0, ()=>{u.current=t}),_react.useEffect.call(void 0, ()=>{if(e===null){i({key:null,state:_chunkWKYOVFUGcjs.n});return}let g=new AbortController;c.current=e;let b=d===y.current?"revision":"reload";return y.current=d,i(v=>Object.is(v.key,e)?{key:e,state:n(v.state,b)}:{key:e,state:_chunkWKYOVFUGcjs.o}),u.current(g.signal).then(v=>{g.signal.aborted||(c.current=null,i(I=>({key:e,state:a(I.state,v)})))},v=>{g.signal.aborted||i(()=>{throw v})}),()=>{g.abort(),c.current=null}},[e,r,d,l]);let R=_react.useCallback.call(void 0, ()=>s(g=>g+1),[]),f=_react.useCallback.call(void 0, ()=>p(g=>g+1),[]),h=_react.useCallback.call(void 0, (g,b)=>{i(v=>Object.is(v.key,g)?{key:g,state:b(v.state)}:v)},[]),T=_react.useCallback.call(void 0, (g,b)=>{h(g,b),Object.is(c.current,g)&&f()},[h,f]);return{state:Object.is(o.key,e)?o.state:dr(e),reload:R,refresh:f,update:h,write:T}};var Ko=(e,t,r)=>{let n=_react.useRef.call(void 0, t);_react.useLayoutEffect.call(void 0, ()=>{n.current=t});let a=_react.useCallback.call(void 0, T=>n.current.first(T),[]),{state:o,reload:i,refresh:d,update:s,write:l}=Ce(e,a,r,_chunkWKYOVFUGcjs.Y,_chunkWKYOVFUGcjs.Z),p=_react.useRef.call(void 0, {key:e,state:o});_react.useLayoutEffect.call(void 0, ()=>{p.current={key:e,state:o}});let u=_react.useRef.call(void 0, null),c=_react.useCallback.call(void 0, ()=>{_optionalChain([u, 'access', _25 => _25.current, 'optionalAccess', _26 => _26.controller, 'access', _27 => _27.abort, 'call', _28 => _28()]),u.current=null},[]);_react.useEffect.call(void 0, ()=>c,[e,r,c]);let y=_react.useCallback.call(void 0, ()=>{c(),i()},[c,i]),R=_react.useCallback.call(void 0, ()=>{c(),d()},[c,d]),f=_react.useCallback.call(void 0, ()=>{let{key:T,state:x}=p.current;if(T===null||x.kind!=="ready"||x.refreshing||x.value.next===null||x.value.loadingMore)throw new Error("usePagedResource: loadMore needs a shown list with a next cursor, no page in flight and no re-read in flight");let g=x.value.next,b={key:T,controller:new AbortController,maps:[]};u.current=b,s(T,_chunkWKYOVFUGcjs._),n.current.next(g,b.controller.signal).then(v=>{u.current===b&&(u.current=null,s(T,I=>b.maps.reduce((Q,ur)=>_chunkWKYOVFUGcjs.aa.call(void 0, Q,ur),_chunkWKYOVFUGcjs.$.call(void 0, I,g,v))))},v=>{u.current===b&&s(T,()=>{throw v})})},[s]),h=_react.useCallback.call(void 0, (T,x)=>{let g=u.current;g!==null&&Object.is(g.key,T)&&g.maps.push(x),l(T,b=>_chunkWKYOVFUGcjs.aa.call(void 0, b,x))},[l]);return{state:o,reload:y,refresh:R,loadMore:f,updateList:h}};var Go=e=>typeof e=="object"&&e!==null&&typeof e.then=="function",Vo= exports.usePendingPress =()=>{let[e,t]=_react.useState.call(void 0, null),r=_react.useRef.call(void 0, null),n=_react.useCallback.call(void 0, (a,o)=>{let i=o();if(!Go(i))return;let d=Symbol(a);r.current=d,t(a);let s=()=>{r.current===d&&(r.current=null,t(null))};i.then(s,s)},[]);return{pendingKey:e,press:n}};var zo=(e,t,r)=>{let{state:n,reload:a,refresh:o,write:i}=Ce(e,t,r,_chunkWKYOVFUGcjs.p,_chunkWKYOVFUGcjs.q),d=_react.useCallback.call(void 0, (s,l)=>i(s,p=>_chunkWKYOVFUGcjs.q.call(void 0, p,{ok:!0,value:l})),[i]);return{state:n,reload:a,refresh:o,put:d}};var Jo=({testId:e,children:t})=>(m(),_jsxruntime.jsx.call(void 0, "span",{className:"cui-visually-hidden","data-testid":e,children:t}));exports.ANNOUNCE_SETTLE_MS = ue; exports.AlertMessage = de; exports.Breadcrumb = Er; exports.Button = F; exports.COMPACT_ROW_PX = _chunkWKYOVFUGcjs.y; exports.CONSOLE_UI_LABEL_CATALOGS = _chunkWKYOVFUGcjs.s; exports.CONTRAST_MINIMUM = _chunk7M4I26BScjs.c; exports.CONTRAST_PAIRS = _chunk7M4I26BScjs.d; exports.Card = He; exports.CardSection = Br; exports.CheckboxGroup = Tn; exports.Cluster = xo; exports.CodeBlock = qr; exports.ComparisonGrid = Wr; exports.ConsoleUiRoot = Tr; exports.DataTable = sn; exports.DescriptionList = dn; exports.Dialog = un; exports.Disclosure = yn; exports.FIGURE_RING_REACH_PX = _chunkWKYOVFUGcjs.P; exports.FLEXIBLE_COLUMN_MIN_PX = _chunkWKYOVFUGcjs.G; exports.Field = fn; exports.Figure = Ln; exports.FigureEdge = Mn; exports.FigureNode = In; exports.FragmentLink = Fr; exports.HTTP_FORBIDDEN = _chunkWKYOVFUGcjs.k; exports.Heading = Fn; exports.InlineChange = Hn; exports.JobCard = Gn; exports.LATTICE_PX = _chunkWKYOVFUGcjs.u; exports.Link = Mr; exports.List = Jn; exports.ListItem = Xn; exports.LoadMore = eo; exports.MasterDetail = ro; exports.Measured = Re; exports.Meter = no; exports.MetricTile = Mo; exports.Notice = jn; exports.PanelTabs = lo; exports.PasswordInput = gn; exports.Pill = Ve; exports.ProgressBar = We; exports.ROW_WITH_CONTROL_PX = _chunkWKYOVFUGcjs.x; exports.RadioGroup = Rn; exports.ResourceFailed = co; exports.RowButton = Qt; exports.SegmentedControl = yo; exports.Select = hn; exports.SelectableList = bo; exports.Slider = Ro; exports.Stack = To; exports.Stepper = Eo; exports.Switch = Co; exports.TARGET_PX = _chunkWKYOVFUGcjs.w; exports.TOKENS = _chunkWKYOVFUGcjs.z; exports.TONES = _chunkWKYOVFUGcjs.fa; exports.TONE_HUES = _chunkWKYOVFUGcjs.da; exports.TONE_ROLES = _chunkWKYOVFUGcjs.ea; exports.Tabs = No; exports.Text = P; exports.TextArea = bn; exports.TextInput = mn; exports.TileGrid = $o; exports.Toolbar = Ao; exports.VisuallyHidden = Jo; exports.ZonedTimeError = _chunkWKYOVFUGcjs.f; exports.beginPage = _chunkWKYOVFUGcjs._; exports.beginPagedReload = _chunkWKYOVFUGcjs.Y; exports.beginReload = _chunkWKYOVFUGcjs.p; exports.ceil8 = _chunkWKYOVFUGcjs.D; exports.ceilToLattice = _chunkWKYOVFUGcjs.v; exports.cellContentInlinePx = _chunkWKYOVFUGcjs.E; exports.comparisonAttributePx = _chunkWKYOVFUGcjs.H; exports.contrastRatio = _chunk7M4I26BScjs.b; exports.countSampleText = _chunkWKYOVFUGcjs.J; exports.cssVar = _chunkWKYOVFUGcjs.A; exports.figureBoxPlan = _chunkWKYOVFUGcjs.M; exports.figureDiscLabelPlan = _chunkWKYOVFUGcjs.O; exports.fillLabel = _chunkWKYOVFUGcjs.j; exports.fixedColumnPx = _chunkWKYOVFUGcjs.F; exports.flatMapOutcome = _chunkWKYOVFUGcjs.m; exports.formatCount = _chunkWKYOVFUGcjs.a; exports.formatInstant = _chunkWKYOVFUGcjs.i; exports.goldenSectionPx = _chunkWKYOVFUGcjs.R; exports.hexToSrgb = _chunk7M4I26BScjs.a; exports.instantSampleText = _chunkWKYOVFUGcjs.I; exports.isReadableText = _chunkWKYOVFUGcjs.e; exports.keepLastGood = _chunkWKYOVFUGcjs.q; exports.lightDark = _chunkWKYOVFUGcjs.ba; exports.mapOutcome = _chunkWKYOVFUGcjs.l; exports.mapPagedList = _chunkWKYOVFUGcjs.aa; exports.masterDetailPlan = _chunkWKYOVFUGcjs.T; exports.monoTextWidthEm = _chunkWKYOVFUGcjs.C; exports.placeholderRule = _chunkWKYOVFUGcjs.ca; exports.pxToRem = _chunkWKYOVFUGcjs.S; exports.readDecimalText = _chunkWKYOVFUGcjs.c; exports.readIntegerText = _chunkWKYOVFUGcjs.d; exports.reasonAside = _chunkWKYOVFUGcjs.r; exports.resolveConsoleUiLabels = _chunkWKYOVFUGcjs.t; exports.settleFirstPage = _chunkWKYOVFUGcjs.Z; exports.settlePage = _chunkWKYOVFUGcjs.$; exports.spacedTextWidthEm = _chunkWKYOVFUGcjs.L; exports.tableFrameMinInlinePx = _chunkWKYOVFUGcjs.W; exports.tableMinInlinePx = _chunkWKYOVFUGcjs.V; exports.textWidthEm = _chunkWKYOVFUGcjs.B; exports.tileGridPlan = _chunkWKYOVFUGcjs.X; exports.tileMinInlinePx = _chunkWKYOVFUGcjs.K; exports.toOffsetIso = _chunkWKYOVFUGcjs.g; exports.toWallTime = _chunkWKYOVFUGcjs.h; exports.useAnnounce = xr; exports.useConsoleUi = k; exports.useEscapeToClose = Ur; exports.useFocusRescue = oe; exports.usePagedResource = Ko; exports.usePendingPress = Vo; exports.useResource = zo;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConsoleUiLocale, ConsoleUiLabels, ColumnWidth, FgRole, TypeToken, SpaceToken, ResourceFailure, TextFace, ResourceOutcome, KeysetPage, NextPage, PagedState, PagedContent, ResourceState } from "./core.cjs";
|
|
2
|
-
export { AccentRole, COMPACT_ROW_PX, CONSOLE_UI_LABEL_CATALOGS, CONTRAST_MINIMUM, CONTRAST_PAIRS, CellContent, ColorScheme, ColorToken, ColumnHeaderText, ColumnWidthSource, CommandOutcome, ConsoleUiTokens, ContrastRole, FIGURE_RING_REACH_PX, FLEXIBLE_COLUMN_MIN_PX, FigureBoxLines, FigureBoxPlan, FigureDiscLabelPlan, HTTP_FORBIDDEN, LATTICE_PX, MasterDetailOptions, MasterDetailPlan, MotionToken, PageFailure, PagedValue, ROW_WITH_CONTROL_PX, RadiusToken, ReloadCause, SchemeColor, SizeToken, Srgb, StrokeToken, SurfaceRole, TARGET_PX, TOKENS, TONES, TONE_HUES, TONE_ROLES, TileGridPlan, TileGridStep, TokenName, Tone, ToneHue, ToneRole, WeightToken, ZonedTimeError, ZonedTimeErrorReason, beginPage, beginPagedReload, beginReload, ceil8, ceilToLattice, cellContentInlinePx, comparisonAttributePx, contrastRatio, countSampleText, cssVar, figureBoxPlan, figureDiscLabelPlan, fixedColumnPx, flatMapOutcome, formatCount, formatInstant, hexToSrgb, instantSampleText, isReadableText, keepLastGood, lightDark, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, placeholderRule, readDecimalText, readIntegerText, reasonAside, resolveConsoleUiLabels, settleFirstPage, settlePage, spacedTextWidthEm, tableFrameMinInlinePx, tableMinInlinePx, textWidthEm, tileGridPlan, tileMinInlinePx, toOffsetIso, toWallTime } from "./core.cjs";
|
|
2
|
+
export { AccentRole, COMPACT_ROW_PX, CONSOLE_UI_LABEL_CATALOGS, CONTRAST_MINIMUM, CONTRAST_PAIRS, CellContent, ColorScheme, ColorToken, ColumnHeaderText, ColumnWidthSource, CommandOutcome, ConsoleUiTokens, ContrastRole, FIGURE_RING_REACH_PX, FLEXIBLE_COLUMN_MIN_PX, FigureBoxLines, FigureBoxPlan, FigureDiscLabelPlan, HTTP_FORBIDDEN, LATTICE_PX, MasterDetailOptions, MasterDetailPlan, MotionToken, PageFailure, PagedValue, ROW_WITH_CONTROL_PX, RadiusToken, ReloadCause, SchemeColor, SizeToken, Srgb, StrokeToken, SurfaceRole, TARGET_PX, TOKENS, TONES, TONE_HUES, TONE_ROLES, TileGridPlan, TileGridStep, TokenName, Tone, ToneHue, ToneRole, WeightToken, ZonedTimeError, ZonedTimeErrorReason, beginPage, beginPagedReload, beginReload, ceil8, ceilToLattice, cellContentInlinePx, comparisonAttributePx, contrastRatio, countSampleText, cssVar, figureBoxPlan, figureDiscLabelPlan, fillLabel, fixedColumnPx, flatMapOutcome, formatCount, formatInstant, goldenSectionPx, hexToSrgb, instantSampleText, isReadableText, keepLastGood, lightDark, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, placeholderRule, pxToRem, readDecimalText, readIntegerText, reasonAside, resolveConsoleUiLabels, settleFirstPage, settlePage, spacedTextWidthEm, tableFrameMinInlinePx, tableMinInlinePx, textWidthEm, tileGridPlan, tileMinInlinePx, toOffsetIso, toWallTime } from "./core.cjs";
|
|
3
3
|
import * as react from "react";
|
|
4
4
|
import { ReactNode, MouseEvent, Ref, DOMAttributes, RefObject, RefCallback, KeyboardEvent } from "react";
|
|
5
5
|
type BreadcrumbItem = {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConsoleUiLocale, ConsoleUiLabels, ColumnWidth, FgRole, TypeToken, SpaceToken, ResourceFailure, TextFace, ResourceOutcome, KeysetPage, NextPage, PagedState, PagedContent, ResourceState } from "./core.js";
|
|
2
|
-
export { AccentRole, COMPACT_ROW_PX, CONSOLE_UI_LABEL_CATALOGS, CONTRAST_MINIMUM, CONTRAST_PAIRS, CellContent, ColorScheme, ColorToken, ColumnHeaderText, ColumnWidthSource, CommandOutcome, ConsoleUiTokens, ContrastRole, FIGURE_RING_REACH_PX, FLEXIBLE_COLUMN_MIN_PX, FigureBoxLines, FigureBoxPlan, FigureDiscLabelPlan, HTTP_FORBIDDEN, LATTICE_PX, MasterDetailOptions, MasterDetailPlan, MotionToken, PageFailure, PagedValue, ROW_WITH_CONTROL_PX, RadiusToken, ReloadCause, SchemeColor, SizeToken, Srgb, StrokeToken, SurfaceRole, TARGET_PX, TOKENS, TONES, TONE_HUES, TONE_ROLES, TileGridPlan, TileGridStep, TokenName, Tone, ToneHue, ToneRole, WeightToken, ZonedTimeError, ZonedTimeErrorReason, beginPage, beginPagedReload, beginReload, ceil8, ceilToLattice, cellContentInlinePx, comparisonAttributePx, contrastRatio, countSampleText, cssVar, figureBoxPlan, figureDiscLabelPlan, fixedColumnPx, flatMapOutcome, formatCount, formatInstant, hexToSrgb, instantSampleText, isReadableText, keepLastGood, lightDark, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, placeholderRule, readDecimalText, readIntegerText, reasonAside, resolveConsoleUiLabels, settleFirstPage, settlePage, spacedTextWidthEm, tableFrameMinInlinePx, tableMinInlinePx, textWidthEm, tileGridPlan, tileMinInlinePx, toOffsetIso, toWallTime } from "./core.js";
|
|
2
|
+
export { AccentRole, COMPACT_ROW_PX, CONSOLE_UI_LABEL_CATALOGS, CONTRAST_MINIMUM, CONTRAST_PAIRS, CellContent, ColorScheme, ColorToken, ColumnHeaderText, ColumnWidthSource, CommandOutcome, ConsoleUiTokens, ContrastRole, FIGURE_RING_REACH_PX, FLEXIBLE_COLUMN_MIN_PX, FigureBoxLines, FigureBoxPlan, FigureDiscLabelPlan, HTTP_FORBIDDEN, LATTICE_PX, MasterDetailOptions, MasterDetailPlan, MotionToken, PageFailure, PagedValue, ROW_WITH_CONTROL_PX, RadiusToken, ReloadCause, SchemeColor, SizeToken, Srgb, StrokeToken, SurfaceRole, TARGET_PX, TOKENS, TONES, TONE_HUES, TONE_ROLES, TileGridPlan, TileGridStep, TokenName, Tone, ToneHue, ToneRole, WeightToken, ZonedTimeError, ZonedTimeErrorReason, beginPage, beginPagedReload, beginReload, ceil8, ceilToLattice, cellContentInlinePx, comparisonAttributePx, contrastRatio, countSampleText, cssVar, figureBoxPlan, figureDiscLabelPlan, fillLabel, fixedColumnPx, flatMapOutcome, formatCount, formatInstant, goldenSectionPx, hexToSrgb, instantSampleText, isReadableText, keepLastGood, lightDark, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, placeholderRule, pxToRem, readDecimalText, readIntegerText, reasonAside, resolveConsoleUiLabels, settleFirstPage, settlePage, spacedTextWidthEm, tableFrameMinInlinePx, tableMinInlinePx, textWidthEm, tileGridPlan, tileMinInlinePx, toOffsetIso, toWallTime } from "./core.js";
|
|
3
3
|
import * as react from "react";
|
|
4
4
|
import { ReactNode, MouseEvent, Ref, DOMAttributes, RefObject, RefCallback, KeyboardEvent } from "react";
|
|
5
5
|
type BreadcrumbItem = {
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as Pa,A as la,B as ua,C as ca,D as pa,E as ya,F as fa,G as ma,H as ga,I as ba,J as ha,K as Ra,L as at,M as it,N as st,O as V,P as U,Q as M,R as Ta,S as dt,T as lt,U as xa,V as ut,W as ct,X as pt,Y as yt,Z as ft,_ as Ie,a as le,aa as Ca,b as tt,ba as Na,c as jo,ca as ka,d as Yo,da as La,e as D,f as Zo,g as Qo,h as ea,i as ta,j as cr,k as ra,l as na,m as Ne,n as ke,o as rt,p as Le,q as oa,r as aa,s as nt,t as Se,u as ia,v as G,w as sa,x as ot,y as S,z as da}from"./chunk-4IQKQ7WF.js";import{a as va,b as Ea,c as wa,d as mt}from"./chunk-FXEGLGL7.js";import{createContext as pr,useCallback as yr,useContext as xt,useLayoutEffect as fr,useMemo as gt,useRef as bt}from"react";import{jsx as Tt,jsxs as vr}from"react/jsx-runtime";var Me=pr(null),vt=" ",ht='[inert], [aria-hidden="true" i]',Et="dialog:modal",$e="data-cui-dialog-announcer",mr=`:scope > [${$e}]`,gr=e=>{if(e.closest(ht)!==null)return{hidden:'an ancestor is inert or aria-hidden="true"'};let t=e.ownerDocument,r=[...t.querySelectorAll(Et)],n=t.activeElement,a=r.filter(s=>s.contains(n)),o=a.length>0?a:r;if(o.every(s=>s.contains(e)))return{region:e};let i=o.find(s=>o.every(l=>l.contains(s)));if(i===void 0)return{hidden:"focus is in no open modal dialog and they do not nest, so which one is topmost cannot be told"};let d=i.querySelector(mr);return d===null?{hidden:"the topmost open modal dialog neither contains the console nor is a Dialog"}:d.closest(ht)!==null?{hidden:'the topmost open modal dialog is a Dialog whose live region has an inert or aria-hidden="true" ancestor'}:{region:d}},br=e=>{try{e.querySelectorAll(Et)}catch(t){throw typeof t=="object"&&t!==null&&"name"in t&&t.name==="SyntaxError"?new Error("ConsoleUiRoot requires the :modal selector (Chrome 105, Firefox 103, Safari 15.6, jsdom 27 or later): announcements check whether a modal dialog hides the live region",{cause:t}):t}},ue=150,hr=1e3,Rt=new WeakMap,Rr=(e,t)=>{let r=Rt.get(e)??new Set,n={text:t};Rt.set(e,r.add(n)),setTimeout(()=>r.delete(n),ue);let a=e.ownerDocument.createElement("span");a.textContent=[...r].map(o=>o.text).join(vt),e.replaceChildren(a)},Tr=({locale:e,formatLocale:t,timeZone:r,testId:n,children:a})=>{if(xt(Me)!==null)throw new Error("ConsoleUiRoot must not be rendered inside another ConsoleUiRoot (a console has exactly one root)");let i=nt(e),[d]=Intl.getCanonicalLocales(t),s=gt(()=>new Intl.DateTimeFormat(d,{timeZone:r}).resolvedOptions().timeZone,[d,r]),l=bt(null),p=bt(null);fr(()=>{br(l.current.ownerDocument)},[]);let u=yr(y=>{if(y.trim()==="")throw new RangeError("announce: text must be a non-empty sentence");let R=()=>{let{texts:h,settle:T,deadline:x}=p.current;p.current=null,clearTimeout(T),clearTimeout(x);let g=l.current;if(g===null)return;let b=h.join(vt),v=gr(g);if("hidden"in v)throw new Error(`announce: the live region is hidden from assistive technology (${v.hidden}), so this announcement would be lost: ${b}`);Rr(v.region,b)},f=p.current;if(f===null){p.current={texts:[y],settle:setTimeout(R,ue),deadline:setTimeout(R,hr)};return}f.texts.push(y),clearTimeout(f.settle),f.settle=setTimeout(R,ue)},[]),c=gt(()=>({locale:e,formatLocale:d,timeZone:s,labels:i,announce:u}),[e,d,s,i,u]);return Tt(Me.Provider,{value:c,children:vr("div",{"data-cui-root":"","data-cui-surface":"surface","data-cui-fg":"fg","data-testid":n,children:[a,Tt("div",{className:"cui-visually-hidden",role:"status","aria-live":"polite","aria-atomic":"true","data-testid":`${n}-announcer`,ref:l})]})})},k=()=>{let e=xt(Me);if(e===null)throw new Error("useConsoleUi must be called inside ConsoleUiRoot");return e},m=()=>{k()},xr=()=>k().announce;var ce=(e,t,r)=>{e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),r(t))};import{jsx as ee,jsxs as wt}from"react/jsx-runtime";var Er=({items:e,current:t,onNavigate:r,testId:n})=>{let{labels:a}=k();if(new Set(e.map(o=>o.id)).size!==e.length)throw new RangeError(`Breadcrumb keys must be unique: ${e.map(o=>o.id).join(", ")}`);return ee("nav",{className:"cui-breadcrumb","aria-label":a.breadcrumb,"data-testid":n,children:wt("ol",{className:"cui-breadcrumb-list",role:"list","data-cui-type":"body",children:[e.map(o=>wt("li",{className:"cui-breadcrumb-item",children:[ee("a",{className:"cui-link",href:o.href,"data-cui-fg":"info-fg","data-cui-type":"body","data-testid":`${n}-${o.id}`,onClick:i=>ce(i,o.href,r),children:o.label}),ee("span",{className:"cui-breadcrumb-separator","aria-hidden":"true","data-cui-fg":"fg-muted",children:"\u203A"})]},o.id)),ee("li",{className:"cui-breadcrumb-item",children:ee("span",{"aria-current":"page","data-cui-fg":"fg","data-testid":`${n}-current`,children:t})})]})})};import{useId as Lr,useRef as Sr}from"react";var w=e=>{if(e===void 0)return{};for(let t of Object.keys(e))if(!t.startsWith("data-")||t.startsWith("data-cui-")||t==="data-testid")throw new RangeError(`Caller attributes must be data-* and must not override data-cui-* or data-testid: ${t}`);return e};import{useLayoutEffect as wr}from"react";var Pr=new Set(["abbr","b","bdi","bdo","br","cite","code","data","del","dfn","em","i","ins","kbd","mark","q","s","samp","small","span","strong","sub","sup","time","u","var","wbr"]),Cr=e=>{for(let t of e.querySelectorAll("*")){let r=t.localName;if(!Pr.has(r)||t.hasAttribute("tabindex")||t.hasAttribute("contenteditable"))return r}return null},H=(e,{testId:t,part:r,host:n})=>{wr(()=>{let a=Cr(e.current);if(a!==null)throw new RangeError(`${t}: the ${r} is the content of a ${n} and holds only non-interactive phrasing content, not <${a}>`)})};import{jsx as Nr}from"react/jsx-runtime";var P=({fg:e,type:t,face:r,as:n="span",space:a,testId:o,id:i,tabIndex:d,ref:s,children:l})=>(m(),Nr(n,{className:"cui-text","data-cui-fg":e,"data-cui-type":t,"data-cui-face":r,"data-cui-space":a,"data-cui-measure":n==="p"?"reading":void 0,"data-testid":o,id:i,tabIndex:d,ref:s,children:l}));var kr=/\s/,Fe=(e,t)=>{if(e===""||kr.test(e))throw new RangeError(`The id of ${t} must be one token without whitespace: "${e}"`);return e},W=(e,t)=>{if(e!==void 0){if(e.reason!==void 0){if(e.reason.trim()==="")throw new RangeError("An unavailable control needs a reason that is not blank");return t}return Fe(e.reasonId,"an unavailable control's reason")}},K=(...e)=>{let t=e.filter(r=>r!==void 0);return t.length===0?void 0:t.join(" ")};import{jsx as O,jsxs as Ar}from"react/jsx-runtime";var Ir={primary:{fg:"on-solid",surface:"info-solid",type:"body"},secondary:{fg:"fg",surface:void 0,type:"body"},danger:{fg:"on-solid",surface:"danger-solid",type:"body"},link:{fg:"info-fg",surface:void 0,type:"body"}},Ae=({subject:e,children:t})=>{let r=Sr(null);return H(r,e),O("span",{ref:r,children:t})},F=({variant:e,children:t,testId:r,type:n="button",onClick:a,unavailable:o,describedBy:i,expanded:d,controls:s,ref:l,dataAttributes:p,busy:u,busyLabel:c})=>{m();let y=Lr(),R=W(o,y),f=u===!0||o!==void 0,h=Ir[e],T=x=>{if(f){x.preventDefault();return}a?.(x)};return Ar("span",{className:"cui-button-group",children:[O("button",{className:"cui-button",type:n==="submit"?"submit":"button","data-cui-variant":e,"data-cui-fg":h.fg,"data-cui-surface":h.surface,"data-cui-type":h.type,"data-testid":r,"aria-disabled":f?!0:void 0,"aria-busy":u===!0?!0:void 0,"aria-describedby":K(i,R),"aria-expanded":d,"aria-controls":s,onClick:T,ref:l,...w(p),children:O(Ae,{subject:{testId:r,part:"label",host:"button"},children:u===!0?c:t})}),o?.reason===void 0?null:O(P,{fg:"fg-muted",type:"body",id:y,testId:`${r}-reason`,children:o.reason})]})},Mr=({onNavigate:e,children:t,testId:r,ref:n})=>(m(),O("button",{className:"cui-link",type:"button","data-cui-fg":"info-fg","data-cui-type":"body","data-testid":r,onClick:e,ref:n,children:O(Ae,{subject:{testId:r,part:"label",host:"button"},children:t})})),$r=/^[^\s#]+$/,Fr=({targetId:e,children:t,testId:r,onFollow:n,dataAttributes:a})=>{if(m(),!$r.test(e))throw new RangeError(`A fragment link needs the target's id without "#" or white space: "${e}"`);return O("a",{className:"cui-link",href:`#${e}`,"data-cui-fg":"info-fg","data-cui-type":"body","data-testid":r,onClick:n,...w(a),children:O(Ae,{subject:{testId:r,part:"label",host:"link"},children:t})})};import{useId as Pt}from"react";import{useCallback as Dr}from"react";var Hr=229,Or=new Set(["text","search","email","url","tel","password","number","date","datetime-local","month","time","week"]),De=e=>e instanceof HTMLTextAreaElement?e.value!=="":e instanceof HTMLInputElement&&Or.has(e.type)&&(e.value!==""||e.validity.badInput),te=(e,t)=>{e.key!=="Escape"||e.nativeEvent.isComposing||e.keyCode===Hr||De(e.target)||(e.stopPropagation(),t())},Ur=e=>Dr(t=>te(t,e),[e]);import{Fragment as _r,jsx as B,jsxs as re}from"react/jsx-runtime";var Ct=e=>e===void 0?void 0:t=>te(t,e),He=({id:e,title:t,description:r,actions:n,onEscape:a,testId:o,headingRef:i,ref:d,dataAttributes:s,children:l})=>{m();let p=Pt(),u=Ct(a);return re("section",{className:"cui-card",id:e,"aria-labelledby":p,"data-cui-surface":"surface","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"sans","data-testid":o,ref:d,onKeyDown:u,...w(s),children:[re("div",{className:"cui-card-header",children:[re("div",{className:"cui-card-heading",children:[B("h2",{className:"cui-card-title",id:p,"data-cui-type":"title","data-testid":`${o}-heading`,ref:i,tabIndex:i===void 0?void 0:-1,children:t}),r===void 0?null:B("div",{className:"cui-card-description","data-cui-fg":"fg-muted","data-cui-type":"body","data-cui-measure":"reading",children:r})]}),n===void 0?null:B("div",{className:"cui-card-actions",children:n})]}),l]})},Kr={3:"h3",4:"h4"},Br=({id:e,title:t,subtitle:r,level:n=3,region:a=!1,onEscape:o,testId:i,headingRef:d,ref:s,dataAttributes:l,children:p})=>{m();let u=Pt(),c=Ct(o),y=Kr[n],R=re(_r,{children:[re("div",{className:"cui-card-section-heading",children:[B(y,{className:"cui-card-section-title",id:u,"data-cui-type":"body","data-testid":`${i}-heading`,ref:d,tabIndex:d===void 0?void 0:-1,children:t}),r===void 0?null:B("div",{className:"cui-card-section-subtitle","data-cui-fg":"fg-muted","data-cui-type":"body","data-cui-measure":"reading",children:r})]}),p]});return a?B("section",{className:"cui-card-section",id:e,"aria-labelledby":u,"data-testid":i,ref:s,onKeyDown:c,...w(l),children:R}):B("div",{className:"cui-card-section",id:e,"data-testid":i,ref:s,...w(l),children:R})};import{jsx as Nt}from"react/jsx-runtime";var qr=({label:e,code:t,testId:r})=>(m(),Nt("section",{className:"cui-code-frame",tabIndex:0,"aria-label":e,"data-cui-surface":"sunken","data-testid":r,children:Nt("pre",{className:"cui-code","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"mono","data-testid":`${r}-code`,children:t})}));import{useId as Vr}from"react";import{jsx as Gr}from"react/jsx-runtime";var z=({ruleKey:e,css:t})=>Gr("style",{href:e,precedence:"cui",children:t});import{jsx as N,jsxs as _}from"react/jsx-runtime";var Wr=({caption:e,attributes:t,columns:r,attributePx:n,columnMinPx:a,testId:o})=>{m();let i=Vr();for(let u of[n,a])if(!(Number.isFinite(u)&&u>0))throw new RangeError(`ComparisonGrid widths must be positive px values: ${u}`);if(r.length===0)throw new RangeError("ComparisonGrid needs at least one column");for(let u of r)for(let c of t)if(!Object.hasOwn(u.cells,c.key))throw new RangeError(`Column "${u.key}" has no value for attribute "${c.key}"`);let d=n+r.length*a,s=`cui-comparison-a${n}-c${a}-n${r.length}`,l=u=>`[data-cui-comparison="${s}"][data-cui-comparison-layout="${u}"]`,p=`${l("table")}{display:none}@container (min-width:${M(d)}){${l("table")}{display:block}${l("stack")}{display:none}}`;return _("div",{className:"cui-container","data-cui-stack-below-px":d,"data-testid":o,children:[N(z,{ruleKey:s,css:p}),N("div",{className:"cui-comparison-frame","data-cui-comparison":s,"data-cui-comparison-layout":"table",children:_("table",{className:"cui-comparison-table","data-cui-type":"body",children:[N("caption",{className:"cui-visually-hidden",children:e}),_("colgroup",{children:[N("col",{style:{width:M(n)}}),r.map(u=>N("col",{},u.key))]}),N("thead",{children:_("tr",{children:[N("td",{}),r.map(u=>N("th",{scope:"col",children:u.heading},u.key))]})}),N("tbody",{children:t.map(u=>_("tr",{children:[N("th",{scope:"row",children:u.label}),r.map(c=>N("td",{children:c.cells[u.key]("table")},c.key))]},u.key))})]})}),N("div",{className:"cui-comparison-stack","data-cui-comparison":s,"data-cui-comparison-layout":"stack",children:r.map((u,c)=>{let y=`${i}-column-${c}`;return _("div",{className:"cui-comparison-column",role:"group","aria-labelledby":y,"data-cui-type":"body",children:[N("div",{className:"cui-comparison-heading",id:y,children:u.heading}),N("dl",{className:"cui-comparison-list",children:t.map(R=>_("div",{children:[N("dt",{children:R.label}),N("dd",{children:u.cells[R.key]("stack")})]},R.key))})]},u.key)})})]})};import{Fragment as Yr,useCallback as Zr,useId as Qr,useLayoutEffect as St,useRef as Be}from"react";var ne="[data-cui-row-focus]",Oe="[data-cui-row-detail]",zr=e=>e===null?[]:[...e.querySelectorAll(`:scope > ${ne}`)],kt=(e,t)=>{let r=new Map;t!==null&&r.set(t,0);let n=-1;for(let a of e===null?[]:e.children)a.matches(ne)?(n+=1,r.set(a,n)):n>=0&&a.matches(Oe)&&r.set(a,n);return r},Lt=(e,t,r,n)=>{let a=zr(t);if(a.length===0)return r;let o=n.get(e);if(o===void 0)throw new RangeError(`rowFocusTarget: <${e.localName}> left holding focus with no position in the table (only its rows, row details and empty text hold one)`);return a[Math.min(o,a.length-1)]};import{useCallback as Jr,useLayoutEffect as Ue,useReducer as Xr,useRef as Ke}from"react";var jr=e=>e+1,oe=e=>{let t=Ke(e),r=Ke(null),n=Ke(!1),[,a]=Xr(jr,0),o=Jr((i=>()=>{n.current&&i.contains(document.activeElement)&&(r.current=i,a())}),[]);return Ue(()=>(n.current=!0,()=>{n.current=!1,r.current=null}),[]),Ue(()=>{t.current=e}),Ue(()=>{let i=r.current;if(i===null)return;r.current=null;let d=[null,document.body].includes(document.activeElement);i.isConnected||!d||t.current(i)?.focus()}),o};import{jsx as L,jsxs as pe}from"react/jsx-runtime";var en=new Map,tn='a[href], audio[controls], button, details, embed, iframe, img[usemap], input:not([type="hidden"]), label, select, textarea, video[controls], [tabindex], [contenteditable]',rn=(e,t,r)=>{St(()=>{let n=e.current;if(t!=="row-compact"||n===null)return;let a=[...n.querySelectorAll(tn)].find(o=>o.parentElement!==n);if(a!==void 0)throw new RangeError(`${r}: a compact row holds no control or focus target (a ${G} px target does not fit its ${ot} px; use row-control), not <${a.localName}>`)})},nn=(e,t)=>{let r=e.filter(a=>a.rowHeader===!0).map(a=>a.key);if(r.length>1)throw new RangeError(`${t}: a table has at most one row header column, not ${r.length} (${r.join(", ")})`);let n=e.find(a=>a.rowHeader!==!0&&a.rowHeaderNote!==void 0);if(n!==void 0)throw new RangeError(`${t}: a row header note belongs to the row header column, not to ${n.key}`)},on=e=>e==null?null:L("div",{className:"cui-table-header-note",children:e}),an=(e,t,r,n,a)=>{let o=e.open(t);return L("tr",{ref:a,hidden:!o,"data-cui-row-detail":o?"open":"closed","data-testid":`${n}-detail`,children:L("td",{colSpan:r,id:e.id(t),children:o?e.render(t):null})})},sn=({caption:e,captionHidden:t,columns:r,rows:n,rowKey:a,rowTestId:o,rowData:i,rowSize:d,rowDetail:s,empty:l,testId:p,ref:u})=>{m();let c=Qr(),y=Be(null);rn(y,d,p);let R=Be(null),f=Be(en),h=oe(g=>Lt(g,y.current,R.current,f.current));St(()=>{f.current=kt(y.current,R.current)});let T=Zr(g=>{R.current=g;let b=h(g);return()=>{R.current=null,b()}},[h]),x=lt(r);return nn(r,p),L("div",{className:"cui-container","data-testid":p,ref:u,children:n.length===0?L(P,{as:"p",fg:"fg-muted",type:"prose",tabIndex:-1,ref:T,testId:`${p}-empty`,children:l}):L("section",{ref:h,className:"cui-table-frame",tabIndex:0,"aria-labelledby":c,"data-testid":`${p}-frame`,children:pe("table",{className:"cui-table","data-cui-type":"body","data-cui-row-size":d,style:{"--cui-table-min":M(x)},children:[L("caption",{className:t?"cui-visually-hidden":"cui-table-caption",id:c,children:e}),L("colgroup",{children:r.map(g=>L("col",{style:g.width.fixedPx===void 0?void 0:{width:M(g.width.fixedPx)}},g.key))}),L("thead",{children:L("tr",{children:r.map(g=>pe("th",{scope:"col","data-cui-align":g.align,"data-cui-surface":"subtle","data-cui-type":"caption",children:[g.header,g.note===void 0?null:L("div",{className:"cui-table-header-note",children:g.note})]},g.key))})}),L("tbody",{ref:y,children:n.map(g=>pe(Yr,{children:[L("tr",{ref:h,tabIndex:-1,"data-cui-row-focus":"","data-testid":o,...w(i?.(g)),children:r.map(b=>b.rowHeader===!0?pe("th",{scope:"row","data-cui-align":b.align,children:[b.cell(g),b.rowHeaderNote===void 0?null:on(b.rowHeaderNote(g))]},b.key):L("td",{"data-cui-align":b.align,children:b.cell(g)},b.key))}),s===void 0?null:an(s,g,r.length,o,h)]},a(g)))})]})})})};import{jsx as _e,jsxs as ln}from"react/jsx-runtime";var dn=({items:e,testId:t})=>{if(m(),new Set(e.map(r=>r.key)).size!==e.length)throw new RangeError(`Description keys must be unique: ${e.map(r=>r.key).join(", ")}`);return _e("dl",{className:"cui-description-list","data-cui-type":"body","data-testid":t,children:e.map(r=>ln("div",{className:"cui-description-row","data-testid":`${t}-${r.key}`,children:[_e("dt",{"data-cui-fg":"fg-secondary",children:r.term}),_e("dd",{"data-cui-fg":"fg",children:r.description})]},r.key))})};import{useId as It,useLayoutEffect as Mt,useRef as $t}from"react";import{jsx as ae,jsxs as At}from"react/jsx-runtime";var Ft=e=>{e instanceof HTMLElement&&e.isConnected&&e.focus()},un=({title:e,description:t,open:r,onClose:n,testId:a,children:o})=>{let{labels:i}=k(),d=It(),s=It(),l=$t(null),p=$t(null);return Mt(()=>{let y=l.current;r&&!y.open?(p.current=y.ownerDocument.activeElement,y.showModal()):!r&&y.open&&y.close()},[r]),Mt(()=>{let y=l.current;return()=>{y.open&&(y.close(),Ft(p.current),p.current=null)}},[]),At("dialog",{className:"cui-dialog","aria-labelledby":d,"aria-describedby":t===void 0?void 0:s,"data-cui-surface":"surface","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"sans","data-testid":a,ref:l,onClose:y=>{y.currentTarget.open||(Ft(p.current),p.current=null,r&&n())},onCancel:y=>{De(y.currentTarget.ownerDocument.activeElement)&&y.preventDefault()},children:[At("div",{className:"cui-dialog-header",children:[ae("h2",{className:"cui-dialog-title",id:d,"data-cui-type":"title",children:e}),ae("div",{className:"cui-dialog-actions",children:ae(F,{variant:"secondary",testId:`${a}-close`,onClick:()=>l.current?.close(),children:i.close})})]}),t===void 0?null:ae("div",{id:s,"data-cui-measure":"reading","data-testid":`${a}-description`,children:t}),o,ae("div",{className:"cui-visually-hidden",role:"status","aria-live":"polite","aria-atomic":"true",[$e]:"","data-testid":`${a}-announcer`})]})};import{useId as cn,useRef as pn}from"react";import{jsx as qe,jsxs as Dt}from"react/jsx-runtime";var yn=({summary:e,open:t,onOpenChange:r,testId:n,children:a})=>{m();let o=cn(),i=pn(null);return H(i,{testId:n,part:"summary",host:"button"}),Dt("div",{className:"cui-disclosure","data-testid":n,children:[Dt("button",{className:"cui-disclosure-button",type:"button","aria-expanded":t,"aria-controls":o,"data-cui-fg":"fg","data-cui-type":"body","data-testid":`${n}-button`,onClick:()=>r(!t),children:[qe("span",{className:"cui-disclosure-marker","aria-hidden":"true",children:t?"\u25BE":"\u25B8"}),qe("span",{ref:i,children:e})]}),qe("div",{className:"cui-disclosure-panel",id:o,hidden:!t,"data-testid":`${n}-panel`,children:a})]})};import{useId as J}from"react";import{Fragment as xn,jsx as E,jsxs as $}from"react/jsx-runtime";var X=({description:e,error:t,errorId:r})=>{m();let n=J(),a=J(),o=J(),i=r===void 0?o:Fe(r,"a field's error"),d=[e===void 0?null:a,t===void 0?null:i].filter(l=>l!==null).join(" ");return{control:{id:n,"aria-describedby":d===""?void 0:d,"aria-invalid":t===void 0?void 0:!0},descriptionId:a,errorId:i}},j=({description:e,error:t,descriptionId:r,errorId:n,testId:a})=>$(xn,{children:[e===void 0?null:E(P,{as:"p",fg:"fg-muted",type:"body",id:r,testId:`${a}-description`,children:e}),t===void 0?null:E(P,{as:"p",fg:"danger-fg",type:"body",id:n,testId:`${a}-error`,children:t})]}),ye=({htmlFor:e,hidden:t,children:r})=>E("label",{className:t===!0?"cui-visually-hidden":"cui-field-label",htmlFor:e,"data-cui-type":"body",children:r}),fn=({label:e,description:t,error:r,errorId:n,testId:a,children:o})=>{let{control:i,descriptionId:d,errorId:s}=X({label:e,description:t,error:r,errorId:n});return $("div",{className:"cui-field","data-invalid":r!==void 0,"data-testid":a,children:[E(ye,{htmlFor:i.id,hidden:void 0,children:e}),o(i),E(j,{description:t,error:r,descriptionId:d,errorId:s,testId:a})]})},Ht=({label:e,description:t,error:r,errorId:n,value:a,onValueChange:o,type:i,list:d,autoComplete:s,inputMode:l,prefix:p,labelHidden:u,required:c,testId:y,ref:R})=>{let{control:f,descriptionId:h,errorId:T}=X({label:e,description:t,error:r,errorId:n}),x=J();if(p!==void 0&&p.trim()==="")throw new RangeError("An input's prefix must not be blank");let g=i==="password",b=E("input",{className:"cui-input",type:i,value:a,list:d,autoComplete:s,inputMode:l,spellCheck:g?!1:void 0,autoCapitalize:g?"none":void 0,required:c,onChange:v=>o(v.target.value),"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"body","data-testid":y,ref:R,...f,"aria-describedby":K(p===void 0?void 0:x,f["aria-describedby"])});return $("div",{className:"cui-field","data-invalid":r!==void 0,"data-testid":`${y}-field`,children:[E(ye,{htmlFor:f.id,hidden:u,children:e}),p===void 0?b:$("div",{className:"cui-input-group",children:[E("span",{className:"cui-input-prefix",id:x,"data-cui-fg":"fg-secondary","data-cui-surface":"sunken","data-cui-type":"body","data-testid":`${y}-prefix`,children:p}),b]}),E(j,{description:t,error:r,descriptionId:h,errorId:T,testId:y})]})},mn=e=>E(Ht,{...e}),gn=e=>E(Ht,{...e,type:"password"}),bn=({label:e,description:t,error:r,errorId:n,value:a,onValueChange:o,required:i,testId:d,ref:s})=>{let{control:l,descriptionId:p,errorId:u}=X({label:e,description:t,error:r,errorId:n});return $("div",{className:"cui-field","data-invalid":r!==void 0,"data-testid":`${d}-field`,children:[E(ye,{htmlFor:l.id,hidden:void 0,children:e}),E("textarea",{className:"cui-input cui-textarea",value:a,required:i,onChange:c=>o(c.target.value),"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"prose","data-testid":d,ref:s,...l}),E(j,{description:t,error:r,descriptionId:p,errorId:u,testId:d})]})},hn=({label:e,description:t,error:r,errorId:n,value:a,options:o,onValueChange:i,labelHidden:d,unavailable:s,testId:l,ref:p})=>{let{control:u,descriptionId:c,errorId:y}=X({label:e,description:t,error:r,errorId:n}),R=J(),f=W(s,R);return $("div",{className:"cui-field","data-invalid":r!==void 0,"data-testid":`${l}-field`,children:[E(ye,{htmlFor:u.id,hidden:d,children:e}),E("select",{className:"cui-input",value:a,onChange:h=>{s===void 0&&i(h.target.value)},"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"body","data-testid":l,ref:p,...u,"aria-disabled":s===void 0?void 0:!0,"aria-describedby":K(u["aria-describedby"],f),children:o.map(h=>E("option",{value:h.value,children:h.label},h.value))}),E(j,{description:t,error:r,descriptionId:c,errorId:y,testId:l}),s?.reason===void 0?null:E(P,{as:"p",fg:"fg-muted",type:"body",id:R,testId:`${l}-reason`,children:s.reason})]})},Rn=({legend:e,description:t,error:r,errorId:n,value:a,options:o,onValueChange:i,testId:d,ref:s})=>{let l=J(),{control:p,descriptionId:u,errorId:c}=X({label:e,description:t,error:r,errorId:n});return $("fieldset",{className:"cui-radio-group","aria-describedby":p["aria-describedby"],"data-invalid":r!==void 0,"data-testid":d,children:[E("legend",{className:"cui-radio-group-legend","data-cui-type":"body",children:e}),o.map((y,R)=>$("label",{className:"cui-radio","data-cui-type":"body",children:[E("input",{type:"radio",name:l,value:y.value,checked:y.value===a,onChange:()=>i(y.value),"aria-invalid":p["aria-invalid"],"data-testid":`${d}-option-${y.value}`,ref:R===0?s:void 0}),E("span",{children:y.label})]},y.value)),E(j,{description:t,error:r,descriptionId:u,errorId:c,testId:d})]})},Tn=({legend:e,description:t,error:r,errorId:n,values:a,options:o,onValuesChange:i,testId:d,ref:s})=>{let{control:l,descriptionId:p,errorId:u}=X({label:e,description:t,error:r,errorId:n}),c=o.map(f=>f.value);if(c.length===0||new Set(c).size!==c.length)throw new RangeError(`A check box group needs at least one option with unique values: ${c.join(", ")}`);let y=a.filter(f=>!c.includes(f));if(y.length>0)throw new RangeError(`The chosen values are not options: ${y.join(", ")}`);let R=new Set(a);return $("fieldset",{className:"cui-checkbox-group","aria-describedby":l["aria-describedby"],"data-invalid":r!==void 0,"data-testid":d,children:[E("legend",{className:"cui-checkbox-group-legend","data-cui-type":"body",children:e}),o.map((f,h)=>$("label",{className:"cui-checkbox","data-cui-type":"body",children:[E("input",{type:"checkbox",value:f.value,checked:R.has(f.value),onChange:()=>i(c.filter(T=>T===f.value?!R.has(T):R.has(T))),"aria-invalid":l["aria-invalid"],"data-testid":`${d}-option-${f.value}`,ref:h===0?s:void 0}),E("span",{children:f.label})]},f.value)),E(j,{description:t,error:r,descriptionId:p,errorId:u,testId:d})]})};import{createContext as vn,useContext as En,useId as _t,useMemo as wn}from"react";import{Fragment as Wt,jsx as C,jsxs as fe}from"react/jsx-runtime";var qt=vn(null),Ot="surface",Ut={neutral:{face:"surface",line:"border-control"},info:{face:"info-tint",line:"info-accent"},success:{face:"success-tint",line:"success-accent"},warning:{face:"warning-tint",line:"warning-accent"},danger:{face:"danger-tint",line:"danger-accent"}},Kt={face:"info-tint",line:"info-accent"},Gt={normal:"border-control",high:"info-accent"},Pn=["normal","high"],Cn=[1,2,3,4],A=S.space["space-2"],Nn="fg",kn="fg-secondary",Vt=e=>{let t=En(qt);if(t===null)throw new Error(`${e} must be rendered inside Figure`);return t},Ge=(e,t,r)=>{if(!(Number.isFinite(r)&&r>0&&r%4===0))throw new RangeError(`${e}: ${t} must be a positive multiple of the ${4} px lattice: ${r}`)},Ln=e=>{m();let t=_t(),{kind:r,widthPx:n,heightPx:a,testId:o,dataAttributes:i,children:d}=e;Ge(o,"widthPx",n),Ge(o,"heightPx",a);let s=wn(()=>({kind:r,widthPx:n,heightPx:a,arrowIds:{normal:`${t}-arrow-normal`,high:`${t}-arrow-high`}}),[r,n,a,t]),l=fe(Wt,{children:[C("defs",{children:Pn.map(y=>C("marker",{id:s.arrowIds[y],viewBox:`0 0 ${A} ${A}`,refX:A,refY:A/2,markerWidth:A,markerHeight:A,markerUnits:"userSpaceOnUse",orient:"auto","data-cui-emphasis":y,children:C("path",{d:`M 0 0 L ${A} ${A/2} L 0 ${A} z`,"data-cui-stroke":Gt[y],"data-testid":`${o}-arrow-${y}`})},y))}),C(qt.Provider,{value:s,children:d})]});if(e.kind==="group"){let{label:y,onEscape:R}=e;if(!D(y))throw new RangeError(`${o}: a group figure's label must hold a readable character: ${JSON.stringify(y)}`);return C("div",{className:"cui-figure-frame","data-testid":`${o}-frame`,children:C("svg",{className:"cui-figure",role:"group","aria-label":y,viewBox:`0 0 ${n} ${a}`,"data-cui-figure":"group","data-cui-surface":Ot,"data-cui-face":"sans",style:{"--cui-figure-inline":M(n),"--cui-figure-block":M(a)},onKeyDown:R===void 0?void 0:f=>te(f,R),"data-testid":o,...w(i),children:l})})}let{viewBox:p,pointer:u,svgRef:c}=e;return C("div",{className:"cui-container","data-testid":`${o}-frame`,children:C("svg",{ref:c,className:"cui-figure","aria-hidden":"true",viewBox:p===void 0?`0 0 ${n} ${a}`:p,"data-cui-figure":"decorative","data-cui-surface":Ot,"data-cui-face":"sans","data-cui-pan":u===void 0?void 0:"true","data-cui-cursor":u?.cursor,style:{"--cui-figure-inline":M(n),"--cui-figure-ratio":String(a/n)},"data-testid":o,...w(i),...u?.handlers,children:l})})},Bt=(e,t)=>{try{return t()}catch(r){throw new RangeError(`${e}: ${r.message}`,{cause:r})}},Sn=(e,t,r)=>{for(let n of t){let a=mt.light[n.fg],o=r.find(i=>a[i]===void 0);if(o!==void 0)throw new RangeError(`${e}: the note ${JSON.stringify(n.text)} in ${n.fg} is not in the contrast table on ${o}, a face the node takes`)}},In=e=>{m();let t=Vt("FigureNode"),r=_t(),{x:n,y:a,shape:o,tone:i,outline:d,selected:s,name:l,title:p,press:u,testId:c,dataAttributes:y}=e,R=e.notes===void 0?[]:e.notes;if(!(Number.isFinite(n)&&Number.isFinite(a)))throw new RangeError(`${c}: a node's position must be finite: ${n}, ${a}`);if(t.kind==="group"&&u===void 0)throw new RangeError(`${c}: every node of a group figure must be pressable (pass press)`);if(t.kind==="decorative"&&u!==void 0)throw new RangeError(`${c}: a node of a decorative figure cannot be pressed (it is hidden from assistive technology)`);if(u!==void 0&&!D(u.label))throw new RangeError(`${c}: a pressable node's label must hold a readable character: ${JSON.stringify(u.label)}`);let f=s?Kt:Ut[i];Sn(c,R,[Ut[i].face,Kt.face]);let h,T,x;if(o.kind==="box"){if(l===null)throw new RangeError(`${c}: a box's name is drawn inside the box and sizes it, so it cannot be null (only a disc may be drawn without a name)`);let b=Bt(c,()=>at({name:l,notes:R.map(I=>I.text)}));if(Ge(c,"a box's widthPx",o.widthPx),o.widthPx<b.minWidthPx)throw new RangeError(`${c}: a box ${o.widthPx} px wide is narrower than its lines under the widest 1.4.12 spacing (${b.minWidthPx} px)`);h={width:o.widthPx,height:b.heightPx,left:n,top:a};let v=it(R.length);T=fe("g",{"data-cui-surface":f.face,children:[C("rect",{className:"cui-figure-plate",width:o.widthPx,height:b.heightPx,rx:S.radius["radius-item"],"data-cui-fill":f.face,"data-cui-stroke":f.line,"data-testid":`${c}-plate`}),C("text",{className:"cui-figure-name",x:v.insetPx,y:v.namePx,fontSize:S.type.body.size,"data-cui-fg":Nn,"data-cui-figure-type":"body","data-testid":`${c}-name`,children:l}),R.map((I,Q)=>C("text",{x:v.insetPx,y:v.notesPx[Q],fontSize:S.type.caption.size,"data-cui-fg":I.fg,"data-cui-figure-type":"caption","data-testid":`${c}-note-${Q}`,children:I.text},Q))]}),x=C("rect",{className:"cui-figure-ring",x:-U,y:-U,width:o.widthPx+2*U,height:b.heightPx+2*U,rx:S.radius["radius-item"]+U,"data-cui-stroke":"focus","data-testid":`${c}-ring`})}else{let b=Bt(c,()=>st(l,o.radiusPx));h={width:2*o.radiusPx,height:2*o.radiusPx,left:n-o.radiusPx,top:a-o.radiusPx},T=fe(Wt,{children:[C("g",{"data-cui-surface":f.face,children:C("circle",{className:"cui-figure-plate",r:o.radiusPx,"data-cui-fill":f.face,"data-cui-stroke":f.line,"data-testid":`${c}-plate`})}),l===null?null:C("text",{className:"cui-figure-label",x:0,y:b.extentBelowPx-S.type.caption.lineHeight/2,fontSize:S.type.caption.size,"data-cui-fg":kn,"data-cui-figure-type":"caption","data-testid":`${c}-name`,children:l})]}),x=C("circle",{className:"cui-figure-ring",r:o.radiusPx+U,"data-cui-stroke":"focus","data-testid":`${c}-ring`})}if(u!==void 0){if(h.width<G||h.height<G)throw new RangeError(`${c}: a pressable node must be at least the ${G} px target: ${h.width} \xD7 ${h.height}`);if(h.left<V||h.top<V||h.left+h.width+V>t.widthPx||h.top+h.height+V>t.heightPx)throw new RangeError(`${c}: a pressable node must keep ${V} px to the figure's edge for its focus ring`)}let g=u===void 0?{}:{role:"button",tabIndex:0,"aria-label":u.label,"aria-describedby":u.description===void 0?void 0:r,"aria-expanded":u.expanded,"aria-controls":u.expanded?u.controls:void 0,onClick:b=>{b.currentTarget.focus(),u.onPress()},onKeyDown:b=>{b.key!=="Enter"&&b.key!==" "||(b.preventDefault(),b.repeat||u.onPress())}};return fe("g",{className:"cui-figure-node",transform:`translate(${n} ${a})`,"data-cui-tone":i,"data-cui-outline":d,"data-selected":String(s),...g,"data-testid":c,...w(y),children:[p===void 0?null:C("title",{children:p}),u?.description===void 0?null:C("desc",{id:r,"data-testid":`${c}-description`,children:u.description}),u===void 0?null:x,T]})},Mn=({d:e,emphasis:t,weight:r,arrow:n,title:a,testId:o,dataAttributes:i})=>{m();let d=Vt("FigureEdge");if(!Cn.includes(r))throw new RangeError(`${o}: an edge's weight must be 1, 2, 3 or 4: ${r}`);return C("path",{className:"cui-figure-edge",d:e,markerEnd:n?`url(#${d.arrowIds[t]})`:void 0,"data-cui-stroke":Gt[t],"data-cui-weight":r,"data-cui-emphasis":t,"data-testid":o,...w(i),children:a===void 0?null:C("title",{children:a})})};import{jsx as An}from"react/jsx-runtime";var $n={1:"h1",2:"h2",3:"h3"},Fn=({level:e,type:t,testId:r,headingRef:n,children:a})=>{m();let o=$n[e];return An(o,{className:"cui-heading","data-cui-type":t,"data-cui-fg":"fg","data-testid":r,ref:n,tabIndex:n===void 0?void 0:-1,children:a})};import{jsx as On}from"react/jsx-runtime";var Dn={removed:"danger-tint",added:"success-tint"},Hn=({kind:e,testId:t,children:r})=>{if(m(),r==="")throw new RangeError(`${t}: a changed fragment must hold at least one character`);return On(e==="removed"?"del":"ins",{className:"cui-change","data-cui-change":e,"data-cui-surface":Dn[e],"data-cui-fg":"fg","data-testid":t,children:r})};import{jsx as Bn}from"react/jsx-runtime";var Un={neutral:{fg:"fg-secondary",surface:"sunken"},info:{fg:"info-fg",surface:"info-tint"},success:{fg:"success-fg",surface:"success-tint"},warning:{fg:"warning-fg",surface:"warning-tint"},danger:{fg:"danger-fg",surface:"danger-tint"}},Kn={neutral:"neutral-solid",info:"info-solid",success:"success-solid",warning:"warning-solid",danger:"danger-solid"},Ve=({tone:e,variant:t,testId:r,dataAttributes:n,children:a})=>{m();let o=t==="tint"?Un[e]:{fg:"on-solid",surface:Kn[e]};return Bn("span",{className:"cui-pill","data-cui-tone":e,"data-cui-variant":t,"data-cui-fg":o.fg,"data-cui-surface":o.surface,"data-cui-type":"caption","data-testid":r,...w(n),children:a})};import{useId as _n}from"react";import{jsx as ie,jsxs as qn}from"react/jsx-runtime";var We=({label:e,valueText:t,value:r,max:n,testId:a})=>{m();let o=_n();if(n!==null){if(!(Number.isFinite(n)&&n>0))throw new RangeError(`Progress maximum must be positive: ${n}`);if(r===null||!(Number.isFinite(r)&&r>=0))throw new RangeError(`A determinate progress value must be a number >= 0: ${r}`)}let i=n===null?null:{max:n,now:Math.min(r,n)};return qn("div",{className:"cui-progress","data-testid":a,children:[ie(P,{as:"p",fg:"fg",type:"body",id:o,children:e}),ie("div",{className:"cui-progress-track",role:"progressbar","aria-labelledby":o,"aria-valuetext":t,"aria-valuemin":i===null?void 0:0,"aria-valuemax":i?.max,"aria-valuenow":i?.now,"data-cui-surface":"sunken","data-cui-indeterminate":i===null,"data-testid":`${a}-bar`,children:ie("div",{className:"cui-progress-fill","data-cui-accent":"info-accent",style:i===null?void 0:{inlineSize:`${i.now/i.max*100}%`},"data-testid":`${a}-fill`})}),ie("div",{"aria-hidden":"true",children:ie(P,{as:"p",fg:"fg-secondary",type:"body",testId:`${a}-value`,children:t})})]})};import{jsx as me,jsxs as zt}from"react/jsx-runtime";var Gn=({title:e,status:t,progress:r,cancel:n,testId:a,children:o})=>zt(He,{title:e,actions:n===void 0?void 0:me(F,{variant:"secondary",busy:n.busy,busyLabel:n.busyLabel,onClick:n.onCancel,testId:`${a}-cancel`,children:n.label}),testId:a,children:[zt("div",{className:"cui-job-status",role:"status","aria-live":"polite","aria-atomic":"true","data-testid":`${a}-status`,children:[me("span",{className:"cui-visually-hidden",children:`${e} `}),me(Ve,{tone:t.tone,variant:"tint",testId:`${a}-status-pill`,children:t.label})]}),r===void 0?null:me(We,{...r,testId:`${a}-progress`}),o]});import{createContext as Vn,useContext as Wn}from"react";import{jsx as se}from"react/jsx-runtime";var ze=Vn(null),zn="space-2",Jn=e=>{m();let{gap:t,label:r,id:n,hidden:a,testId:o,children:i}=e;if(r!==void 0&&!D(r))throw new RangeError(`${o}: a list's label must hold a readable character: ${JSON.stringify(r)}`);let d=e.marker==="none"?void 0:e.type,s=d!==void 0,l=e.marker==="number"||e.marker==="none"&&e.ordered?"ol":"ul";return se(ze.Provider,{value:e.marker,children:se(l,{className:"cui-list",role:"list","aria-label":r,id:n,hidden:a,"data-cui-gap":s?void 0:t,"data-cui-row-gap":s?t:void 0,"data-cui-column-gap":s?zn:void 0,"data-cui-marker":s?e.marker:void 0,"data-cui-type":d,"data-testid":o,children:i})})},Xn=({testId:e,dataAttributes:t,children:r})=>{m();let n=Wn(ze);if(n===null)throw new Error("ListItem must be rendered inside List, not inside another ListItem");return se("li",{className:"cui-list-item","data-testid":e,...w(t),children:se("div",{className:"cui-list-body","data-cui-measure":n==="none"?void 0:"reading",children:se(ze.Provider,{value:null,children:r})})})};import{useCallback as Xt,useLayoutEffect as Yn,useRef as ge}from"react";import{jsx as Jt}from"react/jsx-runtime";var jn=({tone:e,testId:t,children:r})=>(m(),Jt("div",{className:"cui-notice","data-cui-tone":e,"data-cui-surface":e==="info"?"info-tint":"warning-tint","data-cui-fg":"fg","data-cui-type":"prose","data-cui-measure":"reading","data-testid":t,children:r})),de=({occurrence:e,testId:t,children:r})=>(m(),Jt("div",{className:"cui-alert",role:"alert","data-cui-surface":"danger-tint","data-cui-fg":"danger-fg","data-cui-type":"prose","data-cui-measure":"reading","data-cui-occurrence":e,"data-testid":t,children:r},e));import{jsx as be,jsxs as to}from"react/jsx-runtime";var jt=e=>[...e.querySelectorAll(ne)].filter(t=>{let r=t.closest(Oe);return r===null||!e.contains(r)}),Zn=e=>{let t=e.ref.current;if(t===null)throw new Error("LoadMore: rows.ref is not attached to the element holding the rows");let r=jt(t);if(r.length!==e.count)throw new Error(`LoadMore: rows.ref holds ${r.length} ${ne} elements for ${e.count} rows`);return r},Qn=(e,t)=>{let r=-1;return e.forEach((n,a)=>{t.has(n)&&(r=a)}),e[r+1]},eo=({onLoad:e,busy:t,done:r,failure:n,limit:a,rows:o,testId:i})=>{let{formatLocale:d,labels:s}=k(),l=ge(null),p=ge(null),u=ge(null),c=ge(!1),y=()=>{let T=o.ref.current;l.current={shown:new Set(T===null?[]:jt(T)),failureOccurrence:n===null?null:n.occurrence,busySeen:!1},e()};Yn(()=>{let T=c.current;c.current=!1;let x=l.current;if(x===null)return;let g=Zn(o);if(t){x.busySeen=!0,x.shown=new Set(g);return}let b=Qn(g,x.shown),v=n!==null&&n.occurrence!==x.failureOccurrence;if(!(x.busySeen||b!==void 0||v||r)||(l.current=null,v||b===void 0))return;let I=[null,document.body].includes(document.activeElement);(u.current!==null&&document.activeElement===u.current||T&&I)&&b.focus()});let R=oe(()=>r?p.current:u.current),f=Xt((T=>{u.current=T;let x=R(T);return()=>{u.current=null,c.current=T===document.activeElement,x()}}),[R]),h=Xt((T=>{p.current=T;let x=R(T);return()=>{p.current=null,x()}}),[R]);return r?be("div",{className:"cui-load-more","data-testid":i,children:be(P,{as:"p",fg:"fg-muted",type:"body",tabIndex:-1,ref:h,testId:`${i}-end`,children:s.endOfRecords})}):to("div",{className:"cui-load-more","data-testid":i,children:[be(F,{variant:"secondary",busy:t,busyLabel:s.loading,onClick:y,ref:f,testId:`${i}-button`,children:s.loadMore(le(a,d))}),n===null?null:be(de,{occurrence:n.occurrence,testId:`${i}-failure`,children:s.loadFailed(n.reason)})]})};import{jsx as Je,jsxs as Yt}from"react/jsx-runtime";var ro=({master:e,detail:t,masterMinPx:r,detailMinPx:n,testId:a})=>{m();let o=dt({masterMinPx:r,detailMinPx:n,gapPx:S.space["space-6"]});return Yt("div",{className:"cui-container","data-testid":a,children:[Je(z,{ruleKey:o.key,css:o.css}),Yt("div",{className:"cui-master-detail","data-cui-master-detail":o.key,children:[Je("div",{className:"cui-master-detail-pane","data-testid":`${a}-master`,children:e}),Je("div",{className:"cui-master-detail-pane","data-testid":`${a}-detail`,children:t})]})]})};import{jsx as he}from"react/jsx-runtime";var Re=e=>{let{formatLocale:t,labels:r}=k(),{testId:n}=e;if(e.keep===void 0){let{value:i,unit:d}=e;if(d!==void 0&&!D(d))throw new RangeError(`${n}: a unit must hold a readable character: ${JSON.stringify(d)}`);if(i===null)return he("span",{className:"cui-measured","data-measured":"false","data-testid":n,children:r.unmeasured});let s=le(i,t);return he("span",{className:"cui-measured","data-measured":"true","data-testid":n,children:tt(s,d)})}let{text:a,keep:o}=e;if(a===null)return he("span",{className:"cui-measured","data-measured":"false","data-cui-keep":o,"data-testid":n,children:r.unmeasured});if(!D(a))throw new RangeError(`${n}: a measured text must hold a readable character (pass null when the value was not measured): ${JSON.stringify(a)}`);return he("span",{className:"cui-measured","data-measured":"true","data-cui-keep":o,"data-testid":n,children:a})};import{jsx as Te,jsxs as oo}from"react/jsx-runtime";var no=({label:e,value:t,min:r,max:n,valueText:a,testId:o})=>{if(m(),!(Number.isFinite(r)&&Number.isFinite(n)&&r<n))throw new RangeError(`Meter needs a finite range with min below max: min ${r}, max ${n}`);if(!(Number.isFinite(t)&&t>=r&&t<=n))throw new RangeError(`Meter value must be a finite number in its range: value ${t}, min ${r}, max ${n}`);return oo("span",{className:"cui-meter","data-testid":o,children:[Te("span",{className:"cui-meter-track",role:"meter","aria-label":e,"aria-valuemin":r,"aria-valuemax":n,"aria-valuenow":t,"aria-valuetext":a,"data-cui-surface":"sunken","data-testid":`${o}-bar`,children:Te("span",{className:"cui-meter-fill","data-cui-accent":"info-accent",style:{inlineSize:`${(t-r)/(n-r)*100}%`},"data-testid":`${o}-fill`})}),Te("span",{"aria-hidden":"true",children:Te(P,{fg:"fg",type:"body",testId:`${o}-value`,children:a})})]})};import{useId as ao,useRef as io}from"react";import{jsx as Xe,jsxs as uo}from"react/jsx-runtime";var so={ArrowLeft:-1,ArrowRight:1},lo=({label:e,items:t,value:r,onValueChange:n,testId:a,panelDescribedBy:o,children:i})=>{m();let d=ao(),s=io(new Map);if(t.length===0)throw new RangeError("PanelTabs needs at least one tab");let l=t.map(f=>f.id);if(new Set(l).size!==l.length)throw new RangeError(`Tab keys must be unique: ${l.join(", ")}`);let p=l.indexOf(r);if(p<0)throw new RangeError(`The selected tab "${r}" is not one of the tabs: ${l.join(", ")}`);let u=f=>`${d}-tab-${f}`,c=`${d}-panel`,y=f=>{let h=t[f];h.id!==r&&n(h.id),s.current.get(h.id)?.focus()};return uo("div",{className:"cui-panel-tabs","data-testid":a,children:[Xe("div",{className:"cui-tabs-list",role:"tablist","aria-label":e,onKeyDown:f=>{let h=t.findIndex(b=>s.current.get(b.id)===f.target),T=h<0?p:h,x=so[f.key],g;if(x!==void 0){let b=getComputedStyle(f.currentTarget).direction==="rtl"?-x:x;g=(T+b+t.length)%t.length}else if(f.key==="Home")g=0;else if(f.key==="End")g=t.length-1;else return;f.preventDefault(),y(g)},children:t.map((f,h)=>{let T=h===p;return Xe("button",{className:"cui-tab cui-panel-tab",type:"button",role:"tab",id:u(h),"aria-selected":T,"aria-controls":c,tabIndex:T?0:-1,"data-cui-fg":T?"fg":"fg-secondary","data-cui-type":"body","data-testid":`${a}-${f.id}`,ref:x=>{x===null?s.current.delete(f.id):s.current.set(f.id,x)},onClick:()=>y(h),children:f.label},f.id)})}),Xe("div",{role:"tabpanel",id:c,"aria-labelledby":u(p),"aria-describedby":o,"data-testid":`${a}-panel`,children:i})]})};import{jsx as Zt,jsxs as po}from"react/jsx-runtime";var co=({failure:e,onReload:t,forbiddenMessage:r,failureMessage:n,rescueRef:a,testId:o})=>{let{labels:i}=k();return po("div",{className:"cui-resource-failed","data-testid":o,children:[Zt(de,{occurrence:e.occurrence,testId:`${o}-alert`,children:i.failureSentence(e,r,n===void 0?i.loadFailed:n)}),e.status===403?null:Zt(F,{variant:"secondary",busy:e.retrying,busyLabel:i.loading,onClick:t,ref:a,testId:`${o}-reload`,children:i.reload})]})};import{jsx as je,jsxs as fo}from"react/jsx-runtime";var yo=({label:e,options:t,value:r,onValueChange:n,testId:a})=>{m();let o=new Set(t.map(i=>i.value));if(t.length<2||o.size!==t.length)throw new RangeError(`A segmented control needs at least two options with unique values: ${t.map(i=>i.value).join(", ")}`);if(!o.has(r))throw new RangeError(`The pressed value "${r}" is not one of the options: ${[...o].join(", ")}`);return fo("fieldset",{className:"cui-segmented-group","data-testid":a,children:[je("legend",{className:"cui-segmented-legend","data-cui-type":"body",children:e}),je("div",{className:"cui-segmented",children:t.map(i=>{let d=i.value===r;return je("button",{className:"cui-segment",type:"button","aria-pressed":d,"data-cui-fg":d?"on-solid":"fg","data-cui-surface":d?"info-solid":void 0,"data-cui-type":"body","data-testid":`${a}-${i.value}`,onClick:()=>{d||n(i.value)},children:i.label},i.value)})})]})};import{useCallback as mo,useRef as go}from"react";import{jsx as Y}from"react/jsx-runtime";var Qt=({selected:e,controls:t,onSelect:r,testId:n,dataAttributes:a,ref:o,children:i})=>{m();let d=go(null);H(d,{testId:n,part:"row",host:"button"});let s=mo(l=>{if(d.current=l,typeof o=="function")return o(l);o!=null&&(o.current=l)},[o]);return Y("button",{className:"cui-row-button",type:"button","data-selected":e,"aria-expanded":e,"aria-controls":t,"data-cui-row-focus":"","data-cui-surface":e?"info-tint":"surface","data-cui-fg":"fg","data-cui-type":"body","data-testid":n,onClick:r,ref:s,...w(a),children:i})},bo=({label:e,items:t,itemKey:r,selectedKey:n,onSelect:a,detailId:o,renderRow:i,rowTestId:d,rowData:s,empty:l,testId:p,ref:u})=>(m(),Y("div",{className:"cui-selectable","data-testid":p,ref:u,children:t.length===0?Y(P,{as:"p",fg:"fg-muted",type:"prose",testId:`${p}-empty`,children:l}):Y("ul",{className:"cui-selectable-list",role:"list","aria-label":e,children:t.map(c=>{let y=r(c);return Y("li",{children:Y(Qt,{selected:y===n,controls:o,onSelect:()=>a(c),testId:d,dataAttributes:s?.(c),children:i(c)})},y)})})}));import{useId as ho}from"react";import{jsx as xe,jsxs as er}from"react/jsx-runtime";var Ro=({label:e,value:t,min:r,max:n,step:a,valueText:o,onValueChange:i,testId:d})=>{m();let s=ho();if(!([t,r,n,a].every(Number.isFinite)&&r<n&&a>0&&r<=t&&t<=n))throw new RangeError(`Slider needs finite min < max, a positive step and min <= value <= max: value ${t}, min ${r}, max ${n}, step ${a}`);let l=o(t);return er("div",{className:"cui-field","data-testid":`${d}-field`,children:[xe("label",{className:"cui-field-label",htmlFor:s,"data-cui-type":"body",children:e}),er("div",{className:"cui-slider",children:[xe("input",{className:"cui-slider-input",id:s,type:"range",min:r,max:n,step:a,value:t,"aria-valuetext":l,"data-testid":d,onChange:p=>i(p.currentTarget.valueAsNumber)}),xe("span",{className:"cui-slider-value","aria-hidden":"true",children:xe(P,{fg:"fg",type:"body",testId:`${d}-value`,children:l})})]})]})};import{jsx as tr}from"react/jsx-runtime";var To=({gap:e,testId:t,children:r})=>(m(),tr("div",{className:"cui-stack","data-cui-gap":e,"data-testid":t,children:r})),xo=({gap:e,as:t="div",testId:r,children:n})=>(m(),tr(t,{className:"cui-cluster","data-cui-gap":e,"data-testid":r,children:n}));import{jsx as Ye,jsxs as nr}from"react/jsx-runtime";var rr={done:0,current:1,pending:2},vo={done:{fg:"on-solid",surface:"success-solid"},current:{fg:"on-solid",surface:"info-solid"},pending:{fg:"fg-secondary",surface:void 0}},Eo=({label:e,steps:t,testId:r})=>{let{labels:n}=k();if(t.length===0||new Set(t.map(o=>o.id)).size!==t.length)throw new RangeError(`A stepper needs at least one step with unique keys: ${t.map(o=>o.id).join(", ")}`);if(t.filter(o=>o.state==="current").length>1||t.some((o,i)=>i>0&&rr[o.state]<rr[t[i-1].state]))throw new RangeError(`Step states must run done, at most one current, then pending: ${t.map(o=>o.state).join(", ")}`);let a={done:n.stepDone,current:null,pending:n.stepPending};return Ye("ol",{className:"cui-stepper",role:"list","aria-label":e,"data-cui-type":"body","data-testid":r,children:t.map((o,i)=>{let d=vo[o.state],s=a[o.state];return nr("li",{className:"cui-step","aria-current":o.state==="current"?"step":void 0,"data-cui-step":o.state,"data-testid":`${r}-${o.id}`,children:[Ye("span",{className:"cui-step-marker","aria-hidden":"true","data-cui-fg":d.fg,"data-cui-surface":d.surface,"data-cui-type":"caption",children:o.state==="done"?"\u2713":i+1}),nr("span",{className:"cui-step-label","data-cui-fg":"fg",children:[o.label,s===null?null:Ye("span",{className:"cui-visually-hidden",children:` (${s})`})]})]},o.id)})})};import{useId as wo,useRef as Po}from"react";import{jsx as ve,jsxs as or}from"react/jsx-runtime";var Co=({label:e,labelHidden:t,checked:r,onCheckedChange:n,unavailable:a,testId:o,ref:i,dataAttributes:d})=>{m();let s=wo(),l=Po(null);H(l,{testId:o,part:"label",host:"button"});let p=W(a,s),u=a!==void 0,c=or("button",{className:"cui-switch",type:"button",role:"switch","aria-checked":r,"aria-disabled":u?!0:void 0,"aria-describedby":K(p),"data-cui-fg":"fg","data-cui-type":"body","data-testid":o,ref:i,onClick:()=>{u||n(!r)},...w(d),children:[ve("span",{className:"cui-switch-track","aria-hidden":"true","data-cui-surface":r?"info-solid":"sunken","data-testid":`${o}-track`,children:ve("span",{className:"cui-switch-thumb","data-cui-surface":r?"surface":"neutral-solid","data-testid":`${o}-thumb`})}),ve("span",{className:t===!0?"cui-visually-hidden":void 0,ref:l,children:e})]});return a?.reason===void 0?c:or("span",{className:"cui-button-group",children:[c,ve(P,{fg:"fg-muted",type:"body",id:s,testId:`${o}-reason`,children:a.reason})]})};import{jsx as Ee}from"react/jsx-runtime";var No=({label:e,items:t,currentId:r,onNavigate:n,testId:a})=>{if(m(),t.length===0)throw new RangeError("Tabs needs at least one tab");let o=new Set(t.map(i=>i.id));if(o.size!==t.length)throw new RangeError(`Tab keys must be unique: ${t.map(i=>i.id).join(", ")}`);if(!o.has(r))throw new RangeError(`The current tab "${r}" is not one of the tabs: ${[...o].join(", ")}`);return Ee("nav",{className:"cui-tabs","aria-label":e,"data-testid":a,children:Ee("ul",{className:"cui-tabs-list",role:"list",children:t.map(i=>{let d=i.id===r;return Ee("li",{className:"cui-tabs-item",children:Ee("a",{className:"cui-tab",href:i.href,"aria-current":d?"page":void 0,"data-cui-fg":d?"fg":"fg-secondary","data-cui-type":"body","data-testid":`${a}-${i.id}`,onClick:s=>ce(s,i.href,n),children:i.label})},i.id)})})})};import{Children as ko,Fragment as Lo,isValidElement as So}from"react";import{jsx as q,jsxs as ir}from"react/jsx-runtime";var Io={neutral:"fg",danger:"danger-fg",warning:"warning-fg",success:"success-fg"},Mo=e=>{m();let{label:t,sublabel:r,tone:n,testId:a,dataAttributes:o}=e;if((e.text===void 0?e.value===null:e.text===null)&&n!=="neutral")throw new RangeError(`An unmeasured tile value carries no tone: ${n}`);let d=`${a}-value`;return ir("div",{className:"cui-tile","data-cui-surface":"subtle","data-cui-fg":"fg","data-cui-tone":n,"data-testid":a,...w(o),children:[q("p",{className:"cui-tile-label","data-cui-type":"caption","data-cui-measure":"reading",children:t}),q("p",{className:"cui-tile-sublabel","data-cui-fg":"fg-muted","data-cui-type":"caption","data-cui-measure":"reading",children:r}),q("p",{className:"cui-tile-value","data-cui-fg":Io[n],"data-cui-type":"heading","data-cui-measure":"reading",children:e.text===void 0?q(Re,{value:e.value,unit:e.unit,testId:d}):q(Re,{text:e.text,keep:"wrap",testId:d})})]})},ar=e=>ko.toArray(e).flatMap(t=>{if(!So(t))throw new RangeError(`TileGrid children must be tile elements, not text: ${String(t)}`);return t.type===Lo?ar(t.props.children):[t]}),$o=({count:e,minInlinePx:t,testId:r,children:n})=>{m();let a=ut(e,t,S.space["space-2"]),o=ar(n).length;if(o!==e)throw new RangeError(`TileGrid has ${o} tiles but count is ${e}`);return ir("div",{className:"cui-container","data-testid":r,children:[q(z,{ruleKey:a.key,css:a.css}),q("div",{className:"cui-tile-grid","data-cui-tile-grid":a.key,"data-cui-gap":"space-2",children:n})]})};import{useLayoutEffect as Fo,useRef as sr}from"react";import{jsx as Do}from"react/jsx-runtime";var we=e=>[...e.querySelectorAll("button")],Ao=({label:e,testId:t,children:r})=>{m();let n=sr(null),a=sr(null);Fo(()=>{let s=we(n.current),l=a.current!==null&&s.includes(a.current)?a.current:s[0]??null;a.current=l;for(let p of s)p.tabIndex=p===l?0:-1});let o=s=>{for(let l of we(n.current))l.tabIndex=l===s?0:-1;a.current=s};return Do("div",{className:"cui-toolbar",role:"toolbar","aria-label":e,"aria-orientation":"horizontal","data-testid":t,ref:n,onFocus:s=>{let l=we(s.currentTarget).find(p=>p.contains(s.target));l!==void 0&&o(l)},onKeyDown:s=>{let l=we(s.currentTarget),p=l.indexOf(s.target);if(p===-1)return;let u=getComputedStyle(s.currentTarget).direction==="rtl"?"ArrowLeft":"ArrowRight",c=u==="ArrowRight"?"ArrowLeft":"ArrowRight",R={[u]:(p+1)%l.length,[c]:(p-1+l.length)%l.length,Home:0,End:l.length-1}[s.key];if(R===void 0)return;s.preventDefault();let f=l[R];o(f),f.focus()},children:r})};import{useCallback as Z,useEffect as Uo,useLayoutEffect as lr,useRef as et}from"react";import{useCallback as Pe,useEffect as Ho,useLayoutEffect as Oo,useRef as Ze,useState as Qe}from"react";var dr=e=>e===null?Ne:ke,Ce=(e,t,r,n,a)=>{let[o,i]=Qe(()=>({key:e,state:dr(e)})),[d,s]=Qe(0),[l,p]=Qe(0),u=Ze(t),c=Ze(null),y=Ze(d);Oo(()=>{u.current=t}),Ho(()=>{if(e===null){i({key:null,state:Ne});return}let g=new AbortController;c.current=e;let b=d===y.current?"revision":"reload";return y.current=d,i(v=>Object.is(v.key,e)?{key:e,state:n(v.state,b)}:{key:e,state:ke}),u.current(g.signal).then(v=>{g.signal.aborted||(c.current=null,i(I=>({key:e,state:a(I.state,v)})))},v=>{g.signal.aborted||i(()=>{throw v})}),()=>{g.abort(),c.current=null}},[e,r,d,l]);let R=Pe(()=>s(g=>g+1),[]),f=Pe(()=>p(g=>g+1),[]),h=Pe((g,b)=>{i(v=>Object.is(v.key,g)?{key:g,state:b(v.state)}:v)},[]),T=Pe((g,b)=>{h(g,b),Object.is(c.current,g)&&f()},[h,f]);return{state:Object.is(o.key,e)?o.state:dr(e),reload:R,refresh:f,update:h,write:T}};var Ko=(e,t,r)=>{let n=et(t);lr(()=>{n.current=t});let a=Z(T=>n.current.first(T),[]),{state:o,reload:i,refresh:d,update:s,write:l}=Ce(e,a,r,ct,pt),p=et({key:e,state:o});lr(()=>{p.current={key:e,state:o}});let u=et(null),c=Z(()=>{u.current?.controller.abort(),u.current=null},[]);Uo(()=>c,[e,r,c]);let y=Z(()=>{c(),i()},[c,i]),R=Z(()=>{c(),d()},[c,d]),f=Z(()=>{let{key:T,state:x}=p.current;if(T===null||x.kind!=="ready"||x.refreshing||x.value.next===null||x.value.loadingMore)throw new Error("usePagedResource: loadMore needs a shown list with a next cursor, no page in flight and no re-read in flight");let g=x.value.next,b={key:T,controller:new AbortController,maps:[]};u.current=b,s(T,yt),n.current.next(g,b.controller.signal).then(v=>{u.current===b&&(u.current=null,s(T,I=>b.maps.reduce((Q,ur)=>Ie(Q,ur),ft(I,g,v))))},v=>{u.current===b&&s(T,()=>{throw v})})},[s]),h=Z((T,x)=>{let g=u.current;g!==null&&Object.is(g.key,T)&&g.maps.push(x),l(T,b=>Ie(b,x))},[l]);return{state:o,reload:y,refresh:R,loadMore:f,updateList:h}};import{useCallback as Bo,useRef as _o,useState as qo}from"react";var Go=e=>typeof e=="object"&&e!==null&&typeof e.then=="function",Vo=()=>{let[e,t]=qo(null),r=_o(null),n=Bo((a,o)=>{let i=o();if(!Go(i))return;let d=Symbol(a);r.current=d,t(a);let s=()=>{r.current===d&&(r.current=null,t(null))};i.then(s,s)},[]);return{pendingKey:e,press:n}};import{useCallback as Wo}from"react";var zo=(e,t,r)=>{let{state:n,reload:a,refresh:o,write:i}=Ce(e,t,r,rt,Le),d=Wo((s,l)=>i(s,p=>Le(p,{ok:!0,value:l})),[i]);return{state:n,reload:a,refresh:o,put:d}};import{jsx as Xo}from"react/jsx-runtime";var Jo=({testId:e,children:t})=>(m(),Xo("span",{className:"cui-visually-hidden","data-testid":e,children:t}));export{ue as ANNOUNCE_SETTLE_MS,de as AlertMessage,Er as Breadcrumb,F as Button,ot as COMPACT_ROW_PX,aa as CONSOLE_UI_LABEL_CATALOGS,wa as CONTRAST_MINIMUM,mt as CONTRAST_PAIRS,He as Card,Br as CardSection,Tn as CheckboxGroup,xo as Cluster,qr as CodeBlock,Wr as ComparisonGrid,Tr as ConsoleUiRoot,sn as DataTable,dn as DescriptionList,un as Dialog,yn as Disclosure,V as FIGURE_RING_REACH_PX,fa as FLEXIBLE_COLUMN_MIN_PX,fn as Field,Ln as Figure,Mn as FigureEdge,In as FigureNode,Fr as FragmentLink,cr as HTTP_FORBIDDEN,Fn as Heading,Hn as InlineChange,Gn as JobCard,Se as LATTICE_PX,Mr as Link,Jn as List,Xn as ListItem,eo as LoadMore,ro as MasterDetail,Re as Measured,no as Meter,Mo as MetricTile,jn as Notice,lo as PanelTabs,gn as PasswordInput,Ve as Pill,We as ProgressBar,sa as ROW_WITH_CONTROL_PX,Rn as RadioGroup,co as ResourceFailed,Qt as RowButton,yo as SegmentedControl,hn as Select,bo as SelectableList,Ro as Slider,To as Stack,Eo as Stepper,Co as Switch,G as TARGET_PX,S as TOKENS,La as TONES,Na as TONE_HUES,ka as TONE_ROLES,No as Tabs,P as Text,bn as TextArea,mn as TextInput,$o as TileGrid,Ao as Toolbar,Jo as VisuallyHidden,Zo as ZonedTimeError,yt as beginPage,ct as beginPagedReload,rt as beginReload,ca as ceil8,ia as ceilToLattice,pa as cellContentInlinePx,ma as comparisonAttributePx,Ea as contrastRatio,ba as countSampleText,da as cssVar,at as figureBoxPlan,st as figureDiscLabelPlan,ya as fixedColumnPx,na as flatMapOutcome,le as formatCount,ta as formatInstant,va as hexToSrgb,ga as instantSampleText,D as isReadableText,Le as keepLastGood,Pa as lightDark,ra as mapOutcome,Ie as mapPagedList,Ta as masterDetailPlan,ua as monoTextWidthEm,Ca as placeholderRule,jo as readDecimalText,Yo as readIntegerText,oa as reasonAside,nt as resolveConsoleUiLabels,pt as settleFirstPage,ft as settlePage,Ra as spacedTextWidthEm,xa as tableFrameMinInlinePx,lt as tableMinInlinePx,la as textWidthEm,ut as tileGridPlan,ha as tileMinInlinePx,Qo as toOffsetIso,ea as toWallTime,xr as useAnnounce,k as useConsoleUi,Ur as useEscapeToClose,oe as useFocusRescue,Ko as usePagedResource,Vo as usePendingPress,zo as useResource};
|
|
1
|
+
import{$ as ft,A as la,B as ua,C as ca,D as pa,E as ya,F as fa,G as ma,H as ga,I as ba,J as ha,K as Ra,L as Ta,M as at,N as it,O as st,P as V,Q as U,R as xa,S as M,T as va,U as dt,V as lt,W as Ea,X as ut,Y as ct,Z as pt,_ as yt,a as le,aa as Ie,b as tt,ba as Na,c as jo,ca as ka,d as Yo,da as La,e as D,ea as Sa,f as Zo,fa as Ia,g as Qo,h as ea,i as ta,j as ra,k as cr,l as na,m as oa,n as Ne,o as ke,p as rt,q as Le,r as aa,s as ia,t as nt,u as Se,v as sa,w as G,x as da,y as ot,z as S}from"./chunk-5TCPOLTI.js";import{a as wa,b as Pa,c as Ca,d as mt}from"./chunk-FXEGLGL7.js";import{createContext as pr,useCallback as yr,useContext as xt,useLayoutEffect as fr,useMemo as gt,useRef as bt}from"react";import{jsx as Tt,jsxs as vr}from"react/jsx-runtime";var Me=pr(null),vt=" ",ht='[inert], [aria-hidden="true" i]',Et="dialog:modal",$e="data-cui-dialog-announcer",mr=`:scope > [${$e}]`,gr=e=>{if(e.closest(ht)!==null)return{hidden:'an ancestor is inert or aria-hidden="true"'};let t=e.ownerDocument,r=[...t.querySelectorAll(Et)],n=t.activeElement,a=r.filter(s=>s.contains(n)),o=a.length>0?a:r;if(o.every(s=>s.contains(e)))return{region:e};let i=o.find(s=>o.every(l=>l.contains(s)));if(i===void 0)return{hidden:"focus is in no open modal dialog and they do not nest, so which one is topmost cannot be told"};let d=i.querySelector(mr);return d===null?{hidden:"the topmost open modal dialog neither contains the console nor is a Dialog"}:d.closest(ht)!==null?{hidden:'the topmost open modal dialog is a Dialog whose live region has an inert or aria-hidden="true" ancestor'}:{region:d}},br=e=>{try{e.querySelectorAll(Et)}catch(t){throw typeof t=="object"&&t!==null&&"name"in t&&t.name==="SyntaxError"?new Error("ConsoleUiRoot requires the :modal selector (Chrome 105, Firefox 103, Safari 15.6, jsdom 27 or later): announcements check whether a modal dialog hides the live region",{cause:t}):t}},ue=150,hr=1e3,Rt=new WeakMap,Rr=(e,t)=>{let r=Rt.get(e)??new Set,n={text:t};Rt.set(e,r.add(n)),setTimeout(()=>r.delete(n),ue);let a=e.ownerDocument.createElement("span");a.textContent=[...r].map(o=>o.text).join(vt),e.replaceChildren(a)},Tr=({locale:e,formatLocale:t,timeZone:r,testId:n,children:a})=>{if(xt(Me)!==null)throw new Error("ConsoleUiRoot must not be rendered inside another ConsoleUiRoot (a console has exactly one root)");let i=nt(e),[d]=Intl.getCanonicalLocales(t),s=gt(()=>new Intl.DateTimeFormat(d,{timeZone:r}).resolvedOptions().timeZone,[d,r]),l=bt(null),p=bt(null);fr(()=>{br(l.current.ownerDocument)},[]);let u=yr(y=>{if(y.trim()==="")throw new RangeError("announce: text must be a non-empty sentence");let R=()=>{let{texts:h,settle:T,deadline:x}=p.current;p.current=null,clearTimeout(T),clearTimeout(x);let g=l.current;if(g===null)return;let b=h.join(vt),v=gr(g);if("hidden"in v)throw new Error(`announce: the live region is hidden from assistive technology (${v.hidden}), so this announcement would be lost: ${b}`);Rr(v.region,b)},f=p.current;if(f===null){p.current={texts:[y],settle:setTimeout(R,ue),deadline:setTimeout(R,hr)};return}f.texts.push(y),clearTimeout(f.settle),f.settle=setTimeout(R,ue)},[]),c=gt(()=>({locale:e,formatLocale:d,timeZone:s,labels:i,announce:u}),[e,d,s,i,u]);return Tt(Me.Provider,{value:c,children:vr("div",{"data-cui-root":"","data-cui-surface":"surface","data-cui-fg":"fg","data-testid":n,children:[a,Tt("div",{className:"cui-visually-hidden",role:"status","aria-live":"polite","aria-atomic":"true","data-testid":`${n}-announcer`,ref:l})]})})},k=()=>{let e=xt(Me);if(e===null)throw new Error("useConsoleUi must be called inside ConsoleUiRoot");return e},m=()=>{k()},xr=()=>k().announce;var ce=(e,t,r)=>{e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),r(t))};import{jsx as ee,jsxs as wt}from"react/jsx-runtime";var Er=({items:e,current:t,onNavigate:r,testId:n})=>{let{labels:a}=k();if(new Set(e.map(o=>o.id)).size!==e.length)throw new RangeError(`Breadcrumb keys must be unique: ${e.map(o=>o.id).join(", ")}`);return ee("nav",{className:"cui-breadcrumb","aria-label":a.breadcrumb,"data-testid":n,children:wt("ol",{className:"cui-breadcrumb-list",role:"list","data-cui-type":"body",children:[e.map(o=>wt("li",{className:"cui-breadcrumb-item",children:[ee("a",{className:"cui-link",href:o.href,"data-cui-fg":"info-fg","data-cui-type":"body","data-testid":`${n}-${o.id}`,onClick:i=>ce(i,o.href,r),children:o.label}),ee("span",{className:"cui-breadcrumb-separator","aria-hidden":"true","data-cui-fg":"fg-muted",children:"\u203A"})]},o.id)),ee("li",{className:"cui-breadcrumb-item",children:ee("span",{"aria-current":"page","data-cui-fg":"fg","data-testid":`${n}-current`,children:t})})]})})};import{useId as Lr,useRef as Sr}from"react";var w=e=>{if(e===void 0)return{};for(let t of Object.keys(e))if(!t.startsWith("data-")||t.startsWith("data-cui-")||t==="data-testid")throw new RangeError(`Caller attributes must be data-* and must not override data-cui-* or data-testid: ${t}`);return e};import{useLayoutEffect as wr}from"react";var Pr=new Set(["abbr","b","bdi","bdo","br","cite","code","data","del","dfn","em","i","ins","kbd","mark","q","s","samp","small","span","strong","sub","sup","time","u","var","wbr"]),Cr=e=>{for(let t of e.querySelectorAll("*")){let r=t.localName;if(!Pr.has(r)||t.hasAttribute("tabindex")||t.hasAttribute("contenteditable"))return r}return null},H=(e,{testId:t,part:r,host:n})=>{wr(()=>{let a=Cr(e.current);if(a!==null)throw new RangeError(`${t}: the ${r} is the content of a ${n} and holds only non-interactive phrasing content, not <${a}>`)})};import{jsx as Nr}from"react/jsx-runtime";var P=({fg:e,type:t,face:r,as:n="span",space:a,testId:o,id:i,tabIndex:d,ref:s,children:l})=>(m(),Nr(n,{className:"cui-text","data-cui-fg":e,"data-cui-type":t,"data-cui-face":r,"data-cui-space":a,"data-cui-measure":n==="p"?"reading":void 0,"data-testid":o,id:i,tabIndex:d,ref:s,children:l}));var kr=/\s/,Fe=(e,t)=>{if(e===""||kr.test(e))throw new RangeError(`The id of ${t} must be one token without whitespace: "${e}"`);return e},W=(e,t)=>{if(e!==void 0){if(e.reason!==void 0){if(e.reason.trim()==="")throw new RangeError("An unavailable control needs a reason that is not blank");return t}return Fe(e.reasonId,"an unavailable control's reason")}},K=(...e)=>{let t=e.filter(r=>r!==void 0);return t.length===0?void 0:t.join(" ")};import{jsx as O,jsxs as Ar}from"react/jsx-runtime";var Ir={primary:{fg:"on-solid",surface:"info-solid",type:"body"},secondary:{fg:"fg",surface:void 0,type:"body"},danger:{fg:"on-solid",surface:"danger-solid",type:"body"},link:{fg:"info-fg",surface:void 0,type:"body"}},Ae=({subject:e,children:t})=>{let r=Sr(null);return H(r,e),O("span",{ref:r,children:t})},F=({variant:e,children:t,testId:r,type:n="button",onClick:a,unavailable:o,describedBy:i,expanded:d,controls:s,ref:l,dataAttributes:p,busy:u,busyLabel:c})=>{m();let y=Lr(),R=W(o,y),f=u===!0||o!==void 0,h=Ir[e],T=x=>{if(f){x.preventDefault();return}a?.(x)};return Ar("span",{className:"cui-button-group",children:[O("button",{className:"cui-button",type:n==="submit"?"submit":"button","data-cui-variant":e,"data-cui-fg":h.fg,"data-cui-surface":h.surface,"data-cui-type":h.type,"data-testid":r,"aria-disabled":f?!0:void 0,"aria-busy":u===!0?!0:void 0,"aria-describedby":K(i,R),"aria-expanded":d,"aria-controls":s,onClick:T,ref:l,...w(p),children:O(Ae,{subject:{testId:r,part:"label",host:"button"},children:u===!0?c:t})}),o?.reason===void 0?null:O(P,{fg:"fg-muted",type:"body",id:y,testId:`${r}-reason`,children:o.reason})]})},Mr=({onNavigate:e,children:t,testId:r,ref:n})=>(m(),O("button",{className:"cui-link",type:"button","data-cui-fg":"info-fg","data-cui-type":"body","data-testid":r,onClick:e,ref:n,children:O(Ae,{subject:{testId:r,part:"label",host:"button"},children:t})})),$r=/^[^\s#]+$/,Fr=({targetId:e,children:t,testId:r,onFollow:n,dataAttributes:a})=>{if(m(),!$r.test(e))throw new RangeError(`A fragment link needs the target's id without "#" or white space: "${e}"`);return O("a",{className:"cui-link",href:`#${e}`,"data-cui-fg":"info-fg","data-cui-type":"body","data-testid":r,onClick:n,...w(a),children:O(Ae,{subject:{testId:r,part:"label",host:"link"},children:t})})};import{useId as Pt}from"react";import{useCallback as Dr}from"react";var Hr=229,Or=new Set(["text","search","email","url","tel","password","number","date","datetime-local","month","time","week"]),De=e=>e instanceof HTMLTextAreaElement?e.value!=="":e instanceof HTMLInputElement&&Or.has(e.type)&&(e.value!==""||e.validity.badInput),te=(e,t)=>{e.key!=="Escape"||e.nativeEvent.isComposing||e.keyCode===Hr||De(e.target)||(e.stopPropagation(),t())},Ur=e=>Dr(t=>te(t,e),[e]);import{Fragment as _r,jsx as B,jsxs as re}from"react/jsx-runtime";var Ct=e=>e===void 0?void 0:t=>te(t,e),He=({id:e,title:t,description:r,actions:n,onEscape:a,testId:o,headingRef:i,ref:d,dataAttributes:s,children:l})=>{m();let p=Pt(),u=Ct(a);return re("section",{className:"cui-card",id:e,"aria-labelledby":p,"data-cui-surface":"surface","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"sans","data-testid":o,ref:d,onKeyDown:u,...w(s),children:[re("div",{className:"cui-card-header",children:[re("div",{className:"cui-card-heading",children:[B("h2",{className:"cui-card-title",id:p,"data-cui-type":"title","data-testid":`${o}-heading`,ref:i,tabIndex:i===void 0?void 0:-1,children:t}),r===void 0?null:B("div",{className:"cui-card-description","data-cui-fg":"fg-muted","data-cui-type":"body","data-cui-measure":"reading",children:r})]}),n===void 0?null:B("div",{className:"cui-card-actions",children:n})]}),l]})},Kr={3:"h3",4:"h4"},Br=({id:e,title:t,subtitle:r,level:n=3,region:a=!1,onEscape:o,testId:i,headingRef:d,ref:s,dataAttributes:l,children:p})=>{m();let u=Pt(),c=Ct(o),y=Kr[n],R=re(_r,{children:[re("div",{className:"cui-card-section-heading",children:[B(y,{className:"cui-card-section-title",id:u,"data-cui-type":"body","data-testid":`${i}-heading`,ref:d,tabIndex:d===void 0?void 0:-1,children:t}),r===void 0?null:B("div",{className:"cui-card-section-subtitle","data-cui-fg":"fg-muted","data-cui-type":"body","data-cui-measure":"reading",children:r})]}),p]});return a?B("section",{className:"cui-card-section",id:e,"aria-labelledby":u,"data-testid":i,ref:s,onKeyDown:c,...w(l),children:R}):B("div",{className:"cui-card-section",id:e,"data-testid":i,ref:s,...w(l),children:R})};import{jsx as Nt}from"react/jsx-runtime";var qr=({label:e,code:t,testId:r})=>(m(),Nt("section",{className:"cui-code-frame",tabIndex:0,"aria-label":e,"data-cui-surface":"sunken","data-testid":r,children:Nt("pre",{className:"cui-code","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"mono","data-testid":`${r}-code`,children:t})}));import{useId as Vr}from"react";import{jsx as Gr}from"react/jsx-runtime";var z=({ruleKey:e,css:t})=>Gr("style",{href:e,precedence:"cui",children:t});import{jsx as N,jsxs as _}from"react/jsx-runtime";var Wr=({caption:e,attributes:t,columns:r,attributePx:n,columnMinPx:a,testId:o})=>{m();let i=Vr();for(let u of[n,a])if(!(Number.isFinite(u)&&u>0))throw new RangeError(`ComparisonGrid widths must be positive px values: ${u}`);if(r.length===0)throw new RangeError("ComparisonGrid needs at least one column");for(let u of r)for(let c of t)if(!Object.hasOwn(u.cells,c.key))throw new RangeError(`Column "${u.key}" has no value for attribute "${c.key}"`);let d=n+r.length*a,s=`cui-comparison-a${n}-c${a}-n${r.length}`,l=u=>`[data-cui-comparison="${s}"][data-cui-comparison-layout="${u}"]`,p=`${l("table")}{display:none}@container (min-width:${M(d)}){${l("table")}{display:block}${l("stack")}{display:none}}`;return _("div",{className:"cui-container","data-cui-stack-below-px":d,"data-testid":o,children:[N(z,{ruleKey:s,css:p}),N("div",{className:"cui-comparison-frame","data-cui-comparison":s,"data-cui-comparison-layout":"table",children:_("table",{className:"cui-comparison-table","data-cui-type":"body",children:[N("caption",{className:"cui-visually-hidden",children:e}),_("colgroup",{children:[N("col",{style:{width:M(n)}}),r.map(u=>N("col",{},u.key))]}),N("thead",{children:_("tr",{children:[N("td",{}),r.map(u=>N("th",{scope:"col",children:u.heading},u.key))]})}),N("tbody",{children:t.map(u=>_("tr",{children:[N("th",{scope:"row",children:u.label}),r.map(c=>N("td",{children:c.cells[u.key]("table")},c.key))]},u.key))})]})}),N("div",{className:"cui-comparison-stack","data-cui-comparison":s,"data-cui-comparison-layout":"stack",children:r.map((u,c)=>{let y=`${i}-column-${c}`;return _("div",{className:"cui-comparison-column",role:"group","aria-labelledby":y,"data-cui-type":"body",children:[N("div",{className:"cui-comparison-heading",id:y,children:u.heading}),N("dl",{className:"cui-comparison-list",children:t.map(R=>_("div",{children:[N("dt",{children:R.label}),N("dd",{children:u.cells[R.key]("stack")})]},R.key))})]},u.key)})})]})};import{Fragment as Yr,useCallback as Zr,useId as Qr,useLayoutEffect as St,useRef as Be}from"react";var ne="[data-cui-row-focus]",Oe="[data-cui-row-detail]",zr=e=>e===null?[]:[...e.querySelectorAll(`:scope > ${ne}`)],kt=(e,t)=>{let r=new Map;t!==null&&r.set(t,0);let n=-1;for(let a of e===null?[]:e.children)a.matches(ne)?(n+=1,r.set(a,n)):n>=0&&a.matches(Oe)&&r.set(a,n);return r},Lt=(e,t,r,n)=>{let a=zr(t);if(a.length===0)return r;let o=n.get(e);if(o===void 0)throw new RangeError(`rowFocusTarget: <${e.localName}> left holding focus with no position in the table (only its rows, row details and empty text hold one)`);return a[Math.min(o,a.length-1)]};import{useCallback as Jr,useLayoutEffect as Ue,useReducer as Xr,useRef as Ke}from"react";var jr=e=>e+1,oe=e=>{let t=Ke(e),r=Ke(null),n=Ke(!1),[,a]=Xr(jr,0),o=Jr((i=>()=>{n.current&&i.contains(document.activeElement)&&(r.current=i,a())}),[]);return Ue(()=>(n.current=!0,()=>{n.current=!1,r.current=null}),[]),Ue(()=>{t.current=e}),Ue(()=>{let i=r.current;if(i===null)return;r.current=null;let d=[null,document.body].includes(document.activeElement);i.isConnected||!d||t.current(i)?.focus()}),o};import{jsx as L,jsxs as pe}from"react/jsx-runtime";var en=new Map,tn='a[href], audio[controls], button, details, embed, iframe, img[usemap], input:not([type="hidden"]), label, select, textarea, video[controls], [tabindex], [contenteditable]',rn=(e,t,r)=>{St(()=>{let n=e.current;if(t!=="row-compact"||n===null)return;let a=[...n.querySelectorAll(tn)].find(o=>o.parentElement!==n);if(a!==void 0)throw new RangeError(`${r}: a compact row holds no control or focus target (a ${G} px target does not fit its ${ot} px; use row-control), not <${a.localName}>`)})},nn=(e,t)=>{let r=e.filter(a=>a.rowHeader===!0).map(a=>a.key);if(r.length>1)throw new RangeError(`${t}: a table has at most one row header column, not ${r.length} (${r.join(", ")})`);let n=e.find(a=>a.rowHeader!==!0&&a.rowHeaderNote!==void 0);if(n!==void 0)throw new RangeError(`${t}: a row header note belongs to the row header column, not to ${n.key}`)},on=e=>e==null?null:L("div",{className:"cui-table-header-note",children:e}),an=(e,t,r,n,a)=>{let o=e.open(t);return L("tr",{ref:a,hidden:!o,"data-cui-row-detail":o?"open":"closed","data-testid":`${n}-detail`,children:L("td",{colSpan:r,id:e.id(t),children:o?e.render(t):null})})},sn=({caption:e,captionHidden:t,columns:r,rows:n,rowKey:a,rowTestId:o,rowData:i,rowSize:d,rowDetail:s,empty:l,testId:p,ref:u})=>{m();let c=Qr(),y=Be(null);rn(y,d,p);let R=Be(null),f=Be(en),h=oe(g=>Lt(g,y.current,R.current,f.current));St(()=>{f.current=kt(y.current,R.current)});let T=Zr(g=>{R.current=g;let b=h(g);return()=>{R.current=null,b()}},[h]),x=lt(r);return nn(r,p),L("div",{className:"cui-container","data-testid":p,ref:u,children:n.length===0?L(P,{as:"p",fg:"fg-muted",type:"prose",tabIndex:-1,ref:T,testId:`${p}-empty`,children:l}):L("section",{ref:h,className:"cui-table-frame",tabIndex:0,"aria-labelledby":c,"data-testid":`${p}-frame`,children:pe("table",{className:"cui-table","data-cui-type":"body","data-cui-row-size":d,style:{"--cui-table-min":M(x)},children:[L("caption",{className:t?"cui-visually-hidden":"cui-table-caption",id:c,children:e}),L("colgroup",{children:r.map(g=>L("col",{style:g.width.fixedPx===void 0?void 0:{width:M(g.width.fixedPx)}},g.key))}),L("thead",{children:L("tr",{children:r.map(g=>pe("th",{scope:"col","data-cui-align":g.align,"data-cui-surface":"subtle","data-cui-type":"caption",children:[g.header,g.note===void 0?null:L("div",{className:"cui-table-header-note",children:g.note})]},g.key))})}),L("tbody",{ref:y,children:n.map(g=>pe(Yr,{children:[L("tr",{ref:h,tabIndex:-1,"data-cui-row-focus":"","data-testid":o,...w(i?.(g)),children:r.map(b=>b.rowHeader===!0?pe("th",{scope:"row","data-cui-align":b.align,children:[b.cell(g),b.rowHeaderNote===void 0?null:on(b.rowHeaderNote(g))]},b.key):L("td",{"data-cui-align":b.align,children:b.cell(g)},b.key))}),s===void 0?null:an(s,g,r.length,o,h)]},a(g)))})]})})})};import{jsx as _e,jsxs as ln}from"react/jsx-runtime";var dn=({items:e,testId:t})=>{if(m(),new Set(e.map(r=>r.key)).size!==e.length)throw new RangeError(`Description keys must be unique: ${e.map(r=>r.key).join(", ")}`);return _e("dl",{className:"cui-description-list","data-cui-type":"body","data-testid":t,children:e.map(r=>ln("div",{className:"cui-description-row","data-testid":`${t}-${r.key}`,children:[_e("dt",{"data-cui-fg":"fg-secondary",children:r.term}),_e("dd",{"data-cui-fg":"fg",children:r.description})]},r.key))})};import{useId as It,useLayoutEffect as Mt,useRef as $t}from"react";import{jsx as ae,jsxs as At}from"react/jsx-runtime";var Ft=e=>{e instanceof HTMLElement&&e.isConnected&&e.focus()},un=({title:e,description:t,open:r,onClose:n,testId:a,children:o})=>{let{labels:i}=k(),d=It(),s=It(),l=$t(null),p=$t(null);return Mt(()=>{let y=l.current;r&&!y.open?(p.current=y.ownerDocument.activeElement,y.showModal()):!r&&y.open&&y.close()},[r]),Mt(()=>{let y=l.current;return()=>{y.open&&(y.close(),Ft(p.current),p.current=null)}},[]),At("dialog",{className:"cui-dialog","aria-labelledby":d,"aria-describedby":t===void 0?void 0:s,"data-cui-surface":"surface","data-cui-fg":"fg","data-cui-type":"body","data-cui-face":"sans","data-testid":a,ref:l,onClose:y=>{y.currentTarget.open||(Ft(p.current),p.current=null,r&&n())},onCancel:y=>{De(y.currentTarget.ownerDocument.activeElement)&&y.preventDefault()},children:[At("div",{className:"cui-dialog-header",children:[ae("h2",{className:"cui-dialog-title",id:d,"data-cui-type":"title",children:e}),ae("div",{className:"cui-dialog-actions",children:ae(F,{variant:"secondary",testId:`${a}-close`,onClick:()=>l.current?.close(),children:i.close})})]}),t===void 0?null:ae("div",{id:s,"data-cui-measure":"reading","data-testid":`${a}-description`,children:t}),o,ae("div",{className:"cui-visually-hidden",role:"status","aria-live":"polite","aria-atomic":"true",[$e]:"","data-testid":`${a}-announcer`})]})};import{useId as cn,useRef as pn}from"react";import{jsx as qe,jsxs as Dt}from"react/jsx-runtime";var yn=({summary:e,open:t,onOpenChange:r,testId:n,children:a})=>{m();let o=cn(),i=pn(null);return H(i,{testId:n,part:"summary",host:"button"}),Dt("div",{className:"cui-disclosure","data-testid":n,children:[Dt("button",{className:"cui-disclosure-button",type:"button","aria-expanded":t,"aria-controls":o,"data-cui-fg":"fg","data-cui-type":"body","data-testid":`${n}-button`,onClick:()=>r(!t),children:[qe("span",{className:"cui-disclosure-marker","aria-hidden":"true",children:t?"\u25BE":"\u25B8"}),qe("span",{ref:i,children:e})]}),qe("div",{className:"cui-disclosure-panel",id:o,hidden:!t,"data-testid":`${n}-panel`,children:a})]})};import{useId as J}from"react";import{Fragment as xn,jsx as E,jsxs as $}from"react/jsx-runtime";var X=({description:e,error:t,errorId:r})=>{m();let n=J(),a=J(),o=J(),i=r===void 0?o:Fe(r,"a field's error"),d=[e===void 0?null:a,t===void 0?null:i].filter(l=>l!==null).join(" ");return{control:{id:n,"aria-describedby":d===""?void 0:d,"aria-invalid":t===void 0?void 0:!0},descriptionId:a,errorId:i}},j=({description:e,error:t,descriptionId:r,errorId:n,testId:a})=>$(xn,{children:[e===void 0?null:E(P,{as:"p",fg:"fg-muted",type:"body",id:r,testId:`${a}-description`,children:e}),t===void 0?null:E(P,{as:"p",fg:"danger-fg",type:"body",id:n,testId:`${a}-error`,children:t})]}),ye=({htmlFor:e,hidden:t,children:r})=>E("label",{className:t===!0?"cui-visually-hidden":"cui-field-label",htmlFor:e,"data-cui-type":"body",children:r}),fn=({label:e,description:t,error:r,errorId:n,testId:a,children:o})=>{let{control:i,descriptionId:d,errorId:s}=X({label:e,description:t,error:r,errorId:n});return $("div",{className:"cui-field","data-invalid":r!==void 0,"data-testid":a,children:[E(ye,{htmlFor:i.id,hidden:void 0,children:e}),o(i),E(j,{description:t,error:r,descriptionId:d,errorId:s,testId:a})]})},Ht=({label:e,description:t,error:r,errorId:n,value:a,onValueChange:o,type:i,list:d,autoComplete:s,inputMode:l,prefix:p,labelHidden:u,required:c,testId:y,ref:R})=>{let{control:f,descriptionId:h,errorId:T}=X({label:e,description:t,error:r,errorId:n}),x=J();if(p!==void 0&&p.trim()==="")throw new RangeError("An input's prefix must not be blank");let g=i==="password",b=E("input",{className:"cui-input",type:i,value:a,list:d,autoComplete:s,inputMode:l,spellCheck:g?!1:void 0,autoCapitalize:g?"none":void 0,required:c,onChange:v=>o(v.target.value),"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"body","data-testid":y,ref:R,...f,"aria-describedby":K(p===void 0?void 0:x,f["aria-describedby"])});return $("div",{className:"cui-field","data-invalid":r!==void 0,"data-testid":`${y}-field`,children:[E(ye,{htmlFor:f.id,hidden:u,children:e}),p===void 0?b:$("div",{className:"cui-input-group",children:[E("span",{className:"cui-input-prefix",id:x,"data-cui-fg":"fg-secondary","data-cui-surface":"sunken","data-cui-type":"body","data-testid":`${y}-prefix`,children:p}),b]}),E(j,{description:t,error:r,descriptionId:h,errorId:T,testId:y})]})},mn=e=>E(Ht,{...e}),gn=e=>E(Ht,{...e,type:"password"}),bn=({label:e,description:t,error:r,errorId:n,value:a,onValueChange:o,required:i,testId:d,ref:s})=>{let{control:l,descriptionId:p,errorId:u}=X({label:e,description:t,error:r,errorId:n});return $("div",{className:"cui-field","data-invalid":r!==void 0,"data-testid":`${d}-field`,children:[E(ye,{htmlFor:l.id,hidden:void 0,children:e}),E("textarea",{className:"cui-input cui-textarea",value:a,required:i,onChange:c=>o(c.target.value),"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"prose","data-testid":d,ref:s,...l}),E(j,{description:t,error:r,descriptionId:p,errorId:u,testId:d})]})},hn=({label:e,description:t,error:r,errorId:n,value:a,options:o,onValueChange:i,labelHidden:d,unavailable:s,testId:l,ref:p})=>{let{control:u,descriptionId:c,errorId:y}=X({label:e,description:t,error:r,errorId:n}),R=J(),f=W(s,R);return $("div",{className:"cui-field","data-invalid":r!==void 0,"data-testid":`${l}-field`,children:[E(ye,{htmlFor:u.id,hidden:d,children:e}),E("select",{className:"cui-input",value:a,onChange:h=>{s===void 0&&i(h.target.value)},"data-cui-fg":"fg","data-cui-surface":"surface","data-cui-type":"body","data-testid":l,ref:p,...u,"aria-disabled":s===void 0?void 0:!0,"aria-describedby":K(u["aria-describedby"],f),children:o.map(h=>E("option",{value:h.value,children:h.label},h.value))}),E(j,{description:t,error:r,descriptionId:c,errorId:y,testId:l}),s?.reason===void 0?null:E(P,{as:"p",fg:"fg-muted",type:"body",id:R,testId:`${l}-reason`,children:s.reason})]})},Rn=({legend:e,description:t,error:r,errorId:n,value:a,options:o,onValueChange:i,testId:d,ref:s})=>{let l=J(),{control:p,descriptionId:u,errorId:c}=X({label:e,description:t,error:r,errorId:n});return $("fieldset",{className:"cui-radio-group","aria-describedby":p["aria-describedby"],"data-invalid":r!==void 0,"data-testid":d,children:[E("legend",{className:"cui-radio-group-legend","data-cui-type":"body",children:e}),o.map((y,R)=>$("label",{className:"cui-radio","data-cui-type":"body",children:[E("input",{type:"radio",name:l,value:y.value,checked:y.value===a,onChange:()=>i(y.value),"aria-invalid":p["aria-invalid"],"data-testid":`${d}-option-${y.value}`,ref:R===0?s:void 0}),E("span",{children:y.label})]},y.value)),E(j,{description:t,error:r,descriptionId:u,errorId:c,testId:d})]})},Tn=({legend:e,description:t,error:r,errorId:n,values:a,options:o,onValuesChange:i,testId:d,ref:s})=>{let{control:l,descriptionId:p,errorId:u}=X({label:e,description:t,error:r,errorId:n}),c=o.map(f=>f.value);if(c.length===0||new Set(c).size!==c.length)throw new RangeError(`A check box group needs at least one option with unique values: ${c.join(", ")}`);let y=a.filter(f=>!c.includes(f));if(y.length>0)throw new RangeError(`The chosen values are not options: ${y.join(", ")}`);let R=new Set(a);return $("fieldset",{className:"cui-checkbox-group","aria-describedby":l["aria-describedby"],"data-invalid":r!==void 0,"data-testid":d,children:[E("legend",{className:"cui-checkbox-group-legend","data-cui-type":"body",children:e}),o.map((f,h)=>$("label",{className:"cui-checkbox","data-cui-type":"body",children:[E("input",{type:"checkbox",value:f.value,checked:R.has(f.value),onChange:()=>i(c.filter(T=>T===f.value?!R.has(T):R.has(T))),"aria-invalid":l["aria-invalid"],"data-testid":`${d}-option-${f.value}`,ref:h===0?s:void 0}),E("span",{children:f.label})]},f.value)),E(j,{description:t,error:r,descriptionId:p,errorId:u,testId:d})]})};import{createContext as vn,useContext as En,useId as _t,useMemo as wn}from"react";import{Fragment as Wt,jsx as C,jsxs as fe}from"react/jsx-runtime";var qt=vn(null),Ot="surface",Ut={neutral:{face:"surface",line:"border-control"},info:{face:"info-tint",line:"info-accent"},success:{face:"success-tint",line:"success-accent"},warning:{face:"warning-tint",line:"warning-accent"},danger:{face:"danger-tint",line:"danger-accent"}},Kt={face:"info-tint",line:"info-accent"},Gt={normal:"border-control",high:"info-accent"},Pn=["normal","high"],Cn=[1,2,3,4],A=S.space["space-2"],Nn="fg",kn="fg-secondary",Vt=e=>{let t=En(qt);if(t===null)throw new Error(`${e} must be rendered inside Figure`);return t},Ge=(e,t,r)=>{if(!(Number.isFinite(r)&&r>0&&r%4===0))throw new RangeError(`${e}: ${t} must be a positive multiple of the ${4} px lattice: ${r}`)},Ln=e=>{m();let t=_t(),{kind:r,widthPx:n,heightPx:a,testId:o,dataAttributes:i,children:d}=e;Ge(o,"widthPx",n),Ge(o,"heightPx",a);let s=wn(()=>({kind:r,widthPx:n,heightPx:a,arrowIds:{normal:`${t}-arrow-normal`,high:`${t}-arrow-high`}}),[r,n,a,t]),l=fe(Wt,{children:[C("defs",{children:Pn.map(y=>C("marker",{id:s.arrowIds[y],viewBox:`0 0 ${A} ${A}`,refX:A,refY:A/2,markerWidth:A,markerHeight:A,markerUnits:"userSpaceOnUse",orient:"auto","data-cui-emphasis":y,children:C("path",{d:`M 0 0 L ${A} ${A/2} L 0 ${A} z`,"data-cui-stroke":Gt[y],"data-testid":`${o}-arrow-${y}`})},y))}),C(qt.Provider,{value:s,children:d})]});if(e.kind==="group"){let{label:y,onEscape:R}=e;if(!D(y))throw new RangeError(`${o}: a group figure's label must hold a readable character: ${JSON.stringify(y)}`);return C("div",{className:"cui-figure-frame","data-testid":`${o}-frame`,children:C("svg",{className:"cui-figure",role:"group","aria-label":y,viewBox:`0 0 ${n} ${a}`,"data-cui-figure":"group","data-cui-surface":Ot,"data-cui-face":"sans",style:{"--cui-figure-inline":M(n),"--cui-figure-block":M(a)},onKeyDown:R===void 0?void 0:f=>te(f,R),"data-testid":o,...w(i),children:l})})}let{viewBox:p,pointer:u,svgRef:c}=e;return C("div",{className:"cui-container","data-testid":`${o}-frame`,children:C("svg",{ref:c,className:"cui-figure","aria-hidden":"true",viewBox:p===void 0?`0 0 ${n} ${a}`:p,"data-cui-figure":"decorative","data-cui-surface":Ot,"data-cui-face":"sans","data-cui-pan":u===void 0?void 0:"true","data-cui-cursor":u?.cursor,style:{"--cui-figure-inline":M(n),"--cui-figure-ratio":String(a/n)},"data-testid":o,...w(i),...u?.handlers,children:l})})},Bt=(e,t)=>{try{return t()}catch(r){throw new RangeError(`${e}: ${r.message}`,{cause:r})}},Sn=(e,t,r)=>{for(let n of t){let a=mt.light[n.fg],o=r.find(i=>a[i]===void 0);if(o!==void 0)throw new RangeError(`${e}: the note ${JSON.stringify(n.text)} in ${n.fg} is not in the contrast table on ${o}, a face the node takes`)}},In=e=>{m();let t=Vt("FigureNode"),r=_t(),{x:n,y:a,shape:o,tone:i,outline:d,selected:s,name:l,title:p,press:u,testId:c,dataAttributes:y}=e,R=e.notes===void 0?[]:e.notes;if(!(Number.isFinite(n)&&Number.isFinite(a)))throw new RangeError(`${c}: a node's position must be finite: ${n}, ${a}`);if(t.kind==="group"&&u===void 0)throw new RangeError(`${c}: every node of a group figure must be pressable (pass press)`);if(t.kind==="decorative"&&u!==void 0)throw new RangeError(`${c}: a node of a decorative figure cannot be pressed (it is hidden from assistive technology)`);if(u!==void 0&&!D(u.label))throw new RangeError(`${c}: a pressable node's label must hold a readable character: ${JSON.stringify(u.label)}`);let f=s?Kt:Ut[i];Sn(c,R,[Ut[i].face,Kt.face]);let h,T,x;if(o.kind==="box"){if(l===null)throw new RangeError(`${c}: a box's name is drawn inside the box and sizes it, so it cannot be null (only a disc may be drawn without a name)`);let b=Bt(c,()=>at({name:l,notes:R.map(I=>I.text)}));if(Ge(c,"a box's widthPx",o.widthPx),o.widthPx<b.minWidthPx)throw new RangeError(`${c}: a box ${o.widthPx} px wide is narrower than its lines under the widest 1.4.12 spacing (${b.minWidthPx} px)`);h={width:o.widthPx,height:b.heightPx,left:n,top:a};let v=it(R.length);T=fe("g",{"data-cui-surface":f.face,children:[C("rect",{className:"cui-figure-plate",width:o.widthPx,height:b.heightPx,rx:S.radius["radius-item"],"data-cui-fill":f.face,"data-cui-stroke":f.line,"data-testid":`${c}-plate`}),C("text",{className:"cui-figure-name",x:v.insetPx,y:v.namePx,fontSize:S.type.body.size,"data-cui-fg":Nn,"data-cui-figure-type":"body","data-testid":`${c}-name`,children:l}),R.map((I,Q)=>C("text",{x:v.insetPx,y:v.notesPx[Q],fontSize:S.type.caption.size,"data-cui-fg":I.fg,"data-cui-figure-type":"caption","data-testid":`${c}-note-${Q}`,children:I.text},Q))]}),x=C("rect",{className:"cui-figure-ring",x:-U,y:-U,width:o.widthPx+2*U,height:b.heightPx+2*U,rx:S.radius["radius-item"]+U,"data-cui-stroke":"focus","data-testid":`${c}-ring`})}else{let b=Bt(c,()=>st(l,o.radiusPx));h={width:2*o.radiusPx,height:2*o.radiusPx,left:n-o.radiusPx,top:a-o.radiusPx},T=fe(Wt,{children:[C("g",{"data-cui-surface":f.face,children:C("circle",{className:"cui-figure-plate",r:o.radiusPx,"data-cui-fill":f.face,"data-cui-stroke":f.line,"data-testid":`${c}-plate`})}),l===null?null:C("text",{className:"cui-figure-label",x:0,y:b.extentBelowPx-S.type.caption.lineHeight/2,fontSize:S.type.caption.size,"data-cui-fg":kn,"data-cui-figure-type":"caption","data-testid":`${c}-name`,children:l})]}),x=C("circle",{className:"cui-figure-ring",r:o.radiusPx+U,"data-cui-stroke":"focus","data-testid":`${c}-ring`})}if(u!==void 0){if(h.width<G||h.height<G)throw new RangeError(`${c}: a pressable node must be at least the ${G} px target: ${h.width} \xD7 ${h.height}`);if(h.left<V||h.top<V||h.left+h.width+V>t.widthPx||h.top+h.height+V>t.heightPx)throw new RangeError(`${c}: a pressable node must keep ${V} px to the figure's edge for its focus ring`)}let g=u===void 0?{}:{role:"button",tabIndex:0,"aria-label":u.label,"aria-describedby":u.description===void 0?void 0:r,"aria-expanded":u.expanded,"aria-controls":u.expanded?u.controls:void 0,onClick:b=>{b.currentTarget.focus(),u.onPress()},onKeyDown:b=>{b.key!=="Enter"&&b.key!==" "||(b.preventDefault(),b.repeat||u.onPress())}};return fe("g",{className:"cui-figure-node",transform:`translate(${n} ${a})`,"data-cui-tone":i,"data-cui-outline":d,"data-selected":String(s),...g,"data-testid":c,...w(y),children:[p===void 0?null:C("title",{children:p}),u?.description===void 0?null:C("desc",{id:r,"data-testid":`${c}-description`,children:u.description}),u===void 0?null:x,T]})},Mn=({d:e,emphasis:t,weight:r,arrow:n,title:a,testId:o,dataAttributes:i})=>{m();let d=Vt("FigureEdge");if(!Cn.includes(r))throw new RangeError(`${o}: an edge's weight must be 1, 2, 3 or 4: ${r}`);return C("path",{className:"cui-figure-edge",d:e,markerEnd:n?`url(#${d.arrowIds[t]})`:void 0,"data-cui-stroke":Gt[t],"data-cui-weight":r,"data-cui-emphasis":t,"data-testid":o,...w(i),children:a===void 0?null:C("title",{children:a})})};import{jsx as An}from"react/jsx-runtime";var $n={1:"h1",2:"h2",3:"h3"},Fn=({level:e,type:t,testId:r,headingRef:n,children:a})=>{m();let o=$n[e];return An(o,{className:"cui-heading","data-cui-type":t,"data-cui-fg":"fg","data-testid":r,ref:n,tabIndex:n===void 0?void 0:-1,children:a})};import{jsx as On}from"react/jsx-runtime";var Dn={removed:"danger-tint",added:"success-tint"},Hn=({kind:e,testId:t,children:r})=>{if(m(),r==="")throw new RangeError(`${t}: a changed fragment must hold at least one character`);return On(e==="removed"?"del":"ins",{className:"cui-change","data-cui-change":e,"data-cui-surface":Dn[e],"data-cui-fg":"fg","data-testid":t,children:r})};import{jsx as Bn}from"react/jsx-runtime";var Un={neutral:{fg:"fg-secondary",surface:"sunken"},info:{fg:"info-fg",surface:"info-tint"},success:{fg:"success-fg",surface:"success-tint"},warning:{fg:"warning-fg",surface:"warning-tint"},danger:{fg:"danger-fg",surface:"danger-tint"}},Kn={neutral:"neutral-solid",info:"info-solid",success:"success-solid",warning:"warning-solid",danger:"danger-solid"},Ve=({tone:e,variant:t,testId:r,dataAttributes:n,children:a})=>{m();let o=t==="tint"?Un[e]:{fg:"on-solid",surface:Kn[e]};return Bn("span",{className:"cui-pill","data-cui-tone":e,"data-cui-variant":t,"data-cui-fg":o.fg,"data-cui-surface":o.surface,"data-cui-type":"caption","data-testid":r,...w(n),children:a})};import{useId as _n}from"react";import{jsx as ie,jsxs as qn}from"react/jsx-runtime";var We=({label:e,valueText:t,value:r,max:n,testId:a})=>{m();let o=_n();if(n!==null){if(!(Number.isFinite(n)&&n>0))throw new RangeError(`Progress maximum must be positive: ${n}`);if(r===null||!(Number.isFinite(r)&&r>=0))throw new RangeError(`A determinate progress value must be a number >= 0: ${r}`)}let i=n===null?null:{max:n,now:Math.min(r,n)};return qn("div",{className:"cui-progress","data-testid":a,children:[ie(P,{as:"p",fg:"fg",type:"body",id:o,children:e}),ie("div",{className:"cui-progress-track",role:"progressbar","aria-labelledby":o,"aria-valuetext":t,"aria-valuemin":i===null?void 0:0,"aria-valuemax":i?.max,"aria-valuenow":i?.now,"data-cui-surface":"sunken","data-cui-indeterminate":i===null,"data-testid":`${a}-bar`,children:ie("div",{className:"cui-progress-fill","data-cui-accent":"info-accent",style:i===null?void 0:{inlineSize:`${i.now/i.max*100}%`},"data-testid":`${a}-fill`})}),ie("div",{"aria-hidden":"true",children:ie(P,{as:"p",fg:"fg-secondary",type:"body",testId:`${a}-value`,children:t})})]})};import{jsx as me,jsxs as zt}from"react/jsx-runtime";var Gn=({title:e,status:t,progress:r,cancel:n,testId:a,children:o})=>zt(He,{title:e,actions:n===void 0?void 0:me(F,{variant:"secondary",busy:n.busy,busyLabel:n.busyLabel,onClick:n.onCancel,testId:`${a}-cancel`,children:n.label}),testId:a,children:[zt("div",{className:"cui-job-status",role:"status","aria-live":"polite","aria-atomic":"true","data-testid":`${a}-status`,children:[me("span",{className:"cui-visually-hidden",children:`${e} `}),me(Ve,{tone:t.tone,variant:"tint",testId:`${a}-status-pill`,children:t.label})]}),r===void 0?null:me(We,{...r,testId:`${a}-progress`}),o]});import{createContext as Vn,useContext as Wn}from"react";import{jsx as se}from"react/jsx-runtime";var ze=Vn(null),zn="space-2",Jn=e=>{m();let{gap:t,label:r,id:n,hidden:a,testId:o,children:i}=e;if(r!==void 0&&!D(r))throw new RangeError(`${o}: a list's label must hold a readable character: ${JSON.stringify(r)}`);let d=e.marker==="none"?void 0:e.type,s=d!==void 0,l=e.marker==="number"||e.marker==="none"&&e.ordered?"ol":"ul";return se(ze.Provider,{value:e.marker,children:se(l,{className:"cui-list",role:"list","aria-label":r,id:n,hidden:a,"data-cui-gap":s?void 0:t,"data-cui-row-gap":s?t:void 0,"data-cui-column-gap":s?zn:void 0,"data-cui-marker":s?e.marker:void 0,"data-cui-type":d,"data-testid":o,children:i})})},Xn=({testId:e,dataAttributes:t,children:r})=>{m();let n=Wn(ze);if(n===null)throw new Error("ListItem must be rendered inside List, not inside another ListItem");return se("li",{className:"cui-list-item","data-testid":e,...w(t),children:se("div",{className:"cui-list-body","data-cui-measure":n==="none"?void 0:"reading",children:se(ze.Provider,{value:null,children:r})})})};import{useCallback as Xt,useLayoutEffect as Yn,useRef as ge}from"react";import{jsx as Jt}from"react/jsx-runtime";var jn=({tone:e,testId:t,children:r})=>(m(),Jt("div",{className:"cui-notice","data-cui-tone":e,"data-cui-surface":e==="info"?"info-tint":"warning-tint","data-cui-fg":"fg","data-cui-type":"prose","data-cui-measure":"reading","data-testid":t,children:r})),de=({occurrence:e,testId:t,children:r})=>(m(),Jt("div",{className:"cui-alert",role:"alert","data-cui-surface":"danger-tint","data-cui-fg":"danger-fg","data-cui-type":"prose","data-cui-measure":"reading","data-cui-occurrence":e,"data-testid":t,children:r},e));import{jsx as be,jsxs as to}from"react/jsx-runtime";var jt=e=>[...e.querySelectorAll(ne)].filter(t=>{let r=t.closest(Oe);return r===null||!e.contains(r)}),Zn=e=>{let t=e.ref.current;if(t===null)throw new Error("LoadMore: rows.ref is not attached to the element holding the rows");let r=jt(t);if(r.length!==e.count)throw new Error(`LoadMore: rows.ref holds ${r.length} ${ne} elements for ${e.count} rows`);return r},Qn=(e,t)=>{let r=-1;return e.forEach((n,a)=>{t.has(n)&&(r=a)}),e[r+1]},eo=({onLoad:e,busy:t,done:r,failure:n,limit:a,rows:o,testId:i})=>{let{formatLocale:d,labels:s}=k(),l=ge(null),p=ge(null),u=ge(null),c=ge(!1),y=()=>{let T=o.ref.current;l.current={shown:new Set(T===null?[]:jt(T)),failureOccurrence:n===null?null:n.occurrence,busySeen:!1},e()};Yn(()=>{let T=c.current;c.current=!1;let x=l.current;if(x===null)return;let g=Zn(o);if(t){x.busySeen=!0,x.shown=new Set(g);return}let b=Qn(g,x.shown),v=n!==null&&n.occurrence!==x.failureOccurrence;if(!(x.busySeen||b!==void 0||v||r)||(l.current=null,v||b===void 0))return;let I=[null,document.body].includes(document.activeElement);(u.current!==null&&document.activeElement===u.current||T&&I)&&b.focus()});let R=oe(()=>r?p.current:u.current),f=Xt((T=>{u.current=T;let x=R(T);return()=>{u.current=null,c.current=T===document.activeElement,x()}}),[R]),h=Xt((T=>{p.current=T;let x=R(T);return()=>{p.current=null,x()}}),[R]);return r?be("div",{className:"cui-load-more","data-testid":i,children:be(P,{as:"p",fg:"fg-muted",type:"body",tabIndex:-1,ref:h,testId:`${i}-end`,children:s.endOfRecords})}):to("div",{className:"cui-load-more","data-testid":i,children:[be(F,{variant:"secondary",busy:t,busyLabel:s.loading,onClick:y,ref:f,testId:`${i}-button`,children:s.loadMore(le(a,d))}),n===null?null:be(de,{occurrence:n.occurrence,testId:`${i}-failure`,children:s.loadFailed(n.reason)})]})};import{jsx as Je,jsxs as Yt}from"react/jsx-runtime";var ro=({master:e,detail:t,masterMinPx:r,detailMinPx:n,testId:a})=>{m();let o=dt({masterMinPx:r,detailMinPx:n,gapPx:S.space["space-6"]});return Yt("div",{className:"cui-container","data-testid":a,children:[Je(z,{ruleKey:o.key,css:o.css}),Yt("div",{className:"cui-master-detail","data-cui-master-detail":o.key,children:[Je("div",{className:"cui-master-detail-pane","data-testid":`${a}-master`,children:e}),Je("div",{className:"cui-master-detail-pane","data-testid":`${a}-detail`,children:t})]})]})};import{jsx as he}from"react/jsx-runtime";var Re=e=>{let{formatLocale:t,labels:r}=k(),{testId:n}=e;if(e.keep===void 0){let{value:i,unit:d}=e;if(d!==void 0&&!D(d))throw new RangeError(`${n}: a unit must hold a readable character: ${JSON.stringify(d)}`);if(i===null)return he("span",{className:"cui-measured","data-measured":"false","data-testid":n,children:r.unmeasured});let s=le(i,t);return he("span",{className:"cui-measured","data-measured":"true","data-testid":n,children:tt(s,d)})}let{text:a,keep:o}=e;if(a===null)return he("span",{className:"cui-measured","data-measured":"false","data-cui-keep":o,"data-testid":n,children:r.unmeasured});if(!D(a))throw new RangeError(`${n}: a measured text must hold a readable character (pass null when the value was not measured): ${JSON.stringify(a)}`);return he("span",{className:"cui-measured","data-measured":"true","data-cui-keep":o,"data-testid":n,children:a})};import{jsx as Te,jsxs as oo}from"react/jsx-runtime";var no=({label:e,value:t,min:r,max:n,valueText:a,testId:o})=>{if(m(),!(Number.isFinite(r)&&Number.isFinite(n)&&r<n))throw new RangeError(`Meter needs a finite range with min below max: min ${r}, max ${n}`);if(!(Number.isFinite(t)&&t>=r&&t<=n))throw new RangeError(`Meter value must be a finite number in its range: value ${t}, min ${r}, max ${n}`);return oo("span",{className:"cui-meter","data-testid":o,children:[Te("span",{className:"cui-meter-track",role:"meter","aria-label":e,"aria-valuemin":r,"aria-valuemax":n,"aria-valuenow":t,"aria-valuetext":a,"data-cui-surface":"sunken","data-testid":`${o}-bar`,children:Te("span",{className:"cui-meter-fill","data-cui-accent":"info-accent",style:{inlineSize:`${(t-r)/(n-r)*100}%`},"data-testid":`${o}-fill`})}),Te("span",{"aria-hidden":"true",children:Te(P,{fg:"fg",type:"body",testId:`${o}-value`,children:a})})]})};import{useId as ao,useRef as io}from"react";import{jsx as Xe,jsxs as uo}from"react/jsx-runtime";var so={ArrowLeft:-1,ArrowRight:1},lo=({label:e,items:t,value:r,onValueChange:n,testId:a,panelDescribedBy:o,children:i})=>{m();let d=ao(),s=io(new Map);if(t.length===0)throw new RangeError("PanelTabs needs at least one tab");let l=t.map(f=>f.id);if(new Set(l).size!==l.length)throw new RangeError(`Tab keys must be unique: ${l.join(", ")}`);let p=l.indexOf(r);if(p<0)throw new RangeError(`The selected tab "${r}" is not one of the tabs: ${l.join(", ")}`);let u=f=>`${d}-tab-${f}`,c=`${d}-panel`,y=f=>{let h=t[f];h.id!==r&&n(h.id),s.current.get(h.id)?.focus()};return uo("div",{className:"cui-panel-tabs","data-testid":a,children:[Xe("div",{className:"cui-tabs-list",role:"tablist","aria-label":e,onKeyDown:f=>{let h=t.findIndex(b=>s.current.get(b.id)===f.target),T=h<0?p:h,x=so[f.key],g;if(x!==void 0){let b=getComputedStyle(f.currentTarget).direction==="rtl"?-x:x;g=(T+b+t.length)%t.length}else if(f.key==="Home")g=0;else if(f.key==="End")g=t.length-1;else return;f.preventDefault(),y(g)},children:t.map((f,h)=>{let T=h===p;return Xe("button",{className:"cui-tab cui-panel-tab",type:"button",role:"tab",id:u(h),"aria-selected":T,"aria-controls":c,tabIndex:T?0:-1,"data-cui-fg":T?"fg":"fg-secondary","data-cui-type":"body","data-testid":`${a}-${f.id}`,ref:x=>{x===null?s.current.delete(f.id):s.current.set(f.id,x)},onClick:()=>y(h),children:f.label},f.id)})}),Xe("div",{role:"tabpanel",id:c,"aria-labelledby":u(p),"aria-describedby":o,"data-testid":`${a}-panel`,children:i})]})};import{jsx as Zt,jsxs as po}from"react/jsx-runtime";var co=({failure:e,onReload:t,forbiddenMessage:r,failureMessage:n,rescueRef:a,testId:o})=>{let{labels:i}=k();return po("div",{className:"cui-resource-failed","data-testid":o,children:[Zt(de,{occurrence:e.occurrence,testId:`${o}-alert`,children:i.failureSentence(e,r,n===void 0?i.loadFailed:n)}),e.status===403?null:Zt(F,{variant:"secondary",busy:e.retrying,busyLabel:i.loading,onClick:t,ref:a,testId:`${o}-reload`,children:i.reload})]})};import{jsx as je,jsxs as fo}from"react/jsx-runtime";var yo=({label:e,options:t,value:r,onValueChange:n,testId:a})=>{m();let o=new Set(t.map(i=>i.value));if(t.length<2||o.size!==t.length)throw new RangeError(`A segmented control needs at least two options with unique values: ${t.map(i=>i.value).join(", ")}`);if(!o.has(r))throw new RangeError(`The pressed value "${r}" is not one of the options: ${[...o].join(", ")}`);return fo("fieldset",{className:"cui-segmented-group","data-testid":a,children:[je("legend",{className:"cui-segmented-legend","data-cui-type":"body",children:e}),je("div",{className:"cui-segmented",children:t.map(i=>{let d=i.value===r;return je("button",{className:"cui-segment",type:"button","aria-pressed":d,"data-cui-fg":d?"on-solid":"fg","data-cui-surface":d?"info-solid":void 0,"data-cui-type":"body","data-testid":`${a}-${i.value}`,onClick:()=>{d||n(i.value)},children:i.label},i.value)})})]})};import{useCallback as mo,useRef as go}from"react";import{jsx as Y}from"react/jsx-runtime";var Qt=({selected:e,controls:t,onSelect:r,testId:n,dataAttributes:a,ref:o,children:i})=>{m();let d=go(null);H(d,{testId:n,part:"row",host:"button"});let s=mo(l=>{if(d.current=l,typeof o=="function")return o(l);o!=null&&(o.current=l)},[o]);return Y("button",{className:"cui-row-button",type:"button","data-selected":e,"aria-expanded":e,"aria-controls":t,"data-cui-row-focus":"","data-cui-surface":e?"info-tint":"surface","data-cui-fg":"fg","data-cui-type":"body","data-testid":n,onClick:r,ref:s,...w(a),children:i})},bo=({label:e,items:t,itemKey:r,selectedKey:n,onSelect:a,detailId:o,renderRow:i,rowTestId:d,rowData:s,empty:l,testId:p,ref:u})=>(m(),Y("div",{className:"cui-selectable","data-testid":p,ref:u,children:t.length===0?Y(P,{as:"p",fg:"fg-muted",type:"prose",testId:`${p}-empty`,children:l}):Y("ul",{className:"cui-selectable-list",role:"list","aria-label":e,children:t.map(c=>{let y=r(c);return Y("li",{children:Y(Qt,{selected:y===n,controls:o,onSelect:()=>a(c),testId:d,dataAttributes:s?.(c),children:i(c)})},y)})})}));import{useId as ho}from"react";import{jsx as xe,jsxs as er}from"react/jsx-runtime";var Ro=({label:e,value:t,min:r,max:n,step:a,valueText:o,onValueChange:i,testId:d})=>{m();let s=ho();if(!([t,r,n,a].every(Number.isFinite)&&r<n&&a>0&&r<=t&&t<=n))throw new RangeError(`Slider needs finite min < max, a positive step and min <= value <= max: value ${t}, min ${r}, max ${n}, step ${a}`);let l=o(t);return er("div",{className:"cui-field","data-testid":`${d}-field`,children:[xe("label",{className:"cui-field-label",htmlFor:s,"data-cui-type":"body",children:e}),er("div",{className:"cui-slider",children:[xe("input",{className:"cui-slider-input",id:s,type:"range",min:r,max:n,step:a,value:t,"aria-valuetext":l,"data-testid":d,onChange:p=>i(p.currentTarget.valueAsNumber)}),xe("span",{className:"cui-slider-value","aria-hidden":"true",children:xe(P,{fg:"fg",type:"body",testId:`${d}-value`,children:l})})]})]})};import{jsx as tr}from"react/jsx-runtime";var To=({gap:e,testId:t,children:r})=>(m(),tr("div",{className:"cui-stack","data-cui-gap":e,"data-testid":t,children:r})),xo=({gap:e,as:t="div",testId:r,children:n})=>(m(),tr(t,{className:"cui-cluster","data-cui-gap":e,"data-testid":r,children:n}));import{jsx as Ye,jsxs as nr}from"react/jsx-runtime";var rr={done:0,current:1,pending:2},vo={done:{fg:"on-solid",surface:"success-solid"},current:{fg:"on-solid",surface:"info-solid"},pending:{fg:"fg-secondary",surface:void 0}},Eo=({label:e,steps:t,testId:r})=>{let{labels:n}=k();if(t.length===0||new Set(t.map(o=>o.id)).size!==t.length)throw new RangeError(`A stepper needs at least one step with unique keys: ${t.map(o=>o.id).join(", ")}`);if(t.filter(o=>o.state==="current").length>1||t.some((o,i)=>i>0&&rr[o.state]<rr[t[i-1].state]))throw new RangeError(`Step states must run done, at most one current, then pending: ${t.map(o=>o.state).join(", ")}`);let a={done:n.stepDone,current:null,pending:n.stepPending};return Ye("ol",{className:"cui-stepper",role:"list","aria-label":e,"data-cui-type":"body","data-testid":r,children:t.map((o,i)=>{let d=vo[o.state],s=a[o.state];return nr("li",{className:"cui-step","aria-current":o.state==="current"?"step":void 0,"data-cui-step":o.state,"data-testid":`${r}-${o.id}`,children:[Ye("span",{className:"cui-step-marker","aria-hidden":"true","data-cui-fg":d.fg,"data-cui-surface":d.surface,"data-cui-type":"caption",children:o.state==="done"?"\u2713":i+1}),nr("span",{className:"cui-step-label","data-cui-fg":"fg",children:[o.label,s===null?null:Ye("span",{className:"cui-visually-hidden",children:` (${s})`})]})]},o.id)})})};import{useId as wo,useRef as Po}from"react";import{jsx as ve,jsxs as or}from"react/jsx-runtime";var Co=({label:e,labelHidden:t,checked:r,onCheckedChange:n,unavailable:a,testId:o,ref:i,dataAttributes:d})=>{m();let s=wo(),l=Po(null);H(l,{testId:o,part:"label",host:"button"});let p=W(a,s),u=a!==void 0,c=or("button",{className:"cui-switch",type:"button",role:"switch","aria-checked":r,"aria-disabled":u?!0:void 0,"aria-describedby":K(p),"data-cui-fg":"fg","data-cui-type":"body","data-testid":o,ref:i,onClick:()=>{u||n(!r)},...w(d),children:[ve("span",{className:"cui-switch-track","aria-hidden":"true","data-cui-surface":r?"info-solid":"sunken","data-testid":`${o}-track`,children:ve("span",{className:"cui-switch-thumb","data-cui-surface":r?"surface":"neutral-solid","data-testid":`${o}-thumb`})}),ve("span",{className:t===!0?"cui-visually-hidden":void 0,ref:l,children:e})]});return a?.reason===void 0?c:or("span",{className:"cui-button-group",children:[c,ve(P,{fg:"fg-muted",type:"body",id:s,testId:`${o}-reason`,children:a.reason})]})};import{jsx as Ee}from"react/jsx-runtime";var No=({label:e,items:t,currentId:r,onNavigate:n,testId:a})=>{if(m(),t.length===0)throw new RangeError("Tabs needs at least one tab");let o=new Set(t.map(i=>i.id));if(o.size!==t.length)throw new RangeError(`Tab keys must be unique: ${t.map(i=>i.id).join(", ")}`);if(!o.has(r))throw new RangeError(`The current tab "${r}" is not one of the tabs: ${[...o].join(", ")}`);return Ee("nav",{className:"cui-tabs","aria-label":e,"data-testid":a,children:Ee("ul",{className:"cui-tabs-list",role:"list",children:t.map(i=>{let d=i.id===r;return Ee("li",{className:"cui-tabs-item",children:Ee("a",{className:"cui-tab",href:i.href,"aria-current":d?"page":void 0,"data-cui-fg":d?"fg":"fg-secondary","data-cui-type":"body","data-testid":`${a}-${i.id}`,onClick:s=>ce(s,i.href,n),children:i.label})},i.id)})})})};import{Children as ko,Fragment as Lo,isValidElement as So}from"react";import{jsx as q,jsxs as ir}from"react/jsx-runtime";var Io={neutral:"fg",danger:"danger-fg",warning:"warning-fg",success:"success-fg"},Mo=e=>{m();let{label:t,sublabel:r,tone:n,testId:a,dataAttributes:o}=e;if((e.text===void 0?e.value===null:e.text===null)&&n!=="neutral")throw new RangeError(`An unmeasured tile value carries no tone: ${n}`);let d=`${a}-value`;return ir("div",{className:"cui-tile","data-cui-surface":"subtle","data-cui-fg":"fg","data-cui-tone":n,"data-testid":a,...w(o),children:[q("p",{className:"cui-tile-label","data-cui-type":"caption","data-cui-measure":"reading",children:t}),q("p",{className:"cui-tile-sublabel","data-cui-fg":"fg-muted","data-cui-type":"caption","data-cui-measure":"reading",children:r}),q("p",{className:"cui-tile-value","data-cui-fg":Io[n],"data-cui-type":"heading","data-cui-measure":"reading",children:e.text===void 0?q(Re,{value:e.value,unit:e.unit,testId:d}):q(Re,{text:e.text,keep:"wrap",testId:d})})]})},ar=e=>ko.toArray(e).flatMap(t=>{if(!So(t))throw new RangeError(`TileGrid children must be tile elements, not text: ${String(t)}`);return t.type===Lo?ar(t.props.children):[t]}),$o=({count:e,minInlinePx:t,testId:r,children:n})=>{m();let a=ut(e,t,S.space["space-2"]),o=ar(n).length;if(o!==e)throw new RangeError(`TileGrid has ${o} tiles but count is ${e}`);return ir("div",{className:"cui-container","data-testid":r,children:[q(z,{ruleKey:a.key,css:a.css}),q("div",{className:"cui-tile-grid","data-cui-tile-grid":a.key,"data-cui-gap":"space-2",children:n})]})};import{useLayoutEffect as Fo,useRef as sr}from"react";import{jsx as Do}from"react/jsx-runtime";var we=e=>[...e.querySelectorAll("button")],Ao=({label:e,testId:t,children:r})=>{m();let n=sr(null),a=sr(null);Fo(()=>{let s=we(n.current),l=a.current!==null&&s.includes(a.current)?a.current:s[0]??null;a.current=l;for(let p of s)p.tabIndex=p===l?0:-1});let o=s=>{for(let l of we(n.current))l.tabIndex=l===s?0:-1;a.current=s};return Do("div",{className:"cui-toolbar",role:"toolbar","aria-label":e,"aria-orientation":"horizontal","data-testid":t,ref:n,onFocus:s=>{let l=we(s.currentTarget).find(p=>p.contains(s.target));l!==void 0&&o(l)},onKeyDown:s=>{let l=we(s.currentTarget),p=l.indexOf(s.target);if(p===-1)return;let u=getComputedStyle(s.currentTarget).direction==="rtl"?"ArrowLeft":"ArrowRight",c=u==="ArrowRight"?"ArrowLeft":"ArrowRight",R={[u]:(p+1)%l.length,[c]:(p-1+l.length)%l.length,Home:0,End:l.length-1}[s.key];if(R===void 0)return;s.preventDefault();let f=l[R];o(f),f.focus()},children:r})};import{useCallback as Z,useEffect as Uo,useLayoutEffect as lr,useRef as et}from"react";import{useCallback as Pe,useEffect as Ho,useLayoutEffect as Oo,useRef as Ze,useState as Qe}from"react";var dr=e=>e===null?Ne:ke,Ce=(e,t,r,n,a)=>{let[o,i]=Qe(()=>({key:e,state:dr(e)})),[d,s]=Qe(0),[l,p]=Qe(0),u=Ze(t),c=Ze(null),y=Ze(d);Oo(()=>{u.current=t}),Ho(()=>{if(e===null){i({key:null,state:Ne});return}let g=new AbortController;c.current=e;let b=d===y.current?"revision":"reload";return y.current=d,i(v=>Object.is(v.key,e)?{key:e,state:n(v.state,b)}:{key:e,state:ke}),u.current(g.signal).then(v=>{g.signal.aborted||(c.current=null,i(I=>({key:e,state:a(I.state,v)})))},v=>{g.signal.aborted||i(()=>{throw v})}),()=>{g.abort(),c.current=null}},[e,r,d,l]);let R=Pe(()=>s(g=>g+1),[]),f=Pe(()=>p(g=>g+1),[]),h=Pe((g,b)=>{i(v=>Object.is(v.key,g)?{key:g,state:b(v.state)}:v)},[]),T=Pe((g,b)=>{h(g,b),Object.is(c.current,g)&&f()},[h,f]);return{state:Object.is(o.key,e)?o.state:dr(e),reload:R,refresh:f,update:h,write:T}};var Ko=(e,t,r)=>{let n=et(t);lr(()=>{n.current=t});let a=Z(T=>n.current.first(T),[]),{state:o,reload:i,refresh:d,update:s,write:l}=Ce(e,a,r,ct,pt),p=et({key:e,state:o});lr(()=>{p.current={key:e,state:o}});let u=et(null),c=Z(()=>{u.current?.controller.abort(),u.current=null},[]);Uo(()=>c,[e,r,c]);let y=Z(()=>{c(),i()},[c,i]),R=Z(()=>{c(),d()},[c,d]),f=Z(()=>{let{key:T,state:x}=p.current;if(T===null||x.kind!=="ready"||x.refreshing||x.value.next===null||x.value.loadingMore)throw new Error("usePagedResource: loadMore needs a shown list with a next cursor, no page in flight and no re-read in flight");let g=x.value.next,b={key:T,controller:new AbortController,maps:[]};u.current=b,s(T,yt),n.current.next(g,b.controller.signal).then(v=>{u.current===b&&(u.current=null,s(T,I=>b.maps.reduce((Q,ur)=>Ie(Q,ur),ft(I,g,v))))},v=>{u.current===b&&s(T,()=>{throw v})})},[s]),h=Z((T,x)=>{let g=u.current;g!==null&&Object.is(g.key,T)&&g.maps.push(x),l(T,b=>Ie(b,x))},[l]);return{state:o,reload:y,refresh:R,loadMore:f,updateList:h}};import{useCallback as Bo,useRef as _o,useState as qo}from"react";var Go=e=>typeof e=="object"&&e!==null&&typeof e.then=="function",Vo=()=>{let[e,t]=qo(null),r=_o(null),n=Bo((a,o)=>{let i=o();if(!Go(i))return;let d=Symbol(a);r.current=d,t(a);let s=()=>{r.current===d&&(r.current=null,t(null))};i.then(s,s)},[]);return{pendingKey:e,press:n}};import{useCallback as Wo}from"react";var zo=(e,t,r)=>{let{state:n,reload:a,refresh:o,write:i}=Ce(e,t,r,rt,Le),d=Wo((s,l)=>i(s,p=>Le(p,{ok:!0,value:l})),[i]);return{state:n,reload:a,refresh:o,put:d}};import{jsx as Xo}from"react/jsx-runtime";var Jo=({testId:e,children:t})=>(m(),Xo("span",{className:"cui-visually-hidden","data-testid":e,children:t}));export{ue as ANNOUNCE_SETTLE_MS,de as AlertMessage,Er as Breadcrumb,F as Button,ot as COMPACT_ROW_PX,ia as CONSOLE_UI_LABEL_CATALOGS,Ca as CONTRAST_MINIMUM,mt as CONTRAST_PAIRS,He as Card,Br as CardSection,Tn as CheckboxGroup,xo as Cluster,qr as CodeBlock,Wr as ComparisonGrid,Tr as ConsoleUiRoot,sn as DataTable,dn as DescriptionList,un as Dialog,yn as Disclosure,V as FIGURE_RING_REACH_PX,ma as FLEXIBLE_COLUMN_MIN_PX,fn as Field,Ln as Figure,Mn as FigureEdge,In as FigureNode,Fr as FragmentLink,cr as HTTP_FORBIDDEN,Fn as Heading,Hn as InlineChange,Gn as JobCard,Se as LATTICE_PX,Mr as Link,Jn as List,Xn as ListItem,eo as LoadMore,ro as MasterDetail,Re as Measured,no as Meter,Mo as MetricTile,jn as Notice,lo as PanelTabs,gn as PasswordInput,Ve as Pill,We as ProgressBar,da as ROW_WITH_CONTROL_PX,Rn as RadioGroup,co as ResourceFailed,Qt as RowButton,yo as SegmentedControl,hn as Select,bo as SelectableList,Ro as Slider,To as Stack,Eo as Stepper,Co as Switch,G as TARGET_PX,S as TOKENS,Ia as TONES,La as TONE_HUES,Sa as TONE_ROLES,No as Tabs,P as Text,bn as TextArea,mn as TextInput,$o as TileGrid,Ao as Toolbar,Jo as VisuallyHidden,Zo as ZonedTimeError,yt as beginPage,ct as beginPagedReload,rt as beginReload,pa as ceil8,sa as ceilToLattice,ya as cellContentInlinePx,ga as comparisonAttributePx,Pa as contrastRatio,ha as countSampleText,la as cssVar,at as figureBoxPlan,st as figureDiscLabelPlan,ra as fillLabel,fa as fixedColumnPx,oa as flatMapOutcome,le as formatCount,ta as formatInstant,xa as goldenSectionPx,wa as hexToSrgb,ba as instantSampleText,D as isReadableText,Le as keepLastGood,Na as lightDark,na as mapOutcome,Ie as mapPagedList,va as masterDetailPlan,ca as monoTextWidthEm,ka as placeholderRule,M as pxToRem,jo as readDecimalText,Yo as readIntegerText,aa as reasonAside,nt as resolveConsoleUiLabels,pt as settleFirstPage,ft as settlePage,Ta as spacedTextWidthEm,Ea as tableFrameMinInlinePx,lt as tableMinInlinePx,ua as textWidthEm,ut as tileGridPlan,Ra as tileMinInlinePx,Qo as toOffsetIso,ea as toWallTime,xr as useAnnounce,k as useConsoleUi,Ur as useEscapeToClose,oe as useFocusRescue,Ko as usePagedResource,Vo as usePendingPress,zo as useResource};
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
--cui-line-height-caption: 1.25rem;
|
|
27
27
|
--cui-font-size-body: 0.8125rem;
|
|
28
28
|
--cui-line-height-body: 1.25rem;
|
|
29
|
+
--cui-font-size-body-lg: 1rem;
|
|
30
|
+
--cui-line-height-body-lg: 1.5rem;
|
|
29
31
|
--cui-font-size-title: 1rem;
|
|
30
32
|
--cui-line-height-title: 1.75rem;
|
|
31
33
|
--cui-font-size-heading: 1.25rem;
|
|
@@ -266,6 +268,11 @@
|
|
|
266
268
|
line-height: var(--cui-line-height-prose);
|
|
267
269
|
}
|
|
268
270
|
|
|
271
|
+
[data-cui-type="body-lg"] {
|
|
272
|
+
font-size: var(--cui-font-size-body-lg);
|
|
273
|
+
line-height: var(--cui-line-height-body-lg);
|
|
274
|
+
}
|
|
275
|
+
|
|
269
276
|
[data-cui-type="title"] {
|
|
270
277
|
font-size: var(--cui-font-size-title);
|
|
271
278
|
line-height: var(--cui-line-height-title);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiquants/console-ui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Host-agnostic UI foundation for React admin consoles, with a React entry, a React-free core entry, a DOM testing entry and a stylesheet.",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css"
|
package/dist/chunk-4IQKQ7WF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var G=new Map,_=(e,t)=>{if(!(Number.isSafeInteger(e)&&e>=0))throw new RangeError(`A count must be a non-negative safe integer: ${e}`);let n=G.get(t);return n===void 0&&(n=new Intl.NumberFormat(t,{maximumFractionDigits:0,useGrouping:!0}),G.set(t,n)),n.format(e)},j=(e,t)=>t===void 0?e:`${e} ${t}`;var Ce=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Ee=/[!-~]/g;var Pe=/^[^eE]*[1-9]/,Y=e=>{let t=e.replace(Ee,r=>String.fromCharCode(r.charCodeAt(0)-65248)).trim();if(!Ce.test(t))return null;let n=Number(t);return Number.isFinite(n)?n===0?Pe.test(t)?null:0:n:null},Se=e=>{let t=Y(e);return t!==null&&Number.isSafeInteger(t)?t:null};var _e=/[^\p{White_Space}\p{Cc}\p{Cf}\p{Default_Ignorable_Code_Point}]/u,m=e=>_e.test(e);var l=class extends RangeError{reason;constructor(t,n){super(n),this.name="ZonedTimeError",this.reason=t}},Oe=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/,we=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2}):(\d{2}))$/,Ie=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(?:(Z)|([+-])(\d{2}):?(\d{2}))$/,K=864e5,w=6e4,C={min:1,max:9999},V=new Map,J=new Map,Ne=e=>{let t=V.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),V.set(e,t)),t},q=e=>{let t=new Date(0);return t.setUTCFullYear(e.year,e.month-1,e.day),t.setUTCHours(e.hour,e.minute,e.second,0),t.getUTCFullYear()===e.year&&t.getUTCMonth()===e.month-1&&t.getUTCDate()===e.day&&t.getUTCHours()===e.hour&&t.getUTCMinutes()===e.minute&&t.getUTCSeconds()===e.second?t.getTime():null},I=(e,t)=>{let[n,r,o,s,c,i,R]=t;if(R!==void 0&&/[1-9]/.test(R))throw new l("subsecond",`Fractions of a second cannot be kept: ${e}`);let g={year:Number(n),month:Number(r),day:Number(o),hour:Number(s),minute:Number(c),second:i===void 0?0:Number(i)},X=g.year>=C.min?q(g):null;if(X===null)throw new l("malformed",`Not a calendar date and time: ${e}`);return{fields:g,millis:X}},N=(e,t)=>{let n=new Map(Ne(t).formatToParts(new Date(e)).map(o=>[o.type,o.value])),r={year:Number(n.get("year")),month:Number(n.get("month")),day:Number(n.get("day")),hour:Number(n.get("hour")),minute:Number(n.get("minute")),second:Number(n.get("second"))};if(n.get("era")!=="AD"||r.year>C.max)throw new l("malformed",`The wall clock falls outside years ${C.min}-${C.max}: ${new Date(e).toISOString()}`);return r},O=(e,t)=>q(N(e,t))-e,f=e=>String(e).padStart(2,"0"),Z=(e,t)=>{let n=`${String(e.year).padStart(4,"0")}-${f(e.month)}-${f(e.day)}T${f(e.hour)}:${f(e.minute)}`;return t||e.second!==0?`${n}:${f(e.second)}`:n},Me=e=>{if(e%w!==0)throw new l("malformed",`The zone's offset is not a whole number of minutes: ${e} ms`);let t=Math.abs(e)/w;return`${e<0?"-":"+"}${f(Math.floor(t/60))}:${f(t%60)}`},Le=(e,t)=>{let n=Oe.exec(e);if(n===null)throw new l("malformed",`Not a wall time (YYYY-MM-DDTHH:mm[:ss]): ${e}`);let{fields:r,millis:o}=I(e,n.slice(1)),c=[...new Set([O(o-K,t),O(o+K,t)])].filter(i=>O(o-i,t)===i);if(c.length===0)throw new l("nonexistent",`${e} does not exist in ${t}`);if(c.length>1)throw new l("ambiguous",`${e} occurs twice in ${t}`);return`${Z(r,!0)}${Me(c[0])}`},Q=(e,t)=>{let[n,r,o,s]=t;if(n!==void 0)return 0;if(Number(o)>23||Number(s)>59)throw new l("malformed",`Not a valid offset: ${e}`);return(r==="-"?-1:1)*(Number(o)*60+Number(s))*w},Fe=(e,t)=>{let n=we.exec(e);if(n===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:r}=I(e,n.slice(1,8));return Z(N(r-Q(e,n.slice(8)),t),!1)},$e=(e,t)=>{let n=JSON.stringify([e,t]),r=J.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(e,{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),J.set(n,r)),r},M=(e,t,n)=>{let r=Ie.exec(e);if(r===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:o}=I(e,[...r.slice(1,7),void 0]),s=o-Q(e,r.slice(7));return N(s,n),$e(t,n).format(s)};var ee=403,Ae=(e,t)=>e.ok?{ok:!0,value:t(e.value)}:e,De=(e,t)=>e.ok?t(e.value):e,Ut={kind:"idle"},ve={kind:"loading"},L=(e,t)=>e.kind==="ready"?{...e,refreshing:!0}:e.kind==="failed"?t==="reload"?{...e,retrying:!0}:e:ve,F=(e,t)=>t.ok?{kind:"ready",value:t.value,refreshing:!1,refreshFailure:null}:e.kind==="failed"&&e.status===403?e.retrying?{...e,retrying:!1}:e:e.kind==="ready"&&t.status!==403?{kind:"ready",value:e.value,refreshing:!1,refreshFailure:{status:t.status,reason:t.reason}}:{kind:"failed",status:t.status,reason:t.reason,occurrence:e.kind==="failed"?e.occurrence+1:1,retrying:!1};var T=e=>e===""?"":` (${e})`,te=e=>(t,n,r)=>t.status===403?e(n,t.reason):r(t.reason),ne=(e,t)=>t===""?e:`${e} Reason: ${t}.`,re=(e,t)=>t===""?e:`${e}${t}\u3002`,E={en:{unmeasured:"Not measured",loading:"Loading",loadFailed:e=>`Could not load${T(e)}.`,refreshFailed:e=>`Could not refresh${T(e)}.`,forbiddenBecause:ne,failureSentence:te(ne),loadMore:e=>`Show ${e} more`,endOfRecords:"No more records",close:"Close",cancel:"Cancel",reload:"Reload",breadcrumb:"Breadcrumb",stepDone:"Done",stepPending:"Not started"},ja:{unmeasured:"\u672A\u6E2C\u5B9A",loading:"\u8AAD\u307F\u8FBC\u307F\u4E2D",loadFailed:e=>`\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F${T(e)}\u3002`,refreshFailed:e=>`\u66F4\u65B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F${T(e)}\u3002`,forbiddenBecause:re,failureSentence:te(re),loadMore:e=>`\u3055\u3089\u306B ${e} \u4EF6\u3092\u8868\u793A`,endOfRecords:"\u3053\u308C\u4EE5\u4E0A\u306E\u8A18\u9332\u306F\u3042\u308A\u307E\u305B\u3093",close:"\u9589\u3058\u308B",cancel:"\u3084\u3081\u308B",reload:"\u518D\u8AAD\u307F\u8FBC\u307F",breadcrumb:"\u30D1\u30F3\u304F\u305A",stepDone:"\u5B8C\u4E86",stepPending:"\u672A\u7740\u624B"}},Ue=e=>{if(!Object.hasOwn(E,e))throw new RangeError(`No console UI labels for locale "${e}"; supported: ${Object.keys(E).join(", ")}`);return E[e]};var He=4,We=[1,2,3,4,6,8,12,16,24],Be=16,ze=5/4,A={caption:-2,body:-1,title:0,heading:1,display:2,"display-lg":3},Xe=11,oe=3/2,Ge=7/4,je=7/4,Ye=120,Ke=3/2,Ve=[1,2,3],ae=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`A length must be a finite number of px at or above 0: ${e}`);return Math.ceil(e/4)*4},D=e=>{if(!Number.isInteger(e))throw new RangeError(`A type step must be an integer: ${e}`);return Math.max(Xe,Math.round(Be*ze**e))},v=(e,t)=>ae(e*t),ie=v(D(A.body),oe),b=ie+24,se=b+8,le=ie+8,$={weight:{regular:400,medium:500,bold:700},radius:{"radius-control":4,"radius-item":8,"radius-container":12,"radius-pill":9999},stroke:{"border-width":1,"focus-width":2,"focus-offset":2,"marker-width":2}},Je=()=>Object.fromEntries(We.map(e=>[`space-${e}`,e*4])),qe=()=>{let e=Object.fromEntries(Object.entries(A).map(([n,r])=>{let o=D(r);return[n,{size:o,lineHeight:v(o,n==="title"?je:oe)}]})),t=D(A.body);return{...e,prose:{size:t,lineHeight:v(t,Ge)}}},Ze=()=>Object.fromEntries(Ve.map(e=>[`motion-${e}`,Ye*Ke**(e-1)])),de=e=>Object.freeze({space:Object.freeze(Je()),type:Object.freeze(qe()),weight:$.weight,radius:$.radius,size:Object.freeze({"size-target":b,"size-control":b,"size-row":b,"size-row-control":se,"size-row-compact":le}),stroke:$.stroke,motion:Object.freeze(Ze()),color:Object.freeze({...e})});var Qe={fg:{light:"#0f172b",dark:"#f8fafc"},"fg-secondary":{light:"#314158",dark:"#e2e8f0"},"fg-muted":{light:"#44536a",dark:"#cad5e2"},"danger-fg":{light:"#9f0712",dark:"#ffc9c9"},"warning-fg":{light:"#7b3306",dark:"#fee685"},"success-fg":{light:"#006045",dark:"#a4f4cf"},"info-fg":{light:"#193cb8",dark:"#bedbff"},"on-solid":{light:"#ffffff",dark:"#0f172b"},surface:{light:"#ffffff",dark:"#0f172b"},subtle:{light:"#f8fafc",dark:"#1d293d"},sunken:{light:"#f1f5f9",dark:"#020618"},"danger-tint":{light:"#fef2f2",dark:"#460809"},"warning-tint":{light:"#fffbeb",dark:"#461901"},"success-tint":{light:"#ecfdf5",dark:"#002c22"},"info-tint":{light:"#eff6ff",dark:"#162456"},"neutral-solid":{light:"#314158",dark:"#cad5e2"},"danger-solid":{light:"#9f0712",dark:"#ffa2a2"},"success-solid":{light:"#006045",dark:"#5ee9b5"},"info-solid":{light:"#193cb8",dark:"#8ec5ff"},"warning-solid":{light:"#7b3306",dark:"#ffd230"},"danger-accent":{light:"#e7000b",dark:"#ff6467"},"warning-accent":{light:"#bb4d00",dark:"#fcbb00"},"success-accent":{light:"#009966",dark:"#00d492"},"info-accent":{light:"#155dfc",dark:"#51a2ff"},focus:{light:"#155dfc",dark:"#51a2ff"},"border-control":{light:"#62748e",dark:"#90a1b9"},"border-subtle":{light:"#e2e8f0",dark:"#314158"}},a=de(Qe),et="--cui-",tt=e=>`var(${et}${e})`;var nt=e=>e>=32&&e<=126||e>=65377&&e<=65500||e>=65512&&e<=65518,ce=(e,t)=>{let n=0,r=0;for(let o of e)nt(o.codePointAt(0))?r+=1:n+=1;return n*1+r*t},h=e=>ce(e,.55),x=e=>ce(e,.6),u=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return Math.max(0,Math.ceil((e-1e-9)/8))*8};var ue="caption",W="body",B=2*a.space["space-3"],me={type:"caption",paddingInlinePx:2*a.space["space-2"]},U={type:"body",paddingInlinePx:2*a.space["space-3"]+2*a.stroke["border-width"],minInlinePx:a.size["size-control"]},fe={type:"body",minInlinePx:a.size["size-target"]},P={trackInlinePx:2*a.type.body.lineHeight+3*a.space["space-1"],labelGapPx:a.space["space-2"],type:"body"},H={captionType:"caption",valueType:"heading",paddingInlinePx:2*a.space["space-3"]},rt=10,ot="2000-01-01T00:00:00Z",at=9999999,pe=(e,t,n)=>(t==="mono"?x(e):h(e))*a.type[n].size,it=(e,t)=>{if(e.length===0)throw new RangeError(`A ${t} needs at least one text to be measured with`);for(let n of e)if(!m(n))throw new RangeError(`A ${t} sample must hold a readable character: ${JSON.stringify(n)}`);return e},d=(e,t,n,r)=>Math.max(...it(e,t).map(o=>pe(o,n,r))),z=e=>{switch(e.kind){case"text":return d(e.texts,"text",e.face,e.type);case"measured":return d(e.texts,"measured value","sans",W);case"pill":return d(e.labels,"pill","sans",me.type)+me.paddingInlinePx;case"button":return Math.max(U.minInlinePx,d(e.labels,"button","sans",U.type)+U.paddingInlinePx);case"link":return Math.max(fe.minInlinePx,d(e.labels,"link","sans",fe.type));case"switch":return e.labelHidden?P.trackInlinePx:P.trackInlinePx+P.labelGapPx+d(e.labels,"switch","sans",P.type);case"cluster":{if(e.items.length===0)throw new RangeError("A cluster needs at least one item to be measured with");return e.items.reduce((t,n)=>t+z(n),0)+(e.items.length-1)*a.space[e.gap]}}},st=(e,t)=>{let n=d([e.header],"column header","sans",ue),r=e.note===void 0?0:d(e.note,"column header note","sans",ue);return u(Math.max(n,r,...t.map(z))+B)},lt=u(pe("\u3042".repeat(rt),"sans",W)+B),dt=e=>u(d(e,"comparison attribute","sans",W)+B),ct=(e,t)=>M(ot,e,t),ut=(e,t)=>{if(t!==void 0&&!m(t))throw new RangeError(`A count sample's unit must hold a readable character: ${JSON.stringify(t)}`);return j(_(at,e),t)},mt=(e,t)=>u(Math.max(d(e,"tile caption","sans",H.captionType),d(t,"tile value","sans",H.valueType))+H.paddingInlinePx);var ft=.12,pt=.16,gt=/[\u0020\u00a0\u1361\u{10100}\u{10101}\u{1039f}\u{1091f}]/u,k=a.space["space-3"],S=(e,t)=>{let n=0,r=0;for(let s of e)n+=1,gt.test(s)&&(r+=1);return(t==="mono"?x(e):h(e))+ft*n+pt*r},yt=e=>{for(let n of[e.name,...e.notes])if(!m(n))throw new RangeError(`A figure node's name and notes must hold a readable character: ${JSON.stringify(n)}`);let t=Math.max(S(e.name,"sans")*a.type.body.size,...e.notes.map(n=>S(n,"sans")*a.type.caption.size));return{minWidthPx:u(t)+2*k,heightPx:2*k+a.type.body.lineHeight+e.notes.length*a.type.caption.lineHeight}},tn=e=>{let t=k+a.type.body.lineHeight;return{insetPx:k,namePx:k+a.type.body.lineHeight/2,notesPx:Array.from({length:e},(n,r)=>t+r*a.type.caption.lineHeight+a.type.caption.lineHeight/2)}},Tt=(e,t)=>{if(e!==null&&!m(e))throw new RangeError(`A disc's name must hold a readable character: ${JSON.stringify(e)}`);if(!(Number.isFinite(t)&&t>0))throw new RangeError(`A disc's radius must be a positive finite px value: ${t}`);return e===null?{widthPx:0,extentBelowPx:t+ge}:{widthPx:u(S(e,"sans")*a.type.caption.size),extentBelowPx:t+a.space["space-1"]+a.type.caption.lineHeight}},ge=a.stroke["focus-offset"]+a.stroke["focus-width"],nn=a.stroke["focus-offset"]+a.stroke["focus-width"]/2;var bt=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return e},p=e=>`${bt(e)/16}rem`;var ye=(1+Math.sqrt(5))/2,Te=({masterMinPx:e,detailMinPx:t,gapPx:n})=>{for(let r of[e,t])if(!(Number.isFinite(r)&&r>0))throw new RangeError(`Pane minimum must be a positive px value: ${r}`);if(!(Number.isFinite(n)&&n>=0))throw new RangeError(`Gap must be a px value >= 0: ${n}`);return e+n+t},ht=(e,t)=>{let n=Te(t);if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Container width must be a px value >= 0: ${e}`);if(e<n)return{sideBySide:!1,sideBySideFromPx:n,masterInlinePx:e,detailInlinePx:e};let r=(e-t.gapPx)/(1+ye),o=Math.min(Math.max(t.masterMinPx,r),e-t.gapPx-t.detailMinPx);return{sideBySide:!0,sideBySideFromPx:n,masterInlinePx:o,detailInlinePx:e-t.gapPx-o}},sn=e=>{let t=Te(e),n=`cui-master-detail-m${e.masterMinPx}-d${e.detailMinPx}-g${e.gapPx}`,r=`[data-cui-master-detail="${n}"]`,o=p(e.gapPx),s=`${r}{grid-template-columns:minmax(0,1fr);gap:${o}}`,c=`clamp(${p(e.masterMinPx)},calc((100% - ${o}) / ${1+ye}),calc(100% - ${o} - ${p(e.detailMinPx)}))`,i=`@container (min-width:${p(t)}){${r}{grid-template-columns:${c} minmax(0,1fr)}}`;return{key:n,css:s+i}};var xt=2*a.space["space-1"],be=e=>{if(!(Number.isFinite(e)&&e>0))throw new RangeError(`Column width must be a positive px value: ${e}`);return e},he=e=>{if(e.length===0)throw new RangeError("A table needs at least one column");let t=0,n=null;for(let{width:r}of e){if(r.fixedPx!==void 0){t+=be(r.fixedPx);continue}let o=be(r.minPx);if(n!==null&&n!==o)throw new RangeError(`Flexible columns share the remaining width equally, so their minimums must be equal: ${n} and ${o}`);n=o,t+=o}return t},kt=e=>he(e)+xt;var Rt=(e,t,n)=>{if(!(Number.isSafeInteger(e)&&e>0))throw new RangeError(`Tile count must be a positive integer: ${e}`);if(!(Number.isFinite(t)&&t>0))throw new RangeError(`Tile minimum width must be a positive px value: ${t}`);if(!(Number.isFinite(n)&&n>=0))throw new RangeError(`Tile gap must be a px value >= 0: ${n}`);let r=[];for(let i=1;i<=e;i+=1)e%i===0&&r.push({columns:i,minContainerPx:i*t+(i-1)*n});let o=`cui-tiles-n${e}-m${t}-g${n}`,s=`[data-cui-tile-grid="${o}"]`,c=r.map(({columns:i,minContainerPx:R})=>{let g=`${s}{grid-template-columns:repeat(${i},minmax(0,1fr))}`;return i===1?g:`@container (min-width:${p(R)}){${g}}`});return{key:o,steps:r,css:c.join("")}};var Ct=(e,t)=>{let n=L(e,t);return n.kind==="ready"?{...n,value:{...n.value,loadingMore:!1}}:n},Et=(e,t)=>F(e,t.ok?{ok:!0,value:{rows:t.value.rows,next:t.value.next,meta:t.value.meta,loadingMore:!1,moreFailure:null}}:t),Pt=e=>e.kind==="ready"&&!e.refreshing&&e.value.next!==null&&!e.value.loadingMore?{...e,value:{...e.value,loadingMore:!0}}:e,St=(e,t,n)=>{if(!(e.kind==="ready"&&e.value.loadingMore&&Object.is(e.value.next,t)))return e;if(n.ok)return{...e,value:{...e.value,rows:[...e.value.rows,...n.value.rows],next:n.value.next,loadingMore:!1,moreFailure:null}};let r=e.value.moreFailure===null?1:e.value.moreFailure.occurrence+1;return{...e,value:{...e.value,loadingMore:!1,moreFailure:{reason:n.reason,occurrence:r}}}},_t=(e,t)=>{if(e.kind!=="ready")return e;let{rows:n,meta:r}=t({rows:e.value.rows,meta:e.value.meta});return{...e,value:{...e.value,rows:n,meta:r}}};var Ot=/^#[0-9a-f]{6}$/i,wt=/^[a-z][a-z0-9-]*$/,xe=e=>{if(!Ot.test(e))throw new RangeError(`A palette colour must be #rrggbb: ${e}`);return e},ke=({light:e,dark:t})=>`light-dark(${xe(e)}, ${xe(t)})`,It=e=>{if(!wt.test(e))throw new RangeError(`A root attribute must be lowercase letters, digits and hyphens, starting with a letter: ${e}`);return`[${e}] ::placeholder { color: ${ke(a.color["fg-muted"])}; opacity: 1; }`};var Re=["indigo","violet","purple","fuchsia","pink","rose","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue"],Nt=["fg","tint","accent","line","solid","solid-hover"],Mt={indigo:{fg:{light:"#372aac",dark:"#c6d2ff"},tint:{light:"#eff3ff",dark:"#1e1a4d"},accent:{light:"#4f39f6",dark:"#7c86ff"}},violet:{fg:{light:"#5d0ec0",dark:"#ddd6ff"},tint:{light:"#f5f3ff",dark:"#2f0d68"},accent:{light:"#7f22fe",dark:"#a684ff"}},purple:{fg:{light:"#6e11b0",dark:"#e9d4ff"},tint:{light:"#faf5ff",dark:"#3c0366"},accent:{light:"#9810fa",dark:"#c27aff"}},fuchsia:{fg:{light:"#8a0194",dark:"#f6cfff"},tint:{light:"#fdf4ff",dark:"#4b004f"},accent:{light:"#c800de",dark:"#ed6aff"}},pink:{fg:{light:"#a3004c",dark:"#fccee8"},tint:{light:"#fdf2f8",dark:"#510424"},accent:{light:"#e60076",dark:"#fb64b6"}},rose:{fg:{light:"#a50036",dark:"#ffccd3"},tint:{light:"#fff1f2",dark:"#4d0218"},accent:{light:"#ec003f",dark:"#ff637e"}},red:{fg:{light:"#9f0712",dark:"#ffc9c9"},tint:{light:"#fef2f2",dark:"#460809"},accent:{light:"#e7000b",dark:"#ff6467"}},orange:{fg:{light:"#7e2a0c",dark:"#ffd6a7"},tint:{light:"#fff7ed",dark:"#441306"},accent:{light:"#f54900",dark:"#ff8904"}},amber:{fg:{light:"#7b3306",dark:"#fee685"},tint:{light:"#fffbeb",dark:"#461901"},accent:{light:"#bb4d00",dark:"#fcbb00"}},yellow:{fg:{light:"#733e0a",dark:"#fff085"},tint:{light:"#fefce8",dark:"#432004"},accent:{light:"#a65f00",dark:"#fdc700"}},lime:{fg:{light:"#35530e",dark:"#d8f999"},tint:{light:"#f7fee7",dark:"#192e03"},accent:{light:"#497d00",dark:"#9ae600"}},green:{fg:{light:"#0d542b",dark:"#b9f8cf"},tint:{light:"#f0fdf4",dark:"#032e15"},accent:{light:"#008236",dark:"#05df72"}},emerald:{fg:{light:"#004f3b",dark:"#a4f4cf"},tint:{light:"#ecfdf5",dark:"#002c22"},accent:{light:"#009966",dark:"#00d492"}},teal:{fg:{light:"#0b4f4a",dark:"#96f7e4"},tint:{light:"#f0fdfa",dark:"#022f2e"},accent:{light:"#009689",dark:"#00d5be"}},cyan:{fg:{light:"#104e64",dark:"#a2f4fd"},tint:{light:"#ecfeff",dark:"#053345"},accent:{light:"#0092b8",dark:"#00d3f2"}},sky:{fg:{light:"#024a70",dark:"#b8e6fe"},tint:{light:"#f0f9ff",dark:"#052f4a"},accent:{light:"#0084d1",dark:"#00bcff"}},blue:{fg:{light:"#193cb8",dark:"#bedbff"},tint:{light:"#eff6ff",dark:"#162456"},accent:{light:"#155dfc",dark:"#51a2ff"}}},y=({light:e,dark:t})=>Object.freeze({light:e,dark:t}),Lt=({fg:e,tint:t,accent:n})=>Object.freeze({fg:y(e),tint:y(t),accent:y(n),line:y({light:e.dark,dark:e.light}),solid:y(e),"solid-hover":y({light:t.dark,dark:t.light})}),Ft=Object.freeze(Object.fromEntries(Re.map(e=>[e,Lt(Mt[e])])));export{_ as a,j as b,Y as c,Se as d,m as e,l as f,Le as g,Fe as h,M as i,ee as j,Ae as k,De as l,Ut as m,ve as n,L as o,F as p,T as q,E as r,Ue as s,He as t,ae as u,b as v,se as w,le as x,a as y,tt as z,h as A,x as B,u as C,z as D,st as E,lt as F,dt as G,ct as H,ut as I,mt as J,S as K,yt as L,tn as M,Tt as N,ge as O,nn as P,p as Q,ht as R,sn as S,he as T,kt as U,Rt as V,Ct as W,Et as X,Pt as Y,St as Z,_t as _,ke as $,It as aa,Re as ba,Nt as ca,Ft as da};
|
package/dist/chunk-S6DFKVUV.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var G=new Map,_= exports.a =(e,t)=>{if(!(Number.isSafeInteger(e)&&e>=0))throw new RangeError(`A count must be a non-negative safe integer: ${e}`);let n=G.get(t);return n===void 0&&(n=new Intl.NumberFormat(t,{maximumFractionDigits:0,useGrouping:!0}),G.set(t,n)),n.format(e)},j= exports.b =(e,t)=>t===void 0?e:`${e} ${t}`;var Ce=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Ee=/[!-~]/g;var Pe=/^[^eE]*[1-9]/,Y= exports.c =e=>{let t=e.replace(Ee,r=>String.fromCharCode(r.charCodeAt(0)-65248)).trim();if(!Ce.test(t))return null;let n=Number(t);return Number.isFinite(n)?n===0?Pe.test(t)?null:0:n:null},Se= exports.d =e=>{let t=Y(e);return t!==null&&Number.isSafeInteger(t)?t:null};var _e=/[^\p{White_Space}\p{Cc}\p{Cf}\p{Default_Ignorable_Code_Point}]/u,m= exports.e =e=>_e.test(e);var l=class extends RangeError{constructor(t,n){super(n),this.name="ZonedTimeError",this.reason=t}},Oe=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/,we=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2}):(\d{2}))$/,Ie=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(?:(Z)|([+-])(\d{2}):?(\d{2}))$/,K=864e5,w=6e4,C={min:1,max:9999},V=new Map,J=new Map,Ne=e=>{let t=V.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),V.set(e,t)),t},q=e=>{let t=new Date(0);return t.setUTCFullYear(e.year,e.month-1,e.day),t.setUTCHours(e.hour,e.minute,e.second,0),t.getUTCFullYear()===e.year&&t.getUTCMonth()===e.month-1&&t.getUTCDate()===e.day&&t.getUTCHours()===e.hour&&t.getUTCMinutes()===e.minute&&t.getUTCSeconds()===e.second?t.getTime():null},I=(e,t)=>{let[n,r,o,s,c,i,R]=t;if(R!==void 0&&/[1-9]/.test(R))throw new l("subsecond",`Fractions of a second cannot be kept: ${e}`);let g={year:Number(n),month:Number(r),day:Number(o),hour:Number(s),minute:Number(c),second:i===void 0?0:Number(i)},X=g.year>=C.min?q(g):null;if(X===null)throw new l("malformed",`Not a calendar date and time: ${e}`);return{fields:g,millis:X}},N=(e,t)=>{let n=new Map(Ne(t).formatToParts(new Date(e)).map(o=>[o.type,o.value])),r={year:Number(n.get("year")),month:Number(n.get("month")),day:Number(n.get("day")),hour:Number(n.get("hour")),minute:Number(n.get("minute")),second:Number(n.get("second"))};if(n.get("era")!=="AD"||r.year>C.max)throw new l("malformed",`The wall clock falls outside years ${C.min}-${C.max}: ${new Date(e).toISOString()}`);return r},O=(e,t)=>q(N(e,t))-e,f=e=>String(e).padStart(2,"0"),Z=(e,t)=>{let n=`${String(e.year).padStart(4,"0")}-${f(e.month)}-${f(e.day)}T${f(e.hour)}:${f(e.minute)}`;return t||e.second!==0?`${n}:${f(e.second)}`:n},Me=e=>{if(e%w!==0)throw new l("malformed",`The zone's offset is not a whole number of minutes: ${e} ms`);let t=Math.abs(e)/w;return`${e<0?"-":"+"}${f(Math.floor(t/60))}:${f(t%60)}`},Le= exports.g =(e,t)=>{let n=Oe.exec(e);if(n===null)throw new l("malformed",`Not a wall time (YYYY-MM-DDTHH:mm[:ss]): ${e}`);let{fields:r,millis:o}=I(e,n.slice(1)),c=[...new Set([O(o-K,t),O(o+K,t)])].filter(i=>O(o-i,t)===i);if(c.length===0)throw new l("nonexistent",`${e} does not exist in ${t}`);if(c.length>1)throw new l("ambiguous",`${e} occurs twice in ${t}`);return`${Z(r,!0)}${Me(c[0])}`},Q=(e,t)=>{let[n,r,o,s]=t;if(n!==void 0)return 0;if(Number(o)>23||Number(s)>59)throw new l("malformed",`Not a valid offset: ${e}`);return(r==="-"?-1:1)*(Number(o)*60+Number(s))*w},Fe= exports.h =(e,t)=>{let n=we.exec(e);if(n===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:r}=I(e,n.slice(1,8));return Z(N(r-Q(e,n.slice(8)),t),!1)},$e=(e,t)=>{let n=JSON.stringify([e,t]),r=J.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(e,{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),J.set(n,r)),r},M= exports.i =(e,t,n)=>{let r=Ie.exec(e);if(r===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:o}=I(e,[...r.slice(1,7),void 0]),s=o-Q(e,r.slice(7));return N(s,n),$e(t,n).format(s)};var ee=403,Ae= exports.k =(e,t)=>e.ok?{ok:!0,value:t(e.value)}:e,De= exports.l =(e,t)=>e.ok?t(e.value):e,Ut= exports.m ={kind:"idle"},ve= exports.n ={kind:"loading"},L= exports.o =(e,t)=>e.kind==="ready"?{...e,refreshing:!0}:e.kind==="failed"?t==="reload"?{...e,retrying:!0}:e:ve,F= exports.p =(e,t)=>t.ok?{kind:"ready",value:t.value,refreshing:!1,refreshFailure:null}:e.kind==="failed"&&e.status===403?e.retrying?{...e,retrying:!1}:e:e.kind==="ready"&&t.status!==403?{kind:"ready",value:e.value,refreshing:!1,refreshFailure:{status:t.status,reason:t.reason}}:{kind:"failed",status:t.status,reason:t.reason,occurrence:e.kind==="failed"?e.occurrence+1:1,retrying:!1};var T=e=>e===""?"":` (${e})`,te=e=>(t,n,r)=>t.status===403?e(n,t.reason):r(t.reason),ne=(e,t)=>t===""?e:`${e} Reason: ${t}.`,re=(e,t)=>t===""?e:`${e}${t}\u3002`,E= exports.r ={en:{unmeasured:"Not measured",loading:"Loading",loadFailed:e=>`Could not load${T(e)}.`,refreshFailed:e=>`Could not refresh${T(e)}.`,forbiddenBecause:ne,failureSentence:te(ne),loadMore:e=>`Show ${e} more`,endOfRecords:"No more records",close:"Close",cancel:"Cancel",reload:"Reload",breadcrumb:"Breadcrumb",stepDone:"Done",stepPending:"Not started"},ja:{unmeasured:"\u672A\u6E2C\u5B9A",loading:"\u8AAD\u307F\u8FBC\u307F\u4E2D",loadFailed:e=>`\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F${T(e)}\u3002`,refreshFailed:e=>`\u66F4\u65B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F${T(e)}\u3002`,forbiddenBecause:re,failureSentence:te(re),loadMore:e=>`\u3055\u3089\u306B ${e} \u4EF6\u3092\u8868\u793A`,endOfRecords:"\u3053\u308C\u4EE5\u4E0A\u306E\u8A18\u9332\u306F\u3042\u308A\u307E\u305B\u3093",close:"\u9589\u3058\u308B",cancel:"\u3084\u3081\u308B",reload:"\u518D\u8AAD\u307F\u8FBC\u307F",breadcrumb:"\u30D1\u30F3\u304F\u305A",stepDone:"\u5B8C\u4E86",stepPending:"\u672A\u7740\u624B"}},Ue= exports.s =e=>{if(!Object.hasOwn(E,e))throw new RangeError(`No console UI labels for locale "${e}"; supported: ${Object.keys(E).join(", ")}`);return E[e]};var He=4,We=[1,2,3,4,6,8,12,16,24],Be=16,ze=5/4,A={caption:-2,body:-1,title:0,heading:1,display:2,"display-lg":3},Xe=11,oe=3/2,Ge=7/4,je=7/4,Ye=120,Ke=3/2,Ve=[1,2,3],ae= exports.u =e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`A length must be a finite number of px at or above 0: ${e}`);return Math.ceil(e/4)*4},D=e=>{if(!Number.isInteger(e))throw new RangeError(`A type step must be an integer: ${e}`);return Math.max(Xe,Math.round(Be*ze**e))},v=(e,t)=>ae(e*t),ie=v(D(A.body),oe),b= exports.v =ie+24,se= exports.w =b+8,le= exports.x =ie+8,$={weight:{regular:400,medium:500,bold:700},radius:{"radius-control":4,"radius-item":8,"radius-container":12,"radius-pill":9999},stroke:{"border-width":1,"focus-width":2,"focus-offset":2,"marker-width":2}},Je=()=>Object.fromEntries(We.map(e=>[`space-${e}`,e*4])),qe=()=>{let e=Object.fromEntries(Object.entries(A).map(([n,r])=>{let o=D(r);return[n,{size:o,lineHeight:v(o,n==="title"?je:oe)}]})),t=D(A.body);return{...e,prose:{size:t,lineHeight:v(t,Ge)}}},Ze=()=>Object.fromEntries(Ve.map(e=>[`motion-${e}`,Ye*Ke**(e-1)])),de=e=>Object.freeze({space:Object.freeze(Je()),type:Object.freeze(qe()),weight:$.weight,radius:$.radius,size:Object.freeze({"size-target":b,"size-control":b,"size-row":b,"size-row-control":se,"size-row-compact":le}),stroke:$.stroke,motion:Object.freeze(Ze()),color:Object.freeze({...e})});var Qe={fg:{light:"#0f172b",dark:"#f8fafc"},"fg-secondary":{light:"#314158",dark:"#e2e8f0"},"fg-muted":{light:"#44536a",dark:"#cad5e2"},"danger-fg":{light:"#9f0712",dark:"#ffc9c9"},"warning-fg":{light:"#7b3306",dark:"#fee685"},"success-fg":{light:"#006045",dark:"#a4f4cf"},"info-fg":{light:"#193cb8",dark:"#bedbff"},"on-solid":{light:"#ffffff",dark:"#0f172b"},surface:{light:"#ffffff",dark:"#0f172b"},subtle:{light:"#f8fafc",dark:"#1d293d"},sunken:{light:"#f1f5f9",dark:"#020618"},"danger-tint":{light:"#fef2f2",dark:"#460809"},"warning-tint":{light:"#fffbeb",dark:"#461901"},"success-tint":{light:"#ecfdf5",dark:"#002c22"},"info-tint":{light:"#eff6ff",dark:"#162456"},"neutral-solid":{light:"#314158",dark:"#cad5e2"},"danger-solid":{light:"#9f0712",dark:"#ffa2a2"},"success-solid":{light:"#006045",dark:"#5ee9b5"},"info-solid":{light:"#193cb8",dark:"#8ec5ff"},"warning-solid":{light:"#7b3306",dark:"#ffd230"},"danger-accent":{light:"#e7000b",dark:"#ff6467"},"warning-accent":{light:"#bb4d00",dark:"#fcbb00"},"success-accent":{light:"#009966",dark:"#00d492"},"info-accent":{light:"#155dfc",dark:"#51a2ff"},focus:{light:"#155dfc",dark:"#51a2ff"},"border-control":{light:"#62748e",dark:"#90a1b9"},"border-subtle":{light:"#e2e8f0",dark:"#314158"}},a= exports.y =de(Qe),et="--cui-",tt= exports.z =e=>`var(${et}${e})`;var nt=e=>e>=32&&e<=126||e>=65377&&e<=65500||e>=65512&&e<=65518,ce=(e,t)=>{let n=0,r=0;for(let o of e)nt(o.codePointAt(0))?r+=1:n+=1;return n*1+r*t},h= exports.A =e=>ce(e,.55),x= exports.B =e=>ce(e,.6),u= exports.C =e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return Math.max(0,Math.ceil((e-1e-9)/8))*8};var ue="caption",W="body",B=2*a.space["space-3"],me={type:"caption",paddingInlinePx:2*a.space["space-2"]},U={type:"body",paddingInlinePx:2*a.space["space-3"]+2*a.stroke["border-width"],minInlinePx:a.size["size-control"]},fe={type:"body",minInlinePx:a.size["size-target"]},P={trackInlinePx:2*a.type.body.lineHeight+3*a.space["space-1"],labelGapPx:a.space["space-2"],type:"body"},H={captionType:"caption",valueType:"heading",paddingInlinePx:2*a.space["space-3"]},rt=10,ot="2000-01-01T00:00:00Z",at=9999999,pe=(e,t,n)=>(t==="mono"?x(e):h(e))*a.type[n].size,it=(e,t)=>{if(e.length===0)throw new RangeError(`A ${t} needs at least one text to be measured with`);for(let n of e)if(!m(n))throw new RangeError(`A ${t} sample must hold a readable character: ${JSON.stringify(n)}`);return e},d=(e,t,n,r)=>Math.max(...it(e,t).map(o=>pe(o,n,r))),z= exports.D =e=>{switch(e.kind){case"text":return d(e.texts,"text",e.face,e.type);case"measured":return d(e.texts,"measured value","sans",W);case"pill":return d(e.labels,"pill","sans",me.type)+me.paddingInlinePx;case"button":return Math.max(U.minInlinePx,d(e.labels,"button","sans",U.type)+U.paddingInlinePx);case"link":return Math.max(fe.minInlinePx,d(e.labels,"link","sans",fe.type));case"switch":return e.labelHidden?P.trackInlinePx:P.trackInlinePx+P.labelGapPx+d(e.labels,"switch","sans",P.type);case"cluster":{if(e.items.length===0)throw new RangeError("A cluster needs at least one item to be measured with");return e.items.reduce((t,n)=>t+z(n),0)+(e.items.length-1)*a.space[e.gap]}}},st= exports.E =(e,t)=>{let n=d([e.header],"column header","sans",ue),r=e.note===void 0?0:d(e.note,"column header note","sans",ue);return u(Math.max(n,r,...t.map(z))+B)},lt= exports.F =u(pe("\u3042".repeat(rt),"sans",W)+B),dt= exports.G =e=>u(d(e,"comparison attribute","sans",W)+B),ct= exports.H =(e,t)=>M(ot,e,t),ut= exports.I =(e,t)=>{if(t!==void 0&&!m(t))throw new RangeError(`A count sample's unit must hold a readable character: ${JSON.stringify(t)}`);return j(_(at,e),t)},mt= exports.J =(e,t)=>u(Math.max(d(e,"tile caption","sans",H.captionType),d(t,"tile value","sans",H.valueType))+H.paddingInlinePx);var ft=.12,pt=.16,gt=/[\u0020\u00a0\u1361\u{10100}\u{10101}\u{1039f}\u{1091f}]/u,k=a.space["space-3"],S= exports.K =(e,t)=>{let n=0,r=0;for(let s of e)n+=1,gt.test(s)&&(r+=1);return(t==="mono"?x(e):h(e))+ft*n+pt*r},yt= exports.L =e=>{for(let n of[e.name,...e.notes])if(!m(n))throw new RangeError(`A figure node's name and notes must hold a readable character: ${JSON.stringify(n)}`);let t=Math.max(S(e.name,"sans")*a.type.body.size,...e.notes.map(n=>S(n,"sans")*a.type.caption.size));return{minWidthPx:u(t)+2*k,heightPx:2*k+a.type.body.lineHeight+e.notes.length*a.type.caption.lineHeight}},tn= exports.M =e=>{let t=k+a.type.body.lineHeight;return{insetPx:k,namePx:k+a.type.body.lineHeight/2,notesPx:Array.from({length:e},(n,r)=>t+r*a.type.caption.lineHeight+a.type.caption.lineHeight/2)}},Tt= exports.N =(e,t)=>{if(e!==null&&!m(e))throw new RangeError(`A disc's name must hold a readable character: ${JSON.stringify(e)}`);if(!(Number.isFinite(t)&&t>0))throw new RangeError(`A disc's radius must be a positive finite px value: ${t}`);return e===null?{widthPx:0,extentBelowPx:t+ge}:{widthPx:u(S(e,"sans")*a.type.caption.size),extentBelowPx:t+a.space["space-1"]+a.type.caption.lineHeight}},ge= exports.O =a.stroke["focus-offset"]+a.stroke["focus-width"],nn= exports.P =a.stroke["focus-offset"]+a.stroke["focus-width"]/2;var bt=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return e},p= exports.Q =e=>`${bt(e)/16}rem`;var ye=(1+Math.sqrt(5))/2,Te=({masterMinPx:e,detailMinPx:t,gapPx:n})=>{for(let r of[e,t])if(!(Number.isFinite(r)&&r>0))throw new RangeError(`Pane minimum must be a positive px value: ${r}`);if(!(Number.isFinite(n)&&n>=0))throw new RangeError(`Gap must be a px value >= 0: ${n}`);return e+n+t},ht= exports.R =(e,t)=>{let n=Te(t);if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Container width must be a px value >= 0: ${e}`);if(e<n)return{sideBySide:!1,sideBySideFromPx:n,masterInlinePx:e,detailInlinePx:e};let r=(e-t.gapPx)/(1+ye),o=Math.min(Math.max(t.masterMinPx,r),e-t.gapPx-t.detailMinPx);return{sideBySide:!0,sideBySideFromPx:n,masterInlinePx:o,detailInlinePx:e-t.gapPx-o}},sn= exports.S =e=>{let t=Te(e),n=`cui-master-detail-m${e.masterMinPx}-d${e.detailMinPx}-g${e.gapPx}`,r=`[data-cui-master-detail="${n}"]`,o=p(e.gapPx),s=`${r}{grid-template-columns:minmax(0,1fr);gap:${o}}`,c=`clamp(${p(e.masterMinPx)},calc((100% - ${o}) / ${1+ye}),calc(100% - ${o} - ${p(e.detailMinPx)}))`,i=`@container (min-width:${p(t)}){${r}{grid-template-columns:${c} minmax(0,1fr)}}`;return{key:n,css:s+i}};var xt=2*a.space["space-1"],be=e=>{if(!(Number.isFinite(e)&&e>0))throw new RangeError(`Column width must be a positive px value: ${e}`);return e},he= exports.T =e=>{if(e.length===0)throw new RangeError("A table needs at least one column");let t=0,n=null;for(let{width:r}of e){if(r.fixedPx!==void 0){t+=be(r.fixedPx);continue}let o=be(r.minPx);if(n!==null&&n!==o)throw new RangeError(`Flexible columns share the remaining width equally, so their minimums must be equal: ${n} and ${o}`);n=o,t+=o}return t},kt= exports.U =e=>he(e)+xt;var Rt=(e,t,n)=>{if(!(Number.isSafeInteger(e)&&e>0))throw new RangeError(`Tile count must be a positive integer: ${e}`);if(!(Number.isFinite(t)&&t>0))throw new RangeError(`Tile minimum width must be a positive px value: ${t}`);if(!(Number.isFinite(n)&&n>=0))throw new RangeError(`Tile gap must be a px value >= 0: ${n}`);let r=[];for(let i=1;i<=e;i+=1)e%i===0&&r.push({columns:i,minContainerPx:i*t+(i-1)*n});let o=`cui-tiles-n${e}-m${t}-g${n}`,s=`[data-cui-tile-grid="${o}"]`,c=r.map(({columns:i,minContainerPx:R})=>{let g=`${s}{grid-template-columns:repeat(${i},minmax(0,1fr))}`;return i===1?g:`@container (min-width:${p(R)}){${g}}`});return{key:o,steps:r,css:c.join("")}};var Ct=(e,t)=>{let n=L(e,t);return n.kind==="ready"?{...n,value:{...n.value,loadingMore:!1}}:n},Et= exports.X =(e,t)=>F(e,t.ok?{ok:!0,value:{rows:t.value.rows,next:t.value.next,meta:t.value.meta,loadingMore:!1,moreFailure:null}}:t),Pt= exports.Y =e=>e.kind==="ready"&&!e.refreshing&&e.value.next!==null&&!e.value.loadingMore?{...e,value:{...e.value,loadingMore:!0}}:e,St= exports.Z =(e,t,n)=>{if(!(e.kind==="ready"&&e.value.loadingMore&&Object.is(e.value.next,t)))return e;if(n.ok)return{...e,value:{...e.value,rows:[...e.value.rows,...n.value.rows],next:n.value.next,loadingMore:!1,moreFailure:null}};let r=e.value.moreFailure===null?1:e.value.moreFailure.occurrence+1;return{...e,value:{...e.value,loadingMore:!1,moreFailure:{reason:n.reason,occurrence:r}}}},_t= exports._ =(e,t)=>{if(e.kind!=="ready")return e;let{rows:n,meta:r}=t({rows:e.value.rows,meta:e.value.meta});return{...e,value:{...e.value,rows:n,meta:r}}};var Ot=/^#[0-9a-f]{6}$/i,wt=/^[a-z][a-z0-9-]*$/,xe=e=>{if(!Ot.test(e))throw new RangeError(`A palette colour must be #rrggbb: ${e}`);return e},ke= exports.$ =({light:e,dark:t})=>`light-dark(${xe(e)}, ${xe(t)})`,It= exports.aa =e=>{if(!wt.test(e))throw new RangeError(`A root attribute must be lowercase letters, digits and hyphens, starting with a letter: ${e}`);return`[${e}] ::placeholder { color: ${ke(a.color["fg-muted"])}; opacity: 1; }`};var Re=["indigo","violet","purple","fuchsia","pink","rose","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue"],Nt= exports.ca =["fg","tint","accent","line","solid","solid-hover"],Mt={indigo:{fg:{light:"#372aac",dark:"#c6d2ff"},tint:{light:"#eff3ff",dark:"#1e1a4d"},accent:{light:"#4f39f6",dark:"#7c86ff"}},violet:{fg:{light:"#5d0ec0",dark:"#ddd6ff"},tint:{light:"#f5f3ff",dark:"#2f0d68"},accent:{light:"#7f22fe",dark:"#a684ff"}},purple:{fg:{light:"#6e11b0",dark:"#e9d4ff"},tint:{light:"#faf5ff",dark:"#3c0366"},accent:{light:"#9810fa",dark:"#c27aff"}},fuchsia:{fg:{light:"#8a0194",dark:"#f6cfff"},tint:{light:"#fdf4ff",dark:"#4b004f"},accent:{light:"#c800de",dark:"#ed6aff"}},pink:{fg:{light:"#a3004c",dark:"#fccee8"},tint:{light:"#fdf2f8",dark:"#510424"},accent:{light:"#e60076",dark:"#fb64b6"}},rose:{fg:{light:"#a50036",dark:"#ffccd3"},tint:{light:"#fff1f2",dark:"#4d0218"},accent:{light:"#ec003f",dark:"#ff637e"}},red:{fg:{light:"#9f0712",dark:"#ffc9c9"},tint:{light:"#fef2f2",dark:"#460809"},accent:{light:"#e7000b",dark:"#ff6467"}},orange:{fg:{light:"#7e2a0c",dark:"#ffd6a7"},tint:{light:"#fff7ed",dark:"#441306"},accent:{light:"#f54900",dark:"#ff8904"}},amber:{fg:{light:"#7b3306",dark:"#fee685"},tint:{light:"#fffbeb",dark:"#461901"},accent:{light:"#bb4d00",dark:"#fcbb00"}},yellow:{fg:{light:"#733e0a",dark:"#fff085"},tint:{light:"#fefce8",dark:"#432004"},accent:{light:"#a65f00",dark:"#fdc700"}},lime:{fg:{light:"#35530e",dark:"#d8f999"},tint:{light:"#f7fee7",dark:"#192e03"},accent:{light:"#497d00",dark:"#9ae600"}},green:{fg:{light:"#0d542b",dark:"#b9f8cf"},tint:{light:"#f0fdf4",dark:"#032e15"},accent:{light:"#008236",dark:"#05df72"}},emerald:{fg:{light:"#004f3b",dark:"#a4f4cf"},tint:{light:"#ecfdf5",dark:"#002c22"},accent:{light:"#009966",dark:"#00d492"}},teal:{fg:{light:"#0b4f4a",dark:"#96f7e4"},tint:{light:"#f0fdfa",dark:"#022f2e"},accent:{light:"#009689",dark:"#00d5be"}},cyan:{fg:{light:"#104e64",dark:"#a2f4fd"},tint:{light:"#ecfeff",dark:"#053345"},accent:{light:"#0092b8",dark:"#00d3f2"}},sky:{fg:{light:"#024a70",dark:"#b8e6fe"},tint:{light:"#f0f9ff",dark:"#052f4a"},accent:{light:"#0084d1",dark:"#00bcff"}},blue:{fg:{light:"#193cb8",dark:"#bedbff"},tint:{light:"#eff6ff",dark:"#162456"},accent:{light:"#155dfc",dark:"#51a2ff"}}},y=({light:e,dark:t})=>Object.freeze({light:e,dark:t}),Lt=({fg:e,tint:t,accent:n})=>Object.freeze({fg:y(e),tint:y(t),accent:y(n),line:y({light:e.dark,dark:e.light}),solid:y(e),"solid-hover":y({light:t.dark,dark:t.light})}),Ft= exports.da =Object.freeze(Object.fromEntries(Re.map(e=>[e,Lt(Mt[e])])));exports.a = _; exports.b = j; exports.c = Y; exports.d = Se; exports.e = m; exports.f = l; exports.g = Le; exports.h = Fe; exports.i = M; exports.j = ee; exports.k = Ae; exports.l = De; exports.m = Ut; exports.n = ve; exports.o = L; exports.p = F; exports.q = T; exports.r = E; exports.s = Ue; exports.t = He; exports.u = ae; exports.v = b; exports.w = se; exports.x = le; exports.y = a; exports.z = tt; exports.A = h; exports.B = x; exports.C = u; exports.D = z; exports.E = st; exports.F = lt; exports.G = dt; exports.H = ct; exports.I = ut; exports.J = mt; exports.K = S; exports.L = yt; exports.M = tn; exports.N = Tt; exports.O = ge; exports.P = nn; exports.Q = p; exports.R = ht; exports.S = sn; exports.T = he; exports.U = kt; exports.V = Rt; exports.W = Ct; exports.X = Et; exports.Y = Pt; exports.Z = St; exports._ = _t; exports.$ = ke; exports.aa = It; exports.ba = Re; exports.ca = Nt; exports.da = Ft;
|