sqlmesh 0.181.2.dev24__py3-none-any.whl → 0.181.2.dev25__py3-none-any.whl
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.
- sqlmesh/_version.py +2 -2
- {sqlmesh-0.181.2.dev24.dist-info → sqlmesh-0.181.2.dev25.dist-info}/METADATA +1 -1
- {sqlmesh-0.181.2.dev24.dist-info → sqlmesh-0.181.2.dev25.dist-info}/RECORD +50 -50
- web/client/dist/assets/{Audits-7rP8WdsD.js → Audits-9LEBiRIZ.js} +1 -1
- web/client/dist/assets/{Banner-jMPu9_jP.js → Banner-Cd1C5Udq.js} +1 -1
- web/client/dist/assets/{ChevronDownIcon-BZk6URUK.js → ChevronDownIcon-Clb0EegJ.js} +1 -1
- web/client/dist/assets/{ChevronRightIcon-Ctcbr61G.js → ChevronRightIcon-dJMaxBt0.js} +1 -1
- web/client/dist/assets/{Content-DITnFT31.js → Content-BR4S-QHM.js} +1 -1
- web/client/dist/assets/{Content-C43kcRta.js → Content-poZFtj-2.js} +1 -1
- web/client/dist/assets/{Data-B5q1KzIa.js → Data-DaQiUe8h.js} +1 -1
- web/client/dist/assets/{DataCatalog-BRzSrlJL.js → DataCatalog-DOMFDv-k.js} +1 -1
- web/client/dist/assets/{Editor-7muj9lbw.js → Editor-BcrLy189.js} +1 -1
- web/client/dist/assets/{Editor-CAMzYH0x.js → Editor-BmDyTaeT.js} +1 -1
- web/client/dist/assets/{Errors-Bbd2EOQg.js → Errors-Cjh1BMUt.js} +1 -1
- web/client/dist/assets/FileExplorer-Cdh0DRgS.js +2 -0
- web/client/dist/assets/{Footer-Cnu_IoqE.js → Footer-CrjZJkj4.js} +1 -1
- web/client/dist/assets/{Header-NJkxh8bb.js → Header-DE3bKMcG.js} +1 -1
- web/client/dist/assets/Input-BY5Rc3go.js +41 -0
- web/client/dist/assets/Lineage-CLoHrLAT.js +1 -0
- web/client/dist/assets/{ListboxShow-CwgOYGSe.js → ListboxShow-TFvq9fMB.js} +1 -1
- web/client/dist/assets/{ModelLineage-Bnes5PV4.js → ModelLineage-CB8Rie_r.js} +1 -1
- web/client/dist/assets/{Models-B_sukTY5.js → Models-DXUrmUm_.js} +1 -1
- web/client/dist/assets/{Page-DxTzPmYT.js → Page-KC6UG65M.js} +1 -1
- web/client/dist/assets/{Plan-B2b637kI.js → Plan-xbMFAnVh.js} +1 -1
- web/client/dist/assets/{PlusCircleIcon-FgfUjgrM.js → PlusCircleIcon-CoFMRFQI.js} +1 -1
- web/client/dist/assets/{ReportErrors-xnNgNULg.js → ReportErrors-mVM8O5iE.js} +1 -1
- web/client/dist/assets/{Root-BMcIwqdc.js → Root-BuQJ2VAg.js} +1 -1
- web/client/dist/assets/{SearchList-9n_6_E0k.js → SearchList-BShQn9jm.js} +1 -1
- web/client/dist/assets/{SelectEnvironment-DC6x26Ax.js → SelectEnvironment-8p6ZQ-QH.js} +1 -1
- web/client/dist/assets/{SourceList-Chz492Ne.js → SourceList-DQ72TcK1.js} +1 -1
- web/client/dist/assets/{SourceListItem-DIieM0S_.js → SourceListItem-CncMnWed.js} +1 -1
- web/client/dist/assets/{SplitPane-CmzNrZQN.js → SplitPane-BY85POxQ.js} +1 -1
- web/client/dist/assets/{Tests-DbVFKqeG.js → Tests-DeaITzzp.js} +1 -1
- web/client/dist/assets/{Welcome-DxKW_LKA.js → Welcome-Blok6Zy8.js} +1 -1
- web/client/dist/assets/{context-CzM900aY.js → context-B3nwRpP1.js} +1 -1
- web/client/dist/assets/{context-DhymIb_N.js → context-Dx2o1ZRq.js} +37 -37
- web/client/dist/assets/{editor-Bf9rhumO.js → editor-Dj_6cws7.js} +1 -1
- web/client/dist/assets/{file-CcK5Oobc.js → file-Bs2Eq56_.js} +1 -1
- web/client/dist/assets/{help-DtLmoC0U.js → help-Bolb6haG.js} +1 -1
- web/client/dist/assets/index-COQuzlwN.js +1 -0
- web/client/dist/assets/{index-KZcJd7F1.js → index-CkIQhGgw.js} +1 -1
- web/client/dist/assets/{index-CLuHMKlN.js → index-DQbKL5-Q.js} +1 -1
- web/client/dist/assets/{plan-e4fPD47J.js → plan-BZyi7OFv.js} +1 -1
- web/client/dist/assets/{project-CjyecwCx.js → project-XFpF0AcJ.js} +1 -1
- web/client/dist/assets/{transition-C8EjNcgL.js → transition-B5aHgz_j.js} +1 -1
- web/client/dist/index.html +1 -1
- web/client/dist/assets/FileExplorer-DMR02idl.js +0 -5
- web/client/dist/assets/Input-CYm3h-zG.js +0 -41
- web/client/dist/assets/Lineage-HZl7aUI5.js +0 -1
- web/client/dist/assets/index-BdXOfeCo.js +0 -1
- {sqlmesh-0.181.2.dev24.dist-info → sqlmesh-0.181.2.dev25.dist-info}/WHEEL +0 -0
- {sqlmesh-0.181.2.dev24.dist-info → sqlmesh-0.181.2.dev25.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.181.2.dev24.dist-info → sqlmesh-0.181.2.dev25.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.181.2.dev24.dist-info → sqlmesh-0.181.2.dev25.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import{r as a,R as ce,j as S,b as Tr,c as me,f as hn,au as pe,av as vn,aw as Or,m as Q,i as Ut}from"./index-CkIQhGgw.js";import{r as ot,R as Ir}from"./index-COQuzlwN.js";function Nr({title:e,titleId:t,...n},r){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"}))}const Mr=a.forwardRef(Nr);function Lr({title:e,titleId:t,...n},r){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))}const Dr=a.forwardRef(Lr);function _r({title:e,titleId:t,...n},r){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const kr=a.forwardRef(_r);function jr({title:e,titleId:t,...n},r){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z",clipRule:"evenodd"}))}const Fr=a.forwardRef(jr),Br=ce.forwardRef(function({type:t="text",value:n,placeholder:r,className:o,disabled:i=!1,autoFocus:c=!1,onInput:s,onKeyDown:l},u){return n=n??"",S.jsx("input",{ref:u,className:me("placeholder:text-neutral-300 dark:placeholder:text-neutral-700",i&&"opacity-50 cursor-not-allowed",o),type:t,value:n,placeholder:r,disabled:i,autoFocus:c,readOnly:Tr(!!s),onInput:s,onKeyDown:l})});function zt(e,[t,n]){return Math.min(n,Math.max(t,e))}function z(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Mt(e,t=[]){let n=[];function r(i,c){const s=a.createContext(c),l=n.length;n=[...n,c];const u=p=>{var w;const{scope:h,children:v,...x}=p,f=((w=h==null?void 0:h[e])==null?void 0:w[l])||s,m=a.useMemo(()=>x,Object.values(x));return S.jsx(f.Provider,{value:m,children:v})};u.displayName=i+"Provider";function d(p,h){var f;const v=((f=h==null?void 0:h[e])==null?void 0:f[l])||s,x=a.useContext(v);if(x)return x;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(c=>a.createContext(c));return function(s){const l=(s==null?void 0:s[e])||i;return a.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,Wr(o,...t)]}function Wr(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const c=r.reduce((s,{useScope:l,scopeName:u})=>{const p=l(i)[`__scope${u}`];return{...s,...p}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function Kt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Hr(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Kt(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Kt(e[o],null)}}}}function K(...e){return a.useCallback(Hr(...e),e)}function Qe(e){const t=Vr(e),n=a.forwardRef((r,o)=>{const{children:i,...c}=r,s=a.Children.toArray(i),l=s.find(Ur);if(l){const u=l.props.children,d=s.map(p=>p===l?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:p);return S.jsx(t,{...c,ref:o,children:a.isValidElement(u)?a.cloneElement(u,void 0,d):null})}return S.jsx(t,{...c,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Vr(e){const t=a.forwardRef((n,r)=>{const{children:o,...i}=n,c=a.isValidElement(o)?Kr(o):void 0,s=K(c,r);if(a.isValidElement(o)){const l=zr(i,o.props);return o.type!==a.Fragment&&(l.ref=s),a.cloneElement(o,l)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $r=Symbol("radix.slottable");function Ur(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$r}function zr(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Kr(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Yr(e){const t=e+"CollectionProvider",[n,r]=Mt(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=f=>{const{scope:m,children:w}=f,g=ce.useRef(null),y=ce.useRef(new Map).current;return S.jsx(o,{scope:m,itemMap:y,collectionRef:g,children:w})};c.displayName=t;const s=e+"CollectionSlot",l=Qe(s),u=ce.forwardRef((f,m)=>{const{scope:w,children:g}=f,y=i(s,w),b=K(m,y.collectionRef);return S.jsx(l,{ref:b,children:g})});u.displayName=s;const d=e+"CollectionItemSlot",p="data-radix-collection-item",h=Qe(d),v=ce.forwardRef((f,m)=>{const{scope:w,children:g,...y}=f,b=ce.useRef(null),C=K(m,b),R=i(d,w);return ce.useEffect(()=>(R.itemMap.set(b,{ref:b,...y}),()=>void R.itemMap.delete(b))),S.jsx(h,{[p]:"",ref:C,children:g})});v.displayName=d;function x(f){const m=i(e+"CollectionConsumer",f);return ce.useCallback(()=>{const g=m.collectionRef.current;if(!g)return[];const y=Array.from(g.querySelectorAll(`[${p}]`));return Array.from(m.itemMap.values()).sort((R,E)=>y.indexOf(R.ref.current)-y.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:c,Slot:u,ItemSlot:v},x,r]}var Xr=a.createContext(void 0);function Zr(e){const t=a.useContext(Xr);return e||t||"ltr"}var Gr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],U=Gr.reduce((e,t)=>{const n=Qe(`Primitive.${t}`),r=a.forwardRef((o,i)=>{const{asChild:c,...s}=o,l=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(l,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qr(e,t){e&&ot.flushSync(()=>e.dispatchEvent(t))}function xe(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Qr(e,t=globalThis==null?void 0:globalThis.document){const n=xe(e);a.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Jr="DismissableLayer",bt="dismissableLayer.update",eo="dismissableLayer.pointerDownOutside",to="dismissableLayer.focusOutside",Yt,gn=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wn=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:c,onDismiss:s,...l}=e,u=a.useContext(gn),[d,p]=a.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=a.useState({}),x=K(t,E=>p(E)),f=Array.from(u.layers),[m]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=f.indexOf(m),g=d?f.indexOf(d):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,b=g>=w,C=oo(E=>{const T=E.target,N=[...u.branches].some(I=>I.contains(T));!b||N||(o==null||o(E),c==null||c(E),E.defaultPrevented||s==null||s())},h),R=io(E=>{const T=E.target;[...u.branches].some(I=>I.contains(T))||(i==null||i(E),c==null||c(E),E.defaultPrevented||s==null||s())},h);return Qr(E=>{g===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&s&&(E.preventDefault(),s()))},h),a.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Yt=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Xt(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Yt)}},[d,h,n,u]),a.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Xt())},[d,u]),a.useEffect(()=>{const E=()=>v({});return document.addEventListener(bt,E),()=>document.removeEventListener(bt,E)},[]),S.jsx(U.div,{...l,ref:x,style:{pointerEvents:y?b?"auto":"none":void 0,...e.style},onFocusCapture:z(e.onFocusCapture,R.onFocusCapture),onBlurCapture:z(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:z(e.onPointerDownCapture,C.onPointerDownCapture)})});wn.displayName=Jr;var no="DismissableLayerBranch",ro=a.forwardRef((e,t)=>{const n=a.useContext(gn),r=a.useRef(null),o=K(t,r);return a.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),S.jsx(U.div,{...e,ref:o})});ro.displayName=no;function oo(e,t=globalThis==null?void 0:globalThis.document){const n=xe(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){yn(eo,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function io(e,t=globalThis==null?void 0:globalThis.document){const n=xe(e),r=a.useRef(!1);return a.useEffect(()=>{const o=i=>{i.target&&!r.current&&yn(to,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Xt(){const e=new CustomEvent(bt);document.dispatchEvent(e)}function yn(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?qr(o,i):o.dispatchEvent(i)}var pt=0;function so(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Zt()),document.body.insertAdjacentElement("beforeend",e[1]??Zt()),pt++,()=>{pt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),pt--}},[])}function Zt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var mt="focusScope.autoFocusOnMount",ht="focusScope.autoFocusOnUnmount",Gt={bubbles:!1,cancelable:!0},co="FocusScope",xn=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...c}=e,[s,l]=a.useState(null),u=xe(o),d=xe(i),p=a.useRef(null),h=K(t,f=>l(f)),v=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let f=function(y){if(v.paused||!s)return;const b=y.target;s.contains(b)?p.current=b:de(p.current,{select:!0})},m=function(y){if(v.paused||!s)return;const b=y.relatedTarget;b!==null&&(s.contains(b)||de(p.current,{select:!0}))},w=function(y){if(document.activeElement===document.body)for(const C of y)C.removedNodes.length>0&&de(s)};document.addEventListener("focusin",f),document.addEventListener("focusout",m);const g=new MutationObserver(w);return s&&g.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",m),g.disconnect()}}},[r,s,v.paused]),a.useEffect(()=>{if(s){Qt.add(v);const f=document.activeElement;if(!s.contains(f)){const w=new CustomEvent(mt,Gt);s.addEventListener(mt,u),s.dispatchEvent(w),w.defaultPrevented||(ao(mo(Sn(s)),{select:!0}),document.activeElement===f&&de(s))}return()=>{s.removeEventListener(mt,u),setTimeout(()=>{const w=new CustomEvent(ht,Gt);s.addEventListener(ht,d),s.dispatchEvent(w),w.defaultPrevented||de(f??document.body,{select:!0}),s.removeEventListener(ht,d),Qt.remove(v)},0)}}},[s,u,d,v]);const x=a.useCallback(f=>{if(!n&&!r||v.paused)return;const m=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,w=document.activeElement;if(m&&w){const g=f.currentTarget,[y,b]=lo(g);y&&b?!f.shiftKey&&w===b?(f.preventDefault(),n&&de(y,{select:!0})):f.shiftKey&&w===y&&(f.preventDefault(),n&&de(b,{select:!0})):w===g&&f.preventDefault()}},[n,r,v.paused]);return S.jsx(U.div,{tabIndex:-1,...c,ref:h,onKeyDown:x})});xn.displayName=co;function ao(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(de(r,{select:t}),document.activeElement!==n)return}function lo(e){const t=Sn(e),n=qt(t,e),r=qt(t.reverse(),e);return[n,r]}function Sn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function qt(e,t){for(const n of e)if(!uo(n,{upTo:t}))return n}function uo(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function fo(e){return e instanceof HTMLInputElement&&"select"in e}function de(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fo(e)&&t&&e.select()}}var Qt=po();function po(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Jt(e,t),e.unshift(t)},remove(t){var n;e=Jt(e,t),(n=e[0])==null||n.resume()}}}function Jt(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function mo(e){return e.filter(t=>t.tagName!=="A")}var X=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},ho=hn[" useId ".trim().toString()]||(()=>{}),vo=0;function Lt(e){const[t,n]=a.useState(ho());return X(()=>{n(r=>r??String(vo++))},[e]),t?`radix-${t}`:""}const go=["top","right","bottom","left"],he=Math.min,G=Math.max,Je=Math.round,Ue=Math.floor,oe=e=>({x:e,y:e}),wo={left:"right",right:"left",bottom:"top",top:"bottom"},yo={start:"end",end:"start"};function Ct(e,t,n){return G(e,he(t,n))}function le(e,t){return typeof e=="function"?e(t):e}function ue(e){return e.split("-")[0]}function Ne(e){return e.split("-")[1]}function Dt(e){return e==="x"?"y":"x"}function _t(e){return e==="y"?"height":"width"}function ae(e){return["top","bottom"].includes(ue(e))?"y":"x"}function kt(e){return Dt(ae(e))}function xo(e,t,n){n===void 0&&(n=!1);const r=Ne(e),o=kt(e),i=_t(o);let c=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(c=et(c)),[c,et(c)]}function So(e){const t=et(e);return[Et(e),t,Et(t)]}function Et(e){return e.replace(/start|end/g,t=>yo[t])}function bo(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],c=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:c;default:return[]}}function Co(e,t,n,r){const o=Ne(e);let i=bo(ue(e),n==="start",r);return o&&(i=i.map(c=>c+"-"+o),t&&(i=i.concat(i.map(Et)))),i}function et(e){return e.replace(/left|right|bottom|top/g,t=>wo[t])}function Eo(e){return{top:0,right:0,bottom:0,left:0,...e}}function bn(e){return typeof e!="number"?Eo(e):{top:e,right:e,bottom:e,left:e}}function tt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function en(e,t,n){let{reference:r,floating:o}=e;const i=ae(t),c=kt(t),s=_t(c),l=ue(t),u=i==="y",d=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let v;switch(l){case"top":v={x:d,y:r.y-o.height};break;case"bottom":v={x:d,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-o.width,y:p};break;default:v={x:r.x,y:r.y}}switch(Ne(t)){case"start":v[c]-=h*(n&&u?-1:1);break;case"end":v[c]+=h*(n&&u?-1:1);break}return v}const Ro=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:c}=n,s=i.filter(Boolean),l=await(c.isRTL==null?void 0:c.isRTL(t));let u=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:p}=en(u,r,l),h=r,v={},x=0;for(let f=0;f<s.length;f++){const{name:m,fn:w}=s[f],{x:g,y,data:b,reset:C}=await w({x:d,y:p,initialPlacement:r,placement:h,strategy:o,middlewareData:v,rects:u,platform:c,elements:{reference:e,floating:t}});d=g??d,p=y??p,v={...v,[m]:{...v[m],...b}},C&&x<=50&&(x++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(u=C.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:d,y:p}=en(u,h,l)),f=-1)}return{x:d,y:p,placement:h,strategy:o,middlewareData:v}};async function We(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:c,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:h=!1,padding:v=0}=le(t,e),x=bn(v),m=s[h?p==="floating"?"reference":"floating":p],w=tt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:l})),g=p==="floating"?{x:r,y:o,width:c.floating.width,height:c.floating.height}:c.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),b=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},C=tt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:y,strategy:l}):g);return{top:(w.top-C.top+x.top)/b.y,bottom:(C.bottom-w.bottom+x.bottom)/b.y,left:(w.left-C.left+x.left)/b.x,right:(C.right-w.right+x.right)/b.x}}const Po=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:c,elements:s,middlewareData:l}=t,{element:u,padding:d=0}=le(e,t)||{};if(u==null)return{};const p=bn(d),h={x:n,y:r},v=kt(o),x=_t(v),f=await c.getDimensions(u),m=v==="y",w=m?"top":"left",g=m?"bottom":"right",y=m?"clientHeight":"clientWidth",b=i.reference[x]+i.reference[v]-h[v]-i.floating[x],C=h[v]-i.reference[v],R=await(c.getOffsetParent==null?void 0:c.getOffsetParent(u));let E=R?R[y]:0;(!E||!await(c.isElement==null?void 0:c.isElement(R)))&&(E=s.floating[y]||i.floating[x]);const T=b/2-C/2,N=E/2-f[x]/2-1,I=he(p[w],N),W=he(p[g],N),H=I,M=E-f[x]-W,F=E/2-f[x]/2+T,k=Ct(H,F,M),O=!l.arrow&&Ne(o)!=null&&F!==k&&i.reference[x]/2-(F<H?I:W)-f[x]/2<0,L=O?F<H?F-H:F-M:0;return{[v]:h[v]+L,data:{[v]:k,centerOffset:F-k-L,...O&&{alignmentOffset:L}},reset:O}}}),Ao=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:c,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:f=!0,...m}=le(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=ue(o),g=ae(s),y=ue(s)===s,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=h||(y||!f?[et(s)]:So(s)),R=x!=="none";!h&&R&&C.push(...Co(s,f,x,b));const E=[s,...C],T=await We(t,m),N=[];let I=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&N.push(T[w]),p){const k=xo(o,c,b);N.push(T[k[0]],T[k[1]])}if(I=[...I,{placement:o,overflows:N}],!N.every(k=>k<=0)){var W,H;const k=(((W=i.flip)==null?void 0:W.index)||0)+1,O=E[k];if(O){var M;const A=p==="alignment"?g!==ae(O):!1,j=((M=I[0])==null?void 0:M.overflows[0])>0;if(!A||j)return{data:{index:k,overflows:I},reset:{placement:O}}}let L=(H=I.filter(A=>A.overflows[0]<=0).sort((A,j)=>A.overflows[1]-j.overflows[1])[0])==null?void 0:H.placement;if(!L)switch(v){case"bestFit":{var F;const A=(F=I.filter(j=>{if(R){const $=ae(j.placement);return $===g||$==="y"}return!0}).map(j=>[j.placement,j.overflows.filter($=>$>0).reduce(($,J)=>$+J,0)]).sort((j,$)=>j[1]-$[1])[0])==null?void 0:F[0];A&&(L=A);break}case"initialPlacement":L=s;break}if(o!==L)return{reset:{placement:L}}}return{}}}};function tn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nn(e){return go.some(t=>e[t]>=0)}const To=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=le(e,t);switch(r){case"referenceHidden":{const i=await We(t,{...o,elementContext:"reference"}),c=tn(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:nn(c)}}}case"escaped":{const i=await We(t,{...o,altBoundary:!0}),c=tn(i,n.floating);return{data:{escapedOffsets:c,escaped:nn(c)}}}default:return{}}}}};async function Oo(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),c=ue(n),s=Ne(n),l=ae(n)==="y",u=["left","top"].includes(c)?-1:1,d=i&&l?-1:1,p=le(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&typeof x=="number"&&(v=s==="end"?x*-1:x),l?{x:v*d,y:h*u}:{x:h*u,y:v*d}}const Io=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:c,middlewareData:s}=t,l=await Oo(t,e);return c===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:c}}}}},No=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:s={fn:m=>{let{x:w,y:g}=m;return{x:w,y:g}}},...l}=le(e,t),u={x:n,y:r},d=await We(t,l),p=ae(ue(o)),h=Dt(p);let v=u[h],x=u[p];if(i){const m=h==="y"?"top":"left",w=h==="y"?"bottom":"right",g=v+d[m],y=v-d[w];v=Ct(g,v,y)}if(c){const m=p==="y"?"top":"left",w=p==="y"?"bottom":"right",g=x+d[m],y=x-d[w];x=Ct(g,x,y)}const f=s.fn({...t,[h]:v,[p]:x});return{...f,data:{x:f.x-n,y:f.y-r,enabled:{[h]:i,[p]:c}}}}}},Mo=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:c}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=le(e,t),d={x:n,y:r},p=ae(o),h=Dt(p);let v=d[h],x=d[p];const f=le(s,t),m=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(l){const y=h==="y"?"height":"width",b=i.reference[h]-i.floating[y]+m.mainAxis,C=i.reference[h]+i.reference[y]-m.mainAxis;v<b?v=b:v>C&&(v=C)}if(u){var w,g;const y=h==="y"?"width":"height",b=["top","left"].includes(ue(o)),C=i.reference[p]-i.floating[y]+(b&&((w=c.offset)==null?void 0:w[p])||0)+(b?0:m.crossAxis),R=i.reference[p]+i.reference[y]+(b?0:((g=c.offset)==null?void 0:g[p])||0)-(b?m.crossAxis:0);x<C?x=C:x>R&&(x=R)}return{[h]:v,[p]:x}}}},Lo=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:c,elements:s}=t,{apply:l=()=>{},...u}=le(e,t),d=await We(t,u),p=ue(o),h=Ne(o),v=ae(o)==="y",{width:x,height:f}=i.floating;let m,w;p==="top"||p==="bottom"?(m=p,w=h===(await(c.isRTL==null?void 0:c.isRTL(s.floating))?"start":"end")?"left":"right"):(w=p,m=h==="end"?"top":"bottom");const g=f-d.top-d.bottom,y=x-d.left-d.right,b=he(f-d[m],g),C=he(x-d[w],y),R=!t.middlewareData.shift;let E=b,T=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=g),R&&!h){const I=G(d.left,0),W=G(d.right,0),H=G(d.top,0),M=G(d.bottom,0);v?T=x-2*(I!==0||W!==0?I+W:G(d.left,d.right)):E=f-2*(H!==0||M!==0?H+M:G(d.top,d.bottom))}await l({...t,availableWidth:T,availableHeight:E});const N=await c.getDimensions(s.floating);return x!==N.width||f!==N.height?{reset:{rects:!0}}:{}}}};function it(){return typeof window<"u"}function Me(e){return Cn(e)?(e.nodeName||"").toLowerCase():"#document"}function q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function se(e){var t;return(t=(Cn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Cn(e){return it()?e instanceof Node||e instanceof q(e).Node:!1}function te(e){return it()?e instanceof Element||e instanceof q(e).Element:!1}function ie(e){return it()?e instanceof HTMLElement||e instanceof q(e).HTMLElement:!1}function rn(e){return!it()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof q(e).ShadowRoot}function Ve(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ne(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Do(e){return["table","td","th"].includes(Me(e))}function st(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function jt(e){const t=Ft(),n=te(e)?ne(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function _o(e){let t=ve(e);for(;ie(t)&&!Ie(t);){if(jt(t))return t;if(st(t))return null;t=ve(t)}return null}function Ft(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ie(e){return["html","body","#document"].includes(Me(e))}function ne(e){return q(e).getComputedStyle(e)}function ct(e){return te(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ve(e){if(Me(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rn(e)&&e.host||se(e);return rn(t)?t.host:t}function En(e){const t=ve(e);return Ie(t)?e.ownerDocument?e.ownerDocument.body:e.body:ie(t)&&Ve(t)?t:En(t)}function He(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=En(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),c=q(o);if(i){const s=Rt(c);return t.concat(c,c.visualViewport||[],Ve(o)?o:[],s&&n?He(s):[])}return t.concat(o,He(o,[],n))}function Rt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Rn(e){const t=ne(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ie(e),i=o?e.offsetWidth:n,c=o?e.offsetHeight:r,s=Je(n)!==i||Je(r)!==c;return s&&(n=i,r=c),{width:n,height:r,$:s}}function Bt(e){return te(e)?e:e.contextElement}function Te(e){const t=Bt(e);if(!ie(t))return oe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Rn(t);let c=(i?Je(n.width):n.width)/r,s=(i?Je(n.height):n.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!s||!Number.isFinite(s))&&(s=1),{x:c,y:s}}const ko=oe(0);function Pn(e){const t=q(e);return!Ft()||!t.visualViewport?ko:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jo(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==q(e)?!1:t}function Se(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Bt(e);let c=oe(1);t&&(r?te(r)&&(c=Te(r)):c=Te(e));const s=jo(i,n,r)?Pn(i):oe(0);let l=(o.left+s.x)/c.x,u=(o.top+s.y)/c.y,d=o.width/c.x,p=o.height/c.y;if(i){const h=q(i),v=r&&te(r)?q(r):r;let x=h,f=Rt(x);for(;f&&r&&v!==x;){const m=Te(f),w=f.getBoundingClientRect(),g=ne(f),y=w.left+(f.clientLeft+parseFloat(g.paddingLeft))*m.x,b=w.top+(f.clientTop+parseFloat(g.paddingTop))*m.y;l*=m.x,u*=m.y,d*=m.x,p*=m.y,l+=y,u+=b,x=q(f),f=Rt(x)}}return tt({width:d,height:p,x:l,y:u})}function Wt(e,t){const n=ct(e).scrollLeft;return t?t.left+n:Se(se(e)).left+n}function An(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Wt(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function Fo(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",c=se(r),s=t?st(t.floating):!1;if(r===c||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=oe(1);const d=oe(0),p=ie(r);if((p||!p&&!i)&&((Me(r)!=="body"||Ve(c))&&(l=ct(r)),ie(r))){const v=Se(r);u=Te(r),d.x=v.x+r.clientLeft,d.y=v.y+r.clientTop}const h=c&&!p&&!i?An(c,l,!0):oe(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-l.scrollTop*u.y+d.y+h.y}}function Bo(e){return Array.from(e.getClientRects())}function Wo(e){const t=se(e),n=ct(e),r=e.ownerDocument.body,o=G(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=G(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let c=-n.scrollLeft+Wt(e);const s=-n.scrollTop;return ne(r).direction==="rtl"&&(c+=G(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:c,y:s}}function Ho(e,t){const n=q(e),r=se(e),o=n.visualViewport;let i=r.clientWidth,c=r.clientHeight,s=0,l=0;if(o){i=o.width,c=o.height;const u=Ft();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:c,x:s,y:l}}function Vo(e,t){const n=Se(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ie(e)?Te(e):oe(1),c=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:c,height:s,x:l,y:u}}function on(e,t,n){let r;if(t==="viewport")r=Ho(e,n);else if(t==="document")r=Wo(se(e));else if(te(t))r=Vo(t,n);else{const o=Pn(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return tt(r)}function Tn(e,t){const n=ve(e);return n===t||!te(n)||Ie(n)?!1:ne(n).position==="fixed"||Tn(n,t)}function $o(e,t){const n=t.get(e);if(n)return n;let r=He(e,[],!1).filter(s=>te(s)&&Me(s)!=="body"),o=null;const i=ne(e).position==="fixed";let c=i?ve(e):e;for(;te(c)&&!Ie(c);){const s=ne(c),l=jt(c);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ve(c)&&!l&&Tn(e,c))?r=r.filter(d=>d!==c):o=s,c=ve(c)}return t.set(e,r),r}function Uo(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const c=[...n==="clippingAncestors"?st(t)?[]:$o(t,this._c):[].concat(n),r],s=c[0],l=c.reduce((u,d)=>{const p=on(t,d,o);return u.top=G(p.top,u.top),u.right=he(p.right,u.right),u.bottom=he(p.bottom,u.bottom),u.left=G(p.left,u.left),u},on(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function zo(e){const{width:t,height:n}=Rn(e);return{width:t,height:n}}function Ko(e,t,n){const r=ie(t),o=se(t),i=n==="fixed",c=Se(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=oe(0);function u(){l.x=Wt(o)}if(r||!r&&!i)if((Me(t)!=="body"||Ve(o))&&(s=ct(t)),r){const v=Se(t,!0,i,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else o&&u();i&&!r&&o&&u();const d=o&&!r&&!i?An(o,s):oe(0),p=c.left+s.scrollLeft-l.x-d.x,h=c.top+s.scrollTop-l.y-d.y;return{x:p,y:h,width:c.width,height:c.height}}function vt(e){return ne(e).position==="static"}function sn(e,t){if(!ie(e)||ne(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return se(e)===n&&(n=n.ownerDocument.body),n}function On(e,t){const n=q(e);if(st(e))return n;if(!ie(e)){let o=ve(e);for(;o&&!Ie(o);){if(te(o)&&!vt(o))return o;o=ve(o)}return n}let r=sn(e,t);for(;r&&Do(r)&&vt(r);)r=sn(r,t);return r&&Ie(r)&&vt(r)&&!jt(r)?n:r||_o(e)||n}const Yo=async function(e){const t=this.getOffsetParent||On,n=this.getDimensions,r=await n(e.floating);return{reference:Ko(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Xo(e){return ne(e).direction==="rtl"}const Zo={convertOffsetParentRelativeRectToViewportRelativeRect:Fo,getDocumentElement:se,getClippingRect:Uo,getOffsetParent:On,getElementRects:Yo,getClientRects:Bo,getDimensions:zo,getScale:Te,isElement:te,isRTL:Xo};function In(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Go(e,t){let n=null,r;const o=se(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function c(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:d,top:p,width:h,height:v}=u;if(s||t(),!h||!v)return;const x=Ue(p),f=Ue(o.clientWidth-(d+h)),m=Ue(o.clientHeight-(p+v)),w=Ue(d),y={rootMargin:-x+"px "+-f+"px "+-m+"px "+-w+"px",threshold:G(0,he(1,l))||1};let b=!0;function C(R){const E=R[0].intersectionRatio;if(E!==l){if(!b)return c();E?c(!1,E):r=setTimeout(()=>{c(!1,1e-7)},1e3)}E===1&&!In(u,e.getBoundingClientRect())&&c(),b=!1}try{n=new IntersectionObserver(C,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,y)}n.observe(e)}return c(!0),i}function qo(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Bt(e),d=o||i?[...u?He(u):[],...He(t)]:[];d.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const p=u&&s?Go(u,n):null;let h=-1,v=null;c&&(v=new ResizeObserver(w=>{let[g]=w;g&&g.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=v)==null||y.observe(t)})),n()}),u&&!l&&v.observe(u),v.observe(t));let x,f=l?Se(e):null;l&&m();function m(){const w=Se(e);f&&!In(f,w)&&n(),f=w,x=requestAnimationFrame(m)}return n(),()=>{var w;d.forEach(g=>{o&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),p==null||p(),(w=v)==null||w.disconnect(),v=null,l&&cancelAnimationFrame(x)}}const Qo=Io,Jo=No,ei=Ao,ti=Lo,ni=To,cn=Po,ri=Mo,oi=(e,t,n)=>{const r=new Map,o={platform:Zo,...n},i={...o.platform,_c:r};return Ro(e,t,{...o,platform:i})};var Ze=typeof document<"u"?a.useLayoutEffect:a.useEffect;function nt(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,o;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(!nt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!nt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Nn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function an(e,t){const n=Nn(e);return Math.round(t*n)/n}function gt(e){const t=a.useRef(e);return Ze(()=>{t.current=e}),t}function ii(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:c}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[d,p]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=a.useState(r);nt(h,r)||v(r);const[x,f]=a.useState(null),[m,w]=a.useState(null),g=a.useCallback(A=>{A!==R.current&&(R.current=A,f(A))},[]),y=a.useCallback(A=>{A!==E.current&&(E.current=A,w(A))},[]),b=i||x,C=c||m,R=a.useRef(null),E=a.useRef(null),T=a.useRef(d),N=l!=null,I=gt(l),W=gt(o),H=gt(u),M=a.useCallback(()=>{if(!R.current||!E.current)return;const A={placement:t,strategy:n,middleware:h};W.current&&(A.platform=W.current),oi(R.current,E.current,A).then(j=>{const $={...j,isPositioned:H.current!==!1};F.current&&!nt(T.current,$)&&(T.current=$,ot.flushSync(()=>{p($)}))})},[h,t,n,W,H]);Ze(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,p(A=>({...A,isPositioned:!1})))},[u]);const F=a.useRef(!1);Ze(()=>(F.current=!0,()=>{F.current=!1}),[]),Ze(()=>{if(b&&(R.current=b),C&&(E.current=C),b&&C){if(I.current)return I.current(b,C,M);M()}},[b,C,M,I,N]);const k=a.useMemo(()=>({reference:R,floating:E,setReference:g,setFloating:y}),[g,y]),O=a.useMemo(()=>({reference:b,floating:C}),[b,C]),L=a.useMemo(()=>{const A={position:n,left:0,top:0};if(!O.floating)return A;const j=an(O.floating,d.x),$=an(O.floating,d.y);return s?{...A,transform:"translate("+j+"px, "+$+"px)",...Nn(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:$}},[n,s,O.floating,d.x,d.y]);return a.useMemo(()=>({...d,update:M,refs:k,elements:O,floatingStyles:L}),[d,M,k,O,L])}const si=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?cn({element:r.current,padding:o}).fn(n):{}:r?cn({element:r,padding:o}).fn(n):{}}}},ci=(e,t)=>({...Qo(e),options:[e,t]}),ai=(e,t)=>({...Jo(e),options:[e,t]}),li=(e,t)=>({...ri(e),options:[e,t]}),ui=(e,t)=>({...ei(e),options:[e,t]}),fi=(e,t)=>({...ti(e),options:[e,t]}),di=(e,t)=>({...ni(e),options:[e,t]}),pi=(e,t)=>({...si(e),options:[e,t]});var mi="Arrow",Mn=a.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return S.jsx(U.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:S.jsx("polygon",{points:"0,0 30,0 15,10"})})});Mn.displayName=mi;var hi=Mn;function vi(e){const[t,n]=a.useState(void 0);return X(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let c,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;c=u.inlineSize,s=u.blockSize}else c=e.offsetWidth,s=e.offsetHeight;n({width:c,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Ht="Popper",[Ln,Dn]=Mt(Ht),[gi,_n]=Ln(Ht),kn=e=>{const{__scopePopper:t,children:n}=e,[r,o]=a.useState(null);return S.jsx(gi,{scope:t,anchor:r,onAnchorChange:o,children:n})};kn.displayName=Ht;var jn="PopperAnchor",Fn=a.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=_n(jn,n),c=a.useRef(null),s=K(t,c);return a.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||c.current)}),r?null:S.jsx(U.div,{...o,ref:s})});Fn.displayName=jn;var Vt="PopperContent",[wi,yi]=Ln(Vt),Bn=a.forwardRef((e,t)=>{var P,V,Y,B,D,_;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:c=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:x,...f}=e,m=_n(Vt,n),[w,g]=a.useState(null),y=K(t,Z=>g(Z)),[b,C]=a.useState(null),R=vi(b),E=(R==null?void 0:R.width)??0,T=(R==null?void 0:R.height)??0,N=r+(i!=="center"?"-"+i:""),I=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},W=Array.isArray(u)?u:[u],H=W.length>0,M={padding:I,boundary:W.filter(Si),altBoundary:H},{refs:F,floatingStyles:k,placement:O,isPositioned:L,middlewareData:A}=ii({strategy:"fixed",placement:N,whileElementsMounted:(...Z)=>qo(...Z,{animationFrame:v==="always"}),elements:{reference:m.anchor},middleware:[ci({mainAxis:o+T,alignmentAxis:c}),l&&ai({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?li():void 0,...M}),l&&ui({...M}),fi({...M,apply:({elements:Z,rects:re,availableWidth:ke,availableHeight:je})=>{const{width:Fe,height:Ar}=re.reference,$e=Z.floating.style;$e.setProperty("--radix-popper-available-width",`${ke}px`),$e.setProperty("--radix-popper-available-height",`${je}px`),$e.setProperty("--radix-popper-anchor-width",`${Fe}px`),$e.setProperty("--radix-popper-anchor-height",`${Ar}px`)}}),b&&pi({element:b,padding:s}),bi({arrowWidth:E,arrowHeight:T}),h&&di({strategy:"referenceHidden",...M})]}),[j,$]=Vn(O),J=xe(x);X(()=>{L&&(J==null||J())},[L,J]);const De=(P=A.arrow)==null?void 0:P.x,_e=(V=A.arrow)==null?void 0:V.y,fe=((Y=A.arrow)==null?void 0:Y.centerOffset)!==0,[Ee,ye]=a.useState();return X(()=>{w&&ye(window.getComputedStyle(w).zIndex)},[w]),S.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...k,transform:L?k.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ee,"--radix-popper-transform-origin":[(B=A.transformOrigin)==null?void 0:B.x,(D=A.transformOrigin)==null?void 0:D.y].join(" "),...((_=A.hide)==null?void 0:_.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:S.jsx(wi,{scope:n,placedSide:j,onArrowChange:C,arrowX:De,arrowY:_e,shouldHideArrow:fe,children:S.jsx(U.div,{"data-side":j,"data-align":$,...f,ref:y,style:{...f.style,animation:L?void 0:"none"}})})})});Bn.displayName=Vt;var Wn="PopperArrow",xi={top:"bottom",right:"left",bottom:"top",left:"right"},Hn=a.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=yi(Wn,r),c=xi[i.placedSide];return S.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:S.jsx(hi,{...o,ref:n,style:{...o.style,display:"block"}})})});Hn.displayName=Wn;function Si(e){return e!==null}var bi=e=>({name:"transformOrigin",options:e,fn(t){var m,w,g;const{placement:n,rects:r,middlewareData:o}=t,c=((m=o.arrow)==null?void 0:m.centerOffset)!==0,s=c?0:e.arrowWidth,l=c?0:e.arrowHeight,[u,d]=Vn(n),p={start:"0%",center:"50%",end:"100%"}[d],h=(((w=o.arrow)==null?void 0:w.x)??0)+s/2,v=(((g=o.arrow)==null?void 0:g.y)??0)+l/2;let x="",f="";return u==="bottom"?(x=c?p:`${h}px`,f=`${-l}px`):u==="top"?(x=c?p:`${h}px`,f=`${r.floating.height+l}px`):u==="right"?(x=`${-l}px`,f=c?p:`${v}px`):u==="left"&&(x=`${r.floating.width+l}px`,f=c?p:`${v}px`),{data:{x,y:f}}}});function Vn(e){const[t,n="center"]=e.split("-");return[t,n]}var Ci=kn,Ei=Fn,Ri=Bn,Pi=Hn,Ai="Portal",$n=a.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=a.useState(!1);X(()=>i(!0),[]);const c=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return c?Ir.createPortal(S.jsx(U.div,{...r,ref:t}),c):null});$n.displayName=Ai;var Ti=hn[" useInsertionEffect ".trim().toString()]||X;function ln({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,c]=Oi({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const d=a.useRef(e!==void 0);a.useEffect(()=>{const p=d.current;p!==s&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=s},[s,r])}const u=a.useCallback(d=>{var p;if(s){const h=Ii(d)?d(e):d;h!==e&&((p=c.current)==null||p.call(c,h))}else i(d)},[s,e,i,c]);return[l,u]}function Oi({defaultProp:e,onChange:t}){const[n,r]=a.useState(e),o=a.useRef(n),i=a.useRef(t);return Ti(()=>{i.current=t},[t]),a.useEffect(()=>{var c;o.current!==n&&((c=i.current)==null||c.call(i,n),o.current=n)},[n,o]),[n,r,i]}function Ii(e){return typeof e=="function"}function Ni(e){const t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Un=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Mi="VisuallyHidden",Li=a.forwardRef((e,t)=>S.jsx(U.span,{...e,ref:t,style:{...Un,...e.style}}));Li.displayName=Mi;var Di=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Re=new WeakMap,ze=new WeakMap,Ke={},wt=0,zn=function(e){return e&&(e.host||zn(e.parentNode))},_i=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=zn(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ki=function(e,t,n,r){var o=_i(t,Array.isArray(e)?e:[e]);Ke[n]||(Ke[n]=new WeakMap);var i=Ke[n],c=[],s=new Set,l=new Set(o),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};o.forEach(u);var d=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(h){if(s.has(h))d(h);else try{var v=h.getAttribute(r),x=v!==null&&v!=="false",f=(Re.get(h)||0)+1,m=(i.get(h)||0)+1;Re.set(h,f),i.set(h,m),c.push(h),f===1&&x&&ze.set(h,!0),m===1&&h.setAttribute(n,"true"),x||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return d(t),s.clear(),wt++,function(){c.forEach(function(p){var h=Re.get(p)-1,v=i.get(p)-1;Re.set(p,h),i.set(p,v),h||(ze.has(p)||p.removeAttribute(r),ze.delete(p)),v||p.removeAttribute(n)}),wt--,wt||(Re=new WeakMap,Re=new WeakMap,ze=new WeakMap,Ke={})}},ji=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Di(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),ki(r,o,n,"aria-hidden")):function(){return null}},Ge="right-scroll-bar-position",qe="width-before-scroll-bar",Fi="with-scroll-bars-hidden",Bi="--removed-body-scroll-bar-size";function yt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Wi(e,t){var n=a.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Hi=typeof window<"u"?a.useLayoutEffect:a.useEffect,un=new WeakMap;function Vi(e,t){var n=Wi(null,function(r){return e.forEach(function(o){return yt(o,r)})});return Hi(function(){var r=un.get(n);if(r){var o=new Set(r),i=new Set(e),c=n.current;o.forEach(function(s){i.has(s)||yt(s,null)}),i.forEach(function(s){o.has(s)||yt(s,c)})}un.set(n,e)},[e]),n}function $i(e){return e}function Ui(e,t){t===void 0&&(t=$i);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var c=t(i,r);return n.push(c),function(){n=n.filter(function(s){return s!==c})}},assignSyncMedium:function(i){for(r=!0;n.length;){var c=n;n=[],c.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var c=[];if(n.length){var s=n;n=[],s.forEach(i),c=n}var l=function(){var d=c;c=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){c.push(d),u()},filter:function(d){return c=c.filter(d),n}}}};return o}function zi(e){e===void 0&&(e={});var t=Ui(null);return t.options=pe({async:!0,ssr:!1},e),t}var Kn=function(e){var t=e.sideCar,n=vn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return a.createElement(r,pe({},n))};Kn.isSideCarExport=!0;function Ki(e,t){return e.useMedium(t),Kn}var Yn=zi(),xt=function(){},at=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:xt,onWheelCapture:xt,onTouchMoveCapture:xt}),o=r[0],i=r[1],c=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,p=e.shards,h=e.sideCar,v=e.noIsolation,x=e.inert,f=e.allowPinchZoom,m=e.as,w=m===void 0?"div":m,g=e.gapMode,y=vn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=h,C=Vi([n,t]),R=pe(pe({},y),o);return a.createElement(a.Fragment,null,d&&a.createElement(b,{sideCar:Yn,removeScrollBar:u,shards:p,noIsolation:v,inert:x,setCallbacks:i,allowPinchZoom:!!f,lockRef:n,gapMode:g}),c?a.cloneElement(a.Children.only(s),pe(pe({},R),{ref:C})):a.createElement(w,pe({},R,{className:l,ref:C}),s))});at.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};at.classNames={fullWidth:qe,zeroRight:Ge};var Yi=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Xi(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Yi();return t&&e.setAttribute("nonce",t),e}function Zi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Gi(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var qi=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Xi())&&(Zi(t,n),Gi(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Qi=function(){var e=qi();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Xn=function(){var e=Qi(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Ji={left:0,top:0,right:0,gap:0},St=function(e){return parseInt(e||"",10)||0},es=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[St(n),St(r),St(o)]},ts=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ji;var t=es(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ns=Xn(),Oe="data-scroll-locked",rs=function(e,t,n,r){var o=e.left,i=e.top,c=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(Fi,` {
|
|
3
|
+
overflow: hidden `).concat(r,`;
|
|
4
|
+
padding-right: `).concat(s,"px ").concat(r,`;
|
|
5
|
+
}
|
|
6
|
+
body[`).concat(Oe,`] {
|
|
7
|
+
overflow: hidden `).concat(r,`;
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
+
padding-left: `.concat(o,`px;
|
|
11
|
+
padding-top: `).concat(i,`px;
|
|
12
|
+
padding-right: `).concat(c,`px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: `).concat(s,"px ").concat(r,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.`).concat(Ge,` {
|
|
20
|
+
right: `).concat(s,"px ").concat(r,`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.`).concat(qe,` {
|
|
24
|
+
margin-right: `).concat(s,"px ").concat(r,`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(Ge," .").concat(Ge,` {
|
|
28
|
+
right: 0 `).concat(r,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(qe," .").concat(qe,` {
|
|
32
|
+
margin-right: 0 `).concat(r,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[`).concat(Oe,`] {
|
|
36
|
+
`).concat(Bi,": ").concat(s,`px;
|
|
37
|
+
}
|
|
38
|
+
`)},fn=function(){var e=parseInt(document.body.getAttribute(Oe)||"0",10);return isFinite(e)?e:0},os=function(){a.useEffect(function(){return document.body.setAttribute(Oe,(fn()+1).toString()),function(){var e=fn()-1;e<=0?document.body.removeAttribute(Oe):document.body.setAttribute(Oe,e.toString())}},[])},is=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;os();var i=a.useMemo(function(){return ts(o)},[o]);return a.createElement(ns,{styles:rs(i,!t,o,n?"":"!important")})},Pt=!1;if(typeof window<"u")try{var Ye=Object.defineProperty({},"passive",{get:function(){return Pt=!0,!0}});window.addEventListener("test",Ye,Ye),window.removeEventListener("test",Ye,Ye)}catch{Pt=!1}var Pe=Pt?{passive:!1}:!1,ss=function(e){return e.tagName==="TEXTAREA"},Zn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ss(e)&&n[t]==="visible")},cs=function(e){return Zn(e,"overflowY")},as=function(e){return Zn(e,"overflowX")},dn=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Gn(e,r);if(o){var i=qn(e,r),c=i[1],s=i[2];if(c>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ls=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},us=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Gn=function(e,t){return e==="v"?cs(t):as(t)},qn=function(e,t){return e==="v"?ls(t):us(t)},fs=function(e,t){return e==="h"&&t==="rtl"?-1:1},ds=function(e,t,n,r,o){var i=fs(e,window.getComputedStyle(t).direction),c=i*r,s=n.target,l=t.contains(s),u=!1,d=c>0,p=0,h=0;do{var v=qn(e,s),x=v[0],f=v[1],m=v[2],w=f-m-i*x;(x||w)&&Gn(e,s)&&(p+=w,h+=x),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&Math.abs(p)<1||!d&&Math.abs(h)<1)&&(u=!0),u},Xe=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},pn=function(e){return[e.deltaX,e.deltaY]},mn=function(e){return e&&"current"in e?e.current:e},ps=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ms=function(e){return`
|
|
39
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
+
`)},hs=0,Ae=[];function vs(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(hs++)[0],i=a.useState(Xn)[0],c=a.useRef(e);a.useEffect(function(){c.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var f=Or([e.lockRef.current],(e.shards||[]).map(mn),!0).filter(Boolean);return f.forEach(function(m){return m.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=a.useCallback(function(f,m){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!c.current.allowPinchZoom;var w=Xe(f),g=n.current,y="deltaX"in f?f.deltaX:g[0]-w[0],b="deltaY"in f?f.deltaY:g[1]-w[1],C,R=f.target,E=Math.abs(y)>Math.abs(b)?"h":"v";if("touches"in f&&E==="h"&&R.type==="range")return!1;var T=dn(E,R);if(!T)return!0;if(T?C=E:(C=E==="v"?"h":"v",T=dn(E,R)),!T)return!1;if(!r.current&&"changedTouches"in f&&(y||b)&&(r.current=C),!C)return!0;var N=r.current||C;return ds(N,m,f,N==="h"?y:b)},[]),l=a.useCallback(function(f){var m=f;if(!(!Ae.length||Ae[Ae.length-1]!==i)){var w="deltaY"in m?pn(m):Xe(m),g=t.current.filter(function(C){return C.name===m.type&&(C.target===m.target||m.target===C.shadowParent)&&ps(C.delta,w)})[0];if(g&&g.should){m.cancelable&&m.preventDefault();return}if(!g){var y=(c.current.shards||[]).map(mn).filter(Boolean).filter(function(C){return C.contains(m.target)}),b=y.length>0?s(m,y[0]):!c.current.noIsolation;b&&m.cancelable&&m.preventDefault()}}},[]),u=a.useCallback(function(f,m,w,g){var y={name:f,delta:m,target:w,should:g,shadowParent:gs(w)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(b){return b!==y})},1)},[]),d=a.useCallback(function(f){n.current=Xe(f),r.current=void 0},[]),p=a.useCallback(function(f){u(f.type,pn(f),f.target,s(f,e.lockRef.current))},[]),h=a.useCallback(function(f){u(f.type,Xe(f),f.target,s(f,e.lockRef.current))},[]);a.useEffect(function(){return Ae.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Pe),document.addEventListener("touchmove",l,Pe),document.addEventListener("touchstart",d,Pe),function(){Ae=Ae.filter(function(f){return f!==i}),document.removeEventListener("wheel",l,Pe),document.removeEventListener("touchmove",l,Pe),document.removeEventListener("touchstart",d,Pe)}},[]);var v=e.removeScrollBar,x=e.inert;return a.createElement(a.Fragment,null,x?a.createElement(i,{styles:ms(o)}):null,v?a.createElement(is,{gapMode:e.gapMode}):null)}function gs(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ws=Ki(Yn,vs);var Qn=a.forwardRef(function(e,t){return a.createElement(at,pe({},e,{ref:t,sideCar:ws}))});Qn.classNames=at.classNames;var ys=[" ","Enter","ArrowUp","ArrowDown"],xs=[" ","Enter"],be="Select",[lt,ut,Ss]=Yr(be),[Le,oc]=Mt(be,[Ss,Dn]),ft=Dn(),[bs,ge]=Le(be),[Cs,Es]=Le(be),Jn=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:c,defaultValue:s,onValueChange:l,dir:u,name:d,autoComplete:p,disabled:h,required:v,form:x}=e,f=ft(t),[m,w]=a.useState(null),[g,y]=a.useState(null),[b,C]=a.useState(!1),R=Zr(u),[E,T]=ln({prop:r,defaultProp:o??!1,onChange:i,caller:be}),[N,I]=ln({prop:c,defaultProp:s,onChange:l,caller:be}),W=a.useRef(null),H=m?x||!!m.closest("form"):!0,[M,F]=a.useState(new Set),k=Array.from(M).map(O=>O.props.value).join(";");return S.jsx(Ci,{...f,children:S.jsxs(bs,{required:v,scope:t,trigger:m,onTriggerChange:w,valueNode:g,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:C,contentId:Lt(),value:N,onValueChange:I,open:E,onOpenChange:T,dir:R,triggerPointerDownPosRef:W,disabled:h,children:[S.jsx(lt.Provider,{scope:t,children:S.jsx(Cs,{scope:e.__scopeSelect,onNativeOptionAdd:a.useCallback(O=>{F(L=>new Set(L).add(O))},[]),onNativeOptionRemove:a.useCallback(O=>{F(L=>{const A=new Set(L);return A.delete(O),A})},[]),children:n})}),H?S.jsxs(Sr,{"aria-hidden":!0,required:v,tabIndex:-1,name:d,autoComplete:p,value:N,onChange:O=>I(O.target.value),disabled:h,form:x,children:[N===void 0?S.jsx("option",{value:""}):null,Array.from(M)]},k):null]})})};Jn.displayName=be;var er="SelectTrigger",tr=a.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=ft(n),c=ge(er,n),s=c.disabled||r,l=K(t,c.onTriggerChange),u=ut(n),d=a.useRef("touch"),[p,h,v]=Cr(f=>{const m=u().filter(y=>!y.disabled),w=m.find(y=>y.value===c.value),g=Er(m,f,w);g!==void 0&&c.onValueChange(g.value)}),x=f=>{s||(c.onOpenChange(!0),v()),f&&(c.triggerPointerDownPosRef.current={x:Math.round(f.pageX),y:Math.round(f.pageY)})};return S.jsx(Ei,{asChild:!0,...i,children:S.jsx(U.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":br(c.value)?"":void 0,...o,ref:l,onClick:z(o.onClick,f=>{f.currentTarget.focus(),d.current!=="mouse"&&x(f)}),onPointerDown:z(o.onPointerDown,f=>{d.current=f.pointerType;const m=f.target;m.hasPointerCapture(f.pointerId)&&m.releasePointerCapture(f.pointerId),f.button===0&&f.ctrlKey===!1&&f.pointerType==="mouse"&&(x(f),f.preventDefault())}),onKeyDown:z(o.onKeyDown,f=>{const m=p.current!=="";!(f.ctrlKey||f.altKey||f.metaKey)&&f.key.length===1&&h(f.key),!(m&&f.key===" ")&&ys.includes(f.key)&&(x(),f.preventDefault())})})})});tr.displayName=er;var nr="SelectValue",rr=a.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:c="",...s}=e,l=ge(nr,n),{onValueNodeHasChildrenChange:u}=l,d=i!==void 0,p=K(t,l.onValueNodeChange);return X(()=>{u(d)},[u,d]),S.jsx(U.span,{...s,ref:p,style:{pointerEvents:"none"},children:br(l.value)?S.jsx(S.Fragment,{children:c}):i})});rr.displayName=nr;var Rs="SelectIcon",or=a.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return S.jsx(U.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});or.displayName=Rs;var Ps="SelectPortal",ir=e=>S.jsx($n,{asChild:!0,...e});ir.displayName=Ps;var Ce="SelectContent",sr=a.forwardRef((e,t)=>{const n=ge(Ce,e.__scopeSelect),[r,o]=a.useState();if(X(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?ot.createPortal(S.jsx(cr,{scope:e.__scopeSelect,children:S.jsx(lt.Slot,{scope:e.__scopeSelect,children:S.jsx("div",{children:e.children})})}),i):null}return S.jsx(ar,{...e,ref:t})});sr.displayName=Ce;var ee=10,[cr,we]=Le(Ce),As="SelectContentImpl",Ts=Qe("SelectContent.RemoveScroll"),ar=a.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:c,side:s,sideOffset:l,align:u,alignOffset:d,arrowPadding:p,collisionBoundary:h,collisionPadding:v,sticky:x,hideWhenDetached:f,avoidCollisions:m,...w}=e,g=ge(Ce,n),[y,b]=a.useState(null),[C,R]=a.useState(null),E=K(t,P=>b(P)),[T,N]=a.useState(null),[I,W]=a.useState(null),H=ut(n),[M,F]=a.useState(!1),k=a.useRef(!1);a.useEffect(()=>{if(y)return ji(y)},[y]),so();const O=a.useCallback(P=>{const[V,...Y]=H().map(_=>_.ref.current),[B]=Y.slice(-1),D=document.activeElement;for(const _ of P)if(_===D||(_==null||_.scrollIntoView({block:"nearest"}),_===V&&C&&(C.scrollTop=0),_===B&&C&&(C.scrollTop=C.scrollHeight),_==null||_.focus(),document.activeElement!==D))return},[H,C]),L=a.useCallback(()=>O([T,y]),[O,T,y]);a.useEffect(()=>{M&&L()},[M,L]);const{onOpenChange:A,triggerPointerDownPosRef:j}=g;a.useEffect(()=>{if(y){let P={x:0,y:0};const V=B=>{var D,_;P={x:Math.abs(Math.round(B.pageX)-(((D=j.current)==null?void 0:D.x)??0)),y:Math.abs(Math.round(B.pageY)-(((_=j.current)==null?void 0:_.y)??0))}},Y=B=>{P.x<=10&&P.y<=10?B.preventDefault():y.contains(B.target)||A(!1),document.removeEventListener("pointermove",V),j.current=null};return j.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",Y,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",Y,{capture:!0})}}},[y,A,j]),a.useEffect(()=>{const P=()=>A(!1);return window.addEventListener("blur",P),window.addEventListener("resize",P),()=>{window.removeEventListener("blur",P),window.removeEventListener("resize",P)}},[A]);const[$,J]=Cr(P=>{const V=H().filter(D=>!D.disabled),Y=V.find(D=>D.ref.current===document.activeElement),B=Er(V,P,Y);B&&setTimeout(()=>B.ref.current.focus())}),De=a.useCallback((P,V,Y)=>{const B=!k.current&&!Y;(g.value!==void 0&&g.value===V||B)&&(N(P),B&&(k.current=!0))},[g.value]),_e=a.useCallback(()=>y==null?void 0:y.focus(),[y]),fe=a.useCallback((P,V,Y)=>{const B=!k.current&&!Y;(g.value!==void 0&&g.value===V||B)&&W(P)},[g.value]),Ee=r==="popper"?At:lr,ye=Ee===At?{side:s,sideOffset:l,align:u,alignOffset:d,arrowPadding:p,collisionBoundary:h,collisionPadding:v,sticky:x,hideWhenDetached:f,avoidCollisions:m}:{};return S.jsx(cr,{scope:n,content:y,viewport:C,onViewportChange:R,itemRefCallback:De,selectedItem:T,onItemLeave:_e,itemTextRefCallback:fe,focusSelectedItem:L,selectedItemText:I,position:r,isPositioned:M,searchRef:$,children:S.jsx(Qn,{as:Ts,allowPinchZoom:!0,children:S.jsx(xn,{asChild:!0,trapped:g.open,onMountAutoFocus:P=>{P.preventDefault()},onUnmountAutoFocus:z(o,P=>{var V;(V=g.trigger)==null||V.focus({preventScroll:!0}),P.preventDefault()}),children:S.jsx(wn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:P=>P.preventDefault(),onDismiss:()=>g.onOpenChange(!1),children:S.jsx(Ee,{role:"listbox",id:g.contentId,"data-state":g.open?"open":"closed",dir:g.dir,onContextMenu:P=>P.preventDefault(),...w,...ye,onPlaced:()=>F(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:z(w.onKeyDown,P=>{const V=P.ctrlKey||P.altKey||P.metaKey;if(P.key==="Tab"&&P.preventDefault(),!V&&P.key.length===1&&J(P.key),["ArrowUp","ArrowDown","Home","End"].includes(P.key)){let B=H().filter(D=>!D.disabled).map(D=>D.ref.current);if(["ArrowUp","End"].includes(P.key)&&(B=B.slice().reverse()),["ArrowUp","ArrowDown"].includes(P.key)){const D=P.target,_=B.indexOf(D);B=B.slice(_+1)}setTimeout(()=>O(B)),P.preventDefault()}})})})})})})});ar.displayName=As;var Os="SelectItemAlignedPosition",lr=a.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=ge(Ce,n),c=we(Ce,n),[s,l]=a.useState(null),[u,d]=a.useState(null),p=K(t,E=>d(E)),h=ut(n),v=a.useRef(!1),x=a.useRef(!0),{viewport:f,selectedItem:m,selectedItemText:w,focusSelectedItem:g}=c,y=a.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&f&&m&&w){const E=i.trigger.getBoundingClientRect(),T=u.getBoundingClientRect(),N=i.valueNode.getBoundingClientRect(),I=w.getBoundingClientRect();if(i.dir!=="rtl"){const D=I.left-T.left,_=N.left-D,Z=E.left-_,re=E.width+Z,ke=Math.max(re,T.width),je=window.innerWidth-ee,Fe=zt(_,[ee,Math.max(ee,je-ke)]);s.style.minWidth=re+"px",s.style.left=Fe+"px"}else{const D=T.right-I.right,_=window.innerWidth-N.right-D,Z=window.innerWidth-E.right-_,re=E.width+Z,ke=Math.max(re,T.width),je=window.innerWidth-ee,Fe=zt(_,[ee,Math.max(ee,je-ke)]);s.style.minWidth=re+"px",s.style.right=Fe+"px"}const W=h(),H=window.innerHeight-ee*2,M=f.scrollHeight,F=window.getComputedStyle(u),k=parseInt(F.borderTopWidth,10),O=parseInt(F.paddingTop,10),L=parseInt(F.borderBottomWidth,10),A=parseInt(F.paddingBottom,10),j=k+O+M+A+L,$=Math.min(m.offsetHeight*5,j),J=window.getComputedStyle(f),De=parseInt(J.paddingTop,10),_e=parseInt(J.paddingBottom,10),fe=E.top+E.height/2-ee,Ee=H-fe,ye=m.offsetHeight/2,P=m.offsetTop+ye,V=k+O+P,Y=j-V;if(V<=fe){const D=W.length>0&&m===W[W.length-1].ref.current;s.style.bottom="0px";const _=u.clientHeight-f.offsetTop-f.offsetHeight,Z=Math.max(Ee,ye+(D?_e:0)+_+L),re=V+Z;s.style.height=re+"px"}else{const D=W.length>0&&m===W[0].ref.current;s.style.top="0px";const Z=Math.max(fe,k+f.offsetTop+(D?De:0)+ye)+Y;s.style.height=Z+"px",f.scrollTop=V-fe+f.offsetTop}s.style.margin=`${ee}px 0`,s.style.minHeight=$+"px",s.style.maxHeight=H+"px",r==null||r(),requestAnimationFrame(()=>v.current=!0)}},[h,i.trigger,i.valueNode,s,u,f,m,w,i.dir,r]);X(()=>y(),[y]);const[b,C]=a.useState();X(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const R=a.useCallback(E=>{E&&x.current===!0&&(y(),g==null||g(),x.current=!1)},[y,g]);return S.jsx(Ns,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:v,onScrollButtonChange:R,children:S.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:S.jsx(U.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});lr.displayName=Os;var Is="SelectPopperPosition",At=a.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ee,...i}=e,c=ft(n);return S.jsx(Ri,{...c,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});At.displayName=Is;var[Ns,$t]=Le(Ce,{}),Tt="SelectViewport",ur=a.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=we(Tt,n),c=$t(Tt,n),s=K(t,i.onViewportChange),l=a.useRef(0);return S.jsxs(S.Fragment,{children:[S.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),S.jsx(lt.Slot,{scope:n,children:S.jsx(U.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:z(o.onScroll,u=>{const d=u.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:h}=c;if(h!=null&&h.current&&p){const v=Math.abs(l.current-d.scrollTop);if(v>0){const x=window.innerHeight-ee*2,f=parseFloat(p.style.minHeight),m=parseFloat(p.style.height),w=Math.max(f,m);if(w<x){const g=w+v,y=Math.min(x,g),b=g-y;p.style.height=y+"px",p.style.bottom==="0px"&&(d.scrollTop=b>0?b:0,p.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});ur.displayName=Tt;var fr="SelectGroup",[Ms,Ls]=Le(fr),Ds=a.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Lt();return S.jsx(Ms,{scope:n,id:o,children:S.jsx(U.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Ds.displayName=fr;var dr="SelectLabel",_s=a.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ls(dr,n);return S.jsx(U.div,{id:o.id,...r,ref:t})});_s.displayName=dr;var rt="SelectItem",[ks,pr]=Le(rt),mr=a.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...c}=e,s=ge(rt,n),l=we(rt,n),u=s.value===r,[d,p]=a.useState(i??""),[h,v]=a.useState(!1),x=K(t,g=>{var y;return(y=l.itemRefCallback)==null?void 0:y.call(l,g,r,o)}),f=Lt(),m=a.useRef("touch"),w=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return S.jsx(ks,{scope:n,value:r,disabled:o,textId:f,isSelected:u,onItemTextChange:a.useCallback(g=>{p(y=>y||((g==null?void 0:g.textContent)??"").trim())},[]),children:S.jsx(lt.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:S.jsx(U.div,{role:"option","aria-labelledby":f,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...c,ref:x,onFocus:z(c.onFocus,()=>v(!0)),onBlur:z(c.onBlur,()=>v(!1)),onClick:z(c.onClick,()=>{m.current!=="mouse"&&w()}),onPointerUp:z(c.onPointerUp,()=>{m.current==="mouse"&&w()}),onPointerDown:z(c.onPointerDown,g=>{m.current=g.pointerType}),onPointerMove:z(c.onPointerMove,g=>{var y;m.current=g.pointerType,o?(y=l.onItemLeave)==null||y.call(l):m.current==="mouse"&&g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:z(c.onPointerLeave,g=>{var y;g.currentTarget===document.activeElement&&((y=l.onItemLeave)==null||y.call(l))}),onKeyDown:z(c.onKeyDown,g=>{var b;((b=l.searchRef)==null?void 0:b.current)!==""&&g.key===" "||(xs.includes(g.key)&&w(),g.key===" "&&g.preventDefault())})})})})});mr.displayName=rt;var Be="SelectItemText",hr=a.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,c=ge(Be,n),s=we(Be,n),l=pr(Be,n),u=Es(Be,n),[d,p]=a.useState(null),h=K(t,w=>p(w),l.onItemTextChange,w=>{var g;return(g=s.itemTextRefCallback)==null?void 0:g.call(s,w,l.value,l.disabled)}),v=d==null?void 0:d.textContent,x=a.useMemo(()=>S.jsx("option",{value:l.value,disabled:l.disabled,children:v},l.value),[l.disabled,l.value,v]),{onNativeOptionAdd:f,onNativeOptionRemove:m}=u;return X(()=>(f(x),()=>m(x)),[f,m,x]),S.jsxs(S.Fragment,{children:[S.jsx(U.span,{id:l.textId,...i,ref:h}),l.isSelected&&c.valueNode&&!c.valueNodeHasChildren?ot.createPortal(i.children,c.valueNode):null]})});hr.displayName=Be;var vr="SelectItemIndicator",gr=a.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return pr(vr,n).isSelected?S.jsx(U.span,{"aria-hidden":!0,...r,ref:t}):null});gr.displayName=vr;var Ot="SelectScrollUpButton",wr=a.forwardRef((e,t)=>{const n=we(Ot,e.__scopeSelect),r=$t(Ot,e.__scopeSelect),[o,i]=a.useState(!1),c=K(t,r.onScrollButtonChange);return X(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=l.scrollTop>0;i(u)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?S.jsx(xr,{...e,ref:c,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});wr.displayName=Ot;var It="SelectScrollDownButton",yr=a.forwardRef((e,t)=>{const n=we(It,e.__scopeSelect),r=$t(It,e.__scopeSelect),[o,i]=a.useState(!1),c=K(t,r.onScrollButtonChange);return X(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;i(d)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?S.jsx(xr,{...e,ref:c,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});yr.displayName=It;var xr=a.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=we("SelectScrollButton",n),c=a.useRef(null),s=ut(n),l=a.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return a.useEffect(()=>()=>l(),[l]),X(()=>{var d;const u=s().find(p=>p.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[s]),S.jsx(U.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:z(o.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:z(o.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:z(o.onPointerLeave,()=>{l()})})}),js="SelectSeparator",Fs=a.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return S.jsx(U.div,{"aria-hidden":!0,...r,ref:t})});Fs.displayName=js;var Nt="SelectArrow",Bs=a.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ft(n),i=ge(Nt,n),c=we(Nt,n);return i.open&&c.position==="popper"?S.jsx(Pi,{...o,...r,ref:t}):null});Bs.displayName=Nt;var Ws="SelectBubbleInput",Sr=a.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=a.useRef(null),i=K(r,o),c=Ni(t);return a.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(c!==t&&d){const p=new Event("change",{bubbles:!0});d.call(s,t),s.dispatchEvent(p)}},[c,t]),S.jsx(U.select,{...n,style:{...Un,...n.style},ref:i,defaultValue:t})});Sr.displayName=Ws;function br(e){return e===""||e===void 0}function Cr(e){const t=xe(e),n=a.useRef(""),r=a.useRef(0),o=a.useCallback(c=>{const s=n.current+c;t(s),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),i=a.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return a.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function Er(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let c=Hs(e,Math.max(i,0));o.length===1&&(c=c.filter(u=>u!==n));const l=c.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Hs(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Vs=Jn,$s=tr,Us=rr,zs=or,Ks=ir,Ys=sr,Xs=ur,Zs=mr,Gs=hr,qs=gr,Qs=wr,Js=yr;const ec=ce.forwardRef(function({list:t=[],required:n=!1,disabled:r=!1,autoFocus:o=!1,size:i=Q.md,name:c,value:s="default",className:l,onChange:u},d){const p=t.find(h=>h.value===s)??t[0]??{value:s};return r=r||t.length<2,S.jsxs(Vs,{name:c,value:p.value,disabled:r,required:n,onValueChange:u,children:[S.jsxs($s,{ref:d,className:me(l,r&&"opacity-50 cursor-not-allowed"),autoFocus:o,children:[S.jsx(Us,{}),S.jsx(zs,{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-1",children:S.jsx(kr,{className:"w-4","aria-hidden":"true"})})]}),S.jsx(Ks,{children:S.jsxs(Ys,{className:me("overflow-auto rounded-md bg-theme p-1 shadow-2xl border-2 border-neutral-200 dark:border-neutral-700 ring-opacity-5 focus:outline-none",i===Q.sm&&"text-xs",i===Q.md&&"text-sm",i===Q.lg&&"text-sm"),children:[S.jsx(Qs,{className:"flex items-center justify-center h-3 cursor-default",children:S.jsx(Fr,{className:"w-4","aria-hidden":"true"})}),S.jsx(Xs,{className:"p-1",children:t.map(({text:h,value:v})=>S.jsx(tc,{value:v,children:h},v))}),S.jsx(Js,{className:"flex items-center justify-center h-3 cursor-default",children:S.jsx(Dr,{className:"w-4","aria-hidden":"true"})})]})})]})});function tc({disabled:e=!1,value:t,children:n,className:r}){return S.jsxs(Zs,{value:t,className:me("leading-none rounded-md flex items-center h-[25px] pr-[35px] pl-[25px] relative select-none data-[disabled]:pointer-events-none data-[highlighted]:outline-none data-[highlighted]:bg-brand-500 data-[highlighted]:text-brand-100",e&&"opacity-50 cursor-not-allowed",r),children:[S.jsx(Gs,{children:n}),S.jsx(qs,{className:"absolute left-0 w-4 inline-flex items-center justify-center",children:S.jsx(Mr,{})})]})}function dt({label:e,info:t,size:n=Q.md,className:r,children:o,disabled:i=!1,required:c=!1,autoFocus:s=!1}){const l=me("text-left relative block bg-theme-lighter border-neutral-200 dark:border-neutral-700","focus:outline-none focus:border-secondary-500","ring-secondary-300 ring-opacity-60 ring-offset ring-offset-secondary-100",n===Q.sm&&"px-2 py-0.5 text-xs leading-4 border-2 focus:ring-2 rounded-[0.25rem] min-w-[7rem]",n===Q.md&&"px-3 py-2 text-sm leading-4 border-2 focus:ring-4 rounded-md min-w-[10rem]",n===Q.lg&&"px-3 py-2 text-sm leading-6 border-2 focus:ring-4 rounded-md min-w-[10rem]");return S.jsxs("div",{className:me("inline-block relative m-1 text-left",i&&"opacity-50 cursor-not-allowed",r),children:[Ut(e)&&S.jsx(Rr,{size:n,children:e}),typeof o=="function"?o({disabled:i,required:c,autoFocus:s,size:n,className:l}):o,Ut(t)&&S.jsx(Pr,{children:t})]})}function Rr({htmlFor:e,className:t,children:n,size:r=Q.md}){return S.jsx("label",{htmlFor:e,className:me("block mb-1 px-2 text-sm whitespace-nowrap",r===Q.sm&&"text-xs",r===Q.md&&"text-sm",r===Q.lg&&"text-md",t),children:n})}function Pr({className:e,children:t}){return S.jsx("small",{className:me("block text-xs mt-1 px-3 text-neutral-400 dark:text-neutral-600",e),children:t})}dt.Label=Rr;dt.Info=Pr;dt.Textfield=Br;dt.Selector=ec;export{Ei as A,Ri as C,wn as D,xn as F,dt as I,U as P,Qn as R,X as a,Yr as b,Mt as c,Lt as d,z as e,Zr as f,ln as g,xe as h,Dn as i,ji as j,so as k,Qe as l,Pi as m,Hr as n,qr as o,Ci as p,$n as q,kr as r,Fr as s,Dr as t,K as u,Mr as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as u,U as c,a as n,w as a,j as s,e as f}from"./index-CkIQhGgw.js";import{L as g}from"./context-Dx2o1ZRq.js";import x from"./ModelLineage-CB8Rie_r.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./index-COQuzlwN.js";import"./editor-Dj_6cws7.js";import"./file-Bs2Eq56_.js";import"./project-XFpF0AcJ.js";import"./help-6Q7f7fjd.js";import"./SourceList-DQ72TcK1.js";import"./Input-BY5Rc3go.js";import"./index-DQbKL5-Q.js";import"./transition-B5aHgz_j.js";import"./ListboxShow-TFvq9fMB.js";import"./SearchList-BShQn9jm.js";function S(){const l=u(),{modelName:t}=c(),i=n(e=>e.models),o=n(e=>e.lastSelectedModel),r=a(t)||t===(o==null?void 0:o.name)?o:i.get(encodeURI(t));function d(e){const m=i.get(e);a(m)||l(f.LineageModels+"/"+m.name)}function p(e){console.log(e==null?void 0:e.message)}return s.jsx("div",{className:"flex overflow-hidden w-full h-full",children:s.jsx(g,{showColumns:!0,handleClickModel:d,handleError:p,children:s.jsx(x,{model:r})})})}export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u,R as Q,j as S,b as Oe,c as _}from"./index-KZcJd7F1.js";import{R as oe,i as P,o as f,U as E,y as k,u as F,r as Se,J as Le,K as we,p as H,H as Ie,k as q,b as Te,F as De,c as $e,C,I as V,h as X,j as Fe,G as Pe,z as g,A as Ee,T as ke,x as ee,P as Ce,D as je}from"./transition-C8EjNcgL.js";import{n as Ne,p as Ae}from"./Input-CYm3h-zG.js";function Me({title:e,titleId:r,...t},o){return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},t),e?u.createElement("title",{id:r},e):null,u.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"}))}const Be=u.forwardRef(Me);function ae(e,r){let[t,o]=u.useState(e),a=oe(e);return P(()=>o(a.current),[a,o,...r]),t}function Ue(e,r,t){let[o,a]=u.useState(t),n=e!==void 0,l=u.useRef(n),s=u.useRef(!1),p=u.useRef(!1);return n&&!l.current&&!s.current?(s.current=!0,l.current=n,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.")):!n&&l.current&&!p.current&&(p.current=!0,l.current=n,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.")),[n?e:o,f(v=>(n||a(v),r==null?void 0:r(v)))]}function te(e){return[e.screenX,e.screenY]}function Qe(){let e=u.useRef([-1,-1]);return{wasMoved(r){let t=te(r);return e.current[0]===t[0]&&e.current[1]===t[1]?!1:(e.current=t,!0)},update(r){e.current=te(r)}}}function ze(e){throw new Error("Unexpected object: "+e)}var L=(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))(L||{});function He(e,r){let t=r.resolveItems();if(t.length<=0)return null;let o=r.resolveActiveIndex(),a=o??-1;switch(e.focus){case 0:{for(let n=0;n<t.length;++n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 1:{for(let n=a-1;n>=0;--n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 2:{for(let n=a+1;n<t.length;++n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 3:{for(let n=t.length-1;n>=0;--n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 4:{for(let n=0;n<t.length;++n)if(r.resolveId(t[n],n,t)===e.id)return n;return o}case 5:return null;default:ze(e)}}function le(e={},r=null,t=[]){for(let[o,a]of Object.entries(e))se(t,ie(r,o),a);return t}function ie(e,r){return e?e+"["+r+"]":r}function se(e,r,t){if(Array.isArray(t))for(let[o,a]of t.entries())se(e,ie(r,o.toString()),a);else t instanceof Date?e.push([r,t.toISOString()]):typeof t=="boolean"?e.push([r,t?"1":"0"]):typeof t=="string"?e.push([r,t]):typeof t=="number"?e.push([r,`${t}`]):t==null?e.push([r,""]):le(t,r,e)}function gt(e){var r,t;let o=(r=e==null?void 0:e.form)!=null?r:e.closest("form");if(o){for(let a of o.elements)if(a!==e&&(a.tagName==="INPUT"&&a.type==="submit"||a.tagName==="BUTTON"&&a.type==="submit"||a.nodeName==="INPUT"&&a.type==="image")){a.click();return}(t=o.requestSubmit)==null||t.call(o)}}let re=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ne(e){var r,t;let o=(r=e.innerText)!=null?r:"",a=e.cloneNode(!0);if(!(a instanceof HTMLElement))return o;let n=!1;for(let s of a.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),n=!0;let l=n?(t=a.innerText)!=null?t:"":o;return re.test(l)&&(l=l.replace(re,"")),l}function qe(e){let r=e.getAttribute("aria-label");if(typeof r=="string")return r.trim();let t=e.getAttribute("aria-labelledby");if(t){let o=t.split(" ").map(a=>{let n=document.getElementById(a);if(n){let l=n.getAttribute("aria-label");return typeof l=="string"?l.trim():ne(n).trim()}return null}).filter(Boolean);if(o.length>0)return o.join(", ")}return ne(e).trim()}function Ve(e){let r=u.useRef(""),t=u.useRef("");return f(()=>{let o=e.current;if(!o)return"";let a=o.innerText;if(r.current===a)return t.current;let n=qe(o).trim().toLowerCase();return r.current=a,t.current=n,n})}var Ge=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ge||{}),Ke=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Ke||{}),We=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(We||{}),Xe=(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.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.RegisterLabel=7]="RegisterLabel",e))(Xe||{});function W(e,r=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,o=Ce(r(e.options.slice()),n=>n.dataRef.current.domRef.current),a=t?o.indexOf(t):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let Ze={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let r=e.activeOptionIndex,{isSelected:t}=e.dataRef.current,o=e.options.findIndex(a=>t(a.dataRef.current.value));return o!==-1&&(r=o),{...e,listboxState:0,activeOptionIndex:r}},2(e,r){var t;if(e.dataRef.current.disabled||e.listboxState===1)return e;let o=W(e),a=He(r,{resolveItems:()=>o.options,resolveActiveIndex:()=>o.activeOptionIndex,resolveId:n=>n.id,resolveDisabled:n=>n.dataRef.current.disabled});return{...e,...o,searchQuery:"",activeOptionIndex:a,activationTrigger:(t=r.trigger)!=null?t:1}},3:(e,r)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let t=e.searchQuery!==""?0:1,o=e.searchQuery+r.value.toLowerCase(),a=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+t).concat(e.options.slice(0,e.activeOptionIndex+t)):e.options).find(l=>{var s;return!l.dataRef.current.disabled&&((s=l.dataRef.current.textValue)==null?void 0:s.startsWith(o))}),n=a?e.options.indexOf(a):-1;return n===-1||n===e.activeOptionIndex?{...e,searchQuery:o}:{...e,searchQuery:o,activeOptionIndex:n,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,r)=>{let t={id:r.id,dataRef:r.dataRef},o=W(e,a=>[...a,t]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(r.dataRef.current.value)&&(o.activeOptionIndex=o.options.indexOf(t)),{...e,...o}},6:(e,r)=>{let t=W(e,o=>{let a=o.findIndex(n=>n.id===r.id);return a!==-1&&o.splice(a,1),o});return{...e,...t,activationTrigger:1}},7:(e,r)=>({...e,labelId:r.id})},Z=u.createContext(null);Z.displayName="ListboxActionsContext";function j(e){let r=u.useContext(Z);if(r===null){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,j),t}return r}let J=u.createContext(null);J.displayName="ListboxDataContext";function N(e){let r=u.useContext(J);if(r===null){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,N),t}return r}function Je(e,r){return F(r.type,Ze,e,r)}let Ye=u.Fragment;function _e(e,r){let{value:t,defaultValue:o,form:a,name:n,onChange:l,by:s=(c,d)=>c===d,disabled:p=!1,horizontal:v=!1,multiple:h=!1,...I}=e;const $=v?"horizontal":"vertical";let T=k(r),[R=h?[]:void 0,w]=Ue(t,l,o),[x,i]=u.useReducer(Je,{dataRef:u.createRef(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),m=u.useRef({static:!1,hold:!1}),A=u.useRef(null),M=u.useRef(null),G=u.useRef(null),y=f(typeof s=="string"?(c,d)=>{let O=s;return(c==null?void 0:c[O])===(d==null?void 0:d[O])}:s),D=u.useCallback(c=>F(b.mode,{1:()=>R.some(d=>y(d,c)),0:()=>y(R,c)}),[R]),b=u.useMemo(()=>({...x,value:R,disabled:p,mode:h?1:0,orientation:$,compare:y,isSelected:D,optionsPropsRef:m,labelRef:A,buttonRef:M,optionsRef:G}),[R,p,h,x]);P(()=>{x.dataRef.current=b},[b]),Se([b.buttonRef,b.optionsRef],(c,d)=>{var O;i({type:1}),Le(d,we.Loose)||(c.preventDefault(),(O=b.buttonRef.current)==null||O.focus())},b.listboxState===0);let ue=u.useMemo(()=>({open:b.listboxState===0,disabled:p,value:R}),[b,p,R]),ce=f(c=>{let d=b.options.find(O=>O.id===c);d&&K(d.dataRef.current.value)}),de=f(()=>{if(b.activeOptionIndex!==null){let{dataRef:c,id:d}=b.options[b.activeOptionIndex];K(c.current.value),i({type:2,focus:L.Specific,id:d})}}),fe=f(()=>i({type:0})),pe=f(()=>i({type:1})),be=f((c,d,O)=>c===L.Specific?i({type:2,focus:L.Specific,id:d,trigger:O}):i({type:2,focus:c,trigger:O})),ve=f((c,d)=>(i({type:5,id:c,dataRef:d}),()=>i({type:6,id:c}))),xe=f(c=>(i({type:7,id:c}),()=>i({type:7,id:null}))),K=f(c=>F(b.mode,{0(){return w==null?void 0:w(c)},1(){let d=b.value.slice(),O=d.findIndex(U=>y(U,c));return O===-1?d.push(c):d.splice(O,1),w==null?void 0:w(d)}})),me=f(c=>i({type:3,value:c})),ge=f(()=>i({type:4})),he=u.useMemo(()=>({onChange:K,registerOption:ve,registerLabel:xe,goToOption:be,closeListbox:pe,openListbox:fe,selectActiveOption:de,selectOption:ce,search:me,clearSearch:ge}),[]),Re={ref:T},B=u.useRef(null),ye=H();return u.useEffect(()=>{B.current&&o!==void 0&&ye.addEventListener(B.current,"reset",()=>{w==null||w(o)})},[B,w]),Q.createElement(Z.Provider,{value:he},Q.createElement(J.Provider,{value:b},Q.createElement(Ie,{value:F(b.listboxState,{0:q.Open,1:q.Closed})},n!=null&&R!=null&&le({[n]:R}).map(([c,d],O)=>Q.createElement(Te,{features:$e.Hidden,ref:O===0?U=>{var Y;B.current=(Y=U==null?void 0:U.closest("form"))!=null?Y:null}:void 0,...De({key:c,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:a,disabled:p,name:c,value:d})})),C({ourProps:Re,theirProps:I,slot:ue,defaultTag:Ye,name:"Listbox"}))))}let et="button";function tt(e,r){var t;let o=V(),{id:a=`headlessui-listbox-button-${o}`,...n}=e,l=N("Listbox.Button"),s=j("Listbox.Button"),p=k(l.buttonRef,r),v=H(),h=f(x=>{switch(x.key){case g.Space:case g.Enter:case g.ArrowDown:x.preventDefault(),s.openListbox(),v.nextFrame(()=>{l.value||s.goToOption(L.First)});break;case g.ArrowUp:x.preventDefault(),s.openListbox(),v.nextFrame(()=>{l.value||s.goToOption(L.Last)});break}}),I=f(x=>{switch(x.key){case g.Space:x.preventDefault();break}}),$=f(x=>{if(Ee(x.currentTarget))return x.preventDefault();l.listboxState===0?(s.closeListbox(),v.nextFrame(()=>{var i;return(i=l.buttonRef.current)==null?void 0:i.focus({preventScroll:!0})})):(x.preventDefault(),s.openListbox())}),T=ae(()=>{if(l.labelId)return[l.labelId,a].join(" ")},[l.labelId,a]),R=u.useMemo(()=>({open:l.listboxState===0,disabled:l.disabled,value:l.value}),[l]),w={ref:p,id:a,type:ke(e,l.buttonRef),"aria-haspopup":"listbox","aria-controls":(t=l.optionsRef.current)==null?void 0:t.id,"aria-expanded":l.listboxState===0,"aria-labelledby":T,disabled:l.disabled,onKeyDown:h,onKeyUp:I,onClick:$};return C({ourProps:w,theirProps:n,slot:R,defaultTag:et,name:"Listbox.Button"})}let rt="label";function nt(e,r){let t=V(),{id:o=`headlessui-listbox-label-${t}`,...a}=e,n=N("Listbox.Label"),l=j("Listbox.Label"),s=k(n.labelRef,r);P(()=>l.registerLabel(o),[o]);let p=f(()=>{var h;return(h=n.buttonRef.current)==null?void 0:h.focus({preventScroll:!0})}),v=u.useMemo(()=>({open:n.listboxState===0,disabled:n.disabled}),[n]);return C({ourProps:{ref:s,id:o,onClick:p},theirProps:a,slot:v,defaultTag:rt,name:"Listbox.Label"})}let ot="ul",at=ee.RenderStrategy|ee.Static;function lt(e,r){var t;let o=V(),{id:a=`headlessui-listbox-options-${o}`,...n}=e,l=N("Listbox.Options"),s=j("Listbox.Options"),p=k(l.optionsRef,r),v=H(),h=H(),I=Fe(),$=I!==null?(I&q.Open)===q.Open:l.listboxState===0;u.useEffect(()=>{var i;let m=l.optionsRef.current;m&&l.listboxState===0&&m!==((i=Pe(m))==null?void 0:i.activeElement)&&m.focus({preventScroll:!0})},[l.listboxState,l.optionsRef]);let T=f(i=>{switch(h.dispose(),i.key){case g.Space:if(l.searchQuery!=="")return i.preventDefault(),i.stopPropagation(),s.search(i.key);case g.Enter:if(i.preventDefault(),i.stopPropagation(),l.activeOptionIndex!==null){let{dataRef:m}=l.options[l.activeOptionIndex];s.onChange(m.current.value)}l.mode===0&&(s.closeListbox(),X().nextFrame(()=>{var m;return(m=l.buttonRef.current)==null?void 0:m.focus({preventScroll:!0})}));break;case F(l.orientation,{vertical:g.ArrowDown,horizontal:g.ArrowRight}):return i.preventDefault(),i.stopPropagation(),s.goToOption(L.Next);case F(l.orientation,{vertical:g.ArrowUp,horizontal:g.ArrowLeft}):return i.preventDefault(),i.stopPropagation(),s.goToOption(L.Previous);case g.Home:case g.PageUp:return i.preventDefault(),i.stopPropagation(),s.goToOption(L.First);case g.End:case g.PageDown:return i.preventDefault(),i.stopPropagation(),s.goToOption(L.Last);case g.Escape:return i.preventDefault(),i.stopPropagation(),s.closeListbox(),v.nextFrame(()=>{var m;return(m=l.buttonRef.current)==null?void 0:m.focus({preventScroll:!0})});case g.Tab:i.preventDefault(),i.stopPropagation();break;default:i.key.length===1&&(s.search(i.key),h.setTimeout(()=>s.clearSearch(),350));break}}),R=ae(()=>{var i;return(i=l.buttonRef.current)==null?void 0:i.id},[l.buttonRef.current]),w=u.useMemo(()=>({open:l.listboxState===0}),[l]),x={"aria-activedescendant":l.activeOptionIndex===null||(t=l.options[l.activeOptionIndex])==null?void 0:t.id,"aria-multiselectable":l.mode===1?!0:void 0,"aria-labelledby":R,"aria-orientation":l.orientation,id:a,onKeyDown:T,role:"listbox",tabIndex:0,ref:p};return C({ourProps:x,theirProps:n,slot:w,defaultTag:ot,features:at,visible:$,name:"Listbox.Options"})}let it="li";function st(e,r){let t=V(),{id:o=`headlessui-listbox-option-${t}`,disabled:a=!1,value:n,...l}=e,s=N("Listbox.Option"),p=j("Listbox.Option"),v=s.activeOptionIndex!==null?s.options[s.activeOptionIndex].id===o:!1,h=s.isSelected(n),I=u.useRef(null),$=Ve(I),T=oe({disabled:a,value:n,domRef:I,get textValue(){return $()}}),R=k(r,I);P(()=>{if(s.listboxState!==0||!v||s.activationTrigger===0)return;let y=X();return y.requestAnimationFrame(()=>{var D,b;(b=(D=I.current)==null?void 0:D.scrollIntoView)==null||b.call(D,{block:"nearest"})}),y.dispose},[I,v,s.listboxState,s.activationTrigger,s.activeOptionIndex]),P(()=>p.registerOption(o,T),[T,o]);let w=f(y=>{if(a)return y.preventDefault();p.onChange(n),s.mode===0&&(p.closeListbox(),X().nextFrame(()=>{var D;return(D=s.buttonRef.current)==null?void 0:D.focus({preventScroll:!0})}))}),x=f(()=>{if(a)return p.goToOption(L.Nothing);p.goToOption(L.Specific,o)}),i=Qe(),m=f(y=>i.update(y)),A=f(y=>{i.wasMoved(y)&&(a||v||p.goToOption(L.Specific,o,0))}),M=f(y=>{i.wasMoved(y)&&(a||v&&p.goToOption(L.Nothing))}),G=u.useMemo(()=>({active:v,selected:h,disabled:a}),[v,h,a]);return C({ourProps:{id:o,ref:R,role:"option",tabIndex:a===!0?void 0:-1,"aria-disabled":a===!0?!0:void 0,"aria-selected":h,disabled:void 0,onClick:w,onFocus:x,onPointerEnter:m,onMouseEnter:m,onPointerMove:A,onMouseMove:A,onPointerLeave:M,onMouseLeave:M},theirProps:l,slot:G,defaultTag:it,name:"Listbox.Option"})}let ut=E(_e),ct=E(tt),dt=E(nt),ft=E(lt),pt=E(st),z=Object.assign(ut,{Button:ct,Label:dt,Options:ft,Option:pt});function bt({title:e,titleId:r,...t},o){return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},t),e?u.createElement("title",{id:r},e):null,u.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z",clipRule:"evenodd"}))}const ht=u.forwardRef(bt);function Rt({options:e,value:r=[]}){const[t,o]=u.useState([]);return u.useEffect(()=>{o(r)},[r]),S.jsx(z,{value:t,onChange:a=>{var n;o(a);for(const l in e)(n=e[l])==null||n.call(e,a.includes(l))},multiple:!0,children:S.jsxs("div",{className:"relative flex",children:[S.jsxs(z.Button,{className:"flex items-center relative w-full bg-primary-10 text-xs rounded-full text-primary-500 py-1 px-2 text-center focus:outline-none focus-visible:border-accent-500 focus-visible:ring-2 focus-visible:ring-light focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-brand-300 cursor-pointer",children:[S.jsxs("span",{className:"flex truncate items-center",children:[S.jsx(Be,{className:"h-3 w-3 mr-0 sm:mr-1"})," ",S.jsx("span",{className:"sr-only sm:not-sr-only",children:"Show"})]}),S.jsx(Ne,{className:"ml-2 h-4 w-4","aria-hidden":"true"})]}),S.jsx(je,{as:u.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:S.jsx(z.Options,{className:"absolute top-8 right-0 z-50 max-h-60 min-w-16 overflow-auto rounded-md bg-theme py-2 shadow-lg ring-2 ring-primary-10 ring-opacity-5 focus:outline-none sm:text-sm",children:Object.keys(e).filter(a=>e[a]).map(a=>S.jsx(z.Option,{className:({active:n,disabled:l})=>_("relative cursor-default select-none py-1 pl-10 pr-4",l?"opacity-50 cursor-not-allowed":"",n?"bg-primary-10 text-primary-500":"text-neutral-700 dark:text-neutral-300"),value:a,disabled:Oe(!!e[a]),children:({selected:n})=>S.jsxs(S.Fragment,{children:[S.jsx("span",{children:a}),S.jsx("span",{className:_("absolute inset-y-0 left-0 flex items-center pl-3 text-primary-500",n?"block":"hidden"),children:S.jsx(Ae,{className:"h-4 w-4","aria-hidden":"true"})})]})},a))})})]})})}export{ht as F,Rt as L,Ue as T,L as c,le as e,He as f,gt as p,Ve as s,Qe as u};
|
|
1
|
+
import{r as u,R as Q,j as S,b as Oe,c as _}from"./index-CkIQhGgw.js";import{R as oe,i as P,o as f,U as E,y as k,u as F,r as Se,J as Le,K as we,p as H,H as Ie,k as q,b as Te,F as De,c as $e,C,I as V,h as X,j as Fe,G as Pe,z as g,A as Ee,T as ke,x as ee,P as Ce,D as je}from"./transition-B5aHgz_j.js";import{t as Ne,v as Ae}from"./Input-BY5Rc3go.js";function Me({title:e,titleId:r,...t},o){return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},t),e?u.createElement("title",{id:r},e):null,u.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"}))}const Be=u.forwardRef(Me);function ae(e,r){let[t,o]=u.useState(e),a=oe(e);return P(()=>o(a.current),[a,o,...r]),t}function Ue(e,r,t){let[o,a]=u.useState(t),n=e!==void 0,l=u.useRef(n),s=u.useRef(!1),p=u.useRef(!1);return n&&!l.current&&!s.current?(s.current=!0,l.current=n,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.")):!n&&l.current&&!p.current&&(p.current=!0,l.current=n,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.")),[n?e:o,f(v=>(n||a(v),r==null?void 0:r(v)))]}function te(e){return[e.screenX,e.screenY]}function Qe(){let e=u.useRef([-1,-1]);return{wasMoved(r){let t=te(r);return e.current[0]===t[0]&&e.current[1]===t[1]?!1:(e.current=t,!0)},update(r){e.current=te(r)}}}function ze(e){throw new Error("Unexpected object: "+e)}var L=(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))(L||{});function He(e,r){let t=r.resolveItems();if(t.length<=0)return null;let o=r.resolveActiveIndex(),a=o??-1;switch(e.focus){case 0:{for(let n=0;n<t.length;++n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 1:{for(let n=a-1;n>=0;--n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 2:{for(let n=a+1;n<t.length;++n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 3:{for(let n=t.length-1;n>=0;--n)if(!r.resolveDisabled(t[n],n,t))return n;return o}case 4:{for(let n=0;n<t.length;++n)if(r.resolveId(t[n],n,t)===e.id)return n;return o}case 5:return null;default:ze(e)}}function le(e={},r=null,t=[]){for(let[o,a]of Object.entries(e))se(t,ie(r,o),a);return t}function ie(e,r){return e?e+"["+r+"]":r}function se(e,r,t){if(Array.isArray(t))for(let[o,a]of t.entries())se(e,ie(r,o.toString()),a);else t instanceof Date?e.push([r,t.toISOString()]):typeof t=="boolean"?e.push([r,t?"1":"0"]):typeof t=="string"?e.push([r,t]):typeof t=="number"?e.push([r,`${t}`]):t==null?e.push([r,""]):le(t,r,e)}function gt(e){var r,t;let o=(r=e==null?void 0:e.form)!=null?r:e.closest("form");if(o){for(let a of o.elements)if(a!==e&&(a.tagName==="INPUT"&&a.type==="submit"||a.tagName==="BUTTON"&&a.type==="submit"||a.nodeName==="INPUT"&&a.type==="image")){a.click();return}(t=o.requestSubmit)==null||t.call(o)}}let re=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ne(e){var r,t;let o=(r=e.innerText)!=null?r:"",a=e.cloneNode(!0);if(!(a instanceof HTMLElement))return o;let n=!1;for(let s of a.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),n=!0;let l=n?(t=a.innerText)!=null?t:"":o;return re.test(l)&&(l=l.replace(re,"")),l}function qe(e){let r=e.getAttribute("aria-label");if(typeof r=="string")return r.trim();let t=e.getAttribute("aria-labelledby");if(t){let o=t.split(" ").map(a=>{let n=document.getElementById(a);if(n){let l=n.getAttribute("aria-label");return typeof l=="string"?l.trim():ne(n).trim()}return null}).filter(Boolean);if(o.length>0)return o.join(", ")}return ne(e).trim()}function Ve(e){let r=u.useRef(""),t=u.useRef("");return f(()=>{let o=e.current;if(!o)return"";let a=o.innerText;if(r.current===a)return t.current;let n=qe(o).trim().toLowerCase();return r.current=a,t.current=n,n})}var Ge=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ge||{}),Ke=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Ke||{}),We=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(We||{}),Xe=(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.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.RegisterLabel=7]="RegisterLabel",e))(Xe||{});function W(e,r=t=>t){let t=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,o=Ce(r(e.options.slice()),n=>n.dataRef.current.domRef.current),a=t?o.indexOf(t):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let Ze={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let r=e.activeOptionIndex,{isSelected:t}=e.dataRef.current,o=e.options.findIndex(a=>t(a.dataRef.current.value));return o!==-1&&(r=o),{...e,listboxState:0,activeOptionIndex:r}},2(e,r){var t;if(e.dataRef.current.disabled||e.listboxState===1)return e;let o=W(e),a=He(r,{resolveItems:()=>o.options,resolveActiveIndex:()=>o.activeOptionIndex,resolveId:n=>n.id,resolveDisabled:n=>n.dataRef.current.disabled});return{...e,...o,searchQuery:"",activeOptionIndex:a,activationTrigger:(t=r.trigger)!=null?t:1}},3:(e,r)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let t=e.searchQuery!==""?0:1,o=e.searchQuery+r.value.toLowerCase(),a=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+t).concat(e.options.slice(0,e.activeOptionIndex+t)):e.options).find(l=>{var s;return!l.dataRef.current.disabled&&((s=l.dataRef.current.textValue)==null?void 0:s.startsWith(o))}),n=a?e.options.indexOf(a):-1;return n===-1||n===e.activeOptionIndex?{...e,searchQuery:o}:{...e,searchQuery:o,activeOptionIndex:n,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,r)=>{let t={id:r.id,dataRef:r.dataRef},o=W(e,a=>[...a,t]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(r.dataRef.current.value)&&(o.activeOptionIndex=o.options.indexOf(t)),{...e,...o}},6:(e,r)=>{let t=W(e,o=>{let a=o.findIndex(n=>n.id===r.id);return a!==-1&&o.splice(a,1),o});return{...e,...t,activationTrigger:1}},7:(e,r)=>({...e,labelId:r.id})},Z=u.createContext(null);Z.displayName="ListboxActionsContext";function j(e){let r=u.useContext(Z);if(r===null){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,j),t}return r}let J=u.createContext(null);J.displayName="ListboxDataContext";function N(e){let r=u.useContext(J);if(r===null){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,N),t}return r}function Je(e,r){return F(r.type,Ze,e,r)}let Ye=u.Fragment;function _e(e,r){let{value:t,defaultValue:o,form:a,name:n,onChange:l,by:s=(c,d)=>c===d,disabled:p=!1,horizontal:v=!1,multiple:h=!1,...I}=e;const $=v?"horizontal":"vertical";let T=k(r),[R=h?[]:void 0,w]=Ue(t,l,o),[x,i]=u.useReducer(Je,{dataRef:u.createRef(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),m=u.useRef({static:!1,hold:!1}),A=u.useRef(null),M=u.useRef(null),G=u.useRef(null),y=f(typeof s=="string"?(c,d)=>{let O=s;return(c==null?void 0:c[O])===(d==null?void 0:d[O])}:s),D=u.useCallback(c=>F(b.mode,{1:()=>R.some(d=>y(d,c)),0:()=>y(R,c)}),[R]),b=u.useMemo(()=>({...x,value:R,disabled:p,mode:h?1:0,orientation:$,compare:y,isSelected:D,optionsPropsRef:m,labelRef:A,buttonRef:M,optionsRef:G}),[R,p,h,x]);P(()=>{x.dataRef.current=b},[b]),Se([b.buttonRef,b.optionsRef],(c,d)=>{var O;i({type:1}),Le(d,we.Loose)||(c.preventDefault(),(O=b.buttonRef.current)==null||O.focus())},b.listboxState===0);let ue=u.useMemo(()=>({open:b.listboxState===0,disabled:p,value:R}),[b,p,R]),ce=f(c=>{let d=b.options.find(O=>O.id===c);d&&K(d.dataRef.current.value)}),de=f(()=>{if(b.activeOptionIndex!==null){let{dataRef:c,id:d}=b.options[b.activeOptionIndex];K(c.current.value),i({type:2,focus:L.Specific,id:d})}}),fe=f(()=>i({type:0})),pe=f(()=>i({type:1})),be=f((c,d,O)=>c===L.Specific?i({type:2,focus:L.Specific,id:d,trigger:O}):i({type:2,focus:c,trigger:O})),ve=f((c,d)=>(i({type:5,id:c,dataRef:d}),()=>i({type:6,id:c}))),xe=f(c=>(i({type:7,id:c}),()=>i({type:7,id:null}))),K=f(c=>F(b.mode,{0(){return w==null?void 0:w(c)},1(){let d=b.value.slice(),O=d.findIndex(U=>y(U,c));return O===-1?d.push(c):d.splice(O,1),w==null?void 0:w(d)}})),me=f(c=>i({type:3,value:c})),ge=f(()=>i({type:4})),he=u.useMemo(()=>({onChange:K,registerOption:ve,registerLabel:xe,goToOption:be,closeListbox:pe,openListbox:fe,selectActiveOption:de,selectOption:ce,search:me,clearSearch:ge}),[]),Re={ref:T},B=u.useRef(null),ye=H();return u.useEffect(()=>{B.current&&o!==void 0&&ye.addEventListener(B.current,"reset",()=>{w==null||w(o)})},[B,w]),Q.createElement(Z.Provider,{value:he},Q.createElement(J.Provider,{value:b},Q.createElement(Ie,{value:F(b.listboxState,{0:q.Open,1:q.Closed})},n!=null&&R!=null&&le({[n]:R}).map(([c,d],O)=>Q.createElement(Te,{features:$e.Hidden,ref:O===0?U=>{var Y;B.current=(Y=U==null?void 0:U.closest("form"))!=null?Y:null}:void 0,...De({key:c,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:a,disabled:p,name:c,value:d})})),C({ourProps:Re,theirProps:I,slot:ue,defaultTag:Ye,name:"Listbox"}))))}let et="button";function tt(e,r){var t;let o=V(),{id:a=`headlessui-listbox-button-${o}`,...n}=e,l=N("Listbox.Button"),s=j("Listbox.Button"),p=k(l.buttonRef,r),v=H(),h=f(x=>{switch(x.key){case g.Space:case g.Enter:case g.ArrowDown:x.preventDefault(),s.openListbox(),v.nextFrame(()=>{l.value||s.goToOption(L.First)});break;case g.ArrowUp:x.preventDefault(),s.openListbox(),v.nextFrame(()=>{l.value||s.goToOption(L.Last)});break}}),I=f(x=>{switch(x.key){case g.Space:x.preventDefault();break}}),$=f(x=>{if(Ee(x.currentTarget))return x.preventDefault();l.listboxState===0?(s.closeListbox(),v.nextFrame(()=>{var i;return(i=l.buttonRef.current)==null?void 0:i.focus({preventScroll:!0})})):(x.preventDefault(),s.openListbox())}),T=ae(()=>{if(l.labelId)return[l.labelId,a].join(" ")},[l.labelId,a]),R=u.useMemo(()=>({open:l.listboxState===0,disabled:l.disabled,value:l.value}),[l]),w={ref:p,id:a,type:ke(e,l.buttonRef),"aria-haspopup":"listbox","aria-controls":(t=l.optionsRef.current)==null?void 0:t.id,"aria-expanded":l.listboxState===0,"aria-labelledby":T,disabled:l.disabled,onKeyDown:h,onKeyUp:I,onClick:$};return C({ourProps:w,theirProps:n,slot:R,defaultTag:et,name:"Listbox.Button"})}let rt="label";function nt(e,r){let t=V(),{id:o=`headlessui-listbox-label-${t}`,...a}=e,n=N("Listbox.Label"),l=j("Listbox.Label"),s=k(n.labelRef,r);P(()=>l.registerLabel(o),[o]);let p=f(()=>{var h;return(h=n.buttonRef.current)==null?void 0:h.focus({preventScroll:!0})}),v=u.useMemo(()=>({open:n.listboxState===0,disabled:n.disabled}),[n]);return C({ourProps:{ref:s,id:o,onClick:p},theirProps:a,slot:v,defaultTag:rt,name:"Listbox.Label"})}let ot="ul",at=ee.RenderStrategy|ee.Static;function lt(e,r){var t;let o=V(),{id:a=`headlessui-listbox-options-${o}`,...n}=e,l=N("Listbox.Options"),s=j("Listbox.Options"),p=k(l.optionsRef,r),v=H(),h=H(),I=Fe(),$=I!==null?(I&q.Open)===q.Open:l.listboxState===0;u.useEffect(()=>{var i;let m=l.optionsRef.current;m&&l.listboxState===0&&m!==((i=Pe(m))==null?void 0:i.activeElement)&&m.focus({preventScroll:!0})},[l.listboxState,l.optionsRef]);let T=f(i=>{switch(h.dispose(),i.key){case g.Space:if(l.searchQuery!=="")return i.preventDefault(),i.stopPropagation(),s.search(i.key);case g.Enter:if(i.preventDefault(),i.stopPropagation(),l.activeOptionIndex!==null){let{dataRef:m}=l.options[l.activeOptionIndex];s.onChange(m.current.value)}l.mode===0&&(s.closeListbox(),X().nextFrame(()=>{var m;return(m=l.buttonRef.current)==null?void 0:m.focus({preventScroll:!0})}));break;case F(l.orientation,{vertical:g.ArrowDown,horizontal:g.ArrowRight}):return i.preventDefault(),i.stopPropagation(),s.goToOption(L.Next);case F(l.orientation,{vertical:g.ArrowUp,horizontal:g.ArrowLeft}):return i.preventDefault(),i.stopPropagation(),s.goToOption(L.Previous);case g.Home:case g.PageUp:return i.preventDefault(),i.stopPropagation(),s.goToOption(L.First);case g.End:case g.PageDown:return i.preventDefault(),i.stopPropagation(),s.goToOption(L.Last);case g.Escape:return i.preventDefault(),i.stopPropagation(),s.closeListbox(),v.nextFrame(()=>{var m;return(m=l.buttonRef.current)==null?void 0:m.focus({preventScroll:!0})});case g.Tab:i.preventDefault(),i.stopPropagation();break;default:i.key.length===1&&(s.search(i.key),h.setTimeout(()=>s.clearSearch(),350));break}}),R=ae(()=>{var i;return(i=l.buttonRef.current)==null?void 0:i.id},[l.buttonRef.current]),w=u.useMemo(()=>({open:l.listboxState===0}),[l]),x={"aria-activedescendant":l.activeOptionIndex===null||(t=l.options[l.activeOptionIndex])==null?void 0:t.id,"aria-multiselectable":l.mode===1?!0:void 0,"aria-labelledby":R,"aria-orientation":l.orientation,id:a,onKeyDown:T,role:"listbox",tabIndex:0,ref:p};return C({ourProps:x,theirProps:n,slot:w,defaultTag:ot,features:at,visible:$,name:"Listbox.Options"})}let it="li";function st(e,r){let t=V(),{id:o=`headlessui-listbox-option-${t}`,disabled:a=!1,value:n,...l}=e,s=N("Listbox.Option"),p=j("Listbox.Option"),v=s.activeOptionIndex!==null?s.options[s.activeOptionIndex].id===o:!1,h=s.isSelected(n),I=u.useRef(null),$=Ve(I),T=oe({disabled:a,value:n,domRef:I,get textValue(){return $()}}),R=k(r,I);P(()=>{if(s.listboxState!==0||!v||s.activationTrigger===0)return;let y=X();return y.requestAnimationFrame(()=>{var D,b;(b=(D=I.current)==null?void 0:D.scrollIntoView)==null||b.call(D,{block:"nearest"})}),y.dispose},[I,v,s.listboxState,s.activationTrigger,s.activeOptionIndex]),P(()=>p.registerOption(o,T),[T,o]);let w=f(y=>{if(a)return y.preventDefault();p.onChange(n),s.mode===0&&(p.closeListbox(),X().nextFrame(()=>{var D;return(D=s.buttonRef.current)==null?void 0:D.focus({preventScroll:!0})}))}),x=f(()=>{if(a)return p.goToOption(L.Nothing);p.goToOption(L.Specific,o)}),i=Qe(),m=f(y=>i.update(y)),A=f(y=>{i.wasMoved(y)&&(a||v||p.goToOption(L.Specific,o,0))}),M=f(y=>{i.wasMoved(y)&&(a||v&&p.goToOption(L.Nothing))}),G=u.useMemo(()=>({active:v,selected:h,disabled:a}),[v,h,a]);return C({ourProps:{id:o,ref:R,role:"option",tabIndex:a===!0?void 0:-1,"aria-disabled":a===!0?!0:void 0,"aria-selected":h,disabled:void 0,onClick:w,onFocus:x,onPointerEnter:m,onMouseEnter:m,onPointerMove:A,onMouseMove:A,onPointerLeave:M,onMouseLeave:M},theirProps:l,slot:G,defaultTag:it,name:"Listbox.Option"})}let ut=E(_e),ct=E(tt),dt=E(nt),ft=E(lt),pt=E(st),z=Object.assign(ut,{Button:ct,Label:dt,Options:ft,Option:pt});function bt({title:e,titleId:r,...t},o){return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},t),e?u.createElement("title",{id:r},e):null,u.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z",clipRule:"evenodd"}))}const ht=u.forwardRef(bt);function Rt({options:e,value:r=[]}){const[t,o]=u.useState([]);return u.useEffect(()=>{o(r)},[r]),S.jsx(z,{value:t,onChange:a=>{var n;o(a);for(const l in e)(n=e[l])==null||n.call(e,a.includes(l))},multiple:!0,children:S.jsxs("div",{className:"relative flex",children:[S.jsxs(z.Button,{className:"flex items-center relative w-full bg-primary-10 text-xs rounded-full text-primary-500 py-1 px-2 text-center focus:outline-none focus-visible:border-accent-500 focus-visible:ring-2 focus-visible:ring-light focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-brand-300 cursor-pointer",children:[S.jsxs("span",{className:"flex truncate items-center",children:[S.jsx(Be,{className:"h-3 w-3 mr-0 sm:mr-1"})," ",S.jsx("span",{className:"sr-only sm:not-sr-only",children:"Show"})]}),S.jsx(Ne,{className:"ml-2 h-4 w-4","aria-hidden":"true"})]}),S.jsx(je,{as:u.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:S.jsx(z.Options,{className:"absolute top-8 right-0 z-50 max-h-60 min-w-16 overflow-auto rounded-md bg-theme py-2 shadow-lg ring-2 ring-primary-10 ring-opacity-5 focus:outline-none sm:text-sm",children:Object.keys(e).filter(a=>e[a]).map(a=>S.jsx(z.Option,{className:({active:n,disabled:l})=>_("relative cursor-default select-none py-1 pl-10 pr-4",l?"opacity-50 cursor-not-allowed":"",n?"bg-primary-10 text-primary-500":"text-neutral-700 dark:text-neutral-300"),value:a,disabled:Oe(!!e[a]),children:({selected:n})=>S.jsxs(S.Fragment,{children:[S.jsx("span",{children:a}),S.jsx("span",{className:_("absolute inset-y-0 left-0 flex items-center pl-3 text-primary-500",n?"block":"hidden"),children:S.jsx(Ae,{className:"h-4 w-4","aria-hidden":"true"})})]})},a))})})]})})}export{ht as F,Rt as L,Ue as T,L as c,le as e,He as f,gt as p,Ve as s,Qe as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,R as r,j as s,c as _,B as Q,m as P,n as ee,aA as ie,h as le,w as H,b as F,i as W,W as ce,Z as de,aB as ue,v as me,L as te,S as se,F as q,I as fe}from"./index-KZcJd7F1.js";import{d as he,e as ne,f as B,P as ae,h as G,b as $,i as pe,E as V,R as ge,j as we,k as xe,l as ve,m as X,n as Y,o as J,p as ye,q as Ne,r as be,s as Ee}from"./context-DhymIb_N.js";import{W as ke}from"./editor-Bf9rhumO.js";import{F as Ce,L as ze}from"./ListboxShow-CwgOYGSe.js";import{S as Me}from"./SearchList-9n_6_E0k.js";import{n as Se}from"./Input-CYm3h-zG.js";import{B as T}from"./transition-C8EjNcgL.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./index-BdXOfeCo.js";import"./file-CcK5Oobc.js";import"./project-CjyecwCx.js";import"./help-6Q7f7fjd.js";import"./SourceList-Chz492Ne.js";import"./index-CLuHMKlN.js";function je({title:e,titleId:t,...n},a){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const Le=o.forwardRef(je);function Ie(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[a,d]of e)if(!Object.is(d,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const a of n)if(!Object.prototype.hasOwnProperty.call(t,a)||!Object.is(e[a],t[a]))return!1;return!0}function He(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},r.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function Oe(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},r.createElement("path",{d:"M0 0h32v4.2H0z"}))}function Re(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},r.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function _e(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},r.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function De(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},r.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const D=({children:e,className:t,...n})=>r.createElement("button",{type:"button",className:G(["react-flow__controls-button",t]),...n},e);D.displayName="ControlButton";const Fe=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),re=({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:a=!0,fitViewOptions:d,onZoomIn:i,onZoomOut:l,onFitView:f,onInteractiveChange:h,className:p,children:c,position:N="bottom-left"})=>{const g=he(),[z,k]=o.useState(!1),{isInteractive:w,minZoomReached:x,maxZoomReached:u}=ne(Fe,Ie),{zoomIn:v,zoomOut:E,fitView:m}=B();if(o.useEffect(()=>{k(!0)},[]),!z)return null;const j=()=>{v(),i==null||i()},C=()=>{E(),l==null||l()},S=()=>{m(d),f==null||f()},y=()=>{g.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),h==null||h(!w)};return r.createElement(ae,{className:G(["react-flow__controls",p]),position:N,style:e,"data-testid":"rf__controls"},t&&r.createElement(r.Fragment,null,r.createElement(D,{onClick:j,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:u},r.createElement(He,null)),r.createElement(D,{onClick:C,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:x},r.createElement(Oe,null))),n&&r.createElement(D,{className:"react-flow__controls-fitview",onClick:S,title:"fit view","aria-label":"fit view"},r.createElement(Re,null)),a&&r.createElement(D,{className:"react-flow__controls-interactive",onClick:y,title:"toggle interactivity","aria-label":"toggle interactivity"},w?r.createElement(De,null):r.createElement(_e,null)),c)};re.displayName="Controls";var $e=o.memo(re);function We(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[a,d]of e)if(!Object.is(d,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const a of n)if(!Object.prototype.hasOwnProperty.call(t,a)||!Object.is(e[a],t[a]))return!1;return!0}var M;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(M||(M={}));function Ae({color:e,dimensions:t,lineWidth:n}){return r.createElement("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function Ue({color:e,radius:t}){return r.createElement("circle",{cx:t,cy:t,r:t,fill:e})}const Ve={[M.Dots]:"#91919a",[M.Lines]:"#eee",[M.Cross]:"#e2e2e2"},Te={[M.Dots]:1,[M.Lines]:1,[M.Cross]:6},Pe=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function oe({id:e,variant:t=M.Dots,gap:n=20,size:a,lineWidth:d=1,offset:i=2,color:l,style:f,className:h}){const p=o.useRef(null),{transform:c,patternId:N}=ne(Pe,We),g=l||Ve[t],z=a||Te[t],k=t===M.Dots,w=t===M.Cross,x=Array.isArray(n)?n:[n,n],u=[x[0]*c[2]||1,x[1]*c[2]||1],v=z*c[2],E=w?[v,v]:u,m=k?[v/i,v/i]:[E[0]/i,E[1]/i];return r.createElement("svg",{className:G(["react-flow__background",h]),style:{...f,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:p,"data-testid":"rf__background"},r.createElement("pattern",{id:N+e,x:c[0]%u[0],y:c[1]%u[1],width:u[0],height:u[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${m[0]},-${m[1]})`},k?r.createElement(Ue,{color:g,radius:v/i}):r.createElement(Ae,{dimensions:E,color:g,lineWidth:d})),r.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${N+e})`}))}oe.displayName="Background";var Be=o.memo(oe);function Ge({handleSelect:e}){const{models:t,lineage:n,mainNode:a,connectedNodes:d}=$(),[i,l]=o.useState(!1),[f,h]=o.useState([]),[p,c]=o.useState(!1);o.useEffect(()=>{h([])},[a,t,n]);function N(){l(!0)}function g(){l(!1)}function z(k){k.length<1||le(f)||H(a)||H(n)||(c(!0),setTimeout(()=>{const w=Array.from(pe(n,a));h(Object.keys(n).map(x=>{var u;return{name:x,displayName:((u=t.get(x))==null?void 0:u.displayName)??decodeURI(x),description:`${w.includes(x)?"Upstream":"Downstream"} | ${d.has(x)?"Directly":"Indirectly"} Connected`}})),c(!1)},300))}return s.jsxs("div",{className:_("w-full",i?"block absolute top-0 left-0 right-0 z-10 pr-10 bg-light dark:bg-dark @[40rem]:items-end @[40rem]:justify-end @[40rem]:flex @[40rem]:static @[40rem]:pr-0":"items-end justify-end flex"),children:[s.jsx(Q,{shape:ie.Circle,className:_("flex @[40rem]:hidden !py-1 border-transparent",i?"hidden":"flex"),variant:ee.Alternative,size:P.sm,"aria-label":"Show search",onClick:N,children:s.jsx(Le,{className:"w-3 h-3 text-primary-500"})}),s.jsx(Me,{list:f,placeholder:"Find",searchBy:"displayName",displayBy:"displayName",direction:"top",descriptionBy:"description",showIndex:!1,size:P.sm,onSelect:e,isLoading:p,className:_("w-full @sm:min-w-[12rem] @[40rem]:flex",i?"flex max-w-none":"hidden max-w-[20rem]"),isFullWidth:!0,onInput:z}),s.jsx("button",{className:_("flex @[40rem]:hidden bg-none border-none px-2 py-1 absolute right-0 top-0",i?"flex":"hidden"),"aria-label":"Hide search",onClick:g,children:s.jsx(Ce,{className:"w-6 h-6 text-primary-500"})})]})}function K({nodes:e=[]}){const{setCenter:t}=B(),{activeNodes:n,models:a,mainNode:d,nodesMap:i,selectedNodes:l,setSelectedNodes:f,withImpacted:h,connectedNodes:p,lineageCache:c,setActiveEdges:N,setConnections:g,setLineage:z,setLineageCache:k}=$(),w=H(d)?void 0:a.get(d),x=n.size>0?n.size:p.size,u=l.size,v=p.size-1,E=e.filter(y=>y.hidden).length,m=e.filter(y=>F(y.hidden)&&(y.data.type===V.external||y.data.type===V.seed)).length,j=e.filter(y=>F(y.hidden)&&y.data.type===V.cte).length,C=x>0&&x!==v+1;function S(){if(H(d))return;const y=i[d];H(y)||setTimeout(()=>{t(y.position.x,y.position.y,{zoom:.5,duration:0})},200)}return s.jsxs(s.Fragment,{children:[W(w)&&s.jsx("a",{className:"mr-2 w-full whitespace-nowrap text-ellipsis overflow-hidden @lg:block font-bold text-neutral-600 dark:text-neutral-400 cursor-pointer hover:underline",onClick:S,children:ce(w.displayName,50,25)}),s.jsxs("span",{className:"bg-neutral-5 px-2 py-0.5 flex rounded-full mr-2",children:[s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"All:"})," ",e.length]}),E>0&&s.jsxs("span",{className:"whitespace-nowrap block mr-2",children:[s.jsx("b",{children:"Hidden:"})," ",E]}),u>0&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"Selected:"})," ",u]}),C&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"Active:"})," ",x]}),(C||u>0||W(c))&&s.jsx(Q,{size:P.xs,variant:ee.Neutral,format:de.Ghost,className:"!m-0 px-1",onClick:()=>{N(new Map),g(new Map),f(new Set),W(c)&&(z(c),k(void 0))},children:"Reset"})]}),m>0&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"Sources"}),": ",m]}),F(C)&&h&&u===0&&v>0&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"Upstream/Downstream:"})," ",v]}),j>0&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"CTEs:"})," ",j]})]})}const Ze=30;function dt({model:e,highlightedNodes:t}){const{setActiveNodes:n,setActiveEdges:a,setConnections:d,setLineage:i,handleError:l,setSelectedNodes:f,setMainNode:h,setWithColumns:p,setHighlightedNodes:c,setNodeConnections:N,setLineageCache:g,setUnknownModels:z,models:k,unknownModels:w}=$(),{refetch:x,isFetching:u,cancel:v}=ue(e.name),{isFetching:E}=me(),[m,j]=o.useState(!1),[C,S]=o.useState(void 0);o.useEffect(()=>{const b=ke();return b.addEventListener("message",y),x().then(({data:L})=>{S(L),!H(L)&&(j(!0),b.postMessage({topic:"lineage",payload:{currentLineage:{},newLineage:L,mainNode:e.fqn}}))}).catch(L=>{l==null||l(L)}).finally(()=>{n(new Set),a(new Map),d(new Map),f(new Set),g(void 0),h(e.fqn)}),()=>{v==null||v(),b.removeEventListener("message",y),b.terminate(),i({}),N({}),h(void 0),c({})}},[e.name,e.hash]),o.useEffect(()=>{Object.keys(C??{}).forEach(b=>{b=encodeURI(b),F(k.has(b))&&F(w.has(b))&&w.add(b)}),z(new Set(w))},[C,k]),o.useEffect(()=>{c(t??{})},[t]);function y(b){var L;b.data.topic==="lineage"&&(j(!1),N(b.data.payload.nodesConnections),i(b.data.payload.lineage),Object.values(((L=b.data.payload)==null?void 0:L.lineage)??{}).length>Ze&&p(!1)),b.data.topic==="error"&&(l==null||l(b.data.error),j(!1))}const O=u||E||m;return s.jsxs("div",{className:"relative h-full w-full overflow-hidden",children:[O&&s.jsxs("div",{className:"absolute top-0 left-0 z-10 flex justify-center items-center w-full h-full",children:[s.jsx("span",{className:"absolute w-full h-full z-10 bg-transparent-20 backdrop-blur-lg"}),s.jsxs(te,{className:"inline-block z-10",children:[s.jsx(se,{className:"w-3 h-3 border border-neutral-10 mr-4"}),s.jsx("h3",{className:"text-md whitespace-nowrap",children:O?"Loading Model's Lineage...":"Merging Model's..."})]})]}),s.jsx(ge,{children:s.jsx(qe,{})})]})}function qe(){const{withColumns:e,lineage:t,mainNode:n,selectedEdges:a,selectedNodes:d,withConnected:i,withImpacted:l,withSecondary:f,hasBackground:h,activeEdges:p,connectedNodes:c,connections:N,nodesMap:g,showControls:z,handleError:k,setActiveNodes:w}=$(),{setCenter:x}=B(),[u,v]=o.useState(!1),E=o.useMemo(()=>({model:we}),[]),m=o.useMemo(()=>xe(t),[t]),j=o.useMemo(()=>ve(t),[t]),[C,S]=o.useState([]),[y,O]=o.useState([]);o.useEffect(()=>{if(q(m)||H(n))return;v(!0);const I=X(m,p,a,g),A=Y(Object.values(g),I,n,c,d,N,i,l,f),U=J(m,N,p,I,a,d,c,i,l,f),Z=ye({nodesMap:g,nodes:A,edges:U});return Z.create().then(R=>{O(R.edges),S(R.nodes)}).catch(R=>{k==null||k(R),O([]),S([])}).finally(()=>{const R=H(n)?void 0:g[n];W(R)&&x(R.position.x,R.position.y,{zoom:.5,duration:0}),setTimeout(()=>{v(!1)},100)}),()=>{Z.terminate(),O([]),S([])}},[p,g,j]),o.useEffect(()=>{if(H(n)||q(C))return;const I=X(m,p,a,g),A=Y(C,I,n,c,d,N,i,l,f),U=J(m,N,p,I,a,d,c,i,l,f);O(U),S(A),w(I)},[N,g,m,p,d,a,c,i,l,f,e,n]);function b(I){S(Ee(I,C))}function L(I){O(be(I,y))}return s.jsxs(s.Fragment,{children:[u&&s.jsxs("div",{className:"absolute top-0 left-0 z-10 flex justify-center items-center w-full h-full",children:[s.jsx("span",{className:"absolute w-full h-full z-10 bg-transparent-20 backdrop-blur-lg"}),s.jsxs(te,{className:"inline-block z-10",children:[s.jsx(se,{className:"w-3 h-3 border border-neutral-10 mr-4"}),s.jsx("h3",{className:"text-md whitespace-nowrap",children:"Building Lineage..."})]})]}),s.jsxs(Ne,{nodes:C,edges:y,nodeTypes:E,onNodesChange:b,onEdgesChange:L,nodeOrigin:[.5,.5],minZoom:.05,maxZoom:1.5,snapGrid:[16,16],snapToGrid:!0,children:[z&&s.jsxs(ae,{position:"top-right",className:"bg-theme !m-0 w-full !z-10",children:[s.jsx(Xe,{nodes:C}),s.jsx(fe,{})]}),s.jsx($e,{className:"bg-light p-1 rounded-md !border-none !shadow-lg"}),s.jsx(Be,{variant:M.Cross,gap:32,size:4,className:_(h?"opacity-100 stroke-neutral-200 dark:stroke-neutral-800":"opacity-0")})]})]})}function Xe({nodes:e=[]}){const{withColumns:t,mainNode:n,selectedNodes:a,withConnected:d,withImpacted:i,withSecondary:l,hasBackground:f,activeNodes:h,highlightedNodes:p,setSelectedNodes:c,setWithColumns:N,setWithConnected:g,setWithImpacted:z,setWithSecondary:k,setHasBackground:w}=$(),x=o.useRef(null),u=o.useMemo(()=>Object.values(p??{}).flat(),[p]);function v(E){u.includes(E.name)||n===E.name||c(m=>(m.has(E.name)?m.delete(E.name):m.add(E.name),new Set(m)))}return s.jsxs("div",{className:"px-2 flex items-center text-xs text-neutral-400 @container",children:[s.jsxs("div",{className:"contents",children:[s.jsxs(T,{className:"flex @lg:hidden bg-none border-none","aria-label":"Show lineage node details",children:[s.jsxs(T.Button,{ref:x,className:"flex items-center relative w-full cursor-pointer bg-primary-10 text-xs rounded-full text-primary-500 py-1 px-3 text-center focus:outline-none focus-visible:border-accent-500 focus-visible:ring-2 focus-visible:ring-light focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-brand-300 border-1 border-transparent",children:["Details",s.jsx(Se,{className:"ml-2 h-4 w-4","aria-hidden":"true"})]}),s.jsx(T.Panel,{className:"absolute left-2 right-2 flex-col z-50 mt-8 transform flex px-4 py-3 bg-theme-lighter shadow-xl focus:ring-2 ring-opacity-5 rounded-lg",children:s.jsx(K,{nodes:e})})]}),s.jsx("div",{className:"hidden @lg:contents w-full",children:s.jsx(K,{nodes:e})})]}),s.jsxs("div",{className:"flex w-full justify-end items-center",children:[s.jsx(Ge,{handleSelect:v}),s.jsx(ze,{options:{Background:w,Columns:h.size>0&&a.size===0?void 0:N,Connected:h.size>0?void 0:g,"Upstream/Downstream":h.size>0?void 0:z,All:h.size>0?void 0:k},value:[t&&"Columns",f&&"Background",d&&"Connected",i&&"Upstream/Downstream",l&&"All"].filter(Boolean)})]})]})}export{dt as default};
|
|
1
|
+
import{r as o,R as r,j as s,c as _,B as Q,m as P,n as ee,aA as ie,h as le,w as H,b as F,i as W,W as ce,Z as de,aB as ue,v as me,L as te,S as se,F as q,I as fe}from"./index-CkIQhGgw.js";import{d as he,e as ne,f as B,P as ae,h as G,b as $,i as pe,E as V,R as ge,j as we,k as xe,l as ve,m as X,n as Y,o as J,p as ye,q as Ne,r as be,s as Ee}from"./context-Dx2o1ZRq.js";import{W as ke}from"./editor-Dj_6cws7.js";import{F as Ce,L as ze}from"./ListboxShow-TFvq9fMB.js";import{S as Me}from"./SearchList-BShQn9jm.js";import{t as Se}from"./Input-BY5Rc3go.js";import{B as T}from"./transition-B5aHgz_j.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./index-COQuzlwN.js";import"./file-Bs2Eq56_.js";import"./project-XFpF0AcJ.js";import"./help-6Q7f7fjd.js";import"./SourceList-DQ72TcK1.js";import"./index-DQbKL5-Q.js";function je({title:e,titleId:t,...n},a){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const Le=o.forwardRef(je);function Ie(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[a,d]of e)if(!Object.is(d,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const a of n)if(!Object.prototype.hasOwnProperty.call(t,a)||!Object.is(e[a],t[a]))return!1;return!0}function He(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},r.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function Oe(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},r.createElement("path",{d:"M0 0h32v4.2H0z"}))}function Re(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},r.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function _e(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},r.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function De(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},r.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const D=({children:e,className:t,...n})=>r.createElement("button",{type:"button",className:G(["react-flow__controls-button",t]),...n},e);D.displayName="ControlButton";const Fe=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),re=({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:a=!0,fitViewOptions:d,onZoomIn:i,onZoomOut:l,onFitView:f,onInteractiveChange:h,className:p,children:c,position:N="bottom-left"})=>{const g=he(),[z,k]=o.useState(!1),{isInteractive:w,minZoomReached:x,maxZoomReached:u}=ne(Fe,Ie),{zoomIn:v,zoomOut:E,fitView:m}=B();if(o.useEffect(()=>{k(!0)},[]),!z)return null;const j=()=>{v(),i==null||i()},C=()=>{E(),l==null||l()},S=()=>{m(d),f==null||f()},y=()=>{g.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),h==null||h(!w)};return r.createElement(ae,{className:G(["react-flow__controls",p]),position:N,style:e,"data-testid":"rf__controls"},t&&r.createElement(r.Fragment,null,r.createElement(D,{onClick:j,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:u},r.createElement(He,null)),r.createElement(D,{onClick:C,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:x},r.createElement(Oe,null))),n&&r.createElement(D,{className:"react-flow__controls-fitview",onClick:S,title:"fit view","aria-label":"fit view"},r.createElement(Re,null)),a&&r.createElement(D,{className:"react-flow__controls-interactive",onClick:y,title:"toggle interactivity","aria-label":"toggle interactivity"},w?r.createElement(De,null):r.createElement(_e,null)),c)};re.displayName="Controls";var $e=o.memo(re);function We(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[a,d]of e)if(!Object.is(d,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const a of n)if(!Object.prototype.hasOwnProperty.call(t,a)||!Object.is(e[a],t[a]))return!1;return!0}var M;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(M||(M={}));function Ae({color:e,dimensions:t,lineWidth:n}){return r.createElement("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function Ue({color:e,radius:t}){return r.createElement("circle",{cx:t,cy:t,r:t,fill:e})}const Ve={[M.Dots]:"#91919a",[M.Lines]:"#eee",[M.Cross]:"#e2e2e2"},Te={[M.Dots]:1,[M.Lines]:1,[M.Cross]:6},Pe=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function oe({id:e,variant:t=M.Dots,gap:n=20,size:a,lineWidth:d=1,offset:i=2,color:l,style:f,className:h}){const p=o.useRef(null),{transform:c,patternId:N}=ne(Pe,We),g=l||Ve[t],z=a||Te[t],k=t===M.Dots,w=t===M.Cross,x=Array.isArray(n)?n:[n,n],u=[x[0]*c[2]||1,x[1]*c[2]||1],v=z*c[2],E=w?[v,v]:u,m=k?[v/i,v/i]:[E[0]/i,E[1]/i];return r.createElement("svg",{className:G(["react-flow__background",h]),style:{...f,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:p,"data-testid":"rf__background"},r.createElement("pattern",{id:N+e,x:c[0]%u[0],y:c[1]%u[1],width:u[0],height:u[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${m[0]},-${m[1]})`},k?r.createElement(Ue,{color:g,radius:v/i}):r.createElement(Ae,{dimensions:E,color:g,lineWidth:d})),r.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${N+e})`}))}oe.displayName="Background";var Be=o.memo(oe);function Ge({handleSelect:e}){const{models:t,lineage:n,mainNode:a,connectedNodes:d}=$(),[i,l]=o.useState(!1),[f,h]=o.useState([]),[p,c]=o.useState(!1);o.useEffect(()=>{h([])},[a,t,n]);function N(){l(!0)}function g(){l(!1)}function z(k){k.length<1||le(f)||H(a)||H(n)||(c(!0),setTimeout(()=>{const w=Array.from(pe(n,a));h(Object.keys(n).map(x=>{var u;return{name:x,displayName:((u=t.get(x))==null?void 0:u.displayName)??decodeURI(x),description:`${w.includes(x)?"Upstream":"Downstream"} | ${d.has(x)?"Directly":"Indirectly"} Connected`}})),c(!1)},300))}return s.jsxs("div",{className:_("w-full",i?"block absolute top-0 left-0 right-0 z-10 pr-10 bg-light dark:bg-dark @[40rem]:items-end @[40rem]:justify-end @[40rem]:flex @[40rem]:static @[40rem]:pr-0":"items-end justify-end flex"),children:[s.jsx(Q,{shape:ie.Circle,className:_("flex @[40rem]:hidden !py-1 border-transparent",i?"hidden":"flex"),variant:ee.Alternative,size:P.sm,"aria-label":"Show search",onClick:N,children:s.jsx(Le,{className:"w-3 h-3 text-primary-500"})}),s.jsx(Me,{list:f,placeholder:"Find",searchBy:"displayName",displayBy:"displayName",direction:"top",descriptionBy:"description",showIndex:!1,size:P.sm,onSelect:e,isLoading:p,className:_("w-full @sm:min-w-[12rem] @[40rem]:flex",i?"flex max-w-none":"hidden max-w-[20rem]"),isFullWidth:!0,onInput:z}),s.jsx("button",{className:_("flex @[40rem]:hidden bg-none border-none px-2 py-1 absolute right-0 top-0",i?"flex":"hidden"),"aria-label":"Hide search",onClick:g,children:s.jsx(Ce,{className:"w-6 h-6 text-primary-500"})})]})}function K({nodes:e=[]}){const{setCenter:t}=B(),{activeNodes:n,models:a,mainNode:d,nodesMap:i,selectedNodes:l,setSelectedNodes:f,withImpacted:h,connectedNodes:p,lineageCache:c,setActiveEdges:N,setConnections:g,setLineage:z,setLineageCache:k}=$(),w=H(d)?void 0:a.get(d),x=n.size>0?n.size:p.size,u=l.size,v=p.size-1,E=e.filter(y=>y.hidden).length,m=e.filter(y=>F(y.hidden)&&(y.data.type===V.external||y.data.type===V.seed)).length,j=e.filter(y=>F(y.hidden)&&y.data.type===V.cte).length,C=x>0&&x!==v+1;function S(){if(H(d))return;const y=i[d];H(y)||setTimeout(()=>{t(y.position.x,y.position.y,{zoom:.5,duration:0})},200)}return s.jsxs(s.Fragment,{children:[W(w)&&s.jsx("a",{className:"mr-2 w-full whitespace-nowrap text-ellipsis overflow-hidden @lg:block font-bold text-neutral-600 dark:text-neutral-400 cursor-pointer hover:underline",onClick:S,children:ce(w.displayName,50,25)}),s.jsxs("span",{className:"bg-neutral-5 px-2 py-0.5 flex rounded-full mr-2",children:[s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"All:"})," ",e.length]}),E>0&&s.jsxs("span",{className:"whitespace-nowrap block mr-2",children:[s.jsx("b",{children:"Hidden:"})," ",E]}),u>0&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"Selected:"})," ",u]}),C&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"Active:"})," ",x]}),(C||u>0||W(c))&&s.jsx(Q,{size:P.xs,variant:ee.Neutral,format:de.Ghost,className:"!m-0 px-1",onClick:()=>{N(new Map),g(new Map),f(new Set),W(c)&&(z(c),k(void 0))},children:"Reset"})]}),m>0&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"Sources"}),": ",m]}),F(C)&&h&&u===0&&v>0&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"Upstream/Downstream:"})," ",v]}),j>0&&s.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[s.jsx("b",{children:"CTEs:"})," ",j]})]})}const Ze=30;function dt({model:e,highlightedNodes:t}){const{setActiveNodes:n,setActiveEdges:a,setConnections:d,setLineage:i,handleError:l,setSelectedNodes:f,setMainNode:h,setWithColumns:p,setHighlightedNodes:c,setNodeConnections:N,setLineageCache:g,setUnknownModels:z,models:k,unknownModels:w}=$(),{refetch:x,isFetching:u,cancel:v}=ue(e.name),{isFetching:E}=me(),[m,j]=o.useState(!1),[C,S]=o.useState(void 0);o.useEffect(()=>{const b=ke();return b.addEventListener("message",y),x().then(({data:L})=>{S(L),!H(L)&&(j(!0),b.postMessage({topic:"lineage",payload:{currentLineage:{},newLineage:L,mainNode:e.fqn}}))}).catch(L=>{l==null||l(L)}).finally(()=>{n(new Set),a(new Map),d(new Map),f(new Set),g(void 0),h(e.fqn)}),()=>{v==null||v(),b.removeEventListener("message",y),b.terminate(),i({}),N({}),h(void 0),c({})}},[e.name,e.hash]),o.useEffect(()=>{Object.keys(C??{}).forEach(b=>{b=encodeURI(b),F(k.has(b))&&F(w.has(b))&&w.add(b)}),z(new Set(w))},[C,k]),o.useEffect(()=>{c(t??{})},[t]);function y(b){var L;b.data.topic==="lineage"&&(j(!1),N(b.data.payload.nodesConnections),i(b.data.payload.lineage),Object.values(((L=b.data.payload)==null?void 0:L.lineage)??{}).length>Ze&&p(!1)),b.data.topic==="error"&&(l==null||l(b.data.error),j(!1))}const O=u||E||m;return s.jsxs("div",{className:"relative h-full w-full overflow-hidden",children:[O&&s.jsxs("div",{className:"absolute top-0 left-0 z-10 flex justify-center items-center w-full h-full",children:[s.jsx("span",{className:"absolute w-full h-full z-10 bg-transparent-20 backdrop-blur-lg"}),s.jsxs(te,{className:"inline-block z-10",children:[s.jsx(se,{className:"w-3 h-3 border border-neutral-10 mr-4"}),s.jsx("h3",{className:"text-md whitespace-nowrap",children:O?"Loading Model's Lineage...":"Merging Model's..."})]})]}),s.jsx(ge,{children:s.jsx(qe,{})})]})}function qe(){const{withColumns:e,lineage:t,mainNode:n,selectedEdges:a,selectedNodes:d,withConnected:i,withImpacted:l,withSecondary:f,hasBackground:h,activeEdges:p,connectedNodes:c,connections:N,nodesMap:g,showControls:z,handleError:k,setActiveNodes:w}=$(),{setCenter:x}=B(),[u,v]=o.useState(!1),E=o.useMemo(()=>({model:we}),[]),m=o.useMemo(()=>xe(t),[t]),j=o.useMemo(()=>ve(t),[t]),[C,S]=o.useState([]),[y,O]=o.useState([]);o.useEffect(()=>{if(q(m)||H(n))return;v(!0);const I=X(m,p,a,g),A=Y(Object.values(g),I,n,c,d,N,i,l,f),U=J(m,N,p,I,a,d,c,i,l,f),Z=ye({nodesMap:g,nodes:A,edges:U});return Z.create().then(R=>{O(R.edges),S(R.nodes)}).catch(R=>{k==null||k(R),O([]),S([])}).finally(()=>{const R=H(n)?void 0:g[n];W(R)&&x(R.position.x,R.position.y,{zoom:.5,duration:0}),setTimeout(()=>{v(!1)},100)}),()=>{Z.terminate(),O([]),S([])}},[p,g,j]),o.useEffect(()=>{if(H(n)||q(C))return;const I=X(m,p,a,g),A=Y(C,I,n,c,d,N,i,l,f),U=J(m,N,p,I,a,d,c,i,l,f);O(U),S(A),w(I)},[N,g,m,p,d,a,c,i,l,f,e,n]);function b(I){S(Ee(I,C))}function L(I){O(be(I,y))}return s.jsxs(s.Fragment,{children:[u&&s.jsxs("div",{className:"absolute top-0 left-0 z-10 flex justify-center items-center w-full h-full",children:[s.jsx("span",{className:"absolute w-full h-full z-10 bg-transparent-20 backdrop-blur-lg"}),s.jsxs(te,{className:"inline-block z-10",children:[s.jsx(se,{className:"w-3 h-3 border border-neutral-10 mr-4"}),s.jsx("h3",{className:"text-md whitespace-nowrap",children:"Building Lineage..."})]})]}),s.jsxs(Ne,{nodes:C,edges:y,nodeTypes:E,onNodesChange:b,onEdgesChange:L,nodeOrigin:[.5,.5],minZoom:.05,maxZoom:1.5,snapGrid:[16,16],snapToGrid:!0,children:[z&&s.jsxs(ae,{position:"top-right",className:"bg-theme !m-0 w-full !z-10",children:[s.jsx(Xe,{nodes:C}),s.jsx(fe,{})]}),s.jsx($e,{className:"bg-light p-1 rounded-md !border-none !shadow-lg"}),s.jsx(Be,{variant:M.Cross,gap:32,size:4,className:_(h?"opacity-100 stroke-neutral-200 dark:stroke-neutral-800":"opacity-0")})]})]})}function Xe({nodes:e=[]}){const{withColumns:t,mainNode:n,selectedNodes:a,withConnected:d,withImpacted:i,withSecondary:l,hasBackground:f,activeNodes:h,highlightedNodes:p,setSelectedNodes:c,setWithColumns:N,setWithConnected:g,setWithImpacted:z,setWithSecondary:k,setHasBackground:w}=$(),x=o.useRef(null),u=o.useMemo(()=>Object.values(p??{}).flat(),[p]);function v(E){u.includes(E.name)||n===E.name||c(m=>(m.has(E.name)?m.delete(E.name):m.add(E.name),new Set(m)))}return s.jsxs("div",{className:"px-2 flex items-center text-xs text-neutral-400 @container",children:[s.jsxs("div",{className:"contents",children:[s.jsxs(T,{className:"flex @lg:hidden bg-none border-none","aria-label":"Show lineage node details",children:[s.jsxs(T.Button,{ref:x,className:"flex items-center relative w-full cursor-pointer bg-primary-10 text-xs rounded-full text-primary-500 py-1 px-3 text-center focus:outline-none focus-visible:border-accent-500 focus-visible:ring-2 focus-visible:ring-light focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-brand-300 border-1 border-transparent",children:["Details",s.jsx(Se,{className:"ml-2 h-4 w-4","aria-hidden":"true"})]}),s.jsx(T.Panel,{className:"absolute left-2 right-2 flex-col z-50 mt-8 transform flex px-4 py-3 bg-theme-lighter shadow-xl focus:ring-2 ring-opacity-5 rounded-lg",children:s.jsx(K,{nodes:e})})]}),s.jsx("div",{className:"hidden @lg:contents w-full",children:s.jsx(K,{nodes:e})})]}),s.jsxs("div",{className:"flex w-full justify-end items-center",children:[s.jsx(Ge,{handleSelect:v}),s.jsx(ze,{options:{Background:w,Columns:h.size>0&&a.size===0?void 0:N,Connected:h.size>0?void 0:g,"Upstream/Downstream":h.size>0?void 0:z,All:h.size>0?void 0:k},value:[t&&"Columns",f&&"Background",d&&"Connected",i&&"Upstream/Downstream",l&&"All"].filter(Boolean)})]})]})}export{dt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{y as B,U as M,t as $,a as d,r as h,v as F,w as m,i as x,e as L,j as s,H as b,h as T,m as E,I as z,V as K,a8 as P,O as w,F as A,b as O}from"./index-
|
|
1
|
+
import{y as B,U as M,t as $,a as d,r as h,v as F,w as m,i as x,e as L,j as s,H as b,h as T,m as E,I as z,V as K,a8 as P,O as w,F as A,b as O}from"./index-CkIQhGgw.js";import{S as R,b as k,m as C,n as I,o as H,p as U,f as D,g as G}from"./SearchList-BShQn9jm.js";import{P as V}from"./Page-KC6UG65M.js";import{g as W}from"./context-Dx2o1ZRq.js";import{u as f}from"./project-XFpF0AcJ.js";import"./Input-BY5Rc3go.js";import"./index-COQuzlwN.js";import"./help-6Q7f7fjd.js";import"./transition-B5aHgz_j.js";import"./SplitPane-BY85POxQ.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./editor-Dj_6cws7.js";import"./file-Bs2Eq56_.js";import"./SourceList-DQ72TcK1.js";import"./index-DQbKL5-Q.js";function le({route:g=L.Home}){const{pathname:j}=B(),{modelName:i}=M(),u=$(),l=d(e=>e.models),r=d(e=>e.lastSelectedModel),N=d(e=>e.setLastSelectedModel),p=f(e=>e.files),S=f(e=>e.setSelectedFile),n=h.useMemo(()=>Array.from(new Set(l.values())),[l]),{isFetching:c}=F(),t=`${g}/models`,a=m(i)||i===(r==null?void 0:r.name)?r:l.get(encodeURI(i));h.useEffect(()=>{if(m(a))return;const e=p.get(a.path);x(e)&&S(e),N(a),u(`${t}/${a.name}`,{replace:!0})},[p,a,t]);const y=m(a)&&x(i)&&O(c);return s.jsx(V,{sidebar:A(n)?void 0:s.jsx(k,{"update-selector":"tbk-model-name",children:s.jsx(C,{selectable:!0,onChange:e=>u(e.detail.value),className:"pt-3 px-2",children:Object.entries(I.categorize(n)).map(([e,v])=>s.jsx(H,{headline:e,open:!0,children:v.map(o=>s.jsx(U,{size:"xs","hide-icon":!0,active:j===`${t}/${o.name}`,value:`${t}/${o.name}`,"search-value":o.displayName,compact:!0,children:s.jsx(D,{"hide-schema":!0,"hide-catalog":!0,"hide-tooltip":!0,text:o.displayName,children:s.jsx(G,{size:"2xs",slot:"after",children:W(o.type)})})},o.name))},e))})}),content:s.jsx(b.Page,{children:s.jsxs("div",{className:"flex flex-col w-full h-full overflow-hidden",children:[T(n)&&s.jsx(R,{list:n,size:E.lg,searchBy:"index",displayBy:"displayName",to:e=>`${t}/${e.name}`,direction:"top",className:"p-2",isFullWidth:!0,disabled:c}),s.jsx(z,{}),y?s.jsx(K,{link:t,message:"Go Back",description:`Model "${i}" not found.`}):c?s.jsx(P,{children:"Loading Model page..."}):s.jsx(w,{})]})})})}export{le as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n,j as e,w as f}from"./index-
|
|
1
|
+
import{a as n,j as e,w as f}from"./index-CkIQhGgw.js";import{S as r}from"./SplitPane-BY85POxQ.js";function h({sidebar:s,content:i}){const a=n(l=>l.splitPaneSizes),t=n(l=>l.setSplitPaneSizes);return e.jsx(e.Fragment,{children:f(s)?e.jsx("div",{className:"flex w-full h-full overflow-hidden justify-center",children:i}):e.jsxs(r,{sizes:a,minSize:[0,0],snapOffset:0,className:"flex w-full h-full overflow-hidden",onDragEnd:t,children:[e.jsx("div",{className:"w-full h-full overflow-hidden",children:s}),e.jsx("div",{className:"w-full h-full overflow-hidden",children:i})]})})}export{h as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as m,y as p,a as l,r,i as u,e,j as i,O as c}from"./index-
|
|
1
|
+
import{t as m,y as p,a as l,r,i as u,e,j as i,O as c}from"./index-CkIQhGgw.js";import{P as f}from"./Page-KC6UG65M.js";import{u as v}from"./plan-BZyi7OFv.js";import"./SplitPane-BY85POxQ.js";function E(){const s=m(),t=p(),o=l(n=>n.environment),a=v(n=>n.planApply);return r.useEffect(()=>{if(a.isRunning&&u(a.environment)){const n=`${e.Plan}/environments/${a.environment}`;t.pathname!==n&&s(n,{replace:!0})}else(t.pathname===e.Plan||t.pathname===`${e.Plan}/environments`)&&s(`${e.Plan}/environments/${o.name}`,{replace:!0})},[t,a.isRunning]),r.useEffect(()=>{s(`${e.Plan}/environments/${o.name}`,{replace:!0})},[o]),i.jsx(f,{content:i.jsx(c,{})})}export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as P,r as n,a2 as H}from"./index-KZcJd7F1.js";import{U as E,y as S,S as A,o as R,H as Z,u as I,k,C as D,I as U,V as B,j as K,T as V,G as N,x as L,z as x,A as W}from"./transition-C8EjNcgL.js";import{c as G}from"./_commonjs-dynamic-modules-TDtrdbi3.js";var q;let Q=(q=P.startTransition)!=null?q:function(e){e()};var Y=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Y||{}),_=(e=>(e[e.ToggleDisclosure=0]="ToggleDisclosure",e[e.CloseDisclosure=1]="CloseDisclosure",e[e.SetButtonId=2]="SetButtonId",e[e.SetPanelId=3]="SetPanelId",e[e.LinkPanel=4]="LinkPanel",e[e.UnlinkPanel=5]="UnlinkPanel",e))(_||{});let J={0:e=>({...e,disclosureState:I(e.disclosureState,{0:1,1:0})}),1:e=>e.disclosureState===1?e:{...e,disclosureState:1},4(e){return e.linkedPanel===!0?e:{...e,linkedPanel:!0}},5(e){return e.linkedPanel===!1?e:{...e,linkedPanel:!1}},2(e,s){return e.buttonId===s.buttonId?e:{...e,buttonId:s.buttonId}},3(e,s){return e.panelId===s.panelId?e:{...e,panelId:s.panelId}}},z=n.createContext(null);z.displayName="DisclosureContext";function T(e){let s=n.useContext(z);if(s===null){let l=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(l,T),l}return s}let O=n.createContext(null);O.displayName="DisclosureAPIContext";function F(e){let s=n.useContext(O);if(s===null){let l=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(l,F),l}return s}let j=n.createContext(null);j.displayName="DisclosurePanelContext";function X(){return n.useContext(j)}function ee(e,s){return I(s.type,J,e,s)}let te=n.Fragment;function ae(e,s){let{defaultOpen:l=!1,...u}=e,v=n.useRef(null),i=S(s,A(a=>{v.current=a},e.as===void 0||e.as===n.Fragment)),c=n.useRef(null),$=n.useRef(null),f=n.useReducer(ee,{disclosureState:l?0:1,linkedPanel:!1,buttonRef:$,panelRef:c,buttonId:null,panelId:null}),[{disclosureState:g,buttonId:h},y]=f,m=R(a=>{y({type:1});let d=N(v);if(!d||!h)return;let r=a?a instanceof HTMLElement?a:a.current instanceof HTMLElement?a.current:d.getElementById(h):d.getElementById(h);r==null||r.focus()}),b=n.useMemo(()=>({close:m}),[m]),o=n.useMemo(()=>({open:g===0,close:m}),[g,m]),t={ref:i};return P.createElement(z.Provider,{value:f},P.createElement(O.Provider,{value:b},P.createElement(Z,{value:I(g,{0:k.Open,1:k.Closed})},D({ourProps:t,theirProps:u,slot:o,defaultTag:te,name:"Disclosure"}))))}let re="button";function se(e,s){let l=U(),{id:u=`headlessui-disclosure-button-${l}`,...v}=e,[i,c]=T("Disclosure.Button"),$=X(),f=$===null?!1:$===i.panelId,g=n.useRef(null),h=S(g,s,f?null:i.buttonRef),y=B();n.useEffect(()=>{if(!f)return c({type:2,buttonId:u}),()=>{c({type:2,buttonId:null})}},[u,c,f]);let m=R(r=>{var p;if(f){if(i.disclosureState===1)return;switch(r.key){case x.Space:case x.Enter:r.preventDefault(),r.stopPropagation(),c({type:0}),(p=i.buttonRef.current)==null||p.focus();break}}else switch(r.key){case x.Space:case x.Enter:r.preventDefault(),r.stopPropagation(),c({type:0});break}}),b=R(r=>{switch(r.key){case x.Space:r.preventDefault();break}}),o=R(r=>{var p;W(r.currentTarget)||e.disabled||(f?(c({type:0}),(p=i.buttonRef.current)==null||p.focus()):c({type:0}))}),t=n.useMemo(()=>({open:i.disclosureState===0}),[i]),a=V(e,g),d=f?{ref:h,type:a,onKeyDown:m,onClick:o}:{ref:h,id:u,type:a,"aria-expanded":i.disclosureState===0,"aria-controls":i.linkedPanel?i.panelId:void 0,onKeyDown:m,onKeyUp:b,onClick:o};return D({mergeRefs:y,ourProps:d,theirProps:v,slot:t,defaultTag:re,name:"Disclosure.Button"})}let ne="div",ie=L.RenderStrategy|L.Static;function oe(e,s){let l=U(),{id:u=`headlessui-disclosure-panel-${l}`,...v}=e,[i,c]=T("Disclosure.Panel"),{close:$}=F("Disclosure.Panel"),f=B(),g=S(s,i.panelRef,o=>{Q(()=>c({type:o?4:5}))});n.useEffect(()=>(c({type:3,panelId:u}),()=>{c({type:3,panelId:null})}),[u,c]);let h=K(),y=h!==null?(h&k.Open)===k.Open:i.disclosureState===0,m=n.useMemo(()=>({open:i.disclosureState===0,close:$}),[i,$]),b={ref:g,id:u};return P.createElement(j.Provider,{value:i.panelId},D({mergeRefs:f,ourProps:b,theirProps:v,slot:m,defaultTag:ne,features:ie,visible:y,name:"Disclosure.Panel"}))}let le=E(ae),ue=E(se),ce=E(oe),ye=Object.assign(le,{Button:ue,Panel:ce});var C={exports:{}},pe=C.exports,M;function de(){return M||(M=1,function(e,s){(function(l,u){typeof G=="function"?e.exports=u():l.pluralize=u()})(pe,function(){var l=[],u=[],v={},i={},c={};function $(t){return typeof t=="string"?new RegExp("^"+t+"$","i"):t}function f(t,a){return t===a?a:t===t.toLowerCase()?a.toLowerCase():t===t.toUpperCase()?a.toUpperCase():t[0]===t[0].toUpperCase()?a.charAt(0).toUpperCase()+a.substr(1).toLowerCase():a.toLowerCase()}function g(t,a){return t.replace(/\$(\d{1,2})/g,function(d,r){return a[r]||""})}function h(t,a){return t.replace(a[0],function(d,r){var p=g(a[1],arguments);return f(d===""?t[r-1]:d,p)})}function y(t,a,d){if(!t.length||v.hasOwnProperty(t))return a;for(var r=d.length;r--;){var p=d[r];if(p[0].test(a))return h(a,p)}return a}function m(t,a,d){return function(r){var p=r.toLowerCase();return a.hasOwnProperty(p)?f(r,p):t.hasOwnProperty(p)?f(r,t[p]):y(p,r,d)}}function b(t,a,d,r){return function(p){var w=p.toLowerCase();return a.hasOwnProperty(w)?!0:t.hasOwnProperty(w)?!1:y(w,w,d)===w}}function o(t,a,d){var r=a===1?o.singular(t):o.plural(t);return(d?a+" ":"")+r}return o.plural=m(c,i,l),o.isPlural=b(c,i,l),o.singular=m(i,c,u),o.isSingular=b(i,c,u),o.addPluralRule=function(t,a){l.push([$(t),a])},o.addSingularRule=function(t,a){u.push([$(t),a])},o.addUncountableRule=function(t){if(typeof t=="string"){v[t.toLowerCase()]=!0;return}o.addPluralRule(t,"$0"),o.addSingularRule(t,"$0")},o.addIrregularRule=function(t,a){a=a.toLowerCase(),t=t.toLowerCase(),c[t]=a,i[a]=t},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(t){return o.addIrregularRule(t[0],t[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(t){return o.addPluralRule(t[0],t[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(t){return o.addSingularRule(t[0],t[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(o.addUncountableRule),o})}(C)),C.exports}var fe=de();const be=H(fe);function me({title:e,titleId:s,...l},u){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:u,"aria-labelledby":s},l),e?n.createElement("title",{id:s},e):null,n.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm3 10.5a.75.75 0 0 0 0-1.5H9a.75.75 0 0 0 0 1.5h6Z",clipRule:"evenodd"}))}const we=n.forwardRef(me);function he({title:e,titleId:s,...l},u){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:u,"aria-labelledby":s},l),e?n.createElement("title",{id:s},e):null,n.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25ZM12.75 9a.75.75 0 0 0-1.5 0v2.25H9a.75.75 0 0 0 0 1.5h2.25V15a.75.75 0 0 0 1.5 0v-2.25H15a.75.75 0 0 0 0-1.5h-2.25V9Z",clipRule:"evenodd"}))}const xe=n.forwardRef(he);export{ye as A,we as F,xe as a,be as p};
|
|
1
|
+
import{R as P,r as n,a2 as H}from"./index-CkIQhGgw.js";import{U as E,y as S,S as A,o as R,H as Z,u as I,k,C as D,I as U,V as B,j as K,T as V,G as N,x as L,z as x,A as W}from"./transition-B5aHgz_j.js";import{c as G}from"./_commonjs-dynamic-modules-TDtrdbi3.js";var q;let Q=(q=P.startTransition)!=null?q:function(e){e()};var Y=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Y||{}),_=(e=>(e[e.ToggleDisclosure=0]="ToggleDisclosure",e[e.CloseDisclosure=1]="CloseDisclosure",e[e.SetButtonId=2]="SetButtonId",e[e.SetPanelId=3]="SetPanelId",e[e.LinkPanel=4]="LinkPanel",e[e.UnlinkPanel=5]="UnlinkPanel",e))(_||{});let J={0:e=>({...e,disclosureState:I(e.disclosureState,{0:1,1:0})}),1:e=>e.disclosureState===1?e:{...e,disclosureState:1},4(e){return e.linkedPanel===!0?e:{...e,linkedPanel:!0}},5(e){return e.linkedPanel===!1?e:{...e,linkedPanel:!1}},2(e,s){return e.buttonId===s.buttonId?e:{...e,buttonId:s.buttonId}},3(e,s){return e.panelId===s.panelId?e:{...e,panelId:s.panelId}}},z=n.createContext(null);z.displayName="DisclosureContext";function T(e){let s=n.useContext(z);if(s===null){let l=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(l,T),l}return s}let O=n.createContext(null);O.displayName="DisclosureAPIContext";function F(e){let s=n.useContext(O);if(s===null){let l=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(l,F),l}return s}let j=n.createContext(null);j.displayName="DisclosurePanelContext";function X(){return n.useContext(j)}function ee(e,s){return I(s.type,J,e,s)}let te=n.Fragment;function ae(e,s){let{defaultOpen:l=!1,...u}=e,v=n.useRef(null),i=S(s,A(a=>{v.current=a},e.as===void 0||e.as===n.Fragment)),c=n.useRef(null),$=n.useRef(null),f=n.useReducer(ee,{disclosureState:l?0:1,linkedPanel:!1,buttonRef:$,panelRef:c,buttonId:null,panelId:null}),[{disclosureState:g,buttonId:h},y]=f,m=R(a=>{y({type:1});let d=N(v);if(!d||!h)return;let r=a?a instanceof HTMLElement?a:a.current instanceof HTMLElement?a.current:d.getElementById(h):d.getElementById(h);r==null||r.focus()}),b=n.useMemo(()=>({close:m}),[m]),o=n.useMemo(()=>({open:g===0,close:m}),[g,m]),t={ref:i};return P.createElement(z.Provider,{value:f},P.createElement(O.Provider,{value:b},P.createElement(Z,{value:I(g,{0:k.Open,1:k.Closed})},D({ourProps:t,theirProps:u,slot:o,defaultTag:te,name:"Disclosure"}))))}let re="button";function se(e,s){let l=U(),{id:u=`headlessui-disclosure-button-${l}`,...v}=e,[i,c]=T("Disclosure.Button"),$=X(),f=$===null?!1:$===i.panelId,g=n.useRef(null),h=S(g,s,f?null:i.buttonRef),y=B();n.useEffect(()=>{if(!f)return c({type:2,buttonId:u}),()=>{c({type:2,buttonId:null})}},[u,c,f]);let m=R(r=>{var p;if(f){if(i.disclosureState===1)return;switch(r.key){case x.Space:case x.Enter:r.preventDefault(),r.stopPropagation(),c({type:0}),(p=i.buttonRef.current)==null||p.focus();break}}else switch(r.key){case x.Space:case x.Enter:r.preventDefault(),r.stopPropagation(),c({type:0});break}}),b=R(r=>{switch(r.key){case x.Space:r.preventDefault();break}}),o=R(r=>{var p;W(r.currentTarget)||e.disabled||(f?(c({type:0}),(p=i.buttonRef.current)==null||p.focus()):c({type:0}))}),t=n.useMemo(()=>({open:i.disclosureState===0}),[i]),a=V(e,g),d=f?{ref:h,type:a,onKeyDown:m,onClick:o}:{ref:h,id:u,type:a,"aria-expanded":i.disclosureState===0,"aria-controls":i.linkedPanel?i.panelId:void 0,onKeyDown:m,onKeyUp:b,onClick:o};return D({mergeRefs:y,ourProps:d,theirProps:v,slot:t,defaultTag:re,name:"Disclosure.Button"})}let ne="div",ie=L.RenderStrategy|L.Static;function oe(e,s){let l=U(),{id:u=`headlessui-disclosure-panel-${l}`,...v}=e,[i,c]=T("Disclosure.Panel"),{close:$}=F("Disclosure.Panel"),f=B(),g=S(s,i.panelRef,o=>{Q(()=>c({type:o?4:5}))});n.useEffect(()=>(c({type:3,panelId:u}),()=>{c({type:3,panelId:null})}),[u,c]);let h=K(),y=h!==null?(h&k.Open)===k.Open:i.disclosureState===0,m=n.useMemo(()=>({open:i.disclosureState===0,close:$}),[i,$]),b={ref:g,id:u};return P.createElement(j.Provider,{value:i.panelId},D({mergeRefs:f,ourProps:b,theirProps:v,slot:m,defaultTag:ne,features:ie,visible:y,name:"Disclosure.Panel"}))}let le=E(ae),ue=E(se),ce=E(oe),ye=Object.assign(le,{Button:ue,Panel:ce});var C={exports:{}},pe=C.exports,M;function de(){return M||(M=1,function(e,s){(function(l,u){typeof G=="function"?e.exports=u():l.pluralize=u()})(pe,function(){var l=[],u=[],v={},i={},c={};function $(t){return typeof t=="string"?new RegExp("^"+t+"$","i"):t}function f(t,a){return t===a?a:t===t.toLowerCase()?a.toLowerCase():t===t.toUpperCase()?a.toUpperCase():t[0]===t[0].toUpperCase()?a.charAt(0).toUpperCase()+a.substr(1).toLowerCase():a.toLowerCase()}function g(t,a){return t.replace(/\$(\d{1,2})/g,function(d,r){return a[r]||""})}function h(t,a){return t.replace(a[0],function(d,r){var p=g(a[1],arguments);return f(d===""?t[r-1]:d,p)})}function y(t,a,d){if(!t.length||v.hasOwnProperty(t))return a;for(var r=d.length;r--;){var p=d[r];if(p[0].test(a))return h(a,p)}return a}function m(t,a,d){return function(r){var p=r.toLowerCase();return a.hasOwnProperty(p)?f(r,p):t.hasOwnProperty(p)?f(r,t[p]):y(p,r,d)}}function b(t,a,d,r){return function(p){var w=p.toLowerCase();return a.hasOwnProperty(w)?!0:t.hasOwnProperty(w)?!1:y(w,w,d)===w}}function o(t,a,d){var r=a===1?o.singular(t):o.plural(t);return(d?a+" ":"")+r}return o.plural=m(c,i,l),o.isPlural=b(c,i,l),o.singular=m(i,c,u),o.isSingular=b(i,c,u),o.addPluralRule=function(t,a){l.push([$(t),a])},o.addSingularRule=function(t,a){u.push([$(t),a])},o.addUncountableRule=function(t){if(typeof t=="string"){v[t.toLowerCase()]=!0;return}o.addPluralRule(t,"$0"),o.addSingularRule(t,"$0")},o.addIrregularRule=function(t,a){a=a.toLowerCase(),t=t.toLowerCase(),c[t]=a,i[a]=t},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(t){return o.addIrregularRule(t[0],t[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(t){return o.addPluralRule(t[0],t[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(t){return o.addSingularRule(t[0],t[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(o.addUncountableRule),o})}(C)),C.exports}var fe=de();const be=H(fe);function me({title:e,titleId:s,...l},u){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:u,"aria-labelledby":s},l),e?n.createElement("title",{id:s},e):null,n.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm3 10.5a.75.75 0 0 0 0-1.5H9a.75.75 0 0 0 0 1.5h6Z",clipRule:"evenodd"}))}const we=n.forwardRef(me);function he({title:e,titleId:s,...l},u){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:u,"aria-labelledby":s},l),e?n.createElement("title",{id:s},e):null,n.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25ZM12.75 9a.75.75 0 0 0-1.5 0v2.25H9a.75.75 0 0 0 0 1.5h2.25V15a.75.75 0 0 0 1.5 0v-2.25H15a.75.75 0 0 0 0-1.5h-2.25V9Z",clipRule:"evenodd"}))}const xe=n.forwardRef(he);export{ye as A,we as F,xe as a,be as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as f,r as i,j as e,c as u,B as j,n as p,m as b,a as g,w,i as d,Q as v,a5 as N,I as y}from"./index-
|
|
1
|
+
import{d as f,r as i,j as e,c as u,B as j,n as p,m as b,a as g,w,i as d,Q as v,a5 as N,I as y}from"./index-CkIQhGgw.js";import{p as k,A as n,F as x,a as m}from"./PlusCircleIcon-CoFMRFQI.js";import{S as z}from"./SplitPane-BY85POxQ.js";import{B as h,D as E}from"./transition-B5aHgz_j.js";function B(){const{errors:l,clearErrors:a}=f(),[t,c]=i.useState(!1);i.useEffect(()=>{l.size<1&&c(!1)},[l]);const r=l.size>0;return e.jsx(h,{onMouseEnter:()=>{c(r)},onMouseLeave:()=>{c(!1)},className:"flex",children:()=>e.jsxs(e.Fragment,{children:[e.jsx("span",{className:u("block ml-1 px-3 py-1 first-child:ml-0 rounded-full whitespace-nowrap font-bold text-xs text-center",r?"text-danger-500 bg-danger-10 dark:bg-danger-20 cursor-pointer":"bg-neutral-5 dark:bg-neutral-20 cursor-default text-neutral-500 dark:text-neutral-300"),children:r?e.jsxs("span",{children:[l.size," ",k("Error",l.size)]}):e.jsx("span",{children:"No Errors"})}),e.jsx(E,{show:t,as:i.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",children:e.jsxs(h.Panel,{className:"absolute top-10 right-2 z-[1000] flex flex-col rounded-md bg-light transform text-danger-700 shadow-2xl w-[90vw] max-h-[80vh]",children:[e.jsx("div",{className:"flex justify-end mx-1 mt-2",children:e.jsx(j,{size:b.sm,variant:p.Neutral,onClick:()=>a(),children:"Clear"})}),e.jsx("ul",{className:"w-full h-full p-2 overflow-auto hover:scrollbar scrollbar--vertical scrollbar--horizontal",children:Array.from(l).reverse().map(s=>e.jsx("li",{className:"bg-danger-10 mb-4 last:m-0 p-2 rounded-md",children:e.jsx(D,{scope:s.key,error:s})},s.id))})]})})]})})}function D({error:l,scope:a,withSplitPane:t=!1}){const{removeError:c}=f(),r=g(s=>s.version);return e.jsxs("div",{className:"flex flex-col w-full h-full overflow-hidden",children:[w(l.traceback)?e.jsx(o,{version:r,scope:a,error:l}):t?e.jsxs(z,{direction:"vertical",sizes:[50,50],minSize:100,snapOffset:0,className:"flex flex-col w-full h-full overflow-hidden",children:[e.jsx(o,{version:r,scope:a,error:l}),d(l.traceback)&&e.jsx(n,{defaultOpen:!0,children:({open:s})=>e.jsxs("div",{className:"flex flex-col w-full h-full overflow-hidden",children:[e.jsxs(n.Button,{className:"flex items-center justify-between rounded-lg text-left w-full bg-neutral-10 px-3 my-2",children:[e.jsx("div",{className:"text-lg font-bold whitespace-nowrap w-full",children:e.jsx("h3",{className:"py-2",children:"Traceback"})}),e.jsx("div",{children:s?e.jsx(x,{className:"h-6 w-6 text-danger-500"}):e.jsx(m,{className:"h-6 w-6 text-danger-500"})})]}),e.jsx(n.Panel,{className:"flex w-full h-full px-2 mb-2 overflow-hidden",children:e.jsx("pre",{className:"font-mono w-full h-full bg-dark-lighter text-danger-500 rounded-lg p-4 overflow-scroll hover:scrollbar scrollbar--vertical scrollbar--horizontal text-sm",children:e.jsx("code",{children:l.traceback??l.message})})})]})})]}):e.jsxs(e.Fragment,{children:[e.jsx(o,{version:r,scope:a,error:l}),d(l.traceback)&&e.jsx(n,{defaultOpen:!0,children:({open:s})=>e.jsxs("div",{className:"w-full h-full overflow-hidden",children:[e.jsxs(n.Button,{className:"flex items-center justify-between rounded-lg text-left w-full bg-neutral-10 px-3 my-2",children:[e.jsx("div",{className:"text-lg font-bold whitespace-nowrap w-full",children:e.jsx("h3",{className:"py-2",children:"Traceback"})}),e.jsx("div",{children:s?e.jsx(x,{className:"h-6 w-6 text-danger-500"}):e.jsx(m,{className:"h-6 w-6 text-danger-500"})})]}),e.jsx(n.Panel,{className:"flex w-full h-full px-2 mb-2 overflow-hidden",children:e.jsx("pre",{className:"font-mono w-full h-full bg-dark-lighter text-danger-500 rounded-lg p-4 overflow-scroll hover:scrollbar scrollbar--vertical scrollbar--horizontal text-sm",children:e.jsx("code",{children:l.traceback??l.message})})})]})})]}),e.jsx("div",{className:"flex justify-end mt-2",children:e.jsx(j,{variant:p.Neutral,size:b.sm,onClick:s=>{s.stopPropagation(),c(l)},children:"Dismiss"})})]})}function o({error:l,scope:a,version:t}){return e.jsxs("div",{className:"flex w-full overflow-hidden mb-2",children:[e.jsxs("div",{className:"w-[20rem] h-full",children:[e.jsxs("div",{className:"flex aline-center mb-2",children:[e.jsx("small",{className:"block mr-3",children:e.jsx("small",{className:"py-0.5 px-2 bg-danger-500 text-danger-100 rounded-md text-xs",children:l.status??"UI"})}),e.jsx("small",{className:"block",children:a})]}),e.jsxs("div",{className:u("text-sm px-2"),children:[e.jsx("small",{className:"block text-xs font-mono",children:v(N(l.timestamp),"yyyy-mm-dd hh-mm-ss",!1)}),e.jsx("p",{children:l.message})]})]}),e.jsxs("div",{className:"flex flex-col w-full px-4",children:[d(t)&&e.jsxs("small",{className:"block",children:[e.jsx("b",{children:"Version"}),": ",t]}),l.type!=null&&e.jsxs("small",{className:"block",children:[e.jsx("b",{children:"Type"}),": ",l.type]}),l.origin!=null&&e.jsxs("small",{className:"block mb-2",children:[e.jsx("b",{children:"Origin"}),": ",l.origin]}),l.trigger!=null&&e.jsxs("small",{className:"block mb-2",children:[e.jsx("b",{children:"Trigger"}),": ",l.trigger]}),e.jsx(y,{}),e.jsx("div",{className:"pt-4 h-full overflow-scroll hover:scrollbar scrollbar--vertical scrollbar--horizontal",children:e.jsx("p",{className:"flex text-sm ",children:l.description})})]})]})}export{D,B as R};
|