studiograph 1.3.3-next.34 → 1.3.3-next.35

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.
Files changed (26) hide show
  1. package/dist/server/collab.js +9 -0
  2. package/dist/server/collab.js.map +1 -1
  3. package/dist/web/_app/immutable/chunks/{C8SMbBSL.js → B-Kin1Ua.js} +1 -1
  4. package/dist/web/_app/immutable/chunks/{FUWfe2gF.js → BbHHq4S5.js} +1 -1
  5. package/dist/web/_app/immutable/chunks/{BDQHbwWB.js → BkE6vniY.js} +1 -1
  6. package/dist/web/_app/immutable/chunks/{B9rzVI1r.js → Ce-rGBd9.js} +1 -1
  7. package/dist/web/_app/immutable/chunks/{DAakBXvS.js → DAiiRZIw.js} +1 -1
  8. package/dist/web/_app/immutable/chunks/{BcHDkAC1.js → DcZunGp-.js} +1 -1
  9. package/dist/web/_app/immutable/chunks/{0s5p8hS6.js → Dl32v5i0.js} +1 -1
  10. package/dist/web/_app/immutable/chunks/{CShMDrRF.js → VqaS5c0T.js} +1 -1
  11. package/dist/web/_app/immutable/entry/{app.DfA41aTy.js → app.BFEDVY83.js} +2 -2
  12. package/dist/web/_app/immutable/entry/start.CCdVvbEv.js +1 -0
  13. package/dist/web/_app/immutable/nodes/{0.DYmQjEFb.js → 0.Dfr98MA8.js} +1 -1
  14. package/dist/web/_app/immutable/nodes/{1.NfBIdRMP.js → 1.BG33qq1N.js} +1 -1
  15. package/dist/web/_app/immutable/nodes/{2.BR1zwNf5.js → 2.oa_pIBFi.js} +1 -1
  16. package/dist/web/_app/immutable/nodes/{3.BfC_s2lF.js → 3.DvUBQUZ_.js} +1 -1
  17. package/dist/web/_app/immutable/nodes/{4.C2QKbhL2.js → 4.cAyBFMSd.js} +1 -1
  18. package/dist/web/_app/immutable/nodes/{5.D4QFpAPS.js → 5.DzqlUYWm.js} +1 -1
  19. package/dist/web/_app/immutable/nodes/{6.T5wtp-uq.js → 6.C_dy6gAr.js} +1 -1
  20. package/dist/web/_app/immutable/nodes/{7.yLw1eWTp.js → 7.BBWsI8jy.js} +1 -1
  21. package/dist/web/_app/immutable/nodes/{8.DC4Ozoqm.js → 8.CMx_2Gfw.js} +1 -1
  22. package/dist/web/_app/immutable/nodes/{9.DG3tn2GV.js → 9.DHhnxkgZ.js} +1 -1
  23. package/dist/web/_app/version.json +1 -1
  24. package/dist/web/index.html +6 -6
  25. package/package.json +1 -1
  26. package/dist/web/_app/immutable/entry/start.DbaUItbk.js +0 -1
@@ -86,6 +86,15 @@ export class CollabServer {
86
86
  try {
87
87
  const graph = this.workspaceManager.getGraph(repo);
88
88
  const body = document.getText('content').toString();
89
+ // Guard: skip write if Y.Text is empty but the entity already has content.
90
+ // This prevents a race condition where onStoreDocument fires with a freshly
91
+ // reset Y.Doc (e.g. the last client disconnected mid-debounce after a page
92
+ // refresh) and overwrites real content with an empty string.
93
+ if (!body) {
94
+ const existing = graph.get(entityType, entityId);
95
+ if (existing?.document?.content)
96
+ return;
97
+ }
89
98
  // Update body only — frontmatter is preserved because we don't pass `data`
90
99
  const updated = await graph.update({
91
100
  entityType: entityType,
@@ -1 +1 @@
1
- {"version":3,"file":"collab.js","sourceRoot":"","sources":["../../src/server/collab.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"collab.js","sourceRoot":"","sources":["../../src/server/collab.ts"],"names":[],"mappings":"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"}
@@ -1 +1 @@
1
- import{c as p,a as i}from"./CjKjQEMp.js";import"./eEhMI0BQ.js";import{f as l}from"./D-tW7Byc.js";import{I as c,s as m}from"./0s5p8hS6.js";import{l as d,s as f}from"./EhE2EcYu.js";function P(s,o){const t=d(o,["children","$$slots","$$events","$$legacy"]);const e=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];c(s,f({name:"pencil"},()=>t,{get iconNode(){return e},children:(r,$)=>{var a=p(),n=l(a);m(n,o,"default",{}),i(r,a)},$$slots:{default:!0}}))}export{P};
1
+ import{c as p,a as i}from"./CjKjQEMp.js";import"./eEhMI0BQ.js";import{f as l}from"./D-tW7Byc.js";import{I as c,s as m}from"./Dl32v5i0.js";import{l as d,s as f}from"./EhE2EcYu.js";function P(s,o){const t=d(o,["children","$$slots","$$events","$$legacy"]);const e=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];c(s,f({name:"pencil"},()=>t,{get iconNode(){return e},children:(r,$)=>{var a=p(),n=l(a);m(n,o,"default",{}),i(r,a)},$$slots:{default:!0}}))}export{P};
@@ -1,4 +1,4 @@
1
- import{g as ut,c as F,a as v,f as I,d as es,e as ts,b as ss,s as $e,t as rs}from"./CjKjQEMp.js";import{v as ie,h as dt,a as gt,ad as ns,aZ as as,e as ft,C as is,k as ls,aY as os,aS as cs,c as hs,aK as ps,a_ as us,a$ as ds,l as Ge,f as X,p as St,m as Rt,n as Tt,q as j,o as R,u as _,t as ze,z as te,S as Ue,y as p,x as S,T as Ve,_ as gs,P as Fe,D as fs,b0 as ks,V as Pe}from"./D-tW7Byc.js";import{g as zt,e as xs,B as ee,w as ms}from"./ByFfmBEu.js";import{l as xe,s as me,p as bs,i as D,b as ws}from"./EhE2EcYu.js";import{I as be,s as we,n as C,X as vs,a as _e,T as ys,i as Se}from"./0s5p8hS6.js";import"./eEhMI0BQ.js";import{b as $s}from"./BV_9Nfp2.js";import{i as _s,g as Ss}from"./BcHDkAC1.js";import{b as Rs}from"./BDQHbwWB.js";function kt(r,e,s=!1,n=!1,t=!1){var i=r,a="";ie(()=>{var o=ns;if(a===(a=e()??"")){dt&&gt();return}if(o.nodes!==null&&(as(o.nodes.start,o.nodes.end),o.nodes=null),a!==""){if(dt){ft.data;for(var l=gt(),h=l;l!==null&&(l.nodeType!==is||l.data!=="");)h=l,l=ls(l);if(l===null)throw os(),cs;ut(ft,h),i=hs(l);return}var c=s?us:n?ds:void 0,d=ps(s?"svg":n?"math":"template",c);d.innerHTML=a;var g=s||n?d:d.content;if(ut(Ge(g),g.lastChild),s||n)for(;Ge(g);)i.before(Ge(g));else i.before(g)}})}function xt(r,e){const s=xe(e,["children","$$slots","$$events","$$legacy"]);const n=[["path",{d:"M3 5h.01"}],["path",{d:"M3 12h.01"}],["path",{d:"M3 19h.01"}],["path",{d:"M8 5h13"}],["path",{d:"M8 12h13"}],["path",{d:"M8 19h13"}]];be(r,me({name:"list"},()=>s,{get iconNode(){return n},children:(t,i)=>{var a=F(),o=X(a);we(o,e,"default",{}),v(t,a)},$$slots:{default:!0}}))}function mt(r,e){const s=xe(e,["children","$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"18",cy:"5",r:"3"}],["circle",{cx:"6",cy:"12",r:"3"}],["circle",{cx:"18",cy:"19",r:"3"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49"}]];be(r,me({name:"share-2"},()=>s,{get iconNode(){return n},children:(t,i)=>{var a=F(),o=X(a);we(o,e,"default",{}),v(t,a)},$$slots:{default:!0}}))}function Ts(r,e){const s=xe(e,["children","$$slots","$$events","$$legacy"]);const n=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"}]];be(r,me({name:"message-square"},()=>s,{get iconNode(){return n},children:(t,i)=>{var a=F(),o=X(a);we(o,e,"default",{}),v(t,a)},$$slots:{default:!0}}))}var zs=I('<span class="toggle-btn active svelte-r6dy5f" aria-current="page"><!><span class="toggle-label">Details</span></span>'),As=I('<a class="toggle-btn svelte-r6dy5f"><!><span class="toggle-label">Details</span></a>'),Is=I('<span class="toggle-btn active svelte-r6dy5f" aria-current="page"><!><span class="toggle-label">Graph</span></span>'),Ps=I('<a class="toggle-btn svelte-r6dy5f" href="/graph"><!><span class="toggle-label">Graph</span></a>'),Cs=I('<div class="view-toolbar svelte-r6dy5f"><div></div> <div class="view-toggles svelte-r6dy5f"><!> <!></div> <div class="toolbar-right svelte-r6dy5f"><!> <!></div></div>');function Jr(r,e){St(e,!0);let s=bs(e,"activeView",3,"entity");const n=Rt("chat");var t=Cs(),i=j(R(t),2),a=R(i);{var o=b=>{var w=zs(),u=R(w);xt(u,{size:14}),ze(),_(w),v(b,w)},l=b=>{var w=As(),u=R(w);xt(u,{size:14}),ze(),_(w),ie(()=>zt(w,"href",C.entityPath??"/")),v(b,w)};D(a,b=>{s()==="entity"?b(o):b(l,!1)})}var h=j(a,2);{var c=b=>{var w=Is(),u=R(w);mt(u,{size:14}),ze(),_(w),v(b,w)},d=b=>{var w=Ps(),u=R(w);mt(u,{size:14}),ze(),_(w),v(b,w)};D(h,b=>{s()==="graph"?b(c):b(d,!1)})}_(i);var g=j(i,2),T=R(g);{var m=b=>{var w=F(),u=X(w);xs(u,()=>e.right),v(b,w)};D(T,b=>{e.right&&b(m)})}var L=j(T,2);{var O=b=>{ee(b,{variant:"accent",size:"icon",class:"chat-toggle",title:"Open Agent",get onclick(){return n.toggle},children:(w,u)=>{Ts(w,{size:14})},$$slots:{default:!0}})};D(L,b=>{n.open||b(O)})}_(g),_(t),v(r,t),Tt()}function Es(r,e){const s=xe(e,["children","$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1"}]];be(r,me({name:"circle-stop"},()=>s,{get iconNode(){return n},children:(t,i)=>{var a=F(),o=X(a);we(o,e,"default",{}),v(t,a)},$$slots:{default:!0}}))}function Ls(r,e){const s=xe(e,["children","$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"}]];be(r,me({name:"square-pen"},()=>s,{get iconNode(){return n},children:(t,i)=>{var a=F(),o=X(a);we(o,e,"default",{}),v(t,a)},$$slots:{default:!0}}))}function qs(r,e){const s=xe(e,["children","$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]];be(r,me({name:"clock"},()=>s,{get iconNode(){return n},children:(t,i)=>{var a=F(),o=X(a);we(o,e,"default",{}),v(t,a)},$$slots:{default:!0}}))}function tt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ue=tt();function At(r){ue=r}var he={exec:()=>null};function x(r,e=""){let s=typeof r=="string"?r:r.source,n={replace:(t,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(q.caret,"$1"),s=s.replace(t,a),n},getRegex:()=>new RegExp(s,e)};return n}var Bs=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),q={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}>`)},Ms=/^(?:[ \t]*(?:\n|$))+/,Ns=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,js=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ie=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ds=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,st=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,It=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Pt=x(It).replace(/bull/g,st).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Os=x(It).replace(/bull/g,st).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),rt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Zs=/^[^\n]+/,nt=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Hs=x(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",nt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Qs=x(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,st).getRegex(),Ne="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",at=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ws=x("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",at).replace("tag",Ne).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ct=x(rt).replace("hr",Ie).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ne).getRegex(),Gs=x(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ct).getRegex(),it={blockquote:Gs,code:Ns,def:Hs,fences:js,heading:Ds,hr:Ie,html:Ws,lheading:Pt,list:Qs,newline:Ms,paragraph:Ct,table:he,text:Zs},bt=x("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ie).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ne).getRegex(),Us={...it,lheading:Os,table:bt,paragraph:x(rt).replace("hr",Ie).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",bt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ne).getRegex()},Vs={...it,html:x(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",at).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:he,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:x(rt).replace("hr",Ie).replace("heading",` *#{1,6} *[^
1
+ import{g as ut,c as F,a as v,f as I,d as es,e as ts,b as ss,s as $e,t as rs}from"./CjKjQEMp.js";import{v as ie,h as dt,a as gt,ad as ns,aZ as as,e as ft,C as is,k as ls,aY as os,aS as cs,c as hs,aK as ps,a_ as us,a$ as ds,l as Ge,f as X,p as St,m as Rt,n as Tt,q as j,o as R,u as _,t as ze,z as te,S as Ue,y as p,x as S,T as Ve,_ as gs,P as Fe,D as fs,b0 as ks,V as Pe}from"./D-tW7Byc.js";import{g as zt,e as xs,B as ee,w as ms}from"./ByFfmBEu.js";import{l as xe,s as me,p as bs,i as D,b as ws}from"./EhE2EcYu.js";import{I as be,s as we,n as C,X as vs,a as _e,T as ys,i as Se}from"./Dl32v5i0.js";import"./eEhMI0BQ.js";import{b as $s}from"./BV_9Nfp2.js";import{i as _s,g as Ss}from"./DcZunGp-.js";import{b as Rs}from"./BkE6vniY.js";function kt(r,e,s=!1,n=!1,t=!1){var i=r,a="";ie(()=>{var o=ns;if(a===(a=e()??"")){dt&&gt();return}if(o.nodes!==null&&(as(o.nodes.start,o.nodes.end),o.nodes=null),a!==""){if(dt){ft.data;for(var l=gt(),h=l;l!==null&&(l.nodeType!==is||l.data!=="");)h=l,l=ls(l);if(l===null)throw os(),cs;ut(ft,h),i=hs(l);return}var c=s?us:n?ds:void 0,d=ps(s?"svg":n?"math":"template",c);d.innerHTML=a;var g=s||n?d:d.content;if(ut(Ge(g),g.lastChild),s||n)for(;Ge(g);)i.before(Ge(g));else i.before(g)}})}function xt(r,e){const s=xe(e,["children","$$slots","$$events","$$legacy"]);const n=[["path",{d:"M3 5h.01"}],["path",{d:"M3 12h.01"}],["path",{d:"M3 19h.01"}],["path",{d:"M8 5h13"}],["path",{d:"M8 12h13"}],["path",{d:"M8 19h13"}]];be(r,me({name:"list"},()=>s,{get iconNode(){return n},children:(t,i)=>{var a=F(),o=X(a);we(o,e,"default",{}),v(t,a)},$$slots:{default:!0}}))}function mt(r,e){const s=xe(e,["children","$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"18",cy:"5",r:"3"}],["circle",{cx:"6",cy:"12",r:"3"}],["circle",{cx:"18",cy:"19",r:"3"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49"}]];be(r,me({name:"share-2"},()=>s,{get iconNode(){return n},children:(t,i)=>{var a=F(),o=X(a);we(o,e,"default",{}),v(t,a)},$$slots:{default:!0}}))}function Ts(r,e){const s=xe(e,["children","$$slots","$$events","$$legacy"]);const n=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"}]];be(r,me({name:"message-square"},()=>s,{get iconNode(){return n},children:(t,i)=>{var a=F(),o=X(a);we(o,e,"default",{}),v(t,a)},$$slots:{default:!0}}))}var zs=I('<span class="toggle-btn active svelte-r6dy5f" aria-current="page"><!><span class="toggle-label">Details</span></span>'),As=I('<a class="toggle-btn svelte-r6dy5f"><!><span class="toggle-label">Details</span></a>'),Is=I('<span class="toggle-btn active svelte-r6dy5f" aria-current="page"><!><span class="toggle-label">Graph</span></span>'),Ps=I('<a class="toggle-btn svelte-r6dy5f" href="/graph"><!><span class="toggle-label">Graph</span></a>'),Cs=I('<div class="view-toolbar svelte-r6dy5f"><div></div> <div class="view-toggles svelte-r6dy5f"><!> <!></div> <div class="toolbar-right svelte-r6dy5f"><!> <!></div></div>');function Jr(r,e){St(e,!0);let s=bs(e,"activeView",3,"entity");const n=Rt("chat");var t=Cs(),i=j(R(t),2),a=R(i);{var o=b=>{var w=zs(),u=R(w);xt(u,{size:14}),ze(),_(w),v(b,w)},l=b=>{var w=As(),u=R(w);xt(u,{size:14}),ze(),_(w),ie(()=>zt(w,"href",C.entityPath??"/")),v(b,w)};D(a,b=>{s()==="entity"?b(o):b(l,!1)})}var h=j(a,2);{var c=b=>{var w=Is(),u=R(w);mt(u,{size:14}),ze(),_(w),v(b,w)},d=b=>{var w=Ps(),u=R(w);mt(u,{size:14}),ze(),_(w),v(b,w)};D(h,b=>{s()==="graph"?b(c):b(d,!1)})}_(i);var g=j(i,2),T=R(g);{var m=b=>{var w=F(),u=X(w);xs(u,()=>e.right),v(b,w)};D(T,b=>{e.right&&b(m)})}var L=j(T,2);{var O=b=>{ee(b,{variant:"accent",size:"icon",class:"chat-toggle",title:"Open Agent",get onclick(){return n.toggle},children:(w,u)=>{Ts(w,{size:14})},$$slots:{default:!0}})};D(L,b=>{n.open||b(O)})}_(g),_(t),v(r,t),Tt()}function Es(r,e){const s=xe(e,["children","$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1"}]];be(r,me({name:"circle-stop"},()=>s,{get iconNode(){return n},children:(t,i)=>{var a=F(),o=X(a);we(o,e,"default",{}),v(t,a)},$$slots:{default:!0}}))}function Ls(r,e){const s=xe(e,["children","$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"}]];be(r,me({name:"square-pen"},()=>s,{get iconNode(){return n},children:(t,i)=>{var a=F(),o=X(a);we(o,e,"default",{}),v(t,a)},$$slots:{default:!0}}))}function qs(r,e){const s=xe(e,["children","$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]];be(r,me({name:"clock"},()=>s,{get iconNode(){return n},children:(t,i)=>{var a=F(),o=X(a);we(o,e,"default",{}),v(t,a)},$$slots:{default:!0}}))}function tt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ue=tt();function At(r){ue=r}var he={exec:()=>null};function x(r,e=""){let s=typeof r=="string"?r:r.source,n={replace:(t,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(q.caret,"$1"),s=s.replace(t,a),n},getRegex:()=>new RegExp(s,e)};return n}var Bs=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),q={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}>`)},Ms=/^(?:[ \t]*(?:\n|$))+/,Ns=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,js=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ie=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ds=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,st=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,It=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Pt=x(It).replace(/bull/g,st).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Os=x(It).replace(/bull/g,st).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),rt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Zs=/^[^\n]+/,nt=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Hs=x(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",nt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Qs=x(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,st).getRegex(),Ne="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",at=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ws=x("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",at).replace("tag",Ne).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ct=x(rt).replace("hr",Ie).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ne).getRegex(),Gs=x(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ct).getRegex(),it={blockquote:Gs,code:Ns,def:Hs,fences:js,heading:Ds,hr:Ie,html:Ws,lheading:Pt,list:Qs,newline:Ms,paragraph:Ct,table:he,text:Zs},bt=x("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ie).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ne).getRegex(),Us={...it,lheading:Os,table:bt,paragraph:x(rt).replace("hr",Ie).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",bt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ne).getRegex()},Vs={...it,html:x(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",at).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:he,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:x(rt).replace("hr",Ie).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",Pt).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Fs=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Xs=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Et=/^( {2,}|\\)\n(?!\s*$)/,Js=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,je=/[\p{P}\p{S}]/u,lt=/[\s\p{P}\p{S}]/u,Lt=/[^\s\p{P}\p{S}]/u,Ks=x(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,lt).getRegex(),qt=/(?!~)[\p{P}\p{S}]/u,Ys=/(?!~)[\s\p{P}\p{S}]/u,er=/(?:[^\s\p{P}\p{S}]|~)/u,Bt=/(?![*_])[\p{P}\p{S}]/u,tr=/(?![*_])[\s\p{P}\p{S}]/u,sr=/(?:[^\s\p{P}\p{S}]|[*_])/u,rr=x(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Bs?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Mt=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,nr=x(Mt,"u").replace(/punct/g,je).getRegex(),ar=x(Mt,"u").replace(/punct/g,qt).getRegex(),Nt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ir=x(Nt,"gu").replace(/notPunctSpace/g,Lt).replace(/punctSpace/g,lt).replace(/punct/g,je).getRegex(),lr=x(Nt,"gu").replace(/notPunctSpace/g,er).replace(/punctSpace/g,Ys).replace(/punct/g,qt).getRegex(),or=x("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Lt).replace(/punctSpace/g,lt).replace(/punct/g,je).getRegex(),cr=x(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Bt).getRegex(),hr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",pr=x(hr,"gu").replace(/notPunctSpace/g,sr).replace(/punctSpace/g,tr).replace(/punct/g,Bt).getRegex(),ur=x(/\\(punct)/,"gu").replace(/punct/g,je).getRegex(),dr=x(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),gr=x(at).replace("(?:-->|$)","-->").getRegex(),fr=x("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",gr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),qe=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,kr=x(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",qe).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),jt=x(/^!?\[(label)\]\[(ref)\]/).replace("label",qe).replace("ref",nt).getRegex(),Dt=x(/^!?\[(ref)\](?:\[\])?/).replace("ref",nt).getRegex(),xr=x("reflink|nolink(?!\\()","g").replace("reflink",jt).replace("nolink",Dt).getRegex(),wt=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ot={_backpedal:he,anyPunctuation:ur,autolink:dr,blockSkip:rr,br:Et,code:Xs,del:he,delLDelim:he,delRDelim:he,emStrongLDelim:nr,emStrongRDelimAst:ir,emStrongRDelimUnd:or,escape:Fs,link:kr,nolink:Dt,punctuation:Ks,reflink:jt,reflinkSearch:xr,tag:fr,text:Js,url:he},mr={...ot,link:x(/^!?\[(label)\]\((.*?)\)/).replace("label",qe).getRegex(),reflink:x(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",qe).getRegex()},Xe={...ot,emStrongRDelimAst:lr,emStrongLDelim:ar,delLDelim:cr,delRDelim:pr,url:x(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",wt).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:x(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",wt).getRegex()},br={...Xe,br:x(Et).replace("{2,}","*").getRegex(),text:x(Xe.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ce={normal:it,gfm:Us,pedantic:Vs},Re={normal:ot,gfm:Xe,breaks:br,pedantic:mr},wr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vt=r=>wr[r];function V(r,e){if(e){if(q.escapeTest.test(r))return r.replace(q.escapeReplace,vt)}else if(q.escapeTestNoEncode.test(r))return r.replace(q.escapeReplaceNoEncode,vt);return r}function yt(r){try{r=encodeURI(r).replace(q.percentDecode,"%")}catch{return null}return r}function $t(r,e){let s=r.replace(q.findPipe,(i,a,o)=>{let l=!1,h=a;for(;--h>=0&&o[h]==="\\";)l=!l;return l?"|":" |"}),n=s.split(q.splitPipe),t=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;t<n.length;t++)n[t]=n[t].trim().replace(q.slashPipe,"|");return n}function Te(r,e,s){let n=r.length;if(n===0)return"";let t=0;for(;t<n&&r.charAt(n-t-1)===e;)t++;return r.slice(0,n-t)}function vr(r,e){if(r.indexOf(e[1])===-1)return-1;let s=0;for(let n=0;n<r.length;n++)if(r[n]==="\\")n++;else if(r[n]===e[0])s++;else if(r[n]===e[1]&&(s--,s<0))return n;return s>0?-2:-1}function yr(r,e=0){let s=e,n="";for(let t of r)if(t===" "){let i=4-s%4;n+=" ".repeat(i),s+=i}else n+=t,s++;return n}function _t(r,e,s,n,t){let i=e.href,a=e.title||null,o=r[1].replace(t.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:r[0].charAt(0)==="!"?"image":"link",raw:s,href:i,title:a,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}function $r(r,e,s){let n=r.match(s.other.indentCodeCompensation);if(n===null)return e;let t=n[1];return e.split(`
3
3
  `).map(i=>{let a=i.match(s.other.beginningSpace);if(a===null)return i;let[o]=a;return o.length>=t.length?i.slice(t.length):i}).join(`
