@brickkit/cli 0.11.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard-dist/CollapsiblePanel-CbUysOp5.js +2 -0
- package/dashboard-dist/CompositeRoot-D4sRkYq3.js +1 -0
- package/dashboard-dist/Geist-Variable.woff2 +0 -0
- package/dashboard-dist/GeistMono-Variable.woff2 +0 -0
- package/dashboard-dist/PopoverPopup-CiI2avT_.js +1 -0
- package/dashboard-dist/api-reference-mT9VNcPb.js +265 -0
- package/dashboard-dist/app.css +2 -2
- package/dashboard-dist/app.js +12 -13
- package/dashboard-dist/ccount-CcG1m-Yh.js +1 -0
- package/dashboard-dist/client-CwATkLJa.js +1 -0
- package/dashboard-dist/core-BEUWp6B5.js +1 -0
- package/dashboard-dist/docs-BRrtyxDB.js +4 -0
- package/dashboard-dist/docs.css +1 -1
- package/dashboard-dist/kit.js +1 -1
- package/dashboard-dist/popover-Bj9x-88h.js +1 -0
- package/dist/bin.d.ts +0 -2
- package/dist/bin.js +309 -211
- package/dist/bin.js.map +1 -1
- package/dist/build.js +463 -0
- package/dist/build.js.map +1 -0
- package/dist/client-contract-file.js +356 -1
- package/dist/client-contract-file.js.map +1 -0
- package/dist/compiler.d.ts +12 -3
- package/dist/compiler.js +1 -1
- package/dist/compiler2.js +13 -7
- package/dist/compiler2.js.map +1 -1
- package/dist/config.d.ts +3 -0
- package/dist/config.js +1 -252
- package/dist/config2.d.ts +122 -0
- package/dist/config2.js +207 -0
- package/dist/config2.js.map +1 -0
- package/dist/dashboard-extension.d.ts +3 -2
- package/dist/{dev-telemetry-store.js → dashboard-host.js} +1381 -1432
- package/dist/dashboard-host.js.map +1 -0
- package/dist/dashboard-protocol.js +189 -0
- package/dist/dashboard-protocol.js.map +1 -0
- package/dist/dashboard.d.ts +8 -135
- package/dist/definitions.js +33 -0
- package/dist/definitions.js.map +1 -0
- package/dist/dev-application.js +34 -0
- package/dist/dev-application.js.map +1 -0
- package/dist/dev-protocol.js +21 -0
- package/dist/dev-protocol.js.map +1 -0
- package/dist/dev-reporter.d.ts +0 -2
- package/dist/dev-reporter.js +3 -3
- package/dist/dev-reporter.js.map +1 -1
- package/dist/dev-telemetry.js +8 -24
- package/dist/dev-telemetry.js.map +1 -1
- package/dist/dev-worker.js +80 -21
- package/dist/dev-worker.js.map +1 -1
- package/dist/index.d.ts +18 -87
- package/dist/index.js +12 -6
- package/dist/index.js.map +1 -0
- package/dist/lint/oxlint.d.ts +0 -2
- package/dist/lint/oxlint.js +6 -5
- package/dist/lint/oxlint.js.map +1 -1
- package/dist/own-module.js +7 -0
- package/dist/own-module.js.map +1 -0
- package/dist/plugin.d.ts +6 -11
- package/dist/plugin.js +6 -42
- package/dist/plugin.js.map +1 -1
- package/dist/production-dashboard.d.ts +2 -0
- package/dist/production-dashboard.js +51 -0
- package/dist/production-dashboard.js.map +1 -0
- package/dist/production-dashboard2.d.ts +34 -0
- package/dist/{presets.js → project.js} +107 -113
- package/dist/project.js.map +1 -0
- package/dist/serve.d.ts +24 -0
- package/dist/serve.js +1 -0
- package/dist/serve2.js +49 -0
- package/dist/serve2.js.map +1 -0
- package/dist/vite.d.ts +0 -2
- package/dist/vite.js +28 -51
- package/dist/vite.js.map +1 -1
- package/dist/workflows.d.ts +2 -4
- package/dist/workflows2.js +60 -39
- package/dist/workflows2.js.map +1 -1
- package/inspector-dist/client/assets/api.rpc-BvRk9kiK.js +0 -0
- package/inspector-dist/client/assets/api.stream._streamId-BvRk9kiK.js +0 -0
- package/inspector-dist/client/assets/app-CeSwVsRm.css +2 -0
- package/inspector-dist/client/assets/dist-BK8w6xOr.js +3930 -0
- package/inspector-dist/client/assets/dist-CG2aVufI.js +197 -0
- package/inspector-dist/client/assets/entry.client-D9jbgmTR.js +9391 -0
- package/inspector-dist/client/assets/highlighted-body-B3W2YXNL-CfRnuITN.js +34 -0
- package/inspector-dist/client/assets/home-hwPlkNhv.js +4034 -0
- package/inspector-dist/client/assets/jsx-runtime-CPEah4WQ.js +7084 -0
- package/inspector-dist/client/assets/manifest-0e76e9ac.js +1 -0
- package/inspector-dist/client/assets/mermaid-3ZIDBTTL-ZDR2PNY_.js +1 -0
- package/inspector-dist/client/assets/root-ChBNTZd2.css +2 -0
- package/inspector-dist/client/assets/root-SLeEf-sT.js +320 -0
- package/inspector-dist/client/assets/run-detail-DYbVkIFH.js +1871 -0
- package/inspector-dist/client/assets/tabs-CaJisoyb.js +73751 -0
- package/inspector-dist/client/assets/tabs-L5XKzOpP.css +1 -0
- package/inspector-dist/client/assets/zstd-browser-decoder-D94wmfAU.js +41 -0
- package/inspector-dist/server/assets/app-DGlfWVUI.js +99330 -0
- package/inspector-dist/server/assets/chunk-RLXIAIE6-F0SJZlei.js +42975 -0
- package/inspector-dist/server/assets/dist-BCbwm6jl.js +10325 -0
- package/inspector-dist/server/assets/dist-CG2aVufI.js +197 -0
- package/inspector-dist/server/assets/dist-Ce0I2PUv.js +1137 -0
- package/inspector-dist/server/assets/dist-DY0UlahA.js +1642 -0
- package/inspector-dist/server/assets/encryption-DdQgC8Rk.js +886 -0
- package/inspector-dist/server/assets/event-metadata-n7E4zEmT.js +145 -0
- package/inspector-dist/server/assets/functions-CNVQtbgg.js +1170 -0
- package/inspector-dist/server/assets/global-singleton-D8sIN5du.js +80 -0
- package/inspector-dist/server/assets/highlighted-body-B3W2YXNL-CWRzMxYD.js +34 -0
- package/inspector-dist/server/assets/mermaid-3ZIDBTTL-D0v0ngVr.js +1 -0
- package/inspector-dist/server/assets/parse-Begau9cA.js +469 -0
- package/inspector-dist/server/assets/rolldown-runtime-C1I3wEg2.js +43 -0
- package/inspector-dist/server/assets/serialization-format-BbuGfHog.js +476 -0
- package/inspector-dist/server/assets/token-BgMmJNP5.js +60 -0
- package/inspector-dist/server/assets/token-BrUX0bxz.js +55 -0
- package/inspector-dist/server/assets/token-util-DZN32qmT.js +455 -0
- package/inspector-dist/server/assets/wrapper-CIC3w0oC.js +3624 -0
- package/inspector-dist/server/assets/ws-transport-CxTYB11n.js +29476 -0
- package/inspector-dist/server/assets/zstd-browser-decoder-D7bCXbGg.js +38 -0
- package/inspector-dist/server/index.js +1 -58
- package/package.json +39 -28
- package/vite-client.d.ts +1 -1
- package/dashboard-dist/CollapsiblePanel-BX79_W-b.js +0 -2
- package/dashboard-dist/CompositeRoot-xzybXjnx.js +0 -1
- package/dashboard-dist/PopoverPopup-CvlmC7EL.js +0 -1
- package/dashboard-dist/api-reference-BcAYVYwJ.js +0 -260
- package/dashboard-dist/core-BGO9JZ1r.js +0 -1
- package/dashboard-dist/docs-DHikPD2v.js +0 -4
- package/dashboard-dist/popover-DG498XHH.js +0 -1
- package/dist/app-entry.js +0 -1
- package/dist/app-entry2.js +0 -19
- package/dist/app-entry2.js.map +0 -1
- package/dist/bin.d.ts.map +0 -1
- package/dist/client-contract-file2.js +0 -34
- package/dist/client-contract-file2.js.map +0 -1
- package/dist/client-contract.js +0 -1
- package/dist/client-contract2.js +0 -294
- package/dist/client-contract2.js.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/dashboard-extension.d.ts.map +0 -1
- package/dist/dev-reporter.d.ts.map +0 -1
- package/dist/dev-telemetry-store.js.map +0 -1
- package/dist/emit.d.ts +0 -7
- package/dist/emit.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/lint/oxlint.d.ts.map +0 -1
- package/dist/plugin.d.ts.map +0 -1
- package/dist/presets.js.map +0 -1
- package/dist/runner.js +0 -523
- package/dist/runner.js.map +0 -1
- package/dist/vite.d.ts.map +0 -1
- package/dist/workflows.d.ts.map +0 -1
- package/inspector-dist/client/assets/api.rpc-l0sNRNKZ.js +0 -1
- package/inspector-dist/client/assets/api.stream._streamId-l0sNRNKZ.js +0 -1
- package/inspector-dist/client/assets/app-CvoGgWcV.css +0 -1
- package/inspector-dist/client/assets/entry.client-BJ6G3n5t.js +0 -11697
- package/inspector-dist/client/assets/highlighted-body-B3W2YXNL-C-3wZnxf.js +0 -19
- package/inspector-dist/client/assets/home-CSKAS4P2.js +0 -4979
- package/inspector-dist/client/assets/index-DECCyMR0.js +0 -4482
- package/inspector-dist/client/assets/index-Dot7CgrA.js +0 -9837
- package/inspector-dist/client/assets/index-HqNj_XIX.js +0 -200
- package/inspector-dist/client/assets/manifest-139c9319.js +0 -1
- package/inspector-dist/client/assets/mermaid-3ZIDBTTL-DC0K8uTy.js +0 -58626
- package/inspector-dist/client/assets/mermaid-3ZIDBTTL-F88p7PFX.css +0 -1
- package/inspector-dist/client/assets/root-BMHd_XHz.css +0 -1
- package/inspector-dist/client/assets/root-cbi6iYwg.js +0 -305
- package/inspector-dist/client/assets/run-detail-CWoGxu_0.css +0 -1
- package/inspector-dist/client/assets/run-detail-Cc7tSGNq.js +0 -6237
- package/inspector-dist/client/assets/world-config-context-BAD1QCrR.js +0 -26
- package/inspector-dist/client/assets/zstd-browser-decoder-BQoRpP7L.js +0 -28
- package/inspector-dist/server/assets/app-DUP5RybL.js +0 -174880
- package/inspector-dist/server/assets/highlighted-body-B3W2YXNL-D2g4hL2-.js +0 -71
- package/inspector-dist/server/assets/index-BfLBLRRi.js +0 -204
- package/inspector-dist/server/assets/index-BzrGWk7J.js +0 -1164
- package/inspector-dist/server/assets/index-D71yP6AL.js +0 -191
- package/inspector-dist/server/assets/index-wGSWRns3.js +0 -1296
- package/inspector-dist/server/assets/mermaid-3ZIDBTTL-DsvuKoEV.js +0 -58
- package/inspector-dist/server/assets/token-ClUZZwXl.js +0 -95
- package/inspector-dist/server/assets/token-util-DSxMZ6nI.js +0 -33
- package/inspector-dist/server/assets/wrapper-B3vstpCO.js +0 -67
- package/inspector-dist/server/assets/zstd-browser-decoder-Dn82m2BU.js +0 -77
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{Bt as t,C as n,Dt as r,Gn as i,Hn as a,Mn as o,Nn as s,Pn as c,Rn as l,Rt as u,S as d,T as f,Tt as p,Un as m,Vn as h,a as g,an as _,b as v,c as y,cn as b,dt as x,en as S,it as C,jt as w,kn as T,kt as E,ln as D,n as O,o as k,on as A,rn as j,rt as M,s as N,sn as P,st as F,t as I,tt as L,vn as R,vt as z,w as ee,yt as te}from"./CompositeRoot-D4sRkYq3.js";import{s as B}from"./app.js";var V={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};V.node;var H=a(V),U={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};U.node;var W=a(U),G={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};G.node;var K=a(G),ne={name:`clipboard`,size:24,node:[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]};ne.node;var re=a(ne),ie={name:`copy-check`,size:24,node:[[`path`,{d:`m12 15 2 2 4-4`,key:`2c609p`}],[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};ie.node;var ae=a(ie),oe={name:`file`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]};oe.node;var se=a(oe),ce={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};ce.node;var le=a(ce),ue={name:`lightbulb`,size:24,node:[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]};ue.node;var de=a(ue),fe={name:`link`,size:24,node:[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]};fe.node;var pe=a(fe),me=48,q=(e,t=0)=>{let n=new Int32Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r)-me-t;return n},he=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},ge=e=>{let t=new Int32Array(e.length),n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r)-me;n+=i>>>1^-(i&1),t[r]=n}return t},_e=384,ve=[],ye=he(q(`E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010`)),be=he(q(`:11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3`)),xe=`@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom`,Se=(()=>{let e=ye.length-1,t=new Int32Array(e);for(let n=e-1;n>=0;n--){let e=1,r=n+1;for(let i=ye[n];i<ye[n+1];i++)e+=t[r],r+=t[r];t[n]=e}let n=new Int32Array(ye[e]),r=0;for(let i=0;i<e;i++){let e=i+1;for(let a=ye[i];a<ye[i+1];a++)n[r++]=e,e+=t[e]}return n})(),Ce=q(`02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000
ŏ0000000ŏ00000000000000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000`,1),we=he(q(`123333359346463635126536711576`)),Te=q(`93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032`),Ee=q(`012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199`),De=ge(`020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200`),Oe=(()=>{let e=new Int32Array(319).fill(-1),t=ge(`02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222`),n=ge(`02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222`);for(let r=0;r<t.length;r++)e[t[r]]=n[r];return e})(),ke=`container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform`.split(`|`).map(e=>{let t=e.split(` `),n=t.shift();for(let e=0;e<t.length;e++)t[e]=n+t[e];return t}),Ae=ge(`0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422`),je=ge(`ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>6ʰ22ʷʺʷʺʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622`),Me=ge(`02222222222222222222222222222222222222222222222222222222222222222202021422222222CF2200GJ021042222WZ222IL0ad2c10h2222U00X202[^2w0000120zy|}22
:22z22222222222G000qOVI00000{2<40000@00000G¦§000ª00000000000000021K¬«00®000000000000000000000222HGH_1¸222½2¾2222ÇÊ000°2±`),Ne=new Int32Array(987),Pe=new Int32Array(987),Fe=new Int32Array(987),Ie=``,Le=new Int32Array(1022);{let e=new Map,t=0,n=0;for(let r=0;r<Ae.length;r++)for(let i of ke[Me[r]]){let a=e.get(i);a===void 0&&(a=t++,e.set(i,a),Le[a*2]=Ie.length,Le[a*2+1]=i.length,Ie+=i),Ne[n]=Ae[r],Pe[n]=je[r],Fe[n]=a,n++}}var J=ge(`0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p`),Re=he(q(`1::24444432:442:44:44>222222:44:4421322511111311111114`)),ze=ge(`24A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅŇ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=ƧNž2Đå242L222290000f22500ɛ000ǘ222`),Be=q(`ij`),Ve=q(``),He=q(`1`),Ue={GROUP_COUNT:_e,customValidatorNames:ve,edgeStart:ye,labelStart:be,labelText:xe,edgeTarget:Se,nodeGroup:Ce,nodeVlist:Oe,vlistPat:we,vlistOps:Te,vlistRef:Ee,vlistGroup:De,litAnchor:Ne,litGroup:Pe,litPool:Fe,poolOffsets:Le,poolText:Ie,adjGid:J,adjStart:Re,adjTgt:ze,patGid:Be,patTgt:Ve,postfixLookupGroups:He,orderSensitiveModifiers:`* ** after backdrop before details-content file first-letter first-line marker placeholder selection`},We=`line`in Error(),Ge=-1,Ke=-1,qe=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},Je=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15},Ye=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:T,orderSensitiveModifiers:E}=e,D=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)D[y[e]]=e;let O=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>O&&(O=t)}let k=32;for(;k<2*(1+O+S.length);)k<<=1;let A=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)A[e+1]=A[e]+u[f[e]+1]-u[f[e]];let j=new Uint8Array(r);for(let e=0;e<w.length;e++)j[w[e]]=1;let M=i.length-1,N=new Uint8Array(M),P=0,F=!0;for(let e=0;e<m.length;e++){N[m[e]]=1;let t=_[g[e]*2+1];t>P&&(P=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(F=!1)}let I=1;for(;I<m.length*2;)I<<=1;let L=new Int32Array(I).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(qe(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&I-1;for(;L[n]!==-1;)n=n+1&I-1;L[n]=e}let R=(e,t,n,r)=>{let i=(qe(t,n,r)^Math.imul(e,2654435761)|0)&I-1,a=r-n;for(;;){let r=L[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&I-1}},z=n.cacheSize??8192,ee=n.prefix??e.prefix??``,te=ee===``?``:ee+`:`,B=te.length,V=(T??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),H=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,U=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,W=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,G=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,K=0,ne=-1,re=-1,ie=-1,ae=-1,oe=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,se=e=>/\s/.test(String.fromCharCode(e)),ce=(e,t,n)=>{if(K=0,ne=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)K=1;else if(r===40&&i===41)K=2;else return;ie=t+1,ae=n-1;let a=t+1;if(oe(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!oe(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(ne=t+1,re=a,ie=a+1)}},le=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},ue=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,de=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fe=e=>!!e&&!Number.isNaN(Number(e)),pe=(e,t,n)=>{if(n-t<11||!le(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&le(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&le(e,t+10,t+18,`-normal/`)},me=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],q=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),he=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],ge=(e,t,n,r)=>{if(e>=10){if(e>=25)return V[e-25](t.slice(n,r));let i=e-10;if(K!==me[i])return!1;if(ne>=0){for(let e of q[i])if(le(t,ne,re,e))return!0;return!1}switch(he[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(ie,ae);return H.test(e)&&!U.test(e)}case 3:return fe(t.slice(ie,ae));case 4:return G.test(t.slice(ie,ae));default:return W.test(t.slice(ie,ae))}}switch(e){case 0:return!0;case 1:return K===0;case 2:return K===1;case 3:return K===2;case 4:return ue.test(t.slice(n,r));case 5:return fe(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&fe(t.slice(n,r-1));case 8:return de.test(t.slice(n,r));default:return pe(t,n,r)}},_e=new Set(typeof E==`string`?E.split(` `):E),ve=(e,t,n,r,i,a)=>{let o=qe(t,n,r)^(i?2654435769:0),s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},ye=new Map,be=new Map,xe=2,Se=4096,Ce=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||_e.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=be.get(s);return c===void 0&&be.set(s,c=xe++),c},we=new Map,Te=r,Ee=r+4096,De=()=>Te++,Oe=2097152,ke=8192,Ae=new Int32Array(ke),je=Array(ke).fill(null),Me=new Int32Array(ke),Ne=new Int32Array(ke),Pe=new Uint8Array(ke),Fe=0,Ie=(e,t,n,r,i,a,o,s)=>{let c=e;if(je[e]!==null){if(je[e|1]===null)c=e|1;else if(!(Fe++&3))c=e|Fe>>2&1;else return}je[c]=t.slice(n,r),Ae[c]=i,Me[c]=a,Ne[c]=o,Pe[c]=s},Le=()=>je.fill(null),J=256,Re=[new Int32Array(J),new Int32Array(J),new Int32Array(J),new Int32Array(J)],[ze,Be,Ve,He]=Re,Ue=new Uint8Array(J),Ye=new Uint8Array(J),Xe=()=>{J*=2,Re=Re.map(e=>{let t=new Int32Array(J);return t.set(e),t}),[ze,Be,Ve,He]=Re;let e=new Uint8Array(J);e.set(Ue),Ue=e,Ye=new Uint8Array(J)},Ze=64,$e=new Int32Array(Ze),et=new Int32Array(Ze),tt=new Int32Array(r),Y=2048,nt=21,rt=new Float64Array(Y),X=new Int32Array(Y),Z=0,Q=(e,t)=>{if(e===0&&t<r)return tt[t]===Z?1:(tt[t]=Z,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>nt;for(;X[i]===Z;){if(rt[i]===n)return 1;i=i+1&Y-1}return rt[i]=n,X[i]=Z,0},it=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?Ge:ve(we,e,t+1,r,0,De)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=et[t];if(r>n)continue;let i=$e[t],a=n-r;if(N[i]===1&&a>0&&a<=P){let t=e.charCodeAt(r);if(F===!1||t!==91&&t!==40){let t=R(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;ce(e,r,n);let h=A[o]-c;for(let t=c;t<m;t++)if(ge(d[t],e,r,n))return p[h+t]}return Ge},at=e=>{let t=e.length,n=0,c=0,u=!1;(xe>Se||ye.size>Se)&&(ye=new Map,be=new Map,xe=2,Le()),Te>Ee&&(we=new Map,Te=r,Le());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&se(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&se(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===J&&Xe();let _=n++;ze[_]=p,Be[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15,y=v&8190;{let t=-1;if(Ae[y]===v&&je[y]!==null&&je[y].length===g?t=y:Ae[y|1]===v&&je[y|1]!==null&&je[y|1].length===g&&(t=y|1),t>=0){let n=je[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){Ve[_]=Me[t],He[_]=Ne[t],Ue[_]=Pe[t];continue}}}let b=p;if(B!==0){if(h-p<=B||!e.startsWith(te,p)){Ve[_]=Ge,Ie(y,e,p,h,v,Ge,0,0);continue}b=p+B}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let T=C>=b?C+1:b,E=T,D=h,O=!1,k=0;D>E&&e.charCodeAt(D-1)===33?(O=!0,D--):D>E&&e.charCodeAt(E)===33&&(O=!0,E++,k=1);let A=-1;w>T&&(A=w+k,A>=D&&(A=-1));let M=E;D-E>1&&e.charCodeAt(E)===45&&(M=E+1);let P=0,F=0,I=0,L=-1,R=0;(l[0]>=0||N[0]===1)&&($e[0]=0,et[0]=M,R=1);let z=Ke,ee=0;for(let t=M;t<D;t++)if(t===A&&(z=F<I?Ke:P,ee=R),P!==Ke){let n=e.charCodeAt(t),r=-1;if(F<I)o.charCodeAt(F)===n?(F++,F===I&&(r=P=L)):P=Ke;else{let e=i[P],t=i[P+1],c=Ke;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(F=e+1,I=a[i+1],L=s[i],c=P);break}}P=c}if(r>=0&&(l[r]>=0||N[r]===1)&&t+1<D&&e.charCodeAt(t+1)===45){if(R===Ze){Ze*=2;let e=new Int32Array(Ze);e.set($e),$e=e;let t=new Int32Array(Ze);t.set(et),et=t}$e[R]=r,et[R]=t+2,R++}}A===D&&(z=F<I?Ke:P,ee=R);let V=F<I?Ke:P,H,U=!1;if(A>=0){if(U=!0,H=it(e,E,A,z,ee),H!==Ge&&H<r&&j[H]){let t=it(e,E,D,V,R);t!==Ge&&t!==H&&(H=t,U=!1)}else H===Ge&&(H=it(e,E,D,V,R),U=!1)}else H=it(e,E,D,V,R);let W=0,G=0;H===Ge?Ve[_]=Ge:(G=+!!U,W=b>=C?+!!O:ve(ye,e,b,C,+!!O,e=>Ce(e,O)),Ve[_]=H,Ue[_]=G,He[_]=W),Ie(y,e,p,h,v,H,W,G)}if(n===0)return``;if(n===1)return ze[0]===0&&Be[0]===t?e:e.slice(ze[0],Be[0]);if(n*k>Y){for(;n*k>Y;)Y<<=1,nt--;rt=new Float64Array(Y),X=new Int32Array(Y)}if(xe>=Oe||Te>=Oe)throw Error(`cn: too many distinct classes in one merge`);Z=Z+1|0,Z===0&&(tt.fill(0),X.fill(0),Z=1);let f=!1;for(let e=n-1;e>=0;e--){let t=Ve[e];if(t===Ge){Ye[e]=1;continue}let n=He[e];if(Q(n,t)===1)Ye[e]=0,f=!0;else if(Ye[e]=1,t<r){let r=D[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)Q(n,x[e]);if(Ue[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&Q(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!Ye[m]){m++;continue}let t=ze[m],r=Be[m],i=m+1;for(;i<n&&Ye[i]&&ze[i]===r+1&&e.charCodeAt(r)===32;)r=Be[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},ot=16384,st=new Int32Array(ot*2),ct=0,$=1,lt=Object.create(null),ut=Object.create(null),dt=new Map,ft=new Map,pt=0,mt=0,ht=()=>{ct^=ot,$=$+1|0,mt=0},gt=e=>{let t=lt[e];if(t!==void 0)return t;let n=Je(e,0,e.length),r=(n&16383)+ct,i=st[r]===(n^$)||st[r^ot]===(n^$-1);return i&&(t=ut[e],t!==void 0)?(lt[e]=t,t):(t=at(e),i?(lt[e]=t,++pt>z&&(pt=0,ut=lt,lt=Object.create(null),ht())):(st[r]=n^$,++mt>ot&&ht()),t)},_t=e=>{let t=dt.get(e);if(t!==void 0)return t;let n=Je(e,0,e.length),r=(n&16383)+ct,i=st[r]===(n^$)||st[r^ot]===(n^$-1);return i&&(t=ft.get(e),t!==void 0)?(dt.set(e,t),t):(t=at(e),i?(dt.set(e,t),++pt>z&&(pt=0,ft=dt,dt=new Map,ht())):(st[r]=n^$,++mt>ot&&ht()),t)},vt=e=>{let t=Je(e,0,e.length),n=(t&16383)+ct;return st[n]===(t^$)||st[n^ot]===(t^$-1)||(st[n]=t^$,++mt>ot&&ht(),!1)},yt=z===0?at:We?e=>{let t=dt.get(e);return t===void 0?_t(e):t}:gt;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?yt(arguments[0]):yt(Qe.apply(null,arguments))},mergeString:yt,seenBefore:z===0?()=>!1:vt,mergeUncached:at}},Xe=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:Xe(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},Ze=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:Xe(i,t);a&&(n&&(n+=` `),n+=a)}return n},Qe=function(){return Ze(arguments,!1)},$e=256,et=16,tt=1024,Y=4096,nt=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=null,l=[],u=[],d=0,f=(t,n,r)=>{c===null&&(c=Array(Y).fill(``),l=Array(Y).fill(``),u=Array(Y).fill(``));let i=Je(t,0,t.length)&4094;if(c[i]===t&&l[i]===n)return u[i];if(c[i|1]===t&&l[i|1]===n)return u[i|1];let a=e(r?n+` `+t:t),o=c[i]===``?i:i|(c[i|1]===``?1:d++&1);return c[o]=t,l[o]=n,u[o]=a,a},p=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},m=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},h=(t,c)=>{let l=t.length,u=s===null?null:s.n;if(!c){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let d=``,p=-1,h=0,g=!1;for(let e=0;e<l;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=Xe(n,!0),!n)continue;g=!0}p<0&&(d=n,p=e),h++}}if(h===0)return``;if(h===1)return e(d);if(g){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let _=i.get(d);_===void 0&&(_=a.get(d),_!==void 0&&i.set(d,_));let v=null;if(_!==void 0){if(_.skip>0){_.skip--,s=null;let e=d;for(let n=p+1;n<l;n++){let r=t[n];r&&(e+=` `+r)}return f(e,``,!1)}let e=_.e;outer:for(let n=0;n<e.length;n++){let r=e[n];if(r.t!==h)continue;let i=r.a,a=1;for(let e=p+1;e<l;e++){let n=t[e];if(n&&n!==i[a++])continue outer}v=r;break}v!==null&&(_.miss=0)}if(v===null){let s=d,c=[d];for(let e=p+1;e<l;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);v={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},_===void 0?i.set(d,_={e:[],miss:0,skip:0,at:0}):++_.miss>et&&(_.miss=et,_.skip=tt,_.e.length=0,_.at=0);let u=_.e;u.length<$e?u.push(v):(u[_.at]=v,_.at=_.at+1&255),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==v&&(s.n=v),s=v,v.r},g=t=>Array.isArray(t)?h(t.slice(),!1):e(Xe(t,!0));return function(t,n,r){let a=arguments.length;if((a|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&p(i,t,n,r))return s=i,i.r;if(e!==i&&p(e,t,n,r))return e.r}if(a===2&&typeof n==`string`&&n!==``){let e=i.get(t);if(e!==void 0&&e.skip>0)return e.skip--,s=null,f(n,t,!0)}return h([t,n,r],!0)}if(a===1)return typeof t==`string`?e(t):g(t);let o=s;if(o!==null){let e=o.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<a;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(o!==e){let e=o.a,t=0,n=!0;for(let r=0;r<a;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===o.t)return o.r}}let c=[];for(let e=0;e<a;e++)c.push(arguments[e]);return h(c,!0)}},rt=Ye(Ue),X=nt(rt.mergeString,rt);rt.merge;var Z=e(i(),1),Q=e(m(),1),it=()=>{throw Error("You need to wrap your application inside `FrameworkProvider`.")},at=(0,Z.createContext)({useParams:it,useRouter:it,usePathname:it});function ot(e){let{Image:t}=(0,Z.use)(at);if(!t){let{src:t,alt:n,priority:r,...i}=e;return(0,Q.jsx)(`img`,{alt:n,src:t,fetchPriority:r?`high`:`auto`,...i})}return(0,Q.jsx)(t,{...e})}function st(e){let{Link:t}=(0,Z.use)(at);if(!t){let{href:t,prefetch:n,...r}=e;return(0,Q.jsx)(`a`,{href:t,...r})}return(0,Q.jsx)(t,{...e})}function ct({ref:e,href:t=`#`,external:n=!!(t.match(/^\w+:/)||t.startsWith(`//`)),prefetch:r,children:i,...a}){return n?(0,Q.jsx)(`a`,{ref:e,href:t,rel:`noreferrer noopener`,target:`_blank`,...a,children:i}):(0,Q.jsx)(st,{ref:e,href:t,prefetch:r,...a,children:i})}function $(e){return(0,Q.jsx)(`div`,{...e,className:X(`grid grid-cols-2 gap-3 @container`,e.className),children:e.children})}function lt({icon:e,title:t,description:n,...r}){let i=r.href?ct:`div`;return(0,Q.jsxs)(i,{...r,"data-card":!0,className:X(`block rounded-xl border bg-fd-card p-4 text-fd-card-foreground transition-colors @max-lg:col-span-full`,r.href&&`hover:bg-fd-accent/80`,r.className),children:[e?(0,Q.jsx)(`div`,{className:`not-prose mb-2 w-fit shadow-md rounded-lg border bg-fd-muted p-1.5 text-fd-muted-foreground [&_svg]:size-4`,children:e}):null,(0,Q.jsx)(`h3`,{className:`not-prose mb-1 text-sm font-medium`,children:t}),n?(0,Q.jsx)(`p`,{className:`my-0! text-sm text-fd-muted-foreground`,children:n}):null,(0,Q.jsx)(`div`,{className:`text-sm text-fd-muted-foreground prose-no-margin empty:hidden`,children:r.children})]})}var ut=`size-5 -me-0.5 fill-(--callout-color) text-fd-card`;function dt({children:e,title:t,...n}){return(0,Q.jsxs)(pt,{...n,children:[t&&(0,Q.jsx)(mt,{children:t}),(0,Q.jsx)(ht,{children:e})]})}function ft(e){return e===`warn`?`warning`:e===`tip`?`info`:e}function pt({type:e=`info`,icon:t,children:n,className:r,style:i,...a}){let o=ft(e);return(0,Q.jsxs)(`div`,{className:X(`flex gap-2 my-4 rounded-xl border bg-fd-card p-3 ps-1 text-sm text-fd-card-foreground`,r),style:{"--callout-color":`var(--color-fd-${o}, var(--color-fd-muted))`,...i},...a,children:[(0,Q.jsx)(`div`,{role:`none`,className:`w-0.5 bg-(--callout-color)/50 rounded-sm`}),t??{info:(0,Q.jsx)(le,{className:ut}),warning:(0,Q.jsx)(B,{className:ut}),error:(0,Q.jsx)(K,{className:ut}),success:(0,Q.jsx)(W,{className:ut}),idea:(0,Q.jsx)(de,{className:`size-5 -me-0.5 fill-(--callout-color) text-(--callout-color)`})}[o],(0,Q.jsx)(`div`,{className:`flex flex-col gap-2 min-w-0 flex-1`,children:n})]})}function mt({children:e,className:t,...n}){return(0,Q.jsx)(`p`,{className:X(`font-medium my-0!`,t),...n,children:e})}function ht({children:e,className:t,...n}){return(0,Q.jsx)(`div`,{className:X(`text-fd-muted-foreground prose-no-margin empty:hidden`,t),...n,children:e})}var gt=`bg-fd-primary text-fd-primary-foreground hover:bg-fd-primary/80`,_t={default:gt,primary:gt,outline:`border hover:bg-fd-accent hover:text-fd-accent-foreground`,ghost:`hover:bg-fd-accent hover:text-fd-accent-foreground`,secondary:`border bg-fd-secondary text-fd-secondary-foreground hover:bg-fd-accent hover:text-fd-accent-foreground`},vt=T(`inline-flex items-center justify-center rounded-md p-2 text-sm font-medium transition-colors duration-100 disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring`,{variants:{variant:_t,color:_t,size:{sm:`gap-1 px-2 py-1.5 text-xs`,icon:`p-1.5 [&_svg]:size-5`,"icon-sm":`p-1.5 [&_svg]:size-4.5`,"icon-xs":`p-1 [&_svg]:size-4`}}});function yt(e){let[t,n]=(0,Z.useState)(!1),r=(0,Z.useRef)(e),i=(0,Z.useRef)(null);r.current=e;let a=(0,Z.useCallback)(()=>{i.current&&window.clearTimeout(i.current),Promise.resolve(r.current()).then(()=>{n(!0),i.current=window.setTimeout(()=>{n(!1)},1500)})},[]);return(0,Z.useEffect)(()=>()=>{i.current&&window.clearTimeout(i.current)},[]),[t,a]}var bt=(0,Z.createContext)({}),xt=/\\?\{([^}]+)\}/g;function St({note:e}={}){let t=(0,Z.use)(bt);return(0,Z.useMemo)(()=>Ct(t,{note:e}),[t,e])}function Ct(e,{note:t}={}){let n=(n,r={})=>{let{note:i,variables:a}=r,o=[];t&&o.push(t),i&&o.push(i);let s=e[wt(n,o)]??n;return a&&(s=s.replaceAll(xt,(e,t)=>e[0]===`\\`?e.slice(1):t in a?a[t]:e)),s};return n.jsx=(n,r={})=>{let{note:i,variables:a,tags:o}=r,s=[];t&&s.push(t),i&&s.push(i);let c=e[wt(n,s)]??n;return o?Dt(c,a,o):a?Tt(c,a):c},n.translations=e,n}function wt(e,t){return e+t.map(e=>`(${e})`).join(``)}function Tt(e,t){let n=0,r=[];for(let i of e.matchAll(xt)){let[a,o]=i;n<i.index&&r.push(e.slice(n,i.index)),n=i.index+a.length,a[0]===`\\`?r.push(a.slice(1)):o in t?r.push(kt(t[o],n)):r.push(a)}return r.push(e.slice(n)),r}var Et=/\\?<([^>]+)>/g;function Dt(e,t,n){let r=[{children:[]}],i=0,a=()=>{let e=r.pop();r[r.length-1].children.push(kt(e.tag&&n[e.tag]?Ot(n[e.tag],e.children):e.children,i))};for(let o of e.matchAll(Et)){let s=r[r.length-1],[c,l]=o;if(i<o.index){let n=e.slice(i,o.index);s.children.push(t?Tt(n,t):n)}if(i=o.index+c.length,c[0]===`\\`){let e=c.slice(1);s.children.push(t?Tt(e,t):e)}else if(l[0]===`/`){let e=l.slice(1);s.tag===e?a():s.children.push(t?Tt(c,t):c)}else if(l.at(-1)===`/`){let e=l.slice(0,-1);n[e]&&s.children.push(kt(Ot(n[e]),i))}else r.push({children:[],tag:l})}if(i<e.length){let n=e.slice(i);r[r.length-1].children.push(t?Tt(n,t):n)}for(;r.length>1;)a();return r[0].children}function Ot(e,t){return(0,Z.isValidElement)(e)?t===void 0?e:(0,Z.cloneElement)(e,void 0,t):e(t)}function kt(e,t){return(0,Z.isValidElement)(e)?(0,Z.cloneElement)(e,{key:t}):e}function At({as:e,...t}){let n=e??`h1`,r=St({note:`heading anchor`}),[i,a]=yt(()=>{if(!t.id)return;let e=new URL(window.location.href);return e.hash=t.id,navigator.clipboard.writeText(e.href)});return t.id?(0,Q.jsxs)(n,{...t,className:X(`group/heading flex scroll-m-28 flex-row items-center gap-1`,t.className),children:[(0,Q.jsx)(`a`,{"data-card":``,href:`#${t.id}`,children:t.children}),(0,Q.jsxs)(`button`,{"aria-live":`polite`,className:X(vt({variant:`ghost`,size:`icon-xs`}),`not-prose shrink-0 text-fd-muted-foreground opacity-0 transition-opacity group-hover/heading:opacity-100`),onClick:a,children:[i?(0,Q.jsx)(ae,{}):(0,Q.jsx)(pe,{}),(0,Q.jsx)(`span`,{className:`sr-only`,children:r(i?`Copied Anchor Link`:`Copy Anchor Link`,{note:`aria-label`})})]})]}):(0,Q.jsx)(n,{...t})}function jt(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e&&(e.current=t)})}}var Mt=Z.createContext(void 0);function Nt(){let e=Z.useContext(Mt);if(e===void 0)throw Error(P(64));return e}var Pt=`data-activation-direction`,Ft={tabActivationDirection:e=>({[Pt]:e})},It=Z.forwardRef(function(e,t){let{className:n,defaultValue:i=0,onValueChange:a,orientation:s=`horizontal`,render:c,value:l,style:u,...d}=e,f=e.defaultValue!==void 0,p=Z.useRef([]),[m,h]=Z.useState(()=>new Map),[_,v]=y({controlled:l,default:i,name:`Tabs`,state:`value`}),S=l!==void 0,[C,w]=Z.useState(()=>new Map),T=Z.useRef(void 0),E=Z.useCallback(e=>Lt(C,e),[C]),[O,k]=Z.useState(()=>({previousValue:_,tabActivationDirection:`none`})),{previousValue:A,tabActivationDirection:j}=O,M=j,N=!1;A!==_&&(M=Rt(A,_,s,C),N=A!=null&&_!=null&&E(_)==null);let P=N?A:_,I=A!==P||j!==M;b(()=>{I&&k({previousValue:P,tabActivationDirection:M})},[P,I,M]);let L=D((e,t)=>{t.activationDirection=Rt(_,e,s,C),a?.(e,t),t.isCanceled||v(()=>e)}),R=D((e,t)=>{a?.(e,r(t,void 0,void 0,{activationDirection:`none`}))}),ee=D((e,t)=>(h(n=>{let r=new Map(n);return r.set(e,t),r}),()=>{h(n=>{if(n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})})),te=Z.useCallback(e=>m.get(e),[m]),B=Z.useCallback(e=>{for(let t of C.values())if(e===t.value)return t.id},[C]),V=Z.useMemo(()=>({getTabElementBySelectedValue:E,getTabIdByPanelValue:B,getTabPanelIdByValue:te,onValueChange:L,orientation:s,registerMountedTabPanel:ee,setTabMap:w,tabActivationDirection:M,value:_}),[E,B,te,L,s,ee,w,M,_]),H=Z.useMemo(()=>{for(let e of C.values())if(e.value===_)return e},[C,_]),U=Z.useMemo(()=>{for(let e of C.values())if(!e.disabled)return e.value},[C]),W=Z.useRef(!f),G=Z.useRef(i),K=Z.useRef(f),ne=Z.useRef(!1);b(()=>{if(S)return;function e(e,t){v(()=>e),k({previousValue:e,tabActivationDirection:`none`}),R(e,t),W.current=!1}if(C.size===0){ne.current&&_!==null&&!T.current?.isConnected&&e(null,z);return}ne.current=!0,T.current=C.keys().next().value;let t=H?.disabled,n=H==null&&_!==null;if(!t&&_===G.current&&(K.current=!1),K.current&&t&&_===G.current)return;let r=W.current;if(t||n){let n=U??null;if(_===n){W.current=!1;return}let i=z;r?i=x:t&&(i=F),e(n,i)}else r&&H!=null&&(R(_,x),W.current=!1)},[U,S,R,H,v,C,_]);let re=o(`div`,e,{state:{orientation:s,tabActivationDirection:M},ref:t,props:d,stateAttributesMapping:Ft});return(0,Q.jsx)(Mt.Provider,{value:V,children:(0,Q.jsx)(g,{elementsRef:p,children:re})})});function Lt(e,t){for(let[n,r]of e.entries())if(t===r.value)return n;return null}function Rt(e,t,n,r){if(e==null||t==null)return`none`;let[i,a,o]=n===`horizontal`?[`left`,`left`,`right`]:[`top`,`up`,`down`],s=Lt(r,e),c=Lt(r,t);if(s==null||c==null)return s!==c&&(typeof e==`number`||typeof e==`string`)&&typeof e==typeof t?t>e?o:a:`none`;let l=s.getBoundingClientRect()[i],u=c.getBoundingClientRect()[i];return u<l?a:u>l?o:`none`}var zt=Z.createContext(void 0);function Bt(){let e=Z.useContext(zt);if(e===void 0)throw Error(P(65));return e}var Vt=Z.forwardRef(function(e,n){let{className:i,disabled:a=!1,render:s,value:c,id:l,nativeButton:f=!0,style:p,...m}=e,{value:h,getTabPanelIdByValue:g,onValueChange:v,orientation:y,tabActivationDirection:x}=Nt(),{activateOnFocus:S,registerTabResizeObserverElement:C,tabsListElement:w}=Bt(),{highlightedIndex:T,onHighlightedIndexChange:E}=A(),M=d(l),N=Z.useMemo(()=>({disabled:a,id:M,value:c}),[a,M,c]),{compositeProps:P,compositeRef:F,index:I}=k({metadata:N}),L=c===h,R=Z.useRef(!1),z=Z.useRef(null),ee=D(e=>{z.current?.(),z.current=e?C(e):null});b(()=>{if(R.current){R.current=!1;return}if(!(L&&I>-1&&T!==I))return;let e=w;if(e!=null){let n=u(_(e));if(n&&t(e,n))return}a||E(I)},[L,I,T,E,a,w]);let{getButtonProps:B,buttonRef:V}=j({disabled:a,native:f,focusableWhenDisabled:!0}),H=g(c),U=Z.useRef(!1),W=Z.useRef(!1);function G(e){v(c,r(te,e.nativeEvent,void 0,{activationDirection:`none`}))}function K(e){L||a||G(e)}function ne(e){L||a||S&&(!U.current||W.current)&&G(e)}function re(e){if(L||a)return;U.current=!0,W.current=e.button===0;let t=_(e.currentTarget);function n(){U.current=!1,W.current=!1,t.removeEventListener(`pointerup`,n),t.removeEventListener(`pointercancel`,n)}t.addEventListener(`pointerup`,n),t.addEventListener(`pointercancel`,n)}return o(`button`,e,{state:{disabled:a,active:L,orientation:y,tabActivationDirection:x},ref:[n,V,F,ee],props:[P,{role:`tab`,"aria-controls":H,"aria-selected":L,id:M,onClick:K,onFocus:ne,onPointerDown:re,[O]:L?``:void 0,onKeyDownCapture(){R.current=!0}},m,B],stateAttributesMapping:Ft})}),Ht=`data-index`,Ut={...Ft,...E},Wt=Z.forwardRef(function(e,t){let{className:r,value:i,render:a,keepMounted:s=!1,style:c,...l}=e,{value:u,getTabIdByPanelValue:p,orientation:m,tabActivationDirection:h,registerMountedTabPanel:g}=Nt(),_=d(),{ref:y,index:x}=N(),S=i===u,{mounted:C,transitionStatus:w,setMounted:T}=f(S),E=!C,D=p(i),O={hidden:E,orientation:m,tabActivationDirection:h,transitionStatus:w},k=Z.useRef(null),A=o(`div`,e,{state:O,ref:[t,y,k],props:[{"aria-labelledby":D,hidden:E,id:_,role:`tabpanel`,tabIndex:S?0:-1,inert:v(!S),[Ht]:x},l],stateAttributesMapping:Ut});return n({open:S,ref:k,onComplete(){S||T(!1)}}),b(()=>{if(!(_==null||E&&!s))return g(i,_)},[E,s,i,_,g]),s||C?A:null}),Gt=Z.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,style:o,...s}=e,{orientation:l,setTabMap:u,tabActivationDirection:d}=Nt(),[f,p]=Z.useState(0),[m,h]=Z.useState(null),g=Z.useRef(new Set),_=Z.useRef(new Set),v=Z.useRef(null);b(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{g.current.forEach(e=>{e()})});return v.current=e,m&&e.observe(m),_.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),v.current=null}},[m]);let y=D(e=>(g.current.add(e),()=>{g.current.delete(e)})),x=D(e=>(_.current.add(e),v.current?.observe(e),()=>{_.current.delete(e),v.current?.unobserve(e)})),S={orientation:l,tabActivationDirection:d},C={"aria-orientation":l===`vertical`?`vertical`:void 0,role:`tablist`},w=Z.useMemo(()=>({activateOnFocus:n,registerIndicatorUpdateListener:y,registerTabResizeObserverElement:x,tabsListElement:m}),[n,y,x,m]);return(0,Q.jsx)(zt.Provider,{value:w,children:(0,Q.jsx)(I,{render:a,className:r,style:o,state:S,refs:[t,h],props:[C,s],stateAttributesMapping:Ft,highlightedIndex:f,enableHomeAndEndKeys:!0,loopFocus:i,orientation:l,onHighlightedIndexChange:p,onMapChange:u,disabledIndices:c})})}),Kt=new Map,qt=(0,Z.createContext)(null);function Jt(){let e=(0,Z.use)(qt);if(!e)throw Error(`You must wrap your component in <Tabs>`);return e}var Yt=Gt;function Xt({value:e,ref:t,...n}){let{triggers:r}=Jt();return(0,Q.jsx)(Vt,{ref:jt(t,t=>{t?r.add(e):r.delete(e)}),value:e,...n})}function Zt({ref:e,groupId:t,persist:n=!1,updateAnchor:r=!1,defaultValue:i,value:a,onValueChange:o,...s}){let c=(0,Z.useRef)(null),l=(0,Z.useMemo)(()=>new Map,[]),u=(0,Z.useMemo)(()=>new Map,[]),d=(0,Z.useMemo)(()=>new Set,[]),[f,p]=a===void 0?(0,Z.useState)(i):[a,e=>o?.(e)],m=(0,Z.useEffectEvent)(e=>{d.has(e)&&p(e)}),h=(0,Z.useEffectEvent)(()=>{let e=window.location.hash.slice(1);if(!e)return;for(let[t,n]of l.entries())if(n===e){p(t),c.current?.scrollIntoView();return}let t=document.getElementById(e);if(t){for(let[e,n]of u.entries())if(n.contains(t)){p(e),requestAnimationFrame(()=>t.scrollIntoView());return}}});return(0,Z.useLayoutEffect)(()=>{if(!t)return;let e=sessionStorage.getItem(t);n&&(e??=localStorage.getItem(t)),e&&m(e);let r=Kt.get(t)??new Set;return r.add(m),Kt.set(t,r),()=>{r.delete(m)}},[t,n]),(0,Z.useLayoutEffect)(()=>(h(),window.addEventListener(`hashchange`,h),()=>window.removeEventListener(`hashchange`,h)),[]),(0,Q.jsx)(It,{ref:jt(e,c),value:f,onValueChange:e=>{if(r){let t=l.get(e);t&&window.history.replaceState(null,``,`#${t}`)}if(t){let r=Kt.get(t);if(r)for(let t of r)t(e);sessionStorage.setItem(t,e),n&&localStorage.setItem(t,e)}else p(e)},...s,children:(0,Q.jsx)(qt,{value:(0,Z.useMemo)(()=>({valueToIdMap:l,panels:u,triggers:d}),[l,u,d]),children:s.children})})}function Qt({value:e,ref:t,...n}){let{valueToIdMap:r,panels:i}=Jt();return n.id&&r.set(e,n.id),(0,Q.jsx)(Wt,{ref:jt(t,t=>{t?i.set(e,t):i.delete(e)}),value:e,...n,children:n.children})}var $t=(0,Z.createContext)(null);function en(e){return(0,Q.jsx)(`pre`,{...e,className:X(`min-w-full w-max *:flex *:flex-col`,e.className),children:e.children})}function tn({ref:e,title:t,allowCopy:n=!0,keepBackground:r=!1,icon:i,viewportProps:a={},children:o,Actions:s=e=>(0,Q.jsx)(`div`,{...e,className:X(`empty:hidden`,e.className)}),...c}){let l=(0,Z.use)($t)!==null,u=(0,Z.useRef)(null);return n===`true`?n=!0:n===`false`&&(n=!1),(0,Q.jsxs)(`figure`,{ref:e,dir:`ltr`,...c,tabIndex:-1,className:X(l?`bg-fd-secondary -mx-px -mb-px last:rounded-b-xl`:`my-4 bg-fd-card rounded-xl`,r&&`bg-(--shiki-light-bg) dark:bg-(--shiki-dark-bg)`,`shiki relative border not-prose overflow-hidden text-sm`,c.className),children:[t?(0,Q.jsxs)(`div`,{className:`flex text-fd-muted-foreground items-center gap-2 h-9.5 border-b px-4`,children:[typeof i==`string`?(0,Q.jsx)(`div`,{className:`[&_svg]:size-3.5`,dangerouslySetInnerHTML:{__html:i}}):i,(0,Q.jsx)(`figcaption`,{className:`flex-1 truncate`,children:t}),s({className:`-me-2`,children:n&&(0,Q.jsx)(nn,{containerRef:u})})]}):s({className:`absolute top-2 right-2 z-2 backdrop-blur-lg rounded-lg text-fd-muted-foreground`,children:n&&(0,Q.jsx)(nn,{containerRef:u})}),(0,Q.jsx)(`div`,{ref:u,...a,role:`region`,tabIndex:0,className:X(`text-[0.8125rem] py-3.5 overflow-auto max-h-[600px] fd-scroll-container focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-fd-ring`,a.className),style:{"--padding-right":t?void 0:`calc(var(--spacing) * 8)`,counterSet:c[`data-line-numbers`]?`line ${Number(c[`data-line-numbers-start`]??1)-1}`:void 0,...a.style},children:o})]})}function nn({className:e,containerRef:t,...n}){let r=St({note:`code block`}),[i,a]=yt(()=>{let e=t.current?.getElementsByTagName(`pre`).item(0);if(!e)return;let n=e.cloneNode(!0);return n.querySelectorAll(`.nd-copy-ignore`).forEach(e=>{e.replaceWith(`
|
|
2
|
+
`)}),navigator.clipboard.writeText(n.textContent??``)});return(0,Q.jsxs)(`button`,{type:`button`,"data-checked":i||void 0,className:X(vt({className:`hover:text-fd-accent-foreground data-checked:text-fd-accent-foreground`,size:`icon-xs`}),e),"aria-live":`polite`,onClick:a,...n,children:[i?(0,Q.jsx)(h,{}):(0,Q.jsx)(re,{}),(0,Q.jsx)(`span`,{className:`sr-only`,children:r(i?`Copied Text`:`Copy Text`,{note:`aria-label`})})]})}function rn({ref:e,className:t,...n}){let r=(0,Z.useRef)(null),i=(0,Z.use)($t)!==null;return(0,Q.jsx)(Zt,{ref:jt(r,e),...n,className:e=>X(`bg-fd-card rounded-xl border`,!i&&`my-4`,typeof t==`function`?t(e):t),children:(0,Q.jsx)($t,{value:(0,Z.useMemo)(()=>({containerRef:r,nested:i}),[i]),children:n.children})})}function an({className:e,...t}){return(0,Q.jsx)(Yt,{...t,className:t=>X(`flex flex-row px-2 overflow-x-auto text-fd-muted-foreground`,typeof e==`function`?e(t):e),children:t.children})}function on({children:e,className:t,...n}){return(0,Q.jsxs)(Xt,{...n,className:e=>X(`relative group inline-flex text-sm font-medium text-nowrap items-center transition-colors gap-2 px-2 py-1.5 [&_svg]:size-3.5`,e.active?`text-fd-primary`:`hover:text-fd-accent-foreground`,typeof t==`function`?t(e):t),children:[(0,Q.jsx)(`div`,{className:`absolute inset-x-2 bottom-0 h-px group-data-active:bg-fd-primary`}),e]})}function sn(e){return(0,Q.jsx)(Qt,{...e})}function cn(e){return(0,Q.jsx)(ot,{sizes:`(max-width: 768px) 100vw, (max-width: 1200px) 70vw, 900px`,...e,className:X(`rounded-lg`,e.className)})}function ln(e){return(0,Q.jsx)(`div`,{className:`relative overflow-auto prose-no-margin my-6`,tabIndex:0,children:(0,Q.jsx)(`table`,{...e})})}var un={CodeBlockTab:sn,CodeBlockTabs:rn,CodeBlockTabsList:an,CodeBlockTabsTrigger:on,pre:e=>(0,Q.jsx)(tn,{...e,children:(0,Q.jsx)(en,{children:e.children})}),Card:lt,Cards:$,a:ct,img:cn,h1:e=>(0,Q.jsx)(At,{as:`h1`,...e}),h2:e=>(0,Q.jsx)(At,{as:`h2`,...e}),h3:e=>(0,Q.jsx)(At,{as:`h3`,...e}),h4:e=>(0,Q.jsx)(At,{as:`h4`,...e}),h5:e=>(0,Q.jsx)(At,{as:`h5`,...e}),h6:e=>(0,Q.jsx)(At,{as:`h6`,...e}),table:ln,Callout:dt,CalloutContainer:pt,CalloutTitle:mt,CalloutDescription:ht};function dn(e){let{open:t,defaultOpen:n=!1,onOpenChange:i,disabled:a}=e,[o,s]=y({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:c,setMounted:l,transitionStatus:u}=f(o,!0,!0),m=d(),[h,g]=Z.useState(),_=h===null?void 0:h??m,v=D(e=>{let t=!o,n=r(p,e.nativeEvent);i(t,n),n.isCanceled||s(t)});return Z.useMemo(()=>({defaultPanelId:m,disabled:a,handleTrigger:v,mounted:c,open:o,panelId:_,setMounted:l,setOpen:s,setPanelIdState:g,transitionStatus:u}),[m,a,v,c,o,_,l,s,g,u])}var fn=Z.createContext(void 0);function pn(){let e=Z.useContext(fn);if(e===void 0)throw Error(P(15));return e}var mn=`data-open`,hn=`data-closed`,gn=w,_n=`data-panel-open`,vn={[mn]:``},yn={[hn]:``},bn={open(e){return e?{[_n]:``}:null}},xn={open(e){return e?vn:yn}},Sn={...xn,...E},Cn=Z.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:s,open:c,style:l,...u}=e,d=D(s),f=dn({open:c,defaultOpen:i,onOpenChange:d,disabled:a}),p=Z.useMemo(()=>({open:f.open,disabled:f.disabled,transitionStatus:f.transitionStatus}),[f.open,f.disabled,f.transitionStatus]),m=Z.useMemo(()=>({...f,onOpenChange:d,state:p}),[f,d,p]),h=o(`div`,e,{state:p,ref:t,props:u,stateAttributesMapping:Sn});return(0,Q.jsx)(fn.Provider,{value:m,children:h})}),wn={...bn,...E},Tn=Z.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:s}=pn(),{className:c,disabled:l=s,render:u,nativeButton:d=!0,style:f,...p}=e,{getButtonProps:m,buttonRef:h}=j({disabled:l,native:d});return o(`button`,e,{state:a,ref:[t,h],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},p,m],stateAttributesMapping:wn})}),En={height:void 0,width:void 0};function Dn(e){let{externalRef:t,hiddenUntilFound:i,id:a,keepMounted:o,mounted:s,onOpenChange:c,open:u,setMounted:d,setOpen:f,transitionStatus:p}=e,m=Z.useRef(null),h=Z.useRef(null),[g,_]=Z.useState(En),v=Z.useRef(En),y=Z.useRef(!1),x=Z.useRef(u),w=Z.useRef(!1),[T,E]=Z.useState(!1),O=Z.useRef(null),k=l(t,m),A=M(u),j=ee(m),N=!u&&!s,P=T?`idle`:p,F=u&&(x.current||w.current),I=!u&&s&&h.current===`css-animation`&&g.height===void 0&&g.width===void 0?v.current:g,R=i&&N&&h.current!==`css-animation`,z=D((e,t=!0)=>{t&&(v.current=e),_(e)}),B=D(()=>{O.current?.(),O.current=null}),V=D(e=>{B(),O.current=()=>{O.current=null,e()}}),H=D(()=>{u&&s&&h.current===`css-animation`&&(w.current=!0)});b(()=>{T&&p!==`starting`&&E(!1)},[T,p]),Z.useEffect(()=>()=>{H(),B()},[H,B]),b(()=>{u||(x.current=!1,w.current=!1);let e=m.current;if(!e)return;!u&&O.current&&B();let t=kn(e,F);if(h.current=t,u&&p===`idle`&&x.current&&t===`css-animation`){v.current=On(e);return}if(u&&p===`starting`){let n=y.current;if(y.current=!1,t===`none`){z(On(e)),E(!0);return}if(t===`css-transition`){let t=Mn(e);if(z(On(e)),!n)return t;let r=jn(e,`transition-duration`,`0s`);return V(r),E(!0),t}z(On(e));let r=jn(e,`animation-name`,`none`);if(!n){r();return}let i=jn(e,`animation-duration`,`0s`);r(),V(i),E(!0);return}if(!u&&s&&(p===`idle`||p===`starting`)){if(t===`none`){z(En,!1),d(!1);return}z(On(e));return}if(p!==`ending`)return;if(t===`none`){d(!1);return}let n=On(e);n.height>0||n.width>0?(z(n),t===`css-animation`&&jn(e,`animation-name`,`none`)()):d(!1)},[s,u,B,z,d,V,F,p]),n({enabled:u&&s&&P===`idle`,open:!0,ref:m,onComplete(){u&&z(En,!1)}}),Z.useEffect(()=>{if(u||!s||P!==`ending`)return;if(!m.current){d(!1),z(En,!1);return}let e=new AbortController,t=-1;function n(){A.current||(d(!1),z(En,!1))}return t=L.request(()=>{j(n,e.signal)}),()=>{L.cancel(t),e.abort()}},[A,s,u,P,j,z,d]),b(()=>{let e=m.current;e&&i&&N&&e.setAttribute(`hidden`,`until-found`)},[N,i]),Z.useEffect(function(){let e=m.current;if(!e)return;let t=S.create(),n=-1,i=(r,i)=>{t.start(0,()=>{A.current||(n=L.request(()=>{A.current||(r&&(y.current=!1),i&&e.setAttribute(gn,``),e.setAttribute(`hidden`,`until-found`))}))})},a=C(e,`beforematch`,t=>{let n=r(te,t);if(c(!0,n),n.isCanceled){i(!1,!1);return}y.current=!0;let a=e.hasAttribute(gn);e.removeAttribute(gn),f(!0),i(!0,a)});return()=>{t.clear(),L.cancel(n),a()}},[A,c,f]);let U=o||i||s||u;return{height:I.height,props:{...R?{[gn]:``}:void 0,hidden:N,id:a},ref:k,shouldPreventOpenAnimation:F,shouldRender:U,transitionStatus:P,width:I.width}}function On(e){return{height:e.scrollHeight,width:e.scrollWidth}}function kn(e,t){let n=R(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&An(n.animationDuration),i=An(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function An(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function jn(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{r===``?e.style.removeProperty(t):e.style.setProperty(t,r,i)}}function Mn(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})}let r=L.request(n);return()=>{L.cancel(r),n()}}var Nn=`--collapsible-panel-height`,Pn=`--collapsible-panel-width`,Fn=Z.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:c,style:l,...u}=e,{defaultPanelId:d,mounted:f,onOpenChange:p,open:m,setMounted:h,setPanelIdState:g,setOpen:_,state:v,transitionStatus:y}=pn(),x=r??!1,S=i??!1,C=c||void 0,w=C??d;b(()=>(g(e=>C??(e===null?void 0:e)),()=>{g(e=>e===C?null:e)}),[C,g]);let{height:T,props:E,ref:D,shouldPreventOpenAnimation:O,shouldRender:k,transitionStatus:A,width:j}=Dn({externalRef:t,hiddenUntilFound:x,id:w,keepMounted:S,mounted:f,onOpenChange:p,open:m,setMounted:h,setOpen:_,transitionStatus:y}),M={...v,transitionStatus:A},N=s(l,M),P=o(`div`,{...e,style:void 0},{state:M,ref:D,props:[E,{style:{[Nn]:T===void 0?`auto`:`${T}px`,[Pn]:j===void 0?`auto`:`${j}px`}},u,N?{style:N}:void 0,O?{style:{animationName:`none`}}:void 0],stateAttributesMapping:Sn});return k?P:null});export{dt as A,Nt as C,St as D,Ct as E,le as F,se as I,re as L,ot as M,X as N,yt as O,pe as P,H as R,Ft as S,At as T,Gt as _,xn as a,Bt as b,pn as c,tn as d,en as f,Xt as g,Yt as h,Cn as i,ct as j,vt as k,dn as l,Qt as m,Dn as n,bn as o,Zt as p,Tn as r,fn as s,Fn as t,un as u,Wt as v,jt as w,It as x,Vt as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,t}from"./rolldown-runtime-XKyaHtl9.js";var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return D(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function te(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function ne(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+te(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+te(a,u),c+=j(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+te(a,u++),c+=j(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return j(ne(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function re(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var N=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function ie(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,N)}catch(e){N(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function P(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else ie(P.bind(null,e))}var ae={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ae,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=P,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:re}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ie,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),r=t(((e,t)=>{t.exports=n()})),i=t((e=>{var t=r();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`),s=Symbol.for(`react.recoverable`),c=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:r===c?c:``+r,children:e,containerInfo:t,implementation:n}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.browser=function(e){return{$$typeof:s,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return l(e,t,null,r)},e.flushSync=function(e){var t=u.T,n=a.p;try{if(u.T=null,a.p=2,e)return e()}finally{u.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.1`})),a=t(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=i()})),o=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),s=t(((e,t)=>{t.exports=o()})),c=e(r(),1),l=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function u(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:l(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var d=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},f=e=>{let t=d(e);return t.charAt(0).toUpperCase()+t.slice(1)},p=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),m={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function h(e){return e!=null}function g(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??m.width,a=e.size??e.height??m.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?p(...c):p(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??m[`stroke-width`])*Number(e.size??e.width??m.width)/Number(t.size??t.width??m.width):t.strokeWidth??m[`stroke-width`];return[`svg`,{...Object.entries(m).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&h(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&h(t.width)&&{[r(`width`)]:t.width},...`height`in t&&h(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function _(e,t={}){return g(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var v=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},y=(0,c.createContext)({}),b=()=>(0,c.useContext)(y),x=(0,c.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},m)=>{let{size:h=24,strokeWidth:g=2,absoluteStrokeWidth:y=!1,nonScalingStroke:x=!1,color:S=`currentColor`,className:C=``}=b()??{},w=!!l||v(f),[T,E,D=[]]=_(d,{color:e??S,width:n??t??h,height:r??t??h,strokeWidth:i??g,absoluteStrokeWidth:a??y,nonScalingStroke:o??x,className:p(C,s),hasA11yProp:w,attributes:f});return(0,c.createElement)(T,{ref:m,...E},[...D.map(([e,t])=>(0,c.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function S(e,t=[],n=[]){let r=typeof e==`string`?u(e,t,n):e,i=(0,c.forwardRef)(({className:e,...t},n)=>(0,c.createElement)(x,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=f(r.name)),i}var C={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};C.node;var w=S(C);function T(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var E={};function D(e,t,n,r,i){if(!n&&!r&&!i&&!e)return O(t);let a=O(e);return t&&(a=k(a,t)),n&&(a=k(a,n)),r&&(a=k(a,r)),i&&(a=k(a,i)),a}function ee(e){if(e.length===0)return E;if(e.length===1)return O(e[0]);let t=O(e[0]);for(let n=1;n<e.length;n+=1)t=k(t,e[n]);return t}function O(e){return j(e)?{...e(E)}:A(e)}function k(e,t){return j(t)?t(e):te(e,t)}function A(e){let t={...e};for(let e in t){let n=t[e];ne(e,n)&&(t[e]=re(n))}return t}function te(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=T(e.style,r);break;case`className`:e[n]=ie(e.className,r);break;default:e[n]=ne(n,r)?M(e[n],r):r}}return e}function ne(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function j(e){return typeof e==`function`}function M(e,t){return t?e?(...n)=>{let r=n[0];if(P(r)){let i=r;N(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:re(t):e}function re(e){return e&&((...t)=>{let n=t[0];return P(n)&&N(n),e(...t)})}function N(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ie(e,t){return t?e?t+` `+e:t:e}function P(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}var ae={};function F(e,t){let n=c.useRef(ae);return n.current===ae&&(n.current=e(t)),n}var oe=e(a(),1);function I(e,t,n,r){let i=F(ce).current;return le(i,e,t,n,r)&&de(i,[e,t,n,r]),i.callback}function se(e){let t=F(ce).current;return ue(t,e)&&de(t,e),t.callback}function ce(){return{callback:null,cleanup:null,refs:[]}}function le(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function ue(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function de(e,t){e.refs=t,e.callback=t.every(e=>e==null)?null:n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var fe=19;function pe(e){return fe>=e}var me=e(s(),1);function he(e){if(!c.isValidElement(e))return null;let t=e,n=t.props;return(pe(19)?n?.ref:t.ref)??null}function L(){}var R=Object.freeze([]),z=Object.freeze({});function ge(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e)}else i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function _e(e,t){return typeof e==`function`?e(t):e}function ve(e,t){return typeof e==`function`?e(t):e}function ye(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=Ce(r));let i=be(t,n,r);if(n.enabled===!1)return null;let a=n.state??z;return we(e,r,i,a)}function be(e,t,n){let{className:r,style:i}=e,{state:a=z,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?_e(r,a):void 0,d=l?ve(i,a):void 0,f=l?ge(a,c):z,p=l&&s?xe(s):void 0,m=l?T(f,p)??{}:z;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?se([m.ref,he(n),...o]):I(m.ref,he(n),o):I(null,null)),l?(u!==void 0&&(m.className=ie(m.className,u)),d!==void 0&&(m.style=T(m.style,d)),m):z}function xe(e){return Array.isArray(e)?ee(e):D(void 0,e)}var Se=Symbol.for(`react.lazy`);function Ce(e){if(e?.$$typeof!==Se)return e;let t=c.Children.toArray(e)[0];return c.isValidElement(t)?t:e}function we(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=D(n,t.props);return e.ref=n.ref,c.cloneElement(t,e)}return Te(e,n)}function Te(e,t){return e===`button`?(0,c.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,c.createElement)(`img`,{alt:``,...t,key:t.key}):c.createElement(e,t)}function Ee(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=Ee(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function De(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ee(e))&&(r&&(r+=` `),r+=t);return r}var Oe=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,ke=De,Ae=(e,t)=>n=>{if(t?.variants==null)return ke(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Oe(t)||Oe(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return ke(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)};function je(){return typeof window<`u`}function Me(e){return Pe(e)?(e.nodeName||``).toLowerCase():`#document`}function B(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ne(e){return((Pe(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Pe(e){return je()?e instanceof Node||e instanceof B(e).Node:!1}function Fe(e){return je()?e instanceof Element||e instanceof B(e).Element:!1}function V(e){return je()?e instanceof HTMLElement||e instanceof B(e).HTMLElement:!1}function H(e){return!je()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof B(e).ShadowRoot}function Ie(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Le(e){return/^(table|td|th)$/.test(Me(e))}function Re(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ze=/transform|translate|scale|rotate|perspective|filter/,Be=/paint|layout|strict|content/,U=e=>!!e&&e!==`none`,Ve;function He(e){let t=Fe(e)?W(e):e;return U(t.transform)||U(t.translate)||U(t.scale)||U(t.rotate)||U(t.perspective)||!We()&&(U(t.backdropFilter)||U(t.filter))||ze.test(t.willChange||``)||Be.test(t.contain||``)}function Ue(e){let t=qe(e);for(;V(t)&&!Ge(t);){if(He(t))return t;if(Re(t))return null;t=qe(t)}return null}function We(){return Ve??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ve}function Ge(e){return/^(html|body|#document)$/.test(Me(e))}function W(e){return B(e).getComputedStyle(e)}function Ke(e){return Fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qe(e){if(Me(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||H(e)&&e.host||Ne(e);return H(t)?t.host:t}function Je(e){let t=qe(e);return Ge(t)?(e.ownerDocument||e).body:V(t)&&Ie(t)?t:Je(t)}function Ye(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Je(e),i=r===e.ownerDocument?.body,a=B(r);if(i){let e=Xe(a);return t.concat(a,a.visualViewport||[],Ie(r)?r:[],e&&n?Ye(e):[])}return t.concat(r,Ye(r,[],n))}function Xe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Ze={...c},Qe=Ze.useInsertionEffect,$e=Qe&&Qe!==Ze.useLayoutEffect?Qe:e=>e();function G(e){let t=F(et).current;return t.next=e,$e(t.effect),t.trampoline}function et(){let e={next:void 0,callback:tt,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function tt(){}var K=typeof document<`u`?c.useLayoutEffect:()=>{};function nt(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var rt=nt(`https://base-ui.com/production-error`,`Base UI`),it=c.createContext(void 0);function at(e=!1){let t=c.useContext(it);if(t===void 0&&!e)throw Error(rt(16));return t}function ot(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:c.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function st(e){return e?.ownerDocument||document}function ct(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(B(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function lt(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=c.useRef(null),s=at(!0),l=a??s!==void 0,{props:u}=ot({focusableWhenDisabled:n,disabled:t,composite:l,tabIndex:r,isNativeButton:i}),d=c.useCallback(()=>{let e=o.current;ut(e)&&l&&t&&u.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,u.disabled,l]);return K(d,[d]),{getButtonProps:c.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...c}=e;return D({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(N(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=ut(r),s=!i&&dt(r),c=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&l&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),ct(r,e))}else!c||i||!d&&!u?n&&s&&d&&e.preventDefault():e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),ct(r,e)))},onKeyUp(e){t||(N(e),a?.(e),e.target===e.currentTarget&&i&&l&&ut(e.currentTarget)&&e.key===` `?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||i||l||e.defaultPrevented||e.key!==` `||(e.preventBaseUIHandler(),ct(e.currentTarget,e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?{type:`button`}:{role:`button`},u,c)},[t,u,l,i]),buttonRef:G(e=>{o.current=e,d()})}}function ut(e){return V(e)&&e.tagName===`BUTTON`}function dt(e){return V(e)&&e.tagName===`A`&&!!e.href}function ft(e){c.useEffect(e,R)}var q=0,pt=class e{static create(){return new e}currentId=q;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=q,t()},e)}isStarted(){return this.currentId!==q}clear=()=>{this.currentId!==q&&(clearTimeout(this.currentId),this.currentId=q)};disposeEffect=()=>this.clear};function mt(){let e=F(pt.create).current;return ft(e.disposeEffect),e}function ht(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:gt,platform:_t,maxTouchPoints:vt}=ht(),yt=gt.toLowerCase(),J=_t.toLowerCase(),bt=/^i(os$|p)/.test(J)||J===`macintel`&&vt>1,xt=`android`,Y=J===xt||yt.includes(xt),St=!bt&&J.startsWith(`mac`);J.startsWith(`win`),!Y&&/^(linux|chrome os)/.test(J);var Ct=St||bt,wt=/jsdom|happydom/.test(yt);function Tt(e){e.preventDefault(),e.stopPropagation()}function Et(e){return`nativeEvent`in e}function Dt(e){return e.pointerType===``&&e.isTrusted?!0:Y&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Ot(e){return wt?!1:!Y&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(Y||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function kt(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function At(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function jt(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Mt(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&H(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Nt(e,t){let n=e;for(;n;){if(Fe(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(H(n)?n.host:null)}return null}function Pt(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var Ft=`data-base-ui-focusable`,It=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,Lt=`ArrowLeft`,Rt=`ArrowRight`,zt=`ArrowUp`,Bt=`ArrowDown`,Vt=`data-starting-style`,Ht=`data-ending-style`,Ut={[Vt]:``},Wt={[Ht]:``},Gt={transitionStatus(e){return e===`starting`?Ut:e===`ending`?Wt:null}};function Kt(e,t,n,r){let i=!1,a=!1,o=r??z;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function qt(e,t,n){let r=n??z;return{reason:e,event:t??new Event(`base-ui`),...r}}var Jt=`none`,Yt=`trigger-press`,Xt=`trigger-hover`,Zt=`trigger-focus`,Qt=`outside-press`,$t=`item-press`,en=`close-press`,tn=`input-change`,nn=`input-clear`,rn=`input-press`,an=`focus-out`,on=`escape-key`,sn=`list-navigation`,cn=`keyboard`,ln=`pointer`,un=`cancel-open`,dn=`sibling-open`,fn=`disabled`,pn=`missing`,mn=`initial`,hn=`imperative-action`,gn=`window-resize`;function _n(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function vn(e){let t=F(yn,e).current;return t.next=e,K(t.effect),t}function yn(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var bn=null;globalThis.requestAnimationFrame;var xn=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},X=class e{static create(){return new e}static request(e){return xn.request(e)}static cancel(e){return xn.cancel(e)}currentId=bn;request(e){this.cancel(),this.currentId=xn.request(()=>{this.currentId=bn,e()})}cancel=()=>{this.currentId!==bn&&(xn.cancel(this.currentId),this.currentId=bn)};disposeEffect=()=>this.cancel};function Sn(){let e=F(X.create).current;return ft(e.disposeEffect),e}var Cn=Math.min,wn=Math.max,Tn=Math.round,En=Math.floor,Dn=e=>({x:e,y:e}),On={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function kn(e,t,n){return wn(e,Cn(t,n))}function An(e,t){return typeof e==`function`?e(t):e}function jn(e){return e.split(`-`)[0]}function Mn(e){return e.split(`-`)[1]}function Nn(e){return e===`x`?`y`:`x`}function Pn(e){return e===`y`?`height`:`width`}function Fn(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function In(e){return Nn(Fn(e))}function Ln(e,t,n){n===void 0&&(n=!1);let r=Mn(e),i=In(e),a=Pn(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Kn(o)),[o,Kn(o)]}function Rn(e){let t=Kn(e);return[zn(e),t,zn(t)]}function zn(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Bn=[`left`,`right`],Vn=[`right`,`left`],Hn=[`top`,`bottom`],Un=[`bottom`,`top`];function Wn(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Vn:Bn:t?Bn:Vn;case`left`:case`right`:return t?Hn:Un;default:return[]}}function Gn(e,t,n,r){let i=Mn(e),a=Wn(jn(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(zn)))),a}function Kn(e){let t=jn(e);return On[t]+e.slice(t.length)}function qn(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Jn(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:qn(e)}function Yn(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Xn(e,t,n){return Math.floor(e/t)!==n}function Z(e,t){return t<0||t>=e.length}function Zn(e,t){return Q(e.current,{disabledIndices:t})}function Qn(e,t){return Q(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function $n(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>Q(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:Z(e,u)?-1:u,wrapped:d}}function Q(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&$(e,a,r));return a}function er(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===`ArrowUp`?p=`up`:t.key===`ArrowDown`&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=Nt(e,`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h<e.length,y=_||o,b=o=>{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f<n.length;f+=1,o+=d){if(o<0||o>=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1),r=i(t,u,n[o][e]??n[o][0]);o=a[r]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!$(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=En(l/y)+1;for(let t=u-n+i,c=0;c<o;c+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!$(e,r,s))return r}};d&&Tt(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=Q(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-y<c||f<0)){let e=u%y,n=l%y,r=l-(n-e);f=n===e?l:n>e?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=Q(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}Z(e,f)&&(f=u)}if(n===`both`){let n=En(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(d&&Tt(t),u%o===o-1?r&&(f=Q(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=Q(e,{startingIndex:u,disabledIndices:s}),r&&Xn(f,o,n)&&(f=Q(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),Xn(f,o,n)&&(f=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(d&&Tt(t),u%o===0?r&&(f=Q(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=Q(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&Xn(f,o,n)&&(f=Q(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),Xn(f,o,n)&&(f=u));let c=En(l/o)===n;Z(e,f)&&(r&&c?(f=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:Q(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function $(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!nr(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function tr(e){return e.visibility===`hidden`||e.visibility===`collapse`}function nr(e,t=e?W(e):null){return!e||!e.isConnected||!t||tr(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}function rr(){let[,e]=c.useState({});return c.useCallback(()=>{e({})},[])}var ir=0;function ar(e,t=`mui`){let n=c.useRef(void 0),r=rr(),i=e??n.current;return c.useEffect(()=>{n.current??(ir+=1,n.current=`${t}-${ir}`,e??r())},[e,t,r]),i}var or=Ze.useId;function sr(e,t){if(or!==void 0){let n=or();return e??(t?`${t}-${n}`:n)}return ar(e,t)}function cr(e){return e==null?e:`current`in e?e.current:e}function lr(e,t=!1,n=!1,r=!1){let[i,a]=c.useState(e&&t?`idle`:void 0),[o,s]=c.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),K(()=>{if(!e&&o&&i!==`ending`&&n){let e=X.request(()=>{a(`ending`)});return()=>{X.cancel(e)}}},[e,o,i,n]),K(()=>{if(!e||t||i===void 0)return;let n=X.request(()=>{a(void 0)});return()=>{X.cancel(n)}},[t,e,i]),K(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=X.request(()=>{a(`idle`)});return()=>{X.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function ur(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var dr=null;function fr(e){if(!dr){let e=[];dr=e,queueMicrotask(()=>{dr=null,oe.flushSync(()=>{for(let t of e)t()})})}dr.push(e)}function pr(e,t=!1,n=!1){let r=Sn();return G((i,a=null)=>{r.cancel();let o=cr(e);if(o==null)return;let s=o,c=()=>{n?fr(()=>{a?.aborted||i()}):oe.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(ur(s).map(e=>e.finished.then(L))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(ur(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=Vt;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function mr(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=G(a),s=pr(r,n,i);c.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}function hr(e){return sr(e,`base-ui`)}var gr=c.createContext(void 0);function _r(){return c.useContext(gr)?.direction??`ltr`}function vr(e){return pe(19)?e:e?`true`:void 0}var yr=`data-valid`,br=`data-invalid`,xr={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Sr={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Cr={disabled:!1,...Sr},wr={valid(e){return e===null?null:e?{[yr]:``}:{[br]:``}}},Tr={invalid:void 0,name:void 0,validityData:{state:xr,errors:[],error:``,value:``,initialValue:null},setValidityData:L,disabled:void 0,setTouched:L,setDirty:L,setFilled:L,setFocused:L,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:Cr,registerFieldControl:L,validation:{getValidationProps:(e,t=z)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:L,getInputControl:()=>null,commit:async()=>{},change:L}},Er=c.createContext(Tr);function Dr(e=!0){let t=c.useContext(Er);if(t.setValidityData===L&&!e)throw Error(rt(28));return t}var Or=c.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:L,validationMode:`onSubmit`,submitCountRef:{current:0}});function kr(){return c.useContext(Or)}var Ar=c.createContext({controlId:void 0,registerControlId:L,resetControlId:L,labelId:void 0,setLabelId:L,messageIds:[],setMessageIds:L,getDescriptionProps:e=>e});function jr(){return c.useContext(Ar)}function Mr(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=jr(),o=hr(),s=F(()=>Symbol()),l=c.useRef(!1),u=c.useRef(!1),d=G(()=>{l.current&&i!==L&&(l.current=!1,i(s.current,void 0))});return K(()=>{if(!n||i===L){d();return}let e;if(t!==void 0)u.current=!0,e=t;else if(u.current)e=o;else{a();return}e===void 0?d():(l.current=!0,i(s.current,e))},[t,n,i,a,o,s,d]),K(()=>d,[d]),(n?r:void 0)??t??o}function Nr(e,t,n){let{setFocused:r,focusOwnerRef:i}=Dr(),a=G(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return K(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}function Pr(e,t,n,r,i=!0,a){let{registerFieldControl:o}=Dr(),s=F(()=>Symbol());K(()=>{let c=s.current;i?o(c,{controlRef:e,getValue:r,id:t,name:a,value:n}):o(c,void 0)},[e,i,r,t,a,o,s,n]),K(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}function Fr(e,t){let n=c.useRef(e),r=G(t);K(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function Ir({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=c.useRef(e!==void 0),[a,o]=c.useState(()=>t);return[i&&e!==void 0?e:a,c.useCallback(e=>{i||o(e)},[])]}var Lr=c.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Rr(){return c.useContext(Lr)}function zr(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:l,nextIndexRef:u}=Rr(),d=c.useRef(-1),[f,p]=c.useState(a==null&&t?()=>{if(d.current===-1){let e=u.current;u.current+=1,d.current=e}return d.current}:-1),m=a??f,h=c.useRef(null),g=c.useCallback(e=>{let t=h.current;t&&s(t),h.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return K(()=>{if(a==null)return l(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&p(t)})},[a,l]),{ref:g,index:m}}function Br(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=at(),{ref:i,index:a}=zr(e),o=n===a,s=c.useRef(null),l=I(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:l,index:a}}function Vr(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=G(i),[,o]=c.useState(0),s=F(Ur).current,l=F(Hr).current,u=c.useRef(0),d=c.useRef(!0),f=c.useRef(null),p=c.useRef(null),m=G(()=>{d.current||(d.current=!0,o(e=>e+1))}),h=G((e,t)=>{l.set(e,t),m()}),g=G(e=>{l.delete(e),m()}),_=G(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),u.current=n.current.length,t});function v(e){if(p.current?.disconnect(),p.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!Kr(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&qr(r,n)>0){t.disconnect(),m();return}r=n}});p.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=Gr(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let y=G(()=>{let[e,t]=Wr(l),n=_(e),r=f.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});v(t),f.current=e,d.current=!1,i&&(s.forEach(e=>e(n)),a(n))});K(()=>(!d.current&&f.current&&_(f.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,_]),K(()=>{d.current&&y()}),K(()=>()=>{p.current?.disconnect(),d.current=!0},[]);let b=G(e=>(s.add(e),()=>{s.delete(e)})),x=c.useMemo(()=>({register:h,unregister:g,subscribeMapChange:b,nextIndexRef:u}),[h,g,b,u]);return(0,me.jsx)(Lr.Provider,{value:x,children:t})}function Hr(){return new Map}function Ur(){return new Set}function Wr(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>qr(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function Gr(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function Kr(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function qr(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function Jr(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var Yr=`ArrowUp`,Xr=`ArrowDown`,Zr=`ArrowLeft`,Qr=`ArrowRight`,$r=new Set([Yr,Xr,Zr,Qr,`Home`,`End`]),ei=[`Shift`,`Control`,`Alt`,`Meta`];function ti(e){return V(e)&&e.tagName===`INPUT`}function ni(e){return!!(ti(e)&&e.selectionStart!=null||V(e)&&e.tagName===`TEXTAREA`)}function ri(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=ii(e,t,`left`),a=ai(e),o=ai(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=ii(e,t,`top`),r=ai(e),i=ai(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function ii(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function ai(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var oi=`data-composite-item-active`;function si(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:l,enableHomeAndEndKeys:u=!1,stopEventPropagation:d,disabledIndices:f,modifierKeys:p=R}=e,[m,h]=c.useState(0),g=r!=null,_=c.useRef(null),v=I(_,l),y=c.useRef([]),b=c.useRef(!1),x=c.useRef(null),S=o??m,C=G((e,t=!1)=>{if(x.current=y.current[e]??null,(s??h)(e),t){let t=y.current[e];ri(_.current,t,a,n)}}),w=G(e=>{if(e.size===0)return;if(b.current){let e=y.current,t=e.indexOf(x.current);if(t===-1){let t=e[S];!t||$(e,S,f)?C(ci(e,f)):x.current=t}else t!==S&&C(t);return}b.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)C(i);else if($(t,S,f)){let e=Q(t,{disabledIndices:f});Z(t,e)||C(e)}ri(_.current,r,a,n)});K(()=>{if(f==null||o!=null||!b.current)return;let e=y.current;if($(e,S,f)){let t=Q(e,{disabledIndices:f});Z(e,t)||C(t)}},[f,o,S,y,C]);let T=G((e,t,n)=>i?i(e,t,n,y):n),E=G(e=>{let o=e.key===`Home`||e.key===`End`;if(!$r.has(e.key)||!u&&o||li(e,p)||!_.current)return;let s=a===`rtl`,c=s?Zr:Qr,l=s?Qr:Zr,m=n===`vertical`?Xr:c,h=n===`vertical`?Yr:l,v=Pt(e.nativeEvent);if(v!=null&&ni(v)&&!Jr(v)){let t=v.selectionStart,n=v.selectionEnd,r=v.value;if(t==null||e.shiftKey||t!==n||e.key!==h&&t<r.length||e.key!==m&&t>0)return}let b=S,x=Zn(y,f),w=Qn(y,f);r!=null&&(b=r({disabledIndices:f,elementsRef:y,event:e,highlightedIndex:S,loopFocus:t,maxIndex:w,minIndex:x,onLoop:T,orientation:n,rtl:s}));let E=n!==`vertical`&&e.key===c||n!==`horizontal`&&e.key===`ArrowDown`,D=n!==`vertical`&&e.key===l||n!==`horizontal`&&e.key===`ArrowUp`;u&&(e.key===`Home`?b=x:e.key===`End`&&(b=w)),b===S&&(E||D)&&(t&&b===w&&E?(b=x,i&&(b=i(e,S,b,y))):t&&b===x&&D?(b=w,i&&(b=i(e,S,b,y))):b=Q(y.current,{startingIndex:b,decrement:D,disabledIndices:f})),b!==S&&!Z(y.current,b)&&(d&&e.stopPropagation(),(g||o||E||D)&&e.preventDefault(),C(b,!0),queueMicrotask(()=>{y.current[b]?.focus()}))});return{props:{ref:v,onFocus(e){let t=_.current,n=Pt(e.nativeEvent);t&&n!=null&&ni(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:E},highlightedIndex:S,onHighlightedIndexChange:C,elementsRef:y,onMapChange:w,relayKeyboardEvent:E}}function ci(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i&&!$(e,r,t)){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function li(e,t){for(let n of ei)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function ui(e){let{render:t,className:n,style:r,refs:i=R,props:a=R,state:o=z,stateAttributesMapping:s,highlightedIndex:l,onHighlightedIndexChange:u,orientation:d,grid:f,loopFocus:p,onLoop:m,enableHomeAndEndKeys:h,onMapChange:g,stopEventPropagation:_=!0,rootRef:v,disabledIndices:y,modifierKeys:b,highlightItemOnHover:x=!1,tag:S=`div`,...C}=e,{props:w,highlightedIndex:T,onHighlightedIndexChange:E,elementsRef:D,onMapChange:ee,relayKeyboardEvent:O}=si({grid:f,loopFocus:p,onLoop:m,orientation:d,highlightedIndex:l,onHighlightedIndexChange:u,rootRef:v,stopEventPropagation:_,enableHomeAndEndKeys:h,direction:_r(),disabledIndices:y,modifierKeys:b}),k=ye(S,e,{state:o,ref:i,props:[w,...a,C],stateAttributesMapping:s}),A=c.useMemo(()=>({highlightedIndex:T,onHighlightedIndexChange:E,highlightItemOnHover:x,relayKeyboardEvent:O}),[T,E,x,O]);return(0,me.jsx)(it.Provider,{value:A,children:(0,me.jsx)(Vr,{elementsRef:D,onMapChange:e=>{g?.(e),ee(e)},children:k})})}export{Yn as $,yt as $t,Qn as A,De as An,Ht as At,Mn as B,D as Bn,Mt as Bt,mr as C,Pe as Cn,Zt as Ct,sr as D,Re as Dn,Kt as Dt,cr as E,Le as En,gn as Et,$ as F,z as Fn,zt as Ft,Nn as G,r as Gn,Dt as Gt,Ln as H,S as Hn,At as Ht,kn as I,L as In,Ft as It,Jn as J,wt as Jt,Gn as K,Ot as Kt,Dn as L,pe as Ln,It as Lt,$n as M,ye as Mn,Bt as Mt,nr as N,ve as Nn,Lt as Nt,rr as O,We as On,qt as Ot,Z as P,R as Pn,Rt as Pt,Cn as Q,St as Qt,An as R,I as Rn,jt as Rt,hr as S,Ge as Sn,dn as St,lr as T,H as Tn,Yt as Tt,Pn as U,s as Un,kt as Ut,In as V,w as Vn,Pt as Vt,Rn as W,a as Wn,Et as Wt,Fn as X,Ct as Xt,jn as Y,Y as Yt,wn as Z,bt as Zt,Dr as _,qe as _n,sn as _t,Vr as a,st as an,un as at,vr as b,Fe as bn,Qt as bt,Ir as c,K as cn,on as ct,Nr as d,Ue as dn,mn as dt,pt as en,Tn as et,Mr as f,Ne as fn,tn as ft,Er as g,Ye as gn,cn as gt,Tr as h,Ke as hn,$t as ht,Jr as i,ct as in,_n as it,Zn as j,Ce as jn,Vt as jt,er as k,Ae as kn,Gt as kt,Fr as l,G as ln,an as lt,kr as m,Me as mn,rn as mt,oi as n,ft as nn,Sn as nt,Br as o,at as on,en as ot,jr as p,Xe as pn,nn as pt,Kn as q,Tt as qt,$r as r,lt as rn,vn as rt,zr as s,rt as sn,fn as st,ui as t,mt as tn,X as tt,Pr as u,W as un,hn as ut,Sr as v,B as vn,pn as vt,pr as w,Ie as wn,Xt as wt,_r as x,V as xn,ln as xt,wr as y,He as yn,Jt as yt,En as z,F as zn,Nt as zt};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,t}from"./rolldown-runtime-XKyaHtl9.js";import{$ as n,$t as r,At as i,B as a,Bt as o,C as s,Cn as c,D as l,Dn as u,Dt as d,E as f,En as p,Fn as m,G as h,Gn as g,Gt as _,H as v,Hn as y,Ht as b,I as x,In as S,It as C,J as w,Jt as T,K as E,Kt as D,L as O,Ln as k,Lt as A,Mn as j,N as M,O as N,On as P,Q as F,R as I,Rn as ee,Rt as L,S as R,Sn as te,T as z,Tn as ne,Tt as B,U as re,Un as ie,Ut as ae,V as oe,Vt as se,W as ce,Wn as le,Wt as ue,X as de,Xt as fe,Y as V,Z as H,Zt as U,_n as pe,an as W,b as me,bn as G,bt as he,cn as K,ct as ge,dn as _e,en as ve,et as ye,fn as be,gn as xe,hn as Se,it as q,jt as Ce,kt as we,l as Te,ln as J,lt as Ee,mn as Y,nn as De,nt as Oe,pn as ke,q as Ae,qt as je,r as Me,rn as Ne,rt as Pe,sn as Fe,tn as Ie,tt as Le,un as Re,ut as ze,vn as Be,w as Ve,wn as He,wt as Ue,x as We,xn as X,yn as Ge,yt as Ke,z as qe,zn as Je,zt as Ye}from"./CompositeRoot-D4sRkYq3.js";var Xe={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};Xe.node;var Ze=y(Xe),Qe=e(le(),1),Z=e(ie(),1),Q=e(g(),1),$e=[],et=void 0;function tt(){return et}function nt(e){$e.push(e)}function rt(e){let t=(t,n)=>{let r=Je(at).current,i;try{et=r;for(let e of $e)e.before(r);i=e(t,n);for(let e of $e)e.after(r);r.didInitialize=!0}finally{et=void 0}return i};return t.displayName=e.displayName||e.name,t}function it(e){return Q.forwardRef(rt(e))}function at(){return{didInitialize:!1}}var ot=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`),st=!ot&&r.includes(`firefox`);!ot&&r.includes(`chrom`);var ct=fe,lt=`data-open`,ut=`data-closed`,dt=Ce,ft=i,pt=`data-anchor-hidden`,mt=`data-popup-open`,ht=`data-pressed`,gt={[mt]:``},_t={[mt]:``,[ht]:``},vt={[lt]:``},yt={[ut]:``},bt={[pt]:``},xt={open(e){return e?gt:null}},St={open(e){return e?_t:null}},Ct={open(e){return e?vt:yt},anchorHidden(e){return e?bt:null}},wt={...Ct,...we},Tt=`data-trigger-disabled`;function Et(e,t){if(!G(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(Tt);for(let[,e]of t.entries())if(o(e,n))return!e.hasAttribute(Tt);return!1}function Dt(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Ot(e){return e.matches(`html,body`)}function kt(e){return X(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function At(e){return Ye(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${A}`)!=null}function jt(e){return e?e.getAttribute(`role`)===`combobox`&&kt(e):!1}function Mt(e){if(!e||T)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Nt(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Pt(e,t){return t!=null&&!ae(t)?0:typeof e==`function`?e():e}function Ft(e,t,n){let r=Pt(e,n);return typeof r==`number`?r:r?.[t]}function It(e){return typeof e==`function`?e():e}function Lt(e,t){return t||e===`click`||e===`mousedown`}function Rt(e){return e?.includes(`mouse`)&&e!==`mousedown`}function zt(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}var Bt={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Vt={...Bt,position:`fixed`,margin:0,top:0,left:0},Ht={...Bt,position:`absolute`},Ut=Q.forwardRef(function(e,t){let[n,r]=Q.useState();K(()=>{ct&&ot&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,Z.jsx)(`span`,{...e,ref:t,style:Vt,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),Wt=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Gt(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return ne(n)?n.host:null}function Kt(e){for(let t of Array.from(e.children))if(Y(t)===`summary`)return t;return null}function qt(e,t){let n=Kt(t);return!!n&&(e===n||o(n,e))}function Jt(e){let t=e?Y(e):``;return e!=null&&e.matches(Wt)&&(t!==`summary`||e.parentElement!=null&&Y(e.parentElement)===`details`&&Kt(e.parentElement)===e)&&(t!==`details`||Kt(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Yt(e){if(!Jt(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Gt(t)){let n=t!==e,r=Y(t)===`slot`;if(t.hasAttribute(`inert`)||n&&Y(t)===`details`&&!t.open&&!qt(e,t)||t.hasAttribute(`hidden`)||!r&&!Xt(t,n))return!1}return!0}function Xt(e,t){let n=Re(e);return t?n.display!==`none`:M(e,n)}function Zt(e){let t=e.tabIndex;if(t<0){let t=Y(e);if(t===`details`||t===`audio`||t===`video`||X(e)&&e.isContentEditable)return 0}return t}function Qt(e){if(Y(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function $t(e,t){let n=Qt(e);if(!n)return!0;let r=t.find(e=>{let t=Qt(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Qt(e);return t?.name===n.name&&t.form===n.form})===n}function en(e){if(X(e)&&Y(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return X(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function tn(e,t){en(e).forEach(e=>{Jt(e)&&t.push(e),tn(e,t)})}function nn(e,t,n){en(e).forEach(e=>{X(e)&&e.matches(t)&&n.push(e),nn(e,t,n)})}function rn(e){return Yt(e)&&Zt(e)>=0}function an(e){let t=[];return tn(e,t),t.filter(Yt)}function on(e){let t=an(e);return t.filter(e=>Zt(e)>=0&&$t(e,t))}function sn(e,t){let n=on(e),r=n.length;if(r===0)return;let i=L(W(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function cn(e){return sn(W(e).body,1)||e}function ln(e){return sn(W(e).body,-1)||e}function un(e,t,n){if(!e)return null;let r=[];tn(W(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(Yt);for(let e=1;e<r.length;e+=1){let s=r[(i+t*e+r.length)%r.length];if(!o(n,s)&&rn(s)&&$t(s,a))return s}return r[i]}function dn(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!o(n,r)}function fn(e){on(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function pn(e){let t=[];nn(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function mn(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...mn(e,t.id,n)])}function hn(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function gn(e){return`data-base-ui-${e}`}var _n=0;function vn(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(_n);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),S;let o=requestAnimationFrame(a);return _n=o,()=>{_n===o&&(cancelAnimationFrame(o),_n=0)}}var yn=`data-base-ui-inert`,bn=new WeakMap,xn=new WeakSet,Sn=new WeakMap,Cn=0;function wn(e){return e?ne(e)?e.host:wn(e.parentNode):null}var Tn=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=wn(t);return e.contains(n)?n:null}).filter(e=>e!=null),En=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Dn=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{Y(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function On(e,t,n,{mark:r=!0}){let i=Tn(t,e),a=r?Dn(t,En(i),new Set(i)):[],o=[],s=[];if(n){let e=Tn(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);Dn(t,En(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(bn.get(e)||0)+1;bn.set(e,r),o.push(e),r===1&&n&&xn.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(Sn.get(e)||0)+1;Sn.set(e,t),s.push(e),t===1&&e.setAttribute(yn,``)}),Cn+=1,()=>{o.forEach(e=>{let t=(bn.get(e)||0)-1;bn.set(e,t),t||(xn.has(e)||e.removeAttribute(`aria-hidden`),xn.delete(e))}),r&&s.forEach(e=>{let t=(Sn.get(e)||0)-1;Sn.set(e,t),t||e.removeAttribute(yn)}),--Cn,Cn||(bn=new WeakMap,xn=new WeakSet,Sn=new WeakMap)}}function kn(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=W(e[0]).body;return On(e,i,n,{mark:r})}var An={style:{transition:`none`}},jn=`data-base-ui-click-trigger`,Mn={fallbackAxisSide:`none`},Nn={fallbackAxisSide:`end`},Pn={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Fn=Q.createContext(null),In=()=>Q.useContext(Fn),Ln=gn(`portal`);function Rn(e={}){let{ref:t,container:n,componentProps:r=m,elementProps:i}=e,a=l(),o=In()?.portalNode,[s,u]=Q.useState(null),[d,f]=Q.useState(null),p=J(e=>{e!==null&&f(e)}),h=Q.useRef(null);K(()=>{if(n===null){h.current&&(h.current=null,f(null),u(null));return}let e=(n&&(c(n)?n:n.current))??o??document.body;e==null?h.current&&(h.current=null,f(null),u(null)):h.current!==e&&(h.current=e,f(null),u(e))},[n,o]);let g=j(`div`,r,{ref:[t,p],props:[{id:a,[Ln]:``},i]}),_=s&&g?Qe.createPortal(g,s):null;return{node:d,nodeId:Q.isValidElement(g)?g.props.id:void 0,subtree:_}}var zn=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:f}=Rn({container:o,ref:t,componentProps:e,elementProps:c}),p=Q.useRef(null),m=Q.useRef(null),h=Q.useRef(null),g=Q.useRef(null),[_,v]=Q.useState(null),y=Q.useRef(!1),b=_?.modal,x=_?.open,S=!!_&&!_.modal&&_.open&&!!l;Q.useEffect(()=>{if(!l||b)return;function e(e){l&&e.relatedTarget&&dn(e)&&(e.type===`focusin`?y.current&&=(pn(l),!1):(fn(l),y.current=!0))}return zt(q(l,`focusin`,e,!0),q(l,`focusout`,e,!0))},[l,b]),K(()=>{l&&x===!0&&y.current&&(pn(l),y.current=!1)},[x,l]);let C=Q.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:m,beforeInsideRef:h,afterInsideRef:g,portalNode:l,setFocusManagerState:v}),[l]);return(0,Z.jsxs)(Q.Fragment,{children:[f,(0,Z.jsxs)(Fn.Provider,{value:C,children:[S&&l&&(0,Z.jsx)(Ut,{"data-type":`outside`,ref:p,onFocus:e=>{dn(e,l)?h.current?.focus():ln(_?_.domReference:null)?.focus()}}),S&&l&&(0,Z.jsx)(`span`,{role:s,"aria-owns":u,style:Pn}),l&&Qe.createPortal(a,l),S&&l&&(0,Z.jsx)(Ut,{"data-type":`outside`,ref:m,onFocus:e=>{dn(e,l)?g.current?.focus():(cn(_?_.domReference:null)?.focus(),_?.closeOnFocusOut&&_?.onOpenChange(!1,d(`focus-out`,e.nativeEvent)))}})]})]})});function Bn(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Vn=class{nodesRef={current:[]};events=Bn();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},Hn=Q.createContext(null),Un=Q.createContext(null),Wn=()=>Q.useContext(Hn)?.id||null,Gn=e=>{let t=Q.useContext(Un);return e??t};function Kn(e){let t=l(),n=Gn(e),r=Wn();return K(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function qn(e){let{children:t,id:n}=e,r=Wn();return(0,Z.jsx)(Hn.Provider,{value:Q.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Jn(e){let{children:t,externalTree:n}=e,r=Je(()=>n??new Vn).current;return(0,Z.jsx)(Un.Provider,{value:r,children:t})}function Yn(e,t){let n=Be(se(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(_(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Xn=20,Zn=[];function Qn(){Zn=Zn.filter(e=>e.deref()?.isConnected)}function $n(e){Qn(),e&&Y(e)!==`body`&&(Zn.push(new WeakRef(e)),Zn.length>Xn&&(Zn=Zn.slice(-20)))}function er(){return Qn(),Zn[Zn.length-1]?.deref()}function tr(e){return e?rn(e)?e:on(e)[0]||e:null}function nr(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=an(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return rn(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function rr(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:s,restoreFocus:c=!1,modal:l=!0,closeOnFocusOut:u=!0,openInteractionType:p=``,nextFocusableElement:m,previousFocusableElement:h,beforeContentFocusGuardRef:g,externalTree:v,getInsideElements:y}=e,b=t.useState(`open`),x=t.useState(`domReferenceElement`),S=t.useState(`floatingElement`),{events:C,dataRef:w}=t.context,T=J(()=>w.current.floatingContext?.nodeId),E=i===!1,O=jt(x)&&E,k=Pe(i),A=Pe(a),j=Pe(s),N=Pe(p),P=Pe(b),F=Gn(v),I=In(),R=Q.useRef(!1),te=Q.useRef(!1),z=Q.useRef(!1),ne=Q.useRef(null),B=Q.useRef(``),re=Q.useRef(``),ie=Q.useRef(null),ae=Q.useRef(null),oe=ee(ie,g,I?.beforeInsideRef),ce=ee(ae,I?.afterInsideRef),le=Ie(),ue=Ie(),de=Oe(),fe=I!=null,V=Nt(S),H=J((e=V)=>e?on(e):[]),U=J(()=>y?.().filter(e=>e!=null)??[]);Q.useEffect(()=>{if(r||!l)return;function e(e){e.key===`Tab`&&o(V,L(W(V)))&&H().length===0&&!O&&je(e)}let t=W(V);return q(t,`keydown`,e)},[r,V,l,O,H]),Q.useEffect(()=>{if(r||!b)return;let e=W(V);function t(){z.current=!1}function n(e){let t=se(e),n=U(),r=o(S,t)||o(x,t)||o(I?.portalNode,t)||n.some(e=>e===t||o(e,t));z.current=!r,re.current=e.pointerType||`keyboard`,Ye(t,`[data-base-ui-click-trigger]`)&&(te.current=!0,ue.start(0,()=>{te.current=!1}))}function i(){re.current=`keyboard`}return zt(q(e,`pointerdown`,n,!0),q(e,`pointerup`,t,!0),q(e,`pointercancel`,t,!0),q(e,`keydown`,i,!0),t)},[r,S,x,V,b,I,ue,U]),Q.useEffect(()=>{if(r||!u)return;let e=W(V);function n(){te.current=!0,ue.start(0,()=>{te.current=!1})}function i(e){let t=se(e);rn(t)&&(ne.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=se(n);l&&r==null&&a!=null&&o(S,a)&&$n(a),queueMicrotask(()=>{let s=T(),u=t.context.triggerElements,p=U(),g=r?.hasAttribute(gn(`focus-guard`))&&[ie.current,ae.current,I?.beforeInsideRef.current,I?.afterInsideRef.current,I?.beforeOutsideRef.current,I?.afterOutsideRef.current,f(h),f(m)].includes(r),_=!(o(x,r)||o(S,r)||o(r,S)||o(I?.portalNode,r)||p.some(e=>e===r||o(e,r))||u.hasMatchingElement(e=>o(e,r))||g||F&&(mn(F.nodesRef.current,s).find(e=>o(e.context?.elements.floating,r)||o(e.context?.elements.domReference,r))||hn(F.nodesRef.current,s).find(e=>[e.context?.elements.floating,Nt(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===x&&V&&nr(V),c&&i!==x&&!M(a)&&L(e)===e.body){if(X(V)&&(V.focus(),c===`popup`)){de.request(()=>{V.focus()});return}let e=H(),t=ne.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||V;X(n)&&n.focus()}w.current.insideReactTree?w.current.insideReactTree=!1:(O||!l)&&r&&_&&!te.current&&(O||r!==er())&&(R.current=!0,t.setOpen(!1,d(Ee,n)))})}function s(){z.current||(w.current.insideReactTree=!0,le.start(0,()=>{w.current.insideReactTree=!1}))}let p=X(x)?x:null;if(S||p)return zt(p&&q(p,`focusout`,a),p&&q(p,`pointerdown`,n),S&&q(S,`focusin`,i),S&&q(S,`focusout`,a),S&&I&&q(S,`focusout`,s,!0))},[r,x,S,V,l,F,I,t,u,c,H,O,T,w,le,ue,de,m,h,U]),Q.useEffect(()=>{if(r||!S||!b)return;let e=Array.from(I?.portalNode?.querySelectorAll(`[${gn(`portal`)}]`)||[]),t=(F?hn(F.nodesRef.current,T()):[]).find(e=>jt(e.context?.elements.domReference||null))?.context?.elements.domReference,n=kn([S,...e,ie.current,ae.current,I?.beforeOutsideRef.current,I?.afterOutsideRef.current,...U(),t,f(h),f(m),O?x:null].filter(e=>e!=null),{ariaHidden:l||O,mark:!1}),i=kn([S,...e].filter(e=>e!=null));return()=>{i(),n()}},[b,r,x,S,l,I,O,F,T,m,h,U]),K(()=>{if(!b||r||!X(V))return;B.current=``,re.current=``;let e=W(V),t=L(e);queueMicrotask(()=>{let n=k.current,r=typeof n==`function`?n(N.current||``):n;if(r===void 0||r===!1||o(V,t))return;let i=null,a=()=>(i??=H(V),i[0]||V),s;s=r===!0||r===null?a():f(r),s||=a();let c=o(V,L(e)),l=w.current.openEvent,u=l?.type===`mousedown`&&_(l);vn(s,{sync:u,preventScroll:s===V,shouldFocus(){if(!P.current)return!1;if(c)return!0;let t=L(e);return!(t!==s&&o(V,t))}})})},[r,b,V,H,k,N,P,w]);let pe=Q.useRef(null);K(()=>{if(r||!V){pe.current=null;return}pe.current&&=(pe.current.cancelled=!0,null);let e=W(V),t=L(e),n=N.current==null;$n(t);function i(e){if(e.open||(B.current=Yn(e.nativeEvent,re.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(gn(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(R.current=!0),e.reason===`outside-press`){if(e.nested)R.current=!1;else if(_(e.nativeEvent)||D(e.nativeEvent))R.current=!1;else{let e=!1;W(V).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?R.current=!1:R.current=!0}}}C.on(`openchange`,i);function a(e){let r=A.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=x?.isConnected?x:null,o=t?.isConnected&&Y(t)!==`body`?t:null,s=n?o||a:a||o;return s||=er()||null,typeof i==`boolean`?s:f(i)||s||null}return()=>{C.off(`openchange`,i);let t=L(e),n=U(),r=o(S,t)||n.some(e=>e===t||o(e,t))||F&&mn(F.nodesRef.current,T(),!1).some(e=>o(e.context?.elements.floating,t)),s=A.current,c=B.current,l=a(c),u={cancelled:!1};pe.current=u,queueMicrotask(()=>{pe.current===u&&(pe.current=null);let n=tr(l),i=j.current??typeof s!=`boolean`;if(!u.cancelled&&s&&!R.current&&X(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};c===`keyboard`&&(e.focusVisible=!0),n.focus(e)}R.current=!1})}},[r,S,V,A,j,N,C,F,x,T,U]),K(()=>{if(!ot||b||!S)return;let e=L(W(S));X(e)&&kt(e)&&o(S,e)&&e.blur()},[b,S]),K(()=>{if(!r&&I)return I.setFocusManagerState({modal:l,closeOnFocusOut:u,open:b,onOpenChange:t.setOpen,domReference:x}),()=>{I.setFocusManagerState(null)}},[r,I,l,b,t,u,x]),K(()=>{if(!r&&V)return nr(V),()=>{queueMicrotask(Qn)}},[r,V]);let me=!r&&(!l||!O)&&(fe||l);return(0,Z.jsxs)(Q.Fragment,{children:[me&&(0,Z.jsx)(Ut,{"data-type":`inside`,ref:oe,onFocus:e=>{if(l){let e=H();vn(e[e.length-1])}else I?.portalNode&&(R.current=!1,dn(e,I.portalNode)?cn(x)?.focus():f(h??I.beforeOutsideRef)?.focus())}}),n,me&&(0,Z.jsx)(Ut,{"data-type":`inside`,ref:ce,onFocus:e=>{l?vn(H()[0]):I?.portalNode&&(u&&(R.current=!0),dn(e,I.portalNode)?ln(x)?.focus():f(m??I.afterOutsideRef)?.focus())}})]})}function ir(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=B}=t,l=e.context.dataRef,u=Q.useRef(void 0),f=Oe(),p=Ie(),h=Q.useMemo(()=>{function t(t,n,r,i){let a=d(c,n,r);t&&i===`touch`&&s>0?p.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=ae(e.pointerType,!0)&&D(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||ae(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),d=se(s),p=kt(d);if(p||o===`virtual`){t(l,s,p?d:i.currentTarget,o);return}let m=i.currentTarget;f.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;r===`mousedown`&&o?u.current=void 0:ae(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,f,p,s]);return Q.useMemo(()=>n?{reference:h}:m,[n,h])}function ar(){return!1}function or(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function sr(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:s=ar,bubbles:c,externalTree:l}=t,u=e.useState(`open`),f=e.useState(`floatingElement`),{dataRef:p,events:m}=e.context,h=Gn(l),g=J(typeof i==`function`?i:()=>!1),v=typeof i==`function`?g:i,y=v!==!1,b=J(()=>a),{escapeKey:x,outsidePress:S}=or(c),C=Q.useRef(!1),w=Q.useRef(!1),T=Q.useRef(!1),E=Q.useRef(!1),D=Q.useRef(!1),O=Q.useRef(``),k=Q.useRef(null),A=Ie(),j=Ie(),M=Ie(),N=J(()=>{j.clear(),p.current.insideReactTree=!1}),P=J(e=>{let t=p.current.floatingContext?.nodeId;return(h?mn(h.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),F=J(t=>Dt(t,e.select(`floatingElement`))||Dt(t,e.select(`domReferenceElement`))),I=J(t=>{s()&&e.setOpen(!1,d(B,t.nativeEvent))}),ee=J(t=>{if(!u||!n||!r||t.key!==`Escape`)return;let i=ue(t)?t.nativeEvent:t;if(D.current||i.isComposing||!x&&P(`__escapeKeyBubbles`))return;let a=d(ge,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!x&&!a.isPropagationAllowed&&t.stopPropagation()}),L=J(()=>{p.current.insideReactTree=!0,j.start(0,N)}),R=J(t=>{if(!u||!n||t.button!==0)return;let r=se(t.nativeEvent);o(e.select(`floatingElement`),r)&&(C.current||(C.current=!0,w.current=!1))}),z=J(e=>{u&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&C.current&&(w.current=!0)});Q.useEffect(()=>{function e(e){e.open||(E.current=!1)}return m.on(`openchange`,e),()=>{m.off(`openchange`,e)}},[m]),Q.useEffect(()=>N,[N]),Q.useEffect(()=>{if(!u||!n)return u||(E.current=!1,D.current=!1,O.current=``,k.current=null),N;p.current.__escapeKeyBubbles=x,p.current.__outsidePressBubbles=S;let t=new ve,i=W(f);function a(){M.clear(),D.current=!0}function s(){D.current=!0,M.start(ot?5:0,()=>{D.current=!1})}function c(){T.current=!0,t.start(0,()=>{T.current=!1})}function l(){C.current=!1,w.current=!1}function m(){let e=O.current,t=e===`pen`||!e?`mouse`:e,n=b(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function g(e){let t=m();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function j(e){let t=p.current.floatingContext?.nodeId,n=h&&mn(h.nodesRef.current,t).some(t=>Dt(e,t.context?.elements.floating));return F(e)||n}function I(n){if(g(n)){n.type!==`click`&&!F(n)&&(t.clear(),T.current=!1),N();return}if(p.current.insideReactTree){N();return}let r=se(n),i=`[${gn(`inert`)}]`,a=G(r)?r.getRootNode():null,s=Array.from((ne(a)?a:W(e.select(`floatingElement`))).querySelectorAll(i)),c=e.context.triggerElements;if(r&&(c.hasElement(r)||c.hasMatchingElement(e=>o(e,r))))return;let l=G(r)?r:null;for(;l&&!te(l);){let e=pe(l);if(te(e)||!G(e))break;l=e}if(!(s.length&&G(r)&&!Ot(r)&&!o(r,e.select(`floatingElement`))&&s.every(e=>!o(l,e)))){if(X(r)&&!(`touches`in n)){let e=te(r),t=Re(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!j(n)){if(m()===`intentional`){if(n.detail!==0&&!_(n)&&!E.current)return;if(T.current){t.clear(),T.current=!1;return}}typeof v==`function`&&!v(n)||P(`__outsidePressBubbles`)||(e.setOpen(!1,d(he,n)),N())}}}function L(t){m()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!F(t)&&I(t)}function R(t){if(m()!==`sloppy`||!e.select(`open`)||!n||F(t))return;let r=t.touches[0];r&&(k.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},A.start(1e3,()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)}))}function z(e,t){let n=se(e);if(!n)return;let r=q(n,e.type,()=>{t(e),r()})}function B(e){O.current=`touch`,z(e,R)}function re(e){A.clear(),e.type===`pointerdown`&&(e.button===0&&(E.current=!0),O.current=e.pointerType),(e.type!==`mousedown`||!k.current||k.current.dismissOnMouseDown)&&z(e,e=>{e.type===`pointerdown`?L(e):I(e)})}function ie(e){if(e.type===`pointercancel`&&(E.current=!1),!C.current)return;let n=w.current;l(),m()===`intentional`&&(e.type===`pointercancel`?n&&c():j(e)||(n?c():(typeof v!=`function`||v(e))&&(t.clear(),T.current=!0,N())))}function ae(e){if(m()!==`sloppy`||!k.current||F(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-k.current.startX),r=Math.abs(t.clientY-k.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(k.current.dismissOnTouchEnd=!0),i>10&&(I(e),A.clear(),k.current=null)}function oe(e){z(e,ae)}function ce(e){m()===`sloppy`&&k.current&&!F(e)&&(k.current.dismissOnTouchEnd&&I(e),A.clear(),k.current=null)}function le(e){z(e,ce)}let ue=zt(r&&zt(q(i,`keydown`,ee),q(i,`compositionstart`,a),q(i,`compositionend`,s)),y&&zt(q(i,`click`,re,!0),q(i,`pointerdown`,re,!0),q(i,`pointerup`,ie,!0),q(i,`pointercancel`,ie,!0),q(i,`mousedown`,re,!0),q(i,`mouseup`,ie,!0),q(i,`touchstart`,B,{capture:!0,passive:!0}),q(i,`touchmove`,oe,{capture:!0,passive:!0}),q(i,`touchend`,le,{capture:!0,passive:!0})));return()=>{ue(),t.clear(),l(),T.current=!1}},[p,f,r,y,v,u,n,x,S,ee,N,b,P,F,h,e,A,M]);let re=Q.useMemo(()=>({onKeyDown:ee,onPointerDown:I,onClick:I}),[ee,I]),ie=Q.useMemo(()=>({onKeyDown:ee,onPointerDown:z,onMouseDown:z,onClickCapture:L,onMouseDownCapture(e){L(),R(e)},onPointerDownCapture(e){L(),R(e)},onMouseUpCapture:L,onTouchEndCapture:L,onTouchMoveCapture:L}),[ee,L,R,z]);return Q.useMemo(()=>n?{reference:re,floating:ie,trigger:re}:{},[n,re,ie])}function cr(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),K(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};G(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function lr(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,c=J(i),{mounted:l,setMounted:u,transitionStatus:d}=z(t,!1,!1,o),f=!t&&r;K(()=>{t&&c(!1)},[t,c]);let p=Q.useRef(l),m=Q.useRef(!1),h=N(),g=()=>{p.current=!1,u(!1),a()};K(()=>{p.current=l,m.current&&(m.current=!1,!t&&l&&g())});let _=J(()=>{p.current&&(t?(m.current=!0,h()):g())});return s({enabled:l&&!t&&!f,open:t,ref:n,onComplete(){t||_()}}),{mounted:l,transitionStatus:d,preventUnmountingOnClose:f,forceUnmount:_}}var ur={tabIndex:-1,[C]:``};function dr(e){return t=>t!==`touch`||e.current}function fr(e,t=!1){let n=l(),r=Wn()!=null,i=Je(()=>e(n,r)).current;return cr({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function pr({handle:e,store:t}){return K(()=>e.attachStore(t),[e,t]),null}function mr(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function hr(e,t){let n=Q.useRef(null);return J(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),mr(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),mr(t))})}function gr(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function _r(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function vr(e,t,n,r={}){let i=n.reason,a=i===Ue,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=_r(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=gr(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?Qe.flushSync(l):l()}function yr(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=hr(e,n),o=J(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e)}else if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=J(e=>{a(e),e&&o(e)});return K(()=>(s(t.current),()=>s(null)),[s,t,n,e]),K(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function br(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=Q.useRef(null),i=e.useState(`open`),a=e.useState(`triggerCount`),o=e.useState(`activeTriggerId`),s=e.useState(`activeTriggerElement`);K(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=d(Ke);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,a,o,s,n])}function xr(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=lr({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return Je(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function Sr(e,t){e.useSyncedValues(t),K(()=>()=>{e.update({activeTriggerProps:m,inactiveTriggerProps:m,popupProps:m})},[e])}function Cr(e,t){K(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),K(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var wr=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},Tr=t((e=>{var t=g();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,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Er=t(((e,t)=>{t.exports=Tr()})),Dr=t((e=>{var t=g(),n=Er();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Or=t(((e,t)=>{t.exports=Dr()})),kr=Er(),Ar=Or(),jr=k(19)?Pr:Fr;function Mr(e,t,n,r,i){return jr(e,t,n,r,i)}function Nr(e,t,n,r,i){let a=Q.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,kr.useSyncExternalStore)(e.subscribe,a,a)}nt({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,kr.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Pr(e,t,n,r,i){let a=tt();if(!a)return Nr(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],s.store===e&&s.selector===t&&Object.is(s.a1,n)&&Object.is(s.a2,r)&&Object.is(s.a3,i)||(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Fr(e,t,n,r,i){return(0,Ar.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Ir=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Mr(this,e,t,n,r)}},Lr=class extends Ir{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){Q.useDebugValue(e);let n=this;K(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;K(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this,n=Object.values(e);K(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){Q.useDebugValue(e);let n=this,r=t!==void 0;K(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return Q.useDebugValue(e),Mr(this,this.selectors[e],t,n,r)}useContextCallback(e,t){Q.useDebugValue(e);let n=J(t??S);this.context[e]=n}useStateSetter(e){let t=Q.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},Rr={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},zr=class extends Lr{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Bn(),nested:n,triggerElements:i},Rr),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&b(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Br(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new zr({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:m,inactiveTriggerProps:m,popupProps:m}}var Vr=e=>e.triggerIdProp??e.activeTriggerId,Hr=e=>e.openProp??e.open,Ur=e=>(e.popupElement?.id??e.floatingId)||void 0;function Wr(e,t){return t!==void 0&&Hr(e)&&Vr(e)===t}function Gr(e,t){return Wr(e,t)?!0:t!==void 0&&Hr(e)&&Vr(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var Kr={open:Hr,mounted:e=>e.mounted,transitionStatus:e=>Hr(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Vr,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Ur,isTriggerActive:(e,t)=>t!==void 0&&Vr(e)===t,isOpenedByTrigger:(e,t)=>Wr(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Vr(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>Gr(e,t)?Ur(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function qr(e){let t=Q.useCallback(t=>e===void 0?S:e.subscribeStore(t),[e]),n=Q.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,kr.useSyncExternalStore)(t,n,()=>e?.serverStore)}var Jr=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new ve;restTimeout=new ve;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Yr=new WeakMap;function Xr(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Yr.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),Yr.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Zr(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Yr.get(n);a&&a!==e&&Xr(a),Xr(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Yr.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Qr(e){let t=e.context.dataRef.current,n=Je(()=>t.hoverInteractionState??Jr.create()).current;return t.hoverInteractionState||=n,De(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function $r(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),s=e.useState(`floatingElement`),c=e.useState(`domReferenceElement`),{dataRef:l}=e.context,u=Gn(),f=Wn(),p=Qr(e),m=Ie(),h=J(()=>Lt(l.current.openEvent?.type,p.interactedInside)),g=J(()=>Rt(l.current.openEvent?.type)),_=J(()=>{Xr(p)});K(()=>{a||(p.pointerType=void 0,p.restTimeoutPending=!1,p.interactedInside=!1,_())},[a,p,_]),Q.useEffect(()=>_,[_]),K(()=>{if(n&&a&&p.handleCloseOptions?.blockPointerEvents&&g()&&G(c)&&s){let e=c,t=s,n=W(s),r=u?.nodesRef.current.find(e=>e.id===f)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=p.pointerEventsScopeElement===t?null:p.pointerEventsScopeElement,a=r===t?null:r,o=p.handleCloseOptions?.getScope?.()??i??a??Ye(e,`[data-rootownerid]`)??n.body;return Zr(p,{scopeElement:o,referenceElement:e,floatingElement:t}),()=>{_()}}},[n,a,c,s,p,g,u,f,_]),Q.useEffect(()=>{if(!n)return;function t(){return!!(u&&f&&mn(u.nodesRef.current,f).length>0)}function a(t){let n=Ft(r,`close`,p.pointerType),i=()=>{e.setOpen(!1,d(Ue,t)),u?.events.emit(`floating.closed`,t)};n?p.openChangeTimeout.start(n,i):(p.openChangeTimeout.clear(),i())}function c(e){let t=se(e);At(t)?p.interactedInside=Ye(t,`[aria-haspopup]`)!=null:p.interactedInside=!1}function v(){p.openChangeTimeout.clear(),m.clear(),u?.events.off(`floating.closed`,b),_()}function y(n){if(t()&&u){u.events.on(`floating.closed`,b);return}if(Et(n.relatedTarget,e.context.triggerElements))return;let r=l.current.floatingContext?.nodeId??i,s=n.relatedTarget;u&&r&&G(s)&&mn(u.nodesRef.current,r,!1).some(e=>o(e.context?.elements.floating,s))||(p.handler?p.handler(n):(_(),g()&&!h()&&a(n)))}function b(n){u&&f&&!t()&&m.start(0,()=>{u.events.off(`floating.closed`,b),e.setOpen(!1,d(Ue,n)),u.events.emit(`floating.closed`,n)})}let x=s;return zt(x&&q(x,`mouseenter`,v),x&&q(x,`mouseleave`,y),x&&q(x,`pointerdown`,c,!0),()=>{u?.events.off(`floating.closed`,b)})},[n,s,e,l,r,i,g,h,_,p,u,f,m])}var ei={current:null};function ti(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:s=0,move:c=!0,triggerElementRef:l=ei,externalTree:u,isActiveTrigger:f=!0,getHandleCloseContext:p,isClosing:m,shouldOpen:h,guardStaleOpen:g=!1}=t,{dataRef:_,events:v}=e.context,y=Gn(u),b=Qr(e),x=Q.useRef(!1),S=Pe(i),C=Pe(r),w=Pe(s),T=Pe(n),E=Pe(h),D=Pe(m),O=J(()=>Lt(_.current.openEvent?.type,b.interactedInside)),k=J(()=>E.current?.()!==!1),A=J((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!o(t,n);if(!G(r))return!1;let a=r;return i.hasMatchingElement(e=>o(e,a))&&(!t||!o(t,a))}),j=J(()=>{b.handler&&=(W(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,b.handler),void 0)}),M=J(()=>{Xr(b)});return f&&(b.handleCloseOptions=i?.__options),Q.useEffect(()=>j,[j]),Q.useEffect(()=>{if(!n)return;function e(e){e.open?x.current=!1:(x.current=e.reason===Ue,j(),b.openChangeTimeout.clear(),b.restTimeout.clear(),b.blockMouseMove=!0,b.restTimeoutPending=!1)}return v.on(`openchange`,e),()=>{v.off(`openchange`,e)}},[n,v,b,j]),Q.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=Ft(C.current,`close`,b.pointerType);r?b.openChangeTimeout.start(r,()=>{e.setOpen(!1,d(Ue,t)),y?.events.emit(`floating.closed`,t)}):n&&(b.openChangeTimeout.clear(),e.setOpen(!1,d(Ue,t)),y?.events.emit(`floating.closed`,t))}let r=l.current??(f?e.select(`domReferenceElement`):null);if(!G(r))return;function i(t){if(b.openChangeTimeout.clear(),b.blockMouseMove=!1,a&&!ae(b.pointerType))return;let n=It(w.current),r=Ft(C.current,`open`,b.pointerType),i=se(t),s=t.currentTarget??null,c=e.select(`domReferenceElement`),l=s;if(G(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(o(t,i)){l=t;break}}G(s)&&G(c)&&!e.context.triggerElements.hasElement(s)&&o(s,c)&&(l=c);let u=l!=null&&A(c,l,i),f=e.select(`open`),p=D.current?.()??e.select(`transitionStatus`)===`ending`,m=!f&&p&&x.current,h=!u&&G(l)&&G(c)&&o(c,l)&&m,g=n>0&&!r,_=u&&(f||m)||h,v=!f||u;_?k()&&e.setOpen(!0,d(Ue,t,l)):g||(r?b.openChangeTimeout.start(r,()=>{v&&k()&&e.setOpen(!0,d(Ue,t,l))}):v&&k()&&e.setOpen(!0,d(Ue,t,l)))}function s(n){if(O()){M();return}j();let r=e.select(`domReferenceElement`),i=W(r);b.restTimeout.clear(),b.restTimeoutPending=!1;let a=_.current.floatingContext??p?.();if(!Et(n.relatedTarget,e.context.triggerElements)){if(S.current&&a){e.select(`open`)||b.openChangeTimeout.clear();let r=l.current;b.handler=S.current({...a,tree:y,x:n.clientX,y:n.clientY,onClose(){M(),j(),T.current&&!O()&&r===e.select(`domReferenceElement`)&&t(n,!0)}}),i.addEventListener(`mousemove`,b.handler),b.handler(n)}else b.pointerType===`touch`&&o(e.select(`floatingElement`),n.relatedTarget)||t(n)}}function u(e){o(r,e.relatedTarget)||(b.openChangeTimeout.clear(),b.restTimeout.clear(),b.restTimeoutPending=!1)}let m=g?q(r,`mouseout`,u):void 0;return c?zt(q(r,`mousemove`,i,{once:!0}),q(r,`mouseenter`,i),q(r,`mouseleave`,s),m):zt(q(r,`mouseenter`,i),q(r,`mouseleave`,s),m)},[j,M,_,C,e,n,S,b,f,A,O,a,c,w,l,y,T,p,D,k,g]),Q.useMemo(()=>{if(!n)return;function t(e){b.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=A(i,r,t.target);if(a&&!ae(b.pointerType))return;if(o&&s&&b.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=b.handleCloseOptions?.getScope?.()??r.ownerDocument.body;Zr(b,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=It(w.current);if(o&&!s||c===0||!s&&b.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;b.restTimeout.clear();function l(){if(b.restTimeoutPending=!1,O())return;let t=e.select(`open`);!b.blockMouseMove&&(!t||s)&&k()&&e.setOpen(!0,d(Ue,n,r))}b.pointerType===`touch`?Qe.flushSync(()=>{l()}):s&&o?l():(b.restTimeoutPending=!0,b.restTimeout.start(c,l))}}},[n,b,O,A,a,e,w,k])}var ni=.1,ri=ni*ni,$=.5;function ii(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function ai(e,t,n,r,i,a,o,s,c,l){let u=!1;return ii(e,t,n,r,i,a)&&(u=!u),ii(e,t,i,a,o,s)&&(u=!u),ii(e,t,o,s,c,l)&&(u=!u),ii(e,t,c,l,n,r)&&(u=!u),u}function oi(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function si(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function ci(e={}){let{blockPointerEvents:t=!1}=e,n=new ve,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:s,tree:c})=>{let l=r?.split(`-`)[0],u=!1,d=null,f=null,p=typeof performance<`u`?performance.now():0;function m(e,t){let n=performance.now(),r=n-p;if(d===null||f===null||r===0)return d=e,f=t,p=n,!1;let i=e-d,a=t-f,o=i*i+a*a,s=r*r*ri;return d=e,f=t,p=n,o<s}function h(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,d=i.floating;if(!a||!d||l==null||e==null||t==null)return;let{clientX:f,clientY:p}=r,g=se(r),_=r.type===`mouseleave`,v=o(d,g),y=o(a,g);if(v&&(u=!0,!_))return;if(y&&(u=!1,!_)){u=!0;return}if(_&&G(r.relatedTarget)&&o(d,r.relatedTarget))return;function b(){return!!(c&&mn(c.nodesRef.current,s).length>0)}function x(){b()||h()}if(b())return;let S=a.getBoundingClientRect(),C=d.getBoundingClientRect(),w=e>C.right-C.width/2,T=t>C.bottom-C.height/2,E=C.width>S.width,D=C.height>S.height,O=(E?S:C).left,k=(E?S:C).right,A=(D?S:C).top,j=(D?S:C).bottom;if(l===`top`&&t>=S.bottom-1||l===`bottom`&&t<=S.top+1||l===`left`&&e>=S.right-1||l===`right`&&e<=S.left+1){x();return}let M=!1;switch(l){case`top`:M=si(f,p,O,S.top+1,k,C.bottom-1);break;case`bottom`:M=si(f,p,O,C.top+1,k,S.bottom-1);break;case`left`:M=si(f,p,C.right-1,j,S.left+1,A);break;case`right`:M=si(f,p,S.right-1,j,C.left+1,A)}if(M)return;if(u&&!oi(f,p,S)||!_&&m(f,p)){x();return}let N=!1;switch(l){case`top`:{let n=E?$/2:$*4,r=E||w?e+n:e-n,i=E?e-n:w?e+n:e-n,a=t+$+1,o=w||E?C.bottom-$:C.top,s=w?E?C.bottom-$:C.top:C.bottom-$;N=ai(f,p,r,a,i,a,C.left,o,C.right,s);break}case`bottom`:{let n=E?$/2:$*4,r=E||w?e+n:e-n,i=E?e-n:w?e+n:e-n,a=t-$,o=w||E?C.top+$:C.bottom,s=w?E?C.top+$:C.bottom:C.top+$;N=ai(f,p,r,a,i,a,C.left,o,C.right,s);break}case`left`:{let n=D?$/2:$*4,r=D||T?t+n:t-n,i=D?t-n:T?t+n:t-n,a=e+$+1,o=T||D?C.right-$:C.left,s=T?D?C.right-$:C.left:C.right-$;N=ai(f,p,o,C.top,s,C.bottom,a,r,a,i);break}case`right`:{let n=D?$/2:$*4,r=D||T?t+n:t-n,i=D?t-n:T?t+n:t-n,a=e-$,o=T||D?C.left+$:C.right,s=T?D?C.left+$:C.right:C.left+$;N=ai(f,p,a,r,a,i,o,C.top,s,C.bottom);break}}N?u||n.start(40,x):x()}};return r.__options={...e,blockPointerEvents:t},r}function li(e,t,n){let{reference:r,floating:i}=e,o=de(t),s=oe(t),c=re(s),l=V(t),u=o===`y`,d=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,p=r[c]/2-i[c]/2,m;switch(l){case`top`:m={x:d,y:r.y-i.height};break;case`bottom`:m={x:d,y:r.y+r.height};break;case`right`:m={x:r.x+r.width,y:f};break;case`left`:m={x:r.x-i.width,y:f};break;default:m={x:r.x,y:r.y}}let h=a(t);return h&&(m[s]+=p*(h===`end`?1:-1)*(n&&u?-1:1)),m}async function ui(e,t){t===void 0&&(t={});let{x:r,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:l=`clippingAncestors`,rootBoundary:u=`viewport`,elementContext:d=`floating`,altBoundary:f=!1,padding:p=0}=I(t,e),m=w(p),h=s[f?d===`floating`?`reference`:`floating`:d],g=n(await a.getClippingRect({element:await(a.isElement==null?void 0:a.isElement(h))??!0?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),_=d===`floating`?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,v=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),y=await(a.isElement==null?void 0:a.isElement(v))&&await(a.getScale==null?void 0:a.getScale(v))||{x:1,y:1},b=n(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:_,offsetParent:v,strategy:c}):_);return{top:(g.top-b.top+m.top)/y.y,bottom:(b.bottom-g.bottom+m.bottom)/y.y,left:(g.left-b.left+m.left)/y.x,right:(b.right-g.right+m.right)/y.x}}var di=50,fi=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ui},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=li(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<di&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=li(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},pi=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=I(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=V(r),_=de(o),y=V(o)===o,b=await(s.isRTL==null?void 0:s.isRTL(c.floating)),x=d||(y||!m?[Ae(o)]:ce(o)),S=p!==`none`;!d&&S&&x.push(...E(o,m,p,b));let C=[o,...x],w=await s.detectOverflow(t,h),T=[],D=i.flip?.overflows||[];if(l&&T.push(w[g]),u){let e=v(r,a,b);T.push(w[e[0]],w[e[1]])}if(D=[...D,{placement:r,overflows:T}],!T.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=C[e];if(t&&(u!==`alignment`||_===de(t)||D.every(e=>de(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:D},reset:{placement:t}};let n=D.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=D.filter(e=>{if(S){let t=de(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},mi=new Set([`left`,`top`]);async function hi(e,t){let{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=V(n),c=a(n),l=de(n)===`y`,u=mi.has(s)?-1:1,d=o&&l?-1:1,f=I(t,e),{mainAxis:p,crossAxis:m,alignmentAxis:h}=typeof f==`number`?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof h==`number`&&(m=c===`end`?h*-1:h),l?{x:m*d,y:p*u}:{x:p*u,y:m*d}}var gi=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await hi(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},_i=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=I(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=de(i),p=h(f),m=u[p],g=u[f],_=(e,t)=>x(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=_(p,m)),s&&(g=_(f,g));let v=c.fn({...t,[p]:m,[f]:g});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:o,[f]:s}}}}}},vi=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=I(e,t),u={x:n,y:r},d=de(i),f=h(d),p=u[f],m=u[d],g=I(s,t),_=typeof g==`number`?{mainAxis:g,crossAxis:0}:{mainAxis:g.mainAxis??0,crossAxis:g.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+_.mainAxis,n=a.reference[f]+a.reference[e]-_.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=mi.has(V(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:_.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?_.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},yi=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:o}=t,{apply:s=()=>{},...c}=I(e,t),l=await i.detectOverflow(t,c),u=V(n),d=a(n),f=de(n)===`y`,{width:p,height:m}=r.floating,h,g;u===`top`||u===`bottom`?(h=u,g=d===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?`start`:`end`)?`left`:`right`):(g=u,h=d===`end`?`top`:`bottom`);let _=m-l.top-l.bottom,v=p-l.left-l.right,y=F(m-l[h],_),b=F(p-l[g],v),x=t.middlewareData.shift,S=!x,C=y,w=b;x!=null&&x.enabled.x&&(w=v),x!=null&&x.enabled.y&&(C=_),S&&!d&&(f?w=p-2*H(l.left,l.right):C=m-2*H(l.top,l.bottom)),await s({...t,availableWidth:w,availableHeight:C});let T=await i.getDimensions(o.floating);return p!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function bi(e){let t=Re(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=X(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ye(n)!==a||ye(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function xi(e){return G(e)?e:e.contextElement}function Si(e){let t=xi(e);if(!X(t))return O(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=bi(t),o=(a?ye(n.width):n.width)/r,s=(a?ye(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var Ci=O(0);function wi(e){let t=Be(e);return!P()||!t.visualViewport?Ci:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ti(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Be(e)}function Ei(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);let a=e.getBoundingClientRect(),o=xi(e),s=O(1);t&&(i?G(i)&&(s=Si(i)):s=Si(e));let c=Ti(o,r,i)?wi(o):O(0),l=(a.left+c.x)/s.x,u=(a.top+c.y)/s.y,d=a.width/s.x,f=a.height/s.y;if(o&&i){let e=Be(o),t=G(i)?Be(i):i,n=e,r=ke(n);for(;r&&t!==n;){let e=Si(r),t=r.getBoundingClientRect(),i=Re(r),a=t.left+(r.clientLeft+parseFloat(i.paddingLeft))*e.x,o=t.top+(r.clientTop+parseFloat(i.paddingTop))*e.y;l*=e.x,u*=e.y,d*=e.x,f*=e.y,l+=a,u+=o,n=Be(r),r=ke(n)}}return n({width:d,height:f,x:l,y:u})}function Di(e,t){let n=Se(e).scrollLeft;return t?t.left+n:Ei(be(e)).left+n}function Oi(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Di(e,n),y:n.top+t.scrollTop}}function ki(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=be(r),s=t?u(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=O(1),d=O(0),f=X(r);if((f||!a)&&((Y(r)!==`body`||He(o))&&(c=Se(r)),f)){let e=Ei(r);l=Si(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}let p=o&&!f&&!a?Oi(o,c):O(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+p.x,y:n.y*l.y-c.scrollTop*l.y+d.y+p.y}}function Ai(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ji(e){let t=Se(e),n=e.ownerDocument.body,r=H(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=H(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Di(e),o=-t.scrollTop;return Re(n).direction===`rtl`&&(a+=H(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Mi=25;function Ni(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Be(e),a=be(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!P()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Di(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Mi&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Pi(e,t){let n=Ei(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Si(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Fi(e,t,r){let i;if(t===`viewport`||t===`layoutViewport`)i=Ni(e,r,t);else if(t===`document`)i=ji(be(e));else if(G(t))i=Pi(t,r);else{let n=wi(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return n(i)}function Ii(e,t){let n=t.get(e);if(n)return n;let r=xe(e,[],!1).filter(e=>G(e)&&Y(e)!==`body`),i=null,a=Re(e).position===`fixed`,o=a?pe(e):e;for(;G(o)&&!te(o);){let e=Re(o),t=Ge(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=pe(o)}return t.set(e,r),r}function Li(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?u(t)?[]:Ii(t,this._c):[].concat(n),r],o=Fi(t,a[0],i),s=o.top,c=o.right,l=o.bottom,d=o.left;for(let e=1;e<a.length;e++){let n=Fi(t,a[e],i);s=H(n.top,s),c=F(n.right,c),l=F(n.bottom,l),d=H(n.left,d)}return{width:c-d,height:l-s,x:d,y:s}}function Ri(e){let{width:t,height:n}=bi(e);return{width:t,height:n}}function zi(e,t,n){let r=X(t),i=be(t),a=n===`fixed`,o=Ei(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=O(0);if((r||!a)&&((Y(t)!==`body`||He(i))&&(s=Se(t)),r)){let e=Ei(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Di(i));let l=i&&!r&&!a?Oi(i,s):O(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Bi(e){return Re(e).position===`static`}function Vi(e,t){if(!X(e)||Re(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return be(e)===n&&(n=n.ownerDocument.body),n}function Hi(e,t){let n=Be(e);if(u(e))return n;if(!X(e)){let t=pe(e);for(;t&&!te(t);){if(G(t)&&!Bi(t))return t;t=pe(t)}return n}let r=Vi(e,t);for(;r&&p(r)&&Bi(r);)r=Vi(r,t);return r&&te(r)&&Bi(r)&&!Ge(r)?n:r||_e(e)||n}var Ui=async function(e){let t=this.getOffsetParent||Hi,n=this.getDimensions,r=await n(e.floating);return{reference:zi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Wi(e){return Re(e).direction===`rtl`}var Gi={convertOffsetParentRelativeRectToViewportRelativeRect:ki,getDocumentElement:be,getClippingRect:Li,getOffsetParent:Hi,getElementRects:Ui,getClientRects:Ai,getDimensions:Ri,getScale:Si,isElement:G,isRTL:Wi};function Ki(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function qi(e,t,n){let r=null,i,a=be(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=qe(d),h=qe(a.clientWidth-(u+f)),g=qe(a.clientHeight-(d+p)),_=qe(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:H(0,F(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Ki(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Be(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Ji(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=xi(e),u=i||a?[...l?xe(l):[],...t?xe(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?qi(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Ei(e):null;c&&g();function g(){let t=Ei(e);h&&!Ki(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Yi=gi,Xi=_i,Zi=pi,Qi=yi,$i=vi,ea=(e,t,n)=>{let r=new Map,i=n??{},a={...Gi,...i.platform,_c:r};return fi(e,t,{...i,platform:a})},ta=typeof document<`u`?Q.useLayoutEffect:function(){};function na(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!na(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!na(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ra(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ia(e,t){let n=ra(e);return Math.round(t*n)/n}function aa(e){let t=Q.useRef(e);return ta(()=>{t.current=e}),t}function oa(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=Q.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Q.useState(r);na(f,r)||p(r);let[m,h]=Q.useState(null),[g,_]=Q.useState(null),v=Q.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=Q.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=Q.useRef(null),C=Q.useRef(null),w=Q.useRef(u),T=c!=null,E=aa(c),D=aa(i),O=aa(l),k=Q.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),ea(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!na(w.current,t)&&(w.current=t,Qe.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);ta(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=Q.useRef(!1);ta(()=>(A.current=!0,()=>{A.current=!1}),[]),ta(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=Q.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=Q.useMemo(()=>({reference:b,floating:x}),[b,x]),N=Q.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=ia(M.floating,u.x),r=ia(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...ra(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return Q.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var sa=(e,t)=>{let n=Yi(e);return{name:n.name,fn:n.fn,options:[e,t]}},ca=(e,t)=>{let n=Xi(e);return{name:n.name,fn:n.fn,options:[e,t]}},la=(e,t)=>({fn:$i(e).fn,options:[e,t]}),ua=(e,t)=>{let n=Zi(e);return{name:n.name,fn:n.fn,options:[e,t]}},da=(e,t)=>{let n=Qi(e);return{name:n.name,fn:n.fn,options:[e,t]}};function fa(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=Q.useState(null),d=Q.useRef(null),f=Gn(n),p=Q.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=oa({...e,elements:{...p,...l&&{reference:l}}}),h=Q.useCallback(e=>{let t=G(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=Q.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),_=Q.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),v=Q.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:_,nodeId:t,rootStore:r}),[m,g,_,t,r,s,c]);return K(()=>{o&&(d.current=o)},[o]),K(()=>{r.context.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),Q.useMemo(()=>({...m,context:v,refs:g,elements:_,rootStore:r}),[m,g,_,v,r])}var pa=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:o,platform:s,elements:c,middlewareData:l}=t,{element:u,padding:d=0}=I(e,t)||{};if(u==null)return{};let f=w(d),p={x:n,y:r},m=oe(i),h=re(m),g=await s.getDimensions(u),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,S=o.reference[h]+o.reference[m]-p[m]-o.floating[h],C=p[m]-o.reference[m],T=c.floating[b]||o.floating[h],E=S/2-C/2,D=T/2-g[h]/2-1,O=Math.min(f[v],D),k=Math.min(f[y],D),A=O,j=T-g[h]-k,M=T/2-g[h]/2+E,N=x(A,M,j),P=!l.arrow&&a(i)!=null&&M!==N&&o.reference[h]/2-(M<A?O:k)-g[h]/2<0,F=P?M<A?M-A:M-j:0;return{[m]:p[m]+F,data:{[m]:N,centerOffset:M-N-F,...P&&{alignmentOffset:F}},reset:P}}}),ma=(e,t)=>{let{name:n,fn:r}=pa(e);return{name:n,fn:r,options:[e,t]}},ha={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},ga={sideX:`left`,sideY:`top`},_a=`--available-width`,va=`--available-height`,ya=`--anchor-width`,ba=`--anchor-height`,xa=`--transform-origin`,Sa=_a,Ca=va;function wa(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function Ta(e,t,n){let{rects:r,placement:i}=e;return{side:wa(t,V(i),n),align:a(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Ea(e){return Da(e,fa)}function Da(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:o=0,align:s=`center`,alignOffset:c=0,collisionBoundary:l,collisionPadding:u=5,sticky:d=!1,arrowPadding:f=5,disableAnchorTracking:p=!1,inline:m,keepMounted:h=!1,floatingRootContext:g,mounted:_,collisionAvoidance:v,shift:y,nodeId:b,adaptiveOrigin:x,lazyFlip:S=!1,externalTree:C}=e,w=v.side||`flip`,T=v.align||`flip`,E=v.fallbackAxisSide||`end`,D=y?.crossAxis??!1,O=y?.rootBoundary,k=typeof n==`function`?n:void 0,A=J(k),j=k?A:n,M=Pe(n),N=Pe(_),P=We()===`rtl`,[F,I]=Q.useState(null);!_&&F!==null&&I(null);let ee=S===`placement`,L=F?V(F):null,R=F&&ee?a(F)||`center`:null,te=L||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":P?`left`:`right`,"inline-start":P?`right`:`left`}[i],z=R||s,ne=z===`center`?te:`${te}-${z}`,B=u;typeof B==`number`?B={top:B,right:B,bottom:B,left:B}:B&&={top:B.top||0,right:B.right||0,bottom:B.bottom||0,left:B.left||0};let re=+(i===`bottom`),ie=+(i===`top`),ae=+(i===`right`),oe=+(i===`left`),se={boundary:l===`clipping-ancestors`?`clippingAncestors`:l,padding:B},ce=Q.useRef(null),le=Pe(o),ue=Pe(c),fe=typeof o==`function`?0:o,H=typeof c==`function`?0:c,U=[];m&&U.push(m),U.push(sa(e=>{let t=Ta(e,i,P),n=typeof le.current==`function`?le.current(t):le.current,r=typeof ue.current==`function`?ue.current(t):ue.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[fe,H,P,i]));let pe=T===`none`&&w!==`shift`,me=!pe&&(d||D||w===`shift`),G=w===`none`?null:ua({...se,padding:{top:B.top+1+re,right:B.right+1+oe,bottom:B.bottom+1+ie,left:B.left+1+ae},mainAxis:!D&&w===`flip`,crossAxis:T===`flip`&&`alignment`,fallbackAxisSideDirection:E}),he=pe?null:ca({...se,rootBoundary:O,mainAxis:T!==`none`,crossAxis:me,limiter:d||D?void 0:la(e=>{if(!ce.current)return{};let{width:t,height:n}=ce.current.getBoundingClientRect(),r=de(V(e.placement)),i=r===`y`?t:n,a=r===`y`?B.left+B.right:B.top+B.bottom;return{offset:i/2+a/2}})},[se,d,D,O,B,T]);w===`shift`||T===`shift`||z===`center`?U.push(he,G):U.push(G,he),U.push(da({...se,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!N.current)return;let i=e.style;i.setProperty(Sa,`${t}px`),i.setProperty(Ca,`${n}px`);let a=Be(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(ya,`${u}px`),i.setProperty(ba,`${d}px`)}}),ma(e=>({element:ce.current||W(e.elements.floating).createElement(`div`),padding:ce.current?f:0}),[f]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:s,rects:c,y:l}=e,u=V(r),d=a(r),f=de(u)===`y`,p=ce.current,m=typeof o==`function`?o(Ta(e,i,P)):o,h;h=!p&&d&&Math.abs(f?n.shift?.x||0:n.shift?.y||0)<=1?d===`start`===(f&&s.isRTL?.(t)===!0)?`100%`:`0%`:`${(f?n.arrow?.x||0:n.arrow?.y||0)+(f?p?.clientWidth||0:p?.clientHeight||0)/2}px`;let g=u===`top`||u===`left`?`calc(100% + ${m}px)`:`${-m}px`;return me&&f&&Math.abs(n.shift?.y||0)>m&&(g=`${c.reference.y+c.reference.height/2-l}px`),t.style.setProperty(xa,f?`${h} ${g}`:`${g} ${h}`),{}}},ha,x),K(()=>{!_&&g&&g.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[_,g]);let ge=Q.useMemo(()=>({ancestorScroll:!p,elementResize:!p&&typeof ResizeObserver<`u`,layoutShift:!p&&typeof IntersectionObserver<`u`}),[p]),{refs:_e,elements:ve,x:ye,y:be,middlewareData:xe,update:Se,placement:q,context:Ce,isPositioned:we,floatingStyles:Te}=t({rootContext:g,open:h?_:void 0,placement:ne,middleware:U,strategy:r,whileElementsMounted:h?void 0:(...e)=>Ji(...e,ge),nodeId:b,externalTree:C}),{sideX:Ee,sideY:Y}=xe.adaptiveOrigin||ga,De=we?r:`fixed`,Oe=Q.useMemo(()=>{let e;return e=we?x?{position:De,[Ee]:ye,[Y]:be}:{...Te,position:De}:{position:De,top:0,left:0},e[Sa]=`100vw`,e[Ca]=`100vh`,we||(e.opacity=0),e},[x,De,Ee,ye,Y,be,Te,we]),ke=Q.useRef(null);K(()=>{if(!_)return;let e=M.current,t=typeof e==`function`?e():e,n=(Oa(t)?t.current:t)||null;n!==ke.current&&(_e.setPositionReference(n),ke.current=n)},[_,_e,j,M]),Q.useEffect(()=>{if(!_)return;let e=M.current;typeof e!=`function`&&Oa(e)&&e.current!==ke.current&&(_e.setPositionReference(e.current),ke.current=e.current)},[_,_e,j,M]),Q.useEffect(()=>{if(h&&_&&ve.reference&&ve.floating)return Ji(ve.reference,ve.floating,Se,ge)},[h,_,ve,Se,ge]);let Ae=V(q),je=wa(i,Ae,P),Me=a(q)||`center`,Ne=!!xe.hide?.referenceHidden;K(()=>{S&&_&&we&&(Ae!==te||ee&&Me!==z)&&I(q)},[S,ee,_,we,q,Ae,Me,te,z]);let Fe=Q.useMemo(()=>({position:`absolute`,top:xe.arrow?.y,left:xe.arrow?.x}),[xe.arrow]),Ie=xe.arrow?.centerOffset!==0;return Q.useMemo(()=>({positionerStyles:Oe,arrowStyles:Fe,arrowRef:ce,arrowUncentered:Ie,side:je,align:Me,physicalSide:Ae,anchorHidden:Ne,refs:_e,context:Ce,isPositioned:we,update:Se}),[Oe,Fe,ce,Ie,je,Me,Ae,Ne,_e,Ce,we,Se])}function Oa(e){return e!=null&&`current`in e}function ka(e){return e===`starting`?An:m}function Aa(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),j(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},ka(r),i],stateAttributesMapping:Ct})}function ja(e,t,n,r=!0,i,a){let[o,s]=Q.useState(),c=R(i?`${i}-label`:void 0),l=!!a?.trim(),u=e??(l?void 0:t)??o;return K(()=>{let i=e||t||l||!r?void 0:Ma(n.current,c);o!==i&&s(i)}),u}function Ma(e,t){let n=Na(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Na(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}var Pa=Q.createContext(void 0);function Fa(e){let t=Q.useContext(Pa);if(t===void 0&&!e)throw Error(Fe(69));return t}var Ia=Q.createContext(void 0);function La(e){let t=Q.useContext(Ia);if(t===void 0&&!e)throw Error(Fe(47));return t}var Ra={...Kr,disabled:e=>e.disabled,instantType:e=>e.instantType===`trigger-change`&&!Kr.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===`trigger-press`&&Kr.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod===`touch`&&e.openChangeReason===`trigger-press`,hasTriggerFocusGuards:(e,t)=>Kr.isOpenedByTrigger(e,t)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},za=class extends Lr{constructor(e,t,n){let r=new wr;super(Ba(e,r,t,n),Va(r),Ra)}setOpen=(e,t)=>{let n=t.reason===Ue,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=_r(t),o=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&o!=null&&(t.trigger=this.context.triggerElements.getById(o)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n=gr(this.state,e,t.trigger,a());n.openChangeReason=t.reason,this.update(n)};n?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(500,()=>{this.context.stickIfOpen=!1}),Qe.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function Ba(e,t,n,r=!1){let i={...Br(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function Va(e){return{popupRef:Q.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:Q.createRef(),beforeTriggerFocusGuardRef:Q.createRef(),beforeContentFocusGuardRef:Q.createRef(),stickIfOpenTimeout:new ve,stickIfOpen:!0,triggerElements:e}}var Ha=rt(function({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=Wa(s,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let f=u.useState(`open`),p=u.useState(`mounted`),m=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),Cr(u,f),br(u);let{forceUnmount:h}=xr(f,u,()=>{u.context.stickIfOpen=!0,u.set(`openChangeReason`,null)});u.useSyncedValues({modal:o}),Q.useEffect(()=>{f||u.context.stickIfOpenTimeout.clear()},[u,f]),Q.useImperativeHandle(e.actionsRef,()=>({unmount:h,close:()=>u.setOpen(!1,d(ze))}),[h,u]);let g=f||p||s!=null;return(0,Z.jsxs)(Ia.Provider,{value:u,children:[s&&(0,Z.jsx)(pr,{handle:s,store:u}),g&&(0,Z.jsx)(Ga,{store:u,modal:o}),typeof t==`function`?t({payload:m}):t]})});function Ua(e){return La(!0)?(0,Z.jsx)(Ha,{props:e}):(0,Z.jsx)(Jn,{children:(0,Z.jsx)(Ha,{props:e})})}function Wa(e,t){let n=fr((e,n)=>new za(t,e,n));return Q.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function Ga({store:e,modal:t}){let n=sr(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),r=n.reference,i=n.floating;return Sr(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:i}),null}function Ka(e,t){function n(n,r,i){let a=n.currentTarget;Qe.flushSync(()=>{e.setOpen(!1,d(Ee,n.nativeEvent,a))}),un(a.isConnected?a:t.current,r,i)?.focus()}function r(t){n(t,-1,e.select(`positionerElement`))}function i(t){let r=e.select(`positionerElement`);r&&dn(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function qa(e){let t=Q.useRef(``),n=Q.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:Q.useCallback(n=>{n.detail===0?e(n,`keyboard`):(`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``)},[e]),onPointerDown:n}}function Ja(e,t){let{onClick:n,onPointerDown:r}=qa(J((n,r)=>{(typeof e==`function`?e():e)||t(r||(U?`touch`:``))}));return Q.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function Ya(e){let[t,n]=Q.useState(null),r=Ja(e,n);return Te(e,t=>{t&&!e&&n(null)}),Q.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var Xa=it(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,handle:s,payload:c,openOnHover:l=!1,delay:u=300,closeDelay:d=0,id:f,...p}=e,m=La(!0),h=qr(s)??m;if(!h)throw Error(Fe(74));let g=R(f),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerPopupId`,g),x=Q.useRef(null),{registerTrigger:S,isMountedByThisTrigger:C}=yr(g,x,h,{payload:c,disabled:a,openOnHover:l,closeDelay:d}),w=h.useState(`isPressOpenedByTrigger`,g),T=h.useState(`isTouchPressOpen`,l),E=h.useState(`hasTriggerFocusGuards`,g),D=ti(v,{enabled:!a&&l&&!T,mouseOnly:!0,move:!1,handleClose:ci(),restMs:u,delay:{close:d},triggerElementRef:x,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),O=ir(v,{stickIfOpen:J(()=>h.context.stickIfOpen)}),k=Ja(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),A=h.useState(`triggerProps`,C),{getButtonProps:M,buttonRef:N}=Ne({disabled:a,native:o}),P={open(e){return w?St.open(e):xt.open(e)}},{handlePreFocusGuardFocus:F,handleFocusTargetFocus:I}=Ka(h,x),ee=j(`button`,e,{state:{disabled:a,open:y},ref:[N,t,S,x],props:[O.reference,D,A,k,{[jn]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":y,"aria-controls":b},p,M],stateAttributesMapping:P}),L=(0,Z.jsx)(Q.Fragment,{children:ee},g);return E?(0,Z.jsxs)(Q.Fragment,{children:[(0,Z.jsx)(Ut,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:F}),L,(0,Z.jsx)(Ut,{ref:h.context.triggerFocusTargetRef,onFocus:I})]}):L}),Za=Q.createContext(void 0);function Qa(){let e=Q.useContext(Za);if(e===void 0)throw Error(Fe(45));return e}var $a=Q.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return La().useState(`mounted`)||n?(0,Z.jsx)(Za.Provider,{value:n,children:(0,Z.jsx)(zn,{ref:t,...r})}):null}),eo=Q.createContext(void 0);function to(){let e=Q.useContext(eo);if(!e)throw Error(Fe(46));return e}var no=Q.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,Z.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function ro(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=Q.useRef(null),o=Q.useRef(null),s=Ve(r);K(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),K(()=>{let e=n,r=a.current;if(e&&(a.current=e),!r||!e||e===r||!t.select(`open`))return;t.set(`instantType`,void 0);let i=new AbortController;return o.current=i,s(()=>{t.select(`open`)&&t.set(`instantType`,`trigger-change`)},i.signal),()=>{i.abort()}},[n,s,t])}var io={},ao={},oo=``;function so(e,t){return He(e)?e:t}function co(e,t,n){return/hidden|clip/.test(e.getComputedStyle(so(t,n)).overflowY)}function lo(e){if(typeof document>`u`)return!1;let t=W(e);return Be(t).innerWidth-t.documentElement.clientWidth>0}function uo(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=W(e),n=t.documentElement,r=t.body,i=so(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function fo(e){let t=W(e),n=t.documentElement,r=t.body,i=so(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function po(e){let t=W(e),n=t.documentElement,r=t.body,i=Be(n),a=0,o=0,s=!1,c=Le.create();if(ot&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,io={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},oo=n.style.scrollBehavior,ao={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=so(n,r);s=uo(e),s?(n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`)}function u(){Object.assign(n.style,io),Object.assign(r.style,ao),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=oo)}function d(){u(),c.request(l)}l();let f=q(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var mo=new class{lockCount=0;restore=null;timeoutLock=ve.create();timeoutUnlock=ve.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=W(e),n=t.documentElement,r=t.body,i=Be(n);if(co(i,n,r)){let t=new i.MutationObserver(()=>{co(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=U||!lo(e);this.restore=a?fo(e):po(e)}};function ho(e=!0,t=null){K(()=>{if(e)return mo.acquire(t)},[e,t])}var go=20;function _o(e,t,n,r){let[i,a]=Q.useState(!1);K(()=>{if(!e||!t||n==null){a(!1);return}let r=W(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-go)},[e,t,n]),ho(e&&(!t||i),r)}var vo=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=Nn,..._}=e,v=La(),y=Qa(),b=Kn(),x=v.useState(`floatingRootContext`),S=v.useState(`mounted`),C=v.useState(`open`),w=v.useState(`openChangeReason`),T=v.useState(`activeTriggerElement`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`positionerElement`),k=v.useState(`instantType`),A=v.useState(`transitionStatus`),j=Ea({anchor:a,floatingRootContext:x,positionMethod:o,mounted:S,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:y,nodeId:b,collisionAvoidance:g,adaptiveOrigin:v.useState(`adaptiveOrigin`)});ro({store:v,domReference:x.useState(`domReferenceElement`),positionerElement:O,open:C});let M=E===!0&&w!==`trigger-hover`;_o(C&&M,D===`touch`,O,T);let N=v.useStateSetter(`positionerElement`),P=Aa(e,{open:C,side:j.side,align:j.align,anchorHidden:j.anchorHidden,instant:k},{styles:j.positionerStyles,transitionStatus:A,props:_,refs:[t,N],hidden:!S,inert:!C});return(0,Z.jsxs)(eo.Provider,{value:j,children:[S&&M&&(0,Z.jsx)(no,{inert:me(!C),cutout:T}),(0,Z.jsx)(qn,{id:b,children:P})]})}),yo=Q.createContext(void 0);function bo(){let[e,t]=Q.useState(0),n=J(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:Q.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}var xo=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...c}=e,l=La(),u=to(),d=Fa(!0)!=null,{context:f,hasClosePart:p}=bo(),m=l.useState(`open`),h=l.useState(`openMethod`),g=l.useState(`instantType`),_=l.useState(`transitionStatus`),v=l.useState(`popupProps`),y=l.useState(`titleElementId`),b=l.useState(`descriptionElementId`),x=l.useState(`modal`),S=l.useState(`mounted`),C=l.useState(`openChangeReason`),w=l.useState(`activeTriggerElement`),T=l.useState(`floatingRootContext`),E=T.useState(`floatingId`),D=l.useState(`disabled`),O=l.useState(`openOnHover`),k=l.useState(`closeDelay`);s({open:m,ref:l.context.popupRef,onComplete(){m&&l.context.onOpenChangeComplete?.(!0)}}),$r(T,{enabled:O&&!D,closeDelay:k});let A=a===void 0?dr(l.context.popupRef):a,M=x!==!1&&p;l.useSyncedValue(`focusManagerModal`,M);let N=l.useStateSetter(`popupElement`),P={open:m,side:u.side,align:u.align,instant:g,transitionStatus:_},F=j(`div`,e,{state:P,ref:[t,l.context.popupRef,N],props:[v,{id:E,role:`dialog`,...ur,"aria-labelledby":y,"aria-describedby":b,onKeyDown(e){d&&Me.has(e.key)&&e.stopPropagation()}},ka(_),c],stateAttributesMapping:wt});return(0,Z.jsx)(rr,{context:T,openInteractionType:h,modal:M,disabled:!S||C===`trigger-hover`,initialFocus:A,returnFocus:o,restoreFocus:`popup`,getInsideElements:()=>[l.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:X(w)?w:void 0,nextFocusableElement:l.context.triggerFocusTargetRef,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:(0,Z.jsx)(yo.Provider,{value:f,children:F})})});export{zn as $,ur as A,rt as At,Cr as B,qr as C,ht as Ct,Lr as D,dt as Dt,zr as E,lt as Et,gr as F,ir as G,lr as H,br as I,Jn as J,rr as K,xr as L,vr as M,Ze as Mt,_r as N,Er as O,st as Ot,dr as P,Vn as Q,Sr as R,Qr as S,mt as St,Kr as T,ft as Tt,cr as U,yr as V,sr as W,Wn as X,Kn as Y,Gn as Z,Ea as _,Tt as _t,ro as a,gn as at,ti as b,St as bt,Xa as c,Ht as ct,Ka as d,Nt as dt,Rn as et,Ua as f,At as ft,ka as g,Mt as gt,Aa as h,kt as ht,ho as i,vn as it,pr as j,it as jt,wr as k,ot as kt,Ya as l,zt as lt,ja as m,jt as mt,vo as n,Mn as nt,no as o,Ut as ot,Fa as p,Et as pt,qn as q,_o as r,Nn as rt,$a as s,Vt as st,xo as t,jn as tt,Ja as u,Ft as ut,Gi as v,Ct as vt,Br as w,ut as wt,$r as x,xt,ci as y,wt as yt,fr as z};
|