sqlmesh 0.180.1.dev2__py3-none-any.whl → 0.180.1.dev4__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/core/environment.py +29 -18
- {sqlmesh-0.180.1.dev2.dist-info → sqlmesh-0.180.1.dev4.dist-info}/METADATA +1 -1
- {sqlmesh-0.180.1.dev2.dist-info → sqlmesh-0.180.1.dev4.dist-info}/RECORD +53 -53
- web/client/dist/assets/{Audits-OtXA-B7_.js → Audits-4U9LnWyN.js} +1 -1
- web/client/dist/assets/{Banner-qm4gw7uq.js → Banner-DfF4HK9_.js} +1 -1
- web/client/dist/assets/{ChevronDownIcon-DSDq-4ww.js → ChevronDownIcon-DhkdL7W7.js} +1 -1
- web/client/dist/assets/{ChevronRightIcon-CeTr5gAC.js → ChevronRightIcon-CknBR_Ye.js} +1 -1
- web/client/dist/assets/{Content-k2jyYzis.js → Content-DfnWzoRW.js} +1 -1
- web/client/dist/assets/{Content-BfHaSSIT.js → Content-T59G6CRd.js} +1 -1
- web/client/dist/assets/{Data-Dfz_w-un.js → Data-Dvs4EVTS.js} +1 -1
- web/client/dist/assets/{DataCatalog-DKSw1R35.js → DataCatalog-CsA-vDbc.js} +1 -1
- web/client/dist/assets/{Editor-BgZtUHuJ.js → Editor-DgIo0RbF.js} +1 -1
- web/client/dist/assets/{Editor-BOV1NOlf.js → Editor-DsU0OwIl.js} +1 -1
- web/client/dist/assets/{Errors-Bbfv9Hn3.js → Errors-BOLt2obm.js} +1 -1
- web/client/dist/assets/{FileExplorer-6LJV2IQu.js → FileExplorer-CIj2pM9u.js} +1 -1
- web/client/dist/assets/{Footer-BWM6Wz1W.js → Footer--bTxQCKB.js} +1 -1
- web/client/dist/assets/{Header-DGl40dUV.js → Header-DmcDkHFL.js} +1 -1
- web/client/dist/assets/{Input-Ds7LqTjA.js → Input-CJirBrKe.js} +1 -1
- web/client/dist/assets/Lineage-BbLp8RL_.js +1 -0
- web/client/dist/assets/{ListboxShow-lKxbYEvK.js → ListboxShow-C0DBUX71.js} +1 -1
- web/client/dist/assets/{ModelLineage-Cy_E81Ue.js → ModelLineage-B8hv0xJ-.js} +1 -1
- web/client/dist/assets/{Models-BMJx8xwP.js → Models-CCm5MLTD.js} +1 -1
- web/client/dist/assets/{Page-BnicJ9rv.js → Page-WrN3RYDT.js} +1 -1
- web/client/dist/assets/{Plan-Dt9j8KkY.js → Plan-CFJZVnkR.js} +1 -1
- web/client/dist/assets/{PlusCircleIcon-CwSFhrmQ.js → PlusCircleIcon-CcC2lSkc.js} +1 -1
- web/client/dist/assets/{ReportErrors-FiDkSlma.js → ReportErrors-BK8N5y1z.js} +1 -1
- web/client/dist/assets/{Root-DyfypowM.js → Root-DSGcTlxk.js} +1 -1
- web/client/dist/assets/{SearchList-CkZWqVBz.js → SearchList-B9NnvRod.js} +1 -1
- web/client/dist/assets/{SelectEnvironment-D6QmPB6T.js → SelectEnvironment-CJsiOTlU.js} +1 -1
- web/client/dist/assets/{SourceList-CwySxUdr.js → SourceList-FVjgH2xJ.js} +1 -1
- web/client/dist/assets/{SourceListItem-B6W_SjuM.js → SourceListItem-BDqqo5jo.js} +1 -1
- web/client/dist/assets/{SplitPane-DbtzVepZ.js → SplitPane-BSlIdmc8.js} +1 -1
- web/client/dist/assets/{Tests-6u8PyhjF.js → Tests-DAbOEH7t.js} +1 -1
- web/client/dist/assets/{Welcome-Be18OEie.js → Welcome-c37SRGFq.js} +1 -1
- web/client/dist/assets/{context-CR5OGS_4.js → context-APidk_GA.js} +1 -1
- web/client/dist/assets/{context-CLMLWiJ8.js → context-DmjvuTWz.js} +1 -1
- web/client/dist/assets/{editor-C70c3Mp5.js → editor-B2GioI_r.js} +1 -1
- web/client/dist/assets/{file-BZmTxJS0.js → file-C7afm_LM.js} +1 -1
- web/client/dist/assets/{help-y1sPPrTb.js → help-C_umCstj.js} +1 -1
- web/client/dist/assets/{index-DJPcX5MS.js → index-CK4fdw8q.js} +1 -1
- web/client/dist/assets/{index-O5QH05aQ.js → index-COnjINWU.js} +7 -7
- web/client/dist/assets/{plan-BUWVD6AB.js → plan-BwAtu9hd.js} +1 -1
- web/client/dist/assets/{project-Cs5R6h8u.js → project-CWUUCZWT.js} +1 -1
- web/client/dist/assets/{transition-2ZtnMVOn.js → transition-DjPYSO2n.js} +1 -1
- web/client/dist/index.html +1 -1
- web/server/api/endpoints/lineage.py +1 -1
- web/server/api/endpoints/models.py +1 -0
- web/server/models.py +4 -0
- web/client/dist/assets/Lineage-PPvAiq05.js +0 -1
- {sqlmesh-0.180.1.dev2.dist-info → sqlmesh-0.180.1.dev4.dist-info}/WHEEL +0 -0
- {sqlmesh-0.180.1.dev2.dist-info → sqlmesh-0.180.1.dev4.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.180.1.dev2.dist-info → sqlmesh-0.180.1.dev4.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.180.1.dev2.dist-info → sqlmesh-0.180.1.dev4.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,R as J,j,b as Jn,c as ve,ac as ot,f as eo,ad as to,af as he,ae as pn,ag as no,m as ee,i as Bt}from"./index-O5QH05aQ.js";function oo({title:e,titleId:t,...n},o){return c.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":t},n),e?c.createElement("title",{id:t},e):null,c.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 ro=c.forwardRef(oo);function co({title:e,titleId:t,...n},o){return c.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":t},n),e?c.createElement("title",{id:t},e):null,c.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 io=c.forwardRef(co);function so({title:e,titleId:t,...n},o){return c.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":t},n),e?c.createElement("title",{id:t},e):null,c.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 ao=c.forwardRef(so);function lo({title:e,titleId:t,...n},o){return c.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":t},n),e?c.createElement("title",{id:t},e):null,c.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 uo=c.forwardRef(lo);function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},T.apply(null,arguments)}const fo=J.forwardRef(function({type:t="text",value:n,placeholder:o,className:r,disabled:i=!1,autoFocus:a=!1,onInput:s,onKeyDown:l},u){return n=n??"",j.jsx("input",{ref:u,className:ve("placeholder:text-neutral-300 dark:placeholder:text-neutral-700",i&&"opacity-50 cursor-not-allowed",r),type:t,value:n,placeholder:o,disabled:i,autoFocus:a,readOnly:Jn(!!s),onInput:s,onKeyDown:l})});function Wt(e,[t,n]){return Math.min(n,Math.max(t,e))}function U(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function Ot(e,t=[]){let n=[];function o(i,a){const s=c.createContext(a),l=n.length;n=[...n,a];function u(d){const{scope:w,children:m,...h}=d,f=(w==null?void 0:w[e][l])||s,v=c.useMemo(()=>h,Object.values(h));return c.createElement(f.Provider,{value:v},m)}function p(d,w){const m=(w==null?void 0:w[e][l])||s,h=c.useContext(m);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,p]}const r=()=>{const i=n.map(a=>c.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return r.scopeName=e,[o,po(r,...t)]}function po(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const a=o.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function mo(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function mn(...e){return t=>e.forEach(n=>mo(n,t))}function K(...e){return c.useCallback(mn(...e),e)}const Be=c.forwardRef((e,t)=>{const{children:n,...o}=e,r=c.Children.toArray(n),i=r.find(vo);if(i){const a=i.props.children,s=r.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(bt,T({},o,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(bt,T({},o,{ref:t}),n)});Be.displayName="Slot";const bt=c.forwardRef((e,t)=>{const{children:n,...o}=e;return c.isValidElement(n)?c.cloneElement(n,{...go(o,n.props),ref:t?mn(t,n.ref):n.ref}):c.Children.count(n)>1?c.Children.only(null):null});bt.displayName="SlotClone";const ho=({children:e})=>c.createElement(c.Fragment,null,e);function vo(e){return c.isValidElement(e)&&e.type===ho}function go(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...s)=>{i(...s),r(...s)}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function wo(e){const t=e+"CollectionProvider",[n,o]=Ot(t),[r,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:h,children:f}=m,v=J.useRef(null),g=J.useRef(new Map).current;return J.createElement(r,{scope:h,itemMap:g,collectionRef:v},f)},s=e+"CollectionSlot",l=J.forwardRef((m,h)=>{const{scope:f,children:v}=m,g=i(s,f),x=K(h,g.collectionRef);return J.createElement(Be,{ref:x},v)}),u=e+"CollectionItemSlot",p="data-radix-collection-item",d=J.forwardRef((m,h)=>{const{scope:f,children:v,...g}=m,x=J.useRef(null),$=K(h,x),b=i(u,f);return J.useEffect(()=>(b.itemMap.set(x,{ref:x,...g}),()=>void b.itemMap.delete(x))),J.createElement(Be,{[p]:"",ref:$},v)});function w(m){const h=i(e+"CollectionConsumer",m);return J.useCallback(()=>{const v=h.collectionRef.current;if(!v)return[];const g=Array.from(v.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort((b,y)=>g.indexOf(b.ref.current)-g.indexOf(y.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},w,o]}const xo=c.createContext(void 0);function $o(e){const t=c.useContext(xo);return e||t||"ltr"}const bo=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Z=bo.reduce((e,t)=>{const n=c.forwardRef((o,r)=>{const{asChild:i,...a}=o,s=i?Be:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,T({},a,{ref:r}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function yo(e,t){e&&ot.flushSync(()=>e.dispatchEvent(t))}function ue(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var o;return(o=t.current)===null||o===void 0?void 0:o.call(t,...n)},[])}function Eo(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e);c.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o),()=>t.removeEventListener("keydown",o)},[n,t])}const yt="dismissableLayer.update",So="dismissableLayer.pointerDownOutside",Co="dismissableLayer.focusOutside";let Ht;const Po=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ro=c.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,p=c.useContext(Po),[d,w]=c.useState(null),m=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=c.useState({}),f=K(t,E=>w(E)),v=Array.from(p.layers),[g]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(g),$=d?v.indexOf(d):-1,b=p.layersWithOutsidePointerEventsDisabled.size>0,y=$>=x,P=To(E=>{const O=E.target,F=[...p.branches].some(I=>I.contains(O));!y||F||(i==null||i(E),s==null||s(E),E.defaultPrevented||l==null||l())},m),S=Oo(E=>{const O=E.target;[...p.branches].some(I=>I.contains(O))||(a==null||a(E),s==null||s(E),E.defaultPrevented||l==null||l())},m);return Eo(E=>{$===p.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&l&&(E.preventDefault(),l()))},m),c.useEffect(()=>{if(d)return o&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Ht=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(d)),p.layers.add(d),Vt(),()=>{o&&p.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Ht)}},[d,m,o,p]),c.useEffect(()=>()=>{d&&(p.layers.delete(d),p.layersWithOutsidePointerEventsDisabled.delete(d),Vt())},[d,p]),c.useEffect(()=>{const E=()=>h({});return document.addEventListener(yt,E),()=>document.removeEventListener(yt,E)},[]),c.createElement(Z.div,T({},u,{ref:f,style:{pointerEvents:b?y?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,S.onFocusCapture),onBlurCapture:U(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,P.onPointerDownCapture)}))});function To(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e),o=c.useRef(!1),r=c.useRef(()=>{});return c.useEffect(()=>{const i=s=>{if(s.target&&!o.current){let u=function(){hn(So,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Oo(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e),o=c.useRef(!1);return c.useEffect(()=>{const r=i=>{i.target&&!o.current&&hn(Co,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Vt(){const e=new CustomEvent(yt);document.dispatchEvent(e)}function hn(e,t,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?yo(r,i):r.dispatchEvent(i)}let ft=0;function Ao(){c.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:jt()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:jt()),ft++,()=>{ft===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),ft--}},[])}function jt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const pt="focusScope.autoFocusOnMount",mt="focusScope.autoFocusOnUnmount",Ut={bubbles:!1,cancelable:!0},Do=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:i,...a}=e,[s,l]=c.useState(null),u=ue(r),p=ue(i),d=c.useRef(null),w=K(t,f=>l(f)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(o){let f=function($){if(m.paused||!s)return;const b=$.target;s.contains(b)?d.current=b:me(d.current,{select:!0})},v=function($){if(m.paused||!s)return;const b=$.relatedTarget;b!==null&&(s.contains(b)||me(d.current,{select:!0}))},g=function($){const b=document.activeElement;for(const y of $)y.removedNodes.length>0&&(s!=null&&s.contains(b)||me(s))};document.addEventListener("focusin",f),document.addEventListener("focusout",v);const x=new MutationObserver(g);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",v),x.disconnect()}}},[o,s,m.paused]),c.useEffect(()=>{if(s){Kt.add(m);const f=document.activeElement;if(!s.contains(f)){const g=new CustomEvent(pt,Ut);s.addEventListener(pt,u),s.dispatchEvent(g),g.defaultPrevented||(_o(Lo(vn(s)),{select:!0}),document.activeElement===f&&me(s))}return()=>{s.removeEventListener(pt,u),setTimeout(()=>{const g=new CustomEvent(mt,Ut);s.addEventListener(mt,p),s.dispatchEvent(g),g.defaultPrevented||me(f??document.body,{select:!0}),s.removeEventListener(mt,p),Kt.remove(m)},0)}}},[s,u,p,m]);const h=c.useCallback(f=>{if(!n&&!o||m.paused)return;const v=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,g=document.activeElement;if(v&&g){const x=f.currentTarget,[$,b]=Io(x);$&&b?!f.shiftKey&&g===b?(f.preventDefault(),n&&me($,{select:!0})):f.shiftKey&&g===$&&(f.preventDefault(),n&&me(b,{select:!0})):g===x&&f.preventDefault()}},[n,o,m.paused]);return c.createElement(Z.div,T({tabIndex:-1},a,{ref:w,onKeyDown:h}))});function _o(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(me(o,{select:t}),document.activeElement!==n)return}function Io(e){const t=vn(e),n=zt(t,e),o=zt(t.reverse(),e);return[n,o]}function vn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function zt(e,t){for(const n of e)if(!No(n,{upTo:t}))return n}function No(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 Mo(e){return e instanceof HTMLInputElement&&"select"in e}function me(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mo(e)&&t&&e.select()}}const Kt=ko();function ko(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Yt(e,t),e.unshift(t)},remove(t){var n;e=Yt(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Yt(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Lo(e){return e.filter(t=>t.tagName!=="A")}const te=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},Fo=eo.useId||(()=>{});let Bo=0;function gn(e){const[t,n]=c.useState(Fo());return te(()=>{n(o=>o??String(Bo++))},[e]),e||(t?`radix-${t}`:"")}const Wo=["top","right","bottom","left"],ge=Math.min,G=Math.max,Je=Math.round,Ue=Math.floor,ie=e=>({x:e,y:e}),Ho={left:"right",right:"left",bottom:"top",top:"bottom"},Vo={start:"end",end:"start"};function Et(e,t,n){return G(e,ge(t,n))}function de(e,t){return typeof e=="function"?e(t):e}function fe(e){return e.split("-")[0]}function _e(e){return e.split("-")[1]}function At(e){return e==="x"?"y":"x"}function Dt(e){return e==="y"?"height":"width"}function we(e){return["top","bottom"].includes(fe(e))?"y":"x"}function _t(e){return At(we(e))}function jo(e,t,n){n===void 0&&(n=!1);const o=_e(e),r=_t(e),i=Dt(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=et(a)),[a,et(a)]}function Uo(e){const t=et(e);return[St(e),t,St(t)]}function St(e){return e.replace(/start|end/g,t=>Vo[t])}function zo(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:a;default:return[]}}function Ko(e,t,n,o){const r=_e(e);let i=zo(fe(e),n==="start",o);return r&&(i=i.map(a=>a+"-"+r),t&&(i=i.concat(i.map(St)))),i}function et(e){return e.replace(/left|right|bottom|top/g,t=>Ho[t])}function Yo(e){return{top:0,right:0,bottom:0,left:0,...e}}function wn(e){return typeof e!="number"?Yo(e):{top:e,right:e,bottom:e,left:e}}function tt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Xt(e,t,n){let{reference:o,floating:r}=e;const i=we(t),a=_t(t),s=Dt(a),l=fe(t),u=i==="y",p=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,w=o[s]/2-r[s]/2;let m;switch(l){case"top":m={x:p,y:o.y-r.height};break;case"bottom":m={x:p,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:d};break;case"left":m={x:o.x-r.width,y:d};break;default:m={x:o.x,y:o.y}}switch(_e(t)){case"start":m[a]-=w*(n&&u?-1:1);break;case"end":m[a]+=w*(n&&u?-1:1);break}return m}const Xo=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:p,y:d}=Xt(u,o,l),w=o,m={},h=0;for(let f=0;f<s.length;f++){const{name:v,fn:g}=s[f],{x,y:$,data:b,reset:y}=await g({x:p,y:d,initialPlacement:o,placement:w,strategy:r,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});p=x??p,d=$??d,m={...m,[v]:{...m[v],...b}},y&&h<=50&&(h++,typeof y=="object"&&(y.placement&&(w=y.placement),y.rects&&(u=y.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):y.rects),{x:p,y:d}=Xt(u,w,l)),f=-1)}return{x:p,y:d,placement:w,strategy:r,middlewareData:m}};async function We(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:w=!1,padding:m=0}=de(t,e),h=wn(m),v=s[w?d==="floating"?"reference":"floating":d],g=tt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:p,strategy:l})),x=d==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,$=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),b=await(i.isElement==null?void 0:i.isElement($))?await(i.getScale==null?void 0:i.getScale($))||{x:1,y:1}:{x:1,y:1},y=tt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:$,strategy:l}):x);return{top:(g.top-y.top+h.top)/b.y,bottom:(y.bottom-g.bottom+h.bottom)/b.y,left:(g.left-y.left+h.left)/b.x,right:(y.right-g.right+h.right)/b.x}}const Zo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:p=0}=de(e,t)||{};if(u==null)return{};const d=wn(p),w={x:n,y:o},m=_t(r),h=Dt(m),f=await a.getDimensions(u),v=m==="y",g=v?"top":"left",x=v?"bottom":"right",$=v?"clientHeight":"clientWidth",b=i.reference[h]+i.reference[m]-w[m]-i.floating[h],y=w[m]-i.reference[m],P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let S=P?P[$]:0;(!S||!await(a.isElement==null?void 0:a.isElement(P)))&&(S=s.floating[$]||i.floating[h]);const E=b/2-y/2,O=S/2-f[h]/2-1,F=ge(d[g],O),I=ge(d[x],O),B=F,A=S-f[h]-I,D=S/2-f[h]/2+E,N=Et(B,D,A),_=!l.arrow&&_e(r)!=null&&D!==N&&i.reference[h]/2-(D<B?F:I)-f[h]/2<0,W=_?D<B?D-B:D-A:0;return{[m]:w[m]+W,data:{[m]:N,centerOffset:D-N-W,..._&&{alignmentOffset:W}},reset:_}}}),qo=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:w,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:f=!0,...v}=de(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=fe(r),x=we(s),$=fe(s)===s,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),y=w||($||!f?[et(s)]:Uo(s)),P=h!=="none";!w&&P&&y.push(...Ko(s,f,h,b));const S=[s,...y],E=await We(t,v),O=[];let F=((o=i.flip)==null?void 0:o.overflows)||[];if(p&&O.push(E[g]),d){const D=jo(r,a,b);O.push(E[D[0]],E[D[1]])}if(F=[...F,{placement:r,overflows:O}],!O.every(D=>D<=0)){var I,B;const D=(((I=i.flip)==null?void 0:I.index)||0)+1,N=S[D];if(N)return{data:{index:D,overflows:F},reset:{placement:N}};let _=(B=F.filter(W=>W.overflows[0]<=0).sort((W,R)=>W.overflows[1]-R.overflows[1])[0])==null?void 0:B.placement;if(!_)switch(m){case"bestFit":{var A;const W=(A=F.filter(R=>{if(P){const V=we(R.placement);return V===x||V==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(V=>V>0).reduce((V,z)=>V+z,0)]).sort((R,V)=>R[1]-V[1])[0])==null?void 0:A[0];W&&(_=W);break}case"initialPlacement":_=s;break}if(r!==_)return{reset:{placement:_}}}return{}}}};function Zt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qt(e){return Wo.some(t=>e[t]>=0)}const Go=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=de(e,t);switch(o){case"referenceHidden":{const i=await We(t,{...r,elementContext:"reference"}),a=Zt(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:qt(a)}}}case"escaped":{const i=await We(t,{...r,altBoundary:!0}),a=Zt(i,n.floating);return{data:{escapedOffsets:a,escaped:qt(a)}}}default:return{}}}}};async function Qo(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=fe(n),s=_e(n),l=we(n)==="y",u=["left","top"].includes(a)?-1:1,p=i&&l?-1:1,d=de(t,e);let{mainAxis:w,crossAxis:m,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof h=="number"&&(m=s==="end"?h*-1:h),l?{x:m*p,y:w*u}:{x:w*u,y:m*p}}const Jo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:a,middlewareData:s}=t,l=await Qo(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:a}}}}},er=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:v=>{let{x:g,y:x}=v;return{x:g,y:x}}},...l}=de(e,t),u={x:n,y:o},p=await We(t,l),d=we(fe(r)),w=At(d);let m=u[w],h=u[d];if(i){const v=w==="y"?"top":"left",g=w==="y"?"bottom":"right",x=m+p[v],$=m-p[g];m=Et(x,m,$)}if(a){const v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",x=h+p[v],$=h-p[g];h=Et(x,h,$)}const f=s.fn({...t,[w]:m,[d]:h});return{...f,data:{x:f.x-n,y:f.y-o,enabled:{[w]:i,[d]:a}}}}}},tr=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=de(e,t),p={x:n,y:o},d=we(r),w=At(d);let m=p[w],h=p[d];const f=de(s,t),v=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(l){const $=w==="y"?"height":"width",b=i.reference[w]-i.floating[$]+v.mainAxis,y=i.reference[w]+i.reference[$]-v.mainAxis;m<b?m=b:m>y&&(m=y)}if(u){var g,x;const $=w==="y"?"width":"height",b=["top","left"].includes(fe(r)),y=i.reference[d]-i.floating[$]+(b&&((g=a.offset)==null?void 0:g[d])||0)+(b?0:v.crossAxis),P=i.reference[d]+i.reference[$]+(b?0:((x=a.offset)==null?void 0:x[d])||0)-(b?v.crossAxis:0);h<y?h=y:h>P&&(h=P)}return{[w]:m,[d]:h}}}},nr=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...u}=de(e,t),p=await We(t,u),d=fe(r),w=_e(r),m=we(r)==="y",{width:h,height:f}=i.floating;let v,g;d==="top"||d==="bottom"?(v=d,g=w===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,v=w==="end"?"top":"bottom");const x=f-p.top-p.bottom,$=h-p.left-p.right,b=ge(f-p[v],x),y=ge(h-p[g],$),P=!t.middlewareData.shift;let S=b,E=y;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=$),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(S=x),P&&!w){const F=G(p.left,0),I=G(p.right,0),B=G(p.top,0),A=G(p.bottom,0);m?E=h-2*(F!==0||I!==0?F+I:G(p.left,p.right)):S=f-2*(B!==0||A!==0?B+A:G(p.top,p.bottom))}await l({...t,availableWidth:E,availableHeight:S});const O=await a.getDimensions(s.floating);return h!==O.width||f!==O.height?{reset:{rects:!0}}:{}}}};function rt(){return typeof window<"u"}function Ie(e){return xn(e)?(e.nodeName||"").toLowerCase():"#document"}function Q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ae(e){var t;return(t=(xn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xn(e){return rt()?e instanceof Node||e instanceof Q(e).Node:!1}function re(e){return rt()?e instanceof Element||e instanceof Q(e).Element:!1}function se(e){return rt()?e instanceof HTMLElement||e instanceof Q(e).HTMLElement:!1}function Gt(e){return!rt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot}function Ve(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ce(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function or(e){return["table","td","th"].includes(Ie(e))}function ct(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function It(e){const t=Nt(),n=re(e)?ce(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="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(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function rr(e){let t=xe(e);for(;se(t)&&!Ae(t);){if(It(t))return t;if(ct(t))return null;t=xe(t)}return null}function Nt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ae(e){return["html","body","#document"].includes(Ie(e))}function ce(e){return Q(e).getComputedStyle(e)}function it(e){return re(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xe(e){if(Ie(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gt(e)&&e.host||ae(e);return Gt(t)?t.host:t}function $n(e){const t=xe(e);return Ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:se(t)&&Ve(t)?t:$n(t)}function He(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=$n(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),a=Q(r);if(i){const s=Ct(a);return t.concat(a,a.visualViewport||[],Ve(r)?r:[],s&&n?He(s):[])}return t.concat(r,He(r,[],n))}function Ct(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bn(e){const t=ce(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=se(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,s=Je(n)!==i||Je(o)!==a;return s&&(n=i,o=a),{width:n,height:o,$:s}}function Mt(e){return re(e)?e:e.contextElement}function Te(e){const t=Mt(e);if(!se(t))return ie(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=bn(t);let a=(i?Je(n.width):n.width)/o,s=(i?Je(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const cr=ie(0);function yn(e){const t=Q(e);return!Nt()||!t.visualViewport?cr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ir(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Q(e)?!1:t}function $e(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=Mt(e);let a=ie(1);t&&(o?re(o)&&(a=Te(o)):a=Te(e));const s=ir(i,n,o)?yn(i):ie(0);let l=(r.left+s.x)/a.x,u=(r.top+s.y)/a.y,p=r.width/a.x,d=r.height/a.y;if(i){const w=Q(i),m=o&&re(o)?Q(o):o;let h=w,f=Ct(h);for(;f&&o&&m!==h;){const v=Te(f),g=f.getBoundingClientRect(),x=ce(f),$=g.left+(f.clientLeft+parseFloat(x.paddingLeft))*v.x,b=g.top+(f.clientTop+parseFloat(x.paddingTop))*v.y;l*=v.x,u*=v.y,p*=v.x,d*=v.y,l+=$,u+=b,h=Q(f),f=Ct(h)}}return tt({width:p,height:d,x:l,y:u})}function kt(e,t){const n=it(e).scrollLeft;return t?t.left+n:$e(ae(e)).left+n}function En(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-(n?0:kt(e,o)),i=o.top+t.scrollTop;return{x:r,y:i}}function sr(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",a=ae(o),s=t?ct(t.floating):!1;if(o===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=ie(1);const p=ie(0),d=se(o);if((d||!d&&!i)&&((Ie(o)!=="body"||Ve(a))&&(l=it(o)),se(o))){const m=$e(o);u=Te(o),p.x=m.x+o.clientLeft,p.y=m.y+o.clientTop}const w=a&&!d&&!i?En(a,l,!0):ie(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+p.x+w.x,y:n.y*u.y-l.scrollTop*u.y+p.y+w.y}}function ar(e){return Array.from(e.getClientRects())}function lr(e){const t=ae(e),n=it(e),o=e.ownerDocument.body,r=G(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=G(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+kt(e);const s=-n.scrollTop;return ce(o).direction==="rtl"&&(a+=G(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:s}}function ur(e,t){const n=Q(e),o=ae(e),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,s=0,l=0;if(r){i=r.width,a=r.height;const u=Nt();(!u||u&&t==="fixed")&&(s=r.offsetLeft,l=r.offsetTop)}return{width:i,height:a,x:s,y:l}}function dr(e,t){const n=$e(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=se(e)?Te(e):ie(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=r*i.x,u=o*i.y;return{width:a,height:s,x:l,y:u}}function Qt(e,t,n){let o;if(t==="viewport")o=ur(e,n);else if(t==="document")o=lr(ae(e));else if(re(t))o=dr(t,n);else{const r=yn(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return tt(o)}function Sn(e,t){const n=xe(e);return n===t||!re(n)||Ae(n)?!1:ce(n).position==="fixed"||Sn(n,t)}function fr(e,t){const n=t.get(e);if(n)return n;let o=He(e,[],!1).filter(s=>re(s)&&Ie(s)!=="body"),r=null;const i=ce(e).position==="fixed";let a=i?xe(e):e;for(;re(a)&&!Ae(a);){const s=ce(a),l=It(a);!l&&s.position==="fixed"&&(r=null),(i?!l&&!r:!l&&s.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Ve(a)&&!l&&Sn(e,a))?o=o.filter(p=>p!==a):r=s,a=xe(a)}return t.set(e,o),o}function pr(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?ct(t)?[]:fr(t,this._c):[].concat(n),o],s=a[0],l=a.reduce((u,p)=>{const d=Qt(t,p,r);return u.top=G(d.top,u.top),u.right=ge(d.right,u.right),u.bottom=ge(d.bottom,u.bottom),u.left=G(d.left,u.left),u},Qt(t,s,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function mr(e){const{width:t,height:n}=bn(e);return{width:t,height:n}}function hr(e,t,n){const o=se(t),r=ae(t),i=n==="fixed",a=$e(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=ie(0);if(o||!o&&!i)if((Ie(t)!=="body"||Ve(r))&&(s=it(t)),o){const w=$e(t,!0,i,t);l.x=w.x+t.clientLeft,l.y=w.y+t.clientTop}else r&&(l.x=kt(r));const u=r&&!o&&!i?En(r,s):ie(0),p=a.left+s.scrollLeft-l.x-u.x,d=a.top+s.scrollTop-l.y-u.y;return{x:p,y:d,width:a.width,height:a.height}}function ht(e){return ce(e).position==="static"}function Jt(e,t){if(!se(e)||ce(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ae(e)===n&&(n=n.ownerDocument.body),n}function Cn(e,t){const n=Q(e);if(ct(e))return n;if(!se(e)){let r=xe(e);for(;r&&!Ae(r);){if(re(r)&&!ht(r))return r;r=xe(r)}return n}let o=Jt(e,t);for(;o&&or(o)&&ht(o);)o=Jt(o,t);return o&&Ae(o)&&ht(o)&&!It(o)?n:o||rr(e)||n}const vr=async function(e){const t=this.getOffsetParent||Cn,n=this.getDimensions,o=await n(e.floating);return{reference:hr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function gr(e){return ce(e).direction==="rtl"}const wr={convertOffsetParentRelativeRectToViewportRelativeRect:sr,getDocumentElement:ae,getClippingRect:pr,getOffsetParent:Cn,getElementRects:vr,getClientRects:ar,getDimensions:mr,getScale:Te,isElement:re,isRTL:gr};function Pn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xr(e,t){let n=null,o;const r=ae(e);function i(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:p,top:d,width:w,height:m}=u;if(s||t(),!w||!m)return;const h=Ue(d),f=Ue(r.clientWidth-(p+w)),v=Ue(r.clientHeight-(d+m)),g=Ue(p),$={rootMargin:-h+"px "+-f+"px "+-v+"px "+-g+"px",threshold:G(0,ge(1,l))||1};let b=!0;function y(P){const S=P[0].intersectionRatio;if(S!==l){if(!b)return a();S?a(!1,S):o=setTimeout(()=>{a(!1,1e-7)},1e3)}S===1&&!Pn(u,e.getBoundingClientRect())&&a(),b=!1}try{n=new IntersectionObserver(y,{...$,root:r.ownerDocument})}catch{n=new IntersectionObserver(y,$)}n.observe(e)}return a(!0),i}function $r(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=Mt(e),p=r||i?[...u?He(u):[],...He(t)]:[];p.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const d=u&&s?xr(u,n):null;let w=-1,m=null;a&&(m=new ResizeObserver(g=>{let[x]=g;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var $;($=m)==null||$.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let h,f=l?$e(e):null;l&&v();function v(){const g=$e(e);f&&!Pn(f,g)&&n(),f=g,h=requestAnimationFrame(v)}return n(),()=>{var g;p.forEach(x=>{r&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d==null||d(),(g=m)==null||g.disconnect(),m=null,l&&cancelAnimationFrame(h)}}const br=Jo,yr=er,Er=qo,Sr=nr,Cr=Go,en=Zo,Pr=tr,Rr=(e,t,n)=>{const o=new Map,r={platform:wr,...n},i={...r.platform,_c:o};return Xo(e,t,{...r,platform:i})};var qe=typeof document<"u"?c.useLayoutEffect:c.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,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!nt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!nt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Rn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tn(e,t){const n=Rn(e);return Math.round(t*n)/n}function vt(e){const t=c.useRef(e);return qe(()=>{t.current=e}),t}function Tr(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[p,d]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[w,m]=c.useState(o);nt(w,o)||m(o);const[h,f]=c.useState(null),[v,g]=c.useState(null),x=c.useCallback(R=>{R!==P.current&&(P.current=R,f(R))},[]),$=c.useCallback(R=>{R!==S.current&&(S.current=R,g(R))},[]),b=i||h,y=a||v,P=c.useRef(null),S=c.useRef(null),E=c.useRef(p),O=l!=null,F=vt(l),I=vt(r),B=vt(u),A=c.useCallback(()=>{if(!P.current||!S.current)return;const R={placement:t,strategy:n,middleware:w};I.current&&(R.platform=I.current),Rr(P.current,S.current,R).then(V=>{const z={...V,isPositioned:B.current!==!1};D.current&&!nt(E.current,z)&&(E.current=z,ot.flushSync(()=>{d(z)}))})},[w,t,n,I,B]);qe(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(R=>({...R,isPositioned:!1})))},[u]);const D=c.useRef(!1);qe(()=>(D.current=!0,()=>{D.current=!1}),[]),qe(()=>{if(b&&(P.current=b),y&&(S.current=y),b&&y){if(F.current)return F.current(b,y,A);A()}},[b,y,A,F,O]);const N=c.useMemo(()=>({reference:P,floating:S,setReference:x,setFloating:$}),[x,$]),_=c.useMemo(()=>({reference:b,floating:y}),[b,y]),W=c.useMemo(()=>{const R={position:n,left:0,top:0};if(!_.floating)return R;const V=tn(_.floating,p.x),z=tn(_.floating,p.y);return s?{...R,transform:"translate("+V+"px, "+z+"px)",...Rn(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:z}},[n,s,_.floating,p.x,p.y]);return c.useMemo(()=>({...p,update:A,refs:N,elements:_,floatingStyles:W}),[p,A,N,_,W])}const Or=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?en({element:o.current,padding:r}).fn(n):{}:o?en({element:o,padding:r}).fn(n):{}}}},Ar=(e,t)=>({...br(e),options:[e,t]}),Dr=(e,t)=>({...yr(e),options:[e,t]}),_r=(e,t)=>({...Pr(e),options:[e,t]}),Ir=(e,t)=>({...Er(e),options:[e,t]}),Nr=(e,t)=>({...Sr(e),options:[e,t]}),Mr=(e,t)=>({...Cr(e),options:[e,t]}),kr=(e,t)=>({...Or(e),options:[e,t]});function Lr(e){const[t,n]=c.useState(void 0);return te(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}const Tn="Popper",[On,An]=Ot(Tn),[Fr,Dn]=On(Tn),Br=e=>{const{__scopePopper:t,children:n}=e,[o,r]=c.useState(null);return c.createElement(Fr,{scope:t,anchor:o,onAnchorChange:r},n)},Wr="PopperAnchor",Hr=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,i=Dn(Wr,n),a=c.useRef(null),s=K(t,a);return c.useEffect(()=>{i.onAnchorChange((o==null?void 0:o.current)||a.current)}),o?null:c.createElement(Z.div,T({},r,{ref:s}))}),_n="PopperContent",[Vr,_i]=On(_n),jr=c.forwardRef((e,t)=>{var n,o,r,i,a,s,l,u;const{__scopePopper:p,side:d="bottom",sideOffset:w=0,align:m="center",alignOffset:h=0,arrowPadding:f=0,collisionBoundary:v=[],collisionPadding:g=0,sticky:x="partial",hideWhenDetached:$=!1,avoidCollisions:b=!0,onPlaced:y,...P}=e,S=Dn(_n,p),[E,O]=c.useState(null),F=K(t,X=>O(X)),[I,B]=c.useState(null),A=Lr(I),D=(n=A==null?void 0:A.width)!==null&&n!==void 0?n:0,N=(o=A==null?void 0:A.height)!==null&&o!==void 0?o:0,_=d+(m!=="center"?"-"+m:""),W=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},R=Array.isArray(v)?v:[v],V=R.length>0,z={padding:W,boundary:R.filter(Ur),altBoundary:V},{refs:Ee,floatingStyles:Se,placement:Me,isPositioned:ne,middlewareData:oe}=Tr({strategy:"fixed",placement:_,whileElementsMounted:$r,elements:{reference:S.anchor},middleware:[Ar({mainAxis:w+N,alignmentAxis:h}),b&&Dr({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?_r():void 0,...z}),b&&Ir({...z}),Nr({...z,apply:({elements:X,rects:ke,availableWidth:Le,availableHeight:Fe})=>{const{width:Gn,height:Qn}=ke.reference,je=X.floating.style;je.setProperty("--radix-popper-available-width",`${Le}px`),je.setProperty("--radix-popper-available-height",`${Fe}px`),je.setProperty("--radix-popper-anchor-width",`${Gn}px`),je.setProperty("--radix-popper-anchor-height",`${Qn}px`)}}),I&&kr({element:I,padding:f}),zr({arrowWidth:D,arrowHeight:N}),$&&Mr({strategy:"referenceHidden"})]}),[pe,C]=In(Me),M=ue(y);te(()=>{ne&&(M==null||M())},[ne,M]);const Y=(r=oe.arrow)===null||r===void 0?void 0:r.x,H=(i=oe.arrow)===null||i===void 0?void 0:i.y,k=((a=oe.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[L,q]=c.useState();return te(()=>{E&&q(window.getComputedStyle(E).zIndex)},[E]),c.createElement("div",{ref:Ee.setFloating,"data-radix-popper-content-wrapper":"",style:{...Se,transform:ne?Se.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:L,"--radix-popper-transform-origin":[(s=oe.transformOrigin)===null||s===void 0?void 0:s.x,(l=oe.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},c.createElement(Vr,{scope:p,placedSide:pe,onArrowChange:B,arrowX:Y,arrowY:H,shouldHideArrow:k},c.createElement(Z.div,T({"data-side":pe,"data-align":C},P,{ref:F,style:{...P.style,animation:ne?void 0:"none",opacity:(u=oe.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))});function Ur(e){return e!==null}const zr=e=>({name:"transformOrigin",options:e,fn(t){var n,o,r,i,a;const{placement:s,rects:l,middlewareData:u}=t,d=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,w=d?0:e.arrowWidth,m=d?0:e.arrowHeight,[h,f]=In(s),v={start:"0%",center:"50%",end:"100%"}[f],g=((o=(r=u.arrow)===null||r===void 0?void 0:r.x)!==null&&o!==void 0?o:0)+w/2,x=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+m/2;let $="",b="";return h==="bottom"?($=d?v:`${g}px`,b=`${-m}px`):h==="top"?($=d?v:`${g}px`,b=`${l.floating.height+m}px`):h==="right"?($=`${-m}px`,b=d?v:`${x}px`):h==="left"&&($=`${l.floating.width+m}px`,b=d?v:`${x}px`),{data:{x:$,y:b}}}});function In(e){const[t,n="center"]=e.split("-");return[t,n]}const Kr=Br,Yr=Hr,Xr=jr,Zr=c.forwardRef((e,t)=>{var n;const{container:o=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...r}=e;return o?to.createPortal(c.createElement(Z.div,T({},r,{ref:t})),o):null});function nn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=qr({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:o,s=ue(n),l=c.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else r(u)},[i,e,r,s]);return[a,l]}function qr({defaultProp:e,onChange:t}){const n=c.useState(e),[o]=n,r=c.useRef(o),i=ue(t);return c.useEffect(()=>{r.current!==o&&(i(o),r.current=o)},[o,r,i]),n}function Gr(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Qr(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Jr(...e){return t=>e.forEach(n=>Qr(n,t))}const Nn=c.forwardRef((e,t)=>{const{children:n,...o}=e,r=c.Children.toArray(n),i=r.find(tc);if(i){const a=i.props.children,s=r.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(Pt,T({},o,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(Pt,T({},o,{ref:t}),n)});Nn.displayName="Slot";const Pt=c.forwardRef((e,t)=>{const{children:n,...o}=e;return c.isValidElement(n)?c.cloneElement(n,{...nc(o,n.props),ref:t?Jr(t,n.ref):n.ref}):c.Children.count(n)>1?c.Children.only(null):null});Pt.displayName="SlotClone";const ec=({children:e})=>c.createElement(c.Fragment,null,e);function tc(e){return c.isValidElement(e)&&e.type===ec}function nc(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...s)=>{i(...s),r(...s)}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}const oc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],rc=oc.reduce((e,t)=>{const n=c.forwardRef((o,r)=>{const{asChild:i,...a}=o,s=i?Nn:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,T({},a,{ref:r}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),cc=c.forwardRef((e,t)=>c.createElement(rc.span,T({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));var ic=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ce=new WeakMap,ze=new WeakMap,Ke={},gt=0,Mn=function(e){return e&&(e.host||Mn(e.parentNode))},sc=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Mn(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ac=function(e,t,n,o){var r=sc(t,Array.isArray(e)?e:[e]);Ke[n]||(Ke[n]=new WeakMap);var i=Ke[n],a=[],s=new Set,l=new Set(r),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};r.forEach(u);var p=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(w){if(s.has(w))p(w);else try{var m=w.getAttribute(o),h=m!==null&&m!=="false",f=(Ce.get(w)||0)+1,v=(i.get(w)||0)+1;Ce.set(w,f),i.set(w,v),a.push(w),f===1&&h&&ze.set(w,!0),v===1&&w.setAttribute(n,"true"),h||w.setAttribute(o,"true")}catch(g){console.error("aria-hidden: cannot operate on ",w,g)}})};return p(t),s.clear(),gt++,function(){a.forEach(function(d){var w=Ce.get(d)-1,m=i.get(d)-1;Ce.set(d,w),i.set(d,m),w||(ze.has(d)||d.removeAttribute(o),ze.delete(d)),m||d.removeAttribute(n)}),gt--,gt||(Ce=new WeakMap,Ce=new WeakMap,ze=new WeakMap,Ke={})}},lc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=ic(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),ac(o,r,n,"aria-hidden")):function(){return null}},Ge="right-scroll-bar-position",Qe="width-before-scroll-bar",uc="with-scroll-bars-hidden",dc="--removed-body-scroll-bar-size";function wt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function fc(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var pc=typeof window<"u"?c.useLayoutEffect:c.useEffect,on=new WeakMap;function mc(e,t){var n=fc(null,function(o){return e.forEach(function(r){return wt(r,o)})});return pc(function(){var o=on.get(n);if(o){var r=new Set(o),i=new Set(e),a=n.current;r.forEach(function(s){i.has(s)||wt(s,null)}),i.forEach(function(s){r.has(s)||wt(s,a)})}on.set(n,e)},[e]),n}function hc(e){return e}function vc(e,t){t===void 0&&(t=hc);var n=[],o=!1,r={read:function(){if(o)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 a=t(i,o);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(o=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){o=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var l=function(){var p=a;a=[],p.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(p){a.push(p),u()},filter:function(p){return a=a.filter(p),n}}}};return r}function gc(e){e===void 0&&(e={});var t=vc(null);return t.options=he({async:!0,ssr:!1},e),t}var kn=function(e){var t=e.sideCar,n=pn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return c.createElement(o,he({},n))};kn.isSideCarExport=!0;function wc(e,t){return e.useMedium(t),kn}var Ln=gc(),xt=function(){},st=c.forwardRef(function(e,t){var n=c.useRef(null),o=c.useState({onScrollCapture:xt,onWheelCapture:xt,onTouchMoveCapture:xt}),r=o[0],i=o[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,p=e.enabled,d=e.shards,w=e.sideCar,m=e.noIsolation,h=e.inert,f=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,x=pn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),$=w,b=mc([n,t]),y=he(he({},x),r);return c.createElement(c.Fragment,null,p&&c.createElement($,{sideCar:Ln,removeScrollBar:u,shards:d,noIsolation:m,inert:h,setCallbacks:i,allowPinchZoom:!!f,lockRef:n}),a?c.cloneElement(c.Children.only(s),he(he({},y),{ref:b})):c.createElement(g,he({},y,{className:l,ref:b}),s))});st.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};st.classNames={fullWidth:Qe,zeroRight:Ge};var xc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $c(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=xc();return t&&e.setAttribute("nonce",t),e}function bc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ec=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$c())&&(bc(t,n),yc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Sc=function(){var e=Ec();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Fn=function(){var e=Sc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Cc={left:0,top:0,right:0,gap:0},$t=function(e){return parseInt(e||"",10)||0},Pc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[$t(n),$t(o),$t(r)]},Rc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Cc;var t=Pc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Tc=Fn(),Oe="data-scroll-locked",Oc=function(e,t,n,o){var r=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
1
|
+
import{r as c,R as J,j,b as Jn,c as ve,ac as ot,f as eo,ad as to,af as he,ae as pn,ag as no,m as ee,i as Bt}from"./index-COnjINWU.js";function oo({title:e,titleId:t,...n},o){return c.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":t},n),e?c.createElement("title",{id:t},e):null,c.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 ro=c.forwardRef(oo);function co({title:e,titleId:t,...n},o){return c.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":t},n),e?c.createElement("title",{id:t},e):null,c.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 io=c.forwardRef(co);function so({title:e,titleId:t,...n},o){return c.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":t},n),e?c.createElement("title",{id:t},e):null,c.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 ao=c.forwardRef(so);function lo({title:e,titleId:t,...n},o){return c.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":t},n),e?c.createElement("title",{id:t},e):null,c.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 uo=c.forwardRef(lo);function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},T.apply(null,arguments)}const fo=J.forwardRef(function({type:t="text",value:n,placeholder:o,className:r,disabled:i=!1,autoFocus:a=!1,onInput:s,onKeyDown:l},u){return n=n??"",j.jsx("input",{ref:u,className:ve("placeholder:text-neutral-300 dark:placeholder:text-neutral-700",i&&"opacity-50 cursor-not-allowed",r),type:t,value:n,placeholder:o,disabled:i,autoFocus:a,readOnly:Jn(!!s),onInput:s,onKeyDown:l})});function Wt(e,[t,n]){return Math.min(n,Math.max(t,e))}function U(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function Ot(e,t=[]){let n=[];function o(i,a){const s=c.createContext(a),l=n.length;n=[...n,a];function u(d){const{scope:w,children:m,...h}=d,f=(w==null?void 0:w[e][l])||s,v=c.useMemo(()=>h,Object.values(h));return c.createElement(f.Provider,{value:v},m)}function p(d,w){const m=(w==null?void 0:w[e][l])||s,h=c.useContext(m);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,p]}const r=()=>{const i=n.map(a=>c.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return r.scopeName=e,[o,po(r,...t)]}function po(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const a=o.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function mo(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function mn(...e){return t=>e.forEach(n=>mo(n,t))}function K(...e){return c.useCallback(mn(...e),e)}const Be=c.forwardRef((e,t)=>{const{children:n,...o}=e,r=c.Children.toArray(n),i=r.find(vo);if(i){const a=i.props.children,s=r.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(bt,T({},o,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(bt,T({},o,{ref:t}),n)});Be.displayName="Slot";const bt=c.forwardRef((e,t)=>{const{children:n,...o}=e;return c.isValidElement(n)?c.cloneElement(n,{...go(o,n.props),ref:t?mn(t,n.ref):n.ref}):c.Children.count(n)>1?c.Children.only(null):null});bt.displayName="SlotClone";const ho=({children:e})=>c.createElement(c.Fragment,null,e);function vo(e){return c.isValidElement(e)&&e.type===ho}function go(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...s)=>{i(...s),r(...s)}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function wo(e){const t=e+"CollectionProvider",[n,o]=Ot(t),[r,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:h,children:f}=m,v=J.useRef(null),g=J.useRef(new Map).current;return J.createElement(r,{scope:h,itemMap:g,collectionRef:v},f)},s=e+"CollectionSlot",l=J.forwardRef((m,h)=>{const{scope:f,children:v}=m,g=i(s,f),x=K(h,g.collectionRef);return J.createElement(Be,{ref:x},v)}),u=e+"CollectionItemSlot",p="data-radix-collection-item",d=J.forwardRef((m,h)=>{const{scope:f,children:v,...g}=m,x=J.useRef(null),$=K(h,x),b=i(u,f);return J.useEffect(()=>(b.itemMap.set(x,{ref:x,...g}),()=>void b.itemMap.delete(x))),J.createElement(Be,{[p]:"",ref:$},v)});function w(m){const h=i(e+"CollectionConsumer",m);return J.useCallback(()=>{const v=h.collectionRef.current;if(!v)return[];const g=Array.from(v.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort((b,y)=>g.indexOf(b.ref.current)-g.indexOf(y.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},w,o]}const xo=c.createContext(void 0);function $o(e){const t=c.useContext(xo);return e||t||"ltr"}const bo=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Z=bo.reduce((e,t)=>{const n=c.forwardRef((o,r)=>{const{asChild:i,...a}=o,s=i?Be:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,T({},a,{ref:r}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function yo(e,t){e&&ot.flushSync(()=>e.dispatchEvent(t))}function ue(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var o;return(o=t.current)===null||o===void 0?void 0:o.call(t,...n)},[])}function Eo(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e);c.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o),()=>t.removeEventListener("keydown",o)},[n,t])}const yt="dismissableLayer.update",So="dismissableLayer.pointerDownOutside",Co="dismissableLayer.focusOutside";let Ht;const Po=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ro=c.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,p=c.useContext(Po),[d,w]=c.useState(null),m=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=c.useState({}),f=K(t,E=>w(E)),v=Array.from(p.layers),[g]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(g),$=d?v.indexOf(d):-1,b=p.layersWithOutsidePointerEventsDisabled.size>0,y=$>=x,P=To(E=>{const O=E.target,F=[...p.branches].some(I=>I.contains(O));!y||F||(i==null||i(E),s==null||s(E),E.defaultPrevented||l==null||l())},m),S=Oo(E=>{const O=E.target;[...p.branches].some(I=>I.contains(O))||(a==null||a(E),s==null||s(E),E.defaultPrevented||l==null||l())},m);return Eo(E=>{$===p.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&l&&(E.preventDefault(),l()))},m),c.useEffect(()=>{if(d)return o&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Ht=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(d)),p.layers.add(d),Vt(),()=>{o&&p.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Ht)}},[d,m,o,p]),c.useEffect(()=>()=>{d&&(p.layers.delete(d),p.layersWithOutsidePointerEventsDisabled.delete(d),Vt())},[d,p]),c.useEffect(()=>{const E=()=>h({});return document.addEventListener(yt,E),()=>document.removeEventListener(yt,E)},[]),c.createElement(Z.div,T({},u,{ref:f,style:{pointerEvents:b?y?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,S.onFocusCapture),onBlurCapture:U(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,P.onPointerDownCapture)}))});function To(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e),o=c.useRef(!1),r=c.useRef(()=>{});return c.useEffect(()=>{const i=s=>{if(s.target&&!o.current){let u=function(){hn(So,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Oo(e,t=globalThis==null?void 0:globalThis.document){const n=ue(e),o=c.useRef(!1);return c.useEffect(()=>{const r=i=>{i.target&&!o.current&&hn(Co,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Vt(){const e=new CustomEvent(yt);document.dispatchEvent(e)}function hn(e,t,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?yo(r,i):r.dispatchEvent(i)}let ft=0;function Ao(){c.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:jt()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:jt()),ft++,()=>{ft===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),ft--}},[])}function jt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const pt="focusScope.autoFocusOnMount",mt="focusScope.autoFocusOnUnmount",Ut={bubbles:!1,cancelable:!0},Do=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:i,...a}=e,[s,l]=c.useState(null),u=ue(r),p=ue(i),d=c.useRef(null),w=K(t,f=>l(f)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(o){let f=function($){if(m.paused||!s)return;const b=$.target;s.contains(b)?d.current=b:me(d.current,{select:!0})},v=function($){if(m.paused||!s)return;const b=$.relatedTarget;b!==null&&(s.contains(b)||me(d.current,{select:!0}))},g=function($){const b=document.activeElement;for(const y of $)y.removedNodes.length>0&&(s!=null&&s.contains(b)||me(s))};document.addEventListener("focusin",f),document.addEventListener("focusout",v);const x=new MutationObserver(g);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",v),x.disconnect()}}},[o,s,m.paused]),c.useEffect(()=>{if(s){Kt.add(m);const f=document.activeElement;if(!s.contains(f)){const g=new CustomEvent(pt,Ut);s.addEventListener(pt,u),s.dispatchEvent(g),g.defaultPrevented||(_o(Lo(vn(s)),{select:!0}),document.activeElement===f&&me(s))}return()=>{s.removeEventListener(pt,u),setTimeout(()=>{const g=new CustomEvent(mt,Ut);s.addEventListener(mt,p),s.dispatchEvent(g),g.defaultPrevented||me(f??document.body,{select:!0}),s.removeEventListener(mt,p),Kt.remove(m)},0)}}},[s,u,p,m]);const h=c.useCallback(f=>{if(!n&&!o||m.paused)return;const v=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,g=document.activeElement;if(v&&g){const x=f.currentTarget,[$,b]=Io(x);$&&b?!f.shiftKey&&g===b?(f.preventDefault(),n&&me($,{select:!0})):f.shiftKey&&g===$&&(f.preventDefault(),n&&me(b,{select:!0})):g===x&&f.preventDefault()}},[n,o,m.paused]);return c.createElement(Z.div,T({tabIndex:-1},a,{ref:w,onKeyDown:h}))});function _o(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(me(o,{select:t}),document.activeElement!==n)return}function Io(e){const t=vn(e),n=zt(t,e),o=zt(t.reverse(),e);return[n,o]}function vn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function zt(e,t){for(const n of e)if(!No(n,{upTo:t}))return n}function No(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 Mo(e){return e instanceof HTMLInputElement&&"select"in e}function me(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mo(e)&&t&&e.select()}}const Kt=ko();function ko(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Yt(e,t),e.unshift(t)},remove(t){var n;e=Yt(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Yt(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Lo(e){return e.filter(t=>t.tagName!=="A")}const te=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},Fo=eo.useId||(()=>{});let Bo=0;function gn(e){const[t,n]=c.useState(Fo());return te(()=>{n(o=>o??String(Bo++))},[e]),e||(t?`radix-${t}`:"")}const Wo=["top","right","bottom","left"],ge=Math.min,G=Math.max,Je=Math.round,Ue=Math.floor,ie=e=>({x:e,y:e}),Ho={left:"right",right:"left",bottom:"top",top:"bottom"},Vo={start:"end",end:"start"};function Et(e,t,n){return G(e,ge(t,n))}function de(e,t){return typeof e=="function"?e(t):e}function fe(e){return e.split("-")[0]}function _e(e){return e.split("-")[1]}function At(e){return e==="x"?"y":"x"}function Dt(e){return e==="y"?"height":"width"}function we(e){return["top","bottom"].includes(fe(e))?"y":"x"}function _t(e){return At(we(e))}function jo(e,t,n){n===void 0&&(n=!1);const o=_e(e),r=_t(e),i=Dt(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=et(a)),[a,et(a)]}function Uo(e){const t=et(e);return[St(e),t,St(t)]}function St(e){return e.replace(/start|end/g,t=>Vo[t])}function zo(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:a;default:return[]}}function Ko(e,t,n,o){const r=_e(e);let i=zo(fe(e),n==="start",o);return r&&(i=i.map(a=>a+"-"+r),t&&(i=i.concat(i.map(St)))),i}function et(e){return e.replace(/left|right|bottom|top/g,t=>Ho[t])}function Yo(e){return{top:0,right:0,bottom:0,left:0,...e}}function wn(e){return typeof e!="number"?Yo(e):{top:e,right:e,bottom:e,left:e}}function tt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Xt(e,t,n){let{reference:o,floating:r}=e;const i=we(t),a=_t(t),s=Dt(a),l=fe(t),u=i==="y",p=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,w=o[s]/2-r[s]/2;let m;switch(l){case"top":m={x:p,y:o.y-r.height};break;case"bottom":m={x:p,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:d};break;case"left":m={x:o.x-r.width,y:d};break;default:m={x:o.x,y:o.y}}switch(_e(t)){case"start":m[a]-=w*(n&&u?-1:1);break;case"end":m[a]+=w*(n&&u?-1:1);break}return m}const Xo=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:p,y:d}=Xt(u,o,l),w=o,m={},h=0;for(let f=0;f<s.length;f++){const{name:v,fn:g}=s[f],{x,y:$,data:b,reset:y}=await g({x:p,y:d,initialPlacement:o,placement:w,strategy:r,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});p=x??p,d=$??d,m={...m,[v]:{...m[v],...b}},y&&h<=50&&(h++,typeof y=="object"&&(y.placement&&(w=y.placement),y.rects&&(u=y.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):y.rects),{x:p,y:d}=Xt(u,w,l)),f=-1)}return{x:p,y:d,placement:w,strategy:r,middlewareData:m}};async function We(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:w=!1,padding:m=0}=de(t,e),h=wn(m),v=s[w?d==="floating"?"reference":"floating":d],g=tt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:p,strategy:l})),x=d==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,$=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),b=await(i.isElement==null?void 0:i.isElement($))?await(i.getScale==null?void 0:i.getScale($))||{x:1,y:1}:{x:1,y:1},y=tt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:$,strategy:l}):x);return{top:(g.top-y.top+h.top)/b.y,bottom:(y.bottom-g.bottom+h.bottom)/b.y,left:(g.left-y.left+h.left)/b.x,right:(y.right-g.right+h.right)/b.x}}const Zo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:p=0}=de(e,t)||{};if(u==null)return{};const d=wn(p),w={x:n,y:o},m=_t(r),h=Dt(m),f=await a.getDimensions(u),v=m==="y",g=v?"top":"left",x=v?"bottom":"right",$=v?"clientHeight":"clientWidth",b=i.reference[h]+i.reference[m]-w[m]-i.floating[h],y=w[m]-i.reference[m],P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let S=P?P[$]:0;(!S||!await(a.isElement==null?void 0:a.isElement(P)))&&(S=s.floating[$]||i.floating[h]);const E=b/2-y/2,O=S/2-f[h]/2-1,F=ge(d[g],O),I=ge(d[x],O),B=F,A=S-f[h]-I,D=S/2-f[h]/2+E,N=Et(B,D,A),_=!l.arrow&&_e(r)!=null&&D!==N&&i.reference[h]/2-(D<B?F:I)-f[h]/2<0,W=_?D<B?D-B:D-A:0;return{[m]:w[m]+W,data:{[m]:N,centerOffset:D-N-W,..._&&{alignmentOffset:W}},reset:_}}}),qo=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:w,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:f=!0,...v}=de(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=fe(r),x=we(s),$=fe(s)===s,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),y=w||($||!f?[et(s)]:Uo(s)),P=h!=="none";!w&&P&&y.push(...Ko(s,f,h,b));const S=[s,...y],E=await We(t,v),O=[];let F=((o=i.flip)==null?void 0:o.overflows)||[];if(p&&O.push(E[g]),d){const D=jo(r,a,b);O.push(E[D[0]],E[D[1]])}if(F=[...F,{placement:r,overflows:O}],!O.every(D=>D<=0)){var I,B;const D=(((I=i.flip)==null?void 0:I.index)||0)+1,N=S[D];if(N)return{data:{index:D,overflows:F},reset:{placement:N}};let _=(B=F.filter(W=>W.overflows[0]<=0).sort((W,R)=>W.overflows[1]-R.overflows[1])[0])==null?void 0:B.placement;if(!_)switch(m){case"bestFit":{var A;const W=(A=F.filter(R=>{if(P){const V=we(R.placement);return V===x||V==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(V=>V>0).reduce((V,z)=>V+z,0)]).sort((R,V)=>R[1]-V[1])[0])==null?void 0:A[0];W&&(_=W);break}case"initialPlacement":_=s;break}if(r!==_)return{reset:{placement:_}}}return{}}}};function Zt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qt(e){return Wo.some(t=>e[t]>=0)}const Go=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=de(e,t);switch(o){case"referenceHidden":{const i=await We(t,{...r,elementContext:"reference"}),a=Zt(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:qt(a)}}}case"escaped":{const i=await We(t,{...r,altBoundary:!0}),a=Zt(i,n.floating);return{data:{escapedOffsets:a,escaped:qt(a)}}}default:return{}}}}};async function Qo(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=fe(n),s=_e(n),l=we(n)==="y",u=["left","top"].includes(a)?-1:1,p=i&&l?-1:1,d=de(t,e);let{mainAxis:w,crossAxis:m,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof h=="number"&&(m=s==="end"?h*-1:h),l?{x:m*p,y:w*u}:{x:w*u,y:m*p}}const Jo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:a,middlewareData:s}=t,l=await Qo(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:a}}}}},er=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:v=>{let{x:g,y:x}=v;return{x:g,y:x}}},...l}=de(e,t),u={x:n,y:o},p=await We(t,l),d=we(fe(r)),w=At(d);let m=u[w],h=u[d];if(i){const v=w==="y"?"top":"left",g=w==="y"?"bottom":"right",x=m+p[v],$=m-p[g];m=Et(x,m,$)}if(a){const v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",x=h+p[v],$=h-p[g];h=Et(x,h,$)}const f=s.fn({...t,[w]:m,[d]:h});return{...f,data:{x:f.x-n,y:f.y-o,enabled:{[w]:i,[d]:a}}}}}},tr=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=de(e,t),p={x:n,y:o},d=we(r),w=At(d);let m=p[w],h=p[d];const f=de(s,t),v=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(l){const $=w==="y"?"height":"width",b=i.reference[w]-i.floating[$]+v.mainAxis,y=i.reference[w]+i.reference[$]-v.mainAxis;m<b?m=b:m>y&&(m=y)}if(u){var g,x;const $=w==="y"?"width":"height",b=["top","left"].includes(fe(r)),y=i.reference[d]-i.floating[$]+(b&&((g=a.offset)==null?void 0:g[d])||0)+(b?0:v.crossAxis),P=i.reference[d]+i.reference[$]+(b?0:((x=a.offset)==null?void 0:x[d])||0)-(b?v.crossAxis:0);h<y?h=y:h>P&&(h=P)}return{[w]:m,[d]:h}}}},nr=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...u}=de(e,t),p=await We(t,u),d=fe(r),w=_e(r),m=we(r)==="y",{width:h,height:f}=i.floating;let v,g;d==="top"||d==="bottom"?(v=d,g=w===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,v=w==="end"?"top":"bottom");const x=f-p.top-p.bottom,$=h-p.left-p.right,b=ge(f-p[v],x),y=ge(h-p[g],$),P=!t.middlewareData.shift;let S=b,E=y;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=$),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(S=x),P&&!w){const F=G(p.left,0),I=G(p.right,0),B=G(p.top,0),A=G(p.bottom,0);m?E=h-2*(F!==0||I!==0?F+I:G(p.left,p.right)):S=f-2*(B!==0||A!==0?B+A:G(p.top,p.bottom))}await l({...t,availableWidth:E,availableHeight:S});const O=await a.getDimensions(s.floating);return h!==O.width||f!==O.height?{reset:{rects:!0}}:{}}}};function rt(){return typeof window<"u"}function Ie(e){return xn(e)?(e.nodeName||"").toLowerCase():"#document"}function Q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ae(e){var t;return(t=(xn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xn(e){return rt()?e instanceof Node||e instanceof Q(e).Node:!1}function re(e){return rt()?e instanceof Element||e instanceof Q(e).Element:!1}function se(e){return rt()?e instanceof HTMLElement||e instanceof Q(e).HTMLElement:!1}function Gt(e){return!rt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Q(e).ShadowRoot}function Ve(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ce(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function or(e){return["table","td","th"].includes(Ie(e))}function ct(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function It(e){const t=Nt(),n=re(e)?ce(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="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(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function rr(e){let t=xe(e);for(;se(t)&&!Ae(t);){if(It(t))return t;if(ct(t))return null;t=xe(t)}return null}function Nt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ae(e){return["html","body","#document"].includes(Ie(e))}function ce(e){return Q(e).getComputedStyle(e)}function it(e){return re(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xe(e){if(Ie(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gt(e)&&e.host||ae(e);return Gt(t)?t.host:t}function $n(e){const t=xe(e);return Ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:se(t)&&Ve(t)?t:$n(t)}function He(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=$n(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),a=Q(r);if(i){const s=Ct(a);return t.concat(a,a.visualViewport||[],Ve(r)?r:[],s&&n?He(s):[])}return t.concat(r,He(r,[],n))}function Ct(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bn(e){const t=ce(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=se(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,s=Je(n)!==i||Je(o)!==a;return s&&(n=i,o=a),{width:n,height:o,$:s}}function Mt(e){return re(e)?e:e.contextElement}function Te(e){const t=Mt(e);if(!se(t))return ie(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=bn(t);let a=(i?Je(n.width):n.width)/o,s=(i?Je(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const cr=ie(0);function yn(e){const t=Q(e);return!Nt()||!t.visualViewport?cr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ir(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Q(e)?!1:t}function $e(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=Mt(e);let a=ie(1);t&&(o?re(o)&&(a=Te(o)):a=Te(e));const s=ir(i,n,o)?yn(i):ie(0);let l=(r.left+s.x)/a.x,u=(r.top+s.y)/a.y,p=r.width/a.x,d=r.height/a.y;if(i){const w=Q(i),m=o&&re(o)?Q(o):o;let h=w,f=Ct(h);for(;f&&o&&m!==h;){const v=Te(f),g=f.getBoundingClientRect(),x=ce(f),$=g.left+(f.clientLeft+parseFloat(x.paddingLeft))*v.x,b=g.top+(f.clientTop+parseFloat(x.paddingTop))*v.y;l*=v.x,u*=v.y,p*=v.x,d*=v.y,l+=$,u+=b,h=Q(f),f=Ct(h)}}return tt({width:p,height:d,x:l,y:u})}function kt(e,t){const n=it(e).scrollLeft;return t?t.left+n:$e(ae(e)).left+n}function En(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-(n?0:kt(e,o)),i=o.top+t.scrollTop;return{x:r,y:i}}function sr(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",a=ae(o),s=t?ct(t.floating):!1;if(o===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=ie(1);const p=ie(0),d=se(o);if((d||!d&&!i)&&((Ie(o)!=="body"||Ve(a))&&(l=it(o)),se(o))){const m=$e(o);u=Te(o),p.x=m.x+o.clientLeft,p.y=m.y+o.clientTop}const w=a&&!d&&!i?En(a,l,!0):ie(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+p.x+w.x,y:n.y*u.y-l.scrollTop*u.y+p.y+w.y}}function ar(e){return Array.from(e.getClientRects())}function lr(e){const t=ae(e),n=it(e),o=e.ownerDocument.body,r=G(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=G(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+kt(e);const s=-n.scrollTop;return ce(o).direction==="rtl"&&(a+=G(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:s}}function ur(e,t){const n=Q(e),o=ae(e),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,s=0,l=0;if(r){i=r.width,a=r.height;const u=Nt();(!u||u&&t==="fixed")&&(s=r.offsetLeft,l=r.offsetTop)}return{width:i,height:a,x:s,y:l}}function dr(e,t){const n=$e(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=se(e)?Te(e):ie(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=r*i.x,u=o*i.y;return{width:a,height:s,x:l,y:u}}function Qt(e,t,n){let o;if(t==="viewport")o=ur(e,n);else if(t==="document")o=lr(ae(e));else if(re(t))o=dr(t,n);else{const r=yn(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return tt(o)}function Sn(e,t){const n=xe(e);return n===t||!re(n)||Ae(n)?!1:ce(n).position==="fixed"||Sn(n,t)}function fr(e,t){const n=t.get(e);if(n)return n;let o=He(e,[],!1).filter(s=>re(s)&&Ie(s)!=="body"),r=null;const i=ce(e).position==="fixed";let a=i?xe(e):e;for(;re(a)&&!Ae(a);){const s=ce(a),l=It(a);!l&&s.position==="fixed"&&(r=null),(i?!l&&!r:!l&&s.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Ve(a)&&!l&&Sn(e,a))?o=o.filter(p=>p!==a):r=s,a=xe(a)}return t.set(e,o),o}function pr(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?ct(t)?[]:fr(t,this._c):[].concat(n),o],s=a[0],l=a.reduce((u,p)=>{const d=Qt(t,p,r);return u.top=G(d.top,u.top),u.right=ge(d.right,u.right),u.bottom=ge(d.bottom,u.bottom),u.left=G(d.left,u.left),u},Qt(t,s,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function mr(e){const{width:t,height:n}=bn(e);return{width:t,height:n}}function hr(e,t,n){const o=se(t),r=ae(t),i=n==="fixed",a=$e(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=ie(0);if(o||!o&&!i)if((Ie(t)!=="body"||Ve(r))&&(s=it(t)),o){const w=$e(t,!0,i,t);l.x=w.x+t.clientLeft,l.y=w.y+t.clientTop}else r&&(l.x=kt(r));const u=r&&!o&&!i?En(r,s):ie(0),p=a.left+s.scrollLeft-l.x-u.x,d=a.top+s.scrollTop-l.y-u.y;return{x:p,y:d,width:a.width,height:a.height}}function ht(e){return ce(e).position==="static"}function Jt(e,t){if(!se(e)||ce(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ae(e)===n&&(n=n.ownerDocument.body),n}function Cn(e,t){const n=Q(e);if(ct(e))return n;if(!se(e)){let r=xe(e);for(;r&&!Ae(r);){if(re(r)&&!ht(r))return r;r=xe(r)}return n}let o=Jt(e,t);for(;o&&or(o)&&ht(o);)o=Jt(o,t);return o&&Ae(o)&&ht(o)&&!It(o)?n:o||rr(e)||n}const vr=async function(e){const t=this.getOffsetParent||Cn,n=this.getDimensions,o=await n(e.floating);return{reference:hr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function gr(e){return ce(e).direction==="rtl"}const wr={convertOffsetParentRelativeRectToViewportRelativeRect:sr,getDocumentElement:ae,getClippingRect:pr,getOffsetParent:Cn,getElementRects:vr,getClientRects:ar,getDimensions:mr,getScale:Te,isElement:re,isRTL:gr};function Pn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xr(e,t){let n=null,o;const r=ae(e);function i(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:p,top:d,width:w,height:m}=u;if(s||t(),!w||!m)return;const h=Ue(d),f=Ue(r.clientWidth-(p+w)),v=Ue(r.clientHeight-(d+m)),g=Ue(p),$={rootMargin:-h+"px "+-f+"px "+-v+"px "+-g+"px",threshold:G(0,ge(1,l))||1};let b=!0;function y(P){const S=P[0].intersectionRatio;if(S!==l){if(!b)return a();S?a(!1,S):o=setTimeout(()=>{a(!1,1e-7)},1e3)}S===1&&!Pn(u,e.getBoundingClientRect())&&a(),b=!1}try{n=new IntersectionObserver(y,{...$,root:r.ownerDocument})}catch{n=new IntersectionObserver(y,$)}n.observe(e)}return a(!0),i}function $r(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=Mt(e),p=r||i?[...u?He(u):[],...He(t)]:[];p.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const d=u&&s?xr(u,n):null;let w=-1,m=null;a&&(m=new ResizeObserver(g=>{let[x]=g;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var $;($=m)==null||$.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let h,f=l?$e(e):null;l&&v();function v(){const g=$e(e);f&&!Pn(f,g)&&n(),f=g,h=requestAnimationFrame(v)}return n(),()=>{var g;p.forEach(x=>{r&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d==null||d(),(g=m)==null||g.disconnect(),m=null,l&&cancelAnimationFrame(h)}}const br=Jo,yr=er,Er=qo,Sr=nr,Cr=Go,en=Zo,Pr=tr,Rr=(e,t,n)=>{const o=new Map,r={platform:wr,...n},i={...r.platform,_c:o};return Xo(e,t,{...r,platform:i})};var qe=typeof document<"u"?c.useLayoutEffect:c.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,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!nt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!nt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Rn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tn(e,t){const n=Rn(e);return Math.round(t*n)/n}function vt(e){const t=c.useRef(e);return qe(()=>{t.current=e}),t}function Tr(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[p,d]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[w,m]=c.useState(o);nt(w,o)||m(o);const[h,f]=c.useState(null),[v,g]=c.useState(null),x=c.useCallback(R=>{R!==P.current&&(P.current=R,f(R))},[]),$=c.useCallback(R=>{R!==S.current&&(S.current=R,g(R))},[]),b=i||h,y=a||v,P=c.useRef(null),S=c.useRef(null),E=c.useRef(p),O=l!=null,F=vt(l),I=vt(r),B=vt(u),A=c.useCallback(()=>{if(!P.current||!S.current)return;const R={placement:t,strategy:n,middleware:w};I.current&&(R.platform=I.current),Rr(P.current,S.current,R).then(V=>{const z={...V,isPositioned:B.current!==!1};D.current&&!nt(E.current,z)&&(E.current=z,ot.flushSync(()=>{d(z)}))})},[w,t,n,I,B]);qe(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(R=>({...R,isPositioned:!1})))},[u]);const D=c.useRef(!1);qe(()=>(D.current=!0,()=>{D.current=!1}),[]),qe(()=>{if(b&&(P.current=b),y&&(S.current=y),b&&y){if(F.current)return F.current(b,y,A);A()}},[b,y,A,F,O]);const N=c.useMemo(()=>({reference:P,floating:S,setReference:x,setFloating:$}),[x,$]),_=c.useMemo(()=>({reference:b,floating:y}),[b,y]),W=c.useMemo(()=>{const R={position:n,left:0,top:0};if(!_.floating)return R;const V=tn(_.floating,p.x),z=tn(_.floating,p.y);return s?{...R,transform:"translate("+V+"px, "+z+"px)",...Rn(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:z}},[n,s,_.floating,p.x,p.y]);return c.useMemo(()=>({...p,update:A,refs:N,elements:_,floatingStyles:W}),[p,A,N,_,W])}const Or=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?en({element:o.current,padding:r}).fn(n):{}:o?en({element:o,padding:r}).fn(n):{}}}},Ar=(e,t)=>({...br(e),options:[e,t]}),Dr=(e,t)=>({...yr(e),options:[e,t]}),_r=(e,t)=>({...Pr(e),options:[e,t]}),Ir=(e,t)=>({...Er(e),options:[e,t]}),Nr=(e,t)=>({...Sr(e),options:[e,t]}),Mr=(e,t)=>({...Cr(e),options:[e,t]}),kr=(e,t)=>({...Or(e),options:[e,t]});function Lr(e){const[t,n]=c.useState(void 0);return te(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}const Tn="Popper",[On,An]=Ot(Tn),[Fr,Dn]=On(Tn),Br=e=>{const{__scopePopper:t,children:n}=e,[o,r]=c.useState(null);return c.createElement(Fr,{scope:t,anchor:o,onAnchorChange:r},n)},Wr="PopperAnchor",Hr=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,i=Dn(Wr,n),a=c.useRef(null),s=K(t,a);return c.useEffect(()=>{i.onAnchorChange((o==null?void 0:o.current)||a.current)}),o?null:c.createElement(Z.div,T({},r,{ref:s}))}),_n="PopperContent",[Vr,_i]=On(_n),jr=c.forwardRef((e,t)=>{var n,o,r,i,a,s,l,u;const{__scopePopper:p,side:d="bottom",sideOffset:w=0,align:m="center",alignOffset:h=0,arrowPadding:f=0,collisionBoundary:v=[],collisionPadding:g=0,sticky:x="partial",hideWhenDetached:$=!1,avoidCollisions:b=!0,onPlaced:y,...P}=e,S=Dn(_n,p),[E,O]=c.useState(null),F=K(t,X=>O(X)),[I,B]=c.useState(null),A=Lr(I),D=(n=A==null?void 0:A.width)!==null&&n!==void 0?n:0,N=(o=A==null?void 0:A.height)!==null&&o!==void 0?o:0,_=d+(m!=="center"?"-"+m:""),W=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},R=Array.isArray(v)?v:[v],V=R.length>0,z={padding:W,boundary:R.filter(Ur),altBoundary:V},{refs:Ee,floatingStyles:Se,placement:Me,isPositioned:ne,middlewareData:oe}=Tr({strategy:"fixed",placement:_,whileElementsMounted:$r,elements:{reference:S.anchor},middleware:[Ar({mainAxis:w+N,alignmentAxis:h}),b&&Dr({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?_r():void 0,...z}),b&&Ir({...z}),Nr({...z,apply:({elements:X,rects:ke,availableWidth:Le,availableHeight:Fe})=>{const{width:Gn,height:Qn}=ke.reference,je=X.floating.style;je.setProperty("--radix-popper-available-width",`${Le}px`),je.setProperty("--radix-popper-available-height",`${Fe}px`),je.setProperty("--radix-popper-anchor-width",`${Gn}px`),je.setProperty("--radix-popper-anchor-height",`${Qn}px`)}}),I&&kr({element:I,padding:f}),zr({arrowWidth:D,arrowHeight:N}),$&&Mr({strategy:"referenceHidden"})]}),[pe,C]=In(Me),M=ue(y);te(()=>{ne&&(M==null||M())},[ne,M]);const Y=(r=oe.arrow)===null||r===void 0?void 0:r.x,H=(i=oe.arrow)===null||i===void 0?void 0:i.y,k=((a=oe.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[L,q]=c.useState();return te(()=>{E&&q(window.getComputedStyle(E).zIndex)},[E]),c.createElement("div",{ref:Ee.setFloating,"data-radix-popper-content-wrapper":"",style:{...Se,transform:ne?Se.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:L,"--radix-popper-transform-origin":[(s=oe.transformOrigin)===null||s===void 0?void 0:s.x,(l=oe.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},c.createElement(Vr,{scope:p,placedSide:pe,onArrowChange:B,arrowX:Y,arrowY:H,shouldHideArrow:k},c.createElement(Z.div,T({"data-side":pe,"data-align":C},P,{ref:F,style:{...P.style,animation:ne?void 0:"none",opacity:(u=oe.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))});function Ur(e){return e!==null}const zr=e=>({name:"transformOrigin",options:e,fn(t){var n,o,r,i,a;const{placement:s,rects:l,middlewareData:u}=t,d=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,w=d?0:e.arrowWidth,m=d?0:e.arrowHeight,[h,f]=In(s),v={start:"0%",center:"50%",end:"100%"}[f],g=((o=(r=u.arrow)===null||r===void 0?void 0:r.x)!==null&&o!==void 0?o:0)+w/2,x=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+m/2;let $="",b="";return h==="bottom"?($=d?v:`${g}px`,b=`${-m}px`):h==="top"?($=d?v:`${g}px`,b=`${l.floating.height+m}px`):h==="right"?($=`${-m}px`,b=d?v:`${x}px`):h==="left"&&($=`${l.floating.width+m}px`,b=d?v:`${x}px`),{data:{x:$,y:b}}}});function In(e){const[t,n="center"]=e.split("-");return[t,n]}const Kr=Br,Yr=Hr,Xr=jr,Zr=c.forwardRef((e,t)=>{var n;const{container:o=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...r}=e;return o?to.createPortal(c.createElement(Z.div,T({},r,{ref:t})),o):null});function nn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=qr({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:o,s=ue(n),l=c.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else r(u)},[i,e,r,s]);return[a,l]}function qr({defaultProp:e,onChange:t}){const n=c.useState(e),[o]=n,r=c.useRef(o),i=ue(t);return c.useEffect(()=>{r.current!==o&&(i(o),r.current=o)},[o,r,i]),n}function Gr(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Qr(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Jr(...e){return t=>e.forEach(n=>Qr(n,t))}const Nn=c.forwardRef((e,t)=>{const{children:n,...o}=e,r=c.Children.toArray(n),i=r.find(tc);if(i){const a=i.props.children,s=r.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(Pt,T({},o,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(Pt,T({},o,{ref:t}),n)});Nn.displayName="Slot";const Pt=c.forwardRef((e,t)=>{const{children:n,...o}=e;return c.isValidElement(n)?c.cloneElement(n,{...nc(o,n.props),ref:t?Jr(t,n.ref):n.ref}):c.Children.count(n)>1?c.Children.only(null):null});Pt.displayName="SlotClone";const ec=({children:e})=>c.createElement(c.Fragment,null,e);function tc(e){return c.isValidElement(e)&&e.type===ec}function nc(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...s)=>{i(...s),r(...s)}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}const oc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],rc=oc.reduce((e,t)=>{const n=c.forwardRef((o,r)=>{const{asChild:i,...a}=o,s=i?Nn:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,T({},a,{ref:r}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),cc=c.forwardRef((e,t)=>c.createElement(rc.span,T({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));var ic=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ce=new WeakMap,ze=new WeakMap,Ke={},gt=0,Mn=function(e){return e&&(e.host||Mn(e.parentNode))},sc=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Mn(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ac=function(e,t,n,o){var r=sc(t,Array.isArray(e)?e:[e]);Ke[n]||(Ke[n]=new WeakMap);var i=Ke[n],a=[],s=new Set,l=new Set(r),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};r.forEach(u);var p=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(w){if(s.has(w))p(w);else try{var m=w.getAttribute(o),h=m!==null&&m!=="false",f=(Ce.get(w)||0)+1,v=(i.get(w)||0)+1;Ce.set(w,f),i.set(w,v),a.push(w),f===1&&h&&ze.set(w,!0),v===1&&w.setAttribute(n,"true"),h||w.setAttribute(o,"true")}catch(g){console.error("aria-hidden: cannot operate on ",w,g)}})};return p(t),s.clear(),gt++,function(){a.forEach(function(d){var w=Ce.get(d)-1,m=i.get(d)-1;Ce.set(d,w),i.set(d,m),w||(ze.has(d)||d.removeAttribute(o),ze.delete(d)),m||d.removeAttribute(n)}),gt--,gt||(Ce=new WeakMap,Ce=new WeakMap,ze=new WeakMap,Ke={})}},lc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=ic(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),ac(o,r,n,"aria-hidden")):function(){return null}},Ge="right-scroll-bar-position",Qe="width-before-scroll-bar",uc="with-scroll-bars-hidden",dc="--removed-body-scroll-bar-size";function wt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function fc(e,t){var n=c.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var pc=typeof window<"u"?c.useLayoutEffect:c.useEffect,on=new WeakMap;function mc(e,t){var n=fc(null,function(o){return e.forEach(function(r){return wt(r,o)})});return pc(function(){var o=on.get(n);if(o){var r=new Set(o),i=new Set(e),a=n.current;r.forEach(function(s){i.has(s)||wt(s,null)}),i.forEach(function(s){r.has(s)||wt(s,a)})}on.set(n,e)},[e]),n}function hc(e){return e}function vc(e,t){t===void 0&&(t=hc);var n=[],o=!1,r={read:function(){if(o)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 a=t(i,o);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(o=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){o=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var l=function(){var p=a;a=[],p.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(p){a.push(p),u()},filter:function(p){return a=a.filter(p),n}}}};return r}function gc(e){e===void 0&&(e={});var t=vc(null);return t.options=he({async:!0,ssr:!1},e),t}var kn=function(e){var t=e.sideCar,n=pn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return c.createElement(o,he({},n))};kn.isSideCarExport=!0;function wc(e,t){return e.useMedium(t),kn}var Ln=gc(),xt=function(){},st=c.forwardRef(function(e,t){var n=c.useRef(null),o=c.useState({onScrollCapture:xt,onWheelCapture:xt,onTouchMoveCapture:xt}),r=o[0],i=o[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,p=e.enabled,d=e.shards,w=e.sideCar,m=e.noIsolation,h=e.inert,f=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,x=pn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),$=w,b=mc([n,t]),y=he(he({},x),r);return c.createElement(c.Fragment,null,p&&c.createElement($,{sideCar:Ln,removeScrollBar:u,shards:d,noIsolation:m,inert:h,setCallbacks:i,allowPinchZoom:!!f,lockRef:n}),a?c.cloneElement(c.Children.only(s),he(he({},y),{ref:b})):c.createElement(g,he({},y,{className:l,ref:b}),s))});st.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};st.classNames={fullWidth:Qe,zeroRight:Ge};var xc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $c(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=xc();return t&&e.setAttribute("nonce",t),e}function bc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yc(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ec=function(){var e=0,t=null;return{add:function(n){e==0&&(t=$c())&&(bc(t,n),yc(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Sc=function(){var e=Ec();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Fn=function(){var e=Sc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Cc={left:0,top:0,right:0,gap:0},$t=function(e){return parseInt(e||"",10)||0},Pc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[$t(n),$t(o),$t(r)]},Rc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Cc;var t=Pc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Tc=Fn(),Oe="data-scroll-locked",Oc=function(e,t,n,o){var r=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
2
2
|
.`.concat(uc,` {
|
|
3
3
|
overflow: hidden `).concat(o,`;
|
|
4
4
|
padding-right: `).concat(s,"px ").concat(o,`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as u,U as c,a as m,w as a,j as s,e as f}from"./index-COnjINWU.js";import{L as g}from"./context-APidk_GA.js";import x from"./ModelLineage-B8hv0xJ-.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./Input-CJirBrKe.js";import"./editor-B2GioI_r.js";import"./file-C7afm_LM.js";import"./project-CWUUCZWT.js";import"./help-6Q7f7fjd.js";import"./SourceList-FVjgH2xJ.js";import"./index-CK4fdw8q.js";import"./transition-DjPYSO2n.js";import"./ListboxShow-C0DBUX71.js";import"./SearchList-B9NnvRod.js";function I(){const l=u(),{modelName:t}=c(),i=m(e=>e.models),o=m(e=>e.lastSelectedModel),r=a(t)||t===(o==null?void 0:o.name)?o:i.get(encodeURI(t));function d(e){const n=i.get(e);a(n)||l(f.LineageModels+"/"+n.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{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u,R as Q,j as S,b as Oe,c as _}from"./index-O5QH05aQ.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-2ZtnMVOn.js";import{n as Ne,p as Ae}from"./Input-Ds7LqTjA.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-COnjINWU.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-DjPYSO2n.js";import{n as Ne,p as Ae}from"./Input-CJirBrKe.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 a,j as e,c as R,B as Q,m as O,n as ee,aC as ie,h as ce,w as B,b as _,i as $,W as de,Z as me,aD as ue,v as he,L as te,S as se,F as q,I as pe}from"./index-O5QH05aQ.js";import{d as fe,e as ne,s as ae,f as G,P as oe,h as P,b as F,i as ge,E as V,R as we,j as xe,k as ve,l as be,m as X,n as Y,o as J,p as Ne,q as ye,r as je,t as Ee}from"./context-CR5OGS_4.js";import{W as Ce}from"./editor-C70c3Mp5.js";import{F as Me,L as Se}from"./ListboxShow-lKxbYEvK.js";import{S as ke}from"./SearchList-CkZWqVBz.js";import{n as ze}from"./Input-Ds7LqTjA.js";import{B as T}from"./transition-2ZtnMVOn.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./file-BZmTxJS0.js";import"./project-Cs5R6h8u.js";import"./help-6Q7f7fjd.js";import"./SourceList-CwySxUdr.js";import"./index-DJPcX5MS.js";function Le({title:t,titleId:s,...n},c){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:c,"aria-labelledby":s},n),t?o.createElement("title",{id:s},t):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 Ae=o.forwardRef(Le);function Be(){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},a.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function Ie(){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},a.createElement("path",{d:"M0 0h32v4.2H0z"}))}function He(){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},a.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 Re(){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},a.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 a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},a.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:t,className:s,...n})=>a.createElement("button",{type:"button",className:P(["react-flow__controls-button",s]),...n},t);D.displayName="ControlButton";const _e=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom}),le=({style:t,showZoom:s=!0,showFitView:n=!0,showInteractive:c=!0,fitViewOptions:u,onZoomIn:l,onZoomOut:r,onFitView:h,onInteractiveChange:p,className:f,children:i,position:N="bottom-left"})=>{const g=fe(),[M,E]=o.useState(!1),{isInteractive:w,minZoomReached:x,maxZoomReached:d}=ne(_e,ae),{zoomIn:v,zoomOut:j,fitView:m}=G();if(o.useEffect(()=>{E(!0)},[]),!M)return null;const z=()=>{v(),l==null||l()},C=()=>{j(),r==null||r()},k=()=>{m(u),h==null||h()},b=()=>{g.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),p==null||p(!w)};return a.createElement(oe,{className:P(["react-flow__controls",f]),position:N,style:t,"data-testid":"rf__controls"},s&&a.createElement(a.Fragment,null,a.createElement(D,{onClick:z,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:d},a.createElement(Be,null)),a.createElement(D,{onClick:C,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:x},a.createElement(Ie,null))),n&&a.createElement(D,{className:"react-flow__controls-fitview",onClick:k,title:"fit view","aria-label":"fit view"},a.createElement(He,null)),c&&a.createElement(D,{className:"react-flow__controls-interactive",onClick:b,title:"toggle interactivity","aria-label":"toggle interactivity"},w?a.createElement(De,null):a.createElement(Re,null)),i)};le.displayName="Controls";var Fe=o.memo(le),S;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(S||(S={}));function $e({color:t,dimensions:s,lineWidth:n}){return a.createElement("path",{stroke:t,strokeWidth:n,d:`M${s[0]/2} 0 V${s[1]} M0 ${s[1]/2} H${s[0]}`})}function We({color:t,radius:s}){return a.createElement("circle",{cx:s,cy:s,r:s,fill:t})}const Ue={[S.Dots]:"#91919a",[S.Lines]:"#eee",[S.Cross]:"#e2e2e2"},Ve={[S.Dots]:1,[S.Lines]:1,[S.Cross]:6},Te=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function re({id:t,variant:s=S.Dots,gap:n=20,size:c,lineWidth:u=1,offset:l=2,color:r,style:h,className:p}){const f=o.useRef(null),{transform:i,patternId:N}=ne(Te,ae),g=r||Ue[s],M=c||Ve[s],E=s===S.Dots,w=s===S.Cross,x=Array.isArray(n)?n:[n,n],d=[x[0]*i[2]||1,x[1]*i[2]||1],v=M*i[2],j=w?[v,v]:d,m=E?[v/l,v/l]:[j[0]/l,j[1]/l];return a.createElement("svg",{className:P(["react-flow__background",p]),style:{...h,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:f,"data-testid":"rf__background"},a.createElement("pattern",{id:N+t,x:i[0]%d[0],y:i[1]%d[1],width:d[0],height:d[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${m[0]},-${m[1]})`},E?a.createElement(We,{color:g,radius:v/l}):a.createElement($e,{dimensions:j,color:g,lineWidth:u})),a.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${N+t})`}))}re.displayName="Background";var Oe=o.memo(re);function Ge({handleSelect:t}){const{models:s,lineage:n,mainNode:c,connectedNodes:u}=F(),[l,r]=o.useState(!1),[h,p]=o.useState([]),[f,i]=o.useState(!1);o.useEffect(()=>{p([])},[c,s,n]);function N(){r(!0)}function g(){r(!1)}function M(E){E.length<1||ce(h)||B(c)||B(n)||(i(!0),setTimeout(()=>{const w=Array.from(ge(n,c));p(Object.keys(n).map(x=>{var d;return{name:x,displayName:((d=s.get(x))==null?void 0:d.displayName)??decodeURI(x),description:`${w.includes(x)?"Upstream":"Downstream"} | ${u.has(x)?"Directly":"Indirectly"} Connected`}})),i(!1)},300))}return e.jsxs("div",{className:R("w-full",l?"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:[e.jsx(Q,{shape:ie.Circle,className:R("flex @[40rem]:hidden !py-1 border-transparent",l?"hidden":"flex"),variant:ee.Alternative,size:O.sm,"aria-label":"Show search",onClick:N,children:e.jsx(Ae,{className:"w-3 h-3 text-primary-500"})}),e.jsx(ke,{list:h,placeholder:"Find",searchBy:"displayName",displayBy:"displayName",direction:"top",descriptionBy:"description",showIndex:!1,size:O.sm,onSelect:t,isLoading:f,className:R("w-full @sm:min-w-[12rem] @[40rem]:flex",l?"flex max-w-none":"hidden max-w-[20rem]"),isFullWidth:!0,onInput:M}),e.jsx("button",{className:R("flex @[40rem]:hidden bg-none border-none px-2 py-1 absolute right-0 top-0",l?"flex":"hidden"),"aria-label":"Hide search",onClick:g,children:e.jsx(Me,{className:"w-6 h-6 text-primary-500"})})]})}function K({nodes:t=[]}){const{setCenter:s}=G(),{activeNodes:n,models:c,mainNode:u,nodesMap:l,selectedNodes:r,setSelectedNodes:h,withImpacted:p,connectedNodes:f,lineageCache:i,setActiveEdges:N,setConnections:g,setLineage:M,setLineageCache:E}=F(),w=B(u)?void 0:c.get(u),x=n.size>0?n.size:f.size,d=r.size,v=f.size-1,j=t.filter(b=>b.hidden).length,m=t.filter(b=>_(b.hidden)&&(b.data.type===V.external||b.data.type===V.seed)).length,z=t.filter(b=>_(b.hidden)&&b.data.type===V.cte).length,C=x>0&&x!==v+1;function k(){if(B(u))return;const b=l[u];B(b)||setTimeout(()=>{s(b.position.x,b.position.y,{zoom:.5,duration:0})},200)}return e.jsxs(e.Fragment,{children:[$(w)&&e.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:k,children:de(w.displayName,50,25)}),e.jsxs("span",{className:"bg-neutral-5 px-2 py-0.5 flex rounded-full mr-2",children:[e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"All:"})," ",t.length]}),j>0&&e.jsxs("span",{className:"whitespace-nowrap block mr-2",children:[e.jsx("b",{children:"Hidden:"})," ",j]}),d>0&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"Selected:"})," ",d]}),C&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"Active:"})," ",x]}),(C||d>0||$(i))&&e.jsx(Q,{size:O.xs,variant:ee.Neutral,format:me.Ghost,className:"!m-0 px-1",onClick:()=>{N(new Map),g(new Map),h(new Set),$(i)&&(M(i),E(void 0))},children:"Reset"})]}),m>0&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"Sources"}),": ",m]}),_(C)&&p&&d===0&&v>0&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"Upstream/Downstream:"})," ",v]}),z>0&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"CTEs:"})," ",z]})]})}const Pe=30;function it({model:t,highlightedNodes:s}){const{setActiveNodes:n,setActiveEdges:c,setConnections:u,setLineage:l,handleError:r,setSelectedNodes:h,setMainNode:p,setWithColumns:f,setHighlightedNodes:i,setNodeConnections:N,setLineageCache:g,setUnknownModels:M,models:E,unknownModels:w}=F(),{refetch:x,isFetching:d,cancel:v}=ue(t.name),{isFetching:j}=he(),[m,z]=o.useState(!1),[C,k]=o.useState(void 0);o.useEffect(()=>{const y=Ce();return y.addEventListener("message",b),x().then(({data:L})=>{k(L),!B(L)&&(z(!0),y.postMessage({topic:"lineage",payload:{currentLineage:{},newLineage:L,mainNode:t.fqn}}))}).catch(L=>{r==null||r(L)}).finally(()=>{n(new Set),c(new Map),u(new Map),h(new Set),g(void 0),p(t.fqn)}),()=>{v==null||v(),y.removeEventListener("message",b),y.terminate(),l({}),N({}),p(void 0),i({})}},[t.name,t.hash]),o.useEffect(()=>{Object.keys(C??{}).forEach(y=>{y=encodeURI(y),_(E.has(y))&&_(w.has(y))&&w.add(y)}),M(new Set(w))},[C,E]),o.useEffect(()=>{i(s??{})},[s]);function b(y){var L;y.data.topic==="lineage"&&(z(!1),N(y.data.payload.nodesConnections),l(y.data.payload.lineage),Object.values(((L=y.data.payload)==null?void 0:L.lineage)??{}).length>Pe&&f(!1)),y.data.topic==="error"&&(r==null||r(y.data.error),z(!1))}const I=d||j||m;return e.jsxs("div",{className:"relative h-full w-full overflow-hidden",children:[I&&e.jsxs("div",{className:"absolute top-0 left-0 z-10 flex justify-center items-center w-full h-full",children:[e.jsx("span",{className:"absolute w-full h-full z-10 bg-transparent-20 backdrop-blur-lg"}),e.jsxs(te,{className:"inline-block z-10",children:[e.jsx(se,{className:"w-3 h-3 border border-neutral-10 mr-4"}),e.jsx("h3",{className:"text-md whitespace-nowrap",children:I?"Loading Model's Lineage...":"Merging Model's..."})]})]}),e.jsx(we,{children:e.jsx(Ze,{})})]})}function Ze(){const{withColumns:t,lineage:s,mainNode:n,selectedEdges:c,selectedNodes:u,withConnected:l,withImpacted:r,withSecondary:h,hasBackground:p,activeEdges:f,connectedNodes:i,connections:N,nodesMap:g,showControls:M,handleError:E,setActiveNodes:w}=F(),{setCenter:x}=G(),[d,v]=o.useState(!1),j=o.useMemo(()=>({model:xe}),[]),m=o.useMemo(()=>ve(s),[s]),z=o.useMemo(()=>be(s),[s]),[C,k]=o.useState([]),[b,I]=o.useState([]);o.useEffect(()=>{if(q(m)||B(n))return;v(!0);const A=X(m,f,c,g),W=Y(Object.values(g),A,n,i,u,N,l,r,h),U=J(m,N,f,A,c,u,i,l,r,h),Z=Ne({nodesMap:g,nodes:W,edges:U});return Z.create().then(H=>{I(H.edges),k(H.nodes)}).catch(H=>{E==null||E(H),I([]),k([])}).finally(()=>{const H=B(n)?void 0:g[n];$(H)&&x(H.position.x,H.position.y,{zoom:.5,duration:0}),setTimeout(()=>{v(!1)},100)}),()=>{Z.terminate(),I([]),k([])}},[f,g,z]),o.useEffect(()=>{if(B(n)||q(C))return;const A=X(m,f,c,g),W=Y(C,A,n,i,u,N,l,r,h),U=J(m,N,f,A,c,u,i,l,r,h);I(U),k(W),w(A)},[N,g,m,f,u,c,i,l,r,h,t,n]);function y(A){k(Ee(A,C))}function L(A){I(je(A,b))}return e.jsxs(e.Fragment,{children:[d&&e.jsxs("div",{className:"absolute top-0 left-0 z-10 flex justify-center items-center w-full h-full",children:[e.jsx("span",{className:"absolute w-full h-full z-10 bg-transparent-20 backdrop-blur-lg"}),e.jsxs(te,{className:"inline-block z-10",children:[e.jsx(se,{className:"w-3 h-3 border border-neutral-10 mr-4"}),e.jsx("h3",{className:"text-md whitespace-nowrap",children:"Building Lineage..."})]})]}),e.jsxs(ye,{nodes:C,edges:b,nodeTypes:j,onNodesChange:y,onEdgesChange:L,nodeOrigin:[.5,.5],minZoom:.05,maxZoom:1.5,snapGrid:[16,16],snapToGrid:!0,children:[M&&e.jsxs(oe,{position:"top-right",className:"bg-theme !m-0 w-full !z-10",children:[e.jsx(qe,{nodes:C}),e.jsx(pe,{})]}),e.jsx(Fe,{className:"bg-light p-1 rounded-md !border-none !shadow-lg"}),e.jsx(Oe,{variant:S.Cross,gap:32,size:4,className:R(p?"opacity-100 stroke-neutral-200 dark:stroke-neutral-800":"opacity-0")})]})]})}function qe({nodes:t=[]}){const{withColumns:s,mainNode:n,selectedNodes:c,withConnected:u,withImpacted:l,withSecondary:r,hasBackground:h,activeNodes:p,highlightedNodes:f,setSelectedNodes:i,setWithColumns:N,setWithConnected:g,setWithImpacted:M,setWithSecondary:E,setHasBackground:w}=F(),x=o.useRef(null),d=o.useMemo(()=>Object.values(f??{}).flat(),[f]);function v(j){d.includes(j.name)||n===j.name||i(m=>(m.has(j.name)?m.delete(j.name):m.add(j.name),new Set(m)))}return e.jsxs("div",{className:"px-2 flex items-center text-xs text-neutral-400 @container",children:[e.jsxs("div",{className:"contents",children:[e.jsxs(T,{className:"flex @lg:hidden bg-none border-none","aria-label":"Show lineage node details",children:[e.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",e.jsx(ze,{className:"ml-2 h-4 w-4","aria-hidden":"true"})]}),e.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:e.jsx(K,{nodes:t})})]}),e.jsx("div",{className:"hidden @lg:contents w-full",children:e.jsx(K,{nodes:t})})]}),e.jsxs("div",{className:"flex w-full justify-end items-center",children:[e.jsx(Ge,{handleSelect:v}),e.jsx(Se,{options:{Background:w,Columns:p.size>0&&c.size===0?void 0:N,Connected:p.size>0?void 0:g,"Upstream/Downstream":p.size>0?void 0:M,All:p.size>0?void 0:E},value:[s&&"Columns",h&&"Background",u&&"Connected",l&&"Upstream/Downstream",r&&"All"].filter(Boolean)})]})]})}export{it as default};
|
|
1
|
+
import{r as o,R as a,j as e,c as R,B as Q,m as O,n as ee,aC as ie,h as ce,w as B,b as _,i as $,W as de,Z as me,aD as ue,v as he,L as te,S as se,F as q,I as pe}from"./index-COnjINWU.js";import{d as fe,e as ne,s as ae,f as G,P as oe,h as P,b as F,i as ge,E as V,R as we,j as xe,k as ve,l as be,m as X,n as Y,o as J,p as Ne,q as ye,r as je,t as Ee}from"./context-APidk_GA.js";import{W as Ce}from"./editor-B2GioI_r.js";import{F as Me,L as Se}from"./ListboxShow-C0DBUX71.js";import{S as ke}from"./SearchList-B9NnvRod.js";import{n as ze}from"./Input-CJirBrKe.js";import{B as T}from"./transition-DjPYSO2n.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./file-C7afm_LM.js";import"./project-CWUUCZWT.js";import"./help-6Q7f7fjd.js";import"./SourceList-FVjgH2xJ.js";import"./index-CK4fdw8q.js";function Le({title:t,titleId:s,...n},c){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:c,"aria-labelledby":s},n),t?o.createElement("title",{id:s},t):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 Ae=o.forwardRef(Le);function Be(){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},a.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function Ie(){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},a.createElement("path",{d:"M0 0h32v4.2H0z"}))}function He(){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},a.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 Re(){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},a.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 a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},a.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:t,className:s,...n})=>a.createElement("button",{type:"button",className:P(["react-flow__controls-button",s]),...n},t);D.displayName="ControlButton";const _e=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom}),le=({style:t,showZoom:s=!0,showFitView:n=!0,showInteractive:c=!0,fitViewOptions:u,onZoomIn:l,onZoomOut:r,onFitView:h,onInteractiveChange:p,className:f,children:i,position:N="bottom-left"})=>{const g=fe(),[M,E]=o.useState(!1),{isInteractive:w,minZoomReached:x,maxZoomReached:d}=ne(_e,ae),{zoomIn:v,zoomOut:j,fitView:m}=G();if(o.useEffect(()=>{E(!0)},[]),!M)return null;const z=()=>{v(),l==null||l()},C=()=>{j(),r==null||r()},k=()=>{m(u),h==null||h()},b=()=>{g.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),p==null||p(!w)};return a.createElement(oe,{className:P(["react-flow__controls",f]),position:N,style:t,"data-testid":"rf__controls"},s&&a.createElement(a.Fragment,null,a.createElement(D,{onClick:z,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:d},a.createElement(Be,null)),a.createElement(D,{onClick:C,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:x},a.createElement(Ie,null))),n&&a.createElement(D,{className:"react-flow__controls-fitview",onClick:k,title:"fit view","aria-label":"fit view"},a.createElement(He,null)),c&&a.createElement(D,{className:"react-flow__controls-interactive",onClick:b,title:"toggle interactivity","aria-label":"toggle interactivity"},w?a.createElement(De,null):a.createElement(Re,null)),i)};le.displayName="Controls";var Fe=o.memo(le),S;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(S||(S={}));function $e({color:t,dimensions:s,lineWidth:n}){return a.createElement("path",{stroke:t,strokeWidth:n,d:`M${s[0]/2} 0 V${s[1]} M0 ${s[1]/2} H${s[0]}`})}function We({color:t,radius:s}){return a.createElement("circle",{cx:s,cy:s,r:s,fill:t})}const Ue={[S.Dots]:"#91919a",[S.Lines]:"#eee",[S.Cross]:"#e2e2e2"},Ve={[S.Dots]:1,[S.Lines]:1,[S.Cross]:6},Te=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function re({id:t,variant:s=S.Dots,gap:n=20,size:c,lineWidth:u=1,offset:l=2,color:r,style:h,className:p}){const f=o.useRef(null),{transform:i,patternId:N}=ne(Te,ae),g=r||Ue[s],M=c||Ve[s],E=s===S.Dots,w=s===S.Cross,x=Array.isArray(n)?n:[n,n],d=[x[0]*i[2]||1,x[1]*i[2]||1],v=M*i[2],j=w?[v,v]:d,m=E?[v/l,v/l]:[j[0]/l,j[1]/l];return a.createElement("svg",{className:P(["react-flow__background",p]),style:{...h,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:f,"data-testid":"rf__background"},a.createElement("pattern",{id:N+t,x:i[0]%d[0],y:i[1]%d[1],width:d[0],height:d[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${m[0]},-${m[1]})`},E?a.createElement(We,{color:g,radius:v/l}):a.createElement($e,{dimensions:j,color:g,lineWidth:u})),a.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${N+t})`}))}re.displayName="Background";var Oe=o.memo(re);function Ge({handleSelect:t}){const{models:s,lineage:n,mainNode:c,connectedNodes:u}=F(),[l,r]=o.useState(!1),[h,p]=o.useState([]),[f,i]=o.useState(!1);o.useEffect(()=>{p([])},[c,s,n]);function N(){r(!0)}function g(){r(!1)}function M(E){E.length<1||ce(h)||B(c)||B(n)||(i(!0),setTimeout(()=>{const w=Array.from(ge(n,c));p(Object.keys(n).map(x=>{var d;return{name:x,displayName:((d=s.get(x))==null?void 0:d.displayName)??decodeURI(x),description:`${w.includes(x)?"Upstream":"Downstream"} | ${u.has(x)?"Directly":"Indirectly"} Connected`}})),i(!1)},300))}return e.jsxs("div",{className:R("w-full",l?"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:[e.jsx(Q,{shape:ie.Circle,className:R("flex @[40rem]:hidden !py-1 border-transparent",l?"hidden":"flex"),variant:ee.Alternative,size:O.sm,"aria-label":"Show search",onClick:N,children:e.jsx(Ae,{className:"w-3 h-3 text-primary-500"})}),e.jsx(ke,{list:h,placeholder:"Find",searchBy:"displayName",displayBy:"displayName",direction:"top",descriptionBy:"description",showIndex:!1,size:O.sm,onSelect:t,isLoading:f,className:R("w-full @sm:min-w-[12rem] @[40rem]:flex",l?"flex max-w-none":"hidden max-w-[20rem]"),isFullWidth:!0,onInput:M}),e.jsx("button",{className:R("flex @[40rem]:hidden bg-none border-none px-2 py-1 absolute right-0 top-0",l?"flex":"hidden"),"aria-label":"Hide search",onClick:g,children:e.jsx(Me,{className:"w-6 h-6 text-primary-500"})})]})}function K({nodes:t=[]}){const{setCenter:s}=G(),{activeNodes:n,models:c,mainNode:u,nodesMap:l,selectedNodes:r,setSelectedNodes:h,withImpacted:p,connectedNodes:f,lineageCache:i,setActiveEdges:N,setConnections:g,setLineage:M,setLineageCache:E}=F(),w=B(u)?void 0:c.get(u),x=n.size>0?n.size:f.size,d=r.size,v=f.size-1,j=t.filter(b=>b.hidden).length,m=t.filter(b=>_(b.hidden)&&(b.data.type===V.external||b.data.type===V.seed)).length,z=t.filter(b=>_(b.hidden)&&b.data.type===V.cte).length,C=x>0&&x!==v+1;function k(){if(B(u))return;const b=l[u];B(b)||setTimeout(()=>{s(b.position.x,b.position.y,{zoom:.5,duration:0})},200)}return e.jsxs(e.Fragment,{children:[$(w)&&e.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:k,children:de(w.displayName,50,25)}),e.jsxs("span",{className:"bg-neutral-5 px-2 py-0.5 flex rounded-full mr-2",children:[e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"All:"})," ",t.length]}),j>0&&e.jsxs("span",{className:"whitespace-nowrap block mr-2",children:[e.jsx("b",{children:"Hidden:"})," ",j]}),d>0&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"Selected:"})," ",d]}),C&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"Active:"})," ",x]}),(C||d>0||$(i))&&e.jsx(Q,{size:O.xs,variant:ee.Neutral,format:me.Ghost,className:"!m-0 px-1",onClick:()=>{N(new Map),g(new Map),h(new Set),$(i)&&(M(i),E(void 0))},children:"Reset"})]}),m>0&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"Sources"}),": ",m]}),_(C)&&p&&d===0&&v>0&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"Upstream/Downstream:"})," ",v]}),z>0&&e.jsxs("span",{className:"mr-2 whitespace-nowrap block",children:[e.jsx("b",{children:"CTEs:"})," ",z]})]})}const Pe=30;function it({model:t,highlightedNodes:s}){const{setActiveNodes:n,setActiveEdges:c,setConnections:u,setLineage:l,handleError:r,setSelectedNodes:h,setMainNode:p,setWithColumns:f,setHighlightedNodes:i,setNodeConnections:N,setLineageCache:g,setUnknownModels:M,models:E,unknownModels:w}=F(),{refetch:x,isFetching:d,cancel:v}=ue(t.name),{isFetching:j}=he(),[m,z]=o.useState(!1),[C,k]=o.useState(void 0);o.useEffect(()=>{const y=Ce();return y.addEventListener("message",b),x().then(({data:L})=>{k(L),!B(L)&&(z(!0),y.postMessage({topic:"lineage",payload:{currentLineage:{},newLineage:L,mainNode:t.fqn}}))}).catch(L=>{r==null||r(L)}).finally(()=>{n(new Set),c(new Map),u(new Map),h(new Set),g(void 0),p(t.fqn)}),()=>{v==null||v(),y.removeEventListener("message",b),y.terminate(),l({}),N({}),p(void 0),i({})}},[t.name,t.hash]),o.useEffect(()=>{Object.keys(C??{}).forEach(y=>{y=encodeURI(y),_(E.has(y))&&_(w.has(y))&&w.add(y)}),M(new Set(w))},[C,E]),o.useEffect(()=>{i(s??{})},[s]);function b(y){var L;y.data.topic==="lineage"&&(z(!1),N(y.data.payload.nodesConnections),l(y.data.payload.lineage),Object.values(((L=y.data.payload)==null?void 0:L.lineage)??{}).length>Pe&&f(!1)),y.data.topic==="error"&&(r==null||r(y.data.error),z(!1))}const I=d||j||m;return e.jsxs("div",{className:"relative h-full w-full overflow-hidden",children:[I&&e.jsxs("div",{className:"absolute top-0 left-0 z-10 flex justify-center items-center w-full h-full",children:[e.jsx("span",{className:"absolute w-full h-full z-10 bg-transparent-20 backdrop-blur-lg"}),e.jsxs(te,{className:"inline-block z-10",children:[e.jsx(se,{className:"w-3 h-3 border border-neutral-10 mr-4"}),e.jsx("h3",{className:"text-md whitespace-nowrap",children:I?"Loading Model's Lineage...":"Merging Model's..."})]})]}),e.jsx(we,{children:e.jsx(Ze,{})})]})}function Ze(){const{withColumns:t,lineage:s,mainNode:n,selectedEdges:c,selectedNodes:u,withConnected:l,withImpacted:r,withSecondary:h,hasBackground:p,activeEdges:f,connectedNodes:i,connections:N,nodesMap:g,showControls:M,handleError:E,setActiveNodes:w}=F(),{setCenter:x}=G(),[d,v]=o.useState(!1),j=o.useMemo(()=>({model:xe}),[]),m=o.useMemo(()=>ve(s),[s]),z=o.useMemo(()=>be(s),[s]),[C,k]=o.useState([]),[b,I]=o.useState([]);o.useEffect(()=>{if(q(m)||B(n))return;v(!0);const A=X(m,f,c,g),W=Y(Object.values(g),A,n,i,u,N,l,r,h),U=J(m,N,f,A,c,u,i,l,r,h),Z=Ne({nodesMap:g,nodes:W,edges:U});return Z.create().then(H=>{I(H.edges),k(H.nodes)}).catch(H=>{E==null||E(H),I([]),k([])}).finally(()=>{const H=B(n)?void 0:g[n];$(H)&&x(H.position.x,H.position.y,{zoom:.5,duration:0}),setTimeout(()=>{v(!1)},100)}),()=>{Z.terminate(),I([]),k([])}},[f,g,z]),o.useEffect(()=>{if(B(n)||q(C))return;const A=X(m,f,c,g),W=Y(C,A,n,i,u,N,l,r,h),U=J(m,N,f,A,c,u,i,l,r,h);I(U),k(W),w(A)},[N,g,m,f,u,c,i,l,r,h,t,n]);function y(A){k(Ee(A,C))}function L(A){I(je(A,b))}return e.jsxs(e.Fragment,{children:[d&&e.jsxs("div",{className:"absolute top-0 left-0 z-10 flex justify-center items-center w-full h-full",children:[e.jsx("span",{className:"absolute w-full h-full z-10 bg-transparent-20 backdrop-blur-lg"}),e.jsxs(te,{className:"inline-block z-10",children:[e.jsx(se,{className:"w-3 h-3 border border-neutral-10 mr-4"}),e.jsx("h3",{className:"text-md whitespace-nowrap",children:"Building Lineage..."})]})]}),e.jsxs(ye,{nodes:C,edges:b,nodeTypes:j,onNodesChange:y,onEdgesChange:L,nodeOrigin:[.5,.5],minZoom:.05,maxZoom:1.5,snapGrid:[16,16],snapToGrid:!0,children:[M&&e.jsxs(oe,{position:"top-right",className:"bg-theme !m-0 w-full !z-10",children:[e.jsx(qe,{nodes:C}),e.jsx(pe,{})]}),e.jsx(Fe,{className:"bg-light p-1 rounded-md !border-none !shadow-lg"}),e.jsx(Oe,{variant:S.Cross,gap:32,size:4,className:R(p?"opacity-100 stroke-neutral-200 dark:stroke-neutral-800":"opacity-0")})]})]})}function qe({nodes:t=[]}){const{withColumns:s,mainNode:n,selectedNodes:c,withConnected:u,withImpacted:l,withSecondary:r,hasBackground:h,activeNodes:p,highlightedNodes:f,setSelectedNodes:i,setWithColumns:N,setWithConnected:g,setWithImpacted:M,setWithSecondary:E,setHasBackground:w}=F(),x=o.useRef(null),d=o.useMemo(()=>Object.values(f??{}).flat(),[f]);function v(j){d.includes(j.name)||n===j.name||i(m=>(m.has(j.name)?m.delete(j.name):m.add(j.name),new Set(m)))}return e.jsxs("div",{className:"px-2 flex items-center text-xs text-neutral-400 @container",children:[e.jsxs("div",{className:"contents",children:[e.jsxs(T,{className:"flex @lg:hidden bg-none border-none","aria-label":"Show lineage node details",children:[e.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",e.jsx(ze,{className:"ml-2 h-4 w-4","aria-hidden":"true"})]}),e.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:e.jsx(K,{nodes:t})})]}),e.jsx("div",{className:"hidden @lg:contents w-full",children:e.jsx(K,{nodes:t})})]}),e.jsxs("div",{className:"flex w-full justify-end items-center",children:[e.jsx(Ge,{handleSelect:v}),e.jsx(Se,{options:{Background:w,Columns:p.size>0&&c.size===0?void 0:N,Connected:p.size>0?void 0:g,"Upstream/Downstream":p.size>0?void 0:M,All:p.size>0?void 0:E},value:[s&&"Columns",h&&"Background",u&&"Connected",l&&"Upstream/Downstream",r&&"All"].filter(Boolean)})]})]})}export{it 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-COnjINWU.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-B9NnvRod.js";import{P as V}from"./Page-WrN3RYDT.js";import{g as W}from"./context-APidk_GA.js";import{u as f}from"./project-CWUUCZWT.js";import"./Input-CJirBrKe.js";import"./help-6Q7f7fjd.js";import"./transition-DjPYSO2n.js";import"./SplitPane-BSlIdmc8.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./editor-B2GioI_r.js";import"./file-C7afm_LM.js";import"./SourceList-FVjgH2xJ.js";import"./index-CK4fdw8q.js";function ne({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{ne 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-COnjINWU.js";import{S as r}from"./SplitPane-BSlIdmc8.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-COnjINWU.js";import{P as f}from"./Page-WrN3RYDT.js";import{u as v}from"./plan-BwAtu9hd.js";import"./SplitPane-BSlIdmc8.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-O5QH05aQ.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-2ZtnMVOn.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-COnjINWU.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-DjPYSO2n.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-COnjINWU.js";import{p as k,A as n,F as x,a as m}from"./PlusCircleIcon-CcC2lSkc.js";import{S as z}from"./SplitPane-BSlIdmc8.js";import{B as h,D as E}from"./transition-DjPYSO2n.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};
|