4
4
  `)}var Be=class{options;rules;lexer;constructor(r){this.options=r||ue}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let s=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?s:Te(s,`
@@ -1,4 +1,4 @@
1
- import{c as E,a as u,k as As,r as Re,q as bt,f as x,m as Is,u as Ms,t as It,s as ve,d as Ns,e as Ht,b as Os}from"./CjKjQEMp.js";import{bi as Fs,h as Rs,a as zs,bs as Ds,b as Ls,f as p,S as dn,y as o,V as b,z as O,x as _,bt as Zr,al as Bs,ar as _n,bu as Ks,m as eo,ao as Vs,B as Us,D as Ct,F as dr,P as Ws,p as D,bd as ce,n as L,o as P,u as k,bv as js,bw as po,q as A,t as Ze,v as ee,_ as go,T as On,U as mo}from"./D-tW7Byc.js";import{B as Gs,l as We,s as G,p as S,i as N,r as me,b as br}from"./EhE2EcYu.js";import{m as pt,y as sr,e as W,b as lt,c as Qe,p as Vn,d as yo,s as bo,B as $e,l as zt,w as I,a as Rt,z as qs,A as Hs,g as Ys}from"./ByFfmBEu.js";import{I as je,s as Ge,r as Xt,X as fr,a as mt,i as yt,n as Ue,P as to,T as ir,R as Xs}from"./0s5p8hS6.js";import{c as B}from"./Dpn7ZAUg.js";import{g as Dt}from"./BcHDkAC1.js";import{I as Bn}from"./BV_9Nfp2.js";import"./eEhMI0BQ.js";function Qs(){return Symbol(Fs)}const Js=Symbol("NaN");function Zs(n,e,t){Rs&&zs();var r=new Gs(n),s=!Ds();Ls(()=>{var a=e();a!==a&&(a=Js),s&&a!==null&&typeof a=="object"&&(a={}),r.ensure(a,t)})}function _o(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];je(n,G({name:"search"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function Fn(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m9 18 6-6-6-6"}]];je(n,G({name:"chevron-right"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function Rn(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m6 9 6 6 6-6"}]];je(n,G({name:"chevron-down"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function ei(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m16 17 5-5-5-5"}],["path",{d:"M21 12H9"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}]];je(n,G({name:"log-out"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}const ti={project:"#6e6ee8",organization:"#00c2b2",person:"#f0c246",meeting:"#ff7a00",deal:"#3ecf8e",deliverable:"#ff3864",decision:"#00a8ff",dataset:"#be00ff",process:"#f5c800",deck:"#6e6ee8",doc:"#00a8ff",document:"#a855f7",note:"#94a3b8",publication:"#ec4899",reference:"#14b8a6",task:"#f97316",role:"#ff7a00","practice-area":"#8b5cf6","case-study":"#06b6d4",standard:"#ff2aa8"};function cn(n){return n?ti[n]??"#5c5c66":"#5c5c66"}const ni={person:"people","practice-area":"practice-areas","case-study":"case-studies",process:"processes"};function ri(n){return ni[n]??n+"s"}function oi(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]];je(n,G({name:"eye"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function ar(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}],["path",{d:"m2 2 20 20"}]];je(n,G({name:"eye-off"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function si(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}],["circle",{cx:"12",cy:"12",r:"3"}]];je(n,G({name:"settings"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function ii(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m3 16 4 4 4-4"}],["path",{d:"M7 20V4"}],["path",{d:"M20 8h-5"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10"}],["path",{d:"M15 14h5l-5 6h5"}]];je(n,G({name:"arrow-down-a-z"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function ai(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m3 16 4 4 4-4"}],["path",{d:"M7 20V4"}],["path",{d:"M11 4h10"}],["path",{d:"M11 8h7"}],["path",{d:"M11 12h4"}]];je(n,G({name:"arrow-down-wide-narrow"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function li(n){return pt(`/api/repos/${encodeURIComponent(n)}/sync`,{method:"POST"})}function Ou(n,e,t){return pt(`/api/repos/${encodeURIComponent(n)}/entities/${encodeURIComponent(e)}/${encodeURIComponent(t)}/refresh`,{method:"POST"})}function Fu(n,e,t){return pt(`/api/repos/${encodeURIComponent(n)}/entities/${encodeURIComponent(e)}/${encodeURIComponent(t)}/refresh/apply`,{method:"POST"})}function Ru(){return pt("/api/sources")}function zu(){return pt("/api/connectors")}function Du(n){return pt(`/api/connectors/${encodeURIComponent(n)}/config`)}function Lu(n,e){return pt(`/api/connectors/${encodeURIComponent(n)}/config`,{method:"POST",body:JSON.stringify({fields:e})})}function Bu(n){return pt(`/api/connectors/${encodeURIComponent(n)}/config`,{method:"DELETE"})}function Ku(n){return pt(`/api/sources/${encodeURIComponent(n)}`)}function Vu(n,e){return pt(`/api/sources/${encodeURIComponent(n)}`,{method:"POST",body:JSON.stringify(e)})}function Uu(n,e){return pt(`/api/repos/${encodeURIComponent(n)}`,{method:"PATCH",body:JSON.stringify({sync:e})})}function ci(){let n=dn({}),e=null,t=null;function r(f,g,T){t&&(clearInterval(t),t=null),e=`${f}/${g}/${T}`,a("enter",f,g,T),t=setInterval(()=>{e&&a("heartbeat",f,g,T)},3e4)}function s(){if(t&&(clearInterval(t),t=null),e){const[f,g,T]=e.split("/");f&&g&&T&&a("leave",f,g,T),e=null}}function a(f,g,T,w){Xt.send({type:"presence",action:f,repo:g,entityType:T,entityId:w})}function i(f){const g=`${f.repo}/${f.entityType}/${f.entityId}`,T=n[g]??[];if(f.action==="leave")n[g]=T.filter(w=>w.id!==f.user.id);else{const w=T.findIndex(y=>y.id===f.user.id);w>=0?(T[w]=f.user,n[g]=[...T]):n[g]=[...T,f.user]}}function l(){if(!e)return;const[f,g,T]=e.split("/");f&&g&&T&&a("enter",f,g,T)}function d(f,g,T,w){const y=`${f}/${g}/${T}`,h=n[y]??[];return w?h.filter(m=>m.id!==w):h}return{enter:r,leave:s,handlePresenceEvent:i,resendCurrentPresence:l,getPresence:d}}const _r=ci();Xt.setPresenceHandler(n=>_r.handlePresenceEvent(n));Xt.setOnConnectCallback(()=>_r.resendCurrentPresence());function ui(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}],["circle",{cx:"9",cy:"7",r:"4"}]];je(n,G({name:"users"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function di(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]];je(n,G({name:"folder-open"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function fi(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z"}],["path",{d:"M17 21v-2"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10"}],["path",{d:"M21 21v-2"}],["path",{d:"M3 5V3"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z"}],["path",{d:"M7 5V3"}]];je(n,G({name:"cable"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function hi(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M12 22v-5"}],["path",{d:"M15 8V2"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z"}],["path",{d:"M9 8V2"}]];je(n,G({name:"plug"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function vi(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];je(n,G({name:"info"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function pi(n){return typeof n=="function"}function kn(n){return n!==null&&typeof n=="object"}const gi=["string","number","bigint","boolean"];function hr(n){return n==null||gi.includes(typeof n)?!0:Array.isArray(n)?n.every(e=>hr(e)):typeof n=="object"?Object.getPrototypeOf(n)===Object.prototype:!1}const un=Symbol("box"),Qn=Symbol("is-writable");function $(n,e){const t=b(n);return e?{[un]:!0,[Qn]:!0,get current(){return o(t)},set current(r){e(r)}}:{[un]:!0,get current(){return n()}}}function Pn(n){return kn(n)&&un in n}function wr(n){return Pn(n)&&Qn in n}function mi(n){return Pn(n)?n:pi(n)?$(n):wo(n)}function yi(n){return Object.entries(n).reduce((e,[t,r])=>Pn(r)?(wr(r)?Object.defineProperty(e,t,{get(){return r.current},set(s){r.current=s}}):Object.defineProperty(e,t,{get(){return r.current}}),e):Object.assign(e,{[t]:r}),{})}function bi(n){return wr(n)?{[un]:!0,get current(){return n.current}}:n}function wo(n){let e=O(dn(n));return{[un]:!0,[Qn]:!0,get current(){return o(e)},set current(t){_(e,t,!0)}}}function Zt(n){let e=O(dn(n));return{[un]:!0,[Qn]:!0,get current(){return o(e)},set current(t){_(e,t,!0)}}}Zt.from=mi;Zt.with=$;Zt.flatten=yi;Zt.readonly=bi;Zt.isBox=Pn;Zt.isWritableBox=wr;function To(...n){return function(e){for(const t of n)if(t){if(e.defaultPrevented)return;typeof t=="function"?t.call(this,e):t.current?.call(this,e)}}}var no=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,_i=/\n/g,wi=/^\s*/,Ti=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Si=/^:\s*/,Ci=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Ei=/^[;\s]*/,xi=/^\s+|\s+$/g,ki=`
1
+ import{c as E,a as u,k as As,r as Re,q as bt,f as x,m as Is,u as Ms,t as It,s as ve,d as Ns,e as Ht,b as Os}from"./CjKjQEMp.js";import{bi as Fs,h as Rs,a as zs,bs as Ds,b as Ls,f as p,S as dn,y as o,V as b,z as O,x as _,bt as Zr,al as Bs,ar as _n,bu as Ks,m as eo,ao as Vs,B as Us,D as Ct,F as dr,P as Ws,p as D,bd as ce,n as L,o as P,u as k,bv as js,bw as po,q as A,t as Ze,v as ee,_ as go,T as On,U as mo}from"./D-tW7Byc.js";import{B as Gs,l as We,s as G,p as S,i as N,r as me,b as br}from"./EhE2EcYu.js";import{m as pt,y as sr,e as W,b as lt,c as Qe,p as Vn,d as yo,s as bo,B as $e,l as zt,w as I,a as Rt,z as qs,A as Hs,g as Ys}from"./ByFfmBEu.js";import{I as je,s as Ge,r as Xt,X as fr,a as mt,i as yt,n as Ue,P as to,T as ir,R as Xs}from"./Dl32v5i0.js";import{c as B}from"./Dpn7ZAUg.js";import{g as Dt}from"./DcZunGp-.js";import{I as Bn}from"./BV_9Nfp2.js";import"./eEhMI0BQ.js";function Qs(){return Symbol(Fs)}const Js=Symbol("NaN");function Zs(n,e,t){Rs&&zs();var r=new Gs(n),s=!Ds();Ls(()=>{var a=e();a!==a&&(a=Js),s&&a!==null&&typeof a=="object"&&(a={}),r.ensure(a,t)})}function _o(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];je(n,G({name:"search"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function Fn(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m9 18 6-6-6-6"}]];je(n,G({name:"chevron-right"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function Rn(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m6 9 6 6 6-6"}]];je(n,G({name:"chevron-down"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function ei(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m16 17 5-5-5-5"}],["path",{d:"M21 12H9"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}]];je(n,G({name:"log-out"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}const ti={project:"#6e6ee8",organization:"#00c2b2",person:"#f0c246",meeting:"#ff7a00",deal:"#3ecf8e",deliverable:"#ff3864",decision:"#00a8ff",dataset:"#be00ff",process:"#f5c800",deck:"#6e6ee8",doc:"#00a8ff",document:"#a855f7",note:"#94a3b8",publication:"#ec4899",reference:"#14b8a6",task:"#f97316",role:"#ff7a00","practice-area":"#8b5cf6","case-study":"#06b6d4",standard:"#ff2aa8"};function cn(n){return n?ti[n]??"#5c5c66":"#5c5c66"}const ni={person:"people","practice-area":"practice-areas","case-study":"case-studies",process:"processes"};function ri(n){return ni[n]??n+"s"}function oi(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]];je(n,G({name:"eye"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function ar(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}],["path",{d:"m2 2 20 20"}]];je(n,G({name:"eye-off"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function si(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}],["circle",{cx:"12",cy:"12",r:"3"}]];je(n,G({name:"settings"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function ii(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m3 16 4 4 4-4"}],["path",{d:"M7 20V4"}],["path",{d:"M20 8h-5"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10"}],["path",{d:"M15 14h5l-5 6h5"}]];je(n,G({name:"arrow-down-a-z"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function ai(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m3 16 4 4 4-4"}],["path",{d:"M7 20V4"}],["path",{d:"M11 4h10"}],["path",{d:"M11 8h7"}],["path",{d:"M11 12h4"}]];je(n,G({name:"arrow-down-wide-narrow"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function li(n){return pt(`/api/repos/${encodeURIComponent(n)}/sync`,{method:"POST"})}function Ou(n,e,t){return pt(`/api/repos/${encodeURIComponent(n)}/entities/${encodeURIComponent(e)}/${encodeURIComponent(t)}/refresh`,{method:"POST"})}function Fu(n,e,t){return pt(`/api/repos/${encodeURIComponent(n)}/entities/${encodeURIComponent(e)}/${encodeURIComponent(t)}/refresh/apply`,{method:"POST"})}function Ru(){return pt("/api/sources")}function zu(){return pt("/api/connectors")}function Du(n){return pt(`/api/connectors/${encodeURIComponent(n)}/config`)}function Lu(n,e){return pt(`/api/connectors/${encodeURIComponent(n)}/config`,{method:"POST",body:JSON.stringify({fields:e})})}function Bu(n){return pt(`/api/connectors/${encodeURIComponent(n)}/config`,{method:"DELETE"})}function Ku(n){return pt(`/api/sources/${encodeURIComponent(n)}`)}function Vu(n,e){return pt(`/api/sources/${encodeURIComponent(n)}`,{method:"POST",body:JSON.stringify(e)})}function Uu(n,e){return pt(`/api/repos/${encodeURIComponent(n)}`,{method:"PATCH",body:JSON.stringify({sync:e})})}function ci(){let n=dn({}),e=null,t=null;function r(f,g,T){t&&(clearInterval(t),t=null),e=`${f}/${g}/${T}`,a("enter",f,g,T),t=setInterval(()=>{e&&a("heartbeat",f,g,T)},3e4)}function s(){if(t&&(clearInterval(t),t=null),e){const[f,g,T]=e.split("/");f&&g&&T&&a("leave",f,g,T),e=null}}function a(f,g,T,w){Xt.send({type:"presence",action:f,repo:g,entityType:T,entityId:w})}function i(f){const g=`${f.repo}/${f.entityType}/${f.entityId}`,T=n[g]??[];if(f.action==="leave")n[g]=T.filter(w=>w.id!==f.user.id);else{const w=T.findIndex(y=>y.id===f.user.id);w>=0?(T[w]=f.user,n[g]=[...T]):n[g]=[...T,f.user]}}function l(){if(!e)return;const[f,g,T]=e.split("/");f&&g&&T&&a("enter",f,g,T)}function d(f,g,T,w){const y=`${f}/${g}/${T}`,h=n[y]??[];return w?h.filter(m=>m.id!==w):h}return{enter:r,leave:s,handlePresenceEvent:i,resendCurrentPresence:l,getPresence:d}}const _r=ci();Xt.setPresenceHandler(n=>_r.handlePresenceEvent(n));Xt.setOnConnectCallback(()=>_r.resendCurrentPresence());function ui(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}],["circle",{cx:"9",cy:"7",r:"4"}]];je(n,G({name:"users"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function di(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]];je(n,G({name:"folder-open"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function fi(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z"}],["path",{d:"M17 21v-2"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10"}],["path",{d:"M21 21v-2"}],["path",{d:"M3 5V3"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z"}],["path",{d:"M7 5V3"}]];je(n,G({name:"cable"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function hi(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M12 22v-5"}],["path",{d:"M15 8V2"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z"}],["path",{d:"M9 8V2"}]];je(n,G({name:"plug"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function vi(n,e){const t=We(e,["children","$$slots","$$events","$$legacy"]);const r=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];je(n,G({name:"info"},()=>t,{get iconNode(){return r},children:(s,a)=>{var i=E(),l=p(i);Ge(l,e,"default",{}),u(s,i)},$$slots:{default:!0}}))}function pi(n){return typeof n=="function"}function kn(n){return n!==null&&typeof n=="object"}const gi=["string","number","bigint","boolean"];function hr(n){return n==null||gi.includes(typeof n)?!0:Array.isArray(n)?n.every(e=>hr(e)):typeof n=="object"?Object.getPrototypeOf(n)===Object.prototype:!1}const un=Symbol("box"),Qn=Symbol("is-writable");function $(n,e){const t=b(n);return e?{[un]:!0,[Qn]:!0,get current(){return o(t)},set current(r){e(r)}}:{[un]:!0,get current(){return n()}}}function Pn(n){return kn(n)&&un in n}function wr(n){return Pn(n)&&Qn in n}function mi(n){return Pn(n)?n:pi(n)?$(n):wo(n)}function yi(n){return Object.entries(n).reduce((e,[t,r])=>Pn(r)?(wr(r)?Object.defineProperty(e,t,{get(){return r.current},set(s){r.current=s}}):Object.defineProperty(e,t,{get(){return r.current}}),e):Object.assign(e,{[t]:r}),{})}function bi(n){return wr(n)?{[un]:!0,get current(){return n.current}}:n}function wo(n){let e=O(dn(n));return{[un]:!0,[Qn]:!0,get current(){return o(e)},set current(t){_(e,t,!0)}}}function Zt(n){let e=O(dn(n));return{[un]:!0,[Qn]:!0,get current(){return o(e)},set current(t){_(e,t,!0)}}}Zt.from=mi;Zt.with=$;Zt.flatten=yi;Zt.readonly=bi;Zt.isBox=Pn;Zt.isWritableBox=wr;function To(...n){return function(e){for(const t of n)if(t){if(e.defaultPrevented)return;typeof t=="function"?t.call(this,e):t.current?.call(this,e)}}}var no=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,_i=/\n/g,wi=/^\s*/,Ti=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Si=/^:\s*/,Ci=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Ei=/^[;\s]*/,xi=/^\s+|\s+$/g,ki=`
2
2
  `,ro="/",oo="*",Yt="",Pi="comment",$i="declaration";function Ai(n,e){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];e=e||{};var t=1,r=1;function s(h){var m=h.match(_i);m&&(t+=m.length);var F=h.lastIndexOf(ki);r=~F?h.length-F:r+h.length}function a(){var h={line:t,column:r};return function(m){return m.position=new i(h),f(),m}}function i(h){this.start=h,this.end={line:t,column:r},this.source=e.source}i.prototype.content=n;function l(h){var m=new Error(e.source+":"+t+":"+r+": "+h);if(m.reason=h,m.filename=e.source,m.line=t,m.column=r,m.source=n,!e.silent)throw m}function d(h){var m=h.exec(n);if(m){var F=m[0];return s(F),n=n.slice(F.length),m}}function f(){d(wi)}function g(h){var m;for(h=h||[];m=T();)m!==!1&&h.push(m);return h}function T(){var h=a();if(!(ro!=n.charAt(0)||oo!=n.charAt(1))){for(var m=2;Yt!=n.charAt(m)&&(oo!=n.charAt(m)||ro!=n.charAt(m+1));)++m;if(m+=2,Yt===n.charAt(m-1))return l("End of comment missing");var F=n.slice(2,m-2);return r+=2,s(F),n=n.slice(m),r+=2,h({type:Pi,comment:F})}}function w(){var h=a(),m=d(Ti);if(m){if(T(),!d(Si))return l("property missing ':'");var F=d(Ci),ye=h({type:$i,property:so(m[0].replace(no,Yt)),value:F?so(F[0].replace(no,Yt)):Yt});return d(Ei),ye}}function y(){var h=[];g(h);for(var m;m=w();)m!==!1&&(h.push(m),g(h));return h}return f(),y()}function so(n){return n?n.replace(xi,Yt):Yt}function Ii(n,e){let t=null;if(!n||typeof n!="string")return t;const r=Ai(n),s=typeof e=="function";return r.forEach(a=>{if(a.type!=="declaration")return;const{property:i,value:l}=a;s?e(i,l,a):l&&(t=t||{},t[i]=l)}),t}const Mi=/\d/,Ni=["-","_","/","."];function Oi(n=""){if(!Mi.test(n))return n!==n.toLowerCase()}function Fi(n){const e=[];let t="",r,s;for(const a of n){const i=Ni.includes(a);if(i===!0){e.push(t),t="",r=void 0;continue}const l=Oi(a);if(s===!1){if(r===!1&&l===!0){e.push(t),t=a,r=l;continue}if(r===!0&&l===!1&&t.length>1){const d=t.at(-1);e.push(t.slice(0,Math.max(0,t.length-1))),t=d+a,r=l;continue}}t+=a,r=l,s=i}return e.push(t),e}function So(n){return n?Fi(n).map(e=>zi(e)).join(""):""}function Ri(n){return Di(So(n||""))}function zi(n){return n?n[0].toUpperCase()+n.slice(1):""}function Di(n){return n?n[0].toLowerCase()+n.slice(1):""}function zn(n){if(!n)return{};const e={};function t(r,s){if(r.startsWith("-moz-")||r.startsWith("-webkit-")||r.startsWith("-ms-")||r.startsWith("-o-")){e[So(r)]=s;return}if(r.startsWith("--")){e[r]=s;return}e[Ri(r)]=s}return Ii(n,t),e}function Qt(...n){return(...e)=>{for(const t of n)typeof t=="function"&&t(...e)}}function Li(n,e){const t=RegExp(n,"g");return r=>{if(typeof r!="string")throw new TypeError(`expected an argument of type string, but got ${typeof r}`);return r.match(t)?r.replace(t,e):r}}const Bi=Li(/[A-Z]/,n=>`-${n.toLowerCase()}`);function Ki(n){if(!n||typeof n!="object"||Array.isArray(n))throw new TypeError(`expected an argument of type object, but got ${typeof n}`);return Object.keys(n).map(e=>`${Bi(e)}: ${n[e]};`).join(`
3
3
  `)}function Vi(n={}){return Ki(n).replace(`
4
4
  `," ")}const Ui=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],Wi=new Set(Ui);function ji(n){return Wi.has(n)}function Ke(...n){const e={...n[0]};for(let t=1;t<n.length;t++){const r=n[t];if(r){for(const s of Object.keys(r)){const a=e[s],i=r[s],l=typeof a=="function",d=typeof i=="function";if(l&&ji(s)){const f=a,g=i;e[s]=To(f,g)}else if(l&&d)e[s]=Qt(a,i);else if(s==="class"){const f=hr(a),g=hr(i);f&&g?e[s]=sr(a,i):f?e[s]=sr(a):g&&(e[s]=sr(i))}else if(s==="style"){const f=typeof a=="object",g=typeof i=="object",T=typeof a=="string",w=typeof i=="string";if(f&&g)e[s]={...a,...i};else if(f&&w){const y=zn(i);e[s]={...a,...y}}else if(T&&g){const y=zn(a);e[s]={...y,...i}}else if(T&&w){const y=zn(a),h=zn(i);e[s]={...y,...h}}else f?e[s]=a:g?e[s]=i:T?e[s]=a:w&&(e[s]=i)}else e[s]=i!==void 0?i:a}for(const s of Object.getOwnPropertySymbols(r)){const a=e[s],i=r[s];e[s]=i!==void 0?i:a}}}return typeof e.style=="object"&&(e.style=Vi(e.style).replaceAll(`
@@ -1 +1 @@
1
- import{c,a as p}from"./CjKjQEMp.js";import"./eEhMI0BQ.js";import{f as i}from"./D-tW7Byc.js";import{I as l,s as m}from"./0s5p8hS6.js";import{l as d,s as f}from"./EhE2EcYu.js";function k(t,o){const e=d(o,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M20 6 9 17l-5-5"}]];l(t,f({name:"check"},()=>e,{get iconNode(){return r},children:(a,$)=>{var s=c(),n=i(s);m(n,o,"default",{}),p(a,s)},$$slots:{default:!0}}))}export{k as C};
1
+ import{c,a as p}from"./CjKjQEMp.js";import"./eEhMI0BQ.js";import{f as i}from"./D-tW7Byc.js";import{I as l,s as m}from"./Dl32v5i0.js";import{l as d,s as f}from"./EhE2EcYu.js";function k(t,o){const e=d(o,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M20 6 9 17l-5-5"}]];l(t,f({name:"check"},()=>e,{get iconNode(){return r},children:(a,$)=>{var s=c(),n=i(s);m(n,o,"default",{}),p(a,s)},$$slots:{default:!0}}))}export{k as C};
@@ -1 +1 @@
1
- import{k as Oe,c as st,a as tt,f as Ae}from"./CjKjQEMp.js";import{V as A,y as g,z as N,S as Rt,D as G,x as C,p as dt,f as et,bd as ht,n as gt,_ as Se,q as Pe}from"./D-tW7Byc.js";import{e as mt}from"./ByFfmBEu.js";import{p as O,i as Lt,s as kt,r as St}from"./EhE2EcYu.js";import{d as Ce,s as $,C as It,c as Fe,e as Dt,u as ae,f as Ee,i as Re,g as De,w as jt,h as Be,j as R,m as ce,F as Te,S as qt,E as We,D as Me,T as Le}from"./BDQHbwWB.js";function ke(e){return typeof e=="function"}function Zt(e){return ke(e)?e():e}class Ie{#t={width:0,height:0};#n=!1;#i;#o;#e;#a=A(()=>(g(this.#r)?.(),this.getSize().width));#s=A(()=>(g(this.#r)?.(),this.getSize().height));#r=A(()=>{const t=Zt(this.#o);if(t)return Oe(n=>{if(!this.#e)return;const i=new this.#e.ResizeObserver(r=>{this.#n=!0;for(const s of r){const o=this.#i.box==="content-box"?s.contentBoxSize:s.borderBoxSize,a=Array.isArray(o)?o:[o];this.#t.width=a.reduce((c,l)=>Math.max(c,l.inlineSize),0),this.#t.height=a.reduce((c,l)=>Math.max(c,l.blockSize),0)}n()});return i.observe(t),()=>{this.#n=!1,i.disconnect()}})});constructor(t,n={box:"border-box"}){this.#e=n.window??Ce,this.#i=n,this.#o=t,this.#t={width:0,height:0}}calculateSize(){const t=Zt(this.#o);if(!t||!this.#e)return;const n=t.offsetWidth,i=t.offsetHeight;if(this.#i.box==="border-box")return{width:n,height:i};const r=this.#e.getComputedStyle(t),s=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),o=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),a=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),c=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),l=n-s-a,d=i-o-c;return{width:l,height:d}}getSize(){return this.#n?this.#t:this.calculateSize()??this.#t}get current(){return g(this.#r)?.(),this.getSize()}get width(){return g(this.#a)}get height(){return g(this.#s)}}const He=["top","right","bottom","left"],nt=Math.min,k=Math.max,pt=Math.round,yt=Math.floor,Y=e=>({x:e,y:e}),_e={left:"right",right:"left",bottom:"top",top:"bottom"},Ne={start:"end",end:"start"};function Tt(e,t,n){return k(e,nt(t,n))}function q(e,t){return typeof e=="function"?e(t):e}function Z(e){return e.split("-")[0]}function lt(e){return e.split("-")[1]}function Ht(e){return e==="x"?"y":"x"}function _t(e){return e==="y"?"height":"width"}const Ve=new Set(["top","bottom"]);function X(e){return Ve.has(Z(e))?"y":"x"}function Nt(e){return Ht(X(e))}function ze(e,t,n){n===void 0&&(n=!1);const i=lt(e),r=Nt(e),s=_t(r);let o=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=vt(o)),[o,vt(o)]}function Ke(e){const t=vt(e);return[Wt(e),t,Wt(t)]}function Wt(e){return e.replace(/start|end/g,t=>Ne[t])}const Jt=["left","right"],Qt=["right","left"],Xe=["top","bottom"],Ye=["bottom","top"];function Ue(e,t,n){switch(e){case"top":case"bottom":return n?t?Qt:Jt:t?Jt:Qt;case"left":case"right":return t?Xe:Ye;default:return[]}}function je(e,t,n,i){const r=lt(e);let s=Ue(Z(e),n==="start",i);return r&&(s=s.map(o=>o+"-"+r),t&&(s=s.concat(s.map(Wt)))),s}function vt(e){return e.replace(/left|right|bottom|top/g,t=>_e[t])}function qe(e){return{top:0,right:0,bottom:0,left:0,...e}}function le(e){return typeof e!="number"?qe(e):{top:e,right:e,bottom:e,left:e}}function xt(e){const{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function Gt(e,t,n){let{reference:i,floating:r}=e;const s=X(t),o=Nt(t),a=_t(o),c=Z(t),l=s==="y",d=i.x+i.width/2-r.width/2,u=i.y+i.height/2-r.height/2,h=i[a]/2-r[a]/2;let f;switch(c){case"top":f={x:d,y:i.y-r.height};break;case"bottom":f={x:d,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:u};break;case"left":f={x:i.x-r.width,y:u};break;default:f={x:i.x,y:i.y}}switch(lt(t)){case"start":f[o]-=h*(n&&l?-1:1);break;case"end":f[o]+=h*(n&&l?-1:1);break}return f}async function Ze(e,t){var n;t===void 0&&(t={});const{x:i,y:r,platform:s,rects:o,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:f=0}=q(t,e),m=le(f),y=a[h?u==="floating"?"reference":"floating":u],p=xt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),b=u==="floating"?{x:i,y:r,width:o.floating.width,height:o.floating.height}:o.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),v=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},S=xt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:c}):b);return{top:(p.top-S.top+m.top)/v.y,bottom:(S.bottom-p.bottom+m.bottom)/v.y,left:(p.left-S.left+m.left)/v.x,right:(S.right-p.right+m.right)/v.x}}const Je=async(e,t,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let l=await o.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:u}=Gt(l,i,c),h=i,f={},m=0;for(let y=0;y<a.length;y++){var w;const{name:p,fn:b}=a[y],{x,y:v,data:S,reset:P}=await b({x:d,y:u,initialPlacement:i,placement:h,strategy:r,middlewareData:f,rects:l,platform:{...o,detectOverflow:(w=o.detectOverflow)!=null?w:Ze},elements:{reference:e,floating:t}});d=x??d,u=v??u,f={...f,[p]:{...f[p],...S}},P&&m<=50&&(m++,typeof P=="object"&&(P.placement&&(h=P.placement),P.rects&&(l=P.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:r}):P.rects),{x:d,y:u}=Gt(l,h,c)),y=-1)}return{x:d,y:u,placement:h,strategy:r,middlewareData:f}},Qe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:r,rects:s,platform:o,elements:a,middlewareData:c}=t,{element:l,padding:d=0}=q(e,t)||{};if(l==null)return{};const u=le(d),h={x:n,y:i},f=Nt(r),m=_t(f),w=await o.getDimensions(l),y=f==="y",p=y?"top":"left",b=y?"bottom":"right",x=y?"clientHeight":"clientWidth",v=s.reference[m]+s.reference[f]-h[f]-s.floating[m],S=h[f]-s.reference[f],P=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let F=P?P[x]:0;(!F||!await(o.isElement==null?void 0:o.isElement(P)))&&(F=a.floating[x]||s.floating[m]);const W=v/2-S/2,E=F/2-w[m]/2-1,D=nt(u[p],E),_=nt(u[b],E),T=D,K=F-w[m]-_,B=F/2-w[m]/2+W,J=Tt(T,B,K),H=!c.arrow&&lt(r)!=null&&B!==J&&s.reference[m]/2-(B<T?D:_)-w[m]/2<0,M=H?B<T?B-T:B-K:0;return{[f]:h[f]+M,data:{[f]:J,centerOffset:B-J-M,...H&&{alignmentOffset:M}},reset:H}}}),Ge=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:r,middlewareData:s,rects:o,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:w=!0,...y}=q(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const p=Z(r),b=X(a),x=Z(a)===a,v=await(c.isRTL==null?void 0:c.isRTL(l.floating)),S=h||(x||!w?[vt(a)]:Ke(a)),P=m!=="none";!h&&P&&S.push(...je(a,w,m,v));const F=[a,...S],W=await c.detectOverflow(t,y),E=[];let D=((i=s.flip)==null?void 0:i.overflows)||[];if(d&&E.push(W[p]),u){const B=ze(r,o,v);E.push(W[B[0]],W[B[1]])}if(D=[...D,{placement:r,overflows:E}],!E.every(B=>B<=0)){var _,T;const B=(((_=s.flip)==null?void 0:_.index)||0)+1,J=F[B];if(J&&(!(u==="alignment"?b!==X(J):!1)||D.every(L=>X(L.placement)===b?L.overflows[0]>0:!0)))return{data:{index:B,overflows:D},reset:{placement:J}};let H=(T=D.filter(M=>M.overflows[0]<=0).sort((M,L)=>M.overflows[1]-L.overflows[1])[0])==null?void 0:T.placement;if(!H)switch(f){case"bestFit":{var K;const M=(K=D.filter(L=>{if(P){const Q=X(L.placement);return Q===b||Q==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(Q=>Q>0).reduce((Q,be)=>Q+be,0)]).sort((L,Q)=>L[1]-Q[1])[0])==null?void 0:K[0];M&&(H=M);break}case"initialPlacement":H=a;break}if(r!==H)return{reset:{placement:H}}}return{}}}};function $t(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function te(e){return He.some(t=>e[t]>=0)}const $e=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:i}=t,{strategy:r="referenceHidden",...s}=q(e,t);switch(r){case"referenceHidden":{const o=await i.detectOverflow(t,{...s,elementContext:"reference"}),a=$t(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:te(a)}}}case"escaped":{const o=await i.detectOverflow(t,{...s,altBoundary:!0}),a=$t(o,n.floating);return{data:{escapedOffsets:a,escaped:te(a)}}}default:return{}}}}},ue=new Set(["left","top"]);async function tn(e,t){const{placement:n,platform:i,elements:r}=e,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Z(n),a=lt(n),c=X(n)==="y",l=ue.has(o)?-1:1,d=s&&c?-1:1,u=q(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof m=="number"&&(f=a==="end"?m*-1:m),c?{x:f*d,y:h*l}:{x:h*l,y:f*d}}const en=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:r,y:s,placement:o,middlewareData:a}=t,c=await tn(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:r+c.x,y:s+c.y,data:{...c,placement:o}}}}},nn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:r,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:c={fn:p=>{let{x:b,y:x}=p;return{x:b,y:x}}},...l}=q(e,t),d={x:n,y:i},u=await s.detectOverflow(t,l),h=X(Z(r)),f=Ht(h);let m=d[f],w=d[h];if(o){const p=f==="y"?"top":"left",b=f==="y"?"bottom":"right",x=m+u[p],v=m-u[b];m=Tt(x,m,v)}if(a){const p=h==="y"?"top":"left",b=h==="y"?"bottom":"right",x=w+u[p],v=w-u[b];w=Tt(x,w,v)}const y=c.fn({...t,[f]:m,[h]:w});return{...y,data:{x:y.x-n,y:y.y-i,enabled:{[f]:o,[h]:a}}}}}},rn=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:r,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=q(e,t),d={x:n,y:i},u=X(r),h=Ht(u);let f=d[h],m=d[u];const w=q(a,t),y=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const x=h==="y"?"height":"width",v=s.reference[h]-s.floating[x]+y.mainAxis,S=s.reference[h]+s.reference[x]-y.mainAxis;f<v?f=v:f>S&&(f=S)}if(l){var p,b;const x=h==="y"?"width":"height",v=ue.has(Z(r)),S=s.reference[u]-s.floating[x]+(v&&((p=o.offset)==null?void 0:p[u])||0)+(v?0:y.crossAxis),P=s.reference[u]+s.reference[x]+(v?0:((b=o.offset)==null?void 0:b[u])||0)-(v?y.crossAxis:0);m<S?m=S:m>P&&(m=P)}return{[h]:f,[u]:m}}}},on=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:r,rects:s,platform:o,elements:a}=t,{apply:c=()=>{},...l}=q(e,t),d=await o.detectOverflow(t,l),u=Z(r),h=lt(r),f=X(r)==="y",{width:m,height:w}=s.floating;let y,p;u==="top"||u==="bottom"?(y=u,p=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(p=u,y=h==="end"?"top":"bottom");const b=w-d.top-d.bottom,x=m-d.left-d.right,v=nt(w-d[y],b),S=nt(m-d[p],x),P=!t.middlewareData.shift;let F=v,W=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(W=x),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(F=b),P&&!h){const D=k(d.left,0),_=k(d.right,0),T=k(d.top,0),K=k(d.bottom,0);f?W=m-2*(D!==0||_!==0?D+_:k(d.left,d.right)):F=w-2*(T!==0||K!==0?T+K:k(d.top,d.bottom))}await c({...t,availableWidth:W,availableHeight:F});const E=await o.getDimensions(a.floating);return m!==E.width||w!==E.height?{reset:{rects:!0}}:{}}}};function Pt(){return typeof window<"u"}function ut(e){return fe(e)?(e.nodeName||"").toLowerCase():"#document"}function I(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function j(e){var t;return(t=(fe(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fe(e){return Pt()?e instanceof Node||e instanceof I(e).Node:!1}function V(e){return Pt()?e instanceof Element||e instanceof I(e).Element:!1}function U(e){return Pt()?e instanceof HTMLElement||e instanceof I(e).HTMLElement:!1}function ee(e){return!Pt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof I(e).ShadowRoot}const sn=new Set(["inline","contents"]);function wt(e){const{overflow:t,overflowX:n,overflowY:i,display:r}=z(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!sn.has(r)}const an=new Set(["table","td","th"]);function cn(e){return an.has(ut(e))}const ln=[":popover-open",":modal"];function Ct(e){return ln.some(t=>{try{return e.matches(t)}catch{return!1}})}const un=["transform","translate","scale","rotate","perspective"],fn=["transform","translate","scale","rotate","perspective","filter"],dn=["paint","layout","strict","content"];function Vt(e){const t=zt(),n=V(e)?z(e):e;return un.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||fn.some(i=>(n.willChange||"").includes(i))||dn.some(i=>(n.contain||"").includes(i))}function hn(e){let t=it(e);for(;U(t)&&!ct(t);){if(Vt(t))return t;if(Ct(t))return null;t=it(t)}return null}function zt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const gn=new Set(["html","body","#document"]);function ct(e){return gn.has(ut(e))}function z(e){return I(e).getComputedStyle(e)}function Ft(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function it(e){if(ut(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ee(e)&&e.host||j(e);return ee(t)?t.host:t}function de(e){const t=it(e);return ct(t)?e.ownerDocument?e.ownerDocument.body:e.body:U(t)&&wt(t)?t:de(t)}function ft(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=de(e),s=r===((i=e.ownerDocument)==null?void 0:i.body),o=I(r);if(s){const a=Mt(o);return t.concat(o,o.visualViewport||[],wt(r)?r:[],a&&n?ft(a):[])}return t.concat(r,ft(r,[],n))}function Mt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function he(e){const t=z(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const r=U(e),s=r?e.offsetWidth:n,o=r?e.offsetHeight:i,a=pt(n)!==s||pt(i)!==o;return a&&(n=s,i=o),{width:n,height:i,$:a}}function Kt(e){return V(e)?e:e.contextElement}function at(e){const t=Kt(e);if(!U(t))return Y(1);const n=t.getBoundingClientRect(),{width:i,height:r,$:s}=he(t);let o=(s?pt(n.width):n.width)/i,a=(s?pt(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const mn=Y(0);function ge(e){const t=I(e);return!zt()||!t.visualViewport?mn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==I(e)?!1:t}function ot(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=Kt(e);let o=Y(1);t&&(i?V(i)&&(o=at(i)):o=at(e));const a=wn(s,n,i)?ge(s):Y(0);let c=(r.left+a.x)/o.x,l=(r.top+a.y)/o.y,d=r.width/o.x,u=r.height/o.y;if(s){const h=I(s),f=i&&V(i)?I(i):i;let m=h,w=Mt(m);for(;w&&i&&f!==m;){const y=at(w),p=w.getBoundingClientRect(),b=z(w),x=p.left+(w.clientLeft+parseFloat(b.paddingLeft))*y.x,v=p.top+(w.clientTop+parseFloat(b.paddingTop))*y.y;c*=y.x,l*=y.y,d*=y.x,u*=y.y,c+=x,l+=v,m=I(w),w=Mt(m)}}return xt({width:d,height:u,x:c,y:l})}function Et(e,t){const n=Ft(e).scrollLeft;return t?t.left+n:ot(j(e)).left+n}function me(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-Et(e,n),r=n.top+t.scrollTop;return{x:i,y:r}}function yn(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e;const s=r==="fixed",o=j(i),a=t?Ct(t.floating):!1;if(i===o||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=Y(1);const d=Y(0),u=U(i);if((u||!u&&!s)&&((ut(i)!=="body"||wt(o))&&(c=Ft(i)),U(i))){const f=ot(i);l=at(i),d.x=f.x+i.clientLeft,d.y=f.y+i.clientTop}const h=o&&!u&&!s?me(o,c):Y(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+h.x,y:n.y*l.y-c.scrollTop*l.y+d.y+h.y}}function pn(e){return Array.from(e.getClientRects())}function vn(e){const t=j(e),n=Ft(e),i=e.ownerDocument.body,r=k(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=k(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+Et(e);const a=-n.scrollTop;return z(i).direction==="rtl"&&(o+=k(t.clientWidth,i.clientWidth)-r),{width:r,height:s,x:o,y:a}}const ne=25;function xn(e,t){const n=I(e),i=j(e),r=n.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,c=0;if(r){s=r.width,o=r.height;const d=zt();(!d||d&&t==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}const l=Et(i);if(l<=0){const d=i.ownerDocument,u=d.body,h=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(i.clientWidth-u.clientWidth-f);m<=ne&&(s-=m)}else l<=ne&&(s+=l);return{width:s,height:o,x:a,y:c}}const bn=new Set(["absolute","fixed"]);function On(e,t){const n=ot(e,!0,t==="fixed"),i=n.top+e.clientTop,r=n.left+e.clientLeft,s=U(e)?at(e):Y(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,c=r*s.x,l=i*s.y;return{width:o,height:a,x:c,y:l}}function ie(e,t,n){let i;if(t==="viewport")i=xn(e,n);else if(t==="document")i=vn(j(e));else if(V(t))i=On(t,n);else{const r=ge(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return xt(i)}function we(e,t){const n=it(e);return n===t||!V(n)||ct(n)?!1:z(n).position==="fixed"||we(n,t)}function An(e,t){const n=t.get(e);if(n)return n;let i=ft(e,[],!1).filter(a=>V(a)&&ut(a)!=="body"),r=null;const s=z(e).position==="fixed";let o=s?it(e):e;for(;V(o)&&!ct(o);){const a=z(o),c=Vt(o);!c&&a.position==="fixed"&&(r=null),(s?!c&&!r:!c&&a.position==="static"&&!!r&&bn.has(r.position)||wt(o)&&!c&&we(e,o))?i=i.filter(d=>d!==o):r=a,o=it(o)}return t.set(e,i),i}function Sn(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e;const o=[...n==="clippingAncestors"?Ct(t)?[]:An(t,this._c):[].concat(n),i],a=o[0],c=o.reduce((l,d)=>{const u=ie(t,d,r);return l.top=k(u.top,l.top),l.right=nt(u.right,l.right),l.bottom=nt(u.bottom,l.bottom),l.left=k(u.left,l.left),l},ie(t,a,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Pn(e){const{width:t,height:n}=he(e);return{width:t,height:n}}function Cn(e,t,n){const i=U(t),r=j(t),s=n==="fixed",o=ot(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Y(0);function l(){c.x=Et(r)}if(i||!i&&!s)if((ut(t)!=="body"||wt(r))&&(a=Ft(t)),i){const f=ot(t,!0,s,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else r&&l();s&&!i&&r&&l();const d=r&&!i&&!s?me(r,a):Y(0),u=o.left+a.scrollLeft-c.x-d.x,h=o.top+a.scrollTop-c.y-d.y;return{x:u,y:h,width:o.width,height:o.height}}function Bt(e){return z(e).position==="static"}function re(e,t){if(!U(e)||z(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return j(e)===n&&(n=n.ownerDocument.body),n}function ye(e,t){const n=I(e);if(Ct(e))return n;if(!U(e)){let r=it(e);for(;r&&!ct(r);){if(V(r)&&!Bt(r))return r;r=it(r)}return n}let i=re(e,t);for(;i&&cn(i)&&Bt(i);)i=re(i,t);return i&&ct(i)&&Bt(i)&&!Vt(i)?n:i||hn(e)||n}const Fn=async function(e){const t=this.getOffsetParent||ye,n=this.getDimensions,i=await n(e.floating);return{reference:Cn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function En(e){return z(e).direction==="rtl"}const Rn={convertOffsetParentRelativeRectToViewportRelativeRect:yn,getDocumentElement:j,getClippingRect:Sn,getOffsetParent:ye,getElementRects:Fn,getClientRects:pn,getDimensions:Pn,getScale:at,isElement:V,isRTL:En};function pe(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Dn(e,t){let n=null,i;const r=j(e);function s(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:d,top:u,width:h,height:f}=l;if(a||t(),!h||!f)return;const m=yt(u),w=yt(r.clientWidth-(d+h)),y=yt(r.clientHeight-(u+f)),p=yt(d),x={rootMargin:-m+"px "+-w+"px "+-y+"px "+-p+"px",threshold:k(0,nt(1,c))||1};let v=!0;function S(P){const F=P[0].intersectionRatio;if(F!==c){if(!v)return o();F?o(!1,F):i=setTimeout(()=>{o(!1,1e-7)},1e3)}F===1&&!pe(l,e.getBoundingClientRect())&&o(),v=!1}try{n=new IntersectionObserver(S,{...x,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return o(!0),s}function Bn(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=i,l=Kt(e),d=r||s?[...l?ft(l):[],...ft(t)]:[];d.forEach(p=>{r&&p.addEventListener("scroll",n,{passive:!0}),s&&p.addEventListener("resize",n)});const u=l&&a?Dn(l,n):null;let h=-1,f=null;o&&(f=new ResizeObserver(p=>{let[b]=p;b&&b.target===l&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),l&&!c&&f.observe(l),f.observe(t));let m,w=c?ot(e):null;c&&y();function y(){const p=ot(e);w&&!pe(w,p)&&n(),w=p,m=requestAnimationFrame(y)}return n(),()=>{var p;d.forEach(b=>{r&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),u?.(),(p=f)==null||p.disconnect(),f=null,c&&cancelAnimationFrame(m)}}const Tn=en,Wn=nn,Mn=Ge,Ln=on,kn=$e,In=Qe,Hn=rn,_n=(e,t,n)=>{const i=new Map,r={platform:Rn,...n},s={...r.platform,_c:i};return Je(e,t,{...r,platform:s})};function rt(e){return typeof e=="function"?e():e}function ve(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oe(e,t){const n=ve(e);return Math.round(t*n)/n}function ei(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function Nn(e){const t=e.whileElementsMounted,n=A(()=>rt(e.open)??!0),i=A(()=>rt(e.middleware)),r=A(()=>rt(e.transform)??!0),s=A(()=>rt(e.placement)??"bottom"),o=A(()=>rt(e.strategy)??"absolute"),a=A(()=>rt(e.sideOffset)??0),c=A(()=>rt(e.alignOffset)??0),l=e.reference;let d=N(0),u=N(0);const h=$(null);let f=N(Rt(g(o))),m=N(Rt(g(s))),w=N(Rt({})),y=N(!1),p=!1;const b=A(()=>{const E=h.current?oe(h.current,g(d)):g(d),D=h.current?oe(h.current,g(u)):g(u);return g(r)?{position:g(f),left:"0",top:"0",transform:`translate(${E}px, ${D}px)`,...h.current&&ve(h.current)>=1.5&&{willChange:"transform"}}:{position:g(f),left:`${E}px`,top:`${D}px`}});let x;function v(){l.current===null||h.current===null||_n(l.current,h.current,{middleware:g(i),placement:g(s),strategy:g(o)}).then(E=>{const D=l.current;if(Vn(D)){C(w,{...g(w),hide:{...g(w).hide,referenceHidden:!0}},!0);return}if(!g(n)&&g(d)!==0&&g(u)!==0){const T=Math.max(Math.abs(g(a)),Math.abs(g(c)),15);if(E.x<=T&&E.y<=T)return}C(d,E.x,!0),C(u,E.y,!0),C(f,E.strategy,!0),C(m,E.placement,!0),C(w,E.middlewareData,!0),C(y,!0)})}function S(){typeof x=="function"&&(x(),x=void 0)}function P(){if(S(),t===void 0){v();return}g(n)&&(l.current===null||h.current===null||(x=t(l.current,h.current,v)))}function F(){g(n)||C(y,!1)}function W(){return[g(i),g(s),g(o),g(a),g(c),g(n)]}return G(()=>{t===void 0&&g(n)&&v()}),G(P),G(()=>{if(t!==void 0){if(W(),!g(n)){p=!1;return}if(!g(y)){p=!1;return}if(!p){p=!0;return}v()}}),G(F),G(()=>S),{floating:h,reference:l,get strategy(){return g(f)},get placement(){return g(m)},get middlewareData(){return g(w)},get isPositioned(){return g(y)},get floatingStyles(){return g(b)},get update(){return v}}}function Vn(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}const zn={top:"bottom",right:"left",bottom:"top",left:"right"},Xt=new It("Floating.Root"),se=new It("Floating.Content"),Yt=new It("Floating.Root");class bt{static create(t=!1){return t?Yt.set(new bt):Xt.set(new bt)}anchorNode=$(null);customAnchorNode=$(null);triggerNode=$(null);constructor(){G(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class Ot{static create(t,n=!1){return n?se.set(new Ot(t,Yt.get())):se.set(new Ot(t,Xt.get()))}opts;root;contentRef=$(null);wrapperRef=$(null);arrowRef=$(null);contentAttachment=Dt(this.contentRef);wrapperAttachment=Dt(this.wrapperRef);arrowAttachment=Dt(this.arrowRef);arrowId=$(ae());#t=A(()=>{if(typeof this.opts.style=="string")return Ee(this.opts.style);if(!this.opts.style)return{}});#n=void 0;#i=new Ie(()=>this.arrowRef.current??void 0);#o=A(()=>this.#i?.width??0);#e=A(()=>this.#i?.height??0);#a=A(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#s=A(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#r=A(()=>g(this.#s).length>0);get hasExplicitBoundaries(){return g(this.#r)}set hasExplicitBoundaries(t){C(this.#r,t)}#c=A(()=>({padding:this.opts.collisionPadding.current,boundary:g(this.#s).filter(Re),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return g(this.#c)}set detectOverflowOptions(t){C(this.#c,t)}#l=N(void 0);#u=N(void 0);#f=N(void 0);#d=N(void 0);#h=A(()=>[Tn({mainAxis:this.opts.sideOffset.current+g(this.#e),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&Wn({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?Hn():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&Mn({...this.detectOverflowOptions}),Ln({...this.detectOverflowOptions,apply:({rects:t,availableWidth:n,availableHeight:i})=>{const{width:r,height:s}=t.reference;C(this.#l,n,!0),C(this.#u,i,!0),C(this.#f,r,!0),C(this.#d,s,!0)}}),this.arrowRef.current&&In({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),Kn({arrowWidth:g(this.#o),arrowHeight:g(this.#e)}),this.opts.hideWhenDetached.current&&kn({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return g(this.#h)}set middleware(t){C(this.#h,t)}floating;#g=A(()=>Xn(this.floating.placement));get placedSide(){return g(this.#g)}set placedSide(t){C(this.#g,t)}#m=A(()=>Yn(this.floating.placement));get placedAlign(){return g(this.#m)}set placedAlign(t){C(this.#m,t)}#w=A(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return g(this.#w)}set arrowX(t){C(this.#w,t)}#y=A(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return g(this.#y)}set arrowY(t){C(this.#y,t)}#p=A(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return g(this.#p)}set cannotCenterArrow(t){C(this.#p,t)}#v=N();get contentZIndex(){return g(this.#v)}set contentZIndex(t){C(this.#v,t,!0)}#x=A(()=>zn[this.placedSide]);get arrowBaseSide(){return g(this.#x)}set arrowBaseSide(t){C(this.#x,t)}#b=A(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${g(this.#l)}px`,"--bits-floating-available-height":`${g(this.#u)}px`,"--bits-floating-anchor-width":`${g(this.#f)}px`,"--bits-floating-anchor-height":`${g(this.#d)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...g(this.#t)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return g(this.#b)}set wrapperProps(t){C(this.#b,t)}#O=A(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:De({...g(this.#t)}),...this.contentAttachment}));get props(){return g(this.#O)}set props(t){C(this.#O,t)}#A=A(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return g(this.#A)}set arrowStyle(t){C(this.#A,t)}constructor(t,n){this.opts=t,this.root=n,this.#n=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),jt(()=>t.customAnchor.current,i=>{this.root.customAnchorNode.current=i}),this.floating=Nn({strategy:()=>this.opts.strategy.current,placement:()=>g(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...i)=>Bn(...i,{animationFrame:this.#n?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),G(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),jt(()=>this.contentRef.current,i=>{if(!i||!this.opts.enabled.current)return;const r=Be(i),s=r.requestAnimationFrame(()=>{if(this.contentRef.current!==i||!this.opts.enabled.current)return;const o=r.getComputedStyle(i).zIndex;o!==this.contentZIndex&&(this.contentZIndex=o)});return()=>{r.cancelAnimationFrame(s)}}),G(()=>{this.floating.floating.current=this.wrapperRef.current})}}class At{static create(t,n=!1){return n?new At(t,Yt.get()):new At(t,Xt.get())}opts;root;constructor(t,n){this.opts=t,this.root=n,t.virtualEl&&t.virtualEl.current?n.triggerNode=Fe(t.virtualEl.current):n.triggerNode=t.ref}}function Kn(e){return{name:"transformOrigin",options:e,fn(t){const{placement:n,rects:i,middlewareData:r}=t,o=r.arrow?.centerOffset!==0,a=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[l,d]=Ut(n),u={start:"0%",center:"50%",end:"100%"}[d],h=(r.arrow?.x??0)+a/2,f=(r.arrow?.y??0)+c/2;let m="",w="";return l==="bottom"?(m=o?u:`${h}px`,w=`${-c}px`):l==="top"?(m=o?u:`${h}px`,w=`${i.floating.height+c}px`):l==="right"?(m=`${-c}px`,w=o?u:`${f}px`):l==="left"&&(m=`${i.floating.width+c}px`,w=o?u:`${f}px`),{data:{x:m,y:w}}}}}function Ut(e){const[t,n="center"]=e.split("-");return[t,n]}function Xn(e){return Ut(e)[0]}function Yn(e){return Ut(e)[1]}function ni(e,t){dt(t,!0);let n=O(t,"tooltip",3,!1);bt.create(n());var i=st(),r=et(i);mt(r,()=>t.children??ht),tt(e,i),gt()}function ii(e,t){dt(t,!0);let n=O(t,"tooltip",3,!1);At.create({id:R(()=>t.id),virtualEl:R(()=>t.virtualEl),ref:t.ref},n());var i=st(),r=et(i);mt(r,()=>t.children??ht),tt(e,i),gt()}function Un(e,t){dt(t,!0);let n=O(t,"side",3,"bottom"),i=O(t,"sideOffset",3,0),r=O(t,"align",3,"center"),s=O(t,"alignOffset",3,0),o=O(t,"arrowPadding",3,0),a=O(t,"avoidCollisions",3,!0),c=O(t,"collisionBoundary",19,()=>[]),l=O(t,"collisionPadding",3,0),d=O(t,"hideWhenDetached",3,!1),u=O(t,"onPlaced",3,()=>{}),h=O(t,"sticky",3,"partial"),f=O(t,"updatePositionStrategy",3,"optimized"),m=O(t,"strategy",3,"fixed"),w=O(t,"dir",3,"ltr"),y=O(t,"style",19,()=>({})),p=O(t,"wrapperId",19,ae),b=O(t,"customAnchor",3,null),x=O(t,"tooltip",3,!1);const v=Ot.create({side:R(()=>n()),sideOffset:R(()=>i()),align:R(()=>r()),alignOffset:R(()=>s()),id:R(()=>t.id),arrowPadding:R(()=>o()),avoidCollisions:R(()=>a()),collisionBoundary:R(()=>c()),collisionPadding:R(()=>l()),hideWhenDetached:R(()=>d()),onPlaced:R(()=>u()),sticky:R(()=>h()),updatePositionStrategy:R(()=>f()),strategy:R(()=>m()),dir:R(()=>w()),style:R(()=>y()),enabled:R(()=>t.enabled),wrapperId:R(()=>p()),customAnchor:R(()=>b())},x()),S=A(()=>ce(v.wrapperProps,{style:{pointerEvents:"auto"}}));var P=st(),F=et(P);mt(F,()=>t.content??ht,()=>({props:v.props,wrapperProps:g(S)})),tt(e,P),gt()}function jn(e,t){dt(t,!0),Se(()=>{t.onPlaced?.()});var n=st(),i=et(n);mt(i,()=>t.content??ht,()=>({props:{},wrapperProps:{}})),tt(e,n),gt()}function qn(e,t){let n=O(t,"isStatic",3,!1),i=St(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var r=st(),s=et(r);{var o=c=>{jn(c,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},a=c=>{Un(c,kt({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>i))};Lt(s,c=>{n()?c(o):c(a,!1)})}tt(e,r)}var Zn=Ae("<!> <!>",1);function xe(e,t){dt(t,!0);let n=O(t,"interactOutsideBehavior",3,"close"),i=O(t,"trapFocus",3,!0),r=O(t,"isValidEvent",3,()=>!1),s=O(t,"customAnchor",3,null),o=O(t,"isStatic",3,!1),a=O(t,"tooltip",3,!1),c=O(t,"contentPointerEvents",3,"auto"),l=St(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);qn(e,{get isStatic(){return o()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get enabled(){return t.enabled},get tooltip(){return a()},content:(u,h)=>{let f=()=>h?.().props,m=()=>h?.().wrapperProps;var w=Zn(),y=et(w);{var p=v=>{qt(v,{get preventScroll(){return t.preventScroll}})},b=v=>{qt(v,{get preventScroll(){return t.preventScroll}})};Lt(y,v=>{t.forceMount&&t.enabled?v(p):t.forceMount||v(b,1)})}var x=Pe(y,2);Te(x,{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return i()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(S,P)=>{let F=()=>P?.().props;We(S,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(W,E)=>{Me(W,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return r()},get enabled(){return t.enabled},get ref(){return t.ref},children:(_,T)=>{let K=()=>T?.().props;Le(_,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(B,J)=>{var H=st(),M=et(H);{let L=A(()=>({props:ce(l,f(),K(),F(),{style:{pointerEvents:c()}}),wrapperProps:m()}));mt(M,()=>t.popper??ht,()=>g(L))}tt(B,H)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),tt(u,w)},$$slots:{content:!0}}),gt()}function ri(e,t){let n=O(t,"interactOutsideBehavior",3,"close"),i=O(t,"trapFocus",3,!0),r=O(t,"isValidEvent",3,()=>!1),s=O(t,"customAnchor",3,null),o=O(t,"isStatic",3,!1),a=St(t,["$$slots","$$events","$$legacy","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var c=st(),l=et(c);{var d=u=>{xe(u,kt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get isStatic(){return o()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return i()},get isValidEvent(){return r()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>a))};Lt(l,u=>{t.shouldRender&&u(d)})}tt(e,c)}function oi(e,t){let n=O(t,"interactOutsideBehavior",3,"close"),i=O(t,"trapFocus",3,!0),r=O(t,"isValidEvent",3,()=>!1),s=O(t,"customAnchor",3,null),o=O(t,"isStatic",3,!1),a=St(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);xe(e,kt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return i()},get isValidEvent(){return r()},get onFocusOutside(){return t.onFocusOutside}},()=>a,{forceMount:!0}))}export{ni as F,oi as P,ri as a,ii as b,ei as g};
1
+ import{k as Oe,c as st,a as tt,f as Ae}from"./CjKjQEMp.js";import{V as A,y as g,z as N,S as Rt,D as G,x as C,p as dt,f as et,bd as ht,n as gt,_ as Se,q as Pe}from"./D-tW7Byc.js";import{e as mt}from"./ByFfmBEu.js";import{p as O,i as Lt,s as kt,r as St}from"./EhE2EcYu.js";import{d as Ce,s as $,C as It,c as Fe,e as Dt,u as ae,f as Ee,i as Re,g as De,w as jt,h as Be,j as R,m as ce,F as Te,S as qt,E as We,D as Me,T as Le}from"./BkE6vniY.js";function ke(e){return typeof e=="function"}function Zt(e){return ke(e)?e():e}class Ie{#t={width:0,height:0};#n=!1;#i;#o;#e;#a=A(()=>(g(this.#r)?.(),this.getSize().width));#s=A(()=>(g(this.#r)?.(),this.getSize().height));#r=A(()=>{const t=Zt(this.#o);if(t)return Oe(n=>{if(!this.#e)return;const i=new this.#e.ResizeObserver(r=>{this.#n=!0;for(const s of r){const o=this.#i.box==="content-box"?s.contentBoxSize:s.borderBoxSize,a=Array.isArray(o)?o:[o];this.#t.width=a.reduce((c,l)=>Math.max(c,l.inlineSize),0),this.#t.height=a.reduce((c,l)=>Math.max(c,l.blockSize),0)}n()});return i.observe(t),()=>{this.#n=!1,i.disconnect()}})});constructor(t,n={box:"border-box"}){this.#e=n.window??Ce,this.#i=n,this.#o=t,this.#t={width:0,height:0}}calculateSize(){const t=Zt(this.#o);if(!t||!this.#e)return;const n=t.offsetWidth,i=t.offsetHeight;if(this.#i.box==="border-box")return{width:n,height:i};const r=this.#e.getComputedStyle(t),s=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),o=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),a=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),c=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),l=n-s-a,d=i-o-c;return{width:l,height:d}}getSize(){return this.#n?this.#t:this.calculateSize()??this.#t}get current(){return g(this.#r)?.(),this.getSize()}get width(){return g(this.#a)}get height(){return g(this.#s)}}const He=["top","right","bottom","left"],nt=Math.min,k=Math.max,pt=Math.round,yt=Math.floor,Y=e=>({x:e,y:e}),_e={left:"right",right:"left",bottom:"top",top:"bottom"},Ne={start:"end",end:"start"};function Tt(e,t,n){return k(e,nt(t,n))}function q(e,t){return typeof e=="function"?e(t):e}function Z(e){return e.split("-")[0]}function lt(e){return e.split("-")[1]}function Ht(e){return e==="x"?"y":"x"}function _t(e){return e==="y"?"height":"width"}const Ve=new Set(["top","bottom"]);function X(e){return Ve.has(Z(e))?"y":"x"}function Nt(e){return Ht(X(e))}function ze(e,t,n){n===void 0&&(n=!1);const i=lt(e),r=Nt(e),s=_t(r);let o=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=vt(o)),[o,vt(o)]}function Ke(e){const t=vt(e);return[Wt(e),t,Wt(t)]}function Wt(e){return e.replace(/start|end/g,t=>Ne[t])}const Jt=["left","right"],Qt=["right","left"],Xe=["top","bottom"],Ye=["bottom","top"];function Ue(e,t,n){switch(e){case"top":case"bottom":return n?t?Qt:Jt:t?Jt:Qt;case"left":case"right":return t?Xe:Ye;default:return[]}}function je(e,t,n,i){const r=lt(e);let s=Ue(Z(e),n==="start",i);return r&&(s=s.map(o=>o+"-"+r),t&&(s=s.concat(s.map(Wt)))),s}function vt(e){return e.replace(/left|right|bottom|top/g,t=>_e[t])}function qe(e){return{top:0,right:0,bottom:0,left:0,...e}}function le(e){return typeof e!="number"?qe(e):{top:e,right:e,bottom:e,left:e}}function xt(e){const{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function Gt(e,t,n){let{reference:i,floating:r}=e;const s=X(t),o=Nt(t),a=_t(o),c=Z(t),l=s==="y",d=i.x+i.width/2-r.width/2,u=i.y+i.height/2-r.height/2,h=i[a]/2-r[a]/2;let f;switch(c){case"top":f={x:d,y:i.y-r.height};break;case"bottom":f={x:d,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:u};break;case"left":f={x:i.x-r.width,y:u};break;default:f={x:i.x,y:i.y}}switch(lt(t)){case"start":f[o]-=h*(n&&l?-1:1);break;case"end":f[o]+=h*(n&&l?-1:1);break}return f}async function Ze(e,t){var n;t===void 0&&(t={});const{x:i,y:r,platform:s,rects:o,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:f=0}=q(t,e),m=le(f),y=a[h?u==="floating"?"reference":"floating":u],p=xt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),b=u==="floating"?{x:i,y:r,width:o.floating.width,height:o.floating.height}:o.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),v=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},S=xt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:c}):b);return{top:(p.top-S.top+m.top)/v.y,bottom:(S.bottom-p.bottom+m.bottom)/v.y,left:(p.left-S.left+m.left)/v.x,right:(S.right-p.right+m.right)/v.x}}const Je=async(e,t,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let l=await o.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:u}=Gt(l,i,c),h=i,f={},m=0;for(let y=0;y<a.length;y++){var w;const{name:p,fn:b}=a[y],{x,y:v,data:S,reset:P}=await b({x:d,y:u,initialPlacement:i,placement:h,strategy:r,middlewareData:f,rects:l,platform:{...o,detectOverflow:(w=o.detectOverflow)!=null?w:Ze},elements:{reference:e,floating:t}});d=x??d,u=v??u,f={...f,[p]:{...f[p],...S}},P&&m<=50&&(m++,typeof P=="object"&&(P.placement&&(h=P.placement),P.rects&&(l=P.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:r}):P.rects),{x:d,y:u}=Gt(l,h,c)),y=-1)}return{x:d,y:u,placement:h,strategy:r,middlewareData:f}},Qe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:r,rects:s,platform:o,elements:a,middlewareData:c}=t,{element:l,padding:d=0}=q(e,t)||{};if(l==null)return{};const u=le(d),h={x:n,y:i},f=Nt(r),m=_t(f),w=await o.getDimensions(l),y=f==="y",p=y?"top":"left",b=y?"bottom":"right",x=y?"clientHeight":"clientWidth",v=s.reference[m]+s.reference[f]-h[f]-s.floating[m],S=h[f]-s.reference[f],P=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let F=P?P[x]:0;(!F||!await(o.isElement==null?void 0:o.isElement(P)))&&(F=a.floating[x]||s.floating[m]);const W=v/2-S/2,E=F/2-w[m]/2-1,D=nt(u[p],E),_=nt(u[b],E),T=D,K=F-w[m]-_,B=F/2-w[m]/2+W,J=Tt(T,B,K),H=!c.arrow&&lt(r)!=null&&B!==J&&s.reference[m]/2-(B<T?D:_)-w[m]/2<0,M=H?B<T?B-T:B-K:0;return{[f]:h[f]+M,data:{[f]:J,centerOffset:B-J-M,...H&&{alignmentOffset:M}},reset:H}}}),Ge=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:r,middlewareData:s,rects:o,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:w=!0,...y}=q(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const p=Z(r),b=X(a),x=Z(a)===a,v=await(c.isRTL==null?void 0:c.isRTL(l.floating)),S=h||(x||!w?[vt(a)]:Ke(a)),P=m!=="none";!h&&P&&S.push(...je(a,w,m,v));const F=[a,...S],W=await c.detectOverflow(t,y),E=[];let D=((i=s.flip)==null?void 0:i.overflows)||[];if(d&&E.push(W[p]),u){const B=ze(r,o,v);E.push(W[B[0]],W[B[1]])}if(D=[...D,{placement:r,overflows:E}],!E.every(B=>B<=0)){var _,T;const B=(((_=s.flip)==null?void 0:_.index)||0)+1,J=F[B];if(J&&(!(u==="alignment"?b!==X(J):!1)||D.every(L=>X(L.placement)===b?L.overflows[0]>0:!0)))return{data:{index:B,overflows:D},reset:{placement:J}};let H=(T=D.filter(M=>M.overflows[0]<=0).sort((M,L)=>M.overflows[1]-L.overflows[1])[0])==null?void 0:T.placement;if(!H)switch(f){case"bestFit":{var K;const M=(K=D.filter(L=>{if(P){const Q=X(L.placement);return Q===b||Q==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(Q=>Q>0).reduce((Q,be)=>Q+be,0)]).sort((L,Q)=>L[1]-Q[1])[0])==null?void 0:K[0];M&&(H=M);break}case"initialPlacement":H=a;break}if(r!==H)return{reset:{placement:H}}}return{}}}};function $t(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function te(e){return He.some(t=>e[t]>=0)}const $e=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:i}=t,{strategy:r="referenceHidden",...s}=q(e,t);switch(r){case"referenceHidden":{const o=await i.detectOverflow(t,{...s,elementContext:"reference"}),a=$t(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:te(a)}}}case"escaped":{const o=await i.detectOverflow(t,{...s,altBoundary:!0}),a=$t(o,n.floating);return{data:{escapedOffsets:a,escaped:te(a)}}}default:return{}}}}},ue=new Set(["left","top"]);async function tn(e,t){const{placement:n,platform:i,elements:r}=e,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Z(n),a=lt(n),c=X(n)==="y",l=ue.has(o)?-1:1,d=s&&c?-1:1,u=q(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof m=="number"&&(f=a==="end"?m*-1:m),c?{x:f*d,y:h*l}:{x:h*l,y:f*d}}const en=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:r,y:s,placement:o,middlewareData:a}=t,c=await tn(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:r+c.x,y:s+c.y,data:{...c,placement:o}}}}},nn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:r,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:c={fn:p=>{let{x:b,y:x}=p;return{x:b,y:x}}},...l}=q(e,t),d={x:n,y:i},u=await s.detectOverflow(t,l),h=X(Z(r)),f=Ht(h);let m=d[f],w=d[h];if(o){const p=f==="y"?"top":"left",b=f==="y"?"bottom":"right",x=m+u[p],v=m-u[b];m=Tt(x,m,v)}if(a){const p=h==="y"?"top":"left",b=h==="y"?"bottom":"right",x=w+u[p],v=w-u[b];w=Tt(x,w,v)}const y=c.fn({...t,[f]:m,[h]:w});return{...y,data:{x:y.x-n,y:y.y-i,enabled:{[f]:o,[h]:a}}}}}},rn=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:r,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=q(e,t),d={x:n,y:i},u=X(r),h=Ht(u);let f=d[h],m=d[u];const w=q(a,t),y=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const x=h==="y"?"height":"width",v=s.reference[h]-s.floating[x]+y.mainAxis,S=s.reference[h]+s.reference[x]-y.mainAxis;f<v?f=v:f>S&&(f=S)}if(l){var p,b;const x=h==="y"?"width":"height",v=ue.has(Z(r)),S=s.reference[u]-s.floating[x]+(v&&((p=o.offset)==null?void 0:p[u])||0)+(v?0:y.crossAxis),P=s.reference[u]+s.reference[x]+(v?0:((b=o.offset)==null?void 0:b[u])||0)-(v?y.crossAxis:0);m<S?m=S:m>P&&(m=P)}return{[h]:f,[u]:m}}}},on=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:r,rects:s,platform:o,elements:a}=t,{apply:c=()=>{},...l}=q(e,t),d=await o.detectOverflow(t,l),u=Z(r),h=lt(r),f=X(r)==="y",{width:m,height:w}=s.floating;let y,p;u==="top"||u==="bottom"?(y=u,p=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(p=u,y=h==="end"?"top":"bottom");const b=w-d.top-d.bottom,x=m-d.left-d.right,v=nt(w-d[y],b),S=nt(m-d[p],x),P=!t.middlewareData.shift;let F=v,W=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(W=x),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(F=b),P&&!h){const D=k(d.left,0),_=k(d.right,0),T=k(d.top,0),K=k(d.bottom,0);f?W=m-2*(D!==0||_!==0?D+_:k(d.left,d.right)):F=w-2*(T!==0||K!==0?T+K:k(d.top,d.bottom))}await c({...t,availableWidth:W,availableHeight:F});const E=await o.getDimensions(a.floating);return m!==E.width||w!==E.height?{reset:{rects:!0}}:{}}}};function Pt(){return typeof window<"u"}function ut(e){return fe(e)?(e.nodeName||"").toLowerCase():"#document"}function I(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function j(e){var t;return(t=(fe(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fe(e){return Pt()?e instanceof Node||e instanceof I(e).Node:!1}function V(e){return Pt()?e instanceof Element||e instanceof I(e).Element:!1}function U(e){return Pt()?e instanceof HTMLElement||e instanceof I(e).HTMLElement:!1}function ee(e){return!Pt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof I(e).ShadowRoot}const sn=new Set(["inline","contents"]);function wt(e){const{overflow:t,overflowX:n,overflowY:i,display:r}=z(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!sn.has(r)}const an=new Set(["table","td","th"]);function cn(e){return an.has(ut(e))}const ln=[":popover-open",":modal"];function Ct(e){return ln.some(t=>{try{return e.matches(t)}catch{return!1}})}const un=["transform","translate","scale","rotate","perspective"],fn=["transform","translate","scale","rotate","perspective","filter"],dn=["paint","layout","strict","content"];function Vt(e){const t=zt(),n=V(e)?z(e):e;return un.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||fn.some(i=>(n.willChange||"").includes(i))||dn.some(i=>(n.contain||"").includes(i))}function hn(e){let t=it(e);for(;U(t)&&!ct(t);){if(Vt(t))return t;if(Ct(t))return null;t=it(t)}return null}function zt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const gn=new Set(["html","body","#document"]);function ct(e){return gn.has(ut(e))}function z(e){return I(e).getComputedStyle(e)}function Ft(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function it(e){if(ut(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ee(e)&&e.host||j(e);return ee(t)?t.host:t}function de(e){const t=it(e);return ct(t)?e.ownerDocument?e.ownerDocument.body:e.body:U(t)&&wt(t)?t:de(t)}function ft(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=de(e),s=r===((i=e.ownerDocument)==null?void 0:i.body),o=I(r);if(s){const a=Mt(o);return t.concat(o,o.visualViewport||[],wt(r)?r:[],a&&n?ft(a):[])}return t.concat(r,ft(r,[],n))}function Mt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function he(e){const t=z(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const r=U(e),s=r?e.offsetWidth:n,o=r?e.offsetHeight:i,a=pt(n)!==s||pt(i)!==o;return a&&(n=s,i=o),{width:n,height:i,$:a}}function Kt(e){return V(e)?e:e.contextElement}function at(e){const t=Kt(e);if(!U(t))return Y(1);const n=t.getBoundingClientRect(),{width:i,height:r,$:s}=he(t);let o=(s?pt(n.width):n.width)/i,a=(s?pt(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const mn=Y(0);function ge(e){const t=I(e);return!zt()||!t.visualViewport?mn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==I(e)?!1:t}function ot(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=Kt(e);let o=Y(1);t&&(i?V(i)&&(o=at(i)):o=at(e));const a=wn(s,n,i)?ge(s):Y(0);let c=(r.left+a.x)/o.x,l=(r.top+a.y)/o.y,d=r.width/o.x,u=r.height/o.y;if(s){const h=I(s),f=i&&V(i)?I(i):i;let m=h,w=Mt(m);for(;w&&i&&f!==m;){const y=at(w),p=w.getBoundingClientRect(),b=z(w),x=p.left+(w.clientLeft+parseFloat(b.paddingLeft))*y.x,v=p.top+(w.clientTop+parseFloat(b.paddingTop))*y.y;c*=y.x,l*=y.y,d*=y.x,u*=y.y,c+=x,l+=v,m=I(w),w=Mt(m)}}return xt({width:d,height:u,x:c,y:l})}function Et(e,t){const n=Ft(e).scrollLeft;return t?t.left+n:ot(j(e)).left+n}function me(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-Et(e,n),r=n.top+t.scrollTop;return{x:i,y:r}}function yn(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e;const s=r==="fixed",o=j(i),a=t?Ct(t.floating):!1;if(i===o||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=Y(1);const d=Y(0),u=U(i);if((u||!u&&!s)&&((ut(i)!=="body"||wt(o))&&(c=Ft(i)),U(i))){const f=ot(i);l=at(i),d.x=f.x+i.clientLeft,d.y=f.y+i.clientTop}const h=o&&!u&&!s?me(o,c):Y(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+h.x,y:n.y*l.y-c.scrollTop*l.y+d.y+h.y}}function pn(e){return Array.from(e.getClientRects())}function vn(e){const t=j(e),n=Ft(e),i=e.ownerDocument.body,r=k(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=k(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+Et(e);const a=-n.scrollTop;return z(i).direction==="rtl"&&(o+=k(t.clientWidth,i.clientWidth)-r),{width:r,height:s,x:o,y:a}}const ne=25;function xn(e,t){const n=I(e),i=j(e),r=n.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,c=0;if(r){s=r.width,o=r.height;const d=zt();(!d||d&&t==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}const l=Et(i);if(l<=0){const d=i.ownerDocument,u=d.body,h=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(i.clientWidth-u.clientWidth-f);m<=ne&&(s-=m)}else l<=ne&&(s+=l);return{width:s,height:o,x:a,y:c}}const bn=new Set(["absolute","fixed"]);function On(e,t){const n=ot(e,!0,t==="fixed"),i=n.top+e.clientTop,r=n.left+e.clientLeft,s=U(e)?at(e):Y(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,c=r*s.x,l=i*s.y;return{width:o,height:a,x:c,y:l}}function ie(e,t,n){let i;if(t==="viewport")i=xn(e,n);else if(t==="document")i=vn(j(e));else if(V(t))i=On(t,n);else{const r=ge(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return xt(i)}function we(e,t){const n=it(e);return n===t||!V(n)||ct(n)?!1:z(n).position==="fixed"||we(n,t)}function An(e,t){const n=t.get(e);if(n)return n;let i=ft(e,[],!1).filter(a=>V(a)&&ut(a)!=="body"),r=null;const s=z(e).position==="fixed";let o=s?it(e):e;for(;V(o)&&!ct(o);){const a=z(o),c=Vt(o);!c&&a.position==="fixed"&&(r=null),(s?!c&&!r:!c&&a.position==="static"&&!!r&&bn.has(r.position)||wt(o)&&!c&&we(e,o))?i=i.filter(d=>d!==o):r=a,o=it(o)}return t.set(e,i),i}function Sn(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e;const o=[...n==="clippingAncestors"?Ct(t)?[]:An(t,this._c):[].concat(n),i],a=o[0],c=o.reduce((l,d)=>{const u=ie(t,d,r);return l.top=k(u.top,l.top),l.right=nt(u.right,l.right),l.bottom=nt(u.bottom,l.bottom),l.left=k(u.left,l.left),l},ie(t,a,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Pn(e){const{width:t,height:n}=he(e);return{width:t,height:n}}function Cn(e,t,n){const i=U(t),r=j(t),s=n==="fixed",o=ot(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Y(0);function l(){c.x=Et(r)}if(i||!i&&!s)if((ut(t)!=="body"||wt(r))&&(a=Ft(t)),i){const f=ot(t,!0,s,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else r&&l();s&&!i&&r&&l();const d=r&&!i&&!s?me(r,a):Y(0),u=o.left+a.scrollLeft-c.x-d.x,h=o.top+a.scrollTop-c.y-d.y;return{x:u,y:h,width:o.width,height:o.height}}function Bt(e){return z(e).position==="static"}function re(e,t){if(!U(e)||z(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return j(e)===n&&(n=n.ownerDocument.body),n}function ye(e,t){const n=I(e);if(Ct(e))return n;if(!U(e)){let r=it(e);for(;r&&!ct(r);){if(V(r)&&!Bt(r))return r;r=it(r)}return n}let i=re(e,t);for(;i&&cn(i)&&Bt(i);)i=re(i,t);return i&&ct(i)&&Bt(i)&&!Vt(i)?n:i||hn(e)||n}const Fn=async function(e){const t=this.getOffsetParent||ye,n=this.getDimensions,i=await n(e.floating);return{reference:Cn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function En(e){return z(e).direction==="rtl"}const Rn={convertOffsetParentRelativeRectToViewportRelativeRect:yn,getDocumentElement:j,getClippingRect:Sn,getOffsetParent:ye,getElementRects:Fn,getClientRects:pn,getDimensions:Pn,getScale:at,isElement:V,isRTL:En};function pe(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Dn(e,t){let n=null,i;const r=j(e);function s(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:d,top:u,width:h,height:f}=l;if(a||t(),!h||!f)return;const m=yt(u),w=yt(r.clientWidth-(d+h)),y=yt(r.clientHeight-(u+f)),p=yt(d),x={rootMargin:-m+"px "+-w+"px "+-y+"px "+-p+"px",threshold:k(0,nt(1,c))||1};let v=!0;function S(P){const F=P[0].intersectionRatio;if(F!==c){if(!v)return o();F?o(!1,F):i=setTimeout(()=>{o(!1,1e-7)},1e3)}F===1&&!pe(l,e.getBoundingClientRect())&&o(),v=!1}try{n=new IntersectionObserver(S,{...x,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return o(!0),s}function Bn(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=i,l=Kt(e),d=r||s?[...l?ft(l):[],...ft(t)]:[];d.forEach(p=>{r&&p.addEventListener("scroll",n,{passive:!0}),s&&p.addEventListener("resize",n)});const u=l&&a?Dn(l,n):null;let h=-1,f=null;o&&(f=new ResizeObserver(p=>{let[b]=p;b&&b.target===l&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),n()}),l&&!c&&f.observe(l),f.observe(t));let m,w=c?ot(e):null;c&&y();function y(){const p=ot(e);w&&!pe(w,p)&&n(),w=p,m=requestAnimationFrame(y)}return n(),()=>{var p;d.forEach(b=>{r&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),u?.(),(p=f)==null||p.disconnect(),f=null,c&&cancelAnimationFrame(m)}}const Tn=en,Wn=nn,Mn=Ge,Ln=on,kn=$e,In=Qe,Hn=rn,_n=(e,t,n)=>{const i=new Map,r={platform:Rn,...n},s={...r.platform,_c:i};return Je(e,t,{...r,platform:s})};function rt(e){return typeof e=="function"?e():e}function ve(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oe(e,t){const n=ve(e);return Math.round(t*n)/n}function ei(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function Nn(e){const t=e.whileElementsMounted,n=A(()=>rt(e.open)??!0),i=A(()=>rt(e.middleware)),r=A(()=>rt(e.transform)??!0),s=A(()=>rt(e.placement)??"bottom"),o=A(()=>rt(e.strategy)??"absolute"),a=A(()=>rt(e.sideOffset)??0),c=A(()=>rt(e.alignOffset)??0),l=e.reference;let d=N(0),u=N(0);const h=$(null);let f=N(Rt(g(o))),m=N(Rt(g(s))),w=N(Rt({})),y=N(!1),p=!1;const b=A(()=>{const E=h.current?oe(h.current,g(d)):g(d),D=h.current?oe(h.current,g(u)):g(u);return g(r)?{position:g(f),left:"0",top:"0",transform:`translate(${E}px, ${D}px)`,...h.current&&ve(h.current)>=1.5&&{willChange:"transform"}}:{position:g(f),left:`${E}px`,top:`${D}px`}});let x;function v(){l.current===null||h.current===null||_n(l.current,h.current,{middleware:g(i),placement:g(s),strategy:g(o)}).then(E=>{const D=l.current;if(Vn(D)){C(w,{...g(w),hide:{...g(w).hide,referenceHidden:!0}},!0);return}if(!g(n)&&g(d)!==0&&g(u)!==0){const T=Math.max(Math.abs(g(a)),Math.abs(g(c)),15);if(E.x<=T&&E.y<=T)return}C(d,E.x,!0),C(u,E.y,!0),C(f,E.strategy,!0),C(m,E.placement,!0),C(w,E.middlewareData,!0),C(y,!0)})}function S(){typeof x=="function"&&(x(),x=void 0)}function P(){if(S(),t===void 0){v();return}g(n)&&(l.current===null||h.current===null||(x=t(l.current,h.current,v)))}function F(){g(n)||C(y,!1)}function W(){return[g(i),g(s),g(o),g(a),g(c),g(n)]}return G(()=>{t===void 0&&g(n)&&v()}),G(P),G(()=>{if(t!==void 0){if(W(),!g(n)){p=!1;return}if(!g(y)){p=!1;return}if(!p){p=!0;return}v()}}),G(F),G(()=>S),{floating:h,reference:l,get strategy(){return g(f)},get placement(){return g(m)},get middlewareData(){return g(w)},get isPositioned(){return g(y)},get floatingStyles(){return g(b)},get update(){return v}}}function Vn(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}const zn={top:"bottom",right:"left",bottom:"top",left:"right"},Xt=new It("Floating.Root"),se=new It("Floating.Content"),Yt=new It("Floating.Root");class bt{static create(t=!1){return t?Yt.set(new bt):Xt.set(new bt)}anchorNode=$(null);customAnchorNode=$(null);triggerNode=$(null);constructor(){G(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class Ot{static create(t,n=!1){return n?se.set(new Ot(t,Yt.get())):se.set(new Ot(t,Xt.get()))}opts;root;contentRef=$(null);wrapperRef=$(null);arrowRef=$(null);contentAttachment=Dt(this.contentRef);wrapperAttachment=Dt(this.wrapperRef);arrowAttachment=Dt(this.arrowRef);arrowId=$(ae());#t=A(()=>{if(typeof this.opts.style=="string")return Ee(this.opts.style);if(!this.opts.style)return{}});#n=void 0;#i=new Ie(()=>this.arrowRef.current??void 0);#o=A(()=>this.#i?.width??0);#e=A(()=>this.#i?.height??0);#a=A(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#s=A(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#r=A(()=>g(this.#s).length>0);get hasExplicitBoundaries(){return g(this.#r)}set hasExplicitBoundaries(t){C(this.#r,t)}#c=A(()=>({padding:this.opts.collisionPadding.current,boundary:g(this.#s).filter(Re),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return g(this.#c)}set detectOverflowOptions(t){C(this.#c,t)}#l=N(void 0);#u=N(void 0);#f=N(void 0);#d=N(void 0);#h=A(()=>[Tn({mainAxis:this.opts.sideOffset.current+g(this.#e),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&Wn({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?Hn():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&Mn({...this.detectOverflowOptions}),Ln({...this.detectOverflowOptions,apply:({rects:t,availableWidth:n,availableHeight:i})=>{const{width:r,height:s}=t.reference;C(this.#l,n,!0),C(this.#u,i,!0),C(this.#f,r,!0),C(this.#d,s,!0)}}),this.arrowRef.current&&In({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),Kn({arrowWidth:g(this.#o),arrowHeight:g(this.#e)}),this.opts.hideWhenDetached.current&&kn({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return g(this.#h)}set middleware(t){C(this.#h,t)}floating;#g=A(()=>Xn(this.floating.placement));get placedSide(){return g(this.#g)}set placedSide(t){C(this.#g,t)}#m=A(()=>Yn(this.floating.placement));get placedAlign(){return g(this.#m)}set placedAlign(t){C(this.#m,t)}#w=A(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return g(this.#w)}set arrowX(t){C(this.#w,t)}#y=A(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return g(this.#y)}set arrowY(t){C(this.#y,t)}#p=A(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return g(this.#p)}set cannotCenterArrow(t){C(this.#p,t)}#v=N();get contentZIndex(){return g(this.#v)}set contentZIndex(t){C(this.#v,t,!0)}#x=A(()=>zn[this.placedSide]);get arrowBaseSide(){return g(this.#x)}set arrowBaseSide(t){C(this.#x,t)}#b=A(()=>({id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${g(this.#l)}px`,"--bits-floating-available-height":`${g(this.#u)}px`,"--bits-floating-anchor-width":`${g(this.#f)}px`,"--bits-floating-anchor-height":`${g(this.#d)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...g(this.#t)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return g(this.#b)}set wrapperProps(t){C(this.#b,t)}#O=A(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:De({...g(this.#t)}),...this.contentAttachment}));get props(){return g(this.#O)}set props(t){C(this.#O,t)}#A=A(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return g(this.#A)}set arrowStyle(t){C(this.#A,t)}constructor(t,n){this.opts=t,this.root=n,this.#n=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),jt(()=>t.customAnchor.current,i=>{this.root.customAnchorNode.current=i}),this.floating=Nn({strategy:()=>this.opts.strategy.current,placement:()=>g(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...i)=>Bn(...i,{animationFrame:this.#n?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),G(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),jt(()=>this.contentRef.current,i=>{if(!i||!this.opts.enabled.current)return;const r=Be(i),s=r.requestAnimationFrame(()=>{if(this.contentRef.current!==i||!this.opts.enabled.current)return;const o=r.getComputedStyle(i).zIndex;o!==this.contentZIndex&&(this.contentZIndex=o)});return()=>{r.cancelAnimationFrame(s)}}),G(()=>{this.floating.floating.current=this.wrapperRef.current})}}class At{static create(t,n=!1){return n?new At(t,Yt.get()):new At(t,Xt.get())}opts;root;constructor(t,n){this.opts=t,this.root=n,t.virtualEl&&t.virtualEl.current?n.triggerNode=Fe(t.virtualEl.current):n.triggerNode=t.ref}}function Kn(e){return{name:"transformOrigin",options:e,fn(t){const{placement:n,rects:i,middlewareData:r}=t,o=r.arrow?.centerOffset!==0,a=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[l,d]=Ut(n),u={start:"0%",center:"50%",end:"100%"}[d],h=(r.arrow?.x??0)+a/2,f=(r.arrow?.y??0)+c/2;let m="",w="";return l==="bottom"?(m=o?u:`${h}px`,w=`${-c}px`):l==="top"?(m=o?u:`${h}px`,w=`${i.floating.height+c}px`):l==="right"?(m=`${-c}px`,w=o?u:`${f}px`):l==="left"&&(m=`${i.floating.width+c}px`,w=o?u:`${f}px`),{data:{x:m,y:w}}}}}function Ut(e){const[t,n="center"]=e.split("-");return[t,n]}function Xn(e){return Ut(e)[0]}function Yn(e){return Ut(e)[1]}function ni(e,t){dt(t,!0);let n=O(t,"tooltip",3,!1);bt.create(n());var i=st(),r=et(i);mt(r,()=>t.children??ht),tt(e,i),gt()}function ii(e,t){dt(t,!0);let n=O(t,"tooltip",3,!1);At.create({id:R(()=>t.id),virtualEl:R(()=>t.virtualEl),ref:t.ref},n());var i=st(),r=et(i);mt(r,()=>t.children??ht),tt(e,i),gt()}function Un(e,t){dt(t,!0);let n=O(t,"side",3,"bottom"),i=O(t,"sideOffset",3,0),r=O(t,"align",3,"center"),s=O(t,"alignOffset",3,0),o=O(t,"arrowPadding",3,0),a=O(t,"avoidCollisions",3,!0),c=O(t,"collisionBoundary",19,()=>[]),l=O(t,"collisionPadding",3,0),d=O(t,"hideWhenDetached",3,!1),u=O(t,"onPlaced",3,()=>{}),h=O(t,"sticky",3,"partial"),f=O(t,"updatePositionStrategy",3,"optimized"),m=O(t,"strategy",3,"fixed"),w=O(t,"dir",3,"ltr"),y=O(t,"style",19,()=>({})),p=O(t,"wrapperId",19,ae),b=O(t,"customAnchor",3,null),x=O(t,"tooltip",3,!1);const v=Ot.create({side:R(()=>n()),sideOffset:R(()=>i()),align:R(()=>r()),alignOffset:R(()=>s()),id:R(()=>t.id),arrowPadding:R(()=>o()),avoidCollisions:R(()=>a()),collisionBoundary:R(()=>c()),collisionPadding:R(()=>l()),hideWhenDetached:R(()=>d()),onPlaced:R(()=>u()),sticky:R(()=>h()),updatePositionStrategy:R(()=>f()),strategy:R(()=>m()),dir:R(()=>w()),style:R(()=>y()),enabled:R(()=>t.enabled),wrapperId:R(()=>p()),customAnchor:R(()=>b())},x()),S=A(()=>ce(v.wrapperProps,{style:{pointerEvents:"auto"}}));var P=st(),F=et(P);mt(F,()=>t.content??ht,()=>({props:v.props,wrapperProps:g(S)})),tt(e,P),gt()}function jn(e,t){dt(t,!0),Se(()=>{t.onPlaced?.()});var n=st(),i=et(n);mt(i,()=>t.content??ht,()=>({props:{},wrapperProps:{}})),tt(e,n),gt()}function qn(e,t){let n=O(t,"isStatic",3,!1),i=St(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var r=st(),s=et(r);{var o=c=>{jn(c,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},a=c=>{Un(c,kt({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>i))};Lt(s,c=>{n()?c(o):c(a,!1)})}tt(e,r)}var Zn=Ae("<!> <!>",1);function xe(e,t){dt(t,!0);let n=O(t,"interactOutsideBehavior",3,"close"),i=O(t,"trapFocus",3,!0),r=O(t,"isValidEvent",3,()=>!1),s=O(t,"customAnchor",3,null),o=O(t,"isStatic",3,!1),a=O(t,"tooltip",3,!1),c=O(t,"contentPointerEvents",3,"auto"),l=St(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);qn(e,{get isStatic(){return o()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get enabled(){return t.enabled},get tooltip(){return a()},content:(u,h)=>{let f=()=>h?.().props,m=()=>h?.().wrapperProps;var w=Zn(),y=et(w);{var p=v=>{qt(v,{get preventScroll(){return t.preventScroll}})},b=v=>{qt(v,{get preventScroll(){return t.preventScroll}})};Lt(y,v=>{t.forceMount&&t.enabled?v(p):t.forceMount||v(b,1)})}var x=Pe(y,2);Te(x,{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return i()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(S,P)=>{let F=()=>P?.().props;We(S,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(W,E)=>{Me(W,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return r()},get enabled(){return t.enabled},get ref(){return t.ref},children:(_,T)=>{let K=()=>T?.().props;Le(_,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},get ref(){return t.ref},children:(B,J)=>{var H=st(),M=et(H);{let L=A(()=>({props:ce(l,f(),K(),F(),{style:{pointerEvents:c()}}),wrapperProps:m()}));mt(M,()=>t.popper??ht,()=>g(L))}tt(B,H)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),tt(u,w)},$$slots:{content:!0}}),gt()}function ri(e,t){let n=O(t,"interactOutsideBehavior",3,"close"),i=O(t,"trapFocus",3,!0),r=O(t,"isValidEvent",3,()=>!1),s=O(t,"customAnchor",3,null),o=O(t,"isStatic",3,!1),a=St(t,["$$slots","$$events","$$legacy","popper","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","ref","shouldRender"]);var c=st(),l=et(c);{var d=u=>{xe(u,kt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get isStatic(){return o()},get enabled(){return t.open},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return i()},get isValidEvent(){return r()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>a))};Lt(l,u=>{t.shouldRender&&u(d)})}tt(e,c)}function oi(e,t){let n=O(t,"interactOutsideBehavior",3,"close"),i=O(t,"trapFocus",3,!0),r=O(t,"isValidEvent",3,()=>!1),s=O(t,"customAnchor",3,null),o=O(t,"isStatic",3,!1),a=St(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);xe(e,kt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return s()},get isStatic(){return o()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return i()},get isValidEvent(){return r()},get onFocusOutside(){return t.onFocusOutside}},()=>a,{forceMount:!0}))}export{ni as F,oi as P,ri as a,ii as b,ei as g};