studiograph 1.3.44-next.2 → 1.3.44-next.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/routes/insights-api.js +7 -1
- package/dist/server/routes/insights-api.js.map +1 -1
- package/dist/services/auth-service.d.ts +2 -0
- package/dist/services/auth-service.js +15 -1
- package/dist/services/auth-service.js.map +1 -1
- package/dist/services/insights.js +52 -24
- package/dist/services/insights.js.map +1 -1
- package/dist/services/sync/model-factory.d.ts +6 -3
- package/dist/services/sync/model-factory.js +19 -5
- package/dist/services/sync/model-factory.js.map +1 -1
- package/dist/web/_app/immutable/assets/2.usgqms6b.css +1 -0
- package/dist/web/_app/immutable/assets/4.B3dbj90y.css +1 -0
- package/dist/web/_app/immutable/assets/{7.5LBMlZdT.css → 7.D55lTQ_F.css} +1 -1
- package/dist/web/_app/immutable/assets/8.DKYjn_lM.css +1 -0
- package/dist/web/_app/immutable/assets/ViewToolbar.CnlOM0gQ.css +1 -0
- package/dist/web/_app/immutable/chunks/1BE_eYuA.js +1 -0
- package/dist/web/_app/immutable/chunks/{Sk0ODu4Y.js → B1c_qzmY.js} +1 -1
- package/dist/web/_app/immutable/chunks/{CFtRXHDP.js → BKHfe9E-.js} +1 -1
- package/dist/web/_app/immutable/chunks/{Diui_MO0.js → BN6gr1HX.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DC9z5DEo.js → BVhp5b7F.js} +1 -1
- package/dist/web/_app/immutable/chunks/BZ2Q53D5.js +1 -0
- package/dist/web/_app/immutable/chunks/{Bs4ovbtO.js → BdNoKWAr.js} +2 -2
- package/dist/web/_app/immutable/chunks/BgRr0V7g.js +1 -0
- package/dist/web/_app/immutable/chunks/BpdrS9kL.js +1 -0
- package/dist/web/_app/immutable/chunks/{DQJwHeKh.js → BzjUB_Ym.js} +1 -1
- package/dist/web/_app/immutable/chunks/{BU2bHQbQ.js → C1S8fyYX.js} +1 -1
- package/dist/web/_app/immutable/chunks/{CSzKZPD4.js → C74mA5aC.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DSh-OF2y.js → CCA2E2CK.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DodWDTE5.js → Ca2kuiZq.js} +1 -1
- package/dist/web/_app/immutable/chunks/CwUXqlAx.js +1 -0
- package/dist/web/_app/immutable/chunks/{APIqItee.js → CwnWYvfz.js} +1 -1
- package/dist/web/_app/immutable/chunks/{BUcIsKRk.js → D-H9HeD_.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DQ5NTKSo.js → D8mTIH9Y.js} +1 -1
- package/dist/web/_app/immutable/chunks/DD3_vCgV.js +1 -0
- package/dist/web/_app/immutable/chunks/{D-yNNNdf.js → DHholpIc.js} +1 -1
- package/dist/web/_app/immutable/chunks/{vZ2iBqLE.js → DIBaaeCL.js} +1 -1
- package/dist/web/_app/immutable/chunks/DLZAjAct.js +1 -0
- package/dist/web/_app/immutable/chunks/DO03XMS-.js +1 -0
- package/dist/web/_app/immutable/chunks/DYLAPjKD.js +1 -0
- package/dist/web/_app/immutable/chunks/DeyUjeaz.js +1 -0
- package/dist/web/_app/immutable/chunks/Dgs7g6Xf.js +1 -0
- package/dist/web/_app/immutable/chunks/{CRnhIQbv.js → DkuxRPZv.js} +1 -1
- package/dist/web/_app/immutable/chunks/Mtmwulo1.js +1 -0
- package/dist/web/_app/immutable/chunks/NuvuAeCX.js +1 -0
- package/dist/web/_app/immutable/chunks/csGnu8Rb.js +1 -0
- package/dist/web/_app/immutable/chunks/e8QVPHqJ.js +5 -0
- package/dist/web/_app/immutable/chunks/oz3vOf3Y.js +1 -0
- package/dist/web/_app/immutable/chunks/{DiWKchgv.js → pQmxOXKv.js} +1 -1
- package/dist/web/_app/immutable/chunks/{b0XUoOIH.js → usxM-xOh.js} +2 -2
- package/dist/web/_app/immutable/chunks/y7AXCX7T.js +1 -0
- package/dist/web/_app/immutable/chunks/{DT3KtxWU.js → yUs562n0.js} +1 -1
- package/dist/web/_app/immutable/entry/{app.DA5OyPOi.js → app.Ci1ytk_v.js} +2 -2
- package/dist/web/_app/immutable/entry/start.DNk71wbw.js +1 -0
- package/dist/web/_app/immutable/nodes/0.D4NmzO9T.js +2 -0
- package/dist/web/_app/immutable/nodes/{1.y3j9wcQE.js → 1.B49NrV3g.js} +1 -1
- package/dist/web/_app/immutable/nodes/{10.D03BZcr1.js → 10.OXZpT8w9.js} +1 -1
- package/dist/web/_app/immutable/nodes/2.DaqdIYKU.js +84 -0
- package/dist/web/_app/immutable/nodes/3.Q_RC4D9P.js +1 -0
- package/dist/web/_app/immutable/nodes/4.CIDSQYhF.js +11 -0
- package/dist/web/_app/immutable/nodes/{5.CipwuwB3.js → 5.U-zEu0Mw.js} +1 -1
- package/dist/web/_app/immutable/nodes/{6.Daxwm3Lw.js → 6.SYsyu9GD.js} +1 -1
- package/dist/web/_app/immutable/nodes/7.BLgQGI-C.js +2 -0
- package/dist/web/_app/immutable/nodes/8.67Laxdj-.js +1 -0
- package/dist/web/_app/immutable/nodes/{9.BuTZk7Le.js → 9.D0aRCiZD.js} +1 -1
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +11 -11
- package/package.json +1 -1
- package/dist/web/_app/immutable/assets/2.DNpjFx0k.css +0 -1
- package/dist/web/_app/immutable/assets/4.CjSyz-ka.css +0 -1
- package/dist/web/_app/immutable/assets/8.DfcI2i9H.css +0 -1
- package/dist/web/_app/immutable/assets/ViewToolbar.BX74Ki7U.css +0 -1
- package/dist/web/_app/immutable/chunks/0rsp5-Up.js +0 -1
- package/dist/web/_app/immutable/chunks/0wBGAod7.js +0 -1
- package/dist/web/_app/immutable/chunks/B3NI-DOv.js +0 -1
- package/dist/web/_app/immutable/chunks/BAAbylyg.js +0 -1
- package/dist/web/_app/immutable/chunks/BHue2Ock.js +0 -1
- package/dist/web/_app/immutable/chunks/BPXdu_FX.js +0 -1
- package/dist/web/_app/immutable/chunks/BgBJ0u3M.js +0 -1
- package/dist/web/_app/immutable/chunks/Bnl5ADsW.js +0 -1
- package/dist/web/_app/immutable/chunks/Bt5_mycY.js +0 -1
- package/dist/web/_app/immutable/chunks/By_Wtb5J.js +0 -1
- package/dist/web/_app/immutable/chunks/DCVmM0L5.js +0 -1
- package/dist/web/_app/immutable/chunks/DHtLlmE0.js +0 -1
- package/dist/web/_app/immutable/chunks/DQYNi3YK.js +0 -5
- package/dist/web/_app/immutable/chunks/DSkxw4Ss.js +0 -1
- package/dist/web/_app/immutable/chunks/DVx_0hnZ.js +0 -1
- package/dist/web/_app/immutable/chunks/KHKAD2Ng.js +0 -1
- package/dist/web/_app/immutable/chunks/azUmHUDT.js +0 -1
- package/dist/web/_app/immutable/chunks/lsAKkphT.js +0 -1
- package/dist/web/_app/immutable/entry/start.DTjSVtws.js +0 -1
- package/dist/web/_app/immutable/nodes/0.BIvpQ3Qk.js +0 -2
- package/dist/web/_app/immutable/nodes/2.Du0xZVQg.js +0 -84
- package/dist/web/_app/immutable/nodes/3.weQEi2lI.js +0 -1
- package/dist/web/_app/immutable/nodes/4.DJyhWznw.js +0 -11
- package/dist/web/_app/immutable/nodes/7.TxeJDMtw.js +0 -2
- package/dist/web/_app/immutable/nodes/8.DWNdmB4l.js +0 -1
- /package/dist/web/_app/immutable/assets/{checkbox.D6tMDJWk.css → index.D6tMDJWk.css} +0 -0
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as R,s as Dn,f as pe,l as Nn,o as I,c as _,m as Vr,u as Kr,b as Hr}from"./b0XUoOIH.js";import{i as Ln}from"./vZ2iBqLE.js";import{aM as Ur,i as jr,j as Yr,bx as Gr,h as Xr,e as P,by as cn,P as qr,g as d,s as b,aY as kt,p as Y,l as Jt,d as At,a as Bn,c as Qt,n as _n,r as $t,b as G,m as te,t as Wn,a4 as A,f as Et,aW as Zr,a1 as un,aV as Jr,a6 as Qr,a2 as B,a7 as Pe,aE as $r,a0 as N,ae as Q,bz as ti,bA as zn,aD as ei,a3 as ni}from"./DSh-OF2y.js";import{B as ri,i as Mt}from"./DT3KtxWU.js";import{a as Vn,s as $}from"./CRnhIQbv.js";import{l as ee,p as y,s as Be,r as me}from"./D-yNNNdf.js";import{b as Ee}from"./CFtRXHDP.js";function ii(){return Symbol(Ur)}const oi=Symbol("NaN");function si(e,t,n){jr&&Yr();var r=new ri(e),i=!Gr();Xr(()=>{var s=t();s!==s&&(s=oi),i&&s!==null&&typeof s=="object"&&(s={}),r.ensure(s,n)})}class ai extends Map{#t=new Map;#e=P(0);#n=P(0);#r=cn||-1;constructor(t){if(super(),t){for(var[n,r]of t)super.set(n,r);this.#n.v=super.size}}#i(t){return cn===this.#r?P(t):qr(t)}has(t){var n=this.#t,r=n.get(t);if(r===void 0)if(super.has(t))r=this.#i(0),n.set(t,r);else return d(this.#e),!1;return d(r),!0}forEach(t,n){this.#o(),super.forEach(t,n)}get(t){var n=this.#t,r=n.get(t);if(r===void 0)if(super.has(t))r=this.#i(0),n.set(t,r);else{d(this.#e);return}return d(r),super.get(t)}set(t,n){var r=this.#t,i=r.get(t),s=super.get(t),o=super.set(t,n),a=this.#e;if(i===void 0)i=this.#i(0),r.set(t,i),b(this.#n,super.size),kt(a);else if(s!==n){kt(i);var c=a.reactions===null?null:new Set(a.reactions),u=c===null||!i.reactions?.every(f=>c.has(f));u&&kt(a)}return o}delete(t){var n=this.#t,r=n.get(t),i=super.delete(t);return r!==void 0&&(n.delete(t),b(r,-1)),i&&(b(this.#n,super.size),kt(this.#e)),i}clear(){if(super.size!==0){super.clear();var t=this.#t;b(this.#n,0);for(var n of t.values())b(n,-1);kt(this.#e),t.clear()}}#o(){d(this.#e);var t=this.#t;if(this.#n.v!==t.size){for(var n of super.keys())if(!t.has(n)){var r=this.#i(0);t.set(n,r)}}for([,r]of this.#t)d(r)}keys(){return d(this.#e),super.keys()}values(){return this.#o(),super.values()}entries(){return this.#o(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return d(this.#n),super.size}}var ci=pe("<title> </title>"),ui=pe('<svg><!><path d="M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"></path></svg>');function Wa(e,t){const n=ee(t,["children","$$slots","$$events","$$legacy"]),r=ee(n,["size","title"]);Y(t,!1);const i=te(),s=te();let o=y(t,"size",8,16),a=y(t,"title",8,void 0);Jt(()=>(At(n),At(a())),()=>{b(i,n["aria-label"]||n["aria-labelledby"]||a())}),Jt(()=>(d(i),At(n)),()=>{b(s,{"aria-hidden":d(i)?void 0:!0,role:d(i)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),Bn(),Ln();var c=ui();Vn(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...d(s),...r}));var u=Qt(c);{var f=l=>{var g=ci(),h=Qt(g,!0);$t(g),Wn(()=>Dn(h,a())),R(l,g)};Mt(u,l=>{a()&&l(f)})}_n(),$t(c),R(e,c),G()}function li(e){return typeof e=="function"}function Vt(e){return e!==null&&typeof e=="object"}const fi=["string","number","bigint","boolean"];function Me(e){return e==null||fi.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Me(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}const Tt=Symbol("box"),be=Symbol("is-writable");function x(e,t){const n=A(e);return t?{[Tt]:!0,[be]:!0,get current(){return d(n)},set current(r){t(r)}}:{[Tt]:!0,get current(){return e()}}}function Kt(e){return Vt(e)&&Tt in e}function _e(e){return Kt(e)&&be in e}function Kn(e){return Kt(e)?e:li(e)?x(e):et(e)}function di(e){return Object.entries(e).reduce((t,[n,r])=>Kt(r)?(_e(r)?Object.defineProperty(t,n,{get(){return r.current},set(i){r.current=i}}):Object.defineProperty(t,n,{get(){return r.current}}),t):Object.assign(t,{[n]:r}),{})}function hi(e){return _e(e)?{[Tt]:!0,get current(){return e.current}}:e}function et(e){let t=P(Et(e));return{[Tt]:!0,[be]:!0,get current(){return d(t)},set current(n){b(t,n,!0)}}}function xt(e){let t=P(Et(e));return{[Tt]:!0,[be]:!0,get current(){return d(t)},set current(n){b(t,n,!0)}}}xt.from=Kn;xt.with=x;xt.flatten=di;xt.readonly=hi;xt.isBox=Kt;xt.isWritableBox=_e;function Hn(...e){return function(t){for(const n of e)if(n){if(t.defaultPrevented)return;typeof n=="function"?n.call(this,t):n.current?.call(this,t)}}}var ln=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,gi=/\n/g,pi=/^\s*/,mi=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,bi=/^:\s*/,vi=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,yi=/^[;\s]*/,wi=/^\s+|\s+$/g,xi=`
|
|
2
|
-
`,fn="/",dn="*",bt="",Si="comment",Ai="declaration";function Ei(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var p=m.match(gi);p&&(n+=p.length);var v=m.lastIndexOf(xi);r=~v?m.length-v:r+m.length}function s(){var m={line:n,column:r};return function(p){return p.position=new o(m),u(),p}}function o(m){this.start=m,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(m){var p=new Error(t.source+":"+n+":"+r+": "+m);if(p.reason=m,p.filename=t.source,p.line=n,p.column=r,p.source=e,!t.silent)throw p}function c(m){var p=m.exec(e);if(p){var v=p[0];return i(v),e=e.slice(v.length),p}}function u(){c(pi)}function f(m){var p;for(m=m||[];p=l();)p!==!1&&m.push(p);return m}function l(){var m=s();if(!(fn!=e.charAt(0)||dn!=e.charAt(1))){for(var p=2;bt!=e.charAt(p)&&(dn!=e.charAt(p)||fn!=e.charAt(p+1));)++p;if(p+=2,bt===e.charAt(p-1))return a("End of comment missing");var v=e.slice(2,p-2);return r+=2,i(v),e=e.slice(p),r+=2,m({type:Si,comment:v})}}function g(){var m=s(),p=c(mi);if(p){if(l(),!c(bi))return a("property missing ':'");var v=c(vi),w=m({type:Ai,property:hn(p[0].replace(ln,bt)),value:v?hn(v[0].replace(ln,bt)):bt});return c(yi),w}}function h(){var m=[];f(m);for(var p;p=g();)p!==!1&&(m.push(p),f(m));return m}return u(),h()}function hn(e){return e?e.replace(wi,bt):bt}function Oi(e,t){let n=null;if(!e||typeof e!="string")return n;const r=Ei(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:o,value:a}=s;i?t(o,a,s):a&&(n=n||{},n[o]=a)}),n}const Ti=/\d/,Ci=["-","_","/","."];function Pi(e=""){if(!Ti.test(e))return e!==e.toLowerCase()}function Mi(e){const t=[];let n="",r,i;for(const s of e){const o=Ci.includes(s);if(o===!0){t.push(n),n="",r=void 0;continue}const a=Pi(s);if(i===!1){if(r===!1&&a===!0){t.push(n),n=s,r=a;continue}if(r===!0&&a===!1&&n.length>1){const c=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=c+s,r=a;continue}}n+=s,r=a,i=o}return t.push(n),t}function Un(e){return e?Mi(e).map(t=>Ri(t)).join(""):""}function Fi(e){return Ii(Un(e||""))}function Ri(e){return e?e[0].toUpperCase()+e.slice(1):""}function Ii(e){return e?e[0].toLowerCase()+e.slice(1):""}function Bt(e){if(!e)return{};const t={};function n(r,i){if(r.startsWith("-moz-")||r.startsWith("-webkit-")||r.startsWith("-ms-")||r.startsWith("-o-")){t[Un(r)]=i;return}if(r.startsWith("--")){t[r]=i;return}t[Fi(r)]=i}return Oi(e,n),t}function vt(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}function ki(e,t){const n=RegExp(e,"g");return r=>{if(typeof r!="string")throw new TypeError(`expected an argument of type string, but got ${typeof r}`);return r.match(n)?r.replace(n,t):r}}const Di=ki(/[A-Z]/,e=>`-${e.toLowerCase()}`);function Ni(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${Di(t)}: ${e[t]};`).join(`
|
|
3
|
-
`)}function jn(e={}){return Ni(e).replace(`
|
|
4
|
-
`," ")}const Li=["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"],Bi=new Set(Li);function _i(e){return Bi.has(e)}function ve(...e){const t={...e[0]};for(let n=1;n<e.length;n++){const r=e[n];if(r){for(const i of Object.keys(r)){const s=t[i],o=r[i],a=typeof s=="function",c=typeof o=="function";if(a&&_i(i)){const u=s,f=o;t[i]=Hn(u,f)}else if(a&&c)t[i]=vt(s,o);else if(i==="class"){const u=Me(s),f=Me(o);u&&f?t[i]=Ee(s,o):u?t[i]=Ee(s):f&&(t[i]=Ee(o))}else if(i==="style"){const u=typeof s=="object",f=typeof o=="object",l=typeof s=="string",g=typeof o=="string";if(u&&f)t[i]={...s,...o};else if(u&&g){const h=Bt(o);t[i]={...s,...h}}else if(l&&f){const h=Bt(s);t[i]={...h,...o}}else if(l&&g){const h=Bt(s),m=Bt(o);t[i]={...h,...m}}else u?t[i]=s:f?t[i]=o:l?t[i]=s:g&&(t[i]=o)}else t[i]=o!==void 0?o:s}for(const i of Object.getOwnPropertySymbols(r)){const s=t[i],o=r[i];t[i]=o!==void 0?o:s}}}return typeof t.style=="object"&&(t.style=jn(t.style).replaceAll(`
|
|
5
|
-
`," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}const Yn=typeof window<"u"?window:void 0;function Wi(e){let t=e.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}class zi{#t;#e;constructor(t={}){const{window:n=Yn,document:r=n?.document}=t;n!==void 0&&(this.#t=r,this.#e=Nn(i=>{const s=I(n,"focusin",i),o=I(n,"focusout",i);return()=>{s(),o()}}))}get current(){return this.#e?.(),this.#t?Wi(this.#t):null}}new zi;function Vi(e){return typeof e=="function"}class St{#t;#e;constructor(t){this.#t=t,this.#e=Symbol(t)}get key(){return this.#e}exists(){return Zr(this.#e)}get(){const t=un(this.#e);if(t===void 0)throw new Error(`Context "${this.#t}" not found`);return t}getOr(t){const n=un(this.#e);return n===void 0?t:n}set(t){return Jr(this.#e,t)}}function Ki(e,t){switch(e){case"post":B(t);break;case"pre":Qr(t);break}}function Gn(e,t,n,r={}){const{lazy:i=!1}=r;let s=!i,o=Array.isArray(e)?[]:void 0;Ki(t,()=>{const a=Array.isArray(e)?e.map(u=>u()):e();if(!s){s=!0,o=a;return}const c=Pe(()=>n(a,o));return o=a,c})}function z(e,t,n){Gn(e,"post",t,n)}function Hi(e,t,n){Gn(e,"pre",t,n)}z.pre=Hi;function gn(e){return Vi(e)?e():e}class Ui{#t={width:0,height:0};#e=!1;#n;#r;#i;#o=A(()=>(d(this.#s)?.(),this.getSize().width));#a=A(()=>(d(this.#s)?.(),this.getSize().height));#s=A(()=>{const t=gn(this.#r);if(t)return Nn(n=>{if(!this.#i)return;const r=new this.#i.ResizeObserver(i=>{this.#e=!0;for(const s of i){const o=this.#n.box==="content-box"?s.contentBoxSize:s.borderBoxSize,a=Array.isArray(o)?o:[o];this.#t.width=a.reduce((c,u)=>Math.max(c,u.inlineSize),0),this.#t.height=a.reduce((c,u)=>Math.max(c,u.blockSize),0)}n()});return r.observe(t),()=>{this.#e=!1,r.disconnect()}})});constructor(t,n={box:"border-box"}){this.#i=n.window??Yn,this.#n=n,this.#r=t,this.#t={width:0,height:0}}calculateSize(){const t=gn(this.#r);if(!t||!this.#i)return;const n=t.offsetWidth,r=t.offsetHeight;if(this.#n.box==="border-box")return{width:n,height:r};const i=this.#i.getComputedStyle(t),s=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),o=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),a=parseFloat(i.borderLeftWidth)+parseFloat(i.borderRightWidth),c=parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),u=n-s-a,f=r-o-c;return{width:u,height:f}}getSize(){return this.#e?this.#t:this.calculateSize()??this.#t}get current(){return d(this.#s)?.(),this.getSize()}get width(){return d(this.#o)}get height(){return d(this.#a)}}function Ft(e){B(()=>()=>{e()})}function ji(e,t){return setTimeout(t,e)}function nt(e){$r().then(e)}const Yi=1,Gi=9,Xi=11;function Fe(e){return Vt(e)&&e.nodeType===Yi&&typeof e.nodeName=="string"}function Xn(e){return Vt(e)&&e.nodeType===Gi}function qi(e){return Vt(e)&&e.constructor?.name==="VisualViewport"}function Zi(e){return Vt(e)&&e.nodeType!==void 0}function qn(e){return Zi(e)&&e.nodeType===Xi&&"host"in e}function Ji(e,t){if(!e||!t||!Fe(e)||!Fe(t))return!1;const n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&qn(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ht(e){return Xn(e)?e:qi(e)?e.document:e?.ownerDocument??document}function We(e){return qn(e)?We(e.host):Xn(e)?e.defaultView??window:Fe(e)?e.ownerDocument?.defaultView??window:window}function Qi(e){let t=e.activeElement;for(;t?.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}class ze{element;#t=A(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return d(this.#t)}set root(t){b(this.#t,t)}constructor(t){typeof t=="function"?this.element=x(t):this.element=t}getDocument=()=>Ht(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>Qi(this.root);isActiveElement=t=>t===this.getActiveElement();getElementById(t){return this.root.getElementById(t)}querySelector=t=>this.root?this.root.querySelector(t):null;querySelectorAll=t=>this.root?this.root.querySelectorAll(t):[];setTimeout=(t,n)=>this.getWindow().setTimeout(t,n);clearTimeout=t=>this.getWindow().clearTimeout(t)}function ht(e,t){return{[ii()]:n=>Kt(e)?(e.current=n,Pe(()=>t?.(n)),()=>{"isConnected"in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Pe(()=>t?.(n)),()=>{"isConnected"in n&&n.isConnected||(e(null),t?.(null))})}}function Ve(e){return e?"true":"false"}function Zn(e){return e?"":void 0}function za(e){return e?!0:void 0}function Ke(e){return e?"open":"closed"}function Va(e,t){return t?"mixed":e?"true":"false"}class $i{#t;#e;attrs;constructor(t){this.#t=t.getVariant?t.getVariant():null,this.#e=this.#t?`data-${this.#t}-`:`data-${t.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(t.parts.map(n=>[n,this.getAttr(n)]))}getAttr(t,n){return n?`data-${n}-${t}`:`${this.#e}${t}`}selector(t,n){return`[${this.getAttr(t,n)}]`}}function to(e){const t=new $i(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}const Wt="ArrowDown",Ut="ArrowLeft",jt="ArrowRight",ne="ArrowUp",Jn="End",Qn="Enter",eo="Escape",$n="Home",no="PageDown",ro="PageUp",ye=" ",io="Tab";function oo(e){return window.getComputedStyle(e).getPropertyValue("direction")}function so(e="ltr",t="horizontal"){return{horizontal:e==="rtl"?Ut:jt,vertical:Wt}[t]}function ao(e="ltr",t="horizontal"){return{horizontal:e==="rtl"?jt:Ut,vertical:ne}[t]}function co(e="ltr",t="horizontal"){return["ltr","rtl"].includes(e)||(e="ltr"),["horizontal","vertical"].includes(t)||(t="horizontal"),{nextKey:so(e,t),prevKey:ao(e,t)}}const tr=typeof document<"u",pn=uo();function uo(){return tr&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function ot(e){return e instanceof HTMLElement}function Re(e){return e instanceof Element}function er(e){return e instanceof Element||e instanceof SVGElement}function Ka(e){return e.pointerType==="touch"}function lo(e){return e!==null}function fo(e){return e instanceof HTMLInputElement&&"select"in e}class ho{#t;#e=xt(null);constructor(t){this.#t=t}getCandidateNodes(){return this.#t.rootNode.current?this.#t.candidateSelector?Array.from(this.#t.rootNode.current.querySelectorAll(this.#t.candidateSelector)):this.#t.candidateAttr?Array.from(this.#t.rootNode.current.querySelectorAll(`[${this.#t.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){const t=this.getCandidateNodes();t.length&&t[0]?.focus()}handleKeydown(t,n,r=!1){const i=this.#t.rootNode.current;if(!i||!t)return;const s=this.getCandidateNodes();if(!s.length)return;const o=s.indexOf(t),a=oo(i),{nextKey:c,prevKey:u}=co(a,this.#t.orientation.current),f=this.#t.loop.current,l={[c]:o+1,[u]:o-1,[$n]:0,[Jn]:s.length-1};if(r){const m=c===Wt?jt:Wt,p=u===ne?Ut:ne;l[m]=o+1,l[p]=o-1}let g=l[n.key];if(g===void 0)return;n.preventDefault(),g<0&&f?g=s.length-1:g===s.length&&f&&(g=0);const h=s[g];if(h)return h.focus(),this.#e.current=h.id,this.#t.onCandidateFocus?.(h),h}getTabIndex(t){const n=this.getCandidateNodes(),r=this.#e.current!==null;return t&&!r&&n[0]===t?(this.#e.current=t.id,0):t?.id===this.#e.current?0:-1}setCurrentTabStopId(t){this.#e.current=t}focusCurrentTabStop(){const t=this.#e.current;if(!t)return;const n=this.#t.rootNode.current?.querySelector(`#${t}`);!n||!ot(n)||n.focus()}}class go{#t;#e=null;constructor(t){this.#t=t,Ft(()=>this.#n())}#n(){this.#e&&(window.cancelAnimationFrame(this.#e),this.#e=null)}run(t){this.#n();const n=this.#t.ref.current;if(n){if(typeof n.getAnimations!="function"){this.#r(t);return}this.#e=window.requestAnimationFrame(()=>{const r=n.getAnimations();if(r.length===0){this.#r(t);return}Promise.allSettled(r.map(i=>i.finished)).then(()=>{this.#r(t)})})}}#r(t){const n=()=>{t()};this.#t.afterTick?nt(n):n()}}class po{#t;#e;#n;#r=P(!1);constructor(t){this.#t=t,b(this.#r,t.open.current,!0),this.#e=t.enabled??!0,this.#n=new go({ref:this.#t.ref,afterTick:this.#t.open}),z(()=>this.#t.open.current,n=>{n&&b(this.#r,!0),this.#e&&this.#n.run(()=>{n===this.#t.open.current&&(this.#t.open.current||b(this.#r,!1),this.#t.onComplete?.())})})}get shouldRender(){return d(this.#r)}}function W(){}function Ha(e,t){return`bits-${e}`}function mo(e,t){var n=_(),r=N(n);si(r,()=>t.children,i=>{var s=_(),o=N(s);$(o,()=>t.children??Q),R(i,s)}),R(e,n)}const bo=new St("BitsConfig");function vo(){const e=new yo(null,{});return bo.getOr(e).opts}class yo{opts;constructor(t,n){const r=wo(t,n);this.opts={defaultPortalTo:r(i=>i.defaultPortalTo),defaultLocale:r(i=>i.defaultLocale)}}}function wo(e,t){return n=>x(()=>{const i=n(t)?.current;if(i!==void 0)return i;if(e!==null)return n(e.opts)?.current})}function xo(e,t){return n=>{const r=vo();return x(()=>{const i=n();if(i!==void 0)return i;const s=e(r).current;return s!==void 0?s:t})}}const So=xo(e=>e.defaultPortalTo,"body");function Ua(e,t){Y(t,!0);const n=So(()=>t.to),r=ti();let i=A(s);function s(){if(!tr||t.disabled)return null;let l=null;return typeof n.current=="string"?l=document.querySelector(n.current):l=n.current,l}let o;function a(){o&&(Kr(o),o=null)}z([()=>d(i),()=>t.disabled],([l,g])=>{if(!l||g){a();return}return o=Vr(mo,{target:l,props:{children:t.children},context:r}),()=>{a()}});var c=_(),u=N(c);{var f=l=>{var g=_(),h=N(g);$(h,()=>t.children??Q),R(l,g)};Mt(u,l=>{t.disabled&&l(f)})}R(e,c),G()}class Ao{eventName;options;constructor(t,n={bubbles:!0,cancelable:!0}){this.eventName=t,this.options=n}createEvent(t){return new CustomEvent(this.eventName,{...this.options,detail:t})}dispatch(t,n){const r=this.createEvent(n);return t.dispatchEvent(r),r}listen(t,n,r){const i=s=>{n(s)};return I(t,this.eventName,i,r)}}function mn(e,t=500){let n=null;const r=(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...i)},t)};return r.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},r}function nr(e,t){return e===t||e.contains(t)}function rr(e){return e?.ownerDocument??document}function Eo(e,t){const{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}const Ie=[Qn,ye],Oo=[Wt,ro,$n],ir=[ne,no,Jn],To=[...Oo,...ir],Co={ltr:[...Ie,jt],rtl:[...Ie,Ut]},ja={ltr:[Ut],rtl:[jt]};function re(e){return e.pointerType==="mouse"}function Po(e,{select:t=!1}={}){if(!e||!e.focus)return;const n=Ht(e);if(n.activeElement===e)return;const r=n.activeElement;e.focus({preventScroll:!0}),e!==r&&fo(e)&&t&&e.select()}function Mo(e,{select:t=!1}={},n){const r=n();for(const i of e)if(Po(i,{select:t}),n()!==r)return!0}let Dt=P(!1);class dt{static _refs=0;static _cleanup;constructor(){B(()=>(dt._refs===0&&(dt._cleanup=zn(()=>{const t=[],n=i=>{b(Dt,!1)},r=i=>{b(Dt,!0)};return t.push(I(document,"pointerdown",n,{capture:!0}),I(document,"pointermove",n,{capture:!0}),I(document,"keydown",r,{capture:!0})),vt(...t)})),dt._refs++,()=>{dt._refs--,dt._refs===0&&(b(Dt,!1),dt._cleanup?.())}))}get current(){return d(Dt)}set current(t){b(Dt,t,!0)}}var or=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ie=or.join(","),sr=typeof Element>"u",yt=sr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,oe=!sr&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},se=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=i===""||i==="true",o=s||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):se(t.parentNode));return o},Fo=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},ar=function(t,n,r){if(se(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(ie));return n&&yt.call(t,ie)&&i.unshift(t),i=i.filter(r),i},ae=function(t,n,r){for(var i=[],s=Array.from(t);s.length;){var o=s.shift();if(!se(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),c=a.length?a:o.children,u=ae(c,!0,r);r.flatten?i.push.apply(i,u):i.push({scopeParent:o,candidates:u})}else{var f=yt.call(o,ie);f&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var l=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),g=!se(l,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(l&&g){var h=ae(l===!0?o.children:l.children,!0,r);r.flatten?i.push.apply(i,h):i.push({scopeParent:o,candidates:h})}else s.unshift.apply(s,o.children)}}return i},cr=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ur=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Fo(t))&&!cr(t)?0:t.tabIndex},Ro=function(t,n){var r=ur(t);return r<0&&n&&!cr(t)?0:r},Io=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},lr=function(t){return t.tagName==="INPUT"},ko=function(t){return lr(t)&&t.type==="hidden"},Do=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},No=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Lo=function(t){if(!t.name)return!0;var n=t.form||oe(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var s=No(i,t.form);return!s||s===t},Bo=function(t){return lr(t)&&t.type==="radio"},_o=function(t){return Bo(t)&&!Lo(t)},Wo=function(t){var n,r=t&&oe(t),i=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var o,a,c;for(s=!!((o=i)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!s&&i;){var u,f,l;r=oe(i),i=(u=r)===null||u===void 0?void 0:u.host,s=!!((f=i)!==null&&f!==void 0&&(l=f.ownerDocument)!==null&&l!==void 0&&l.contains(i))}}return s},bn=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},zo=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(t).visibility==="hidden")return!0;var o=yt.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(yt.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var c=t;t;){var u=t.parentElement,f=oe(t);if(u&&!u.shadowRoot&&i(u)===!0)return bn(t);t.assignedSlot?t=t.assignedSlot:!u&&f!==t.ownerDocument?t=f.host:t=u}t=c}if(Wo(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return bn(t);return!1},Vo=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return yt.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},ce=function(t,n){return!(n.disabled||ko(n)||zo(n,t)||Do(n)||Vo(n))},ke=function(t,n){return!(_o(n)||ur(n)<0||!ce(t,n))},Ko=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},fr=function(t){var n=[],r=[];return t.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,c=Ro(a,o),u=o?fr(i.candidates):a;c===0?o?n.push.apply(n,u):n.push(a):r.push({documentOrder:s,tabIndex:c,item:i,isScope:o,content:u})}),r.sort(Io).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},dr=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ae([t],n.includeContainer,{filter:ke.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Ko}):r=ar(t,n.includeContainer,ke.bind(null,n)),fr(r)},hr=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ae([t],n.includeContainer,{filter:ce.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=ar(t,n.includeContainer,ce.bind(null,n)),r},He=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return yt.call(t,ie)===!1?!1:ke(n,t)},Ho=or.concat("iframe:not([inert]):not([inert] *)").join(","),gr=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return yt.call(t,Ho)===!1?!1:ce(n,t)};function _t(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"}}function Uo(e,t){if(!He(e,_t()))return jo(e,t);const n=Ht(e),r=dr(n.body,_t());t==="prev"&&r.reverse();const i=r.indexOf(e);return i===-1?n.body:r.slice(i+1)[0]}function jo(e,t){const n=Ht(e);if(!gr(e,_t()))return n.body;const r=hr(n.body,_t());t==="prev"&&r.reverse();const i=r.indexOf(e);return i===-1?n.body:r.slice(i+1).find(o=>He(o,_t()))??n.body}function Yo(e,t){return e.length!==t.length?!1:e.every((n,r)=>pr(n,t[r]))}function pr(e,t){return Number.isNaN(e)&&Number.isNaN(t)?!0:Array.isArray(e)&&Array.isArray(t)?Yo(e,t):typeof e=="object"&&typeof t=="object"?Go(e,t):Object.is(e,t)}function Go(e,t){if(typeof e!="object"||typeof t!="object"||e===null||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!r.includes(i)||!pr(e[i],t[i]))return!1;return!0}function Ya(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===e.length-1?n?e[0]:void 0:e[t+1]}function Ga(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===0?n?e[e.length-1]:void 0:e[t-1]}function Xa(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t+n;return r?i=(i%e.length+e.length)%e.length:i=Math.max(0,Math.min(i,e.length-1)),e[i]}function qa(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t-n;return r?i=(i%e.length+e.length)%e.length:i=Math.max(0,Math.min(i,e.length-1)),e[i]}function mr(e,t,n){const r=t.toLowerCase();if(r.endsWith(" ")){const l=r.slice(0,-1);if(e.filter(p=>p.toLowerCase().startsWith(l)).length<=1)return mr(e,l,n);const h=n?.toLowerCase();if(h&&h.startsWith(l)&&h.charAt(l.length)===" "&&t.trim()===l)return n;const m=e.filter(p=>p.toLowerCase().startsWith(r));if(m.length>0){const p=n?e.indexOf(n):-1;return vn(m,Math.max(p,0)).find(O=>O!==n)||n}}const s=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=s.toLowerCase(),a=n?e.indexOf(n):-1;let c=vn(e,Math.max(a,0));s.length===1&&(c=c.filter(l=>l!==n));const f=c.find(l=>l?.toLowerCase().startsWith(o));return f!==n?f:void 0}function vn(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Xo={afterMs:1e4,onChange:W};function br(e,t){const{afterMs:n,onChange:r,getWindow:i}={...Xo,...t};let s=null,o=P(Et(e));function a(){return i().setTimeout(()=>{b(o,e,!0),r?.(e)},n)}return B(()=>()=>{s&&i().clearTimeout(s)}),x(()=>d(o),c=>{b(o,c,!0),r?.(c),s&&i().clearTimeout(s),s=a()})}class qo{#t;#e;#n=A(()=>this.#t.onMatch?this.#t.onMatch:t=>t.focus());#r=A(()=>this.#t.getCurrentItem?this.#t.getCurrentItem:this.#t.getActiveElement);constructor(t){this.#t=t,this.#e=br("",{afterMs:1e3,getWindow:t.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t,n){if(!n.length)return;this.#e.current=this.#e.current+t;const r=d(this.#r)(),i=n.find(c=>c===r)?.textContent?.trim()??"",s=n.map(c=>c.textContent?.trim()??""),o=mr(s,this.#e.current,i),a=n.find(c=>c.textContent?.trim()===o);return a&&d(this.#n)(a),a}resetTypeahead(){this.#e.current=""}get search(){return this.#e.current}}class Zo{#t;#e;#n;#r=P(null);constructor(t){this.#t=t,this.#e=A(()=>this.#t.enabled()),this.#n=br(!1,{afterMs:t.transitTimeout??300,onChange:n=>{d(this.#e)&&this.#t.setIsPointerInTransit?.(n)},getWindow:()=>We(this.#t.triggerNode())}),z([t.triggerNode,t.contentNode,t.enabled],([n,r,i])=>{if(!n||!r||!i)return;const s=a=>{this.#o(a,r)},o=a=>{this.#o(a,n)};return vt(I(n,"pointerleave",s),I(r,"pointerleave",o))}),z(()=>d(this.#r),()=>{const n=i=>{if(!d(this.#r))return;const s=i.target;if(!Re(s))return;const o={x:i.clientX,y:i.clientY},a=t.triggerNode()?.contains(s)||t.contentNode()?.contains(s),c=!ts(o,d(this.#r));a?this.#i():c&&(this.#i(),t.onPointerExit())},r=Ht(t.triggerNode()??t.contentNode());if(r)return I(r,"pointermove",n)})}#i(){b(this.#r,null),this.#n.current=!1}#o(t,n){const r=t.currentTarget;if(!ot(r))return;const i={x:t.clientX,y:t.clientY},s=Jo(i,r.getBoundingClientRect()),o=Qo(i,s),a=$o(n.getBoundingClientRect()),c=es([...o,...a]);b(this.#r,c,!0),this.#n.current=!0}}function Jo(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Qo(e,t,n=5){const r=n*1.5;switch(t){case"top":return[{x:e.x-n,y:e.y+n},{x:e.x,y:e.y-r},{x:e.x+n,y:e.y+n}];case"bottom":return[{x:e.x-n,y:e.y-n},{x:e.x,y:e.y+r},{x:e.x+n,y:e.y-n}];case"left":return[{x:e.x+n,y:e.y-n},{x:e.x-r,y:e.y},{x:e.x+n,y:e.y+n}];case"right":return[{x:e.x-n,y:e.y-n},{x:e.x+r,y:e.y},{x:e.x-n,y:e.y+n}]}}function $o(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function ts(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,o=t.length-1;s<t.length;o=s++){const a=t[s].x,c=t[s].y,u=t[o].x,f=t[o].y;c>r!=f>r&&n<(u-a)*(r-c)/(f-c)+a&&(i=!i)}return i}function es(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),ns(t)}function ns(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const rs="data-context-menu-trigger",is="data-context-menu-content",vr=new St("Menu.Root"),Ct=new St("Menu.Root | Menu.Sub"),Ue=new St("Menu.Content"),yr=new Ao("bitsmenuopen",{bubbles:!1,cancelable:!0}),os=to({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});class wr{static create(t){const n=new wr(t);return vr.set(n)}opts;isUsingKeyboard=new dt;#t=P(!1);get ignoreCloseAutoFocus(){return d(this.#t)}set ignoreCloseAutoFocus(t){b(this.#t,t,!0)}#e=P(!1);get isPointerInTransit(){return d(this.#e)}set isPointerInTransit(t){b(this.#e,t,!0)}constructor(t){this.opts=t}getBitsAttr=t=>os.getAttr(t,this.opts.variant.current)}class je{static create(t,n){return Ct.set(new je(t,n,null))}opts;root;parentMenu;contentId=x(()=>"");#t=P(null);get contentNode(){return d(this.#t)}set contentNode(t){b(this.#t,t,!0)}contentPresence;#e=P(null);get triggerNode(){return d(this.#e)}set triggerNode(t){b(this.#e,t,!0)}constructor(t,n,r){this.opts=t,this.root=n,this.parentMenu=r,this.contentPresence=new po({ref:x(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),r&&z(()=>r.opts.open.current,()=>{r.opts.open.current||(this.opts.open.current=!1)})}toggleOpen(){this.opts.open.current=!this.opts.open.current}onOpen(){this.opts.open.current=!0}onClose(){this.opts.open.current=!1}}class xr{static create(t){return Ue.set(new xr(t,Ct.get()))}opts;parentMenu;rovingFocusGroup;domContext;attachment;#t=P("");get search(){return d(this.#t)}set search(t){b(this.#t,t,!0)}#e=0;#n;#r=P(!1);get mounted(){return d(this.#r)}set mounted(t){b(this.#r,t,!0)}#i;constructor(t,n){this.opts=t,this.parentMenu=n,this.domContext=new ze(t.ref),this.attachment=ht(this.opts.ref,r=>{this.parentMenu.contentNode!==r&&(this.parentMenu.contentNode=r)}),n.contentId=t.id,this.#i=t.isSub??!1,this.onkeydown=this.onkeydown.bind(this),this.onblur=this.onblur.bind(this),this.onfocus=this.onfocus.bind(this),this.handleInteractOutside=this.handleInteractOutside.bind(this),new Zo({contentNode:()=>this.parentMenu.contentNode,triggerNode:()=>this.parentMenu.triggerNode,enabled:()=>this.parentMenu.opts.open.current&&!!this.parentMenu.triggerNode?.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger")),onPointerExit:()=>{this.parentMenu.opts.open.current=!1},setIsPointerInTransit:r=>{this.parentMenu.root.isPointerInTransit=r}}),this.#n=new qo({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch,this.rovingFocusGroup=new ho({rootNode:x(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr("item"),loop:this.opts.loop,orientation:x(()=>"vertical")}),z(()=>this.parentMenu.contentNode,r=>{if(!r)return;const i=()=>{nt(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})};return yr.listen(r,i)}),B(()=>{this.parentMenu.opts.open.current||this.domContext.getWindow().clearTimeout(this.#e)})}#o(){const t=this.parentMenu.contentNode;return t?Array.from(t.querySelectorAll(`[${this.parentMenu.root.getBitsAttr("item")}]:not([data-disabled])`)):[]}#a(){return this.parentMenu.root.isPointerInTransit}onCloseAutoFocus=t=>{this.opts.onCloseAutoFocus.current?.(t),!(t.defaultPrevented||this.#i)&&this.parentMenu.triggerNode&&He(this.parentMenu.triggerNode)&&(t.preventDefault(),this.parentMenu.triggerNode.focus())};handleTabKeyDown(t){let n=this.parentMenu;for(;n.parentMenu!==null;)n=n.parentMenu;if(!n.triggerNode)return;t.preventDefault();const r=Uo(n.triggerNode,t.shiftKey?"prev":"next");r?(this.parentMenu.root.ignoreCloseAutoFocus=!0,n.onClose(),nt(()=>{r.focus(),nt(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(t){if(t.defaultPrevented)return;if(t.key===io){this.handleTabKeyDown(t);return}const n=t.target,r=t.currentTarget;if(!ot(n)||!ot(r))return;const i=n.closest(`[${this.parentMenu.root.getBitsAttr("content")}]`)?.id===this.parentMenu.contentId.current,s=t.ctrlKey||t.altKey||t.metaKey,o=t.key.length===1;if(this.rovingFocusGroup.handleKeydown(n,t)||t.code==="Space")return;const c=this.#o();i&&!s&&o&&this.#n(t.key,c),t.target?.id===this.parentMenu.contentId.current&&To.includes(t.key)&&(t.preventDefault(),ir.includes(t.key)&&c.reverse(),Mo(c,{select:!1},()=>this.domContext.getActiveElement()))}onblur(t){Re(t.currentTarget)&&Re(t.target)&&(t.currentTarget.contains?.(t.target)||(this.domContext.getWindow().clearTimeout(this.#e),this.search=""))}onfocus(t){this.parentMenu.root.isUsingKeyboard.current&&nt(()=>this.rovingFocusGroup.focusFirstCandidate())}onItemEnter(){return this.#a()}onItemLeave(t){if(t.currentTarget.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger"))||this.#a()||this.parentMenu.root.isUsingKeyboard.current)return;this.parentMenu.contentNode?.focus(),this.rovingFocusGroup.setCurrentTabStopId("")}onTriggerLeave(){return!!this.#a()}handleInteractOutside(t){if(!er(t.target))return;const n=this.parentMenu.triggerNode?.id;if(t.target.id===n){t.preventDefault();return}t.target.closest(`#${n}`)&&t.preventDefault()}get shouldRender(){return this.parentMenu.contentPresence.shouldRender}#s=A(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return d(this.#s)}set snippetProps(t){b(this.#s,t)}#c=A(()=>({id:this.opts.id.current,role:"menu","aria-orientation":"vertical",[this.parentMenu.root.getBitsAttr("content")]:"","data-state":Ke(this.parentMenu.opts.open.current),onkeydown:this.onkeydown,onblur:this.onblur,onfocus:this.onfocus,dir:this.parentMenu.root.opts.dir.current,style:{pointerEvents:"auto",contain:"layout style"},...this.attachment}));get props(){return d(this.#c)}set props(t){b(this.#c,t)}popperProps={onCloseAutoFocus:t=>this.onCloseAutoFocus(t)}}class Sr{opts;content;attachment;#t=P(!1);constructor(t,n){this.opts=t,this.content=n,this.attachment=ht(this.opts.ref),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this),this.onfocus=this.onfocus.bind(this),this.onblur=this.onblur.bind(this)}onpointermove(t){if(!t.defaultPrevented&&re(t))if(this.opts.disabled.current)this.content.onItemLeave(t);else{if(this.content.onItemEnter())return;const r=t.currentTarget;if(!ot(r))return;r.focus()}}onpointerleave(t){t.defaultPrevented||re(t)&&this.content.onItemLeave(t)}onfocus(t){nt(()=>{t.defaultPrevented||this.opts.disabled.current||b(this.#t,!0)})}onblur(t){nt(()=>{t.defaultPrevented||b(this.#t,!1)})}#e=A(()=>({id:this.opts.id.current,tabindex:-1,role:"menuitem","aria-disabled":Ve(this.opts.disabled.current),"data-disabled":Zn(this.opts.disabled.current),"data-highlighted":d(this.#t)?"":void 0,[this.content.parentMenu.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onfocus:this.onfocus,onblur:this.onblur,...this.attachment}));get props(){return d(this.#e)}set props(t){b(this.#e,t)}}class Ar{static create(t){const n=new Sr(t,Ue.get());return new Ar(t,n)}opts;item;root;#t=!1;constructor(t,n){this.opts=t,this.item=n,this.root=n.content.parentMenu.root,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this)}#e(){if(this.item.opts.disabled.current)return;const t=new CustomEvent("menuitemselect",{bubbles:!0,cancelable:!0});if(this.opts.onSelect.current(t),t.defaultPrevented){this.item.content.parentMenu.root.isUsingKeyboard.current=!1;return}this.opts.closeOnSelect.current&&this.item.content.parentMenu.root.opts.onClose()}onkeydown(t){const n=this.item.content.search!=="";if(!(this.item.opts.disabled.current||n&&t.key===ye)&&Ie.includes(t.key)){if(!ot(t.currentTarget))return;t.currentTarget.click(),t.preventDefault()}}onclick(t){this.item.opts.disabled.current||this.#e()}onpointerup(t){if(!t.defaultPrevented&&!this.#t){if(!ot(t.currentTarget))return;t.currentTarget?.click()}}onpointerdown(t){this.#t=!0}#n=A(()=>ve(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return d(this.#n)}set props(t){b(this.#n,t)}}class Er{static create(t){const n=Ue.get(),r=new Sr(t,n),i=Ct.get();return new Er(t,r,n,i)}opts;item;content;submenu;attachment;#t=null;constructor(t,n,r,i){this.opts=t,this.item=n,this.content=r,this.submenu=i,this.attachment=ht(this.opts.ref,s=>this.submenu.triggerNode=s),this.onpointerleave=this.onpointerleave.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),Ft(()=>{this.#e()})}#e(){this.#t!==null&&(this.content.domContext.getWindow().clearTimeout(this.#t),this.#t=null)}onpointermove(t){re(t)&&!this.item.opts.disabled.current&&!this.submenu.opts.open.current&&!this.#t&&!this.content.parentMenu.root.isPointerInTransit&&(this.#t=this.content.domContext.setTimeout(()=>{this.submenu.onOpen(),this.#e()},this.opts.openDelay.current))}onpointerleave(t){re(t)&&this.#e()}onkeydown(t){const n=this.content.search!=="";this.item.opts.disabled.current||n&&t.key===ye||Co[this.submenu.root.opts.dir.current].includes(t.key)&&(t.currentTarget.click(),t.preventDefault())}onclick(t){if(this.item.opts.disabled.current||!ot(t.currentTarget))return;t.currentTarget.focus();const n=new CustomEvent("menusubtriggerselect",{bubbles:!0,cancelable:!0});this.opts.onSelect.current(n),this.submenu.opts.open.current||(this.submenu.onOpen(),nt(()=>{const r=this.submenu.contentNode;r&&yr.dispatch(r)}))}#n=A(()=>ve({"aria-haspopup":"menu","aria-expanded":Ve(this.submenu.opts.open.current),"data-state":Ke(this.submenu.opts.open.current),"aria-controls":this.submenu.opts.open.current?this.submenu.contentId.current:void 0,[this.submenu.root.getBitsAttr("sub-trigger")]:"",onclick:this.onclick,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onkeydown:this.onkeydown,...this.attachment},this.item.props));get props(){return d(this.#n)}set props(t){b(this.#n,t)}}class Or{static create(t){return new Or(t,vr.get())}opts;root;attachment;constructor(t,n){this.opts=t,this.root=n,this.attachment=ht(this.opts.ref)}#t=A(()=>({id:this.opts.id.current,role:"group",[this.root.getBitsAttr("separator")]:"",...this.attachment}));get props(){return d(this.#t)}set props(t){b(this.#t,t)}}class Tr{static create(t){return new Tr(t,Ct.get())}opts;parentMenu;attachment;constructor(t,n){this.opts=t,this.parentMenu=n,this.attachment=ht(this.opts.ref,r=>this.parentMenu.triggerNode=r)}onclick=t=>{this.opts.disabled.current||t.detail!==0||(this.parentMenu.toggleOpen(),t.preventDefault())};onpointerdown=t=>{if(!this.opts.disabled.current){if(t.pointerType==="touch")return t.preventDefault();t.button===0&&t.ctrlKey===!1&&(this.parentMenu.toggleOpen(),this.parentMenu.opts.open.current||t.preventDefault())}};onpointerup=t=>{this.opts.disabled.current||t.pointerType==="touch"&&(t.preventDefault(),this.parentMenu.toggleOpen())};onkeydown=t=>{if(!this.opts.disabled.current){if(t.key===ye||t.key===Qn){this.parentMenu.toggleOpen(),t.preventDefault();return}t.key===Wt&&(this.parentMenu.onOpen(),t.preventDefault())}};#t=A(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current});#e=A(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":"menu","aria-expanded":Ve(this.parentMenu.opts.open.current),"aria-controls":d(this.#t),"data-disabled":Zn(this.opts.disabled.current),"data-state":Ke(this.parentMenu.opts.open.current),[this.parentMenu.root.getBitsAttr("trigger")]:"",onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown,...this.attachment}));get props(){return d(this.#e)}set props(t){b(this.#e,t)}}class Za{static create(t){const n=Ct.get();return Ct.set(new je(t,n.root,n))}}globalThis.bitsDismissableLayers??=new Map;class Ye{static create(t){return new Ye(t)}opts;#t;#e;#n={pointerdown:!1};#r=!1;#i=!1;#o=void 0;#a;#s=W;constructor(t){this.opts=t,this.#e=t.interactOutsideBehavior,this.#t=t.onInteractOutside,this.#a=t.onFocusOutside,B(()=>{this.#o=rr(this.opts.ref.current)});let n=W;const r=()=>{this.#d(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),n()};z([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return ji(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#e),n(),n=this.#f())}),r}),Ft(()=>{this.#d.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#u.destroy(),this.#s(),n()})}#c=t=>{t.defaultPrevented||this.opts.ref.current&&nt(()=>{!this.opts.ref.current||this.#m(t.target)||t.target&&!this.#i&&this.#a.current?.(t)})};#f(){return vt(I(this.#o,"pointerdown",vt(this.#h,this.#p),{capture:!0}),I(this.#o,"pointerdown",vt(this.#g,this.#u)),I(this.#o,"focusin",this.#c))}#l=t=>{let n=t;n.defaultPrevented&&(n=yn(t)),this.#t.current(t)};#u=mn(t=>{if(!this.opts.ref.current){this.#s();return}const n=this.opts.isValidEvent.current(t,this.opts.ref.current)||cs(t,this.opts.ref.current);if(!this.#r||this.#b()||!n){this.#s();return}let r=t;if(r.defaultPrevented&&(r=yn(r)),this.#e.current!=="close"&&this.#e.current!=="defer-otherwise-close"){this.#s();return}t.pointerType==="touch"?(this.#s(),this.#s=I(this.#o,"click",this.#l,{once:!0})):this.#t.current(r)},10);#h=t=>{this.#n[t.type]=!0};#g=t=>{this.#n[t.type]=!1};#p=()=>{this.opts.ref.current&&(this.#r=as(this.opts.ref.current))};#m=t=>this.opts.ref.current?nr(this.opts.ref.current,t):!1;#d=mn(()=>{for(const t in this.#n)this.#n[t]=!1;this.#r=!1},20);#b(){return Object.values(this.#n).some(Boolean)}#v=()=>{this.#i=!0};#y=()=>{this.#i=!1};props={onfocuscapture:this.#v,onblurcapture:this.#y}}function ss(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([t,{current:n}])=>n==="close"||n==="ignore")}function as(e){const t=[...globalThis.bitsDismissableLayers],n=ss(t);if(n)return n[0].opts.ref.current===e;const[r]=t[0];return r.opts.ref.current===e}function cs(e,t){const n=e.target;if(!er(n))return!1;const r=!!n.closest(`[${rs}]`);if("button"in e&&e.button>0&&!r)return!1;if("button"in e&&e.button===0&&r)return!0;const i=!!t.closest(`[${is}]`);return r&&i?!1:rr(n).documentElement.contains(n)&&!nr(t,n)&&Eo(e,t)}function yn(e){const t=e.currentTarget,n=e.target;let r;e instanceof PointerEvent?r=new PointerEvent(e.type,e):r=new PointerEvent("pointerdown",e);let i=!1;return new Proxy(r,{get:(o,a)=>a==="currentTarget"?t:a==="target"?n:a==="preventDefault"?()=>{i=!0,typeof o.preventDefault=="function"&&o.preventDefault()}:a==="defaultPrevented"?i:a in o?o[a]:e[a]})}function us(e,t){Y(t,!0);let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"onInteractOutside",3,W),i=y(t,"onFocusOutside",3,W),s=y(t,"isValidEvent",3,()=>!1);const o=Ye.create({id:x(()=>t.id),interactOutsideBehavior:x(()=>n()),onInteractOutside:x(()=>r()),enabled:x(()=>t.enabled),onFocusOutside:x(()=>i()),isValidEvent:x(()=>s()),ref:t.ref});var a=_(),c=N(a);$(c,()=>t.children??Q,()=>({props:o.props})),R(e,a),G()}globalThis.bitsEscapeLayers??=new Map;class Ge{static create(t){return new Ge(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new ze(this.opts.ref);let n=W;z(()=>t.enabled.current,r=>(r&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),n=this.#t()),()=>{n(),globalThis.bitsEscapeLayers.delete(this)}))}#t=()=>I(this.domContext.getDocument(),"keydown",this.#e,{passive:!1});#e=t=>{if(t.key!==eo||!ls(this))return;const n=new KeyboardEvent(t.type,t);t.preventDefault();const r=this.opts.escapeKeydownBehavior.current;r!=="close"&&r!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(n)}}function ls(e){const t=[...globalThis.bitsEscapeLayers],n=t.findLast(([i,{current:s}])=>s==="close"||s==="ignore");if(n)return n[0]===e;const[r]=t[0];return r===e}function fs(e,t){Y(t,!0);let n=y(t,"escapeKeydownBehavior",3,"close"),r=y(t,"onEscapeKeydown",3,W);Ge.create({escapeKeydownBehavior:x(()=>n()),onEscapeKeydown:x(()=>r()),enabled:x(()=>t.enabled),ref:t.ref});var i=_(),s=N(i);$(s,()=>t.children??Q),R(e,i),G()}class Xe{static instance;#t=et([]);#e=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||(this.instance=new Xe),this.instance}register(t){const n=this.getActive();n&&n!==t&&n.pause();const r=document.activeElement;r&&r!==document.body&&this.#n.set(t,r),this.#t.current=this.#t.current.filter(i=>i!==t),this.#t.current.unshift(t)}unregister(t){this.#t.current=this.#t.current.filter(r=>r!==t);const n=this.getActive();n&&n.resume()}getActive(){return this.#t.current[0]}setFocusMemory(t,n){this.#e.set(t,n)}getFocusMemory(t){return this.#e.get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,n){this.#n.set(t,n)}getPreFocusMemory(t){return this.#n.get(t)}clearPreFocusMemory(t){this.#n.delete(t)}}class qe{#t=!1;#e=null;#n=Xe.getInstance();#r=[];#i;constructor(t){this.#i=t}get paused(){return this.#t}pause(){this.#t=!0}resume(){this.#t=!1}#o(){for(const t of this.#r)t();this.#r=[]}mount(t){this.#e&&this.unmount(),this.#e=t,this.#n.register(this),this.#c(),this.#a()}unmount(){this.#e&&(this.#o(),this.#s(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),this.#e=null)}#a(){if(!this.#e)return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#e)return;const n=this.#l();n?(n.focus(),this.#n.setFocusMemory(this,n)):this.#e.focus()})}#s(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(t),!t.defaultPrevented){const n=this.#n.getPreFocusMemory(this);if(n&&document.contains(n))try{n.focus()}catch{document.body.focus()}}}#c(){if(!this.#e||!this.#i.trap.current)return;const t=this.#e,n=t.ownerDocument,r=o=>{if(this.#t||!this.#n.isActiveScope(this))return;const a=o.target;if(!a)return;if(t.contains(a))this.#n.setFocusMemory(this,a);else{const u=this.#n.getFocusMemory(this);if(u&&t.contains(u)&&gr(u))o.preventDefault(),u.focus();else{const f=this.#l(),l=this.#u()[0];(f||l||t).focus()}}},i=o=>{if(!this.#i.loop||this.#t||o.key!=="Tab"||!this.#n.isActiveScope(this))return;const a=this.#f();if(a.length===0)return;const c=a[0],u=a[a.length-1];!o.shiftKey&&n.activeElement===u?(o.preventDefault(),c.focus()):o.shiftKey&&n.activeElement===c&&(o.preventDefault(),u.focus())};this.#r.push(I(n,"focusin",r,{capture:!0}),I(t,"keydown",i));const s=new MutationObserver(()=>{const o=this.#n.getFocusMemory(this);if(o&&!t.contains(o)){const a=this.#l(),c=this.#u()[0],u=a||c;u?(u.focus(),this.#n.setFocusMemory(this,u)):t.focus()}});s.observe(t,{childList:!0,subtree:!0}),this.#r.push(()=>s.disconnect())}#f(){return this.#e?dr(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}#l(){return this.#f()[0]||null}#u(){return this.#e?hr(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let n=null;return z([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||(n=new qe(t)),n.mount(r)):n&&(n.unmount(),n=null)}),Ft(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}}function ds(e,t){Y(t,!0);let n=y(t,"enabled",3,!1),r=y(t,"trapFocus",3,!1),i=y(t,"loop",3,!1),s=y(t,"onCloseAutoFocus",3,W),o=y(t,"onOpenAutoFocus",3,W);const a=qe.use({enabled:x(()=>n()),trap:x(()=>r()),loop:i(),onCloseAutoFocus:x(()=>s()),onOpenAutoFocus:x(()=>o()),ref:t.ref});var c=_(),u=N(c);$(u,()=>t.focusScope??Q,()=>({props:a.props})),R(e,c),G()}globalThis.bitsTextSelectionLayers??=new Map;class Ze{static create(t){return new Ze(t)}opts;domContext;#t=W;constructor(t){this.opts=t,this.domContext=new ze(t.ref);let n=W;z(()=>this.opts.enabled.current,r=>(r&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),n(),n=this.#e()),()=>{n(),this.#r(),globalThis.bitsTextSelectionLayers.delete(this)}))}#e(){return vt(I(this.domContext.getDocument(),"pointerdown",this.#n),I(this.domContext.getDocument(),"pointerup",Hn(this.#r,this.opts.onPointerUp.current)))}#n=t=>{const n=this.opts.ref.current,r=t.target;!ot(n)||!ot(r)||!this.opts.enabled.current||!gs(this)||!Ji(n,r)||(this.opts.onPointerDown.current(t),!t.defaultPrevented&&(this.#t=hs(n,this.domContext.getDocument().body)))};#r=()=>{this.#t(),this.#t=W}}const wn=e=>e.style.userSelect||e.style.webkitUserSelect;function hs(e,t){const n=wn(t),r=wn(e);return Gt(t,"none"),Gt(e,"text"),()=>{Gt(t,n),Gt(e,r)}}function Gt(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function gs(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const n=t.at(-1);return n?n[0]===e:!1}function ps(e,t){Y(t,!0);let n=y(t,"preventOverflowTextSelection",3,!0),r=y(t,"onPointerDown",3,W),i=y(t,"onPointerUp",3,W);Ze.create({id:x(()=>t.id),onPointerDown:x(()=>r()),onPointerUp:x(()=>i()),enabled:x(()=>t.enabled&&n()),ref:t.ref});var s=_(),o=N(s);$(o,()=>t.children??Q),R(e,s),G()}globalThis.bitsIdCounter??={current:0};function Je(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}class ms{#t;#e=0;#n=P();#r;constructor(t){this.#t=t}#i(){this.#e-=1,this.#r&&this.#e<=0&&(this.#r(),b(this.#n,void 0),this.#r=void 0)}get(...t){return this.#e+=1,d(this.#n)===void 0&&(this.#r=zn(()=>{b(this.#n,this.#t(...t),!0)})),B(()=>()=>{this.#i()}),d(this.#n)}}const Zt=new ai;let Xt=P(null),Oe=null,Nt=null,Lt=!1;const xn=x(()=>{for(const e of Zt.values())if(e)return!0;return!1});let Te=null;const bs=new ms(()=>{function e(){document.body.setAttribute("style",d(Xt)??""),document.body.style.removeProperty("--scrollbar-width"),pn&&Oe?.(),b(Xt,null)}function t(){Nt!==null&&(window.clearTimeout(Nt),Nt=null)}function n(i,s){t(),Lt=!0,Te=Date.now();const o=Te,a=()=>{Nt=null,Te===o&&(Cr(Zt)?Lt=!1:(Lt=!1,s()))},c=i===null?24:i;Nt=window.setTimeout(a,c)}function r(){d(Xt)===null&&Zt.size===0&&!Lt&&b(Xt,document.body.getAttribute("style"),!0)}return z(()=>xn.current,()=>{if(!xn.current)return;r(),Lt=!1;const i=getComputedStyle(document.documentElement),s=getComputedStyle(document.body),o=i.scrollbarGutter?.includes("stable")||s.scrollbarGutter?.includes("stable"),a=window.innerWidth-document.documentElement.clientWidth,u={padding:Number.parseInt(s.paddingRight??"0",10)+a,margin:Number.parseInt(s.marginRight??"0",10)};a>0&&!o&&(document.body.style.paddingRight=`${u.padding}px`,document.body.style.marginRight=`${u.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",pn&&(Oe=I(document,"touchmove",f=>{f.target===document.documentElement&&(f.touches.length>1||f.preventDefault())},{passive:!1})),nt(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),Ft(()=>()=>{Oe?.()}),{get lockMap(){return Zt},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:n,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}});class vs{#t=Je();#e;#n=()=>null;#r;locked;constructor(t,n=()=>null){this.#e=t,this.#n=n,this.#r=bs.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),this.#r.lockMap.set(this.#t,this.#e??!1),this.locked=x(()=>this.#r.lockMap.get(this.#t)??!1,r=>this.#r.lockMap.set(this.#t,r)),Ft(()=>{if(this.#r.lockMap.delete(this.#t),Cr(this.#r.lockMap))return;const r=this.#n();this.#r.scheduleCleanupIfNoNewLocks(r,()=>{this.#r.resetBodyStyle()})}))}}function Cr(e){for(const[t,n]of e)if(n)return!0;return!1}function Sn(e,t){Y(t,!0);let n=y(t,"preventScroll",3,!0),r=y(t,"restoreScrollDelay",3,null);n()&&new vs(n(),()=>r()),G()}const ys=["top","right","bottom","left"],gt=Math.min,U=Math.max,ue=Math.round,qt=Math.floor,it=e=>({x:e,y:e}),ws={left:"right",right:"left",bottom:"top",top:"bottom"},xs={start:"end",end:"start"};function De(e,t,n){return U(e,gt(t,n))}function ct(e,t){return typeof e=="function"?e(t):e}function ut(e){return e.split("-")[0]}function Rt(e){return e.split("-")[1]}function Qe(e){return e==="x"?"y":"x"}function $e(e){return e==="y"?"height":"width"}const Ss=new Set(["top","bottom"]);function rt(e){return Ss.has(ut(e))?"y":"x"}function tn(e){return Qe(rt(e))}function As(e,t,n){n===void 0&&(n=!1);const r=Rt(e),i=tn(e),s=$e(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=le(o)),[o,le(o)]}function Es(e){const t=le(e);return[Ne(e),t,Ne(t)]}function Ne(e){return e.replace(/start|end/g,t=>xs[t])}const An=["left","right"],En=["right","left"],Os=["top","bottom"],Ts=["bottom","top"];function Cs(e,t,n){switch(e){case"top":case"bottom":return n?t?En:An:t?An:En;case"left":case"right":return t?Os:Ts;default:return[]}}function Ps(e,t,n,r){const i=Rt(e);let s=Cs(ut(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(Ne)))),s}function le(e){return e.replace(/left|right|bottom|top/g,t=>ws[t])}function Ms(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pr(e){return typeof e!="number"?Ms(e):{top:e,right:e,bottom:e,left:e}}function fe(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function On(e,t,n){let{reference:r,floating:i}=e;const s=rt(t),o=tn(t),a=$e(o),c=ut(t),u=s==="y",f=r.x+r.width/2-i.width/2,l=r.y+r.height/2-i.height/2,g=r[a]/2-i[a]/2;let h;switch(c){case"top":h={x:f,y:r.y-i.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:l};break;case"left":h={x:r.x-i.width,y:l};break;default:h={x:r.x,y:r.y}}switch(Rt(t)){case"start":h[o]-=g*(n&&u?-1:1);break;case"end":h[o]+=g*(n&&u?-1:1);break}return h}async function Fs(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:l="floating",altBoundary:g=!1,padding:h=0}=ct(t,e),m=Pr(h),v=a[g?l==="floating"?"reference":"floating":l],w=fe(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:c})),O=l==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},T=fe(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:O,offsetParent:E,strategy:c}):O);return{top:(w.top-T.top+m.top)/S.y,bottom:(T.bottom-w.bottom+m.bottom)/S.y,left:(w.left-T.left+m.left)/S.x,right:(T.right-w.right+m.right)/S.x}}const Rs=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:l}=On(u,r,c),g=r,h={},m=0;for(let v=0;v<a.length;v++){var p;const{name:w,fn:O}=a[v],{x:E,y:S,data:T,reset:C}=await O({x:f,y:l,initialPlacement:r,placement:g,strategy:i,middlewareData:h,rects:u,platform:{...o,detectOverflow:(p=o.detectOverflow)!=null?p:Fs},elements:{reference:e,floating:t}});f=E??f,l=S??l,h={...h,[w]:{...h[w],...T}},C&&m<=50&&(m++,typeof C=="object"&&(C.placement&&(g=C.placement),C.rects&&(u=C.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):C.rects),{x:f,y:l}=On(u,g,c)),v=-1)}return{x:f,y:l,placement:g,strategy:i,middlewareData:h}},Is=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:c}=t,{element:u,padding:f=0}=ct(e,t)||{};if(u==null)return{};const l=Pr(f),g={x:n,y:r},h=tn(i),m=$e(h),p=await o.getDimensions(u),v=h==="y",w=v?"top":"left",O=v?"bottom":"right",E=v?"clientHeight":"clientWidth",S=s.reference[m]+s.reference[h]-g[h]-s.floating[m],T=g[h]-s.reference[h],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let M=C?C[E]:0;(!M||!await(o.isElement==null?void 0:o.isElement(C)))&&(M=a.floating[E]||s.floating[m]);const V=S/2-T/2,F=M/2-p[m]/2-1,k=gt(l[w],F),q=gt(l[O],F),L=k,tt=M-p[m]-q,D=M/2-p[m]/2+V,lt=De(L,D,tt),X=!c.arrow&&Rt(i)!=null&&D!==lt&&s.reference[m]/2-(D<L?k:q)-p[m]/2<0,K=X?D<L?D-L:D-tt:0;return{[h]:g[h]+K,data:{[h]:lt,centerOffset:D-lt-K,...X&&{alignmentOffset:K}},reset:X}}}),ks=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:l=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...v}=ct(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=ut(i),O=rt(a),E=ut(a)===a,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),T=g||(E||!p?[le(a)]:Es(a)),C=m!=="none";!g&&C&&T.push(...Ps(a,p,m,S));const M=[a,...T],V=await c.detectOverflow(t,v),F=[];let k=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&F.push(V[w]),l){const D=As(i,o,S);F.push(V[D[0]],V[D[1]])}if(k=[...k,{placement:i,overflows:F}],!F.every(D=>D<=0)){var q,L;const D=(((q=s.flip)==null?void 0:q.index)||0)+1,lt=M[D];if(lt&&(!(l==="alignment"?O!==rt(lt):!1)||k.every(H=>rt(H.placement)===O?H.overflows[0]>0:!0)))return{data:{index:D,overflows:k},reset:{placement:lt}};let X=(L=k.filter(K=>K.overflows[0]<=0).sort((K,H)=>K.overflows[1]-H.overflows[1])[0])==null?void 0:L.placement;if(!X)switch(h){case"bestFit":{var tt;const K=(tt=k.filter(H=>{if(C){const ft=rt(H.placement);return ft===O||ft==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(ft=>ft>0).reduce((ft,zr)=>ft+zr,0)]).sort((H,ft)=>H[1]-ft[1])[0])==null?void 0:tt[0];K&&(X=K);break}case"initialPlacement":X=a;break}if(i!==X)return{reset:{placement:X}}}return{}}}};function Tn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Cn(e){return ys.some(t=>e[t]>=0)}const Ds=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...s}=ct(e,t);switch(i){case"referenceHidden":{const o=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=Tn(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Cn(a)}}}case"escaped":{const o=await r.detectOverflow(t,{...s,altBoundary:!0}),a=Tn(o,n.floating);return{data:{escapedOffsets:a,escaped:Cn(a)}}}default:return{}}}}},Mr=new Set(["left","top"]);async function Ns(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ut(n),a=Rt(n),c=rt(n)==="y",u=Mr.has(o)?-1:1,f=s&&c?-1:1,l=ct(t,e);let{mainAxis:g,crossAxis:h,alignmentAxis:m}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),c?{x:h*f,y:g*u}:{x:g*u,y:h*f}}const Ls=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,c=await Ns(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:o}}}}},Bs=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:s}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:c={fn:w=>{let{x:O,y:E}=w;return{x:O,y:E}}},...u}=ct(e,t),f={x:n,y:r},l=await s.detectOverflow(t,u),g=rt(ut(i)),h=Qe(g);let m=f[h],p=f[g];if(o){const w=h==="y"?"top":"left",O=h==="y"?"bottom":"right",E=m+l[w],S=m-l[O];m=De(E,m,S)}if(a){const w=g==="y"?"top":"left",O=g==="y"?"bottom":"right",E=p+l[w],S=p-l[O];p=De(E,p,S)}const v=c.fn({...t,[h]:m,[g]:p});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[h]:o,[g]:a}}}}}},_s=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=ct(e,t),f={x:n,y:r},l=rt(i),g=Qe(l);let h=f[g],m=f[l];const p=ct(a,t),v=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const E=g==="y"?"height":"width",S=s.reference[g]-s.floating[E]+v.mainAxis,T=s.reference[g]+s.reference[E]-v.mainAxis;h<S?h=S:h>T&&(h=T)}if(u){var w,O;const E=g==="y"?"width":"height",S=Mr.has(ut(i)),T=s.reference[l]-s.floating[E]+(S&&((w=o.offset)==null?void 0:w[l])||0)+(S?0:v.crossAxis),C=s.reference[l]+s.reference[E]+(S?0:((O=o.offset)==null?void 0:O[l])||0)-(S?v.crossAxis:0);m<T?m=T:m>C&&(m=C)}return{[g]:h,[l]:m}}}},Ws=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:c=()=>{},...u}=ct(e,t),f=await o.detectOverflow(t,u),l=ut(i),g=Rt(i),h=rt(i)==="y",{width:m,height:p}=s.floating;let v,w;l==="top"||l==="bottom"?(v=l,w=g===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(w=l,v=g==="end"?"top":"bottom");const O=p-f.top-f.bottom,E=m-f.left-f.right,S=gt(p-f[v],O),T=gt(m-f[w],E),C=!t.middlewareData.shift;let M=S,V=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(V=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=O),C&&!g){const k=U(f.left,0),q=U(f.right,0),L=U(f.top,0),tt=U(f.bottom,0);h?V=m-2*(k!==0||q!==0?k+q:U(f.left,f.right)):M=p-2*(L!==0||tt!==0?L+tt:U(f.top,f.bottom))}await c({...t,availableWidth:V,availableHeight:M});const F=await o.getDimensions(a.floating);return m!==F.width||p!==F.height?{reset:{rects:!0}}:{}}}};function we(){return typeof window<"u"}function It(e){return Fr(e)?(e.nodeName||"").toLowerCase():"#document"}function j(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function at(e){var t;return(t=(Fr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fr(e){return we()?e instanceof Node||e instanceof j(e).Node:!1}function Z(e){return we()?e instanceof Element||e instanceof j(e).Element:!1}function st(e){return we()?e instanceof HTMLElement||e instanceof j(e).HTMLElement:!1}function Pn(e){return!we()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof j(e).ShadowRoot}const zs=new Set(["inline","contents"]);function Yt(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=J(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!zs.has(i)}const Vs=new Set(["table","td","th"]);function Ks(e){return Vs.has(It(e))}const Hs=[":popover-open",":modal"];function xe(e){return Hs.some(t=>{try{return e.matches(t)}catch{return!1}})}const Us=["transform","translate","scale","rotate","perspective"],js=["transform","translate","scale","rotate","perspective","filter"],Ys=["paint","layout","strict","content"];function en(e){const t=nn(),n=Z(e)?J(e):e;return Us.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||js.some(r=>(n.willChange||"").includes(r))||Ys.some(r=>(n.contain||"").includes(r))}function Gs(e){let t=pt(e);for(;st(t)&&!Pt(t);){if(en(t))return t;if(xe(t))return null;t=pt(t)}return null}function nn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Xs=new Set(["html","body","#document"]);function Pt(e){return Xs.has(It(e))}function J(e){return j(e).getComputedStyle(e)}function Se(e){return Z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pt(e){if(It(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Pn(e)&&e.host||at(e);return Pn(t)?t.host:t}function Rr(e){const t=pt(e);return Pt(t)?e.ownerDocument?e.ownerDocument.body:e.body:st(t)&&Yt(t)?t:Rr(t)}function zt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Rr(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=j(i);if(s){const a=Le(o);return t.concat(o,o.visualViewport||[],Yt(i)?i:[],a&&n?zt(a):[])}return t.concat(i,zt(i,[],n))}function Le(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ir(e){const t=J(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=st(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=ue(n)!==s||ue(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function rn(e){return Z(e)?e:e.contextElement}function Ot(e){const t=rn(e);if(!st(t))return it(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=Ir(t);let o=(s?ue(n.width):n.width)/r,a=(s?ue(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const qs=it(0);function kr(e){const t=j(e);return!nn()||!t.visualViewport?qs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Zs(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==j(e)?!1:t}function wt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=rn(e);let o=it(1);t&&(r?Z(r)&&(o=Ot(r)):o=Ot(e));const a=Zs(s,n,r)?kr(s):it(0);let c=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,f=i.width/o.x,l=i.height/o.y;if(s){const g=j(s),h=r&&Z(r)?j(r):r;let m=g,p=Le(m);for(;p&&r&&h!==m;){const v=Ot(p),w=p.getBoundingClientRect(),O=J(p),E=w.left+(p.clientLeft+parseFloat(O.paddingLeft))*v.x,S=w.top+(p.clientTop+parseFloat(O.paddingTop))*v.y;c*=v.x,u*=v.y,f*=v.x,l*=v.y,c+=E,u+=S,m=j(p),p=Le(m)}}return fe({width:f,height:l,x:c,y:u})}function Ae(e,t){const n=Se(e).scrollLeft;return t?t.left+n:wt(at(e)).left+n}function Dr(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ae(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Js(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=at(r),a=t?xe(t.floating):!1;if(r===o||a&&s)return n;let c={scrollLeft:0,scrollTop:0},u=it(1);const f=it(0),l=st(r);if((l||!l&&!s)&&((It(r)!=="body"||Yt(o))&&(c=Se(r)),st(r))){const h=wt(r);u=Ot(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const g=o&&!l&&!s?Dr(o,c):it(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+g.x,y:n.y*u.y-c.scrollTop*u.y+f.y+g.y}}function Qs(e){return Array.from(e.getClientRects())}function $s(e){const t=at(e),n=Se(e),r=e.ownerDocument.body,i=U(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=U(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Ae(e);const a=-n.scrollTop;return J(r).direction==="rtl"&&(o+=U(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}const Mn=25;function ta(e,t){const n=j(e),r=at(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,c=0;if(i){s=i.width,o=i.height;const f=nn();(!f||f&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}const u=Ae(r);if(u<=0){const f=r.ownerDocument,l=f.body,g=getComputedStyle(l),h=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,m=Math.abs(r.clientWidth-l.clientWidth-h);m<=Mn&&(s-=m)}else u<=Mn&&(s+=u);return{width:s,height:o,x:a,y:c}}const ea=new Set(["absolute","fixed"]);function na(e,t){const n=wt(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=st(e)?Ot(e):it(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,c=i*s.x,u=r*s.y;return{width:o,height:a,x:c,y:u}}function Fn(e,t,n){let r;if(t==="viewport")r=ta(e,n);else if(t==="document")r=$s(at(e));else if(Z(t))r=na(t,n);else{const i=kr(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return fe(r)}function Nr(e,t){const n=pt(e);return n===t||!Z(n)||Pt(n)?!1:J(n).position==="fixed"||Nr(n,t)}function ra(e,t){const n=t.get(e);if(n)return n;let r=zt(e,[],!1).filter(a=>Z(a)&&It(a)!=="body"),i=null;const s=J(e).position==="fixed";let o=s?pt(e):e;for(;Z(o)&&!Pt(o);){const a=J(o),c=en(o);!c&&a.position==="fixed"&&(i=null),(s?!c&&!i:!c&&a.position==="static"&&!!i&&ea.has(i.position)||Yt(o)&&!c&&Nr(e,o))?r=r.filter(f=>f!==o):i=a,o=pt(o)}return t.set(e,r),r}function ia(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?xe(t)?[]:ra(t,this._c):[].concat(n),r],a=o[0],c=o.reduce((u,f)=>{const l=Fn(t,f,i);return u.top=U(l.top,u.top),u.right=gt(l.right,u.right),u.bottom=gt(l.bottom,u.bottom),u.left=U(l.left,u.left),u},Fn(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function oa(e){const{width:t,height:n}=Ir(e);return{width:t,height:n}}function sa(e,t,n){const r=st(t),i=at(t),s=n==="fixed",o=wt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=it(0);function u(){c.x=Ae(i)}if(r||!r&&!s)if((It(t)!=="body"||Yt(i))&&(a=Se(t)),r){const h=wt(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else i&&u();s&&!r&&i&&u();const f=i&&!r&&!s?Dr(i,a):it(0),l=o.left+a.scrollLeft-c.x-f.x,g=o.top+a.scrollTop-c.y-f.y;return{x:l,y:g,width:o.width,height:o.height}}function Ce(e){return J(e).position==="static"}function Rn(e,t){if(!st(e)||J(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return at(e)===n&&(n=n.ownerDocument.body),n}function Lr(e,t){const n=j(e);if(xe(e))return n;if(!st(e)){let i=pt(e);for(;i&&!Pt(i);){if(Z(i)&&!Ce(i))return i;i=pt(i)}return n}let r=Rn(e,t);for(;r&&Ks(r)&&Ce(r);)r=Rn(r,t);return r&&Pt(r)&&Ce(r)&&!en(r)?n:r||Gs(e)||n}const aa=async function(e){const t=this.getOffsetParent||Lr,n=this.getDimensions,r=await n(e.floating);return{reference:sa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ca(e){return J(e).direction==="rtl"}const ua={convertOffsetParentRelativeRectToViewportRelativeRect:Js,getDocumentElement:at,getClippingRect:ia,getOffsetParent:Lr,getElementRects:aa,getClientRects:Qs,getDimensions:oa,getScale:Ot,isElement:Z,isRTL:ca};function Br(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function la(e,t){let n=null,r;const i=at(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:f,top:l,width:g,height:h}=u;if(a||t(),!g||!h)return;const m=qt(l),p=qt(i.clientWidth-(f+g)),v=qt(i.clientHeight-(l+h)),w=qt(f),E={rootMargin:-m+"px "+-p+"px "+-v+"px "+-w+"px",threshold:U(0,gt(1,c))||1};let S=!0;function T(C){const M=C[0].intersectionRatio;if(M!==c){if(!S)return o();M?o(!1,M):r=setTimeout(()=>{o(!1,1e-7)},1e3)}M===1&&!Br(u,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(T,{...E,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,E)}n.observe(e)}return o(!0),s}function fa(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=rn(e),f=i||s?[...u?zt(u):[],...zt(t)]:[];f.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const l=u&&a?la(u,n):null;let g=-1,h=null;o&&(h=new ResizeObserver(w=>{let[O]=w;O&&O.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var E;(E=h)==null||E.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let m,p=c?wt(e):null;c&&v();function v(){const w=wt(e);p&&!Br(p,w)&&n(),p=w,m=requestAnimationFrame(v)}return n(),()=>{var w;f.forEach(O=>{i&&O.removeEventListener("scroll",n),s&&O.removeEventListener("resize",n)}),l?.(),(w=h)==null||w.disconnect(),h=null,c&&cancelAnimationFrame(m)}}const da=Ls,ha=Bs,ga=ks,pa=Ws,ma=Ds,ba=Is,va=_s,ya=(e,t,n)=>{const r=new Map,i={platform:ua,...n},s={...i.platform,_c:r};return Rs(e,t,{...i,platform:s})};function mt(e){return typeof e=="function"?e():e}function _r(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function In(e,t){const n=_r(e);return Math.round(t*n)/n}function Ja(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 wa(e){const t=e.whileElementsMounted,n=A(()=>mt(e.open)??!0),r=A(()=>mt(e.middleware)),i=A(()=>mt(e.transform)??!0),s=A(()=>mt(e.placement)??"bottom"),o=A(()=>mt(e.strategy)??"absolute"),a=A(()=>mt(e.sideOffset)??0),c=A(()=>mt(e.alignOffset)??0),u=e.reference;let f=P(0),l=P(0);const g=et(null);let h=P(Et(d(o))),m=P(Et(d(s))),p=P(Et({})),v=P(!1),w=!1;const O=A(()=>{const F=g.current?In(g.current,d(f)):d(f),k=g.current?In(g.current,d(l)):d(l);return d(i)?{position:d(h),left:"0",top:"0",transform:`translate(${F}px, ${k}px)`,...g.current&&_r(g.current)>=1.5&&{willChange:"transform"}}:{position:d(h),left:`${F}px`,top:`${k}px`}});let E;function S(){u.current===null||g.current===null||ya(u.current,g.current,{middleware:d(r),placement:d(s),strategy:d(o)}).then(F=>{const k=u.current;if(xa(k)){b(p,{...d(p),hide:{...d(p).hide,referenceHidden:!0}},!0);return}if(!d(n)&&d(f)!==0&&d(l)!==0){const L=Math.max(Math.abs(d(a)),Math.abs(d(c)),15);if(F.x<=L&&F.y<=L)return}b(f,F.x,!0),b(l,F.y,!0),b(h,F.strategy,!0),b(m,F.placement,!0),b(p,F.middlewareData,!0),b(v,!0)})}function T(){typeof E=="function"&&(E(),E=void 0)}function C(){if(T(),t===void 0){S();return}d(n)&&(u.current===null||g.current===null||(E=t(u.current,g.current,S)))}function M(){d(n)||b(v,!1)}function V(){return[d(r),d(s),d(o),d(a),d(c),d(n)]}return B(()=>{t===void 0&&d(n)&&S()}),B(C),B(()=>{if(t!==void 0){if(V(),!d(n)){w=!1;return}if(!d(v)){w=!1;return}if(!w){w=!0;return}S()}}),B(M),B(()=>T),{floating:g,reference:u,get strategy(){return d(h)},get placement(){return d(m)},get middlewareData(){return d(p)},get isPositioned(){return d(v)},get floatingStyles(){return d(O)},get update(){return S}}}function xa(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}const Sa={top:"bottom",right:"left",bottom:"top",left:"right"},on=new St("Floating.Root"),kn=new St("Floating.Content"),sn=new St("Floating.Root");class de{static create(t=!1){return t?sn.set(new de):on.set(new de)}anchorNode=et(null);customAnchorNode=et(null);triggerNode=et(null);constructor(){B(()=>{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 he{static create(t,n=!1){return n?kn.set(new he(t,sn.get())):kn.set(new he(t,on.get()))}opts;root;contentRef=et(null);wrapperRef=et(null);arrowRef=et(null);contentAttachment=ht(this.contentRef);wrapperAttachment=ht(this.wrapperRef);arrowAttachment=ht(this.arrowRef);arrowId=et(Je());#t=A(()=>{if(typeof this.opts.style=="string")return Bt(this.opts.style);if(!this.opts.style)return{}});#e=void 0;#n=new Ui(()=>this.arrowRef.current??void 0);#r=A(()=>this.#n?.width??0);#i=A(()=>this.#n?.height??0);#o=A(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#a=A(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]);#s=A(()=>d(this.#a).length>0);get hasExplicitBoundaries(){return d(this.#s)}set hasExplicitBoundaries(t){b(this.#s,t)}#c=A(()=>({padding:this.opts.collisionPadding.current,boundary:d(this.#a).filter(lo),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return d(this.#c)}set detectOverflowOptions(t){b(this.#c,t)}#f=P(void 0);#l=P(void 0);#u=P(void 0);#h=P(void 0);#g=A(()=>[da({mainAxis:this.opts.sideOffset.current+d(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&ha({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?va():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&ga({...this.detectOverflowOptions}),pa({...this.detectOverflowOptions,apply:({rects:t,availableWidth:n,availableHeight:r})=>{const{width:i,height:s}=t.reference;b(this.#f,n,!0),b(this.#l,r,!0),b(this.#u,i,!0),b(this.#h,s,!0)}}),this.arrowRef.current&&ba({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),Aa({arrowWidth:d(this.#r),arrowHeight:d(this.#i)}),this.opts.hideWhenDetached.current&&ma({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return d(this.#g)}set middleware(t){b(this.#g,t)}floating;#p=A(()=>Ea(this.floating.placement));get placedSide(){return d(this.#p)}set placedSide(t){b(this.#p,t)}#m=A(()=>Oa(this.floating.placement));get placedAlign(){return d(this.#m)}set placedAlign(t){b(this.#m,t)}#d=A(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return d(this.#d)}set arrowX(t){b(this.#d,t)}#b=A(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return d(this.#b)}set arrowY(t){b(this.#b,t)}#v=A(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return d(this.#v)}set cannotCenterArrow(t){b(this.#v,t)}#y=P();get contentZIndex(){return d(this.#y)}set contentZIndex(t){b(this.#y,t,!0)}#w=A(()=>Sa[this.placedSide]);get arrowBaseSide(){return d(this.#w)}set arrowBaseSide(t){b(this.#w,t)}#x=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":`${d(this.#f)}px`,"--bits-floating-available-height":`${d(this.#l)}px`,"--bits-floating-anchor-width":`${d(this.#u)}px`,"--bits-floating-anchor-height":`${d(this.#h)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...d(this.#t)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return d(this.#x)}set wrapperProps(t){b(this.#x,t)}#S=A(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:jn({...d(this.#t)}),...this.contentAttachment}));get props(){return d(this.#S)}set props(t){b(this.#S,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 d(this.#A)}set arrowStyle(t){b(this.#A,t)}constructor(t,n){this.opts=t,this.root=n,this.#e=t.updatePositionStrategy,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),z(()=>t.customAnchor.current,r=>{this.root.customAnchorNode.current=r}),this.floating=wa({strategy:()=>this.opts.strategy.current,placement:()=>d(this.#o),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...r)=>fa(...r,{animationFrame:this.#e?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),B(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),z(()=>this.contentRef.current,r=>{if(!r||!this.opts.enabled.current)return;const i=We(r),s=i.requestAnimationFrame(()=>{if(this.contentRef.current!==r||!this.opts.enabled.current)return;const o=i.getComputedStyle(r).zIndex;o!==this.contentZIndex&&(this.contentZIndex=o)});return()=>{i.cancelAnimationFrame(s)}}),B(()=>{this.floating.floating.current=this.wrapperRef.current})}}class ge{static create(t,n=!1){return n?new ge(t,sn.get()):new ge(t,on.get())}opts;root;constructor(t,n){this.opts=t,this.root=n,t.virtualEl&&t.virtualEl.current?n.triggerNode=Kn(t.virtualEl.current):n.triggerNode=t.ref}}function Aa(e){return{name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,o=i.arrow?.centerOffset!==0,a=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,f]=an(n),l={start:"0%",center:"50%",end:"100%"}[f],g=(i.arrow?.x??0)+a/2,h=(i.arrow?.y??0)+c/2;let m="",p="";return u==="bottom"?(m=o?l:`${g}px`,p=`${-c}px`):u==="top"?(m=o?l:`${g}px`,p=`${r.floating.height+c}px`):u==="right"?(m=`${-c}px`,p=o?l:`${h}px`):u==="left"&&(m=`${r.floating.width+c}px`,p=o?l:`${h}px`),{data:{x:m,y:p}}}}}function an(e){const[t,n="center"]=e.split("-");return[t,n]}function Ea(e){return an(e)[0]}function Oa(e){return an(e)[1]}function Qa(e,t){Y(t,!0);let n=y(t,"tooltip",3,!1);de.create(n());var r=_(),i=N(r);$(i,()=>t.children??Q),R(e,r),G()}function $a(e,t){Y(t,!0);let n=y(t,"tooltip",3,!1);ge.create({id:x(()=>t.id),virtualEl:x(()=>t.virtualEl),ref:t.ref},n());var r=_(),i=N(r);$(i,()=>t.children??Q),R(e,r),G()}function Ta(e,t){Y(t,!0);let n=y(t,"side",3,"bottom"),r=y(t,"sideOffset",3,0),i=y(t,"align",3,"center"),s=y(t,"alignOffset",3,0),o=y(t,"arrowPadding",3,0),a=y(t,"avoidCollisions",3,!0),c=y(t,"collisionBoundary",19,()=>[]),u=y(t,"collisionPadding",3,0),f=y(t,"hideWhenDetached",3,!1),l=y(t,"onPlaced",3,()=>{}),g=y(t,"sticky",3,"partial"),h=y(t,"updatePositionStrategy",3,"optimized"),m=y(t,"strategy",3,"fixed"),p=y(t,"dir",3,"ltr"),v=y(t,"style",19,()=>({})),w=y(t,"wrapperId",19,Je),O=y(t,"customAnchor",3,null),E=y(t,"tooltip",3,!1);const S=he.create({side:x(()=>n()),sideOffset:x(()=>r()),align:x(()=>i()),alignOffset:x(()=>s()),id:x(()=>t.id),arrowPadding:x(()=>o()),avoidCollisions:x(()=>a()),collisionBoundary:x(()=>c()),collisionPadding:x(()=>u()),hideWhenDetached:x(()=>f()),onPlaced:x(()=>l()),sticky:x(()=>g()),updatePositionStrategy:x(()=>h()),strategy:x(()=>m()),dir:x(()=>p()),style:x(()=>v()),enabled:x(()=>t.enabled),wrapperId:x(()=>w()),customAnchor:x(()=>O())},E()),T=A(()=>ve(S.wrapperProps,{style:{pointerEvents:"auto"}}));var C=_(),M=N(C);$(M,()=>t.content??Q,()=>({props:S.props,wrapperProps:d(T)})),R(e,C),G()}function Ca(e,t){Y(t,!0),ei(()=>{t.onPlaced?.()});var n=_(),r=N(n);$(r,()=>t.content??Q,()=>({props:{},wrapperProps:{}})),R(e,n),G()}function Pa(e,t){let n=y(t,"isStatic",3,!1),r=me(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var i=_(),s=N(i);{var o=c=>{Ca(c,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},a=c=>{Ta(c,Be({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};Mt(s,c=>{n()?c(o):c(a,!1)})}R(e,i)}var Ma=Hr("<!> <!>",1);function Wr(e,t){Y(t,!0);let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"trapFocus",3,!0),i=y(t,"isValidEvent",3,()=>!1),s=y(t,"customAnchor",3,null),o=y(t,"isStatic",3,!1),a=y(t,"tooltip",3,!1),c=y(t,"contentPointerEvents",3,"auto"),u=me(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"]);Pa(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:(l,g)=>{let h=()=>g?.().props,m=()=>g?.().wrapperProps;var p=Ma(),v=N(p);{var w=S=>{Sn(S,{get preventScroll(){return t.preventScroll}})},O=S=>{Sn(S,{get preventScroll(){return t.preventScroll}})};Mt(v,S=>{t.forceMount&&t.enabled?S(w):t.forceMount||S(O,1)})}var E=ni(v,2);ds(E,{get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get enabled(){return t.enabled},get trapFocus(){return r()},get forceMount(){return t.forceMount},get ref(){return t.ref},focusScope:(T,C)=>{let M=()=>C?.().props;fs(T,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(V,F)=>{us(V,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return i()},get enabled(){return t.enabled},get ref(){return t.ref},children:(q,L)=>{let tt=()=>L?.().props;ps(q,{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:(D,lt)=>{var X=_(),K=N(X);{let H=A(()=>({props:ve(u,h(),tt(),M(),{style:{pointerEvents:c()}}),wrapperProps:m()}));$(K,()=>t.popper??Q,()=>d(H))}R(D,X)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),R(l,p)},$$slots:{content:!0}}),G()}function tc(e,t){let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"trapFocus",3,!0),i=y(t,"isValidEvent",3,()=>!1),s=y(t,"customAnchor",3,null),o=y(t,"isStatic",3,!1),a=me(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=_(),u=N(c);{var f=l=>{Wr(l,Be({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 r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1,get ref(){return t.ref}},()=>a))};Mt(u,l=>{t.shouldRender&&l(f)})}R(e,c)}function ec(e,t){let n=y(t,"interactOutsideBehavior",3,"close"),r=y(t,"trapFocus",3,!0),i=y(t,"isValidEvent",3,()=>!1),s=y(t,"customAnchor",3,null),o=y(t,"isStatic",3,!1),a=me(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"]);Wr(e,Be({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 r()},get isValidEvent(){return i()},get onFocusOutside(){return t.onFocusOutside}},()=>a,{forceMount:!0}))}var Fa=pe("<title> </title>"),Ra=pe('<svg><!><path d="M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"></path></svg>');function nc(e,t){const n=ee(t,["children","$$slots","$$events","$$legacy"]),r=ee(n,["size","title"]);Y(t,!1);const i=te(),s=te();let o=y(t,"size",8,16),a=y(t,"title",8,void 0);Jt(()=>(At(n),At(a())),()=>{b(i,n["aria-label"]||n["aria-labelledby"]||a())}),Jt(()=>(d(i),At(n)),()=>{b(s,{"aria-hidden":d(i)?void 0:!0,role:d(i)?"img":void 0,focusable:Number(n.tabindex)===0?!0:void 0})}),Bn(),Ln();var c=Ra();Vn(c,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:o(),height:o(),...d(s),...r}));var u=Qt(c);{var f=l=>{var g=Fa(),h=Qt(g,!0);$t(g),Wn(()=>Dn(h,a())),R(l,g)};Mt(u,l=>{a()&&l(f)})}_n(),$t(c),R(e,c),G()}export{qo as $,po as A,to as B,St as C,Tr as D,Qn as E,Qa as F,Wa as G,ds as H,fs as I,us as J,Sn as K,Zn as L,Za as M,Ft as N,ji as O,ec as P,nt as Q,ho as R,ja as S,ps as T,Yo as U,si as V,nc as W,jn as X,Va as Y,br as Z,mr as _,Ar as a,ne as a0,Wt as a1,io as a2,ro as a3,$n as a4,no as a5,Jn as a6,Ya as a7,Ga as a8,Xa as a9,qa as aa,pn as ab,za as ac,ai as ad,x as b,Ha as c,Or as d,xr as e,tc as f,yr as g,Ja as h,ot as i,Er as j,$a as k,wr as l,ve as m,W as n,je as o,Ua as p,Ht as q,Re as r,ht as s,ze as t,Ka as u,ye as v,z as w,Ke as x,Ve as y,He as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as m,f as w,s as u,g as o,a4 as rt}from"./DSh-OF2y.js";import{a as d}from"./CFtRXHDP.js";function it(){return d("/api/workspace")}function at(e){return d("/api/workspace",{method:"PUT",body:JSON.stringify(e)})}function Ct(){return d("/api/workspace/mcp-config")}function J(){return d("/api/repos")}function st(e,i,s,f){return d("/api/repos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,display_name:i||void 0,description:s,...f?{private:!0}:{}})})}function ct(e,i,s){return d(`/api/repos/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,display_name:s||void 0})})}function lt(e){return d(`/api/repos/${encodeURIComponent(e)}`,{method:"DELETE"})}function ut(){return d("/api/apps")}function dt(e){return d(`/api/repos/${encodeURIComponent(e)}/entities?summary=true`)}function wt(e,i,s){return d(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(i)}/${encodeURIComponent(s)}`)}function Et(e,i,s,f,c){return d(`/api/repos/${encodeURIComponent(e)}/entities`,{method:"POST",body:JSON.stringify({entityType:i,entityId:s,data:f,content:c})})}function St(e,i,s){return d(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(i)}/${encodeURIComponent(s)}`,{method:"DELETE"})}function bt(e,i,s,f){return d(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(i)}/${encodeURIComponent(s)}`,{method:"PUT",body:JSON.stringify(f)})}function It(e,i,s,f){return d(`/api/repos/${encodeURIComponent(e)}/change-type`,{method:"POST",body:JSON.stringify({entityType:i,entityId:s,newType:f})})}function $t(e,i,s,f,c){return d(`/api/repos/${encodeURIComponent(e)}/transfer`,{method:"POST",body:JSON.stringify({entityType:i,entityId:s,targetRepo:f,mode:c})})}function Tt(){return d("/api/insights")}function kt(){return d("/api/insights/generate",{method:"POST"})}function vt(){return d("/api/preferences")}function Pt(e){return d("/api/preferences",{method:"PUT",body:JSON.stringify(e)})}function Ut(){return d("/api/views")}function Rt(e,i){return d("/api/views",{method:"POST",body:JSON.stringify({name:e,config:i})})}function Lt(e,i){return d(`/api/views/${e}`,{method:"PUT",body:JSON.stringify(i)})}function At(e){return d(`/api/views/${e}`,{method:"DELETE"})}function Ot(e){return d(`/api/repos/${encodeURIComponent(e)}/commit`,{method:"POST"})}function pt(e){return e.replace(/-/g," ").replace(/\b\w/g,i=>i.toUpperCase())}function M(e,i){return i||e.split("-").map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" ")}const ft="#e05050";function D(e){if(typeof document>"u")return;const i=e||ft,s=parseInt(i.slice(1,3),16),f=parseInt(i.slice(3,5),16),c=parseInt(i.slice(5,7),16),E=[document.documentElement,document.querySelector("[data-theme]")].filter(Boolean);for(const h of E)h.style.setProperty("--color-accent",i),h.style.setProperty("--color-accent-hover",mt(i,15)),h.style.setProperty("--color-accent-muted",`rgba(${s}, ${f}, ${c}, 0.08)`),h.style.setProperty("--color-link",j(i,15)),h.style.setProperty("--color-badge-bg",`rgba(${s}, ${f}, ${c}, 0.1)`),h.style.setProperty("--color-badge-text",j(i,20))}function mt(e,i){const s=Math.max(0,Math.round(parseInt(e.slice(1,3),16)*(1-i/100))),f=Math.max(0,Math.round(parseInt(e.slice(3,5),16)*(1-i/100))),c=Math.max(0,Math.round(parseInt(e.slice(5,7),16)*(1-i/100)));return`#${s.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`}function j(e,i){const s=Math.min(255,Math.round(parseInt(e.slice(1,3),16)+(255-parseInt(e.slice(1,3),16))*i/100)),f=Math.min(255,Math.round(parseInt(e.slice(3,5),16)+(255-parseInt(e.slice(3,5),16))*i/100)),c=Math.min(255,Math.round(parseInt(e.slice(5,7),16)+(255-parseInt(e.slice(5,7),16))*i/100));return`#${s.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`}function yt(){let e=m(""),i=m(null),s=m(null),f=m(!1),c=m(w([]));const E={};let h=m(w([])),v=m(!1),P=m(null),g=m(w({})),U=w({}),R=w({}),$=w({}),_=m(0),F=m(null),C=m(""),T=null,S=m(0),b=m(0),x=m("alpha");async function W(){u(v,!0),u(P,null),u(S,0),u(b,0);try{const[t,n,r]=await Promise.all([J(),ut().catch(()=>[]),it().catch(()=>({name:""}))]);u(h,n,!0),u(e,r.name,!0),u(i,r.about??null,!0),u(s,r.accent_color??null,!0),u(f,!0),D(o(s)),u(c,t.map(a=>({name:a.name,displayName:M(a.name,a.display_name),type:a.type,private:a.private,sync:a.sync,count:null,entities:[],loading:!1,loaded:!1})),!0),await Promise.all(o(c).map(a=>I(a.name)))}catch(t){u(P,t.message,!0)}finally{u(v,!1)}}function V(t,n,r){const a=o(c).find(l=>l.name===t);a&&(a.entities=a.entities.filter(l=>!(l.id===r&&l.entityType===n)),a.count=a.entities.length)}async function Q(t){o(c).find(r=>r.name===t)&&await I(t,!0)}async function B(){u(S,0),u(b,0),await Promise.all(o(c).map(t=>I(t.name,!0)))}async function I(t,n=!1){const r=o(c).find(l=>l.name===t);if(!r||r.loading||!n&&r.loaded)return;const a=(E[t]??0)+1;E[t]=a,n||(r.loading=!0);try{const l=await dt(t);if(E[t]!==a)return;let y=0,L=0;for(const p of l)y+=p.document?.wikilinks?.length??0,L+=p.subContentCount??0;u(S,o(S)+y),u(b,o(b)+L);const A=new Set(["name","created_at","updated_at"]);r.entities=l.filter(p=>!p.id.toLowerCase().startsWith("readme")).map(p=>({id:p.id,title:p.data?.name??pt(p.id),entityType:p.entityType,repo:t,hasSubContent:!!p.hasSubContent,wikilinks:p.document?.wikilinks??[],createdAt:p.data?.created_at??null,updatedAt:p.data?.updated_at??null,fields:Object.fromEntries(Object.entries(p.data??{}).filter(([O])=>!A.has(O))),status:p.data?.status??void 0,priority:p.data?.priority??void 0,assignee:p.data?.assignee??void 0,dueDate:p.data?.due_date??void 0})).sort((p,O)=>p.title.localeCompare(O.title)),r.count=r.entities.length,r.loaded=!0}catch(l){console.error(`Failed to load entities for ${t}:`,l)}finally{r.loading=!1}}function K(t){o(g)[t]=!o(g)[t]}function q(t){return o(g)[t]??!1}function k(t,n,r){return`${t}/${n}/${r}`}function H(t,n,r){const a=k(t,n,r),l=U[a]??!1;U[a]=!l,!l&&!R[a]?.loaded&&z(t,n,r)}function N(t,n,r){return U[k(t,n,r)]??!1}function Y(t,n,r){return R[k(t,n,r)]??{entries:[],loading:!1,loaded:!1}}async function z(t,n,r){const a=k(t,n,r);R[a]={entries:[],loading:!1,loaded:!0}}function G(t){const n=o(C).trim().toLowerCase();if(!n)return t;const r=[];for(const a of t){const l=a.entities.filter(y=>y.title.toLowerCase().includes(n)||y.id.toLowerCase().includes(n));l.length>0&&r.push({...a,entities:l,count:l.length})}return r}function X(t){if(t&&!o(C)?T={...o(g)}:!t&&o(C)&&T&&(u(g,T,!0),T=null),u(C,t,!0),t){const n=t.trim().toLowerCase();for(const r of o(c)){const a=r.entities.some(l=>l.title.toLowerCase().includes(n)||l.id.toLowerCase().includes(n));o(g)[r.name]=a}}}function Z(t){const n=t.startsWith("type:");$[t]=!($[t]??n)}function tt(t){return $[t]??!1}function et(t){return $[t]===!1}const nt=rt(()=>o(c).reduce((t,n)=>t+(n.count??0),0));function ot(t){return o(h).find(n=>n.entityTypes.includes(t))}return{get name(){return o(e)},get about(){return o(i)},get accentColor(){return o(s)},get nameLoaded(){return o(f)},async updateWorkspace(t){t.accent_color!==void 0&&(u(s,t.accent_color,!0),D(t.accent_color)),await at(t),t.name?.trim()&&u(e,t.name.trim(),!0),typeof t.about=="string"&&u(i,t.about,!0)},get repos(){return o(c)},get apps(){return o(h)},get loading(){return o(v)},get error(){return o(P)},get totalEntities(){return o(nt)},get totalLinks(){return o(S)},get totalFiles(){return o(b)},get hasTasks(){return o(c).some(t=>t.entities.some(n=>n.entityType==="task"))},get sortedRepos(){const t=[...o(c)].sort((n,r)=>n.name.localeCompare(r.name));return G(t)},get filteredIds(){const t=o(C).trim().toLowerCase();if(!t)return null;const n=new Set;for(const r of o(c))for(const a of r.entities)(a.title.toLowerCase().includes(t)||a.id.toLowerCase().includes(t))&&n.add(a.id);return n},get filterQuery(){return o(C)},setFilterQuery:X,get sortMode(){return o(x)},set sortMode(t){u(x,t,!0)},get recentEntities(){const t=o(C).trim().toLowerCase();let n=[];for(const r of o(c))for(const a of r.entities)t&&!a.title.toLowerCase().includes(t)&&!a.id.toLowerCase().includes(t)||n.push(a);return n.sort((r,a)=>{const l=r.updatedAt??"";return(a.updatedAt??"").localeCompare(l)})},get sidebarScrollTop(){return o(_)},set sidebarScrollTop(t){u(_,t,!0)},get lastAutoExpandedFor(){return o(F)},set lastAutoExpandedFor(t){u(F,t,!0)},load:W,loadEntities:I,removeEntity:V,refreshEntities:Q,refreshAll:B,toggleRepo:K,isExpanded:q,toggleEntity:H,isEntityExpanded:N,getEntityContents:Y,toggleFolder:Z,isFolderExpanded:tt,isFolderCollapsed:et,getAppForEntityType:ot,async renameCollectionTo(t,n,r){await ct(t,n,r);const a=o(c).find(l=>l.name===t);a&&(a.name=n,a.displayName=r||M(n),o(g)[t]&&(o(g)[n]=!0,delete o(g)[t]))},async removeCollection(t){await lt(t),u(c,o(c).filter(n=>n.name!==t),!0),delete o(g)[t]},async addCollection(t,n,r,a){await st(t,n,r,a);const l=await J();u(c,l.map(y=>o(c).find(A=>A.name===y.name)??{name:y.name,displayName:M(y.name,y.display_name),type:y.type,private:y.private,count:null,entities:[],loading:!1,loaded:!1}),!0),o(g)[t]=!0,await I(t)}}}const Mt=yt();export{Ot as a,Tt as b,Rt as c,At as d,vt as e,Ut as f,kt as g,wt as h,bt as i,Ct as j,It as k,St as l,Et as m,Pt as s,$t as t,Lt as u,Mt as w};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as r,f as y,g as s,s as e}from"./DSh-OF2y.js";import{s as u,g as b,b as p,e as w}from"./DSkxw4Ss.js";function A(){let a=r(y([])),n=r(null),o=r(!1),l=r(!1),i=r(""),g=r(!1);async function f(){try{const[t,m]=await Promise.all([p(),w()]);e(a,t.insights??[],!0),e(n,t.generatedAt??null,!0),e(i,m.home_brief??"",!0),e(l,!0),e(g,!0)}catch(t){console.error("Failed to load insights:",t)}}async function c(){e(o,!0);try{const t=await b();e(a,t.insights??[],!0),e(n,t.generatedAt??null,!0),e(l,!0)}catch(t){console.error("Failed to generate insights:",t)}finally{e(o,!1)}}async function h(t){e(i,t,!0),await u({home_brief:t})}async function d(){await u({home_brief:""}),e(i,""),e(a,[],!0),e(n,null)}return{get insights(){return s(a)},get generatedAt(){return s(n)},get loading(){return s(o)},get loaded(){return s(l)},get homeBrief(){return s(i)},get briefLoaded(){return s(g)},load:f,generate:c,saveBrief:h,reset:d}}const P=A();export{P as insightsStore};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as p,a as l,p as _e,b as H,s as pe,f as se}from"./b0XUoOIH.js";import{p as h,a0 as v,ae as le,b,g as f,a3 as G,c as w,r as A,a4 as J,t as N,l as te,s as re,d as Y,a as me,n as he,m as oe}from"./DSh-OF2y.js";import{s as m,a as ie}from"./CRnhIQbv.js";import{c as V}from"./DCVmM0L5.js";import{p as s,s as E,r as L,l as ae}from"./D-yNNNdf.js";import{D as be,h as ye,i as Ce,j as De}from"./BHue2Ock.js";import{n as x,b as K,c as Pe,H as Se,I as Oe,J as Fe,T as xe,K as ne,m as q,p as we}from"./DQYNi3YK.js";import{c as R}from"./DQ5NTKSo.js";import{i as B}from"./DT3KtxWU.js";import{c as Q,s as U}from"./CFtRXHDP.js";import{i as Ae}from"./vZ2iBqLE.js";function He(a,e){h(e,!0);let t=s(e,"open",15,!1),n=s(e,"onOpenChange",3,x),r=s(e,"onOpenChangeComplete",3,x);be.create({variant:K(()=>"dialog"),open:K(()=>t(),i=>{t(i),n()(i)}),onOpenChangeComplete:K(()=>r())});var c=p(),u=v(c);m(u,()=>e.children??le),l(a,c),b()}var ze=H("<!> <!>",1),Me=H("<!> <div><!></div>",1);function Ie(a,e){const t=_e();h(e,!0);let n=s(e,"id",19,()=>Pe(t)),r=s(e,"ref",15,null),c=s(e,"forceMount",3,!1),u=s(e,"onCloseAutoFocus",3,x),i=s(e,"onOpenAutoFocus",3,x),d=s(e,"onEscapeKeydown",3,x),y=s(e,"onInteractOutside",3,x),g=s(e,"trapFocus",3,!0),_=s(e,"preventScroll",3,!0),C=s(e,"restoreScrollDelay",3,null),D=L(e,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const o=ye.create({id:K(()=>n()),ref:K(()=>r(),S=>r(S))}),P=J(()=>q(D,o.props));var k=p(),X=v(k);{var T=S=>{Se(S,{get ref(){return o.opts.ref},loop:!0,get trapFocus(){return g()},get enabled(){return o.root.opts.open.current},get onOpenAutoFocus(){return i()},get onCloseAutoFocus(){return u()},focusScope:(ce,de)=>{let $=()=>de?.().props;Oe(ce,E(()=>f(P),{get enabled(){return o.root.opts.open.current},get ref(){return o.opts.ref},onEscapeKeydown:Z=>{d()(Z),!Z.defaultPrevented&&o.root.handleClose()},children:(Z,je)=>{Fe(Z,E(()=>f(P),{get ref(){return o.opts.ref},get enabled(){return o.root.opts.open.current},onInteractOutside:j=>{y()(j),!j.defaultPrevented&&o.root.handleClose()},children:(j,Be)=>{xe(j,E(()=>f(P),{get ref(){return o.opts.ref},get enabled(){return o.root.opts.open.current},children:(ue,Je)=>{var ee=p(),fe=v(ee);{var ve=F=>{var z=ze(),M=v(z);{var I=O=>{ne(O,{get preventScroll(){return _()},get restoreScrollDelay(){return C()}})};B(M,O=>{o.root.opts.open.current&&O(I)})}var W=G(M,2);{let O=J(()=>({props:q(f(P),$()),...o.snippetProps}));m(W,()=>e.child,()=>f(O))}l(F,z)},ge=F=>{var z=Me(),M=v(z);ne(M,{get preventScroll(){return _()}});var I=G(M,2);ie(I,O=>({...O}),[()=>q(f(P),$())]);var W=w(I);m(W,()=>e.children??le),A(I),l(F,z)};B(fe,F=>{e.child?F(ve):F(ge,!1)})}l(ue,ee)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};B(X,S=>{(o.shouldRender||c())&&S(T)})}l(a,k),b()}function tt(a,e){h(e,!0);let t=s(e,"open",15,!1),n=L(e,["$$slots","$$events","$$legacy","open","onOpenChange","children"]);var r=p(),c=v(r);V(c,()=>He,(u,i)=>{i(u,E({get onOpenChange(){return e.onOpenChange}},()=>n,{get open(){return t()},set open(d){t(d)},children:(d,y)=>{var g=p(),_=v(g);m(_,()=>e.children),l(d,g)},$$slots:{default:!0}}))}),l(a,r),b()}var Ve=H("<!> <!>",1);function rt(a,e){h(e,!0);let t=s(e,"size",3,"md"),n=L(e,["$$slots","$$events","$$legacy","children","class","size"]);var r=p(),c=v(r);V(c,()=>we,(u,i)=>{i(u,{children:(d,y)=>{var g=Ve(),_=v(g);V(_,()=>Ce,(D,o)=>{o(D,{class:"dialog-overlay"})});var C=G(_,2);{let D=J(()=>R("dialog-content",`dialog-${t()}`,e.class));V(C,()=>Ie,(o,P)=>{P(o,E({get class(){return f(D)}},()=>n,{children:(k,X)=>{var T=p(),S=v(T);m(S,()=>e.children),l(k,T)},$$slots:{default:!0}}))})}l(d,g)},$$slots:{default:!0}})}),l(a,r),b()}var Ee=H("<div><!></div>");function ot(a,e){h(e,!0);var t=Ee(),n=w(t);m(n,()=>e.children),A(t),N(r=>U(t,1,r),[()=>Q(R("dialog-header",e.class))]),l(a,t),b()}function at(a,e){h(e,!0);var t=p(),n=v(t);{let r=J(()=>R("dialog-title",e.class));V(n,()=>De,(c,u)=>{u(c,{get class(){return f(r)},children:(i,d)=>{var y=p(),g=v(y);m(g,()=>e.children),l(i,y)},$$slots:{default:!0}})})}l(a,t),b()}var Ke=H("<div><!></div>");function nt(a,e){h(e,!0);var t=Ke(),n=w(t);m(n,()=>e.children),A(t),N(r=>U(t,1,r),[()=>Q(R("dialog-body",e.class))]),l(a,t),b()}var Re=H("<div><!></div>");function st(a,e){h(e,!0);var t=Re(),n=w(t);m(n,()=>e.children),A(t),N(r=>U(t,1,r),[()=>Q(R("dialog-footer",e.class))]),l(a,t),b()}var ke=se("<title> </title>"),Te=se('<svg><!><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z"></path></svg>');function lt(a,e){const t=ae(e,["children","$$slots","$$events","$$legacy"]),n=ae(t,["size","title"]);h(e,!1);const r=oe(),c=oe();let u=s(e,"size",8,16),i=s(e,"title",8,void 0);te(()=>(Y(t),Y(i())),()=>{re(r,t["aria-label"]||t["aria-labelledby"]||i())}),te(()=>(f(r),Y(t)),()=>{re(c,{"aria-hidden":f(r)?void 0:!0,role:f(r)?"img":void 0,focusable:Number(t.tabindex)===0?!0:void 0})}),me(),Ae();var d=Te();ie(d,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:u(),height:u(),...f(c),...n}));var y=w(d);{var g=_=>{var C=ke(),D=w(C,!0);A(C),N(()=>pe(D,i())),l(_,C)};B(y,_=>{i()&&_(g)})}he(2),A(d),l(a,d),b()}export{lt as C,rt as D,ot as a,at as b,nt as c,st as d,tt as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as f,s as V,f as b}from"./b0XUoOIH.js";import{i as $}from"./vZ2iBqLE.js";import{p as y,l as p,s as v,d,g as r,a as L,c as h,n as C,r as u,b as A,m,t as B}from"./DSh-OF2y.js";import{i as E}from"./DT3KtxWU.js";import{a as N}from"./CRnhIQbv.js";import{l as g,p as _}from"./D-yNNNdf.js";var P=b("<title> </title>"),R=b('<svg><!><path d="M12 12H14V24H12z"></path><path d="M18 12H20V24H18z"></path><path d="M4,6V8H6V28a2,2,0,0,0,2,2H24a2,2,0,0,0,2-2V8h2V6ZM8,28V8H24V28Z"></path><path d="M12 2H20V4H12z"></path></svg>');function G(z,t){const e=g(t,["children","$$slots","$$events","$$legacy"]),x=g(e,["size","title"]);y(t,!1);const a=m(),n=m();let c=_(t,"size",8,16),i=_(t,"title",8,void 0);p(()=>(d(e),d(i())),()=>{v(a,e["aria-label"]||e["aria-labelledby"]||i())}),p(()=>(r(a),d(e)),()=>{v(n,{"aria-hidden":r(a)?void 0:!0,role:r(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),L(),$();var s=R();N(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:c(),height:c(),...r(n),...x}));var M=h(s);{var w=l=>{var o=P(),H=h(o,!0);u(o),B(()=>V(H,i())),f(l,o)};E(M,l=>{i()&&l(w)})}C(4),u(s),f(z,s),A()}var T=b("<title> </title>"),Y=b('<svg><!><path d="M2 26H30V28H2z"></path><path d="M25.4,9c0.8-0.8,0.8-2,0-2.8c0,0,0,0,0,0l-3.6-3.6c-0.8-0.8-2-0.8-2.8,0c0,0,0,0,0,0l-15,15V24h6.4L25.4,9z M20.4,4L24,7.6 l-3,3L17.4,7L20.4,4z M6,22v-3.6l10-10l3.6,3.6l-10,10H6z"></path></svg>');function I(z,t){const e=g(t,["children","$$slots","$$events","$$legacy"]),x=g(e,["size","title"]);y(t,!1);const a=m(),n=m();let c=_(t,"size",8,16),i=_(t,"title",8,void 0);p(()=>(d(e),d(i())),()=>{v(a,e["aria-label"]||e["aria-labelledby"]||i())}),p(()=>(r(a),d(e)),()=>{v(n,{"aria-hidden":r(a)?void 0:!0,role:r(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),L(),$();var s=Y();N(s,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:c(),height:c(),...r(n),...x}));var M=h(s);{var w=l=>{var o=T(),H=h(o,!0);u(o),B(()=>V(H,i())),f(l,o)};E(M,l=>{i()&&l(w)})}C(2),u(s),f(z,s),A()}export{I as E,G as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as p,s as H,f as b}from"./b0XUoOIH.js";import{i as M}from"./vZ2iBqLE.js";import{p as $,l as c,s as m,d as n,g as i,a as R,c as _,n as V,r as h,b as Z,m as u,t as k}from"./DSh-OF2y.js";import{i as B}from"./DT3KtxWU.js";import{a as C}from"./CRnhIQbv.js";import{l as v,p as g}from"./D-yNNNdf.js";var N=b("<title> </title>"),P=b('<svg><!><path d="M12,10H6.78A11,11,0,0,1,27,16h2A13,13,0,0,0,6,7.68V4H4v8h8Z"></path><path d="M20,22h5.22A11,11,0,0,1,5,16H3a13,13,0,0,0,23,8.32V28h2V20H20Z"></path></svg>');function G(x,t){const e=v(t,["children","$$slots","$$events","$$legacy"]),w=v(e,["size","title"]);$(t,!1);const a=u(),d=u();let f=g(t,"size",8,16),s=g(t,"title",8,void 0);c(()=>(n(e),n(s())),()=>{m(a,e["aria-label"]||e["aria-labelledby"]||s())}),c(()=>(i(a),n(e)),()=>{m(d,{"aria-hidden":i(a)?void 0:!0,role:i(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),R(),M();var r=P();C(r,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:f(),height:f(),...i(d),...w}));var y=_(r);{var z=o=>{var l=N(),A=_(l,!0);h(l),k(()=>H(A,s())),p(o,l)};B(y,o=>{s()&&o(z)})}V(2),h(r),p(x,r),Z()}export{G as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as o,a as r}from"../chunks/BAAbylyg.js";export{o as load_css,r as start};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/BU2bHQbQ.js","../chunks/DSh-OF2y.js","../chunks/BAAbylyg.js","../chunks/DC9z5DEo.js","../chunks/DSkxw4Ss.js","../chunks/CFtRXHDP.js","../chunks/BB_5th5W.js","../chunks/PPVm8Dsz.js","../chunks/CqkleIqs.js","../chunks/DnL9f0lc.js","../chunks/CX_61fY8.js","../chunks/CscoF-YL.js","../chunks/D7ZqAKi9.js","../chunks/C7VoTosa.js","../chunks/CrdV0ttd.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as A}from"../chunks/PPVm8Dsz.js";import{a as _,s as O,f as z,b as ee,c as te}from"../chunks/b0XUoOIH.js";import{p as E,l as $,s,d as f,g as t,a as T,c as w,n as k,r as M,b as P,m as x,t as R,a1 as ae,e as V,f as B,aV as U,a2 as W,aD as re,a3 as oe,ac as ie,ad as ne,a0 as le}from"../chunks/DSh-OF2y.js";import{i as C}from"../chunks/DT3KtxWU.js";import{a as D,c as se,s as de}from"../chunks/CRnhIQbv.js";import{h as ce}from"../chunks/B3NI-DOv.js";import{g as N}from"../chunks/BAAbylyg.js";import{w as j}from"../chunks/DSkxw4Ss.js";import{n as ue}from"../chunks/DC9z5DEo.js";import{a as L}from"../chunks/Sk0ODu4Y.js";import{r as G}from"../chunks/Bs4ovbtO.js";import{v as me}from"../chunks/0wBGAod7.js";import{insightsStore as he}from"../chunks/DVx_0hnZ.js";import{l as I,p as y,s as pe,r as fe}from"../chunks/D-yNNNdf.js";import{T as ve}from"../chunks/BUcIsKRk.js";import{R as ge}from"../chunks/lsAKkphT.js";import{i as F}from"../chunks/vZ2iBqLE.js";var _e=z("<title> </title>"),be=z('<svg><!><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"></path><path fill="none" d="M14 21.591 9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z" data-icon-path="inner-path"></path></svg>');function we(v,o){const e=I(o,["children","$$slots","$$events","$$legacy"]),g=I(e,["size","title"]);E(o,!1);const a=x(),m=x();let d=y(o,"size",8,16),n=y(o,"title",8,void 0);$(()=>(f(e),f(n())),()=>{s(a,e["aria-label"]||e["aria-labelledby"]||n())}),$(()=>(t(a),f(e)),()=>{s(m,{"aria-hidden":t(a)?void 0:!0,role:t(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),T(),F();var i=be();D(i,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...t(m),...g}));var r=w(i);{var p=l=>{var c=_e(),h=w(c,!0);M(c),R(()=>O(h,n())),_(l,c)};C(r,l=>{n()&&l(p)})}k(2),M(i),_(v,i),P()}var Me=z("<title> </title>"),$e=z('<svg><!><path fill="none" d="M14.9 7.2H17.1V24.799H14.9z" data-icon-path="inner-path" transform="rotate(-45 16 16)"></path><path d="M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"></path></svg>');function xe(v,o){const e=I(o,["children","$$slots","$$events","$$legacy"]),g=I(e,["size","title"]);E(o,!1);const a=x(),m=x();let d=y(o,"size",8,16),n=y(o,"title",8,void 0);$(()=>(f(e),f(n())),()=>{s(a,e["aria-label"]||e["aria-labelledby"]||n())}),$(()=>(t(a),f(e)),()=>{s(m,{"aria-hidden":t(a)?void 0:!0,role:t(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),T(),F();var i=$e();D(i,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...t(m),...g}));var r=w(i);{var p=l=>{var c=Me(),h=w(c,!0);M(c),R(()=>O(h,n())),_(l,c)};C(r,l=>{n()&&l(p)})}k(2),M(i),_(v,i),P()}var Ie=z("<title> </title>"),ye=z('<svg><!><path fill="none" d="M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z" data-icon-path="inner-path"></path><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,6a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"></path></svg>');function ze(v,o){const e=I(o,["children","$$slots","$$events","$$legacy"]),g=I(e,["size","title"]);E(o,!1);const a=x(),m=x();let d=y(o,"size",8,16),n=y(o,"title",8,void 0);$(()=>(f(e),f(n())),()=>{s(a,e["aria-label"]||e["aria-labelledby"]||n())}),$(()=>(t(a),f(e)),()=>{s(m,{"aria-hidden":t(a)?void 0:!0,role:t(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),T(),F();var i=ye();D(i,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...t(m),...g}));var r=w(i);{var p=l=>{var c=Ie(),h=w(c,!0);M(c),R(()=>O(h,n())),_(l,c)};C(r,l=>{n()&&l(p)})}k(2),M(i),_(v,i),P()}var Ae=z("<title> </title>"),Ee=z('<svg><!><path fill="none" d="M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z" data-icon-path="inner-path"></path><path d="M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"></path><path d="M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"></path></svg>');function Pe(v,o){const e=I(o,["children","$$slots","$$events","$$legacy"]),g=I(e,["size","title"]);E(o,!1);const a=x(),m=x();let d=y(o,"size",8,16),n=y(o,"title",8,void 0);$(()=>(f(e),f(n())),()=>{s(a,e["aria-label"]||e["aria-labelledby"]||n())}),$(()=>(t(a),f(e)),()=>{s(m,{"aria-hidden":t(a)?void 0:!0,role:t(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),T(),F();var i=Ee();D(i,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...t(m),...g}));var r=w(i);{var p=l=>{var c=Ae(),h=w(c,!0);M(c),R(()=>O(h,n())),_(l,c)};C(r,l=>{n()&&l(p)})}k(3),M(i),_(v,i),P()}function Se(v,o){E(o,!0);const e=ae("theme");let g=fe(o,["$$slots","$$events","$$legacy"]);ve(v,pe({get theme(){return e.current},class:"toaster group",style:"--normal-bg: var(--color-bg-elevated); --normal-text: var(--color-text-primary); --normal-border: var(--color-border-strong);"},()=>g,{loadingIcon:r=>{ge(r,{class:"size-4 animate-spin"})},successIcon:r=>{we(r,{class:"size-4"})},errorIcon:r=>{xe(r,{class:"size-4"})},infoIcon:r=>{ze(r,{class:"size-4"})},warningIcon:r=>{Pe(r,{class:"size-4"})},$$slots:{loadingIcon:!0,successIcon:!0,errorIcon:!0,infoIcon:!0,warningIcon:!0}})),P()}var Ze=ee('<div style="display: contents;"><!> <!></div>');function Ge(v,o){E(o,!0);const e=typeof localStorage<"u"?localStorage.getItem("theme"):null,g=typeof window<"u"&&window.matchMedia?.("(prefers-color-scheme: light)").matches?"light":"dark";let a=V(B(e||g));U("theme",{get current(){return t(a)},toggle(){s(a,t(a)==="dark"?"light":"dark",!0),localStorage.setItem("theme",t(a))}});const d=typeof localStorage<"u"?localStorage.getItem("chatMode"):null,n=typeof localStorage<"u"?localStorage.getItem("chatOpen"):null,i=d==="panel"||d==="full"?d:d==="closed"?"closed":n==="true"?"panel":"closed";let r=V(B(i)),p=V(B(i==="closed"?"panel":i));function l(){localStorage.setItem("chatMode",t(r))}U("chat",{get open(){return t(r)!=="closed"},get mode(){return t(r)},toggle(){s(r,t(r)==="closed"?t(p):"closed",!0),l()},close(){s(r,"closed"),l()},expand(){s(r,"full"),s(p,"full"),l()},collapse(){s(r,"panel"),s(p,"panel"),l()},sendPrompt(u){t(r)==="closed"&&(s(r,t(p),!0),l()),A(()=>import("../chunks/BU2bHQbQ.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url).then(b=>{b.chatStore.send(u),setTimeout(()=>b.chatStore.triggerScroll(),100)})}}),W(()=>{document.documentElement.setAttribute("data-theme",t(a))});let h=V(null);W(()=>{if(L.loading)return;const u=L.user?.email??(L.authEnabled?null:"__open__");u&&u!==t(h)&&(t(h)!==null&&ue.deselect(),s(h,u,!0),j.load(),me.load(),he.load(),G.connect()),!u&&t(h)&&(s(h,null),G.disconnect())}),re(async()=>{const u=window.location.pathname,b=u==="/login",S=u==="/setup",{authenticated:q,authEnabled:Q,needsSetup:X}=await L.checkAuth();if(X&&!S){N("/setup");return}if(Q&&!q&&!b){N("/login");return}if(q&&(b||S)){N("/");return}b||S||(A(()=>import("../chunks/BB_5th5W.js"),__vite__mapDeps([6,7,8]),import.meta.url).catch(()=>{}),Promise.all([A(()=>import("../chunks/CX_61fY8.js"),[],import.meta.url),A(()=>import("../chunks/DnL9f0lc.js").then(Z=>Z.i),__vite__mapDeps([9,10]),import.meta.url),A(()=>import("../chunks/CscoF-YL.js"),__vite__mapDeps([11,10,9,12,13,14]),import.meta.url),A(()=>import("../chunks/D7ZqAKi9.js"),__vite__mapDeps([12,13,10,9]),import.meta.url),A(()=>import("../chunks/C7VoTosa.js").then(Z=>Z.i),[],import.meta.url)]).catch(()=>{}),window.addEventListener("sg-theme-change",Z=>{s(a,Z.detail,!0)}))});var H=Ze();ce("12qhfyh",u=>{ie(()=>{ne.title=(j.name||"Studiograph")??""})});var Y=w(H);{var J=u=>{var b=te(),S=le(b);de(S,()=>o.children),_(u,b)};C(Y,u=>{L.loading||u(J)})}var K=oe(Y,2);Se(K,{}),M(H),R(()=>se(H,"data-theme",t(a))),_(v,H),P()}export{Ge as component};
|