lantern-harness 0.1.9 → 0.1.10
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/CHANGELOG.md +82 -0
- package/README.md +6 -6
- package/builtin/session/lh-fs.mjs +32 -14
- package/dist/500.html +258 -22
- package/dist/_astro/Base.BOY6F0mi.css +1 -0
- package/dist/_astro/Base.astro_astro_type_script_index_0_lang.C30xtpc6.js +1 -0
- package/dist/_astro/CaseExecBoard.Dttqp0wg.js +1 -0
- package/dist/_astro/CaseGenerateApp.DqW_nWMc.js +9 -0
- package/dist/_astro/CasesLibrary.8aMUUGp_.js +1 -0
- package/dist/_astro/ChatApp.BLxf0h1d.js +219 -0
- package/dist/_astro/ColumnResize.BEkEW7qw.js +1 -0
- package/dist/_astro/{ConfirmDialog.CBVsDJ8f.js → ConfirmDialog.BZzZWDci.js} +1 -1
- package/dist/_astro/{DashboardBoard.DCtfrrJz.js → DashboardBoard.CkSbhEDI.js} +3 -3
- package/dist/_astro/DatePicker.Bkl71M49.js +1 -0
- package/dist/_astro/DocsFileBrowser.MKVCfZrE.js +1 -0
- package/dist/_astro/DocsPager.DJY4foYL.js +1 -0
- package/dist/_astro/{DrawerField.CWMLhcPX.js → DrawerField.CHRg77LG.js} +1 -1
- package/dist/_astro/{ExcelFieldTags.B_XMwNNx.js → ExcelFieldTags.DXMeaDa5.js} +4 -4
- package/dist/_astro/KnowledgeLibrary.B-p1aoQN.js +1 -0
- package/dist/_astro/NamePromptDialog.Wa9O530a.js +1 -0
- package/dist/_astro/NavLibraries.C6LImMO_.js +1 -0
- package/dist/_astro/OverflowHint.D6v4Uj2N.js +1 -0
- package/dist/_astro/PluginsPage.-97n3x2U.js +39 -0
- package/dist/_astro/PluginsPage.DkmRPfbU.js +1 -0
- package/dist/_astro/PmBugsBoard.CMT4-eoB.js +1 -0
- package/dist/_astro/PmIterationsBoard.BQM_dzdZ.js +1 -0
- package/dist/_astro/PmProjectDetail.CzU80pat.js +1 -0
- package/dist/_astro/PmProjectsBoard.Cxsa7SYQ.js +1 -0
- package/dist/_astro/PmRequirementsBoard.4_JMDDN0.js +1 -0
- package/dist/_astro/PmRequirementsBoard.B8HL07cw.js +1 -0
- package/dist/_astro/PmShared.Ca2Ao7v_.js +1 -0
- package/dist/_astro/PromptsLibrary.C9BcIxKK.js +1 -0
- package/dist/_astro/ReportsPage.Fh5DRKLT.js +1 -0
- package/dist/_astro/RequirementsLibrary.CBkuWE8X.js +1 -0
- package/dist/_astro/SearchableSelect.DnjoSslK.js +1 -0
- package/dist/_astro/SelectDropdown.CuuDHa8s.js +1 -0
- package/dist/_astro/SettingsDialog.CJvBRcs9.js +1 -0
- package/dist/_astro/SlideOverDrawer.B7B5Wu8I.js +1 -0
- package/dist/_astro/{SpaceSwitcher.CI3KDBOA.js → SpaceSwitcher.BVQLt_tL.js} +2 -2
- package/dist/_astro/TagSelect.CuN5RdF4.js +1 -0
- package/dist/_astro/TasksBoard.Bu-fpIZ7.js +1 -0
- package/dist/_astro/TemplatesLibrary.DSylQGlN.js +1 -0
- package/dist/_astro/TestStatsBoard.CPyKW4wc.js +1 -0
- package/dist/_astro/Toast.R8_2OWRX.js +1 -0
- package/dist/_astro/TodosBoard.8kvRTEW-.js +1 -0
- package/dist/_astro/UiAutoBoard.DFTiDqCp.js +9 -0
- package/dist/_astro/active-element-history.CED-m1Zp.js +1 -0
- package/dist/_astro/app-config.BUPzGl9f.js +1 -0
- package/dist/_astro/{client.Be_SakrB.js → client.BHNTqLjv.js} +3 -3
- package/dist/_astro/dialog.BAPTk9a_.js +1 -0
- package/dist/_astro/hydrate-cache.BXX604Bw.js +1 -0
- package/dist/_astro/{i18n.B52gLzii.js → i18n.BGPnP1Bg.js} +1 -1
- package/dist/_astro/index.astro_astro_type_script_index_0_lang.LPL9mPQY.js +1 -0
- package/dist/_astro/jsx-runtime.DUg_B_vD.js +1 -0
- package/dist/_astro/{lib.DJNDi_Ht.js → lib.CgXLzMMd.js} +15 -15
- package/dist/_astro/listbox.C96OCanh.js +1 -0
- package/dist/_astro/markdown-client.DRva7DS9.js +58 -0
- package/dist/_astro/menu.IPWdRoNM.js +1 -0
- package/dist/_astro/{open-docs-in-session.Xg3OSOfc.js → open-docs-in-session.CyFNgh1I.js} +1 -1
- package/dist/_astro/{plugins.BDZqJNOy.js → plugins.C2BMfzv1.js} +1 -1
- package/dist/_astro/{pm.Bl3hz9fF.js → pm.CagBA-ht.js} +2 -2
- package/dist/_astro/{portal.Cm9XlIPf.js → portal.C0hAhXDF.js} +2 -2
- package/dist/_astro/prompts-meta.Bua-j14I.js +2 -0
- package/dist/_astro/react-dom.DLW9pGCF.js +1 -0
- package/dist/_astro/{react-dom.CqAxpHMt.js → react.Blvh0GOs.js} +1 -1
- package/dist/_astro/report-prompt.CAfZ6RIo.js +1 -0
- package/dist/_astro/{settings.C6NWuiFO.js → settings.Ceefeil5.js} +2 -2
- package/dist/_astro/{spaces-client.k_ciWMai.js → spaces-client.BocUabwy.js} +1 -1
- package/dist/_astro/ui-auto-prompt.CX8fju7r.js +3 -0
- package/dist/_astro/ui-auto.BmC9JJ_X.js +1 -0
- package/dist/_astro/update.CvfIVwnq.js +1 -0
- package/dist/_astro/use-text-value.DBQvHeNl.js +1 -0
- package/dist/_astro/use-tree-walker.DFU2AaAP.js +1 -0
- package/dist/_astro/useListAnim.BoerpmsB.js +1 -0
- package/dist/_astro/{view-prefs.Dyu_lmN2.js → view-prefs.BEAZRcxF.js} +1 -1
- package/dist/case-exec/index.html +458 -22
- package/dist/cases/generate/index.html +258 -22
- package/dist/cases/library/index.html +458 -22
- package/dist/dashboard/index.html +458 -22
- package/dist/docs/changelog/index.html +367 -23
- package/dist/docs/install/index.html +258 -22
- package/dist/docs/manual/index.html +314 -35
- package/dist/index.html +2 -281
- package/dist/knowledge/index.html +458 -22
- package/dist/knowledge//345/212/237/350/203/275/346/265/213/350/257/225/347/224/250/344/276/213/347/274/226/345/206/231/350/247/204/350/214/203/index.html +258 -22
- package/dist/plugins/index.html +258 -22
- package/dist/pm/bugs/index.html +458 -22
- package/dist/pm/iterations/index.html +458 -22
- package/dist/pm/projects/detail/index.html +458 -22
- package/dist/pm/projects/index.html +458 -22
- package/dist/pm/requirements/index.html +458 -22
- package/dist/prompts/index.html +458 -22
- package/dist/reports/index.html +458 -22
- package/dist/requirements/index.html +458 -22
- package/dist/tasks/index.html +458 -22
- package/dist/templates/index.html +458 -22
- package/dist/templates//345/212/237/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212//345/212/237/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212/346/250/241/346/235/277/index.html +258 -22
- package/dist/templates//346/200/247/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212//346/200/247/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212/346/250/241/346/235/277/index.html +258 -22
- package/dist/templates//346/200/247/350/203/275/346/265/213/350/257/225/347/224/250/344/276/213//346/200/247/350/203/275/346/265/213/350/257/225/347/224/250/344/276/213/346/250/241/346/235/277/index.html +258 -22
- package/dist/templates//346/216/245/345/217/243/346/265/213/350/257/225/346/212/245/345/221/212//346/216/245/345/217/243/346/265/213/350/257/225/346/212/245/345/221/212/346/250/241/346/235/277/index.html +258 -22
- package/dist/templates//350/207/252/345/212/250/345/214/226/346/265/213/350/257/225/347/224/250/344/276/213//350/207/252/345/212/250/345/214/226/346/265/213/350/257/225/347/224/250/344/276/213/346/250/241/346/235/277/index.html +258 -22
- package/dist/test-automation/index.html +717 -0
- package/dist/test-stats/index.html +458 -22
- package/dist/todos/index.html +458 -22
- package/dist/workbench/index.html +517 -0
- package/docs//346/223/215/344/275/234/346/211/213/345/206/214.md +80 -43
- package/lh-plugins/lh-project-docs.mjs +14 -0
- package/lh-plugins/lh-uiauto.mjs +1445 -386
- package/lh-plugins/plugin-prompts.mjs +200 -0
- package/lh-plugins/storage-domain.mjs +6 -0
- package/lh-plugins/uiauto-adapters/index.mjs +57 -0
- package/lh-plugins/uiauto-adapters/playwright.mjs +215 -0
- package/lh-plugins/uiauto-adapters/pytest.mjs +151 -0
- package/lh-plugins/uiauto-adapters/selenium.mjs +163 -0
- package/lh-plugins/uiauto-adapters/shared.mjs +371 -0
- package/lh-plugins/uiauto-adapters/tasks.mjs +369 -0
- package/lh-plugins/uiauto-explorer/apps.mjs +332 -0
- package/lh-plugins/uiauto-explorer/diff.mjs +159 -0
- package/lh-plugins/uiauto-explorer/emit-files.mjs +506 -0
- package/lh-plugins/uiauto-explorer/emit-python.mjs +160 -0
- package/lh-plugins/uiauto-explorer/emit-ts.mjs +118 -0
- package/lh-plugins/uiauto-explorer/emit.mjs +15 -0
- package/lh-plugins/uiauto-explorer/ir.mjs +114 -0
- package/lh-plugins/uiauto-explorer/locators.mjs +267 -0
- package/lh-plugins/uiauto-explorer/merge.mjs +235 -0
- package/lh-plugins/uiauto-explorer/plan.mjs +165 -0
- package/lh-plugins/uiauto-explorer/runner.mjs +370 -0
- package/lh-plugins/uiauto-explorer/sessions.mjs +1373 -0
- package/lh-plugins/uiauto-explorer/snapshot.mjs +492 -0
- package/lh-plugins/uiauto-prompt.mjs +122 -0
- package/lh-plugins/uiauto-report.mjs +111 -0
- package/package.json +1 -1
- package/dist/_astro/Base.4X_wsSoR.css +0 -1
- package/dist/_astro/Base.astro_astro_type_script_index_0_lang.Dy7fJoxu.js +0 -1
- package/dist/_astro/CaseExecBoard.DKdfW5fM.js +0 -1
- package/dist/_astro/CaseGenerateApp.Bm8AyH9s.js +0 -9
- package/dist/_astro/CasesLibrary.CvVJZ74h.js +0 -1
- package/dist/_astro/ChatApp.BS-wLBRa.js +0 -276
- package/dist/_astro/ColumnResize.Bs6GL3DJ.js +0 -1
- package/dist/_astro/DatePicker.CMfX7F6z.js +0 -1
- package/dist/_astro/DocsFileBrowser.BtRoZ787.js +0 -1
- package/dist/_astro/DocsPager.C20ue_JZ.js +0 -1
- package/dist/_astro/KnowledgeLibrary.CV4DyStj.js +0 -1
- package/dist/_astro/NamePromptDialog.Dl5kSnQI.js +0 -1
- package/dist/_astro/NavLibraries.DmD2lZBZ.js +0 -1
- package/dist/_astro/OverflowHint.lzmplP5j.js +0 -1
- package/dist/_astro/PluginsPage.B59AMDrB.js +0 -1
- package/dist/_astro/PluginsPage.BEAPymNL.js +0 -39
- package/dist/_astro/PmBugsBoard.CPEyBp0l.js +0 -1
- package/dist/_astro/PmIterationsBoard.zCeLpcBo.js +0 -1
- package/dist/_astro/PmProjectDetail.ejIam5sD.js +0 -1
- package/dist/_astro/PmProjectsBoard.DbXzir8o.js +0 -1
- package/dist/_astro/PmRequirementsBoard.CynewRfv.js +0 -1
- package/dist/_astro/PmRequirementsBoard.D9eUMJWI.js +0 -1
- package/dist/_astro/PmShared.BxTHKdjY.js +0 -1
- package/dist/_astro/PromptsLibrary.Bkruu80b.js +0 -1
- package/dist/_astro/ReportsPage.BoBQshMQ.js +0 -1
- package/dist/_astro/RequirementsLibrary.BC0A8qdk.js +0 -1
- package/dist/_astro/SearchableSelect.CXa1hiDd.js +0 -1
- package/dist/_astro/SelectDropdown.Buv7rQJ_.js +0 -1
- package/dist/_astro/SettingsDialog.Dc-9QNJI.js +0 -1
- package/dist/_astro/SlideOverDrawer.TPbGEoWn.js +0 -1
- package/dist/_astro/TagSelect.u8DTop7v.js +0 -1
- package/dist/_astro/TasksBoard.Bb--oVV8.js +0 -1
- package/dist/_astro/TemplatesLibrary.D1wZq94E.js +0 -1
- package/dist/_astro/TestStatsBoard.DlVezlXl.js +0 -1
- package/dist/_astro/TodosBoard.S84wqcWY.js +0 -1
- package/dist/_astro/UiAutoBoard.BKp9ifxg.js +0 -1
- package/dist/_astro/active-element-history.CeefGkFQ.js +0 -1
- package/dist/_astro/app-config.DUyozIL9.js +0 -1
- package/dist/_astro/dialog.DXHznyjD.js +0 -1
- package/dist/_astro/jsx-runtime.BUXbF_vF.js +0 -1
- package/dist/_astro/listbox.Di-t5U37.js +0 -1
- package/dist/_astro/menu.Bkluqxic.js +0 -1
- package/dist/_astro/prompts-meta.F4wwkjUA.js +0 -2
- package/dist/_astro/report-prompt.Cmw4XzfY.js +0 -1
- package/dist/_astro/update.Bl_HfSe6.js +0 -1
- package/dist/_astro/use-text-value.BuY0Cm1z.js +0 -1
- package/dist/_astro/use-tree-walker.CfTHFX43.js +0 -1
- package/dist/_astro/useListAnim.CpGB1cft.js +0 -1
- package/dist/ui-automation/index.html +0 -281
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,n as t}from"./react-dom.CqAxpHMt.js";import{$ as n,A as r,D as i,E as a,G as o,J as s,L as c,M as l,O as u,P as d,Q as f,R as p,V as m,X as h,Z as g,_t as _,a as v,at as y,c as b,ct as x,d as S,dt as C,et as w,f as T,ft as E,g as D,gt as O,h as k,i as A,it as j,j as M,k as N,l as ee,m as P,mt as F,n as I,nt as L,o as te,ot as ne,p as re,pt as R,r as z,s as ie,st as B,t as V,tt as H,u as U,ut as W,vt as G,y as K,z as q}from"./portal.Cm9XlIPf.js";import{n as J,r as ae,t as Y}from"./active-element-history.CeefGkFQ.js";var X=e(t(),1),oe=(0,X.createContext)(()=>{});function se({value:e,children:t}){return X.createElement(oe.Provider,{value:e},t)}function ce(e,t=typeof document<`u`?document.defaultView:null,n){let r=M(e,`escape`);ae(t,`keydown`,e=>{r&&(e.defaultPrevented||e.key===c.Escape&&n(e))})}function le(){let[e]=(0,X.useState)(()=>typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(`(pointer: coarse)`):null),[t,n]=(0,X.useState)(e?.matches??!1);return R(()=>{if(!e)return;function t(e){n(e.matches)}return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[e]),t}function ue({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=C(()=>{let r=G(n),i=[];for(let t of e)t!==null&&(h(t)?i.push(t):`current`in t&&h(t.current)&&i.push(t.current));if(t!=null&&t.current)for(let e of t.current)i.push(e);for(let e of r?.querySelectorAll(`html > *, body > *`)??[])e!==document.body&&e!==document.head&&h(e)&&e.id!==`headlessui-portal-root`&&(n&&(e.contains(n)||e.contains(n?.getRootNode()?.host))||i.some(t=>e.contains(t))||i.push(e));return i});return{resolveContainers:r,contains:C(e=>r().some(t=>t.contains(e)))}}var de=(0,X.createContext)(null);function fe({children:e,node:t}){let[n,r]=(0,X.useState)(null),i=pe(t??n);return X.createElement(de.Provider,{value:i},e,i===null&&X.createElement(g,{features:f.Hidden,ref:e=>{if(e){for(let t of G(e)?.querySelectorAll(`html > *, body > *`)??[])if(t!==document.body&&t!==document.head&&h(t)&&t!=null&&t.contains(e)){r(t);break}}}}))}function pe(e=null){return(0,X.useContext)(de)??e}function Z(){let e=(0,X.useRef)(!1);return R(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var Q=(e=>(e[e.Forwards=0]=`Forwards`,e[e.Backwards=1]=`Backwards`,e))(Q||{});function me(){let e=(0,X.useRef)(0);return D(!0,`keydown`,t=>{t.key===`Tab`&&(e.current=+!!t.shiftKey)},!0),e}function he(e){if(!e)return new Set;if(typeof e==`function`)return new Set(e());let t=new Set;for(let n of e.current)h(n.current)&&t.add(n.current);return t}var ge=`div`,$=(e=>(e[e.None=0]=`None`,e[e.InitialFocus=1]=`InitialFocus`,e[e.TabLock=2]=`TabLock`,e[e.FocusLock=4]=`FocusLock`,e[e.RestoreFocus=8]=`RestoreFocus`,e[e.AutoFocus=16]=`AutoFocus`,e))($||{});function _e(e,t){let n=(0,X.useRef)(null),r=m(n,t),{initialFocus:c,initialFocusFallback:l,containers:d,features:p=15,...h}=e;v()||(p=0);let _=P(n.current);xe(p,{ownerDocument:_});let y=Se(p,{ownerDocument:_,container:n,initialFocus:c,initialFocusFallback:l});Ce(p,{ownerDocument:_,container:n,containers:d,previousActiveElement:y});let b=me(),x=C(e=>{if(!s(n.current))return;let t=n.current;(e=>e())(()=>{B(b.current,{[Q.Forwards]:()=>{i(t,a.First,{skipElements:[e.relatedTarget,l]})},[Q.Backwards]:()=>{i(t,a.Last,{skipElements:[e.relatedTarget,l]})}})})}),S=M(!!(p&2),`focus-trap#tab-lock`),w=F(),T=(0,X.useRef)(!1),E={ref:r,onKeyDown(e){e.key==`Tab`&&(T.current=!0,w.requestAnimationFrame(()=>{T.current=!1}))},onBlur(e){if(!(p&4))return;let t=he(d);s(n.current)&&t.add(n.current);let r=e.relatedTarget;o(r)&&r.dataset.headlessuiFocusGuard!==`true`&&(we(t,r)||(T.current?i(n.current,B(b.current,{[Q.Forwards]:()=>a.Next,[Q.Backwards]:()=>a.Previous})|a.WrapAround,{relativeTo:e.target}):o(e.target)&&u(e.target)))}},D=L();return X.createElement(X.Fragment,null,S&&X.createElement(g,{as:`button`,type:`button`,"data-headlessui-focus-guard":!0,onFocus:x,features:f.Focusable}),D({ourProps:E,theirProps:h,defaultTag:ge,name:`FocusTrap`}),S&&X.createElement(g,{as:`button`,type:`button`,"data-headlessui-focus-guard":!0,onFocus:x,features:f.Focusable}))}var ve=j(_e),ye=Object.assign(ve,{features:$});function be(e=!0){let t=(0,X.useRef)(Y.slice());return J(([e],[n])=>{n===!0&&e===!1&&O(()=>{t.current.splice(0)}),n===!1&&e===!0&&(t.current=Y.slice())},[e,Y,t]),C(()=>t.current.find(e=>e!=null&&e.isConnected)??null)}function xe(e,{ownerDocument:t}){let n=!!(e&8),r=be(n);J(()=>{n||_(t?.body)&&u(r())},[n]),te(()=>{n&&u(r())})}function Se(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:o}){let s=(0,X.useRef)(null),c=M(!!(e&1),`focus-trap#initial-focus`),l=Z();return J(()=>{if(e===0)return;if(!c){o!=null&&o.current&&u(o.current);return}let d=n.current;d&&O(()=>{if(!l.current)return;let n=t?.activeElement;if(r!=null&&r.current){if(r?.current===n){s.current=n;return}}else if(d.contains(n)){s.current=n;return}if(r!=null&&r.current)u(r.current);else{if(e&16){if(i(d,a.First|a.AutoFocus)!==K.Error)return}else if(i(d,a.First)!==K.Error)return;if(o!=null&&o.current&&(u(o.current),t?.activeElement===o.current))return;console.warn(`There are no focusable elements inside the <FocusTrap />`)}s.current=t?.activeElement})},[o,c,e]),s}function Ce(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:i}){let a=Z(),o=!!(e&4);ae(t?.defaultView,`focus`,e=>{if(!o||!a.current)return;let t=he(r);s(n.current)&&t.add(n.current);let c=i.current;if(!c)return;let l=e.target;s(l)?we(t,l)?(i.current=l,u(l)):(e.preventDefault(),e.stopPropagation(),u(c)):u(i.current)},!0)}function we(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function Te(e){return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!y(e.as??Ne)||X.Children.count(e.children)===1}var Ee=(0,X.createContext)(null);Ee.displayName=`TransitionContext`;var De=(e=>(e.Visible=`visible`,e.Hidden=`hidden`,e))(De||{});function Oe(){let e=(0,X.useContext)(Ee);if(e===null)throw Error(`A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.`);return e}function ke(){let e=(0,X.useContext)(Ae);if(e===null)throw Error(`A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.`);return e}var Ae=(0,X.createContext)(null);Ae.displayName=`NestingContext`;function je(e){return`children`in e?je(e.children):e.current.filter(({el:e})=>e.current!==null).filter(({state:e})=>e===`visible`).length>0}function Me(e,t){let n=E(e),r=(0,X.useRef)([]),i=Z(),a=F(),o=C((e,t=H.Hidden)=>{let o=r.current.findIndex(({el:t})=>t===e);o!==-1&&(B(t,{[H.Unmount](){r.current.splice(o,1)},[H.Hidden](){r.current[o].state=`hidden`}}),a.microTask(()=>{var e;!je(r)&&i.current&&((e=n.current)==null||e.call(n))}))}),s=C(e=>{let t=r.current.find(({el:t})=>t===e);return t?t.state!==`visible`&&(t.state=`visible`):r.current.push({el:e,state:`visible`}),()=>o(e,H.Unmount)}),c=(0,X.useRef)([]),l=(0,X.useRef)(Promise.resolve()),u=(0,X.useRef)({enter:[],leave:[]}),d=C((e,n,r)=>{c.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter(([t])=>t!==e)),t?.chains.current[n].push([e,new Promise(e=>{c.current.push(e)})]),t?.chains.current[n].push([e,new Promise(e=>{Promise.all(u.current[n].map(([e,t])=>t)).then(()=>e())})]),n===`enter`?l.current=l.current.then(()=>t?.wait.current).then(()=>r(n)):r(n)}),f=C((e,t,n)=>{Promise.all(u.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;(e=c.current.shift())==null||e()}).then(()=>n(t))});return(0,X.useMemo)(()=>({children:r,register:s,unregister:o,onStart:d,onStop:f,wait:l,chains:u}),[s,o,r,d,f,u,l])}var Ne=X.Fragment,Pe=w.RenderStrategy;function Fe(e,t){var n;let{transition:r=!0,beforeEnter:i,afterEnter:a,beforeLeave:o,afterLeave:s,enter:c,enterFrom:l,enterTo:u,entered:d,leave:f,leaveFrom:p,leaveTo:h,...g}=e,[_,y]=(0,X.useState)(null),w=(0,X.useRef)(null),E=Te(e),D=m(...E?[w,t,y]:t===null?[]:[t]),O=(n=g.unmount)==null||n?H.Unmount:H.Hidden,{show:k,appear:A,initial:j}=Oe(),[M,N]=(0,X.useState)(k?`visible`:`hidden`),ee=ke(),{register:P,unregister:F}=ee;R(()=>P(w),[P,w]),R(()=>{if(O===H.Hidden&&w.current){if(k&&M!==`visible`){N(`visible`);return}return B(M,{hidden:()=>F(w),visible:()=>P(w)})}},[M,w,P,F,k,O]);let I=v();R(()=>{if(E&&I&&M===`visible`&&w.current===null)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,M,I,E]);let te=j&&!A,re=A&&k&&j,z=(0,X.useRef)(!1),V=Me(()=>{z.current||(N(`hidden`),F(w))},ee),U=C(e=>{z.current=!0;let t=e?`enter`:`leave`;V.onStart(w,t,e=>{e===`enter`?i?.():e===`leave`&&o?.()})}),W=C(e=>{let t=e?`enter`:`leave`;z.current=!1,V.onStop(w,t,e=>{e===`enter`?a?.():e===`leave`&&s?.()}),t===`leave`&&!je(V)&&(N(`hidden`),F(w))});(0,X.useEffect)(()=>{E&&r||(U(k),W(k))},[k,E,r]);let[,G]=S(!(!r||!E||!I||te),_,k,{start:U,end:W}),K=ne({ref:D,className:x(g.className,re&&c,re&&l,G.enter&&c,G.enter&&G.closed&&l,G.enter&&!G.closed&&u,G.leave&&f,G.leave&&!G.closed&&p,G.leave&&G.closed&&h,!G.transition&&k&&d)?.trim()||void 0,...T(G)}),q=0;M===`visible`&&(q|=b.Open),M===`hidden`&&(q|=b.Closed),k&&M===`hidden`&&(q|=b.Opening),!k&&M===`visible`&&(q|=b.Closing);let J=L();return X.createElement(Ae.Provider,{value:V},X.createElement(ie,{value:q},J({ourProps:K,theirProps:g,defaultTag:Ne,features:Pe,visible:M===`visible`,name:`Transition.Child`})))}function Ie(e,t){let{show:n,appear:r=!1,unmount:i=!0,...a}=e,o=(0,X.useRef)(null),s=Te(e),c=m(...s?[o,t]:t===null?[]:[t]);v();let l=U();if(n===void 0&&l!==null&&(n=(l&b.Open)===b.Open),n===void 0)throw Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,d]=(0,X.useState)(n?`visible`:`hidden`),f=Me(()=>{n||d(`hidden`)}),[p,h]=(0,X.useState)(!0),g=(0,X.useRef)([n]);R(()=>{p!==!1&&g.current[g.current.length-1]!==n&&(g.current.push(n),h(!1))},[g,n]);let _=(0,X.useMemo)(()=>({show:n,appear:r,initial:p}),[n,r,p]);R(()=>{n?d(`visible`):!je(f)&&o.current!==null&&d(`hidden`)},[n,f]);let y={unmount:i},x=C(()=>{var t;p&&h(!1),(t=e.beforeEnter)==null||t.call(e)}),S=C(()=>{var t;p&&h(!1),(t=e.beforeLeave)==null||t.call(e)}),w=L();return X.createElement(Ae.Provider,{value:f},X.createElement(Ee.Provider,{value:_},w({ourProps:{...y,as:X.Fragment,children:X.createElement(ze,{ref:c,...y,...a,beforeEnter:x,beforeLeave:S})},theirProps:{},defaultTag:X.Fragment,features:Pe,visible:u===`visible`,name:`Transition`})))}function Le(e,t){let n=(0,X.useContext)(Ee)!==null,r=U()!==null;return X.createElement(X.Fragment,null,!n&&r?X.createElement(Re,{ref:t,...e}):X.createElement(ze,{ref:t,...e}))}var Re=j(Ie),ze=j(Fe),Be=j(Le),Ve=Object.assign(Re,{Child:Be,Root:Re}),He=(e=>(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(He||{}),Ue=(e=>(e[e.SetTitleId=0]=`SetTitleId`,e))(Ue||{}),We={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Ge=(0,X.createContext)(null);Ge.displayName=`DialogContext`;function Ke(e){let t=(0,X.useContext)(Ge);if(t===null){let t=Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Ke),t}return t}function qe(e,t){return B(t.type,We,e,t)}var Je=j(function(e,t){let i=(0,n.useId)(),{id:a=`headlessui-dialog-${i}`,open:o,onClose:s,initialFocus:c,role:u=`dialog`,autoFocus:f=!0,__demoMode:h=!1,unmount:g=!1,..._}=e,y=(0,X.useRef)(!1);u=function(){return u===`dialog`||u===`alertdialog`?u:(y.current||(y.current=!0,console.warn(`Invalid role [${u}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),`dialog`)}();let x=U();o===void 0&&x!==null&&(o=(x&b.Open)===b.Open);let S=(0,X.useRef)(null),w=m(S,t),T=P(S.current),E=+!o,[D,O]=(0,X.useReducer)(qe,{titleId:null,descriptionId:null,panelRef:(0,X.createRef)()}),j=C(()=>s(!1)),M=C(e=>O({type:0,id:e})),F=v()?E===0:!1,[te,ne]=z(),ie={get current(){return D.panelRef.current??S.current}},B=pe(),{resolveContainers:H}=ue({mainTreeNode:B,portals:te,defaultContainers:[ie]}),G=x!==null&&(x&b.Closing)===b.Closing;r(h||G?!1:F,{allowed:C(()=>[S.current?.closest(`[data-headlessui-portal]`)??null]),disallowed:C(()=>[B?.closest(`body > *:not(#headlessui-portal-root)`)??null])});let K=d.get(null);R(()=>{if(F)return K.actions.push(a),()=>K.actions.pop(a)},[K,a,F]);let q=l(K,(0,X.useCallback)(e=>K.selectors.isTop(e,a),[K,a]));k(q,H,e=>{e.preventDefault(),j()}),ce(q,T?.defaultView,e=>{e.preventDefault(),e.stopPropagation(),document.activeElement&&`blur`in document.activeElement&&typeof document.activeElement.blur==`function`&&document.activeElement.blur(),j()}),re(h||G?!1:F,T,H),N(F,S,j);let[J,ae]=p(),Y=(0,X.useMemo)(()=>[{dialogState:E,close:j,setTitleId:M,unmount:g},D],[E,j,M,g,D]),oe=W({open:E===0}),de={ref:w,id:a,role:u,tabIndex:-1,"aria-modal":h?void 0:E===0||void 0,"aria-labelledby":D.titleId,"aria-describedby":J,unmount:g},fe=!le(),Z=$.None;F&&!h&&(Z|=$.RestoreFocus,Z|=$.TabLock,f&&(Z|=$.AutoFocus),fe&&(Z|=$.InitialFocus));let Q=L();return X.createElement(ee,null,X.createElement(A,{force:!0},X.createElement(I,null,X.createElement(Ge.Provider,{value:Y},X.createElement(V,{target:S},X.createElement(A,{force:!1},X.createElement(ae,{slot:oe},X.createElement(ne,null,X.createElement(ye,{initialFocus:c,initialFocusFallback:S,containers:H,features:Z},X.createElement(se,{value:j},Q({ourProps:de,theirProps:_,slot:oe,defaultTag:Ye,features:Xe,visible:E===0,name:`Dialog`})))))))))))}),Ye=`div`,Xe=w.RenderStrategy|w.Static;function Ze(e,t){let{transition:n=!1,open:r,...i}=e,a=U(),o=e.hasOwnProperty(`open`)||a!==null,s=e.hasOwnProperty(`onClose`);if(!o&&!s)throw Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!o)throw Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!s)throw Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof e.open!=`boolean`)throw Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!=`function`)throw Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!i.static?X.createElement(fe,null,X.createElement(Ve,{show:r,transition:n,unmount:i.unmount},X.createElement(Je,{ref:t,...i}))):X.createElement(fe,null,X.createElement(Je,{ref:t,open:r,...i}))}var Qe=`div`;function $e(e,t){let r=(0,n.useId)(),{id:i=`headlessui-dialog-panel-${r}`,transition:a=!1,...o}=e,[{dialogState:s,unmount:c},l]=Ke(`Dialog.Panel`),u=m(t,l.panelRef),d=W({open:s===0}),f={ref:u,id:i,onClick:C(e=>{e.stopPropagation()})},p=a?Be:X.Fragment,h=a?{unmount:c}:{},g=L();return X.createElement(p,{...h},g({ourProps:f,theirProps:o,slot:d,defaultTag:Qe,name:`Dialog.Panel`}))}var et=`div`;function tt(e,t){let{transition:n=!1,...r}=e,[{dialogState:i,unmount:a}]=Ke(`Dialog.Backdrop`),o=W({open:i===0}),s={ref:t,"aria-hidden":!0},c=n?Be:X.Fragment,l=n?{unmount:a}:{},u=L();return X.createElement(c,{...l},u({ourProps:s,theirProps:r,slot:o,defaultTag:et,name:`Dialog.Backdrop`}))}var nt=`h2`;function rt(e,t){let r=(0,n.useId)(),{id:i=`headlessui-dialog-title-${r}`,...a}=e,[{dialogState:o,setTitleId:s}]=Ke(`Dialog.Title`),c=m(t);(0,X.useEffect)(()=>(s(i),()=>s(null)),[i,s]);let l=W({open:o===0}),u={ref:c,id:i};return L()({ourProps:u,theirProps:a,slot:l,defaultTag:nt,name:`Dialog.Title`})}var it=j(Ze),at=j($e),ot=j(tt),st=j(rt),ct=Object.assign(it,{Panel:at,Title:st,Description:q});export{Ve as a,at as i,st as n,Be as o,ct as r,ot as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./react-dom.CqAxpHMt.js";var t=e((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})),n=e(((e,n)=>{n.exports=t()}));export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,n as t,t as n}from"./react-dom.CqAxpHMt.js";import{C as r,D as i,E as a,S as o,T as s,_ as c,a as l,c as u,d,f,g as p,h as m,i as h,l as g,m as _,n as v,o as y,p as b,r as x,s as S,t as C,u as w,w as T,x as E,y as D}from"./use-text-value.BuY0Cm1z.js";import{$ as O,A as k,B as A,C as ee,E as j,F as M,I as N,J as P,L as F,M as I,N as L,P as te,Q as R,S as ne,T as re,V as z,Z as B,_t as ie,c as V,d as ae,dt as H,et as U,f as oe,ft as se,h as ce,ht as le,it as W,k as ue,lt as de,m as fe,mt as pe,n as me,nt as G,o as he,ot as ge,p as _e,pt as ve,rt as ye,s as be,st as K,u as xe,ut as q,x as Se}from"./portal.Cm9XlIPf.js";var J=e(t(),1),Y=e(n(),1);function Ce(e,t,n){let[r,i]=(0,J.useState)(n),a=e!==void 0,o=(0,J.useRef)(a),s=(0,J.useRef)(!1),c=(0,J.useRef)(!1);return a&&!o.current&&!s.current?(s.current=!0,o.current=a,console.error(`A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.`)):!a&&o.current&&!c.current&&(c.current=!0,o.current=a,console.error(`A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.`)),[a?e:r,H(e=>(a||(0,Y.flushSync)(()=>i(e)),t?.(e)))]}function we(e){let[t]=(0,J.useState)(e);return t}function Te(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))De(n,Ee(t,r),i);return n}function Ee(e,t){return e?e+`[`+t+`]`:t}function De(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())De(e,Ee(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):typeof n==`boolean`?e.push([t,n?`1`:`0`]):typeof n==`string`?e.push([t,n]):typeof n==`number`?e.push([t,`${n}`]):n==null?e.push([t,``]):ke(n)&&!(0,J.isValidElement)(n)&&Te(n,t,e)}function Oe(e){var t;let n=e?.form??e.closest(`form`);if(n){for(let t of n.elements)if(t!==e&&(t.tagName===`INPUT`&&t.type===`submit`||t.tagName===`BUTTON`&&t.type===`submit`||t.nodeName===`INPUT`&&t.type===`image`)){t.click();return}(t=n.requestSubmit)==null||t.call(n)}}function ke(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}var Ae=(0,J.createContext)(null);function je({children:e}){let t=(0,J.useContext)(Ae);if(!t)return J.createElement(J.Fragment,null,e);let{target:n}=t;return n?(0,Y.createPortal)(J.createElement(J.Fragment,null,e),n):null}function Me({data:e,form:t,disabled:n,onReset:r,overrides:i}){let[a,o]=(0,J.useState)(null),s=pe();return(0,J.useEffect)(()=>{if(r&&a)return s.addEventListener(a,`reset`,r)},[a,t,r]),J.createElement(je,null,J.createElement(Ne,{setForm:o,formId:t}),Te(e).map(([e,r])=>J.createElement(B,{features:R.Hidden,...ge({key:e,as:`input`,type:`hidden`,hidden:!0,readOnly:!0,form:t,disabled:n,name:e,value:r,...i})})))}function Ne({setForm:e,formId:t}){return(0,J.useEffect)(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:J.createElement(B,{features:R.Hidden,as:`input`,type:`hidden`,hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let n=t.closest(`form`);n&&e(n)}})}function Pe(e,t){return e!==null&&t!==null&&typeof e==`object`&&typeof t==`object`&&`id`in e&&`id`in t?e.id===t.id:e===t}function Fe(e=Pe){return(0,J.useCallback)((t,n)=>{if(typeof e==`string`){let r=e;return t?.[r]===n?.[r]}return e(t,n)},[e])}function Ie({children:e,freeze:t},n){let r=Re(t,e);return(0,J.isValidElement)(r)?(0,J.cloneElement)(r,{ref:n}):J.createElement(J.Fragment,null,r)}var Le=J.forwardRef(Ie);function Re(e,t){let[n,r]=(0,J.useState)(t);return!e&&n!==t&&r(t),e?n:t}var ze=Object.defineProperty,Be=(e,t,n)=>t in e?ze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ve=(e,t,n)=>(Be(e,typeof t==`symbol`?t:t+``,n),n),X=(e=>(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(X||{}),Z=(e=>(e[e.Single=0]=`Single`,e[e.Multi=1]=`Multi`,e))(Z||{}),He=(e=>(e[e.Pointer=0]=`Pointer`,e[e.Other=1]=`Other`,e))(He||{}),Ue=(e=>(e[e.OpenListbox=0]=`OpenListbox`,e[e.CloseListbox=1]=`CloseListbox`,e[e.GoToOption=2]=`GoToOption`,e[e.Search=3]=`Search`,e[e.ClearSearch=4]=`ClearSearch`,e[e.SelectOption=5]=`SelectOption`,e[e.RegisterOptions=6]=`RegisterOptions`,e[e.UnregisterOptions=7]=`UnregisterOptions`,e[e.SetButtonElement=8]=`SetButtonElement`,e[e.SetOptionsElement=9]=`SetOptionsElement`,e[e.SortOptions=10]=`SortOptions`,e[e.MarkButtonAsMoved=11]=`MarkButtonAsMoved`,e))(Ue||{});function We(e,t=e=>e){let n=e.activeOptionIndex===null?null:e.options[e.activeOptionIndex],r=Se(t(e.options.slice()),e=>e.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{options:r,activeOptionIndex:i}}var Ge={1(e){if(e.dataRef.current.disabled||e.listboxState===1)return e;let t=e.buttonElement?x.Tracked(v(e.buttonElement)):e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:l.Nothing},listboxState:1,__demoMode:!1,buttonPositionState:t}},0(e,t){if(e.dataRef.current.disabled||e.listboxState===0)return e;let n=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,i=e.options.findIndex(e=>r(e.dataRef.current.value));return i!==-1&&(n=i),{...e,frozenValue:!1,pendingFocus:t.focus,listboxState:0,activeOptionIndex:n,__demoMode:!1,buttonPositionState:x.Idle}},2(e,t){if(e.dataRef.current.disabled||e.listboxState===1)return e;let n={...e,searchQuery:``,activationTrigger:t.trigger??1,__demoMode:!1};if(t.focus===l.Nothing)return{...n,activeOptionIndex:null};if(t.focus===l.Specific)return{...n,activeOptionIndex:e.options.findIndex(e=>e.id===t.id)};if(t.focus===l.Previous){let r=e.activeOptionIndex;if(r!==null){let i=e.options[r].dataRef.current.domRef,a=y(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(a!==null){let t=e.options[a].dataRef.current.domRef;if(i.current?.previousElementSibling===t.current||t.current?.previousElementSibling===null)return{...n,activeOptionIndex:a}}}}else if(t.focus===l.Next){let r=e.activeOptionIndex;if(r!==null){let i=e.options[r].dataRef.current.domRef,a=y(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(a!==null){let t=e.options[a].dataRef.current.domRef;if(i.current?.nextElementSibling===t.current||t.current?.nextElementSibling===null)return{...n,activeOptionIndex:a}}}}let r=We(e),i=y(t,{resolveItems:()=>r.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...n,...r,activeOptionIndex:i}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=+(e.searchQuery===``),r=e.searchQuery+t.value.toLowerCase(),i=(e.activeOptionIndex===null?e.options:e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n))).find(e=>!e.dataRef.current.disabled&&e.dataRef.current.textValue?.startsWith(r)),a=i?e.options.indexOf(i):-1;return a===-1||a===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:a,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===``?e:{...e,searchQuery:``}},5(e){return e.dataRef.current.mode===0?{...e,frozenValue:!0}:{...e}},6:(e,t)=>{let n=e.options.concat(t.options),r=e.activeOptionIndex;if(e.pendingFocus.focus!==l.Nothing&&(r=y(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled})),e.activeOptionIndex===null){let{isSelected:t}=e.dataRef.current;if(t){let e=n.findIndex(e=>t?.(e.dataRef.current.value));e!==-1&&(r=e)}}return{...e,options:n,activeOptionIndex:r,pendingFocus:{focus:l.Nothing},pendingShouldSort:!0}},7:(e,t)=>{let n=e.options,r=[],i=new Set(t.options);for(let[e,t]of n.entries())if(i.has(t.id)&&(r.push(e),i.delete(t.id),i.size===0))break;if(r.length>0){n=n.slice();for(let e of r.reverse())n.splice(e,1)}return{...e,options:n,activationTrigger:1}},8:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},9:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},10:e=>e.pendingShouldSort?{...e,...We(e),pendingShouldSort:!1}:e,11(e){return e.buttonPositionState.kind===`Tracked`?{...e,buttonPositionState:x.Moved}:e}},Ke=class e extends M{constructor(e){super(e),Ve(this,`actions`,{onChange:e=>{let{onChange:t,compare:n,mode:r,value:i}=this.state.dataRef.current;return K(r,{0:()=>t?.(e),1:()=>{let r=i.slice(),a=r.findIndex(t=>n(t,e));return a===-1?r.push(e):r.splice(a,1),t?.(r)}})},registerOption:N(()=>{let e=[],t=new Set;return[(n,r)=>{t.has(r)||(t.add(r),e.push({id:n,dataRef:r}))},()=>(t.clear(),this.send({type:6,options:e.splice(0)}))]}),unregisterOption:N(()=>{let e=[];return[t=>e.push(t),()=>{this.send({type:7,options:e.splice(0)})}]}),goToOption:N(()=>{let e=null;return[(t,n)=>{e={type:2,...t,trigger:n}},()=>e&&this.send(e)]}),closeListbox:()=>{this.send({type:1})},openListbox:e=>{this.send({type:0,focus:e})},selectActiveOption:()=>{var e;if(this.state.activeOptionIndex!==null){let{dataRef:e}=this.state.options[this.state.activeOptionIndex];this.actions.selectOption(e.current.value)}else this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(e=this.state.buttonElement)==null||e.focus({preventScroll:!0}))},selectOption:e=>{this.send({type:5,value:e})},search:e=>{this.send({type:3,value:e})},clearSearch:()=>{this.send({type:4})},setButtonElement:e=>{this.send({type:8,element:e})},setOptionsElement:e=>{this.send({type:9,element:e})}}),Ve(this,`selectors`,{activeDescendantId(e){var t;let n=e.activeOptionIndex,r=e.options;return n===null||(t=r[n])==null?void 0:t.id},isActive(e,t){let n=e.activeOptionIndex,r=e.options;return n!==null&&r[n]?.id===t},hasFrozenValue(e){return e.frozenValue},shouldScrollIntoView(e,t){return e.__demoMode||e.listboxState!==0||e.activationTrigger===0?!1:this.isActive(e,t)},didButtonMove(e){return e.buttonPositionState.kind===`Moved`}}),this.on(6,()=>{requestAnimationFrame(()=>{this.send({type:10})})});{let e=this.state.id,t=te.get(null);this.disposables.add(t.on(L.Push,n=>{!t.selectors.isTop(n,e)&&this.state.listboxState===0&&this.actions.closeListbox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.buttonElement&&(e.dispose(),e.add(h(t.buttonElement,t.buttonPositionState,()=>{this.send({type:11})})))})}),this.on(5,(e,t)=>{var n;this.actions.onChange(t.value),this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(n=this.state.buttonElement)==null||n.focus({preventScroll:!0}))})}static new({id:t,__demoMode:n=!1}){return new e({id:t,dataRef:{current:{}},listboxState:+!n,options:[],searchQuery:``,activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:l.Nothing},frozenValue:!1,__demoMode:n,buttonPositionState:x.Idle})}reduce(e,t){return K(t.type,Ge,e,t)}},qe=(0,J.createContext)(null);function Je(e){let t=(0,J.useContext)(qe);if(t===null){let t=Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Ye),t}return t}function Ye({id:e,__demoMode:t=!1}){let n=(0,J.useMemo)(()=>Ke.new({id:e,__demoMode:t}),[]);return he(()=>n.dispose()),n}var Q=(0,J.createContext)(null);Q.displayName=`ListboxDataContext`;function $(e){let t=(0,J.useContext)(Q);if(t===null){let t=Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,$),t}return t}var Xe=J.Fragment;function Ze(e,t){let n=(0,O.useId)(),r=de(),{value:i,defaultValue:a,form:s,name:c,onChange:l,by:u,invalid:d=!1,disabled:f=r||!1,horizontal:p=!1,multiple:m=!1,__demoMode:h=!1,...g}=e,_=p?`horizontal`:`vertical`,v=z(t),y=we(a),[b=m?[]:void 0,x]=Ce(i,l,y),C=Ye({id:n,__demoMode:h}),w=(0,J.useRef)({static:!1,hold:!1}),T=(0,J.useRef)(new Map),E=Fe(u),D=(0,J.useCallback)(e=>K(k.mode,{[Z.Multi]:()=>b.some(t=>E(t,e)),[Z.Single]:()=>E(b,e)}),[b]),k=q({value:b,disabled:f,invalid:d,mode:m?Z.Multi:Z.Single,orientation:_,onChange:x,compare:E,isSelected:D,optionsPropsRef:w,listRef:T});ve(()=>{C.state.dataRef.current=k},[k]);let A=I(C,e=>e.listboxState),j=te.get(null),M=I(j,(0,J.useCallback)(e=>j.selectors.isTop(e,n),[j,n])),[N,P]=I(C,e=>[e.buttonElement,e.optionsElement]);ce(M,[N,P],(e,t)=>{C.send({type:Ue.CloseListbox}),ne(t,ee.Loose)||(e.preventDefault(),N?.focus())});let F=q({open:A===X.Open,disabled:f,invalid:d,value:b}),[L,R]=o({inherit:!0}),re={ref:v},B=(0,J.useCallback)(()=>{if(y!==void 0)return x?.(y)},[x,y]),ie=G();return J.createElement(R,{value:L,props:{htmlFor:N?.id},slot:{open:A===X.Open,disabled:f}},J.createElement(S,null,J.createElement(qe.Provider,{value:C},J.createElement(Q.Provider,{value:k},J.createElement(be,{value:K(A,{[X.Open]:V.Open,[X.Closed]:V.Closed})},c!=null&&b!=null&&J.createElement(Me,{disabled:f,data:{[c]:b},form:s,onReset:B}),ie({ourProps:re,theirProps:g,slot:F,defaultTag:Xe,name:`Listbox`}))))))}var Qe=`button`;function $e(e,t){let n=(0,O.useId)(),r=T(),o=$(`Listbox.Button`),f=Je(`Listbox.Button`),{id:h=r||`headlessui-listbox-button-${n}`,disabled:g=o.disabled||!1,autoFocus:v=!1,...y}=e,b=z(t,u(),f.actions.setButtonElement),x=d(),[S,C,w]=I(f,e=>[e.listboxState,e.buttonElement,e.optionsElement]),D=S===X.Open;m(D,{trigger:C,action:(0,J.useCallback)(e=>{if(C!=null&&C.contains(e.target))return p.Ignore;let t=e.target.closest(`[role="option"]:not([data-disabled])`);return P(t)?p.Select(t):w!=null&&w.contains(e.target)?p.Ignore:p.Close},[C,w]),close:f.actions.closeListbox,select:f.actions.selectActiveOption});let k=H(e=>{switch(e.key){case F.Enter:Oe(e.currentTarget);break;case F.Space:case F.ArrowDown:e.preventDefault(),f.actions.openListbox({focus:o.value?l.Nothing:l.First});break;case F.ArrowUp:e.preventDefault(),f.actions.openListbox({focus:o.value?l.Nothing:l.Last})}}),ee=H(e=>{switch(e.key){case F.Space:e.preventDefault()}}),j=c(e=>{var t;f.state.listboxState===X.Open?((0,Y.flushSync)(()=>f.actions.closeListbox()),(t=f.state.buttonElement)==null||t.focus({preventScroll:!0})):(e.preventDefault(),f.actions.openListbox({focus:l.Nothing}))}),M=H(e=>e.preventDefault()),N=E([h]),L=A(),{isFocusVisible:te,focusProps:R}=i({autoFocus:v}),{isHovered:ne,hoverProps:re}=a({isDisabled:g}),{pressed:B,pressProps:ie}=s({disabled:g}),V=q({open:S===X.Open,active:B||S===X.Open,disabled:g,invalid:o.invalid,value:o.value,hover:ne,focus:te,autofocus:v}),ae=I(f,e=>e.listboxState===X.Open),U=ye(x(),{ref:b,id:h,type:_(e,C),"aria-haspopup":`listbox`,"aria-controls":w?.id,"aria-expanded":ae,"aria-labelledby":N,"aria-describedby":L,disabled:g||void 0,autoFocus:v,onKeyDown:k,onKeyUp:ee,onKeyPress:M},j,R,re,ie);return G()({ourProps:U,theirProps:y,slot:V,defaultTag:Qe,name:`Listbox.Button`})}var et=(0,J.createContext)(!1),tt=`div`,nt=U.RenderStrategy|U.Static;function rt(e,t){let n=(0,O.useId)(),{id:r=`headlessui-listbox-options-${n}`,anchor:i,portal:a=!1,modal:o=!0,transition:s=!1,...c}=e,u=f(i),[d,p]=(0,J.useState)(null);u&&(a=!0);let m=$(`Listbox.Options`),h=Je(`Listbox.Options`),[_,v,y,b]=I(h,e=>[e.listboxState,e.buttonElement,e.optionsElement,e.__demoMode]),x=fe(v),S=fe(y),C=xe(),[T,E]=ae(s,d,C===null?_===X.Open:(C&V.Open)===V.Open);ue(T,v,h.actions.closeListbox);let A=!b&&o&&_===X.Open;_e(A,S);let ee=!b&&o&&_===X.Open;k(ee,{allowed:(0,J.useCallback)(()=>[v,y],[v,y])});let M=!I(h,h.selectors.didButtonMove)&&T,N=Re(I(h,h.selectors.hasFrozenValue)&&!e.static,m.value),P=(0,J.useCallback)(e=>m.compare(N,e),[m.compare,N]),L=I(h,e=>{var t;if(u==null||!((t=u?.to)!=null&&t.includes(`selection`)))return null;let n=e.options.findIndex(e=>P(e.dataRef.current.value));return n===-1&&(n=0),n}),te=(()=>{if(u==null)return;if(L===null)return{...u,inner:void 0};let e=Array.from(m.listRef.current.values());return{...u,inner:{listRef:{current:e},index:L}}})(),[R,ne]=g(te),B=w(),U=z(t,u?R:null,h.actions.setOptionsElement,p),se=pe();(0,J.useEffect)(()=>{let e=y;e&&_===X.Open&&(ie(e)||e==null||e.focus({preventScroll:!0}))},[_,y]);let ce=H(e=>{var t;switch(se.dispose(),e.key){case F.Space:if(h.state.searchQuery!==``)return e.preventDefault(),e.stopPropagation(),h.actions.search(e.key);case F.Enter:e.preventDefault(),e.stopPropagation(),h.actions.selectActiveOption();break;case K(m.orientation,{vertical:F.ArrowDown,horizontal:F.ArrowRight}):return e.preventDefault(),e.stopPropagation(),h.actions.goToOption({focus:l.Next});case K(m.orientation,{vertical:F.ArrowUp,horizontal:F.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),h.actions.goToOption({focus:l.Previous});case F.Home:case F.PageUp:return e.preventDefault(),e.stopPropagation(),h.actions.goToOption({focus:l.First});case F.End:case F.PageDown:return e.preventDefault(),e.stopPropagation(),h.actions.goToOption({focus:l.Last});case F.Escape:e.preventDefault(),e.stopPropagation(),(0,Y.flushSync)(()=>h.actions.closeListbox()),(t=h.state.buttonElement)==null||t.focus({preventScroll:!0});return;case F.Tab:e.preventDefault(),e.stopPropagation(),(0,Y.flushSync)(()=>h.actions.closeListbox()),re(h.state.buttonElement,e.shiftKey?j.Previous:j.Next);break;default:e.key.length===1&&(h.actions.search(e.key),se.setTimeout(()=>h.actions.clearSearch(),350))}}),le=I(h,e=>e.buttonElement?.id),W=q({open:_===X.Open}),de=ye(u?B():{},{id:r,ref:U,"aria-activedescendant":I(h,h.selectors.activeDescendantId),"aria-multiselectable":m.mode===Z.Multi||void 0,"aria-labelledby":le,"aria-orientation":m.orientation,onKeyDown:ce,role:`listbox`,tabIndex:_===X.Open?0:void 0,style:{...c.style,...ne,"--button-width":D(T,v,!0).width},...oe(E)}),he=G(),ge=(0,J.useMemo)(()=>m.mode===Z.Multi?m:{...m,isSelected:P},[m,P]);return J.createElement(me,{enabled:a?e.static||T:!1,ownerDocument:x},J.createElement(Q.Provider,{value:ge},he({ourProps:de,theirProps:c,slot:W,defaultTag:tt,features:nt,visible:M,name:`Listbox.Options`})))}var it=`div`;function at(e,t){let n=(0,O.useId)(),{id:r=`headlessui-listbox-option-${n}`,disabled:i=!1,value:a,...o}=e,s=(0,J.useContext)(et)===!0,c=$(`Listbox.Option`),u=Je(`Listbox.Option`),d=I(u,e=>u.selectors.isActive(e,r)),f=c.isSelected(a),p=(0,J.useRef)(null),m=C(p),h=se({disabled:i,value:a,domRef:p,get textValue(){return m()}}),g=z(t,p,e=>{e?c.listRef.current.set(r,e):c.listRef.current.delete(r)}),_=I(u,e=>u.selectors.shouldScrollIntoView(e,r));ve(()=>{if(_)return le().requestAnimationFrame(()=>{var e,t;(t=(e=p.current)?.scrollIntoView)==null||t.call(e,{block:`nearest`})})},[_,p]),ve(()=>{if(!s)return u.actions.registerOption(r,h),()=>u.actions.unregisterOption(r)},[h,r,s]);let v=H(e=>{if(i)return e.preventDefault();u.actions.selectOption(a)}),y=H(()=>{if(i)return u.actions.goToOption({focus:l.Nothing});u.actions.goToOption({focus:l.Specific,id:r})}),x=b(),S=H(e=>x.update(e)),w=H(e=>{x.wasMoved(e)&&(i||d&&u.state.activationTrigger===He.Pointer||u.actions.goToOption({focus:l.Specific,id:r},He.Pointer))}),T=H(e=>{x.wasMoved(e)&&(i||d&&u.state.activationTrigger===He.Pointer&&u.actions.goToOption({focus:l.Nothing}))}),E=q({active:d,focus:d,selected:f,disabled:i,selectedOption:f&&s}),D=s?{}:{id:r,ref:g,role:`option`,tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0||void 0,"aria-selected":f,disabled:void 0,onClick:v,onFocus:y,onPointerEnter:S,onMouseEnter:S,onPointerMove:w,onMouseMove:w,onPointerLeave:T,onMouseLeave:T},k=G();return!f&&s?null:k({ourProps:D,theirProps:o,slot:E,defaultTag:it,name:`Listbox.Option`})}var ot=J.Fragment;function st(e,t){let{options:n,placeholder:r,...i}=e,a={ref:z(t)},o=$(`ListboxSelectedOption`),s=q({}),c=o.value===void 0||o.value===null||o.mode===Z.Multi&&Array.isArray(o.value)&&o.value.length===0,l=G();return J.createElement(et.Provider,{value:!0},l({ourProps:a,theirProps:{...i,children:J.createElement(J.Fragment,null,r&&c?r:n)},slot:s,defaultTag:ot,name:`ListboxSelectedOption`}))}var ct=W(Ze),lt=W($e),ut=r,dt=W(rt),ft=W(at),pt=W(st),mt=Object.assign(ct,{Button:lt,Label:ut,Options:dt,Option:ft,SelectedOption:pt});export{Le as a,Me as c,lt as i,we as l,ft as n,Re as o,mt as r,Fe as s,dt as t,Ce as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,n as t,t as n}from"./react-dom.CqAxpHMt.js";import{D as r,E as i,S as a,T as o,_ as s,a as c,b as l,c as u,d,f,g as p,h as m,i as h,l as g,m as _,n as v,o as y,p as b,r as x,s as S,t as C,u as w,y as T}from"./use-text-value.BuY0Cm1z.js";import{$ as E,A as D,C as O,E as k,F as A,I as j,J as M,L as N,M as P,N as F,P as I,R as L,S as R,T as ee,V as z,_t as te,c as B,d as ne,dt as V,et as H,f as re,h as ie,ht as U,it as W,k as ae,m as oe,mt as se,n as ce,nt as G,o as le,p as ue,pt as K,rt as de,s as fe,st as pe,u as me,ut as q,w as he,x as ge}from"./portal.Cm9XlIPf.js";import{t as _e}from"./use-tree-walker.CfTHFX43.js";var J=e(t(),1),Y=e(n(),1),ve=Object.defineProperty,ye=(e,t,n)=>t in e?ve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,be=(e,t,n)=>(ye(e,typeof t==`symbol`?t:t+``,n),n),X=(e=>(e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e))(X||{}),Z=(e=>(e[e.Pointer=0]=`Pointer`,e[e.Other=1]=`Other`,e))(Z||{}),Q=(e=>(e[e.OpenMenu=0]=`OpenMenu`,e[e.CloseMenu=1]=`CloseMenu`,e[e.GoToItem=2]=`GoToItem`,e[e.Search=3]=`Search`,e[e.ClearSearch=4]=`ClearSearch`,e[e.RegisterItems=5]=`RegisterItems`,e[e.UnregisterItems=6]=`UnregisterItems`,e[e.SetButtonElement=7]=`SetButtonElement`,e[e.SetItemsElement=8]=`SetItemsElement`,e[e.SortItems=9]=`SortItems`,e[e.MarkButtonAsMoved=10]=`MarkButtonAsMoved`,e))(Q||{});function xe(e,t=e=>e){let n=e.activeItemIndex===null?null:e.items[e.activeItemIndex],r=ge(t(e.items.slice()),e=>e.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{items:r,activeItemIndex:i}}var Se={1(e){if(e.menuState===1)return e;let t=e.buttonElement?x.Tracked(v(e.buttonElement)):e.buttonPositionState;return{...e,activeItemIndex:null,pendingFocus:{focus:c.Nothing},menuState:1,buttonPositionState:t}},0(e,t){return e.menuState===0?e:{...e,__demoMode:!1,pendingFocus:t.focus,menuState:0,buttonPositionState:x.Idle}},2:(e,t)=>{if(e.menuState===1)return e;let n={...e,searchQuery:``,activationTrigger:t.trigger??1,__demoMode:!1};if(t.focus===c.Nothing)return{...n,activeItemIndex:null};if(t.focus===c.Specific)return{...n,activeItemIndex:e.items.findIndex(e=>e.id===t.id)};if(t.focus===c.Previous){let r=e.activeItemIndex;if(r!==null){let i=e.items[r].dataRef.current.domRef,a=y(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(a!==null){let t=e.items[a].dataRef.current.domRef;if(i.current?.previousElementSibling===t.current||t.current?.previousElementSibling===null)return{...n,activeItemIndex:a}}}}else if(t.focus===c.Next){let r=e.activeItemIndex;if(r!==null){let i=e.items[r].dataRef.current.domRef,a=y(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(a!==null){let t=e.items[a].dataRef.current.domRef;if(i.current?.nextElementSibling===t.current||t.current?.nextElementSibling===null)return{...n,activeItemIndex:a}}}}let r=xe(e),i=y(t,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...n,...r,activeItemIndex:i}},3:(e,t)=>{let n=+(e.searchQuery===``),r=e.searchQuery+t.value.toLowerCase(),i=(e.activeItemIndex===null?e.items:e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n))).find(e=>e.dataRef.current.textValue?.startsWith(r)&&!e.dataRef.current.disabled),a=i?e.items.indexOf(i):-1;return a===-1||a===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:a,activationTrigger:1}},4(e){return e.searchQuery===``?e:{...e,searchQuery:``,searchActiveItemIndex:null}},5:(e,t)=>{let n=e.items.concat(t.items.map(e=>e)),r=e.activeItemIndex;return e.pendingFocus.focus!==c.Nothing&&(r=y(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled})),{...e,items:n,activeItemIndex:r,pendingFocus:{focus:c.Nothing},pendingShouldSort:!0}},6:(e,t)=>{let n=e.items,r=[],i=new Set(t.items);for(let[e,t]of n.entries())if(i.has(t.id)&&(r.push(e),i.delete(t.id),i.size===0))break;if(r.length>0){n=n.slice();for(let e of r.reverse())n.splice(e,1)}return{...e,items:n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.itemsElement===t.element?e:{...e,itemsElement:t.element},9:e=>e.pendingShouldSort?{...e,...xe(e),pendingShouldSort:!1}:e,10(e){return e.buttonPositionState.kind===`Tracked`?{...e,buttonPositionState:x.Moved}:e}},Ce=class e extends A{constructor(e){super(e),be(this,`actions`,{registerItem:j(()=>{let e=[],t=new Set;return[(n,r)=>{t.has(r)||(t.add(r),e.push({id:n,dataRef:r}))},()=>(t.clear(),this.send({type:5,items:e.splice(0)}))]}),unregisterItem:j(()=>{let e=[];return[t=>e.push(t),()=>this.send({type:6,items:e.splice(0)})]})}),be(this,`selectors`,{activeDescendantId(e){var t;let n=e.activeItemIndex,r=e.items;return n===null||(t=r[n])==null?void 0:t.id},isActive(e,t){let n=e.activeItemIndex,r=e.items;return n!==null&&r[n]?.id===t},shouldScrollIntoView(e,t){return e.__demoMode||e.menuState!==0||e.activationTrigger===0?!1:this.isActive(e,t)},didButtonMove(e){return e.buttonPositionState.kind===`Moved`}}),this.on(5,()=>{this.disposables.requestAnimationFrame(()=>{this.send({type:9})})});{let e=this.state.id,t=I.get(null);this.disposables.add(t.on(F.Push,n=>{!t.selectors.isTop(n,e)&&this.state.menuState===0&&this.send({type:1})})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.buttonElement&&(e.dispose(),e.add(h(t.buttonElement,t.buttonPositionState,()=>{this.send({type:10})})))})})}static new({id:t,__demoMode:n=!1}){return new e({id:t,__demoMode:n,menuState:+!n,buttonElement:null,itemsElement:null,items:[],searchQuery:``,activeItemIndex:null,activationTrigger:1,pendingShouldSort:!1,pendingFocus:{focus:c.Nothing},buttonPositionState:x.Idle})}reduce(e,t){return pe(t.type,Se,e,t)}},we=(0,J.createContext)(null);function $(e){let t=(0,J.useContext)(we);if(t===null){let t=Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Te),t}return t}function Te({id:e,__demoMode:t=!1}){let n=(0,J.useMemo)(()=>Ce.new({id:e,__demoMode:t}),[]);return le(()=>n.dispose()),n}var Ee=J.Fragment;function De(e,t){let n=(0,E.useId)(),{__demoMode:r=!1,...i}=e,a=Te({id:n,__demoMode:r}),[o,s,c]=P(a,e=>[e.menuState,e.itemsElement,e.buttonElement]),l=z(t),u=I.get(null),d=P(u,(0,J.useCallback)(e=>u.selectors.isTop(e,n),[u,n]));ie(d,[c,s],(e,t)=>{var n;a.send({type:Q.CloseMenu}),R(t,O.Loose)||(e.preventDefault(),(n=a.state.buttonElement)==null||n.focus())});let f=V(()=>{a.send({type:Q.CloseMenu})}),p=q({open:o===X.Open,close:f}),m={ref:l},h=G();return J.createElement(S,null,J.createElement(we.Provider,{value:a},J.createElement(fe,{value:pe(o,{[X.Open]:B.Open,[X.Closed]:B.Closed})},h({ourProps:m,theirProps:i,slot:p,defaultTag:Ee,name:`Menu`}))))}var Oe=`button`;function ke(e,t){let n=$(`Menu.Button`),a=(0,E.useId)(),{id:l=`headlessui-menu-button-${a}`,disabled:f=!1,autoFocus:h=!1,...g}=e,v=(0,J.useRef)(null),y=d(),b=z(t,v,u(),V(e=>n.send({type:Q.SetButtonElement,element:e}))),x=V(e=>{switch(e.key){case N.Space:case N.Enter:case N.ArrowDown:e.preventDefault(),e.stopPropagation(),n.send({type:Q.OpenMenu,focus:{focus:c.First}});break;case N.ArrowUp:e.preventDefault(),e.stopPropagation(),n.send({type:Q.OpenMenu,focus:{focus:c.Last}})}}),S=V(e=>{switch(e.key){case N.Space:e.preventDefault()}}),[C,w,T]=P(n,e=>[e.menuState,e.buttonElement,e.itemsElement]),D=C===X.Open;m(D,{trigger:w,action:(0,J.useCallback)(e=>{if(w!=null&&w.contains(e.target))return p.Ignore;let t=e.target.closest(`[role="menuitem"]:not([data-disabled])`);return M(t)?p.Select(t):T!=null&&T.contains(e.target)?p.Ignore:p.Close},[w,T]),close:(0,J.useCallback)(()=>n.send({type:Q.CloseMenu}),[]),select:(0,J.useCallback)(e=>e.click(),[])});let O=s(e=>{var t;f||(C===X.Open?((0,Y.flushSync)(()=>n.send({type:Q.CloseMenu})),(t=v.current)==null||t.focus({preventScroll:!0})):(e.preventDefault(),n.send({type:Q.OpenMenu,focus:{focus:c.Nothing},trigger:Z.Pointer})))}),{isFocusVisible:k,focusProps:A}=r({autoFocus:h}),{isHovered:j,hoverProps:F}=i({isDisabled:f}),{pressed:I,pressProps:L}=o({disabled:f}),R=q({open:C===X.Open,active:I||C===X.Open,disabled:f,hover:j,focus:k,autofocus:h}),ee=de(y(),{ref:b,id:l,type:_(e,v.current),"aria-haspopup":`menu`,"aria-controls":T?.id,"aria-expanded":C===X.Open,disabled:f||void 0,autoFocus:h,onKeyDown:x,onKeyUp:S},O,A,F,L);return G()({ourProps:ee,theirProps:g,slot:R,defaultTag:Oe,name:`Menu.Button`})}var Ae=`div`,je=H.RenderStrategy|H.Static;function Me(e,t){let n=(0,E.useId)(),{id:r=`headlessui-menu-items-${n}`,anchor:i,portal:a=!1,modal:o=!0,transition:s=!1,...l}=e,u=f(i),d=$(`Menu.Items`),[p,m]=g(u),h=w(),[_,v]=(0,J.useState)(null),y=z(t,u?p:null,V(e=>d.send({type:Q.SetItemsElement,element:e})),v),[b,x]=P(d,e=>[e.menuState,e.buttonElement]),S=oe(x),C=oe(_);u&&(a=!0);let O=me(),[A,j]=ne(s,_,O===null?b===X.Open:(O&B.Open)===B.Open);ae(A,x,()=>{d.send({type:Q.CloseMenu})});let M=P(d,e=>e.__demoMode),F=!M&&o&&b===X.Open;ue(F,C);let I=!M&&o&&b===X.Open;D(I,{allowed:(0,J.useCallback)(()=>[x,_],[x,_])});let L=!P(d,d.selectors.didButtonMove)&&A;(0,J.useEffect)(()=>{let e=_;e&&b===X.Open&&(te(e)||e.focus({preventScroll:!0}))},[b,_]),_e(b===X.Open,{container:_,accept(e){return e.getAttribute(`role`)===`menuitem`?NodeFilter.FILTER_REJECT:e.hasAttribute(`role`)?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(e){e.setAttribute(`role`,`none`)}});let R=se(),H=V(e=>{var t,n;switch(R.dispose(),e.key){case N.Space:if(d.state.searchQuery!==``)return e.preventDefault(),e.stopPropagation(),d.send({type:Q.Search,value:e.key});case N.Enter:if(e.preventDefault(),e.stopPropagation(),d.state.activeItemIndex!==null){let{dataRef:e}=d.state.items[d.state.activeItemIndex];(t=e.current?.domRef.current)==null||t.click()}d.send({type:Q.CloseMenu}),he(d.state.buttonElement);break;case N.ArrowDown:return e.preventDefault(),e.stopPropagation(),d.send({type:Q.GoToItem,focus:c.Next});case N.ArrowUp:return e.preventDefault(),e.stopPropagation(),d.send({type:Q.GoToItem,focus:c.Previous});case N.Home:case N.PageUp:return e.preventDefault(),e.stopPropagation(),d.send({type:Q.GoToItem,focus:c.First});case N.End:case N.PageDown:return e.preventDefault(),e.stopPropagation(),d.send({type:Q.GoToItem,focus:c.Last});case N.Escape:e.preventDefault(),e.stopPropagation(),(0,Y.flushSync)(()=>d.send({type:Q.CloseMenu})),(n=d.state.buttonElement)==null||n.focus({preventScroll:!0});break;case N.Tab:e.preventDefault(),e.stopPropagation(),(0,Y.flushSync)(()=>d.send({type:Q.CloseMenu})),ee(d.state.buttonElement,e.shiftKey?k.Previous:k.Next);break;default:e.key.length===1&&(d.send({type:Q.Search,value:e.key}),R.setTimeout(()=>d.send({type:Q.ClearSearch}),350))}}),ie=V(e=>{switch(e.key){case N.Space:e.preventDefault()}}),U=q({open:b===X.Open}),W=de(u?h():{},{"aria-activedescendant":P(d,d.selectors.activeDescendantId),"aria-labelledby":P(d,e=>e.buttonElement?.id),id:r,onKeyDown:H,onKeyUp:ie,role:`menu`,tabIndex:b===X.Open?0:void 0,ref:y,style:{...l.style,...m,"--button-width":T(A,x,!0).width},...re(j)}),le=G();return J.createElement(ce,{enabled:a?e.static||A:!1,ownerDocument:S},le({ourProps:W,theirProps:l,slot:U,defaultTag:Ae,features:je,visible:L,name:`Menu.Items`}))}var Ne=J.Fragment;function Pe(e,t){let n=(0,E.useId)(),{id:r=`headlessui-menu-item-${n}`,disabled:i=!1,...o}=e,s=$(`Menu.Item`),l=P(s,e=>s.selectors.isActive(e,r)),u=(0,J.useRef)(null),d=z(t,u),f=P(s,e=>s.selectors.shouldScrollIntoView(e,r));K(()=>{if(f)return U().requestAnimationFrame(()=>{var e,t;(t=(e=u.current)?.scrollIntoView)==null||t.call(e,{block:`nearest`})})},[f,u]);let p=C(u),m=(0,J.useRef)({disabled:i,domRef:u,get textValue(){return p()}});K(()=>{m.current.disabled=i},[m,i]),K(()=>(s.actions.registerItem(r,m),()=>s.actions.unregisterItem(r)),[m,r]);let h=V(()=>{s.send({type:Q.CloseMenu})}),g=V(e=>{if(i)return e.preventDefault();s.send({type:Q.CloseMenu}),he(s.state.buttonElement)}),_=V(()=>{if(i)return s.send({type:Q.GoToItem,focus:c.Nothing});s.send({type:Q.GoToItem,focus:c.Specific,id:r})}),v=b(),y=V(e=>v.update(e)),x=V(e=>{v.wasMoved(e)&&(i||l||s.send({type:Q.GoToItem,focus:c.Specific,id:r,trigger:Z.Pointer}))}),S=V(e=>{v.wasMoved(e)&&(i||l&&s.state.activationTrigger===Z.Pointer&&s.send({type:Q.GoToItem,focus:c.Nothing}))}),[w,T]=a(),[D,O]=L(),k=q({active:l,focus:l,disabled:i,close:h}),A={id:r,ref:d,role:`menuitem`,tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0||void 0,"aria-labelledby":w,"aria-describedby":D,disabled:void 0,onClick:g,onFocus:_,onPointerEnter:y,onMouseEnter:y,onPointerMove:x,onMouseMove:x,onPointerLeave:S,onMouseLeave:S},j=G();return J.createElement(T,null,J.createElement(O,null,j({ourProps:A,theirProps:o,slot:k,defaultTag:Ne,name:`Menu.Item`})))}var Fe=`div`;function Ie(e,t){let[n,r]=a(),i=e,o={ref:t,"aria-labelledby":n,role:`group`},s=G();return J.createElement(r,null,s({ourProps:o,theirProps:i,slot:{},defaultTag:Fe,name:`Menu.Section`}))}var Le=`header`;function Re(e,t){let n=(0,E.useId)(),{id:r=`headlessui-menu-heading-${n}`,...i}=e,a=l();K(()=>a.register(r),[r,a.register]);let o={id:r,ref:t,role:`presentation`,...a.props};return G()({ourProps:o,theirProps:i,slot:{},defaultTag:Le,name:`Menu.Heading`})}var ze=`div`;function Be(e,t){let n=e,r={ref:t,role:`separator`};return G()({ourProps:r,theirProps:n,slot:{},defaultTag:ze,name:`Menu.Separator`})}var Ve=W(De),He=W(ke),Ue=W(Me),We=W(Pe),Ge=W(Ie),Ke=W(Re),qe=W(Be),Je=Object.assign(Ve,{Button:He,Items:Ue,Item:We,Section:Ge,Heading:Ke,Separator:qe});export{Ue as i,We as n,Je as r,He as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`/__tb_reports`,t={day:`日报`,week:`周报`,month:`月报`};async function n(t){let n=await fetch(`${e}/sync`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({enabled:t})});if(!n.ok)throw Error(`同步工作汇报提示词失败(${n.status})`);return await n.json()}async function r(){let t=await fetch(`${e}/prompts`,{signal:AbortSignal.timeout(3e3)});if(!t.ok)throw Error(`读取提示词列表失败(${t.status})`);return await t.json()}async function i(t){let n=await fetch(`${e}/select`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({file:t})});if(!n.ok)throw Error(`切换提示词失败(${n.status})`);let r=await n.json();return typeof r.promptFile==`string`?r.promptFile:t}async function a(){let t=await fetch(`${e}/prompt`,{signal:AbortSignal.timeout(2e3)});if(!t.ok)return``;let n=await t.json();return typeof n.content==`string`?n.content.trim():``}async function o(t){let n=await fetch(`${e}/list?kind=${t}`,{signal:AbortSignal.timeout(4e3)});if(!n.ok)throw Error(`读取汇报列表失败(${n.status})`);return await n.json()}async function s(t,n){let r=await fetch(`${e}/open`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:t,name:n}),signal:AbortSignal.timeout(4e3)});if(r.ok)return;let i=`打开失败(${r.status})`;try{let e=((await r.json()).error??``).trim();e&&/^not found$/i.test(e)?i=`本地服务版本较旧(缺少「打开文件」接口),请重启本地服务后再试`:e&&(i=e)}catch{}throw Error(i)}export{s as a,o as i,a as n,i as o,r,n as s,t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`0.1.9`,t=`/__tb_update`;async function n(e=!1){try{let n=await fetch(e?`${t}?refresh=1`:t,{signal:AbortSignal.timeout(6e3),headers:{accept:`application/json`},cache:`no-store`});if(!n.ok)return null;let r=await n.json();return!r||typeof r.current!=`string`?null:r}catch{return null}}async function r(e){try{let n=await fetch(t,{method:`POST`,signal:AbortSignal.timeout(1e4),headers:{"content-type":`application/json`},body:JSON.stringify(e?{version:e}:{})});return n.status===202?{ok:!0}:{ok:!1,error:(await n.json().catch(()=>null))?.error||`HTTP ${n.status}`}}catch(e){return{ok:!0,error:e instanceof Error?e.message:String(e)}}}export{r as n,e as r,n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,n as t,t as n}from"./react-dom.CqAxpHMt.js";import{$ as r,G as i,H as a,J as o,K as s,U as c,V as l,W as u,Y as d,_ as f,dt as p,ht as m,it as h,lt as g,mt as _,nt as v,pt as y,q as b,ut as x,vt as S}from"./portal.Cm9XlIPf.js";var C=e=>ee(e)?e.document:te(e)?e:e?.ownerDocument??(typeof document<`u`?document:void 0),w=e=>C(e)?.defaultView??(typeof window<`u`?window:void 0);function T(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function ee(e){return typeof e==`object`&&!!e&&`window`in e&&e.window===e}function te(e){return T(e)&&e.nodeType===9}function ne(e){return T(e)&&e.nodeType===11&&`host`in e}var E=!1;function D(){return E}function O(e,t){if(!D())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!=null;){if(n===e)return!0;n=typeof n.assignedElements!=`function`&&n.assignedSlot?.parentNode?n.assignedSlot.parentNode:ne(n)?n.host:n.parentNode}return!1}var k=(e=document)=>{if(!D())return e.activeElement;let t=e.activeElement;for(;t&&`shadowRoot`in t&&t.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t};function A(e){if(D()&&e.target instanceof Element&&e.target.shadowRoot){if(`composedPath`in e)return e.composedPath()[0]??null;if(`composedPath`in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return e.target}function re(e){e.focus({preventScroll:!0})}var j=e(t(),1),ie=typeof document<`u`?j.useLayoutEffect:()=>{};function ae(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function oe(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function se(e){let t=(0,j.useRef)({isFocused:!1,observer:null});return ie(()=>{let e=t.current;return()=>{e.observer&&=(e.observer.disconnect(),null)}},[]),(0,j.useCallback)(n=>{let r=A(n);if(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement){t.current.isFocused=!0;let n=r;n.addEventListener(`focusout`,r=>{if(t.current.isFocused=!1,n.disabled){let t=ae(r);e?.(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){t.current.observer?.disconnect();let e=n===k()?null:k();n.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:e})),n.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:e}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:[`disabled`]})}},[e])}function ce(e){if(typeof window>`u`||window.navigator==null)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function le(e){return typeof window<`u`&&window.navigator!=null&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function M(e){let t=null;return()=>(t??=e(),t)}var ue=M(function(){return le(/^Mac/i)}),de=M(function(){return le(/^iPhone/i)}),fe=M(function(){return le(/^iPad/i)||ue()&&navigator.maxTouchPoints>1}),pe=M(function(){return de()||fe()}),me=M(function(){return ce(/AppleWebKit/i)&&(pe()||!he())}),he=M(function(){return ce(/Chrome|CriOS|CrMo/i)}),ge=M(function(){return ce(/Android/i)});function _e(e){return e.pointerType===``&&e.isTrusted?!0:ge()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function N(e,t,n=!0){let{metaKey:r,ctrlKey:i,altKey:a,shiftKey:o}=t,s=me()&&ue()&&!fe()?new KeyboardEvent(`keydown`,{keyIdentifier:`Enter`,metaKey:r,ctrlKey:i,altKey:a,shiftKey:o}):new MouseEvent(`click`,{metaKey:r,ctrlKey:i,altKey:a,shiftKey:o,detail:1,bubbles:!0,cancelable:!0});N.isOpening=n,re(e),e.dispatchEvent(s),N.isOpening=!1}N.isOpening=!1;var P=null,ve=new Set,ye=new Map,F=!1,be=!1,xe={Tab:!0,Escape:!0};function Se(e,t){for(let n of ve)n(e,t)}function Ce(e){return!(e.metaKey||!ue()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}function we(e){F=!0,!N.isOpening&&Ce(e)&&(P=`keyboard`,Se(`keyboard`,e))}function I(e){P=`pointer`,`pointerType`in e&&e.pointerType,(e.type===`mousedown`||e.type===`pointerdown`)&&(F=!0,Se(`pointer`,e))}function Te(e){!N.isOpening&&_e(e)&&(F=!0,P=`virtual`)}function Ee(e){let t=A(e),n=w(t),r=C(t);t===n?be=!0:t!==r&&e.isTrusted&&(!F&&!be&&(P=`virtual`,Se(`virtual`,e)),F=!1,be=!1)}function De(){F=!1,be=!0}function Oe(e){let t=k(C(A(e)));queueMicrotask(()=>{k(C(A(e)))!==t&&Ne(`keyboard`)})}function ke(e){if(typeof window>`u`||typeof document>`u`)return;let t=w(e),n=C(e);if(ye.get(t))return;let r=t.HTMLElement.prototype.focus;Reflect.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(){F=!0,r.apply(this,arguments)}}),n.addEventListener(`keydown`,we,!0),n.addEventListener(`keyup`,we,!0),n.addEventListener(`click`,Te,!0),n.addEventListener(`invalid`,Oe,!0),t.addEventListener(`focus`,Ee,!0),t.addEventListener(`blur`,De,!1),typeof PointerEvent<`u`&&(n.addEventListener(`pointerdown`,I,!0),n.addEventListener(`pointermove`,I,!0),n.addEventListener(`pointerup`,I,!0)),t.addEventListener(`beforeunload`,()=>{Ae(e)},{once:!0}),ye.set(t,{focus:r})}var Ae=(e,t)=>{let n=w(e),r=C(e);t&&r.removeEventListener(`DOMContentLoaded`,t),ye.has(n)&&(Reflect.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:ye.get(n).focus}),r.removeEventListener(`keydown`,we,!0),r.removeEventListener(`keyup`,we,!0),r.removeEventListener(`click`,Te,!0),r.removeEventListener(`invalid`,Oe,!0),n.removeEventListener(`focus`,Ee,!0),n.removeEventListener(`blur`,De,!1),typeof PointerEvent<`u`&&(r.removeEventListener(`pointerdown`,I,!0),r.removeEventListener(`pointermove`,I,!0),r.removeEventListener(`pointerup`,I,!0)),ye.delete(n))};function je(e){let t=C(e),n;return t.readyState===`loading`?(n=()=>{ke(e)},t.addEventListener(`DOMContentLoaded`,n)):ke(e),()=>Ae(e,n)}typeof document<`u`&&je();function Me(){return P!==`pointer`}function Ne(e){P=e,Se(e,null)}var Pe=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function Fe(e,t,n){let r=n?A(n):void 0,i=C(r),a=w(r),o=a===void 0?HTMLInputElement:a.HTMLInputElement,s=a===void 0?HTMLTextAreaElement:a.HTMLTextAreaElement,c=a===void 0?HTMLElement:a.HTMLElement,l=a===void 0?KeyboardEvent:a.KeyboardEvent,u=k(i);return e=e||u instanceof o&&!Pe.has(u.type)||u instanceof s||u instanceof c&&u.isContentEditable,!(e&&t===`keyboard`&&n instanceof l&&!xe[n.key])}function Ie(e,t,n){ke(),(0,j.useEffect)(()=>{if(n?.enabled===!1)return;let t=(t,r)=>{Fe(!!n?.isTextInput,t,r)&&e(Me())};return ve.add(t),()=>{ve.delete(t)}},t)}function Le(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e,a=(0,j.useCallback)(e=>{if(A(e)===e.currentTarget)return r&&r(e),i&&i(!1),!0},[r,i]),o=se(a),s=(0,j.useCallback)(e=>{let t=A(e),r=C(t),a=r?k(r):k();t===e.currentTarget&&t===a&&(n&&n(e),i&&i(!0),o(e))},[i,n,o]);return{focusProps:{onFocus:!t&&(n||i||r)?s:void 0,onBlur:!t&&(r||i)?a:void 0}}}function Re(){let e=(0,j.useRef)(new Map),t=(0,j.useCallback)((t,n,r,i)=>{let a=i?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:a,options:i}),t.addEventListener(n,a,i)},[]),n=(0,j.useCallback)((t,n,r,i)=>{let a=e.current.get(r)?.fn||r;t.removeEventListener(n,a,i),e.current.delete(r)},[]),r=(0,j.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,j.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function ze(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=(0,j.useRef)({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:s}=Re(),c=(0,j.useCallback)(e=>{O(e.currentTarget,A(e))&&a.current.isFocusWithin&&!O(e.currentTarget,e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),n&&n(e),i&&i(!1))},[n,i,a,s]),l=se(c),u=(0,j.useCallback)(e=>{if(!O(e.currentTarget,A(e)))return;let t=A(e),n=C(t),s=k(n);if(!a.current.isFocusWithin&&s===t){r&&r(e),i&&i(!0),a.current.isFocusWithin=!0,l(e);let t=e.currentTarget;o(n,`focus`,e=>{let r=A(e);if(a.current.isFocusWithin&&!O(t,r)){let e=new n.defaultView.FocusEvent(`blur`,{relatedTarget:r});oe(e,t);let i=ae(e);c(i)}},{capture:!0})}},[r,i,l,o,c]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:c}}}function Be(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=(0,j.useRef)({isFocused:!1,isFocusVisible:t||Me()}),[a,o]=(0,j.useState)(!1),[s,c]=(0,j.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),l=(0,j.useCallback)(()=>c(i.current.isFocused&&i.current.isFocusVisible),[]),u=(0,j.useCallback)(e=>{i.current.isFocused=e,i.current.isFocusVisible=Me(),o(e),l()},[l]);Ie(e=>{i.current.isFocusVisible=e,l()},[n,a],{enabled:a,isTextInput:n});let{focusProps:d}=Le({isDisabled:r,onFocusChange:u}),{focusWithinProps:f}=ze({isDisabled:!r,onFocusWithinChange:u});return{isFocused:a,isFocusVisible:s,focusProps:r?f:d}}var Ve=!1,He=0;function Ue(){Ve=!0,setTimeout(()=>{Ve=!1},500)}function We(e){e.pointerType===`touch`&&Ue()}function Ge(){let e=C(null);if(e!==void 0)return He===0&&typeof PointerEvent<`u`&&e.addEventListener(`pointerup`,We),He++,()=>{He--,!(He>0)&&typeof PointerEvent<`u`&&e.removeEventListener(`pointerup`,We)}}function Ke(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[a,o]=(0,j.useState)(!1),s=(0,j.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:``,target:null}).current;(0,j.useEffect)(Ge,[]);let{addGlobalListener:c,removeAllGlobalListeners:l}=Re(),{hoverProps:u,triggerHoverEnd:d}=(0,j.useMemo)(()=>{let e=(e,r)=>{if(s.pointerType=r,i||r===`touch`||s.isHovered||!O(e.currentTarget,A(e)))return;s.isHovered=!0;let l=e.currentTarget;s.target=l,c(C(A(e)),`pointerover`,e=>{s.isHovered&&s.target&&!O(s.target,A(e))&&a(e,e.pointerType)},{capture:!0}),t&&t({type:`hoverstart`,target:l,pointerType:r}),n&&n(!0),o(!0)},a=(e,t)=>{let i=s.target;s.pointerType=``,s.target=null,t!==`touch`&&s.isHovered&&i&&(s.isHovered=!1,l(),r&&r({type:`hoverend`,target:i,pointerType:t}),n&&n(!1),o(!1))},u={};return typeof PointerEvent<`u`&&(u.onPointerEnter=t=>{Ve&&t.pointerType===`mouse`||e(t,t.pointerType)},u.onPointerLeave=e=>{!i&&O(e.currentTarget,A(e))&&a(e,e.pointerType)}),{hoverProps:u,triggerHoverEnd:a}},[t,n,r,i,s,c,l]);return(0,j.useEffect)(()=>{i&&d({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:u,isHovered:a}}function qe(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Je(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function Ye({disabled:e=!1}={}){let t=(0,j.useRef)(null),[n,r]=(0,j.useState)(!1),i=_(),a=p(()=>{t.current=null,r(!1),i.dispose()}),o=p(e=>{if(i.dispose(),t.current===null){t.current=e.currentTarget,r(!0);{let n=S(e.currentTarget);i.addEventListener(n,`pointerup`,a,!1),i.addEventListener(n,`pointermove`,e=>{if(t.current){let n=qe(e);r(Je(n,t.current.getBoundingClientRect()))}},!1),i.addEventListener(n,`pointercancel`,a,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:o,onPointerUp:a,onClick:a}}}var Xe=(0,j.createContext)(void 0);function Ze(){return(0,j.useContext)(Xe)}function Qe(e){let t=e.parentElement,n=null;for(;t&&!u(t);)a(t)&&(n=t),t=t.parentElement;let r=t?.getAttribute(`disabled`)===``;return r&&$e(n)?!1:r}function $e(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(a(t))return!1;t=t.previousElementSibling}return!0}var et=(0,j.createContext)(null);et.displayName=`LabelContext`;function tt(){let e=(0,j.useContext)(et);if(e===null){let e=Error(`You used a <Label /> component, but it is not inside a relevant parent.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,tt),e}return e}function nt(e){let t=(0,j.useContext)(et)?.value??void 0;return(e?.length??0)>0?[t,...e].filter(Boolean).join(` `):t}function rt({inherit:e=!1}={}){let t=nt(),[n,r]=(0,j.useState)([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(` `):void 0,(0,j.useMemo)(()=>function(e){let t=p(e=>(r(t=>[...t,e]),()=>r(t=>{let n=t.slice(),r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}))),n=(0,j.useMemo)(()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value}),[t,e.slot,e.name,e.props,e.value]);return j.createElement(et.Provider,{value:n},e.children)},[r])]}var it=`label`;function at(e,t){let n=(0,r.useId)(),i=tt(),a=Ze(),o=g(),{id:u=`headlessui-label-${n}`,htmlFor:d=a??i.props?.htmlFor,passive:f=!1,...m}=e,h=l(t);y(()=>i.register(u),[u,i.register]);let _=p(e=>{let t=e.currentTarget;if(!(e.target!==e.currentTarget&&c(e.target))&&(b(t)&&e.preventDefault(),i.props&&`onClick`in i.props&&typeof i.props.onClick==`function`&&i.props.onClick(e),b(t))){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute(`disabled`);if(t===`true`||t===``)return;let n=e.getAttribute(`aria-disabled`);if(n===`true`||n===``)return;(s(e)&&(e.type===`file`||e.type===`radio`||e.type===`checkbox`)||e.role===`radio`||e.role===`checkbox`||e.role===`switch`)&&e.click(),e.focus({preventScroll:!0})}}}),S=x({...i.slot,disabled:o||!1}),C={ref:h,...i.props,id:u,htmlFor:d,onClick:_};return f&&(`onClick`in C&&(delete C.htmlFor,delete C.onClick),`onClick`in m&&delete m.onClick),v()({ourProps:C,theirProps:m,slot:S,defaultTag:d?it:`div`,name:i.name||`Label`})}var ot=h(at),st=Object.assign(ot,{});function ct(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function lt(e,t,n=!1){let[r,i]=(0,j.useState)(()=>ct(t));return y(()=>{if(!t||!e)return;let n=m();return n.requestAnimationFrame(function e(){n.requestAnimationFrame(e),i(e=>{let n=ct(t);return n.width===e.width&&n.height===e.height?e:n})}),()=>{n.dispose()}},[t,e]),n?{width:`${r.width}px`,height:`${r.height}px`}:r}var ut=(e=>(e[e.Left=0]=`Left`,e[e.Right=2]=`Right`,e))(ut||{});function dt(e){let t=(0,j.useRef)(null);return{onPointerDown:p(n=>{t.current=n.pointerType,!Qe(n.currentTarget)&&n.pointerType===`mouse`&&n.button===ut.Left&&(n.preventDefault(),e(n))}),onClick:p(n=>{t.current!==`mouse`&&(Qe(n.currentTarget)||e(n))})}}var ft=(e=>(e[e.Ignore=0]=`Ignore`,e[e.Select=1]=`Select`,e[e.Close=2]=`Close`,e))(ft||{}),pt={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},mt=200,ht=5;function gt(e,{trigger:t,action:n,close:r,select:a}){let o=(0,j.useRef)(null),s=(0,j.useRef)(null),c=(0,j.useRef)(null);f(e&&t!==null,`pointerdown`,e=>{d(e?.target)&&t!=null&&t.contains(e.target)&&(s.current=e.x,c.current=e.y,o.current=e.timeStamp)}),f(e&&t!==null,`pointerup`,e=>{let t=o.current;if(t===null||(o.current=null,!i(e.target))||Math.abs(e.x-(s.current??e.x))<ht&&Math.abs(e.y-(c.current??e.y))<ht)return;let l=n(e);switch(l.kind){case 0:return;case 1:e.timeStamp-t>mt&&(a(l.target),r());break;case 2:r()}},{capture:!0})}function _t(e,t){return(0,j.useMemo)(()=>{if(e.type)return e.type;let n=e.as??`button`;if(typeof n==`string`&&n.toLowerCase()===`button`||t?.tagName===`BUTTON`&&!t.hasAttribute(`type`))return`button`},[e.type,e.as,t])}function vt(e){return[e.screenX,e.screenY]}function yt(){let e=(0,j.useRef)([-1,-1]);return{wasMoved(t){let n=vt(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=vt(t)}}}function bt(){return typeof window<`u`}function L(e){return xt(e)?(e.nodeName||``).toLowerCase():`#document`}function R(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function z(e){return((xt(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function xt(e){return bt()?e instanceof Node||e instanceof R(e).Node:!1}function B(e){return bt()?e instanceof Element||e instanceof R(e).Element:!1}function V(e){return bt()?e instanceof HTMLElement||e instanceof R(e).HTMLElement:!1}function St(e){return!bt()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof R(e).ShadowRoot}function Ct(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=U(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function wt(e){return/^(table|td|th)$/.test(L(e))}function Tt(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Et=/transform|translate|scale|rotate|perspective|filter/,Dt=/paint|layout|strict|content/,H=e=>!!e&&e!==`none`,Ot;function kt(e){let t=B(e)?U(e):e;return H(t.transform)||H(t.translate)||H(t.scale)||H(t.rotate)||H(t.perspective)||!jt()&&(H(t.backdropFilter)||H(t.filter))||Et.test(t.willChange||``)||Dt.test(t.contain||``)}function At(e){let t=W(e);for(;V(t)&&!Mt(t);){if(kt(t))return t;if(Tt(t))return null;t=W(t)}return null}function jt(){return Ot??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ot}function Mt(e){return/^(html|body|#document)$/.test(L(e))}function U(e){return R(e).getComputedStyle(e)}function Nt(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function W(e){if(L(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||St(e)&&e.host||z(e);return St(t)?t.host:t}function Pt(e){let t=W(e);return Mt(t)?(e.ownerDocument||e).body:V(t)&&Ct(t)?t:Pt(t)}function Ft(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Pt(e),i=r===e.ownerDocument?.body,a=R(r);if(i){let e=It(a);return t.concat(a,a.visualViewport||[],Ct(r)?r:[],e&&n?Ft(e):[])}return t.concat(r,Ft(r,[],n))}function It(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lt(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}var G=Math.min,K=Math.max,Rt=Math.round,zt=Math.floor,q=e=>({x:e,y:e}),Bt={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Vt(e,t,n){return K(e,G(t,n))}function J(e,t){return typeof e==`function`?e(t):e}function Y(e){return e.split(`-`)[0]}function Ht(e){return e.split(`-`)[1]}function Ut(e){return e===`x`?`y`:`x`}function Wt(e){return e===`y`?`height`:`width`}function X(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Gt(e){return Ut(X(e))}function Kt(e,t,n){n===void 0&&(n=!1);let r=Ht(e),i=Gt(e),a=Wt(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=tn(o)),[o,tn(o)]}function qt(e){let t=tn(e);return[Jt(e),t,Jt(t)]}function Jt(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Yt=[`left`,`right`],Xt=[`right`,`left`],Zt=[`top`,`bottom`],Qt=[`bottom`,`top`];function $t(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Xt:Yt:t?Yt:Xt;case`left`:case`right`:return t?Zt:Qt;default:return[]}}function en(e,t,n,r){let i=Ht(e),a=$t(Y(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Jt)))),a}function tn(e){let t=Y(e);return Bt[t]+e.slice(t.length)}function nn(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function rn(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:nn(e)}function an(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}}var on=e(n(),1);function sn(e,t,n){let{reference:r,floating:i}=e,a=X(t),o=Gt(t),s=Wt(o),c=Y(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Ht(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function cn(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=J(t,e),p=rn(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=an(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=an(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ln=50,un=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:cn},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=sn(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<ln&&(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}=sn(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},dn=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}=J(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Y(r),_=X(o),v=Y(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[tn(o)]:qt(o)),x=p!==`none`;!d&&x&&b.push(...en(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Kt(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===X(t)||T.every(e=>X(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.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=T.filter(e=>{if(x){let t=X(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{}}}},fn=new Set([`left`,`top`]);async function pn(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Y(n),s=Ht(n),c=X(n)===`y`,l=fn.has(o)?-1:1,u=a&&c?-1:1,d=J(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var mn=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 pn(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}}}}},hn=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}=J(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=X(i),p=Ut(f),m=u[p],h=u[f],g=(e,t)=>Vt(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},gn=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=J(e,t),c=await i.detectOverflow(t,s),l=Y(n),u=Ht(n),d=X(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=G(p-c[m],g),y=G(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*K(c.left,c.right):S=p-2*K(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function _n(e){let t=U(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=V(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Rt(n)!==a||Rt(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function vn(e){return B(e)?e:e.contextElement}function Z(e){let t=vn(e);if(!V(t))return q(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=_n(t),o=(a?Rt(n.width):n.width)/r,s=(a?Rt(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var yn=q(0);function bn(e){let t=R(e);return!jt()||!t.visualViewport?yn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xn(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===R(e)}function Q(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=vn(e),o=q(1);t&&(r?B(r)&&(o=Z(r)):o=Z(e));let s=xn(a,n,r)?bn(a):q(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=R(a),t=B(r)?R(r):r,n=e,i=It(n);for(;i&&t!==n;){let e=Z(i),t=i.getBoundingClientRect(),r=U(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=R(i),i=It(n)}}return an({width:u,height:d,x:c,y:l})}function Sn(e,t){let n=Nt(e).scrollLeft;return t?t.left+n:Q(z(e)).left+n}function Cn(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Sn(e,n),y:n.top+t.scrollTop}}function wn(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=z(r),s=t?Tt(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=q(1),u=q(0),d=V(r);if((d||!a)&&((L(r)!==`body`||Ct(o))&&(c=Nt(r)),d)){let e=Q(r);l=Z(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Cn(o,c):q(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Tn(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function En(e){let t=Nt(e),n=e.ownerDocument.body,r=K(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=K(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Sn(e),o=-t.scrollTop;return U(n).direction===`rtl`&&(a+=K(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Dn=25;function On(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=R(e),a=z(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!jt()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Sn(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<=Dn&&(s-=o)}return{width:s,height:c,x:l,y:u}}function kn(e,t){let n=Q(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Z(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function An(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=On(e,n,t);else if(t===`document`)r=En(z(e));else if(B(t))r=kn(t,n);else{let n=bn(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return an(r)}function jn(e,t){let n=t.get(e);if(n)return n;let r=Ft(e,[],!1).filter(e=>B(e)&&L(e)!==`body`),i=null,a=U(e).position===`fixed`,o=a?W(e):e;for(;B(o)&&!Mt(o);){let e=U(o),t=kt(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=W(o)}return t.set(e,r),r}function Mn(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Tt(t)?[]:jn(t,this._c):[].concat(n),r],o=An(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=An(t,a[e],i);s=K(n.top,s),c=G(n.right,c),l=G(n.bottom,l),u=K(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Nn(e){let{width:t,height:n}=_n(e);return{width:t,height:n}}function Pn(e,t,n){let r=V(t),i=z(t),a=n===`fixed`,o=Q(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=q(0);if((r||!a)&&((L(t)!==`body`||Ct(i))&&(s=Nt(t)),r)){let e=Q(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Sn(i));let l=i&&!r&&!a?Cn(i,s):q(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 Fn(e){return U(e).position===`static`}function In(e,t){if(!V(e)||U(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return z(e)===n&&(n=n.ownerDocument.body),n}function Ln(e,t){let n=R(e);if(Tt(e))return n;if(!V(e)){let t=W(e);for(;t&&!Mt(t);){if(B(t)&&!Fn(t))return t;t=W(t)}return n}let r=In(e,t);for(;r&&wt(r)&&Fn(r);)r=In(r,t);return r&&Mt(r)&&Fn(r)&&!kt(r)?n:r||At(e)||n}var Rn=async function(e){let t=this.getOffsetParent||Ln,n=this.getDimensions,r=await n(e.floating);return{reference:Pn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function zn(e){return U(e).direction===`rtl`}var Bn={convertOffsetParentRelativeRectToViewportRelativeRect:wn,getDocumentElement:z,getClippingRect:Mn,getOffsetParent:Ln,getElementRects:Rn,getClientRects:Tn,getDimensions:Nn,getScale:Z,isElement:B,isRTL:zn};function Vn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Hn(e,t,n){let r=null,i,a=z(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=zt(d),h=zt(a.clientWidth-(u+f)),g=zt(a.clientHeight-(d+p)),_=zt(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:K(0,G(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Vn(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=R(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Un(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=vn(e),u=i||a?[...l?Ft(l):[],...t?Ft(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Hn(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?Q(e):null;c&&g();function g(){let t=Q(e);h&&!Vn(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 Wn=cn,Gn=mn,Kn=hn,qn=dn,Jn=gn,Yn=(e,t,n)=>{let r=new Map,i=n??{},a={...Bn,...i.platform,_c:r};return un(e,t,{...i,platform:a})},Xn=typeof document<`u`?j.useLayoutEffect:function(){};function Zn(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(!Zn(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)&&!Zn(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Qn(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $n(e,t){let n=Qn(e);return Math.round(t*n)/n}function er(e){let t=j.useRef(e);return Xn(()=>{t.current=e}),t}function tr(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]=j.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=j.useState(r);Zn(f,r)||p(r);let[m,h]=j.useState(null),[g,_]=j.useState(null),v=j.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=j.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=j.useRef(null),C=j.useRef(null),w=j.useRef(u),T=c!=null,ee=er(c),te=er(i),ne=er(l),E=j.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};te.current&&(e.platform=te.current),Yn(S.current,C.current,e).then(e=>{let t={...e,isPositioned:ne.current!==!1};D.current&&!Zn(w.current,t)&&(w.current=t,on.flushSync(()=>{d(t)}))})},[f,t,n,te,ne]);Xn(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let D=j.useRef(!1);Xn(()=>(D.current=!0,()=>{D.current=!1}),[]),Xn(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(ee.current)return ee.current(b,x,E);E()}},[b,x,E,ee,T]);let O=j.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),k=j.useMemo(()=>({reference:b,floating:x}),[b,x]),A=j.useMemo(()=>{let e={position:n,left:0,top:0};if(!k.floating)return e;let t=$n(k.floating,u.x),r=$n(k.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Qn(k.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,k.floating,u.x,u.y]);return j.useMemo(()=>({...u,update:E,refs:O,elements:k,floatingStyles:A}),[u,E,O,k,A])}var nr=(e,t)=>{let n=Gn(e);return{name:n.name,fn:n.fn,options:[e,t]}},rr=(e,t)=>{let n=Kn(e);return{name:n.name,fn:n.fn,options:[e,t]}},ir=(e,t)=>{let n=qn(e);return{name:n.name,fn:n.fn,options:[e,t]}},ar=(e,t)=>{let n=Jn(e);return{name:n.name,fn:n.fn,options:[e,t]}},or={...j},sr=or.useInsertionEffect||(e=>e());function cr(e){let t=j.useRef(()=>{});return sr(()=>{t.current=e}),j.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}var lr=`ArrowUp`,ur=`ArrowDown`,dr=`ArrowLeft`,fr=`ArrowRight`,pr=typeof document<`u`?j.useLayoutEffect:j.useEffect,mr=[dr,fr],hr=[lr,ur];[...mr,...hr];var gr=!1,_r=0,vr=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+_r++;function yr(){let[e,t]=j.useState(()=>gr?vr():void 0);return pr(()=>{e??t(vr())},[]),j.useEffect(()=>{gr=!0},[]),e}var br=or.useId||yr;function xr(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,e.get(t)?.filter(e=>e!==n)||[])}}}var Sr=j.createContext(null),Cr=j.createContext(null),wr=()=>j.useContext(Sr)?.id||null,Tr=()=>j.useContext(Cr),Er=`data-floating-ui-focusable`;function Dr(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=br(),a=j.useRef({}),[o]=j.useState(()=>xr()),s=wr()!=null,[c,l]=j.useState(r.reference),u=cr((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=j.useMemo(()=>({setPositionReference:l}),[]),f=j.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return j.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function Or(e){e===void 0&&(e={});let{nodeId:t}=e,n=Dr({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,o]=j.useState(null),[s,c]=j.useState(null),l=i?.domReference||a,u=j.useRef(null),d=Tr();pr(()=>{l&&(u.current=l)},[l]);let f=tr({...e,elements:{...i,...s&&{reference:s}}}),p=j.useCallback(e=>{let t=B(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),m=j.useCallback(e=>{(B(e)||e===null)&&(u.current=e,o(e)),(B(f.refs.reference.current)||f.refs.reference.current===null||e!==null&&!B(e))&&f.refs.setReference(e)},[f.refs]),h=j.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:u}),[f.refs,m,p]),g=j.useMemo(()=>({...f.elements,domReference:l}),[f.elements,l]),_=j.useMemo(()=>({...f,...r,refs:h,elements:g,nodeId:t}),[f,h,g,t,r]);return pr(()=>{r.dataRef.current.floatingContext=_;let e=d?.nodesRef.current.find(e=>e.id===t);e&&(e.context=_)}),j.useMemo(()=>({...f,context:_,refs:h,elements:g}),[f,h,g,_])}var kr=`active`,Ar=`selected`;function jr(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[kr]:t,[Ar]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[Er]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[kr,Ar].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function Mr(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=j.useCallback(t=>jr(t,e,`reference`),t),a=j.useCallback(t=>jr(t,e,`floating`),n),o=j.useCallback(t=>jr(t,e,`item`),r);return j.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}function Nr(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}var Pr=e=>({name:`inner`,options:e,async fn(t){let{listRef:n,overflowRef:r,onFallbackChange:i,offset:a=0,index:o=0,minItemsVisible:s=4,referenceOverflowThreshold:c=0,scrollRef:l,...u}=J(e,t),{rects:d,elements:{floating:f}}=t,p=n.current[o],m=l?.current||f,h=f.clientTop||m.clientTop,g=f.clientTop!==0,_=m.clientTop!==0,v=f===m;if(!p)return{};let y={...t,...await nr(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-a).fn(t)},b=await Wn(Nr(y,m.scrollHeight+h+f.clientTop),u),x=await Wn(y,{...u,elementContext:`reference`}),S=K(0,b.top),C=y.y+S,w=(m.scrollHeight>m.clientHeight?e=>e:Rt)(K(0,m.scrollHeight+(g&&v||_?h*2:0)-S-K(0,b.bottom)));if(m.style.maxHeight=w+`px`,m.scrollTop=S,i){let e=m.offsetHeight<p.offsetHeight*G(s,n.current.length)-1||x.top>=-c||x.bottom>=-c;on.flushSync(()=>i(e))}return r&&(r.current=await Wn(Nr({...y,y:C},m.offsetHeight+h+f.clientTop),u)),{y:C}}});function Fr(e,t){let{open:n,elements:r}=e,{enabled:i=!0,overflowRef:a,scrollRef:o,onChange:s}=t,c=cr(s),l=j.useRef(!1),u=j.useRef(null),d=j.useRef(null);j.useEffect(()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||a.current==null)return;let n=e.deltaY,r=a.current.top>=-.5,i=a.current.bottom>=-.5,o=t.scrollHeight-t.clientHeight,s=n<0?-1:1,l=n<0?`max`:`min`;t.scrollHeight<=t.clientHeight||(!r&&n>0||!i&&n<0?(e.preventDefault(),on.flushSync(()=>{c(e=>e+Math[l](n,o*s))})):/firefox/i.test(Lt())&&(t.scrollTop+=n))}let t=o?.current||r.floating;if(n&&t)return t.addEventListener(`wheel`,e),requestAnimationFrame(()=>{u.current=t.scrollTop,a.current!=null&&(d.current={...a.current})}),()=>{u.current=null,d.current=null,t.removeEventListener(`wheel`,e)}},[i,n,r.floating,a,o,c]);let f=j.useMemo(()=>({onKeyDown(){l.current=!0},onWheel(){l.current=!1},onPointerMove(){l.current=!1},onScroll(){let e=o?.current||r.floating;if(a.current&&e&&l.current){if(u.current!==null){let t=e.scrollTop-u.current;(a.current.bottom<-.5&&t<-1||a.current.top<-.5&&t>1)&&on.flushSync(()=>c(e=>e+t))}requestAnimationFrame(()=>{u.current=e.scrollTop})}}}),[r.floating,c,a,o]);return j.useMemo(()=>i?{floating:f}:{},[i,f])}var $=(0,j.createContext)({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});$.displayName=`FloatingContext`;var Ir=(0,j.createContext)(null);Ir.displayName=`PlacementContext`;function Lr(e){return(0,j.useMemo)(()=>e?typeof e==`string`?{to:e}:e:null,[e])}function Rr(){return(0,j.useContext)($).setReference}function zr(){return(0,j.useContext)($).getReferenceProps}function Br(){let{getFloatingProps:e,slot:t}=(0,j.useContext)($);return(0,j.useCallback)((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function Vr(e=null){e===!1&&(e=null),typeof e==`string`&&(e={to:e});let t=(0,j.useContext)(Ir),n=(0,j.useMemo)(()=>e,[JSON.stringify(e,(e,t)=>t?.outerHTML??t)]);y(()=>{t?.(n??null)},[t,n]);let r=(0,j.useContext)($);return(0,j.useMemo)(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}var Hr=4;function Ur({children:e,enabled:t=!0}){let[n,r]=(0,j.useState)(null),[i,a]=(0,j.useState)(0),s=(0,j.useRef)(null),[c,l]=(0,j.useState)(null);Wr(c);let u=t&&n!==null&&c!==null,{to:d=`bottom`,gap:f=0,offset:m=0,padding:h=0,inner:g}=Gr(n,c),[_,v=`center`]=d.split(` `);y(()=>{u&&a(0)},[u]);let{refs:b,floatingStyles:x,context:S}=Or({open:u,placement:_===`selection`?v===`center`?`bottom`:`bottom-${v}`:v===`center`?`${_}`:`${_}-${v}`,strategy:`absolute`,transform:!1,middleware:[nr({mainAxis:_===`selection`?0:f,crossAxis:m}),rr({padding:h}),_!==`selection`&&ir({padding:h}),_===`selection`&&g?Pr({...g,padding:h,overflowRef:s,offset:i,minItemsVisible:Hr,referenceOverflowThreshold:h,onFallbackChange(e){if(!e)return;let t=S.elements.floating;if(!t)return;let n=parseFloat(getComputedStyle(t).scrollPaddingBottom)||0,r=Math.min(Hr,t.childElementCount),i=0,s=0;for(let e of S.elements.floating?.childNodes??[])if(o(e)){let a=e.offsetTop,o=a+e.clientHeight+n,c=t.scrollTop,l=c+t.clientHeight;if(a>=c&&o<=l)r--;else{s=Math.max(0,Math.min(o,l)-Math.max(a,c)),i=e.clientHeight;break}}r>=1&&a(e=>{let t=i*r-s+n;return e>=t?e:t})}}):null,ar({padding:h,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:`auto`,maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:Un}),[C=_,w=v]=S.placement.split(`-`);_===`selection`&&(C=`selection`);let T=(0,j.useMemo)(()=>({anchor:[C,w].filter(Boolean).join(` `)}),[C,w]),{getReferenceProps:ee,getFloatingProps:te}=Mr([Fr(S,{overflowRef:s,onChange:a})]),ne=p(e=>{l(e),b.setFloating(e)});return j.createElement(Ir.Provider,{value:r},j.createElement($.Provider,{value:{setFloating:ne,setReference:b.setReference,styles:x,getReferenceProps:ee,getFloatingProps:te,slot:T}},e))}function Wr(e){y(()=>{if(!e)return;let t=new MutationObserver(()=>{let t=window.getComputedStyle(e).maxHeight,n=parseFloat(t);if(isNaN(n))return;let r=parseInt(t);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)});return t.observe(e,{attributes:!0,attributeFilter:[`style`]}),()=>{t.disconnect()}},[e])}function Gr(e,t){let n=Kr(e?.gap??`var(--anchor-gap, 0)`,t),r=Kr(e?.offset??`var(--anchor-offset, 0)`,t),i=Kr(e?.padding??`var(--anchor-padding, 0)`,t);return{...e,gap:n,offset:r,padding:i}}function Kr(e,t,n=void 0){let r=_(),i=p((e,t)=>{if(e==null)return[n,null];if(typeof e==`number`)return[e,null];if(typeof e==`string`){if(!t)return[n,null];let i=Jr(e,t);return[i,n=>{let a=qr(e);{let o=a.map(e=>window.getComputedStyle(t).getPropertyValue(e));r.requestAnimationFrame(function s(){r.nextFrame(s);let c=!1;for(let[e,n]of a.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(o[e]!==r){o[e]=r,c=!0;break}}if(!c)return;let l=Jr(e,t);i!==l&&(n(l),i=l)})}return r.dispose}]}return[n,null]}),a=(0,j.useMemo)(()=>i(e,t)[0],[e,t]),[o=a,s]=(0,j.useState)();return y(()=>{let[n,r]=i(e,t);if(s(n),r)return r(s)},[e,t]),o}function qr(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(`,`);if(e===-1)return[t[1]];let n=t[1].slice(0,e).trim(),r=t[1].slice(e+1).trim();return r?[n,...qr(r)]:[n]}return[]}function Jr(e,t){let n=document.createElement(`div`);t.appendChild(n),n.style.setProperty(`margin-top`,`0px`,`important`),n.style.setProperty(`margin-top`,e,`important`);let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function Yr(e){throw Error(`Unexpected object: `+e)}var Xr=(e=>(e[e.First=0]=`First`,e[e.Previous=1]=`Previous`,e[e.Next=2]=`Next`,e[e.Last=3]=`Last`,e[e.Specific=4]=`Specific`,e[e.Nothing=5]=`Nothing`,e))(Xr||{});function Zr(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:i===-1&&(i=n.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:Yr(e)}}var Qr={Idle:{kind:`Idle`},Tracked:e=>({kind:`Tracked`,position:e}),Moved:{kind:`Moved`}};function $r(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function ei(e,t,n){let r=m();if(t.kind===`Tracked`){let i=function(){a!==$r(e)&&(r.dispose(),n())},{position:a}=t,o=new ResizeObserver(i);o.observe(e),r.add(()=>o.disconnect()),r.addEventListener(window,`scroll`,i,{passive:!0}),r.addEventListener(window,`resize`,i)}return()=>r.dispose()}var ti=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ni(e){let t=e.innerText??``,n=e.cloneNode(!0);if(!o(n))return t;let r=!1;for(let e of n.querySelectorAll(`[hidden],[aria-hidden],[role="img"]`))e.remove(),r=!0;let i=r?n.innerText??``:t;return ti.test(i)&&(i=i.replace(ti,``)),i}function ri(e){let t=e.getAttribute(`aria-label`);if(typeof t==`string`)return t.trim();let n=e.getAttribute(`aria-labelledby`);if(n){let e=n.split(` `).map(e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute(`aria-label`);return typeof e==`string`?e.trim():ni(t).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(`, `)}return ni(e).trim()}function ii(e){let t=(0,j.useRef)(``),n=(0,j.useRef)(``);return p(()=>{let r=e.current;if(!r)return``;let i=r.innerText;if(t.current===i)return n.current;let a=ri(r).trim().toLowerCase();return t.current=i,n.current=a,a})}export{st as C,Be as D,Ke as E,rt as S,Ye as T,dt as _,Xr as a,tt as b,Rr as c,zr as d,Lr as f,pt as g,gt as h,ei as i,Vr as l,_t as m,$r as n,Zr as o,yt as p,Qr as r,Ur as s,ii as t,Br as u,ut as v,Ze as w,nt as x,lt as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,n as t}from"./react-dom.CqAxpHMt.js";import{pt as n,vt as r}from"./portal.Cm9XlIPf.js";var i=e(t(),1);function a(e,{container:t,accept:a,walk:o}){let s=(0,i.useRef)(a),c=(0,i.useRef)(o);(0,i.useEffect)(()=>{s.current=a,c.current=o},[a,o]),n(()=>{if(!t||!e)return;let n=r(t);if(!n)return;let i=s.current,a=c.current,o=Object.assign(e=>i(e),{acceptNode:i}),l=n.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,o,!1);for(;l.nextNode();)a(l.currentNode)},[t,e,s,c])}export{a as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,n as t}from"./react-dom.CqAxpHMt.js";var n=e(t(),1);function r(){let[e,t]=(0,n.useState)(!1),r=(0,n.useCallback)(()=>t(!0),[]);return{cls:e?`tw-anim-list `:``,play:r}}export{r as t};
|
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="icon" type="image/png" sizes="32x32" href="/brand/favicon.png"><link rel="apple-touch-icon" href="/brand/apple-touch-icon.png"><title>自动化测试 · Lantern Harness</title><script>
|
|
2
|
-
// 尽早禁用滚动恢复,避免整页跳转/切页时停在旧滚动位置造成文字叠影
|
|
3
|
-
try {
|
|
4
|
-
if ('scrollRestoration' in history) history.scrollRestoration = 'manual';
|
|
5
|
-
} catch (e) {}
|
|
6
|
-
</script><script type="module" src="/_astro/Base.astro_astro_type_script_index_0_lang.Dy7fJoxu.js"></script><meta name="astro-view-transitions-enabled" content="true"><meta name="astro-view-transitions-fallback" content="animate"><script type="module" src="/_astro/ClientRouter.astro_astro_type_script_index_0_lang.CO1cjG9V.js"></script><script>
|
|
7
|
-
(function () {
|
|
8
|
-
try {
|
|
9
|
-
var raw = localStorage.getItem('tw.app.config.v1');
|
|
10
|
-
if (raw) {
|
|
11
|
-
var cfg = JSON.parse(raw);
|
|
12
|
-
var g = (cfg && cfg.general) || {};
|
|
13
|
-
var root = document.documentElement;
|
|
14
|
-
var size = typeof g.sessionFontSize === 'number' ? Math.round(g.sessionFontSize) : 14;
|
|
15
|
-
if (size < 12) size = 12;
|
|
16
|
-
if (size > 22) size = 22;
|
|
17
|
-
var px = size + 'px';
|
|
18
|
-
root.style.setProperty('--tw-ui-font-size', px);
|
|
19
|
-
root.style.setProperty('--tw-session-font-size', px);
|
|
20
|
-
var appearance = g.appearance;
|
|
21
|
-
var theme =
|
|
22
|
-
appearance === 'dark' || appearance === 'light'
|
|
23
|
-
? appearance
|
|
24
|
-
: window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
25
|
-
? 'dark'
|
|
26
|
-
: 'light';
|
|
27
|
-
root.dataset.theme = theme;
|
|
28
|
-
root.style.colorScheme = theme;
|
|
29
|
-
if (g.language === 'en') root.lang = 'en';
|
|
30
|
-
}
|
|
31
|
-
if (localStorage.getItem('tw.nav.collapsed') === '1') {
|
|
32
|
-
document.documentElement.dataset.navCollapsed = '1';
|
|
33
|
-
}
|
|
34
|
-
var spaceId = (
|
|
35
|
-
sessionStorage.getItem('tw.space.active-id') ||
|
|
36
|
-
localStorage.getItem('tw.space.active-id') ||
|
|
37
|
-
''
|
|
38
|
-
).trim();
|
|
39
|
-
var cfgKey = spaceId ? 'tw.app.config.v1::' + spaceId : 'tw.app.config.v1';
|
|
40
|
-
var cfgRaw = localStorage.getItem(cfgKey) || localStorage.getItem('tw.app.config.v1');
|
|
41
|
-
if (cfgRaw) {
|
|
42
|
-
var savedCfg = JSON.parse(cfgRaw) || {};
|
|
43
|
-
var plugins = savedCfg.plugins || {};
|
|
44
|
-
if (plugins.cases === false) document.documentElement.dataset.pluginOffCases = '1';
|
|
45
|
-
if (plugins.todos === false) document.documentElement.dataset.pluginOffTodos = '1';
|
|
46
|
-
if (plugins.tasks === false) document.documentElement.dataset.pluginOffTasks = '1';
|
|
47
|
-
if (plugins.projects !== true) document.documentElement.dataset.pluginOffProjects = '1';
|
|
48
|
-
if (plugins.iterations !== true)
|
|
49
|
-
document.documentElement.dataset.pluginOffIterations = '1';
|
|
50
|
-
if (plugins.pmRequirements !== true)
|
|
51
|
-
document.documentElement.dataset.pluginOffPmRequirements = '1';
|
|
52
|
-
if (plugins.bugs !== true) document.documentElement.dataset.pluginOffBugs = '1';
|
|
53
|
-
if (plugins.reports !== true) document.documentElement.dataset.pluginOffReports = '1';
|
|
54
|
-
if (plugins.testStats !== true)
|
|
55
|
-
document.documentElement.dataset.pluginOffTestStats = '1';
|
|
56
|
-
if (plugins.caseExec !== true) document.documentElement.dataset.pluginOffCaseExec = '1';
|
|
57
|
-
if (plugins.dashboard !== true)
|
|
58
|
-
document.documentElement.dataset.pluginOffDashboard = '1';
|
|
59
|
-
if (plugins.knowledgeLib === false)
|
|
60
|
-
document.documentElement.dataset.pluginOffKnowledgeLib = '1';
|
|
61
|
-
if (plugins.requirements === false)
|
|
62
|
-
document.documentElement.dataset.pluginOffRequirements = '1';
|
|
63
|
-
if (plugins.templates === false)
|
|
64
|
-
document.documentElement.dataset.pluginOffTemplates = '1';
|
|
65
|
-
// 本地已有菜单布局:静态占位(固定顺序平铺)不再亮相,避免闪一下「排序前」
|
|
66
|
-
if (Array.isArray(savedCfg.navGroups) || Array.isArray(savedCfg.navOrder)) {
|
|
67
|
-
document.documentElement.dataset.navCached = '1';
|
|
68
|
-
// 兜底:脚本没跑起来(岛始终为空)时把占位放回来,别让侧栏彻底空着
|
|
69
|
-
window.setTimeout(function () {
|
|
70
|
-
var island = document.querySelector('.tw-nav-libraries astro-island');
|
|
71
|
-
if (!island || !island.querySelector('.tw-nav-item-main')) {
|
|
72
|
-
document.documentElement.removeAttribute('data-nav-cached');
|
|
73
|
-
}
|
|
74
|
-
}, 3000);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
} catch (e) {}
|
|
78
|
-
})();
|
|
79
|
-
</script><link rel="stylesheet" href="/_astro/Base.4X_wsSoR.css"><script type="module" src="/_astro/page.Bx2KSkeL.js"></script><style>[data-astro-transition-scope="astro-bbhp3f5g-3"] { view-transition-name: astro-bbhp3f5g-3; }@layer astro { ::view-transition-old(astro-bbhp3f5g-3) {
|
|
80
|
-
animation-duration: 180ms;
|
|
81
|
-
animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
|
|
82
|
-
animation-fill-mode: both;
|
|
83
|
-
animation-name: astroFadeOut; }::view-transition-new(astro-bbhp3f5g-3) {
|
|
84
|
-
animation-duration: 180ms;
|
|
85
|
-
animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
|
|
86
|
-
animation-fill-mode: both;
|
|
87
|
-
animation-name: astroFadeIn; }[data-astro-transition=back]::view-transition-old(astro-bbhp3f5g-3) {
|
|
88
|
-
animation-duration: 180ms;
|
|
89
|
-
animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
|
|
90
|
-
animation-fill-mode: both;
|
|
91
|
-
animation-name: astroFadeOut; }[data-astro-transition=back]::view-transition-new(astro-bbhp3f5g-3) {
|
|
92
|
-
animation-duration: 180ms;
|
|
93
|
-
animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
|
|
94
|
-
animation-fill-mode: both;
|
|
95
|
-
animation-name: astroFadeIn; } }[data-astro-transition-fallback="old"] [data-astro-transition-scope="astro-bbhp3f5g-3"],
|
|
96
|
-
[data-astro-transition-fallback="old"][data-astro-transition-scope="astro-bbhp3f5g-3"] {
|
|
97
|
-
animation-duration: 180ms;
|
|
98
|
-
animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
|
|
99
|
-
animation-fill-mode: both;
|
|
100
|
-
animation-name: astroFadeOut; }[data-astro-transition-fallback="new"] [data-astro-transition-scope="astro-bbhp3f5g-3"],
|
|
101
|
-
[data-astro-transition-fallback="new"][data-astro-transition-scope="astro-bbhp3f5g-3"] {
|
|
102
|
-
animation-duration: 180ms;
|
|
103
|
-
animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
|
|
104
|
-
animation-fill-mode: both;
|
|
105
|
-
animation-name: astroFadeIn; }[data-astro-transition=back][data-astro-transition-fallback="old"] [data-astro-transition-scope="astro-bbhp3f5g-3"],
|
|
106
|
-
[data-astro-transition=back][data-astro-transition-fallback="old"][data-astro-transition-scope="astro-bbhp3f5g-3"] {
|
|
107
|
-
animation-duration: 180ms;
|
|
108
|
-
animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
|
|
109
|
-
animation-fill-mode: both;
|
|
110
|
-
animation-name: astroFadeOut; }[data-astro-transition=back][data-astro-transition-fallback="new"] [data-astro-transition-scope="astro-bbhp3f5g-3"],
|
|
111
|
-
[data-astro-transition=back][data-astro-transition-fallback="new"][data-astro-transition-scope="astro-bbhp3f5g-3"] {
|
|
112
|
-
animation-duration: 180ms;
|
|
113
|
-
animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
|
|
114
|
-
animation-fill-mode: both;
|
|
115
|
-
animation-name: astroFadeIn; }</style></head><body class="tw-body antialiased"><div class="tw-shell min-h-screen"><aside class="tw-nav-aside fixed inset-y-0 left-0 flex flex-col z-45" id="tw-nav-aside"><div class="tw-nav-brand"><div class="tw-nav-brand-row"><a href="/" class="tw-nav-brand-link min-w-0 flex-1"><span class="tw-nav-brand-mark" aria-hidden="true"><img class="tw-nav-brand-mark-img" src="/brand/brand-mark.png" alt="" width="36" height="36"></span><span class="tw-nav-brand-text"><span class="tw-nav-brand-title-row"><span class="tw-nav-brand-title" data-i18n="nav.brand">Lantern Harness</span><span class="tw-nav-brand-ver" data-hint="平台版本 v0.1.9">v0.1.9<span class="tw-nav-brand-dot" id="tw-update-dot" role="button" tabindex="-1" aria-label="有新版本可更新" hidden></span></span></span></span></a></div></div><div class="tw-nav-space-slot"><div class="tw-nav-space tw-nav-space-ph" id="tw-nav-space-ph" aria-hidden="true"><div class="tw-nav-space-ph-box"><span class="tw-nav-space-ph-ico"></span><span class="tw-nav-space-ph-lines"><span class="tw-nav-space-ph-bar is-cap"></span><span class="tw-nav-space-ph-bar is-name"></span></span></div></div><style>astro-island,astro-slot,astro-static-slot{display:contents}</style><script>(function(){let e=async e=>{await(await e())()};(self.Astro||(self.Astro={})).only=e,window.dispatchEvent(new Event(`astro:only`))})();</script><script>(function(){function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}function t(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}function n(n){var r=t(n,`string`);return e(r)==`symbol`?r:r+``}function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let i=/* @__PURE__ */ new Set([`__proto__`,`constructor`,`prototype`]);{let e={0:e=>a(e),1:e=>n(e),2:e=>new RegExp(e),3:e=>new Date(e),4:e=>new Map(n(e)),5:e=>new Set(n(e)),6:e=>BigInt(e),7:e=>new URL(e),8:e=>new Uint8Array(e),9:e=>new Uint16Array(e),10:e=>new Uint32Array(e),11:e=>1/0*e},t=t=>{let[n,r]=t;return n in e?e[n](r):void 0},n=e=>e.map(t),a=e=>typeof e!=`object`||!e?e:Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n)]));class o extends HTMLElement{constructor(...e){super(...e),r(this,`Component`,void 0),r(this,`hydrator`,void 0),r(this,`hydrate`,async()=>{var e;if(!this.hydrator||!this.isConnected)return;let t=(e=this.parentElement)==null?void 0:e.closest(`astro-island[ssr]`);if(t){t.addEventListener(`astro:hydrate`,this.hydrate,{once:!0});return}let n=this.querySelectorAll(`astro-slot`),r={},i=this.querySelectorAll(`template[data-astro-template]`);for(let e of i){let t=e.closest(this.tagName);t!=null&&t.isSameNode(this)&&(r[e.getAttribute(`data-astro-template`)||`default`]=e.innerHTML,e.remove())}for(let e of n){let t=e.closest(this.tagName);t!=null&&t.isSameNode(this)&&(r[e.getAttribute(`name`)||`default`]=e.innerHTML)}let o;try{o=this.hasAttribute(`props`)?a(JSON.parse(this.getAttribute(`props`))):{}}catch(e){let t=this.getAttribute(`component-url`)||`<unknown>`,n=this.getAttribute(`component-export`);throw n&&(t+=` (export ${n})`),console.error(`[hydrate] Error parsing props for component ${t}`,this.getAttribute(`props`),e),e}await this.hydrator(this)(this.Component,o,r,{client:this.getAttribute(`client`)}),this.removeAttribute(`ssr`),this.dispatchEvent(new CustomEvent(`astro:hydrate`))}),r(this,`unmount`,()=>{this.isConnected||this.dispatchEvent(new CustomEvent(`astro:unmount`))})}disconnectedCallback(){document.removeEventListener(`astro:after-swap`,this.unmount),document.addEventListener(`astro:after-swap`,this.unmount,{once:!0})}connectedCallback(){if(!this.hasAttribute(`await-children`)||document.readyState===`interactive`||document.readyState===`complete`)this.childrenConnectedCallback();else{let e=()=>{document.removeEventListener(`DOMContentLoaded`,e),t.disconnect(),this.childrenConnectedCallback()},t=new MutationObserver(()=>{var t;((t=this.lastChild)==null?void 0:t.nodeType)===Node.COMMENT_NODE&&this.lastChild.nodeValue===`astro:end`&&(this.lastChild.remove(),e())});t.observe(this,{childList:!0}),document.addEventListener(`DOMContentLoaded`,e)}}async childrenConnectedCallback(){let e=this.getAttribute(`before-hydration-url`);e&&await import(e),this.start()}getRetryImportUrl(e){let t=new URL(e,document.baseURI);return t.searchParams.set(`astro-retry`,Date.now().toString()),t.toString()}async importWithRetry(e){try{return await import(e)}catch(t){return await new Promise(e=>setTimeout(e,1e3)),import(this.getRetryImportUrl(e))}}handleHydrationError(e){let t=this.getAttribute(`component-url`),n=new CustomEvent(`astro:hydration-error`,{cancelable:!0,bubbles:!0,composed:!0,detail:{error:e,componentUrl:t}});this.dispatchEvent(n)&&console.error(`[astro-island] Error hydrating ${t}`,e)}async start(){let e=JSON.parse(this.getAttribute(`opts`)),t=this.getAttribute(`client`);if(Astro[t]===void 0)window.addEventListener(`astro:${t}`,()=>this.start(),{once:!0});else try{await Astro[t](async()=>{let e=this.getAttribute(`renderer-url`);try{let[t,{default:n}]=await Promise.all([this.importWithRetry(this.getAttribute(`component-url`)),e?this.importWithRetry(e):Promise.resolve({default:()=>()=>{}})]),r=this.getAttribute(`component-export`)||`default`;if(r.includes(`.`)){this.Component=t;for(let e of r.split(`.`)){if(i.has(e)||!this.Component||typeof this.Component!=`object`&&typeof this.Component!=`function`||!Object.hasOwn(this.Component,e))throw Error(`Invalid component export path: ${r}`);this.Component=this.Component[e]}}else{if(i.has(r))throw Error(`Invalid component export path: ${r}`);this.Component=t[r]}return this.hydrator=n,this.hydrate}catch(e){return this.handleHydrationError(e),()=>{}}},e,this)}catch(e){this.handleHydrationError(e)}}attributeChangedCallback(){this.hydrate()}}r(o,`observedAttributes`,[`props`]),customElements.get(`astro-island`)||customElements.define(`astro-island`,o)}})();</script><astro-island uid="2wH2Dz" component-url="/_astro/SpaceSwitcher.CI3KDBOA.js" component-export="default" renderer-url="/_astro/client.Be_SakrB.js" props="{"data-astro-transition-persist":[0,"astro-gyrtbwwo-1"]}" ssr client="only" opts="{"name":"SpaceSwitcher","value":"react"}" data-astro-transition-persist="astro-gyrtbwwo-1"></astro-island></div><button type="button" id="tw-nav-toggle" class="tw-nav-toggle" aria-label="收起或展开左侧导航" aria-expanded="true" aria-controls="tw-nav-aside"><svg class="tw-nav-toggle-icon is-collapse" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 6l-6 6 6 6"></path></svg><svg class="tw-nav-toggle-icon is-expand" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 6l6 6-6 6"></path></svg></button><nav class="tw-nav-list flex-1 overflow-y-auto"><a href="/" class="tw-nav-item" data-i18n-hint="nav.home" data-hint="我的工作台"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M3 10.5 12 3l9 7.5"></path><path d="M5 9.5V20h14V9.5"></path></svg><span class="tw-nav-label" data-i18n="nav.home">我的工作台</span></a><div class="tw-nav-libraries"><div class="tw-nav-libraries-ph"><a href="/dashboard/" class="tw-nav-item" data-plugin-nav="dashboard"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><rect x="3" y="3" width="7" height="7" rx="1.5"></rect><rect x="14" y="3" width="7" height="7" rx="1.5"></rect><rect x="3" y="14" width="7" height="7" rx="1.5"></rect><rect x="14" y="14" width="7" height="7" rx="1.5"></rect></svg><span class="tw-nav-label" data-i18n="nav.dashboard">仪表盘</span></a><a href="/tasks/" class="tw-nav-item" data-plugin-nav="tasks"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M9 5h10"></path><path d="M9 12h10"></path><path d="M9 19h10"></path><path d="M4 5h.01"></path><path d="M4 12h.01"></path><path d="M4 19h.01"></path></svg><span class="tw-nav-label" data-i18n="nav.tasks">任务管理</span></a><a href="/todos/" class="tw-nav-item" data-plugin-nav="todos"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M8 6h13"></path><path d="M8 12h13"></path><path d="M8 18h13"></path><path d="M3 6h.01"></path><path d="M3 12h.01"></path><path d="M3 18h.01"></path></svg><span class="tw-nav-label" data-i18n="nav.todos">待办事项</span></a><a href="/pm/projects/" class="tw-nav-item" data-plugin-nav="projects"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7z"></path></svg><span class="tw-nav-label" data-i18n="nav.projects">项目列表</span></a><a href="/pm/iterations/" class="tw-nav-item" data-plugin-nav="iterations"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><rect x="3" y="5" width="18" height="16" rx="2"></rect><path d="M8 3v4"></path><path d="M16 3v4"></path><path d="M3 10h18"></path></svg><span class="tw-nav-label" data-i18n="nav.iterations">迭代管理</span></a><a href="/pm/requirements/" class="tw-nav-item" data-plugin-nav="pmRequirements"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M14 3v5h5"></path><path d="M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z"></path><path d="M8 13h8"></path><path d="M8 17h5"></path></svg><span class="tw-nav-label" data-i18n="nav.requirementsMgmt">需求管理</span></a><a href="/pm/bugs/" class="tw-nav-item" data-plugin-nav="bugs"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><circle cx="12" cy="14" r="5"></circle><path d="M9 6l2 2"></path><path d="M15 6l-2 2"></path><path d="M7 11H4"></path><path d="M20 11h-3"></path><path d="M7 17H4"></path><path d="M20 17h-3"></path></svg><span class="tw-nav-label" data-i18n="nav.bugs">缺陷管理</span></a><a href="/reports/" class="tw-nav-item" data-plugin-nav="reports"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M14 3v5h5"></path><path d="M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z"></path><path d="M8 13h8"></path><path d="M8 17h5"></path></svg><span class="tw-nav-label" data-i18n="nav.reports">工作汇报</span></a><a href="/test-stats/" class="tw-nav-item" data-plugin-nav="testStats"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M4 20V10"></path><path d="M10 20V4"></path><path d="M16 20v-7"></path><path d="M22 20H2"></path></svg><span class="tw-nav-label" data-i18n="nav.testStats">测试统计</span></a><a href="/case-exec/" class="tw-nav-item" data-plugin-nav="caseExec"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><circle cx="12" cy="12" r="9"></circle><circle cx="12" cy="12" r="5"></circle><circle cx="12" cy="12" r="1.4"></circle></svg><span class="tw-nav-label" data-i18n="nav.caseExec">用例执行统计</span></a><a href="/cases/library/" class="tw-nav-item" data-plugin-nav="cases"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M9 11l3 3L22 4"></path><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path></svg><span class="tw-nav-label" data-i18n="nav.caseManage">用例管理</span></a><a href="/knowledge/" class="tw-nav-item" data-plugin-nav="knowledgeLib"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg><span class="tw-nav-label" data-i18n="nav.knowledge">知识库管理</span></a><a href="/requirements/" class="tw-nav-item" data-plugin-nav="requirements" data-i18n-hint="nav.requirements"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M14 3v5h5"></path><path d="M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z"></path><path d="M8 13h8"></path><path d="M8 17h6"></path></svg><span class="tw-nav-label" data-i18n="nav.requirements">需求文档库</span></a><a href="/templates/" class="tw-nav-item" data-plugin-nav="templates" data-i18n-hint="nav.templates"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M12 3 3 8l9 5 9-5-9-5z"></path><path d="m3 13 9 5 9-5"></path></svg><span class="tw-nav-label" data-i18n="nav.templates">测试模板库</span></a></div><astro-island uid="Z1lgSd4" component-url="/_astro/NavLibraries.DmD2lZBZ.js" component-export="default" renderer-url="/_astro/client.Be_SakrB.js" props="{"data-astro-transition-persist":[0,"astro-iywf7oe7-2"]}" ssr client="only" opts="{"name":"NavLibraries","value":"react"}" data-astro-transition-persist="astro-iywf7oe7-2"></astro-island></div><a href="/prompts/" class="tw-nav-item" data-plugin-nav="prompts" data-pinned-nav="prompts"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M12 20h9"></path><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"></path></svg><span class="tw-nav-label" data-i18n="nav.prompts">提示词管理</span></a><a href="/docs/manual/" class="tw-nav-item" data-hint="帮助中心" data-i18n-hint="nav.helpCenter"><svg class="tw-nav-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="M5 4.5h9.5L19 9v10.5H5V4.5Z" stroke-linejoin="round"></path><path d="M14.5 4.5V9H19" stroke-linejoin="round"></path><path d="M8 13h8M8 16.5h6" stroke-linecap="round"></path></svg><span class="tw-nav-label" data-i18n="nav.helpCenter">帮助中心</span></a></nav><div class="tw-nav-foot"><script>(function(){let e=async e=>{await(await e())()};(self.Astro||(self.Astro={})).load=e,window.dispatchEvent(new Event(`astro:load`))})();</script><astro-island uid="Z12jkyC" prefix="r1" component-url="/_astro/SettingsDialog.Dc-9QNJI.js" component-export="default" renderer-url="/_astro/client.Be_SakrB.js" props="{}" ssr client="load" opts="{"name":"SettingsDialog","value":true}" await-children><div class="tw-nav-foot-row"><button type="button" class="tw-nav-settings-btn" data-hint="设置"><svg class="tw-nav-ico w-4.5 h-4.5 shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9c.2.6.7 1 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"></path></svg><span data-i18n="nav.settings">设置</span></button><button type="button" class="tw-nav-provider-chip is-empty" data-hint="未配置模型"><span class="tw-nav-provider-dot" aria-hidden="true"></span><span class="tw-nav-provider-name">未配置</span></button></div><span hidden="" style="position:fixed;top:1px;left:1px;width:1px;height:0;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;display:none"></span><!--astro:end--></astro-island></div></aside><script data-astro-rerun>
|
|
116
|
-
(function () {
|
|
117
|
-
var root = document.documentElement;
|
|
118
|
-
var btn = document.getElementById('tw-nav-toggle');
|
|
119
|
-
function apply(collapsed) {
|
|
120
|
-
if (collapsed) root.dataset.navCollapsed = '1';
|
|
121
|
-
else delete root.dataset.navCollapsed;
|
|
122
|
-
try {
|
|
123
|
-
localStorage.setItem('tw.nav.collapsed', collapsed ? '1' : '0');
|
|
124
|
-
} catch (e) {}
|
|
125
|
-
if (btn) {
|
|
126
|
-
btn.setAttribute('aria-expanded', collapsed ? 'false' : 'true');
|
|
127
|
-
// 气泡已移除;改为动态更新不可见标签,读屏仍能获知当前动作
|
|
128
|
-
btn.setAttribute('aria-label', collapsed ? '展开导航' : '收起导航');
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
apply(root.dataset.navCollapsed === '1');
|
|
132
|
-
if (btn) {
|
|
133
|
-
btn.addEventListener('click', function () {
|
|
134
|
-
apply(root.dataset.navCollapsed !== '1');
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
try {
|
|
139
|
-
var raw = localStorage.getItem('tw.app.config.v1');
|
|
140
|
-
if (!raw) return;
|
|
141
|
-
var g = JSON.parse(raw).general || {};
|
|
142
|
-
if (g.language !== 'en') return;
|
|
143
|
-
var en = {
|
|
144
|
-
'nav.brand': 'Lantern Harness',
|
|
145
|
-
'nav.home': 'My Workbench',
|
|
146
|
-
'nav.dashboard': 'Dashboard',
|
|
147
|
-
'nav.tasks': 'Tasks',
|
|
148
|
-
'nav.todos': 'Todos',
|
|
149
|
-
'nav.projects': 'Projects',
|
|
150
|
-
'nav.iterations': 'Iterations',
|
|
151
|
-
'nav.requirementsMgmt': 'Requirements Mgmt',
|
|
152
|
-
'nav.bugs': 'Bugs',
|
|
153
|
-
'nav.reports': 'Work Report',
|
|
154
|
-
'nav.testStats': 'Test Statistics',
|
|
155
|
-
'nav.caseExec': 'Case Execution',
|
|
156
|
-
'nav.caseManage': 'Test Cases',
|
|
157
|
-
'nav.prompts': 'Prompts',
|
|
158
|
-
'nav.knowledge': 'Knowledge Mgmt',
|
|
159
|
-
'nav.plugins': 'My Plugins',
|
|
160
|
-
'nav.docs': 'Documents',
|
|
161
|
-
'nav.requirements': 'Requirements',
|
|
162
|
-
'nav.templates': 'Test Templates',
|
|
163
|
-
'nav.settings': 'Settings',
|
|
164
|
-
'nav.changelog': 'Changelog',
|
|
165
|
-
'nav.changelogShort': 'Changelog',
|
|
166
|
-
'nav.helpCenter': 'Help Center',
|
|
167
|
-
'docs.nav.title': 'Docs',
|
|
168
|
-
'docs.nav.changelog': 'Changelog',
|
|
169
|
-
'docs.nav.manual': 'User Guide',
|
|
170
|
-
'docs.nav.install': 'Install Guide',
|
|
171
|
-
'nav.repo': 'GitHub',
|
|
172
|
-
'nav.repoShort': 'Repo',
|
|
173
|
-
'nav.npm': 'npm package',
|
|
174
|
-
'nav.npmShort': 'npm',
|
|
175
|
-
'nav.site': 'Yycy Docs',
|
|
176
|
-
'nav.siteShort': 'Site',
|
|
177
|
-
'nav.board': 'Questions & suggestions',
|
|
178
|
-
'nav.boardShort': 'Suggestions',
|
|
179
|
-
};
|
|
180
|
-
document.querySelectorAll('[data-i18n]').forEach(function (el) {
|
|
181
|
-
var key = el.getAttribute('data-i18n');
|
|
182
|
-
if (key && en[key]) el.textContent = en[key];
|
|
183
|
-
});
|
|
184
|
-
document.querySelectorAll('[data-i18n-hint]').forEach(function (el) {
|
|
185
|
-
var key = el.getAttribute('data-i18n-hint');
|
|
186
|
-
if (key && en[key]) el.setAttribute('data-hint', en[key]);
|
|
187
|
-
});
|
|
188
|
-
} catch (e) {}
|
|
189
|
-
})();
|
|
190
|
-
</script><main data-astro-transition-scope="astro-bbhp3f5g-3" class="tw-main min-h-screen"><div id="tw-route-loading" class="tw-route-loading is-hidden" role="status" aria-live="polite" aria-label="页面加载中"><span class="tw-route-loading-spin" aria-hidden="true"></span></div><div class="tw-library-page tw-library-wide px-8 py-8"><header class="mb-5 flex shrink-0 items-start gap-3"><span class="tw-pm-page-ico" aria-hidden="true"><svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M4 6.5h16v11H4Z"></path><path d="m7.5 10 2.5 2-2.5 2"></path><path d="M12.5 14h3.5"></path></svg></span><div class="min-w-0"><h1 class="text-lg font-semibold text-stone-800">自动化测试</h1><p class="mt-0.5 text-xs leading-relaxed text-stone-400">挂载已有的 Playwright 项目:运行 / 停止用例、实时看日志、查看 HTML 报告,并只读浏览项目目录。执行目标项目自己的 Playwright,不自动安装依赖。</p></div></header><astro-island uid="Z1FkwIF" component-url="/_astro/UiAutoBoard.BKp9ifxg.js" component-export="default" renderer-url="/_astro/client.Be_SakrB.js" props="{}" ssr client="only" opts="{"name":"UiAutoBoard","value":"react"}"></astro-island></div></main></div><script>
|
|
191
|
-
(function () {
|
|
192
|
-
/**
|
|
193
|
-
* 切页滚回顶部。
|
|
194
|
-
* 只在「换页后」重置:若在 before-preparation(点击瞬间)就重置,
|
|
195
|
-
* 当前页面会先跳回顶部、再等新页到达,用户看到的就是「打开时还在滚动」。
|
|
196
|
-
* 带锚点(#)时交给浏览器定位,不强制回顶。
|
|
197
|
-
*/
|
|
198
|
-
try {
|
|
199
|
-
if ('scrollRestoration' in history) history.scrollRestoration = 'manual';
|
|
200
|
-
} catch (e) {}
|
|
201
|
-
function twScrollTop() {
|
|
202
|
-
if (location.hash) return;
|
|
203
|
-
if (window.scrollY === 0 && document.documentElement.scrollTop === 0) return;
|
|
204
|
-
try {
|
|
205
|
-
// instant:不受将来可能加入的 scroll-behavior: smooth 影响
|
|
206
|
-
window.scrollTo({ top: 0, left: 0, behavior: 'instant' });
|
|
207
|
-
} catch (e) {
|
|
208
|
-
// 旧浏览器不认 instant,会抛 TypeError,退回普通写法
|
|
209
|
-
window.scrollTo(0, 0);
|
|
210
|
-
}
|
|
211
|
-
document.documentElement.scrollTop = 0;
|
|
212
|
-
document.body.scrollTop = 0;
|
|
213
|
-
var main = document.querySelector('.tw-main');
|
|
214
|
-
if (main) main.scrollTop = 0;
|
|
215
|
-
}
|
|
216
|
-
document.addEventListener('astro:after-swap', twScrollTop);
|
|
217
|
-
document.addEventListener('astro:page-load', twScrollTop);
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* 软导航「闪白」修复。
|
|
221
|
-
* ClientRouter 交换文档时,会用新文档 <html> 的属性整体替换当前 <html>,
|
|
222
|
-
* 于是 data-theme 连同 style 里的 color-scheme 一起被清空;在主题属性
|
|
223
|
-
* 恢复之前,color-scheme 回落到 normal,画布变白 —— 深色主题下就是
|
|
224
|
-
* 切页瞬间的闪白(与具体页面无关,所有路由都受影响)。
|
|
225
|
-
* 在交换前把主题 / 语言写进新文档的 <html>,交换完成时即已带上,不留空档。
|
|
226
|
-
*/
|
|
227
|
-
document.addEventListener('astro:before-swap', function (e) {
|
|
228
|
-
var next = e.newDocument;
|
|
229
|
-
if (!next || !next.documentElement) return;
|
|
230
|
-
var cur = document.documentElement;
|
|
231
|
-
var nextRoot = next.documentElement;
|
|
232
|
-
var theme = cur.dataset.theme;
|
|
233
|
-
if (theme) {
|
|
234
|
-
nextRoot.dataset.theme = theme;
|
|
235
|
-
nextRoot.style.colorScheme = theme;
|
|
236
|
-
}
|
|
237
|
-
if (cur.lang) nextRoot.lang = cur.lang;
|
|
238
|
-
// 新文档是「解析」出来的:head 里的内联脚本在解析阶段不会执行,
|
|
239
|
-
// 于是所有运行期写在 <html> 上的状态都不会自带。主题 / 语言之外,
|
|
240
|
-
// 侧栏收起状态与空间服务可用性同样要显式搬过去,否则每次软导航都会丢
|
|
241
|
-
// (表现为侧栏自己弹开、骨架又冒出来)。
|
|
242
|
-
if (cur.dataset.navCollapsed === '1') nextRoot.dataset.navCollapsed = '1';
|
|
243
|
-
if (cur.dataset.spaceService) nextRoot.dataset.spaceService = cur.dataset.spaceService;
|
|
244
|
-
// 插件开关同理:不搬过去会先亮出被隐藏的侧栏入口,等 page-load 再收起
|
|
245
|
-
[
|
|
246
|
-
'pluginOffTasks',
|
|
247
|
-
'pluginOffTodos',
|
|
248
|
-
'pluginOffProjects',
|
|
249
|
-
'pluginOffIterations',
|
|
250
|
-
'pluginOffPmRequirements',
|
|
251
|
-
'pluginOffBugs',
|
|
252
|
-
'pluginOffReports',
|
|
253
|
-
'pluginOffTestStats',
|
|
254
|
-
'pluginOffCaseExec',
|
|
255
|
-
'pluginOffDashboard',
|
|
256
|
-
'pluginOffCases',
|
|
257
|
-
'pluginOffKnowledgeLib',
|
|
258
|
-
'pluginOffRequirements',
|
|
259
|
-
'pluginOffTemplates',
|
|
260
|
-
].forEach(function (key) {
|
|
261
|
-
if (cur.dataset[key]) nextRoot.dataset[key] = cur.dataset[key];
|
|
262
|
-
});
|
|
263
|
-
});
|
|
264
|
-
|
|
265
|
-
/** 版本日志「查看更多」:委托绑定,兼容 View Transitions 软导航 */
|
|
266
|
-
document.addEventListener('click', function (e) {
|
|
267
|
-
var t = e.target;
|
|
268
|
-
if (!(t instanceof Element)) return;
|
|
269
|
-
var btn = t.closest('.tw-changelog-toggle');
|
|
270
|
-
if (!(btn instanceof HTMLButtonElement)) return;
|
|
271
|
-
var card = btn.closest('.tw-changelog-card');
|
|
272
|
-
if (!(card instanceof HTMLElement)) return;
|
|
273
|
-
e.preventDefault();
|
|
274
|
-
var next = card.getAttribute('data-open') !== 'true';
|
|
275
|
-
card.setAttribute('data-open', next ? 'true' : 'false');
|
|
276
|
-
btn.setAttribute('aria-expanded', next ? 'true' : 'false');
|
|
277
|
-
var label = btn.querySelector('.tw-changelog-toggle-label');
|
|
278
|
-
if (label) label.textContent = next ? '收起' : '查看更多';
|
|
279
|
-
});
|
|
280
|
-
})();
|
|
281
|
-
</script></body></html>
|