@oliasoft-open-source/charts-library 5.8.0 → 5.9.0-beta-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/dist/assets/{Color-6BZIO3FS-C124yz2l.js → Color-6BZIO3FS-BdmyW5fF.js} +1 -1
- package/dist/assets/{DocsRenderer-LL677BLK-D4qKUuBB.js → DocsRenderer-LL677BLK-Dmh2MbD-.js} +4 -4
- package/dist/assets/{WithTooltip-65CFNBJE-CtWnqLza.js → WithTooltip-65CFNBJE-B1vNinkY.js} +1 -1
- package/dist/assets/{bar-chart.stories-C3SMcQsP.js → bar-chart.stories-Ch0i7N0G.js} +2 -2
- package/dist/assets/{chunk-YKABRMAI-Ahx4OkN7.js → chunk-YKABRMAI-nN4IfCIz.js} +1 -1
- package/dist/assets/{components-DIpk8W7G.js → components-s5a1V3CD.js} +4 -4
- package/dist/assets/formatter-EIJCOSYU-Bo0DMj3p.js +1 -0
- package/dist/assets/{get-draggableData-w1LT3_ff.js → get-draggableData-mCkevOrC.js} +1 -1
- package/dist/assets/{iframe-DApKJtpy.js → iframe-B7buKd6W.js} +3 -3
- package/dist/assets/{legend-BIh7BsGA.js → legend-Cem_14IV.js} +39 -39
- package/dist/assets/{legend-context-CQKzSsRL.js → legend-context-D1oEf-Th.js} +3 -3
- package/dist/assets/line-chart-BDauhYk8.js +1 -0
- package/dist/assets/{line-chart.stories-BI9cuT6Z.js → line-chart.stories-T04m8x5t.js} +7 -3
- package/dist/assets/{line-chart.test-case.stories-BxTEBLo3.js → line-chart.test-case.stories-BcA_QlE1.js} +127 -4
- package/dist/assets/{pie-chart.stories-BHZXRphh.js → pie-chart.stories-D2G6WnUw.js} +1 -1
- package/dist/assets/{react-18-JAuqV3gQ.js → react-18-DQODWq5X.js} +1 -1
- package/dist/assets/{react-DPAuT4W0.js → react-CwUuogrH.js} +1 -1
- package/dist/assets/{react-dom-CWw972ZY.js → react-dom-O1LTTn3X.js} +1 -1
- package/dist/assets/{scatter-chart.stories-DQLyCWVA.js → scatter-chart.stories-DJ3Z3dsB.js} +1 -1
- package/dist/assets/{syntaxhighlighter-ED5Y7EFY-CxhX_a0D.js → syntaxhighlighter-ED5Y7EFY-DYFKPQ-I.js} +1 -1
- package/dist/assets/{theming-BGumyAJ5.js → theming-DpsViFyv.js} +1 -1
- package/dist/common/common.interface.d.ts +7 -0
- package/dist/common/helpers/callout-helpers/callout-overlap-helpers.d.ts +9 -0
- package/dist/common/helpers/get-chart-annotation.d.ts +48 -6
- package/dist/iframe.html +1 -1
- package/dist/index.js +367 -57
- package/dist/index.json +1 -1
- package/dist/line-chart/plugins/vertical-markers-plugin/draw.d.ts +24 -0
- package/dist/line-chart/plugins/vertical-markers-plugin/types.d.ts +42 -0
- package/dist/line-chart/plugins/vertical-markers-plugin/utils.d.ts +23 -0
- package/dist/line-chart/plugins/vertical-markers-plugin/vertical-markers-plugin.d.ts +54 -0
- package/dist/project.json +1 -1
- package/dist/src/components/common/helpers/callout-helpers/callout-overlap-helpers.d.ts +9 -0
- package/package.json +1 -1
- package/dist/assets/formatter-EIJCOSYU-B8p8ny5o.js +0 -1
- package/dist/assets/line-chart-CcOicjlw.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./theming-
|
|
2
|
-
import{t as e}from"./preload-helper-Bhb7V-Yo.js";import{C as t,E as n,O as r,S as i,T as a,_ as o,a as s,b as c,c as l,d as u,g as d,h as f,j as p,l as m,m as h,s as g,t as _,u as v,v as y,w as b,x,y as S}from"./iframe-DApKJtpy.js";import{_ as C,a as w,d as T,f as E,g as D,h as O,i as k,l as A,m as j,o as M,s as N,u as P,v as ee,y as te}from"./theming-BGumyAJ5.js";import{t as ne}from"./react-dom-CWw972ZY.js";import{n as re,r as ie}from"./chunk-YKABRMAI-Ahx4OkN7.js";import{t as ae}from"./chunk-242VQQM5-By-lqKqL.js";var F=p(s(),1),oe=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M6 3.5a.5.5 0 01.5.5v1.5H8a.5.5 0 010 1H6.5V8a.5.5 0 01-1 0V6.5H4a.5.5 0 010-1h1.5V4a.5.5 0 01.5-.5z`,fill:e}),F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M9.544 10.206a5.5 5.5 0 11.662-.662.5.5 0 01.148.102l3 3a.5.5 0 01-.708.708l-3-3a.5.5 0 01-.102-.148zM10.5 6a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0z`,fill:e}))),se=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M4 5.5a.5.5 0 000 1h4a.5.5 0 000-1H4z`,fill:e}),F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M6 11.5c1.35 0 2.587-.487 3.544-1.294a.5.5 0 00.102.148l3 3a.5.5 0 00.708-.708l-3-3a.5.5 0 00-.148-.102A5.5 5.5 0 106 11.5zm0-1a4.5 4.5 0 100-9 4.5 4.5 0 000 9z`,fill:e}))),ce=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M1.5 2.837V1.5a.5.5 0 00-1 0V4a.5.5 0 00.5.5h2.5a.5.5 0 000-1H2.258a4.5 4.5 0 11-.496 4.016.5.5 0 10-.942.337 5.502 5.502 0 008.724 2.353.5.5 0 00.102.148l3 3a.5.5 0 00.708-.708l-3-3a.5.5 0 00-.148-.102A5.5 5.5 0 101.5 2.837z`,fill:e}))),le=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M10.139 8.725l1.36-1.323a.568.568 0 00.151-.54.534.534 0 00-.377-.396l-2.705-.708 2.22-4.976a.568.568 0 00-.15-.666.497.497 0 00-.648.008L5.464 4.05l.708.71 2.848-2.47-1.64 3.677.697.697 2.164.567-.81.787.708.708zM2.523 6.6a.566.566 0 00-.177.544.534.534 0 00.382.41l2.782.721-1.494 5.013a.563.563 0 00.217.627.496.496 0 00.629-.06l3.843-3.736-.708-.707-2.51 2.44 1.137-3.814-.685-.685-2.125-.55.844-.731-.71-.71L2.524 6.6zM1.854 1.146a.5.5 0 10-.708.708l11 11a.5.5 0 00.708-.708l-11-11z`,fill:e}))),ue=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M4 5.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5zM4.5 7.5a.5.5 0 000 1h5a.5.5 0 000-1h-5zM4 10.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5z`,fill:e}),F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M1.5 0a.5.5 0 00-.5.5v13a.5.5 0 00.5.5h11a.5.5 0 00.5-.5V3.207a.5.5 0 00-.146-.353L10.146.146A.5.5 0 009.793 0H1.5zM2 1h7.5v2a.5.5 0 00.5.5h2V13H2V1z`,fill:e}))),de=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M8.982 1.632a.5.5 0 00-.964-.263l-3 11a.5.5 0 10.964.263l3-11zM3.32 3.616a.5.5 0 01.064.704L1.151 7l2.233 2.68a.5.5 0 11-.768.64l-2.5-3a.5.5 0 010-.64l2.5-3a.5.5 0 01.704-.064zM10.68 3.616a.5.5 0 00-.064.704L12.849 7l-2.233 2.68a.5.5 0 00.768.64l2.5-3a.5.5 0 000-.64l-2.5-3a.5.5 0 00-.704-.064z`,fill:e}))),fe=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M1.854 1.146a.5.5 0 10-.708.708L6.293 7l-5.147 5.146a.5.5 0 00.708.708L7 7.707l5.146 5.147a.5.5 0 00.708-.708L7.707 7l5.147-5.146a.5.5 0 00-.708-.708L7 6.293 1.854 1.146z`,fill:e}))),pe=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M7 3a.5.5 0 01.5.5v3h3a.5.5 0 010 1h-3v3a.5.5 0 01-1 0v-3h-3a.5.5 0 010-1h3v-3A.5.5 0 017 3z`,fill:e}),F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z`,fill:e}))),me=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M3.5 6.5a.5.5 0 000 1h7a.5.5 0 000-1h-7z`,fill:e}),F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z`,fill:e}))),he=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M9.854 4.146a.5.5 0 010 .708L7.707 7l2.147 2.146a.5.5 0 01-.708.708L7 7.707 4.854 9.854a.5.5 0 01-.708-.708L6.293 7 4.146 4.854a.5.5 0 11.708-.708L7 6.293l2.146-2.147a.5.5 0 01.708 0z`,fill:e}),F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z`,fill:e}))),ge=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7 14A7 7 0 107 0a7 7 0 000 14zm2.854-9.854a.5.5 0 010 .708L7.707 7l2.147 2.146a.5.5 0 01-.708.708L7 7.707 4.854 9.854a.5.5 0 01-.708-.708L6.293 7 4.146 4.854a.5.5 0 11.708-.708L7 6.293l2.146-2.147a.5.5 0 01.708 0z`,fill:e}))),_e=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M11.841 2.159a2.25 2.25 0 00-3.182 0l-2.5 2.5a2.25 2.25 0 000 3.182.5.5 0 01-.707.707 3.25 3.25 0 010-4.596l2.5-2.5a3.25 3.25 0 014.596 4.596l-2.063 2.063a4.27 4.27 0 00-.094-1.32l1.45-1.45a2.25 2.25 0 000-3.182z`,fill:e}),F.createElement(`path`,{d:`M3.61 7.21c-.1-.434-.132-.88-.095-1.321L1.452 7.952a3.25 3.25 0 104.596 4.596l2.5-2.5a3.25 3.25 0 000-4.596.5.5 0 00-.707.707 2.25 2.25 0 010 3.182l-2.5 2.5A2.25 2.25 0 112.159 8.66l1.45-1.45z`,fill:e}))),ve=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M2 1.004a1 1 0 00-1 1v10a1 1 0 001 1h10a1 1 0 001-1v-4.5a.5.5 0 00-1 0v4.5H2v-10h4.5a.5.5 0 000-1H2z`,fill:e}),F.createElement(`path`,{d:`M7.354 7.357L12 2.711v1.793a.5.5 0 001 0v-3a.5.5 0 00-.5-.5h-3a.5.5 0 100 1h1.793L6.646 6.65a.5.5 0 10.708.707z`,fill:e}))),ye=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M1.146 4.604l5.5 5.5a.5.5 0 00.708 0l5.5-5.5a.5.5 0 00-.708-.708L7 9.043 1.854 3.896a.5.5 0 10-.708.708z`,fill:e}))),be=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M11.104 7.354l-5.5 5.5a.5.5 0 01-.708-.708L10.043 7 4.896 1.854a.5.5 0 11.708-.708l5.5 5.5a.5.5 0 010 .708z`,fill:e}))),xe=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M3.854 9.104a.5.5 0 11-.708-.708l3.5-3.5a.5.5 0 01.708 0l3.5 3.5a.5.5 0 01-.708.708L7 5.957 3.854 9.104z`,fill:e}))),Se=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M3.854 4.896a.5.5 0 10-.708.708l3.5 3.5a.5.5 0 00.708 0l3.5-3.5a.5.5 0 00-.708-.708L7 8.043 3.854 4.896z`,fill:e}))),Ce=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M9.104 10.146a.5.5 0 01-.708.708l-3.5-3.5a.5.5 0 010-.708l3.5-3.5a.5.5 0 11.708.708L5.957 7l3.147 3.146z`,fill:e}))),we=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M4.896 10.146a.5.5 0 00.708.708l3.5-3.5a.5.5 0 000-.708l-3.5-3.5a.5.5 0 10-.708.708L8.043 7l-3.147 3.146z`,fill:e}))),Te=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M1.146 3.854a.5.5 0 010-.708l2-2a.5.5 0 11.708.708L2.707 3h6.295A4 4 0 019 11H3a.5.5 0 010-1h6a3 3 0 100-6H2.707l1.147 1.146a.5.5 0 11-.708.708l-2-2z`,fill:e}))),Ee=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M7.092.5H7a6.5 6.5 0 106.41 7.583.5.5 0 10-.986-.166A5.495 5.495 0 017 12.5a5.5 5.5 0 010-11h.006a5.5 5.5 0 014.894 3H10a.5.5 0 000 1h3a.5.5 0 00.5-.5V2a.5.5 0 00-1 0v1.535A6.495 6.495 0 007.092.5z`,fill:e}))),De=new Map,Oe=`UNIVERSAL_STORE:`,ke={PENDING:`PENDING`,RESOLVED:`RESOLVED`,REJECTED:`REJECTED`},Ae=class e{constructor(t,n){if(this.debugging=!1,this.listeners=new Map([[`*`,new Set]]),this.getState=()=>(this.debug(`getState`,{state:this.state}),this.state),this.subscribe=(e,t)=>{let n=typeof e==`function`,r=n?`*`:e,i=n?e:t;if(this.debug(`subscribe`,{eventType:r,listener:i}),!i)throw TypeError(`Missing first subscribe argument, or second if first is the event type, when subscribing to a UniversalStore with id '${this.id}'`);return this.listeners.has(r)||this.listeners.set(r,new Set),this.listeners.get(r).add(i),()=>{this.debug(`unsubscribe`,{eventType:r,listener:i}),this.listeners.has(r)&&(this.listeners.get(r).delete(i),this.listeners.get(r)?.size===0&&this.listeners.delete(r))}},this.send=t=>{if(this.debug(`send`,{event:t}),this.status!==e.Status.READY)throw TypeError(m`Cannot send event before store is ready. You can get the current status with store.status,
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./theming-DpsViFyv.js","./iframe-B7buKd6W.js","./preload-helper-Bhb7V-Yo.js","./syntaxhighlighter-ED5Y7EFY-DYFKPQ-I.js","./react-dom-O1LTTn3X.js","./chunk-242VQQM5-By-lqKqL.js","./chunk-YKABRMAI-nN4IfCIz.js","./formatter-EIJCOSYU-Bo0DMj3p.js","./WithTooltip-65CFNBJE-B1vNinkY.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as e}from"./preload-helper-Bhb7V-Yo.js";import{C as t,E as n,O as r,S as i,T as a,_ as o,a as s,b as c,c as l,d as u,g as d,h as f,j as p,l as m,m as h,s as g,t as _,u as v,v as y,w as b,x,y as S}from"./iframe-B7buKd6W.js";import{_ as C,a as w,d as T,f as E,g as D,h as O,i as k,l as A,m as j,o as M,s as N,u as P,v as ee,y as te}from"./theming-DpsViFyv.js";import{t as ne}from"./react-dom-O1LTTn3X.js";import{n as re,r as ie}from"./chunk-YKABRMAI-nN4IfCIz.js";import{t as ae}from"./chunk-242VQQM5-By-lqKqL.js";var F=p(s(),1),oe=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M6 3.5a.5.5 0 01.5.5v1.5H8a.5.5 0 010 1H6.5V8a.5.5 0 01-1 0V6.5H4a.5.5 0 010-1h1.5V4a.5.5 0 01.5-.5z`,fill:e}),F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M9.544 10.206a5.5 5.5 0 11.662-.662.5.5 0 01.148.102l3 3a.5.5 0 01-.708.708l-3-3a.5.5 0 01-.102-.148zM10.5 6a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0z`,fill:e}))),se=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M4 5.5a.5.5 0 000 1h4a.5.5 0 000-1H4z`,fill:e}),F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M6 11.5c1.35 0 2.587-.487 3.544-1.294a.5.5 0 00.102.148l3 3a.5.5 0 00.708-.708l-3-3a.5.5 0 00-.148-.102A5.5 5.5 0 106 11.5zm0-1a4.5 4.5 0 100-9 4.5 4.5 0 000 9z`,fill:e}))),ce=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M1.5 2.837V1.5a.5.5 0 00-1 0V4a.5.5 0 00.5.5h2.5a.5.5 0 000-1H2.258a4.5 4.5 0 11-.496 4.016.5.5 0 10-.942.337 5.502 5.502 0 008.724 2.353.5.5 0 00.102.148l3 3a.5.5 0 00.708-.708l-3-3a.5.5 0 00-.148-.102A5.5 5.5 0 101.5 2.837z`,fill:e}))),le=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M10.139 8.725l1.36-1.323a.568.568 0 00.151-.54.534.534 0 00-.377-.396l-2.705-.708 2.22-4.976a.568.568 0 00-.15-.666.497.497 0 00-.648.008L5.464 4.05l.708.71 2.848-2.47-1.64 3.677.697.697 2.164.567-.81.787.708.708zM2.523 6.6a.566.566 0 00-.177.544.534.534 0 00.382.41l2.782.721-1.494 5.013a.563.563 0 00.217.627.496.496 0 00.629-.06l3.843-3.736-.708-.707-2.51 2.44 1.137-3.814-.685-.685-2.125-.55.844-.731-.71-.71L2.524 6.6zM1.854 1.146a.5.5 0 10-.708.708l11 11a.5.5 0 00.708-.708l-11-11z`,fill:e}))),ue=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M4 5.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5zM4.5 7.5a.5.5 0 000 1h5a.5.5 0 000-1h-5zM4 10.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5z`,fill:e}),F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M1.5 0a.5.5 0 00-.5.5v13a.5.5 0 00.5.5h11a.5.5 0 00.5-.5V3.207a.5.5 0 00-.146-.353L10.146.146A.5.5 0 009.793 0H1.5zM2 1h7.5v2a.5.5 0 00.5.5h2V13H2V1z`,fill:e}))),de=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M8.982 1.632a.5.5 0 00-.964-.263l-3 11a.5.5 0 10.964.263l3-11zM3.32 3.616a.5.5 0 01.064.704L1.151 7l2.233 2.68a.5.5 0 11-.768.64l-2.5-3a.5.5 0 010-.64l2.5-3a.5.5 0 01.704-.064zM10.68 3.616a.5.5 0 00-.064.704L12.849 7l-2.233 2.68a.5.5 0 00.768.64l2.5-3a.5.5 0 000-.64l-2.5-3a.5.5 0 00-.704-.064z`,fill:e}))),fe=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M1.854 1.146a.5.5 0 10-.708.708L6.293 7l-5.147 5.146a.5.5 0 00.708.708L7 7.707l5.146 5.147a.5.5 0 00.708-.708L7.707 7l5.147-5.146a.5.5 0 00-.708-.708L7 6.293 1.854 1.146z`,fill:e}))),pe=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M7 3a.5.5 0 01.5.5v3h3a.5.5 0 010 1h-3v3a.5.5 0 01-1 0v-3h-3a.5.5 0 010-1h3v-3A.5.5 0 017 3z`,fill:e}),F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z`,fill:e}))),me=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M3.5 6.5a.5.5 0 000 1h7a.5.5 0 000-1h-7z`,fill:e}),F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z`,fill:e}))),he=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M9.854 4.146a.5.5 0 010 .708L7.707 7l2.147 2.146a.5.5 0 01-.708.708L7 7.707 4.854 9.854a.5.5 0 01-.708-.708L6.293 7 4.146 4.854a.5.5 0 11.708-.708L7 6.293l2.146-2.147a.5.5 0 01.708 0z`,fill:e}),F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z`,fill:e}))),ge=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7 14A7 7 0 107 0a7 7 0 000 14zm2.854-9.854a.5.5 0 010 .708L7.707 7l2.147 2.146a.5.5 0 01-.708.708L7 7.707 4.854 9.854a.5.5 0 01-.708-.708L6.293 7 4.146 4.854a.5.5 0 11.708-.708L7 6.293l2.146-2.147a.5.5 0 01.708 0z`,fill:e}))),_e=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M11.841 2.159a2.25 2.25 0 00-3.182 0l-2.5 2.5a2.25 2.25 0 000 3.182.5.5 0 01-.707.707 3.25 3.25 0 010-4.596l2.5-2.5a3.25 3.25 0 014.596 4.596l-2.063 2.063a4.27 4.27 0 00-.094-1.32l1.45-1.45a2.25 2.25 0 000-3.182z`,fill:e}),F.createElement(`path`,{d:`M3.61 7.21c-.1-.434-.132-.88-.095-1.321L1.452 7.952a3.25 3.25 0 104.596 4.596l2.5-2.5a3.25 3.25 0 000-4.596.5.5 0 00-.707.707 2.25 2.25 0 010 3.182l-2.5 2.5A2.25 2.25 0 112.159 8.66l1.45-1.45z`,fill:e}))),ve=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M2 1.004a1 1 0 00-1 1v10a1 1 0 001 1h10a1 1 0 001-1v-4.5a.5.5 0 00-1 0v4.5H2v-10h4.5a.5.5 0 000-1H2z`,fill:e}),F.createElement(`path`,{d:`M7.354 7.357L12 2.711v1.793a.5.5 0 001 0v-3a.5.5 0 00-.5-.5h-3a.5.5 0 100 1h1.793L6.646 6.65a.5.5 0 10.708.707z`,fill:e}))),ye=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M1.146 4.604l5.5 5.5a.5.5 0 00.708 0l5.5-5.5a.5.5 0 00-.708-.708L7 9.043 1.854 3.896a.5.5 0 10-.708.708z`,fill:e}))),be=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M11.104 7.354l-5.5 5.5a.5.5 0 01-.708-.708L10.043 7 4.896 1.854a.5.5 0 11.708-.708l5.5 5.5a.5.5 0 010 .708z`,fill:e}))),xe=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M3.854 9.104a.5.5 0 11-.708-.708l3.5-3.5a.5.5 0 01.708 0l3.5 3.5a.5.5 0 01-.708.708L7 5.957 3.854 9.104z`,fill:e}))),Se=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M3.854 4.896a.5.5 0 10-.708.708l3.5 3.5a.5.5 0 00.708 0l3.5-3.5a.5.5 0 00-.708-.708L7 8.043 3.854 4.896z`,fill:e}))),Ce=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M9.104 10.146a.5.5 0 01-.708.708l-3.5-3.5a.5.5 0 010-.708l3.5-3.5a.5.5 0 11.708.708L5.957 7l3.147 3.146z`,fill:e}))),we=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M4.896 10.146a.5.5 0 00.708.708l3.5-3.5a.5.5 0 000-.708l-3.5-3.5a.5.5 0 10-.708.708L8.043 7l-3.147 3.146z`,fill:e}))),Te=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M1.146 3.854a.5.5 0 010-.708l2-2a.5.5 0 11.708.708L2.707 3h6.295A4 4 0 019 11H3a.5.5 0 010-1h6a3 3 0 100-6H2.707l1.147 1.146a.5.5 0 11-.708.708l-2-2z`,fill:e}))),Ee=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M7.092.5H7a6.5 6.5 0 106.41 7.583.5.5 0 10-.986-.166A5.495 5.495 0 017 12.5a5.5 5.5 0 010-11h.006a5.5 5.5 0 014.894 3H10a.5.5 0 000 1h3a.5.5 0 00.5-.5V2a.5.5 0 00-1 0v1.535A6.495 6.495 0 007.092.5z`,fill:e}))),De=new Map,Oe=`UNIVERSAL_STORE:`,ke={PENDING:`PENDING`,RESOLVED:`RESOLVED`,REJECTED:`REJECTED`},Ae=class e{constructor(t,n){if(this.debugging=!1,this.listeners=new Map([[`*`,new Set]]),this.getState=()=>(this.debug(`getState`,{state:this.state}),this.state),this.subscribe=(e,t)=>{let n=typeof e==`function`,r=n?`*`:e,i=n?e:t;if(this.debug(`subscribe`,{eventType:r,listener:i}),!i)throw TypeError(`Missing first subscribe argument, or second if first is the event type, when subscribing to a UniversalStore with id '${this.id}'`);return this.listeners.has(r)||this.listeners.set(r,new Set),this.listeners.get(r).add(i),()=>{this.debug(`unsubscribe`,{eventType:r,listener:i}),this.listeners.has(r)&&(this.listeners.get(r).delete(i),this.listeners.get(r)?.size===0&&this.listeners.delete(r))}},this.send=t=>{if(this.debug(`send`,{event:t}),this.status!==e.Status.READY)throw TypeError(m`Cannot send event before store is ready. You can get the current status with store.status,
|
|
3
3
|
or await store.readyPromise to wait for the store to be ready before sending events.
|
|
4
4
|
${JSON.stringify({event:t,id:this.id,actor:this.actor,environment:this.environment},null,2)}`);this.emitToListeners(t,{actor:this.actor}),this.emitToChannel(t,{actor:this.actor})},this.debugging=t.debug??!1,!e.isInternalConstructing)throw TypeError(`UniversalStore is not constructable - use UniversalStore.create() instead`);if(e.isInternalConstructing=!1,this.id=t.id,this.actorId=Date.now().toString(36)+Math.random().toString(36).substring(2),this.actorType=t.leader?e.ActorType.LEADER:e.ActorType.FOLLOWER,this.state=t.initialState,this.channelEventName=`${Oe}${this.id}`,this.debug(`constructor`,{options:t,environmentOverrides:n,channelEventName:this.channelEventName}),this.actor.type===e.ActorType.LEADER)this.syncing={state:ke.RESOLVED,promise:Promise.resolve()};else{let e,t,n=new Promise((n,r)=>{e=()=>{this.syncing.state===ke.PENDING&&(this.syncing.state=ke.RESOLVED,n())},t=e=>{this.syncing.state===ke.PENDING&&(this.syncing.state=ke.REJECTED,r(e))}});this.syncing={state:ke.PENDING,promise:n,resolve:e,reject:t}}this.getState=this.getState.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),this.onStateChange=this.onStateChange.bind(this),this.send=this.send.bind(this),this.emitToChannel=this.emitToChannel.bind(this),this.prepareThis=this.prepareThis.bind(this),this.emitToListeners=this.emitToListeners.bind(this),this.handleChannelEvents=this.handleChannelEvents.bind(this),this.debug=this.debug.bind(this),this.channel=n?.channel??e.preparation.channel,this.environment=n?.environment??e.preparation.environment,this.channel&&this.environment?(e.preparation.resolve({channel:this.channel,environment:this.environment}),this.prepareThis({channel:this.channel,environment:this.environment})):e.preparation.promise.then(this.prepareThis)}static setupPreparationPromise(){let t,n,r=new Promise((e,r)=>{t=t=>{e(t)},n=(...e)=>{r(e)}});e.preparation={resolve:t,reject:n,promise:r}}get actor(){return Object.freeze({id:this.actorId,type:this.actorType,environment:this.environment??e.Environment.UNKNOWN})}get status(){if(!this.channel||!this.environment)return e.Status.UNPREPARED;switch(this.syncing?.state){case ke.PENDING:case void 0:return e.Status.SYNCING;case ke.REJECTED:return e.Status.ERROR;case ke.RESOLVED:default:return e.Status.READY}}untilReady(){return Promise.all([e.preparation.promise,this.syncing?.promise])}static create(t){if(!t||typeof t?.id!=`string`)throw TypeError(`id is required and must be a string, when creating a UniversalStore`);t.debug&&console.debug(m`[UniversalStore]
|
|
5
5
|
create`,{options:t});let n=De.get(t.id);if(n)return console.warn(m`UniversalStore with id "${t.id}" already exists in this environment, re-using existing.
|
|
@@ -33,7 +33,7 @@ More info: ${i}
|
|
|
33
33
|
it's possible a CORS error happened.
|
|
34
34
|
|
|
35
35
|
Please check your dev-tools network tab.
|
|
36
|
-
`});let h=e.versions&&Object.keys(e.versions).length?e.versions:s.versions;await a.setRef(t,{id:t,url:u.url,...s,...h?{versions:h}:{},type:s.storyIndex?`lazy`:`auto-inject`})},getRefs:()=>{let{refs:t={}}=e.getState();return t},setRef:async(i,{storyIndex:o,setStoriesData:s,...c},l=!1)=>{if(n)return;let u,d,f,{filters:p}=e.getState(),{storyMapper:m=sc}=t.getConfig(),h=a.getRefs()[i];(o||s)&&(u=s?Xs(dc(s,h,{storyMapper:m})):o,f=ec(o,{provider:t,docsOptions:r,filters:p,allStatuses:{}}),d=ec(o,{provider:t,docsOptions:r,filters:{},allStatuses:{}})),d&&=cc(d,h),f&&=cc(f,h),await a.updateRef(i,{...h,...c,index:d,filteredIndex:f,internal_index:u})},updateRef:async(t,n)=>{let{[t]:r,...i}=a.getRefs();i[t]={...r,...n};let o=Object.keys(s).reduce((e,t)=>(e[t]=i[t],e),{});await e.setState({refs:o})}},o=!n&&Gs.REFS||{},s=o;return i&&new Promise(async e=>{for(let e of Object.values(o))await a.checkRef({...e,stories:{}});e(void 0)}),{api:a,state:{refs:s}}},pc=(e,t)=>{let{source:n,refId:r,type:i}=e,[a,o]=oc(n,r),s;(r||a===`external`)&&(s=r&&t.getRefs()[r]?t.getRefs()[r]:t.findRef(o));let c={source:n,sourceType:a,sourceLocation:o,refId:r,ref:s,type:i};switch(!0){case typeof r==`string`:case a===`local`:case a===`external`:return c;default:return Us.warn(`Received a ${i} frame that was not configured as a ref`),null}},mc=({store:e,fullAPI:t,provider:n})=>{let r={getGlobals(){return e.getState().globals},getUserGlobals(){return e.getState().userGlobals},getStoryGlobals(){return e.getState().storyGlobals},getGlobalTypes(){return e.getState().globalTypes},updateGlobals(e){n.channel?.emit(Hs,{globals:e,options:{target:`storybook-preview-iframe`}})}},i={globals:{},userGlobals:{},storyGlobals:{},globalTypes:{}},a=({globals:t,storyGlobals:n,userGlobals:r})=>{let{globals:i,userGlobals:a,storyGlobals:o}=e.getState();Ti(t,i)||e.setState({globals:t}),Ti(r,a)||e.setState({userGlobals:r}),Ti(n,o)||e.setState({storyGlobals:n})};return n.channel?.on(Bs,function({globals:e,storyGlobals:n,userGlobals:r}){let{ref:i}=pc(this,t);i?zs.warn(`received a GLOBALS_UPDATED from a non-local ref. This is not currently supported.`):a({globals:e,storyGlobals:n,userGlobals:r})}),n.channel?.on(Vs,function({globals:n,globalTypes:i}){let{ref:a}=pc(this,t),o=e.getState()?.globals;a?Object.keys(n).length>0&&zs.warn(`received globals from a non-local ref. This is not currently supported.`):e.setState({globals:n,userGlobals:n,globalTypes:i}),o&&Object.keys(o).length!==0&&!Ti(n,o)&&r.updateGlobals(o)}),{api:r,state:i}},hc={};i(hc,{ActiveTabs:()=>bc,defaultLayoutState:()=>xc,focusableUIElements:()=>Sc,init:()=>Dc});var{SET_CONFIG:gc}=__STORYBOOK_MODULE_CORE_EVENTS__,{global:_c}=__STORYBOOK_MODULE_GLOBAL__,{document:vc}=_c,yc=e=>typeof e==`function`,bc={SIDEBAR:`sidebar`,CANVAS:`canvas`,ADDONS:`addons`},xc={ui:{enableShortcuts:!0},layout:{initialActive:bc.CANVAS,showToolbar:!0,navSize:300,bottomPanelHeight:300,rightPanelWidth:400,recentVisibleSizes:{navSize:300,bottomPanelHeight:300,rightPanelWidth:400},panelPosition:`bottom`,showTabs:!0},layoutCustomisations:{showSidebar:void 0,showToolbar:void 0},selectedPanel:void 0,theme:T()},Sc={storySearchField:`storybook-explorer-searchfield`,storyListMenu:`storybook-explorer-menu`,storyPanelRoot:`storybook-panel-root`},Cc=e=>e.layout.navSize>0,wc=e=>{let{bottomPanelHeight:t,rightPanelWidth:n,panelPosition:r}=e.layout;return r===`bottom`&&t>0||r===`right`&&n>0},Tc=e=>!Cc(e)&&!wc(e),Ec=e=>({navSize:e.navSize>0?e.navSize:e.recentVisibleSizes.navSize,bottomPanelHeight:e.bottomPanelHeight>0?e.bottomPanelHeight:e.recentVisibleSizes.bottomPanelHeight,rightPanelWidth:e.rightPanelWidth>0?e.rightPanelWidth:e.recentVisibleSizes.rightPanelWidth}),Dc=({store:e,provider:t,singleStory:n})=>{let r={toggleFullscreen(t){return e.setState(e=>{let n=Tc(e),r=typeof t==`boolean`?t:!n;return r===n?{layout:e.layout}:r?{layout:{...e.layout,navSize:0,bottomPanelHeight:0,rightPanelWidth:0,recentVisibleSizes:Ec(e.layout)}}:{layout:{...e.layout,navSize:e.singleStory?0:e.layout.recentVisibleSizes.navSize,bottomPanelHeight:e.layout.recentVisibleSizes.bottomPanelHeight,rightPanelWidth:e.layout.recentVisibleSizes.rightPanelWidth}}},{persistence:`session`})},togglePanel(t){return e.setState(e=>{let n=wc(e),r=typeof t==`boolean`?t:!n;return r===n?{layout:e.layout}:r?{layout:{...e.layout,bottomPanelHeight:e.layout.recentVisibleSizes.bottomPanelHeight,rightPanelWidth:e.layout.recentVisibleSizes.rightPanelWidth}}:{layout:{...e.layout,bottomPanelHeight:0,rightPanelWidth:0,recentVisibleSizes:Ec(e.layout)}}},{persistence:`session`})},togglePanelPosition(t){return e.setState(e=>{let n=t||(e.layout.panelPosition===`right`?`bottom`:`right`);return{layout:{...e.layout,panelPosition:n,bottomPanelHeight:e.layout.recentVisibleSizes.bottomPanelHeight,rightPanelWidth:e.layout.recentVisibleSizes.rightPanelWidth}}},{persistence:`permanent`})},toggleNav(t){return e.setState(e=>{if(e.singleStory)return{layout:e.layout};let n=Cc(e),r=typeof t==`boolean`?t:!n;return r===n?{layout:e.layout}:r?{layout:{...e.layout,navSize:e.layout.recentVisibleSizes.navSize}}:{layout:{...e.layout,navSize:0,recentVisibleSizes:Ec(e.layout)}}},{persistence:`session`})},toggleToolbar(t){return e.setState(e=>{let n=typeof t<`u`?t:!e.layout.showToolbar;return{layout:{...e.layout,showToolbar:n}}},{persistence:`session`})},setSizes({navSize:t,bottomPanelHeight:n,rightPanelWidth:r}){return e.setState(e=>{let i={...e.layout,navSize:t??e.layout.navSize,bottomPanelHeight:n??e.layout.bottomPanelHeight,rightPanelWidth:r??e.layout.rightPanelWidth};return{layout:{...i,recentVisibleSizes:Ec(i)}}},{persistence:`session`})},focusOnUIElement(e,t){if(!e)return;let n=Date.now(),r=()=>{let n=vc.getElementById(e);return!n||(n.focus(),n!==vc.activeElement)?!1:(t&&n.select?.(),!0)};if(r())return;let i=setInterval(()=>{if(Date.now()-n>=500){clearInterval(i);return}r()&&clearInterval(i)},50)},getInitialOptions(){let{theme:e,selectedPanel:r,layoutCustomisations:i,...a}=t.getConfig();return{...xc,layout:{...y(xc.layout,o(a,Object.keys(xc.layout))),...n&&{navSize:0}},layoutCustomisations:{...xc.layoutCustomisations,...i??{}},ui:y(xc.ui,o(a,Object.keys(xc.ui))),selectedPanel:r||xc.selectedPanel,theme:e||xc.theme}},getIsFullscreen(){return Tc(e.getState())},getIsPanelShown(){return wc(e.getState())},getIsNavShown(){return Cc(e.getState())},getShowToolbarWithCustomisations(t){let n=e.getState();return yc(n.layoutCustomisations.showToolbar)?n.layoutCustomisations.showToolbar(n,t)??t:t},getShowPanelWithCustomisations(t){let n=e.getState();return yc(n.layoutCustomisations.showPanel)?n.layoutCustomisations.showPanel(n,t)??t:t},getNavSizeWithCustomisations(t){let n=e.getState();if(yc(n.layoutCustomisations.showSidebar)){let e=n.layoutCustomisations.showSidebar(n,t!==0);if(t===0&&e===!0)return n.layout.recentVisibleSizes.navSize;if(t!==0&&e===!1)return 0}return t},setOptions:t=>{let{layout:r,ui:i,selectedPanel:a,theme:s}=e.getState();if(!t)return;let c={...r,...t.layout||{},...o(t,Object.keys(r)),...n&&{navSize:0}},l={...i,...t.ui,...y(t.ui||{},o(t,Object.keys(i)))},d={...s,...t.theme},f={};u(i,l)||(f.ui=l),u(r,c)||(f.layout=c),t.selectedPanel&&!u(a,t.selectedPanel)&&(f.selectedPanel=t.selectedPanel),Object.keys(f).length&&e.setState(f,{persistence:`permanent`}),u(s,d)||e.setState({theme:d})}},i=o(e.getState(),[`layout`,`selectedPanel`]);return t.channel?.on(gc,()=>{r.setOptions(bs(r.getInitialOptions(),i))}),{api:r,state:bs(r.getInitialOptions(),i)}},Oc={};i(Oc,{init:()=>kc});var kc=({store:e})=>({api:{addNotification:t=>{e.setState(({notifications:e})=>{let[n,r]=Ei(e,e=>e.id===t.id);return n.forEach(e=>{e.onClear&&e.onClear({dismissed:!1,timeout:!1})}),{notifications:[...r,t]}})},clearNotification:t=>{e.setState(({notifications:e})=>{let[n,r]=Ei(e,e=>e.id===t);return n.forEach(e=>{e.onClear&&e.onClear({dismissed:!1,timeout:!1})}),{notifications:r}})}},state:{notifications:[]}}),Ac={};i(Ac,{init:()=>Nc});var{OPEN_IN_EDITOR_REQUEST:jc,OPEN_IN_EDITOR_RESPONSE:Mc}=__STORYBOOK_MODULE_CORE_EVENTS__,Nc=({provider:t,fullAPI:n})=>({api:{openInEditor(e){return new Promise(n=>{let{file:r,line:i,column:a}=e,o=e=>{e.file===r&&e.line===i&&e.column===a&&(t.channel?.off(Mc,o),n(e))};t.channel?.on(Mc,o),t.channel?.emit(jc,e)})}},state:{notifications:[]},init:async()=>{let{color:r}=await e(async()=>{let{color:e}=await import(`./theming-BGumyAJ5.js`).then(e=>e.c);return{color:e}},__vite__mapDeps([0,1,2]),import.meta.url);t.channel?.on(Mc,e=>{e.error!==null&&n.addNotification({id:`open-in-editor-error`,content:{headline:`Failed to open in editor`,subHeadline:e.error||`Check the Storybook process on the command line for more details.`},icon:F.createElement(ge,{color:r.negative}),duration:8e3})})}}),Pc={};i(Pc,{init:()=>Fc});var Fc=({provider:e,fullAPI:t})=>({api:e.renderPreview?{renderPreview:e.renderPreview}:{},state:{},init:()=>{e.handleAPI(t)}}),Ic={};i(Ic,{init:()=>Lc});var Lc=({store:e,navigate:t,fullAPI:n})=>({state:{settings:{lastTrackedStoryId:null}},api:{closeSettings:()=>{let{settings:{lastTrackedStoryId:t}}=e.getState();t?n.selectStory(t):n.selectFirstStory()},changeSettingsTab:e=>{t(`/settings/${e}`)},isSettingsScreenActive:()=>{let{path:e}=n.getUrlState();return!!(e||``).match(/^\/settings/)},retrieveSelection(){let{settings:t}=e.getState();return t.lastTrackedStoryId},storeSelection:async()=>{let{storyId:t,settings:n}=e.getState();await e.setState({settings:{...n,lastTrackedStoryId:t}})}}}),Rc={};i(Rc,{controlOrMetaKey:()=>rl,defaultShortcuts:()=>al,init:()=>cl,isMacLike:()=>nl,keys:()=>il});var zc=t(ls(),1),{FORCE_REMOUNT:Bc,PREVIEW_KEYDOWN:Vc,STORIES_COLLAPSE_ALL:Hc,STORIES_EXPAND_ALL:Uc}=__STORYBOOK_MODULE_CORE_EVENTS__,{global:Wc}=__STORYBOOK_MODULE_GLOBAL__,{global:Gc}=__STORYBOOK_MODULE_GLOBAL__,{navigator:Kc}=Gc,qc=()=>Kc&&Kc.platform?!!Kc.platform.match(/(Mac|iPhone|iPod|iPad)/i):!1,Jc=()=>qc()?`⌥`:`alt`,Yc=e=>{if([`Meta`,`Alt`,`Control`,`Shift`,`Tab`].includes(e.key))return null;let t=[];e.altKey&&t.push(`alt`),e.ctrlKey&&t.push(`control`),e.metaKey&&t.push(`meta`),e.shiftKey&&t.push(`shift`);let n=e.code?.toUpperCase(),r=n?n.startsWith(`KEY`)&&n.length===4?n.replace(`KEY`,``):n.startsWith(`DIGIT`)?n.replace(`DIGIT`,``):{MINUS:`-`,EQUAL:`=`,BRACKETLEFT:`[`,BRACKETRIGHT:`]`,BACKSLASH:`\\`,SEMICOLON:`;`,QUOTE:`'`,BACKQUOTE:"`",COMMA:`,`,PERIOD:`.`,SLASH:`/`}[n]:void 0;if(e.key&&e.key.length===1&&e.key!==` `){let n=e.key.toUpperCase(),i=r;i&&i.length===1&&i!==n?t.push([n,i]):t.push(n)}else e.key===`Dead`&&r&&t.push(r);return e.key===` `&&t.push(`space`),e.key===`Escape`&&t.push(`escape`),e.key===`ArrowRight`&&t.push(`ArrowRight`),e.key===`ArrowDown`&&t.push(`ArrowDown`),e.key===`ArrowUp`&&t.push(`ArrowUp`),e.key===`ArrowLeft`&&t.push(`ArrowLeft`),t.length>0?t:null},Xc=(e,t)=>!e||!t||(e.join(``).startsWith(`shift/`)&&e.shift(),e.length!==t.length)?!1:!e.find((e,n)=>Array.isArray(e)?!e.includes(t[n]):e!==t[n]),Zc=e=>e===`alt`?Jc():e===`control`?`⌃`:e===`meta`?`⌘`:e===`shift`?`⇧`:e===`Enter`||e===`Backspace`||e===`Esc`||e===`escape`?``:e===` `?`SPACE`:e===`ArrowUp`?`↑`:e===`ArrowDown`?`↓`:e===`ArrowLeft`?`←`:e===`ArrowRight`?`→`:e?.toUpperCase(),Qc=e=>e.map(Zc).join(` `),$c=e=>e.map(e=>e===`+`?`plus`:e===` `?`space`:e).join(`+`),{navigator:el,document:tl}=Wc,nl=()=>el&&el.platform?!!el.platform.match(/(Mac|iPhone|iPod|iPad)/i):!1,rl=()=>nl()?`meta`:`control`;function il(e){return Object.keys(e)}var al=Object.freeze({fullScreen:[`alt`,`F`],togglePanel:[`alt`,`A`],panelPosition:[`alt`,`D`],toggleNav:[`alt`,`S`],toolbar:[`alt`,`T`],search:[rl(),`K`],focusNav:[`1`],focusIframe:[`2`],focusPanel:[`3`],prevComponent:[`alt`,`ArrowUp`],nextComponent:[`alt`,`ArrowDown`],prevStory:[`alt`,`ArrowLeft`],nextStory:[`alt`,`ArrowRight`],shortcutsPage:[rl(),`shift`,`,`],aboutPage:[rl(),`,`],escape:[`escape`],collapseAll:[rl(),`shift`,`ArrowUp`],expandAll:[rl(),`shift`,`ArrowDown`],remount:[`alt`,`R`],openInEditor:[`alt`,`shift`,`E`],openInIsolation:[`alt`,`shift`,`I`],copyStoryLink:[`alt`,`shift`,`L`],goToPreviousLandmark:[`shift`,`F6`],goToNextLandmark:[`F6`]}),ol={};function sl(e){let t=e.target;return!!(/input|textarea/i.test(t.tagName)||t.getAttribute(`contenteditable`)!==null||t.closest(`dialog[open]`))}var cl=({store:e,fullAPI:t,provider:n})=>{let r={getShortcutKeys(){return e.getState().shortcuts},getDefaultShortcuts(){return{...al,...r.getAddonsShortcutDefaults()}},getAddonsShortcuts(){return ol},getAddonsShortcutLabels(){let e={};return Object.entries(r.getAddonsShortcuts()).forEach(([t,{label:n}])=>{e[t]=n}),e},getAddonsShortcutDefaults(){let e={};return Object.entries(r.getAddonsShortcuts()).forEach(([t,{defaultShortcut:n}])=>{e[t]=n}),e},async setShortcuts(t){let{shortcuts:n}=await e.setState(e=>({shortcuts:typeof t==`function`?t(e.shortcuts):t}),{persistence:`permanent`});return n},async restoreAllDefaultShortcuts(){return r.setShortcuts(r.getDefaultShortcuts())},async setShortcut(e,t){return await r.setShortcuts(n=>({...n,[e]:t})),t},async setAddonShortcut(e,t){return await r.setShortcuts(n=>({...n,[`${e}-${t.actionName}`]:t.defaultShortcut})),ol[`${e}-${t.actionName}`]=t,t},async restoreDefaultShortcut(e){let t=r.getDefaultShortcuts()[e];return r.setShortcut(e,t)},handleKeydownEvent(e){let t=Yc(e),n=r.getShortcutKeys(),i=il(n).find(e=>Xc(t,n[e]));i&&r.handleShortcutFeature(i,e)},handleShortcutFeature(n,r){let{ui:{enableShortcuts:i},storyId:a,refId:o,viewMode:s}=e.getState();if(i)switch(r?.preventDefault&&r.preventDefault(),n){case`escape`:t.getIsFullscreen()?t.toggleFullscreen(!1):t.getIsNavShown()&&t.toggleNav(!0);break;case`goToNextLandmark`:case`goToPreviousLandmark`:break;case`focusNav`:t.getIsFullscreen()&&t.toggleFullscreen(!1),t.getIsNavShown()||t.toggleNav(!0),t.focusOnUIElement(Sc.storyListMenu);break;case`search`:t.getIsFullscreen()&&t.toggleFullscreen(!1),t.getIsNavShown()||t.toggleNav(!0),setTimeout(()=>{t.focusOnUIElement(Sc.storySearchField,!0)},0);break;case`focusIframe`:{let e=tl.getElementById(`storybook-preview-iframe`);if(e)try{e.contentWindow.focus()}catch{}break}case`focusPanel`:t.getIsFullscreen()&&t.toggleFullscreen(!1),t.getIsPanelShown()||t.togglePanel(!0),t.focusOnUIElement(Sc.storyPanelRoot);break;case`nextStory`:t.jumpToStory(1);break;case`prevStory`:t.jumpToStory(-1);break;case`nextComponent`:t.jumpToComponent(1);break;case`prevComponent`:t.jumpToComponent(-1);break;case`fullScreen`:t.toggleFullscreen();break;case`togglePanel`:t.togglePanel();break;case`toggleNav`:t.toggleNav();break;case`toolbar`:t.toggleToolbar();break;case`panelPosition`:t.getIsFullscreen()&&t.toggleFullscreen(!1),t.getIsPanelShown()||t.togglePanel(!0),t.togglePanelPosition();break;case`aboutPage`:t.navigate(`/settings/about`);break;case`shortcutsPage`:t.navigate(`/settings/shortcuts`);break;case`collapseAll`:t.emit(Hc);break;case`expandAll`:t.emit(Uc);break;case`remount`:t.emit(Bc,{storyId:a});break;case`openInEditor`:Wc.CONFIG_TYPE===`DEVELOPMENT`&&t.openInEditor({file:t.getCurrentStoryData().importPath});break;case`openInIsolation`:if(a&&s===`story`){let{previewHref:e}=t.getStoryHrefs(a,{refId:o});window.open(e,`_blank`,`noopener,noreferrer`)}break;case`copyStoryLink`:if(a){let{managerHref:e}=t.getStoryHrefs(a,{refId:o});(0,zc.default)(e)}break;default:ol[n].action();break}}},{shortcuts:i=al}=e.getState();return{api:r,state:{shortcuts:il(al).reduce((e,t)=>({...e,[t]:i[t]||al[t]}),al)},init:()=>{tl.addEventListener(`keydown`,e=>{sl(e)||r.handleKeydownEvent(e)}),n.channel?.on(Vc,e=>{r.handleKeydownEvent(e.event)})}}},ll={};i(ll,{init:()=>Ul});var{logger:ul}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{CONFIG_ERROR:dl,CURRENT_STORY_WAS_SET:fl,DOCS_PREPARED:pl,PRELOAD_ENTRIES:ml,RESET_STORY_ARGS:hl,SELECT_STORY:gl,SET_CONFIG:_l,SET_CURRENT_STORY:vl,SET_FILTER:yl,SET_INDEX:bl,SET_STORIES:xl,STORY_ARGS_UPDATED:Sl,STORY_CHANGED:Cl,STORY_INDEX_INVALIDATED:wl,STORY_MISSING:Tl,STORY_PREPARED:El,STORY_SPECIFIED:Dl,UPDATE_STORY_ARGS:Ol}=__STORYBOOK_MODULE_CORE_EVENTS__,{global:kl}=__STORYBOOK_MODULE_GLOBAL__;t(us(),1);var Al=class extends vi{constructor(e){super({name:`StatusTypeIdMismatchError`,category:`CORE-SERVER`,code:16,message:`Status has typeId "${e.status.typeId}" but was added to store with typeId "${e.typeId}". Full status: ${JSON.stringify(e.status,null,2)}`}),this.data=e}},jl={id:`storybook/status`,leader:!0,initialState:{}},Ml={SELECT:`select`};function Nl({universalStatusStore:e,useUniversalStore:t,environment:n}){let r={getAll(){return e.getState()},set(t){e.setState(e=>{let n={...e};for(let e of t){let{storyId:t,typeId:r}=e;n[t]={...n[t]??{},[r]:e}}return n})},onAllStatusChange(t){return e.onStateChange((e,n)=>{t(e,n)})},onSelect(t){return e.subscribe(Ml.SELECT,e=>{t(e.payload)})},selectStatuses:t=>{e.send({type:Ml.SELECT,payload:t})},unset(t){if(!t){e.setState({});return}e.setState(e=>{let n={...e};for(let e of t)delete n[e];return n})},typeId:void 0},i=t=>({getAll:r.getAll,set(r){e.setState(e=>{let i={...e};for(let e of r){let{storyId:r}=e;if(e.typeId!==t)switch(n){case`server`:throw new Al({status:e,typeId:t});case`manager`:throw new bi({status:e,typeId:t});case`preview`:default:throw new Si({status:e,typeId:t})}i[r]={...i[r]??{},[t]:e}}return i})},onAllStatusChange:r.onAllStatusChange,onSelect(n){return e.subscribe(Ml.SELECT,e=>{e.payload.some(e=>e.typeId===t)&&n(e.payload)})},unset(n){e.setState(e=>{let r={...e};for(let e in r)if(r[e]?.[t]&&(!n||n?.includes(e))){let{[t]:n,...i}=r[e];r[e]=i}return r})},typeId:t});return t?{getStatusStoreByTypeId:i,fullStatusStore:r,universalStatusStore:e,useStatusStore:n=>t(e,n)[0]}:{getStatusStoreByTypeId:i,fullStatusStore:r,universalStatusStore:e}}var Pl=(e,t)=>{let n=F.useRef(t?t(e.getState()):e.getState()),r=F.useCallback(r=>e.onStateChange((e,i)=>{if(!t){n.current=e,r();return}let a=t(e);!u(a,t(i))&&(n.current=a,r())}),[e,t]),i=F.useCallback(()=>{let r=e.getState(),i=t?t(r):r;return u(i,n.current)||(n.current=i),n.current},[e,t]);return[F.useSyncExternalStore(r,i),e.setState]},{fullStatusStore:Fl,getStatusStoreByTypeId:Il,useStatusStore:Ll,universalStatusStore:Rl}=Nl({universalStatusStore:je.create({...jl,leader:globalThis.CONFIG_TYPE===`PRODUCTION`}),useUniversalStore:Pl,environment:`manager`}),{fetch:zl}=kl,Bl=`./index.json`,Vl=[`enableShortcuts`,`theme`,`showRoots`];function Hl(e){if(!e||typeof e==`string`)return e;let t={...e};return Vl.forEach(e=>{e in t&&delete t[e]}),t}var Ul=({fullAPI:e,store:t,navigate:n,provider:r,storyId:i,viewMode:a,docsOptions:o={}})=>{let s={storyId:l,getData:(e,t)=>{let n=s.resolveStory(e,t);if(n?.type===`story`||n?.type===`docs`)return n},isPrepared:(e,t)=>{let n=s.getData(e,t);return n?n.type===`story`?n.prepared:!0:!1},resolveStory:(e,n)=>{let{refs:r,index:i}=t.getState();if(!(n&&!r[n]))return n?r?.[n]?.index?.[e]??void 0:i?i[e]:void 0},getCurrentStoryData:()=>{let{storyId:e,refId:n}=t.getState();return s.getData(e,n)},getIndex:()=>{let{internal_index:e}=t.getState();return e},getParameters:(e,t)=>{let{storyId:n,refId:r}=typeof e==`string`?{storyId:e,refId:void 0}:e,i=s.getData(n,r);if([`story`,`docs`].includes(i?.type)){let{parameters:e}=i;if(e)return t?e[t]:e}return null},getCurrentParameter:e=>{let{storyId:n,refId:r}=t.getState();return s.getParameters({storyId:n,refId:r},e)||void 0},jumpToComponent:e=>{let{filteredIndex:n,storyId:r,refs:i,refId:a}=t.getState();if(!s.getData(r,a))return;let o=a?i[a].filteredIndex||{}:n;if(!o)return;let c=s.findSiblingStoryId(r,o,e,!0);c&&s.selectStory(c,void 0,{ref:a})},jumpToStory:e=>{let{filteredIndex:n,storyId:r,refs:i,refId:a}=t.getState(),o=s.getData(r,a);if(!o)return;let c=o.refId?i[o.refId].filteredIndex:n;if(!c)return;let l=s.findSiblingStoryId(r,c,e,!1);l&&s.selectStory(l,void 0,{ref:a})},selectFirstStory:()=>{let{index:e}=t.getState();if(!e)return;let r=Object.keys(e).find(t=>e[t].type===`story`);if(r){s.selectStory(r);return}n(`/`)},selectStory:(e=void 0,r=void 0,i={})=>{let{ref:a}=i,{storyId:o,index:c,filteredIndex:u,refs:d,settings:f}=t.getState(),p=e=>e?.type===`docs`||e?.type===`story`?(t.setState({settings:{...f,lastTrackedStoryId:e.id}}),n(`/${e.type}/${e.refId?`${e.refId}_${e.id}`:e.id}`),!0):!1,m=o?.split(`--`,2)[0],h=a?d[a].index:c,_=a?d[a].filteredIndex:u;if(!(!h||!_))if(r)if(!e)p(h[l(m,r)]);else{let t=a?`${a}_${l(e,r)}`:l(e,r);if(h[t])p(h[t]);else{let t=h[g(e)];if(t?.type===`component`){let e=t.children.find(e=>h[e].name===r);p(e?h[e]:void 0)}}}else{let t=e?h[e]||h[g(e)]:h[m];if(!t)throw Error(`Unknown id or title: '${e}'`);p(t)||p(s.findLeafEntry(_,t.id))}},findLeafEntry(e,t){let n=e[t];if(n.type===`docs`||n.type===`story`)return n;let r=n.children.find(t=>e[t])||n.children[0];return s.findLeafEntry(e,r)},findLeafStoryId(e,t){return s.findLeafEntry(e,t)?.id},findAllLeafStoryIds(e){let{index:n}=t.getState();if(!n)return[];let r=(e,t=[])=>{let i=n[e];return i&&(i.type===`story`&&t.push(i.id),`children`in i&&i.children?.forEach(e=>r(e,t))),t};return r(e,[])},findSiblingStoryId(e,t,n,r){if(r){let r=nc(t),i=r.findIndex(t=>t.includes(e));return i===r.length-1&&n>0||i===0&&n<0?void 0:r[i+n]?r[i+n][0]:void 0}let i=rc(t),a=i.indexOf(e);if(!(a===i.length-1&&n>0)&&!(a===0&&n<0))return i[a+n]},updateStoryArgs:(e,t)=>{let{id:n,refId:i}=e;r.channel?.emit(Ol,{storyId:n,updatedArgs:t,options:{target:i}})},resetStoryArgs:(e,t)=>{let{id:n,refId:i}=e;r.channel?.emit(hl,{storyId:n,argNames:t,options:{target:i}})},fetchIndex:async()=>{try{let e=await zl(Bl);if(e.status!==200)throw Error(await e.text());let t=await e.json();if(t.v<3){ul.warn(`Skipping story index with version v${t.v}, awaiting SET_STORIES.`);return}await s.setIndex(t)}catch(e){await t.setState({indexError:e})}},setIndex:async e=>{let{filteredIndex:n,index:i,filters:a}=t.getState(),s=Fl.getAll(),c=ec(e,{provider:r,docsOptions:o,filters:a,allStatuses:s}),l=ec(e,{provider:r,docsOptions:o,filters:{},allStatuses:s});await t.setState({internal_index:e,filteredIndex:tc(c,n),index:tc(l,i),indexError:void 0})},updateStory:async(n,r,i)=>{if(i){let{id:t,index:a,filteredIndex:o}=i;a&&a[n]&&(a[n]={...a[n],...r}),o&&o[n]&&(o[n]={...o[n],...r}),await e.updateRef(t,{index:a,filteredIndex:o})}else{let{index:e,filteredIndex:i}=t.getState();e&&e[n]&&(e[n]={...e[n],...r}),i&&i[n]&&(i[n]={...i[n],...r}),(e||i)&&await t.setState({index:e,filteredIndex:i})}},updateDocs:async(n,r,i)=>{if(i){let{id:t,index:a,filteredIndex:o}=i;a[n]={...a[n],...r},o[n]={...o[n],...r},await e.updateRef(t,{index:a,filteredIndex:o})}else{let{index:e,filteredIndex:i}=t.getState();e&&(e[n]={...e[n],...r}),i&&(i[n]={...i[n],...r}),(e||i)&&await t.setState({index:e,filteredIndex:i})}},setPreviewInitialized:async n=>{n?e.updateRef(n.id,{previewInitialized:!0}):t.setState({previewInitialized:!0})},experimental_setFilter:async(n,i)=>{await t.setState({filters:{...t.getState().filters,[n]:i}});let{internal_index:a}=t.getState();if(!a)return;await s.setIndex(a);let o=await e.getRefs();Object.entries(o).forEach(([t,{internal_index:n,...r}])=>{e.setRef(t,{...r,storyIndex:n},!0)}),r.channel?.emit(yl,{id:n})}};return r.channel?.on(Dl,function({storyId:i,viewMode:a}){let{sourceType:o}=pc(this,e);if(o===`local`){let e=t.getState(),o=e.path===`/`||e.viewMode===`story`||e.viewMode===`docs`,s=e.viewMode&&e.storyId,c=e.viewMode!==a||e.storyId!==i,{type:l}=e.index?.[e.storyId]||{};o&&(s&&c&&!(l===`root`||l===`component`||l===`group`)?r.channel?.emit(vl,{storyId:e.storyId,viewMode:e.viewMode}):c&&n(`/${a}/${i}`))}}),r.channel?.on(fl,function(){let{ref:t}=pc(this,e);s.setPreviewInitialized(t)}),r.channel?.on(Cl,function(){let{sourceType:t}=pc(this,e);if(t===`local`){let t=s.getCurrentParameter(`options`);t&&e.setOptions(Hl(t))}}),r.channel?.on(El,function({id:n,...i}){let{ref:a,sourceType:o}=pc(this,e);if(s.updateStory(n,{...i,prepared:!0},a),!a&&!t.getState().hasCalledSetOptions){let{options:n}=i.parameters;e.setOptions(Hl(n)),t.setState({hasCalledSetOptions:!0})}if(o===`local`){let{storyId:e,index:n,refId:i}=t.getState();if(!n)return;let a=Array.from(new Set([s.findSiblingStoryId(e,n,1,!0),s.findSiblingStoryId(e,n,-1,!0)])).filter(Boolean);r.channel?.emit(ml,{ids:a,options:{target:i}})}}),r.channel?.on(pl,function({id:t,...n}){let{ref:r}=pc(this,e);s.updateStory(t,{...n,prepared:!0},r)}),r.channel?.on(bl,function(t){let{ref:n}=pc(this,e);if(n)e.setRef(n.id,{...n,storyIndex:t},!0);else{s.setIndex(t);let n=s.getCurrentParameter(`options`);e.setOptions(Hl(n))}}),r.channel?.on(xl,function(t){let{ref:n}=pc(this,e),r=t.v?Ys(t):t.stories;if(n)e.setRef(n.id,{...n,setStoriesData:r},!0);else throw Error(`Cannot call SET_STORIES for local frame`)}),r.channel?.on(gl,function({kind:t,title:n=t,story:r,name:i=r,storyId:a,...o}){let{ref:s}=pc(this,e);s?e.selectStory(a||n,i,{...o,ref:s.id}):e.selectStory(a||n,i,o)}),r.channel?.on(Sl,function({storyId:t,args:n}){let{ref:r}=pc(this,e);s.updateStory(t,{args:n},r)}),r.channel?.on(dl,function(t){let{ref:n}=pc(this,e);s.setPreviewInitialized(n)}),r.channel?.on(Tl,function(t){let{ref:n}=pc(this,e);s.setPreviewInitialized(n)}),r.channel?.on(_l,()=>{let e=r.getConfig();e?.sidebar?.filters&&t.setState({filters:{...t.getState().filters,...e?.sidebar?.filters}})}),Fl.onAllStatusChange(async()=>{let{internal_index:n}=t.getState();if(!n)return;await s.setIndex(n);let r=await e.getRefs();Object.entries(r).forEach(([t,{internal_index:n,...r}])=>{e.setRef(t,{...r,storyIndex:n},!0)})}),{api:s,state:{storyId:i,viewMode:a,hasCalledSetOptions:!1,previewInitialized:!1,filters:r.getConfig()?.sidebar?.filters||{}},init:async()=>{r.channel?.on(wl,()=>s.fetchIndex()),await s.fetchIndex()}}},Wl={};i(Wl,{init:()=>ru});var{GLOBALS_UPDATED:Gl,NAVIGATE_URL:Kl,SET_CURRENT_STORY:ql,STORY_ARGS_UPDATED:Jl,UPDATE_QUERY_PARAMS:Yl}=__STORYBOOK_MODULE_CORE_EVENTS__,{global:Xl}=__STORYBOOK_MODULE_GLOBAL__,Zl=t(c(),1),Ql=e=>{if(e===`true`||e===`1`)return!0;if(e===`false`||e===`0`)return!1},$l=e=>Object.fromEntries(e.split(`;`).map(e=>e.split(`:`)).map(([e,t])=>[e,encodeURIComponent(t)]).filter(([e,t])=>e&&t)),eu=(e,t)=>{let n=$l(e),r=$l(t);return Object.entries({...n,...r}).map(([e,t])=>`${e}:${t}`).join(`;`)},tu,nu=({state:{location:e,path:t,viewMode:n,storyId:r},singleStory:i})=>{let{full:a,panel:o,nav:s,shortcuts:c,addonPanel:l,tabs:u,path:d,...f}=Gi(e),p,m,h;Ql(a)===!0?(p=0,m=0,h=0):Ql(a)===!1&&(p=xc.layout.navSize,m=xc.layout.bottomPanelHeight,h=xc.layout.rightPanelWidth),i||(Ql(s)===!0&&(p=xc.layout.navSize),Ql(s)===!1&&(p=0)),Ql(o)===!1&&(m=0,h=0);let g={navSize:p,bottomPanelHeight:m,rightPanelWidth:h,panelPosition:[`right`,`bottom`].includes(o)?o:void 0,showTabs:Ql(u)},_={enableShortcuts:Ql(c)},v=l||void 0,y=r,b=Ti(tu,f)?tu:f;return tu=b,{viewMode:n,layout:g,ui:_,selectedPanel:v,location:e,path:t,customQueryParams:b,storyId:y}},ru=e=>{let{store:t,navigate:n,provider:r,fullAPI:i}=e,a=(e,t={},r={})=>n([e,...Object.entries(t).filter(([,e])=>e).sort(([e],[t])=>e<t?-1:1).map(([e,t])=>`${e}=${t}`)].join(`&`),r),o={getStoryHrefs(e,n={}){let{id:r,refId:a}=i.getCurrentStoryData()??{},o=e===r&&n.refId===a,{customQueryParams:s,location:c,refs:l}=t.getState(),{base:u,inheritArgs:f=o,inheritGlobals:p=!0,queryParams:m={},refId:h,viewMode:g=`story`}=n;if(h&&!l[h])throw Error(`Invalid refId: ${h}`);let _=c.pathname||`/`,v=Xl.window.location.origin+_,y=Xl.STORYBOOK_NETWORK_ADDRESS??v,b=u===`origin`?v:u===`network`?y:_,x=h?l[h].url+`/iframe.html`:Xl.PREVIEW_URL||`${b.replace(/\/[^/]*$/,`/`)}iframe.html`,S=h?`&refId=${encodeURIComponent(h)}`:``,{args:C=``,globals:w=``,...T}=m,E=f?eu(s?.args??``,C):C,D=p?eu(s?.globals??``,w):w,O=(0,Zl.stringify)(T,{nesting:!0,nestingSyntax:`js`}),k=(0,Zl.stringify)(d(T,[`id`,`viewMode`]),{nesting:!0,nestingSyntax:`js`});return E&&=`&args=${E}`,D&&=`&globals=${D}`,O&&=`&${O}`,k&&=`&${k}`,{managerHref:`${b}?path=/${g}/${h?`${h}_`:``}${e}${E}${D}${O}`,previewHref:`${x}?id=${e}&viewMode=${g}${S}${E}${h?``:D}${k}`}},getQueryParam(e){let{customQueryParams:n}=t.getState();return n?n[e]:void 0},getUrlState(){let{location:e,path:n,customQueryParams:r,storyId:i,url:a,viewMode:o}=t.getState();return{path:n,hash:e.hash??``,queryParams:r,storyId:i,url:a,viewMode:o}},setQueryParams(e){let{customQueryParams:n}=t.getState(),i={},a={...n,...Object.entries(e).reduce((e,[t,n])=>(n!==null&&(e[t]=n),e),i)};Ti(n,a)||(t.setState({customQueryParams:a}),r.channel?.emit(Yl,a))},applyQueryParams(e,t){let{path:n,hash:r=``,queryParams:i}=o.getUrlState();a(`${n}${r}`,{...i,...e},t),o.setQueryParams(e)},navigateUrl(e,t){n(e,{plain:!0,...t})}},s=()=>{let{path:e,hash:t=``,queryParams:n,viewMode:r}=o.getUrlState();if(r!==`story`)return;let s=i.getCurrentStoryData();if(s?.type!==`story`)return;let{args:c,initialArgs:l}=s,u=Ui(l,c);a(`${e}${t}`,{...n,args:u},{replace:!0}),o.setQueryParams({args:u})};r.channel?.on(ql,()=>s());let c;return r.channel?.on(Jl,()=>{`requestIdleCallback`in Xl.window?(c&&Xl.window.cancelIdleCallback(c),c=Xl.window.requestIdleCallback(s,{timeout:1e3})):(c&&clearTimeout(c),setTimeout(s,100))}),r.channel?.on(Gl,({userGlobals:e,initialGlobals:t})=>{let{path:n,hash:r=``,queryParams:i}=o.getUrlState(),s=Ui(t,bs(t,e));a(`${n}${r}`,{...i,globals:s},{replace:!0}),o.setQueryParams({globals:s})}),r.channel?.on(Kl,(e,t)=>{o.navigateUrl(e,t)}),{api:o,state:nu(e)}},iu={};i(iu,{init:()=>du});var au=t(v(),1),{global:ou}=__STORYBOOK_MODULE_GLOBAL__,su=`10.2.8`,{VERSIONCHECK:cu}=ou,lu=(0,au.default)(1)(()=>{try{return{...JSON.parse(cu).data||{}}}catch{return{}}}),uu=e=>e.includes(`vue`)?`vue`:e,du=({store:e})=>{let{dismissedVersionNotification:t}=e.getState(),n={versions:{current:{version:su},...lu()},dismissedVersionNotification:t},r={getCurrentVersion:()=>{let{versions:{current:t}}=e.getState();return t},getLatestVersion:()=>{let{versions:{latest:t,next:n,current:r}}=e.getState();return r&&ss.default.prerelease(r.version)&&n?t&&ss.default.gt(t.version,n.version)?t:n:t},getDocsUrl:({asset:t,subpath:n=t,versioned:r,renderer:i,ref:a=`ui`})=>{let{versions:o}=e.getState(),s=o.latest?.version,c=o.current?.version,l=c?.startsWith(`0.0.0`)&&s||c,u=`https://storybook.js.org/${t?`docs-assets`:`docs`}/`;if(t&&l)u+=`${ss.default.major(l)}.${ss.default.minor(l)}/`;else if(r&&l&&s){let e=ss.default.diff(s,l);e===`patch`||e===null||(u+=`${ss.default.major(l)}.${ss.default.minor(l)}/`)}let[d,f]=n?.split(`#`)||[];if(d&&(u+=t?d:`${d}/`),i&&typeof ou.STORYBOOK_RENDERER<`u`){let e=ou.STORYBOOK_RENDERER;e&&(u+=`?renderer=${uu(e)}`)}return a&&(u+=`${u.includes(`?`)?`&`:`?`}ref=${a}`),f&&(u+=`#${f}`),u},versionUpdateAvailable:()=>{let e=r.getLatestVersion(),t=r.getCurrentVersion();if(e){if(!e.version||!t.version)return!0;let n=ss.default.prerelease(t.version)?`${ss.default.major(t.version)}.${ss.default.minor(t.version)}.${ss.default.patch(t.version)}`:t.version,r=ss.default.diff(n,e.version);return ss.default.gt(e.version,n)&&r!==`patch`&&!r.includes(`pre`)}return!1}};return{init:async()=>{let{versions:t={}}=e.getState(),{latest:n,next:r}=lu();await e.setState({versions:{...t,latest:n,next:r}})},state:n,api:r}},fu={};i(fu,{init:()=>bu});var{REQUEST_WHATS_NEW_DATA:pu,RESULT_WHATS_NEW_DATA:mu,SET_WHATS_NEW_CACHE:hu,TOGGLE_WHATS_NEW_NOTIFICATIONS:gu}=__STORYBOOK_MODULE_CORE_EVENTS__,{global:_u}=__STORYBOOK_MODULE_GLOBAL__,vu=`whats-new`,yu=({color:e=`currentColor`,size:t=14})=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2.042.616a.704.704 0 00-.66.729L1.816 12.9c.014.367.306.66.672.677l9.395.422h.032a.704.704 0 00.704-.703V.704c0-.015 0-.03-.002-.044a.704.704 0 00-.746-.659l-.773.049.057 1.615a.105.105 0 01-.17.086l-.52-.41-.617.468a.105.105 0 01-.168-.088L9.746.134 2.042.616zm8.003 4.747c-.247.192-2.092.324-2.092.05.04-1.045-.429-1.091-.689-1.091-.247 0-.662.075-.662.634 0 .57.607.893 1.32 1.27 1.014.538 2.24 1.188 2.24 2.823 0 1.568-1.273 2.433-2.898 2.433-1.676 0-3.141-.678-2.976-3.03.065-.275 2.197-.21 2.197 0-.026.971.195 1.256.753 1.256.43 0 .624-.236.624-.634 0-.602-.633-.958-1.361-1.367-.987-.554-2.148-1.205-2.148-2.7 0-1.494 1.027-2.489 2.86-2.489 1.832 0 2.832.98 2.832 2.845z`,fill:e})),bu=({fullAPI:e,store:t,provider:n})=>{let r={whatsNewData:void 0};function i(e){t.setState({whatsNewData:e}),r.whatsNewData=e}let a={isWhatsNewUnread(){return r.whatsNewData?.status===`SUCCESS`&&!r.whatsNewData.postIsRead},whatsNewHasBeenRead(){r.whatsNewData?.status===`SUCCESS`&&(s({lastReadPost:r.whatsNewData.url}),i({...r.whatsNewData,postIsRead:!0}),e.clearNotification(vu))},toggleWhatsNewNotifications(){r.whatsNewData?.status===`SUCCESS`&&(i({...r.whatsNewData,disableWhatsNewNotifications:!r.whatsNewData.disableWhatsNewNotifications}),n.channel?.emit(gu,{disableWhatsNewNotifications:r.whatsNewData.disableWhatsNewNotifications}))}};function o(){return n.channel?.emit(pu),new Promise(e=>n.channel?.once(mu,({data:t})=>e(t)))}function s(e){n.channel?.emit(hu,e)}return{init:async()=>{if(_u.CONFIG_TYPE!==`DEVELOPMENT`)return;let t=await o();i(t);let n=e.getUrlState();!(n?.path===`/onboarding`||n.queryParams?.onboarding===`true`)&&t.status===`SUCCESS`&&!t.disableWhatsNewNotifications&&t.showNotification&&e.addNotification({id:vu,link:`/settings/whats-new`,content:{headline:t.title,subHeadline:`Learn what's new in Storybook`},icon:F.createElement(yu,null),onClear({dismissed:e}){e&&s({lastDismissedPost:t.url})}})},state:r,api:a}},xu=t(ds(),1);(e=>{e.fn(`set`,function(t,n){return e.set(this._area,this._in(t),pi(n,{maxDepth:50}))}),e.fn(`get`,function(t,n){let r=e.get(this._area,this._in(t));return r===null?n||r:hi(r)})})(xu.default._);var Su=`@storybook/manager/store`;function Cu(e){return e.get(Su)||{}}function wu(e,t){return e.set(Su,t)}function Tu(e,t){return wu(e,{...Cu(e),...t})}var Eu=class{constructor({setState:e,getState:t}){this.upstreamSetState=e,this.upstreamGetState=t}getInitialState(e){return{...e,...Cu(xu.default.local),...Cu(xu.default.session)}}getState(){return this.upstreamGetState()}async setState(e,t,n){let r,i;typeof t==`function`?(r=t,i=n):i=t;let{persistence:a=`none`}=i||{},o={},s={};typeof e==`function`?o=t=>(s=e(t),s):(o=e,s=o);let c=await new Promise(e=>{this.upstreamSetState(o,()=>{e(this.getState())})});return a!==`none`&&await Tu(a===`session`?xu.default.session:xu.default.local,s),r&&r(c),c}},{ActiveTabs:Du}=hc,Ou=vs({api:void 0,state:Ss({})}),ku=(...e)=>xs({},...e),Au=class extends F.Component{constructor(e){super(e),this.api={},this.initModules=()=>{this.modules.forEach(e=>{`init`in e&&e.init()})};let{location:t,path:n,refId:r,viewMode:i=e.docsOptions.docsMode?`docs`:e.viewMode,singleStory:a,storyId:o,docsOptions:s,navigate:c}=e,l=new Eu({getState:()=>this.state,setState:(e,t)=>(this.setState(e,()=>t(this.state)),this.state)}),u={location:t,path:n,viewMode:i,singleStory:a,storyId:o,refId:r},d={docsOptions:s};this.state=l.getInitialState(Ss({...u,...d}));let f={navigate:c,store:l,provider:e.provider};this.modules=[Pc,Is,Ms,hc,Oc,Ic,Rc,ll,Ws,Rs,Wl,iu,fu,Ac].map(e=>e.init({...u,...d,...f,state:this.state,fullAPI:this.api}));let p=Ss(this.state,...this.modules.map(e=>e.state)),m=Object.assign(this.api,{navigate:c},...this.modules.map(e=>e.api));this.state=p,this.api=m}static getDerivedStateFromProps(e,t){return t.path===e.path?null:{...t,location:e.location,path:e.path,refId:e.refId,viewMode:e.viewMode,storyId:e.storyId}}shouldComponentUpdate(e,t){let n=this.props,r=this.state;return n.path!==e.path||!u(r,t)}render(){let{children:e}=this.props,t={state:this.state,api:this.api};return F.createElement(ju,{effect:this.initModules},F.createElement(Ou.Provider,{value:t},F.createElement(Nu,null,e)))}};Au.displayName=`Manager`;var ju=({children:e,effect:t})=>(F.useEffect(t,[]),e),Mu=e=>e;function Nu({filter:e=Mu,children:t}){let n=(0,F.useContext)(Ou),r=(0,F.useRef)(t),i=(0,F.useRef)(e);if(typeof r.current!=`function`)return F.createElement(F.Fragment,null,r.current);let a=i.current(n);return(0,F.useMemo)(()=>{let e=r.current;return F.createElement(e,{...a})},(0,F.useMemo)(()=>[...Object.entries(a).reduce((e,t)=>e.concat(t),[])],[n.state]))}globalThis.STORYBOOK_ADDON_STATE={};var{STORYBOOK_ADDON_STATE:Pu}=globalThis,{Channel:Fu}=__STORYBOOK_MODULE_CHANNELS__,Iu={id:`storybook/test-provider`,leader:!0,initialState:{}};function Lu({universalTestProviderStore:e,useUniversalStore:t}){let n={settingsChanged:()=>{e.untilReady().then(()=>{e.send({type:`settings-changed`})})},onRunAll:t=>e.subscribe(`run-all`,t),onClearAll:t=>e.subscribe(`clear-all`,t)},r={...n,getFullState:e.getState,setFullState:e.setState,onSettingsChanged:t=>e.subscribe(`settings-changed`,t),runAll:async()=>{await e.untilReady(),e.send({type:`run-all`})},clearAll:async()=>{await e.untilReady(),e.send({type:`clear-all`})}},i=t=>{let r=()=>e.getState()[t]??`test-provider-state:pending`,i=n=>{e.untilReady().then(()=>{e.setState(e=>({...e,[t]:n}))})};return{...n,testProviderId:t,getState:r,setState:i,runWithState:async e=>{i(`test-provider-state:running`);try{await e(),i(`test-provider-state:succeeded`)}catch{i(`test-provider-state:crashed`)}}}};return t?{getTestProviderStoreById:i,fullTestProviderStore:r,universalTestProviderStore:e,useTestProviderStore:n=>t(e,n)[0]}:{getTestProviderStoreById:i,fullTestProviderStore:r,universalTestProviderStore:e}}var{fullTestProviderStore:Ru,getTestProviderStoreById:zu,useTestProviderStore:Bu,universalTestProviderStore:Vu}=Lu({universalTestProviderStore:je.create({...Iu,leader:globalThis.CONFIG_TYPE===`PRODUCTION`}),useUniversalStore:Pl});je.create({id:`storybook/checklist`,initialState:{items:{accessibilityTests:{status:`open`},autodocs:{status:`open`},ciTests:{status:`open`},controls:{status:`open`},coverage:{status:`open`},guidedTour:{status:`open`},installA11y:{status:`open`},installChromatic:{status:`open`},installDocs:{status:`open`},installVitest:{status:`open`},mdxDocs:{status:`open`},moreComponents:{status:`open`},moreStories:{status:`open`},onboardingSurvey:{status:`open`},organizeStories:{status:`open`},publishStorybook:{status:`open`},renderComponent:{status:`open`},runTests:{status:`open`},viewports:{status:`open`},visualTests:{status:`open`},whatsNewStorybook10:{status:`open`},writeInteractions:{status:`open`}},widget:{}},leader:globalThis.CONFIG_TYPE===`PRODUCTION`});var Hu=n((e=>{var t=s();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),s=r[0].inst,l=r[1];return o(function(){s.value=n,s.getSnapshot=t,u(s)&&l({inst:s})},[e,n,t]),a(function(){return u(s)&&l({inst:s}),e(function(){u(s)&&l({inst:s})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Uu=n(((e,t)=>{t.exports=Hu()})),Wu=r({A:()=>Qu,ActionList:()=>$b,Bar:()=>QT,Blockquote:()=>$u,Button:()=>Rb,Code:()=>ld,DL:()=>ud,Div:()=>dd,EmptyTabContent:()=>hE,ErrorFormatter:()=>cS,FlexBar:()=>nE,Form:()=>qS,H1:()=>fd,H2:()=>pd,H3:()=>md,H4:()=>hd,H5:()=>gd,H6:()=>_d,HR:()=>vd,IconButton:()=>Bb,Img:()=>yd,LI:()=>bd,Link:()=>Pd,ListItem:()=>UT,Loader:()=>DD,OL:()=>xd,P:()=>Sd,Popover:()=>XS,PopoverProvider:()=>kT,Pre:()=>Cd,ResetWrapper:()=>Zu,ScrollArea:()=>re,Select:()=>fC,Separator:()=>ME,Span:()=>wd,SyntaxHighlighter:()=>id,TT:()=>Td,TabBar:()=>EE,TabButton:()=>lE,TabList:()=>YE,TabPanel:()=>ZE,TabWrapper:()=>OE,Table:()=>Ed,Tabs:()=>AE,TabsState:()=>jE,TabsView:()=>cD,ToggleButton:()=>Vb,Toolbar:()=>PE,Tooltip:()=>AT,TooltipLinkList:()=>qT,TooltipNote:()=>Zd,TooltipProvider:()=>Fb,UL:()=>Dd,Zoom:()=>Qx,codeCommon:()=>Yu,components:()=>AD,convertToReactAriaPlacement:()=>Nb,createCopyToClipboardFunction:()=>ie,nameSpaceClassNames:()=>L,resetComponents:()=>jD,useTabsState:()=>iD,withReset:()=>R}),Gu=_(),Ku=p(ne(),1),qu=Uu(),L=({...e},t)=>{let n=[e.class,e.className];return delete e.class,e.className=[`sbdocs`,`sbdocs-${t}`,...n].filter(Boolean).join(` `),e},Ju=({theme:e})=>({margin:`20px 0 8px`,padding:0,cursor:`text`,position:`relative`,color:e.color.defaultText,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:`none`},"& tt, & code":{fontSize:`inherit`}}),Yu=({theme:e})=>({lineHeight:1,margin:`0 2px`,padding:`3px 5px`,whiteSpace:`nowrap`,borderRadius:3,fontSize:e.typography.size.s2-1,border:e.base===`light`?`1px solid hsl(0 0 0 / 0.05)`:`1px solid hsl(0 0 100 / 0.05)`,color:e.color.defaultText,backgroundColor:e.base===`light`?`hsl(0 0 0 / 0.01)`:`hsl(0 0 100 / 0.02)`}),R=({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s3,margin:0,WebkitFontSmoothing:`antialiased`,MozOsxFontSmoothing:`grayscale`,WebkitTapHighlightColor:`rgba(0, 0, 0, 0)`,WebkitOverflowScrolling:`touch`}),Xu={margin:`16px 0`},Zu=N.div(R),Qu=N(({href:e=``,...t})=>{let n=/^\//.test(e)?`./?path=${e}`:e,r=/^#.*/.test(e)?`_self`:`_top`;return F.createElement(`a`,{href:n,target:r,...t})})(R,({theme:e})=>({fontSize:`inherit`,lineHeight:`24px`,color:e.color.secondary,textDecoration:`none`,"&.absent":{color:`#cc0000`},"&.anchor":{display:`block`,paddingLeft:30,marginLeft:-30,cursor:`pointer`,position:`absolute`,top:0,left:0,bottom:0}})),$u=N.blockquote(R,Xu,({theme:e})=>({borderLeft:`4px solid ${e.color.medium}`,padding:`0 15px`,color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}})),ed=[],td=null,nd=(0,F.lazy)(async()=>{let{SyntaxHighlighter:t}=await e(async()=>{let{SyntaxHighlighter:e}=await import(`./syntaxhighlighter-ED5Y7EFY-CxhX_a0D.js`);return{SyntaxHighlighter:e}},__vite__mapDeps([3,1,2,4,5,0,6]),import.meta.url);return ed.length>0&&(ed.forEach(e=>{t.registerLanguage(...e)}),ed=[]),td===null&&(td=t),{default:e=>F.createElement(t,{...e})}}),rd=(0,F.lazy)(async()=>{let[{SyntaxHighlighter:t},{formatter:n}]=await Promise.all([e(()=>import(`./syntaxhighlighter-ED5Y7EFY-CxhX_a0D.js`),__vite__mapDeps([3,1,2,4,5,0,6]),import.meta.url),e(()=>import(`./formatter-EIJCOSYU-B8p8ny5o.js`),__vite__mapDeps([7,1,2]),import.meta.url)]);return ed.length>0&&(ed.forEach(e=>{t.registerLanguage(...e)}),ed=[]),td===null&&(td=t),{default:e=>F.createElement(t,{...e,formatter:n})}}),id=e=>F.createElement(F.Suspense,{fallback:F.createElement(`div`,null)},e.format===!1?F.createElement(nd,{...e}):F.createElement(rd,{...e}));id.registerLanguage=(...e)=>{if(td!==null){td.registerLanguage(...e);return}ed.push(e)};var ad=e=>typeof e==`string`,od=/[\n\r]/g,sd=N.code(({theme:e})=>({fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:`antialiased`,MozOsxFontSmoothing:`grayscale`,display:`inline-block`,paddingLeft:2,paddingRight:2,verticalAlign:`baseline`,color:`inherit`}),Yu),cd=N(id)(({theme:e})=>({fontFamily:e.typography.fonts.mono,fontSize:`${e.typography.size.s2-1}px`,lineHeight:`19px`,margin:`25px 0 40px`,borderRadius:e.appBorderRadius,boxShadow:e.base===`light`?`rgba(0, 0, 0, 0.10) 0 1px 3px 0`:`rgba(0, 0, 0, 0.20) 0 2px 5px 0`,"pre.prismjs":{padding:20,background:`inherit`}})),ld=({className:e,children:t,...n})=>{let r=(e||``).match(/lang-(\S+)/),i=F.Children.toArray(t);return i.filter(ad).some(e=>e.match(od))?F.createElement(cd,{bordered:!0,copyable:!0,language:r?.[1]??`text`,format:!1,...n},t):F.createElement(sd,{...n,className:e},i)},ud=N.dl(R,Xu,{padding:0,"& dt":{fontSize:`14px`,fontWeight:`bold`,fontStyle:`italic`,padding:0,margin:`16px 0 4px`},"& dt:first-of-type":{padding:0},"& dt > :first-of-type":{marginTop:0},"& dt > :last-child":{marginBottom:0},"& dd":{margin:`0 0 16px`,padding:`0 15px`},"& dd > :first-of-type":{marginTop:0},"& dd > :last-child":{marginBottom:0}}),dd=N.div(R),fd=N.h1(R,Ju,({theme:e})=>({fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold})),pd=N.h2(R,Ju,({theme:e})=>({fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`})),md=N.h3(R,Ju,({theme:e})=>({fontSize:`${e.typography.size.m1}px`})),hd=N.h4(R,Ju,({theme:e})=>({fontSize:`${e.typography.size.s3}px`})),gd=N.h5(R,Ju,({theme:e})=>({fontSize:`${e.typography.size.s2}px`})),_d=N.h6(R,Ju,({theme:e})=>({fontSize:`${e.typography.size.s2}px`,color:e.color.dark})),vd=N.hr(({theme:e})=>({border:`0 none`,borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0})),yd=N.img({maxWidth:`100%`}),bd=N.li(R,({theme:e})=>({fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:`24px`,"& + li":{marginTop:`.25em`},"& ul, & ol":{marginTop:`.25em`,marginBottom:0},"& code":Yu({theme:e})})),xd=N.ol(R,Xu,{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},{listStyle:`decimal`}),Sd=N.p(R,Xu,({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:`24px`,color:e.color.defaultText,"& code":Yu({theme:e})})),Cd=N.pre(R,Xu,({theme:e})=>({fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:`antialiased`,MozOsxFontSmoothing:`grayscale`,lineHeight:`18px`,padding:`11px 1rem`,whiteSpace:`pre-wrap`,color:`inherit`,borderRadius:3,margin:`1rem 0`,"&:not(.prismjs)":{background:`transparent`,border:`none`,borderRadius:0,padding:0,margin:0},"& pre, &.prismjs":{padding:15,margin:0,whiteSpace:`pre-wrap`,color:`inherit`,fontSize:`13px`,lineHeight:`19px`,code:{color:`inherit`,fontSize:`inherit`}},"& code":{whiteSpace:`pre`},"& code, & tt":{border:`none`}})),wd=N.span(R,({theme:e})=>({"&.frame":{display:`block`,overflow:`hidden`,"& > span":{border:`1px solid ${e.color.medium}`,display:`block`,float:`left`,overflow:`hidden`,margin:`13px 0 0`,padding:7,width:`auto`},"& span img":{display:`block`,float:`left`},"& span span":{clear:`both`,color:e.color.darkest,display:`block`,padding:`5px 0 0`}},"&.align-center":{display:`block`,overflow:`hidden`,clear:`both`,"& > span":{display:`block`,overflow:`hidden`,margin:`13px auto 0`,textAlign:`center`},"& span img":{margin:`0 auto`,textAlign:`center`}},"&.align-right":{display:`block`,overflow:`hidden`,clear:`both`,"& > span":{display:`block`,overflow:`hidden`,margin:`13px 0 0`,textAlign:`right`},"& span img":{margin:0,textAlign:`right`}},"&.float-left":{display:`block`,marginRight:13,overflow:`hidden`,float:`left`,"& span":{margin:`13px 0 0`}},"&.float-right":{display:`block`,marginLeft:13,overflow:`hidden`,float:`right`,"& > span":{display:`block`,overflow:`hidden`,margin:`13px auto 0`,textAlign:`right`}}})),Td=N.title(Yu),Ed=N.table(R,Xu,({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:`24px`,padding:0,borderCollapse:`collapse`,"& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:e.appContentBg,margin:0,padding:0},"& tr:nth-of-type(2n)":{backgroundColor:e.base===`dark`?e.color.darker:e.color.lighter},"& tr th":{fontWeight:`bold`,color:e.color.defaultText,border:`1px solid ${e.appBorderColor}`,margin:0,padding:`6px 13px`},"& tr td":{border:`1px solid ${e.appBorderColor}`,color:e.color.defaultText,margin:0,padding:`6px 13px`},"& tr th :first-of-type, & tr td :first-of-type":{marginTop:0},"& tr th :last-child, & tr td :last-child":{marginBottom:0}})),Dd=N.ul(R,Xu,{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},{listStyle:`disc`}),Od={h1:e=>F.createElement(fd,{...L(e,`h1`)}),h2:e=>F.createElement(pd,{...L(e,`h2`)}),h3:e=>F.createElement(md,{...L(e,`h3`)}),h4:e=>F.createElement(hd,{...L(e,`h4`)}),h5:e=>F.createElement(gd,{...L(e,`h5`)}),h6:e=>F.createElement(_d,{...L(e,`h6`)}),pre:e=>F.createElement(Cd,{...L(e,`pre`)}),a:e=>F.createElement(Qu,{...L(e,`a`)}),hr:e=>F.createElement(vd,{...L(e,`hr`)}),dl:e=>F.createElement(ud,{...L(e,`dl`)}),blockquote:e=>F.createElement($u,{...L(e,`blockquote`)}),table:e=>F.createElement(Ed,{...L(e,`table`)}),img:e=>F.createElement(yd,{...L(e,`img`)}),div:e=>F.createElement(dd,{...L(e,`div`)}),span:e=>F.createElement(wd,{...L(e,`span`)}),li:e=>F.createElement(bd,{...L(e,`li`)}),ul:e=>F.createElement(Dd,{...L(e,`ul`)}),ol:e=>F.createElement(xd,{...L(e,`ol`)}),p:e=>F.createElement(Sd,{...L(e,`p`)}),code:e=>F.createElement(ld,{...L(e,`code`)}),tt:e=>F.createElement(Td,{...L(e,`tt`)}),resetwrapper:e=>F.createElement(Zu,{...L(e,`resetwrapper`)})};N.div(({theme:e,compact:t})=>({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,fontSize:e.typography.size.s1,fontWeight:e.typography.weight.bold,lineHeight:`12px`,minWidth:20,borderRadius:20,padding:t?`4px 7px`:`4px 10px`}),{svg:{height:12,width:12,marginRight:4,marginTop:-2,path:{fill:`currentColor`}}},({theme:e,status:t})=>{switch(t){case`critical`:return{color:e.fgColor.critical,background:e.bgColor.critical,boxShadow:`inset 0 0 0 1px ${e.borderColor.critical}`};case`negative`:return{color:e.fgColor.negative,background:e.bgColor.negative,boxShadow:`inset 0 0 0 1px ${e.borderColor.negative}`};case`warning`:return{color:e.fgColor.warning,background:e.bgColor.warning,boxShadow:`inset 0 0 0 1px ${e.borderColor.warning}`};case`neutral`:return{color:e.fgColor.muted,background:e.base===`dark`?e.barBg:e.background.app,boxShadow:`inset 0 0 0 1px ${C(.8,e.textMutedColor)}`};case`positive`:return{color:e.fgColor.positive,background:e.bgColor.positive,boxShadow:`inset 0 0 0 1px ${e.borderColor.positive}`};case`active`:return{color:e.base===`light`?O(.1,e.color.secondary):e.color.secondary,background:e.background.hoverable,boxShadow:`inset 0 0 0 1px ${C(.9,e.color.secondary)}`};default:return{}}});var kd=0,Ad=e=>e.button===kd&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey,jd=(e,t)=>{Ad(e)&&(e.preventDefault(),t(e))},Md=N.span(({withArrow:e})=>e?{"> svg:last-of-type":{height:`0.7em`,width:`0.7em`,marginRight:0,marginLeft:`0.25em`,bottom:`auto`,verticalAlign:`inherit`}}:{},({containsIcon:e})=>e?{svg:{height:`1em`,width:`1em`,verticalAlign:`middle`,position:`relative`,bottom:0,marginRight:0}}:{}),Nd=N.a(({theme:e})=>({display:`inline-block`,transition:`all 150ms ease-out`,textDecoration:`none`,color:e.color.secondary,"&:hover, &:focus":{cursor:`pointer`,color:O(.07,e.color.secondary),"svg path:not([fill])":{fill:O(.07,e.color.secondary)}},"&:active":{color:O(.1,e.color.secondary),"svg path:not([fill])":{fill:O(.1,e.color.secondary)}},svg:{display:`inline-block`,height:`1em`,width:`1em`,verticalAlign:`text-top`,position:`relative`,bottom:`-0.125em`,marginRight:`0.4em`,"& path":{fill:e.color.secondary}}}),({theme:e,secondary:t,tertiary:n})=>{let r;return t&&(r=[e.textMutedColor,e.color.secondary,e.color.secondary]),n&&(r=[e.color.dark,e.color.secondary,e.color.secondary]),r?{color:r[0],"svg path:not([fill])":{fill:r[0]},"&:hover":{color:r[1],"svg path:not([fill])":{fill:r[1]}},"&:active":{color:r[2],"svg path:not([fill])":{fill:r[2]}}}:{}},({nochrome:e})=>e?{color:`inherit`,"&:hover, &:active":{color:`inherit`,textDecoration:`underline`}}:{},({theme:e,inverse:t})=>t?{color:e.color.lightest,":not([fill])":{fill:e.color.lightest},"&:hover":{color:e.color.lighter,"svg path:not([fill])":{fill:e.color.lighter}},"&:active":{color:e.color.light,"svg path:not([fill])":{fill:e.color.light}}}:{},({isButton:e})=>e?{border:0,borderRadius:0,background:`none`,padding:0,fontSize:`inherit`}:{}),Pd=(0,F.forwardRef)(({cancel:e=!0,children:t,onClick:n=void 0,withArrow:r=!1,containsIcon:i=!1,className:a=void 0,style:o=void 0,isButton:s=!1,...c},l)=>F.createElement(Nd,{...c,ref:l,isButton:s,role:s?`button`:void 0,onClick:n&&e?e=>jd(e,n):n,className:a},F.createElement(Md,{withArrow:r,containsIcon:i},t,r&&F.createElement(be,null))));Pd.displayName=`Link`,N.div(({theme:e})=>({fontSize:`${e.typography.size.s2}px`,lineHeight:`1.6`,h1:{fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},h2:{fontSize:`${e.typography.size.m2}px`,borderBottom:`1px solid ${e.appBorderColor}`},h3:{fontSize:`${e.typography.size.m1}px`},h4:{fontSize:`${e.typography.size.s3}px`},h5:{fontSize:`${e.typography.size.s2}px`},h6:{fontSize:`${e.typography.size.s2}px`,color:e.color.dark},"pre:not(.prismjs)":{background:`transparent`,border:`none`,borderRadius:0,padding:0,margin:0},"pre pre, pre.prismjs":{padding:15,margin:0,whiteSpace:`pre-wrap`,color:`inherit`,fontSize:`13px`,lineHeight:`19px`},"pre pre code, pre.prismjs code":{color:`inherit`,fontSize:`inherit`},"pre code":{margin:0,padding:0,whiteSpace:`pre`,border:`none`,background:`transparent`},"pre code, pre tt":{backgroundColor:`transparent`,border:`none`},"body > *:first-of-type":{marginTop:`0 !important`},"body > *:last-child":{marginBottom:`0 !important`},a:{color:e.color.secondary,textDecoration:`none`},"a.absent":{color:`#cc0000`},"a.anchor":{display:`block`,paddingLeft:30,marginLeft:-30,cursor:`pointer`,position:`absolute`,top:0,left:0,bottom:0},"h1, h2, h3, h4, h5, h6":{margin:`20px 0 10px`,padding:0,cursor:`text`,position:`relative`,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:`none`},"& tt, & code":{fontSize:`inherit`}},"h1:first-of-type + h2":{marginTop:0,paddingTop:0},"p, blockquote, ul, ol, dl, li, table, pre":{margin:`15px 0`},hr:{border:`0 none`,borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},"body > h1:first-of-type, body > h2:first-of-type, body > h3:first-of-type, body > h4:first-of-type, body > h5:first-of-type, body > h6:first-of-type":{marginTop:0,paddingTop:0},"body > h1:first-of-type + h2":{marginTop:0,paddingTop:0},"a:first-of-type h1, a:first-of-type h2, a:first-of-type h3, a:first-of-type h4, a:first-of-type h5, a:first-of-type h6":{marginTop:0,paddingTop:0},"h1 p, h2 p, h3 p, h4 p, h5 p, h6 p":{marginTop:0},"li p.first":{display:`inline-block`},"ul, ol":{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},dl:{padding:0},"dl dt":{fontSize:`14px`,fontWeight:`bold`,fontStyle:`italic`,margin:`0 0 15px`,padding:`0 15px`,"&:first-of-type":{padding:0},"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},blockquote:{borderLeft:`4px solid ${e.color.medium}`,padding:`0 15px`,color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},table:{padding:0,borderCollapse:`collapse`,"& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:`white`,margin:0,padding:0,"& th":{fontWeight:`bold`,border:`1px solid ${e.appBorderColor}`,textAlign:`left`,margin:0,padding:`6px 13px`},"& td":{border:`1px solid ${e.appBorderColor}`,textAlign:`left`,margin:0,padding:`6px 13px`},"&:nth-of-type(2n)":{backgroundColor:e.color.lighter},"& th :first-of-type, & td :first-of-type":{marginTop:0},"& th :last-child, & td :last-child":{marginBottom:0}}},img:{maxWidth:`100%`},"span.frame":{display:`block`,overflow:`hidden`,"& > span":{border:`1px solid ${e.color.medium}`,display:`block`,float:`left`,overflow:`hidden`,margin:`13px 0 0`,padding:7,width:`auto`},"& span img":{display:`block`,float:`left`},"& span span":{clear:`both`,color:e.color.darkest,display:`block`,padding:`5px 0 0`}},"span.align-center":{display:`block`,overflow:`hidden`,clear:`both`,"& > span":{display:`block`,overflow:`hidden`,margin:`13px auto 0`,textAlign:`center`},"& span img":{margin:`0 auto`,textAlign:`center`}},"span.align-right":{display:`block`,overflow:`hidden`,clear:`both`,"& > span":{display:`block`,overflow:`hidden`,margin:`13px 0 0`,textAlign:`right`},"& span img":{margin:0,textAlign:`right`}},"span.float-left":{display:`block`,marginRight:13,overflow:`hidden`,float:`left`,"& span":{margin:`13px 0 0`}},"span.float-right":{display:`block`,marginLeft:13,overflow:`hidden`,float:`right`,"& > span":{display:`block`,overflow:`hidden`,margin:`13px auto 0`,textAlign:`right`}},"code, tt":{margin:`0 2px`,padding:`0 5px`,whiteSpace:`nowrap`,border:`1px solid ${e.color.mediumlight}`,backgroundColor:e.color.lighter,borderRadius:3,color:e.base===`dark`?e.color.darkest:e.color.dark}}));var{deprecate:Fd}=__STORYBOOK_MODULE_CLIENT_LOGGER__;function Id(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Ld(...e){return t=>{let n=!1,r=e.map(e=>{let r=Id(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Id(e[t],null)}}}}var Rd=Symbol.for(`react.lazy`),zd=F.use;function Bd(e){return typeof e==`object`&&!!e&&`then`in e}function Vd(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Rd&&`_payload`in e&&Bd(e._payload)}function Hd(e){let t=Wd(e),n=F.forwardRef((e,n)=>{let{children:r,...i}=e;Vd(r)&&typeof zd==`function`&&(r=zd(r._payload));let a=F.Children.toArray(r),o=a.find(qd);if(o){let e=o.props.children,r=a.map(t=>t===o?F.Children.count(e)>1?F.Children.only(null):F.isValidElement(e)?e.props.children:null:t);return(0,Gu.jsx)(t,{...i,ref:n,children:F.isValidElement(e)?F.cloneElement(e,void 0,r):null})}return(0,Gu.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var Ud=Hd(`Slot`);function Wd(e){let t=F.forwardRef((e,t)=>{let{children:n,...r}=e;if(Vd(n)&&typeof zd==`function`&&(n=zd(n._payload)),F.isValidElement(n)){let e=Yd(n),i=Jd(r,n.props);return n.type!==F.Fragment&&(i.ref=t?Ld(t,e):e),F.cloneElement(n,i)}return F.Children.count(n)>1?F.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gd=Symbol(`radix.slottable`);function Kd(e){let t=({children:e})=>(0,Gu.jsx)(Gu.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=Gd,t}Kd(`Slottable`);function qd(e){return F.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Gd}function Jd(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Yd(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xd=N.div(({theme:e})=>({padding:`2px 6px`,lineHeight:`16px`,fontSize:10,fontWeight:e.typography.weight.bold,color:e.color.lightest,boxShadow:`0 0 5px 0 rgba(0, 0, 0, 0.3)`,borderRadius:4,whiteSpace:`nowrap`,pointerEvents:`none`,zIndex:-1,background:e.base===`light`?`rgba(60, 60, 60, 0.9)`:`rgba(0, 0, 0, 0.95)`})),Zd=({note:e,...t})=>F.createElement(Xd,{...t},e),{deprecate:Qd}=__STORYBOOK_MODULE_CLIENT_LOGGER__,z=typeof document<`u`?F.useLayoutEffect:()=>{};function $d(e){let[t,n]=(0,F.useState)(e),r=(0,F.useRef)(t),i=(0,F.useRef)(null),a=(0,F.useRef)(()=>{if(!i.current)return;let e=i.current.next();if(e.done){i.current=null;return}r.current===e.value?a.current():n(e.value)});return z(()=>{r.current=t,i.current&&a.current()}),[t,(0,F.useCallback)(e=>{i.current=e(r.current),a.current()},[a])]}var ef={prefix:String(Math.round(Math.random()*1e10)),current:0},tf=F.createContext(ef),nf=F.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement;var rf=new WeakMap;function af(e=!1){let t=(0,F.useContext)(tf),n=(0,F.useRef)(null);if(n.current===null&&!e){var r,i;let e=(i=F.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)==null||(r=i.ReactCurrentOwner)==null?void 0:r.current;if(e){let n=rf.get(e);n==null?rf.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,rf.delete(e))}n.current=++t.current}return n.current}function of(e){let t=(0,F.useContext)(tf),n=af(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function sf(e){let t=F.useId(),[n]=(0,F.useState)(ff()),r=n?`react-aria`:`react-aria${ef.prefix}`;return e||`${r}-${t}`}var cf=typeof F.useId==`function`?sf:of;function lf(){return!1}function uf(){return!0}function df(e){return()=>{}}function ff(){return typeof F.useSyncExternalStore==`function`?F.useSyncExternalStore(df,lf,uf):(0,F.useContext)(nf)}var pf=!!(typeof window<`u`&&window.document&&window.document.createElement),mf=new Map,hf;typeof FinalizationRegistry<`u`&&(hf=new FinalizationRegistry(e=>{mf.delete(e)}));function B(e){let[t,n]=(0,F.useState)(e),r=(0,F.useRef)(null),i=cf(t),a=(0,F.useRef)(null);if(hf&&hf.register(a,i),pf){let e=mf.get(i);e&&!e.includes(r)?e.push(r):mf.set(i,[r])}return z(()=>{let e=i;return()=>{hf&&hf.unregister(a),mf.delete(e)}},[i]),(0,F.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),i}function gf(e,t){if(e===t)return e;let n=mf.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=mf.get(t);return r?(r.forEach(t=>t.current=e),e):t}function _f(e=[]){let t=B(),[n,r]=$d(t),i=(0,F.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return z(i,[t,i,...e]),n}function vf(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}var V=e=>e?.ownerDocument??document,yf=e=>e&&`window`in e&&e.window===e?e:V(e).defaultView||window;function bf(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function xf(e){return bf(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&`host`in e}var Sf=!1;function Cf(){return Sf}function wf(e,t){if(!Cf())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n=n.tagName===`SLOT`&&n.assignedSlot?n.assignedSlot.parentNode:xf(n)?n.host:n.parentNode}return!1}var H=(e=document)=>{var t;if(!Cf())return e.activeElement;let n=e.activeElement;for(;n&&`shadowRoot`in n&&(t=n.shadowRoot)!=null&&t.activeElement;)n=n.shadowRoot.activeElement;return n};function U(e){return Cf()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}var Tf=class{get currentNode(){return this._currentNode}set currentNode(e){if(!wf(this.root,e))throw Error(`Cannot set currentNode to a node that is not contained by the root node.`);let t=[],n=e,r=e;for(this._currentNode=e;n&&n!==this.root;)if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let e=n,i=this._doc.createTreeWalker(e,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=r,this._currentSetFor.add(i),n=r=e.host}else n=n.parentNode;let i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=r,this._currentSetFor.add(i),this._walkerStack=t}get doc(){return this._doc}firstChild(){let e=this.currentNode,t=this.nextNode();return wf(e,t)?(t&&(this.currentNode=t),t):(this.currentNode=e,null)}lastChild(){let e=this._walkerStack[0].lastChild();return e&&(this.currentNode=e),e}nextNode(){let e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){var t;let n;if(typeof this.filter==`function`?n=this.filter(e):(t=this.filter)!=null&&t.acceptNode&&(n=this.filter.acceptNode(e)),n===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let r=this.nextNode();return r&&(this.currentNode=r),r}return e&&(this.currentNode=e),e}else if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.nextNode();return e&&(this.currentNode=e),e}else return null}previousNode(){let e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}else return null;return null}let t=e.previousNode();if(t){if(t.shadowRoot){var n;let e;if(typeof this.filter==`function`?e=this.filter(t):(n=this.filter)!=null&&n.acceptNode&&(e=this.filter.acceptNode(t)),e===NodeFilter.FILTER_ACCEPT)return t&&(this.currentNode=t),t;let r=this.lastChild();return r&&(this.currentNode=r),r}return t&&(this.currentNode=t),t}else if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}constructor(e,t,n,r){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=e=>{if(e.nodeType===Node.ELEMENT_NODE){let n=e.shadowRoot;if(n){let e=this._doc.createTreeWalker(n,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(e),NodeFilter.FILTER_ACCEPT}else{var t;if(typeof this.filter==`function`)return this.filter(e);if((t=this.filter)!=null&&t.acceptNode)return this.filter.acceptNode(e);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=t,this.filter=r??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=t,this._walkerStack.unshift(e.createTreeWalker(t,n,this._acceptNode));let i=t.shadowRoot;if(i){let e=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(e)}}};function Ef(e,t,n,r){return Cf()?new Tf(e,t,n,r):e.createTreeWalker(t,n,r)}function Df(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Df(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Of(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Df(e))&&(r&&(r+=` `),r+=t);return r}var kf=Of;function W(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],i=r[e];typeof n==`function`&&typeof i==`function`&&e[0]===`o`&&e[1]===`n`&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90?t[e]=vf(n,i):(e===`className`||e===`UNSAFE_className`)&&typeof n==`string`&&typeof i==`string`?t[e]=kf(n,i):e===`id`&&n&&i?t.id=gf(n,i):t[e]=i===void 0?n:i}}return t}function Af(...e){return e.length===1&&e[0]?e[0]:t=>{let n=!1,r=e.map(e=>{let r=jf(e,t);return n||=typeof r==`function`,r});if(n)return()=>{r.forEach((t,n)=>{typeof t==`function`?t():jf(e[n],null)})}}}function jf(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}var Mf=new Set([`id`]),Nf=new Set([`aria-label`,`aria-labelledby`,`aria-describedby`,`aria-details`]),Pf=new Set([`href`,`hrefLang`,`target`,`rel`,`download`,`ping`,`referrerPolicy`]),Ff=new Set([`dir`,`lang`,`hidden`,`inert`,`translate`]),If=new Set(`onClick.onAuxClick.onContextMenu.onDoubleClick.onMouseDown.onMouseEnter.onMouseLeave.onMouseMove.onMouseOut.onMouseOver.onMouseUp.onTouchCancel.onTouchEnd.onTouchMove.onTouchStart.onPointerDown.onPointerMove.onPointerUp.onPointerCancel.onPointerEnter.onPointerLeave.onPointerOver.onPointerOut.onGotPointerCapture.onLostPointerCapture.onScroll.onWheel.onAnimationStart.onAnimationEnd.onAnimationIteration.onTransitionCancel.onTransitionEnd.onTransitionRun.onTransitionStart`.split(`.`)),Lf=/^(data-.*)$/;function G(e,t={}){let{labelable:n,isLink:r,global:i,events:a=i,propNames:o}=t,s={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(Mf.has(t)||n&&Nf.has(t)||r&&Pf.has(t)||i&&Ff.has(t)||a&&(If.has(t)||t.endsWith(`Capture`)&&If.has(t.slice(0,-7)))||o?.has(t)||Lf.test(t))&&(s[t]=e[t]);return s}function Rf(e){if(Bf())e.focus({preventScroll:!0});else{let t=Vf(e);e.focus(),Hf(t)}}var zf=null;function Bf(){if(zf==null){zf=!1;try{document.createElement(`div`).focus({get preventScroll(){return zf=!0,!0}})}catch{}}return zf}function Vf(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Hf(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function Uf(e){if(typeof window>`u`||window.navigator==null)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function Wf(e){return typeof window<`u`&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Gf(e){let t=null;return()=>(t??=e(),t)}var Kf=Gf(function(){return Wf(/^Mac/i)}),qf=Gf(function(){return Wf(/^iPhone/i)}),Jf=Gf(function(){return Wf(/^iPad/i)||Kf()&&navigator.maxTouchPoints>1}),Yf=Gf(function(){return qf()||Jf()}),Xf=Gf(function(){return Kf()||Yf()}),Zf=Gf(function(){return Uf(/AppleWebKit/i)&&!Qf()}),Qf=Gf(function(){return Uf(/Chrome/i)}),$f=Gf(function(){return Uf(/Android/i)}),ep=Gf(function(){return Uf(/Firefox/i)}),tp=(0,F.createContext)({isNative:!0,open:op,useHref:e=>e});function np(){return(0,F.useContext)(tp)}function rp(e,t){let n=e.getAttribute(`target`);return(!n||n===`_self`)&&e.origin===location.origin&&!e.hasAttribute(`download`)&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}function ip(e,t,n=!0){var r,i;let{metaKey:a,ctrlKey:o,altKey:s,shiftKey:c}=t;ep()&&!((i=window.event)==null||(r=i.type)==null)&&r.startsWith(`key`)&&e.target===`_blank`&&(Kf()?a=!0:o=!0);let l=Zf()&&Kf()&&!Jf()?new KeyboardEvent(`keydown`,{keyIdentifier:`Enter`,metaKey:a,ctrlKey:o,altKey:s,shiftKey:c}):new MouseEvent(`click`,{metaKey:a,ctrlKey:o,altKey:s,shiftKey:c,detail:1,bubbles:!0,cancelable:!0});ip.isOpening=n,Rf(e),e.dispatchEvent(l),ip.isOpening=!1}ip.isOpening=!1;function ap(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute(`data-href`)){let n=document.createElement(`a`);n.href=e.getAttribute(`data-href`),e.hasAttribute(`data-target`)&&(n.target=e.getAttribute(`data-target`)),e.hasAttribute(`data-rel`)&&(n.rel=e.getAttribute(`data-rel`)),e.hasAttribute(`data-download`)&&(n.download=e.getAttribute(`data-download`)),e.hasAttribute(`data-ping`)&&(n.ping=e.getAttribute(`data-ping`)),e.hasAttribute(`data-referrer-policy`)&&(n.referrerPolicy=e.getAttribute(`data-referrer-policy`)),e.appendChild(n),t(n),e.removeChild(n)}}function op(e,t){ap(e,e=>ip(e,t))}function sp(e){let t=np().useHref(e?.href??``);return{href:e?.href?t:void 0,target:e?.target,rel:e?.rel,download:e?.download,ping:e?.ping,referrerPolicy:e?.referrerPolicy}}function cp(e,t,n,r){!t.isNative&&e.currentTarget instanceof HTMLAnchorElement&&e.currentTarget.href&&!e.isDefaultPrevented()&&rp(e.currentTarget,e)&&n&&(e.preventDefault(),t.open(e.currentTarget,e,n,r))}var lp=new Map,up=new Set;function dp(){if(typeof window>`u`)return;function e(e){return`propertyName`in e}let t=t=>{if(!e(t)||!t.target)return;let r=lp.get(t.target);r||(r=new Set,lp.set(t.target,r),t.target.addEventListener(`transitioncancel`,n,{once:!0})),r.add(t.propertyName)},n=t=>{if(!e(t)||!t.target)return;let r=lp.get(t.target);if(r&&(r.delete(t.propertyName),r.size===0&&(t.target.removeEventListener(`transitioncancel`,n),lp.delete(t.target)),lp.size===0)){for(let e of up)e();up.clear()}};document.body.addEventListener(`transitionrun`,t),document.body.addEventListener(`transitionend`,n)}typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,dp):dp());function fp(){for(let[e]of lp)`isConnected`in e&&!e.isConnected&&lp.delete(e)}function pp(e){requestAnimationFrame(()=>{fp(),lp.size===0?e():up.add(e)})}function mp(){let e=(0,F.useRef)(new Map),t=(0,F.useCallback)((t,n,r,i)=>{let a=i?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:a,options:i}),t.addEventListener(n,a,i)},[]),n=(0,F.useCallback)((t,n,r,i)=>{let a=e.current.get(r)?.fn||r;t.removeEventListener(n,a,i),e.current.delete(r)},[]),r=(0,F.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,F.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function hp(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=B(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(` `):i&&=i.trim().split(/\s+/).join(` `),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function gp(e){let t=(0,F.useRef)(null),n=(0,F.useRef)(void 0),r=(0,F.useCallback)(t=>{if(typeof e==`function`){let n=e,r=n(t);return()=>{typeof r==`function`?r():n(null)}}else if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,F.useMemo)(()=>({get current(){return t.current},set current(e){t.current=e,n.current&&=(n.current(),void 0),e!=null&&(n.current=r(e))}}),[r])}var _p=F.useInsertionEffect??z;function K(e){let t=(0,F.useRef)(null);return _p(()=>{t.current=e},[e]),(0,F.useCallback)((...e)=>{let n=t.current;return n?.(...e)},[])}function vp(e,t){let n=(0,F.useRef)(!0),r=(0,F.useRef)(null);z(()=>(n.current=!0,()=>{n.current=!1}),[]),z(()=>{n.current?n.current=!1:(!r.current||t.some((e,t)=>!Object.is(e,r[t])))&&e(),r.current=t},t)}function yp(){return typeof window.ResizeObserver<`u`}function bp(e){let{ref:t,box:n,onResize:r}=e,i=K(r);(0,F.useEffect)(()=>{let e=t?.current;if(e)if(yp()){let t=new window.ResizeObserver(e=>{e.length&&i()});return t.observe(e,{box:n}),()=>{e&&t.unobserve(e)}}else return window.addEventListener(`resize`,i,!1),()=>{window.removeEventListener(`resize`,i,!1)}},[t,n])}function xp(e,t){z(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Sp(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function Cp(e,t){let n=e;for(Sp(n,t)&&(n=n.parentElement);n&&!Sp(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function wp(e,t){let n=[];for(;e&&e!==document.documentElement;)Sp(e,t)&&n.push(e),e=e.parentElement;return n}function Tp(e){return Kf()?e.metaKey:e.ctrlKey}var Ep=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function Dp(e){return e instanceof HTMLInputElement&&!Ep.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}typeof document<`u`&&window.visualViewport;var Op=0,kp=new Map;function Ap(e){let[t,n]=(0,F.useState)();return z(()=>{if(!e)return;let t=kp.get(e);if(t)n(t.element.id);else{let r=`react-aria-description-${Op++}`;n(r);let i=document.createElement(`div`);i.id=r,i.style.display=`none`,i.textContent=e,document.body.appendChild(i),t={refCount:0,element:i},kp.set(e,t)}return t.refCount++,()=>{t&&--t.refCount===0&&(t.element.remove(),kp.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function jp(e,t,n,r){let i=K(n),a=n==null;(0,F.useEffect)(()=>{if(a||!e.current)return;let n=e.current;return n.addEventListener(t,i,r),()=>{n.removeEventListener(t,i,r)}},[e,t,r,a])}function Mp(e,t){let n=Np(e,t,`left`),r=Np(e,t,`top`),i=t.offsetWidth,a=t.offsetHeight,o=e.scrollLeft,s=e.scrollTop,{borderTopWidth:c,borderLeftWidth:l,scrollPaddingTop:u,scrollPaddingRight:d,scrollPaddingBottom:f,scrollPaddingLeft:p}=getComputedStyle(e),m=o+parseInt(l,10),h=s+parseInt(c,10),g=m+e.clientWidth,_=h+e.clientHeight,v=parseInt(u,10)||0,y=parseInt(f,10)||0,b=parseInt(d,10)||0,x=parseInt(p,10)||0;n<=o+x?o=n-parseInt(l,10)-x:n+i>g-b&&(o+=n+i-g+b),r<=h+v?s=r-parseInt(c,10)-v:r+a>_-y&&(s+=r+a-_+y),e.scrollLeft=o,e.scrollTop=s}function Np(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function Pp(e,t){if(e&&document.contains(e)){let o=document.scrollingElement||document.documentElement,s=window.getComputedStyle(o).overflow===`hidden`;if(s){let t=wp(e);s||t.push(o);for(let n of t)Mp(n,e)}else{var n;let{left:o,top:s}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)==null||n.call(e,{block:`nearest`});let{left:c,top:l}=e.getBoundingClientRect();if(Math.abs(o-c)>1||Math.abs(s-l)>1){var r,i,a;t==null||(i=t.containingElement)==null||(r=i.scrollIntoView)==null||r.call(i,{block:`center`,inline:`center`}),(a=e.scrollIntoView)==null||a.call(e,{block:`nearest`})}}}}function Fp(e){return e.pointerType===``&&e.isTrusted?!0:$f()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Ip(e){return!$f()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`}function Lp(e){let t=F.version.split(`.`);return parseInt(t[0],10)>=19?e:e?`true`:void 0}var Rp=`react-aria-clear-focus`,zp=`react-aria-focus`;function Bp(e,t=!0){let[n,r]=(0,F.useState)(!0),i=n&&t;return z(()=>{if(i&&e.current&&`getAnimations`in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,i]),Hp(e,i,(0,F.useCallback)(()=>r(!1),[])),i}function Vp(e,t){let[n,r]=(0,F.useState)(t?`open`:`closed`);switch(n){case`open`:t||r(`exiting`);break;case`closed`:case`exiting`:t&&r(`open`);break}let i=n===`exiting`;return Hp(e,i,(0,F.useCallback)(()=>{r(e=>e===`exiting`?`closed`:e)},[])),i}function Hp(e,t,n){z(()=>{if(t&&e.current){if(!(`getAnimations`in e.current)){n();return}let t=e.current.getAnimations();if(t.length===0){n();return}let r=!1;return Promise.all(t.map(e=>e.finished)).then(()=>{r||(0,Ku.flushSync)(()=>{n()})}).catch(()=>{}),()=>{r=!0}}},[e,t,n])}var Up=typeof Element<`u`&&`checkVisibility`in Element.prototype;function Wp(e){let t=yf(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!==`none`&&r!==`hidden`&&r!==`collapse`;if(i){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r}=t(e);i=n!==`none`&&r!==`hidden`&&r!==`collapse`}return i}function Gp(e,t){return!e.hasAttribute(`hidden`)&&!e.hasAttribute(`data-react-aria-prevent-focus`)&&(e.nodeName===`DETAILS`&&t&&t.nodeName!==`SUMMARY`?e.hasAttribute(`open`):!0)}function Kp(e,t){return Up?e.checkVisibility({visibilityProperty:!0})&&!e.closest(`[data-react-aria-prevent-focus]`):e.nodeName!==`#comment`&&Wp(e)&&Gp(e,t)&&(!e.parentElement||Kp(e.parentElement,e))}var qp=[`input:not([disabled]):not([type=hidden])`,`select:not([disabled])`,`textarea:not([disabled])`,`button:not([disabled])`,`a[href]`,`area[href]`,`summary`,`iframe`,`object`,`embed`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable^="false"])`,`permission`],Jp=qp.join(`:not([hidden]),`)+`,[tabindex]:not([disabled]):not([hidden])`;qp.push(`[tabindex]:not([tabindex="-1"]):not([disabled])`);var Yp=qp.join(`:not([hidden]):not([tabindex="-1"]),`);function Xp(e){return e.matches(Jp)&&Kp(e)&&!Qp(e)}function Zp(e){return e.matches(Yp)&&Kp(e)&&!Qp(e)}function Qp(e){let t=e;for(;t!=null;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}var $p=typeof document<`u`?F.useInsertionEffect??F.useLayoutEffect:()=>{};function em(e,t,n){let[r,i]=(0,F.useState)(e||t),a=(0,F.useRef)(r),o=(0,F.useRef)(e!==void 0),s=e!==void 0;(0,F.useEffect)(()=>{o.current,o.current=s},[s]);let c=s?e:r;$p(()=>{a.current=c});let[,l]=(0,F.useReducer)(()=>({}),{});return[c,(0,F.useCallback)((e,...t)=>{let r=typeof e==`function`?e(a.current):e;Object.is(a.current,r)||(a.current=r,i(r),l(),n?.(r,...t))},[n])]}function tm(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function nm(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function rm(e,t){Object.defineProperty(e,`target`,{value:t}),Object.defineProperty(e,`currentTarget`,{value:t})}function im(e){let t=(0,F.useRef)({isFocused:!1,observer:null});z(()=>{let e=t.current;return()=>{e.observer&&=(e.observer.disconnect(),null)}},[]);let n=K(t=>{e?.(t)});return(0,F.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target;r.addEventListener(`focusout`,e=>{t.current.isFocused=!1,r.disabled&&n(nm(e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var e;(e=t.current.observer)==null||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:n})),r.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:n}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:[`disabled`]})}},[n])}var am=!1;function om(e){for(;e&&!Xp(e);)e=e.parentElement;let t=yf(e),n=t.document.activeElement;if(!n||n===e)return;am=!0;let r=!1,i=e=>{(e.target===n||r)&&e.stopImmediatePropagation()},a=t=>{(t.target===n||r)&&(t.stopImmediatePropagation(),!e&&!r&&(r=!0,Rf(n),c()))},o=t=>{(t.target===e||r)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,Rf(n),c()))};t.addEventListener(`blur`,i,!0),t.addEventListener(`focusout`,a,!0),t.addEventListener(`focusin`,s,!0),t.addEventListener(`focus`,o,!0);let c=()=>{cancelAnimationFrame(l),t.removeEventListener(`blur`,i,!0),t.removeEventListener(`focusout`,a,!0),t.removeEventListener(`focusin`,s,!0),t.removeEventListener(`focus`,o,!0),am=!1,r=!1},l=requestAnimationFrame(c);return c}var sm=`default`,cm=``,lm=new WeakMap;function um(e){if(Yf()){if(sm===`default`){let t=V(e);cm=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect=`none`}sm=`disabled`}else if(e instanceof HTMLElement||e instanceof SVGElement){let t=`userSelect`in e.style?`userSelect`:`webkitUserSelect`;lm.set(e,e.style[t]),e.style[t]=`none`}}function dm(e){if(Yf()){if(sm!==`disabled`)return;sm=`restoring`,setTimeout(()=>{pp(()=>{if(sm===`restoring`){let t=V(e);t.documentElement.style.webkitUserSelect===`none`&&(t.documentElement.style.webkitUserSelect=cm||``),cm=``,sm=`default`}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&lm.has(e)){let t=lm.get(e),n=`userSelect`in e.style?`userSelect`:`webkitUserSelect`;e.style[n]===`none`&&(e.style[n]=t),e.getAttribute(`style`)===``&&e.removeAttribute(`style`),lm.delete(e)}}var fm=F.createContext({register:()=>{}});fm.displayName=`PressResponderContext`;function pm(e,t){return t.get?t.get.call(e):t.value}function mm(e,t,n){if(!t.has(e))throw TypeError(`attempted to `+n+` private field on non-instance`);return t.get(e)}function hm(e,t){return pm(e,mm(e,t,`get`))}function gm(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function _m(e,t,n){gm(e,t),t.set(e,n)}function vm(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw TypeError(`attempted to set read only private field`);t.value=n}}function ym(e,t,n){return vm(e,mm(e,t,`set`),n),n}function bm(e){let t=(0,F.useContext)(fm);if(t){let{register:n,...r}=t;e=W(r,e),n()}return xp(t,e.ref),e}var xm=new WeakMap,Sm=class{continuePropagation(){ym(this,xm,!1)}get shouldStopPropagation(){return hm(this,xm)}constructor(e,t,n,r){_m(this,xm,{writable:!0,value:void 0}),ym(this,xm,!0);let i=(r?.target??n.currentTarget)?.getBoundingClientRect(),a,o=0,s,c=null;n.clientX!=null&&n.clientY!=null&&(s=n.clientX,c=n.clientY),i&&(s!=null&&c!=null?(a=s-i.left,o=c-i.top):(a=i.width/2,o=i.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=a,this.y=o}},Cm=Symbol(`linkClicked`),wm=`react-aria-pressable-style`,Tm=`data-react-aria-pressable`;function Em(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:a,onClick:o,isDisabled:s,isPressed:c,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:d,ref:f,...p}=bm(e),[m,h]=(0,F.useState)(!1),g=(0,F.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:_,removeAllGlobalListeners:v}=mp(),y=K((e,t)=>{let i=g.current;if(s||i.didFirePressStart)return!1;let a=!0;if(i.isTriggeringEvent=!0,r){let n=new Sm(`pressstart`,t,e);r(n),a=n.shouldStopPropagation}return n&&n(!0),i.isTriggeringEvent=!1,i.didFirePressStart=!0,h(!0),a}),b=K((e,r,a=!0)=>{let o=g.current;if(!o.didFirePressStart)return!1;o.didFirePressStart=!1,o.isTriggeringEvent=!0;let c=!0;if(i){let t=new Sm(`pressend`,r,e);i(t),c=t.shouldStopPropagation}if(n&&n(!1),h(!1),t&&a&&!s){let n=new Sm(`press`,r,e);t(n),c&&=n.shouldStopPropagation}return o.isTriggeringEvent=!1,c}),x=K((e,t)=>{let n=g.current;if(s)return!1;if(a){n.isTriggeringEvent=!0;let r=new Sm(`pressup`,t,e);return a(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0}),S=K(e=>{let t=g.current;if(t.isPressed&&t.target){t.didFirePressStart&&t.pointerType!=null&&b(km(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,v(),d||dm(t.target);for(let e of t.disposables)e();t.disposables=[]}}),C=K(e=>{u&&S(e)}),w=K(e=>{s||o?.(e)}),T=K((e,t)=>{if(!s&&o){let n=new MouseEvent(`click`,e);rm(n,t),o(nm(n))}}),E=(0,F.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(Om(t.nativeEvent,t.currentTarget)&&wf(t.currentTarget,U(t.nativeEvent))){var r;jm(U(t.nativeEvent),t.key)&&t.preventDefault();let i=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType=`keyboard`,i=y(t,`keyboard`);let r=t.currentTarget;_(V(t.currentTarget),`keyup`,vf(t=>{Om(t,r)&&!t.repeat&&wf(r,U(t))&&e.target&&x(km(e.target,t),`keyboard`)},n),!0)}i&&t.stopPropagation(),t.metaKey&&Kf()&&((r=e.metaKeyEvents)==null||r.set(t.key,t.nativeEvent))}else t.key===`Meta`&&(e.metaKeyEvents=new Map)},onClick(t){if(!(t&&!wf(t.currentTarget,U(t.nativeEvent)))&&t&&t.button===0&&!e.isTriggeringEvent&&!ip.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&(e.pointerType===`virtual`||Fp(t.nativeEvent))){let e=y(t,`virtual`),r=x(t,`virtual`),i=b(t,`virtual`);w(t),n=e&&r&&i}else if(e.isPressed&&e.pointerType!==`keyboard`){let r=e.pointerType||t.nativeEvent.pointerType||`virtual`,i=x(km(t.currentTarget,t),r),a=b(km(t.currentTarget,t),r,!0);n=i&&a,e.isOverTarget=!1,w(t),S(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{var n;if(e.isPressed&&e.target&&Om(t,e.target)){var r;jm(U(t),t.key)&&t.preventDefault();let n=U(t),i=wf(e.target,U(t));b(km(e.target,t),`keyboard`,i),i&&T(t,e.target),v(),t.key!==`Enter`&&Dm(e.target)&&wf(e.target,n)&&!t[Cm]&&(t[Cm]=!0,ip(e.target,t,!1)),e.isPressed=!1,(r=e.metaKeyEvents)==null||r.delete(t.key)}else if(t.key===`Meta`&&(n=e.metaKeyEvents)!=null&&n.size){var i;let t=e.metaKeyEvents;e.metaKeyEvents=void 0;for(let n of t.values())(i=e.target)==null||i.dispatchEvent(new KeyboardEvent(`keyup`,n))}};if(typeof PointerEvent<`u`){t.onPointerDown=t=>{if(t.button!==0||!wf(t.currentTarget,U(t.nativeEvent)))return;if(Ip(t.nativeEvent)){e.pointerType=`virtual`;return}e.pointerType=t.pointerType;let i=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||um(e.target),i=y(t,e.pointerType);let a=U(t.nativeEvent);`releasePointerCapture`in a&&a.releasePointerCapture(t.pointerId),_(V(t.currentTarget),`pointerup`,n,!1),_(V(t.currentTarget),`pointercancel`,r,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(wf(t.currentTarget,U(t.nativeEvent))&&t.button===0){if(l){let n=om(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{!wf(t.currentTarget,U(t.nativeEvent))||e.pointerType===`virtual`||t.button===0&&!e.isPressed&&x(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!0,y(km(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!1,b(km(e.target,t),e.pointerType,!1),C(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&t.button===0&&e.target){if(wf(e.target,U(t))&&e.pointerType!=null){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?S(t):(Rf(e.target),e.target.click()))},80);_(t.currentTarget,`click`,()=>n=!0,!0),e.disposables.push(()=>clearTimeout(r))}else S(t);e.isOverTarget=!1}},r=e=>{S(e)};t.onDragStart=e=>{wf(e.currentTarget,U(e.nativeEvent))&&S(e)}}return t},[_,s,l,v,d,S,C,b,y,x,w,T]);return(0,F.useEffect)(()=>{if(!f)return;let e=V(f.current);if(!e||!e.head||e.getElementById(wm))return;let t=e.createElement(`style`);t.id=wm,t.textContent=`
|
|
36
|
+
`});let h=e.versions&&Object.keys(e.versions).length?e.versions:s.versions;await a.setRef(t,{id:t,url:u.url,...s,...h?{versions:h}:{},type:s.storyIndex?`lazy`:`auto-inject`})},getRefs:()=>{let{refs:t={}}=e.getState();return t},setRef:async(i,{storyIndex:o,setStoriesData:s,...c},l=!1)=>{if(n)return;let u,d,f,{filters:p}=e.getState(),{storyMapper:m=sc}=t.getConfig(),h=a.getRefs()[i];(o||s)&&(u=s?Xs(dc(s,h,{storyMapper:m})):o,f=ec(o,{provider:t,docsOptions:r,filters:p,allStatuses:{}}),d=ec(o,{provider:t,docsOptions:r,filters:{},allStatuses:{}})),d&&=cc(d,h),f&&=cc(f,h),await a.updateRef(i,{...h,...c,index:d,filteredIndex:f,internal_index:u})},updateRef:async(t,n)=>{let{[t]:r,...i}=a.getRefs();i[t]={...r,...n};let o=Object.keys(s).reduce((e,t)=>(e[t]=i[t],e),{});await e.setState({refs:o})}},o=!n&&Gs.REFS||{},s=o;return i&&new Promise(async e=>{for(let e of Object.values(o))await a.checkRef({...e,stories:{}});e(void 0)}),{api:a,state:{refs:s}}},pc=(e,t)=>{let{source:n,refId:r,type:i}=e,[a,o]=oc(n,r),s;(r||a===`external`)&&(s=r&&t.getRefs()[r]?t.getRefs()[r]:t.findRef(o));let c={source:n,sourceType:a,sourceLocation:o,refId:r,ref:s,type:i};switch(!0){case typeof r==`string`:case a===`local`:case a===`external`:return c;default:return Us.warn(`Received a ${i} frame that was not configured as a ref`),null}},mc=({store:e,fullAPI:t,provider:n})=>{let r={getGlobals(){return e.getState().globals},getUserGlobals(){return e.getState().userGlobals},getStoryGlobals(){return e.getState().storyGlobals},getGlobalTypes(){return e.getState().globalTypes},updateGlobals(e){n.channel?.emit(Hs,{globals:e,options:{target:`storybook-preview-iframe`}})}},i={globals:{},userGlobals:{},storyGlobals:{},globalTypes:{}},a=({globals:t,storyGlobals:n,userGlobals:r})=>{let{globals:i,userGlobals:a,storyGlobals:o}=e.getState();Ti(t,i)||e.setState({globals:t}),Ti(r,a)||e.setState({userGlobals:r}),Ti(n,o)||e.setState({storyGlobals:n})};return n.channel?.on(Bs,function({globals:e,storyGlobals:n,userGlobals:r}){let{ref:i}=pc(this,t);i?zs.warn(`received a GLOBALS_UPDATED from a non-local ref. This is not currently supported.`):a({globals:e,storyGlobals:n,userGlobals:r})}),n.channel?.on(Vs,function({globals:n,globalTypes:i}){let{ref:a}=pc(this,t),o=e.getState()?.globals;a?Object.keys(n).length>0&&zs.warn(`received globals from a non-local ref. This is not currently supported.`):e.setState({globals:n,userGlobals:n,globalTypes:i}),o&&Object.keys(o).length!==0&&!Ti(n,o)&&r.updateGlobals(o)}),{api:r,state:i}},hc={};i(hc,{ActiveTabs:()=>bc,defaultLayoutState:()=>xc,focusableUIElements:()=>Sc,init:()=>Dc});var{SET_CONFIG:gc}=__STORYBOOK_MODULE_CORE_EVENTS__,{global:_c}=__STORYBOOK_MODULE_GLOBAL__,{document:vc}=_c,yc=e=>typeof e==`function`,bc={SIDEBAR:`sidebar`,CANVAS:`canvas`,ADDONS:`addons`},xc={ui:{enableShortcuts:!0},layout:{initialActive:bc.CANVAS,showToolbar:!0,navSize:300,bottomPanelHeight:300,rightPanelWidth:400,recentVisibleSizes:{navSize:300,bottomPanelHeight:300,rightPanelWidth:400},panelPosition:`bottom`,showTabs:!0},layoutCustomisations:{showSidebar:void 0,showToolbar:void 0},selectedPanel:void 0,theme:T()},Sc={storySearchField:`storybook-explorer-searchfield`,storyListMenu:`storybook-explorer-menu`,storyPanelRoot:`storybook-panel-root`},Cc=e=>e.layout.navSize>0,wc=e=>{let{bottomPanelHeight:t,rightPanelWidth:n,panelPosition:r}=e.layout;return r===`bottom`&&t>0||r===`right`&&n>0},Tc=e=>!Cc(e)&&!wc(e),Ec=e=>({navSize:e.navSize>0?e.navSize:e.recentVisibleSizes.navSize,bottomPanelHeight:e.bottomPanelHeight>0?e.bottomPanelHeight:e.recentVisibleSizes.bottomPanelHeight,rightPanelWidth:e.rightPanelWidth>0?e.rightPanelWidth:e.recentVisibleSizes.rightPanelWidth}),Dc=({store:e,provider:t,singleStory:n})=>{let r={toggleFullscreen(t){return e.setState(e=>{let n=Tc(e),r=typeof t==`boolean`?t:!n;return r===n?{layout:e.layout}:r?{layout:{...e.layout,navSize:0,bottomPanelHeight:0,rightPanelWidth:0,recentVisibleSizes:Ec(e.layout)}}:{layout:{...e.layout,navSize:e.singleStory?0:e.layout.recentVisibleSizes.navSize,bottomPanelHeight:e.layout.recentVisibleSizes.bottomPanelHeight,rightPanelWidth:e.layout.recentVisibleSizes.rightPanelWidth}}},{persistence:`session`})},togglePanel(t){return e.setState(e=>{let n=wc(e),r=typeof t==`boolean`?t:!n;return r===n?{layout:e.layout}:r?{layout:{...e.layout,bottomPanelHeight:e.layout.recentVisibleSizes.bottomPanelHeight,rightPanelWidth:e.layout.recentVisibleSizes.rightPanelWidth}}:{layout:{...e.layout,bottomPanelHeight:0,rightPanelWidth:0,recentVisibleSizes:Ec(e.layout)}}},{persistence:`session`})},togglePanelPosition(t){return e.setState(e=>{let n=t||(e.layout.panelPosition===`right`?`bottom`:`right`);return{layout:{...e.layout,panelPosition:n,bottomPanelHeight:e.layout.recentVisibleSizes.bottomPanelHeight,rightPanelWidth:e.layout.recentVisibleSizes.rightPanelWidth}}},{persistence:`permanent`})},toggleNav(t){return e.setState(e=>{if(e.singleStory)return{layout:e.layout};let n=Cc(e),r=typeof t==`boolean`?t:!n;return r===n?{layout:e.layout}:r?{layout:{...e.layout,navSize:e.layout.recentVisibleSizes.navSize}}:{layout:{...e.layout,navSize:0,recentVisibleSizes:Ec(e.layout)}}},{persistence:`session`})},toggleToolbar(t){return e.setState(e=>{let n=typeof t<`u`?t:!e.layout.showToolbar;return{layout:{...e.layout,showToolbar:n}}},{persistence:`session`})},setSizes({navSize:t,bottomPanelHeight:n,rightPanelWidth:r}){return e.setState(e=>{let i={...e.layout,navSize:t??e.layout.navSize,bottomPanelHeight:n??e.layout.bottomPanelHeight,rightPanelWidth:r??e.layout.rightPanelWidth};return{layout:{...i,recentVisibleSizes:Ec(i)}}},{persistence:`session`})},focusOnUIElement(e,t){if(!e)return;let n=Date.now(),r=()=>{let n=vc.getElementById(e);return!n||(n.focus(),n!==vc.activeElement)?!1:(t&&n.select?.(),!0)};if(r())return;let i=setInterval(()=>{if(Date.now()-n>=500){clearInterval(i);return}r()&&clearInterval(i)},50)},getInitialOptions(){let{theme:e,selectedPanel:r,layoutCustomisations:i,...a}=t.getConfig();return{...xc,layout:{...y(xc.layout,o(a,Object.keys(xc.layout))),...n&&{navSize:0}},layoutCustomisations:{...xc.layoutCustomisations,...i??{}},ui:y(xc.ui,o(a,Object.keys(xc.ui))),selectedPanel:r||xc.selectedPanel,theme:e||xc.theme}},getIsFullscreen(){return Tc(e.getState())},getIsPanelShown(){return wc(e.getState())},getIsNavShown(){return Cc(e.getState())},getShowToolbarWithCustomisations(t){let n=e.getState();return yc(n.layoutCustomisations.showToolbar)?n.layoutCustomisations.showToolbar(n,t)??t:t},getShowPanelWithCustomisations(t){let n=e.getState();return yc(n.layoutCustomisations.showPanel)?n.layoutCustomisations.showPanel(n,t)??t:t},getNavSizeWithCustomisations(t){let n=e.getState();if(yc(n.layoutCustomisations.showSidebar)){let e=n.layoutCustomisations.showSidebar(n,t!==0);if(t===0&&e===!0)return n.layout.recentVisibleSizes.navSize;if(t!==0&&e===!1)return 0}return t},setOptions:t=>{let{layout:r,ui:i,selectedPanel:a,theme:s}=e.getState();if(!t)return;let c={...r,...t.layout||{},...o(t,Object.keys(r)),...n&&{navSize:0}},l={...i,...t.ui,...y(t.ui||{},o(t,Object.keys(i)))},d={...s,...t.theme},f={};u(i,l)||(f.ui=l),u(r,c)||(f.layout=c),t.selectedPanel&&!u(a,t.selectedPanel)&&(f.selectedPanel=t.selectedPanel),Object.keys(f).length&&e.setState(f,{persistence:`permanent`}),u(s,d)||e.setState({theme:d})}},i=o(e.getState(),[`layout`,`selectedPanel`]);return t.channel?.on(gc,()=>{r.setOptions(bs(r.getInitialOptions(),i))}),{api:r,state:bs(r.getInitialOptions(),i)}},Oc={};i(Oc,{init:()=>kc});var kc=({store:e})=>({api:{addNotification:t=>{e.setState(({notifications:e})=>{let[n,r]=Ei(e,e=>e.id===t.id);return n.forEach(e=>{e.onClear&&e.onClear({dismissed:!1,timeout:!1})}),{notifications:[...r,t]}})},clearNotification:t=>{e.setState(({notifications:e})=>{let[n,r]=Ei(e,e=>e.id===t);return n.forEach(e=>{e.onClear&&e.onClear({dismissed:!1,timeout:!1})}),{notifications:r}})}},state:{notifications:[]}}),Ac={};i(Ac,{init:()=>Nc});var{OPEN_IN_EDITOR_REQUEST:jc,OPEN_IN_EDITOR_RESPONSE:Mc}=__STORYBOOK_MODULE_CORE_EVENTS__,Nc=({provider:t,fullAPI:n})=>({api:{openInEditor(e){return new Promise(n=>{let{file:r,line:i,column:a}=e,o=e=>{e.file===r&&e.line===i&&e.column===a&&(t.channel?.off(Mc,o),n(e))};t.channel?.on(Mc,o),t.channel?.emit(jc,e)})}},state:{notifications:[]},init:async()=>{let{color:r}=await e(async()=>{let{color:e}=await import(`./theming-DpsViFyv.js`).then(e=>e.c);return{color:e}},__vite__mapDeps([0,1,2]),import.meta.url);t.channel?.on(Mc,e=>{e.error!==null&&n.addNotification({id:`open-in-editor-error`,content:{headline:`Failed to open in editor`,subHeadline:e.error||`Check the Storybook process on the command line for more details.`},icon:F.createElement(ge,{color:r.negative}),duration:8e3})})}}),Pc={};i(Pc,{init:()=>Fc});var Fc=({provider:e,fullAPI:t})=>({api:e.renderPreview?{renderPreview:e.renderPreview}:{},state:{},init:()=>{e.handleAPI(t)}}),Ic={};i(Ic,{init:()=>Lc});var Lc=({store:e,navigate:t,fullAPI:n})=>({state:{settings:{lastTrackedStoryId:null}},api:{closeSettings:()=>{let{settings:{lastTrackedStoryId:t}}=e.getState();t?n.selectStory(t):n.selectFirstStory()},changeSettingsTab:e=>{t(`/settings/${e}`)},isSettingsScreenActive:()=>{let{path:e}=n.getUrlState();return!!(e||``).match(/^\/settings/)},retrieveSelection(){let{settings:t}=e.getState();return t.lastTrackedStoryId},storeSelection:async()=>{let{storyId:t,settings:n}=e.getState();await e.setState({settings:{...n,lastTrackedStoryId:t}})}}}),Rc={};i(Rc,{controlOrMetaKey:()=>rl,defaultShortcuts:()=>al,init:()=>cl,isMacLike:()=>nl,keys:()=>il});var zc=t(ls(),1),{FORCE_REMOUNT:Bc,PREVIEW_KEYDOWN:Vc,STORIES_COLLAPSE_ALL:Hc,STORIES_EXPAND_ALL:Uc}=__STORYBOOK_MODULE_CORE_EVENTS__,{global:Wc}=__STORYBOOK_MODULE_GLOBAL__,{global:Gc}=__STORYBOOK_MODULE_GLOBAL__,{navigator:Kc}=Gc,qc=()=>Kc&&Kc.platform?!!Kc.platform.match(/(Mac|iPhone|iPod|iPad)/i):!1,Jc=()=>qc()?`⌥`:`alt`,Yc=e=>{if([`Meta`,`Alt`,`Control`,`Shift`,`Tab`].includes(e.key))return null;let t=[];e.altKey&&t.push(`alt`),e.ctrlKey&&t.push(`control`),e.metaKey&&t.push(`meta`),e.shiftKey&&t.push(`shift`);let n=e.code?.toUpperCase(),r=n?n.startsWith(`KEY`)&&n.length===4?n.replace(`KEY`,``):n.startsWith(`DIGIT`)?n.replace(`DIGIT`,``):{MINUS:`-`,EQUAL:`=`,BRACKETLEFT:`[`,BRACKETRIGHT:`]`,BACKSLASH:`\\`,SEMICOLON:`;`,QUOTE:`'`,BACKQUOTE:"`",COMMA:`,`,PERIOD:`.`,SLASH:`/`}[n]:void 0;if(e.key&&e.key.length===1&&e.key!==` `){let n=e.key.toUpperCase(),i=r;i&&i.length===1&&i!==n?t.push([n,i]):t.push(n)}else e.key===`Dead`&&r&&t.push(r);return e.key===` `&&t.push(`space`),e.key===`Escape`&&t.push(`escape`),e.key===`ArrowRight`&&t.push(`ArrowRight`),e.key===`ArrowDown`&&t.push(`ArrowDown`),e.key===`ArrowUp`&&t.push(`ArrowUp`),e.key===`ArrowLeft`&&t.push(`ArrowLeft`),t.length>0?t:null},Xc=(e,t)=>!e||!t||(e.join(``).startsWith(`shift/`)&&e.shift(),e.length!==t.length)?!1:!e.find((e,n)=>Array.isArray(e)?!e.includes(t[n]):e!==t[n]),Zc=e=>e===`alt`?Jc():e===`control`?`⌃`:e===`meta`?`⌘`:e===`shift`?`⇧`:e===`Enter`||e===`Backspace`||e===`Esc`||e===`escape`?``:e===` `?`SPACE`:e===`ArrowUp`?`↑`:e===`ArrowDown`?`↓`:e===`ArrowLeft`?`←`:e===`ArrowRight`?`→`:e?.toUpperCase(),Qc=e=>e.map(Zc).join(` `),$c=e=>e.map(e=>e===`+`?`plus`:e===` `?`space`:e).join(`+`),{navigator:el,document:tl}=Wc,nl=()=>el&&el.platform?!!el.platform.match(/(Mac|iPhone|iPod|iPad)/i):!1,rl=()=>nl()?`meta`:`control`;function il(e){return Object.keys(e)}var al=Object.freeze({fullScreen:[`alt`,`F`],togglePanel:[`alt`,`A`],panelPosition:[`alt`,`D`],toggleNav:[`alt`,`S`],toolbar:[`alt`,`T`],search:[rl(),`K`],focusNav:[`1`],focusIframe:[`2`],focusPanel:[`3`],prevComponent:[`alt`,`ArrowUp`],nextComponent:[`alt`,`ArrowDown`],prevStory:[`alt`,`ArrowLeft`],nextStory:[`alt`,`ArrowRight`],shortcutsPage:[rl(),`shift`,`,`],aboutPage:[rl(),`,`],escape:[`escape`],collapseAll:[rl(),`shift`,`ArrowUp`],expandAll:[rl(),`shift`,`ArrowDown`],remount:[`alt`,`R`],openInEditor:[`alt`,`shift`,`E`],openInIsolation:[`alt`,`shift`,`I`],copyStoryLink:[`alt`,`shift`,`L`],goToPreviousLandmark:[`shift`,`F6`],goToNextLandmark:[`F6`]}),ol={};function sl(e){let t=e.target;return!!(/input|textarea/i.test(t.tagName)||t.getAttribute(`contenteditable`)!==null||t.closest(`dialog[open]`))}var cl=({store:e,fullAPI:t,provider:n})=>{let r={getShortcutKeys(){return e.getState().shortcuts},getDefaultShortcuts(){return{...al,...r.getAddonsShortcutDefaults()}},getAddonsShortcuts(){return ol},getAddonsShortcutLabels(){let e={};return Object.entries(r.getAddonsShortcuts()).forEach(([t,{label:n}])=>{e[t]=n}),e},getAddonsShortcutDefaults(){let e={};return Object.entries(r.getAddonsShortcuts()).forEach(([t,{defaultShortcut:n}])=>{e[t]=n}),e},async setShortcuts(t){let{shortcuts:n}=await e.setState(e=>({shortcuts:typeof t==`function`?t(e.shortcuts):t}),{persistence:`permanent`});return n},async restoreAllDefaultShortcuts(){return r.setShortcuts(r.getDefaultShortcuts())},async setShortcut(e,t){return await r.setShortcuts(n=>({...n,[e]:t})),t},async setAddonShortcut(e,t){return await r.setShortcuts(n=>({...n,[`${e}-${t.actionName}`]:t.defaultShortcut})),ol[`${e}-${t.actionName}`]=t,t},async restoreDefaultShortcut(e){let t=r.getDefaultShortcuts()[e];return r.setShortcut(e,t)},handleKeydownEvent(e){let t=Yc(e),n=r.getShortcutKeys(),i=il(n).find(e=>Xc(t,n[e]));i&&r.handleShortcutFeature(i,e)},handleShortcutFeature(n,r){let{ui:{enableShortcuts:i},storyId:a,refId:o,viewMode:s}=e.getState();if(i)switch(r?.preventDefault&&r.preventDefault(),n){case`escape`:t.getIsFullscreen()?t.toggleFullscreen(!1):t.getIsNavShown()&&t.toggleNav(!0);break;case`goToNextLandmark`:case`goToPreviousLandmark`:break;case`focusNav`:t.getIsFullscreen()&&t.toggleFullscreen(!1),t.getIsNavShown()||t.toggleNav(!0),t.focusOnUIElement(Sc.storyListMenu);break;case`search`:t.getIsFullscreen()&&t.toggleFullscreen(!1),t.getIsNavShown()||t.toggleNav(!0),setTimeout(()=>{t.focusOnUIElement(Sc.storySearchField,!0)},0);break;case`focusIframe`:{let e=tl.getElementById(`storybook-preview-iframe`);if(e)try{e.contentWindow.focus()}catch{}break}case`focusPanel`:t.getIsFullscreen()&&t.toggleFullscreen(!1),t.getIsPanelShown()||t.togglePanel(!0),t.focusOnUIElement(Sc.storyPanelRoot);break;case`nextStory`:t.jumpToStory(1);break;case`prevStory`:t.jumpToStory(-1);break;case`nextComponent`:t.jumpToComponent(1);break;case`prevComponent`:t.jumpToComponent(-1);break;case`fullScreen`:t.toggleFullscreen();break;case`togglePanel`:t.togglePanel();break;case`toggleNav`:t.toggleNav();break;case`toolbar`:t.toggleToolbar();break;case`panelPosition`:t.getIsFullscreen()&&t.toggleFullscreen(!1),t.getIsPanelShown()||t.togglePanel(!0),t.togglePanelPosition();break;case`aboutPage`:t.navigate(`/settings/about`);break;case`shortcutsPage`:t.navigate(`/settings/shortcuts`);break;case`collapseAll`:t.emit(Hc);break;case`expandAll`:t.emit(Uc);break;case`remount`:t.emit(Bc,{storyId:a});break;case`openInEditor`:Wc.CONFIG_TYPE===`DEVELOPMENT`&&t.openInEditor({file:t.getCurrentStoryData().importPath});break;case`openInIsolation`:if(a&&s===`story`){let{previewHref:e}=t.getStoryHrefs(a,{refId:o});window.open(e,`_blank`,`noopener,noreferrer`)}break;case`copyStoryLink`:if(a){let{managerHref:e}=t.getStoryHrefs(a,{refId:o});(0,zc.default)(e)}break;default:ol[n].action();break}}},{shortcuts:i=al}=e.getState();return{api:r,state:{shortcuts:il(al).reduce((e,t)=>({...e,[t]:i[t]||al[t]}),al)},init:()=>{tl.addEventListener(`keydown`,e=>{sl(e)||r.handleKeydownEvent(e)}),n.channel?.on(Vc,e=>{r.handleKeydownEvent(e.event)})}}},ll={};i(ll,{init:()=>Ul});var{logger:ul}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{CONFIG_ERROR:dl,CURRENT_STORY_WAS_SET:fl,DOCS_PREPARED:pl,PRELOAD_ENTRIES:ml,RESET_STORY_ARGS:hl,SELECT_STORY:gl,SET_CONFIG:_l,SET_CURRENT_STORY:vl,SET_FILTER:yl,SET_INDEX:bl,SET_STORIES:xl,STORY_ARGS_UPDATED:Sl,STORY_CHANGED:Cl,STORY_INDEX_INVALIDATED:wl,STORY_MISSING:Tl,STORY_PREPARED:El,STORY_SPECIFIED:Dl,UPDATE_STORY_ARGS:Ol}=__STORYBOOK_MODULE_CORE_EVENTS__,{global:kl}=__STORYBOOK_MODULE_GLOBAL__;t(us(),1);var Al=class extends vi{constructor(e){super({name:`StatusTypeIdMismatchError`,category:`CORE-SERVER`,code:16,message:`Status has typeId "${e.status.typeId}" but was added to store with typeId "${e.typeId}". Full status: ${JSON.stringify(e.status,null,2)}`}),this.data=e}},jl={id:`storybook/status`,leader:!0,initialState:{}},Ml={SELECT:`select`};function Nl({universalStatusStore:e,useUniversalStore:t,environment:n}){let r={getAll(){return e.getState()},set(t){e.setState(e=>{let n={...e};for(let e of t){let{storyId:t,typeId:r}=e;n[t]={...n[t]??{},[r]:e}}return n})},onAllStatusChange(t){return e.onStateChange((e,n)=>{t(e,n)})},onSelect(t){return e.subscribe(Ml.SELECT,e=>{t(e.payload)})},selectStatuses:t=>{e.send({type:Ml.SELECT,payload:t})},unset(t){if(!t){e.setState({});return}e.setState(e=>{let n={...e};for(let e of t)delete n[e];return n})},typeId:void 0},i=t=>({getAll:r.getAll,set(r){e.setState(e=>{let i={...e};for(let e of r){let{storyId:r}=e;if(e.typeId!==t)switch(n){case`server`:throw new Al({status:e,typeId:t});case`manager`:throw new bi({status:e,typeId:t});case`preview`:default:throw new Si({status:e,typeId:t})}i[r]={...i[r]??{},[t]:e}}return i})},onAllStatusChange:r.onAllStatusChange,onSelect(n){return e.subscribe(Ml.SELECT,e=>{e.payload.some(e=>e.typeId===t)&&n(e.payload)})},unset(n){e.setState(e=>{let r={...e};for(let e in r)if(r[e]?.[t]&&(!n||n?.includes(e))){let{[t]:n,...i}=r[e];r[e]=i}return r})},typeId:t});return t?{getStatusStoreByTypeId:i,fullStatusStore:r,universalStatusStore:e,useStatusStore:n=>t(e,n)[0]}:{getStatusStoreByTypeId:i,fullStatusStore:r,universalStatusStore:e}}var Pl=(e,t)=>{let n=F.useRef(t?t(e.getState()):e.getState()),r=F.useCallback(r=>e.onStateChange((e,i)=>{if(!t){n.current=e,r();return}let a=t(e);!u(a,t(i))&&(n.current=a,r())}),[e,t]),i=F.useCallback(()=>{let r=e.getState(),i=t?t(r):r;return u(i,n.current)||(n.current=i),n.current},[e,t]);return[F.useSyncExternalStore(r,i),e.setState]},{fullStatusStore:Fl,getStatusStoreByTypeId:Il,useStatusStore:Ll,universalStatusStore:Rl}=Nl({universalStatusStore:je.create({...jl,leader:globalThis.CONFIG_TYPE===`PRODUCTION`}),useUniversalStore:Pl,environment:`manager`}),{fetch:zl}=kl,Bl=`./index.json`,Vl=[`enableShortcuts`,`theme`,`showRoots`];function Hl(e){if(!e||typeof e==`string`)return e;let t={...e};return Vl.forEach(e=>{e in t&&delete t[e]}),t}var Ul=({fullAPI:e,store:t,navigate:n,provider:r,storyId:i,viewMode:a,docsOptions:o={}})=>{let s={storyId:l,getData:(e,t)=>{let n=s.resolveStory(e,t);if(n?.type===`story`||n?.type===`docs`)return n},isPrepared:(e,t)=>{let n=s.getData(e,t);return n?n.type===`story`?n.prepared:!0:!1},resolveStory:(e,n)=>{let{refs:r,index:i}=t.getState();if(!(n&&!r[n]))return n?r?.[n]?.index?.[e]??void 0:i?i[e]:void 0},getCurrentStoryData:()=>{let{storyId:e,refId:n}=t.getState();return s.getData(e,n)},getIndex:()=>{let{internal_index:e}=t.getState();return e},getParameters:(e,t)=>{let{storyId:n,refId:r}=typeof e==`string`?{storyId:e,refId:void 0}:e,i=s.getData(n,r);if([`story`,`docs`].includes(i?.type)){let{parameters:e}=i;if(e)return t?e[t]:e}return null},getCurrentParameter:e=>{let{storyId:n,refId:r}=t.getState();return s.getParameters({storyId:n,refId:r},e)||void 0},jumpToComponent:e=>{let{filteredIndex:n,storyId:r,refs:i,refId:a}=t.getState();if(!s.getData(r,a))return;let o=a?i[a].filteredIndex||{}:n;if(!o)return;let c=s.findSiblingStoryId(r,o,e,!0);c&&s.selectStory(c,void 0,{ref:a})},jumpToStory:e=>{let{filteredIndex:n,storyId:r,refs:i,refId:a}=t.getState(),o=s.getData(r,a);if(!o)return;let c=o.refId?i[o.refId].filteredIndex:n;if(!c)return;let l=s.findSiblingStoryId(r,c,e,!1);l&&s.selectStory(l,void 0,{ref:a})},selectFirstStory:()=>{let{index:e}=t.getState();if(!e)return;let r=Object.keys(e).find(t=>e[t].type===`story`);if(r){s.selectStory(r);return}n(`/`)},selectStory:(e=void 0,r=void 0,i={})=>{let{ref:a}=i,{storyId:o,index:c,filteredIndex:u,refs:d,settings:f}=t.getState(),p=e=>e?.type===`docs`||e?.type===`story`?(t.setState({settings:{...f,lastTrackedStoryId:e.id}}),n(`/${e.type}/${e.refId?`${e.refId}_${e.id}`:e.id}`),!0):!1,m=o?.split(`--`,2)[0],h=a?d[a].index:c,_=a?d[a].filteredIndex:u;if(!(!h||!_))if(r)if(!e)p(h[l(m,r)]);else{let t=a?`${a}_${l(e,r)}`:l(e,r);if(h[t])p(h[t]);else{let t=h[g(e)];if(t?.type===`component`){let e=t.children.find(e=>h[e].name===r);p(e?h[e]:void 0)}}}else{let t=e?h[e]||h[g(e)]:h[m];if(!t)throw Error(`Unknown id or title: '${e}'`);p(t)||p(s.findLeafEntry(_,t.id))}},findLeafEntry(e,t){let n=e[t];if(n.type===`docs`||n.type===`story`)return n;let r=n.children.find(t=>e[t])||n.children[0];return s.findLeafEntry(e,r)},findLeafStoryId(e,t){return s.findLeafEntry(e,t)?.id},findAllLeafStoryIds(e){let{index:n}=t.getState();if(!n)return[];let r=(e,t=[])=>{let i=n[e];return i&&(i.type===`story`&&t.push(i.id),`children`in i&&i.children?.forEach(e=>r(e,t))),t};return r(e,[])},findSiblingStoryId(e,t,n,r){if(r){let r=nc(t),i=r.findIndex(t=>t.includes(e));return i===r.length-1&&n>0||i===0&&n<0?void 0:r[i+n]?r[i+n][0]:void 0}let i=rc(t),a=i.indexOf(e);if(!(a===i.length-1&&n>0)&&!(a===0&&n<0))return i[a+n]},updateStoryArgs:(e,t)=>{let{id:n,refId:i}=e;r.channel?.emit(Ol,{storyId:n,updatedArgs:t,options:{target:i}})},resetStoryArgs:(e,t)=>{let{id:n,refId:i}=e;r.channel?.emit(hl,{storyId:n,argNames:t,options:{target:i}})},fetchIndex:async()=>{try{let e=await zl(Bl);if(e.status!==200)throw Error(await e.text());let t=await e.json();if(t.v<3){ul.warn(`Skipping story index with version v${t.v}, awaiting SET_STORIES.`);return}await s.setIndex(t)}catch(e){await t.setState({indexError:e})}},setIndex:async e=>{let{filteredIndex:n,index:i,filters:a}=t.getState(),s=Fl.getAll(),c=ec(e,{provider:r,docsOptions:o,filters:a,allStatuses:s}),l=ec(e,{provider:r,docsOptions:o,filters:{},allStatuses:s});await t.setState({internal_index:e,filteredIndex:tc(c,n),index:tc(l,i),indexError:void 0})},updateStory:async(n,r,i)=>{if(i){let{id:t,index:a,filteredIndex:o}=i;a&&a[n]&&(a[n]={...a[n],...r}),o&&o[n]&&(o[n]={...o[n],...r}),await e.updateRef(t,{index:a,filteredIndex:o})}else{let{index:e,filteredIndex:i}=t.getState();e&&e[n]&&(e[n]={...e[n],...r}),i&&i[n]&&(i[n]={...i[n],...r}),(e||i)&&await t.setState({index:e,filteredIndex:i})}},updateDocs:async(n,r,i)=>{if(i){let{id:t,index:a,filteredIndex:o}=i;a[n]={...a[n],...r},o[n]={...o[n],...r},await e.updateRef(t,{index:a,filteredIndex:o})}else{let{index:e,filteredIndex:i}=t.getState();e&&(e[n]={...e[n],...r}),i&&(i[n]={...i[n],...r}),(e||i)&&await t.setState({index:e,filteredIndex:i})}},setPreviewInitialized:async n=>{n?e.updateRef(n.id,{previewInitialized:!0}):t.setState({previewInitialized:!0})},experimental_setFilter:async(n,i)=>{await t.setState({filters:{...t.getState().filters,[n]:i}});let{internal_index:a}=t.getState();if(!a)return;await s.setIndex(a);let o=await e.getRefs();Object.entries(o).forEach(([t,{internal_index:n,...r}])=>{e.setRef(t,{...r,storyIndex:n},!0)}),r.channel?.emit(yl,{id:n})}};return r.channel?.on(Dl,function({storyId:i,viewMode:a}){let{sourceType:o}=pc(this,e);if(o===`local`){let e=t.getState(),o=e.path===`/`||e.viewMode===`story`||e.viewMode===`docs`,s=e.viewMode&&e.storyId,c=e.viewMode!==a||e.storyId!==i,{type:l}=e.index?.[e.storyId]||{};o&&(s&&c&&!(l===`root`||l===`component`||l===`group`)?r.channel?.emit(vl,{storyId:e.storyId,viewMode:e.viewMode}):c&&n(`/${a}/${i}`))}}),r.channel?.on(fl,function(){let{ref:t}=pc(this,e);s.setPreviewInitialized(t)}),r.channel?.on(Cl,function(){let{sourceType:t}=pc(this,e);if(t===`local`){let t=s.getCurrentParameter(`options`);t&&e.setOptions(Hl(t))}}),r.channel?.on(El,function({id:n,...i}){let{ref:a,sourceType:o}=pc(this,e);if(s.updateStory(n,{...i,prepared:!0},a),!a&&!t.getState().hasCalledSetOptions){let{options:n}=i.parameters;e.setOptions(Hl(n)),t.setState({hasCalledSetOptions:!0})}if(o===`local`){let{storyId:e,index:n,refId:i}=t.getState();if(!n)return;let a=Array.from(new Set([s.findSiblingStoryId(e,n,1,!0),s.findSiblingStoryId(e,n,-1,!0)])).filter(Boolean);r.channel?.emit(ml,{ids:a,options:{target:i}})}}),r.channel?.on(pl,function({id:t,...n}){let{ref:r}=pc(this,e);s.updateStory(t,{...n,prepared:!0},r)}),r.channel?.on(bl,function(t){let{ref:n}=pc(this,e);if(n)e.setRef(n.id,{...n,storyIndex:t},!0);else{s.setIndex(t);let n=s.getCurrentParameter(`options`);e.setOptions(Hl(n))}}),r.channel?.on(xl,function(t){let{ref:n}=pc(this,e),r=t.v?Ys(t):t.stories;if(n)e.setRef(n.id,{...n,setStoriesData:r},!0);else throw Error(`Cannot call SET_STORIES for local frame`)}),r.channel?.on(gl,function({kind:t,title:n=t,story:r,name:i=r,storyId:a,...o}){let{ref:s}=pc(this,e);s?e.selectStory(a||n,i,{...o,ref:s.id}):e.selectStory(a||n,i,o)}),r.channel?.on(Sl,function({storyId:t,args:n}){let{ref:r}=pc(this,e);s.updateStory(t,{args:n},r)}),r.channel?.on(dl,function(t){let{ref:n}=pc(this,e);s.setPreviewInitialized(n)}),r.channel?.on(Tl,function(t){let{ref:n}=pc(this,e);s.setPreviewInitialized(n)}),r.channel?.on(_l,()=>{let e=r.getConfig();e?.sidebar?.filters&&t.setState({filters:{...t.getState().filters,...e?.sidebar?.filters}})}),Fl.onAllStatusChange(async()=>{let{internal_index:n}=t.getState();if(!n)return;await s.setIndex(n);let r=await e.getRefs();Object.entries(r).forEach(([t,{internal_index:n,...r}])=>{e.setRef(t,{...r,storyIndex:n},!0)})}),{api:s,state:{storyId:i,viewMode:a,hasCalledSetOptions:!1,previewInitialized:!1,filters:r.getConfig()?.sidebar?.filters||{}},init:async()=>{r.channel?.on(wl,()=>s.fetchIndex()),await s.fetchIndex()}}},Wl={};i(Wl,{init:()=>ru});var{GLOBALS_UPDATED:Gl,NAVIGATE_URL:Kl,SET_CURRENT_STORY:ql,STORY_ARGS_UPDATED:Jl,UPDATE_QUERY_PARAMS:Yl}=__STORYBOOK_MODULE_CORE_EVENTS__,{global:Xl}=__STORYBOOK_MODULE_GLOBAL__,Zl=t(c(),1),Ql=e=>{if(e===`true`||e===`1`)return!0;if(e===`false`||e===`0`)return!1},$l=e=>Object.fromEntries(e.split(`;`).map(e=>e.split(`:`)).map(([e,t])=>[e,encodeURIComponent(t)]).filter(([e,t])=>e&&t)),eu=(e,t)=>{let n=$l(e),r=$l(t);return Object.entries({...n,...r}).map(([e,t])=>`${e}:${t}`).join(`;`)},tu,nu=({state:{location:e,path:t,viewMode:n,storyId:r},singleStory:i})=>{let{full:a,panel:o,nav:s,shortcuts:c,addonPanel:l,tabs:u,path:d,...f}=Gi(e),p,m,h;Ql(a)===!0?(p=0,m=0,h=0):Ql(a)===!1&&(p=xc.layout.navSize,m=xc.layout.bottomPanelHeight,h=xc.layout.rightPanelWidth),i||(Ql(s)===!0&&(p=xc.layout.navSize),Ql(s)===!1&&(p=0)),Ql(o)===!1&&(m=0,h=0);let g={navSize:p,bottomPanelHeight:m,rightPanelWidth:h,panelPosition:[`right`,`bottom`].includes(o)?o:void 0,showTabs:Ql(u)},_={enableShortcuts:Ql(c)},v=l||void 0,y=r,b=Ti(tu,f)?tu:f;return tu=b,{viewMode:n,layout:g,ui:_,selectedPanel:v,location:e,path:t,customQueryParams:b,storyId:y}},ru=e=>{let{store:t,navigate:n,provider:r,fullAPI:i}=e,a=(e,t={},r={})=>n([e,...Object.entries(t).filter(([,e])=>e).sort(([e],[t])=>e<t?-1:1).map(([e,t])=>`${e}=${t}`)].join(`&`),r),o={getStoryHrefs(e,n={}){let{id:r,refId:a}=i.getCurrentStoryData()??{},o=e===r&&n.refId===a,{customQueryParams:s,location:c,refs:l}=t.getState(),{base:u,inheritArgs:f=o,inheritGlobals:p=!0,queryParams:m={},refId:h,viewMode:g=`story`}=n;if(h&&!l[h])throw Error(`Invalid refId: ${h}`);let _=c.pathname||`/`,v=Xl.window.location.origin+_,y=Xl.STORYBOOK_NETWORK_ADDRESS??v,b=u===`origin`?v:u===`network`?y:_,x=h?l[h].url+`/iframe.html`:Xl.PREVIEW_URL||`${b.replace(/\/[^/]*$/,`/`)}iframe.html`,S=h?`&refId=${encodeURIComponent(h)}`:``,{args:C=``,globals:w=``,...T}=m,E=f?eu(s?.args??``,C):C,D=p?eu(s?.globals??``,w):w,O=(0,Zl.stringify)(T,{nesting:!0,nestingSyntax:`js`}),k=(0,Zl.stringify)(d(T,[`id`,`viewMode`]),{nesting:!0,nestingSyntax:`js`});return E&&=`&args=${E}`,D&&=`&globals=${D}`,O&&=`&${O}`,k&&=`&${k}`,{managerHref:`${b}?path=/${g}/${h?`${h}_`:``}${e}${E}${D}${O}`,previewHref:`${x}?id=${e}&viewMode=${g}${S}${E}${h?``:D}${k}`}},getQueryParam(e){let{customQueryParams:n}=t.getState();return n?n[e]:void 0},getUrlState(){let{location:e,path:n,customQueryParams:r,storyId:i,url:a,viewMode:o}=t.getState();return{path:n,hash:e.hash??``,queryParams:r,storyId:i,url:a,viewMode:o}},setQueryParams(e){let{customQueryParams:n}=t.getState(),i={},a={...n,...Object.entries(e).reduce((e,[t,n])=>(n!==null&&(e[t]=n),e),i)};Ti(n,a)||(t.setState({customQueryParams:a}),r.channel?.emit(Yl,a))},applyQueryParams(e,t){let{path:n,hash:r=``,queryParams:i}=o.getUrlState();a(`${n}${r}`,{...i,...e},t),o.setQueryParams(e)},navigateUrl(e,t){n(e,{plain:!0,...t})}},s=()=>{let{path:e,hash:t=``,queryParams:n,viewMode:r}=o.getUrlState();if(r!==`story`)return;let s=i.getCurrentStoryData();if(s?.type!==`story`)return;let{args:c,initialArgs:l}=s,u=Ui(l,c);a(`${e}${t}`,{...n,args:u},{replace:!0}),o.setQueryParams({args:u})};r.channel?.on(ql,()=>s());let c;return r.channel?.on(Jl,()=>{`requestIdleCallback`in Xl.window?(c&&Xl.window.cancelIdleCallback(c),c=Xl.window.requestIdleCallback(s,{timeout:1e3})):(c&&clearTimeout(c),setTimeout(s,100))}),r.channel?.on(Gl,({userGlobals:e,initialGlobals:t})=>{let{path:n,hash:r=``,queryParams:i}=o.getUrlState(),s=Ui(t,bs(t,e));a(`${n}${r}`,{...i,globals:s},{replace:!0}),o.setQueryParams({globals:s})}),r.channel?.on(Kl,(e,t)=>{o.navigateUrl(e,t)}),{api:o,state:nu(e)}},iu={};i(iu,{init:()=>du});var au=t(v(),1),{global:ou}=__STORYBOOK_MODULE_GLOBAL__,su=`10.2.8`,{VERSIONCHECK:cu}=ou,lu=(0,au.default)(1)(()=>{try{return{...JSON.parse(cu).data||{}}}catch{return{}}}),uu=e=>e.includes(`vue`)?`vue`:e,du=({store:e})=>{let{dismissedVersionNotification:t}=e.getState(),n={versions:{current:{version:su},...lu()},dismissedVersionNotification:t},r={getCurrentVersion:()=>{let{versions:{current:t}}=e.getState();return t},getLatestVersion:()=>{let{versions:{latest:t,next:n,current:r}}=e.getState();return r&&ss.default.prerelease(r.version)&&n?t&&ss.default.gt(t.version,n.version)?t:n:t},getDocsUrl:({asset:t,subpath:n=t,versioned:r,renderer:i,ref:a=`ui`})=>{let{versions:o}=e.getState(),s=o.latest?.version,c=o.current?.version,l=c?.startsWith(`0.0.0`)&&s||c,u=`https://storybook.js.org/${t?`docs-assets`:`docs`}/`;if(t&&l)u+=`${ss.default.major(l)}.${ss.default.minor(l)}/`;else if(r&&l&&s){let e=ss.default.diff(s,l);e===`patch`||e===null||(u+=`${ss.default.major(l)}.${ss.default.minor(l)}/`)}let[d,f]=n?.split(`#`)||[];if(d&&(u+=t?d:`${d}/`),i&&typeof ou.STORYBOOK_RENDERER<`u`){let e=ou.STORYBOOK_RENDERER;e&&(u+=`?renderer=${uu(e)}`)}return a&&(u+=`${u.includes(`?`)?`&`:`?`}ref=${a}`),f&&(u+=`#${f}`),u},versionUpdateAvailable:()=>{let e=r.getLatestVersion(),t=r.getCurrentVersion();if(e){if(!e.version||!t.version)return!0;let n=ss.default.prerelease(t.version)?`${ss.default.major(t.version)}.${ss.default.minor(t.version)}.${ss.default.patch(t.version)}`:t.version,r=ss.default.diff(n,e.version);return ss.default.gt(e.version,n)&&r!==`patch`&&!r.includes(`pre`)}return!1}};return{init:async()=>{let{versions:t={}}=e.getState(),{latest:n,next:r}=lu();await e.setState({versions:{...t,latest:n,next:r}})},state:n,api:r}},fu={};i(fu,{init:()=>bu});var{REQUEST_WHATS_NEW_DATA:pu,RESULT_WHATS_NEW_DATA:mu,SET_WHATS_NEW_CACHE:hu,TOGGLE_WHATS_NEW_NOTIFICATIONS:gu}=__STORYBOOK_MODULE_CORE_EVENTS__,{global:_u}=__STORYBOOK_MODULE_GLOBAL__,vu=`whats-new`,yu=({color:e=`currentColor`,size:t=14})=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2.042.616a.704.704 0 00-.66.729L1.816 12.9c.014.367.306.66.672.677l9.395.422h.032a.704.704 0 00.704-.703V.704c0-.015 0-.03-.002-.044a.704.704 0 00-.746-.659l-.773.049.057 1.615a.105.105 0 01-.17.086l-.52-.41-.617.468a.105.105 0 01-.168-.088L9.746.134 2.042.616zm8.003 4.747c-.247.192-2.092.324-2.092.05.04-1.045-.429-1.091-.689-1.091-.247 0-.662.075-.662.634 0 .57.607.893 1.32 1.27 1.014.538 2.24 1.188 2.24 2.823 0 1.568-1.273 2.433-2.898 2.433-1.676 0-3.141-.678-2.976-3.03.065-.275 2.197-.21 2.197 0-.026.971.195 1.256.753 1.256.43 0 .624-.236.624-.634 0-.602-.633-.958-1.361-1.367-.987-.554-2.148-1.205-2.148-2.7 0-1.494 1.027-2.489 2.86-2.489 1.832 0 2.832.98 2.832 2.845z`,fill:e})),bu=({fullAPI:e,store:t,provider:n})=>{let r={whatsNewData:void 0};function i(e){t.setState({whatsNewData:e}),r.whatsNewData=e}let a={isWhatsNewUnread(){return r.whatsNewData?.status===`SUCCESS`&&!r.whatsNewData.postIsRead},whatsNewHasBeenRead(){r.whatsNewData?.status===`SUCCESS`&&(s({lastReadPost:r.whatsNewData.url}),i({...r.whatsNewData,postIsRead:!0}),e.clearNotification(vu))},toggleWhatsNewNotifications(){r.whatsNewData?.status===`SUCCESS`&&(i({...r.whatsNewData,disableWhatsNewNotifications:!r.whatsNewData.disableWhatsNewNotifications}),n.channel?.emit(gu,{disableWhatsNewNotifications:r.whatsNewData.disableWhatsNewNotifications}))}};function o(){return n.channel?.emit(pu),new Promise(e=>n.channel?.once(mu,({data:t})=>e(t)))}function s(e){n.channel?.emit(hu,e)}return{init:async()=>{if(_u.CONFIG_TYPE!==`DEVELOPMENT`)return;let t=await o();i(t);let n=e.getUrlState();!(n?.path===`/onboarding`||n.queryParams?.onboarding===`true`)&&t.status===`SUCCESS`&&!t.disableWhatsNewNotifications&&t.showNotification&&e.addNotification({id:vu,link:`/settings/whats-new`,content:{headline:t.title,subHeadline:`Learn what's new in Storybook`},icon:F.createElement(yu,null),onClear({dismissed:e}){e&&s({lastDismissedPost:t.url})}})},state:r,api:a}},xu=t(ds(),1);(e=>{e.fn(`set`,function(t,n){return e.set(this._area,this._in(t),pi(n,{maxDepth:50}))}),e.fn(`get`,function(t,n){let r=e.get(this._area,this._in(t));return r===null?n||r:hi(r)})})(xu.default._);var Su=`@storybook/manager/store`;function Cu(e){return e.get(Su)||{}}function wu(e,t){return e.set(Su,t)}function Tu(e,t){return wu(e,{...Cu(e),...t})}var Eu=class{constructor({setState:e,getState:t}){this.upstreamSetState=e,this.upstreamGetState=t}getInitialState(e){return{...e,...Cu(xu.default.local),...Cu(xu.default.session)}}getState(){return this.upstreamGetState()}async setState(e,t,n){let r,i;typeof t==`function`?(r=t,i=n):i=t;let{persistence:a=`none`}=i||{},o={},s={};typeof e==`function`?o=t=>(s=e(t),s):(o=e,s=o);let c=await new Promise(e=>{this.upstreamSetState(o,()=>{e(this.getState())})});return a!==`none`&&await Tu(a===`session`?xu.default.session:xu.default.local,s),r&&r(c),c}},{ActiveTabs:Du}=hc,Ou=vs({api:void 0,state:Ss({})}),ku=(...e)=>xs({},...e),Au=class extends F.Component{constructor(e){super(e),this.api={},this.initModules=()=>{this.modules.forEach(e=>{`init`in e&&e.init()})};let{location:t,path:n,refId:r,viewMode:i=e.docsOptions.docsMode?`docs`:e.viewMode,singleStory:a,storyId:o,docsOptions:s,navigate:c}=e,l=new Eu({getState:()=>this.state,setState:(e,t)=>(this.setState(e,()=>t(this.state)),this.state)}),u={location:t,path:n,viewMode:i,singleStory:a,storyId:o,refId:r},d={docsOptions:s};this.state=l.getInitialState(Ss({...u,...d}));let f={navigate:c,store:l,provider:e.provider};this.modules=[Pc,Is,Ms,hc,Oc,Ic,Rc,ll,Ws,Rs,Wl,iu,fu,Ac].map(e=>e.init({...u,...d,...f,state:this.state,fullAPI:this.api}));let p=Ss(this.state,...this.modules.map(e=>e.state)),m=Object.assign(this.api,{navigate:c},...this.modules.map(e=>e.api));this.state=p,this.api=m}static getDerivedStateFromProps(e,t){return t.path===e.path?null:{...t,location:e.location,path:e.path,refId:e.refId,viewMode:e.viewMode,storyId:e.storyId}}shouldComponentUpdate(e,t){let n=this.props,r=this.state;return n.path!==e.path||!u(r,t)}render(){let{children:e}=this.props,t={state:this.state,api:this.api};return F.createElement(ju,{effect:this.initModules},F.createElement(Ou.Provider,{value:t},F.createElement(Nu,null,e)))}};Au.displayName=`Manager`;var ju=({children:e,effect:t})=>(F.useEffect(t,[]),e),Mu=e=>e;function Nu({filter:e=Mu,children:t}){let n=(0,F.useContext)(Ou),r=(0,F.useRef)(t),i=(0,F.useRef)(e);if(typeof r.current!=`function`)return F.createElement(F.Fragment,null,r.current);let a=i.current(n);return(0,F.useMemo)(()=>{let e=r.current;return F.createElement(e,{...a})},(0,F.useMemo)(()=>[...Object.entries(a).reduce((e,t)=>e.concat(t),[])],[n.state]))}globalThis.STORYBOOK_ADDON_STATE={};var{STORYBOOK_ADDON_STATE:Pu}=globalThis,{Channel:Fu}=__STORYBOOK_MODULE_CHANNELS__,Iu={id:`storybook/test-provider`,leader:!0,initialState:{}};function Lu({universalTestProviderStore:e,useUniversalStore:t}){let n={settingsChanged:()=>{e.untilReady().then(()=>{e.send({type:`settings-changed`})})},onRunAll:t=>e.subscribe(`run-all`,t),onClearAll:t=>e.subscribe(`clear-all`,t)},r={...n,getFullState:e.getState,setFullState:e.setState,onSettingsChanged:t=>e.subscribe(`settings-changed`,t),runAll:async()=>{await e.untilReady(),e.send({type:`run-all`})},clearAll:async()=>{await e.untilReady(),e.send({type:`clear-all`})}},i=t=>{let r=()=>e.getState()[t]??`test-provider-state:pending`,i=n=>{e.untilReady().then(()=>{e.setState(e=>({...e,[t]:n}))})};return{...n,testProviderId:t,getState:r,setState:i,runWithState:async e=>{i(`test-provider-state:running`);try{await e(),i(`test-provider-state:succeeded`)}catch{i(`test-provider-state:crashed`)}}}};return t?{getTestProviderStoreById:i,fullTestProviderStore:r,universalTestProviderStore:e,useTestProviderStore:n=>t(e,n)[0]}:{getTestProviderStoreById:i,fullTestProviderStore:r,universalTestProviderStore:e}}var{fullTestProviderStore:Ru,getTestProviderStoreById:zu,useTestProviderStore:Bu,universalTestProviderStore:Vu}=Lu({universalTestProviderStore:je.create({...Iu,leader:globalThis.CONFIG_TYPE===`PRODUCTION`}),useUniversalStore:Pl});je.create({id:`storybook/checklist`,initialState:{items:{accessibilityTests:{status:`open`},autodocs:{status:`open`},ciTests:{status:`open`},controls:{status:`open`},coverage:{status:`open`},guidedTour:{status:`open`},installA11y:{status:`open`},installChromatic:{status:`open`},installDocs:{status:`open`},installVitest:{status:`open`},mdxDocs:{status:`open`},moreComponents:{status:`open`},moreStories:{status:`open`},onboardingSurvey:{status:`open`},organizeStories:{status:`open`},publishStorybook:{status:`open`},renderComponent:{status:`open`},runTests:{status:`open`},viewports:{status:`open`},visualTests:{status:`open`},whatsNewStorybook10:{status:`open`},writeInteractions:{status:`open`}},widget:{}},leader:globalThis.CONFIG_TYPE===`PRODUCTION`});var Hu=n((e=>{var t=s();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),s=r[0].inst,l=r[1];return o(function(){s.value=n,s.getSnapshot=t,u(s)&&l({inst:s})},[e,n,t]),a(function(){return u(s)&&l({inst:s}),e(function(){u(s)&&l({inst:s})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Uu=n(((e,t)=>{t.exports=Hu()})),Wu=r({A:()=>Qu,ActionList:()=>$b,Bar:()=>QT,Blockquote:()=>$u,Button:()=>Rb,Code:()=>ld,DL:()=>ud,Div:()=>dd,EmptyTabContent:()=>hE,ErrorFormatter:()=>cS,FlexBar:()=>nE,Form:()=>qS,H1:()=>fd,H2:()=>pd,H3:()=>md,H4:()=>hd,H5:()=>gd,H6:()=>_d,HR:()=>vd,IconButton:()=>Bb,Img:()=>yd,LI:()=>bd,Link:()=>Pd,ListItem:()=>UT,Loader:()=>DD,OL:()=>xd,P:()=>Sd,Popover:()=>XS,PopoverProvider:()=>kT,Pre:()=>Cd,ResetWrapper:()=>Zu,ScrollArea:()=>re,Select:()=>fC,Separator:()=>ME,Span:()=>wd,SyntaxHighlighter:()=>id,TT:()=>Td,TabBar:()=>EE,TabButton:()=>lE,TabList:()=>YE,TabPanel:()=>ZE,TabWrapper:()=>OE,Table:()=>Ed,Tabs:()=>AE,TabsState:()=>jE,TabsView:()=>cD,ToggleButton:()=>Vb,Toolbar:()=>PE,Tooltip:()=>AT,TooltipLinkList:()=>qT,TooltipNote:()=>Zd,TooltipProvider:()=>Fb,UL:()=>Dd,Zoom:()=>Qx,codeCommon:()=>Yu,components:()=>AD,convertToReactAriaPlacement:()=>Nb,createCopyToClipboardFunction:()=>ie,nameSpaceClassNames:()=>L,resetComponents:()=>jD,useTabsState:()=>iD,withReset:()=>R}),Gu=_(),Ku=p(ne(),1),qu=Uu(),L=({...e},t)=>{let n=[e.class,e.className];return delete e.class,e.className=[`sbdocs`,`sbdocs-${t}`,...n].filter(Boolean).join(` `),e},Ju=({theme:e})=>({margin:`20px 0 8px`,padding:0,cursor:`text`,position:`relative`,color:e.color.defaultText,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:`none`},"& tt, & code":{fontSize:`inherit`}}),Yu=({theme:e})=>({lineHeight:1,margin:`0 2px`,padding:`3px 5px`,whiteSpace:`nowrap`,borderRadius:3,fontSize:e.typography.size.s2-1,border:e.base===`light`?`1px solid hsl(0 0 0 / 0.05)`:`1px solid hsl(0 0 100 / 0.05)`,color:e.color.defaultText,backgroundColor:e.base===`light`?`hsl(0 0 0 / 0.01)`:`hsl(0 0 100 / 0.02)`}),R=({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s3,margin:0,WebkitFontSmoothing:`antialiased`,MozOsxFontSmoothing:`grayscale`,WebkitTapHighlightColor:`rgba(0, 0, 0, 0)`,WebkitOverflowScrolling:`touch`}),Xu={margin:`16px 0`},Zu=N.div(R),Qu=N(({href:e=``,...t})=>{let n=/^\//.test(e)?`./?path=${e}`:e,r=/^#.*/.test(e)?`_self`:`_top`;return F.createElement(`a`,{href:n,target:r,...t})})(R,({theme:e})=>({fontSize:`inherit`,lineHeight:`24px`,color:e.color.secondary,textDecoration:`none`,"&.absent":{color:`#cc0000`},"&.anchor":{display:`block`,paddingLeft:30,marginLeft:-30,cursor:`pointer`,position:`absolute`,top:0,left:0,bottom:0}})),$u=N.blockquote(R,Xu,({theme:e})=>({borderLeft:`4px solid ${e.color.medium}`,padding:`0 15px`,color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}})),ed=[],td=null,nd=(0,F.lazy)(async()=>{let{SyntaxHighlighter:t}=await e(async()=>{let{SyntaxHighlighter:e}=await import(`./syntaxhighlighter-ED5Y7EFY-DYFKPQ-I.js`);return{SyntaxHighlighter:e}},__vite__mapDeps([3,1,2,4,5,0,6]),import.meta.url);return ed.length>0&&(ed.forEach(e=>{t.registerLanguage(...e)}),ed=[]),td===null&&(td=t),{default:e=>F.createElement(t,{...e})}}),rd=(0,F.lazy)(async()=>{let[{SyntaxHighlighter:t},{formatter:n}]=await Promise.all([e(()=>import(`./syntaxhighlighter-ED5Y7EFY-DYFKPQ-I.js`),__vite__mapDeps([3,1,2,4,5,0,6]),import.meta.url),e(()=>import(`./formatter-EIJCOSYU-Bo0DMj3p.js`),__vite__mapDeps([7,1,2]),import.meta.url)]);return ed.length>0&&(ed.forEach(e=>{t.registerLanguage(...e)}),ed=[]),td===null&&(td=t),{default:e=>F.createElement(t,{...e,formatter:n})}}),id=e=>F.createElement(F.Suspense,{fallback:F.createElement(`div`,null)},e.format===!1?F.createElement(nd,{...e}):F.createElement(rd,{...e}));id.registerLanguage=(...e)=>{if(td!==null){td.registerLanguage(...e);return}ed.push(e)};var ad=e=>typeof e==`string`,od=/[\n\r]/g,sd=N.code(({theme:e})=>({fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:`antialiased`,MozOsxFontSmoothing:`grayscale`,display:`inline-block`,paddingLeft:2,paddingRight:2,verticalAlign:`baseline`,color:`inherit`}),Yu),cd=N(id)(({theme:e})=>({fontFamily:e.typography.fonts.mono,fontSize:`${e.typography.size.s2-1}px`,lineHeight:`19px`,margin:`25px 0 40px`,borderRadius:e.appBorderRadius,boxShadow:e.base===`light`?`rgba(0, 0, 0, 0.10) 0 1px 3px 0`:`rgba(0, 0, 0, 0.20) 0 2px 5px 0`,"pre.prismjs":{padding:20,background:`inherit`}})),ld=({className:e,children:t,...n})=>{let r=(e||``).match(/lang-(\S+)/),i=F.Children.toArray(t);return i.filter(ad).some(e=>e.match(od))?F.createElement(cd,{bordered:!0,copyable:!0,language:r?.[1]??`text`,format:!1,...n},t):F.createElement(sd,{...n,className:e},i)},ud=N.dl(R,Xu,{padding:0,"& dt":{fontSize:`14px`,fontWeight:`bold`,fontStyle:`italic`,padding:0,margin:`16px 0 4px`},"& dt:first-of-type":{padding:0},"& dt > :first-of-type":{marginTop:0},"& dt > :last-child":{marginBottom:0},"& dd":{margin:`0 0 16px`,padding:`0 15px`},"& dd > :first-of-type":{marginTop:0},"& dd > :last-child":{marginBottom:0}}),dd=N.div(R),fd=N.h1(R,Ju,({theme:e})=>({fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold})),pd=N.h2(R,Ju,({theme:e})=>({fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`})),md=N.h3(R,Ju,({theme:e})=>({fontSize:`${e.typography.size.m1}px`})),hd=N.h4(R,Ju,({theme:e})=>({fontSize:`${e.typography.size.s3}px`})),gd=N.h5(R,Ju,({theme:e})=>({fontSize:`${e.typography.size.s2}px`})),_d=N.h6(R,Ju,({theme:e})=>({fontSize:`${e.typography.size.s2}px`,color:e.color.dark})),vd=N.hr(({theme:e})=>({border:`0 none`,borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0})),yd=N.img({maxWidth:`100%`}),bd=N.li(R,({theme:e})=>({fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:`24px`,"& + li":{marginTop:`.25em`},"& ul, & ol":{marginTop:`.25em`,marginBottom:0},"& code":Yu({theme:e})})),xd=N.ol(R,Xu,{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},{listStyle:`decimal`}),Sd=N.p(R,Xu,({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:`24px`,color:e.color.defaultText,"& code":Yu({theme:e})})),Cd=N.pre(R,Xu,({theme:e})=>({fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:`antialiased`,MozOsxFontSmoothing:`grayscale`,lineHeight:`18px`,padding:`11px 1rem`,whiteSpace:`pre-wrap`,color:`inherit`,borderRadius:3,margin:`1rem 0`,"&:not(.prismjs)":{background:`transparent`,border:`none`,borderRadius:0,padding:0,margin:0},"& pre, &.prismjs":{padding:15,margin:0,whiteSpace:`pre-wrap`,color:`inherit`,fontSize:`13px`,lineHeight:`19px`,code:{color:`inherit`,fontSize:`inherit`}},"& code":{whiteSpace:`pre`},"& code, & tt":{border:`none`}})),wd=N.span(R,({theme:e})=>({"&.frame":{display:`block`,overflow:`hidden`,"& > span":{border:`1px solid ${e.color.medium}`,display:`block`,float:`left`,overflow:`hidden`,margin:`13px 0 0`,padding:7,width:`auto`},"& span img":{display:`block`,float:`left`},"& span span":{clear:`both`,color:e.color.darkest,display:`block`,padding:`5px 0 0`}},"&.align-center":{display:`block`,overflow:`hidden`,clear:`both`,"& > span":{display:`block`,overflow:`hidden`,margin:`13px auto 0`,textAlign:`center`},"& span img":{margin:`0 auto`,textAlign:`center`}},"&.align-right":{display:`block`,overflow:`hidden`,clear:`both`,"& > span":{display:`block`,overflow:`hidden`,margin:`13px 0 0`,textAlign:`right`},"& span img":{margin:0,textAlign:`right`}},"&.float-left":{display:`block`,marginRight:13,overflow:`hidden`,float:`left`,"& span":{margin:`13px 0 0`}},"&.float-right":{display:`block`,marginLeft:13,overflow:`hidden`,float:`right`,"& > span":{display:`block`,overflow:`hidden`,margin:`13px auto 0`,textAlign:`right`}}})),Td=N.title(Yu),Ed=N.table(R,Xu,({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:`24px`,padding:0,borderCollapse:`collapse`,"& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:e.appContentBg,margin:0,padding:0},"& tr:nth-of-type(2n)":{backgroundColor:e.base===`dark`?e.color.darker:e.color.lighter},"& tr th":{fontWeight:`bold`,color:e.color.defaultText,border:`1px solid ${e.appBorderColor}`,margin:0,padding:`6px 13px`},"& tr td":{border:`1px solid ${e.appBorderColor}`,color:e.color.defaultText,margin:0,padding:`6px 13px`},"& tr th :first-of-type, & tr td :first-of-type":{marginTop:0},"& tr th :last-child, & tr td :last-child":{marginBottom:0}})),Dd=N.ul(R,Xu,{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},{listStyle:`disc`}),Od={h1:e=>F.createElement(fd,{...L(e,`h1`)}),h2:e=>F.createElement(pd,{...L(e,`h2`)}),h3:e=>F.createElement(md,{...L(e,`h3`)}),h4:e=>F.createElement(hd,{...L(e,`h4`)}),h5:e=>F.createElement(gd,{...L(e,`h5`)}),h6:e=>F.createElement(_d,{...L(e,`h6`)}),pre:e=>F.createElement(Cd,{...L(e,`pre`)}),a:e=>F.createElement(Qu,{...L(e,`a`)}),hr:e=>F.createElement(vd,{...L(e,`hr`)}),dl:e=>F.createElement(ud,{...L(e,`dl`)}),blockquote:e=>F.createElement($u,{...L(e,`blockquote`)}),table:e=>F.createElement(Ed,{...L(e,`table`)}),img:e=>F.createElement(yd,{...L(e,`img`)}),div:e=>F.createElement(dd,{...L(e,`div`)}),span:e=>F.createElement(wd,{...L(e,`span`)}),li:e=>F.createElement(bd,{...L(e,`li`)}),ul:e=>F.createElement(Dd,{...L(e,`ul`)}),ol:e=>F.createElement(xd,{...L(e,`ol`)}),p:e=>F.createElement(Sd,{...L(e,`p`)}),code:e=>F.createElement(ld,{...L(e,`code`)}),tt:e=>F.createElement(Td,{...L(e,`tt`)}),resetwrapper:e=>F.createElement(Zu,{...L(e,`resetwrapper`)})};N.div(({theme:e,compact:t})=>({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,fontSize:e.typography.size.s1,fontWeight:e.typography.weight.bold,lineHeight:`12px`,minWidth:20,borderRadius:20,padding:t?`4px 7px`:`4px 10px`}),{svg:{height:12,width:12,marginRight:4,marginTop:-2,path:{fill:`currentColor`}}},({theme:e,status:t})=>{switch(t){case`critical`:return{color:e.fgColor.critical,background:e.bgColor.critical,boxShadow:`inset 0 0 0 1px ${e.borderColor.critical}`};case`negative`:return{color:e.fgColor.negative,background:e.bgColor.negative,boxShadow:`inset 0 0 0 1px ${e.borderColor.negative}`};case`warning`:return{color:e.fgColor.warning,background:e.bgColor.warning,boxShadow:`inset 0 0 0 1px ${e.borderColor.warning}`};case`neutral`:return{color:e.fgColor.muted,background:e.base===`dark`?e.barBg:e.background.app,boxShadow:`inset 0 0 0 1px ${C(.8,e.textMutedColor)}`};case`positive`:return{color:e.fgColor.positive,background:e.bgColor.positive,boxShadow:`inset 0 0 0 1px ${e.borderColor.positive}`};case`active`:return{color:e.base===`light`?O(.1,e.color.secondary):e.color.secondary,background:e.background.hoverable,boxShadow:`inset 0 0 0 1px ${C(.9,e.color.secondary)}`};default:return{}}});var kd=0,Ad=e=>e.button===kd&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey,jd=(e,t)=>{Ad(e)&&(e.preventDefault(),t(e))},Md=N.span(({withArrow:e})=>e?{"> svg:last-of-type":{height:`0.7em`,width:`0.7em`,marginRight:0,marginLeft:`0.25em`,bottom:`auto`,verticalAlign:`inherit`}}:{},({containsIcon:e})=>e?{svg:{height:`1em`,width:`1em`,verticalAlign:`middle`,position:`relative`,bottom:0,marginRight:0}}:{}),Nd=N.a(({theme:e})=>({display:`inline-block`,transition:`all 150ms ease-out`,textDecoration:`none`,color:e.color.secondary,"&:hover, &:focus":{cursor:`pointer`,color:O(.07,e.color.secondary),"svg path:not([fill])":{fill:O(.07,e.color.secondary)}},"&:active":{color:O(.1,e.color.secondary),"svg path:not([fill])":{fill:O(.1,e.color.secondary)}},svg:{display:`inline-block`,height:`1em`,width:`1em`,verticalAlign:`text-top`,position:`relative`,bottom:`-0.125em`,marginRight:`0.4em`,"& path":{fill:e.color.secondary}}}),({theme:e,secondary:t,tertiary:n})=>{let r;return t&&(r=[e.textMutedColor,e.color.secondary,e.color.secondary]),n&&(r=[e.color.dark,e.color.secondary,e.color.secondary]),r?{color:r[0],"svg path:not([fill])":{fill:r[0]},"&:hover":{color:r[1],"svg path:not([fill])":{fill:r[1]}},"&:active":{color:r[2],"svg path:not([fill])":{fill:r[2]}}}:{}},({nochrome:e})=>e?{color:`inherit`,"&:hover, &:active":{color:`inherit`,textDecoration:`underline`}}:{},({theme:e,inverse:t})=>t?{color:e.color.lightest,":not([fill])":{fill:e.color.lightest},"&:hover":{color:e.color.lighter,"svg path:not([fill])":{fill:e.color.lighter}},"&:active":{color:e.color.light,"svg path:not([fill])":{fill:e.color.light}}}:{},({isButton:e})=>e?{border:0,borderRadius:0,background:`none`,padding:0,fontSize:`inherit`}:{}),Pd=(0,F.forwardRef)(({cancel:e=!0,children:t,onClick:n=void 0,withArrow:r=!1,containsIcon:i=!1,className:a=void 0,style:o=void 0,isButton:s=!1,...c},l)=>F.createElement(Nd,{...c,ref:l,isButton:s,role:s?`button`:void 0,onClick:n&&e?e=>jd(e,n):n,className:a},F.createElement(Md,{withArrow:r,containsIcon:i},t,r&&F.createElement(be,null))));Pd.displayName=`Link`,N.div(({theme:e})=>({fontSize:`${e.typography.size.s2}px`,lineHeight:`1.6`,h1:{fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},h2:{fontSize:`${e.typography.size.m2}px`,borderBottom:`1px solid ${e.appBorderColor}`},h3:{fontSize:`${e.typography.size.m1}px`},h4:{fontSize:`${e.typography.size.s3}px`},h5:{fontSize:`${e.typography.size.s2}px`},h6:{fontSize:`${e.typography.size.s2}px`,color:e.color.dark},"pre:not(.prismjs)":{background:`transparent`,border:`none`,borderRadius:0,padding:0,margin:0},"pre pre, pre.prismjs":{padding:15,margin:0,whiteSpace:`pre-wrap`,color:`inherit`,fontSize:`13px`,lineHeight:`19px`},"pre pre code, pre.prismjs code":{color:`inherit`,fontSize:`inherit`},"pre code":{margin:0,padding:0,whiteSpace:`pre`,border:`none`,background:`transparent`},"pre code, pre tt":{backgroundColor:`transparent`,border:`none`},"body > *:first-of-type":{marginTop:`0 !important`},"body > *:last-child":{marginBottom:`0 !important`},a:{color:e.color.secondary,textDecoration:`none`},"a.absent":{color:`#cc0000`},"a.anchor":{display:`block`,paddingLeft:30,marginLeft:-30,cursor:`pointer`,position:`absolute`,top:0,left:0,bottom:0},"h1, h2, h3, h4, h5, h6":{margin:`20px 0 10px`,padding:0,cursor:`text`,position:`relative`,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:`none`},"& tt, & code":{fontSize:`inherit`}},"h1:first-of-type + h2":{marginTop:0,paddingTop:0},"p, blockquote, ul, ol, dl, li, table, pre":{margin:`15px 0`},hr:{border:`0 none`,borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},"body > h1:first-of-type, body > h2:first-of-type, body > h3:first-of-type, body > h4:first-of-type, body > h5:first-of-type, body > h6:first-of-type":{marginTop:0,paddingTop:0},"body > h1:first-of-type + h2":{marginTop:0,paddingTop:0},"a:first-of-type h1, a:first-of-type h2, a:first-of-type h3, a:first-of-type h4, a:first-of-type h5, a:first-of-type h6":{marginTop:0,paddingTop:0},"h1 p, h2 p, h3 p, h4 p, h5 p, h6 p":{marginTop:0},"li p.first":{display:`inline-block`},"ul, ol":{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},dl:{padding:0},"dl dt":{fontSize:`14px`,fontWeight:`bold`,fontStyle:`italic`,margin:`0 0 15px`,padding:`0 15px`,"&:first-of-type":{padding:0},"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},blockquote:{borderLeft:`4px solid ${e.color.medium}`,padding:`0 15px`,color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},table:{padding:0,borderCollapse:`collapse`,"& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:`white`,margin:0,padding:0,"& th":{fontWeight:`bold`,border:`1px solid ${e.appBorderColor}`,textAlign:`left`,margin:0,padding:`6px 13px`},"& td":{border:`1px solid ${e.appBorderColor}`,textAlign:`left`,margin:0,padding:`6px 13px`},"&:nth-of-type(2n)":{backgroundColor:e.color.lighter},"& th :first-of-type, & td :first-of-type":{marginTop:0},"& th :last-child, & td :last-child":{marginBottom:0}}},img:{maxWidth:`100%`},"span.frame":{display:`block`,overflow:`hidden`,"& > span":{border:`1px solid ${e.color.medium}`,display:`block`,float:`left`,overflow:`hidden`,margin:`13px 0 0`,padding:7,width:`auto`},"& span img":{display:`block`,float:`left`},"& span span":{clear:`both`,color:e.color.darkest,display:`block`,padding:`5px 0 0`}},"span.align-center":{display:`block`,overflow:`hidden`,clear:`both`,"& > span":{display:`block`,overflow:`hidden`,margin:`13px auto 0`,textAlign:`center`},"& span img":{margin:`0 auto`,textAlign:`center`}},"span.align-right":{display:`block`,overflow:`hidden`,clear:`both`,"& > span":{display:`block`,overflow:`hidden`,margin:`13px 0 0`,textAlign:`right`},"& span img":{margin:0,textAlign:`right`}},"span.float-left":{display:`block`,marginRight:13,overflow:`hidden`,float:`left`,"& span":{margin:`13px 0 0`}},"span.float-right":{display:`block`,marginLeft:13,overflow:`hidden`,float:`right`,"& > span":{display:`block`,overflow:`hidden`,margin:`13px auto 0`,textAlign:`right`}},"code, tt":{margin:`0 2px`,padding:`0 5px`,whiteSpace:`nowrap`,border:`1px solid ${e.color.mediumlight}`,backgroundColor:e.color.lighter,borderRadius:3,color:e.base===`dark`?e.color.darkest:e.color.dark}}));var{deprecate:Fd}=__STORYBOOK_MODULE_CLIENT_LOGGER__;function Id(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Ld(...e){return t=>{let n=!1,r=e.map(e=>{let r=Id(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Id(e[t],null)}}}}var Rd=Symbol.for(`react.lazy`),zd=F.use;function Bd(e){return typeof e==`object`&&!!e&&`then`in e}function Vd(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Rd&&`_payload`in e&&Bd(e._payload)}function Hd(e){let t=Wd(e),n=F.forwardRef((e,n)=>{let{children:r,...i}=e;Vd(r)&&typeof zd==`function`&&(r=zd(r._payload));let a=F.Children.toArray(r),o=a.find(qd);if(o){let e=o.props.children,r=a.map(t=>t===o?F.Children.count(e)>1?F.Children.only(null):F.isValidElement(e)?e.props.children:null:t);return(0,Gu.jsx)(t,{...i,ref:n,children:F.isValidElement(e)?F.cloneElement(e,void 0,r):null})}return(0,Gu.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var Ud=Hd(`Slot`);function Wd(e){let t=F.forwardRef((e,t)=>{let{children:n,...r}=e;if(Vd(n)&&typeof zd==`function`&&(n=zd(n._payload)),F.isValidElement(n)){let e=Yd(n),i=Jd(r,n.props);return n.type!==F.Fragment&&(i.ref=t?Ld(t,e):e),F.cloneElement(n,i)}return F.Children.count(n)>1?F.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gd=Symbol(`radix.slottable`);function Kd(e){let t=({children:e})=>(0,Gu.jsx)(Gu.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=Gd,t}Kd(`Slottable`);function qd(e){return F.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Gd}function Jd(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Yd(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xd=N.div(({theme:e})=>({padding:`2px 6px`,lineHeight:`16px`,fontSize:10,fontWeight:e.typography.weight.bold,color:e.color.lightest,boxShadow:`0 0 5px 0 rgba(0, 0, 0, 0.3)`,borderRadius:4,whiteSpace:`nowrap`,pointerEvents:`none`,zIndex:-1,background:e.base===`light`?`rgba(60, 60, 60, 0.9)`:`rgba(0, 0, 0, 0.95)`})),Zd=({note:e,...t})=>F.createElement(Xd,{...t},e),{deprecate:Qd}=__STORYBOOK_MODULE_CLIENT_LOGGER__,z=typeof document<`u`?F.useLayoutEffect:()=>{};function $d(e){let[t,n]=(0,F.useState)(e),r=(0,F.useRef)(t),i=(0,F.useRef)(null),a=(0,F.useRef)(()=>{if(!i.current)return;let e=i.current.next();if(e.done){i.current=null;return}r.current===e.value?a.current():n(e.value)});return z(()=>{r.current=t,i.current&&a.current()}),[t,(0,F.useCallback)(e=>{i.current=e(r.current),a.current()},[a])]}var ef={prefix:String(Math.round(Math.random()*1e10)),current:0},tf=F.createContext(ef),nf=F.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement;var rf=new WeakMap;function af(e=!1){let t=(0,F.useContext)(tf),n=(0,F.useRef)(null);if(n.current===null&&!e){var r,i;let e=(i=F.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)==null||(r=i.ReactCurrentOwner)==null?void 0:r.current;if(e){let n=rf.get(e);n==null?rf.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,rf.delete(e))}n.current=++t.current}return n.current}function of(e){let t=(0,F.useContext)(tf),n=af(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function sf(e){let t=F.useId(),[n]=(0,F.useState)(ff()),r=n?`react-aria`:`react-aria${ef.prefix}`;return e||`${r}-${t}`}var cf=typeof F.useId==`function`?sf:of;function lf(){return!1}function uf(){return!0}function df(e){return()=>{}}function ff(){return typeof F.useSyncExternalStore==`function`?F.useSyncExternalStore(df,lf,uf):(0,F.useContext)(nf)}var pf=!!(typeof window<`u`&&window.document&&window.document.createElement),mf=new Map,hf;typeof FinalizationRegistry<`u`&&(hf=new FinalizationRegistry(e=>{mf.delete(e)}));function B(e){let[t,n]=(0,F.useState)(e),r=(0,F.useRef)(null),i=cf(t),a=(0,F.useRef)(null);if(hf&&hf.register(a,i),pf){let e=mf.get(i);e&&!e.includes(r)?e.push(r):mf.set(i,[r])}return z(()=>{let e=i;return()=>{hf&&hf.unregister(a),mf.delete(e)}},[i]),(0,F.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),i}function gf(e,t){if(e===t)return e;let n=mf.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=mf.get(t);return r?(r.forEach(t=>t.current=e),e):t}function _f(e=[]){let t=B(),[n,r]=$d(t),i=(0,F.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return z(i,[t,i,...e]),n}function vf(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}var V=e=>e?.ownerDocument??document,yf=e=>e&&`window`in e&&e.window===e?e:V(e).defaultView||window;function bf(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function xf(e){return bf(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&`host`in e}var Sf=!1;function Cf(){return Sf}function wf(e,t){if(!Cf())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n=n.tagName===`SLOT`&&n.assignedSlot?n.assignedSlot.parentNode:xf(n)?n.host:n.parentNode}return!1}var H=(e=document)=>{var t;if(!Cf())return e.activeElement;let n=e.activeElement;for(;n&&`shadowRoot`in n&&(t=n.shadowRoot)!=null&&t.activeElement;)n=n.shadowRoot.activeElement;return n};function U(e){return Cf()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}var Tf=class{get currentNode(){return this._currentNode}set currentNode(e){if(!wf(this.root,e))throw Error(`Cannot set currentNode to a node that is not contained by the root node.`);let t=[],n=e,r=e;for(this._currentNode=e;n&&n!==this.root;)if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let e=n,i=this._doc.createTreeWalker(e,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=r,this._currentSetFor.add(i),n=r=e.host}else n=n.parentNode;let i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=r,this._currentSetFor.add(i),this._walkerStack=t}get doc(){return this._doc}firstChild(){let e=this.currentNode,t=this.nextNode();return wf(e,t)?(t&&(this.currentNode=t),t):(this.currentNode=e,null)}lastChild(){let e=this._walkerStack[0].lastChild();return e&&(this.currentNode=e),e}nextNode(){let e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){var t;let n;if(typeof this.filter==`function`?n=this.filter(e):(t=this.filter)!=null&&t.acceptNode&&(n=this.filter.acceptNode(e)),n===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let r=this.nextNode();return r&&(this.currentNode=r),r}return e&&(this.currentNode=e),e}else if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.nextNode();return e&&(this.currentNode=e),e}else return null}previousNode(){let e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}else return null;return null}let t=e.previousNode();if(t){if(t.shadowRoot){var n;let e;if(typeof this.filter==`function`?e=this.filter(t):(n=this.filter)!=null&&n.acceptNode&&(e=this.filter.acceptNode(t)),e===NodeFilter.FILTER_ACCEPT)return t&&(this.currentNode=t),t;let r=this.lastChild();return r&&(this.currentNode=r),r}return t&&(this.currentNode=t),t}else if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}constructor(e,t,n,r){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=e=>{if(e.nodeType===Node.ELEMENT_NODE){let n=e.shadowRoot;if(n){let e=this._doc.createTreeWalker(n,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(e),NodeFilter.FILTER_ACCEPT}else{var t;if(typeof this.filter==`function`)return this.filter(e);if((t=this.filter)!=null&&t.acceptNode)return this.filter.acceptNode(e);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=t,this.filter=r??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=t,this._walkerStack.unshift(e.createTreeWalker(t,n,this._acceptNode));let i=t.shadowRoot;if(i){let e=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(e)}}};function Ef(e,t,n,r){return Cf()?new Tf(e,t,n,r):e.createTreeWalker(t,n,r)}function Df(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Df(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Of(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Df(e))&&(r&&(r+=` `),r+=t);return r}var kf=Of;function W(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],i=r[e];typeof n==`function`&&typeof i==`function`&&e[0]===`o`&&e[1]===`n`&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90?t[e]=vf(n,i):(e===`className`||e===`UNSAFE_className`)&&typeof n==`string`&&typeof i==`string`?t[e]=kf(n,i):e===`id`&&n&&i?t.id=gf(n,i):t[e]=i===void 0?n:i}}return t}function Af(...e){return e.length===1&&e[0]?e[0]:t=>{let n=!1,r=e.map(e=>{let r=jf(e,t);return n||=typeof r==`function`,r});if(n)return()=>{r.forEach((t,n)=>{typeof t==`function`?t():jf(e[n],null)})}}}function jf(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}var Mf=new Set([`id`]),Nf=new Set([`aria-label`,`aria-labelledby`,`aria-describedby`,`aria-details`]),Pf=new Set([`href`,`hrefLang`,`target`,`rel`,`download`,`ping`,`referrerPolicy`]),Ff=new Set([`dir`,`lang`,`hidden`,`inert`,`translate`]),If=new Set(`onClick.onAuxClick.onContextMenu.onDoubleClick.onMouseDown.onMouseEnter.onMouseLeave.onMouseMove.onMouseOut.onMouseOver.onMouseUp.onTouchCancel.onTouchEnd.onTouchMove.onTouchStart.onPointerDown.onPointerMove.onPointerUp.onPointerCancel.onPointerEnter.onPointerLeave.onPointerOver.onPointerOut.onGotPointerCapture.onLostPointerCapture.onScroll.onWheel.onAnimationStart.onAnimationEnd.onAnimationIteration.onTransitionCancel.onTransitionEnd.onTransitionRun.onTransitionStart`.split(`.`)),Lf=/^(data-.*)$/;function G(e,t={}){let{labelable:n,isLink:r,global:i,events:a=i,propNames:o}=t,s={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(Mf.has(t)||n&&Nf.has(t)||r&&Pf.has(t)||i&&Ff.has(t)||a&&(If.has(t)||t.endsWith(`Capture`)&&If.has(t.slice(0,-7)))||o?.has(t)||Lf.test(t))&&(s[t]=e[t]);return s}function Rf(e){if(Bf())e.focus({preventScroll:!0});else{let t=Vf(e);e.focus(),Hf(t)}}var zf=null;function Bf(){if(zf==null){zf=!1;try{document.createElement(`div`).focus({get preventScroll(){return zf=!0,!0}})}catch{}}return zf}function Vf(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Hf(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function Uf(e){if(typeof window>`u`||window.navigator==null)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function Wf(e){return typeof window<`u`&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Gf(e){let t=null;return()=>(t??=e(),t)}var Kf=Gf(function(){return Wf(/^Mac/i)}),qf=Gf(function(){return Wf(/^iPhone/i)}),Jf=Gf(function(){return Wf(/^iPad/i)||Kf()&&navigator.maxTouchPoints>1}),Yf=Gf(function(){return qf()||Jf()}),Xf=Gf(function(){return Kf()||Yf()}),Zf=Gf(function(){return Uf(/AppleWebKit/i)&&!Qf()}),Qf=Gf(function(){return Uf(/Chrome/i)}),$f=Gf(function(){return Uf(/Android/i)}),ep=Gf(function(){return Uf(/Firefox/i)}),tp=(0,F.createContext)({isNative:!0,open:op,useHref:e=>e});function np(){return(0,F.useContext)(tp)}function rp(e,t){let n=e.getAttribute(`target`);return(!n||n===`_self`)&&e.origin===location.origin&&!e.hasAttribute(`download`)&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}function ip(e,t,n=!0){var r,i;let{metaKey:a,ctrlKey:o,altKey:s,shiftKey:c}=t;ep()&&!((i=window.event)==null||(r=i.type)==null)&&r.startsWith(`key`)&&e.target===`_blank`&&(Kf()?a=!0:o=!0);let l=Zf()&&Kf()&&!Jf()?new KeyboardEvent(`keydown`,{keyIdentifier:`Enter`,metaKey:a,ctrlKey:o,altKey:s,shiftKey:c}):new MouseEvent(`click`,{metaKey:a,ctrlKey:o,altKey:s,shiftKey:c,detail:1,bubbles:!0,cancelable:!0});ip.isOpening=n,Rf(e),e.dispatchEvent(l),ip.isOpening=!1}ip.isOpening=!1;function ap(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute(`data-href`)){let n=document.createElement(`a`);n.href=e.getAttribute(`data-href`),e.hasAttribute(`data-target`)&&(n.target=e.getAttribute(`data-target`)),e.hasAttribute(`data-rel`)&&(n.rel=e.getAttribute(`data-rel`)),e.hasAttribute(`data-download`)&&(n.download=e.getAttribute(`data-download`)),e.hasAttribute(`data-ping`)&&(n.ping=e.getAttribute(`data-ping`)),e.hasAttribute(`data-referrer-policy`)&&(n.referrerPolicy=e.getAttribute(`data-referrer-policy`)),e.appendChild(n),t(n),e.removeChild(n)}}function op(e,t){ap(e,e=>ip(e,t))}function sp(e){let t=np().useHref(e?.href??``);return{href:e?.href?t:void 0,target:e?.target,rel:e?.rel,download:e?.download,ping:e?.ping,referrerPolicy:e?.referrerPolicy}}function cp(e,t,n,r){!t.isNative&&e.currentTarget instanceof HTMLAnchorElement&&e.currentTarget.href&&!e.isDefaultPrevented()&&rp(e.currentTarget,e)&&n&&(e.preventDefault(),t.open(e.currentTarget,e,n,r))}var lp=new Map,up=new Set;function dp(){if(typeof window>`u`)return;function e(e){return`propertyName`in e}let t=t=>{if(!e(t)||!t.target)return;let r=lp.get(t.target);r||(r=new Set,lp.set(t.target,r),t.target.addEventListener(`transitioncancel`,n,{once:!0})),r.add(t.propertyName)},n=t=>{if(!e(t)||!t.target)return;let r=lp.get(t.target);if(r&&(r.delete(t.propertyName),r.size===0&&(t.target.removeEventListener(`transitioncancel`,n),lp.delete(t.target)),lp.size===0)){for(let e of up)e();up.clear()}};document.body.addEventListener(`transitionrun`,t),document.body.addEventListener(`transitionend`,n)}typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,dp):dp());function fp(){for(let[e]of lp)`isConnected`in e&&!e.isConnected&&lp.delete(e)}function pp(e){requestAnimationFrame(()=>{fp(),lp.size===0?e():up.add(e)})}function mp(){let e=(0,F.useRef)(new Map),t=(0,F.useCallback)((t,n,r,i)=>{let a=i?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:a,options:i}),t.addEventListener(n,a,i)},[]),n=(0,F.useCallback)((t,n,r,i)=>{let a=e.current.get(r)?.fn||r;t.removeEventListener(n,a,i),e.current.delete(r)},[]),r=(0,F.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,F.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function hp(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=B(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(` `):i&&=i.trim().split(/\s+/).join(` `),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function gp(e){let t=(0,F.useRef)(null),n=(0,F.useRef)(void 0),r=(0,F.useCallback)(t=>{if(typeof e==`function`){let n=e,r=n(t);return()=>{typeof r==`function`?r():n(null)}}else if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,F.useMemo)(()=>({get current(){return t.current},set current(e){t.current=e,n.current&&=(n.current(),void 0),e!=null&&(n.current=r(e))}}),[r])}var _p=F.useInsertionEffect??z;function K(e){let t=(0,F.useRef)(null);return _p(()=>{t.current=e},[e]),(0,F.useCallback)((...e)=>{let n=t.current;return n?.(...e)},[])}function vp(e,t){let n=(0,F.useRef)(!0),r=(0,F.useRef)(null);z(()=>(n.current=!0,()=>{n.current=!1}),[]),z(()=>{n.current?n.current=!1:(!r.current||t.some((e,t)=>!Object.is(e,r[t])))&&e(),r.current=t},t)}function yp(){return typeof window.ResizeObserver<`u`}function bp(e){let{ref:t,box:n,onResize:r}=e,i=K(r);(0,F.useEffect)(()=>{let e=t?.current;if(e)if(yp()){let t=new window.ResizeObserver(e=>{e.length&&i()});return t.observe(e,{box:n}),()=>{e&&t.unobserve(e)}}else return window.addEventListener(`resize`,i,!1),()=>{window.removeEventListener(`resize`,i,!1)}},[t,n])}function xp(e,t){z(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Sp(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function Cp(e,t){let n=e;for(Sp(n,t)&&(n=n.parentElement);n&&!Sp(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function wp(e,t){let n=[];for(;e&&e!==document.documentElement;)Sp(e,t)&&n.push(e),e=e.parentElement;return n}function Tp(e){return Kf()?e.metaKey:e.ctrlKey}var Ep=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function Dp(e){return e instanceof HTMLInputElement&&!Ep.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}typeof document<`u`&&window.visualViewport;var Op=0,kp=new Map;function Ap(e){let[t,n]=(0,F.useState)();return z(()=>{if(!e)return;let t=kp.get(e);if(t)n(t.element.id);else{let r=`react-aria-description-${Op++}`;n(r);let i=document.createElement(`div`);i.id=r,i.style.display=`none`,i.textContent=e,document.body.appendChild(i),t={refCount:0,element:i},kp.set(e,t)}return t.refCount++,()=>{t&&--t.refCount===0&&(t.element.remove(),kp.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function jp(e,t,n,r){let i=K(n),a=n==null;(0,F.useEffect)(()=>{if(a||!e.current)return;let n=e.current;return n.addEventListener(t,i,r),()=>{n.removeEventListener(t,i,r)}},[e,t,r,a])}function Mp(e,t){let n=Np(e,t,`left`),r=Np(e,t,`top`),i=t.offsetWidth,a=t.offsetHeight,o=e.scrollLeft,s=e.scrollTop,{borderTopWidth:c,borderLeftWidth:l,scrollPaddingTop:u,scrollPaddingRight:d,scrollPaddingBottom:f,scrollPaddingLeft:p}=getComputedStyle(e),m=o+parseInt(l,10),h=s+parseInt(c,10),g=m+e.clientWidth,_=h+e.clientHeight,v=parseInt(u,10)||0,y=parseInt(f,10)||0,b=parseInt(d,10)||0,x=parseInt(p,10)||0;n<=o+x?o=n-parseInt(l,10)-x:n+i>g-b&&(o+=n+i-g+b),r<=h+v?s=r-parseInt(c,10)-v:r+a>_-y&&(s+=r+a-_+y),e.scrollLeft=o,e.scrollTop=s}function Np(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function Pp(e,t){if(e&&document.contains(e)){let o=document.scrollingElement||document.documentElement,s=window.getComputedStyle(o).overflow===`hidden`;if(s){let t=wp(e);s||t.push(o);for(let n of t)Mp(n,e)}else{var n;let{left:o,top:s}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)==null||n.call(e,{block:`nearest`});let{left:c,top:l}=e.getBoundingClientRect();if(Math.abs(o-c)>1||Math.abs(s-l)>1){var r,i,a;t==null||(i=t.containingElement)==null||(r=i.scrollIntoView)==null||r.call(i,{block:`center`,inline:`center`}),(a=e.scrollIntoView)==null||a.call(e,{block:`nearest`})}}}}function Fp(e){return e.pointerType===``&&e.isTrusted?!0:$f()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Ip(e){return!$f()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`}function Lp(e){let t=F.version.split(`.`);return parseInt(t[0],10)>=19?e:e?`true`:void 0}var Rp=`react-aria-clear-focus`,zp=`react-aria-focus`;function Bp(e,t=!0){let[n,r]=(0,F.useState)(!0),i=n&&t;return z(()=>{if(i&&e.current&&`getAnimations`in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,i]),Hp(e,i,(0,F.useCallback)(()=>r(!1),[])),i}function Vp(e,t){let[n,r]=(0,F.useState)(t?`open`:`closed`);switch(n){case`open`:t||r(`exiting`);break;case`closed`:case`exiting`:t&&r(`open`);break}let i=n===`exiting`;return Hp(e,i,(0,F.useCallback)(()=>{r(e=>e===`exiting`?`closed`:e)},[])),i}function Hp(e,t,n){z(()=>{if(t&&e.current){if(!(`getAnimations`in e.current)){n();return}let t=e.current.getAnimations();if(t.length===0){n();return}let r=!1;return Promise.all(t.map(e=>e.finished)).then(()=>{r||(0,Ku.flushSync)(()=>{n()})}).catch(()=>{}),()=>{r=!0}}},[e,t,n])}var Up=typeof Element<`u`&&`checkVisibility`in Element.prototype;function Wp(e){let t=yf(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!==`none`&&r!==`hidden`&&r!==`collapse`;if(i){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r}=t(e);i=n!==`none`&&r!==`hidden`&&r!==`collapse`}return i}function Gp(e,t){return!e.hasAttribute(`hidden`)&&!e.hasAttribute(`data-react-aria-prevent-focus`)&&(e.nodeName===`DETAILS`&&t&&t.nodeName!==`SUMMARY`?e.hasAttribute(`open`):!0)}function Kp(e,t){return Up?e.checkVisibility({visibilityProperty:!0})&&!e.closest(`[data-react-aria-prevent-focus]`):e.nodeName!==`#comment`&&Wp(e)&&Gp(e,t)&&(!e.parentElement||Kp(e.parentElement,e))}var qp=[`input:not([disabled]):not([type=hidden])`,`select:not([disabled])`,`textarea:not([disabled])`,`button:not([disabled])`,`a[href]`,`area[href]`,`summary`,`iframe`,`object`,`embed`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable^="false"])`,`permission`],Jp=qp.join(`:not([hidden]),`)+`,[tabindex]:not([disabled]):not([hidden])`;qp.push(`[tabindex]:not([tabindex="-1"]):not([disabled])`);var Yp=qp.join(`:not([hidden]):not([tabindex="-1"]),`);function Xp(e){return e.matches(Jp)&&Kp(e)&&!Qp(e)}function Zp(e){return e.matches(Yp)&&Kp(e)&&!Qp(e)}function Qp(e){let t=e;for(;t!=null;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}var $p=typeof document<`u`?F.useInsertionEffect??F.useLayoutEffect:()=>{};function em(e,t,n){let[r,i]=(0,F.useState)(e||t),a=(0,F.useRef)(r),o=(0,F.useRef)(e!==void 0),s=e!==void 0;(0,F.useEffect)(()=>{o.current,o.current=s},[s]);let c=s?e:r;$p(()=>{a.current=c});let[,l]=(0,F.useReducer)(()=>({}),{});return[c,(0,F.useCallback)((e,...t)=>{let r=typeof e==`function`?e(a.current):e;Object.is(a.current,r)||(a.current=r,i(r),l(),n?.(r,...t))},[n])]}function tm(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function nm(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function rm(e,t){Object.defineProperty(e,`target`,{value:t}),Object.defineProperty(e,`currentTarget`,{value:t})}function im(e){let t=(0,F.useRef)({isFocused:!1,observer:null});z(()=>{let e=t.current;return()=>{e.observer&&=(e.observer.disconnect(),null)}},[]);let n=K(t=>{e?.(t)});return(0,F.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target;r.addEventListener(`focusout`,e=>{t.current.isFocused=!1,r.disabled&&n(nm(e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var e;(e=t.current.observer)==null||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:n})),r.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:n}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:[`disabled`]})}},[n])}var am=!1;function om(e){for(;e&&!Xp(e);)e=e.parentElement;let t=yf(e),n=t.document.activeElement;if(!n||n===e)return;am=!0;let r=!1,i=e=>{(e.target===n||r)&&e.stopImmediatePropagation()},a=t=>{(t.target===n||r)&&(t.stopImmediatePropagation(),!e&&!r&&(r=!0,Rf(n),c()))},o=t=>{(t.target===e||r)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,Rf(n),c()))};t.addEventListener(`blur`,i,!0),t.addEventListener(`focusout`,a,!0),t.addEventListener(`focusin`,s,!0),t.addEventListener(`focus`,o,!0);let c=()=>{cancelAnimationFrame(l),t.removeEventListener(`blur`,i,!0),t.removeEventListener(`focusout`,a,!0),t.removeEventListener(`focusin`,s,!0),t.removeEventListener(`focus`,o,!0),am=!1,r=!1},l=requestAnimationFrame(c);return c}var sm=`default`,cm=``,lm=new WeakMap;function um(e){if(Yf()){if(sm===`default`){let t=V(e);cm=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect=`none`}sm=`disabled`}else if(e instanceof HTMLElement||e instanceof SVGElement){let t=`userSelect`in e.style?`userSelect`:`webkitUserSelect`;lm.set(e,e.style[t]),e.style[t]=`none`}}function dm(e){if(Yf()){if(sm!==`disabled`)return;sm=`restoring`,setTimeout(()=>{pp(()=>{if(sm===`restoring`){let t=V(e);t.documentElement.style.webkitUserSelect===`none`&&(t.documentElement.style.webkitUserSelect=cm||``),cm=``,sm=`default`}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&lm.has(e)){let t=lm.get(e),n=`userSelect`in e.style?`userSelect`:`webkitUserSelect`;e.style[n]===`none`&&(e.style[n]=t),e.getAttribute(`style`)===``&&e.removeAttribute(`style`),lm.delete(e)}}var fm=F.createContext({register:()=>{}});fm.displayName=`PressResponderContext`;function pm(e,t){return t.get?t.get.call(e):t.value}function mm(e,t,n){if(!t.has(e))throw TypeError(`attempted to `+n+` private field on non-instance`);return t.get(e)}function hm(e,t){return pm(e,mm(e,t,`get`))}function gm(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function _m(e,t,n){gm(e,t),t.set(e,n)}function vm(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw TypeError(`attempted to set read only private field`);t.value=n}}function ym(e,t,n){return vm(e,mm(e,t,`set`),n),n}function bm(e){let t=(0,F.useContext)(fm);if(t){let{register:n,...r}=t;e=W(r,e),n()}return xp(t,e.ref),e}var xm=new WeakMap,Sm=class{continuePropagation(){ym(this,xm,!1)}get shouldStopPropagation(){return hm(this,xm)}constructor(e,t,n,r){_m(this,xm,{writable:!0,value:void 0}),ym(this,xm,!0);let i=(r?.target??n.currentTarget)?.getBoundingClientRect(),a,o=0,s,c=null;n.clientX!=null&&n.clientY!=null&&(s=n.clientX,c=n.clientY),i&&(s!=null&&c!=null?(a=s-i.left,o=c-i.top):(a=i.width/2,o=i.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=a,this.y=o}},Cm=Symbol(`linkClicked`),wm=`react-aria-pressable-style`,Tm=`data-react-aria-pressable`;function Em(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:a,onClick:o,isDisabled:s,isPressed:c,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:d,ref:f,...p}=bm(e),[m,h]=(0,F.useState)(!1),g=(0,F.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:_,removeAllGlobalListeners:v}=mp(),y=K((e,t)=>{let i=g.current;if(s||i.didFirePressStart)return!1;let a=!0;if(i.isTriggeringEvent=!0,r){let n=new Sm(`pressstart`,t,e);r(n),a=n.shouldStopPropagation}return n&&n(!0),i.isTriggeringEvent=!1,i.didFirePressStart=!0,h(!0),a}),b=K((e,r,a=!0)=>{let o=g.current;if(!o.didFirePressStart)return!1;o.didFirePressStart=!1,o.isTriggeringEvent=!0;let c=!0;if(i){let t=new Sm(`pressend`,r,e);i(t),c=t.shouldStopPropagation}if(n&&n(!1),h(!1),t&&a&&!s){let n=new Sm(`press`,r,e);t(n),c&&=n.shouldStopPropagation}return o.isTriggeringEvent=!1,c}),x=K((e,t)=>{let n=g.current;if(s)return!1;if(a){n.isTriggeringEvent=!0;let r=new Sm(`pressup`,t,e);return a(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0}),S=K(e=>{let t=g.current;if(t.isPressed&&t.target){t.didFirePressStart&&t.pointerType!=null&&b(km(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,v(),d||dm(t.target);for(let e of t.disposables)e();t.disposables=[]}}),C=K(e=>{u&&S(e)}),w=K(e=>{s||o?.(e)}),T=K((e,t)=>{if(!s&&o){let n=new MouseEvent(`click`,e);rm(n,t),o(nm(n))}}),E=(0,F.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(Om(t.nativeEvent,t.currentTarget)&&wf(t.currentTarget,U(t.nativeEvent))){var r;jm(U(t.nativeEvent),t.key)&&t.preventDefault();let i=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType=`keyboard`,i=y(t,`keyboard`);let r=t.currentTarget;_(V(t.currentTarget),`keyup`,vf(t=>{Om(t,r)&&!t.repeat&&wf(r,U(t))&&e.target&&x(km(e.target,t),`keyboard`)},n),!0)}i&&t.stopPropagation(),t.metaKey&&Kf()&&((r=e.metaKeyEvents)==null||r.set(t.key,t.nativeEvent))}else t.key===`Meta`&&(e.metaKeyEvents=new Map)},onClick(t){if(!(t&&!wf(t.currentTarget,U(t.nativeEvent)))&&t&&t.button===0&&!e.isTriggeringEvent&&!ip.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&(e.pointerType===`virtual`||Fp(t.nativeEvent))){let e=y(t,`virtual`),r=x(t,`virtual`),i=b(t,`virtual`);w(t),n=e&&r&&i}else if(e.isPressed&&e.pointerType!==`keyboard`){let r=e.pointerType||t.nativeEvent.pointerType||`virtual`,i=x(km(t.currentTarget,t),r),a=b(km(t.currentTarget,t),r,!0);n=i&&a,e.isOverTarget=!1,w(t),S(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{var n;if(e.isPressed&&e.target&&Om(t,e.target)){var r;jm(U(t),t.key)&&t.preventDefault();let n=U(t),i=wf(e.target,U(t));b(km(e.target,t),`keyboard`,i),i&&T(t,e.target),v(),t.key!==`Enter`&&Dm(e.target)&&wf(e.target,n)&&!t[Cm]&&(t[Cm]=!0,ip(e.target,t,!1)),e.isPressed=!1,(r=e.metaKeyEvents)==null||r.delete(t.key)}else if(t.key===`Meta`&&(n=e.metaKeyEvents)!=null&&n.size){var i;let t=e.metaKeyEvents;e.metaKeyEvents=void 0;for(let n of t.values())(i=e.target)==null||i.dispatchEvent(new KeyboardEvent(`keyup`,n))}};if(typeof PointerEvent<`u`){t.onPointerDown=t=>{if(t.button!==0||!wf(t.currentTarget,U(t.nativeEvent)))return;if(Ip(t.nativeEvent)){e.pointerType=`virtual`;return}e.pointerType=t.pointerType;let i=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||um(e.target),i=y(t,e.pointerType);let a=U(t.nativeEvent);`releasePointerCapture`in a&&a.releasePointerCapture(t.pointerId),_(V(t.currentTarget),`pointerup`,n,!1),_(V(t.currentTarget),`pointercancel`,r,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(wf(t.currentTarget,U(t.nativeEvent))&&t.button===0){if(l){let n=om(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{!wf(t.currentTarget,U(t.nativeEvent))||e.pointerType===`virtual`||t.button===0&&!e.isPressed&&x(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!0,y(km(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!1,b(km(e.target,t),e.pointerType,!1),C(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&t.button===0&&e.target){if(wf(e.target,U(t))&&e.pointerType!=null){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?S(t):(Rf(e.target),e.target.click()))},80);_(t.currentTarget,`click`,()=>n=!0,!0),e.disposables.push(()=>clearTimeout(r))}else S(t);e.isOverTarget=!1}},r=e=>{S(e)};t.onDragStart=e=>{wf(e.currentTarget,U(e.nativeEvent))&&S(e)}}return t},[_,s,l,v,d,S,C,b,y,x,w,T]);return(0,F.useEffect)(()=>{if(!f)return;let e=V(f.current);if(!e||!e.head||e.getElementById(wm))return;let t=e.createElement(`style`);t.id=wm,t.textContent=`
|
|
37
37
|
@layer {
|
|
38
38
|
[${Tm}] {
|
|
39
39
|
touch-action: pan-x pan-y pinch-zoom;
|
|
@@ -53,7 +53,7 @@ ${t}`);let n=t.match(iS);if(!n)return F.createElement(F.Fragment,null,t);let[,r,
|
|
|
53
53
|
`,borderRadius:e.appBorderRadius+2,fontSize:e.typography.size.s1,cursor:`default`,transition:`opacity 100ms ease-in-out, transform 100ms ease-in-out`,transformOrigin:`top`,transform:`translateY(0)`,opacity:1,"@starting-style":{transform:`translateY(-0.25rem) scale(0.95)`,opacity:0}},"& optgroup label":{display:`block`,padding:`3px 6px`},"& option":{lineHeight:`18px`,padding:`7px 10px`,borderRadius:4,outline:`none`,cursor:`pointer`,color:e.color.defaultText,"&::checkmark":{display:`none`},"&:hover, &:focus-visible":{backgroundColor:e.background.hoverable},"&:checked":{color:e.color.secondary,fontWeight:e.typography.weight.bold},"&:disabled":{backgroundColor:`transparent`,cursor:`default`,color:e.color.defaultText}}})),TS=({children:e,...t})=>F.createElement(wS,{...t},!a()&&F.createElement(`button`,null,F.createElement(`selectedcontent`,null),F.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},F.createElement(`path`,{d:`m6 9 6 6 6-6`}))),F.createElement(`optgroup`,null,e)),ES=F.useLayoutEffect,DS=function(e){var t=F.useRef(e);return ES(function(){t.current=e}),t},OS=function(e,t){if(typeof e==`function`){e(t);return}e.current=t},kS=function(e,t){var n=F.useRef();return F.useCallback(function(r){e.current=r,n.current&&OS(n.current,null),n.current=t,t&&OS(t,r)},[t])},AS={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`},jS=function(e){Object.keys(AS).forEach(function(t){e.style.setProperty(t,AS[t],`important`)})},MS=null,NS=function(e,t){var n=e.scrollHeight;return t.sizingStyle.boxSizing===`border-box`?n+t.borderSize:n-t.paddingSize};function PS(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),MS||(MS=document.createElement(`textarea`),MS.setAttribute(`tabindex`,`-1`),MS.setAttribute(`aria-hidden`,`true`),jS(MS)),MS.parentNode===null&&document.body.appendChild(MS);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(e){var t=e;MS.style[t]=o[t]}),jS(MS),MS.value=t;var c=NS(MS,e);MS.value=t,c=NS(MS,e),MS.value=`x`;var l=MS.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);var d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}var FS=function(){},IS=function(e,t){return e.reduce(function(e,n){return e[n]=t[n],e},{})},LS=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],RS=!!document.documentElement.currentStyle,zS=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var n=IS(LS,t),r=n.boxSizing;return r===``?null:(RS&&r===`border-box`&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+`px`),{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)})};function BS(e,t,n){var r=DS(n);F.useLayoutEffect(function(){var n=function(e){return r.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var VS=function(e,t){BS(document.body,`reset`,function(n){e.current.form===n.target&&t(n)})},HS=function(e){BS(window,`resize`,e)},US=function(e){BS(document.fonts,`loadingdone`,e)},WS=[`cacheMeasurements`,`maxRows`,`minRows`,`onChange`,`onHeightChange`],GS=F.forwardRef(function(e,t){var n=e.cacheMeasurements,r=e.maxRows,i=e.minRows,a=e.onChange,o=a===void 0?FS:a,s=e.onHeightChange,c=s===void 0?FS:s,l=ae(e,WS),u=l.value!==void 0,d=F.useRef(null),f=kS(d,t),p=F.useRef(0),m=F.useRef(),h=function(){var e=d.current,t=n&&m.current?m.current:zS(e);if(t){m.current=t;var a=PS(t,e.value||e.placeholder||`x`,i,r),o=a[0],s=a[1];p.current!==o&&(p.current=o,e.style.setProperty(`height`,o+`px`,`important`),c(o,{rowHeight:s}))}};return F.useLayoutEffect(h),VS(d,function(){if(!u){var e=d.current.value;requestAnimationFrame(function(){var t=d.current;t&&e!==t.value&&h()})}}),HS(h),US(h),F.createElement(`textarea`,te({},l,{onChange:function(e){u||h(),o(e)},ref:f}))}),KS=Object.assign(N((0,F.forwardRef)(function({size:e,valid:t,align:n,...r},i){return F.createElement(GS,{...r,ref:i})}))(vS,mS,hS,gS,({height:e=400})=>({overflow:`visible`,maxHeight:e})),{displayName:`Textarea`}),qS=Object.assign(N.form({boxSizing:`border-box`,width:`100%`}),{Field:pS,Input:xS,Select:TS,Textarea:KS,Button:Rb,Checkbox:uS,Radio:CS}),JS=N.div(({hasCloseButton:e,padding:t})=>({display:`inline-block`,position:`relative`,minHeight:e?36:void 0,zIndex:2147483647,colorScheme:`light dark`,padding:t}),({theme:e,hasChrome:t})=>t?{filter:`
|
|
54
54
|
drop-shadow(0px 5px 5px rgba(0,0,0,0.05))
|
|
55
55
|
drop-shadow(0 1px 3px rgba(0,0,0,0.1))
|
|
56
|
-
`,borderRadius:e.appBorderRadius+2,fontSize:e.typography.size.s1}:{},({theme:e,bgColor:t})=>t===`default`&&{background:e.base===`light`?E(e.background.app):e.background.app,color:e.color.defaultText},({theme:e,bgColor:t})=>t===`inverse`&&{background:e.base===`light`?e.color.darkest:e.color.lightest,color:e.color.inverseText},({theme:e,bgColor:t})=>(t===`positive`||t===`negative`||t===`warning`)&&{background:e.background[t],color:e.color[`${t}Text`]}),YS=N(Rb)({position:`absolute`,top:4,right:4}),XS=(0,F.forwardRef)(({children:e,color:t=`default`,hasChrome:n=!0,hideLabel:r=`Close`,onHide:i,padding:a=8,...o},s)=>F.createElement(JS,{bgColor:t,hasChrome:n,hasCloseButton:!!i,padding:a,ref:s,...o},e,i&&F.createElement(YS,{ariaLabel:r,onClick:i,padding:`small`,variant:`ghost`,size:`small`},F.createElement(he,null))));XS.displayName=`Popover`;var ZS=({id:e,title:t,description:n,icon:r,aside:i,children:a,isSelected:o,isActive:s,onClick:c,onFocus:l,onKeyDown:u,shouldLookDisabled:d=!1,...f})=>F.createElement($b.Item,{...f,id:e,role:`option`,tabIndex:s?0:-1,"aria-selected":o,"aria-disabled":d?!0:void 0,onClick:c,onFocus:l,onKeyDown:u},a??F.createElement(F.Fragment,null,r&&F.createElement($b.Icon,null,r),F.createElement($b.Text,null,F.createElement(`p`,null,t),n&&F.createElement(`small`,null,n)),i));ZS.displayName=`SelectOption`;var QS=5,$S=Symbol.for(`undefined`);function eC(e){return e==null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`}function tC(e){return{...e,type:`option`,value:iC(e.value)}}function nC(e){return`type`in e&&e.type===`reset`?e:tC(e)}function rC(e){if(e!==$S)return e}function iC(e){return e===void 0?$S:e}var aC=N(`ul`)({minWidth:180,height:`100%`,borderRadius:6,overflow:`hidden auto`,listStyle:`none`,margin:0,padding:4});function oC(e,{value:t}){return`${e}-opt-${String(t)??`sb-reset`}`}var sC=N.span(({theme:e})=>({appearance:`none`,color:e.textMutedColor,fontSize:12}));function cC(e,t){return t===void 0?[]:eC(t)?e.filter(e=>e.value===t).map(tC):e.filter(e=>t.some(t=>e.value===t)).map(tC)}var lC=N(Rb)(({$isOpen:e,$hasSelection:t,theme:n})=>e||t?{boxShadow:`none`,background:C(.93,n.barSelectedColor),color:n.base===`light`?O(.1,n.color.secondary):n.color.secondary}:{}),uC=N.div({position:`fixed`,inset:0,zIndex:1e3}),dC=({children:e,handleClose:t,triggerRef:n})=>{let r=F.useRef(null);xh({ref:r,onInteractOutside:t}),(0,F.useEffect)(()=>{if(r.current)return fb([r.current],{shouldUseInert:!0})},[]);let{overlayProps:i}=xv({targetRef:n,overlayRef:r,placement:`bottom start`,offset:8,maxHeight:504,isOpen:!0}),{overlayProps:a,underlayProps:o}=ry({isOpen:!0,onClose:t,isDismissable:!0,shouldCloseOnBlur:!1,isKeyboardDismissDisabled:!0},r),s=A();return i.style={...i.style,overflow:`hidden auto`,scrollbarColor:`${s.barTextColor} transparent`,scrollbarWidth:`thin`},F.createElement(gb,{disableFocusManagement:!0,...a},F.createElement(uC,{...o}),F.createElement(XS,{hasChrome:!0,ref:r,padding:0,...i},e))},fC=(0,F.forwardRef)(({children:e,icon:t,disabled:n=!1,options:r,defaultOptions:i,multiSelect:a=!1,onReset:o,padding:s=`small`,resetLabel:c,onSelect:l,onDeselect:u,onChange:d,tooltip:f,ariaLabel:p,showSelectedOptionTitle:m=!0,...h},g)=>{let[_,v]=(0,F.useState)(h.defaultOpen||!1),[y,b]=(0,F.useState)(!1),x=gp(g),S=(0,F.useMemo)(()=>`select-`+Math.random().toString(36).substring(2,15),[]),C=`${S}-listbox`,w=(0,F.useRef)(null),T=yb({isOpen:_&&!n,onOpenChange:v}),E=(0,F.useCallback)(()=>{v(!1),b(!0)},[]);(0,F.useEffect)(()=>{!T.isOpen&&y&&(x.current?.focus(),b(!1))},[T.isOpen,y,x]);let[D,O]=(0,F.useState)(cC(r,i)),k=(0,F.useCallback)(e=>{e.type===`reset`?(d?.([]),o?.(),O([])):O(a?t=>{let n=[];return t?.some(t=>t.value===e.value)?(u?.(rC(e.value)),n=t?.filter(t=>t.value!==e.value)??[]):(l?.(rC(e.value)),n=[...t??[],e]),d?.(n.map(e=>rC(e.value))),n}:t=>t.every(t=>t.value!==e.value)?(l?.(rC(e.value)),d?.([rC(e.value)]),[e]):t)},[a,d,l,u,o]),A=(0,F.useMemo)(()=>o?{type:`reset`,value:void 0,title:c??`Reset selection`,icon:F.createElement(Ee,null),description:void 0,children:void 0}:void 0,[o,c]),j=(0,F.useMemo)(()=>A?[A,...r]:r,[r,A]);(0,F.useEffect)(()=>{i&&O(cC(r,i))},[i,r]);let[M,N]=(0,F.useState)(void 0),P=(0,F.useCallback)((e,t=!0)=>{N(nC(e)),!a&&t&&k(nC(e))},[a,k]),ee=(0,F.useCallback)((e=1)=>{if(!_||!M){P(j[e===1?0:Math.min(e,j.length-1)]);return}let t=j.findIndex(e=>M.type===`reset`?`type`in e&&e.type===`reset`:iC(e.value)===M.value),n=t+e,r;r=n>=j.length&&t===j.length-1?j[0]:j[Math.min(j.length-1,n)],P(r)},[_,M,P,j]),te=(0,F.useCallback)((e=1)=>{if(!_||!M){P(j[Math.max(0,j.length-e)]);return}let t=j.findIndex(e=>M.type===`reset`?`type`in e&&e.type===`reset`:iC(e.value)===M.value),n=t-e,r;r=n<0&&t===0?j[j.length-1]:j[Math.max(0,n)],P(r)},[_,M,P,j]),ne=(0,F.useCallback)(e=>{let t=t=>{e.preventDefault(),P(j[t]),v(!0)},n=j.findIndex(e=>D.some(t=>t.value===iC(e.value))),r=n!==-1,i=A&&!r?1:0,a=j.length-1;e.key===`Enter`||e.key===` `?t(r?Math.min(n,a):i):e.key===`ArrowDown`?t(r?Math.min(n+1,a):i):e.key===`ArrowUp`?t(r?Math.max(n-1,i):a):e.key===`Home`?t(i):e.key===`End`?t(a):e.key===`PageDown`?t(Math.min((r?n:i)+QS,a)):e.key===`PageUp`&&t(Math.max(0,(r?n:a)-QS))},[j,A,P,D]),re=(0,F.useCallback)(e=>{e.key===`Tab`?E():e.preventDefault(),e.key===`Escape`?E():e.key===`ArrowDown`?ee():e.key===`ArrowUp`?te():e.key===`Home`?P(j[0]):e.key===`End`?P(j[j.length-1]):e.key===`PageDown`?ee(QS):e.key===`PageUp`&&te(QS)},[E,ee,te,j,P]);(0,F.useEffect)(()=>{if(_&&M){let e=document.getElementById(oC(S,M));e&&(e.scrollIntoView({block:`nearest`}),e.focus())}else _&&w.current?.focus()},[_,M,S]);let ie=(0,F.useMemo)(()=>D.length===1?`${p} ${D[0].title}`:D.length?`${p}, ${D.length} values selected`:p,[p,D]);return F.createElement(F.Fragment,null,F.createElement(lC,{...h,variant:`ghost`,ariaLabel:ie,tooltip:f??p,disableAllTooltips:_,id:S,ref:x,padding:s,$isOpen:_,$hasSelection:!!D.length,"aria-disabled":n,disabled:n,onClick:()=>{_?E():v(!0)},tabIndex:_?-1:0,onKeyDown:ne,role:`button`,"aria-controls":_?C:void 0,"aria-expanded":_,"aria-haspopup":`listbox`},!a&&F.createElement(F.Fragment,null,t,m&&D[0]?.title||e),a&&F.createElement(F.Fragment,null,t,e,!!D.length&&F.createElement(sC,{"aria-label":`${D.length} ${D.length>1?`items`:`item`} selected`},D?.length))),T.isOpen&&F.createElement(dC,{handleClose:E,triggerRef:x},F.createElement(aC,{"aria-label":p,role:`listbox`,id:C,ref:w,"aria-multiselectable":a,onKeyDown:re,tabIndex:_?0:-1},j.map(e=>({option:nC(e),externalOption:e})).map(({externalOption:e,option:t})=>{let n=D?.some(e=>e.value===t.value)&&t!==A,r=t===A;return F.createElement(ZS,{key:t.value===void 0?`sb-reset`:String(t.value),title:t.title,description:t.description,aside:t.aside,icon:!r&&a?F.createElement(qS.Checkbox,{checked:n,hidden:!0,role:`presentation`}):t.icon,id:oC(S,t),isActive:_&&M?.value===t.value,isSelected:n,onClick:()=>{k(t),a||E()},onFocus:()=>P(e,!1),shouldLookDisabled:r&&D.length===0&&a,onKeyDown:e=>{e.key===`Enter`||e.key===` `?(e.preventDefault(),k(t),a||E()):e.key===`Tab`&&(a||k(t),E())}},t.children)}))))});fC.displayName=`Select`;var pC=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},mC=class extends pC{filter(e,t,n){let[r,i]=bC(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},hC=class extends pC{};hC.type=`header`;var gC=class extends pC{};gC.type=`loader`;var _C=class extends mC{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};_C.type=`item`;var vC=class extends mC{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};vC.type=`section`;var yC=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=bC(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};function bC(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}var xC=class{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild??=e,this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode!==this||!this.ownerDocument.isMounted||(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}},SC=class e extends xC{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof e?this.parentNode.level+(this.node?.type===`item`?1:0):0}getMutableNode(){return this.node==null?null:(this.isMutated||=(this.node=this.node.clone(),!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){var t,n,r,i,a,o,s;let c=this.nextVisibleSibling,l=this.getMutableNode();if(l!=null){l.index=this.index,l.level=this.level;var u;if(l.parentKey=this.parentNode instanceof e&&(u=this.parentNode.node?.key)!=null?u:null,l.prevKey=((n=this.previousVisibleSibling)==null||(t=n.node)==null?void 0:t.key)??null,l.nextKey=(c==null||(r=c.node)==null?void 0:r.key)??null,l.hasChildNodes=!!this.firstChild,l.firstChildKey=((a=this.firstVisibleChild)==null||(i=a.node)==null?void 0:i.key)??null,l.lastChildKey=((s=this.lastVisibleChild)==null||(o=s.node)==null?void 0:o.key)??null,(l.colSpan!=null||l.colIndex!=null)&&c){let e=(l.colIndex??l.index)+(l.colSpan??1);if(c.node!=null&&e!==c.node.colIndex){let t=c.getMutableNode();t.colIndex=e}}}}setProps(e,t,n,r,i){let a,{value:o,textValue:s,id:c,...l}=e;if(this.node==null?(a=new n(c??`react-aria-${++this.ownerDocument.nodeId}`),this.node=a):a=this.getMutableNode(),l.ref=t,a.props=l,a.rendered=r,a.render=i,a.value=o,a.textValue=s||(typeof l.children==`string`?l.children:``)||e[`aria-label`]||``,c!=null&&c!==a.key)throw Error(`Cannot change the id of an item`);l.colSpan!=null&&(a.colSpan=l.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?`none`:``},set display(t){let n=t===`none`;if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let t=e.previousVisibleSibling,r=e.nextVisibleSibling;t&&e.ownerDocument.markDirty(t),r&&e.ownerDocument.markDirty(r),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}},CC=class extends xC{get isConnected(){return this.isMounted}createElement(e){return new SC(e,this)}getMutableCollection(){return this.nextCollection||=this.collection.clone(),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let t of e)this.addNode(t);t.addNode(e.node)}removeNode(e){if(e.node!=null){for(let t of e)this.removeNode(t);this.getMutableCollection().removeNode(e.node.key)}}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof SC&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof SC&&(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.isMutated=!1);if(this.dirtyNodes.clear(),this.nextCollection){var e,t,n,r;this.nextCollection.commit(((t=this.firstVisibleChild)==null||(e=t.node)==null?void 0:e.key)??null,((r=this.lastVisibleChild)==null||(n=r.node)==null?void 0:n.key)??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null)}}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}};function wC(e){let{children:t,items:n,idScope:r,addIdAndValue:i,dependencies:a=[]}=e,o=(0,F.useMemo)(()=>new WeakMap,a);return(0,F.useMemo)(()=>{if(n&&typeof t==`function`){let e=[];for(let a of n){let n=o.get(a);if(!n){n=t(a);let e=n.props.id??a.key??a.id;if(e==null)throw Error(`Could not determine key for item`);r&&(e=r+`:`+e),n=(0,F.cloneElement)(n,i?{key:e,id:e,value:a}:{key:e}),o.set(a,n)}e.push(n)}return e}else if(typeof t!=`function`)return t},[t,n,o,r,i])}if(typeof HTMLTemplateElement<`u`){let e=Object.getOwnPropertyDescriptor(Node.prototype,`firstChild`).get;Object.defineProperty(HTMLTemplateElement.prototype,`firstChild`,{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}var TC=(0,F.createContext)(!1);function EC(e){if((0,F.useContext)(TC))return F.createElement(F.Fragment,null,e.children);let t=F.createElement(TC.Provider,{value:!0},e.children);return F.createElement(`template`,{"data-react-aria-hidden":!0},t)}function DC(e){let t=(t,n)=>(0,F.useContext)(TC)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,F.forwardRef)(t)}function OC(){return(0,F.useContext)(TC)}var kC=(0,F.createContext)(!1),AC=(0,F.createContext)(null);function jC(e){if((0,F.useContext)(AC))return e.content;let{collection:t,document:n}=FC(e.createCollection);return F.createElement(F.Fragment,null,F.createElement(EC,null,F.createElement(AC.Provider,{value:n},e.content)),F.createElement(MC,{render:e.children,collection:t}))}function MC({collection:e,render:t}){return t(e)}function NC(e,t,n){let r=ff(),i=(0,F.useRef)(r);return i.current=r,(0,qu.useSyncExternalStore)(e,(0,F.useCallback)(()=>i.current?n():t(),[t,n]))}var PC=typeof F.useSyncExternalStore==`function`?F.useSyncExternalStore:NC;function FC(e){let[t]=(0,F.useState)(()=>new CC(e?.()||new yC)),n=PC((0,F.useCallback)(e=>t.subscribe(e),[t]),(0,F.useCallback)(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),(0,F.useCallback)(()=>(t.isSSR=!0,t.getCollection()),[t]));return z(()=>(t.isMounted=!0,()=>{t.isMounted=!1}),[t]),{collection:n,document:t}}var IC=(0,F.createContext)(null);function LC(e){var t;return t=class extends pC{},t.type=e,t}function RC(e,t,n,r,i,a){typeof e==`string`&&(e=LC(e));let o=(0,F.useCallback)(i=>{i?.setProps(t,n,e,r,a)},[t,n,r,a,e]),s=(0,F.useContext)(IC);if(s){let o=s.ownerDocument.nodesByProps.get(t);return o||(o=s.ownerDocument.createElement(e.type),o.setProps(t,n,e,r,a),s.appendChild(o),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(t,o)),i?F.createElement(IC.Provider,{value:o},i):null}return F.createElement(e.type,{ref:o},i)}function zC(e,t){let n=({node:e})=>t(e.props,e.props.ref,e),r=(0,F.forwardRef)((r,i)=>{let a=(0,F.useContext)(oh);if(!(0,F.useContext)(kC)){if(t.length>=3)throw Error(t.name+` cannot be rendered outside a collection.`);return t(r,i)}return RC(e,r,i,`children`in r?r.children:null,null,e=>F.createElement(oh.Provider,{value:a},F.createElement(n,{node:e})))});return r.displayName=t.name,r}function BC(e,t,n=VC){let r=({node:e})=>t(e.props,e.props.ref,e),i=(0,F.forwardRef)((t,i)=>RC(e,t,i,null,n(t),e=>F.createElement(r,{node:e}))??F.createElement(F.Fragment,null));return i.displayName=t.name,i}function VC(e){return wC({...e,addIdAndValue:!0})}var HC=(0,F.createContext)(null);function UC(e){let t=(0,F.useContext)(HC),n=(t?.dependencies||[]).concat(e.dependencies),r=e.idScope||t?.idScope,i=VC({...e,idScope:r,dependencies:n});return(0,F.useContext)(AC)&&(i=F.createElement(WC,null,i)),t=(0,F.useMemo)(()=>({dependencies:n,idScope:r}),[r,...n]),F.createElement(HC.Provider,{value:t},i)}function WC({children:e}){let t=(0,F.useContext)(AC),n=(0,F.useMemo)(()=>F.createElement(AC.Provider,{value:null},F.createElement(kC.Provider,{value:!0},e)),[e]);return ff()?F.createElement(IC.Provider,{value:t},n):(0,Ku.createPortal)(n,t)}var GC=(0,F.createContext)({});DC(function(e,t){[e,t]=q(e,t,GC);let{elementType:n=`label`,...r}=e;return F.createElement(n,{className:`react-aria-Label`,...r,ref:t})});function KC(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a=`label`}=e;t=B(t);let o=B(),s={};n&&(r=r?`${o} ${r}`:o,s={id:o,htmlFor:a===`label`?t:void 0});let c=hp({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:s,fieldProps:c}}function qC(e){let{value:t=0,minValue:n=0,maxValue:r=100,valueLabel:i,isIndeterminate:a,formatOptions:o={style:`percent`}}=e,s=G(e,{labelable:!0}),{labelProps:c,fieldProps:l}=KC({...e,labelElementType:`span`});t=tm(t,n,r);let u=(t-n)/(r-n),d=_v(o);if(!a&&!i){let e=o.style===`percent`?u:t;i=d.format(e)}return{progressBarProps:W(s,{...l,"aria-valuenow":a?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":a?void 0:i,role:`progressbar`}),labelProps:c}}var JC=(0,F.createContext)(null);(0,F.forwardRef)(function(e,t){[e,t]=q(e,t,JC);let{value:n=0,minValue:r=0,maxValue:i=100,isIndeterminate:a=!1}=e;n=tm(n,r,i);let[o,s]=kh(!e[`aria-label`]&&!e[`aria-labelledby`]),{progressBarProps:c,labelProps:l}=qC({...e,label:s}),u=a?void 0:(n-r)/(i-r)*100,d=Dh({...e,defaultClassName:`react-aria-ProgressBar`,values:{percentage:u,valueText:c[`aria-valuetext`],isIndeterminate:a}}),f=G(e,{global:!0});return F.createElement(`div`,{...W(f,d,c),ref:t,slot:e.slot||void 0},F.createElement(GC.Provider,{value:{...l,ref:o,elementType:`span`}},d.children))});var YC=null;function XC(e,t=`assertive`,n=7e3){YC?YC.announce(e,t,n):(YC=new ZC,(typeof IS_REACT_ACT_ENVIRONMENT==`boolean`?IS_REACT_ACT_ENVIRONMENT:typeof jest<`u`)?YC.announce(e,t,n):setTimeout(()=>{YC?.isAttached()&&YC?.announce(e,t,n)},100))}var ZC=class{isAttached(){return this.node?.isConnected}createLog(e){let t=document.createElement(`div`);return t.setAttribute(`role`,`log`),t.setAttribute(`aria-live`,e),t.setAttribute(`aria-relevant`,`additions`),t}destroy(){this.node&&=(document.body.removeChild(this.node),null)}announce(e,t=`assertive`,n=7e3){var r,i;if(!this.node)return;let a=document.createElement(`div`);typeof e==`object`?(a.setAttribute(`role`,`img`),a.setAttribute(`aria-labelledby`,e[`aria-labelledby`])):a.textContent=e,t===`assertive`?(r=this.assertiveLog)==null||r.appendChild(a):(i=this.politeLog)==null||i.appendChild(a),e!==``&&setTimeout(()=>{a.remove()},n)}clear(e){this.node&&((!e||e===`assertive`)&&this.assertiveLog&&(this.assertiveLog.innerHTML=``),(!e||e===`polite`)&&this.politeLog&&(this.politeLog.innerHTML=``))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<`u`&&(this.node=document.createElement(`div`),this.node.dataset.liveAnnouncer=`true`,Object.assign(this.node.style,{border:0,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`}),this.assertiveLog=this.createLog(`assertive`),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog(`polite`),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}};function QC(e,t){let{elementType:n=`button`,isDisabled:r,onPress:i,onPressStart:a,onPressEnd:o,onPressUp:s,onPressChange:c,preventFocusOnPress:l,allowFocusWhenDisabled:u,onClick:d,href:f,target:p,rel:m,type:h=`button`}=e,g;g=n===`button`?{type:h,disabled:r,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:`button`,href:n===`a`&&!r?f:void 0,target:n===`a`?p:void 0,type:n===`input`?h:void 0,disabled:n===`input`?r:void 0,"aria-disabled":!r||n===`input`?void 0:r,rel:n===`a`?m:void 0};let{pressProps:_,isPressed:v}=Em({onPressStart:a,onPressEnd:o,onPressChange:c,onPress:i,onPressUp:s,onClick:d,isDisabled:r,preventFocusOnPress:l,ref:t}),{focusableProps:y}=lh(e,t);u&&(y.tabIndex=r?-1:y.tabIndex);let b=W(y,_,G(e,{labelable:!0}));return{isPressed:v,buttonProps:W(g,b,{"aria-haspopup":e[`aria-haspopup`],"aria-expanded":e[`aria-expanded`],"aria-controls":e[`aria-controls`],"aria-pressed":e[`aria-pressed`],"aria-current":e[`aria-current`],"aria-disabled":e[`aria-disabled`]})}}var $C=(0,F.createContext)({});DC(function(e,t){[e,t]=q(e,t,$C),e=ew(e);let n=e,{isPending:r}=n,{buttonProps:i,isPressed:a}=QC(e,t),{focusProps:o,isFocused:s,isFocusVisible:c}=Xv(e),{hoverProps:l,isHovered:u}=bh({...e,isDisabled:e.isDisabled||r}),d={isHovered:u,isPressed:(n.isPressed||a)&&!r,isFocused:s,isFocusVisible:c,isDisabled:e.isDisabled||!1,isPending:r??!1},f=Dh({...e,values:d,defaultClassName:`react-aria-Button`}),p=B(i.id),m=B(),h=i[`aria-labelledby`];r&&(h?h=`${h} ${m}`:i[`aria-label`]&&(h=`${p} ${m}`));let g=(0,F.useRef)(r);(0,F.useEffect)(()=>{let e={"aria-labelledby":h||p};(!g.current&&s&&r||g.current&&s&&!r)&&XC(e,`assertive`),g.current=r},[r,s,h,p]);let _=G(e,{global:!0});return delete _.onClick,F.createElement(`button`,{...W(_,f,i,o,l),type:i.type===`submit`&&r?`button`:i.type,id:p,ref:t,"aria-labelledby":h,slot:e.slot||void 0,"aria-disabled":r?`true`:i[`aria-disabled`],"data-disabled":e.isDisabled||void 0,"data-pressed":d.isPressed||void 0,"data-hovered":u||void 0,"data-focused":s||void 0,"data-pending":r||void 0,"data-focus-visible":c||void 0},F.createElement(JC.Provider,{value:{id:m}},f.children))});function ew(e){return e.isPending&&(e.onPress=void 0,e.onPressStart=void 0,e.onPressEnd=void 0,e.onPressChange=void 0,e.onPressUp=void 0,e.onKeyDown=void 0,e.onKeyUp=void 0,e.onClick=void 0,e.href=void 0),e}var tw=(0,F.createContext)(null),nw=(0,F.createContext)(null),rw=(0,F.forwardRef)(function(e,t){[e,t]=q(e,t,tw);let n=(0,F.useContext)(DT),r=yb(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?r:n,a=Vp(t,i.isOpen)||e.isExiting||!1,o=OC(),{direction:s}=pg();if(o){let t=e.children;return typeof t==`function`&&(t=t({trigger:e.trigger||null,placement:`bottom`,isEntering:!1,isExiting:!1,defaultChildren:null})),F.createElement(F.Fragment,null,t)}return i&&!i.isOpen&&!a?null:F.createElement(iw,{...e,triggerRef:e.triggerRef,state:i,popoverRef:t,isExiting:a,dir:s})});function iw({state:e,isExiting:t,UNSTABLE_portalContainer:n,clearContexts:r,...i}){let a=(0,F.useRef)(null),o=(0,F.useRef)(null),s=(0,F.useContext)(nw),c=s&&i.trigger===`SubmenuTrigger`,{popoverProps:l,underlayProps:u,arrowProps:d,placement:f,triggerAnchorPoint:p}=mb({...i,offset:i.offset??8,arrowRef:a,groupRef:c?s:o},e),m=i.popoverRef,h=Bp(m,!!f)||i.isEntering||!1,g=Dh({...i,defaultClassName:`react-aria-Popover`,values:{trigger:i.trigger||null,placement:f,isEntering:h,isExiting:t}}),_=!i.isNonModal||i.trigger===`SubmenuTrigger`,[v,y]=(0,F.useState)(!1);z(()=>{m.current&&y(_&&!m.current.querySelector(`[role=dialog]`))},[m,_]),(0,F.useEffect)(()=>{v&&i.trigger!==`SubmenuTrigger`&&m.current&&!m.current.contains(document.activeElement)&&nh(m.current)},[v,m,i.trigger]);let b=(0,F.useMemo)(()=>{let e=g.children;if(r)for(let t of r)e=F.createElement(t.Provider,{value:null},e);return e},[g.children,r]),x={...l.style,"--trigger-anchor-point":p?`${p.x}px ${p.y}px`:void 0,...g.style},S=F.createElement(`div`,{...W(G(i,{global:!0}),l),...g,role:v?`dialog`:void 0,tabIndex:v?-1:void 0,"aria-label":i[`aria-label`],"aria-labelledby":i[`aria-labelledby`],ref:m,slot:i.slot||void 0,style:x,dir:i.dir,"data-trigger":i.trigger,"data-placement":f,"data-entering":h||void 0,"data-exiting":t||void 0},!i.isNonModal&&F.createElement(cb,{onDismiss:e.close}),F.createElement(Ah.Provider,{value:{...d,placement:f,ref:a}},b),F.createElement(cb,{onDismiss:e.close}));return c?F.createElement(gb,{...i,shouldContainFocus:v,isExiting:t,portalContainer:n??s?.current??void 0},S):F.createElement(gb,{...i,shouldContainFocus:v,isExiting:t,portalContainer:n},!i.isNonModal&&e.isOpen&&F.createElement(`div`,{"data-testid":`underlay`,...u,style:{position:`fixed`,inset:0}}),F.createElement(`div`,{ref:o,style:{display:`contents`}},F.createElement(nw.Provider,{value:o},S)))}var aw=(0,F.createContext)(null);BC(`section`,(e,t,n)=>{let{name:r,render:i}=(0,F.useContext)(aw);return i(e,t,n,`react-aria-Section`)});var ow={CollectionRoot({collection:e,renderDropIndicator:t}){return sw(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return sw(e,t,n)}};function sw(e,t,n){return wC({items:t?e.getChildren(t.key):e,dependencies:[n],children(t){let r=t.render(t);return!n||t.type!==`item`?r:F.createElement(F.Fragment,null,n({type:`item`,key:t.key,dropPosition:`before`}),r,cw(e,t,n))}})}function cw(e,t,n){let r=t.key,i=e.getKeyAfter(r),a=i==null?null:e.getItem(i);for(;a!=null&&a.type!==`item`;)i=e.getKeyAfter(a.key),a=i==null?null:e.getItem(i);let o=t.nextKey==null?null:e.getItem(t.nextKey);for(;o!=null&&o.type!==`item`;)o=o.nextKey==null?null:e.getItem(o.nextKey);let s=[];if(o==null){let r=t;for(;r&&(!a||r.parentKey!==a.parentKey&&a.level<r.level);){let t=n({type:`item`,key:r.key,dropPosition:`after`});(0,F.isValidElement)(t)&&s.push((0,F.cloneElement)(t,{key:`${r.key}-after`})),r=r.parentKey==null?null:e.getItem(r.parentKey)}}return s}var lw=(0,F.createContext)(ow);function uw(e){return(0,F.useMemo)(()=>e==null?null:new Set([e]),[e])}var dw=(0,F.createContext)(null),fw=(0,F.createContext)(null),pw=(0,F.createContext)({});zC(hC,function(e,t){return[e,t]=q(e,t,pw),F.createElement(`header`,{className:`react-aria-Header`,...e,ref:t},e.children)});var mw=(0,F.createContext)({});(0,F.forwardRef)(function(e,t){return[e,t]=q(e,t,mw),F.createElement(`kbd`,{dir:`ltr`,...e,ref:t})});function hw(e){let t=G(e,{labelable:!0}),n;return e.orientation===`vertical`&&(n=`vertical`),e.elementType===`hr`?{separatorProps:t}:{separatorProps:{...t,role:`separator`,"aria-orientation":n}}}var gw=(0,F.createContext)({}),_w=class extends pC{filter(e,t){let n=t.getItem(this.prevKey);if(n&&n.type!==`separator`){let n=this.clone();return t.addDescendants(n,e),n}return null}};_w.type=`separator`,zC(_w,function(e,t){[e,t]=q(e,t,gw);let{elementType:n,orientation:r,style:i,className:a,slot:o,...s}=e,c=n||`hr`;c===`hr`&&r===`vertical`&&(c=`div`);let{separatorProps:l}=hw({...s,elementType:n,orientation:r}),u=G(e,{global:!0});return F.createElement(c,{...W(u,l),style:i,className:a??`react-aria-Separator`,ref:t,slot:o||void 0})});var vw=new WeakMap;function yw(e){return Xf()?e.altKey:e.ctrlKey}function bw(e,t){let n=`[data-key="${CSS.escape(String(t))}"]`,r=e.current?.dataset.collection;return r&&(n=`[data-collection="${CSS.escape(r)}"]${n}`),e.current?.querySelector(n)}var xw=new WeakMap;function Sw(e){let t=B();return xw.set(e,t),t}function Cw(e){return xw.get(e)}var ww=1e3;function Tw(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=(0,F.useRef)({search:``,timeout:void 0}).current;return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?e=>{let a=Ew(e.key);if(!(!a||e.ctrlKey||e.metaKey||!e.currentTarget.contains(e.target)||i.search.length===0&&a===` `)){if(a===` `&&i.search.trim().length>0&&(e.preventDefault(),`continuePropagation`in e||e.stopPropagation()),i.search+=a,t.getKeyForSearch!=null){let e=t.getKeyForSearch(i.search,n.focusedKey);e??=t.getKeyForSearch(i.search),e!=null&&(n.setFocusedKey(e),r&&r(e))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=``},ww)}}:void 0}}}function Ew(e){return e.length===1||!/^[A-Z]/i.test(e)?e:``}function Dw(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:a=!1,disallowEmptySelection:o=!1,disallowSelectAll:s=!1,escapeKeyBehavior:c=`clearSelection`,selectOnFocus:l=t.selectionBehavior===`replace`,disallowTypeAhead:u=!1,shouldUseVirtualFocus:d,allowsTabNavigation:f=!1,isVirtualized:p,scrollRef:m=r,linkBehavior:h=`action`}=e,{direction:g}=pg(),_=np(),v=e=>{var i;if(e.altKey&&e.key===`Tab`&&e.preventDefault(),!((i=r.current)!=null&&i.contains(e.target)))return;let u=(n,i)=>{if(n!=null){if(t.isLink(n)&&h===`selection`&&l&&!yw(e)){(0,Ku.flushSync)(()=>{t.setFocusedKey(n,i)});let a=bw(r,n),o=t.getItemProps(n);a&&_.open(a,e,o.href,o.routerOptions);return}if(t.setFocusedKey(n,i),t.isLink(n)&&h===`override`)return;e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(n):l&&!yw(e)&&t.replaceSelection(n)}};switch(e.key){case`ArrowDown`:if(n.getKeyBelow){let r=t.focusedKey==null?n.getFirstKey?.call(n):n.getKeyBelow?.call(n,t.focusedKey);r==null&&a&&(r=n.getFirstKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),u(r))}break;case`ArrowUp`:if(n.getKeyAbove){let r=t.focusedKey==null?n.getLastKey?.call(n):n.getKeyAbove?.call(n,t.focusedKey);r==null&&a&&(r=n.getLastKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),u(r))}break;case`ArrowLeft`:if(n.getKeyLeftOf){let r=t.focusedKey==null?null:n.getKeyLeftOf?.call(n,t.focusedKey);r==null&&a&&(r=g===`rtl`?n.getFirstKey?.call(n,t.focusedKey):n.getLastKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),u(r,g===`rtl`?`first`:`last`))}break;case`ArrowRight`:if(n.getKeyRightOf){let r=t.focusedKey==null?null:n.getKeyRightOf?.call(n,t.focusedKey);r==null&&a&&(r=g===`rtl`?n.getLastKey?.call(n,t.focusedKey):n.getFirstKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),u(r,g===`rtl`?`last`:`first`))}break;case`Home`:if(n.getFirstKey){if(t.focusedKey===null&&e.shiftKey)return;e.preventDefault();let r=n.getFirstKey(t.focusedKey,Tp(e));t.setFocusedKey(r),r!=null&&(Tp(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(r):l&&t.replaceSelection(r))}break;case`End`:if(n.getLastKey){if(t.focusedKey===null&&e.shiftKey)return;e.preventDefault();let r=n.getLastKey(t.focusedKey,Tp(e));t.setFocusedKey(r),r!=null&&(Tp(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(r):l&&t.replaceSelection(r))}break;case`PageDown`:if(n.getKeyPageBelow&&t.focusedKey!=null){let r=n.getKeyPageBelow(t.focusedKey);r!=null&&(e.preventDefault(),u(r))}break;case`PageUp`:if(n.getKeyPageAbove&&t.focusedKey!=null){let r=n.getKeyPageAbove(t.focusedKey);r!=null&&(e.preventDefault(),u(r))}break;case`a`:Tp(e)&&t.selectionMode===`multiple`&&s!==!0&&(e.preventDefault(),t.selectAll());break;case`Escape`:c===`clearSelection`&&!o&&t.selectedKeys.size!==0&&(e.stopPropagation(),e.preventDefault(),t.clearSelection());break;case`Tab`:if(!f){if(e.shiftKey)r.current.focus();else{let e=Gv(r.current,{tabbable:!0}),t,n;do n=e.lastChild(),n&&(t=n);while(n);t&&!t.contains(document.activeElement)&&Rf(t)}break}}},y=(0,F.useRef)({top:0,left:0});jp(m,`scroll`,p?void 0:()=>{y.current={top:m.current?.scrollTop??0,left:m.current?.scrollLeft??0}});let b=e=>{if(t.isFocused){e.currentTarget.contains(e.target)||t.setFocused(!1);return}if(e.currentTarget.contains(e.target)){if(t.setFocused(!0),t.focusedKey==null){let r=e=>{e!=null&&(t.setFocusedKey(e),l&&!t.isSelected(e)&&t.replaceSelection(e))},i=e.relatedTarget;i&&e.currentTarget.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING?r(t.lastSelectedKey??n.getLastKey?.call(n)):r(t.firstSelectedKey??n.getFirstKey?.call(n))}else !p&&m.current&&(m.current.scrollTop=y.current.top,m.current.scrollLeft=y.current.left);if(t.focusedKey!=null&&m.current){let e=bw(r,t.focusedKey);e instanceof HTMLElement&&(!e.contains(document.activeElement)&&!d&&Rf(e),Zm()===`keyboard`&&Pp(e,{containingElement:r.current}))}}},x=e=>{e.currentTarget.contains(e.relatedTarget)||t.setFocused(!1)},S=(0,F.useRef)(!1);jp(r,zp,d?e=>{let{detail:n}=e;e.stopPropagation(),t.setFocused(!0),n?.focusStrategy===`first`&&(S.current=!0)}:void 0);let C=K(()=>{let e=n.getFirstKey?.call(n)??null;if(e==null){let e=H();Qv(r.current),ey(e,null),t.collection.size>0&&(S.current=!1)}else t.setFocusedKey(e),S.current=!1});vp(()=>{S.current&&C()},[t.collection,C]);let w=K(()=>{t.collection.size>0&&(S.current=!1)});vp(()=>{w()},[t.focusedKey,w]),jp(r,Rp,d?e=>{var n;e.stopPropagation(),t.setFocused(!1),(n=e.detail)!=null&&n.clearFocusKey&&t.setFocusedKey(null)}:void 0);let T=(0,F.useRef)(i),E=(0,F.useRef)(!1);(0,F.useEffect)(()=>{if(T.current){let e=null;i===`first`&&(e=n.getFirstKey?.call(n)??null),i===`last`&&(e=n.getLastKey?.call(n)??null);let a=t.selectedKeys;if(a.size){for(let n of a)if(t.canSelectItem(n)){e=n;break}}t.setFocused(!0),t.setFocusedKey(e),e==null&&!d&&r.current&&nh(r.current),t.collection.size>0&&(T.current=!1,E.current=!0)}});let D=(0,F.useRef)(t.focusedKey),O=(0,F.useRef)(null);(0,F.useEffect)(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==D.current||E.current)&&m.current&&r.current){let e=Zm(),n=bw(r,t.focusedKey);if(!(n instanceof HTMLElement))return;(e===`keyboard`||E.current)&&(O.current&&cancelAnimationFrame(O.current),O.current=requestAnimationFrame(()=>{m.current&&(Mp(m.current,n),e!==`virtual`&&Pp(n,{containingElement:r.current}))}))}!d&&t.isFocused&&t.focusedKey==null&&D.current!=null&&r.current&&nh(r.current),D.current=t.focusedKey,E.current=!1}),(0,F.useEffect)(()=>()=>{O.current&&cancelAnimationFrame(O.current)},[]),jp(r,`react-aria-focus-scope-restore`,e=>{e.preventDefault(),t.setFocused(!0)});let k={onKeyDown:v,onFocus:b,onBlur:x,onMouseDown(e){m.current===e.target&&e.preventDefault()}},{typeSelectProps:A}=Tw({keyboardDelegate:n,selectionManager:t});u||(k=W(A,k));let j;d||(j=t.focusedKey==null?0:-1);let M=Sw(t.collection);return{collectionProps:W(k,{tabIndex:j,"data-collection":M})}}function Ow(e){let{id:t,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:a,shouldUseVirtualFocus:o,focus:s,isDisabled:c,onAction:l,allowsDifferentPressOrigin:u,linkBehavior:d=`action`}=e,f=np();t=B(t);let p=e=>{if(e.pointerType===`keyboard`&&yw(e))n.toggleSelection(r);else{if(n.selectionMode===`none`)return;if(n.isLink(r)){if(d===`selection`&&i.current){let t=n.getItemProps(r);f.open(i.current,e,t.href,t.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(d===`override`||d===`none`)return}n.selectionMode===`single`?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):e&&e.shiftKey?n.extendSelection(r):n.selectionBehavior===`toggle`||e&&(Tp(e)||e.pointerType===`touch`||e.pointerType===`virtual`)?n.toggleSelection(r):n.replaceSelection(r)}};(0,F.useEffect)(()=>{r===n.focusedKey&&n.isFocused&&(o?Qv(i.current):s?s():document.activeElement!==i.current&&i.current&&nh(i.current))},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,o]),c||=n.isDisabled(r);let m={};!o&&!c?m={tabIndex:r===n.focusedKey?0:-1,onFocus(e){e.target===i.current&&n.setFocusedKey(r)}}:c&&(m.onMouseDown=e=>{e.preventDefault()});let h=n.isLink(r)&&d===`override`,g=l&&e.UNSTABLE_itemBehavior===`action`,_=n.isLink(r)&&d!==`selection`&&d!==`none`,v=!c&&n.canSelectItem(r)&&!h&&!g,y=(l||_)&&!c,b=y&&(n.selectionBehavior===`replace`?!v:!v||n.isEmpty),x=y&&v&&n.selectionBehavior===`replace`,S=b||x,C=(0,F.useRef)(null),w=S&&v,T=(0,F.useRef)(!1),E=(0,F.useRef)(!1),D=n.getItemProps(r),O=e=>{if(l){var t;l(),(t=i.current)==null||t.dispatchEvent(new CustomEvent(`react-aria-item-action`,{bubbles:!0}))}_&&i.current&&f.open(i.current,e,D.href,D.routerOptions)},k={ref:i};if(a?(k.onPressStart=e=>{C.current=e.pointerType,T.current=w,e.pointerType===`keyboard`&&(!S||Aw())&&p(e)},u?(k.onPressUp=b?void 0:e=>{e.pointerType===`mouse`&&v&&p(e)},k.onPress=b?O:e=>{e.pointerType!==`keyboard`&&e.pointerType!==`mouse`&&v&&p(e)}):k.onPress=e=>{if(b||x&&e.pointerType!==`mouse`){if(e.pointerType===`keyboard`&&!kw())return;O(e)}else e.pointerType!==`keyboard`&&v&&p(e)}):(k.onPressStart=e=>{C.current=e.pointerType,T.current=w,E.current=b,v&&(e.pointerType===`mouse`&&!b||e.pointerType===`keyboard`&&(!y||Aw()))&&p(e)},k.onPress=e=>{(e.pointerType===`touch`||e.pointerType===`pen`||e.pointerType===`virtual`||e.pointerType===`keyboard`&&S&&kw()||e.pointerType===`mouse`&&E.current)&&(S?O(e):v&&p(e))}),m[`data-collection`]=Cw(n.collection),m[`data-key`]=r,k.preventFocusOnPress=o,o&&(k=W(k,{onPressStart(e){e.pointerType!==`touch`&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(e){e.pointerType===`touch`&&(n.setFocused(!0),n.setFocusedKey(r))}})),D)for(let e of[`onPressStart`,`onPressEnd`,`onPressChange`,`onPress`,`onPressUp`,`onClick`])D[e]&&(k[e]=vf(k[e],D[e]));let{pressProps:A,isPressed:j}=Em(k),M=x?e=>{C.current===`mouse`&&(e.stopPropagation(),e.preventDefault(),O(e))}:void 0,{longPressProps:N}=wh({isDisabled:!w,onLongPress(e){e.pointerType===`touch`&&(p(e),n.setSelectionBehavior(`toggle`))}}),P=e=>{C.current===`touch`&&T.current&&e.preventDefault()},ee=d!==`none`&&n.isLink(r)?e=>{ip.isOpening||e.preventDefault()}:void 0;return{itemProps:W(m,v||b||o&&!c?A:{},w?N:{},{onDoubleClick:M,onDragStartCapture:P,onClick:ee,id:t},o?{onMouseDown:e=>e.preventDefault()}:void 0),isPressed:j,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:c,allowsSelection:v,hasAction:S}}function kw(){return window.event?.key===`Enter`}function Aw(){let e=window.event;return e?.key===` `||e?.code===`Space`}var jw=class{getItemRect(e){let t=this.ref.current;if(!t)return null;let n=e==null?null:bw(this.ref,e);if(!n)return null;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-r.left-t.clientLeft+t.scrollLeft,y:i.top-r.top-t.clientTop+t.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;return{width:e?.scrollWidth??0,height:e?.scrollHeight??0}}getVisibleRect(){let e=this.ref.current;return{x:e?.scrollLeft??0,y:e?.scrollTop??0,width:e?.clientWidth??0,height:e?.clientHeight??0}}constructor(e){this.ref=e}},Mw=class{isDisabled(e){return this.disabledBehavior===`all`&&(e.props?.isDisabled||this.disabledKeys.has(e.key))}findNextNonDisabled(e,t){let n=e;for(;n!=null;){let e=this.collection.getItem(n);if(e?.type===`item`&&!this.isDisabled(e))return n;n=t(n)}return null}getNextKey(e){let t=e;return t=this.collection.getKeyAfter(t),this.findNextNonDisabled(t,e=>this.collection.getKeyAfter(e))}getPreviousKey(e){let t=e;return t=this.collection.getKeyBefore(t),this.findNextNonDisabled(t,e=>this.collection.getKeyBefore(e))}findKey(e,t,n){let r=e,i=this.layoutDelegate.getItemRect(r);if(!i||r==null)return null;let a=i;do{if(r=t(r),r==null)break;i=this.layoutDelegate.getItemRect(r)}while(i&&n(a,i)&&r!=null);return r}isSameRow(e,t){return e.y===t.y||e.x!==t.x}isSameColumn(e,t){return e.x===t.x||e.y!==t.y}getKeyBelow(e){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getNextKey(e),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getPreviousKey(e),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,t){return t?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let t=this.direction===`ltr`?`getKeyRightOf`:`getKeyLeftOf`;return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[t](e))):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`rtl`):this.findKey(e,e=>this.getNextColumn(e,this.direction===`rtl`),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`rtl`):null}getKeyLeftOf(e){let t=this.direction===`ltr`?`getKeyLeftOf`:`getKeyRightOf`;return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[t](e))):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`ltr`):this.findKey(e,e=>this.getNextColumn(e,this.direction===`ltr`),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`ltr`):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyAfter(e))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyBefore(e))}getKeyPageAbove(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!Sp(t))return this.getFirstKey();let r=e;if(this.orientation===`horizontal`){let e=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>e&&r!=null;)r=this.getKeyAbove(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}else{let e=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>e&&r!=null;)r=this.getKeyAbove(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}return r??this.getFirstKey()}getKeyPageBelow(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!Sp(t))return this.getLastKey();let r=e;if(this.orientation===`horizontal`){let e=Math.min(this.layoutDelegate.getContentSize().width,n.y-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.x<e&&r!=null;)r=this.getKeyBelow(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}else{let e=Math.min(this.layoutDelegate.getContentSize().height,n.y-n.height+this.layoutDelegate.getVisibleRect().height);for(;n&&n.y<e&&r!=null;)r=this.getKeyBelow(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}return r??this.getLastKey()}getKeyForSearch(e,t){if(!this.collator)return null;let n=this.collection,r=t||this.getFirstKey();for(;r!=null;){let t=n.getItem(r);if(!t)return null;let i=t.textValue.slice(0,e.length);if(t.textValue&&this.collator.compare(i,e)===0)return r;r=this.getNextKey(r)}return null}constructor(...e){if(e.length===1){let t=e[0];this.collection=t.collection,this.ref=t.ref,this.collator=t.collator,this.disabledKeys=t.disabledKeys||new Set,this.disabledBehavior=t.disabledBehavior||`all`,this.orientation=t.orientation||`vertical`,this.direction=t.direction,this.layout=t.layout||`stack`,this.layoutDelegate=t.layoutDelegate||new jw(t.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout=`stack`,this.orientation=`vertical`,this.disabledBehavior=`all`,this.layoutDelegate=new jw(this.ref);this.layout===`stack`&&this.orientation===`vertical`&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}};function Nw(e){let{selectionManager:t,collection:n,disabledKeys:r,ref:i,keyboardDelegate:a,layoutDelegate:o}=e,s=yv({usage:`search`,sensitivity:`base`}),c=t.disabledBehavior,l=(0,F.useMemo)(()=>a||new Mw({collection:n,disabledKeys:r,disabledBehavior:c,ref:i,collator:s,layoutDelegate:o}),[a,o,n,r,i,s,c]),{collectionProps:u}=Dw({...e,ref:i,selectionManager:t,keyboardDelegate:l});return{listProps:u}}function Pw(e,t,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:a,...o}=e;!e[`aria-label`]&&e[`aria-labelledby`];let s=G(e,{labelable:!0}),{listProps:c}=Nw({...o,ref:n,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,shouldFocusWrap:r,linkBehavior:`override`});return vw.set(t,{onClose:e.onClose,onAction:e.onAction,shouldUseVirtualFocus:e.shouldUseVirtualFocus}),{menuProps:W(s,{onKeyDown:i,onKeyUp:a},{role:`menu`,...c,onKeyDown:t=>{var n;(t.key!==`Escape`||e.shouldUseVirtualFocus)&&((n=c.onKeyDown)==null||n.call(c,t))}})}}function Fw(e){return null}Fw.getCollectionNode=function*(e,t){let{childItems:n,title:r,children:i}=e,a=e.title||e.children,o=e.textValue||(typeof a==`string`?a:``)||e[`aria-label`]||``;!o&&t?.suppressTextValueWarning,yield{type:`item`,props:e,rendered:a,textValue:o,"aria-label":e[`aria-label`],hasChildNodes:Iw(e),*childNodes(){if(n)for(let e of n)yield{type:`item`,value:e};else if(r){let e=[];F.Children.forEach(i,t=>{e.push({type:`item`,element:t})}),yield*e}}}};function Iw(e){return e.hasChildItems==null?!!(e.childItems||e.title&&F.Children.count(e.children)>0):e.hasChildItems}var Lw=Fw;function Rw(e){return null}Rw.getCollectionNode=function*(e){let{children:t,title:n,items:r}=e;yield{type:`section`,props:e,hasChildNodes:!0,rendered:n,"aria-label":e[`aria-label`],*childNodes(){if(typeof t==`function`){if(!r)throw Error(`props.children was a function but props.items is missing`);for(let e of r)yield{type:`item`,value:e,renderer:t}}else{let e=[];F.Children.forEach(t,t=>{e.push({type:`item`,element:t})}),yield*e}}}};var zw=class{build(e,t){return this.context=t,Bw(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:n}=e;if(F.isValidElement(t)&&t.type===F.Fragment)yield*this.iterateCollection({children:t.props.children,items:n});else if(typeof t==`function`){if(!n)throw Error(`props.children was a function but props.items is missing`);let e=0;for(let r of n)yield*this.getFullNode({value:r,index:e},{renderer:t}),e++}else{let e=[];F.Children.forEach(t,t=>{t&&e.push(t)});let n=0;for(let t of e){let e=this.getFullNode({element:t,index:n},{});for(let t of e)n++,yield t}}}getKey(e,t,n,r){if(e.key!=null)return e.key;if(t.type===`cell`&&t.key!=null)return`${r}${t.key}`;let i=t.value;if(i!=null){let e=i.key??i.id;if(e==null)throw Error(`No key found for item`);return e}return r?`${r}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,n,r){if(F.isValidElement(e.element)&&e.element.type===F.Fragment){let i=[];F.Children.forEach(e.element.props.children,e=>{i.push(e)});let a=e.index??0;for(let e of i)yield*this.getFullNode({element:e,index:a++},t,n,r);return}let i=e.element;if(!i&&e.value&&t&&t.renderer){let n=this.cache.get(e.value);if(n&&(!n.shouldInvalidate||!n.shouldInvalidate(this.context))){n.index=e.index,n.parentKey=r?r.key:null,yield n;return}i=t.renderer(e.value)}if(F.isValidElement(i)){let a=i.type;if(typeof a!=`function`&&typeof a.getCollectionNode!=`function`){let e=i.type;throw Error(`Unknown element <${e}> in collection.`)}let o=a.getCollectionNode(i.props,this.context),s=e.index??0,c=o.next();for(;!c.done&&c.value;){let a=c.value;e.index=s;let l=a.key??null;l??=a.element?null:this.getKey(i,e,t,n);let u=[...this.getFullNode({...a,key:l,index:s,wrapper:Vw(e.wrapper,a.wrapper)},this.getChildState(t,a),n?`${n}${i.key}`:i.key,r)];for(let t of u){if(t.value=a.value??e.value??null,t.value&&this.cache.set(t.value,t),e.type&&t.type!==e.type)throw Error(`Unsupported type <${Hw(t.type)}> in <${Hw(r?.type??`unknown parent type`)}>. Only <${Hw(e.type)}> is supported.`);s++,yield t}c=o.next(u)}return}if(e.key==null||e.type==null)return;let a=this,o={type:e.type,props:e.props,key:e.key,parentKey:r?r.key:null,value:e.value??null,level:r?r.level+1:0,index:e.index,rendered:e.rendered,textValue:e.textValue??``,"aria-label":e[`aria-label`],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Bw(function*(){if(!e.hasChildNodes||!e.childNodes)return;let n=0;for(let r of e.childNodes()){r.key!=null&&(r.key=`${o.key}${r.key}`);let e=a.getFullNode({...r,index:n},a.getChildState(t,r),o.key,o);for(let t of e)n++,yield t}})};yield o}constructor(){this.cache=new WeakMap}};function Bw(e){let t=[],n=null;return{*[Symbol.iterator](){for(let e of t)yield e;n||=e();for(let e of n)t.push(e),yield e}}}function Vw(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function Hw(e){return e[0].toUpperCase()+e.slice(1)}function Uw(e,t,n){let r=(0,F.useMemo)(()=>new zw,[]),{children:i,items:a,collection:o}=e;return(0,F.useMemo)(()=>o||t(r.build({children:i,items:a},n)),[r,i,a,o,n,t])}function Ww(e,t){return typeof t.getChildren==`function`?t.getChildren(e.key):e.childNodes}function Gw(e){return Kw(e,0)}function Kw(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function qw(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...Jw(e,t),t],i=[...Jw(e,n),n],a=r.slice(0,i.length).findIndex((e,t)=>e!==i[t]);return a===-1?r.findIndex(e=>e===n)>=0?1:(i.findIndex(e=>e===t),-1):(t=r[a],n=i[a],t.index-n.index)}function Jw(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}var Yw=new WeakMap;function Xw(e){let t=Yw.get(e);if(t!=null)return t;let n=0,r=t=>{for(let i of t)i.type===`section`?r(Ww(i,e)):i.type===`item`&&n++};return r(e),Yw.set(e,n),n}function Zw(e,t,n){let{id:r,key:i,closeOnSelect:a,isVirtualized:o,"aria-haspopup":s,onPressStart:c,onPressUp:l,onPress:u,onPressChange:d,onPressEnd:f,onClick:p,onHoverStart:m,onHoverChange:h,onHoverEnd:g,onKeyDown:_,onKeyUp:v,onFocus:y,onFocusChange:b,onBlur:x,selectionManager:S=t.selectionManager}=e,C=!!s,w=C&&e[`aria-expanded`]===`true`,T=e.isDisabled??S.isDisabled(i),E=e.isSelected??S.isSelected(i),D=vw.get(t),O=t.collection.getItem(i),k=e.onClose||D.onClose,A=np(),j=()=>{var t;if(!C&&(!(O==null||(t=O.props)==null)&&t.onAction?O.props.onAction():e.onAction&&e.onAction(i),D.onAction)){let e=D.onAction;e(i)}},M=`menuitem`;C||(S.selectionMode===`single`?M=`menuitemradio`:S.selectionMode===`multiple`&&(M=`menuitemcheckbox`));let N=_f(),P=_f(),ee=_f(),te={id:r,"aria-disabled":T||void 0,role:M,"aria-label":e[`aria-label`],"aria-labelledby":N,"aria-describedby":[P,ee].filter(Boolean).join(` `)||void 0,"aria-controls":e[`aria-controls`],"aria-haspopup":s,"aria-expanded":e[`aria-expanded`]};S.selectionMode!==`none`&&!C&&(te[`aria-checked`]=E),o&&(te[`aria-posinset`]=O?.index,te[`aria-setsize`]=Xw(t.collection));let ne=(0,F.useRef)(!1),re=e=>{d?.(e),ne.current=e},ie=(0,F.useRef)(null),ae=e=>{e.pointerType!==`keyboard`&&(ie.current={pointerType:e.pointerType}),e.pointerType===`mouse`&&(ne.current||e.target.click()),l?.(e)},oe=e=>{p?.(e),j(),cp(e,A,O.props.href,O?.props.routerOptions);let t=ie.current?.pointerType===`keyboard`?ie.current?.key===`Enter`||S.selectionMode===`none`||S.isLink(i):S.selectionMode!==`multiple`||S.isLink(i);t=a??t,k&&!C&&t&&k(),ie.current=null},{itemProps:se,isFocused:ce}=Ow({id:r,selectionManager:S,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:`none`,shouldUseVirtualFocus:D.shouldUseVirtualFocus}),{pressProps:le,isPressed:ue}=Em({onPressStart:c,onPress:u,onPressUp:ae,onPressChange:re,onPressEnd:f,isDisabled:T}),{hoverProps:de}=bh({isDisabled:T,onHoverStart(e){!Xm()&&!(w&&s)&&(S.setFocused(!0),S.setFocusedKey(i)),m?.(e)},onHoverChange:h,onHoverEnd:g}),{keyboardProps:fe}=ah({onKeyDown:e=>{if(e.repeat){e.continuePropagation();return}switch(e.key){case` `:ie.current={pointerType:`keyboard`,key:` `},e.target.click();break;case`Enter`:ie.current={pointerType:`keyboard`,key:`Enter`},e.target.tagName!==`A`&&e.target.click();break;default:C||e.continuePropagation(),_?.(e);break}},onKeyUp:v}),{focusProps:pe}=rh({onBlur:x,onFocus:y,onFocusChange:b}),me=G(O?.props);delete me.id;let he=sp(O?.props);return{menuItemProps:{...te,...W(me,he,C?{onFocus:se.onFocus,"data-collection":se[`data-collection`],"data-key":se[`data-key`]}:se,le,de,fe,pe,D.shouldUseVirtualFocus||C?{onMouseDown:e=>e.preventDefault()}:void 0,T?void 0:{onClick:oe}),tabIndex:se.tabIndex!=null&&w&&!D.shouldUseVirtualFocus?-1:se.tabIndex},labelProps:{id:N},descriptionProps:{id:P},keyboardShortcutProps:{id:ee},isFocused:ce,isFocusVisible:ce&&S.isFocused&&Xm()&&!w,isSelected:E,isPressed:ue,isDisabled:T}}function Qw(e){let{heading:t,"aria-label":n}=e,r=B();return{itemProps:{role:`presentation`},headingProps:t?{id:r,role:`presentation`}:{},groupProps:{role:`group`,"aria-label":n,"aria-labelledby":t?r:void 0}}}var $w=2,eT=50,tT=1e3,nT=Math.PI/12;function rT(e){let{menuRef:t,submenuRef:n,isOpen:r,isDisabled:i}=e,a=(0,F.useRef)(void 0),o=(0,F.useRef)(void 0),s=(0,F.useRef)(0),c=(0,F.useRef)(void 0),l=(0,F.useRef)(void 0),u=(0,F.useRef)(void 0),d=(0,F.useRef)(2),[f,p]=(0,F.useState)(!1);bp({ref:n,onResize:()=>{n.current&&(o.current=n.current.getBoundingClientRect(),u.current=void 0)}});let m=()=>{p(!1),d.current=$w,a.current=void 0},h=Qm(),g=K(e=>{f&&e.preventDefault()});(0,F.useEffect)(()=>{f&&t.current?t.current.style.pointerEvents=`none`:t.current.style.pointerEvents=``},[t,f]),(0,F.useEffect)(()=>{let e=n.current,f=t.current;if(i||!e||!r||h!==`pointer`||!f){m();return}o.current=e.getBoundingClientRect();let _=e=>{if(e.pointerType===`touch`||e.pointerType===`pen`)return;let t=Date.now();if(t-s.current<eT)return;clearTimeout(c.current),clearTimeout(l.current);let{clientX:n,clientY:r}=e;if(!a.current){a.current={x:n,y:r};return}if(!o.current)return;if(u.current||=n>o.current.right?`left`:`right`,n<f.getBoundingClientRect().left||n>f.getBoundingClientRect().right||r<f.getBoundingClientRect().top||r>f.getBoundingClientRect().bottom){m();return}let i=a.current.x,h=a.current.y,g=u.current===`right`?o.current.left-i:i-o.current.right,_=Math.atan2(h-o.current.top,g)+nT,v=Math.atan2(h-o.current.bottom,g)-nT,y=Math.atan2(h-r,u.current===`left`?-(n-i):n-i),b=y<_&&y>v;d.current=b?Math.min(d.current+1,$w):Math.max(d.current-1,0),d.current>=$w?p(!0):p(!1),s.current=t,a.current={x:n,y:r},b&&(c.current=setTimeout(()=>{m(),l.current=setTimeout(()=>{let e=document.elementFromPoint(n,r);e&&f.contains(e)&&e.dispatchEvent(new PointerEvent(`pointerover`,{bubbles:!0,cancelable:!0}))},100)},tT))};return window.addEventListener(`pointermove`,_),window.addEventListener(`pointerdown`,g,!0),()=>{window.removeEventListener(`pointermove`,_),window.removeEventListener(`pointerdown`,g,!0),clearTimeout(c.current),clearTimeout(l.current),d.current=$w}},[i,r,t,h,p,g,n])}function iT(e,t,n){let{parentMenuRef:r,submenuRef:i,type:a=`menu`,isDisabled:o,delay:s=200,shouldUseVirtualFocus:c}=e,l=B(),u=B(),{direction:d}=pg(),f=(0,F.useRef)(void 0),p=(0,F.useCallback)(()=>{f.current&&=(clearTimeout(f.current),void 0)},[f]),m=K(e=>{p(),t.open(e)}),h=K(()=>{p(),t.close()});z(()=>()=>{p()},[p]);let g=e=>{if(e.currentTarget.contains(document.activeElement))switch(e.key){case`ArrowLeft`:d===`ltr`&&e.currentTarget.contains(e.target)&&(e.preventDefault(),e.stopPropagation(),h(),!c&&n.current&&Rf(n.current));break;case`ArrowRight`:d===`rtl`&&e.currentTarget.contains(e.target)&&(e.preventDefault(),e.stopPropagation(),h(),!c&&n.current&&Rf(n.current));break;case`Escape`:var t;(t=i.current)!=null&&t.contains(e.target)&&(e.stopPropagation(),h(),!c&&n.current&&Rf(n.current));break}},_={id:u,"aria-labelledby":l,submenuLevel:t.submenuLevel,...a===`menu`&&{onClose:t.closeAll,autoFocus:t.focusStrategy??void 0,onKeyDown:g}},v=e=>{switch(e.key){case`ArrowRight`:o||(d===`ltr`?(e.preventDefault(),t.isOpen||m(`first`),a===`menu`&&i?.current&&document.activeElement===n?.current&&Rf(i.current)):t.isOpen?h():e.continuePropagation());break;case`ArrowLeft`:o||(d===`rtl`?(e.preventDefault(),t.isOpen||m(`first`),a===`menu`&&i?.current&&document.activeElement===n?.current&&Rf(i.current)):t.isOpen?h():e.continuePropagation());break;default:e.continuePropagation();break}},y=e=>{!o&&(e.pointerType===`virtual`||e.pointerType===`keyboard`)&&m(`first`)},b=e=>{!o&&(e.pointerType===`touch`||e.pointerType===`mouse`)&&m()},x=e=>{o||(e&&!t.isOpen?f.current||=setTimeout(()=>{m()},s):e||p())};jp(r,`focusin`,e=>{var i;t.isOpen&&(i=r.current)!=null&&i.contains(e.target)&&e.target!==n.current&&h()});let S=e=>e!==n.current;return rT({menuRef:r,submenuRef:i,isOpen:t.isOpen,isDisabled:o}),{submenuTriggerProps:{id:l,"aria-controls":t.isOpen?u:void 0,"aria-haspopup":o?void 0:a,"aria-expanded":t.isOpen?`true`:`false`,onPressStart:y,onPress:b,onHoverChange:x,onKeyDown:v,isOpen:t.isOpen},submenuProps:_,popoverProps:{isNonModal:!0,shouldCloseOnInteractOutside:S}}}function aT(e){let t=yb(e),[n,r]=(0,F.useState)(null),[i,a]=(0,F.useState)([]),o=()=>{a([]),t.close()};return{focusStrategy:n,...t,open(e=null){r(e),t.open()},toggle(e=null){r(e),t.toggle()},close(){o()},expandedKeysStack:i,openSubmenu:(e,t)=>{a(n=>t>n.length?n:[...n.slice(0,t),e])},closeSubmenu:(e,t)=>{a(n=>n[t]===e?n.slice(0,t):n)}}}function oT(e,t){let{triggerKey:n}=e,{expandedKeysStack:r,openSubmenu:i,closeSubmenu:a,close:o}=t,[s]=(0,F.useState)(r?.length),c=(0,F.useMemo)(()=>r[s]===n,[r,n,s]),[l,u]=(0,F.useState)(null),d=(0,F.useCallback)(e=>{u(e??null),i(n,s)},[i,s,n]),f=(0,F.useCallback)(()=>{u(null),a(n,s)},[a,s,n]),p=(0,F.useCallback)(e=>{u(e??null),c?f():d(e)},[f,d,c]);return(0,F.useMemo)(()=>({focusStrategy:l,isOpen:c,open:d,close:f,closeAll:o,submenuLevel:s,setOpen:()=>{},toggle:p}),[c,d,f,o,l,p,s])}var sT=class{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);var n;return t&&(n=t.prevKey)!=null?n:null}getKeyAfter(e){let t=this.keyMap.get(e);var n;return t&&(n=t.nextKey)!=null?n:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}constructor(e,{expandedKeys:t}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,t||=new Set;let n=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&(e.type===`section`||t.has(e.key)))for(let t of e.childNodes)n(t)};for(let t of e)n(t);let r=null,i=0;for(let[e,t]of this.keyMap)r?(r.nextKey=e,t.prevKey=r.key):(this.firstKey=e,t.prevKey=void 0),t.type===`item`&&(t.index=i++),r=t,r.nextKey=void 0;this.lastKey=r?.key??null}},cT=class e extends Set{constructor(t,n,r){super(t),t instanceof e?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}};function lT(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function uT(e){let{selectionMode:t=`none`,disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i=`toggle`,disabledBehavior:a=`all`}=e,o=(0,F.useRef)(!1),[,s]=(0,F.useState)(!1),c=(0,F.useRef)(null),l=(0,F.useRef)(null),[,u]=(0,F.useState)(null),[d,f]=em((0,F.useMemo)(()=>dT(e.selectedKeys),[e.selectedKeys]),(0,F.useMemo)(()=>dT(e.defaultSelectedKeys,new cT),[e.defaultSelectedKeys]),e.onSelectionChange),p=(0,F.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[m,h]=(0,F.useState)(i);i===`replace`&&m===`toggle`&&typeof d==`object`&&d.size===0&&h(`replace`);let g=(0,F.useRef)(i);return(0,F.useEffect)(()=>{i!==g.current&&(h(i),g.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:m,setSelectionBehavior:h,get isFocused(){return o.current},setFocused(e){o.current=e,s(e)},get focusedKey(){return c.current},get childFocusStrategy(){return l.current},setFocusedKey(e,t=`first`){c.current=e,l.current=t,u(e)},selectedKeys:d,setSelectedKeys(e){(r||!lT(e,d))&&f(e)},disabledKeys:p,disabledBehavior:a}}function dT(e,t){return e?e===`all`?`all`:new cT(e):t}var fT=class e{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}get selectedKeys(){return this.state.selectedKeys===`all`?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode===`none`)return!1;let t=this.getKey(e);return t==null?!1:this.state.selectedKeys===`all`?this.canSelectItem(t):this.state.selectedKeys.has(t)}get isEmpty(){return this.state.selectedKeys!==`all`&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys===`all`)return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),t=this.state.selectedKeys;return this._isSelectAll=e.every(e=>t.has(e)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&qw(this.collection,n,e)<0)&&(e=n)}return e?.key??null}get lastSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&qw(this.collection,n,e)>0)&&(e=n)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n;if(this.state.selectedKeys===`all`)n=new cT([t],t,t);else{let e=this.state.selectedKeys,r=e.anchorKey??t;n=new cT(e,r,t);for(let i of this.getKeyRange(r,e.currentKey??t))n.delete(i);for(let e of this.getKeyRange(t,r))this.canSelectItem(e)&&n.add(e)}this.state.setSelectedKeys(n)}getKeyRange(e,t){let n=this.collection.getItem(e),r=this.collection.getItem(t);return n&&r?qw(this.collection,n,r)<=0?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){var n;if((n=this.layoutDelegate)!=null&&n.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let r=[],i=e;for(;i!=null;){let e=this.collection.getItem(i);if(e&&(e.type===`item`||e.type===`cell`&&this.allowsCellSelection)&&r.push(i),i===t)return r;i=this.collection.getKeyAfter(i)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||t.type===`cell`&&this.allowsCellSelection)return e;for(;t&&t.type!==`item`&&t.parentKey!=null;)t=this.collection.getItem(t.parentKey);return!t||t.type!==`item`?null:t.key}toggleSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`&&!this.isSelected(e)){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n=new cT(this.state.selectedKeys===`all`?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode===`none`)return;let t=this.getKey(e);if(t==null)return;let n=this.canSelectItem(t)?new cT([t],t,t):new cT;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode===`none`)return;let t=new cT;for(let n of e){let e=this.getKey(n);if(e!=null&&(t.add(e),this.selectionMode===`single`))break}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=[],t=n=>{for(;n!=null;){if(this.canSelectItem(n)){let r=this.collection.getItem(n);r?.type===`item`&&e.push(n),r?.hasChildNodes&&(this.allowsCellSelection||r.type!==`item`)&&t(Gw(Ww(r,this.collection))?.key??null)}n=this.collection.getKeyAfter(n)}};return t(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode===`multiple`&&this.state.setSelectedKeys(`all`)}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys===`all`||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new cT)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode!==`none`&&(this.selectionMode===`single`?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior===`toggle`||t&&(t.pointerType===`touch`||t.pointerType===`virtual`)?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;for(let n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){var t;if(this.state.selectionMode===`none`||this.state.disabledKeys.has(e))return!1;let n=this.collection.getItem(e);return!(!n||!(n==null||(t=n.props)==null)&&t.isDisabled||n.type===`cell`&&!this.allowsCellSelection)}isDisabled(e){var t,n;return this.state.disabledBehavior===`all`&&(this.state.disabledKeys.has(e)||!!(!((n=this.collection.getItem(e))==null||(t=n.props)==null)&&t.isDisabled))}isLink(e){var t,n;return!!(!((n=this.collection.getItem(e))==null||(t=n.props)==null)&&t.href)}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(t){return new e(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(e,t,n){this.collection=e,this.state=t,this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null}};function pT(e){let{onExpandedChange:t}=e,[n,r]=em(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=uT(e),a=(0,F.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),o=Uw(e,(0,F.useCallback)(e=>new sT(e,{expandedKeys:n}),[n]),null);return(0,F.useEffect)(()=>{i.focusedKey!=null&&!o.getItem(i.focusedKey)&&i.setFocusedKey(null)},[o,i.focusedKey]),{collection:o,expandedKeys:n,disabledKeys:a,toggleKey:e=>{r(mT(n,e))},setExpandedKeys:r,selectionManager:new fT(o,i)}}function mT(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}var hT=(0,F.createContext)(null),gT=(0,F.createContext)(null),_T=(0,F.createContext)(null),vT=(0,F.createContext)(null),yT=(0,F.createContext)(null),bT=class extends pC{filter(e,t,n){let r=e.getItem(this.firstChildKey);if(r&&n(r.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};bT.type=`submenutrigger`,BC(bT,(e,t,n)=>{let{CollectionBranch:r}=(0,F.useContext)(lw),i=(0,F.useContext)(gT),a=(0,F.useContext)(_T),o=oT({triggerKey:n.key},a),s=(0,F.useRef)(null),c=gp(t),{parentMenuRef:l,shouldUseVirtualFocus:u}=(0,F.useContext)(yT),{submenuTriggerProps:d,submenuProps:f,popoverProps:p}=iT({parentMenuRef:l,submenuRef:s,delay:e.delay,shouldUseVirtualFocus:u},o,c);return F.createElement(Eh,{values:[[wT,{...d,onAction:void 0,ref:c}],[hT,{ref:s,...f}],[DT,o],[tw,{trigger:`SubmenuTrigger`,triggerRef:c,placement:`end top`,"aria-labelledby":f[`aria-labelledby`],...p}]]},F.createElement(r,{collection:i.collection,parent:n}),e.children[1])},e=>e.children[0]),(0,F.forwardRef)(function(e,t){return[e,t]=q(e,t,hT),F.createElement(jC,{content:F.createElement(UC,e)},n=>F.createElement(xT,{props:e,collection:n,menuRef:t}))});function xT({props:e,collection:t,menuRef:n}){[e,n]=q(e,n,dw);let{filter:r,...i}=e,a=(0,F.useMemo)(()=>r?t.filter(r):t,[t,r]),o=pT({...e,collection:a,children:void 0}),s=(0,F.useContext)(_T),{isVirtualized:c,CollectionRoot:l}=(0,F.useContext)(lw),{menuProps:u}=Pw({...e,isVirtualized:c,onClose:e.onClose||s?.close},o,n),d=Dh({defaultClassName:`react-aria-Menu`,className:e.className,style:e.style,values:{isEmpty:o.collection.size===0}}),f=null;o.collection.size===0&&e.renderEmptyState&&(f=F.createElement(`div`,{role:`menuitem`,style:{display:`contents`}},e.renderEmptyState()));let p=G(e,{global:!0});return F.createElement(Ev,null,F.createElement(`div`,{...W(p,d,u),ref:n,slot:e.slot||void 0,"data-empty":o.collection.size===0||void 0,onScroll:e.onScroll},F.createElement(Eh,{values:[[gT,o],[gw,{elementType:`div`}],[aw,{name:`MenuSection`,render:CT}],[yT,{parentMenuRef:n,shouldUseVirtualFocus:i?.shouldUseVirtualFocus}],[wT,null],[dw,null],[fw,null],[vT,o.selectionManager],[_T,s??aT({})]]},F.createElement(l,{collection:o.collection,persistedKeys:uw(o.selectionManager.focusedKey),scrollRef:n})),f))}var ST=class extends fT{get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,t){return this.parent.setFocusedKey(e,t)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}constructor(e,t){super(e.collection,t),this.parent=e}};function CT(e,t,n,r=`react-aria-MenuSection`){let i=(0,F.useContext)(gT),{CollectionBranch:a}=(0,F.useContext)(lw),[o,s]=kh(),{headingProps:c,groupProps:l}=Qw({heading:s,"aria-label":n.props[`aria-label`]??void 0}),u=Dh({defaultClassName:r,className:n.props?.className,style:n.props?.style,values:{}}),d=(0,F.useContext)(vT),f=uT(e),p=e.selectionMode==null?d:new ST(d,f),m=G(e,{global:!0});return delete m.id,F.createElement(`section`,{...W(m,u,l),ref:t},F.createElement(Eh,{values:[[pw,{...c,ref:o}],[vT,p]]},F.createElement(a,{collection:i.collection,parent:n})))}BC(vC,CT);var wT=(0,F.createContext)(null);zC(_C,function(e,t,n){[e,t]=q(e,t,wT);let r=Oh(wT)?.id,i=(0,F.useContext)(gT),a=gp(t),o=(0,F.useContext)(vT),{menuItemProps:s,labelProps:c,descriptionProps:l,keyboardShortcutProps:u,...d}=Zw({...e,id:r,key:n.key,selectionManager:o},i,a),{hoverProps:f,isHovered:p}=bh({isDisabled:d.isDisabled}),m=Dh({...e,id:void 0,children:n.rendered,defaultClassName:`react-aria-MenuItem`,values:{...d,isHovered:p,isFocusVisible:d.isFocusVisible,selectionMode:o.selectionMode,selectionBehavior:o.selectionBehavior,hasSubmenu:!!e[`aria-haspopup`],isOpen:e[`aria-expanded`]===`true`}}),h=e.href?`a`:`div`,g=G(e,{global:!0});return delete g.id,delete g.onClick,F.createElement(h,{...W(g,m,s,f),ref:a,"data-disabled":d.isDisabled||void 0,"data-hovered":p||void 0,"data-focused":d.isFocused||void 0,"data-focus-visible":d.isFocusVisible||void 0,"data-pressed":d.isPressed||void 0,"data-selected":d.isSelected||void 0,"data-selection-mode":o.selectionMode===`none`?void 0:o.selectionMode,"data-has-submenu":!!e[`aria-haspopup`]||void 0,"data-open":e[`aria-expanded`]===`true`||void 0},F.createElement(Eh,{values:[[Sx,{slots:{[Th]:c,label:c,description:l}}],[mw,u]]},m.children))});function TT(e,t){let{role:n=`dialog`}=e,r=_f();r=e[`aria-label`]?void 0:r;let i=(0,F.useRef)(!1);return(0,F.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){nh(t.current);let e=setTimeout(()=>{(document.activeElement===t.current||document.activeElement===document.body)&&(i.current=!0,t.current&&(t.current.blur(),nh(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),_b(),{dialogProps:{...G(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e[`aria-labelledby`]||r,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:r}}}var ET=(0,F.createContext)(null),DT=(0,F.createContext)(null);function OT(e){let t=aT(e),n=(0,F.useRef)(null),{triggerProps:r,overlayProps:i}=iy({type:`dialog`},t,n),[a,o]=(0,F.useState)(null);return bp({ref:n,onResize:(0,F.useCallback)(()=>{n.current&&o(n.current.offsetWidth+`px`)},[n])}),r.id=B(),i[`aria-labelledby`]=r.id,F.createElement(Eh,{values:[[DT,t],[_T,t],[ET,i],[tw,{trigger:`DialogTrigger`,triggerRef:n,"aria-labelledby":i[`aria-labelledby`],style:{"--trigger-width":a}}]]},F.createElement(fh,{...r,ref:n,isPressed:t.isOpen},e.children))}(0,F.forwardRef)(function(e,t){let n=e[`aria-labelledby`];[e,t]=q(e,t,ET);let{dialogProps:r,titleProps:i}=TT({...e,"aria-labelledby":n},t),a=(0,F.useContext)(DT);!r[`aria-label`]&&!r[`aria-labelledby`]&&e[`aria-labelledby`]&&(r[`aria-labelledby`]=e[`aria-labelledby`]);let o=Dh({defaultClassName:`react-aria-Dialog`,className:e.className,style:e.style,children:e.children,values:{close:a?.close||(()=>{})}}),s=G(e,{global:!0});return F.createElement(`section`,{...W(s,o,r),ref:t,slot:e.slot||void 0},F.createElement(Eh,{values:[[bx,{slots:{[Th]:{},title:{...i,level:2}}}],[$C,{slots:{[Th]:{},close:{onPress:()=>a?.close()}}}]]},o.children))});var kT=({placement:e=`bottom-start`,hasChrome:t=!0,hasCloseButton:n=!1,closeLabel:r,offset:i=8,padding:a,popover:o,children:s,defaultVisible:c,visible:l,onVisibleChange:u,...d})=>{let f=Nb(e),[p,m]=(0,F.useState)(c??!1),h=(0,F.useCallback)(e=>{m(e),u?.(e)},[u]),g=(0,F.useCallback)(()=>h(!1),[h]);return F.createElement(OT,{defaultOpen:c,isOpen:l??p,onOpenChange:h,...d},F.createElement(dh,null,s),F.createElement(rw,{placement:f,offset:i,style:{outline:`none`}},F.createElement(XS,{hasChrome:t,hideLabel:r,onHide:n?g:void 0,padding:a},typeof o==`function`?o({onHide:g}):o)))},AT=(0,F.forwardRef)((e,t)=>F.createElement(XS,{ref:t,...e}));AT.displayName=`Tooltip`,(0,F.lazy)(()=>e(()=>import(`./WithTooltip-65CFNBJE-CtWnqLza.js`),__vite__mapDeps([8,1,2,4,5,0]),import.meta.url).then(e=>({default:e.WithTooltip}))),(0,F.lazy)(()=>e(()=>import(`./WithTooltip-65CFNBJE-CtWnqLza.js`),__vite__mapDeps([8,1,2,4,5,0]),import.meta.url).then(e=>({default:e.WithTooltipPure})));var{deprecate:jT}=__STORYBOOK_MODULE_CLIENT_LOGGER__;N.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),N.span(),N.div(({theme:e})=>({marginTop:8,textAlign:`center`,"> *":{margin:`0 8px`,fontWeight:e.typography.weight.bold}})),N.div(({theme:e})=>({color:e.color.defaultText,lineHeight:`18px`})),N.div({padding:15,width:280,boxSizing:`border-box`});var{deprecate:MT}=__STORYBOOK_MODULE_CLIENT_LOGGER__,NT=t(v(),1),{deprecate:PT}=__STORYBOOK_MODULE_CLIENT_LOGGER__,FT=N(({active:e,loading:t,disabled:n,...r})=>F.createElement(`span`,{...r}))(({theme:e})=>({color:e.color.defaultText,fontWeight:e.typography.weight.regular}),({active:e,theme:t})=>e?{color:t.color.secondary,fontWeight:t.typography.weight.bold}:{},({loading:e,theme:t})=>e?{display:`inline-block`,flex:`none`,...t.animation.inlineGlow}:{},({disabled:e,theme:t})=>e?{color:t.textMutedColor}:{}),IT=N.span({display:`flex`,"& svg":{height:12,width:12,margin:`3px 0`,verticalAlign:`top`}}),LT=N.span({flex:1,textAlign:`left`,display:`flex`,flexDirection:`column`,minWidth:0},({isIndented:e})=>e?{marginLeft:24}:{}),RT=N.span(({theme:e})=>({fontSize:`11px`,lineHeight:`14px`}),({active:e,theme:t})=>e?{color:t.color.secondary}:{},({theme:e,disabled:t})=>t?{color:e.textMutedColor}:{}),zT=N.span(({active:e,theme:t})=>e?{color:t.color.secondary}:{},()=>({display:`flex`,maxWidth:14})),BT=N.button(({theme:e})=>({width:`100%`,minWidth:0,border:`none`,borderRadius:e.appBorderRadius,background:`none`,fontSize:e.typography.size.s1,transition:`background 150ms ease-out`,color:e.color.dark,textDecoration:`none`,justifyContent:`space-between`,lineHeight:`18px`,padding:`7px 10px`,display:`flex`,alignItems:`center`,"& > * + *":{paddingLeft:10},"&:focus-visible":{outline:`2px solid ${e.color.secondary}`,outlineOffset:0}}),({theme:e,href:t,onClick:n})=>(t||n)&&{cursor:`pointer`,"&:hover":{background:e.background.hoverable},"&:hover svg":{opacity:1}},({theme:e,as:t})=>t===`label`&&{"&:has(input:not(:disabled))":{cursor:`pointer`,"&:hover":{background:e.background.hoverable}}},({disabled:e})=>e&&{cursor:`not-allowed`}),VT=(0,NT.default)(100)(({onClick:e,input:t,href:n,LinkWrapper:r})=>({...e&&{as:`button`,role:`button`,onClick:e},...t&&{as:`label`},...n&&{as:`a`,role:`link`,href:n,...r&&{as:r,to:n}}})),HT=(0,F.forwardRef)((e,t)=>{let{loading:n=!1,title:r=F.createElement(`span`,null,`Loading state`),center:i=null,right:a=null,active:o=!1,disabled:s=!1,isIndented:c=!1,href:l=void 0,onClick:u=void 0,icon:d,input:f,LinkWrapper:p=void 0,...m}=e,h={active:o,disabled:s},g=VT(e),_=d||f;return PT("`ListItem` is deprecated and will be removed in Storybook 11, use `MenuItem` instead."),F.createElement(BT,{"data-deprecated":`ListItem`,ref:t,...m,...h,...g},F.createElement(F.Fragment,null,_&&F.createElement(zT,{...h},_),r||i?F.createElement(LT,{isIndented:c&&!_},r&&F.createElement(FT,{...h,loading:n},r),i&&F.createElement(RT,{...h},i)):null,a&&F.createElement(IT,{...h},a)))});HT.displayName=`ListItem`;var UT=HT,WT=N.div({minWidth:180,overflow:`hidden`,overflowY:`auto`,maxHeight:504},({theme:e})=>({borderRadius:e.appBorderRadius+2}),({theme:e})=>e.base===`dark`?{background:e.background.content}:{}),GT=N.div(({theme:e})=>({padding:4,"& + &":{borderTop:`1px solid ${e.appBorderColor}`}})),KT=({id:e,onClick:t,...n})=>{let{active:r,disabled:i,title:a,href:o}=n,s=(0,F.useCallback)(n=>t?.(n,{id:e,active:r,disabled:i,title:a,href:o}),[t,e,r,i,a,o]);return F.createElement(UT,{id:`list-item-${e}`,...n,...t&&{onClick:s}})},qT=({links:e,LinkWrapper:t,...n})=>{MT("`TooltipLinkList` is deprecated and will be removed in Storybook 11, use `ActionList` or `MenuItem` and `WithMenu` instead.");let r=Array.isArray(e[0])?e:[e],i=r.some(e=>e.some(e=>`icon`in e&&e.icon||`input`in e&&e.input));return F.createElement(WT,{"data-deprecated":`TooltipLinkList`,...n,className:`sb-list`},r.filter(e=>e.length).map((e,n)=>F.createElement(GT,{key:e.map(e=>e.id).join(`~${n}~`)},e.map(e=>`content`in e?F.createElement(F.Fragment,{key:e.id},e.content):F.createElement(KT,{key:e.id,isIndented:i,LinkWrapper:t,...e})))))},{deprecate:JT}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{deprecate:YT}=__STORYBOOK_MODULE_CLIENT_LOGGER__,XT=N.div(({backgroundColor:e,border:t=!1,innerStyle:n={},scrollable:r,theme:i})=>({color:i.barTextColor,width:`100%`,minHeight:40,flexShrink:0,scrollbarColor:`${i.barTextColor} ${t?e||i.barBg:`transparent`}`,scrollbarWidth:`thin`,overflow:r?`auto`:`hidden`,overflowY:`hidden`,display:`flex`,alignItems:`center`,gap:r?0:6,paddingInline:r?0:6,...t?{boxShadow:`${i.appBorderColor} 0 -1px 0 0 inset`,background:e||i.barBg}:{},...n})),ZT=N.div(({innerStyle:e})=>({minHeight:40,display:`flex`,alignItems:`center`,width:`100%`,gap:6,paddingInline:6,...e})),QT=(0,F.forwardRef)(({scrollable:e=!0,children:t,innerStyle:n,...r},i)=>F.createElement(XT,{...r,ref:i,innerStyle:e?void 0:n,scrollable:e},e?F.createElement(ZT,{innerStyle:n},t):t));QT.displayName=`Bar`;var $T=N.div({display:`flex`,whiteSpace:`nowrap`,flexBasis:`auto`,marginLeft:3,marginRight:10},({scrollable:e})=>e?{flexShrink:0}:{},({left:e})=>e?{"& > *":{marginLeft:4}}:{},({right:e})=>e?{gap:6}:{});$T.displayName=`Side`;var eE=N.div(({bgColor:e})=>({display:`flex`,justifyContent:`space-between`,position:`relative`,flexWrap:`nowrap`,flexShrink:0,height:40,width:`100%`,backgroundColor:e||``})),tE=N(QT)({paddingInline:0}),nE=({children:e,backgroundColor:t,className:n=``,...r})=>{YT(`FlexBar is deprecated. Use Bar with justifyContent: "space-between" instead.`);let[i,a]=F.Children.toArray(e);return F.createElement(tE,{"data-deprecated":`FlexBar`,backgroundColor:t,className:`sb-bar ${n}`,...r},F.createElement(eE,{bgColor:t},F.createElement($T,{scrollable:r.scrollable,left:!0},i),a?F.createElement($T,{right:!0},a):null))};nE.displayName=`FlexBar`;var{deprecate:rE}=__STORYBOOK_MODULE_CLIENT_LOGGER__,iE=e=>typeof e.props.href==`string`,aE=e=>typeof e.props.href!=`string`;function oE({children:e,...t},n){let r={props:t,ref:n};if(iE(r))return F.createElement(`a`,{ref:r.ref,...r.props},e);if(aE(r))return F.createElement(`button`,{ref:r.ref,type:`button`,...r.props},e);throw Error(`invalid props`)}var sE=(0,F.forwardRef)(oE);sE.displayName=`ButtonOrLink`;var cE=N(sE,{shouldForwardProp:w})({whiteSpace:`normal`,display:`inline-flex`,overflow:`hidden`,verticalAlign:`top`,justifyContent:`center`,alignItems:`center`,textAlign:`center`,textDecoration:`none`,"&:empty":{display:`none`},"&[hidden]":{display:`none`}},({theme:e})=>({padding:`0 15px`,transition:`color 0.2s linear, border-bottom-color 0.2s linear`,height:40,lineHeight:`12px`,cursor:`pointer`,background:`transparent`,border:`0 solid transparent`,borderTop:`3px solid transparent`,borderBottom:`3px solid transparent`,fontWeight:`bold`,fontSize:13,"&:focus":{outline:`0 none`,borderBottomColor:e.barSelectedColor}}),({active:e,textColor:t,theme:n})=>e?{color:t||n.barSelectedColor,borderBottomColor:n.barSelectedColor}:{color:t||n.barTextColor,borderBottomColor:`transparent`,"&:hover":{color:n.barHoverColor}}),lE=(0,F.forwardRef)((e,t)=>(rE("The `TabButton` component is deprecated. Use `TabList` instead."),F.createElement(cE,{"data-deprecated":`TabButton`,ref:t,...e})));lE.displayName=`TabButton`;var uE=N.div(({theme:e})=>({height:`100%`,display:`flex`,padding:30,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:15,background:e.background.content})),dE=N.div({display:`flex`,flexDirection:`column`,gap:4,maxWidth:415}),fE=N.div(({theme:e})=>({fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,textAlign:`center`,color:e.color.defaultText})),pE=N.div(({theme:e})=>({fontSize:e.typography.size.s2-1})),mE=N.div(({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s2-1,textAlign:`center`,color:e.textMutedColor})),hE=({title:e,description:t,footer:n})=>F.createElement(uE,null,F.createElement(dE,null,F.createElement(fE,null,e),t&&F.createElement(mE,null,t)),n&&F.createElement(pE,null,n)),{deprecate:gE}=__STORYBOOK_MODULE_CLIENT_LOGGER__,_E=N.div(({active:e})=>e?{display:`block`}:{display:`none`}),vE=e=>(gE("The `childrenToList` tabs helper is deprecated. Use `TabsView` instead."),F.Children.toArray(e).map(({props:{title:e,id:t,color:n,children:r}})=>{let i=Array.isArray(r)?r[0]:r;return{title:e,id:t,...n?{color:n}:{},render:typeof i==`function`?i:({active:e})=>F.createElement(_E,{active:e,role:`tabpanel`},i)}})),{deprecate:yE}=__STORYBOOK_MODULE_CLIENT_LOGGER__,bE=N.span(({theme:e,isActive:t})=>({display:`inline-block`,width:0,height:0,marginLeft:8,color:t?e.color.secondary:e.color.mediumdark,borderRight:`3px solid transparent`,borderLeft:`3px solid transparent`,borderTop:`3px solid`,transition:`transform .1s ease-out`})),xE=N(lE)(({active:e,theme:t,preActive:n})=>`
|
|
56
|
+
`,borderRadius:e.appBorderRadius+2,fontSize:e.typography.size.s1}:{},({theme:e,bgColor:t})=>t===`default`&&{background:e.base===`light`?E(e.background.app):e.background.app,color:e.color.defaultText},({theme:e,bgColor:t})=>t===`inverse`&&{background:e.base===`light`?e.color.darkest:e.color.lightest,color:e.color.inverseText},({theme:e,bgColor:t})=>(t===`positive`||t===`negative`||t===`warning`)&&{background:e.background[t],color:e.color[`${t}Text`]}),YS=N(Rb)({position:`absolute`,top:4,right:4}),XS=(0,F.forwardRef)(({children:e,color:t=`default`,hasChrome:n=!0,hideLabel:r=`Close`,onHide:i,padding:a=8,...o},s)=>F.createElement(JS,{bgColor:t,hasChrome:n,hasCloseButton:!!i,padding:a,ref:s,...o},e,i&&F.createElement(YS,{ariaLabel:r,onClick:i,padding:`small`,variant:`ghost`,size:`small`},F.createElement(he,null))));XS.displayName=`Popover`;var ZS=({id:e,title:t,description:n,icon:r,aside:i,children:a,isSelected:o,isActive:s,onClick:c,onFocus:l,onKeyDown:u,shouldLookDisabled:d=!1,...f})=>F.createElement($b.Item,{...f,id:e,role:`option`,tabIndex:s?0:-1,"aria-selected":o,"aria-disabled":d?!0:void 0,onClick:c,onFocus:l,onKeyDown:u},a??F.createElement(F.Fragment,null,r&&F.createElement($b.Icon,null,r),F.createElement($b.Text,null,F.createElement(`p`,null,t),n&&F.createElement(`small`,null,n)),i));ZS.displayName=`SelectOption`;var QS=5,$S=Symbol.for(`undefined`);function eC(e){return e==null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`}function tC(e){return{...e,type:`option`,value:iC(e.value)}}function nC(e){return`type`in e&&e.type===`reset`?e:tC(e)}function rC(e){if(e!==$S)return e}function iC(e){return e===void 0?$S:e}var aC=N(`ul`)({minWidth:180,height:`100%`,borderRadius:6,overflow:`hidden auto`,listStyle:`none`,margin:0,padding:4});function oC(e,{value:t}){return`${e}-opt-${String(t)??`sb-reset`}`}var sC=N.span(({theme:e})=>({appearance:`none`,color:e.textMutedColor,fontSize:12}));function cC(e,t){return t===void 0?[]:eC(t)?e.filter(e=>e.value===t).map(tC):e.filter(e=>t.some(t=>e.value===t)).map(tC)}var lC=N(Rb)(({$isOpen:e,$hasSelection:t,theme:n})=>e||t?{boxShadow:`none`,background:C(.93,n.barSelectedColor),color:n.base===`light`?O(.1,n.color.secondary):n.color.secondary}:{}),uC=N.div({position:`fixed`,inset:0,zIndex:1e3}),dC=({children:e,handleClose:t,triggerRef:n})=>{let r=F.useRef(null);xh({ref:r,onInteractOutside:t}),(0,F.useEffect)(()=>{if(r.current)return fb([r.current],{shouldUseInert:!0})},[]);let{overlayProps:i}=xv({targetRef:n,overlayRef:r,placement:`bottom start`,offset:8,maxHeight:504,isOpen:!0}),{overlayProps:a,underlayProps:o}=ry({isOpen:!0,onClose:t,isDismissable:!0,shouldCloseOnBlur:!1,isKeyboardDismissDisabled:!0},r),s=A();return i.style={...i.style,overflow:`hidden auto`,scrollbarColor:`${s.barTextColor} transparent`,scrollbarWidth:`thin`},F.createElement(gb,{disableFocusManagement:!0,...a},F.createElement(uC,{...o}),F.createElement(XS,{hasChrome:!0,ref:r,padding:0,...i},e))},fC=(0,F.forwardRef)(({children:e,icon:t,disabled:n=!1,options:r,defaultOptions:i,multiSelect:a=!1,onReset:o,padding:s=`small`,resetLabel:c,onSelect:l,onDeselect:u,onChange:d,tooltip:f,ariaLabel:p,showSelectedOptionTitle:m=!0,...h},g)=>{let[_,v]=(0,F.useState)(h.defaultOpen||!1),[y,b]=(0,F.useState)(!1),x=gp(g),S=(0,F.useMemo)(()=>`select-`+Math.random().toString(36).substring(2,15),[]),C=`${S}-listbox`,w=(0,F.useRef)(null),T=yb({isOpen:_&&!n,onOpenChange:v}),E=(0,F.useCallback)(()=>{v(!1),b(!0)},[]);(0,F.useEffect)(()=>{!T.isOpen&&y&&(x.current?.focus(),b(!1))},[T.isOpen,y,x]);let[D,O]=(0,F.useState)(cC(r,i)),k=(0,F.useCallback)(e=>{e.type===`reset`?(d?.([]),o?.(),O([])):O(a?t=>{let n=[];return t?.some(t=>t.value===e.value)?(u?.(rC(e.value)),n=t?.filter(t=>t.value!==e.value)??[]):(l?.(rC(e.value)),n=[...t??[],e]),d?.(n.map(e=>rC(e.value))),n}:t=>t.every(t=>t.value!==e.value)?(l?.(rC(e.value)),d?.([rC(e.value)]),[e]):t)},[a,d,l,u,o]),A=(0,F.useMemo)(()=>o?{type:`reset`,value:void 0,title:c??`Reset selection`,icon:F.createElement(Ee,null),description:void 0,children:void 0}:void 0,[o,c]),j=(0,F.useMemo)(()=>A?[A,...r]:r,[r,A]);(0,F.useEffect)(()=>{i&&O(cC(r,i))},[i,r]);let[M,N]=(0,F.useState)(void 0),P=(0,F.useCallback)((e,t=!0)=>{N(nC(e)),!a&&t&&k(nC(e))},[a,k]),ee=(0,F.useCallback)((e=1)=>{if(!_||!M){P(j[e===1?0:Math.min(e,j.length-1)]);return}let t=j.findIndex(e=>M.type===`reset`?`type`in e&&e.type===`reset`:iC(e.value)===M.value),n=t+e,r;r=n>=j.length&&t===j.length-1?j[0]:j[Math.min(j.length-1,n)],P(r)},[_,M,P,j]),te=(0,F.useCallback)((e=1)=>{if(!_||!M){P(j[Math.max(0,j.length-e)]);return}let t=j.findIndex(e=>M.type===`reset`?`type`in e&&e.type===`reset`:iC(e.value)===M.value),n=t-e,r;r=n<0&&t===0?j[j.length-1]:j[Math.max(0,n)],P(r)},[_,M,P,j]),ne=(0,F.useCallback)(e=>{let t=t=>{e.preventDefault(),P(j[t]),v(!0)},n=j.findIndex(e=>D.some(t=>t.value===iC(e.value))),r=n!==-1,i=A&&!r?1:0,a=j.length-1;e.key===`Enter`||e.key===` `?t(r?Math.min(n,a):i):e.key===`ArrowDown`?t(r?Math.min(n+1,a):i):e.key===`ArrowUp`?t(r?Math.max(n-1,i):a):e.key===`Home`?t(i):e.key===`End`?t(a):e.key===`PageDown`?t(Math.min((r?n:i)+QS,a)):e.key===`PageUp`&&t(Math.max(0,(r?n:a)-QS))},[j,A,P,D]),re=(0,F.useCallback)(e=>{e.key===`Tab`?E():e.preventDefault(),e.key===`Escape`?E():e.key===`ArrowDown`?ee():e.key===`ArrowUp`?te():e.key===`Home`?P(j[0]):e.key===`End`?P(j[j.length-1]):e.key===`PageDown`?ee(QS):e.key===`PageUp`&&te(QS)},[E,ee,te,j,P]);(0,F.useEffect)(()=>{if(_&&M){let e=document.getElementById(oC(S,M));e&&(e.scrollIntoView({block:`nearest`}),e.focus())}else _&&w.current?.focus()},[_,M,S]);let ie=(0,F.useMemo)(()=>D.length===1?`${p} ${D[0].title}`:D.length?`${p}, ${D.length} values selected`:p,[p,D]);return F.createElement(F.Fragment,null,F.createElement(lC,{...h,variant:`ghost`,ariaLabel:ie,tooltip:f??p,disableAllTooltips:_,id:S,ref:x,padding:s,$isOpen:_,$hasSelection:!!D.length,"aria-disabled":n,disabled:n,onClick:()=>{_?E():v(!0)},tabIndex:_?-1:0,onKeyDown:ne,role:`button`,"aria-controls":_?C:void 0,"aria-expanded":_,"aria-haspopup":`listbox`},!a&&F.createElement(F.Fragment,null,t,m&&D[0]?.title||e),a&&F.createElement(F.Fragment,null,t,e,!!D.length&&F.createElement(sC,{"aria-label":`${D.length} ${D.length>1?`items`:`item`} selected`},D?.length))),T.isOpen&&F.createElement(dC,{handleClose:E,triggerRef:x},F.createElement(aC,{"aria-label":p,role:`listbox`,id:C,ref:w,"aria-multiselectable":a,onKeyDown:re,tabIndex:_?0:-1},j.map(e=>({option:nC(e),externalOption:e})).map(({externalOption:e,option:t})=>{let n=D?.some(e=>e.value===t.value)&&t!==A,r=t===A;return F.createElement(ZS,{key:t.value===void 0?`sb-reset`:String(t.value),title:t.title,description:t.description,aside:t.aside,icon:!r&&a?F.createElement(qS.Checkbox,{checked:n,hidden:!0,role:`presentation`}):t.icon,id:oC(S,t),isActive:_&&M?.value===t.value,isSelected:n,onClick:()=>{k(t),a||E()},onFocus:()=>P(e,!1),shouldLookDisabled:r&&D.length===0&&a,onKeyDown:e=>{e.key===`Enter`||e.key===` `?(e.preventDefault(),k(t),a||E()):e.key===`Tab`&&(a||k(t),E())}},t.children)}))))});fC.displayName=`Select`;var pC=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},mC=class extends pC{filter(e,t,n){let[r,i]=bC(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},hC=class extends pC{};hC.type=`header`;var gC=class extends pC{};gC.type=`loader`;var _C=class extends mC{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};_C.type=`item`;var vC=class extends mC{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};vC.type=`section`;var yC=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=bC(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};function bC(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}var xC=class{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild??=e,this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode!==this||!this.ownerDocument.isMounted||(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}},SC=class e extends xC{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof e?this.parentNode.level+(this.node?.type===`item`?1:0):0}getMutableNode(){return this.node==null?null:(this.isMutated||=(this.node=this.node.clone(),!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){var t,n,r,i,a,o,s;let c=this.nextVisibleSibling,l=this.getMutableNode();if(l!=null){l.index=this.index,l.level=this.level;var u;if(l.parentKey=this.parentNode instanceof e&&(u=this.parentNode.node?.key)!=null?u:null,l.prevKey=((n=this.previousVisibleSibling)==null||(t=n.node)==null?void 0:t.key)??null,l.nextKey=(c==null||(r=c.node)==null?void 0:r.key)??null,l.hasChildNodes=!!this.firstChild,l.firstChildKey=((a=this.firstVisibleChild)==null||(i=a.node)==null?void 0:i.key)??null,l.lastChildKey=((s=this.lastVisibleChild)==null||(o=s.node)==null?void 0:o.key)??null,(l.colSpan!=null||l.colIndex!=null)&&c){let e=(l.colIndex??l.index)+(l.colSpan??1);if(c.node!=null&&e!==c.node.colIndex){let t=c.getMutableNode();t.colIndex=e}}}}setProps(e,t,n,r,i){let a,{value:o,textValue:s,id:c,...l}=e;if(this.node==null?(a=new n(c??`react-aria-${++this.ownerDocument.nodeId}`),this.node=a):a=this.getMutableNode(),l.ref=t,a.props=l,a.rendered=r,a.render=i,a.value=o,a.textValue=s||(typeof l.children==`string`?l.children:``)||e[`aria-label`]||``,c!=null&&c!==a.key)throw Error(`Cannot change the id of an item`);l.colSpan!=null&&(a.colSpan=l.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?`none`:``},set display(t){let n=t===`none`;if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let t=e.previousVisibleSibling,r=e.nextVisibleSibling;t&&e.ownerDocument.markDirty(t),r&&e.ownerDocument.markDirty(r),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}},CC=class extends xC{get isConnected(){return this.isMounted}createElement(e){return new SC(e,this)}getMutableCollection(){return this.nextCollection||=this.collection.clone(),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let t of e)this.addNode(t);t.addNode(e.node)}removeNode(e){if(e.node!=null){for(let t of e)this.removeNode(t);this.getMutableCollection().removeNode(e.node.key)}}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof SC&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof SC&&(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.isMutated=!1);if(this.dirtyNodes.clear(),this.nextCollection){var e,t,n,r;this.nextCollection.commit(((t=this.firstVisibleChild)==null||(e=t.node)==null?void 0:e.key)??null,((r=this.lastVisibleChild)==null||(n=r.node)==null?void 0:n.key)??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null)}}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}};function wC(e){let{children:t,items:n,idScope:r,addIdAndValue:i,dependencies:a=[]}=e,o=(0,F.useMemo)(()=>new WeakMap,a);return(0,F.useMemo)(()=>{if(n&&typeof t==`function`){let e=[];for(let a of n){let n=o.get(a);if(!n){n=t(a);let e=n.props.id??a.key??a.id;if(e==null)throw Error(`Could not determine key for item`);r&&(e=r+`:`+e),n=(0,F.cloneElement)(n,i?{key:e,id:e,value:a}:{key:e}),o.set(a,n)}e.push(n)}return e}else if(typeof t!=`function`)return t},[t,n,o,r,i])}if(typeof HTMLTemplateElement<`u`){let e=Object.getOwnPropertyDescriptor(Node.prototype,`firstChild`).get;Object.defineProperty(HTMLTemplateElement.prototype,`firstChild`,{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}var TC=(0,F.createContext)(!1);function EC(e){if((0,F.useContext)(TC))return F.createElement(F.Fragment,null,e.children);let t=F.createElement(TC.Provider,{value:!0},e.children);return F.createElement(`template`,{"data-react-aria-hidden":!0},t)}function DC(e){let t=(t,n)=>(0,F.useContext)(TC)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,F.forwardRef)(t)}function OC(){return(0,F.useContext)(TC)}var kC=(0,F.createContext)(!1),AC=(0,F.createContext)(null);function jC(e){if((0,F.useContext)(AC))return e.content;let{collection:t,document:n}=FC(e.createCollection);return F.createElement(F.Fragment,null,F.createElement(EC,null,F.createElement(AC.Provider,{value:n},e.content)),F.createElement(MC,{render:e.children,collection:t}))}function MC({collection:e,render:t}){return t(e)}function NC(e,t,n){let r=ff(),i=(0,F.useRef)(r);return i.current=r,(0,qu.useSyncExternalStore)(e,(0,F.useCallback)(()=>i.current?n():t(),[t,n]))}var PC=typeof F.useSyncExternalStore==`function`?F.useSyncExternalStore:NC;function FC(e){let[t]=(0,F.useState)(()=>new CC(e?.()||new yC)),n=PC((0,F.useCallback)(e=>t.subscribe(e),[t]),(0,F.useCallback)(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),(0,F.useCallback)(()=>(t.isSSR=!0,t.getCollection()),[t]));return z(()=>(t.isMounted=!0,()=>{t.isMounted=!1}),[t]),{collection:n,document:t}}var IC=(0,F.createContext)(null);function LC(e){var t;return t=class extends pC{},t.type=e,t}function RC(e,t,n,r,i,a){typeof e==`string`&&(e=LC(e));let o=(0,F.useCallback)(i=>{i?.setProps(t,n,e,r,a)},[t,n,r,a,e]),s=(0,F.useContext)(IC);if(s){let o=s.ownerDocument.nodesByProps.get(t);return o||(o=s.ownerDocument.createElement(e.type),o.setProps(t,n,e,r,a),s.appendChild(o),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(t,o)),i?F.createElement(IC.Provider,{value:o},i):null}return F.createElement(e.type,{ref:o},i)}function zC(e,t){let n=({node:e})=>t(e.props,e.props.ref,e),r=(0,F.forwardRef)((r,i)=>{let a=(0,F.useContext)(oh);if(!(0,F.useContext)(kC)){if(t.length>=3)throw Error(t.name+` cannot be rendered outside a collection.`);return t(r,i)}return RC(e,r,i,`children`in r?r.children:null,null,e=>F.createElement(oh.Provider,{value:a},F.createElement(n,{node:e})))});return r.displayName=t.name,r}function BC(e,t,n=VC){let r=({node:e})=>t(e.props,e.props.ref,e),i=(0,F.forwardRef)((t,i)=>RC(e,t,i,null,n(t),e=>F.createElement(r,{node:e}))??F.createElement(F.Fragment,null));return i.displayName=t.name,i}function VC(e){return wC({...e,addIdAndValue:!0})}var HC=(0,F.createContext)(null);function UC(e){let t=(0,F.useContext)(HC),n=(t?.dependencies||[]).concat(e.dependencies),r=e.idScope||t?.idScope,i=VC({...e,idScope:r,dependencies:n});return(0,F.useContext)(AC)&&(i=F.createElement(WC,null,i)),t=(0,F.useMemo)(()=>({dependencies:n,idScope:r}),[r,...n]),F.createElement(HC.Provider,{value:t},i)}function WC({children:e}){let t=(0,F.useContext)(AC),n=(0,F.useMemo)(()=>F.createElement(AC.Provider,{value:null},F.createElement(kC.Provider,{value:!0},e)),[e]);return ff()?F.createElement(IC.Provider,{value:t},n):(0,Ku.createPortal)(n,t)}var GC=(0,F.createContext)({});DC(function(e,t){[e,t]=q(e,t,GC);let{elementType:n=`label`,...r}=e;return F.createElement(n,{className:`react-aria-Label`,...r,ref:t})});function KC(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a=`label`}=e;t=B(t);let o=B(),s={};n&&(r=r?`${o} ${r}`:o,s={id:o,htmlFor:a===`label`?t:void 0});let c=hp({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:s,fieldProps:c}}function qC(e){let{value:t=0,minValue:n=0,maxValue:r=100,valueLabel:i,isIndeterminate:a,formatOptions:o={style:`percent`}}=e,s=G(e,{labelable:!0}),{labelProps:c,fieldProps:l}=KC({...e,labelElementType:`span`});t=tm(t,n,r);let u=(t-n)/(r-n),d=_v(o);if(!a&&!i){let e=o.style===`percent`?u:t;i=d.format(e)}return{progressBarProps:W(s,{...l,"aria-valuenow":a?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":a?void 0:i,role:`progressbar`}),labelProps:c}}var JC=(0,F.createContext)(null);(0,F.forwardRef)(function(e,t){[e,t]=q(e,t,JC);let{value:n=0,minValue:r=0,maxValue:i=100,isIndeterminate:a=!1}=e;n=tm(n,r,i);let[o,s]=kh(!e[`aria-label`]&&!e[`aria-labelledby`]),{progressBarProps:c,labelProps:l}=qC({...e,label:s}),u=a?void 0:(n-r)/(i-r)*100,d=Dh({...e,defaultClassName:`react-aria-ProgressBar`,values:{percentage:u,valueText:c[`aria-valuetext`],isIndeterminate:a}}),f=G(e,{global:!0});return F.createElement(`div`,{...W(f,d,c),ref:t,slot:e.slot||void 0},F.createElement(GC.Provider,{value:{...l,ref:o,elementType:`span`}},d.children))});var YC=null;function XC(e,t=`assertive`,n=7e3){YC?YC.announce(e,t,n):(YC=new ZC,(typeof IS_REACT_ACT_ENVIRONMENT==`boolean`?IS_REACT_ACT_ENVIRONMENT:typeof jest<`u`)?YC.announce(e,t,n):setTimeout(()=>{YC?.isAttached()&&YC?.announce(e,t,n)},100))}var ZC=class{isAttached(){return this.node?.isConnected}createLog(e){let t=document.createElement(`div`);return t.setAttribute(`role`,`log`),t.setAttribute(`aria-live`,e),t.setAttribute(`aria-relevant`,`additions`),t}destroy(){this.node&&=(document.body.removeChild(this.node),null)}announce(e,t=`assertive`,n=7e3){var r,i;if(!this.node)return;let a=document.createElement(`div`);typeof e==`object`?(a.setAttribute(`role`,`img`),a.setAttribute(`aria-labelledby`,e[`aria-labelledby`])):a.textContent=e,t===`assertive`?(r=this.assertiveLog)==null||r.appendChild(a):(i=this.politeLog)==null||i.appendChild(a),e!==``&&setTimeout(()=>{a.remove()},n)}clear(e){this.node&&((!e||e===`assertive`)&&this.assertiveLog&&(this.assertiveLog.innerHTML=``),(!e||e===`polite`)&&this.politeLog&&(this.politeLog.innerHTML=``))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<`u`&&(this.node=document.createElement(`div`),this.node.dataset.liveAnnouncer=`true`,Object.assign(this.node.style,{border:0,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`}),this.assertiveLog=this.createLog(`assertive`),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog(`polite`),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}};function QC(e,t){let{elementType:n=`button`,isDisabled:r,onPress:i,onPressStart:a,onPressEnd:o,onPressUp:s,onPressChange:c,preventFocusOnPress:l,allowFocusWhenDisabled:u,onClick:d,href:f,target:p,rel:m,type:h=`button`}=e,g;g=n===`button`?{type:h,disabled:r,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:`button`,href:n===`a`&&!r?f:void 0,target:n===`a`?p:void 0,type:n===`input`?h:void 0,disabled:n===`input`?r:void 0,"aria-disabled":!r||n===`input`?void 0:r,rel:n===`a`?m:void 0};let{pressProps:_,isPressed:v}=Em({onPressStart:a,onPressEnd:o,onPressChange:c,onPress:i,onPressUp:s,onClick:d,isDisabled:r,preventFocusOnPress:l,ref:t}),{focusableProps:y}=lh(e,t);u&&(y.tabIndex=r?-1:y.tabIndex);let b=W(y,_,G(e,{labelable:!0}));return{isPressed:v,buttonProps:W(g,b,{"aria-haspopup":e[`aria-haspopup`],"aria-expanded":e[`aria-expanded`],"aria-controls":e[`aria-controls`],"aria-pressed":e[`aria-pressed`],"aria-current":e[`aria-current`],"aria-disabled":e[`aria-disabled`]})}}var $C=(0,F.createContext)({});DC(function(e,t){[e,t]=q(e,t,$C),e=ew(e);let n=e,{isPending:r}=n,{buttonProps:i,isPressed:a}=QC(e,t),{focusProps:o,isFocused:s,isFocusVisible:c}=Xv(e),{hoverProps:l,isHovered:u}=bh({...e,isDisabled:e.isDisabled||r}),d={isHovered:u,isPressed:(n.isPressed||a)&&!r,isFocused:s,isFocusVisible:c,isDisabled:e.isDisabled||!1,isPending:r??!1},f=Dh({...e,values:d,defaultClassName:`react-aria-Button`}),p=B(i.id),m=B(),h=i[`aria-labelledby`];r&&(h?h=`${h} ${m}`:i[`aria-label`]&&(h=`${p} ${m}`));let g=(0,F.useRef)(r);(0,F.useEffect)(()=>{let e={"aria-labelledby":h||p};(!g.current&&s&&r||g.current&&s&&!r)&&XC(e,`assertive`),g.current=r},[r,s,h,p]);let _=G(e,{global:!0});return delete _.onClick,F.createElement(`button`,{...W(_,f,i,o,l),type:i.type===`submit`&&r?`button`:i.type,id:p,ref:t,"aria-labelledby":h,slot:e.slot||void 0,"aria-disabled":r?`true`:i[`aria-disabled`],"data-disabled":e.isDisabled||void 0,"data-pressed":d.isPressed||void 0,"data-hovered":u||void 0,"data-focused":s||void 0,"data-pending":r||void 0,"data-focus-visible":c||void 0},F.createElement(JC.Provider,{value:{id:m}},f.children))});function ew(e){return e.isPending&&(e.onPress=void 0,e.onPressStart=void 0,e.onPressEnd=void 0,e.onPressChange=void 0,e.onPressUp=void 0,e.onKeyDown=void 0,e.onKeyUp=void 0,e.onClick=void 0,e.href=void 0),e}var tw=(0,F.createContext)(null),nw=(0,F.createContext)(null),rw=(0,F.forwardRef)(function(e,t){[e,t]=q(e,t,tw);let n=(0,F.useContext)(DT),r=yb(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?r:n,a=Vp(t,i.isOpen)||e.isExiting||!1,o=OC(),{direction:s}=pg();if(o){let t=e.children;return typeof t==`function`&&(t=t({trigger:e.trigger||null,placement:`bottom`,isEntering:!1,isExiting:!1,defaultChildren:null})),F.createElement(F.Fragment,null,t)}return i&&!i.isOpen&&!a?null:F.createElement(iw,{...e,triggerRef:e.triggerRef,state:i,popoverRef:t,isExiting:a,dir:s})});function iw({state:e,isExiting:t,UNSTABLE_portalContainer:n,clearContexts:r,...i}){let a=(0,F.useRef)(null),o=(0,F.useRef)(null),s=(0,F.useContext)(nw),c=s&&i.trigger===`SubmenuTrigger`,{popoverProps:l,underlayProps:u,arrowProps:d,placement:f,triggerAnchorPoint:p}=mb({...i,offset:i.offset??8,arrowRef:a,groupRef:c?s:o},e),m=i.popoverRef,h=Bp(m,!!f)||i.isEntering||!1,g=Dh({...i,defaultClassName:`react-aria-Popover`,values:{trigger:i.trigger||null,placement:f,isEntering:h,isExiting:t}}),_=!i.isNonModal||i.trigger===`SubmenuTrigger`,[v,y]=(0,F.useState)(!1);z(()=>{m.current&&y(_&&!m.current.querySelector(`[role=dialog]`))},[m,_]),(0,F.useEffect)(()=>{v&&i.trigger!==`SubmenuTrigger`&&m.current&&!m.current.contains(document.activeElement)&&nh(m.current)},[v,m,i.trigger]);let b=(0,F.useMemo)(()=>{let e=g.children;if(r)for(let t of r)e=F.createElement(t.Provider,{value:null},e);return e},[g.children,r]),x={...l.style,"--trigger-anchor-point":p?`${p.x}px ${p.y}px`:void 0,...g.style},S=F.createElement(`div`,{...W(G(i,{global:!0}),l),...g,role:v?`dialog`:void 0,tabIndex:v?-1:void 0,"aria-label":i[`aria-label`],"aria-labelledby":i[`aria-labelledby`],ref:m,slot:i.slot||void 0,style:x,dir:i.dir,"data-trigger":i.trigger,"data-placement":f,"data-entering":h||void 0,"data-exiting":t||void 0},!i.isNonModal&&F.createElement(cb,{onDismiss:e.close}),F.createElement(Ah.Provider,{value:{...d,placement:f,ref:a}},b),F.createElement(cb,{onDismiss:e.close}));return c?F.createElement(gb,{...i,shouldContainFocus:v,isExiting:t,portalContainer:n??s?.current??void 0},S):F.createElement(gb,{...i,shouldContainFocus:v,isExiting:t,portalContainer:n},!i.isNonModal&&e.isOpen&&F.createElement(`div`,{"data-testid":`underlay`,...u,style:{position:`fixed`,inset:0}}),F.createElement(`div`,{ref:o,style:{display:`contents`}},F.createElement(nw.Provider,{value:o},S)))}var aw=(0,F.createContext)(null);BC(`section`,(e,t,n)=>{let{name:r,render:i}=(0,F.useContext)(aw);return i(e,t,n,`react-aria-Section`)});var ow={CollectionRoot({collection:e,renderDropIndicator:t}){return sw(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return sw(e,t,n)}};function sw(e,t,n){return wC({items:t?e.getChildren(t.key):e,dependencies:[n],children(t){let r=t.render(t);return!n||t.type!==`item`?r:F.createElement(F.Fragment,null,n({type:`item`,key:t.key,dropPosition:`before`}),r,cw(e,t,n))}})}function cw(e,t,n){let r=t.key,i=e.getKeyAfter(r),a=i==null?null:e.getItem(i);for(;a!=null&&a.type!==`item`;)i=e.getKeyAfter(a.key),a=i==null?null:e.getItem(i);let o=t.nextKey==null?null:e.getItem(t.nextKey);for(;o!=null&&o.type!==`item`;)o=o.nextKey==null?null:e.getItem(o.nextKey);let s=[];if(o==null){let r=t;for(;r&&(!a||r.parentKey!==a.parentKey&&a.level<r.level);){let t=n({type:`item`,key:r.key,dropPosition:`after`});(0,F.isValidElement)(t)&&s.push((0,F.cloneElement)(t,{key:`${r.key}-after`})),r=r.parentKey==null?null:e.getItem(r.parentKey)}}return s}var lw=(0,F.createContext)(ow);function uw(e){return(0,F.useMemo)(()=>e==null?null:new Set([e]),[e])}var dw=(0,F.createContext)(null),fw=(0,F.createContext)(null),pw=(0,F.createContext)({});zC(hC,function(e,t){return[e,t]=q(e,t,pw),F.createElement(`header`,{className:`react-aria-Header`,...e,ref:t},e.children)});var mw=(0,F.createContext)({});(0,F.forwardRef)(function(e,t){return[e,t]=q(e,t,mw),F.createElement(`kbd`,{dir:`ltr`,...e,ref:t})});function hw(e){let t=G(e,{labelable:!0}),n;return e.orientation===`vertical`&&(n=`vertical`),e.elementType===`hr`?{separatorProps:t}:{separatorProps:{...t,role:`separator`,"aria-orientation":n}}}var gw=(0,F.createContext)({}),_w=class extends pC{filter(e,t){let n=t.getItem(this.prevKey);if(n&&n.type!==`separator`){let n=this.clone();return t.addDescendants(n,e),n}return null}};_w.type=`separator`,zC(_w,function(e,t){[e,t]=q(e,t,gw);let{elementType:n,orientation:r,style:i,className:a,slot:o,...s}=e,c=n||`hr`;c===`hr`&&r===`vertical`&&(c=`div`);let{separatorProps:l}=hw({...s,elementType:n,orientation:r}),u=G(e,{global:!0});return F.createElement(c,{...W(u,l),style:i,className:a??`react-aria-Separator`,ref:t,slot:o||void 0})});var vw=new WeakMap;function yw(e){return Xf()?e.altKey:e.ctrlKey}function bw(e,t){let n=`[data-key="${CSS.escape(String(t))}"]`,r=e.current?.dataset.collection;return r&&(n=`[data-collection="${CSS.escape(r)}"]${n}`),e.current?.querySelector(n)}var xw=new WeakMap;function Sw(e){let t=B();return xw.set(e,t),t}function Cw(e){return xw.get(e)}var ww=1e3;function Tw(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=(0,F.useRef)({search:``,timeout:void 0}).current;return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?e=>{let a=Ew(e.key);if(!(!a||e.ctrlKey||e.metaKey||!e.currentTarget.contains(e.target)||i.search.length===0&&a===` `)){if(a===` `&&i.search.trim().length>0&&(e.preventDefault(),`continuePropagation`in e||e.stopPropagation()),i.search+=a,t.getKeyForSearch!=null){let e=t.getKeyForSearch(i.search,n.focusedKey);e??=t.getKeyForSearch(i.search),e!=null&&(n.setFocusedKey(e),r&&r(e))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=``},ww)}}:void 0}}}function Ew(e){return e.length===1||!/^[A-Z]/i.test(e)?e:``}function Dw(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:a=!1,disallowEmptySelection:o=!1,disallowSelectAll:s=!1,escapeKeyBehavior:c=`clearSelection`,selectOnFocus:l=t.selectionBehavior===`replace`,disallowTypeAhead:u=!1,shouldUseVirtualFocus:d,allowsTabNavigation:f=!1,isVirtualized:p,scrollRef:m=r,linkBehavior:h=`action`}=e,{direction:g}=pg(),_=np(),v=e=>{var i;if(e.altKey&&e.key===`Tab`&&e.preventDefault(),!((i=r.current)!=null&&i.contains(e.target)))return;let u=(n,i)=>{if(n!=null){if(t.isLink(n)&&h===`selection`&&l&&!yw(e)){(0,Ku.flushSync)(()=>{t.setFocusedKey(n,i)});let a=bw(r,n),o=t.getItemProps(n);a&&_.open(a,e,o.href,o.routerOptions);return}if(t.setFocusedKey(n,i),t.isLink(n)&&h===`override`)return;e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(n):l&&!yw(e)&&t.replaceSelection(n)}};switch(e.key){case`ArrowDown`:if(n.getKeyBelow){let r=t.focusedKey==null?n.getFirstKey?.call(n):n.getKeyBelow?.call(n,t.focusedKey);r==null&&a&&(r=n.getFirstKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),u(r))}break;case`ArrowUp`:if(n.getKeyAbove){let r=t.focusedKey==null?n.getLastKey?.call(n):n.getKeyAbove?.call(n,t.focusedKey);r==null&&a&&(r=n.getLastKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),u(r))}break;case`ArrowLeft`:if(n.getKeyLeftOf){let r=t.focusedKey==null?null:n.getKeyLeftOf?.call(n,t.focusedKey);r==null&&a&&(r=g===`rtl`?n.getFirstKey?.call(n,t.focusedKey):n.getLastKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),u(r,g===`rtl`?`first`:`last`))}break;case`ArrowRight`:if(n.getKeyRightOf){let r=t.focusedKey==null?null:n.getKeyRightOf?.call(n,t.focusedKey);r==null&&a&&(r=g===`rtl`?n.getLastKey?.call(n,t.focusedKey):n.getFirstKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),u(r,g===`rtl`?`last`:`first`))}break;case`Home`:if(n.getFirstKey){if(t.focusedKey===null&&e.shiftKey)return;e.preventDefault();let r=n.getFirstKey(t.focusedKey,Tp(e));t.setFocusedKey(r),r!=null&&(Tp(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(r):l&&t.replaceSelection(r))}break;case`End`:if(n.getLastKey){if(t.focusedKey===null&&e.shiftKey)return;e.preventDefault();let r=n.getLastKey(t.focusedKey,Tp(e));t.setFocusedKey(r),r!=null&&(Tp(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(r):l&&t.replaceSelection(r))}break;case`PageDown`:if(n.getKeyPageBelow&&t.focusedKey!=null){let r=n.getKeyPageBelow(t.focusedKey);r!=null&&(e.preventDefault(),u(r))}break;case`PageUp`:if(n.getKeyPageAbove&&t.focusedKey!=null){let r=n.getKeyPageAbove(t.focusedKey);r!=null&&(e.preventDefault(),u(r))}break;case`a`:Tp(e)&&t.selectionMode===`multiple`&&s!==!0&&(e.preventDefault(),t.selectAll());break;case`Escape`:c===`clearSelection`&&!o&&t.selectedKeys.size!==0&&(e.stopPropagation(),e.preventDefault(),t.clearSelection());break;case`Tab`:if(!f){if(e.shiftKey)r.current.focus();else{let e=Gv(r.current,{tabbable:!0}),t,n;do n=e.lastChild(),n&&(t=n);while(n);t&&!t.contains(document.activeElement)&&Rf(t)}break}}},y=(0,F.useRef)({top:0,left:0});jp(m,`scroll`,p?void 0:()=>{y.current={top:m.current?.scrollTop??0,left:m.current?.scrollLeft??0}});let b=e=>{if(t.isFocused){e.currentTarget.contains(e.target)||t.setFocused(!1);return}if(e.currentTarget.contains(e.target)){if(t.setFocused(!0),t.focusedKey==null){let r=e=>{e!=null&&(t.setFocusedKey(e),l&&!t.isSelected(e)&&t.replaceSelection(e))},i=e.relatedTarget;i&&e.currentTarget.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING?r(t.lastSelectedKey??n.getLastKey?.call(n)):r(t.firstSelectedKey??n.getFirstKey?.call(n))}else !p&&m.current&&(m.current.scrollTop=y.current.top,m.current.scrollLeft=y.current.left);if(t.focusedKey!=null&&m.current){let e=bw(r,t.focusedKey);e instanceof HTMLElement&&(!e.contains(document.activeElement)&&!d&&Rf(e),Zm()===`keyboard`&&Pp(e,{containingElement:r.current}))}}},x=e=>{e.currentTarget.contains(e.relatedTarget)||t.setFocused(!1)},S=(0,F.useRef)(!1);jp(r,zp,d?e=>{let{detail:n}=e;e.stopPropagation(),t.setFocused(!0),n?.focusStrategy===`first`&&(S.current=!0)}:void 0);let C=K(()=>{let e=n.getFirstKey?.call(n)??null;if(e==null){let e=H();Qv(r.current),ey(e,null),t.collection.size>0&&(S.current=!1)}else t.setFocusedKey(e),S.current=!1});vp(()=>{S.current&&C()},[t.collection,C]);let w=K(()=>{t.collection.size>0&&(S.current=!1)});vp(()=>{w()},[t.focusedKey,w]),jp(r,Rp,d?e=>{var n;e.stopPropagation(),t.setFocused(!1),(n=e.detail)!=null&&n.clearFocusKey&&t.setFocusedKey(null)}:void 0);let T=(0,F.useRef)(i),E=(0,F.useRef)(!1);(0,F.useEffect)(()=>{if(T.current){let e=null;i===`first`&&(e=n.getFirstKey?.call(n)??null),i===`last`&&(e=n.getLastKey?.call(n)??null);let a=t.selectedKeys;if(a.size){for(let n of a)if(t.canSelectItem(n)){e=n;break}}t.setFocused(!0),t.setFocusedKey(e),e==null&&!d&&r.current&&nh(r.current),t.collection.size>0&&(T.current=!1,E.current=!0)}});let D=(0,F.useRef)(t.focusedKey),O=(0,F.useRef)(null);(0,F.useEffect)(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==D.current||E.current)&&m.current&&r.current){let e=Zm(),n=bw(r,t.focusedKey);if(!(n instanceof HTMLElement))return;(e===`keyboard`||E.current)&&(O.current&&cancelAnimationFrame(O.current),O.current=requestAnimationFrame(()=>{m.current&&(Mp(m.current,n),e!==`virtual`&&Pp(n,{containingElement:r.current}))}))}!d&&t.isFocused&&t.focusedKey==null&&D.current!=null&&r.current&&nh(r.current),D.current=t.focusedKey,E.current=!1}),(0,F.useEffect)(()=>()=>{O.current&&cancelAnimationFrame(O.current)},[]),jp(r,`react-aria-focus-scope-restore`,e=>{e.preventDefault(),t.setFocused(!0)});let k={onKeyDown:v,onFocus:b,onBlur:x,onMouseDown(e){m.current===e.target&&e.preventDefault()}},{typeSelectProps:A}=Tw({keyboardDelegate:n,selectionManager:t});u||(k=W(A,k));let j;d||(j=t.focusedKey==null?0:-1);let M=Sw(t.collection);return{collectionProps:W(k,{tabIndex:j,"data-collection":M})}}function Ow(e){let{id:t,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:a,shouldUseVirtualFocus:o,focus:s,isDisabled:c,onAction:l,allowsDifferentPressOrigin:u,linkBehavior:d=`action`}=e,f=np();t=B(t);let p=e=>{if(e.pointerType===`keyboard`&&yw(e))n.toggleSelection(r);else{if(n.selectionMode===`none`)return;if(n.isLink(r)){if(d===`selection`&&i.current){let t=n.getItemProps(r);f.open(i.current,e,t.href,t.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(d===`override`||d===`none`)return}n.selectionMode===`single`?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):e&&e.shiftKey?n.extendSelection(r):n.selectionBehavior===`toggle`||e&&(Tp(e)||e.pointerType===`touch`||e.pointerType===`virtual`)?n.toggleSelection(r):n.replaceSelection(r)}};(0,F.useEffect)(()=>{r===n.focusedKey&&n.isFocused&&(o?Qv(i.current):s?s():document.activeElement!==i.current&&i.current&&nh(i.current))},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,o]),c||=n.isDisabled(r);let m={};!o&&!c?m={tabIndex:r===n.focusedKey?0:-1,onFocus(e){e.target===i.current&&n.setFocusedKey(r)}}:c&&(m.onMouseDown=e=>{e.preventDefault()});let h=n.isLink(r)&&d===`override`,g=l&&e.UNSTABLE_itemBehavior===`action`,_=n.isLink(r)&&d!==`selection`&&d!==`none`,v=!c&&n.canSelectItem(r)&&!h&&!g,y=(l||_)&&!c,b=y&&(n.selectionBehavior===`replace`?!v:!v||n.isEmpty),x=y&&v&&n.selectionBehavior===`replace`,S=b||x,C=(0,F.useRef)(null),w=S&&v,T=(0,F.useRef)(!1),E=(0,F.useRef)(!1),D=n.getItemProps(r),O=e=>{if(l){var t;l(),(t=i.current)==null||t.dispatchEvent(new CustomEvent(`react-aria-item-action`,{bubbles:!0}))}_&&i.current&&f.open(i.current,e,D.href,D.routerOptions)},k={ref:i};if(a?(k.onPressStart=e=>{C.current=e.pointerType,T.current=w,e.pointerType===`keyboard`&&(!S||Aw())&&p(e)},u?(k.onPressUp=b?void 0:e=>{e.pointerType===`mouse`&&v&&p(e)},k.onPress=b?O:e=>{e.pointerType!==`keyboard`&&e.pointerType!==`mouse`&&v&&p(e)}):k.onPress=e=>{if(b||x&&e.pointerType!==`mouse`){if(e.pointerType===`keyboard`&&!kw())return;O(e)}else e.pointerType!==`keyboard`&&v&&p(e)}):(k.onPressStart=e=>{C.current=e.pointerType,T.current=w,E.current=b,v&&(e.pointerType===`mouse`&&!b||e.pointerType===`keyboard`&&(!y||Aw()))&&p(e)},k.onPress=e=>{(e.pointerType===`touch`||e.pointerType===`pen`||e.pointerType===`virtual`||e.pointerType===`keyboard`&&S&&kw()||e.pointerType===`mouse`&&E.current)&&(S?O(e):v&&p(e))}),m[`data-collection`]=Cw(n.collection),m[`data-key`]=r,k.preventFocusOnPress=o,o&&(k=W(k,{onPressStart(e){e.pointerType!==`touch`&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(e){e.pointerType===`touch`&&(n.setFocused(!0),n.setFocusedKey(r))}})),D)for(let e of[`onPressStart`,`onPressEnd`,`onPressChange`,`onPress`,`onPressUp`,`onClick`])D[e]&&(k[e]=vf(k[e],D[e]));let{pressProps:A,isPressed:j}=Em(k),M=x?e=>{C.current===`mouse`&&(e.stopPropagation(),e.preventDefault(),O(e))}:void 0,{longPressProps:N}=wh({isDisabled:!w,onLongPress(e){e.pointerType===`touch`&&(p(e),n.setSelectionBehavior(`toggle`))}}),P=e=>{C.current===`touch`&&T.current&&e.preventDefault()},ee=d!==`none`&&n.isLink(r)?e=>{ip.isOpening||e.preventDefault()}:void 0;return{itemProps:W(m,v||b||o&&!c?A:{},w?N:{},{onDoubleClick:M,onDragStartCapture:P,onClick:ee,id:t},o?{onMouseDown:e=>e.preventDefault()}:void 0),isPressed:j,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:c,allowsSelection:v,hasAction:S}}function kw(){return window.event?.key===`Enter`}function Aw(){let e=window.event;return e?.key===` `||e?.code===`Space`}var jw=class{getItemRect(e){let t=this.ref.current;if(!t)return null;let n=e==null?null:bw(this.ref,e);if(!n)return null;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-r.left-t.clientLeft+t.scrollLeft,y:i.top-r.top-t.clientTop+t.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;return{width:e?.scrollWidth??0,height:e?.scrollHeight??0}}getVisibleRect(){let e=this.ref.current;return{x:e?.scrollLeft??0,y:e?.scrollTop??0,width:e?.clientWidth??0,height:e?.clientHeight??0}}constructor(e){this.ref=e}},Mw=class{isDisabled(e){return this.disabledBehavior===`all`&&(e.props?.isDisabled||this.disabledKeys.has(e.key))}findNextNonDisabled(e,t){let n=e;for(;n!=null;){let e=this.collection.getItem(n);if(e?.type===`item`&&!this.isDisabled(e))return n;n=t(n)}return null}getNextKey(e){let t=e;return t=this.collection.getKeyAfter(t),this.findNextNonDisabled(t,e=>this.collection.getKeyAfter(e))}getPreviousKey(e){let t=e;return t=this.collection.getKeyBefore(t),this.findNextNonDisabled(t,e=>this.collection.getKeyBefore(e))}findKey(e,t,n){let r=e,i=this.layoutDelegate.getItemRect(r);if(!i||r==null)return null;let a=i;do{if(r=t(r),r==null)break;i=this.layoutDelegate.getItemRect(r)}while(i&&n(a,i)&&r!=null);return r}isSameRow(e,t){return e.y===t.y||e.x!==t.x}isSameColumn(e,t){return e.x===t.x||e.y!==t.y}getKeyBelow(e){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getNextKey(e),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getPreviousKey(e),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,t){return t?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let t=this.direction===`ltr`?`getKeyRightOf`:`getKeyLeftOf`;return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[t](e))):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`rtl`):this.findKey(e,e=>this.getNextColumn(e,this.direction===`rtl`),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`rtl`):null}getKeyLeftOf(e){let t=this.direction===`ltr`?`getKeyLeftOf`:`getKeyRightOf`;return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[t](e))):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`ltr`):this.findKey(e,e=>this.getNextColumn(e,this.direction===`ltr`),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`ltr`):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyAfter(e))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyBefore(e))}getKeyPageAbove(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!Sp(t))return this.getFirstKey();let r=e;if(this.orientation===`horizontal`){let e=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>e&&r!=null;)r=this.getKeyAbove(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}else{let e=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>e&&r!=null;)r=this.getKeyAbove(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}return r??this.getFirstKey()}getKeyPageBelow(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!Sp(t))return this.getLastKey();let r=e;if(this.orientation===`horizontal`){let e=Math.min(this.layoutDelegate.getContentSize().width,n.y-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.x<e&&r!=null;)r=this.getKeyBelow(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}else{let e=Math.min(this.layoutDelegate.getContentSize().height,n.y-n.height+this.layoutDelegate.getVisibleRect().height);for(;n&&n.y<e&&r!=null;)r=this.getKeyBelow(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}return r??this.getLastKey()}getKeyForSearch(e,t){if(!this.collator)return null;let n=this.collection,r=t||this.getFirstKey();for(;r!=null;){let t=n.getItem(r);if(!t)return null;let i=t.textValue.slice(0,e.length);if(t.textValue&&this.collator.compare(i,e)===0)return r;r=this.getNextKey(r)}return null}constructor(...e){if(e.length===1){let t=e[0];this.collection=t.collection,this.ref=t.ref,this.collator=t.collator,this.disabledKeys=t.disabledKeys||new Set,this.disabledBehavior=t.disabledBehavior||`all`,this.orientation=t.orientation||`vertical`,this.direction=t.direction,this.layout=t.layout||`stack`,this.layoutDelegate=t.layoutDelegate||new jw(t.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout=`stack`,this.orientation=`vertical`,this.disabledBehavior=`all`,this.layoutDelegate=new jw(this.ref);this.layout===`stack`&&this.orientation===`vertical`&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}};function Nw(e){let{selectionManager:t,collection:n,disabledKeys:r,ref:i,keyboardDelegate:a,layoutDelegate:o}=e,s=yv({usage:`search`,sensitivity:`base`}),c=t.disabledBehavior,l=(0,F.useMemo)(()=>a||new Mw({collection:n,disabledKeys:r,disabledBehavior:c,ref:i,collator:s,layoutDelegate:o}),[a,o,n,r,i,s,c]),{collectionProps:u}=Dw({...e,ref:i,selectionManager:t,keyboardDelegate:l});return{listProps:u}}function Pw(e,t,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:a,...o}=e;!e[`aria-label`]&&e[`aria-labelledby`];let s=G(e,{labelable:!0}),{listProps:c}=Nw({...o,ref:n,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,shouldFocusWrap:r,linkBehavior:`override`});return vw.set(t,{onClose:e.onClose,onAction:e.onAction,shouldUseVirtualFocus:e.shouldUseVirtualFocus}),{menuProps:W(s,{onKeyDown:i,onKeyUp:a},{role:`menu`,...c,onKeyDown:t=>{var n;(t.key!==`Escape`||e.shouldUseVirtualFocus)&&((n=c.onKeyDown)==null||n.call(c,t))}})}}function Fw(e){return null}Fw.getCollectionNode=function*(e,t){let{childItems:n,title:r,children:i}=e,a=e.title||e.children,o=e.textValue||(typeof a==`string`?a:``)||e[`aria-label`]||``;!o&&t?.suppressTextValueWarning,yield{type:`item`,props:e,rendered:a,textValue:o,"aria-label":e[`aria-label`],hasChildNodes:Iw(e),*childNodes(){if(n)for(let e of n)yield{type:`item`,value:e};else if(r){let e=[];F.Children.forEach(i,t=>{e.push({type:`item`,element:t})}),yield*e}}}};function Iw(e){return e.hasChildItems==null?!!(e.childItems||e.title&&F.Children.count(e.children)>0):e.hasChildItems}var Lw=Fw;function Rw(e){return null}Rw.getCollectionNode=function*(e){let{children:t,title:n,items:r}=e;yield{type:`section`,props:e,hasChildNodes:!0,rendered:n,"aria-label":e[`aria-label`],*childNodes(){if(typeof t==`function`){if(!r)throw Error(`props.children was a function but props.items is missing`);for(let e of r)yield{type:`item`,value:e,renderer:t}}else{let e=[];F.Children.forEach(t,t=>{e.push({type:`item`,element:t})}),yield*e}}}};var zw=class{build(e,t){return this.context=t,Bw(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:n}=e;if(F.isValidElement(t)&&t.type===F.Fragment)yield*this.iterateCollection({children:t.props.children,items:n});else if(typeof t==`function`){if(!n)throw Error(`props.children was a function but props.items is missing`);let e=0;for(let r of n)yield*this.getFullNode({value:r,index:e},{renderer:t}),e++}else{let e=[];F.Children.forEach(t,t=>{t&&e.push(t)});let n=0;for(let t of e){let e=this.getFullNode({element:t,index:n},{});for(let t of e)n++,yield t}}}getKey(e,t,n,r){if(e.key!=null)return e.key;if(t.type===`cell`&&t.key!=null)return`${r}${t.key}`;let i=t.value;if(i!=null){let e=i.key??i.id;if(e==null)throw Error(`No key found for item`);return e}return r?`${r}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,n,r){if(F.isValidElement(e.element)&&e.element.type===F.Fragment){let i=[];F.Children.forEach(e.element.props.children,e=>{i.push(e)});let a=e.index??0;for(let e of i)yield*this.getFullNode({element:e,index:a++},t,n,r);return}let i=e.element;if(!i&&e.value&&t&&t.renderer){let n=this.cache.get(e.value);if(n&&(!n.shouldInvalidate||!n.shouldInvalidate(this.context))){n.index=e.index,n.parentKey=r?r.key:null,yield n;return}i=t.renderer(e.value)}if(F.isValidElement(i)){let a=i.type;if(typeof a!=`function`&&typeof a.getCollectionNode!=`function`){let e=i.type;throw Error(`Unknown element <${e}> in collection.`)}let o=a.getCollectionNode(i.props,this.context),s=e.index??0,c=o.next();for(;!c.done&&c.value;){let a=c.value;e.index=s;let l=a.key??null;l??=a.element?null:this.getKey(i,e,t,n);let u=[...this.getFullNode({...a,key:l,index:s,wrapper:Vw(e.wrapper,a.wrapper)},this.getChildState(t,a),n?`${n}${i.key}`:i.key,r)];for(let t of u){if(t.value=a.value??e.value??null,t.value&&this.cache.set(t.value,t),e.type&&t.type!==e.type)throw Error(`Unsupported type <${Hw(t.type)}> in <${Hw(r?.type??`unknown parent type`)}>. Only <${Hw(e.type)}> is supported.`);s++,yield t}c=o.next(u)}return}if(e.key==null||e.type==null)return;let a=this,o={type:e.type,props:e.props,key:e.key,parentKey:r?r.key:null,value:e.value??null,level:r?r.level+1:0,index:e.index,rendered:e.rendered,textValue:e.textValue??``,"aria-label":e[`aria-label`],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Bw(function*(){if(!e.hasChildNodes||!e.childNodes)return;let n=0;for(let r of e.childNodes()){r.key!=null&&(r.key=`${o.key}${r.key}`);let e=a.getFullNode({...r,index:n},a.getChildState(t,r),o.key,o);for(let t of e)n++,yield t}})};yield o}constructor(){this.cache=new WeakMap}};function Bw(e){let t=[],n=null;return{*[Symbol.iterator](){for(let e of t)yield e;n||=e();for(let e of n)t.push(e),yield e}}}function Vw(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function Hw(e){return e[0].toUpperCase()+e.slice(1)}function Uw(e,t,n){let r=(0,F.useMemo)(()=>new zw,[]),{children:i,items:a,collection:o}=e;return(0,F.useMemo)(()=>o||t(r.build({children:i,items:a},n)),[r,i,a,o,n,t])}function Ww(e,t){return typeof t.getChildren==`function`?t.getChildren(e.key):e.childNodes}function Gw(e){return Kw(e,0)}function Kw(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function qw(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...Jw(e,t),t],i=[...Jw(e,n),n],a=r.slice(0,i.length).findIndex((e,t)=>e!==i[t]);return a===-1?r.findIndex(e=>e===n)>=0?1:(i.findIndex(e=>e===t),-1):(t=r[a],n=i[a],t.index-n.index)}function Jw(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}var Yw=new WeakMap;function Xw(e){let t=Yw.get(e);if(t!=null)return t;let n=0,r=t=>{for(let i of t)i.type===`section`?r(Ww(i,e)):i.type===`item`&&n++};return r(e),Yw.set(e,n),n}function Zw(e,t,n){let{id:r,key:i,closeOnSelect:a,isVirtualized:o,"aria-haspopup":s,onPressStart:c,onPressUp:l,onPress:u,onPressChange:d,onPressEnd:f,onClick:p,onHoverStart:m,onHoverChange:h,onHoverEnd:g,onKeyDown:_,onKeyUp:v,onFocus:y,onFocusChange:b,onBlur:x,selectionManager:S=t.selectionManager}=e,C=!!s,w=C&&e[`aria-expanded`]===`true`,T=e.isDisabled??S.isDisabled(i),E=e.isSelected??S.isSelected(i),D=vw.get(t),O=t.collection.getItem(i),k=e.onClose||D.onClose,A=np(),j=()=>{var t;if(!C&&(!(O==null||(t=O.props)==null)&&t.onAction?O.props.onAction():e.onAction&&e.onAction(i),D.onAction)){let e=D.onAction;e(i)}},M=`menuitem`;C||(S.selectionMode===`single`?M=`menuitemradio`:S.selectionMode===`multiple`&&(M=`menuitemcheckbox`));let N=_f(),P=_f(),ee=_f(),te={id:r,"aria-disabled":T||void 0,role:M,"aria-label":e[`aria-label`],"aria-labelledby":N,"aria-describedby":[P,ee].filter(Boolean).join(` `)||void 0,"aria-controls":e[`aria-controls`],"aria-haspopup":s,"aria-expanded":e[`aria-expanded`]};S.selectionMode!==`none`&&!C&&(te[`aria-checked`]=E),o&&(te[`aria-posinset`]=O?.index,te[`aria-setsize`]=Xw(t.collection));let ne=(0,F.useRef)(!1),re=e=>{d?.(e),ne.current=e},ie=(0,F.useRef)(null),ae=e=>{e.pointerType!==`keyboard`&&(ie.current={pointerType:e.pointerType}),e.pointerType===`mouse`&&(ne.current||e.target.click()),l?.(e)},oe=e=>{p?.(e),j(),cp(e,A,O.props.href,O?.props.routerOptions);let t=ie.current?.pointerType===`keyboard`?ie.current?.key===`Enter`||S.selectionMode===`none`||S.isLink(i):S.selectionMode!==`multiple`||S.isLink(i);t=a??t,k&&!C&&t&&k(),ie.current=null},{itemProps:se,isFocused:ce}=Ow({id:r,selectionManager:S,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:`none`,shouldUseVirtualFocus:D.shouldUseVirtualFocus}),{pressProps:le,isPressed:ue}=Em({onPressStart:c,onPress:u,onPressUp:ae,onPressChange:re,onPressEnd:f,isDisabled:T}),{hoverProps:de}=bh({isDisabled:T,onHoverStart(e){!Xm()&&!(w&&s)&&(S.setFocused(!0),S.setFocusedKey(i)),m?.(e)},onHoverChange:h,onHoverEnd:g}),{keyboardProps:fe}=ah({onKeyDown:e=>{if(e.repeat){e.continuePropagation();return}switch(e.key){case` `:ie.current={pointerType:`keyboard`,key:` `},e.target.click();break;case`Enter`:ie.current={pointerType:`keyboard`,key:`Enter`},e.target.tagName!==`A`&&e.target.click();break;default:C||e.continuePropagation(),_?.(e);break}},onKeyUp:v}),{focusProps:pe}=rh({onBlur:x,onFocus:y,onFocusChange:b}),me=G(O?.props);delete me.id;let he=sp(O?.props);return{menuItemProps:{...te,...W(me,he,C?{onFocus:se.onFocus,"data-collection":se[`data-collection`],"data-key":se[`data-key`]}:se,le,de,fe,pe,D.shouldUseVirtualFocus||C?{onMouseDown:e=>e.preventDefault()}:void 0,T?void 0:{onClick:oe}),tabIndex:se.tabIndex!=null&&w&&!D.shouldUseVirtualFocus?-1:se.tabIndex},labelProps:{id:N},descriptionProps:{id:P},keyboardShortcutProps:{id:ee},isFocused:ce,isFocusVisible:ce&&S.isFocused&&Xm()&&!w,isSelected:E,isPressed:ue,isDisabled:T}}function Qw(e){let{heading:t,"aria-label":n}=e,r=B();return{itemProps:{role:`presentation`},headingProps:t?{id:r,role:`presentation`}:{},groupProps:{role:`group`,"aria-label":n,"aria-labelledby":t?r:void 0}}}var $w=2,eT=50,tT=1e3,nT=Math.PI/12;function rT(e){let{menuRef:t,submenuRef:n,isOpen:r,isDisabled:i}=e,a=(0,F.useRef)(void 0),o=(0,F.useRef)(void 0),s=(0,F.useRef)(0),c=(0,F.useRef)(void 0),l=(0,F.useRef)(void 0),u=(0,F.useRef)(void 0),d=(0,F.useRef)(2),[f,p]=(0,F.useState)(!1);bp({ref:n,onResize:()=>{n.current&&(o.current=n.current.getBoundingClientRect(),u.current=void 0)}});let m=()=>{p(!1),d.current=$w,a.current=void 0},h=Qm(),g=K(e=>{f&&e.preventDefault()});(0,F.useEffect)(()=>{f&&t.current?t.current.style.pointerEvents=`none`:t.current.style.pointerEvents=``},[t,f]),(0,F.useEffect)(()=>{let e=n.current,f=t.current;if(i||!e||!r||h!==`pointer`||!f){m();return}o.current=e.getBoundingClientRect();let _=e=>{if(e.pointerType===`touch`||e.pointerType===`pen`)return;let t=Date.now();if(t-s.current<eT)return;clearTimeout(c.current),clearTimeout(l.current);let{clientX:n,clientY:r}=e;if(!a.current){a.current={x:n,y:r};return}if(!o.current)return;if(u.current||=n>o.current.right?`left`:`right`,n<f.getBoundingClientRect().left||n>f.getBoundingClientRect().right||r<f.getBoundingClientRect().top||r>f.getBoundingClientRect().bottom){m();return}let i=a.current.x,h=a.current.y,g=u.current===`right`?o.current.left-i:i-o.current.right,_=Math.atan2(h-o.current.top,g)+nT,v=Math.atan2(h-o.current.bottom,g)-nT,y=Math.atan2(h-r,u.current===`left`?-(n-i):n-i),b=y<_&&y>v;d.current=b?Math.min(d.current+1,$w):Math.max(d.current-1,0),d.current>=$w?p(!0):p(!1),s.current=t,a.current={x:n,y:r},b&&(c.current=setTimeout(()=>{m(),l.current=setTimeout(()=>{let e=document.elementFromPoint(n,r);e&&f.contains(e)&&e.dispatchEvent(new PointerEvent(`pointerover`,{bubbles:!0,cancelable:!0}))},100)},tT))};return window.addEventListener(`pointermove`,_),window.addEventListener(`pointerdown`,g,!0),()=>{window.removeEventListener(`pointermove`,_),window.removeEventListener(`pointerdown`,g,!0),clearTimeout(c.current),clearTimeout(l.current),d.current=$w}},[i,r,t,h,p,g,n])}function iT(e,t,n){let{parentMenuRef:r,submenuRef:i,type:a=`menu`,isDisabled:o,delay:s=200,shouldUseVirtualFocus:c}=e,l=B(),u=B(),{direction:d}=pg(),f=(0,F.useRef)(void 0),p=(0,F.useCallback)(()=>{f.current&&=(clearTimeout(f.current),void 0)},[f]),m=K(e=>{p(),t.open(e)}),h=K(()=>{p(),t.close()});z(()=>()=>{p()},[p]);let g=e=>{if(e.currentTarget.contains(document.activeElement))switch(e.key){case`ArrowLeft`:d===`ltr`&&e.currentTarget.contains(e.target)&&(e.preventDefault(),e.stopPropagation(),h(),!c&&n.current&&Rf(n.current));break;case`ArrowRight`:d===`rtl`&&e.currentTarget.contains(e.target)&&(e.preventDefault(),e.stopPropagation(),h(),!c&&n.current&&Rf(n.current));break;case`Escape`:var t;(t=i.current)!=null&&t.contains(e.target)&&(e.stopPropagation(),h(),!c&&n.current&&Rf(n.current));break}},_={id:u,"aria-labelledby":l,submenuLevel:t.submenuLevel,...a===`menu`&&{onClose:t.closeAll,autoFocus:t.focusStrategy??void 0,onKeyDown:g}},v=e=>{switch(e.key){case`ArrowRight`:o||(d===`ltr`?(e.preventDefault(),t.isOpen||m(`first`),a===`menu`&&i?.current&&document.activeElement===n?.current&&Rf(i.current)):t.isOpen?h():e.continuePropagation());break;case`ArrowLeft`:o||(d===`rtl`?(e.preventDefault(),t.isOpen||m(`first`),a===`menu`&&i?.current&&document.activeElement===n?.current&&Rf(i.current)):t.isOpen?h():e.continuePropagation());break;default:e.continuePropagation();break}},y=e=>{!o&&(e.pointerType===`virtual`||e.pointerType===`keyboard`)&&m(`first`)},b=e=>{!o&&(e.pointerType===`touch`||e.pointerType===`mouse`)&&m()},x=e=>{o||(e&&!t.isOpen?f.current||=setTimeout(()=>{m()},s):e||p())};jp(r,`focusin`,e=>{var i;t.isOpen&&(i=r.current)!=null&&i.contains(e.target)&&e.target!==n.current&&h()});let S=e=>e!==n.current;return rT({menuRef:r,submenuRef:i,isOpen:t.isOpen,isDisabled:o}),{submenuTriggerProps:{id:l,"aria-controls":t.isOpen?u:void 0,"aria-haspopup":o?void 0:a,"aria-expanded":t.isOpen?`true`:`false`,onPressStart:y,onPress:b,onHoverChange:x,onKeyDown:v,isOpen:t.isOpen},submenuProps:_,popoverProps:{isNonModal:!0,shouldCloseOnInteractOutside:S}}}function aT(e){let t=yb(e),[n,r]=(0,F.useState)(null),[i,a]=(0,F.useState)([]),o=()=>{a([]),t.close()};return{focusStrategy:n,...t,open(e=null){r(e),t.open()},toggle(e=null){r(e),t.toggle()},close(){o()},expandedKeysStack:i,openSubmenu:(e,t)=>{a(n=>t>n.length?n:[...n.slice(0,t),e])},closeSubmenu:(e,t)=>{a(n=>n[t]===e?n.slice(0,t):n)}}}function oT(e,t){let{triggerKey:n}=e,{expandedKeysStack:r,openSubmenu:i,closeSubmenu:a,close:o}=t,[s]=(0,F.useState)(r?.length),c=(0,F.useMemo)(()=>r[s]===n,[r,n,s]),[l,u]=(0,F.useState)(null),d=(0,F.useCallback)(e=>{u(e??null),i(n,s)},[i,s,n]),f=(0,F.useCallback)(()=>{u(null),a(n,s)},[a,s,n]),p=(0,F.useCallback)(e=>{u(e??null),c?f():d(e)},[f,d,c]);return(0,F.useMemo)(()=>({focusStrategy:l,isOpen:c,open:d,close:f,closeAll:o,submenuLevel:s,setOpen:()=>{},toggle:p}),[c,d,f,o,l,p,s])}var sT=class{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);var n;return t&&(n=t.prevKey)!=null?n:null}getKeyAfter(e){let t=this.keyMap.get(e);var n;return t&&(n=t.nextKey)!=null?n:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}constructor(e,{expandedKeys:t}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,t||=new Set;let n=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&(e.type===`section`||t.has(e.key)))for(let t of e.childNodes)n(t)};for(let t of e)n(t);let r=null,i=0;for(let[e,t]of this.keyMap)r?(r.nextKey=e,t.prevKey=r.key):(this.firstKey=e,t.prevKey=void 0),t.type===`item`&&(t.index=i++),r=t,r.nextKey=void 0;this.lastKey=r?.key??null}},cT=class e extends Set{constructor(t,n,r){super(t),t instanceof e?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}};function lT(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function uT(e){let{selectionMode:t=`none`,disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i=`toggle`,disabledBehavior:a=`all`}=e,o=(0,F.useRef)(!1),[,s]=(0,F.useState)(!1),c=(0,F.useRef)(null),l=(0,F.useRef)(null),[,u]=(0,F.useState)(null),[d,f]=em((0,F.useMemo)(()=>dT(e.selectedKeys),[e.selectedKeys]),(0,F.useMemo)(()=>dT(e.defaultSelectedKeys,new cT),[e.defaultSelectedKeys]),e.onSelectionChange),p=(0,F.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[m,h]=(0,F.useState)(i);i===`replace`&&m===`toggle`&&typeof d==`object`&&d.size===0&&h(`replace`);let g=(0,F.useRef)(i);return(0,F.useEffect)(()=>{i!==g.current&&(h(i),g.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:m,setSelectionBehavior:h,get isFocused(){return o.current},setFocused(e){o.current=e,s(e)},get focusedKey(){return c.current},get childFocusStrategy(){return l.current},setFocusedKey(e,t=`first`){c.current=e,l.current=t,u(e)},selectedKeys:d,setSelectedKeys(e){(r||!lT(e,d))&&f(e)},disabledKeys:p,disabledBehavior:a}}function dT(e,t){return e?e===`all`?`all`:new cT(e):t}var fT=class e{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}get selectedKeys(){return this.state.selectedKeys===`all`?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode===`none`)return!1;let t=this.getKey(e);return t==null?!1:this.state.selectedKeys===`all`?this.canSelectItem(t):this.state.selectedKeys.has(t)}get isEmpty(){return this.state.selectedKeys!==`all`&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys===`all`)return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),t=this.state.selectedKeys;return this._isSelectAll=e.every(e=>t.has(e)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&qw(this.collection,n,e)<0)&&(e=n)}return e?.key??null}get lastSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&qw(this.collection,n,e)>0)&&(e=n)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n;if(this.state.selectedKeys===`all`)n=new cT([t],t,t);else{let e=this.state.selectedKeys,r=e.anchorKey??t;n=new cT(e,r,t);for(let i of this.getKeyRange(r,e.currentKey??t))n.delete(i);for(let e of this.getKeyRange(t,r))this.canSelectItem(e)&&n.add(e)}this.state.setSelectedKeys(n)}getKeyRange(e,t){let n=this.collection.getItem(e),r=this.collection.getItem(t);return n&&r?qw(this.collection,n,r)<=0?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){var n;if((n=this.layoutDelegate)!=null&&n.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let r=[],i=e;for(;i!=null;){let e=this.collection.getItem(i);if(e&&(e.type===`item`||e.type===`cell`&&this.allowsCellSelection)&&r.push(i),i===t)return r;i=this.collection.getKeyAfter(i)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||t.type===`cell`&&this.allowsCellSelection)return e;for(;t&&t.type!==`item`&&t.parentKey!=null;)t=this.collection.getItem(t.parentKey);return!t||t.type!==`item`?null:t.key}toggleSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`&&!this.isSelected(e)){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n=new cT(this.state.selectedKeys===`all`?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode===`none`)return;let t=this.getKey(e);if(t==null)return;let n=this.canSelectItem(t)?new cT([t],t,t):new cT;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode===`none`)return;let t=new cT;for(let n of e){let e=this.getKey(n);if(e!=null&&(t.add(e),this.selectionMode===`single`))break}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=[],t=n=>{for(;n!=null;){if(this.canSelectItem(n)){let r=this.collection.getItem(n);r?.type===`item`&&e.push(n),r?.hasChildNodes&&(this.allowsCellSelection||r.type!==`item`)&&t(Gw(Ww(r,this.collection))?.key??null)}n=this.collection.getKeyAfter(n)}};return t(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode===`multiple`&&this.state.setSelectedKeys(`all`)}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys===`all`||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new cT)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode!==`none`&&(this.selectionMode===`single`?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior===`toggle`||t&&(t.pointerType===`touch`||t.pointerType===`virtual`)?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;for(let n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){var t;if(this.state.selectionMode===`none`||this.state.disabledKeys.has(e))return!1;let n=this.collection.getItem(e);return!(!n||!(n==null||(t=n.props)==null)&&t.isDisabled||n.type===`cell`&&!this.allowsCellSelection)}isDisabled(e){var t,n;return this.state.disabledBehavior===`all`&&(this.state.disabledKeys.has(e)||!!(!((n=this.collection.getItem(e))==null||(t=n.props)==null)&&t.isDisabled))}isLink(e){var t,n;return!!(!((n=this.collection.getItem(e))==null||(t=n.props)==null)&&t.href)}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(t){return new e(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(e,t,n){this.collection=e,this.state=t,this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null}};function pT(e){let{onExpandedChange:t}=e,[n,r]=em(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=uT(e),a=(0,F.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),o=Uw(e,(0,F.useCallback)(e=>new sT(e,{expandedKeys:n}),[n]),null);return(0,F.useEffect)(()=>{i.focusedKey!=null&&!o.getItem(i.focusedKey)&&i.setFocusedKey(null)},[o,i.focusedKey]),{collection:o,expandedKeys:n,disabledKeys:a,toggleKey:e=>{r(mT(n,e))},setExpandedKeys:r,selectionManager:new fT(o,i)}}function mT(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}var hT=(0,F.createContext)(null),gT=(0,F.createContext)(null),_T=(0,F.createContext)(null),vT=(0,F.createContext)(null),yT=(0,F.createContext)(null),bT=class extends pC{filter(e,t,n){let r=e.getItem(this.firstChildKey);if(r&&n(r.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};bT.type=`submenutrigger`,BC(bT,(e,t,n)=>{let{CollectionBranch:r}=(0,F.useContext)(lw),i=(0,F.useContext)(gT),a=(0,F.useContext)(_T),o=oT({triggerKey:n.key},a),s=(0,F.useRef)(null),c=gp(t),{parentMenuRef:l,shouldUseVirtualFocus:u}=(0,F.useContext)(yT),{submenuTriggerProps:d,submenuProps:f,popoverProps:p}=iT({parentMenuRef:l,submenuRef:s,delay:e.delay,shouldUseVirtualFocus:u},o,c);return F.createElement(Eh,{values:[[wT,{...d,onAction:void 0,ref:c}],[hT,{ref:s,...f}],[DT,o],[tw,{trigger:`SubmenuTrigger`,triggerRef:c,placement:`end top`,"aria-labelledby":f[`aria-labelledby`],...p}]]},F.createElement(r,{collection:i.collection,parent:n}),e.children[1])},e=>e.children[0]),(0,F.forwardRef)(function(e,t){return[e,t]=q(e,t,hT),F.createElement(jC,{content:F.createElement(UC,e)},n=>F.createElement(xT,{props:e,collection:n,menuRef:t}))});function xT({props:e,collection:t,menuRef:n}){[e,n]=q(e,n,dw);let{filter:r,...i}=e,a=(0,F.useMemo)(()=>r?t.filter(r):t,[t,r]),o=pT({...e,collection:a,children:void 0}),s=(0,F.useContext)(_T),{isVirtualized:c,CollectionRoot:l}=(0,F.useContext)(lw),{menuProps:u}=Pw({...e,isVirtualized:c,onClose:e.onClose||s?.close},o,n),d=Dh({defaultClassName:`react-aria-Menu`,className:e.className,style:e.style,values:{isEmpty:o.collection.size===0}}),f=null;o.collection.size===0&&e.renderEmptyState&&(f=F.createElement(`div`,{role:`menuitem`,style:{display:`contents`}},e.renderEmptyState()));let p=G(e,{global:!0});return F.createElement(Ev,null,F.createElement(`div`,{...W(p,d,u),ref:n,slot:e.slot||void 0,"data-empty":o.collection.size===0||void 0,onScroll:e.onScroll},F.createElement(Eh,{values:[[gT,o],[gw,{elementType:`div`}],[aw,{name:`MenuSection`,render:CT}],[yT,{parentMenuRef:n,shouldUseVirtualFocus:i?.shouldUseVirtualFocus}],[wT,null],[dw,null],[fw,null],[vT,o.selectionManager],[_T,s??aT({})]]},F.createElement(l,{collection:o.collection,persistedKeys:uw(o.selectionManager.focusedKey),scrollRef:n})),f))}var ST=class extends fT{get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,t){return this.parent.setFocusedKey(e,t)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}constructor(e,t){super(e.collection,t),this.parent=e}};function CT(e,t,n,r=`react-aria-MenuSection`){let i=(0,F.useContext)(gT),{CollectionBranch:a}=(0,F.useContext)(lw),[o,s]=kh(),{headingProps:c,groupProps:l}=Qw({heading:s,"aria-label":n.props[`aria-label`]??void 0}),u=Dh({defaultClassName:r,className:n.props?.className,style:n.props?.style,values:{}}),d=(0,F.useContext)(vT),f=uT(e),p=e.selectionMode==null?d:new ST(d,f),m=G(e,{global:!0});return delete m.id,F.createElement(`section`,{...W(m,u,l),ref:t},F.createElement(Eh,{values:[[pw,{...c,ref:o}],[vT,p]]},F.createElement(a,{collection:i.collection,parent:n})))}BC(vC,CT);var wT=(0,F.createContext)(null);zC(_C,function(e,t,n){[e,t]=q(e,t,wT);let r=Oh(wT)?.id,i=(0,F.useContext)(gT),a=gp(t),o=(0,F.useContext)(vT),{menuItemProps:s,labelProps:c,descriptionProps:l,keyboardShortcutProps:u,...d}=Zw({...e,id:r,key:n.key,selectionManager:o},i,a),{hoverProps:f,isHovered:p}=bh({isDisabled:d.isDisabled}),m=Dh({...e,id:void 0,children:n.rendered,defaultClassName:`react-aria-MenuItem`,values:{...d,isHovered:p,isFocusVisible:d.isFocusVisible,selectionMode:o.selectionMode,selectionBehavior:o.selectionBehavior,hasSubmenu:!!e[`aria-haspopup`],isOpen:e[`aria-expanded`]===`true`}}),h=e.href?`a`:`div`,g=G(e,{global:!0});return delete g.id,delete g.onClick,F.createElement(h,{...W(g,m,s,f),ref:a,"data-disabled":d.isDisabled||void 0,"data-hovered":p||void 0,"data-focused":d.isFocused||void 0,"data-focus-visible":d.isFocusVisible||void 0,"data-pressed":d.isPressed||void 0,"data-selected":d.isSelected||void 0,"data-selection-mode":o.selectionMode===`none`?void 0:o.selectionMode,"data-has-submenu":!!e[`aria-haspopup`]||void 0,"data-open":e[`aria-expanded`]===`true`||void 0},F.createElement(Eh,{values:[[Sx,{slots:{[Th]:c,label:c,description:l}}],[mw,u]]},m.children))});function TT(e,t){let{role:n=`dialog`}=e,r=_f();r=e[`aria-label`]?void 0:r;let i=(0,F.useRef)(!1);return(0,F.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){nh(t.current);let e=setTimeout(()=>{(document.activeElement===t.current||document.activeElement===document.body)&&(i.current=!0,t.current&&(t.current.blur(),nh(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),_b(),{dialogProps:{...G(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e[`aria-labelledby`]||r,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:r}}}var ET=(0,F.createContext)(null),DT=(0,F.createContext)(null);function OT(e){let t=aT(e),n=(0,F.useRef)(null),{triggerProps:r,overlayProps:i}=iy({type:`dialog`},t,n),[a,o]=(0,F.useState)(null);return bp({ref:n,onResize:(0,F.useCallback)(()=>{n.current&&o(n.current.offsetWidth+`px`)},[n])}),r.id=B(),i[`aria-labelledby`]=r.id,F.createElement(Eh,{values:[[DT,t],[_T,t],[ET,i],[tw,{trigger:`DialogTrigger`,triggerRef:n,"aria-labelledby":i[`aria-labelledby`],style:{"--trigger-width":a}}]]},F.createElement(fh,{...r,ref:n,isPressed:t.isOpen},e.children))}(0,F.forwardRef)(function(e,t){let n=e[`aria-labelledby`];[e,t]=q(e,t,ET);let{dialogProps:r,titleProps:i}=TT({...e,"aria-labelledby":n},t),a=(0,F.useContext)(DT);!r[`aria-label`]&&!r[`aria-labelledby`]&&e[`aria-labelledby`]&&(r[`aria-labelledby`]=e[`aria-labelledby`]);let o=Dh({defaultClassName:`react-aria-Dialog`,className:e.className,style:e.style,children:e.children,values:{close:a?.close||(()=>{})}}),s=G(e,{global:!0});return F.createElement(`section`,{...W(s,o,r),ref:t,slot:e.slot||void 0},F.createElement(Eh,{values:[[bx,{slots:{[Th]:{},title:{...i,level:2}}}],[$C,{slots:{[Th]:{},close:{onPress:()=>a?.close()}}}]]},o.children))});var kT=({placement:e=`bottom-start`,hasChrome:t=!0,hasCloseButton:n=!1,closeLabel:r,offset:i=8,padding:a,popover:o,children:s,defaultVisible:c,visible:l,onVisibleChange:u,...d})=>{let f=Nb(e),[p,m]=(0,F.useState)(c??!1),h=(0,F.useCallback)(e=>{m(e),u?.(e)},[u]),g=(0,F.useCallback)(()=>h(!1),[h]);return F.createElement(OT,{defaultOpen:c,isOpen:l??p,onOpenChange:h,...d},F.createElement(dh,null,s),F.createElement(rw,{placement:f,offset:i,style:{outline:`none`}},F.createElement(XS,{hasChrome:t,hideLabel:r,onHide:n?g:void 0,padding:a},typeof o==`function`?o({onHide:g}):o)))},AT=(0,F.forwardRef)((e,t)=>F.createElement(XS,{ref:t,...e}));AT.displayName=`Tooltip`,(0,F.lazy)(()=>e(()=>import(`./WithTooltip-65CFNBJE-B1vNinkY.js`),__vite__mapDeps([8,1,2,4,5,0]),import.meta.url).then(e=>({default:e.WithTooltip}))),(0,F.lazy)(()=>e(()=>import(`./WithTooltip-65CFNBJE-B1vNinkY.js`),__vite__mapDeps([8,1,2,4,5,0]),import.meta.url).then(e=>({default:e.WithTooltipPure})));var{deprecate:jT}=__STORYBOOK_MODULE_CLIENT_LOGGER__;N.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),N.span(),N.div(({theme:e})=>({marginTop:8,textAlign:`center`,"> *":{margin:`0 8px`,fontWeight:e.typography.weight.bold}})),N.div(({theme:e})=>({color:e.color.defaultText,lineHeight:`18px`})),N.div({padding:15,width:280,boxSizing:`border-box`});var{deprecate:MT}=__STORYBOOK_MODULE_CLIENT_LOGGER__,NT=t(v(),1),{deprecate:PT}=__STORYBOOK_MODULE_CLIENT_LOGGER__,FT=N(({active:e,loading:t,disabled:n,...r})=>F.createElement(`span`,{...r}))(({theme:e})=>({color:e.color.defaultText,fontWeight:e.typography.weight.regular}),({active:e,theme:t})=>e?{color:t.color.secondary,fontWeight:t.typography.weight.bold}:{},({loading:e,theme:t})=>e?{display:`inline-block`,flex:`none`,...t.animation.inlineGlow}:{},({disabled:e,theme:t})=>e?{color:t.textMutedColor}:{}),IT=N.span({display:`flex`,"& svg":{height:12,width:12,margin:`3px 0`,verticalAlign:`top`}}),LT=N.span({flex:1,textAlign:`left`,display:`flex`,flexDirection:`column`,minWidth:0},({isIndented:e})=>e?{marginLeft:24}:{}),RT=N.span(({theme:e})=>({fontSize:`11px`,lineHeight:`14px`}),({active:e,theme:t})=>e?{color:t.color.secondary}:{},({theme:e,disabled:t})=>t?{color:e.textMutedColor}:{}),zT=N.span(({active:e,theme:t})=>e?{color:t.color.secondary}:{},()=>({display:`flex`,maxWidth:14})),BT=N.button(({theme:e})=>({width:`100%`,minWidth:0,border:`none`,borderRadius:e.appBorderRadius,background:`none`,fontSize:e.typography.size.s1,transition:`background 150ms ease-out`,color:e.color.dark,textDecoration:`none`,justifyContent:`space-between`,lineHeight:`18px`,padding:`7px 10px`,display:`flex`,alignItems:`center`,"& > * + *":{paddingLeft:10},"&:focus-visible":{outline:`2px solid ${e.color.secondary}`,outlineOffset:0}}),({theme:e,href:t,onClick:n})=>(t||n)&&{cursor:`pointer`,"&:hover":{background:e.background.hoverable},"&:hover svg":{opacity:1}},({theme:e,as:t})=>t===`label`&&{"&:has(input:not(:disabled))":{cursor:`pointer`,"&:hover":{background:e.background.hoverable}}},({disabled:e})=>e&&{cursor:`not-allowed`}),VT=(0,NT.default)(100)(({onClick:e,input:t,href:n,LinkWrapper:r})=>({...e&&{as:`button`,role:`button`,onClick:e},...t&&{as:`label`},...n&&{as:`a`,role:`link`,href:n,...r&&{as:r,to:n}}})),HT=(0,F.forwardRef)((e,t)=>{let{loading:n=!1,title:r=F.createElement(`span`,null,`Loading state`),center:i=null,right:a=null,active:o=!1,disabled:s=!1,isIndented:c=!1,href:l=void 0,onClick:u=void 0,icon:d,input:f,LinkWrapper:p=void 0,...m}=e,h={active:o,disabled:s},g=VT(e),_=d||f;return PT("`ListItem` is deprecated and will be removed in Storybook 11, use `MenuItem` instead."),F.createElement(BT,{"data-deprecated":`ListItem`,ref:t,...m,...h,...g},F.createElement(F.Fragment,null,_&&F.createElement(zT,{...h},_),r||i?F.createElement(LT,{isIndented:c&&!_},r&&F.createElement(FT,{...h,loading:n},r),i&&F.createElement(RT,{...h},i)):null,a&&F.createElement(IT,{...h},a)))});HT.displayName=`ListItem`;var UT=HT,WT=N.div({minWidth:180,overflow:`hidden`,overflowY:`auto`,maxHeight:504},({theme:e})=>({borderRadius:e.appBorderRadius+2}),({theme:e})=>e.base===`dark`?{background:e.background.content}:{}),GT=N.div(({theme:e})=>({padding:4,"& + &":{borderTop:`1px solid ${e.appBorderColor}`}})),KT=({id:e,onClick:t,...n})=>{let{active:r,disabled:i,title:a,href:o}=n,s=(0,F.useCallback)(n=>t?.(n,{id:e,active:r,disabled:i,title:a,href:o}),[t,e,r,i,a,o]);return F.createElement(UT,{id:`list-item-${e}`,...n,...t&&{onClick:s}})},qT=({links:e,LinkWrapper:t,...n})=>{MT("`TooltipLinkList` is deprecated and will be removed in Storybook 11, use `ActionList` or `MenuItem` and `WithMenu` instead.");let r=Array.isArray(e[0])?e:[e],i=r.some(e=>e.some(e=>`icon`in e&&e.icon||`input`in e&&e.input));return F.createElement(WT,{"data-deprecated":`TooltipLinkList`,...n,className:`sb-list`},r.filter(e=>e.length).map((e,n)=>F.createElement(GT,{key:e.map(e=>e.id).join(`~${n}~`)},e.map(e=>`content`in e?F.createElement(F.Fragment,{key:e.id},e.content):F.createElement(KT,{key:e.id,isIndented:i,LinkWrapper:t,...e})))))},{deprecate:JT}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{deprecate:YT}=__STORYBOOK_MODULE_CLIENT_LOGGER__,XT=N.div(({backgroundColor:e,border:t=!1,innerStyle:n={},scrollable:r,theme:i})=>({color:i.barTextColor,width:`100%`,minHeight:40,flexShrink:0,scrollbarColor:`${i.barTextColor} ${t?e||i.barBg:`transparent`}`,scrollbarWidth:`thin`,overflow:r?`auto`:`hidden`,overflowY:`hidden`,display:`flex`,alignItems:`center`,gap:r?0:6,paddingInline:r?0:6,...t?{boxShadow:`${i.appBorderColor} 0 -1px 0 0 inset`,background:e||i.barBg}:{},...n})),ZT=N.div(({innerStyle:e})=>({minHeight:40,display:`flex`,alignItems:`center`,width:`100%`,gap:6,paddingInline:6,...e})),QT=(0,F.forwardRef)(({scrollable:e=!0,children:t,innerStyle:n,...r},i)=>F.createElement(XT,{...r,ref:i,innerStyle:e?void 0:n,scrollable:e},e?F.createElement(ZT,{innerStyle:n},t):t));QT.displayName=`Bar`;var $T=N.div({display:`flex`,whiteSpace:`nowrap`,flexBasis:`auto`,marginLeft:3,marginRight:10},({scrollable:e})=>e?{flexShrink:0}:{},({left:e})=>e?{"& > *":{marginLeft:4}}:{},({right:e})=>e?{gap:6}:{});$T.displayName=`Side`;var eE=N.div(({bgColor:e})=>({display:`flex`,justifyContent:`space-between`,position:`relative`,flexWrap:`nowrap`,flexShrink:0,height:40,width:`100%`,backgroundColor:e||``})),tE=N(QT)({paddingInline:0}),nE=({children:e,backgroundColor:t,className:n=``,...r})=>{YT(`FlexBar is deprecated. Use Bar with justifyContent: "space-between" instead.`);let[i,a]=F.Children.toArray(e);return F.createElement(tE,{"data-deprecated":`FlexBar`,backgroundColor:t,className:`sb-bar ${n}`,...r},F.createElement(eE,{bgColor:t},F.createElement($T,{scrollable:r.scrollable,left:!0},i),a?F.createElement($T,{right:!0},a):null))};nE.displayName=`FlexBar`;var{deprecate:rE}=__STORYBOOK_MODULE_CLIENT_LOGGER__,iE=e=>typeof e.props.href==`string`,aE=e=>typeof e.props.href!=`string`;function oE({children:e,...t},n){let r={props:t,ref:n};if(iE(r))return F.createElement(`a`,{ref:r.ref,...r.props},e);if(aE(r))return F.createElement(`button`,{ref:r.ref,type:`button`,...r.props},e);throw Error(`invalid props`)}var sE=(0,F.forwardRef)(oE);sE.displayName=`ButtonOrLink`;var cE=N(sE,{shouldForwardProp:w})({whiteSpace:`normal`,display:`inline-flex`,overflow:`hidden`,verticalAlign:`top`,justifyContent:`center`,alignItems:`center`,textAlign:`center`,textDecoration:`none`,"&:empty":{display:`none`},"&[hidden]":{display:`none`}},({theme:e})=>({padding:`0 15px`,transition:`color 0.2s linear, border-bottom-color 0.2s linear`,height:40,lineHeight:`12px`,cursor:`pointer`,background:`transparent`,border:`0 solid transparent`,borderTop:`3px solid transparent`,borderBottom:`3px solid transparent`,fontWeight:`bold`,fontSize:13,"&:focus":{outline:`0 none`,borderBottomColor:e.barSelectedColor}}),({active:e,textColor:t,theme:n})=>e?{color:t||n.barSelectedColor,borderBottomColor:n.barSelectedColor}:{color:t||n.barTextColor,borderBottomColor:`transparent`,"&:hover":{color:n.barHoverColor}}),lE=(0,F.forwardRef)((e,t)=>(rE("The `TabButton` component is deprecated. Use `TabList` instead."),F.createElement(cE,{"data-deprecated":`TabButton`,ref:t,...e})));lE.displayName=`TabButton`;var uE=N.div(({theme:e})=>({height:`100%`,display:`flex`,padding:30,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:15,background:e.background.content})),dE=N.div({display:`flex`,flexDirection:`column`,gap:4,maxWidth:415}),fE=N.div(({theme:e})=>({fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,textAlign:`center`,color:e.color.defaultText})),pE=N.div(({theme:e})=>({fontSize:e.typography.size.s2-1})),mE=N.div(({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s2-1,textAlign:`center`,color:e.textMutedColor})),hE=({title:e,description:t,footer:n})=>F.createElement(uE,null,F.createElement(dE,null,F.createElement(fE,null,e),t&&F.createElement(mE,null,t)),n&&F.createElement(pE,null,n)),{deprecate:gE}=__STORYBOOK_MODULE_CLIENT_LOGGER__,_E=N.div(({active:e})=>e?{display:`block`}:{display:`none`}),vE=e=>(gE("The `childrenToList` tabs helper is deprecated. Use `TabsView` instead."),F.Children.toArray(e).map(({props:{title:e,id:t,color:n,children:r}})=>{let i=Array.isArray(r)?r[0]:r;return{title:e,id:t,...n?{color:n}:{},render:typeof i==`function`?i:({active:e})=>F.createElement(_E,{active:e,role:`tabpanel`},i)}})),{deprecate:yE}=__STORYBOOK_MODULE_CLIENT_LOGGER__,bE=N.span(({theme:e,isActive:t})=>({display:`inline-block`,width:0,height:0,marginLeft:8,color:t?e.color.secondary:e.color.mediumdark,borderRight:`3px solid transparent`,borderLeft:`3px solid transparent`,borderTop:`3px solid`,transition:`transform .1s ease-out`})),xE=N(lE)(({active:e,theme:t,preActive:n})=>`
|
|
57
57
|
color: ${n||e?t.barSelectedColor:t.barTextColor};
|
|
58
58
|
.addon-collapsible-icon {
|
|
59
59
|
color: ${n||e?t.barSelectedColor:t.barTextColor};
|