@cmach_socket/opencode-qq-bot 0.10.0 → 0.10.1

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.
@@ -0,0 +1,8 @@
1
+ (function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Array.isArray,t=Array.prototype.indexOf,n=Array.prototype.includes,r=Array.from,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,s=Object.prototype,c=Array.prototype,l=Object.getPrototypeOf,u=Object.isExtensible;function d(e){return typeof e==`function`}var f=()=>{};function p(e){return e()}function m(e){for(var t=0;t<e.length;t++)e[t]()}function h(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function g(e,t,n=!1){return e===void 0?n?t():t:e}function _(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);let n=[];for(let r of e)if(n.push(r),n.length===t)break;return n}var v=1<<24,y=1024,b=2048,x=4096,S=8192,C=16384,w=32768,ee=1<<25,te=65536,ne=1<<19,re=1<<20,ie=1<<25,ae=1<<21,oe=1<<22,se=1<<23,ce=Symbol(`$state`),le=Symbol(`component`),ue=Symbol(`legacy props`),T=Symbol(``),de=Symbol(`attributes`),fe=Symbol(`class`),pe=Symbol(`style`),me=Symbol(`text`),he=Symbol(`form reset`),ge=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},_e=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`),ve={},E=Symbol(`uninitialized`),ye=`http://www.w3.org/1999/xhtml`,be=`http://www.w3.org/2000/svg`,xe=`@attach`;function Se(){console.warn(`https://svelte.dev/e/derived_inert`)}function Ce(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function we(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function Te(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var D=!1;function Ee(e){D=e}var De;function Oe(e){if(e===null)throw Ce(),ve;return De=e}function ke(){return Oe(yn(De))}function O(e){if(D){if(yn(De)!==null)throw Ce(),ve;De=e}}function k(e=1){if(D){for(var t=e,n=De;t--;)n=yn(n);De=n}}function Ae(e=!0){for(var t=0,n=De;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=yn(n);e&&n.remove(),n=i}}function je(e){if(!e||e.nodeType!==8)throw Ce(),ve;return e.data}function Me(e){return e===this.v}function Ne(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Pe(e){return!Ne(e,this.v)}function Fe(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Ie(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Le(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Re(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function ze(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Be(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Ve(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function He(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Ue(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function We(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Ge(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ke(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var qe=!1;function Je(){qe=!0}function Ye(e){let t=e.p;for(;t!==null&&t.c===null;)t=t.p;return t?.c??null}function Xe(e,t){return e===null&&Fe(t),e.c??=new Map(Ye(e)||void 0)}var Ze=null;function Qe(e){Ze=e}function $e(e){return Xe(Ze,`getContext`).get(e)}function et(e,t){return Xe(Ze,`setContext`).set(e,t),t}function tt(e){return Xe(Ze,`hasContext`).has(e)}function nt(){return Xe(Ze,`getAllContexts`)}function A(e,t=!1,n){Ze={p:Ze,i:!1,c:null,e:null,s:e,x:null,r:ar,l:qe&&!t?{s:null,u:null,$:[]}:null}}function j(e){var t=Ze,n=t.e;if(n!==null){t.e=null;for(var r of n)Mn(r)}return e!==void 0&&(t.x=e),t.i=!0,Ze=t.p,rt(e)}function rt(e={}){return i(e,le,{value:!0}),e}function it(){return!qe||Ze!==null&&Ze.l===null}var at=[];function ot(){var e=at;at=[],m(e)}function st(e){if(at.length===0&&!It){var t=at;queueMicrotask(()=>{t===at&&ot()})}at.push(e)}function ct(){for(;at.length>0;)ot()}var lt=~(b|x|y);function ut(e,t){e.f=e.f&lt|t}function dt(e){e.f&512||e.deps===null?ut(e,y):ut(e,x)}function ft(e,t){e.f&2048?t.set(e,b):e.f&4096&&t.get(e)!==2048&&t.set(e,x),ut(e,y)}function pt(e,t){if(t){let t=document.body;e.autofocus=!0,st(()=>{document.activeElement===t&&e.focus()})}}var mt=!1;function ht(){mt||(mt=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[he]?.()})},{capture:!0}))}function gt(e){var t=nr,n=ar;ir(null),or(null);try{return e()}finally{ir(t),or(n)}}function _t(e,t,n,r=n){e.addEventListener(t,()=>gt(n));let i=e[he];e[he]=i?()=>{i(),r(!0)}:()=>r(!0),ht()}function vt(e,t,n,r){let i=it()?St:Tt;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=ar,c=yt(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){Tn(e,s)}bt()}}var d=xt();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>wt(e))).then(u).catch(e=>Tn(e,s)).finally(d)}l?l.then(()=>{s.f&16384?d():(c(),f(),bt())}):f()}function yt(){var e=ar,t=nr,n=Ze,r=Mt;return function(i=!0){or(e),ir(t),Qe(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function bt(e=!0){or(null),ir(null),Qe(null),e&&Mt?.deactivate()}function xt(){var e=ar,t=e.b,n=Mt,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function St(e){var t=2|b;return ar!==null&&(ar.f|=ne),{ctx:Ze,deps:null,effects:null,equals:Me,f:t,fn:e,reactions:null,rv:0,v:E,wv:0,parent:ar,ac:null}}var Ct=Symbol(`obsolete`);function wt(e,t,n){let r=ar;r===null&&Ie();var i=void 0,a=$t(E),o=!nr,s=new Set;return Ln(()=>{var t=ar,n=h();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ge&&n.reject(e)}).finally(bt)}catch(e){n.reject(e),bt()}var c=Mt;if(o){if(t.f&32768)var l=xt();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(Ct);else for(let e of s.values())e.reject(Ct);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==Ct&&(c.activate(),t?(a.f|=se,rn(a,t)):(a.f&8388608&&(a.f^=se),rn(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),An(()=>{for(let e of s)e.reject(Ct)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function M(e){let t=St(e);return cr(t),t}function Tt(e){let t=St(e);return t.equals=Pe,t}function Et(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Gn(t[n])}}function Dt(e){var t,n=ar,r=e.parent;if(!er&&r!==null&&e.v!==E&&r.f&24576)return Se(),e.v;or(r);try{Et(e),t=br(e)}finally{or(n)}return t}function Ot(e){var t=Dt(e);!e.equals(t)&&(e.wv=_r(),(!Mt?.is_fork||e.deps===null)&&(Mt===null?e.v=t:(Mt.capture(e,t,!0),Nt?.capture(e,t,!0)),e.deps===null))?ut(e,y):er||(Pt===null?dt(e):(kn()||Mt?.is_fork)&&Pt.set(e,t))}function kt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&gt(()=>{t.ac.abort(ge),t.ac=null}),t.fn!==null&&(t.teardown=f),Cr(t,0),Un(t))}function At(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&wr(t)}var jt=null,Mt=null,Nt=null,Pt=null,Ft=null,It=!1,Lt=!1,Rt=null,zt=null,Bt=0,Vt=1,Ht=class e{id=Vt++;started=!1;linked=!0;prev=null;next=null;async_deriveds=new Map;current=new Map;previous=new Map;#e=new Set;#t=new Set;#n=0;#r=new Map;#i=null;#a=[];#o=[];#s=new Map;#c=new Map;#l=new Set;is_fork=!1;#u=!1;constructor(){jt===null?jt=this:(jt.next=this,this.prev=jt),jt=this}#d(){if(this.is_fork)return!0;for(let e of this.#r.keys())if(!this.#f(e))return!0;return!1}#f(e){for(var t=e;t!==null;t=t.parent)if(this.#c.has(t))return!0;return!1}skip_effect(e){this.#c.has(e)||this.#c.set(e,{d:[],m:[]}),this.#l.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#c.get(e);if(n){this.#c.delete(e);for(var r of n.d)ut(r,b),t(r);for(r of n.m)ut(r,x),t(r)}this.#l.add(e)}#p(){var e=[];for(let i of this.#a)if(!(i.f&16384||!(i.f&6144))){for(var t=i,n=!1;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024)){n=!0;break}t.f^=y}}n||e.push(t)}return this.#a=[],e}#m(){this.started=!0;for(let[e,t]of this.#s)ut(e,t),this.schedule(e);this.apply();for(var t=Rt=[],n=[],r=zt=[];this.#a.length>0;){Bt++>1e3&&(this.#b(),Wt());for(let e of this.#p())try{this.#h(e,t,n)}catch(t){throw Yt(e),this.#d()||this.discard(),t}}if(Mt=null,r.length>0){var i=e.ensure();for(let e of r)i.schedule(e)}if(Rt=null,zt=null,this.#d()){this.#y(n),this.#y(t);for(let[e,t]of this.#c)Jt(e,t);r.length>0&&Mt.#m();return}let a=this.#g();if(a)this.#y(n),this.#y(t),a.#v(this);else{this.#s.clear();for(let e of this.#e)e(this);this.#e.clear(),Nt=this,Kt(n),Kt(t),Nt=null,this.#i?.resolve();var o=Mt;this.#n===0&&(this.#a.length===0||o!==null)&&this.#b(),o!==null&&(Zt.clear(),o.#m())}}#h(e,t,n){e.f^=y;for(var r=e.first;r!==null;){var i=r.f,a=!!(i&96);if(!(a&&i&1024||i&8192||this.#c.has(r))&&r.fn!==null){a?r.f^=y:i&4?t.push(r):vr(r)&&(i&16&&this.add_dirty_reaction(r,x),wr(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#g(){for(var e=this.prev;e!==null;e=e.prev)if(!e.is_fork&&this.#_(e))return e;return null}#_(e){for(let[t,[,n]]of this.current)if(!n&&e.current.has(t))return!0;return!1}#v(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_reactions(e.#s);let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#s.delete(i),ut(i,b),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#b(),Mt=this,this.#m()}#y(e){for(var t=0;t<e.length;t+=1)ft(e[t],this.#s)}capture(e,t,n=!1){e.v!==E&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),Pt?.set(e,t)),this.is_fork||(e.v=t)}activate(){Mt=this}deactivate(){Mt=null,Pt=null}flush(){try{Lt=!0,Mt=this,this.#m()}finally{Bt=0,Ft=null,Rt=null,zt=null,Lt=!1,Mt=null,Pt=null,Zt.clear()}}discard(){for(let e of this.#t)e(this);this.#t.clear();for(let e of this.async_deriveds.values())e.reject(Ct);this.#b(),this.#i?.resolve()}register_created_effect(e){this.#o.push(e)}increment(e,t){if(this.#n+=1,e){let e=this.#r.get(t)??0;this.#r.set(t,e+1)}}decrement(e,t){if(--this.#n,e){let e=this.#r.get(t)??0;e===1?this.#r.delete(t):this.#r.set(t,e-1)}this.#u||(this.#u=!0,st(()=>{this.#u=!1,this.linked&&this.flush()}))}transfer_reactions(e){for(let[t,n]of e)this.add_dirty_reaction(t,n);e.clear()}add_dirty_reaction(e,t){(t===2048||this.#s.get(e)!==2048)&&this.#s.set(e,t)}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#i??=h()).promise}static ensure(){if(Mt===null){let t=Mt=new e;!Lt&&!It&&st(()=>{t.started||t.flush()})}return Mt}apply(){Pt=null}schedule(e){Ft=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)?e.b.defer_effect(e):this.#a.push(e)}#b(){if(this.linked){var e=this.prev,t=this.next;e===null||(e.next=t),t===null?jt=e:t.prev=e,this.linked=!1}}};function Ut(e){var t=It,n=Nt;Nt=null,It=!0;try{var r;for(e&&(Ut(),r=e());;){if(ct(),Mt===null)return r;Mt.flush()}}finally{It=t,Nt=n}}function Wt(){try{Ve()}catch(e){Tn(e,Ft)}}var Gt=null;function Kt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&vr(r)&&(Gt=new Set,wr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&qn(r),Gt?.size>0)){Zt.clear();for(let e of Gt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Gt.has(n)&&(Gt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||wr(n)}}Gt.clear()}}Gt=null}}function qt(e){Mt.schedule(e)}function Jt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),ut(e,y);for(var n=e.first;n!==null;)Jt(n,t),n=n.next}}function Yt(e){ut(e,y);for(var t=e.first;t!==null;)Yt(t),t=t.next}var Xt=new Set,Zt=new Map,Qt=!1;function $t(e,t){return{f:0,v:e,reactions:null,equals:Me,rv:0,wv:0}}function N(e,t){let n=$t(e,t);return cr(n),n}function en(e,t=!1,n=!0){let r=$t(e);return t||(r.equals=Pe),qe&&n&&Ze!==null&&Ze.l!==null&&(Ze.l.s??=[]).push(r),r}function P(e,t,n=!1){return nr!==null&&(!rr||nr.f&131072)&&it()&&nr.f&4325394&&(sr===null||!sr.has(e))&&Ge(),rn(e,n?ln(t):t,zt)}var tn=null,nn=0;function rn(e,t,n=null){if(!e.equals(t)){er?Zt.set(e,t):Zt.has(e)||Zt.set(e,e.v);var r=Ht.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&Dt(t),Pt===null&&dt(t)}e.wv=_r(),tn=null,nn=0,cn(e,b,n),tn=null,it()&&ar!==null&&ar.f&1024&&!(ar.f&96)&&(dr===null?fr([e]):dr.push(e)),!r.is_fork&&Xt.size>0&&!Qt&&an()}return t}function an(){Qt=!1;for(let e of Xt){e.f&1024&&ut(e,x);let t;try{t=vr(e)}catch{t=!0}t&&wr(e)}Xt.clear()}function on(e,t=1){var n=B(e),r=t===1?n++:n--;return P(e,n),r}function sn(e){P(e,e.v+1)}function cn(e,t,n){var r=e.reactions;if(r!==null){var i=it(),a=r.length;if(nn+=a,nn>1e5&&tn===null&&(tn=new Set),tn!==null){if(tn.has(e))return;tn.add(e)}for(var o=0;o<a;o++){var s=r[o],c=s.f;if(i||s!==ar){var l=(c&b)===0;if(l&&ut(s,t),c&131072)Xt.add(s);else if(c&2){var u=s;Pt?.delete(u),cn(u,x,n)}else if(l){var d=s;c&16&&Gt!==null&&Gt.add(d),n===null?qt(d):n.push(d)}}}}}function ln(t){if(typeof t!=`object`||!t||ce in t||le in t)return t;let n=l(t);if(n!==s&&n!==c)return t;var r=new Map,i=e(t),o=N(0),u=null,d=hr,f=e=>{if(hr===d)return e();var t=nr,n=hr;ir(null),gr(d);var r=e();return ir(t),gr(n),r};return i&&r.set(`length`,N(t.length,u)),new Proxy(t,{defineProperty(e,t,n){`value`in n&&n.configurable!==!1&&n.enumerable!==!1&&n.writable!==!1||Ue();var i=r.get(t);return i===void 0?f(()=>{var e=N(n.value,u);return r.set(t,e),e}):P(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>N(E,u));r.set(t,e),sn(o)}}else P(n,E),sn(o);return!0},get(e,n,i){if(n===ce)return t;var o=r.get(n),s=n in e;if(o===void 0&&(!s||a(e,n)?.writable)&&(o=f(()=>N(ln(s?e[n]:E),u)),r.set(n,o)),o!==void 0){var c=B(o);return c===E?void 0:c}return Reflect.get(e,n,i)},getOwnPropertyDescriptor(e,t){this.has?.(e,t);var n=Reflect.getOwnPropertyDescriptor(e,t),i=r.get(t);if(i!==void 0){var a=B(i);if(a===E)return;if(n&&`value`in n)n.value=a;else return{enumerable:!0,configurable:!0,value:a,writable:!0}}return n},has(e,t){if(t===ce)return!0;var n=r.get(t),i=n!==void 0&&n.v!==E||Reflect.has(e,t);return(n!==void 0||(ar!==null||nr!==null)&&(!i||a(e,t)?.writable))&&(n===void 0&&(n=f(()=>N(i?ln(e[t]):E,u)),r.set(t,n)),B(n)===E)?!1:i},set(e,t,n,s){var c=r.get(t),l=t in e;if(i&&t===`length`)for(var d=n;d<c.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>N(E,u)),r.set(d+``,p)):P(p,E)}if(c===void 0)(!l||a(e,t)?.writable)&&(c=f(()=>N(void 0,u)),P(c,ln(n)),r.set(t,c));else{l=c.v!==E;var m=f(()=>ln(n));P(c,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(s,n),!l){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&P(g,_+1)}sn(o)}return!0},ownKeys(e){B(o);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==E});for(var[n,i]of r)i.v!==E&&!(n in e)&&t.push(n);return t},setPrototypeOf(){We()}})}function un(e){try{if(typeof e==`object`&&e&&ce in e)return e[ce]}catch{}return e}function dn(e,t){return Object.is(un(e),un(t))}var fn,pn,mn,hn;function gn(){if(fn===void 0){fn=window,pn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;mn=a(t,`firstChild`).get,hn=a(t,`nextSibling`).get,u(e)&&(e[fe]=void 0,e[de]=null,e[pe]=void 0,e.__e=void 0),u(n)&&(n[me]=void 0)}}function _n(e=``){return document.createTextNode(e)}function vn(e){return mn.call(e)}function yn(e){return hn.call(e)}function F(e,t){if(!D)return vn(e);var n=vn(De);if(n===null)n=De.appendChild(_n());else if(t&&n.nodeType!==3){var r=_n();return n?.before(r),Oe(r),r}return t&&Cn(n),Oe(n),n}function I(e,t=!1){if(!D){var n=vn(e);return n instanceof Comment&&n.data===``?yn(n):n}if(t){if(De?.nodeType!==3){var r=_n();return De?.before(r),Oe(r),r}Cn(De)}return De}function L(e,t=!1){if(!D)return vn(e);var n=F(e,t);return O(e),n}function R(e,t=1,n=!1){let r=D?De:e;for(var i;t--;)i=r,r=yn(r);if(!D)return r;if(n){if(r?.nodeType!==3){var a=_n();return r===null?i?.after(a):r.before(a),Oe(a),a}Cn(r)}return Oe(r),r}function bn(e){e.textContent=``}function xn(){return!1}function Sn(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function Cn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function wn(e){var t=ar;if(t===null)return nr.f|=se,e;if(!(t.f&32768)&&!(t.f&4))throw e;Tn(e,t)}function Tn(e,t){if(e===ve)throw e;if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128&&!(t.f&33570816)){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}function En(e){ar===null&&(nr===null&&Be(e),ze()),er&&Re(e)}function Dn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function On(e,t){var n=ar;n!==null&&n.f&8192&&(e|=S);var r={ctx:Ze,deps:null,nodes:null,f:e|b|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};Mt?.register_created_effect(r);var i=r;if(e&4)Rt===null?Ht.ensure().schedule(r):Rt.push(r);else if(t!==null){try{wr(r)}catch(e){throw Gn(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=te))}if(i!==null&&(i.parent=n,n!==null&&Dn(i,n),nr!==null&&nr.f&2&&!(e&64))){var a=nr;(a.effects??=[]).push(i)}return r}function kn(){return nr!==null&&!rr}function An(e){let t=On(8,null);return ut(t,y),t.teardown=e,t}function jn(e){En(`$effect`);var t=ar.f;if(!nr&&t&32&&Ze!==null&&!Ze.i){var n=Ze;(n.e??=[]).push(e)}else return Mn(e)}function Mn(e){return On(4|re,e)}function Nn(e){return En(`$effect.pre`),On(8|re,e)}function Pn(e){Ht.ensure();let t=On(64|ne,e);return()=>{Gn(t)}}function Fn(e){Ht.ensure();let t=On(64|ne,e);return(e={})=>new Promise(n=>{e.outro?Jn(t,()=>{Gn(t),n(void 0)}):(Gn(t),n(void 0))})}function In(e){return On(4,e)}function Ln(e){return On(oe|ne,e)}function Rn(e,t=0){return On(8|t,e)}function z(e,t=[],n=[],r=[]){vt(r,t,n,t=>{On(8,()=>{e(...t.map(B))})})}function zn(e,t=0){return On(16|t,e)}function Bn(e,t=0){return On(v|t,e)}function Vn(e){return On(32|ne,e)}function Hn(e){var t=e.teardown;if(t!==null){let n=er,r=nr;tr(!0),ir(null);try{t.call(null)}catch(t){Tn(t,e.parent)}finally{tr(n),ir(r)}}}function Un(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&gt(()=>{e.abort(ge)});var r=n.next;n.f&64?n.parent=null:Gn(n,t),n=r}}function Wn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||Gn(t),t=n}}function Gn(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Kn(e.nodes.start,e.nodes.end),n=!0),e.f|=ee,Un(e,t&&!n),Cr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Hn(e),e.f^=ee,e.f|=C;var i=e.parent;i!==null&&i.first!==null&&qn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Kn(e,t){for(;e!==null;){var n=e===t?null:yn(e);e.remove(),e=n}}function qn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Jn(e,t,n=!0){var r=[];e.f|=256,Yn(e,r,!0);var i=()=>{n&&Gn(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Yn(e,t,n){if(!(e.f&8192)){e.f^=S;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=!!(i.f&65536)||!!(i.f&32)&&!!(e.f&16);Yn(i,t,o?n:!1)}i=a}}}function Xn(e){e.f&=-257,Zn(e,!0)}function Zn(e,t){if(!(e.f&256)&&e.f&8192){e.f^=S,e.f&1024||(ut(e,b),Ht.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=!!(n.f&65536)||!!(n.f&32);Zn(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function Qn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:yn(n);t.append(n),n=i}}var $n=null,er=!1;function tr(e){er=e}var nr=null,rr=!1;function ir(e){nr=e}var ar=null;function or(e){ar=e}var sr=null;function cr(e){nr!==null&&(nr.f&2097152||nr.f&2)&&(sr??=new Set).add(e)}var lr=null,ur=0,dr=null;function fr(e){dr=e}var pr=1,mr=0,hr=mr;function gr(e){hr=e}function _r(){return++pr}function vr(e){var t=e.f;if(t&2048)return!0;if(t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(vr(a)&&Ot(a),a.wv>e.wv)return!0}t&512&&Pt===null&&ut(e,y)}return!1}function yr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(sr!==null&&sr.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?yr(a,t,!1):t===a&&(n?ut(a,b):a.f&1024&&ut(a,x),qt(a))}}function br(e){var t=lr,n=ur,r=dr,i=nr,a=sr,o=Ze,s=rr,c=hr,l=e.f;lr=null,ur=0,dr=null,nr=l&96?null:e,sr=null,Qe(e.ctx),rr=!1,hr=++mr,e.ac!==null&&(gt(()=>{e.ac.abort(ge)}),e.ac=null);try{e.f|=ae;var u=e.fn,d=u();e.f|=w;var f=xr(e);if(it()&&dr!==null&&!rr&&f!==null&&!(e.f&6146))for(var p=0;p<dr.length;p++)yr(dr[p],e);if(i!==null&&i!==e){if(mr++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=mr;if(t!==null)for(let e of t)e.rv=mr;dr!==null&&(r===null?r=dr:r.push(...dr))}return e.f&8388608&&(e.f^=se),d}catch(t){return xr(e),wn(t)}finally{e.f^=ae,lr=t,ur=n,dr=r,nr=i,sr=a,Qe(o),rr=s,hr=c}}function xr(e){var t=e.deps,n=Mt?.is_fork;if(lr!==null){var r;if(n||Cr(e,ur),t!==null&&ur>0)for(t.length=ur+lr.length,r=0;r<lr.length;r++)t[ur+r]=lr[r];else e.deps=t=lr;if(kn()&&e.f&512)for(r=ur;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&ur<t.length&&(Cr(e,ur),t.length=ur);return t}function Sr(e,r){let i=r.reactions;if(i!==null){var a=t.call(i,e);if(a!==-1){var o=i.length-1;o===0?i=r.reactions=null:(i[a]=i[o],i.pop())}}if(i===null&&r.f&2&&(lr===null||!n.call(lr,r))){var s=r;s.f&512&&(s.f^=512),s.v!==E&&dt(s),s.ac!==null&&gt(()=>{s.ac.abort(ge),s.ac=null,ut(s,b)}),kt(s),Cr(s,0)}}function Cr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Sr(e,n[r])}function wr(e){var t=e.f;if(!(t&16384)){ut(e,y);var n=ar;ar=e;try{t&16777232?Wn(e):Un(e),Hn(e);var r=br(e);e.teardown=typeof r==`function`?r:null,e.wv=pr}finally{ar=n}}}async function Tr(){await Promise.resolve(),Ut()}function B(e){var t=!!(e.f&2);if($n?.add(e),nr!==null&&!rr&&!(ar!==null&&ar.f&16384)&&(sr===null||!sr.has(e))){var r=nr.deps;if(nr.f&2097152)e.rv<mr&&(e.rv=mr,lr===null&&r!==null&&r[ur]===e?ur++:lr===null?lr=[e]:lr.push(e));else{nr.deps??=[],n.call(nr.deps,e)||nr.deps.push(e);var i=e.reactions;i===null?e.reactions=[nr]:n.call(i,nr)||i.push(nr)}}if(er&&Zt.has(e))return Zt.get(e);if(t){var a=e;if(er){var o=a.v;return(!(a.f&1024)&&a.reactions!==null||Dr(a))&&(o=Dt(a)),Zt.set(a,o),o}var s=!(a.f&512)&&!rr&&nr!==null&&!!(nr.f&512),c=(a.f&w)===0;vr(a)&&(s&&(a.f|=512),Ot(a)),s&&!c&&(At(a),Er(a))}if(Pt?.has(e))return Pt.get(e);if(e.f&8388608)throw e.v;return e.v}function Er(e){if(e.f|=512,e.deps!==null)for(let r of e.deps){var t=r.reactions;t===null?r.reactions=[e]:n.call(t,e)||t.push(e),r.f&2&&!(r.f&512)&&(At(r),Er(r))}}function Dr(e){if(e.v===E)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Zt.has(t)||t.f&2&&Dr(t))return!0;return!1}function Or(e){var t=rr;try{return rr=!0,e()}finally{rr=t}}function kr(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(ce in e)Ar(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&ce in n&&Ar(n)}}}function Ar(e,t=new Set){if(typeof e==`object`&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Ar(e[n],t)}catch{}let n=l(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=o(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}function jr(){return Symbol(xe)}function Mr(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var Nr=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function Pr(e){return Nr.includes(e)}var Fr=`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`),Ir={formnovalidate:`formNoValidate`,ismap:`isMap`,nomodule:`noModule`,playsinline:`playsInline`,readonly:`readOnly`,defaultvalue:`defaultValue`,defaultchecked:`defaultChecked`,srcobject:`srcObject`,novalidate:`noValidate`,allowfullscreen:`allowFullscreen`,disablepictureinpicture:`disablePictureInPicture`,disableremoteplayback:`disableRemotePlayback`};function Lr(e){return e=e.toLowerCase(),Ir[e]??e}[...Fr];var Rr=[`touchstart`,`touchmove`];function zr(e){return Rr.includes(e)}var Br=[`textarea`,`script`,`style`,`title`];function Vr(e){return Br.includes(e)}var Hr=Symbol(`events`),Ur=new Set,Wr=new Set;function Gr(e,t,n,r={}){function i(e){if(r.capture||Zr.call(t,e),!e.cancelBubble)return gt(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?(i.__removed=!1,st(()=>{i.__removed||t.addEventListener(e,i,r)})):t.addEventListener(e,i,r),i}function Kr(e,t,n,r={}){var i=Gr(t,e,n,r);return()=>{i.__removed=!0,e.removeEventListener(t,i,r)}}function qr(e,t,n){(t[Hr]??={})[e]=n}function Jr(e){for(var t=0;t<e.length;t++)Ur.add(e[t]);for(var n of Wr)n(e)}var Yr=null,Xr=!1;function Zr(e){var t=this,n=t.ownerDocument,r=e.type,a=e.composedPath?.()||[],o=a[0]||e.target;Yr=e,Xr||(Xr=!0,setTimeout(()=>{Xr=!1,Yr=null}));var s=0,c=Yr===e&&e[Hr];if(c){var l=a.indexOf(c);if(l!==-1&&(t===document||t===window)){e[Hr]=t;return}var u=a.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(o=a[s]||e.target,o!==t){i(e,`currentTarget`,{configurable:!0,get(){return o||n}});var d=nr,f=ar;ir(null),or(null);try{for(var p,m=[];o!==null&&o!==t;){try{var h=o[Hr]?.[r];h==null||o.disabled&&e.target!==o||h.call(o,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;s++,o=s<a.length?a[s]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[Hr]=t,delete e.currentTarget,ir(d),or(f)}}}var Qr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function $r(e){return Qr?.createHTML(e)??e}function ei(e){var t=Sn(`template`);return t.innerHTML=$r(e.replaceAll(`<!>`,`<!---->`)),t.content}function ti(e,t){var n=ar;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function V(e,t){var n=!!(t&1),r=!!(t&2),i,a=!e.startsWith(`<!>`);return()=>{if(D)return ti(De,null),De;i===void 0&&(i=ei(a?e:`<!>`+e),n||(i=vn(i)));var t=r||pn?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=vn(t),s=t.lastChild;ti(o,s)}else ti(t,t);return t}}function ni(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=!!(t&1),a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(D)return ti(De,null),De;if(!o){var e=vn(ei(a));if(i)for(o=document.createDocumentFragment();vn(e);)o.appendChild(vn(e));else o=vn(e)}var t=o.cloneNode(!0);if(i){var n=vn(t),r=t.lastChild;ti(n,r)}else ti(t,t);return t}}function ri(e,t){return ni(e,t,`svg`)}function H(e=``){if(!D){var t=_n(e+``);return ti(t,t),t}var n=De;return n.nodeType===3?Cn(n):(n.before(n=_n()),Oe(n)),ti(n,n),n}function U(){if(D)return ti(De,null),De;var e=document.createDocumentFragment(),t=document.createComment(``),n=_n();return e.append(t,n),ti(t,n),e}function W(e,t){if(D){var n=ar;n.f&32768&&n.nodes.end!==null||(n.nodes.end=De),ke()}else e!==null&&e.before(t)}function ii(){if(D&&De&&De.nodeType===8&&De.textContent?.startsWith(`$`)){let e=De.textContent.substring(1);return ke(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function ai(e){let t=0,n=$t(0),r;return()=>{kn()&&(B(n),Rn(()=>(t===0&&(r=Or(()=>e(()=>sn(n)))),t+=1,()=>{st(()=>{--t,t===0&&(r?.(),r=void 0,sn(n))})})))}}var oi=te|ne;function si(e,t,n,r){new ci(e,t,n,r)}var ci=class{parent;is_pending=!1;transform_error;#e;#t=D?De:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Map;#p=null;#m=ai(()=>(this.#p=$t(this.#l),()=>{this.#p=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=ar;t.b=this,t.f|=128,n(e)},this.parent=ar.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=zn(()=>{if(D){let e=je(this.#t);ke();let t=e===`[!`;if(e.startsWith(`[?`)){let t=JSON.parse(e.slice(2));this.#g(t)}else t?this.#y():this.#h()}else this.#b()},oi),D&&(this.#e=De)}#h(){try{this.#a=Vn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#g(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#_(e);st(r),t&&(this.#s=Vn(()=>{t(this.#e,()=>e,()=>n)}))}#_(e){var t=!1,n=!1;let r=()=>{this.#v()||(t?Te():(t=!0,n&&Ke(),this.#s!==null&&Jn(this.#s,()=>{this.#s=null}),this.#S(()=>{this.#b()})))};return{reset:r,invoke_onerror:()=>{if(!this.#v())try{n=!0,this.#n.onerror?.(e,r),n=!1}catch(e){Tn(e,this.#i&&this.#i.parent)}}}}#v(){return(this.#i.f&(C|ee))!==0}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=Vn(()=>e(this.#e)),st(()=>{if(!this.#v()){var e=this.#c=document.createDocumentFragment(),t=_n(),n=!1;e.append(t),this.#a=this.#S(()=>{try{return Vn(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){Tn(e,this.#i.parent)}return null}}),this.#a===null?(this.#c=null,n&&this.#x(Mt)):this.#u===0&&(this.#e.before(e),this.#c=null,Jn(this.#o,()=>{this.#o=null}),this.#x(Mt))}}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=Vn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Qn(this.#a,e);let t=this.#n.pending;this.#o=Vn(()=>t(this.#e))}else this.#x(Mt)}catch(e){this.error(e)}}#x(e){this.is_pending=!1,e.transfer_reactions(this.#f)}defer_effect(e){ft(e,this.#f)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#S(e){var t=ar,n=nr,r=Ze;or(this.#i),ir(this.#i),Qe(this.#i.ctx);try{return Ht.ensure(),e()}finally{or(t),ir(n),Qe(r)}}#C(e,t){this.has_pending_snippet()?(this.#u+=e,this.#u===0&&(this.#x(t),this.#o&&Jn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))):this.parent&&this.parent.#C(e,t)}update_pending_count(e,t){this.#C(e,t),this.#l+=e,!this.#p||this.#d||(this.#d=!0,st(()=>{this.#d=!1,this.#p&&rn(this.#p,this.#l)}))}get_effect_pending(){return this.#m(),B(this.#p)}error(e){if(e===ve||!this.#n.onerror&&!this.#n.failed)throw e;Mt?.is_fork?(this.#a&&Mt.skip_effect(this.#a),this.#o&&Mt.skip_effect(this.#o),this.#s&&Mt.skip_effect(this.#s),Mt.oncommit(()=>{this.#v()||this.#w(e)})):this.#w(e)}#w(e){this.#a&&=(Gn(this.#a),null),this.#o&&=(Gn(this.#o),null),this.#s&&=(Gn(this.#s),null),D&&(Oe(this.#t),k(),Oe(Ae()));let t=this.#n.failed,n=e=>{if(this.#v())return;let{reset:n,invoke_onerror:r}=this.#_(e);r(),t&&!this.#v()&&(this.#s=this.#S(()=>{try{return Vn(()=>{var r=ar;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return Tn(e,this.#i.parent),null}}))};st(()=>{if(!this.#v()){var t;try{t=this.transform_error(e)}catch(e){Tn(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>Tn(e,this.#i&&this.#i.parent)):n(t)}})}};function G(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[me]??=e.nodeValue)&&(e[me]=n,e.nodeValue=`${n}`)}function li(e,t){return di(e,t)}var ui=new Map;function di(e,{target:t,anchor:n,props:i={},events:a,context:o,intro:s=!0,transformError:c}){gn();var l=void 0,u=Fn(()=>{var s=n??t.appendChild(_n());si(s,{pending:()=>{}},t=>{A({});var n=Ze;if(o&&(n.c=o),a&&(i.$$events=a),D&&ti(t,null),l=e(t,i)||rt(),D&&(ar.nodes.end=De,De===null||De.nodeType!==8||De.data!==`]`))throw Ce(),ve;j()},c);var u=new Set,d=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=zr(r);for(let e of[t,document]){var a=ui.get(e);a===void 0&&(a=new Map,ui.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,Zr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return d(r(Ur)),Wr.add(d),()=>{for(var e of u)for(let n of[t,document]){var r=ui.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,Zr),r.delete(e),r.size===0&&ui.delete(n)):r.set(e,i)}Wr.delete(d),s!==n&&s.parentNode?.removeChild(s)}});return fi.set(l,u),l}var fi=new WeakMap;function pi(e,t){let n=fi.get(e);return n?(fi.delete(e),n(t)):Promise.resolve()}var mi=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)Xn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(Xn(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(Gn(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();Qn(r,t),t.append(_n()),this.#n.set(e,{effect:r,fragment:t})}else Gn(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Jn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(Gn(n.effect),this.#n.delete(e))};ensure(e,t){var n=Mt,r=xn();if(t&&!this.#t.has(e)&&!this.#n.has(e)){if(r){var i=document.createDocumentFragment(),a=_n();i.append(a),this.#n.set(e,{effect:Vn(()=>t(a)),fragment:i})}else this.#t.set(e,Vn(()=>t(this.anchor)))}if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else D&&(this.anchor=De),this.#a(n)}};function K(e,t,n=!1){var r;D&&(r=De,ke());var i=new mi(e),a=n?te:0;function o(e,t){if(D){var n=je(r);if(e!==parseInt(n.substring(1))){var a=Ae();Oe(a),i.anchor=a,Ee(!1),i.ensure(e,t),Ee(!0);return}}i.ensure(e,t)}zn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var hi=Symbol(`NaN`);function gi(e,t,n){D&&ke();var r=new mi(e),i=!it();zn(()=>{var e=t();e!==e&&(e=hi),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function _i(e,t){return t}function vi(e,t,n){for(var i=[],a=t.length,o,s=t.length,c=0;c<a;c++){let n=t[c];Jn(n,()=>{if(o){if(o.pending.delete(n),o.done.add(n),o.pending.size===0){var t=e.outrogroups;yi(e,r(o.done)),t.delete(o),t.size===0&&(e.outrogroups=null)}}else--s},!1)}if(s===0){var l=i.length===0&&n!==null&&e.pending.size===0;if(l){var u=n,d=u.parentNode;bn(d),d.append(u),e.items.clear()}yi(e,t,!l)}else o={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(o)}function yi(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=ie,Qn(a,document.createDocumentFragment())):Gn(t[i],n)}}var bi;function xi(t,n,i,a,o,s=null){var c=t,l=new Map;if(n&4){var u=t;c=D?Oe(vn(u)):u.appendChild(_n())}D&&ke();var d=null,f=Tt(()=>{var t=i();return e(t)?t:t==null?[]:r(t)}),p=new Map,m=!0;function h(e){if(!(_.effect.f&16384)){_.pending.delete(e);var t=B(f);_.fallback=d,Ci(_,t,c,n,a),d!==null&&(t.length===0?d.f&33554432?(d.f^=ie,Ti(d,null,c)):Xn(d):Jn(d,()=>{d=null}))}}function g(e){_.pending.delete(e)}var _={effect:zn(()=>{var e=B(f),t=e.length;let r=!1;D&&je(c)===`[!`!=(t===0)&&(c=Ae(),Oe(c),Ee(!1),r=!0);for(var u=new Set,_=Mt,v=xn(),y=0;y<t;y+=1){D&&De.nodeType===8&&De.data===`]`&&(c=De,r=!0,Ee(!1));var b=e[y],x=a(b,y),S=m?null:l.get(x);S?(S.v&&rn(S.v,b),S.i&&rn(S.i,y),v&&_.unskip_effect(S.e)):(S=wi(l,m?c:bi??=_n(),b,x,y,o,n,i),m||(S.e.f|=ie),l.set(x,S)),u.add(x)}if(t===0&&s&&!d&&(m?d=Vn(()=>s(c)):(d=Vn(()=>s(bi??=_n())),d.f|=ie)),t>u.size&&Le(``,``,``),D&&t>0&&Oe(Ae()),!m){if(p.set(_,u),v){for(let[e,t]of l)u.has(e)||_.skip_effect(t.e);_.oncommit(h),_.ondiscard(g)}else h(_)}r&&Ee(!0),B(f)}),flags:n,items:l,pending:p,outrogroups:null,fallback:d};m=!1,D&&(c=De)}function Si(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Ci(e,t,n,i,a){var o=!!(i&8),s=t.length,c=e.items,l=Si(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(o)for(v=0;v<s;v+=1)h=t[v],g=a(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=a(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(Xn(_),o&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432){if(_.f^=ie,_===l)Ti(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Ei(e,d,_),Ei(e,_,y),Ti(_,y,n),d=_,p=[],m=[],l=Si(d.next);continue}}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],C=p[p.length-1];for(x=0;x<p.length;x+=1)Ti(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Ei(e,S.prev,C.next),Ei(e,d,S),Ei(e,C,b),l=b,d=C,--v,p=[],m=[]}else u.delete(_),Ti(_,l,n),Ei(e,_.prev,_.next),Ei(e,_,d===null?e.effect.first:d.next),Ei(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=Si(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Si(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(yi(e,r(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var w=[];if(u!==void 0)for(_ of u)_.f&8192||w.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&w.push(l),l=Si(l.next);var ee=w.length;if(ee>0){var te=i&4&&s===0?n:null;if(o){for(v=0;v<ee;v+=1)w[v].nodes?.a?.measure();for(v=0;v<ee;v+=1)w[v].nodes?.a?.fix()}vi(e,w,te)}}o&&st(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function wi(e,t,n,r,i,a,o,s){var c=o&1?o&16?$t(n):en(n,!1,!1):null,l=o&2?$t(i):null;return{v:c,i:l,e:Vn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Ti(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=yn(r);if(a.before(r),r===i)return;r=o}}function Ei(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Di(e,t,n,r,i){if(D&&ke(),t.$$host?.$$shadowRoot){let t=Sn(`slot`);if(n!=="default"&&(t.name=n),W(e,t),i!==null){let e=_n();t.append(e),i(e)}}else{var a=t.$$slots?.[n],o=!1;a===!0&&(a=t[n==="default"?`children`:n],o=!0),a===void 0?i!==null&&i(e):a(e,o?()=>r:r)}}function q(e,t,...n){var r=new mi(e);zn(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},te)}function J(e,t,n){var r;D&&(r=De,ke());var i=new mi(e);zn(()=>{var e=t()??null;if(D&&je(r)===`[`!=(e!==null)){var a=Ae();Oe(a),i.anchor=a,Ee(!1),i.ensure(e,e&&(t=>n(t,e))),Ee(!0)}else i.ensure(e,e&&(t=>n(t,e)))},te)}function Oi(e,t,n,r,i,a){let o=D;D&&ke();var s=null;D&&De.nodeType===1&&(s=De,ke());var c=D?De:e,l=new mi(c,!1);zn(()=>{let e=t()||null;var a=i?i():n||e===`svg`?be:void 0;if(e===null)l.ensure(null,null);else return l.ensure(e,t=>{if(e){var n=D;if(s=D?s:Sn(e,a),ti(s,s),r){var i=null;D&&Vr(e)&&s.append(i=document.createComment(``));var o=D?vn(s):s.appendChild(_n());D&&(o===null?Ee(!1):Oe(o)),r(s,o),i?.remove()}ar.nodes.end=s,n||t.before(s)}D&&Oe(t)}),()=>{}},te),An(()=>{}),o&&(Ee(!0),Oe(c))}function ki(e,t){var n=void 0,r;Bn(()=>{n!==(n=t())&&(r&&=(Gn(r),null),n&&(r=Vn(()=>{In(()=>n(e))})))})}function Ai(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ai(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function ji(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ai(e))&&(r&&(r+=` `),r+=t);return r}function Mi(e){return typeof e==`object`?ji(e):e??``}var Ni=[...`
2
+ \r\f\xA0\v`];function Pi(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Ni.includes(r[o-1]))&&(s===r.length||Ni.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Fi(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Ii(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Li(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Ii)),i&&c.push(...Object.keys(i).map(Ii));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Ii(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Fi(r)),i&&(n+=Fi(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Ri(e,t,n,r,i,a){var o=e[fe];if(D||o!==n||o===void 0){var s=Pi(n,r,a);D&&s===e.getAttribute(`class`)||(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[fe]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function zi(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function Bi(e,t,n,r){var i=e[pe];if(D||i!==t){var a=Li(t,r);D&&a===e.getAttribute(`style`)||(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[pe]=t}else r&&(Array.isArray(r)?(zi(e,n?.[0],r[0]),zi(e,n?.[1],r[1],`important`)):zi(e,n,r));return r}function Vi(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function Hi(e,t){var n=!(`__defaultValue`in e);(n||e.__defaultValue!==t)&&(e.__defaultValue=t,Ui(e,!n||`__value`in e))}function Ui(t,n){var r=t.__defaultValue,i=t.multiple,a=i?r??[]:null;if(!i||e(a)){var o=t.selectedIndex,s=n&&i?new Set(t.selectedOptions):null;for(var c of t.options){var l=qi(c);Vi(c,i?a.includes(l):dn(l,r))}if(n){if(s!==null)for(c of t.options){var u=s.has(c);c.selected!==u&&(c.selected=u)}else t.selectedIndex!==o&&(t.selectedIndex=o)}}}function Wi(t,n,r=!1){if(t.multiple){if(n==null)return;if(!e(n))return we();for(var i of t.options)i.selected=n.includes(qi(i))}else{for(i of t.options)if(dn(qi(i),n)){i.selected=!0;return}r&&n===void 0||(t.selectedIndex=-1)}}function Gi(e){var t=new MutationObserver(t=>{t.every(Ji)||(`__defaultValue`in e&&Ui(e,!1),`__value`in e&&Wi(e,e.__value))});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),An(()=>{t.disconnect()})}function Ki(e,t,n=t){var r=new WeakSet,i=!0;_t(e,`change`,t=>{var i=t?`[selected]`:`:checked`,a;if(e.multiple)a=[].map.call(e.querySelectorAll(i),qi);else{var o=e.querySelector(i)??e.querySelector(`option:not([disabled])`);a=o&&qi(o)}n(a),e.__value=a,Mt!==null&&r.add(Mt)}),In(()=>{var a=t();if(e===document.activeElement){var o=Mt;if(r.has(o))return}if(Wi(e,a,i),i&&a===void 0){var s=e.querySelector(`:checked`);s!==null&&(a=qi(s),n(a))}e.__value=a,i=!1})}function qi(e){return`__value`in e?e.__value:e.value}function Ji(e){if(e.target.closest(`selectedcontent`)!==null)return!0;if(e.type===`childList`){var t=[...e.addedNodes,...e.removedNodes];return t.length>0&&t.every(e=>e.nodeName===`SELECTEDCONTENT`)}return!1}var Yi=Symbol(`class`),Xi=Symbol(`style`),Zi=Symbol(`is custom element`),Qi=Symbol(`is html`),$i=_e?`link`:`LINK`,ea=_e?`input`:`INPUT`,ta=_e?`option`:`OPTION`,na=_e?`select`:`SELECT`,ra=_e?`progress`:`PROGRESS`;function ia(e){if(D){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;aa(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;aa(e,`checked`,null),e.checked=r}}};e[he]=n,st(n),ht()}}function aa(e,t,n,r){var i=ca(e);if(!(D&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===$i))){var a=i[t];a!==(i[t]=n)&&(t===`loading`&&(e[T]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ua(e).has(t)?e[t]=n:(!D||typeof n!=`number`&&typeof n!=`boolean`||a!==String(n))&&e.setAttribute(t,n))}}function oa(e,t,n,r,i=!1,a=!1){D&&i&&e.nodeName===ea&&(`defaultValue`in n||`defaultChecked`in n||ia(e));var o=ca(e),s=o[Zi],c=!o[Qi];let l=D&&s;l&&Ee(!1);var u=t||{},d=e.nodeName===ta,f=e.nodeName===na;try{for(var p in t)!(p in n)&&p[0]+p[1]!==`$$`&&(n[p]=null);n.class?n.class=Mi(n.class):(r||n[Yi])&&(n.class=null),n[Xi]&&(n.style??=null);var m=ua(e);if(e.nodeName===ea&&`type`in n&&(`value`in n||`__value`in n)){var h=n.type;(h!==u.type||h===void 0&&e.hasAttribute(`type`))&&(u.type=h,aa(e,`type`,h,a))}for(let i in n){let l=n[i];if(d&&i===`value`&&l==null)e.value=e.__value=``,u[i]=l;else if(i===`class`)Ri(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,l,r,t?.[Yi],n[Yi]),u[i]=l,u[Yi]=n[Yi];else if(i===`style`)Bi(e,l,t?.[Xi],n[Xi]),u[i]=l,u[Xi]=n[Xi];else{var g=u[i];if(l!==g||l===void 0&&e.hasAttribute(i)){u[i]=l;var _=i[0]+i[1];if(_!==`$$`){if(_===`on`){let t={},n=`$$`+i,r=i.slice(2);var v=Pr(r);if(Mr(r)&&(r=r.slice(0,-7),t.capture=!0),!v&&g){if(l!=null)continue;e.removeEventListener(r,u[n],t),u[n]=null}if(v)qr(r,e,l),Jr([r]);else if(l!=null){function a(e){u[i].call(this,e)}u[n]=Gr(r,e,a,t)}}else if(i===`style`)aa(e,i,l);else if(i===`autofocus`)pt(e,!!l);else if(!s&&(i===`__value`||i===`value`&&l!=null))e.__value=l,(g==null||e.value!==l||l===0&&e.nodeName===ra)&&(e.value=l);else if(i===`selected`&&d)Vi(e,l);else{var y=i;c||(y=Lr(y));var b=y===`defaultValue`||y===`defaultChecked`;if(f&&y===`defaultValue`)continue;if(l==null&&!s&&!b){if(o[i]=null,y===`value`||y===`checked`){let n=e,r=t===void 0;if(y===`value`){let e=n.defaultValue;n.removeAttribute(y),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(y),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i)}else b||(s||typeof l!=`string`)&&m.has(y)?(e[y]=l,y in o&&(o[y]=E)):typeof l!=`function`&&aa(e,y,l,a)}}}}}}finally{l&&Ee(!0)}return u}function sa(e,t,n=[],r=[],i=[],a,o=!1,s=!1){vt(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===na,l=!1;if(Bn(()=>{var u=t(...n.map(B)),d=oa(e,r,u,a,o,s);if(l&&c){var f=e;`defaultValue`in u&&Hi(f,u.defaultValue),`value`in u&&Wi(f,u.value)}for(let e of Object.getOwnPropertySymbols(i))u[e]||Gn(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var p=u[t];t.description!==`@attach`||r&&p===r[t]||(i[t]&&Gn(i[t]),i[t]=Vn(()=>ki(e,()=>p))),d[t]=p}r=d}),c){var u=e;In(()=>{var e=r;`defaultValue`in e&&Hi(u,e.defaultValue),Wi(u,e.value,!0),Gi(u)})}l=!0})}function ca(e){return e[de]??={[Zi]:e.nodeName.includes(`-`),[Qi]:e.namespaceURI===ye}}var la=new Map;function ua(e){var t=e.getAttribute(`is`)||e.nodeName,n=la.get(t);if(n)return n;la.set(t,n=new Set);for(var r,i=e,a=Element.prototype;a!==i;){for(var s in r=o(i),r)r[s].set&&s!==`innerHTML`&&s!==`textContent`&&s!==`innerText`&&n.add(s);i=l(i)}return n}function da(e,t,n=t){var r=new WeakSet;_t(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=fa(e)?pa(a):a,n(a),Mt!==null&&r.add(Mt),await Tr(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(D&&e.defaultValue!==e.value||Or(t)==null&&e.value)&&(n(fa(e)?pa(e.value):e.value),Mt!==null&&r.add(Mt)),Rn(()=>{var n=t();if(e===document.activeElement){var i=Mt;if(r.has(i))return}fa(e)&&n===pa(e.value)||(e.type!==`date`||n||e.value)&&n!==e.value&&(e.value=n??``)})}function fa(e){var t=e.type;return t===`number`||t===`range`}function pa(e){return e===``?null:+e}function ma(e,t,n=t){_t(e,`change`,()=>{n(e.files)}),D&&e.files&&n(e.files),Rn(()=>{e.files=t()})}function ha(e,t){return e===t||e?.[ce]===t}function ga(e=rt(),t,n,r){var i=Ze.r,a=ar;return In(()=>{var o,s;return Rn(()=>{o=s,s=r?.()||[],Or(()=>{ha(n(...s),e)||(t(e,...s),o&&ha(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&ha(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function _a(e=!1){let t=Ze,n=t.l.u;if(!n)return;let r=()=>kr(t.s);if(e){let e=0,n={},i=St(()=>{let r=!1,i=t.s;for(let e in i)i[e]!==n[e]&&(n[e]=i[e],r=!0);return r&&e++,e});r=()=>B(i)}n.b.length&&Nn(()=>{va(t,r),m(n.b)}),jn(()=>{let e=Or(()=>n.m.map(p));return()=>{for(let t of e)typeof t==`function`&&t()}}),n.a.length&&jn(()=>{va(t,r),m(n.a)})}function va(e,t){if(e.l.s)for(let t of e.l.s)B(t);t()}var ya=!1;function ba(e){var t=ya;try{return ya=!1,[e(),ya]}finally{ya=t}}var xa={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return!e.exclude.has(t)&&t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function Y(e,t,n){return new Proxy({props:e,exclude:t},xa)}var Sa={get(e,t){if(!e.exclude.includes(t))return B(e.version),t in e.special?e.special[t]():e.props[t]},set(e,t,n){if(!(t in e.special)){var r=ar;try{or(e.parent_effect),e.special[t]=X({get[t](){return e.props[t]}},t,4)}finally{or(r)}}return e.special[t](n),on(e.version),!0},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},deleteProperty(e,t){return e.exclude.includes(t)||(e.exclude.push(t),on(e.version)),!0},has(e,t){return!e.exclude.includes(t)&&t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function Ca(e,t){return new Proxy({props:e,exclude:t,special:{},version:$t(0),parent_effect:ar},Sa)}var wa={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(d(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];d(i)&&(i=i());let o=a(i,t);if(o&&o.set)return o.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(d(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=a(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===ce||t===ue)return!1;for(let n of e.props)if(d(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(d(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function Ta(...e){return new Proxy({props:e},wa)}function X(e,t,n,r){var i=!qe||!!(n&2),o=!!(n&8),s=!!(n&16),c=r,l=!0,u=void 0,d=()=>s&&i?(u??=St(r),B(u)):(l&&(l=!1,c=s?Or(r):r),c);let f;if(o){var p=ce in e||ue in e;f=a(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;o?[m,h]=ba(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&He(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(c=void 0),n===void 0?c:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?St:Tt)(()=>(v=!1,g()));o&&B(y);var b=ar;return(function(e,t){if(arguments.length>0){let n=t?B(y):i&&o?ln(e):e;return P(y,n),v=!0,c!==void 0&&(c=n),e}return er&&v||b.f&16384?y.v:B(y)})}function Ea(e){Ze===null&&Fe(`onMount`),qe&&Ze.l!==null?Da(Ze).m.push(e):jn(()=>{let t=Or(e);if(typeof t==`function`)return t})}function Da(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`),Je();var Oa={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},ka=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Aa=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ja=ri(`<svg><!><!></svg>`);function Ma(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=Ca(n,[`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`]);A(t,!1);let i=X(t,`name`,8,void 0),a=X(t,`color`,8,`currentColor`),o=X(t,`size`,8,24),s=X(t,`strokeWidth`,8,2),c=X(t,`absoluteStrokeWidth`,8,!1),l=X(t,`iconNode`,24,()=>[]);_a();var u=ja();sa(u,(e,t,n)=>({...Oa,...e,...r,width:o(),height:o(),stroke:a(),"stroke-width":t,class:n}),[()=>ka(r)?void 0:{"aria-hidden":`true`},()=>(kr(c()),kr(s()),kr(o()),Or(()=>c()?Number(s())*24/Number(o()):s())),()=>(kr(Aa),kr(i()),kr(n),Or(()=>Aa(`lucide-icon`,`lucide`,i()?`lucide-${i()}`:``,n.class)))]);var d=F(u);xi(d,1,l,_i,(e,t)=>{var n=M(()=>_(B(t),2));let r=()=>B(n)[0],i=()=>B(n)[1];var a=U();Oi(I(a),r,!0,(e,t)=>{sa(e,()=>({...i()}))}),W(e,a)}),Di(R(d),t,`default`,{},null),O(u),W(e,u),j()}function Na(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`}]];Ma(e,Ta({name:`activity`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Pa(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`}],[`path`,{d:`m5.082 11.09 8.828 8.828`}]];Ma(e,Ta({name:`eraser`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Fa(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`m16 17 5-5-5-5`}],[`path`,{d:`M21 12H9`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}]];Ma(e,Ta({name:`log-out`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Ia(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`}]];Ma(e,Ta({name:`pause`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function La(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`}],[`path`,{d:`m15 5 4 4`}]];Ma(e,Ta({name:`pencil`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Ra(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`}]];Ma(e,Ta({name:`play`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function za(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M5 12h14`}],[`path`,{d:`M12 5v14`}]];Ma(e,Ta({name:`plus`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Ba(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}],[`path`,{d:`M8 16H3v5`}]];Ma(e,Ta({name:`refresh-cw`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Va(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]];Ma(e,Ta({name:`rotate-ccw`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Ha(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}]];Ma(e,Ta({name:`rotate-cw`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Ua(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`}]];Ma(e,Ta({name:`save`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Wa(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]];Ma(e,Ta({name:`search`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Ga(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M10 11v6`}],[`path`,{d:`M14 11v6`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}],[`path`,{d:`M3 6h18`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}]];Ma(e,Ta({name:`trash-2`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}function Ka(e,t){let n=Ca(t,[`children`,`$$slots`,`$$events`,`$$legacy`]),r=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]];Ma(e,Ta({name:`x`},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=U();Di(I(r),t,`default`,{},null),W(e,r)},$$slots:{default:!0}}))}var qa=class extends Error{status;fields;constructor(e,t,n=[]){super(t),this.status=e,this.fields=n,this.name=`ApiError`}};async function Ja(e,t){let n=await fetch(e,{credentials:`same-origin`,...t,headers:{...t?.body?{"Content-Type":`application/json`}:{},...t?.headers}});if(!n.ok){let e=`请求失败(${n.status})`,t=[];try{let r=await n.json();r.message&&(e=r.message),Array.isArray(r.fields)&&(t=r.fields)}catch{}throw new qa(n.status,e,t)}return await n.json()}var Ya={async login(e){await Ja(`/api/login`,{method:`POST`,body:JSON.stringify({token:e})})},schema(){return Ja(`/api/config/schema`)},config(){return Ja(`/api/config`)},save(e){return Ja(`/api/config`,{method:`PUT`,body:JSON.stringify(e)})},models(){return Ja(`/api/models`)},status(){return Ja(`/api/status`)},restart(){return Ja(`/api/restart`,{method:`POST`})},logs(e={}){let t=new URLSearchParams;e.limit!==void 0&&t.set(`limit`,String(e.limit)),e.level&&t.set(`level`,e.level);let n=t.toString();return Ja(`/api/logs${n?`?${n}`:``}`)},chatOverrides(){return Ja(`/api/chat-overrides`)},saveChatOverrides(e){return Ja(`/api/chat-overrides`,{method:`PUT`,body:JSON.stringify(e)})},toolProfiles(){return Ja(`/api/tool-profiles`)},saveToolProfiles(e){return Ja(`/api/tool-profiles`,{method:`PUT`,body:JSON.stringify(e)})}};function Xa(e){let t=new EventSource(`/api/stream`),n=(e,n)=>{n&&t.addEventListener(e,e=>{try{n(JSON.parse(e.data))}catch{}})};return n(`status`,t=>e.status?.(t)),n(`log`,t=>e.log?.(t)),n(`config`,t=>e.config?.(t)),()=>t.close()}var Za=Array.isArray,Qa=e=>{if(!e&&e!==0&&e!==0n)return``;if(typeof e==`string`)return e;if(typeof e==`number`)return e===e?``+e:``;if(typeof e==`bigint`)return``+e;let t=``;if(Za(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(!n&&n!==0&&n!==0n)continue;let i=typeof n==`string`?n:Qa(n);i&&(t&&(t+=` `),t+=i)}return t}if(typeof e==`object`)for(let n in e)e[n]&&(t&&(t+=` `),t+=n);return t},$a=/\s+/g,eo=Array.isArray,to=e=>typeof e!=`string`||!e?e:e.replace($a,` `).trim(),no=e=>{let t=e.length;if(t===0)return!1;let n=e.charCodeAt(0),r=e.charCodeAt(t-1);if(n===32||r===32||n>=9&&n<=13||n===160||r>=9&&r<=13||r===160)return!0;for(let n=0;n<t;n++){let r=e.charCodeAt(n);if(r>=9&&r<=13||r===160||r===32&&n+1<t&&e.charCodeAt(n+1)===32)return!0}return!1},ro=(...e)=>{let t=Qa(e);if(t)return no(t)?to(t):t},io=e=>e===!1?`false`:e===!0?`true`:e===0?`0`:e,ao=e=>{if(!e||typeof e!=`object`)return!0;for(let t in e)return!1;return!0},oo=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;let n=e,r=t,i=Object.keys(n),a=Object.keys(r);if(i.length!==a.length)return!1;for(let e=0;e<i.length;e++){let t=i[e];if(!a.includes(t)||n[t]!==r[t])return!1}return!0},so=(e,t)=>{let n=e;for(let e in t)if(Object.hasOwn(t,e)){let r=t[e];n[e]=e in n?ro(n[e],r):r}return e},co=(e,t)=>{for(let n=0;n<e.length;n++){let r=e[n];eo(r)?co(r,t):r&&t.push(r)}},lo=(...e)=>{let t=[];co(e,t);let n=[];for(let e=0;e<t.length;e++)t[e]&&n.push(t[e]);return n},uo=(e,t)=>{let n=e,r=t,i={};for(let e in n){let t=n[e];if(e in r){let n=r[e];i[e]=eo(t)||eo(n)?lo(n,t):typeof t==`object`&&typeof n==`object`&&t&&n?uo(t,n):n+` `+t}else i[e]=t}for(let e in r)e in n||(i[e]=r[e]);return i},fo={twMerge:!0,twMergeConfig:{}},po=256,mo=128,ho=Symbol(`tv-cache-miss`),go=e=>e?.class!=null&&e.class!==``||e?.className!=null&&e.className!==``,_o=e=>{if(e===void 0)return``;if(e===null)return`null`;if(typeof e==`string`)return e;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return e===0?`0`:String(e);if(typeof e==`bigint`)return String(e);let t=io(e),n=typeof t;if(n===`string`||n===`number`||n===`boolean`||n===`bigint`)return String(t);if(n===`object`)try{return JSON.stringify(t)}catch{return null}return null},vo=(e,t)=>{if(t===void 0)return e;if(t===null)return e+`null`;let n=typeof t;if(n===`string`||n===`number`||n===`boolean`||n===`bigint`)return e+String(t);if(Array.isArray(t))return e+t.join(`\0`);try{return e+JSON.stringify(t)}catch{return e+`?`}},yo=(e,t,n,r)=>{let i=``,a=Object.create(null);for(let r=0;r<e.length;r++){let o=e[r];a[o]=1;let s=t[o];n&&n[o]!==void 0&&(s=n[o]);let c=_o(s);if(c===null)return null;i+=o+`:`+c+`;`}let o=[];for(let e in t)e===`class`||e===`className`||a[e]||(a[e]=1,o.push(e));if(n)for(let e in n)e===`class`||e===`className`||a[e]||n[e]===void 0||(a[e]=1,o.push(e));o.length>1&&o.sort();for(let e=0;e<o.length;e++){let r=o[e],a=t[r];n&&n[r]!==void 0&&(a=n[r]);let s=_o(a);if(s===null)return null;i+=r+`:`+s+`;`}return i},bo=(e,t)=>{let n=``;for(let t=0;t<e.length;t++){let{conditionKeys:r,source:i}=e[t];for(let e=0;e<r.length;e++){let t=r[e];n+=t+`=`,n=vo(n,i[t]),n+=`,`}n+=`c=`,n=vo(n,i.class),n+=`|cn=`,n=vo(n,i.className),n+=`;`}for(let e=0;e<t.length;e++){let{conditionKeys:r,source:i}=t[e];for(let e=0;e<r.length;e++){let t=r[e];n+=t+`=`,n=vo(n,i[t]),n+=`,`}Array.isArray(i.slots)&&(n+=`slots=`+i.slots.join(`,`)+`,`),n+=`c=`,n=vo(n,i.class),n+=`|cn=`,n=vo(n,i.className),n+=`;`}return n},xo=(e=po)=>{let t=new Map,n=null;return{get(e){if(t.has(e))return t.get(e);if(n?.has(e)){let r=n.get(e);return t.set(e,r),r}return ho},set(r,i){t.size>=e&&(n=t,t=new Map),t.set(r,i)}}},So=(e=po)=>{let t=xo(e);return{get(e){return t.get(e)},set(e,n){t.set(e,n)}}},Co=(e=mo)=>{let t=new Map,n=null,r=0;return{get(e,i){let a=t.get(e);if(a){let e=a.get(i);if(e!==void 0||a.has(i))return e}if(n){let a=n.get(e);if(a){let n=a.get(i);if(n!==void 0||a.has(i)){let a=t.get(e);return a||(a=new Map,t.set(e,a)),a.has(i)||r++,a.set(i,n),n}}}return ho},set(i,a,o){r>=e&&(n=t,t=new Map,r=0);let s=t.get(i);s||(s=new Map,t.set(i,s)),s.has(a)||r++,s.set(a,o)}}},wo=(e,t)=>{let n=null;return(r,i)=>{if(!go(i))return r;let a=i.class,o=i.className;if(a!=null&&a!==``&&typeof a!=`string`||o!=null&&o!==``&&typeof o!=`string`)return e(t,r,a,o);n??=Co();let s=r??``,c=(typeof a==`string`?a:``)+`\0`+(typeof o==`string`?o:``),l=n.get(s,c);if(l!==ho)return l;let u=e(t,r,a,o);return n.set(s,c,u),u}};function To(){let e=null,t={},n=!1;return{get cachedTwMerge(){return e},set cachedTwMerge(t){e=t},get cachedTwMergeConfig(){return t},set cachedTwMergeConfig(e){t=e},get didTwMergeConfigChange(){return n},set didTwMergeConfigChange(e){n=e},reset(){e=null,t={},n=!1}}}var Eo=To(),Do=e=>{!ao(e.twMergeConfig)&&!oo(e.twMergeConfig,Eo.cachedTwMergeConfig)&&(Eo.didTwMergeConfigChange=!0,Eo.cachedTwMergeConfig=e.twMergeConfig)},Oo=(e,t)=>{let n=[];for(let r=0;r<t.length;r++){let i=t[r],a=e[i];n.push({key:i,values:a,isEmpty:ao(a)})}return n},ko=e=>{if(!Array.isArray(e)||e.length===0)return[];let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=[];for(let e in r)e!==`class`&&e!==`className`&&i.push(e);t.push({conditionKeys:i,source:r})}return t},Ao=e=>{if(!Array.isArray(e)||e.length===0)return[];let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=[];for(let e in r)e!==`slots`&&e!==`class`&&e!==`className`&&i.push(e);t.push({conditionKeys:i,source:r})}return t},jo=e=>{let t={};for(let n=0;n<e.length;n++){let r=e[n],i=r.source.slots;if(Array.isArray(i))for(let e=0;e<i.length;e++){let n=i[e];t[n]||(t[n]=[]),t[n].push(r)}}return t},Mo=(e,t)=>{let{extend:n=null,slots:r={},variants:i={},compoundVariants:a=[],compoundSlots:o=[],defaultVariants:s={}}=e,c={...fo,...t},l=e.slots!==void 0,u=n?.base?ro(n.base,e?.base):e?.base,d=n?.variants&&!ao(n.variants)?uo(i,n.variants):i,f=n?.defaultVariants&&!ao(n.defaultVariants)?{...n.defaultVariants,...s}:s;Do(c);let p=!n?.slots||ao(n.slots),m=l?p&&n?.base?ro(e?.base,n.base):typeof e?.base==`string`||e?.base==null?e.base:ro(e.base):void 0,h=l?{base:m,...r}:{},g=p?h:so({...n?.slots},ao(h)?{base:e?.base}:h),_=!n?.compoundVariants||ao(n.compoundVariants)?a:lo(n?.compoundVariants,a),v=!n?.compoundSlots||ao(n.compoundSlots)?o:lo(n?.compoundSlots,o),y=Object.keys(d);return{config:c,extend:n,base:u,variants:d,defaultVariants:f,slots:g,compoundVariants:_,compoundSlots:v,compiledVariants:null,compiledCompoundVariants:null,compiledCompoundSlots:null,compiledCompoundSlotsBySlot:null,deferredError:_&&!Array.isArray(_)?TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof _}`):v&&!Array.isArray(v)?TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof v}`):null,mode:l||!p?`slots`:y.length===0?`plain`:`variants`,slotKeys:null,variantKeys:y}},No=e=>(e.compiledVariants===null&&(e.compiledVariants=Oo(e.variants,e.variantKeys),e.compiledCompoundVariants=ko(e.compoundVariants),e.compiledCompoundSlots=Ao(e.compoundSlots),e.compiledCompoundSlotsBySlot=jo(e.compiledCompoundSlots),e.slotKeys=e.slots&&typeof e.slots==`object`?Object.keys(e.slots):[]),e),Po=[],Fo=[],Io=[],Lo=[],Ro=[],zo=(e,t,n)=>{let r={};for(let t in e)r[t]=e[t];if(t)for(let e in t)t[e]!==void 0&&(r[e]=t[e]);if(n)for(let e in n)n[e]!==void 0&&(r[e]=n[e]);return r},Bo=e=>e==null||e===!1,Vo=(e,t)=>{if(!Array.isArray(e))return e===t||Bo(e)&&Bo(t);for(let n=0;n<e.length;n++){let r=e[n];if(r===t||Bo(r)&&Bo(t))return!0}return!1},Ho=(e,t,n,r)=>{if(e.isEmpty)return null;let i=r?.[e.key]??n?.[e.key];if(i===null)return null;let a=io(i);if(typeof a==`object`)return null;let o=t?.[e.key],s=a??io(o);return e.values[s||`false`]},Uo=(e,t)=>{let{conditionKeys:n,source:r}=e;for(let e=0;e<n.length;e++){let i=n[e];if(!Vo(r[i],t[i]))return!1}return!0},Wo=(e,t,n)=>{typeof n==`string`?t===`base`&&e.push(n):n&&typeof n==`object`&&n[t]&&e.push(n[t])},Go=(e,t,n)=>{let r=Fo;r.length=0;for(let i=0;i<e.length;i++){let a=Ho(e[i],t,n);a&&r.push(a)}return r},Ko=(e,t,n,r,i)=>{let a=Fo;a.length=0;for(let o=0;o<t.length;o++){let s=Ho(t[o],n,r,i),c=e===`base`&&typeof s==`string`?s:s&&s[e];c&&a.push(c)}return a},qo=(e,t)=>{let n=Io;n.length=0;for(let r=0;r<e.length;r++){let i=e[r];Uo(i,t)&&(i.source.class&&n.push(i.source.class),i.source.className&&n.push(i.source.className))}return n},Jo=(e,t,n)=>{let r=Lo;r.length=0;for(let i=0;i<t.length;i++){let a=t[i];Uo(a,n)&&(Wo(r,e,a.source.class),Wo(r,e,a.source.className))}return r},Yo=(e,t)=>{let n=Ro;n.length=0;for(let r=0;r<e.length;r++){let i=e[r];Uo(i,t)&&(i.source.class&&n.push(i.source.class),i.source.className&&n.push(i.source.className))}return n},Xo=(e,t)=>{let{base:n,config:r}=e,i=ho,a=wo(t,r);return(e=>(i===ho&&(i=t(r,n)),a(i,e)))},Zo=(e,t)=>{let{base:n,config:r,defaultVariants:i,deferredError:a,variantKeys:o}=e,s=e.compiledCompoundVariants,c=e.compiledVariants,l=Po,u=null,d=wo(t,r),f=1,p=e=>{let a=s.length>0?qo(s,zo(i,e)):void 0;return t(r,n,Go(c,i,e),a)};return(t=>{if(a)throw a;(c===null||s===null)&&(No(e),c=e.compiledVariants,s=e.compiledCompoundVariants,l=e.compiledCompoundSlots??Po);let n;if(f>0)f--,n=p(t);else{u??=So();let e=yo(o,i,t);if(e!==null){let r=s.length>0||l.length>0?bo(s,l):``,i=e+`#`+r,a=u.get(i);a===ho?(n=p(t),u.set(i,n)):n=a}else n=p(t)}return d(n,t)})},Qo=(e,t)=>{let{config:n,defaultVariants:r,deferredError:i,slots:a,variantKeys:o}=e,s=null,c=null,l=null,u=null,d=!1,f=null,p=null,m=1,h=()=>{if(l!==null)return;(e.compiledVariants===null||e.compiledCompoundVariants===null||e.compiledCompoundSlots===null||e.compiledCompoundSlotsBySlot===null||e.slotKeys===null)&&No(e);let i=e.compiledVariants;s=e.compiledCompoundVariants,c=e.compiledCompoundSlots;let o=e.compiledCompoundSlotsBySlot;l=e.slotKeys,d=s.length>0||c.length>0,f=wo(t,n);let p=Array(l.length);for(let e=0;e<l.length;e++){let c=l[e],u=o[c]??Po;p[e]=(e,o)=>{let l=d?zo(r,e,o):void 0,f=l?Jo(c,s,l):void 0,p=l?Yo(u,l):void 0;return t(n,a[c],Ko(c,i,r,e,o),f,p)}}u=p},g=e=>{let t=l,n=u,r=f,i={};for(let a=0;a<t.length;a++){let o=n[a],s=o(e);i[t[a]]=t=>{if(t==null)return s;let n=!1;for(let e in t)if(e!==`class`&&e!==`className`&&t[e]!==void 0){n=!0;break}return r(n?o(e,t):s,t)}}return i};return(e=>{if(i)throw i;if(h(),m>0)return m--,g(e);let t=yo(o,r,e);if(t===null)return g(e);let n=d?bo(s,c):``,a=t+`#`+n;p??=xo();let l=p.get(a);if(l!==ho)return l;let u=g(e);return p.set(a,u),u})},$o=(e,t)=>{if(e.mode===`plain`)return Xo(e,t);let n;return(r=>(n??=e.mode===`slots`?Qo(e,t):Zo(e,t),n(r)))},es=(e,t)=>{e.variantKeys=t.variantKeys,e.extend=t.extend,e.base=t.base,e.slots=t.slots,e.variants=t.variants,e.defaultVariants=t.defaultVariants,e.compoundSlots=t.compoundSlots,e.compoundVariants=t.compoundVariants},ts=e=>{let t=(t,n)=>{let r=Mo(t,n),i=$o(r,e);return es(i,r),i};return{tv:t,createTV:e=>(n,r)=>t(n,r?uo(e,r):e)}},ns=(e,t)=>{let n=e.length,r=t.length,i=Array(n+r);for(let t=0;t<n;t++)i[t]=e[t];for(let e=0;e<r;e++)i[n+e]=t[e];return i},rs=(e,t)=>({classGroupId:e,validator:t}),is=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),as=`-`,os=[],ss=`arbitrary..`,cs=e=>{let t=ds(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e[0]===`[`&&e[e.length-1]===`]`)return us(e);let n=e.split(as);return ls(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?ns(i,t):t:i||os}return n[e]||os}}},ls=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=ls(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(as):e.slice(t).join(as),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},us=e=>{let t=e.slice(1,-1),n=t.indexOf(`:`);if(n===-1)return;let r=t.slice(0,n);return r?ss+r:void 0},ds=e=>{let{theme:t,classGroups:n}=e;return fs(n,t)},fs=(e,t)=>{let n=is();for(let r in e){let i=e[r];ps(i,n,r,t)}return n},ps=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];ms(i,t,n,r)}},ms=(e,t,n,r)=>{typeof e==`string`?hs(e,t,n):typeof e==`function`?gs(e,t,n,r):_s(e,t,n,r)},hs=(e,t,n)=>{let r=e===``?t:vs(t,e);r.classGroupId=n},gs=(e,t,n,r)=>{ys(e)?ps(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(rs(n,e)))},_s=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];ps(o,vs(t,a),n,r)}},vs=(e,t)=>{let n=e,r=t.split(as),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=is(),n.nextPart.set(t,i)),n=i}return n},ys=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,bs=`!`,xs=58,Ss=47,Cs=91,ws=93,Ts=40,Es=41,Ds=33,Os=(e,t,n,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:void 0}),ks=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e.charCodeAt(s);if(n===0&&r===0){if(o===xs){t.push(e.slice(i,s)),i=s+1;continue}if(o===Ss){a=s;continue}}o===Cs?n++:o===ws?n--:o===Ts?r++:o===Es&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1,u=s.length-1;s.charCodeAt(u)===Ds?(c=s.slice(0,-1),l=!0):s.charCodeAt(0)===Ds&&(c=s.slice(1),l=!0);let d=a&&a>i?a-i:void 0;return Os(t,l,c,d)},As=e=>{let t=new Set(e.orderSensitiveModifiers);return e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);if(o||s){if(r.length>0){r.sort();for(let e=0;e<r.length;e++)n.push(r[e]);r=[]}n.push(a)}else r.push(a)}if(r.length>0){r.sort();for(let e=0;e<r.length;e++)n.push(r[e])}return n}},js={isExternal:!0,classId:-1,conflictIds:[]},Ms=4096,Ns=16384,Ps=e=>{let t=As(e),n=Fs(e),{getClassGroupId:r,getConflictingClassGroupIds:i}=cs(e),a=Object.create(null),o=Object.create(null),s=0,c=new Int32Array(256),l=0,u=new Uint8Array(64),d=!1,f=e=>{let t=[],n=e.length,r=-1;d=!1;for(let i=0;i<n;i++){let n=e.charCodeAt(i);n===32?r!==-1&&(t.push(e.slice(r,i)),r=-1):n>=9&&n<=13?(d=!0,r!==-1&&(t.push(e.slice(r,i)),r=-1)):r===-1&&(r=i)}return r!==-1&&t.push(e.slice(r)),t},p=new Map,m=0,h=e=>{let t=p.get(e);if(t===void 0&&(t=m++,p.set(e,t),t>=c.length)){let e=new Int32Array(c.length*2);e.set(c),c=e}return t},g=e=>{let{isExternal:a,modifiers:o,hasImportantModifier:s,baseClassName:c,maybePostfixModifierPosition:l}=ks(e);if(a)return js;let u=!!l,d;if(u){let e=c.substring(0,l);d=r(e);let t=d&&n[d]?r(c):void 0;t&&t!==d&&(d=t,u=!1)}else d=r(c);if(!d){if(!u||(d=r(c),!d))return js;u=!1}let f=o.length===0?``:o.length===1?o[0]:t(o).join(`:`),p=s?f+bs:f,m=i(d,u),g=[];for(let e=0;e<m.length;e++)g.push(h(p+m[e]));return{isExternal:!1,classId:h(p+d),conflictIds:g}},_=e=>{let t=a[e];return t===void 0&&(t=o[e],t===void 0&&(t=g(e)),a[e]=t,++s>Ms&&(s=0,o=a,a=Object.create(null))),t};return{parseClassName:ks,sortModifiers:t,postfixLookupClassGroupIds:n,getClassGroupId:r,getConflictingClassGroupIds:i,getClassDescriptor:_,mergeClassList:e=>{let t=f(e),n=t.length;if(n===1)return t[0];m>Ns&&(p.clear(),m=0,a=Object.create(null),o=Object.create(null),s=0),l=l+1|0,l===0&&(l=1);let r=l;if(n>u.length){let e=u.length;for(;e<n;)e*=2;u=new Uint8Array(e)}let i=!1,h=0;for(let e=n-1;e>=0;--e){let n=t[e];h+=n.length;let a=_(n);if(a.isExternal){u[e]=1;continue}let o=a.classId;if(c[o]===r){u[e]=0,i=!0;continue}c[o]=r;let s=a.conflictIds;for(let e=0;e<s.length;e++)c[s[e]]=r;u[e]=1}if(!i&&!d&&e.length===h+n-1)return e;let g=``;for(let e=0;e<n;e++)u[e]===1&&(g&&(g+=` `),g+=t[e]);return g}}},Fs=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Is=500,Ls=e=>{let t,n,r=Object.create(null),i=Object.create(null),a=0,o=r=>(t=Ps(e()),n=t.mergeClassList,c.mergeString=s,s(r)),s=e=>{let t=r[e];return t===void 0&&(t=i[e],t===void 0&&(t=n(e)),r[e]=t,++a>Is&&(a=0,i=r,r=Object.create(null))),t},c=(...e)=>c.mergeString(Qa(e));return c.mergeString=o,c},Rs=[],zs=e=>{let t=t=>t[e]||Rs;return t.isThemeGetter=!0,t},Bs=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Vs=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Hs=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Us=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ws=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Gs=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ks=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qs=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Js=Number,Ys=Number.isNaN,Xs=Number.isInteger,Zs=e=>Hs.test(e),Qs=e=>!!e&&!Ys(Js(e)),$s=e=>!!e&&Xs(Js(e)),ec=e=>e.endsWith(`%`)&&Qs(e.slice(0,-1)),tc=e=>Us.test(e),nc=()=>!0,rc=e=>Ws.test(e)&&!Gs.test(e),ic=()=>!1,ac=e=>Ks.test(e),oc=e=>qs.test(e),sc=e=>!Z(e)&&!Q(e),cc=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),lc=e=>wc(e,Oc,ic),Z=e=>Bs.test(e),uc=e=>wc(e,kc,rc),dc=e=>wc(e,Ac,Qs),fc=e=>wc(e,Mc,nc),pc=e=>wc(e,jc,ic),mc=e=>wc(e,Ec,ic),hc=e=>wc(e,Dc,oc),gc=e=>wc(e,Nc,ac),Q=e=>Vs.test(e),_c=e=>Tc(e,kc),vc=e=>Tc(e,jc),yc=e=>Tc(e,Ec),bc=e=>Tc(e,Oc),xc=e=>Tc(e,Dc),Sc=e=>Tc(e,Nc,!0),Cc=e=>Tc(e,Mc,!0),wc=(e,t,n)=>{let r=Bs.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Tc=(e,t,n=!1)=>{let r=Vs.exec(e);return r?r[1]?t(r[1]):n:!1},Ec=e=>e===`position`||e===`percentage`,Dc=e=>e===`image`||e===`url`,Oc=e=>e===`length`||e===`size`||e===`bg-size`,kc=e=>e===`length`,Ac=e=>e===`number`,jc=e=>e===`family-name`,Mc=e=>e===`number`||e===`weight`,Nc=e=>e===`shadow`,Pc=()=>{let e=zs(`color`),t=zs(`font`),n=zs(`text`),r=zs(`font-weight`),i=zs(`tracking`),a=zs(`leading`),o=zs(`breakpoint`),s=zs(`container`),c=zs(`spacing`),l=zs(`radius`),u=zs(`shadow`),d=zs(`inset-shadow`),f=zs(`text-shadow`),p=zs(`drop-shadow`),m=zs(`blur`),h=zs(`perspective`),g=zs(`aspect`),_=zs(`ease`),v=zs(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Q,Z],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Q,Z,c],ee=()=>[Zs,`full`,`auto`,...w()],te=()=>[$s,`none`,`subgrid`,Q,Z],ne=()=>[`auto`,{span:[`full`,$s,Q,Z]},$s,Q,Z],re=()=>[$s,`auto`,Q,Z],ie=()=>[`auto`,`min`,`max`,`fr`,Q,Z],ae=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],oe=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],se=()=>[`auto`,...w()],ce=()=>[Zs,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],le=()=>[Zs,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ue=()=>[Zs,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],T=()=>[e,Q,Z],de=()=>[...b(),yc,mc,{position:[Q,Z]}],fe=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],pe=()=>[`auto`,`cover`,`contain`,bc,lc,{size:[Q,Z]}],me=()=>[ec,_c,uc],he=()=>[``,`none`,`full`,l,Q,Z],ge=()=>[``,Qs,_c,uc],_e=()=>[`solid`,`dashed`,`dotted`,`double`],ve=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],E=()=>[Qs,ec,yc,mc],ye=()=>[``,`none`,m,Q,Z],be=()=>[`none`,Qs,Q,Z],xe=()=>[`none`,Qs,Q,Z],Se=()=>[Qs,Q,Z],Ce=()=>[Zs,`full`,...w()];return{theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[tc],breakpoint:[tc],color:[nc],container:[tc],"drop-shadow":[tc],ease:[`in`,`out`,`in-out`],font:[sc],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[tc],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[tc],shadow:[tc],spacing:[`px`,Qs],text:[tc],"text-shadow":[tc],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Zs,Z,Q,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Q,Z]}],"container-named":[cc],columns:[{columns:[Qs,Z,Q,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:ee()}],"inset-x":[{"inset-x":ee()}],"inset-y":[{"inset-y":ee()}],start:[{"inset-s":ee(),start:ee()}],end:[{"inset-e":ee(),end:ee()}],"inset-bs":[{"inset-bs":ee()}],"inset-be":[{"inset-be":ee()}],top:[{top:ee()}],right:[{right:ee()}],bottom:[{bottom:ee()}],left:[{left:ee()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[$s,`auto`,Q,Z]}],basis:[{basis:[Zs,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Qs,Zs,`auto`,`initial`,`none`,Z]}],grow:[{grow:[``,Qs,Q,Z]}],shrink:[{shrink:[``,Qs,Q,Z]}],order:[{order:[$s,`first`,`last`,`none`,Q,Z]}],"grid-cols":[{"grid-cols":te()}],"col-start-end":[{col:ne()}],"col-start":[{"col-start":re()}],"col-end":[{"col-end":re()}],"grid-rows":[{"grid-rows":te()}],"row-start-end":[{row:ne()}],"row-start":[{"row-start":re()}],"row-end":[{"row-end":re()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ie()}],"auto-rows":[{"auto-rows":ie()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ae(),`normal`]}],"justify-items":[{"justify-items":[...oe(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...oe()]}],"align-content":[{content:[`normal`,...ae()]}],"align-items":[{items:[...oe(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...oe(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ae()}],"place-items":[{"place-items":[...oe(),`baseline`]}],"place-self":[{"place-self":[`auto`,...oe()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:se()}],mx:[{mx:se()}],my:[{my:se()}],ms:[{ms:se()}],me:[{me:se()}],mbs:[{mbs:se()}],mbe:[{mbe:se()}],mt:[{mt:se()}],mr:[{mr:se()}],mb:[{mb:se()}],ml:[{ml:se()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ce()}],"inline-size":[{inline:[`auto`,...le()]}],"min-inline-size":[{"min-inline":[`auto`,...le()]}],"max-inline-size":[{"max-inline":[`none`,...le()]}],"block-size":[{block:[`auto`,...ue()]}],"min-block-size":[{"min-block":[`auto`,...ue()]}],"max-block-size":[{"max-block":[`none`,...ue()]}],w:[{w:[s,`screen`,...ce()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ce()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ce()]}],h:[{h:[`screen`,`lh`,...ce()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ce()]}],"max-h":[{"max-h":[`screen`,`lh`,...ce()]}],"font-size":[{text:[`base`,n,_c,uc]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Cc,fc]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ec,Z]}],"font-family":[{font:[vc,pc,t]}],"font-features":[{"font-features":[Z]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Q,Z]}],"line-clamp":[{"line-clamp":[Qs,`none`,Q,dc]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Q,Z]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Q,Z]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[..._e(),`wavy`]}],"text-decoration-thickness":[{decoration:[Qs,`from-font`,`auto`,Q,uc]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[Qs,`auto`,Q,Z]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[$s,Q,Z]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Q,Z]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Q,Z]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:de()}],"bg-repeat":[{bg:fe()}],"bg-size":[{bg:pe()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},$s,Q,Z],radial:[``,Q,Z],conic:[$s,Q,Z]},xc,hc]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:me()}],"gradient-via-pos":[{via:me()}],"gradient-to-pos":[{to:me()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:ge()}],"border-w-x":[{"border-x":ge()}],"border-w-y":[{"border-y":ge()}],"border-w-s":[{"border-s":ge()}],"border-w-e":[{"border-e":ge()}],"border-w-bs":[{"border-bs":ge()}],"border-w-be":[{"border-be":ge()}],"border-w-t":[{"border-t":ge()}],"border-w-r":[{"border-r":ge()}],"border-w-b":[{"border-b":ge()}],"border-w-l":[{"border-l":ge()}],"divide-x":[{"divide-x":ge()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":ge()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[..._e(),`hidden`,`none`]}],"divide-style":[{divide:[..._e(),`hidden`,`none`]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[..._e(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Qs,Q,Z]}],"outline-w":[{outline:[``,Qs,_c,uc]}],"outline-color":[{outline:T()}],shadow:[{shadow:[``,`none`,u,Sc,gc]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":[`none`,d,Sc,gc]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:ge()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[Qs,uc]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":ge()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":[`none`,f,Sc,gc]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[Qs,Q,Z]}],"mix-blend":[{"mix-blend":[...ve(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ve()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Qs]}],"mask-image-linear-from-pos":[{"mask-linear-from":E()}],"mask-image-linear-to-pos":[{"mask-linear-to":E()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":E()}],"mask-image-t-to-pos":[{"mask-t-to":E()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":E()}],"mask-image-r-to-pos":[{"mask-r-to":E()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":E()}],"mask-image-b-to-pos":[{"mask-b-to":E()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":E()}],"mask-image-l-to-pos":[{"mask-l-to":E()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":E()}],"mask-image-x-to-pos":[{"mask-x-to":E()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":E()}],"mask-image-y-to-pos":[{"mask-y-to":E()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[Q,Z]}],"mask-image-radial-from-pos":[{"mask-radial-from":E()}],"mask-image-radial-to-pos":[{"mask-radial-to":E()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Qs]}],"mask-image-conic-from-pos":[{"mask-conic-from":E()}],"mask-image-conic-to-pos":[{"mask-conic-to":E()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:de()}],"mask-repeat":[{mask:fe()}],"mask-size":[{mask:pe()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Q,Z]}],filter:[{filter:[``,`none`,Q,Z]}],blur:[{blur:ye()}],brightness:[{brightness:[Qs,Q,Z]}],contrast:[{contrast:[Qs,Q,Z]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Sc,gc]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:[``,Qs,Q,Z]}],"hue-rotate":[{"hue-rotate":[Qs,Q,Z]}],invert:[{invert:[``,Qs,Q,Z]}],saturate:[{saturate:[Qs,Q,Z]}],sepia:[{sepia:[``,Qs,Q,Z]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Q,Z]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[Qs,Q,Z]}],"backdrop-contrast":[{"backdrop-contrast":[Qs,Q,Z]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Qs,Q,Z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qs,Q,Z]}],"backdrop-invert":[{"backdrop-invert":[``,Qs,Q,Z]}],"backdrop-opacity":[{"backdrop-opacity":[Qs,Q,Z]}],"backdrop-saturate":[{"backdrop-saturate":[Qs,Q,Z]}],"backdrop-sepia":[{"backdrop-sepia":[``,Qs,Q,Z]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Q,Z]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Qs,`initial`,Q,Z]}],ease:[{ease:[`linear`,`initial`,_,Q,Z]}],delay:[{delay:[Qs,Q,Z]}],animate:[{animate:[`none`,v,Q,Z]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Q,Z]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:be()}],"rotate-x":[{"rotate-x":be()}],"rotate-y":[{"rotate-y":be()}],"rotate-z":[{"rotate-z":be()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":[`scale-3d`],skew:[{skew:Se()}],"skew-x":[{"skew-x":Se()}],"skew-y":[{"skew-y":Se()}],transform:[{transform:[Q,Z,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Ce()}],"translate-x":[{"translate-x":Ce()}],"translate-y":[{"translate-y":Ce()}],"translate-z":[{"translate-z":Ce()}],"translate-none":[`translate-none`],zoom:[{zoom:[$s,Q,Z]}],accent:[{accent:T()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Q,Z]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":T()}],"scrollbar-track-color":[{"scrollbar-track":T()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Q,Z]}],fill:[{fill:[`none`,...T()]}],"stroke-w":[{stroke:[Qs,_c,uc,dc]}],stroke:[{stroke:[`none`,...T()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}},Fc=(e,{extend:t={},override:n={}})=>(Lc(e.theme,n.theme),Lc(e.classGroups,n.classGroups),Lc(e.conflictingClassGroups,n.conflictingClassGroups),Lc(e.conflictingClassGroupModifiers,n.conflictingClassGroupModifiers),Ic(e,`postfixLookupClassGroups`,n.postfixLookupClassGroups),Ic(e,`orderSensitiveModifiers`,n.orderSensitiveModifiers),Rc(e.theme,t.theme),Rc(e.classGroups,t.classGroups),Rc(e.conflictingClassGroups,t.conflictingClassGroups),Rc(e.conflictingClassGroupModifiers,t.conflictingClassGroupModifiers),zc(e,t,`postfixLookupClassGroups`),zc(e,t,`orderSensitiveModifiers`),e),Ic=(e,t,n)=>{n!==void 0&&(e[t]=n)},Lc=(e,t)=>{if(t)for(let n in t)Ic(e,n,t[n])},Rc=(e,t)=>{if(t)for(let n in t)zc(e,t,n)},zc=(e,t,n)=>{let r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},Bc=e=>Ls(e?typeof e==`function`?()=>e(Pc()):()=>Fc(Pc(),e):Pc),Vc=e=>{if(ao(e))return;let t=e,n={...t.extend??{}};for(let e of[`theme`,`classGroups`,`conflictingClassGroups`,`conflictingClassGroupModifiers`,`postfixLookupClassGroups`,`orderSensitiveModifiers`,`cacheSize`,`prefix`,`separator`,`experimentalParseClassName`])t[e]!==void 0&&n[e]===void 0&&(n[e]=t[e]);let r={};if(Object.keys(n).length>0&&(r.extend=n),t.override!=null&&!ao(t.override)&&(r.override=t.override),r.extend||r.override)return r},Hc=e=>{let t=Bc(Vc(e));return e=>t.mergeString(e)},Uc,Wc=()=>(Uc||=Bc(),Uc),Gc=()=>((!Eo.cachedTwMerge||Eo.didTwMergeConfigChange)&&(Eo.didTwMergeConfigChange=!1,Eo.cachedTwMerge=Hc(Eo.cachedTwMergeConfig)),Eo.cachedTwMerge),Kc=e=>{let t=e?.twMergeConfig;t&&!ao(t)&&(oo(t,Eo.cachedTwMergeConfig)||(Eo.cachedTwMergeConfig=t,Eo.didTwMergeConfigChange=!0))},qc=e=>Qa(e);(()=>{let e=Error();return!(`line`in e)&&!(`lineNumber`in e)})();var Jc=Eo.reset.bind(Eo);Eo.reset=()=>{Uc=void 0,Jc()};var Yc=(e,t)=>{let n=qc(e);return!n||!(t?.twMerge??!0)?n||void 0:n.indexOf(` `)===-1?n:(Kc(t),(t?.twMergeConfig&&!ao(t.twMergeConfig)?Gc():Wc().mergeString)(n)||void 0)},Xc=ts((e,...t)=>Yc(t,e)),Zc=Xc.tv;Xc.createTV;var Qc=48,$c=(e,t=0)=>{let n=new Int32Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r)-Qc-t;return n},el=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},tl=e=>{let t=new Int32Array(e.length),n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r)-Qc;n+=i>>>1^-(i&1),t[r]=n}return t},nl=384,rl=[],il=el($c(`E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010`)),al=el($c(`:11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3`)),ol=`@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom`,sl=(()=>{let e=il.length-1,t=new Int32Array(e);for(let n=e-1;n>=0;n--){let e=1,r=n+1;for(let i=il[n];i<il[n+1];i++)e+=t[r],r+=t[r];t[n]=e}let n=new Int32Array(il[e]),r=0;for(let i=0;i<e;i++){let e=i+1;for(let a=il[i];a<il[i+1];a++)n[r++]=e,e+=t[e]}return n})(),cl=$c(`02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000`,1),ll=el($c(`123333359346463635126536711576`)),ul=$c(`93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032`),dl=$c(`012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199`),fl=tl(`020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200`),pl=(()=>{let e=new Int32Array(319).fill(-1),t=tl(`02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222`),n=tl(`02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222`);for(let r=0;r<t.length;r++)e[t[r]]=n[r];return e})(),ml=`container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform`.split(`|`).map(e=>{let t=e.split(` `),n=t.shift();for(let e=0;e<t.length;e++)t[e]=n+t[e];return t}),hl=tl(`0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422`),gl=tl(`ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>6ʰ22ʷʺʷʺʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622`),_l=tl(`02222222222222222222222222222222222222222222222222222222222222222202021422222222CF2200GJ021042222WZ222IL0ad2c10h2222U00X202[^2w0000120zy|}€22ƒ†…:22z22222222222G000q†OVI00000{˜2™<40000Œ›@00000G¦§000ª00000000000000021K¬«00®“000000000000000000000–222›HGH_1¸222½2¾2222ÇÊ000­°2±`),vl=new Int32Array(987),yl=new Int32Array(987),bl=new Int32Array(987),xl=``,Sl=new Int32Array(1022);{let e=new Map,t=0,n=0;for(let r=0;r<hl.length;r++)for(let i of ml[_l[r]]){let a=e.get(i);a===void 0&&(a=t++,e.set(i,a),Sl[a*2]=xl.length,Sl[a*2+1]=i.length,xl+=i),vl[n]=hl[r],yl[n]=gl[r],bl[n]=a,n++}}var Cl=tl(`0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p`),wl=el($c(`1::24444432:442:44:44>222222:44:4421322511111311111114`)),Tl=tl(`2Š4A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅҜ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=„ƧNž2Đå242L222290000f22500ɛ000ǘ222`),El=$c(`ij`),Dl=$c(`—`),Ol=$c(`1`),kl={GROUP_COUNT:nl,customValidatorNames:rl,edgeStart:il,labelStart:al,labelText:ol,edgeTarget:sl,nodeGroup:cl,nodeVlist:pl,vlistPat:ll,vlistOps:ul,vlistRef:dl,vlistGroup:fl,litAnchor:vl,litGroup:yl,litPool:bl,poolOffsets:Sl,poolText:xl,adjGid:Cl,adjStart:wl,adjTgt:Tl,patGid:El,patTgt:Dl,postfixLookupGroups:Ol,orderSensitiveModifiers:`* ** after backdrop before details-content file first-letter first-line marker placeholder selection`},Al=`line`in Error(),jl=-1,Ml=-1,Nl=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},Pl=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15},Fl=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:ee,orderSensitiveModifiers:te}=e,ne=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)ne[y[e]]=e;let re=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>re&&(re=t)}let ie=32;for(;ie<2*(1+re+S.length);)ie<<=1;let ae=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)ae[e+1]=ae[e]+u[f[e]+1]-u[f[e]];let oe=new Uint8Array(r);for(let e=0;e<w.length;e++)oe[w[e]]=1;let se=i.length-1,ce=new Uint8Array(se),le=0,ue=!0;for(let e=0;e<m.length;e++){ce[m[e]]=1;let t=_[g[e]*2+1];t>le&&(le=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(ue=!1)}let T=1;for(;T<m.length*2;)T<<=1;let de=new Int32Array(T).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(Nl(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&T-1;for(;de[n]!==-1;)n=n+1&T-1;de[n]=e}let fe=(e,t,n,r)=>{let i=(Nl(t,n,r)^Math.imul(e,2654435761)|0)&T-1,a=r-n;for(;;){let r=de[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&T-1}},pe=n.cacheSize??8192,me=n.prefix??e.prefix??``,he=me===``?``:me+`:`,ge=he.length,_e=(ee??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),ve=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,E=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ye=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,be=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xe=0,Se=-1,Ce=-1,we=-1,Te=-1,D=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,Ee=e=>/\s/.test(String.fromCharCode(e)),De=(e,t,n)=>{if(xe=0,Se=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)xe=1;else if(r===40&&i===41)xe=2;else return;we=t+1,Te=n-1;let a=t+1;if(D(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!D(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(Se=t+1,Ce=a,we=a+1)}},Oe=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},ke=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,O=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,k=e=>!!e&&!Number.isNaN(Number(e)),Ae=(e,t,n)=>{if(n-t<11||!Oe(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&Oe(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&Oe(e,t+10,t+18,`-normal/`)},je=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],Me=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),Ne=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],Pe=(e,t,n,r)=>{if(e>=10){if(e>=25)return _e[e-25](t.slice(n,r));let i=e-10;if(xe!==je[i])return!1;if(Se>=0){for(let e of Me[i])if(Oe(t,Se,Ce,e))return!0;return!1}switch(Ne[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(we,Te);return ve.test(e)&&!E.test(e)}case 3:return k(t.slice(we,Te));case 4:return be.test(t.slice(we,Te));default:return ye.test(t.slice(we,Te))}}switch(e){case 0:return!0;case 1:return xe===0;case 2:return xe===1;case 3:return xe===2;case 4:return ke.test(t.slice(n,r));case 5:return k(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&k(t.slice(n,r-1));case 8:return O.test(t.slice(n,r));default:return Ae(t,n,r)}},Fe=new Set(typeof te==`string`?te.split(` `):te),Ie=(e,t,n,r,i,a)=>{let o=Nl(t,n,r)^(i?2654435769:0),s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},Le=new Map,Re=new Map,ze=2,Be=4096,Ve=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||Fe.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=Re.get(s);return c===void 0&&Re.set(s,c=ze++),c},He=new Map,Ue=r,We=r+4096,Ge=()=>Ue++,Ke=2097152,qe=8192,Je=new Int32Array(qe),Ye=Array(qe).fill(null),Xe=new Int32Array(qe),Ze=new Int32Array(qe),Qe=new Uint8Array(qe),$e=0,et=(e,t,n,r,i,a,o,s)=>{let c=e;if(Ye[e]!==null){if(Ye[e|1]===null)c=e|1;else if(!($e++&3))c=e|$e>>2&1;else return}Ye[c]=t.slice(n,r),Je[c]=i,Xe[c]=a,Ze[c]=o,Qe[c]=s},tt=()=>Ye.fill(null),nt=256,A=[new Int32Array(nt),new Int32Array(nt),new Int32Array(nt),new Int32Array(nt)],[j,rt,it,at]=A,ot=new Uint8Array(nt),st=new Uint8Array(nt),ct=()=>{nt*=2,A=A.map(e=>{let t=new Int32Array(nt);return t.set(e),t}),[j,rt,it,at]=A;let e=new Uint8Array(nt);e.set(ot),ot=e,st=new Uint8Array(nt)},lt=64,ut=new Int32Array(lt),dt=new Int32Array(lt),ft=new Int32Array(r),pt=2048,mt=21,ht=new Float64Array(pt),gt=new Int32Array(pt),_t=0,vt=(e,t)=>{if(e===0&&t<r)return ft[t]===_t?1:(ft[t]=_t,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>mt;for(;gt[i]===_t;){if(ht[i]===n)return 1;i=i+1&pt-1}return ht[i]=n,gt[i]=_t,0},yt=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?jl:Ie(He,e,t+1,r,0,Ge)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=dt[t];if(r>n)continue;let i=ut[t],a=n-r;if(ce[i]===1&&a>0&&a<=le){let t=e.charCodeAt(r);if(ue===!1||t!==91&&t!==40){let t=fe(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;De(e,r,n);let h=ae[o]-c;for(let t=c;t<m;t++)if(Pe(d[t],e,r,n))return p[h+t]}return jl},bt=e=>{let t=e.length,n=0,c=0,u=!1;(ze>Be||Le.size>Be)&&(Le=new Map,Re=new Map,ze=2,tt()),Ue>We&&(He=new Map,Ue=r,tt());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&Ee(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&Ee(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===nt&&ct();let _=n++;j[_]=p,rt[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15,y=v&8190;{let t=-1;if(Je[y]===v&&Ye[y]!==null&&Ye[y].length===g?t=y:Je[y|1]===v&&Ye[y|1]!==null&&Ye[y|1].length===g&&(t=y|1),t>=0){let n=Ye[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){it[_]=Xe[t],at[_]=Ze[t],ot[_]=Qe[t];continue}}}let b=p;if(ge!==0){if(h-p<=ge||!e.startsWith(he,p)){it[_]=jl,et(y,e,p,h,v,jl,0,0);continue}b=p+ge}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let ee=C>=b?C+1:b,te=ee,ne=h,re=!1,ie=0;ne>te&&e.charCodeAt(ne-1)===33?(re=!0,ne--):ne>te&&e.charCodeAt(te)===33&&(re=!0,te++,ie=1);let ae=-1;w>ee&&(ae=w+ie,ae>=ne&&(ae=-1));let se=te;ne-te>1&&e.charCodeAt(te)===45&&(se=te+1);let le=0,ue=0,T=0,de=-1,fe=0;(l[0]>=0||ce[0]===1)&&(ut[0]=0,dt[0]=se,fe=1);let pe=Ml,me=0;for(let t=se;t<ne;t++)if(t===ae&&(pe=ue<T?Ml:le,me=fe),le!==Ml){let n=e.charCodeAt(t),r=-1;if(ue<T)o.charCodeAt(ue)===n?(ue++,ue===T&&(r=le=de)):le=Ml;else{let e=i[le],t=i[le+1],c=Ml;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(ue=e+1,T=a[i+1],de=s[i],c=le);break}}le=c}if(r>=0&&(l[r]>=0||ce[r]===1)&&t+1<ne&&e.charCodeAt(t+1)===45){if(fe===lt){lt*=2;let e=new Int32Array(lt);e.set(ut),ut=e;let t=new Int32Array(lt);t.set(dt),dt=t}ut[fe]=r,dt[fe]=t+2,fe++}}ae===ne&&(pe=ue<T?Ml:le,me=fe);let _e=ue<T?Ml:le,ve,E=!1;if(ae>=0){if(E=!0,ve=yt(e,te,ae,pe,me),ve!==jl&&ve<r&&oe[ve]){let t=yt(e,te,ne,_e,fe);t!==jl&&t!==ve&&(ve=t,E=!1)}else ve===jl&&(ve=yt(e,te,ne,_e,fe),E=!1)}else ve=yt(e,te,ne,_e,fe);let ye=0,be=0;ve===jl?it[_]=jl:(be=+!!E,ye=b>=C?+!!re:Ie(Le,e,b,C,+!!re,e=>Ve(e,re)),it[_]=ve,ot[_]=be,at[_]=ye),et(y,e,p,h,v,ve,ye,be)}if(n===0)return``;if(n===1)return j[0]===0&&rt[0]===t?e:e.slice(j[0],rt[0]);if(n*ie>pt){for(;n*ie>pt;)pt<<=1,mt--;ht=new Float64Array(pt),gt=new Int32Array(pt)}if(ze>=Ke||Ue>=Ke)throw Error(`cn: too many distinct classes in one merge`);_t=_t+1|0,_t===0&&(ft.fill(0),gt.fill(0),_t=1);let f=!1;for(let e=n-1;e>=0;e--){let t=it[e];if(t===jl){st[e]=1;continue}let n=at[e];if(vt(n,t)===1)st[e]=0,f=!0;else if(st[e]=1,t<r){let r=ne[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)vt(n,x[e]);if(ot[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&vt(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!st[m]){m++;continue}let t=j[m],r=rt[m],i=m+1;for(;i<n&&st[i]&&j[i]===r+1&&e.charCodeAt(r)===32;)r=rt[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},xt=16384,St=new Int32Array(xt*2),Ct=0,wt=1,M=Object.create(null),Tt=Object.create(null),Et=new Map,Dt=new Map,Ot=0,kt=0,At=()=>{Ct^=xt,wt=wt+1|0,kt=0},jt=e=>{let t=M[e];if(t!==void 0)return t;let n=Pl(e,0,e.length),r=(n&16383)+Ct,i=St[r]===(n^wt)||St[r^xt]===(n^wt-1);return i&&(t=Tt[e],t!==void 0)?(M[e]=t,t):(t=bt(e),i?(M[e]=t,++Ot>pe&&(Ot=0,Tt=M,M=Object.create(null),At())):(St[r]=n^wt,++kt>xt&&At()),t)},Mt=e=>{let t=Et.get(e);if(t!==void 0)return t;let n=Pl(e,0,e.length),r=(n&16383)+Ct,i=St[r]===(n^wt)||St[r^xt]===(n^wt-1);return i&&(t=Dt.get(e),t!==void 0)?(Et.set(e,t),t):(t=bt(e),i?(Et.set(e,t),++Ot>pe&&(Ot=0,Dt=Et,Et=new Map,At())):(St[r]=n^wt,++kt>xt&&At()),t)},Nt=e=>{let t=Pl(e,0,e.length),n=(t&16383)+Ct;return St[n]===(t^wt)||St[n^xt]===(t^wt-1)||(St[n]=t^wt,++kt>xt&&At(),!1)},Pt=pe===0?bt:Al?e=>{let t=Et.get(e);return t===void 0?Mt(e):t}:jt;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?Pt(arguments[0]):Pt(Rl.apply(null,arguments))},mergeString:Pt,seenBefore:pe===0?()=>!1:Nt,mergeUncached:bt}},Il=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:Il(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},Ll=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:Il(i,t);a&&(n&&(n+=` `),n+=a)}return n},Rl=function(){return Ll(arguments,!1)},zl=256,Bl=16,Vl=1024,Hl=4096,Ul=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=null,l=[],u=[],d=0,f=(t,n,r)=>{c===null&&(c=Array(Hl).fill(``),l=Array(Hl).fill(``),u=Array(Hl).fill(``));let i=Pl(t,0,t.length)&4094;if(c[i]===t&&l[i]===n)return u[i];if(c[i|1]===t&&l[i|1]===n)return u[i|1];let a=e(r?n+` `+t:t),o=c[i]===``?i:i|(c[i|1]===``?1:d++&1);return c[o]=t,l[o]=n,u[o]=a,a},p=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},m=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},h=(t,c)=>{let l=t.length,u=s===null?null:s.n;if(!c){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let d=``,p=-1,h=0,g=!1;for(let e=0;e<l;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=Il(n,!0),!n)continue;g=!0}p<0&&(d=n,p=e),h++}}if(h===0)return``;if(h===1)return e(d);if(g){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let _=i.get(d);_===void 0&&(_=a.get(d),_!==void 0&&i.set(d,_));let v=null;if(_!==void 0){if(_.skip>0){_.skip--,s=null;let e=d;for(let n=p+1;n<l;n++){let r=t[n];r&&(e+=` `+r)}return f(e,``,!1)}let e=_.e;outer:for(let n=0;n<e.length;n++){let r=e[n];if(r.t!==h)continue;let i=r.a,a=1;for(let e=p+1;e<l;e++){let n=t[e];if(n&&n!==i[a++])continue outer}v=r;break}v!==null&&(_.miss=0)}if(v===null){let s=d,c=[d];for(let e=p+1;e<l;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);v={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},_===void 0?i.set(d,_={e:[],miss:0,skip:0,at:0}):++_.miss>Bl&&(_.miss=Bl,_.skip=Vl,_.e.length=0,_.at=0);let u=_.e;u.length<zl?u.push(v):(u[_.at]=v,_.at=_.at+1&255),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==v&&(s.n=v),s=v,v.r},g=t=>Array.isArray(t)?h(t.slice(),!1):e(Il(t,!0));return function(t,n,r){let a=arguments.length;if((a|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&p(i,t,n,r))return s=i,i.r;if(e!==i&&p(e,t,n,r))return e.r}if(a===2&&typeof n==`string`&&n!==``){let e=i.get(t);if(e!==void 0&&e.skip>0)return e.skip--,s=null,f(n,t,!0)}return h([t,n,r],!0)}if(a===1)return typeof t==`string`?e(t):g(t);let o=s;if(o!==null){let e=o.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<a;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(o!==e){let e=o.a,t=0,n=!0;for(let r=0;r<a;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===o.t)return o.r}}let c=[];for(let e=0;e<a;e++)c.push(arguments[e]);return h(c,!0)}},Wl=Fl(kl),Gl=Ul(Wl.mergeString,Wl);Wl.merge;var Kl=Zc({base:`h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none`,variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}}),ql=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`href`,`class`,`variant`,`children`]);function Jl(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`variant`,3,`default`),i=Y(t,ql);var a=U();Oi(I(a),()=>t.href?`a`:`span`,!1,(e,a)=>{ga(e,e=>n(e),()=>n()),sa(e,e=>({"data-slot":`badge`,href:t.href,class:e,...i}),[()=>Gl(Kl({variant:r()}),t.class)]);var o=U();q(I(o),()=>t.children??f),W(a,o)}),W(e,a),j()}var Yl=Zc({base:`focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground shadow-xs`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground`,destructive:`bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5`,lg:`h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-9`,"icon-xs":`size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}}),Xl=new Set([`$$slots`,`$$events`,`$$legacy`,`class`,`variant`,`size`,`ref`,`href`,`type`,`disabled`,`children`]),Zl=V(`<a><!></a>`),Ql=V(`<button><!></button>`);function $l(e,t){A(t,!0);let n=X(t,`variant`,3,`default`),r=X(t,`size`,3,`default`),i=X(t,`ref`,15,null),a=X(t,`href`,3,void 0),o=X(t,`type`,3,`button`),s=Y(t,Xl);var c=U(),l=I(c),u=e=>{var o=Zl();sa(o,e=>({"data-slot":`button`,class:e,href:t.disabled?void 0:a(),"aria-disabled":t.disabled,role:t.disabled?`link`:void 0,tabindex:t.disabled?-1:void 0,...s}),[()=>Gl(Yl({variant:n(),size:r()}),t.class)]),q(F(o),()=>t.children??f),O(o),ga(o,e=>i(e),()=>i()),W(e,o)},d=e=>{var a=Ql();sa(a,e=>({"data-slot":`button`,class:e,type:o(),disabled:t.disabled,...s}),[()=>Gl(Yl({variant:n(),size:r()}),t.class)]),q(F(a),()=>t.children??f),O(a),ga(a,e=>i(e),()=>i()),W(e,a)};K(l,e=>{a()?e(u):e(d,-1)}),W(e,c),j()}var eu=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`type`,`files`,`class`,`data-slot`]),tu=V(`<input/>`);function nu(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`value`,15),i=X(t,`files`,15),a=X(t,`data-slot`,3,`input`),o=Y(t,eu);var s=U(),c=I(s),l=e=>{var s=tu();sa(s,e=>({"data-slot":a(),class:e,type:`file`,...o}),[()=>Gl(`dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-9 rounded-md border bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] file:h-7 file:text-sm file:font-medium focus-visible:ring-3 aria-invalid:ring-3 md:text-sm w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,t.class)],void 0,void 0,void 0,!0),ga(s,e=>n(e),()=>n()),ma(s,i),da(s,r),W(e,s)},u=e=>{var i=tu();sa(i,e=>({"data-slot":a(),class:e,type:t.type,...o}),[()=>Gl(`dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-9 rounded-md border bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] file:h-7 file:text-sm file:font-medium focus-visible:ring-3 aria-invalid:ring-3 md:text-sm w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,t.class)],void 0,void 0,void 0,!0),ga(i,e=>n(e),()=>n()),da(i,r),W(e,i)};K(c,e=>{t.type===`file`?e(l):e(u,-1)}),W(e,s),j()}function ru(e){return typeof e==`function`}function iu(e){return typeof e==`object`&&!!e}var au=[`string`,`number`,`bigint`,`boolean`];function ou(e){return e==null||au.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>ou(e)):typeof e==`object`&&Object.getPrototypeOf(e)===Object.prototype}var su=Symbol(`box`),cu=Symbol(`is-writable`);function $(e,t){let n=M(e);return t?{[su]:!0,[cu]:!0,get current(){return B(n)},set current(e){t(e)}}:{[su]:!0,get current(){return e()}}}function lu(e){return iu(e)&&su in e}function uu(e){return lu(e)&&cu in e}function du(e){return lu(e)?e:ru(e)?$(e):mu(e)}function fu(e){return Object.entries(e).reduce((e,[t,n])=>lu(n)?(uu(n)?Object.defineProperty(e,t,{get(){return n.current},set(e){n.current=e}}):Object.defineProperty(e,t,{get(){return n.current}}),e):Object.assign(e,{[t]:n}),{})}function pu(e){return uu(e)?{[su]:!0,get current(){return e.current}}:e}function mu(e){let t=N(ln(e));return{[su]:!0,[cu]:!0,get current(){return B(t)},set current(e){P(t,e,!0)}}}function hu(e){let t=N(ln(e));return{[su]:!0,[cu]:!0,get current(){return B(t)},set current(e){P(t,e,!0)}}}hu.from=du,hu.with=$,hu.flatten=fu,hu.readonly=pu,hu.isBox=lu,hu.isWritableBox=uu;function gu(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var _u=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,vu=/\n/g,yu=/^\s*/,bu=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,xu=/^:\s*/,Su=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Cu=/^[;\s]*/,wu=/^\s+|\s+$/g,Tu=`
3
+ `,Eu=`/`,Du=`*`,Ou=``,ku=`comment`,Au=`declaration`;function ju(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(vu);t&&(n+=t.length);var i=e.lastIndexOf(Tu);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(yu)}function u(e){var t;for(e||=[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(Eu==e.charAt(0)&&Du==e.charAt(1)){for(var n=2;Ou!=e.charAt(n)&&(Du!=e.charAt(n)||Eu!=e.charAt(n+1));)++n;if(n+=2,Ou===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:ku,comment:o})}}function f(){var e=a(),t=c(bu);if(t){if(d(),!c(xu))return s(`property missing ':'`);var n=c(Su),r=e({type:Au,property:Mu(t[0].replace(_u,Ou)),value:n?Mu(n[0].replace(_u,Ou)):Ou});return c(Cu),r}}function p(){var e=[];u(e);for(var t;t=f();)t!==!1&&(e.push(t),u(e));return e}return l(),p()}function Mu(e){return e?e.replace(wu,Ou):Ou}function Nu(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=ju(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n||={},n[r]=a)}),n}var Pu=/\d/,Fu=[`-`,`_`,`/`,`.`];function Iu(e=``){if(!Pu.test(e))return e!==e.toLowerCase()}function Lu(e){let t=[],n=``,r,i;for(let a of e){let e=Fu.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=Iu(a);if(i===!1){if(r===!1&&o===!0){t.push(n),n=a,r=o;continue}if(r===!0&&o===!1&&n.length>1){let e=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=e+a,r=o;continue}}n+=a,r=o,i=e}return t.push(n),t}function Ru(e){return e?Lu(e).map(e=>Bu(e)).join(``):``}function zu(e){return Vu(Ru(e||``))}function Bu(e){return e?e[0].toUpperCase()+e.slice(1):``}function Vu(e){return e?e[0].toLowerCase()+e.slice(1):``}var Hu=1e3,Uu=new Map;function Wu(e){let t=Uu.get(e);return t===void 0&&(t=e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)?Ru(e):e.startsWith(`--`)?e:zu(e),Uu.size>=Hu&&Uu.clear(),Uu.set(e,t)),t}var Gu=/["'\\{}]|\/\*/,Ku=/^[-\w]+$/;function qu(e){if(Gu.test(e))return null;let t=[],n=0,r=0,i=-1;for(let a=0;a<=e.length;a++){let o=a<e.length?e.charCodeAt(a):59;if(o===40)n++;else if(o===41){if(--n<0)return null}else if(o===58)i<0&&(i=a);else if(o===59){if(n!==0)return null;let o=e.slice(r,a);if(i<0){if(o.trim()||t.length===0)return null}else{let n=e.slice(r,i).trim(),o=e.slice(i+1,a).trim();if(!Ku.test(n)||!o)return null;t.push(n,o)}r=a+1,i=-1}}return t}function Ju(e,t){let n=qu(t);if(n)for(let t=0;t<n.length;t+=2)e[Wu(n[t])]=n[t+1];else Nu(t,(t,n)=>{e[Wu(t)]=n})}function Yu(e){if(!e)return{};let t={};return Ju(t,e),t}function Xu(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function Zu(e,t){let n=RegExp(e,`g`);return e=>{if(typeof e!=`string`)throw TypeError(`expected an argument of type string, but got ${typeof e}`);return e.match(n)?e.replace(n,t):e}}var Qu=Zu(/[A-Z]/,e=>`-${e.toLowerCase()}`),$u=new Map;function ed(e){let t=$u.get(e);return t===void 0&&(t=Qu(e),$u.size>=1e3&&$u.clear(),$u.set(e,t)),t}function td(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`expected an argument of type object, but got ${typeof e}`);let t=``;for(let n of Object.keys(e)){let r=e[n];r!=null&&r!==``&&(t+=`${t?`
4
+ `:``}${ed(n)}: ${r};`)}return t}function nd(e={}){return td(e).replace(`
5
+ `,` `)}var rd=new Set(`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`.split(`.`));function id(e){return rd.has(e)}function ad(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];if(r){for(let e of Object.keys(r)){let n=t[e],i=r[e],a=typeof n==`function`,o=typeof i==`function`;if(a&&o&&id(e))t[e]=gu(n,i);else if(a&&o)t[e]=Xu(n,i);else if(e===`class`){let r=ou(n),a=ou(i);r&&a?t[e]=ji(n,i):r?t[e]=ji(n):a&&(t[e]=ji(i))}else if(e===`style`){let r=typeof n==`object`,a=typeof i==`object`,o=typeof n==`string`,s=typeof i==`string`;if(r&&a)t[e]={...n,...i};else if(r&&s){let r=Yu(i);t[e]={...n,...r}}else if(o&&a)t[e]={...Yu(n),...i};else if(o&&s){let r=Yu(n),a=Yu(i);t[e]={...r,...a}}else r?t[e]=n:a?t[e]=i:o?t[e]=n:s&&(t[e]=i)}else t[e]=i===void 0?n:i}for(let e of Object.getOwnPropertySymbols(r)){let n=t[e],i=r[e];t[e]=i===void 0?n:i}}}return typeof t.style==`object`&&(t.style=nd(t.style).replaceAll(`
6
+ `,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var od={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`,transform:`translateX(-100%)`};nd(od);var sd=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function cd(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var ld=class extends Map{#e=new Map;#t=N(0);#n=N(0);#r=hr||-1;constructor(e){if(super(),e){for(var[t,n]of e)super.set(t,n);this.#n.v=super.size}}#i(e){return hr===this.#r?N(e):$t(e)}has(e){var t=this.#e,n=t.get(e);if(n===void 0){if(super.has(e))n=this.#i(0),t.set(e,n);else return B(this.#t),!1}return B(n),!0}forEach(e,t){this.#a(),super.forEach(e,t)}get(e){var t=this.#e,n=t.get(e);if(n===void 0){if(super.has(e))n=this.#i(0),t.set(e,n);else{B(this.#t);return}}return B(n),super.get(e)}getOrInsert(e,t){return super.has(e)||this.set(e,t),this.get(e)}getOrInsertComputed(e,t){return super.has(e)||this.set(e,t(e)),this.get(e)}set(e,t){var n=this.#e,r=n.get(e),i=super.get(e),a=super.set(e,t),o=this.#t;if(r===void 0)r=this.#i(0),n.set(e,r),P(this.#n,super.size),sn(o);else if(i!==t){sn(r);var s=o.reactions===null?null:new Set(o.reactions);s!==null&&r.reactions?.every(e=>s.has(e))||sn(o)}return a}delete(e){var t=this.#e,n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),P(n,-1)),r&&(P(this.#n,super.size),sn(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;P(this.#n,0);for(var t of e.values())P(t,-1);sn(this.#t),e.clear()}}#a(){B(this.#t);var e=this.#e;if(this.#n.v!==e.size){for(var t of super.keys())if(!e.has(t)){var n=this.#i(0);e.set(t,n)}}for([,n]of this.#e)B(n)}keys(){return B(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return B(this.#n),super.size}};new class{#e;#t;constructor(e={}){let{window:t=sd,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=ai(e=>{let n=Kr(t,`focusin`,e),r=Kr(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?cd(this.#e):null}};function ud(e){return typeof e==`function`}var dd=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return tt(this.#t)}get(){let e=$e(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=$e(this.#t);return t===void 0?e:t}set(e){return et(this.#t,e)}};function fd(e,t){switch(e){case`post`:jn(t);break;case`pre`:Nn(t)}}function pd(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;fd(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=Or(()=>n(t,o));return o=t,r})}function md(e,t,n){pd(e,`post`,t,n)}function hd(e,t,n){pd(e,`pre`,t,n)}md.pre=hd;function gd(e){return ud(e)?e():e}var _d=class{#e={width:0,height:0};#t=!1;#n;#r;#i;#a=M(()=>(B(this.#s)?.(),this.getSize().width));#o=M(()=>(B(this.#s)?.(),this.getSize().height));#s=M(()=>{let e=gd(this.#r);if(e)return ai(t=>{if(!this.#i)return;let n=new this.#i.ResizeObserver(e=>{this.#t=!0;for(let t of e){let e=this.#n.box===`content-box`?t.contentBoxSize:t.borderBoxSize,n=Array.isArray(e)?e:[e];this.#e.width=n.reduce((e,t)=>Math.max(e,t.inlineSize),0),this.#e.height=n.reduce((e,t)=>Math.max(e,t.blockSize),0)}t()});return n.observe(e),()=>{this.#t=!1,n.disconnect()}})});constructor(e,t={box:`border-box`}){this.#i=t.window??sd,this.#n=t,this.#r=e,this.#e={width:0,height:0}}calculateSize(){let e=gd(this.#r);if(!e||!this.#i)return;let t=e.offsetWidth,n=e.offsetHeight;if(this.#n.box===`border-box`)return{width:t,height:n};let r=this.#i.getComputedStyle(e),i=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),a=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),o=parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),s=parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth);return{width:t-i-o,height:n-a-s}}getSize(){return this.#t?this.#e:this.calculateSize()??this.#e}get current(){return B(this.#s)?.(),this.getSize()}get width(){return B(this.#a)}get height(){return B(this.#o)}},vd=class{#e=()=>void 0;#t=M(()=>this.#e());constructor(e,t){let n;t!==void 0&&(n=t),this.#e=()=>{try{return n}finally{n=e()}}}get current(){return B(this.#t)}};function yd(e){jn(()=>()=>{e()})}function bd(e){jn(()=>Or(()=>e()))}function xd(e){Tr().then(e)}var Sd=1,Cd=9,wd=11;function Td(e){return iu(e)&&e.nodeType===Sd&&typeof e.nodeName==`string`}function Ed(e){return iu(e)&&e.nodeType===Cd}function Dd(e){return iu(e)&&e.constructor?.name===`VisualViewport`}function Od(e){return iu(e)&&e.nodeType!==void 0}function kd(e){return Od(e)&&e.nodeType===wd&&`host`in e}function Ad(e,t){if(!e||!t||!Td(e)||!Td(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&kd(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function jd(e){return Ed(e)?e:Dd(e)?e.document:e?.ownerDocument??document}function Md(e){return kd(e)?Md(e.host):Ed(e)?e.defaultView??window:Td(e)?e.ownerDocument?.defaultView??window:window}function Nd(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Pd=class{element;#e=M(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return B(this.#e)}set root(e){P(this.#e,e)}constructor(e){this.element=typeof e==`function`?$(e):e}getDocument=()=>jd(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>Nd(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)};function Fd(e,t){return{[jr()]:n=>lu(e)?(e.current=n,Or(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Or(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function Id(e){return e?`true`:`false`}function Ld(e){return e?`true`:void 0}function Rd(e){return e?``:void 0}function zd(e){return e?!0:void 0}function Bd(e){return e?`open`:`closed`}function Vd(e){return e?`checked`:`unchecked`}function Hd(e){return e===`starting`?{"data-starting-style":``}:e===`ending`?{"data-ending-style":``}:{}}function Ud(e,t){return t?`mixed`:e?`true`:`false`}var Wd=class{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(e=>[e,this.getAttr(e)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function Gd(e){let t=new Wd(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Kd=`ArrowDown`,qd=`ArrowLeft`,Jd=`ArrowRight`,Yd=`ArrowUp`,Xd=`Home`,Zd=`PageDown`,Qd=`PageUp`;function $d(e){return window.getComputedStyle(e).getPropertyValue(`direction`)}var ef=[Kd,Qd,Xd],tf=[Yd,Zd,`End`];[...ef,...tf];function nf(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?qd:Jd,vertical:Kd}[t]}function rf(e=`ltr`,t=`horizontal`){return{horizontal:e===`rtl`?Jd:qd,vertical:Yd}[t]}function af(e=`ltr`,t=`horizontal`){return[`ltr`,`rtl`].includes(e)||(e=`ltr`),[`horizontal`,`vertical`].includes(t)||(t=`horizontal`),{nextKey:nf(e,t),prevKey:rf(e,t)}}var of=typeof document<`u`,sf=cf();function cf(){return of&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function lf(e){return e instanceof HTMLElement}function uf(e){return e instanceof Element||e instanceof SVGElement}function df(e){return e?.matches(`:disabled`)??!1}function ff(e){return e!==null}function pf(e){if(typeof CSS<`u`&&typeof CSS.escape==`function`)return CSS.escape(e);let t=e.length,n=-1,r,i=``,a=e.charCodeAt(0);if(t===1&&a===45)return`\\`+e;for(;++n<t;)r=e.charCodeAt(n),i+=r===0?`�`:r>=1&&r<=31||r===127||n===0&&r>=48&&r<=57||n===1&&r>=48&&r<=57&&a===45?`\\`+r.toString(16)+` `:r>=128||r===45||r===95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122?e.charAt(n):`\\`+e.charAt(n);return i}var mf=class{#e;#t=hu(null);constructor(e){this.#e=e}getCandidateNodes(){if(!this.#e.rootNode.current)return[];if(this.#e.candidateSelector){let e=Array.from(this.#e.rootNode.current.querySelectorAll(this.#e.candidateSelector));return this.#n(this.#e.rootNode.current,e)}if(this.#e.candidateAttr){let e=Array.from(this.#e.rootNode.current.querySelectorAll(`[${this.#e.candidateAttr}]:not([data-disabled])`));return this.#n(this.#e.rootNode.current,e)}return[]}#n(e,t){let n=this.#e.rootAttr;if(!n)return t;let r=`[${n}]`;return t.filter(t=>t.closest(r)===e)}focusFirstCandidate(){let e=this.getCandidateNodes();e.length&&e[0]?.focus()}handleKeydown(e,t,n=!1){let r=this.#e.rootNode.current;if(!r||!e)return;let i=this.getCandidateNodes();if(!i.length)return;let a=i.indexOf(e),{nextKey:o,prevKey:s}=af($d(r),this.#e.orientation.current),c=this.#e.loop.current,l={[o]:a+1,[s]:a-1,[Xd]:0,End:i.length-1};if(n){let e=o===`ArrowDown`?Jd:Kd,t=s===`ArrowUp`?qd:Yd;l[e]=a+1,l[t]=a-1}let u=l[t.key];if(u===void 0)return;t.preventDefault(),u<0&&c?u=i.length-1:u===i.length&&c&&(u=0);let d=i[u];if(d)return d.focus(),this.#t.current=d.id,this.#e.onCandidateFocus?.(d),d}getTabIndex(e){let t=this.getCandidateNodes(),n=this.#t.current!==null;return e&&!n&&t[0]===e?(this.#t.current=e.id,0):e?.id===this.#t.current?0:-1}setCurrentTabStopId(e){this.#t.current=e}focusCurrentTabStop(){let e=this.#t.current;if(!e)return;let t=this.#e.rootNode.current?.querySelector(`#${pf(e)}`);t&&lf(t)&&t.focus()}},hf=class{#e;#t=null;#n=null;#r=0;constructor(e){this.#e=e,yd(()=>this.#i())}#i(){this.#t!==null&&(window.cancelAnimationFrame(this.#t),this.#t=null),this.#n?.disconnect(),this.#n=null,this.#r++}run(e){this.#i();let t=this.#r,n=()=>{t===this.#r&&this.#a(e)},r=()=>{if(t!==this.#r)return;let i=this.#e.ref.current;if(!i)return;if(typeof i.getAnimations!=`function`){this.#a(e);return}let a=i.getAnimations();a.length===0?n():Promise.all(a.map(e=>e.finished)).then(()=>{n()}).catch(()=>{t===this.#r&&(i.getAnimations().some(e=>e.pending||e.playState!==`finished`)?r():n())})},i=()=>{this.#t=window.requestAnimationFrame(()=>{this.#t=null,r()})};this.#e.afterTick.current?this.#t=window.requestAnimationFrame(()=>{this.#t=null;let e=`data-starting-style`,n=this.#e.ref.current;n&&(n.hasAttribute(e)?(this.#n=new MutationObserver(()=>{t===this.#r&&(n.hasAttribute(e)||(this.#n?.disconnect(),this.#n=null,i()))}),this.#n.observe(n,{attributes:!0,attributeFilter:[e]})):i())}):i()}#a(e){let t=this.#r,n=()=>{t===this.#r&&e()};this.#e.afterTick.current?xd(n):n()}},gf=class{#e;#t;#n;#r=N(!1);#i=N(void 0);#a=!1;#o=null;constructor(e){this.#e=e,P(this.#r,e.open.current,!0),this.#t=e.enabled??!0,this.#n=new hf({ref:this.#e.ref,afterTick:this.#e.open}),yd(()=>this.#s()),md(()=>this.#e.open.current,e=>{!this.#a&&(this.#a=!0,e===B(this.#r))||(this.#s(),!e&&this.#e.shouldSkipExitAnimation?.()?(P(this.#r,!1),P(this.#i,void 0),this.#e.onComplete?.()):(e&&P(this.#r,!0),P(this.#i,e?`starting`:`ending`,!0),e&&(this.#o=window.requestAnimationFrame(()=>{this.#o=null,this.#e.open.current&&P(this.#i,void 0)})),this.#t?this.#n.run(()=>{e===this.#e.open.current&&(this.#e.open.current||P(this.#r,!1),P(this.#i,void 0),this.#e.onComplete?.())}):(e||P(this.#r,!1),P(this.#i,void 0),this.#e.onComplete?.())))})}get shouldRender(){return B(this.#r)}get transitionStatus(){return B(this.#i)}#s(){this.#o!==null&&(window.cancelAnimationFrame(this.#o),this.#o=null)}};function _f(){}function vf(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}function yf(e,t){var n=U();gi(I(n),()=>t.children,e=>{var n=U();q(I(n),()=>t.children??f),W(e,n)}),W(e,n)}var bf=new dd(`BitsConfig`);function xf(){let e=new Sf(null,{});return bf.getOr(e).opts}var Sf=class{opts;constructor(e,t){let n=Cf(e,t);this.opts={defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function Cf(e,t){return n=>$(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function wf(e,t){return n=>{let r=xf();return $(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var Tf=wf(e=>e.defaultPortalTo,`body`);function Ef(e,t){A(t,!0);let n=Tf(()=>t.to),r=nt(),i=M(a);function a(){if(!of||t.disabled)return null;let e=null;return e=typeof n.current==`string`?document.querySelector(n.current):n.current,e}let o;function s(){o&&=(pi(o),null)}md([()=>B(i),()=>t.disabled],([e,n])=>{if(!e||n)s();else return o=li(yf,{target:e,props:{children:t.children},context:r}),()=>{s()}});var c=U(),l=I(c),u=e=>{var n=U();q(I(n),()=>t.children??f),W(e,n)};K(l,e=>{t.disabled&&e(u)}),W(e,c),j()}var Df=new WeakMap;function Of(e,t=e.composedPath()){Df.set(e,t)}function kf(e){return Df.get(e)??e.composedPath()}function Af(e,t){return t?uf(e.target)&&t.contains(e.target)||kf(e).includes(t):!1}function jf(e,t){for(let n of kf(e))if(uf(n)&&n.matches(t))return n;return uf(e.target)?e.target.closest(t):null}function Mf(e,t){Of(t,kf(e))}function Nf(e,t=500){let n=null,r=null,i=(...e)=>{i.destroy(),r=e,n=setTimeout(i.flush,t)};return i.flush=()=>{if(r===null)return;let t=r;i.destroy(),e(...t)},i.destroy=()=>{n!==null&&(clearTimeout(n),n=null),r=null},i}function Pf(e,t){return e===t||e.contains(t)}function Ff(e){return e?.ownerDocument??document}function If(e,t){let{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}var Lf=`data-context-menu-trigger`,Rf=`data-context-menu-content`;globalThis.bitsDismissableLayers??=new Map;var zf=class e{static create(t){return new e(t)}opts;#e=_f;#t=()=>!1;#n=null;#r=mu(`close`);#i={pointerdown:!1};#a=!1;#o=null;#s=!1;#c=void 0;#l=_f;#u=_f;#d=!1;constructor(e){this.opts=e,Nn(()=>{this.#r.current=e.interactOutsideBehavior.current,this.#e=e.onInteractOutside.current,this.#l=e.onFocusOutside.current,this.#t=e.isValidEvent.current,this.#n=e.ref.current});let t=_f,n=null,r=()=>{n=null,this.#x(),globalThis.bitsDismissableLayers.delete(this),this.#g.destroy(),this.#u(),t()};md([()=>this.opts.enabled.current,()=>this.opts.ref.current],([e,i])=>{let a=e?i:null;n!==a&&(r(),a&&(n=a,this.#c=Ff(a),globalThis.bitsDismissableLayers.set(this,this.#r),t=this.#p()))}),yd(()=>{this.#d=!0,r()})}#f=e=>{e.defaultPrevented||this.#d||!this.#n||xd(()=>{this.#d||this.#n&&!this.#b(e.target)&&e.target&&!this.#s&&this.#l?.(e)})};#p(){let e=this.#c,t=e=>{Or(()=>{this.#g.flush(),this.#_(e),this.#y(e)})},n=e=>{e.cancelBubble||e!==this.#o||(this.#v(e),e.pointerType===`touch`?(this.#g.destroy(),this.#h(e)):this.#g(e))};return e.addEventListener(`pointerdown`,t,!0),e.addEventListener(`pointerdown`,n),Xu(()=>e.removeEventListener(`pointerdown`,t,!0),()=>e.removeEventListener(`pointerdown`,n),Kr(e,`focusin`,this.#f))}#m=e=>{let t=e;t.defaultPrevented&&(t=Uf(e)),this.#e(e)};#h=e=>{if(!this.#n){this.#u();return}let t=this.#t(e,this.#n)||Hf(e,this.#n);if(!this.#a||this.#S()||!t){this.#u();return}let n=e;if(n.defaultPrevented&&(n=Uf(n)),this.#r.current!==`close`&&this.#r.current!==`defer-otherwise-close`)this.#u();else if(e.pointerType===`touch`){this.#u();let e=null,t=_f,n=e=>{t(),this.#m(e)};t=Xu(Kr(this.#c,`click`,n,{once:!0}),Kr(this.#c,`click`,t=>{Of(t),e=setTimeout(()=>n(t),0)},{once:!0,capture:!0}),()=>{e!==null&&clearTimeout(e),e=null}),this.#u=t}else this.#e(n)};#g=Nf(this.#h,10);#_=e=>{this.#i[e.type]=!0};#v=e=>{this.#i[e.type]=!1};#y=e=>{this.#o=e,Of(e),this.#n&&(this.#a=Vf(this))};#b=e=>this.#n?Pf(this.#n,e):!1;#x=()=>{for(let e in this.#i)this.#i[e]=!1;this.#a=!1,this.#o=null};#S(){return Object.values(this.#i).some(Boolean)}#C=()=>{this.#s=!0};#w=()=>{this.#s=!1};props={onfocuscapture:this.#C,onblurcapture:this.#w}};function Bf(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function Vf(e){let t=[...globalThis.bitsDismissableLayers],n=Bf(t);if(n)return n[0]===e;let[r]=t[0];return r===e}function Hf(e,t){let n=e.target;if(!uf(n))return!1;let r=!!jf(e,`[${Lf}]`),i=!!t.closest(`[${Rf}]`);return`button`in e&&e.button>0&&!r?!1:`button`in e&&e.button===0&&r&&i?!0:r&&i?!1:Ff(n).documentElement.contains(n)&&!Af(e,t)&&If(e,t)}function Uf(e){let t=e.currentTarget,n=e.target,r;r=e instanceof PointerEvent?new PointerEvent(e.type,e):new PointerEvent(`pointerdown`,e);let i=!1,a=new Proxy(r,{get:(r,a)=>{if(a===`currentTarget`)return t;if(a===`target`)return n;if(a===`preventDefault`)return()=>{i=!0,typeof r.preventDefault==`function`&&r.preventDefault()};if(a===`defaultPrevented`)return i;if(a in r){let e=r[a];return typeof e==`function`?e.bind(r):e}let o=e[a];return typeof o==`function`?o.bind(e):o}});return Mf(e,a),a}function Wf(e,t){A(t,!0);let n=X(t,`interactOutsideBehavior`,3,`close`),r=X(t,`onInteractOutside`,3,_f),i=X(t,`onFocusOutside`,3,_f),a=X(t,`isValidEvent`,3,()=>!1),o=zf.create({id:$(()=>t.id),interactOutsideBehavior:$(()=>n()),onInteractOutside:$(()=>r()),enabled:$(()=>t.enabled),onFocusOutside:$(()=>i()),isValidEvent:$(()=>a()),ref:Or(()=>t.ref)});var s=U();q(I(s),()=>t.children??f,()=>({props:o.props})),W(e,s),j()}globalThis.bitsEscapeLayers??=new Map;var Gf=class e{static create(t){return new e(t)}opts;domContext;constructor(e){this.opts=e,this.domContext=new Pd(this.opts.ref);let t=_f;md(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=this.#e()),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>Kr(this.domContext.getDocument(),`keydown`,this.#t,{passive:!1});#t=e=>{if(e.key!==`Escape`||!Kf(this))return;let t=new KeyboardEvent(e.type,e);e.preventDefault();let n=this.opts.escapeKeydownBehavior.current;(n===`close`||n===`defer-otherwise-close`)&&this.opts.onEscapeKeydown.current(t)}};function Kf(e){let t=[...globalThis.bitsEscapeLayers],n=t.findLast(([e,{current:t}])=>t===`close`||t===`ignore`);if(n)return n[0]===e;let[r]=t[0];return r===e}function qf(e,t){A(t,!0);let n=X(t,`escapeKeydownBehavior`,3,`close`),r=X(t,`onEscapeKeydown`,3,_f);Gf.create({escapeKeydownBehavior:$(()=>n()),onEscapeKeydown:$(()=>r()),enabled:$(()=>t.enabled),ref:Or(()=>t.ref)});var i=U();q(I(i),()=>t.children??f),W(e,i),j()}var Jf=class e{static instance;#e=mu([]);#t=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||=new e,this.instance}register(e){let t=this.getActive();t&&t!==e&&t.pause();let n=Nd(document);n&&n!==document.body&&this.#n.set(e,n),this.#e.current=this.#e.current.filter(t=>t!==e),this.#e.current.unshift(e),e.resume()}unregister(e){this.#e.current=this.#e.current.filter(t=>t!==e);let t=this.getActive();t&&t.resume()}getActive(){return this.#e.current[0]}setFocusMemory(e,t){this.#t.set(e,t)}getFocusMemory(e){return this.#t.get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,t){this.#n.set(e,t)}getPreFocusMemory(e){return this.#n.get(e)}clearPreFocusMemory(e){this.#n.delete(e)}},Yf=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`area[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] *)`],Xf=Yf.join(`,`),Zf=typeof Element>`u`,Qf=Zf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,$f=!Zf&&Element.prototype.getRootNode?function(e){return e==null||e.getRootNode==null?void 0:e.getRootNode()}:function(e){return e?.ownerDocument},ep=function(e,t){t===void 0&&(t=!0);var n=e==null||e.getAttribute==null?void 0:e.getAttribute(`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):ep(e.parentNode))},tp=function(e){var t,n=e==null||e.getAttribute==null||(t=e.getAttribute(`contenteditable`))==null?void 0:t.toLowerCase();return n===``||n===`true`||n===`plaintext-only`},np=function(e,t,n){if(ep(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Xf));return t&&Qf.call(e,Xf)&&r.unshift(e),r=r.filter(n),r},rp=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!ep(a,!1)){if(a.tagName===`SLOT`){var o=a.assignedElements(),s=rp(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{Qf.call(a,Xf)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!ep(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=rp(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}}return r},ip=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},ap=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||tp(e))&&!ip(e)?0:e.tabIndex},op=function(e,t){var n=ap(e);return n<0&&t&&!ip(e)?0:n},sp=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},cp=function(e){return e.tagName===`INPUT`},lp=function(e){return cp(e)&&e.type===`hidden`},up=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},dp=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},fp=function(e){if(!e.name)return!0;var t=e.form||$f(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){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`,e.message),!1}var i=dp(r,e.form);return!i||i===e},pp=function(e){return cp(e)&&e.type===`radio`},mp=function(e){return pp(e)&&!fp(e)},hp=function(e){var t=e&&$f(e),n=t?.host,r=!1;if(t&&t!==e){var i,a;for(r=!!((i=n)!=null&&(i=i.ownerDocument)!=null&&i.contains(n)||e!=null&&(a=e.ownerDocument)!=null&&a.contains(e));!r&&n;){var o;t=$f(n),n=t?.host,r=!!((o=n)!=null&&(o=o.ownerDocument)!=null&&o.contains(n))}}return r},gp=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},_p=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var i=getComputedStyle(e).visibility;if(i===`hidden`||i===`collapse`)return!0;var a=Qf.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(Qf.call(a,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var o=e;e;){var s=e.parentElement,c=$f(e);if(s&&!s.shadowRoot&&r(s)===!0)return gp(e);e=e.assignedSlot?e.assignedSlot:!s&&c!==e.ownerDocument?c.host:s}e=o}if(hp(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return gp(e);return!1},vp=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return Qf.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},yp=function(e,t){return!(t.disabled||lp(t)||_p(t,e)||up(t)||vp(t))},bp=function(e,t){return!(mp(t)||ap(t)<0||!yp(e,t))},xp=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},Sp=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=op(a,i),s=i?Sp(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(sp).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Cp=function(e,t){return t||={},Sp(t.getShadowRoot?rp([e],t.includeContainer,{filter:bp.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:xp}):np(e,t.includeContainer,bp.bind(null,t)))},wp=function(e,t){return t||={},t.getShadowRoot?rp([e],t.includeContainer,{filter:yp.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):np(e,t.includeContainer,yp.bind(null,t))},Tp=Yf.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),Ep=function(e,t){if(t||={},!e)throw Error(`No node provided`);return Qf.call(e,Tp)!==!1&&yp(t,e)};function Dp(e,t){let n=t.getRootNode();for(;e;){let t=e.getRootNode();if(t===n)return e;e=t!==e&&`host`in t?t.host:null}return null}var Op=class e{#e=!1;#t=null;#n=Jf.getInstance();#r=[];#i;constructor(e){this.#i=e}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#a(){for(let e of this.#r)e();this.#r=[]}mount(e){this.#t!==e&&(this.#t&&this.unmount(),this.#t=e,this.#n.register(this),this.#c(),this.#o())}unmount(){this.#t&&=(this.#a(),this.#s(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),null)}#o(){if(!this.#t)return;let e=new CustomEvent(`focusScope.onOpenAutoFocus`,{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t||this.#e||!this.#n.isActiveScope(this)||this.#t.contains(Dp(Nd(this.#t.ownerDocument),this.#t)))return;let e=this.#u();e?(e.focus({preventScroll:!0}),this.#n.setFocusMemory(this,e)):this.#t.focus({preventScroll:!0})})}#s(){let e=new CustomEvent(`focusScope.onCloseAutoFocus`,{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(e),!e.defaultPrevented){let e=this.#n.getPreFocusMemory(this);if(e&&e.isConnected)try{e.focus({preventScroll:!0})}catch{document.body.focus()}}}#c(){if(!this.#t||!this.#i.trap.current)return;let e=this.#t,t=e.ownerDocument;this.#r.push(Kr(t,`focusin`,t=>{if(this.#e||!this.#n.isActiveScope(this))return;let n=Dp(t.composedPath()[0],e);if(n!==null&&e.contains(n))this.#n.setFocusMemory(this,n);else{let n=this.#n.getFocusMemory(this);if(n&&e.contains(n)&&Ep(n))t.preventDefault(),n.focus({preventScroll:!0});else{let t=this.#u(),n=this.#d()[0];(t||n||e).focus({preventScroll:!0})}}},{capture:!0}),Kr(e,`keydown`,e=>{if(!this.#i.loop||this.#e||e.key!==`Tab`||!this.#n.isActiveScope(this))return;let n=this.#l();if(n.length===0)return;let r=n[0],i=n[n.length-1];!e.shiftKey&&Nd(t)===i?(e.preventDefault(),r.focus()):e.shiftKey&&Nd(t)===r&&(e.preventDefault(),i.focus())}));let n=new MutationObserver(()=>{let t=this.#n.getFocusMemory(this);if(t&&!e.contains(t)){let t=this.#u(),n=this.#d()[0],r=t||n;r?(r.focus({preventScroll:!0}),this.#n.setFocusMemory(this,r)):e.focus({preventScroll:!0})}});n.observe(e,{childList:!0,subtree:!0}),this.#r.push(()=>n.disconnect())}#l(){return this.#t?Cp(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#u(){return this.#l()[0]||null}#d(){return this.#t?wp(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let n=null;return md([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||=new e(t),n.mount(r)):n&&=(n.unmount(),null)}),yd(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function kp(e,t){A(t,!0);let n=X(t,`enabled`,3,!1),r=X(t,`trapFocus`,3,!1),i=X(t,`loop`,3,!1),a=X(t,`onCloseAutoFocus`,3,_f),o=X(t,`onOpenAutoFocus`,3,_f),s=Op.use({enabled:$(()=>n()),trap:$(()=>r()),loop:Or(()=>i()),onCloseAutoFocus:$(()=>a()),onOpenAutoFocus:$(()=>o()),ref:Or(()=>t.ref)});var c=U();q(I(c),()=>t.focusScope??f,()=>({props:s.props})),W(e,c),j()}var Ap=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var jp=class e{static create(t){return new e(t)}opts;domContext;#e=_f;#t=!1;#n=Ap;#r=Ap;constructor(e){this.opts=e,this.domContext=new Pd(e.ref);let t=_f;md(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([e,n,r])=>(this.#t=e,this.#n=n,this.#r=r,e&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=this.#i()),()=>{this.#t=!1,t(),this.#s(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return Xu(Kr(this.domContext.getDocument(),`pointerdown`,this.#o),Kr(this.domContext.getDocument(),`pointerup`,this.#a))}#a=e=>{this.#s(),e.defaultPrevented||this.#r(e)};#o=e=>{if(!this.#t)return;this.#s();let t=this.opts.ref.current,n=e.target;lf(t)&&lf(n)&&Fp(this)&&Ad(t,n)&&(this.#n(e),e.defaultPrevented||(this.#e=Np(t,this.domContext.getDocument().body)))};#s=()=>{this.#e(),this.#e=_f}},Mp=e=>e.style.userSelect||e.style.webkitUserSelect;function Np(e,t){let n=Mp(t),r=Mp(e);return Pp(t,`none`),Pp(e,`text`),()=>{Pp(t,n),Pp(e,r)}}function Pp(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function Fp(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function Ip(e,t){A(t,!0);let n=X(t,`preventOverflowTextSelection`,3,!0),r=X(t,`onPointerDown`,3,_f),i=X(t,`onPointerUp`,3,_f);jp.create({id:$(()=>t.id),onPointerDown:$(()=>r()),onPointerUp:$(()=>i()),enabled:$(()=>t.enabled&&n()),ref:Or(()=>t.ref)});var a=U();q(I(a),()=>t.children??f),W(e,a),j()}globalThis.bitsIdCounter??={current:0};function Lp(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var Rp=class{#e;#t=0;#n=N();#r;constructor(e){this.#e=e}#i(){--this.#t,this.#r&&this.#t<=0&&(this.#r(),P(this.#n,void 0),this.#r=void 0)}get(...e){return this.#t+=1,B(this.#n)===void 0&&(this.#r=Pn(()=>{P(this.#n,this.#e(...e),!0)})),jn(()=>()=>{this.#i()}),B(this.#n)}},zp=new ld,Bp=new Map,Vp=[`padding-right`,`margin-right`,`overflow`,`overflow-x`,`overflow-y`,`pointer-events`,`--scrollbar-width`],Hp=null,Up=!1,Wp=new Set,Gp=null,Kp=null,qp=!1;function Jp(e,t,n){e.setProperty(t,n),Wp.add(t),t===`overflow`&&(Wp.add(`overflow-x`),Wp.add(`overflow-y`))}var Yp=$(()=>{for(let e of zp.values())if(e)return!0;return!1}),Xp=$(()=>{for(let[e,t]of zp)if(t&&(Bp.get(e)?.()??!0))return!0;return!1}),Zp=null,Qp=new Rp(()=>{function e(e,t){let n=Hp?.get(t);n?.value?e.body.style.setProperty(t,n.value,n.priority):e.body.style.removeProperty(t)}function t(t){for(let n of Vp)Wp.has(n)&&e(t,n);!Up&&t.body.style.length===0&&t.body.removeAttribute(`style`),Hp=null,Wp.clear(),sf&&Gp?.()}function n(t){Wp.delete(`pointer-events`)&&e(t,`pointer-events`)}function r(){Kp!==null&&(window.clearTimeout(Kp),Kp=null)}function i(e,t){r(),qp=!0,Zp=Date.now();let n=Zp,i=()=>{Kp=null,Zp===n&&(em(zp)?qp=!1:(qp=!1,t()))},a=e===null?24:e;Kp=window.setTimeout(i,a)}function a(){if(Hp===null&&zp.size===0&&!qp){Up=document.body.hasAttribute(`style`),Hp=new Map;for(let e of Vp)Hp.set(e,{value:document.body.style.getPropertyValue(e),priority:document.body.style.getPropertyPriority(e)})}}return md(()=>Yp.current,()=>{if(!Yp.current)return;a(),qp=!1;let e=getComputedStyle(document.documentElement),t=getComputedStyle(document.body),n=e.scrollbarGutter?.includes(`stable`)||t.scrollbarGutter?.includes(`stable`),r=window.innerWidth-document.documentElement.clientWidth,i={padding:Number.parseInt(t.paddingRight??`0`,10)+r,margin:Number.parseInt(t.marginRight??`0`,10)};r>0&&!n&&(Jp(document.body.style,`padding-right`,`${i.padding}px`),Jp(document.body.style,`margin-right`,`${i.margin}px`),Jp(document.body.style,`--scrollbar-width`,`${r}px`)),Jp(document.body.style,`overflow`,`hidden`),sf&&(Gp=Kr(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),xd(()=>{Xp.current&&Jp(document.body.style,`pointer-events`,`none`),Jp(document.body.style,`overflow`,`hidden`)})}),md(()=>Xp.current,()=>{Yp.current&&xd(()=>{Yp.current&&(Xp.current?Jp(document.body.style,`pointer-events`,`none`):n(document))})},{lazy:!0}),yd(()=>()=>{Gp?.()}),{get lockMap(){return zp},resetBodyStyle:t,restorePointerEvents:n,scheduleCleanupIfNoNewLocks:i,cancelPendingCleanup:r,ensureInitialStyleCaptured:a}}),$p=class{#e=Lp();#t;#n=()=>null;#r;locked;constructor(e,t=()=>null,n=()=>!0){this.#t=e,this.#n=t,this.#r=Qp.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),Bp.set(this.#e,n),this.#r.lockMap.set(this.#e,this.#t??!1),this.locked=$(()=>this.#r.lockMap.get(this.#e)??!1,e=>this.#r.lockMap.set(this.#e,e)),yd(()=>{if(this.#r.lockMap.delete(this.#e),Bp.delete(this.#e),em(this.#r.lockMap))return;let e=this.#n(),t=document;this.#r.restorePointerEvents(t),this.#r.scheduleCleanupIfNoNewLocks(e,()=>{this.#r.resetBodyStyle(t)})}))}};function em(e){for(let[t,n]of e)if(n)return!0;return!1}function tm(e,t){A(t,!0);let n=X(t,`preventScroll`,3,!0),r=X(t,`restoreScrollDelay`,3,null),i=X(t,`blockPointer`,3,()=>!0);Or(()=>{n()&&new $p(n(),()=>r(),i())}),j()}function nm(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 rm(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 im(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t+n;return i=r?(i%e.length+e.length)%e.length:Math.max(0,Math.min(i,e.length-1)),e[i]}function am(e,t,n,r=!0){if(e.length===0||t<0||t>=e.length)return;let i=t-n;return i=r?(i%e.length+e.length)%e.length:Math.max(0,Math.min(i,e.length-1)),e[i]}function om(e,t,n){let r=t.toLowerCase();if(r.endsWith(` `)){let i=r.slice(0,-1);if(e.filter(e=>e.toLowerCase().startsWith(i)).length<=1)return om(e,i,n);let a=n?.toLowerCase();if(a&&a.startsWith(i)&&a.charAt(i.length)===` `&&t.trim()===i)return n;let o=e.filter(e=>e.toLowerCase().startsWith(r));if(o.length>0){let t=n?e.indexOf(n):-1;return sm(o,Math.max(t,0)).find(e=>e!==n)||n}}let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=i.toLowerCase(),o=n?e.indexOf(n):-1,s=sm(e,Math.max(o,0));i.length===1&&(s=s.filter(e=>e!==n));let c=s.find(e=>e?.toLowerCase().startsWith(a));return c===n?void 0:c}function sm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var cm=new Set([`$$slots`,`$$events`,`$$legacy`,`value`]),lm=V(`<input/>`);function um(e,t){A(t,!0);let n=X(t,`value`,15),r=Y(t,cm),i=M(()=>ad(r,{"aria-hidden":`true`,tabindex:-1,style:{...od,position:`absolute`,top:`0`,left:`0`}}));var a=U(),o=I(a),s=e=>{var t=lm();sa(t,()=>({...B(i),value:n(),defaultChecked:B(i).checked})),W(e,t)},c=e=>{var t=lm(),r=e=>n(e.currentTarget.value);sa(t,()=>({...B(i),value:n(),defaultValue:n()??``,oninput:r})),W(e,t)};K(o,e=>{B(i).type===`checkbox`?e(s):e(c,-1)}),W(e,a),j()}var dm=new dd(`Floating.Root`),fm=new dd(`Floating.Root`),pm=class e{static create(t=!1){return t?fm.set(new e):dm.set(new e)}anchorNode=mu(null);customAnchorNode=mu(null);triggerNode=mu(null);constructor(){jn(()=>{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})}},mm=class e{static create(t,n=!1){return n?new e(t,fm.get()):new e(t,dm.get())}opts;root;constructor(e,t){this.opts=e,this.root=t,t.triggerNode=e.virtualEl&&e.virtualEl.current?du(e.virtualEl.current):e.ref}};function hm(e,t){A(t,!0);let n=X(t,`tooltip`,3,!1);pm.create(Or(()=>n()));var r=U();q(I(r),()=>t.children??f),W(e,r),j()}function gm(e){return typeof e==`function`?e():e}function _m(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vm(e,t){let n=_m(e);return Math.round(t*n)/n}function ym(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)`}}var bm={afterMs:1e4,onChange:_f};function xm(e,t){let{afterMs:n,onChange:r,getWindow:i}={...bm,...t},a=null,o=N(ln(e));function s(){return i().setTimeout(()=>{P(o,e,!0),r?.(e)},n)}return jn(()=>()=>{a&&i().clearTimeout(a)}),$(()=>B(o),e=>{P(o,e,!0),r?.(e),a&&i().clearTimeout(a),a=s()})}var Sm=class{#e;#t=M(()=>this.#e.candidateValues());#n;constructor(e){this.#e=e,this.#n=xm(``,{afterMs:1e3,getWindow:this.#e.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e){if(!this.#e.enabled()||!B(this.#t).length)return;this.#n.current=this.#n.current+e;let t=this.#e.getCurrentItem(),n=B(this.#t).find(e=>e===t)??``,r=om(B(this.#t).map(e=>e??``),this.#n.current,n),i=B(this.#t).find(e=>e===r);return i&&this.#e.onMatch(i),i}resetTypeahead(){this.#n.current=``}},Cm=class{#e;#t;#n=M(()=>this.#e.onMatch?this.#e.onMatch:e=>e.focus());#r=M(()=>this.#e.getCurrentItem?this.#e.getCurrentItem:this.#e.getActiveElement);constructor(e){this.#e=e,this.#t=xm(``,{afterMs:1e3,getWindow:e.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(e,t){if(!t.length)return;this.#t.current=this.#t.current+e;let n=B(this.#r)(),r=t.find(e=>e===n)?.textContent?.trim()??``,i=om(t.map(e=>e.textContent?.trim()??``),this.#t.current,r),a=t.find(e=>e.textContent?.trim()===i);return a&&B(this.#n)(a),a}resetTypeahead(){this.#t.current=``}get search(){return this.#t.current}},wm=[Kd,Qd,Xd],Tm=[Yd,Zd,`End`],Em=[...wm,...Tm],Dm=Gd({component:`select`,parts:[`trigger`,`content`,`item`,`viewport`,`scroll-up-button`,`scroll-down-button`,`group`,`group-label`,`separator`,`arrow`,`input`,`content-wrapper`,`item-text`,`value`]}),Om=new dd(`Select.Root | Combobox.Root`);new dd(`Select.Group | Combobox.Group`);var km=new dd(`Select.Content | Combobox.Content`),Am=class{opts;#e=N(!1);get touchedInput(){return B(this.#e)}set touchedInput(e){P(this.#e,e,!0)}#t=N(null);get inputNode(){return B(this.#t)}set inputNode(e){P(this.#t,e,!0)}#n=N(null);get contentNode(){return B(this.#n)}set contentNode(e){P(this.#n,e,!0)}contentPresence;#r=N(null);get viewportNode(){return B(this.#r)}set viewportNode(e){P(this.#r,e,!0)}#i=N(null);get triggerNode(){return B(this.#i)}set triggerNode(e){P(this.#i,e,!0)}#a=N(null);get valueNode(){return B(this.#a)}set valueNode(e){P(this.#a,e,!0)}#o=N(``);get valueId(){return B(this.#o)}set valueId(e){P(this.#o,e,!0)}selectedLabelsByValue=new ld;#s=N(null);get highlightedNode(){return B(this.#s)}set highlightedNode(e){P(this.#s,e,!0)}#c=M(()=>this.highlightedNode?this.highlightedNode.getAttribute(`data-value`):null);get highlightedValue(){return B(this.#c)}set highlightedValue(e){P(this.#c,e)}#l=M(()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return B(this.#l)}set highlightedId(e){P(this.#l,e)}#u=M(()=>this.highlightedNode?this.highlightedNode.getAttribute(`data-label`):null);get highlightedLabel(){return B(this.#u)}set highlightedLabel(e){P(this.#u,e)}#d=N(!1);get contentIsPositioned(){return B(this.#d)}set contentIsPositioned(e){P(this.#d,e,!0)}isUsingKeyboard=!1;pressedItem=null;isCombobox=!1;domContext=new Pd(()=>null);constructor(e){this.opts=e,this.isCombobox=e.isCombobox,this.contentPresence=new gf({ref:$(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),Nn(()=>{this.opts.open.current||(this.setHighlightedNode(null),this.pressedItem=null)})}setHighlightedNode(e,t=!1){this.highlightedNode=e,e&&(this.isUsingKeyboard||t)&&this.scrollHighlightedNodeIntoView(e)}scrollHighlightedNodeIntoView(e){let t=this.viewportNode;if(!t||!this.contentIsPositioned)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();this.opts.scrollAlignment.current===`center`?t.scrollTop+=n.top+n.height/2-(r.top+r.height/2):n.top<r.top?t.scrollTop-=r.top-n.top:n.bottom>r.bottom&&(t.scrollTop+=n.bottom-r.bottom)}getCandidateNodes(){let e=this.contentNode;return e?Array.from(e.querySelectorAll(`[${this.getBitsAttr(`item`)}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(e=!1){this.setHighlightedNode(null);let t=this.getCandidateNodes();if(t.length){if(this.viewportNode){let e=this.viewportNode.getBoundingClientRect();t=t.filter(t=>{if(!this.viewportNode)return!1;let n=t.getBoundingClientRect();return n.right<=e.right&&n.left>=e.left&&n.bottom<=e.bottom&&n.top>=e.top})}this.setHighlightedNode(t[0],e)}}getNodeByValue(e){return this.getCandidateNodes().find(t=>t.dataset.value===e)??null}getLabelForValue(e){if(e===``)return``;let t=this.opts.items.current.find(t=>t.value===e)?.label;return t?.trim()?t:this.selectedLabelsByValue.get(e)??e}resolveItemLabel(e,t,n){return t?.trim()?t:n?.textContent?.trim()||e}setSelectedLabel(e,t){e===``||t===e?this.selectedLabelsByValue.delete(e):this.selectedLabelsByValue.set(e,t)}pruneSelectedLabels(e){for(let t of this.selectedLabelsByValue.keys())e.includes(t)||this.selectedLabelsByValue.delete(t)}setOpen(e){this.opts.open.current=e}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=e=>Dm.getAttr(e,this.isCombobox?`combobox`:void 0)},jm=class extends Am{opts;isMulti=!1;#e=M(()=>this.opts.value.current!==``);get hasValue(){return B(this.#e)}set hasValue(e){P(this.#e,e)}#t=M(()=>this.opts.items.current.length?this.opts.items.current.find(e=>e.value===this.opts.value.current)?.label??``:``);get currentLabel(){return B(this.#t)}set currentLabel(e){P(this.#t,e)}#n=M(()=>this.opts.items.current.length?this.opts.items.current.filter(e=>!e.disabled).map(e=>e.label):[]);get candidateLabels(){return B(this.#n)}set candidateLabels(e){P(this.#n,e)}#r=M(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return B(this.#r)}set dataTypeaheadEnabled(e){P(this.#r,e)}constructor(e){super(e),this.opts=e,jn(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),md(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()}),md(()=>this.opts.value.current,e=>{this.pruneSelectedLabels(e===``?[]:[e])})}includesItem(e){return this.opts.value.current===e}toggleItem(e,t=e){let n=this.includesItem(e)?``:e;this.opts.value.current=n,n!==``&&(this.setSelectedLabel(e,t),this.opts.inputValue.current=t)}setInitialHighlightedNode(){xd(()=>{if(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))return;let e=this.getNodeByValue(this.opts.value.current);e?this.setHighlightedNode(e,!0):this.setHighlightedToFirstCandidate(!0)})}},Mm=class extends Am{opts;isMulti=!0;#e=M(()=>this.opts.value.current.length>0);get hasValue(){return B(this.#e)}set hasValue(e){P(this.#e,e)}#t=M(()=>new Set(this.opts.value.current));constructor(e){super(e),this.opts=e,jn(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),md(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()}),md(()=>this.opts.value.current,e=>{this.pruneSelectedLabels(e)})}includesItem(e){return B(this.#t).has(e)}toggleItem(e,t=e){this.includesItem(e)?this.opts.value.current=this.opts.value.current.filter(t=>t!==e):(this.opts.value.current=[...this.opts.value.current,e],this.setSelectedLabel(e,t)),this.opts.inputValue.current=t}setInitialHighlightedNode(){xd(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length){let e=this.getNodeByValue(this.opts.value.current[0]);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}},Nm=class{static create(e){let{type:t,...n}=e,r=t===`single`?new jm(n):new Mm(n);return Om.set(r)}},Pm=class e{static create(t){return new e(t,Om.get())}root;opts;attachment;constructor(e,t){this.root=t,this.opts=e,this.attachment=Fd(e.ref,e=>this.root.valueNode=e),this.setValue=this.setValue.bind(this)}setValue(e){this.root.isMulti&&!Array.isArray(e)||!this.root.isMulti&&typeof e!=`string`||(this.root.opts.value.current=e)}#e=M(()=>{if(this.root.isMulti)return{selection:{type:`multiple`,selected:this.root.opts.value.current.length>0?this.root.opts.value.current.map(e=>({value:e,label:this.root.getLabelForValue(e)})):[],setValue:this.setValue},placeholder:this.opts.placeholder.current??null,disabled:this.root.opts.disabled.current};let e=this.root.opts.value.current;return{selection:{type:`single`,selected:e===``?void 0:{value:e,label:this.root.getLabelForValue(e)},setValue:this.setValue},placeholder:this.opts.placeholder.current??null,disabled:this.root.opts.disabled.current}});get snippetProps(){return B(this.#e)}set snippetProps(e){P(this.#e,e)}#t=M(()=>({id:this.opts.id.current,"data-placeholder":this.root.hasValue?void 0:``,"data-select-value":``,...this.attachment}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}},Fm=class e{static create(t){return new e(t,Om.get())}opts;root;attachment;#e;#t;constructor(e,t){this.opts=e,this.root=t,this.attachment=Fd(e.ref,e=>this.root.triggerNode=e),this.root.domContext=new Pd(e.ref),this.#e=new Cm({getCurrentItem:()=>this.root.highlightedNode,onMatch:e=>{this.root.setHighlightedNode(e)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()}),this.#t=new Sm({getCurrentItem:()=>this.root.isMulti?``:this.root.currentLabel,onMatch:e=>{if(this.root.isMulti||!this.root.opts.items.current)return;let t=this.root.opts.items.current.find(t=>t.label===e);t&&(this.root.opts.value.current=t.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()}),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}#n(){this.root.opts.open.current=!0,this.#t.resetTypeahead(),this.#e.resetTypeahead()}#r(e){this.#n()}#i(){if(this.root.opts.disabled.current)return!1;let e=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti||(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.resolveItemLabel(this.root.highlightedValue,this.root.highlightedLabel,this.root.highlightedNode)),!this.root.isMulti&&!e)?(this.root.handleClose(),!0):!1}onkeydown(e){if(this.root.isUsingKeyboard=!0,(e.key===`ArrowUp`||e.key===`ArrowDown`)&&e.preventDefault(),!this.root.opts.open.current){if(e.key===`Enter`||e.key===` `||e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){this.#t.handleTypeaheadSearch(e.key);return}if(this.root.hasValue)return;let t=this.root.getCandidateNodes();if(!t.length)return;if(e.key===`ArrowDown`){let e=t[0];this.root.setHighlightedNode(e)}else if(e.key===`ArrowUp`){let e=t[t.length-1];this.root.setHighlightedNode(e)}return}if(e.key===`Tab`){this.root.handleClose();return}if((e.key===`Enter`||e.key===` `&&this.#e.search===``)&&!e.isComposing&&(e.preventDefault(),this.#i()||e.key===` `))return;if(e.key===`ArrowUp`&&e.altKey&&this.root.handleClose(),Em.includes(e.key)){e.preventDefault();let t=this.root.getCandidateNodes(),n=this.root.highlightedNode,r=n?t.indexOf(n):-1,i=this.root.opts.loop.current,a;if(e.key===`ArrowDown`?a=nm(t,r,i):e.key===`ArrowUp`?a=rm(t,r,i):e.key===`PageDown`?a=im(t,r,10,i):e.key===`PageUp`?a=am(t,r,10,i):e.key===`Home`?a=t[0]:e.key===`End`&&(a=t[t.length-1]),!a)return;this.root.setHighlightedNode(a);return}let t=e.ctrlKey||e.altKey||e.metaKey,n=e.key.length===1,r=e.key===` `,i=this.root.getCandidateNodes();if(e.key!==`Tab`){if(!t&&(n||r)){let t=this.#e.handleTypeaheadSearch(e.key,i);r&&(e.preventDefault(),t||this.#i())}else this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(e){e.currentTarget.focus(),this.root.opts.disabled.current||e.detail!==0||(this.root.opts.open.current?this.root.handleClose():this.#n(),e.preventDefault())}onpointerdown(e){if(this.root.opts.disabled.current||df(this.opts.ref.current))return;if(e.pointerType===`touch`)return e.preventDefault();let t=e.target;t?.hasPointerCapture(e.pointerId)&&t?.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&(this.root.opts.open.current===!1?this.#r(e):this.root.handleClose())}onpointerup(e){this.root.opts.disabled.current||df(this.opts.ref.current)||(e.preventDefault(),e.pointerType===`touch`&&(this.root.opts.open.current===!1?this.#r(e):this.root.handleClose()))}#a=M(()=>({id:this.opts.id.current,role:`combobox`,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":`listbox`,"aria-expanded":Id(this.root.opts.open.current),"aria-controls":this.root.contentNode?.id||void 0,"aria-activedescendant":this.root.highlightedId,"data-state":Bd(this.root.opts.open.current),"data-disabled":Rd(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:``,[this.root.getBitsAttr(`trigger`)]:``,onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment}));get props(){return B(this.#a)}set props(e){P(this.#a,e)}},Im=class e{static create(t){return km.set(new e(t,Om.get()))}opts;root;attachment;#e=N(!1);get isPositioned(){return B(this.#e)}set isPositioned(e){P(this.#e,e,!0)}userHasScrolled=!1;domContext;constructor(e,t){this.opts=e,this.root=t,this.attachment=Fd(e.ref,e=>this.root.contentNode=e),this.domContext=new Pd(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),yd(()=>{this.root.contentNode=null,this.root.contentIsPositioned=!1,this.isPositioned=!1}),md(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.root.contentIsPositioned=!1,this.isPositioned=!1,this.userHasScrolled=!1)}),md([()=>this.isPositioned,()=>this.root.highlightedNode],()=>{this.isPositioned&&this.root.highlightedNode&&(this.root.isUsingKeyboard&&(this.userHasScrolled=!1),this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode))}),md([()=>this.isPositioned,()=>this.root.viewportNode],()=>{let e=this.root.viewportNode;if(!this.isPositioned||!e)return;let t=()=>{this.userHasScrolled=!0},n=new(this.domContext.getWindow()).ResizeObserver(()=>{!this.userHasScrolled&&this.root.highlightedNode&&this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode)});return n.observe(e),Xu(Kr(e,`wheel`,t,{passive:!0}),Kr(e,`touchmove`,t,{passive:!0}),()=>n.disconnect())}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(e){this.root.isUsingKeyboard=!1}onpointerdowncapture=()=>{this.root.pressedItem=null};#t=M(()=>ym(this.root.isCombobox?`combobox`:`select`));onInteractOutside=e=>{Af(e,this.root.triggerNode)||Af(e,this.root.inputNode)?e.preventDefault():(this.opts.onInteractOutside.current(e),e.defaultPrevented||this.root.handleClose())};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),e.defaultPrevented||this.root.handleClose()};onOpenAutoFocus=e=>{e.preventDefault()};onCloseAutoFocus=e=>{e.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#n=M(()=>({open:this.root.opts.open.current}));get snippetProps(){return B(this.#n)}set snippetProps(e){P(this.#n,e)}#r=M(()=>({id:this.opts.id.current,role:`listbox`,"aria-multiselectable":this.root.isMulti?`true`:void 0,"data-state":Bd(this.root.opts.open.current),...Hd(this.root.contentPresence.transitionStatus),[this.root.getBitsAttr(`content`)]:``,style:{display:`flex`,flexDirection:`column`,outline:`none`,boxSizing:`border-box`,pointerEvents:`auto`,...B(this.#t)},onpointermove:this.onpointermove,onpointerdowncapture:this.onpointerdowncapture,...this.attachment}));get props(){return B(this.#r)}set props(e){P(this.#r,e)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.root.contentIsPositioned=!0,this.isPositioned=!0)}}},Lm=class e{static create(t){return new e(t,Om.get())}opts;root;attachment;#e=M(()=>this.root.opts.disabled.current||this.opts.disabled.current);get isDisabled(){return B(this.#e)}set isDisabled(e){P(this.#e,e)}#t=M(()=>this.root.includesItem(this.opts.value.current));get isSelected(){return B(this.#t)}set isSelected(e){P(this.#t,e)}#n=M(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return B(this.#n)}set isHighlighted(e){P(this.#n,e)}#r=M(()=>this.isHighlighted&&!this.isDisabled);prevHighlighted=new vd(()=>this.isHighlighted);#i=N(!1);get mounted(){return B(this.#i)}set mounted(e){P(this.#i,e,!0)}#a;constructor(e,t){this.opts=e,this.root=t,this.attachment=Fd(e.ref),md([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),md(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),md([()=>this.isSelected,()=>this.mounted,()=>this.opts.value.current,()=>this.opts.label.current],([e,t,n])=>{e&&t&&this.root.setSelectedLabel(n,this.#o())}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}#o(){return this.root.resolveItemLabel(this.opts.value.current,this.opts.label.current,this.opts.ref.current)}handleSelect(){if(this.isDisabled)return;let e=this.opts.value.current===this.root.opts.value.current;!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti?this.root.handleClose():(this.root.toggleItem(this.opts.value.current,this.#o()),!this.root.isMulti&&!e&&this.root.handleClose())}#s=M(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){return B(this.#s)}set snippetProps(e){P(this.#s,e)}onpointerdown(e){e.preventDefault(),this.root.pressedItem={item:this,x:e.clientX,y:e.clientY}}onpointerup(e){if(this.#a?.(),e.defaultPrevented||!this.opts.ref.current)return;let t=this.root.pressedItem;this.root.pressedItem=null,t&&t.item!==this&&Math.hypot(e.clientX-t.x,e.clientY-t.y)<4?(e.preventDefault(),t.item.handleSelect()):e.pointerType===`touch`&&!sf?this.#a=Kr(this.opts.ref.current,`click`,()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0}):(e.preventDefault(),this.handleSelect(),e.pointerType===`touch`&&this.root.setHighlightedNode(this.opts.ref.current))}onpointermove(e){e.pointerType!==`touch`&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#c=M(()=>({id:this.opts.id.current,role:`option`,"aria-selected":Id(this.isSelected),"data-value":this.opts.value.current,"data-disabled":Rd(this.isDisabled),"data-highlighted":Rd(B(this.#r)),"data-selected":Rd(this.isSelected),"data-label":this.opts.label.current,[this.root.getBitsAttr(`item`)]:``,onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return B(this.#c)}set props(e){P(this.#c,e)}},Rm=class e{static create(t){return new e(t,Om.get())}opts;root;#e=M(()=>this.root.opts.name.current!==``);get shouldRender(){return B(this.#e)}set shouldRender(e){P(this.#e,e)}constructor(e,t){this.opts=e,this.root=t,this.onfocus=this.onfocus.bind(this)}onfocus(e){e.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#t=M(()=>({disabled:zd(this.root.opts.disabled.current),required:zd(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}},zm=class e{static create(t){return new e(t,km.get())}opts;content;root;attachment;#e=N(0);get prevScrollTop(){return B(this.#e)}set prevScrollTop(e){P(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.root,this.attachment=Fd(e.ref,e=>{this.root.viewportNode=e})}#t=M(()=>({id:this.opts.id.current,role:`presentation`,[this.root.getBitsAttr(`viewport`)]:``,style:{position:`relative`,flex:1,overflow:`auto`},...this.attachment}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}},Bm=class{opts;content;root;attachment;autoScrollTimer=null;userScrollTimer=-1;isUserScrolling=!1;onAutoScroll=_f;#e=N(!1);get mounted(){return B(this.#e)}set mounted(e){P(this.#e,e,!0)}constructor(e,t){this.opts=e,this.content=t,this.root=t.root,this.attachment=Fd(e.ref),md([()=>this.mounted],()=>{this.mounted||(this.isUserScrolling=!1)}),jn(()=>{this.mounted&&this.root.opts.open.current||this.clearAutoScrollInterval()}),yd(()=>this.clearAutoScrollInterval()),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}handleUserScroll(){this.content.domContext.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=this.content.domContext.setTimeout(()=>{this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(this.content.domContext.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(e){if(this.autoScrollTimer!==null||!this.root.opts.open.current)return;this.content.userHasScrolled=!0;let t=e=>{this.onAutoScroll(),this.autoScrollTimer=this.content.domContext.setTimeout(()=>t(e+1),this.opts.delay.current(e))};this.autoScrollTimer=this.content.domContext.setTimeout(()=>t(1),this.opts.delay.current(0))}onpointermove(e){this.onpointerdown(e)}onpointerleave(e){this.clearAutoScrollInterval()}#t=M(()=>({id:this.opts.id.current,"aria-hidden":Ld(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}},Vm=class e{static create(t){return new e(new Bm(t,km.get()))}scrollButtonState;content;root;#e=N(!1);get canScrollDown(){return B(this.#e)}set canScrollDown(e){P(this.#e,e,!0)}constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,md([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{let e=this.root.viewportNode;if(e&&this.content.isPositioned)return this.handleScroll(!0),Kr(e,`scroll`,()=>this.handleScroll())}),md([()=>this.root.opts.inputValue.current,()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{this.root.viewportNode&&this.content.isPositioned&&this.handleScroll(!0)})}handleScroll=(e=!1)=>{if(e||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;let t=this.root.viewportNode.scrollHeight-this.root.viewportNode.clientHeight,n=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.root.viewportNode.scrollTop)<t-n};handleAutoScroll=()=>{let e=this.root.viewportNode,t=this.root.highlightedNode;e&&t&&(e.scrollTop+=t.offsetHeight)};#t=M(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr(`scroll-down-button`)]:``}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}},Hm=class e{static create(t){return new e(new Bm(t,km.get()))}scrollButtonState;content;root;#e=N(!1);get canScrollUp(){return B(this.#e)}set canScrollUp(e){P(this.#e,e,!0)}constructor(e){this.scrollButtonState=e,this.content=e.content,this.root=e.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,md([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(this.root.viewportNode&&this.content.isPositioned)return this.handleScroll(!0),Kr(this.root.viewportNode,`scroll`,()=>this.handleScroll())})}handleScroll=(e=!1)=>{if(e||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;let t=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollUp=this.root.viewportNode.scrollTop-t>.1};handleAutoScroll=()=>{this.root.viewportNode&&this.root.highlightedNode&&(this.root.viewportNode.scrollTop=this.root.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)};#t=M(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr(`scroll-up-button`)]:``}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}};function Um(e,t){A(t,!0);let n=X(t,`value`,15),r=Rm.create({value:$(()=>n())});var i=U(),a=I(i),o=e=>{um(e,Ta(()=>r.props,{get autocomplete(){return t.autocomplete},get value(){return n()},set value(e){n(e)}}))};K(a,e=>{r.shouldRender&&e(o)}),W(e,i),j()}function Wm(e,t){A(t,!0);let n=X(t,`tooltip`,3,!1);mm.create({id:$(()=>t.id),virtualEl:$(()=>t.virtualEl),ref:Or(()=>t.ref)},Or(()=>n()));var r=U();q(I(r),()=>t.children??f),W(e,r),j()}var Gm=[`top`,`right`,`bottom`,`left`],Km=Math.min,qm=Math.max,Jm=Math.round,Ym=Math.floor,Xm=e=>({x:e,y:e}),Zm={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Qm(e,t,n){return qm(e,Km(t,n))}function $m(e,t){return typeof e==`function`?e(t):e}function eh(e){return e.split(`-`)[0]}function th(e){return e.split(`-`)[1]}function nh(e){return e===`x`?`y`:`x`}function rh(e){return e===`y`?`height`:`width`}function ih(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ah(e){return nh(ih(e))}function oh(e,t,n){n===void 0&&(n=!1);let r=th(e),i=ah(e),a=rh(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=hh(o)),[o,hh(o)]}function sh(e){let t=hh(e);return[ch(e),t,ch(t)]}function ch(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var lh=[`left`,`right`],uh=[`right`,`left`],dh=[`top`,`bottom`],fh=[`bottom`,`top`];function ph(e,t,n){switch(e){case`top`:case`bottom`:return n?t?uh:lh:t?lh:uh;case`left`:case`right`:return t?dh:fh;default:return[]}}function mh(e,t,n,r){let i=th(e),a=ph(eh(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ch)))),a}function hh(e){let t=eh(e);return Zm[t]+e.slice(t.length)}function gh(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function _h(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:gh(e)}function vh(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function yh(e,t,n){let{reference:r,floating:i}=e,a=ih(t),o=ah(t),s=rh(o),c=eh(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=th(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function bh(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=$m(t,e),p=_h(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=vh(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=vh(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var xh=50,Sh=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:bh},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=yh(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<xh&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=yh(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Ch=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=$m(e,t)||{};if(l==null)return{};let d=_h(u),f={x:n,y:r},p=ah(i),m=rh(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,ee=C/2-h[m]/2-1,te=Km(d[_],ee),ne=Km(d[v],ee),re=C-h[m]-ne,ie=C/2-h[m]/2+w,ae=Qm(te,ie,re),oe=!c.arrow&&th(i)!=null&&ie!==ae&&a.reference[m]/2-(ie<te?te:ne)-h[m]/2<0,se=oe?ie<te?ie-te:ie-re:0;return{[p]:f[p]+se,data:{[p]:ae,centerOffset:ie-ae-se,...oe&&{alignmentOffset:se}},reset:oe}}}),wh=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=$m(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=eh(r),_=ih(o),v=eh(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[hh(o)]:sh(o)),x=p!==`none`;!d&&x&&b.push(...mh(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],ee=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=oh(r,a,y);w.push(C[e[0]],C[e[1]])}if(ee=[...ee,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===ih(t)||ee.every(e=>ih(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:ee},reset:{placement:t}};let n=ee.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=ee.filter(e=>{if(x){let t=ih(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function Th(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Eh(e){return Gm.some(t=>e[t]>=0)}var Dh=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=$m(e,t);switch(i){case`referenceHidden`:{let e=Th(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Eh(e)}}}case`escaped`:{let e=Th(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Eh(e)}}}default:return{}}}}},Oh=new Set([`left`,`top`]);async function kh(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=eh(n),s=th(n),c=ih(n)===`y`,l=Oh.has(o)?-1:1,u=a&&c?-1:1,d=$m(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Ah=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await kh(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},jh=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=$m(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ih(i),p=nh(f),m=u[p],h=u[f],g=(e,t)=>Qm(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Mh=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=$m(e,t),u={x:n,y:r},d=ih(i),f=nh(d),p=u[f],m=u[d],h=$m(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Oh.has(eh(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Nh=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=$m(e,t),c=await i.detectOverflow(t,s),l=eh(n),u=th(n),d=ih(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Km(p-c[m],g),y=Km(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*qm(c.left,c.right):S=p-2*qm(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Ph(){return typeof window<`u`}function Fh(e){return Rh(e)?(e.nodeName||``).toLowerCase():`#document`}function Ih(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lh(e){return((Rh(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Rh(e){return Ph()?e instanceof Node||e instanceof Ih(e).Node:!1}function zh(e){return Ph()?e instanceof Element||e instanceof Ih(e).Element:!1}function Bh(e){return Ph()?e instanceof HTMLElement||e instanceof Ih(e).HTMLElement:!1}function Vh(e){return!Ph()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ih(e).ShadowRoot}function Hh(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=$h(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Uh(e){return/^(table|td|th)$/.test(Fh(e))}function Wh(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Gh=/transform|translate|scale|rotate|perspective|filter/,Kh=/paint|layout|strict|content/,qh=e=>!!e&&e!==`none`,Jh;function Yh(e){let t=zh(e)?$h(e):e;return qh(t.transform)||qh(t.translate)||qh(t.scale)||qh(t.rotate)||qh(t.perspective)||!Zh()&&(qh(t.backdropFilter)||qh(t.filter))||Gh.test(t.willChange||``)||Kh.test(t.contain||``)}function Xh(e){let t=tg(e);for(;Bh(t)&&!Qh(t);){if(Yh(t))return t;if(Wh(t))return null;t=tg(t)}return null}function Zh(){return Jh??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Jh}function Qh(e){return/^(html|body|#document)$/.test(Fh(e))}function $h(e){return Ih(e).getComputedStyle(e)}function eg(e){return zh(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tg(e){if(Fh(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Vh(e)&&e.host||Lh(e);return Vh(t)?t.host:t}function ng(e){let t=tg(e);return Qh(t)?(e.ownerDocument||e).body:Bh(t)&&Hh(t)?t:ng(t)}function rg(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ng(e),i=r===e.ownerDocument?.body,a=Ih(r);if(i){let e=ig(a);return t.concat(a,a.visualViewport||[],Hh(r)?r:[],e&&n?rg(e):[])}return t.concat(r,rg(r,[],n))}function ig(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ag(e){let t=$h(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Bh(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Jm(n)!==a||Jm(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function og(e){return zh(e)?e:e.contextElement}function sg(e){let t=og(e);if(!Bh(t))return Xm(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ag(t),o=(a?Jm(n.width):n.width)/r,s=(a?Jm(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var cg=Xm(0);function lg(e){let t=Ih(e);return!Zh()||!t.visualViewport?cg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ug(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ih(e)}function dg(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=og(e),o=Xm(1);t&&(r?zh(r)&&(o=sg(r)):o=sg(e));let s=ug(a,n,r)?lg(a):Xm(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Ih(a),t=zh(r)?Ih(r):r,n=e,i=ig(n);for(;i&&t!==n;){let e=sg(i),t=i.getBoundingClientRect(),r=$h(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ih(i),i=ig(n)}}return vh({width:u,height:d,x:c,y:l})}function fg(e,t){let n=eg(e).scrollLeft;return t?t.left+n:dg(Lh(e)).left+n}function pg(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-fg(e,n),y:n.top+t.scrollTop}}function mg(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Lh(r),s=t?Wh(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Xm(1),u=Xm(0),d=Bh(r);if((d||!a)&&((Fh(r)!==`body`||Hh(o))&&(c=eg(r)),d)){let e=dg(r);l=sg(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?pg(o,c):Xm(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function hg(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function gg(e){let t=eg(e),n=e.ownerDocument.body,r=qm(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=qm(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+fg(e),o=-t.scrollTop;return $h(n).direction===`rtl`&&(a+=qm(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var _g=25;function vg(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ih(e),a=Lh(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Zh()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(fg(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=_g&&(s-=o)}return{width:s,height:c,x:l,y:u}}function yg(e,t){let n=dg(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=sg(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function bg(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=vg(e,n,t);else if(t===`document`)r=gg(Lh(e));else if(zh(t))r=yg(t,n);else{let n=lg(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return vh(r)}function xg(e,t){let n=t.get(e);if(n)return n;let r=rg(e,[],!1).filter(e=>zh(e)&&Fh(e)!==`body`),i=null,a=$h(e).position===`fixed`,o=a?tg(e):e;for(;zh(o)&&!Qh(o);){let e=$h(o),t=Yh(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=tg(o)}return t.set(e,r),r}function Sg(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Wh(t)?[]:xg(t,this._c):[].concat(n),r],o=bg(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=bg(t,a[e],i);s=qm(n.top,s),c=Km(n.right,c),l=Km(n.bottom,l),u=qm(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Cg(e){let{width:t,height:n}=ag(e);return{width:t,height:n}}function wg(e,t,n){let r=Bh(t),i=Lh(t),a=n===`fixed`,o=dg(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Xm(0);if((r||!a)&&((Fh(t)!==`body`||Hh(i))&&(s=eg(t)),r)){let e=dg(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=fg(i));let l=i&&!r&&!a?pg(i,s):Xm(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Tg(e){return $h(e).position===`static`}function Eg(e,t){if(!Bh(e)||$h(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Lh(e)===n&&(n=n.ownerDocument.body),n}function Dg(e,t){let n=Ih(e);if(Wh(e))return n;if(!Bh(e)){let t=tg(e);for(;t&&!Qh(t);){if(zh(t)&&!Tg(t))return t;t=tg(t)}return n}let r=Eg(e,t);for(;r&&Uh(r)&&Tg(r);)r=Eg(r,t);return r&&Qh(r)&&Tg(r)&&!Yh(r)?n:r||Xh(e)||n}var Og=async function(e){let t=this.getOffsetParent||Dg,n=this.getDimensions,r=await n(e.floating);return{reference:wg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kg(e){return $h(e).direction===`rtl`}var Ag={convertOffsetParentRelativeRectToViewportRelativeRect:mg,getDocumentElement:Lh,getClippingRect:Sg,getOffsetParent:Dg,getElementRects:Og,getClientRects:hg,getDimensions:Cg,getScale:sg,isElement:zh,isRTL:kg};function jg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mg(e,t,n){let r=null,i,a=Lh(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Ym(d),h=Ym(a.clientWidth-(u+f)),g=Ym(a.clientHeight-(d+p)),_=Ym(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:qm(0,Km(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!jg(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Ih(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Ng(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=og(e),u=i||a?[...l?rg(l):[],...t?rg(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Mg(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?dg(e):null;c&&g();function g(){let t=dg(e);h&&!jg(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Pg=Ah,Fg=jh,Ig=wh,Lg=Nh,Rg=Dh,zg=Ch,Bg=Mh,Vg=(e,t,n)=>{let r=new Map,i=n??{},a={...Ag,...i.platform,_c:r};return Sh(e,t,{...i,platform:a})};function Hg(e){let t=e.whileElementsMounted,n=M(()=>gm(e.open)??!0),r=M(()=>gm(e.middleware)),i=M(()=>gm(e.transform)??!0),a=M(()=>gm(e.placement)??`bottom`),o=M(()=>gm(e.strategy)??`absolute`),s=M(()=>gm(e.sideOffset)??0),c=M(()=>gm(e.alignOffset)??0),l=e.reference,u;Nn(()=>{u={middleware:B(r),placement:B(a),strategy:B(o),open:B(n),sideOffset:B(s),alignOffset:B(c)}});let d=N(0),f=N(0),p=mu(null),m=N(ln(B(o))),h=N(ln(B(a))),g=N(ln({})),_=N(!1),v=!1,y=0,b=!1,x=M(()=>{let e=p.current?vm(p.current,B(d)):B(d),t=p.current?vm(p.current,B(f)):B(f);return B(i)?{position:B(m),left:`0`,top:`0`,transform:`translate(${e}px, ${t}px)`,...p.current&&_m(p.current)>=1.5&&{willChange:`transform`}}:{position:B(m),left:`${e}px`,top:`${t}px`}}),S;function C(){if(b||l.current===null||p.current===null)return;let e=l.current,t=p.current,n=++y;Vg(e,t,{middleware:u.middleware,placement:u.placement,strategy:u.strategy}).then(r=>{if(n===y&&l.current===e&&p.current===t){if(Ug(e))P(g,{...B(g),hide:{...B(g).hide,referenceHidden:!0}},!0);else{if(!u.open&&B(d)!==0&&B(f)!==0){let e=Math.max(Math.abs(u.sideOffset),Math.abs(u.alignOffset),15);if(r.x<=e&&r.y<=e)return}P(d,r.x,!0),P(f,r.y,!0),P(m,r.strategy,!0),P(h,r.placement,!0),P(g,r.middlewareData,!0),P(_,!0)}}})}function w(){typeof S==`function`&&(S(),S=void 0),y++}function ee(){w(),t===void 0?(te(),C()):B(n)&&l.current!==null&&p.current!==null&&(te(),S=t(l.current,p.current,C))}function te(){return[B(r),B(a),B(o)]}function ne(){!B(n)&&p.current===null&&P(_,!1)}function re(){return[B(r),B(a),B(o),B(s),B(c),B(n)]}return jn(()=>{t===void 0&&B(n)&&(te(),C())}),jn(ee),jn(()=>{t!==void 0&&(re(),B(n)&&B(_)?v?C():v=!0:v=!1)}),jn(ne),jn(()=>()=>{b=!0,w()}),{floating:p,reference:l,get strategy(){return B(m)},get placement(){return B(h)},get middlewareData(){return B(g)},get isPositioned(){return B(_)},get floatingStyles(){return B(x)},get update(){return C}}}function Ug(e){return e instanceof Element?!e.isConnected||e instanceof HTMLElement&&e.hidden?!0:e.getClientRects().length===0:!1}var Wg={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Gg=new dd(`Floating.Content`),Kg=class e{static create(t,n=!1){return n?Gg.set(new e(t,fm.get())):Gg.set(new e(t,dm.get()))}opts;root;contentRef=mu(null);wrapperRef=mu(null);arrowRef=mu(null);contentAttachment=Fd(this.contentRef);wrapperAttachment=Fd(this.wrapperRef);arrowAttachment=Fd(this.arrowRef);arrowId=mu(Lp());#e=M(()=>{if(typeof this.opts.style==`string`)return Yu(this.opts.style);if(!this.opts.style)return{}});#t=void 0;#n=new _d(()=>this.arrowRef.current??void 0);#r=M(()=>this.#n?.width??0);#i=M(()=>this.#n?.height??0);#a=M(()=>this.opts.side?.current+(this.opts.align.current===`center`?``:`-${this.opts.align.current}`));#o=M(()=>(Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]).filter(ff));#s=M(()=>B(this.#o).length>0);get hasExplicitBoundaries(){return B(this.#s)}set hasExplicitBoundaries(e){P(this.#s,e)}#c=M(()=>({padding:this.opts.collisionPadding.current,boundary:B(this.#o),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return B(this.#c)}set detectOverflowOptions(e){P(this.#c,e)}#l=N(void 0);#u=N(void 0);#d=N(void 0);#f=N(void 0);#p=M(()=>[Pg({mainAxis:this.opts.sideOffset.current+B(this.#i),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&Fg({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current===`partial`?Bg():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&Ig({...this.detectOverflowOptions}),Lg({...this.detectOverflowOptions,apply:({rects:e,availableWidth:t,availableHeight:n})=>{let{width:r,height:i}=e.reference;P(this.#l,t,!0),P(this.#u,n,!0),P(this.#d,r,!0),P(this.#f,i,!0)}}),this.arrowRef.current&&zg({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),qg({arrowWidth:B(this.#r),arrowHeight:B(this.#i)}),this.opts.hideWhenDetached.current&&Rg({strategy:`referenceHidden`,...this.detectOverflowOptions}),this.opts.hideWhenDetached.current&&!this.hasExplicitBoundaries&&{...Rg({strategy:`referenceHidden`,boundary:`clippingAncestors`}),name:`hideClipping`}].filter(Boolean));get middleware(){return B(this.#p)}set middleware(e){P(this.#p,e)}floating;#m=M(()=>Yg(this.floating.placement));get placedSide(){return B(this.#m)}set placedSide(e){P(this.#m,e)}#h=M(()=>Xg(this.floating.placement));get placedAlign(){return B(this.#h)}set placedAlign(e){P(this.#h,e)}#g=M(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return B(this.#g)}set arrowX(e){P(this.#g,e)}#_=M(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return B(this.#_)}set arrowY(e){P(this.#_,e)}#v=M(()=>this.floating.middlewareData.arrow?.centerOffset!==0);get cannotCenterArrow(){return B(this.#v)}set cannotCenterArrow(e){P(this.#v,e)}#y=N(`auto`);get contentZIndex(){return B(this.#y)}set contentZIndex(e){P(this.#y,e,!0)}#b=M(()=>Wg[this.placedSide]);get arrowBaseSide(){return B(this.#b)}set arrowBaseSide(e){P(this.#b,e)}#x=M(()=>({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":`${B(this.#l)}px`,"--bits-floating-available-height":`${B(this.#u)}px`,"--bits-floating-anchor-width":`${B(this.#d)}px`,"--bits-floating-anchor-height":`${B(this.#f)}px`,...(this.floating.middlewareData.hide?.referenceHidden||this.floating.middlewareData.hideClipping?.referenceHidden)&&{visibility:`hidden`,"pointer-events":`none`},...B(this.#e)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return B(this.#x)}set wrapperProps(e){P(this.#x,e)}#S=M(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:nd({...B(this.#e)}),...this.contentAttachment}));get props(){return B(this.#S)}set props(e){P(this.#S,e)}#C=M(()=>({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 B(this.#C)}set arrowStyle(e){P(this.#C,e)}constructor(e,t){this.opts=e,this.root=t,this.#t=e.updatePositionStrategy,e.customAnchor&&(this.root.customAnchorNode.current=e.customAnchor.current),md(()=>e.customAnchor.current,e=>{this.root.customAnchorNode.current=e}),this.floating=Hg({strategy:()=>this.opts.strategy.current,placement:()=>B(this.#a),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...e)=>Ng(...e,{animationFrame:this.#t?.current===`always`}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),jn(()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),md([()=>this.contentRef.current,()=>this.opts.enabled.current],([e,t])=>{if(!e||!t)return;let n=Md(e),r=n.requestAnimationFrame(()=>{if(this.contentRef.current!==e||!this.opts.enabled.current)return;let t=n.getComputedStyle(e).zIndex;t!==this.contentZIndex&&(this.contentZIndex=t)});return()=>{n.cancelAnimationFrame(r)}}),jn(()=>{this.floating.floating.current=this.wrapperRef.current})}};function qg(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Jg(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}}function Jg(e){let[t,n=`center`]=e.split(`-`);return[t,n]}function Yg(e){return Jg(e)[0]}function Xg(e){return Jg(e)[1]}function Zg(e,t){A(t,!0);let n=X(t,`side`,3,`bottom`),r=X(t,`sideOffset`,3,0),i=X(t,`align`,3,`center`),a=X(t,`alignOffset`,3,0),o=X(t,`arrowPadding`,3,0),s=X(t,`avoidCollisions`,3,!0),c=X(t,`collisionBoundary`,19,()=>[]),l=X(t,`collisionPadding`,3,0),u=X(t,`hideWhenDetached`,3,!1),d=X(t,`onPlaced`,3,()=>{}),p=X(t,`sticky`,3,`partial`),m=X(t,`updatePositionStrategy`,3,`optimized`),h=X(t,`strategy`,3,`fixed`),g=X(t,`dir`,3,`ltr`),_=X(t,`style`,19,()=>({})),v=X(t,`wrapperId`,19,Lp),y=X(t,`customAnchor`,3,null),b=X(t,`tooltip`,3,!1),x=Kg.create({side:$(()=>n()),sideOffset:$(()=>r()),align:$(()=>i()),alignOffset:$(()=>a()),id:$(()=>t.id),arrowPadding:$(()=>o()),avoidCollisions:$(()=>s()),collisionBoundary:$(()=>c()),collisionPadding:$(()=>l()),hideWhenDetached:$(()=>u()),onPlaced:$(()=>d()),sticky:$(()=>p()),updatePositionStrategy:$(()=>m()),strategy:$(()=>h()),dir:$(()=>g()),style:$(()=>_()),enabled:$(()=>t.enabled),wrapperId:$(()=>v()),customAnchor:$(()=>y())},Or(()=>b())),S=M(()=>ad(x.wrapperProps,{style:{pointerEvents:`auto`}}));var C=U();q(I(C),()=>t.content??f,()=>({props:x.props,wrapperProps:B(S)})),W(e,C),j()}function Qg(e,t){A(t,!0),Ea(()=>{t.onPlaced?.()});var n=U();q(I(n),()=>t.content??f,()=>({props:{},wrapperProps:{}})),W(e,n),j()}var $g=Gd({component:`separator`,parts:[`root`]}),e_=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=Fd(e.ref)}#e=M(()=>({id:this.opts.id.current,role:this.opts.decorative.current?`none`:`separator`,"aria-orientation":this.opts.orientation.current,"aria-hidden":Ld(this.opts.decorative.current),"data-orientation":this.opts.orientation.current,[$g.root]:``,...this.attachment}));get props(){return B(this.#e)}set props(e){P(this.#e,e)}},t_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`decorative`,`orientation`]),n_=V(`<div><!></div>`);function r_(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>vf(n)),i=X(t,`ref`,15,null),a=X(t,`decorative`,3,!1),o=X(t,`orientation`,3,`horizontal`),s=Y(t,t_),c=e_.create({ref:$(()=>i(),e=>i(e)),id:$(()=>r()),decorative:$(()=>a()),orientation:$(()=>o())}),l=M(()=>ad(s,c.props));var u=U(),d=I(u),p=e=>{var n=U();q(I(n),()=>t.child,()=>({props:B(l)})),W(e,n)},m=e=>{var n=n_();sa(n,()=>({...B(l)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(d,e=>{t.child?e(p):e(m,-1)}),W(e,u),j()}var i_=new Set([`$$slots`,`$$events`,`$$legacy`,`content`,`isStatic`,`onPlaced`]);function a_(e,t){let n=X(t,`isStatic`,3,!1),r=Y(t,i_);var i=U(),a=I(i),o=e=>{Qg(e,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},s=e=>{Zg(e,Ta({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>r))};K(a,e=>{n()?e(o):e(s,-1)}),W(e,i)}var o_=new Set(`$$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.forceMount.ref.tooltip.contentPointerEvents`.split(`.`)),s_=V(`<!> <!>`,1);function c_(e,t){A(t,!0);let n=X(t,`interactOutsideBehavior`,3,`close`),r=X(t,`trapFocus`,3,!0),i=X(t,`isValidEvent`,3,()=>!1),a=X(t,`customAnchor`,3,null),o=X(t,`isStatic`,3,!1),s=X(t,`tooltip`,3,!1),c=X(t,`contentPointerEvents`,3,`auto`),l=Y(t,o_),u=M(()=>t.preventScroll??!0),d=M(()=>t.strategy??(B(u)?`fixed`:`absolute`));a_(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 B(d)},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get enabled(){return t.enabled},get tooltip(){return s()},content:(e,a)=>{let o=()=>(a?.()).props,s=()=>(a?.()).wrapperProps;var d=s_(),p=I(d),m=e=>{tm(e,{get preventScroll(){return B(u)}})},h=e=>{tm(e,{get preventScroll(){return B(u)}})};K(p,e=>{t.forceMount&&t.enabled?e(m):t.forceMount||e(h,1)}),kp(R(p,2),{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:(e,r)=>{let a=()=>(r?.()).props;qf(e,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},get ref(){return t.ref},children:(e,r)=>{Wf(e,{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:(e,n)=>{let r=()=>(n?.()).props;Ip(e,{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:(e,n)=>{var i=U(),u=I(i);{let e=M(()=>({props:ad(l,o(),r(),a(),{id:t.id,style:{pointerEvents:c()}}),wrapperProps:s()}));q(u,()=>t.popper??f,()=>B(e))}W(e,i)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),W(e,d)},$$slots:{content:!0}}),j()}var l_=new Set(`$$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`.split(`.`));function u_(e,t){let n=X(t,`interactOutsideBehavior`,3,`close`),r=X(t,`trapFocus`,3,!0),i=X(t,`isValidEvent`,3,()=>!1),a=X(t,`customAnchor`,3,null),o=X(t,`isStatic`,3,!1),s=Y(t,l_);var c=U(),l=I(c),u=e=>{c_(e,Ta({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 a()},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}},()=>s))};K(l,e=>{t.shouldRender&&e(u)}),W(e,c)}var d_=new Set(`$$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`.split(`.`));function f_(e,t){let n=X(t,`interactOutsideBehavior`,3,`close`),r=X(t,`trapFocus`,3,!0),i=X(t,`isValidEvent`,3,()=>!1),a=X(t,`customAnchor`,3,null),o=X(t,`isStatic`,3,!1),s=Y(t,d_);c_(e,Ta({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 a()},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}},()=>s,{forceMount:!0}))}var p_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`forceMount`,`side`,`onInteractOutside`,`onEscapeKeydown`,`children`,`child`,`preventScroll`,`style`]),m_=V(`<div><div><!></div></div>`);function h_(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>vf(n)),i=X(t,`ref`,15,null),a=X(t,`forceMount`,3,!1),o=X(t,`side`,3,`bottom`),s=X(t,`onInteractOutside`,3,_f),c=X(t,`onEscapeKeydown`,3,_f),l=X(t,`preventScroll`,3,!1),u=Y(t,p_),d=Im.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e)),onInteractOutside:$(()=>s()),onEscapeKeydown:$(()=>c())}),p=M(()=>ad(u,d.props));var m=U(),h=I(m),g=e=>{f_(e,Ta(()=>B(p),()=>d.popperProps,{get ref(){return d.opts.ref},get side(){return o()},get enabled(){return d.root.opts.open.current},get id(){return r()},get preventScroll(){return l()},forceMount:!0,get shouldRender(){return d.shouldRender},popper:(e,n)=>{let r=()=>(n?.()).props,i=()=>(n?.()).wrapperProps,a=M(()=>ad(r(),{style:d.props.style},{style:t.style}));var o=U(),s=I(o),c=e=>{var n=U(),r=I(n);{let e=M(()=>({props:B(a),wrapperProps:i(),...d.snippetProps}));q(r,()=>t.child,()=>B(e))}W(e,n)},l=e=>{var n=m_();sa(n,()=>({...i()}));var r=F(n);sa(r,()=>({...B(a)})),q(F(r),()=>t.children??f),O(r),O(n),W(e,n)};K(s,e=>{t.child?e(c):e(l,-1)}),W(e,o)},$$slots:{popper:!0}}))},_=e=>{u_(e,Ta(()=>B(p),()=>d.popperProps,{get ref(){return d.opts.ref},get side(){return o()},get open(){return d.root.opts.open.current},get id(){return r()},get preventScroll(){return l()},forceMount:!1,get shouldRender(){return d.shouldRender},popper:(e,n)=>{let r=()=>(n?.()).props,i=()=>(n?.()).wrapperProps,a=M(()=>ad(r(),{style:d.props.style},{style:t.style}));var o=U(),s=I(o),c=e=>{var n=U(),r=I(n);{let e=M(()=>({props:B(a),wrapperProps:i(),...d.snippetProps}));q(r,()=>t.child,()=>B(e))}W(e,n)},l=e=>{var n=m_();sa(n,()=>({...i()}));var r=F(n);sa(r,()=>({...B(a)})),q(F(r),()=>t.children??f),O(r),O(n),W(e,n)};K(s,e=>{t.child?e(c):e(l,-1)}),W(e,o)},$$slots:{popper:!0}}))};K(h,e=>{a()?e(g):a()||e(_,1)}),W(e,m),j()}function g_(e,t){A(t,!0);let n=X(t,`mounted`,15,!1),r=X(t,`onMountedChange`,3,_f);bd(()=>(n(!0),r()(!0),()=>{n(!1),r()(!1)})),j()}var __=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`label`,`disabled`,`children`,`child`,`onHighlight`,`onUnhighlight`]),v_=V(`<div><!></div>`),y_=V(`<!> <!>`,1);function b_(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>vf(n)),i=X(t,`ref`,15,null),a=X(t,`label`,19,()=>t.value),o=X(t,`disabled`,3,!1),s=X(t,`onHighlight`,3,_f),c=X(t,`onUnhighlight`,3,_f),l=Y(t,__),u=Lm.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e)),value:$(()=>t.value),disabled:$(()=>o()),label:$(()=>a()),onHighlight:$(()=>s()),onUnhighlight:$(()=>c())}),d=M(()=>ad(l,u.props));var p=y_(),m=I(p),h=e=>{var n=U(),r=I(n);{let e=M(()=>({props:B(d),...u.snippetProps}));q(r,()=>t.child,()=>B(e))}W(e,n)},g=e=>{var n=v_();sa(n,()=>({...B(d)})),q(F(n),()=>t.children??f,()=>u.snippetProps),O(n),W(e,n)};K(m,e=>{t.child?e(h):e(g,-1)}),g_(R(m,2),{get mounted(){return u.mounted},set mounted(e){u.mounted=e}}),W(e,p),j()}var x_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`children`,`child`]),S_=V(`<div><!></div>`);function C_(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>vf(n)),i=X(t,`ref`,15,null),a=Y(t,x_),o=zm.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),s=M(()=>ad(a,o.props));var c=U(),l=I(c),u=e=>{var n=U();q(I(n),()=>t.child,()=>({props:B(s)})),W(e,n)},d=e=>{var n=S_();sa(n,()=>({...B(s)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(l,e=>{t.child?e(u):e(d,-1)}),W(e,c),j()}var w_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`delay`,`child`,`children`]),T_=V(`<div><!></div>`),E_=V(`<!> <!>`,1);function D_(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>vf(n)),i=X(t,`ref`,15,null),a=X(t,`delay`,3,()=>50),o=Y(t,w_),s=Vm.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e)),delay:$(()=>a())}),c=M(()=>ad(o,s.props));var l=U(),u=I(l),d=e=>{var n=E_(),r=I(n);g_(r,{get mounted(){return s.scrollButtonState.mounted},set mounted(e){s.scrollButtonState.mounted=e}});var i=R(r,2),a=e=>{var n=U();q(I(n),()=>t.child,()=>({props:o})),W(e,n)},l=e=>{var n=T_();sa(n,()=>({...B(c)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(i,e=>{t.child?e(a):e(l,-1)}),W(e,n)};K(u,e=>{s.canScrollDown&&e(d)}),W(e,l),j()}var O_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`delay`,`child`,`children`]),k_=V(`<div><!></div>`),A_=V(`<!> <!>`,1);function j_(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>vf(n)),i=X(t,`ref`,15,null),a=X(t,`delay`,3,()=>50),o=Y(t,O_),s=Hm.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e)),delay:$(()=>a())}),c=M(()=>ad(o,s.props));var l=U(),u=I(l),d=e=>{var n=A_(),r=I(n);g_(r,{get mounted(){return s.scrollButtonState.mounted},set mounted(e){s.scrollButtonState.mounted=e}});var i=R(r,2),a=e=>{var n=U();q(I(n),()=>t.child,()=>({props:o})),W(e,n)},l=e=>{var n=k_();sa(n,()=>({...B(c)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(i,e=>{t.child?e(a):e(l,-1)}),W(e,n)};K(u,e=>{s.canScrollUp&&e(d)}),W(e,l),j()}var M_=Gd({component:`label`,parts:[`root`]}),N_=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=Fd(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}onmousedown(e){e.detail>1&&e.preventDefault()}#e=M(()=>({id:this.opts.id.current,[M_.root]:``,onmousedown:this.onmousedown,...this.attachment}));get props(){return B(this.#e)}set props(e){P(this.#e,e)}},P_=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`for`]),F_=V(`<label><!></label>`);function I_(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>vf(n)),i=X(t,`ref`,15,null),a=Y(t,P_),o=N_.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),s=M(()=>ad(a,o.props,{for:t.for}));var c=U(),l=I(c),u=e=>{var n=U();q(I(n),()=>t.child,()=>({props:B(s)})),W(e,n)},d=e=>{var n=F_();sa(n,()=>({...B(s),for:t.for})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(l,e=>{t.child?e(u):e(d,-1)}),W(e,c),j()}var L_=Gd({component:`progress`,parts:[`root`]}),R_=class e{static create(t){return new e(t)}opts;attachment;constructor(e){this.opts=e,this.attachment=Fd(this.opts.ref)}#e=M(()=>({role:`progressbar`,value:this.opts.value.current,"aria-valuemin":this.opts.min.current,"aria-valuemax":this.opts.max.current,"aria-valuenow":this.opts.value.current===null?void 0:this.opts.value.current,"data-value":this.opts.value.current===null?void 0:this.opts.value.current,"data-state":z_(this.opts.value.current,this.opts.max.current),"data-max":this.opts.max.current,"data-min":this.opts.min.current,"data-indeterminate":this.opts.value.current===null?``:void 0,[L_.root]:``,...this.attachment}));get props(){return B(this.#e)}set props(e){P(this.#e,e)}};function z_(e,t){return e===null?`indeterminate`:e===t?`loaded`:`loading`}var B_=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`value`,`max`,`min`,`id`,`ref`]),V_=V(`<div><!></div>`);function H_(e,t){let n=ii();A(t,!0);let r=X(t,`value`,3,0),i=X(t,`max`,3,100),a=X(t,`min`,3,0),o=X(t,`id`,19,()=>vf(n)),s=X(t,`ref`,15,null),c=Y(t,B_),l=R_.create({value:$(()=>r()),max:$(()=>i()),min:$(()=>a()),id:$(()=>o()),ref:$(()=>s(),e=>s(e))}),u=M(()=>ad(c,l.props));var d=U(),p=I(d),m=e=>{var n=U();q(I(n),()=>t.child,()=>({props:B(u)})),W(e,n)},h=e=>{var n=V_();sa(n,()=>({...B(u)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(p,e=>{t.child?e(m):e(h,-1)}),W(e,d),j()}var U_=V(`<!> <!>`,1);function W_(e,t){A(t,!0);let n=X(t,`value`,15),r=X(t,`onValueChange`,3,_f),i=X(t,`name`,3,``),a=X(t,`disabled`,3,!1),o=X(t,`open`,15,!1),s=X(t,`onOpenChange`,3,_f),c=X(t,`onOpenChangeComplete`,3,_f),l=X(t,`loop`,3,!1),u=X(t,`scrollAlignment`,3,`nearest`),d=X(t,`required`,3,!1),p=X(t,`items`,19,()=>[]),m=X(t,`allowDeselect`,3,!1);function h(){n()===void 0&&n(t.type===`single`?``:[])}h(),md.pre(()=>n(),()=>{h()});let g=N(``),_=Nm.create({type:Or(()=>t.type),value:$(()=>n(),e=>{n(e),r()(e)}),disabled:$(()=>a()),required:$(()=>d()),open:$(()=>o(),e=>{o(e),s()(e)}),loop:$(()=>l()),scrollAlignment:$(()=>u()),name:$(()=>i()),isCombobox:!1,items:$(()=>p()),allowDeselect:$(()=>m()),inputValue:$(()=>B(g),e=>P(g,e,!0)),onOpenChangeComplete:$(()=>c())});var v=U_(),y=I(v);hm(y,{children:(e,n)=>{var r=U();q(I(r),()=>t.children??f),W(e,r)},$$slots:{default:!0}});var b=R(y,2),x=e=>{var n=U(),r=I(n),i=e=>{Um(e,{get autocomplete(){return t.autocomplete}})},a=e=>{var n=U();xi(I(n),16,()=>_.opts.value.current,e=>e,(e,n)=>{Um(e,{get value(){return n},get autocomplete(){return t.autocomplete}})}),W(e,n)};K(r,e=>{_.opts.value.current.length===0?e(i):e(a,-1)}),W(e,n)},S=M(()=>Array.isArray(_.opts.value.current)),C=e=>{Um(e,{get autocomplete(){return t.autocomplete},get value(){return _.opts.value.current},set value(e){_.opts.value.current=e}})};K(b,e=>{B(S)?e(x):e(C,-1)}),W(e,v),j()}var G_=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`id`,`placeholder`,`child`,`children`]),K_=V(`<span><!></span>`);function q_(e,t){let n=ii();A(t,!0);let r=X(t,`ref`,15,null),i=X(t,`id`,19,()=>vf(n)),a=Y(t,G_),o=Pm.create({id:$(()=>i()),ref:$(()=>r(),e=>r(e)),placeholder:$(()=>t.placeholder)}),s=M(()=>ad(a,o.props));var c=U(),l=I(c),u=e=>{var n=U(),r=I(n);{let e=M(()=>({props:B(s),...o.snippetProps}));q(r,()=>t.child,()=>B(e))}W(e,n)},d=e=>{var n=K_();sa(n,()=>({...B(s)}));var r=F(n),i=e=>{var n=U();q(I(n),()=>t.children??f,()=>o.snippetProps),W(e,n)},a=e=>{var n=H();z(()=>G(n,o.snippetProps.selection.selected?.label??t.placeholder)),W(e,n)},c=e=>{var n=H();z(e=>G(n,e),[()=>o.snippetProps.selection.selected.length>0?o.snippetProps.selection.selected.map(e=>e.label).join(`, `):t.placeholder]),W(e,n)},l=e=>{var n=H();z(()=>G(n,t.placeholder)),W(e,n)};K(r,e=>{t.children?e(i):o.snippetProps.selection.type===`single`?e(a,1):o.snippetProps.selection.type===`multiple`&&o.snippetProps.selection.selected?e(c,2):e(l,-1)}),O(n),W(e,n)};K(l,e=>{t.child?e(u):e(d,-1)}),W(e,c),j()}var J_=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`type`]),Y_=V(`<button><!></button>`);function X_(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>vf(n)),i=X(t,`ref`,15,null),a=X(t,`type`,3,`button`),o=Y(t,J_),s=Fm.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),c=M(()=>ad(o,s.props,{type:a()}));var l=U();J(I(l),()=>Wm,(e,n)=>{n(e,{get id(){return r()},get ref(){return s.opts.ref},children:(e,n)=>{var r=U(),i=I(r),a=e=>{var n=U();q(I(n),()=>t.child,()=>({props:B(c)})),W(e,n)},o=e=>{var n=Y_();sa(n,()=>({...B(c)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(i,e=>{t.child?e(a):e(o,-1)}),W(e,r)},$$slots:{default:!0}})}),W(e,l),j()}var Z_=Gd({component:`switch`,parts:[`root`,`thumb`]}),Q_=new dd(`Switch.Root`),$_=class e{static create(t){return Q_.set(new e(t))}opts;attachment;constructor(e){this.opts=e,this.attachment=Fd(e.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this)}#e(){this.opts.checked.current=!this.opts.checked.current}onkeydown(e){e.key!==`Enter`&&e.key!==` `||this.opts.disabled.current||(e.preventDefault(),this.#e())}onclick(e){this.opts.disabled.current||this.#e()}#t=M(()=>({"data-disabled":Rd(this.opts.disabled.current),"data-state":Vd(this.opts.checked.current),"data-required":Rd(this.opts.required.current)}));get sharedProps(){return B(this.#t)}set sharedProps(e){P(this.#t,e)}#n=M(()=>({checked:this.opts.checked.current}));get snippetProps(){return B(this.#n)}set snippetProps(e){P(this.#n,e)}#r=M(()=>({...this.sharedProps,id:this.opts.id.current,role:`switch`,disabled:zd(this.opts.disabled.current),"aria-checked":Ud(this.opts.checked.current,!1),"aria-required":Id(this.opts.required.current),[Z_.root]:``,onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return B(this.#r)}set props(e){P(this.#r,e)}},ev=class e{static create(){return new e(Q_.get())}root;#e=M(()=>this.root.opts.name.current!==void 0);get shouldRender(){return B(this.#e)}set shouldRender(e){P(this.#e,e)}constructor(e){this.root=e}#t=M(()=>({type:`checkbox`,name:this.root.opts.name.current,value:this.root.opts.value.current,checked:this.root.opts.checked.current,disabled:this.root.opts.disabled.current,required:this.root.opts.required.current}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}},tv=class e{static create(t){return new e(t,Q_.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Fd(e.ref)}#e=M(()=>({checked:this.root.opts.checked.current}));get snippetProps(){return B(this.#e)}set snippetProps(e){P(this.#e,e)}#t=M(()=>({...this.root.sharedProps,id:this.opts.id.current,[Z_.thumb]:``,...this.attachment}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}};function nv(e,t){A(t,!1);let n=ev.create();_a();var r=U(),i=I(r),a=e=>{um(e,Ta(()=>n.props))};K(i,e=>{n.shouldRender&&e(a)}),W(e,r),j()}var rv=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`,`disabled`,`required`,`checked`,`value`,`name`,`type`,`onCheckedChange`]),iv=V(`<button><!></button>`),av=V(`<!> <!>`,1);function ov(e,t){let n=ii();A(t,!0);let r=X(t,`ref`,15,null),i=X(t,`id`,19,()=>vf(n)),a=X(t,`disabled`,3,!1),o=X(t,`required`,3,!1),s=X(t,`checked`,15,!1),c=X(t,`value`,3,`on`),l=X(t,`name`,3,void 0),u=X(t,`type`,3,`button`),d=X(t,`onCheckedChange`,3,_f),p=Y(t,rv),m=$_.create({checked:$(()=>s(),e=>{s(e),d()?.(e)}),disabled:$(()=>a()??!1),required:$(()=>o()),value:$(()=>c()),name:$(()=>l()),id:$(()=>i()),ref:$(()=>r(),e=>r(e))}),h=M(()=>ad(p,m.props,{type:u()}));var g=av(),_=I(g),v=e=>{var n=U(),r=I(n);{let e=M(()=>({props:B(h),...m.snippetProps}));q(r,()=>t.child,()=>B(e))}W(e,n)},y=e=>{var n=iv();sa(n,()=>({...B(h)})),q(F(n),()=>t.children??f,()=>m.snippetProps),O(n),W(e,n)};K(_,e=>{t.child?e(v):e(y,-1)}),nv(R(_,2),{}),W(e,g),j()}var sv=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`ref`,`id`]),cv=V(`<span><!></span>`);function lv(e,t){let n=ii();A(t,!0);let r=X(t,`ref`,15,null),i=X(t,`id`,19,()=>vf(n)),a=Y(t,sv),o=tv.create({id:$(()=>i()),ref:$(()=>r(),e=>r(e))}),s=M(()=>ad(a,o.props));var c=U(),l=I(c),u=e=>{var n=U(),r=I(n);{let e=M(()=>({props:B(s),...o.snippetProps}));q(r,()=>t.child,()=>B(e))}W(e,n)},d=e=>{var n=cv();sa(n,()=>({...B(s)})),q(F(n),()=>t.children??f,()=>o.snippetProps),O(n),W(e,n)};K(l,e=>{t.child?e(u):e(d,-1)}),W(e,c),j()}var uv=Gd({component:`tabs`,parts:[`root`,`list`,`trigger`,`content`]}),dv=new dd(`Tabs.Root`),fv=class e{static create(t){return dv.set(new e(t))}opts;attachment;rovingFocusGroup;#e=N(ln([]));get triggerIds(){return B(this.#e)}set triggerIds(e){P(this.#e,e,!0)}valueToTriggerId=new ld;valueToContentId=new ld;constructor(e){this.opts=e,this.attachment=Fd(e.ref),this.rovingFocusGroup=new mf({candidateAttr:uv.trigger,rootAttr:uv.root,rootNode:this.opts.ref,loop:this.opts.loop,orientation:this.opts.orientation})}registerTrigger(e,t){return this.triggerIds.push(e),this.valueToTriggerId.set(t,e),()=>{this.triggerIds=this.triggerIds.filter(t=>t!==e),this.valueToTriggerId.delete(t)}}registerContent(e,t){return this.valueToContentId.set(t,e),()=>{this.valueToContentId.delete(t)}}setValue(e){this.opts.value.current=e}#t=M(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,[uv.root]:``,...this.attachment}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}},pv=class e{static create(t){return new e(t,dv.get())}opts;root;attachment;#e=M(()=>this.root.opts.disabled.current);constructor(e,t){this.opts=e,this.root=t,this.attachment=Fd(e.ref)}#t=M(()=>({id:this.opts.id.current,role:`tablist`,"aria-orientation":this.root.opts.orientation.current,"data-orientation":this.root.opts.orientation.current,[uv.list]:``,"data-disabled":Rd(B(this.#e)),...this.attachment}));get props(){return B(this.#t)}set props(e){P(this.#t,e)}},mv=class e{static create(t){return new e(t,dv.get())}opts;root;attachment;#e=N(0);#t=M(()=>this.root.opts.value.current===this.opts.value.current);#n=M(()=>this.opts.disabled.current||this.root.opts.disabled.current);#r=M(()=>this.root.valueToContentId.get(this.opts.value.current));constructor(e,t){this.opts=e,this.root=t,this.attachment=Fd(e.ref),md([()=>this.opts.id.current,()=>this.opts.value.current],([e,t])=>this.root.registerTrigger(e,t)),jn(()=>{this.root.triggerIds.length,B(this.#t)||!this.root.opts.value.current?P(this.#e,0):P(this.#e,-1)}),this.onfocus=this.onfocus.bind(this),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}#i(){this.root.opts.value.current!==this.opts.value.current&&this.root.setValue(this.opts.value.current)}onfocus(e){this.root.opts.activationMode.current!==`automatic`||B(this.#n)||this.#i()}onclick(e){B(this.#n)||this.#i()}onkeydown(e){B(this.#n)||(e.key===` `||e.key===`Enter`?(e.preventDefault(),this.#i()):this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,e))}#a=M(()=>({id:this.opts.id.current,role:`tab`,"data-state":gv(B(this.#t)),"data-value":this.opts.value.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":Rd(B(this.#n)),"aria-selected":Id(B(this.#t)),"aria-controls":B(this.#r),[uv.trigger]:``,disabled:zd(B(this.#n)),tabindex:B(this.#e),onclick:this.onclick,onfocus:this.onfocus,onkeydown:this.onkeydown,...this.attachment}));get props(){return B(this.#a)}set props(e){P(this.#a,e)}},hv=class e{static create(t){return new e(t,dv.get())}opts;root;attachment;#e=M(()=>this.root.opts.value.current===this.opts.value.current);#t=M(()=>this.root.valueToTriggerId.get(this.opts.value.current));constructor(e,t){this.opts=e,this.root=t,this.attachment=Fd(e.ref),md([()=>this.opts.id.current,()=>this.opts.value.current],([e,t])=>this.root.registerContent(e,t))}#n=M(()=>({id:this.opts.id.current,role:`tabpanel`,hidden:zd(!B(this.#e)),tabindex:this.opts.tabindex.current,"data-value":this.opts.value.current,"data-state":gv(B(this.#e)),"aria-labelledby":B(this.#t),"data-orientation":this.root.opts.orientation.current,[uv.content]:``,...this.attachment}));get props(){return B(this.#n)}set props(e){P(this.#n,e)}};function gv(e){return e?`active`:`inactive`}var _v=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`value`,`onValueChange`,`orientation`,`loop`,`activationMode`,`disabled`,`children`,`child`]),vv=V(`<div><!></div>`);function yv(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>vf(n)),i=X(t,`ref`,15,null),a=X(t,`value`,15,``),o=X(t,`onValueChange`,3,_f),s=X(t,`orientation`,3,`horizontal`),c=X(t,`loop`,3,!0),l=X(t,`activationMode`,3,`automatic`),u=X(t,`disabled`,3,!1),d=Y(t,_v),p=fv.create({id:$(()=>r()),value:$(()=>a(),e=>{a(e),o()(e)}),orientation:$(()=>s()),loop:$(()=>c()),activationMode:$(()=>l()),disabled:$(()=>u()),ref:$(()=>i(),e=>i(e))}),m=M(()=>ad(d,p.props));var h=U(),g=I(h),_=e=>{var n=U();q(I(n),()=>t.child,()=>({props:B(m)})),W(e,n)},v=e=>{var n=vv();sa(n,()=>({...B(m)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(g,e=>{t.child?e(_):e(v,-1)}),W(e,h),j()}var bv=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`value`,`tabindex`]),xv=V(`<div><!></div>`);function Sv(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>vf(n)),i=X(t,`ref`,15,null),a=X(t,`tabindex`,3,0),o=Y(t,bv),s=hv.create({value:$(()=>t.value),tabindex:$(()=>a()??0),id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),c=M(()=>ad(o,s.props));var l=U(),u=I(l),d=e=>{var n=U();q(I(n),()=>t.child,()=>({props:B(c)})),W(e,n)},p=e=>{var n=xv();sa(n,()=>({...B(c)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(u,e=>{t.child?e(d):e(p,-1)}),W(e,l),j()}var Cv=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`id`,`ref`]),wv=V(`<div><!></div>`);function Tv(e,t){let n=ii();A(t,!0);let r=X(t,`id`,19,()=>vf(n)),i=X(t,`ref`,15,null),a=Y(t,Cv),o=pv.create({id:$(()=>r()),ref:$(()=>i(),e=>i(e))}),s=M(()=>ad(a,o.props));var c=U(),l=I(c),u=e=>{var n=U();q(I(n),()=>t.child,()=>({props:B(s)})),W(e,n)},d=e=>{var n=wv();sa(n,()=>({...B(s)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(l,e=>{t.child?e(u):e(d,-1)}),W(e,c),j()}var Ev=new Set([`$$slots`,`$$events`,`$$legacy`,`child`,`children`,`disabled`,`id`,`type`,`value`,`ref`]),Dv=V(`<button><!></button>`);function Ov(e,t){let n=ii();A(t,!0);let r=X(t,`disabled`,3,!1),i=X(t,`id`,19,()=>vf(n)),a=X(t,`type`,3,`button`),o=X(t,`ref`,15,null),s=Y(t,Ev),c=mv.create({id:$(()=>i()),disabled:$(()=>r()??!1),value:$(()=>t.value),ref:$(()=>o(),e=>o(e))}),l=M(()=>ad(s,c.props,{type:a()}));var u=U(),d=I(u),p=e=>{var n=U();q(I(n),()=>t.child,()=>({props:B(l)})),W(e,n)},m=e=>{var n=Dv();sa(n,()=>({...B(l)})),q(F(n),()=>t.children??f),O(n),W(e,n)};K(d,e=>{t.child?e(p):e(m,-1)}),W(e,u),j()}var kv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Av(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,kv);var i=U(),a=I(i);{let e=M(()=>Gl(`gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed`,t.class));J(a,()=>I_,(t,i)=>{i(t,Ta({"data-slot":`label`,get class(){return B(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}W(e,i),j()}var jv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`data-slot`]);function Mv(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`data-slot`,3,`separator`),i=Y(t,jv);var a=U(),o=I(a);{let e=M(()=>Gl(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,t.class));J(o,()=>r_,(t,a)=>{a(t,Ta({get"data-slot"(){return r()},get class(){return B(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)}}))})}W(e,a),j()}var Nv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Pv(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Nv);var i=U(),a=I(i);{let e=M(()=>Gl(`text-sm flex-1 outline-none`,t.class));J(a,()=>Sv,(t,i)=>{i(t,Ta({"data-slot":`tabs-content`,get class(){return B(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}W(e,i),j()}var Fv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function Iv(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Fv);var i=U(),a=I(i);{let e=M(()=>Gl(`gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg:not([class*='size-'])]:size-4 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 relative inline-flex h-[calc(100%_-_1px)] flex-1 items-center justify-center whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,t.class));J(a,()=>Ov,(t,i)=>{i(t,Ta({"data-slot":`tabs-trigger`,get class(){return B(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)}}))})}W(e,i),j()}var Lv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`value`,`class`]);function Rv(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`value`,15,``),i=Y(t,Lv);var a=U(),o=I(a);{let e=M(()=>Gl(`gap-2 group/tabs flex data-horizontal:flex-col`,t.class));J(o,()=>yv,(t,a)=>{a(t,Ta({"data-slot":`tabs`,get class(){return B(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)},get value(){return r()},set value(e){r(e)}}))})}W(e,a),j()}var zv=Zc({base:`rounded-lg p-[3px] group-data-horizontal/tabs:h-9 data-[variant=line]:rounded-none group/tabs-list inline-flex w-fit items-center justify-center text-muted-foreground group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col`,variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}}),Bv=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`variant`,`class`]);function Vv(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`variant`,3,`default`),i=Y(t,Bv);var a=U(),o=I(a);{let e=M(()=>Gl(zv({variant:r()}),t.class));J(o,()=>Tv,(t,a)=>{a(t,Ta({"data-slot":`tabs-list`,get"data-variant"(){return r()},get class(){return B(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)}}))})}W(e,a),j()}var Hv=new Set([`$$slots`,`$$events`,`$$legacy`]);function Uv(e,t){let n=Y(t,Hv);var r=U();J(I(r),()=>Ef,(e,t)=>{t(e,Ta(()=>n))}),W(e,r)}var Wv={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},Gv=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim();function Kv(e){return e!=null}function qv(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Wv.width,a=e.size??e.height??Wv.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Gv(...c):Gv(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Wv[`stroke-width`])*Number(e.size??e.width??Wv.width)/Number(t.size??t.width??Wv.width):t.strokeWidth??Wv[`stroke-width`];return[`svg`,{...Object.entries(Wv).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Kv(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Kv(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Kv(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}var Jv=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Yv=Symbol(`lucide-context`),Xv=()=>$e(Yv),Zv=new Set([`$$slots`,`$$events`,`$$legacy`,`color`,`size`,`width`,`height`,`strokeWidth`,`absoluteStrokeWidth`,`nonScalingStroke`,`iconNode`,`icon`,`class`,`children`]),Qv=ri(`<svg><!><!></svg>`);function $v(e,t){A(t,!0);let n=Xv()??{},r=X(t,`color`,19,()=>n.color??`currentColor`),i=X(t,`size`,19,()=>n.size??24),a=X(t,`width`,19,i),o=X(t,`height`,19,i),s=X(t,`strokeWidth`,19,()=>n.strokeWidth??2),c=X(t,`absoluteStrokeWidth`,19,()=>n.absoluteStrokeWidth??!1),l=X(t,`nonScalingStroke`,19,()=>n.nonScalingStroke??!1),u=X(t,`iconNode`,19,()=>[]),d=X(t,`icon`,19,()=>({node:u(),aliases:[],size:24})),p=Y(t,Zv),m=M(()=>!!t.children||Jv(p)),h=M(()=>qv(d(),{color:r(),width:a(),height:o(),strokeWidth:s(),absoluteStrokeWidth:c(),nonScalingStroke:l(),className:Gv(`lucide-icon`,n.class),hasA11yProp:B(m),attributes:p})),v=M(()=>_(B(h),3)),y=M(()=>B(v)[1]),b=M(()=>g(B(v)[2],()=>[],!0)),x=M(()=>({...B(y),class:[...B(y).class.split(` `),t.class]}));var S=Qv();sa(S,()=>({...B(x)}));var C=F(S);xi(C,17,()=>B(b),_i,(e,t)=>{var n=M(()=>_(B(t),2));let r=()=>B(n)[0],i=()=>B(n)[1];var a=U();Oi(I(a),r,!0,(e,t)=>{sa(e,()=>({...i()}))}),W(e,a)}),q(R(C),()=>t.children??f),O(S),W(e,S),j()}var ey={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`}]]};ey.node;var ty=new Set([`$$slots`,`$$events`,`$$legacy`]);function ny(e,t){let n=Y(t,ty);$v(e,Ta(()=>n,{get icon(){return ey}}))}var ry=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function iy(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,ry);var i=U(),a=I(i);{let e=M(()=>Gl(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4`,t.class));J(a,()=>D_,(t,i)=>{i(t,Ta({"data-slot":`select-scroll-down-button`,get class(){return B(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)},children:(e,t)=>{ny(e,{})},$$slots:{default:!0}}))})}W(e,i),j()}var ay={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`}]]};ay.node;var oy=new Set([`$$slots`,`$$events`,`$$legacy`]);function sy(e,t){let n=Y(t,oy);$v(e,Ta(()=>n,{get icon(){return ay}}))}var cy=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`]);function ly(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,cy);var i=U(),a=I(i);{let e=M(()=>Gl(`bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4`,t.class));J(a,()=>j_,(t,i)=>{i(t,Ta({"data-slot":`select-scroll-up-button`,get class(){return B(e)}},()=>r,{get ref(){return n()},set ref(e){n(e)},children:(e,t)=>{sy(e,{})},$$slots:{default:!0}}))})}W(e,i),j()}var uy=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`sideOffset`,`portalProps`,`children`,`preventScroll`]),dy=V(`<!> <!> <!>`,1);function fy(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`sideOffset`,3,4),i=X(t,`preventScroll`,3,!0),a=Y(t,uy);Uv(e,Ta(()=>t.portalProps,{children:(e,o)=>{var s=U(),c=I(s);{let e=M(()=>Gl(`bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-md shadow-md ring-1 duration-100 relative z-50 max-h-(--bits-select-content-available-height) origin-(--bits-select-content-transform-origin) overflow-x-hidden overflow-y-auto`,t.class));J(c,()=>h_,(o,s)=>{s(o,Ta({get sideOffset(){return r()},get preventScroll(){return i()},"data-slot":`select-content`,get class(){return B(e)}},()=>a,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var r=dy(),i=I(r);ly(i,{});var a=R(i,2);{let e=M(()=>Gl(`h-(--bits-select-anchor-height) w-full min-w-(--bits-select-anchor-width) scroll-my-1`));J(a,()=>C_,(n,r)=>{r(n,{get class(){return B(e)},children:(e,n)=>{var r=U();q(I(r),()=>t.children??f),W(e,r)},$$slots:{default:!0}})})}iy(R(a,2),{}),W(e,r)},$$slots:{default:!0}}))})}W(e,s)},$$slots:{default:!0}})),j()}var py={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`}]]};py.node;var my=new Set([`$$slots`,`$$events`,`$$legacy`]);function hy(e,t){let n=Y(t,my);$v(e,Ta(()=>n,{get icon(){return py}}))}var gy=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`value`,`label`,`children`]),_y=V(`<span class="pointer-events-none absolute right-2 flex size-4 items-center justify-center"><!></span> <span class="flex flex-1 gap-2 shrink-0 whitespace-nowrap"><!></span>`,1);function vy(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,gy);var i=U(),a=I(i);{let e=(e,n)=>{let r=()=>(n?.()).selected,i=()=>(n?.()).highlighted;var a=_y(),o=I(a),s=F(o),c=e=>{hy(e,{class:`pointer-events-none`})};K(s,e=>{r()&&e(c)}),O(o);var l=R(o,2),u=F(l),d=e=>{var n=U();q(I(n),()=>t.children,()=>({selected:r(),highlighted:i()})),W(e,n)},f=e=>{var n=H();z(()=>G(n,t.label||t.value)),W(e,n)};K(u,e=>{t.children?e(d):e(f,-1)}),O(l),W(e,a)},i=M(()=>Gl(`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`data-highlighted:bg-accent data-highlighted:text-accent-foreground`,t.class));J(a,()=>b_,(a,o)=>{o(a,Ta({get value(){return t.value},get label(){return t.label},"data-slot":`select-item`,get class(){return B(i)}},()=>r,{get ref(){return n()},set ref(e){n(e)},children:e,$$slots:{default:!0}}))})}W(e,i),j()}var yy=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`size`]),by=V(`<!> <!>`,1);function xy(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`size`,3,`default`),i=Y(t,yy);var a=U(),o=I(a);{let e=M(()=>Gl(`border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-md border bg-transparent py-2 pr-2 pl-2.5 text-sm shadow-xs transition-[color,box-shadow] focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,t.class));J(o,()=>X_,(a,o)=>{o(a,Ta({"data-slot":`select-trigger`,get"data-size"(){return r()},get class(){return B(e)}},()=>i,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var r=by(),i=I(r);q(i,()=>t.children??f),ny(R(i,2),{class:`text-muted-foreground size-4 pointer-events-none`}),W(e,r)},$$slots:{default:!0}}))})}W(e,a),j()}var Sy=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`]);function Cy(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Sy);var i=U();J(I(i),()=>q_,(e,t)=>{t(e,Ta({"data-slot":`select-value`},()=>r,{get ref(){return n()},set ref(e){n(e)}}))}),W(e,i),j()}var wy=new Set([`$$slots`,`$$events`,`$$legacy`,`open`,`value`]);function Ty(e,t){A(t,!0);let n=X(t,`open`,15,!1),r=X(t,`value`,15),i=Y(t,wy);var a=U();J(I(a),()=>W_,(e,t)=>{t(e,Ta(()=>i,{get open(){return n()},set open(e){n(e)},get value(){return r()},set value(e){r(e)}}))}),W(e,a),j()}var Ey=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Dy=V(`<tbody><!></tbody>`);function Oy(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Ey);var i=Dy();sa(i,e=>({"data-slot":`table-body`,class:e,...r}),[()=>Gl(`[&_tr:last-child]:border-0`,t.class)]),q(F(i),()=>t.children??f),O(i),ga(i,e=>n(e),()=>n()),W(e,i),j()}var ky=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Ay=V(`<td><!></td>`);function jy(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,ky);var i=Ay();sa(i,e=>({"data-slot":`table-cell`,class:e,...r}),[()=>Gl(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0`,t.class)]),q(F(i),()=>t.children??f),O(i),ga(i,e=>n(e),()=>n()),W(e,i),j()}var My=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Ny=V(`<th><!></th>`);function Py(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,My);var i=Ny();sa(i,e=>({"data-slot":`table-head`,class:e,...r}),[()=>Gl(`text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0`,t.class)]),q(F(i),()=>t.children??f),O(i),ga(i,e=>n(e),()=>n()),W(e,i),j()}var Fy=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Iy=V(`<thead><!></thead>`);function Ly(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Fy);var i=Iy();sa(i,e=>({"data-slot":`table-header`,class:e,...r}),[()=>Gl(`[&_tr]:border-b`,t.class)]),q(F(i),()=>t.children??f),O(i),ga(i,e=>n(e),()=>n()),W(e,i),j()}var Ry=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),zy=V(`<tr><!></tr>`);function By(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Ry);var i=zy();sa(i,e=>({"data-slot":`table-row`,class:e,...r}),[()=>Gl(`hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors has-aria-expanded:bg-muted/50`,t.class)]),q(F(i),()=>t.children??f),O(i),ga(i,e=>n(e),()=>n()),W(e,i),j()}var Vy=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),Hy=V(`<div data-slot="table-container" class="relative w-full overflow-x-auto"><table><!></table></div>`);function Uy(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Vy);var i=Hy(),a=F(i);sa(a,e=>({"data-slot":`table`,class:e,...r}),[()=>Gl(`w-full caption-bottom text-sm`,t.class)]),q(F(a),()=>t.children??f),O(a),ga(a,e=>n(e),()=>n()),O(i),W(e,i),j()}var Wy=V(` <button type="button" class="hover:text-destructive"><!></button>`,1),Gy=V(`<div class="flex flex-wrap items-center gap-2"><!> <!></div>`);function Ky(e,t){A(t,!0);let n=X(t,`value`,31,()=>ln([])),r=X(t,`numeric`,3,!1),i=N(``);function a(){let e=B(i).trim();e&&(r()&&!/^\d+$/.test(e)?P(i,``):(n().includes(e)||n([...n(),e]),P(i,``),t.onchange?.(n())))}function o(e){n(n().filter(t=>t!==e)),t.onchange?.(n())}function s(e){(e.key===`Enter`||e.key===`,`)&&(e.preventDefault(),a())}var c=Gy(),l=F(c);xi(l,16,n,e=>e,(e,t)=>{Jl(e,{variant:`secondary`,class:`gap-1`,children:(e,n)=>{k();var r=Wy(),i=I(r),a=R(i);Ka(F(a),{class:`size-3`}),O(a),z(()=>{G(i,`${t??``} `),aa(a,`aria-label`,`删除 ${t}`)}),qr(`click`,a,()=>o(t)),W(e,r)},$$slots:{default:!0}})});var u=R(l,2);{let e=M(()=>r()?`numeric`:`text`);nu(u,{get id(){return t.id},class:`h-8 w-40`,get placeholder(){return t.placeholder},get inputmode(){return B(e)},onkeydown:s,onblur:a,get value(){return B(i)},set value(e){P(i,e,!0)}})}O(c),W(e,c),j()}Jr([`click`]);function qy(e){return e==null?``:String(e)}function Jy(e){return Array.isArray(e)?e.map(e=>String(e)):typeof e==`string`&&e.trim()?e.split(`,`).map(e=>e.trim()).filter(e=>e.length>0):[]}var Yy=V(`<!> 新增聊天`,1),Xy=V(`<p> </p>`),Zy=V(`<li> </li>`),Qy=V(`<ul class="text-muted-foreground space-y-1 text-xs"></ul>`),$y=V(`<p class="text-muted-foreground text-sm">正在读取会话覆盖…</p>`),eb=V(`<p class="text-muted-foreground text-sm">还没有任何覆盖,全部按默认行为走。</p>`),tb=V(`<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>`,1),nb=V(`<!> 编辑`,1),rb=V(`<!> 删除`,1),ib=V(`<div class="flex items-center gap-1"><!> <!></div>`),ab=V(`<!> <!>`,1),ob=V(`<p class="text-destructive text-xs"> </p>`),sb=V(`<!> <!> <!>`,1),cb=V(`<div class="space-y-1.5"><!> <!> <p class="text-muted-foreground text-xs"> </p> <!></div>`),lb=V(`<!> 保存`,1),ub=V(`<section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold"> </h2> <div class="space-y-1.5"><!> <!> <!></div> <div class="grid gap-4 md:grid-cols-2"></div> <div class="flex items-center gap-2"><!> <!></div></section>`),db=V(`<section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold">聊天覆盖</h2> <!></section> <!>`,1),fb=V(`<div class="flex flex-col gap-4"><div class="flex flex-wrap items-center gap-2"><span class="text-muted-foreground font-mono text-xs"> </span> <!> <div class="ml-auto flex items-center gap-2"><!> <!></div></div> <!> <!> <!></div>`);function pb(e,t){A(t,!0);let n=[{path:`wake`,label:`唤醒方式`,hint:`all / mention / prefix / none`},{path:`wake.prefixes`,label:`唤醒前缀`,hint:`wake 为 prefix 时用,留空表示不覆盖`},{path:`wake.ignorePrefixes`,label:`忽略前缀`,hint:`命中即整条不理,留空表示跟随全局`},{path:`proactive.enabled`,label:`主动说话`,hint:`留空表示跟随全局白名单`},{path:`proactive.startProbability`,label:`主动概率`,hint:`0 到 1 之间的数字`},{path:`collect.privateMs`,label:`私聊收集窗口(毫秒)`,hint:`留空表示跟随全局,0 表示立即回复`},{path:`collect.groupMs`,label:`群聊收集窗口(毫秒)`,hint:`留空表示跟随全局,0 表示立即回复`},{path:`agent`,label:`agent`,hint:`覆盖这个聊天用的 agent`},{path:`model`,label:`模型`,hint:`provider/model[/variant]`},{path:`soulPath`,label:`角色设定路径`,hint:`覆盖 soulPath`},{path:`soulName`,label:`角色设定文件名`,hint:`覆盖 soulName`}],r=[`all`,`mention`,`prefix`,`none`],i=`__empty__`,a=N(void 0),o=N(!0),s=N(!1),c=N(``),l=N(`ok`),u=N(ln([])),d=N(ln({})),f=N(void 0),p=N(``),m=N(ln({})),h=M(()=>B(a)?.value?.chats??{});Ea(()=>{g()});async function g(){P(o,!0);try{P(a,await Ya.chatOverrides(),!0),P(u,B(a).warnings??[],!0),P(c,``),P(l,`ok`)}catch(e){ne(e)}finally{P(o,!1)}}function v(e){if(typeof e==`string`)return e;if(e&&typeof e==`object`){let t=e,n=`${t.providerID??``}/${t.id??``}`;return t.variant?`${n}/${t.variant}`:n}return``}function y(e){return(B(a)?.masked??[]).includes(e)}function b(e){let t=B(h)[e];P(f,e,!0),P(p,e,!0),P(m,{wake:t?.wake??``,"wake.prefixes":Jy(t?.[`wake.prefixes`]),"wake.ignorePrefixes":Jy(t?.[`wake.ignorePrefixes`]),"proactive.enabled":t?.[`proactive.enabled`]===void 0?``:String(t[`proactive.enabled`]),"proactive.startProbability":t?.[`proactive.startProbability`]===void 0?``:String(t[`proactive.startProbability`]),"collect.privateMs":t?.[`collect.privateMs`]===void 0?``:String(t[`collect.privateMs`]),"collect.groupMs":t?.[`collect.groupMs`]===void 0?``:String(t[`collect.groupMs`]),agent:t?.agent??``,model:v(t?.model),soulPath:t?.soulPath??``,soulName:t?.soulName??``},!0);for(let t of n)y(`chats.${e}.${t.path}`)&&(B(m)[t.path]=``);P(d,{},!0),P(c,``)}function x(){P(f,``),P(p,``),P(m,{wake:``,"wake.prefixes":[],"wake.ignorePrefixes":[],"proactive.enabled":``,"proactive.startProbability":``,"collect.privateMs":``,"collect.groupMs":``,agent:``,model:``,soulPath:``,soulName:``},!0),P(d,{},!0),P(c,``)}function S(){P(f,void 0),P(d,{},!0)}function C(e){let t=B(m)[e];if(e===`wake.prefixes`||e===`wake.ignorePrefixes`){let e=Jy(t);return e.length>0?e:null}if(e===`proactive.enabled`)return t===`true`||t!==`false`&&null;if(e===`proactive.startProbability`||e===`collect.privateMs`||e===`collect.groupMs`){if(t===``||t==null)return null;let e=Number(t);return Number.isFinite(e)?e:String(t)}let n=String(t??``).trim();return n===``?null:n}async function w(){let e=B(p).trim();if(e===``){P(d,{key:`请填写聊天键`},!0),P(l,`error`),P(c,`聊天键不能为空`);return}let r=B(f)===``;if(r&&Object.hasOwn(B(h),e)){P(d,{key:`这个聊天已经有覆盖了,点「编辑」来改`},!0),P(l,`error`),P(c,`这个聊天已经有覆盖了,点「编辑」来改`);return}if(B(m).wake===`prefix`&&Jy(B(m)[`wake.prefixes`]).length===0){P(d,{[`chats.${e}.wake.prefixes`]:`选择 prefix 唤醒时必须写至少一个前缀`},!0),P(l,`error`),P(c,`选择 prefix 唤醒时必须写至少一个前缀`);return}let i={};for(let t of n){if(y(`chats.${e}.${t.path}`)&&te(B(m)[t.path]))continue;let n=C(t.path);r&&n===null||(i[t.path]=n)}if(Object.keys(i).length===0)P(d,{key:`至少填写一项再保存`},!0),P(l,`error`),P(c,`至少填写一项再保存`);else{P(s,!0);try{let n=await Ya.saveChatOverrides({chats:{[e]:i}});P(a,n.document,!0),P(u,n.warnings??[],!0),P(f,void 0),P(d,{},!0),P(l,`ok`),P(c,n.restartRequired?n.note:`已保存。${n.note}`,!0),n.restartRequired&&t.onrestart?.([`chat-overrides:${e}`])}catch(e){ne(e)}finally{P(s,!1)}}}async function ee(e){P(s,!0);try{let t=await Ya.saveChatOverrides({chats:{[e]:null}});P(a,t.document,!0),P(u,t.warnings??[],!0),P(d,{},!0),P(l,`ok`),P(c,`已删除 ${e}。${t.note}`),B(f)===e&&P(f,void 0)}catch(e){ne(e)}finally{P(s,!1)}}function te(e){return e==null?!0:Array.isArray(e)?e.length===0:String(e).trim()===``}function ne(e){if(P(l,`error`),e instanceof qa){if(e.fields.length>0){let t={};for(let n of e.fields)t[n.path]=n.message;P(d,t,!0),P(c,e.fields.map(e=>e.message).join(`;`),!0)}else P(c,e.message,!0)}else P(c,e instanceof Error?e.message:String(e),!0)}function re(e){return B(d)[e]??``}function ie(e){return e==null||e===``?`-`:Array.isArray(e)?e.length>0?e.join(` / `):`-`:String(e)}function ae(e){let t=[];return e[`collect.privateMs`]!==void 0&&t.push(`私 ${e[`collect.privateMs`]}ms`),e[`collect.groupMs`]!==void 0&&t.push(`群 ${e[`collect.groupMs`]}ms`),t.length>0?t.join(` / `):`-`}var oe=fb(),se=F(oe),ce=F(se),le=L(ce,!0),ue=R(ce,2),T=e=>{Jl(e,{variant:`outline`,children:(e,t)=>{k(),W(e,H(`文件不存在,保存后新建`))},$$slots:{default:!0}})};K(ue,e=>{B(a)&&!B(a).exists&&e(T)});var de=R(ue,2),fe=F(de);$l(fe,{variant:`ghost`,size:`sm`,onclick:()=>void g(),children:(e,t)=>{k(),W(e,H(`重新读取`))},$$slots:{default:!0}}),$l(R(fe,2),{size:`sm`,onclick:x,children:(e,t)=>{var n=Yy();za(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),O(de),O(se);var pe=R(se,2),me=e=>{var t=Xy(),n=L(t,!0);z(()=>{Ri(t,1,Mi(B(l)===`error`?`text-destructive text-sm`:`text-emerald-600 text-sm`)),G(n,B(c))}),W(e,t)};K(pe,e=>{B(c)&&e(me)});var he=R(pe,2),ge=e=>{var t=Qy();xi(t,21,()=>B(u),_i,(e,t)=>{var n=Zy(),r=L(n);z(()=>G(r,`· ${B(t)??``}`)),W(e,n)}),O(t),W(e,t)};K(he,e=>{B(u).length>0&&e(ge)});var _e=R(he,2),ve=e=>{W(e,$y())},E=e=>{var t=db(),a=I(t),o=R(F(a),2),c=e=>{W(e,eb())},l=M(()=>Object.keys(B(h)).length===0),u=e=>{var t=U();J(I(t),()=>Uy,(e,t)=>{t(e,{children:(e,t)=>{var n=ab(),r=I(n);J(r,()=>Ly,(e,t)=>{t(e,{children:(e,t)=>{var n=U();J(I(n),()=>By,(e,t)=>{t(e,{children:(e,t)=>{var n=tb(),r=I(n);J(r,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`聊天键`))},$$slots:{default:!0}})});var i=R(r,2);J(i,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`唤醒`))},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`前缀`))},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`忽略前缀`))},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`主动`))},$$slots:{default:!0}})});var c=R(s,2);J(c,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`概率`))},$$slots:{default:!0}})});var l=R(c,2);J(l,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`收集`))},$$slots:{default:!0}})});var u=R(l,2);J(u,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`agent`))},$$slots:{default:!0}})});var d=R(u,2);J(d,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`模型`))},$$slots:{default:!0}})});var f=R(d,2);J(f,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`角色设定`))},$$slots:{default:!0}})}),J(R(f,2),()=>Py,(e,t)=>{t(e,{})}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(r,2),()=>Oy,(e,t)=>{t(e,{children:(e,t)=>{var n=U();xi(I(n),17,()=>Object.entries(B(h)),([e,t])=>e,(e,t)=>{var n=M(()=>_(B(t),2));let r=()=>B(n)[0],i=()=>B(n)[1];var a=U();J(I(a),()=>By,(e,t)=>{t(e,{children:(e,t)=>{var n=tb(),a=I(n);J(a,()=>jy,(e,t)=>{t(e,{class:`font-mono text-xs`,children:(e,t)=>{k();var n=H();z(()=>G(n,r())),W(e,n)},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>jy,(e,t)=>{t(e,{children:(e,t)=>{k();var n=H();z(e=>G(n,e),[()=>ie(i().wake)]),W(e,n)},$$slots:{default:!0}})});var c=R(o,2);J(c,()=>jy,(e,t)=>{t(e,{class:`text-xs`,children:(e,t)=>{k();var n=H();z(e=>G(n,e),[()=>ie(i()[`wake.prefixes`])]),W(e,n)},$$slots:{default:!0}})});var l=R(c,2);J(l,()=>jy,(e,t)=>{t(e,{class:`text-xs`,children:(e,t)=>{k();var n=H();z(e=>G(n,e),[()=>ie(i()[`wake.ignorePrefixes`])]),W(e,n)},$$slots:{default:!0}})});var u=R(l,2);J(u,()=>jy,(e,t)=>{t(e,{children:(e,t)=>{k();var n=H();z(()=>G(n,i()[`proactive.enabled`]===void 0?`默认`:i()[`proactive.enabled`]?`开`:`关`)),W(e,n)},$$slots:{default:!0}})});var d=R(u,2);J(d,()=>jy,(e,t)=>{t(e,{children:(e,t)=>{k();var n=H();z(e=>G(n,e),[()=>ie(i()[`proactive.startProbability`])]),W(e,n)},$$slots:{default:!0}})});var f=R(d,2);J(f,()=>jy,(e,t)=>{t(e,{class:`text-xs`,children:(e,t)=>{k();var n=H();z(e=>G(n,e),[()=>ae(i())]),W(e,n)},$$slots:{default:!0}})});var p=R(f,2);J(p,()=>jy,(e,t)=>{t(e,{class:`text-xs`,children:(e,t)=>{k();var n=H();z(e=>G(n,e),[()=>ie(i().agent)]),W(e,n)},$$slots:{default:!0}})});var m=R(p,2);J(m,()=>jy,(e,t)=>{t(e,{class:`text-xs`,children:(e,t)=>{k();var n=H();z(e=>G(n,e),[()=>ie(v(i().model))]),W(e,n)},$$slots:{default:!0}})});var h=R(m,2);J(h,()=>jy,(e,t)=>{t(e,{class:`text-xs`,children:(e,t)=>{k();var n=H();z(e=>G(n,e),[()=>ie(i().soulPath??i().soulName)]),W(e,n)},$$slots:{default:!0}})}),J(R(h,2),()=>jy,(e,t)=>{t(e,{children:(e,t)=>{var n=ib(),i=F(n);$l(i,{variant:`ghost`,size:`sm`,onclick:()=>b(r()),children:(e,t)=>{var n=nb();La(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),$l(R(i,2),{variant:`ghost`,size:`sm`,get disabled(){return B(s)},onclick:()=>void ee(r()),children:(e,t)=>{var n=rb();Ga(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),O(n),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,a)}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,t)};K(o,e=>{B(l)?e(c):e(u,-1)}),O(a);var d=R(a,2),g=e=>{var t=ub(),a=F(t),o=L(a,!0),c=R(a,2),l=F(c);Av(l,{for:`chat-key`,class:`text-sm`,children:(e,t)=>{k(),W(e,H(`聊天键`))},$$slots:{default:!0}});var u=R(l,2);{let e=M(()=>B(f)!==``);nu(u,{id:`chat-key`,get value(){return B(p)},get disabled(){return B(e)},placeholder:`group:100 或 private:200`,oninput:e=>P(p,e.currentTarget.value,!0)})}var d=R(u,2),h=e=>{var t=ob(),n=L(t,!0);z(e=>G(n,e),[()=>re(`chats`)||re(`chats.${B(p).trim()}`)]),W(e,t)},g=M(()=>re(`chats`)||re(`chats.${B(p).trim()}`));K(d,e=>{B(g)&&e(h)}),O(c);var _=R(c,2);xi(_,21,()=>n,e=>e.path,(e,t)=>{var n=cb(),a=F(n);{let e=M(()=>`chat-${B(t).path}`);Av(a,{get for(){return B(e)},class:`text-sm`,children:(e,n)=>{k();var r=H();z(()=>G(r,B(t).label)),W(e,r)},$$slots:{default:!0}})}var o=R(a,2),s=e=>{var n=U(),a=I(n);{let e=M(()=>String(B(m)[B(t).path]??``)===``?i:String(B(m)[B(t).path]));J(a,()=>Ty,(n,a)=>{a(n,{type:`single`,get value(){return B(e)},onValueChange:e=>B(m)[B(t).path]=e===i?``:e??``,children:(e,n)=>{var a=ab(),o=I(a);{let e=M(()=>`chat-${B(t).path}`);J(o,()=>xy,(t,n)=>{n(t,{get id(){return B(e)},class:`w-full`,children:(e,t)=>{var n=U();J(I(n),()=>Cy,(e,t)=>{t(e,{placeholder:`跟随默认`})}),W(e,n)},$$slots:{default:!0}})})}J(R(o,2),()=>fy,(e,t)=>{t(e,{children:(e,t)=>{var n=ab(),a=I(n);J(a,()=>vy,(e,t)=>{t(e,{value:i,children:(e,t)=>{k(),W(e,H(`跟随默认`))},$$slots:{default:!0}})}),xi(R(a,2),16,()=>r,e=>e,(e,t)=>{var n=U();J(I(n),()=>vy,(e,n)=>{n(e,{get value(){return t},children:(e,n)=>{k();var r=H();z(()=>G(r,t)),W(e,r)},$$slots:{default:!0}})}),W(e,n)}),W(e,n)},$$slots:{default:!0}})}),W(e,a)},$$slots:{default:!0}})})}W(e,n)},c=e=>{{let n=M(()=>`chat-${B(t).path}`),r=M(()=>Jy(B(m)[B(t).path]));Ky(e,{get id(){return B(n)},get value(){return B(r)},placeholder:`输入前缀后回车`,onchange:e=>B(m)[B(t).path]=e})}},l=e=>{var n=U(),r=I(n);{let e=M(()=>String(B(m)[B(t).path]??``)===``?i:String(B(m)[B(t).path]));J(r,()=>Ty,(n,r)=>{r(n,{type:`single`,get value(){return B(e)},onValueChange:e=>B(m)[B(t).path]=e===i?``:e??``,children:(e,n)=>{var r=ab(),a=I(r);{let e=M(()=>`chat-${B(t).path}`);J(a,()=>xy,(t,n)=>{n(t,{get id(){return B(e)},class:`w-full`,children:(e,t)=>{var n=U();J(I(n),()=>Cy,(e,t)=>{t(e,{placeholder:`跟随默认`})}),W(e,n)},$$slots:{default:!0}})})}J(R(a,2),()=>fy,(e,t)=>{t(e,{children:(e,t)=>{var n=sb(),r=I(n);J(r,()=>vy,(e,t)=>{t(e,{value:i,children:(e,t)=>{k(),W(e,H(`跟随默认`))},$$slots:{default:!0}})});var a=R(r,2);J(a,()=>vy,(e,t)=>{t(e,{value:`true`,children:(e,t)=>{k(),W(e,H(`允许`))},$$slots:{default:!0}})}),J(R(a,2),()=>vy,(e,t)=>{t(e,{value:`false`,children:(e,t)=>{k(),W(e,H(`不允许`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})})}W(e,n)},u=e=>{{let n=M(()=>`chat-${B(t).path}`),r=M(()=>String(B(m)[B(t).path]??``));nu(e,{get id(){return B(n)},type:`number`,min:`0`,max:`1`,step:`0.05`,get value(){return B(r)},oninput:e=>B(m)[B(t).path]=e.currentTarget.value})}},d=e=>{{let n=M(()=>`chat-${B(t).path}`),r=M(()=>String(B(m)[B(t).path]??``));nu(e,{get id(){return B(n)},type:`number`,min:`0`,step:`100`,get value(){return B(r)},oninput:e=>B(m)[B(t).path]=e.currentTarget.value})}},f=M(()=>B(t).path.startsWith(`collect.`)),h=e=>{{let n=M(()=>`chat-${B(t).path}`),r=M(()=>String(B(m)[B(t).path]??``)),i=M(()=>y(`chats.${B(p).trim()}.${B(t).path}`)?`已隐藏,留空表示不修改`:`留空表示不覆盖`);nu(e,{get id(){return B(n)},type:`text`,get value(){return B(r)},get placeholder(){return B(i)},oninput:e=>B(m)[B(t).path]=e.currentTarget.value})}};K(o,e=>{B(t).path===`wake`?e(s):B(t).path===`wake.prefixes`||B(t).path===`wake.ignorePrefixes`?e(c,1):B(t).path===`proactive.enabled`?e(l,2):B(t).path===`proactive.startProbability`?e(u,3):B(f)?e(d,4):e(h,-1)});var g=R(o,2),_=L(g,!0),v=R(g,2),b=e=>{var n=ob(),r=L(n,!0);z(e=>G(r,e),[()=>re(`chats.${B(p).trim()}.${B(t).path}`)]),W(e,n)},x=M(()=>re(`chats.${B(p).trim()}.${B(t).path}`));K(v,e=>{B(x)&&e(b)}),O(n),z(()=>G(_,B(t).hint)),W(e,n)}),O(_);var v=R(_,2),b=F(v);$l(b,{size:`sm`,get disabled(){return B(s)},onclick:()=>void w(),children:(e,t)=>{var n=lb();Ua(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),$l(R(b,2),{variant:`ghost`,size:`sm`,onclick:S,children:(e,t)=>{k(),W(e,H(`取消`))},$$slots:{default:!0}}),O(v),O(t),z(()=>G(o,B(f)===``?`新增聊天覆盖`:`编辑 ${B(f)}`)),W(e,t)};K(d,e=>{B(f)!==void 0&&e(g)}),W(e,t)};K(_e,e=>{B(o)?e(ve):e(E,-1)}),O(oe),z(()=>G(le,B(a)?.path??`-`)),W(e,oe),j()}var mb=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`checked`,`size`]);function hb(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`checked`,15,!1),i=X(t,`size`,3,`default`),a=Y(t,mb);var o=U(),s=I(o);{let e=M(()=>Gl(`data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent shadow-xs focus-visible:ring-3 aria-invalid:ring-3 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:border-transparent data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50`,t.class));J(s,()=>ov,(t,o)=>{o(t,Ta({"data-slot":`switch`,get"data-size"(){return i()},get class(){return B(e)}},()=>a,{get ref(){return n()},set ref(e){n(e)},get checked(){return r()},set checked(e){r(e)},children:(e,t)=>{var n=U(),r=I(n);{let e=M(()=>Gl(`bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%_-_2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%_-_2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform`,`rtl:data-[state=checked]:translate-x-[calc(-100%)]`));J(r,()=>lv,(t,n)=>{n(t,{"data-slot":`switch-thumb`,get class(){return B(e)}})})}W(e,n)},$$slots:{default:!0}}))})}W(e,o),j()}var gb=V(`<!> 还原`,1),_b=V(`<!> 保存`,1),vb=V(`<p> </p>`),yb=V(`<p class="text-muted-foreground text-sm">正在读取配置…</p>`),bb=V(`<p class="text-muted-foreground text-sm">字段元数据加载失败。</p>`),xb=V(`<button type="button" class="text-muted-foreground hover:text-foreground ml-auto text-xs">还原</button>`),Sb=V(`<div class="flex h-9 items-center"><!></div>`),Cb=V(`<!> <!>`,1),wb=V(`<p class="text-muted-foreground text-xs"> </p>`),Tb=V(`<p class="text-destructive text-xs"> </p>`),Eb=V(`<div class="space-y-1.5"><div class="flex items-center gap-2"><!> <!> <!> <!></div> <!> <!> <!> <p class="text-muted-foreground font-mono text-[11px]"> </p></div>`),Db=V(`<section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold"> </h2> <div class="grid gap-4 md:grid-cols-2"></div></section>`),Ob=V(`<p class="text-muted-foreground text-sm">没有匹配的字段。</p>`),kb=V(`<!> <!> <!>`,1),Ab=V(`<div class="flex flex-col gap-4"><div class="flex flex-wrap items-center gap-2"><div class="relative"><!> <!></div> <span class="text-muted-foreground text-sm"><!></span> <div class="ml-auto flex items-center gap-2"><!> <!></div></div> <!> <!></div>`);function jb(e,t){A(t,!0);let n=N(void 0),r=N(ln([])),i=N(ln({})),a=N(ln({})),o=N(ln([])),s=N(ln({})),c=N(``),l=N(`ok`),u=N(!1),d=N(!0),f=N(``),p=N(``),m=N(ln({})),h,g=M(()=>new Map((B(n)?.fields??[]).map(e=>[e.path,e]))),_=M(()=>(B(n)?.groups??[]).map(e=>({...e,fields:(B(n)?.fields??[]).filter(t=>t.group===e.id&&(B(f).trim()===``||t.path.includes(B(f).trim())||t.label.includes(B(f).trim())||(t.description??``).includes(B(f).trim())))})));Ea(()=>{v()}),jn(()=>{let e=t.config;e&&e!==h&&(B(o).length>0||(h=e,y(e.fields)))});async function v(){P(d,!0);try{let[e,t]=await Promise.all([Ya.schema(),Ya.config()]);P(n,e,!0),y(t.fields);try{P(r,(await Ya.models()).models,!0)}catch(e){P(p,e instanceof Error?e.message:String(e),!0)}}catch(e){te(e)}finally{P(d,!1)}}function y(e){let t={},n={};for(let r of e){let e=B(g).get(r.path);e&&(t[r.path]=e.secret?``:r.value,e.secret&&(n[r.path]=r.hasValue===!0))}P(i,t,!0),P(a,{...t},!0),P(m,n,!0),P(o,[],!0),P(s,{},!0)}function b(e,t){B(i)[e.path]=t,delete B(s)[e.path],B(o).includes(e.path)||P(o,[...B(o),e.path],!0),P(c,``)}function x(e){B(i)[e]=B(a)[e],P(o,B(o).filter(t=>t!==e),!0),delete B(s)[e]}function S(){P(i,{...B(a)},!0),P(o,[],!0),P(s,{},!0),P(c,``)}function C(e){return B(o).includes(e)}function w(e,t){switch(e.type){case`number`:{if(t===``||t==null)return null;let e=typeof t==`number`?t:Number(t);return Number.isFinite(e)?e:null}case`numberList`:return Jy(t).map(e=>Number(e)).filter(e=>Number.isFinite(e));case`stringList`:case`enum`:return Array.isArray(t)?t:String(t??``);case`modelRef`:case`text`:case`path`:case`clock`:return typeof t==`string`&&t.trim()!==``?t.trim():null;case`secret`:return typeof t==`string`&&t!==``?t:void 0;default:return t}}async function ee(){if(B(o).length===0){P(c,`没有需要保存的改动`),P(l,`ok`);return}let e={};for(let t of B(o)){let n=B(g).get(t);if(!n)continue;let r=w(n,B(i)[t]);r!==void 0&&(e[t]=r)}if(Object.keys(e).length===0)P(c,`没有需要保存的改动`),P(l,`ok`);else{P(u,!0);try{let n=await Ya.save(e);y(n.fields),n.restartRequired.length>0?(P(c,`已保存;以下字段需要重启插件后生效:${n.restartRequired.join(`、`)}`),t.onrestart?.(n.restartRequired)):P(c,`已保存并立即生效`),P(l,`ok`)}catch(e){if(e instanceof qa){if(P(c,e.message,!0),e.fields.length>0){let t={...B(s)};for(let n of e.fields)t[n.path]=n.message;P(s,t,!0),P(c,e.fields.map(e=>e.message).join(`;`),!0)}}else P(c,e instanceof Error?e.message:String(e),!0);P(l,`error`)}finally{P(u,!1)}}}function te(e){P(c,e instanceof Error?e.message:String(e),!0),P(l,`error`)}function ne(e){if(e.type===`modelRef`){let t=B(r).map(e=>`${e.providerID}/${e.id}`),n=String(B(i)[e.path]??``);return n&&!t.includes(n)?[n,...t]:t}return e.options??[]}let re=`__empty__`;var ie=Ab(),ae=F(ie),oe=F(ae),se=F(oe);Wa(se,{class:`text-muted-foreground absolute top-2.5 left-2.5 size-4`}),nu(R(se,2),{class:`w-64 pl-8`,placeholder:`搜索字段名或说明`,get value(){return B(f)},set value(e){P(f,e,!0)}}),O(oe);var ce=R(oe,2),le=F(ce),ue=e=>{var t=H();z(()=>G(t,`${B(o).length??``} 项待保存`)),W(e,t)},T=e=>{W(e,H(`全部为已保存的值`))};K(le,e=>{B(o).length>0?e(ue):e(T,-1)}),O(ce);var de=R(ce,2),fe=F(de);{let e=M(()=>B(o).length===0);$l(fe,{variant:`ghost`,size:`sm`,get disabled(){return B(e)},onclick:S,children:(e,t)=>{var n=gb();Va(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}})}var pe=R(fe,2);{let e=M(()=>B(u)||B(o).length===0);$l(pe,{size:`sm`,get disabled(){return B(e)},onclick:()=>void ee().catch(te),children:(e,t)=>{var n=_b();Ua(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}})}O(de),O(ae);var me=R(ae,2),he=e=>{var t=vb(),n=L(t,!0);z(()=>{Ri(t,1,Mi(B(l)===`error`?`text-destructive text-sm`:`text-emerald-600 text-sm`)),G(n,B(c))}),W(e,t)};K(me,e=>{B(c)&&e(he)});var ge=R(me,2),_e=e=>{W(e,yb())},ve=e=>{W(e,bb())},E=e=>{var t=kb(),n=I(t);xi(n,17,()=>B(_),e=>e.id,(e,t)=>{var n=U(),r=I(n),a=e=>{var n=Db(),r=F(n),a=L(r,!0),o=R(r,2);xi(o,21,()=>B(t).fields,e=>e.path,(e,t)=>{var n=Eb(),r=F(n),a=F(r);{let e=M(()=>`field-${B(t).path}`);Av(a,{get for(){return B(e)},class:`text-sm`,children:(e,n)=>{k();var r=H();z(()=>G(r,B(t).label)),W(e,r)},$$slots:{default:!0}})}var o=R(a,2),c=e=>{Jl(e,{variant:`outline`,children:(e,t)=>{k(),W(e,H(`待保存`))},$$slots:{default:!0}})},l=M(()=>C(B(t).path));K(o,e=>{B(l)&&e(c)});var u=R(o,2),d=e=>{Jl(e,{variant:`secondary`,children:(e,t)=>{k(),W(e,H(`需重启`))},$$slots:{default:!0}})};K(u,e=>{B(t).hot||e(d)});var f=R(u,2),p=e=>{var n=xb();qr(`click`,n,()=>x(B(t).path)),W(e,n)},h=M(()=>C(B(t).path));K(f,e=>{B(h)&&e(p)}),O(r);var g=R(r,2),_=e=>{var n=Sb(),r=F(n);{let e=M(()=>`field-${B(t).path}`),n=M(()=>B(i)[B(t).path]===!0);hb(r,{get id(){return B(e)},get checked(){return B(n)},onCheckedChange:e=>b(B(t),e)})}O(n),W(e,n)},v=e=>{let n=M(()=>ne(B(t)));var r=U(),a=I(r);{let e=M(()=>String(B(i)[B(t).path]??``)||re);J(a,()=>Ty,(r,i)=>{i(r,{type:`single`,get value(){return B(e)},onValueChange:e=>b(B(t),e===re?``:e??``),children:(e,r)=>{var i=Cb(),a=I(i);{let e=M(()=>`field-${B(t).path}`);J(a,()=>xy,(t,n)=>{n(t,{get id(){return B(e)},class:`w-full`,children:(e,t)=>{var n=U();J(I(n),()=>Cy,(e,t)=>{t(e,{placeholder:`跟随默认`})}),W(e,n)},$$slots:{default:!0}})})}J(R(a,2),()=>fy,(e,t)=>{t(e,{children:(e,t)=>{var r=Cb(),i=I(r);J(i,()=>vy,(e,t)=>{t(e,{value:re,children:(e,t)=>{k(),W(e,H(`跟随默认`))},$$slots:{default:!0}})}),xi(R(i,2),16,()=>B(n),e=>e,(e,t)=>{var n=U();J(I(n),()=>vy,(e,n)=>{n(e,{get value(){return t},children:(e,n)=>{k();var r=H();z(()=>G(r,t)),W(e,r)},$$slots:{default:!0}})}),W(e,n)}),W(e,r)},$$slots:{default:!0}})}),W(e,i)},$$slots:{default:!0}})})}W(e,r)},y=e=>{{let n=M(()=>`field-${B(t).path}`),r=M(()=>String(B(i)[B(t).path]??``)),a=M(()=>B(m)[B(t).path]?`已设置;留空表示不修改`:`未设置;留空表示不修改`);nu(e,{get id(){return B(n)},type:`password`,get value(){return B(r)},get placeholder(){return B(a)},oninput:e=>b(B(t),e.currentTarget.value)})}},S=e=>{{let n=M(()=>`field-${B(t).path}`),r=M(()=>qy(B(i)[B(t).path])),a=M(()=>B(t).step??1);nu(e,{get id(){return B(n)},type:`number`,get value(){return B(r)},get min(){return B(t).min},get max(){return B(t).max},get step(){return B(a)},oninput:e=>{let n=e.currentTarget.value;b(B(t),n===``?``:Number(n))}})}},w=e=>{{let n=M(()=>Jy(B(i)[B(t).path])),r=M(()=>B(t).type===`numberList`),a=M(()=>B(t).type===`numberList`?`输入数字后回车`:`输入后回车`);Ky(e,{get value(){return B(n)},get numeric(){return B(r)},get placeholder(){return B(a)},onchange:e=>b(B(t),e)})}},ee=e=>{{let n=M(()=>`field-${B(t).path}`),r=M(()=>String(B(i)[B(t).path]??``));nu(e,{get id(){return B(n)},type:`time`,get value(){return B(r)},oninput:e=>b(B(t),e.currentTarget.value)})}},te=e=>{{let n=M(()=>`field-${B(t).path}`),r=M(()=>String(B(i)[B(t).path]??``)),a=M(()=>B(t).type===`path`?`留空使用默认路径`:`留空使用默认值`);nu(e,{get id(){return B(n)},type:`text`,get value(){return B(r)},get placeholder(){return B(a)},oninput:e=>b(B(t),e.currentTarget.value)})}};K(g,e=>{B(t).type===`boolean`?e(_):B(t).type===`enum`||B(t).type===`modelRef`?e(v,1):B(t).type===`secret`?e(y,2):B(t).type===`number`?e(S,3):B(t).type===`numberList`||B(t).type===`stringList`?e(w,4):B(t).type===`clock`?e(ee,5):e(te,-1)});var ie=R(g,2),ae=e=>{var n=wb(),r=L(n,!0);z(()=>G(r,B(t).description)),W(e,n)};K(ie,e=>{B(t).description&&e(ae)});var oe=R(ie,2),se=e=>{var n=Tb(),r=L(n,!0);z(()=>G(r,B(s)[B(t).path])),W(e,n)};K(oe,e=>{B(s)[B(t).path]&&e(se)});var ce=L(R(oe,2),!0);O(n),z(()=>G(ce,B(t).path)),W(e,n)}),O(o),O(n),z(()=>G(a,B(t).label)),W(e,n)};K(r,e=>{B(t).fields.length>0&&e(a)}),W(e,n)});var r=R(n,2),a=e=>{var t=wb(),n=L(t);z(()=>G(n,`模型列表读取失败:${B(p)??``}`)),W(e,t)};K(r,e=>{B(p)&&e(a)});var o=R(r,2),c=e=>{W(e,Ob())},l=M(()=>B(f).trim()&&B(_).every(e=>e.fields.length===0));K(o,e=>{B(l)&&e(c)}),W(e,t)};K(ge,e=>{B(d)?e(_e):B(n)?e(E,-1):e(ve,1)}),O(ie),W(e,ie),j()}Jr([`click`]);var Mb=new Intl.DateTimeFormat(`zh-CN`,{dateStyle:`short`,timeStyle:`medium`}),Nb=new Intl.DateTimeFormat(`zh-CN`,{timeStyle:`medium`}),Pb=new Intl.NumberFormat(`zh-CN`);function Fb(e){return e===void 0||!Number.isFinite(e)?`-`:Mb.format(e)}function Ib(e){return e===void 0||!Number.isFinite(e)?`-`:Nb.format(e)}function Lb(e){if(e===void 0||!Number.isFinite(e)||e<0)return`-`;let t=Math.floor(e/1e3);if(t<60)return`${t} 秒`;let n=Math.floor(t/60);if(n<60)return`${n} 分 ${t%60} 秒`;let r=Math.floor(n/60);return r<24?`${r} 小时 ${n%60} 分`:`${Math.floor(r/24)} 天 ${r%24} 小时`}function Rb(e){return e===void 0||!Number.isFinite(e)?`-`:Pb.format(e)}function zb(e){return e==null?`不限`:Rb(e)}function Bb(e){if(e===void 0)return``;try{return JSON.stringify(e,null,2)}catch{return String(e)}}var Vb=V(`<option> </option>`),Hb=V(`<!> 继续`,1),Ub=V(`<!> 暂停`,1),Wb=V(`<!> 清空`,1),Gb=V(`<!> 重新读取`,1),Kb=V(`<p class="text-destructive text-sm"> </p>`),qb=V(`<span class="text-muted-foreground break-all"> </span>`),Jb=V(`<div class="hover:bg-muted flex gap-2 rounded px-1 py-0.5"><span class="text-muted-foreground shrink-0"> </span> <span> </span> <span class="break-all whitespace-pre-wrap"> </span> <!></div>`),Yb=V(`<p class="text-muted-foreground p-4 text-sm">没有日志。</p>`),Xb=V(`<div class="flex flex-col gap-3"><div class="flex flex-wrap items-center gap-2"><select class="border-input bg-transparent h-9 rounded-md border px-2 text-sm shadow-xs"><option>全部级别</option><!></select> <div class="relative"><!> <!></div> <span class="text-muted-foreground text-sm"> </span> <div class="ml-auto flex items-center gap-2"><!> <!> <!> <!></div></div> <!> <div class="bg-muted/40 h-[65vh] overflow-auto rounded-lg border p-2 font-mono text-xs"></div> <div class="text-muted-foreground flex items-center gap-2 text-xs"><!> <span></span></div></div>`);function Zb(e,t){A(t,!0);let n=X(t,`logs`,19,()=>[]),r=[`debug`,`info`,`warn`,`error`],i=2e3,a=N(ln([])),o=N(`all`),s=N(``),c=N(!0),l=N(!1),u=N(!1),d=N(``),f,p=new Set;function m(e){return`${e.time}|${e.level}|${e.message}`}function h(e){let t=[...B(a)];for(let n of e){let e=m(n);p.has(e)||(p.add(e),t.push(n))}if(t.length>i){let e=t.splice(0,t.length-i);for(let t of e)p.delete(m(t))}P(a,t,!0)}async function g(){P(u,!0),P(d,``);try{let e=await Ya.logs({limit:500});p=new Set,P(a,[],!0),h(e.entries)}catch(e){P(d,e instanceof Error?e.message:String(e),!0)}finally{P(u,!1)}}Ea(()=>{g()}),jn(()=>{let e=n();e.length===0||B(l)||h(e)}),jn(()=>{B(a).length,B(c)&&f&&(f.scrollTop=f.scrollHeight)});let _=M(()=>B(a).filter(e=>{if(B(o)!==`all`&&e.level!==B(o))return!1;let t=B(s).trim();return!t||e.message.includes(t)||Bb(e.meta).includes(t)}));function v(){P(a,[],!0),p=new Set}function y(e){switch(e){case`error`:return`text-destructive`;case`warn`:return`text-amber-600`;case`debug`:return`text-muted-foreground`;default:return`text-sky-600`}}var b=Xb(),x=F(b),S=F(x),C=F(S);C.value=C.__value=`all`,xi(R(C),16,()=>r,e=>e,(e,t)=>{var n=Vb(),r=L(n,!0),i={};z(()=>{G(r,t),i!==(i=t)&&(n.value=(n.__value=i)??``)}),W(e,n)}),O(S),Gi(S);var w=R(S,2),ee=F(w);Wa(ee,{class:`text-muted-foreground absolute top-2.5 left-2.5 size-4`}),nu(R(ee,2),{class:`w-56 pl-8`,placeholder:`搜索日志内容`,get value(){return B(s)},set value(e){P(s,e,!0)}}),O(w);var te=R(w,2),ne=L(te),re=R(te,2),ie=F(re);$l(ie,{variant:`ghost`,size:`sm`,onclick:()=>P(l,!B(l)),children:(e,t)=>{var n=U(),r=I(n),i=e=>{var t=Hb();Ra(I(t),{class:`size-4`}),k(),W(e,t)},a=e=>{var t=Ub();Ia(I(t),{class:`size-4`}),k(),W(e,t)};K(r,e=>{B(l)?e(i):e(a,-1)}),W(e,n)},$$slots:{default:!0}});var ae=R(ie,2);$l(ae,{variant:`ghost`,size:`sm`,onclick:()=>P(c,!B(c)),get"aria-pressed"(){return B(c)},children:(e,t)=>{k();var n=H();z(()=>G(n,B(c)?`自动滚动:开`:`自动滚动:关`)),W(e,n)},$$slots:{default:!0}});var oe=R(ae,2);$l(oe,{variant:`ghost`,size:`sm`,onclick:v,children:(e,t)=>{var n=Wb();Pa(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),$l(R(oe,2),{variant:`ghost`,size:`sm`,get disabled(){return B(u)},onclick:()=>void g(),children:(e,t)=>{var n=Gb();Ba(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),O(re),O(x);var se=R(x,2),ce=e=>{var t=Kb(),n=L(t,!0);z(()=>G(n,B(d))),W(e,t)};K(se,e=>{B(d)&&e(ce)});var le=R(se,2);xi(le,23,()=>B(_),(e,t)=>m(e)+t,(e,t)=>{var n=Jb(),r=F(n),i=L(r,!0),a=R(r,2),o=L(a,!0),s=R(a,2),c=L(s,!0),l=R(s,2),u=e=>{var n=qb(),r=L(n,!0);z(e=>G(r,e),[()=>Bb(B(t).meta)]),W(e,n)};K(l,e=>{B(t).meta.length>0&&e(u)}),O(n),z((e,n)=>{G(i,e),Ri(a,1,`${n??``} w-10 shrink-0 uppercase`),G(o,B(t).level),G(c,B(t).message)},[()=>Ib(Date.parse(B(t).time)),()=>y(B(t).level)]),W(e,n)},e=>{W(e,Yb())}),O(le),ga(le,e=>f=e,()=>f);var ue=R(le,2),T=F(ue);Jl(T,{variant:`outline`,children:(e,t)=>{k(),W(e,H(`环形缓冲`))},$$slots:{default:!0}});var de=R(T,2);de.textContent=`面板只保留最近 2000 条;完整日志在日志目录里。`,O(ue),O(b),z(()=>G(ne,`${B(_).length??``} / ${B(a).length??``} 条`)),Ki(S,()=>B(o),e=>P(o,e)),W(e,b),j()}var Qb=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),$b=V(`<div><!></div>`);function ex(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,Qb);var i=$b();sa(i,e=>({"data-slot":`card-content`,class:e,...r}),[()=>Gl(`flex flex-col gap-3 px-(--card-spacing)`,t.class)]),q(F(i),()=>t.children??f),O(i),ga(i,e=>n(e),()=>n()),W(e,i),j()}var tx=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),nx=V(`<p><!></p>`);function rx(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,tx);var i=nx();sa(i,e=>({"data-slot":`card-description`,class:e,...r}),[()=>Gl(`text-muted-foreground text-sm`,t.class)]),q(F(i),()=>t.children??f),O(i),ga(i,e=>n(e),()=>n()),W(e,i),j()}var ix=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),ax=V(`<div><!></div>`);function ox(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,ix);var i=ax();sa(i,e=>({"data-slot":`card-header`,class:e,...r}),[()=>Gl(`gap-1 rounded-t-xl px-(--card-spacing) [.border-b]:pb-(--card-spacing) group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]`,t.class)]),q(F(i),()=>t.children??f),O(i),ga(i,e=>n(e),()=>n()),W(e,i),j()}var sx=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),cx=V(`<div><!></div>`);function lx(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=Y(t,sx);var i=cx();sa(i,e=>({"data-slot":`card-title`,class:e,...r}),[()=>Gl(`text-base leading-normal font-medium group-data-[size=sm]/card:text-sm`,t.class)]),q(F(i),()=>t.children??f),O(i),ga(i,e=>n(e),()=>n()),W(e,i),j()}var ux=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`,`size`]),dx=V(`<div><!></div>`);function fx(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`size`,3,`default`),i=Y(t,ux);var a=dx();sa(a,e=>({"data-slot":`card`,"data-size":r(),class:e,...i}),[()=>Gl(`ring-foreground/10 bg-card text-card-foreground gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm shadow-xs ring-1 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col`,t.class)]),q(F(a),()=>t.children??f),O(a),ga(a,e=>n(e),()=>n()),W(e,a),j()}var px=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`max`,`value`]),mx=V(`<div data-slot="progress-indicator" class="bg-primary size-full flex-1 transition-all"></div>`);function hx(e,t){A(t,!0);let n=X(t,`ref`,15,null),r=X(t,`max`,3,100),i=Y(t,px);var a=U(),o=I(a);{let e=M(()=>Gl(`bg-muted h-1.5 rounded-full relative flex w-full items-center overflow-x-hidden`,t.class));J(o,()=>H_,(a,o)=>{o(a,Ta({"data-slot":`progress`,get class(){return B(e)},get value(){return t.value},get max(){return r()}},()=>i,{get ref(){return n()},set ref(e){n(e)},children:(e,n)=>{var i=mx();z(()=>Bi(i,`transform: translateX(-${100-100*(t.value??0)/(r()??1)}%)`)),W(e,i)},$$slots:{default:!0}}))})}W(e,a),j()}var gx=V(`<p class="text-muted-foreground p-4 text-sm">正在读取运行状态…</p>`),_x=V(`<!> <!>`,1),vx=V(`<div class="flex items-center gap-2"><span class="text-muted-foreground w-24">状态</span> <!></div> <div class="flex items-center gap-2"><span class="text-muted-foreground w-24">机器人</span> <span class="font-mono"> </span></div> <div class="flex items-center gap-2"><span class="text-muted-foreground w-24">重连次数</span> <span> </span></div> <div class="flex items-center gap-2"><span class="text-muted-foreground w-24">上次重连</span> <span> </span></div>`,1),yx=V(`<div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">版本</span> <span> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">已运行</span> <span> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">工作目录</span> <span class="font-mono break-all"> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">日志目录</span> <span class="font-mono break-all"> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">agent</span> <span class="font-mono"> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">模型</span> <span class="font-mono"> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24 shrink-0">面板</span> <span class="font-mono"> </span></div>`,1),bx=V(`<p class="text-muted-foreground text-sm">还没有任何会话。</p>`),xx=V(`<!> <!> <!> <!> <!> <!>`,1),Sx=V(`<p class="text-muted-foreground text-sm">限流模块未启用或还没有记录。</p>`),Cx=V(`<div class="space-y-1"><div class="flex items-center justify-between text-xs"><span class="font-mono"> </span> <span class="text-muted-foreground"> </span></div> <!> <div class="text-muted-foreground flex justify-between text-[11px]"><span> </span> <span> </span></div></div>`),wx=V(`<div class="flex gap-2"><span class="text-muted-foreground w-24">状态</span> <!></div> <div class="flex gap-2"><span class="text-muted-foreground w-24">生成时间</span> <span class="font-mono"> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24">下次生成</span> <span> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24">下次轮询</span> <span> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24">上次轮询</span> <span> </span></div> <div class="flex gap-2"><span class="text-muted-foreground w-24">上次结果</span> <span> </span></div>`,1),Tx=V(`<span class="text-muted-foreground">-</span>`),Ex=V(`<div class="flex items-center justify-between rounded border px-2 py-1"><span class="font-mono text-xs"> </span> <!></div>`),Dx=V(`<div class="grid gap-1 sm:grid-cols-2"></div>`),Ox=V(`<p class="text-muted-foreground text-xs">没有按聊天的策略覆盖。</p>`),kx=V(`<div class="flex flex-wrap items-center gap-2"><span class="text-muted-foreground">默认配置档</span> <!> <span class="text-muted-foreground ml-4">可用配置档</span> <!></div> <!>`,1),Ax=V(`<div class="grid gap-4 lg:grid-cols-2"><!> <!> <!> <!> <!> <!></div> <p class="text-muted-foreground mt-2 text-xs"> </p>`,1);function jx(e,t){A(t,!0);function n(e,t){return t<=0?0:Math.min(100,Math.round(e/t*100))}var r=U(),i=I(r),a=e=>{W(e,gx())},o=e=>{var r=Ax(),i=I(r),a=F(i);J(a,()=>fx,(e,n)=>{n(e,{children:(e,n)=>{var r=_x(),i=I(r);J(i,()=>ox,(e,t)=>{t(e,{children:(e,t)=>{var n=_x(),r=I(n);J(r,()=>lx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`连接`))},$$slots:{default:!0}})}),J(R(r,2),()=>rx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`NapCat / NapLink WebSocket`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>ex,(e,n)=>{n(e,{class:`space-y-2 text-sm`,children:(e,n)=>{var r=vx(),i=I(r),a=R(F(i),2);{let e=M(()=>t.status.connection.connected?`default`:`destructive`);Jl(a,{get variant(){return B(e)},children:(e,n)=>{k();var r=H();z(()=>G(r,t.status.connection.connected?`已连接`:`未连接`)),W(e,r)},$$slots:{default:!0}})}O(i);var o=R(i,2),s=L(R(F(o),2),!0);O(o);var c=R(o,2),l=L(R(F(c),2),!0);O(c);var u=R(c,2),d=L(R(F(u),2),!0);O(u),z((e,n)=>{G(s,t.status.connection.selfId??`-`),G(l,e),G(d,n)},[()=>Rb(t.status.connection.reconnects),()=>Fb(t.status.connection.lastReconnectAt)]),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>fx,(e,n)=>{n(e,{children:(e,n)=>{var r=_x(),i=I(r);J(i,()=>ox,(e,t)=>{t(e,{children:(e,t)=>{var n=_x(),r=I(n);J(r,()=>lx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`运行时`))},$$slots:{default:!0}})}),J(R(r,2),()=>rx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`工作目录、模型与面板`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>ex,(e,n)=>{n(e,{class:`space-y-2 text-sm`,children:(e,n)=>{var r=yx(),i=I(r),a=L(R(F(i),2));O(i);var o=R(i,2),s=L(R(F(o),2),!0);O(o);var c=R(o,2),l=L(R(F(c),2),!0);O(c);var u=R(c,2),d=L(R(F(u),2),!0);O(u);var f=R(u,2),p=L(R(F(f),2),!0);O(f);var m=R(f,2),h=L(R(F(m),2),!0);O(m);var g=R(m,2),_=L(R(F(g),2));O(g),z(e=>{G(a,`v${t.status.version??``}`),G(s,e),G(l,t.status.runtime.home),G(d,t.status.runtime.logDir),G(p,t.status.runtime.agent??`-`),G(h,t.status.runtime.model??`跟随默认`),G(_,`${t.status.runtime.panel.enabled?`已启用`:`已关闭`}
7
+ · ${t.status.runtime.panel.host??``}:${t.status.runtime.panel.port??``}`)},[()=>Lb(t.status.uptimeMs)]),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>fx,(e,n)=>{n(e,{class:`lg:col-span-2`,children:(e,n)=>{var r=_x(),i=I(r);J(i,()=>ox,(e,t)=>{t(e,{children:(e,t)=>{var n=_x(),r=I(n);J(r,()=>lx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`会话`))},$$slots:{default:!0}})}),J(R(r,2),()=>rx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`每个聊天目标的上游会话与消息缓存`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>ex,(e,n)=>{n(e,{children:(e,n)=>{var r=U(),i=I(r),a=e=>{W(e,bx())},o=e=>{var n=U();J(I(n),()=>Uy,(e,n)=>{n(e,{children:(e,n)=>{var r=_x(),i=I(r);J(i,()=>Ly,(e,t)=>{t(e,{children:(e,t)=>{var n=U();J(I(n),()=>By,(e,t)=>{t(e,{children:(e,t)=>{var n=xx(),r=I(n);J(r,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`目标`))},$$slots:{default:!0}})});var i=R(r,2);J(i,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`会话`))},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`状态`))},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`缓存`))},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`唤醒`))},$$slots:{default:!0}})}),J(R(s,2),()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`主动`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>Oy,(e,n)=>{n(e,{children:(e,n)=>{var r=U();xi(I(r),17,()=>t.status.sessions,e=>e.target,(e,t)=>{var n=U();J(I(n),()=>By,(e,n)=>{n(e,{children:(e,n)=>{var r=xx(),i=I(r);J(i,()=>jy,(e,n)=>{n(e,{class:`font-mono`,children:(e,n)=>{k();var r=H();z(()=>G(r,B(t).target)),W(e,r)},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>jy,(e,n)=>{n(e,{class:`font-mono text-xs`,children:(e,n)=>{k();var r=H();z(()=>G(r,B(t).sessionID??`-`)),W(e,r)},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>jy,(e,n)=>{n(e,{children:(e,n)=>{var r=U(),i=I(r),a=e=>{Jl(e,{children:(e,t)=>{k(),W(e,H(`处理中`))},$$slots:{default:!0}})},o=e=>{Jl(e,{variant:`secondary`,children:(e,t)=>{k(),W(e,H(`等待重试`))},$$slots:{default:!0}})},s=e=>{Jl(e,{variant:`outline`,children:(e,t)=>{k(),W(e,H(`空闲`))},$$slots:{default:!0}})};K(i,e=>{B(t).busy?e(a):B(t).pending?e(o,1):e(s,-1)}),W(e,r)},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>jy,(e,n)=>{n(e,{children:(e,n)=>{k();var r=H();z(e=>G(r,e),[()=>Rb(B(t).buffered)]),W(e,r)},$$slots:{default:!0}})});var c=R(s,2);J(c,()=>jy,(e,n)=>{n(e,{children:(e,n)=>{k();var r=H();z(()=>G(r,B(t).wake??`默认`)),W(e,r)},$$slots:{default:!0}})}),J(R(c,2),()=>jy,(e,n)=>{n(e,{children:(e,n)=>{k();var r=H();z(()=>G(r,B(t).proactive===void 0?`默认`:B(t).proactive?`开`:`关`)),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),W(e,n)}),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),W(e,n)};K(i,e=>{t.status.sessions.length===0?e(a):e(o,-1)}),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})});var c=R(s,2);J(c,()=>fx,(e,r)=>{r(e,{children:(e,r)=>{var i=_x(),a=I(i);J(a,()=>ox,(e,t)=>{t(e,{children:(e,t)=>{var n=_x(),r=I(n);J(r,()=>lx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`出站限流`))},$$slots:{default:!0}})}),J(R(r,2),()=>rx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`按聊天目标统计的分钟与小时用量`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(a,2),()=>ex,(e,r)=>{r(e,{class:`space-y-3`,children:(e,r)=>{var i=U(),a=I(i),o=e=>{W(e,Sx())},s=e=>{var r=U();xi(I(r),17,()=>t.status.rateLimit,e=>e.scope,(e,t)=>{var r=Cx(),i=F(r),a=F(i),o=L(a,!0),s=L(R(a,2));O(i);var c=R(i,2);{let e=M(()=>n(B(t).usedPerMinute,B(t).maxPerMinute));hx(c,{get value(){return B(e)}})}var l=R(c,2),u=F(l),d=L(u),f=L(R(u,2));O(l),O(r),z((e,n,r,i,a,c)=>{G(o,B(t).scope),G(s,`${e??``}/${n??``} 每分钟 ·
8
+ ${r??``}/${i??``} 每小时`),G(d,`分钟剩余 ${a??``}`),G(f,`小时剩余 ${c??``}`)},[()=>Rb(B(t).usedPerMinute),()=>zb(B(t).maxPerMinute),()=>Rb(B(t).usedPerHour),()=>zb(B(t).maxPerHour),()=>zb(B(t).minuteLeft),()=>zb(B(t).hourLeft)]),W(e,r)}),W(e,r)};K(a,e=>{t.status.rateLimit.length===0?e(o):e(s,-1)}),W(e,i)},$$slots:{default:!0}})}),W(e,i)},$$slots:{default:!0}})});var l=R(c,2);J(l,()=>fx,(e,n)=>{n(e,{children:(e,n)=>{var r=_x(),i=I(r);J(i,()=>ox,(e,t)=>{t(e,{children:(e,t)=>{var n=_x(),r=I(n);J(r,()=>lx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`日记调度`))},$$slots:{default:!0}})}),J(R(r,2),()=>rx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`日记的生成时间与结果`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>ex,(e,n)=>{n(e,{class:`space-y-2 text-sm`,children:(e,n)=>{var r=wx(),i=I(r),a=R(F(i),2);{let e=M(()=>t.status.diary.enabled?`default`:`outline`);Jl(a,{get variant(){return B(e)},children:(e,n)=>{k();var r=H();z(()=>G(r,t.status.diary.enabled?`已启用`:`已关闭`)),W(e,r)},$$slots:{default:!0}})}O(i);var o=R(i,2),s=L(R(F(o),2),!0);O(o);var c=R(o,2),l=L(R(F(c),2),!0);O(c);var u=R(c,2),d=L(R(F(u),2),!0);O(u);var f=R(u,2),p=L(R(F(f),2),!0);O(f);var m=R(f,2),h=L(R(F(m),2),!0);O(m),z((e,n,r)=>{G(s,t.status.diary.summaryTime),G(l,e),G(d,n),G(p,r),G(h,t.status.diary.lastResult??`-`)},[()=>Fb(t.status.diary.nextSummaryAt),()=>Fb(t.status.diary.nextRunAt),()=>Fb(t.status.diary.lastRunAt)]),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),J(R(l,2),()=>fx,(e,n)=>{n(e,{class:`lg:col-span-2`,children:(e,n)=>{var r=_x(),i=I(r);J(i,()=>ox,(e,t)=>{t(e,{children:(e,t)=>{var n=_x(),r=I(n);J(r,()=>lx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`工具策略`))},$$slots:{default:!0}})}),J(R(r,2),()=>rx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`默认配置档与按聊天的覆盖`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>ex,(e,n)=>{n(e,{class:`space-y-3 text-sm`,children:(e,n)=>{var r=kx(),i=I(r),a=R(F(i),2);Jl(a,{variant:`secondary`,children:(e,n)=>{k();var r=H();z(()=>G(r,t.status.policy.defaultProfile)),W(e,r)},$$slots:{default:!0}}),xi(R(a,4),16,()=>t.status.policy.profiles,e=>e,(e,t)=>{Jl(e,{variant:`outline`,children:(e,n)=>{k();var r=H();z(()=>G(r,t)),W(e,r)},$$slots:{default:!0}})},e=>{W(e,Tx())}),O(i);var o=R(i,2),s=e=>{var n=Dx();xi(n,21,()=>Object.entries(t.status.policy.chats),([e,t])=>e,(e,t)=>{var n=M(()=>_(B(t),2));let r=()=>B(n)[0],i=()=>B(n)[1];var a=Ex(),o=F(a),s=L(o,!0);Jl(R(o,2),{variant:`outline`,children:(e,t)=>{k();var n=H();z(()=>G(n,i())),W(e,n)},$$slots:{default:!0}}),O(a),z(()=>G(s,r())),W(e,a)}),O(n),W(e,n)},c=M(()=>Object.keys(t.status.policy.chats).length>0),l=e=>{W(e,Ox())};K(o,e=>{B(c)?e(s):e(l,-1)}),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),O(i);var u=L(R(i,2));z((e,t)=>G(u,`启动于 ${e??``} · 快照时间 ${t??``}`),[()=>Ib(t.status.startedAt),()=>Ib(Date.now())]),W(e,r)};K(i,e=>{t.status?e(o,-1):e(a)}),W(e,r),j()}var Mx=V(`<!> 新增配置档`,1),Nx=V(`<p> </p>`),Px=V(`<li> </li>`),Fx=V(`<ul class="text-muted-foreground space-y-1 text-xs"></ul>`),Ix=V(`<p class="text-muted-foreground text-sm">正在读取工具配置…</p>`),Lx=V(`<!> <!>`,1),Rx=V(`<p class="text-destructive text-xs"> </p>`),zx=V(`<p class="text-muted-foreground text-sm">还没有任何配置档。</p>`),Bx=V(`<!> <!> <!> <!>`,1),Vx=V(` <!>`,1),Hx=V(`<!> 编辑`,1),Ux=V(`<!> 删除`,1),Wx=V(`<div class="flex items-center gap-1"><!> <!></div>`),Gx=V(`<!> 保存`,1),Kx=V(`<section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold"> </h2> <div class="space-y-1.5"><!> <!> <!></div> <div class="grid gap-4 md:grid-cols-2"><div class="space-y-1.5"><!> <!> <p class="text-muted-foreground text-xs">命中的工具才可用;写 <code>*</code> 表示全部。</p> <!></div> <div class="space-y-1.5"><!> <!> <p class="text-muted-foreground text-xs">deny 优先于 allow。</p> <!></div></div> <div class="flex items-center gap-2"><!> <!></div></section>`),qx=V(`<!> 新增映射`,1),Jx=V(`<p class="text-muted-foreground text-sm">没有按聊天的映射,全部用默认配置档。</p>`),Yx=V(`<!> <!> <!>`,1),Xx=V(`<section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold"> </h2> <div class="grid gap-4 md:grid-cols-2"><div class="space-y-1.5"><!> <!> <p class="text-muted-foreground text-xs">只能是 group:群号 或 private:账号。</p> <!></div> <div class="space-y-1.5"><!> <!> <!></div></div> <div class="flex items-center gap-2"><!> <!></div></section>`),Zx=V(`<section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold">默认配置档</h2> <div class="flex flex-wrap items-center gap-2"><!> <span class="text-muted-foreground text-xs">没有按聊天指定的配置档时用这一档;「跟随默认」表示用内置默认档。</span></div> <!></section> <section class="space-y-3 rounded-lg border p-4"><h2 class="text-sm font-semibold">配置档</h2> <!></section> <!> <section class="space-y-3 rounded-lg border p-4"><div class="flex items-center gap-2"><h2 class="text-sm font-semibold">聊天映射</h2> <!></div> <!></section> <!>`,1),Qx=V(`<div class="flex flex-col gap-4"><div class="flex flex-wrap items-center gap-2"><span class="text-muted-foreground font-mono text-xs"> </span> <!> <div class="ml-auto flex items-center gap-2"><!> <!></div></div> <!> <!> <!></div>`);function $x(e,t){A(t,!0);let n=N(void 0),r=N(!0),i=N(!1),a=N(``),o=N(`ok`),s=N(ln([])),c=N(ln({})),l=N(void 0),u=N(``),d=N(ln([])),f=N(ln([])),p=N(void 0),m=N(``),h=N(``),g=M(()=>B(n)?.value??void 0),v=M(()=>B(n)?.fileValue?.profiles??{}),y=M(()=>B(n)?.fileValue?.defaultProfile??``),b=M(()=>Object.keys(B(g)?.profiles??{})),x=`__empty__`;Ea(()=>{S()});async function S(){P(r,!0);try{P(n,await Ya.toolProfiles(),!0),P(s,B(n).warnings??[],!0),P(a,``),P(o,`ok`)}catch(e){T(e)}finally{P(r,!1)}}function C(e){return(B(n)?.masked??[]).includes(e)}function w(e){return!Object.hasOwn(B(v),e)}function ee(e){let t=B(g)?.profiles?.[e];P(l,e,!0),P(u,e,!0),P(d,Jy(t?.allow),!0),P(f,Jy(t?.deny),!0),C(`profiles.${e}.allow`)&&P(d,[],!0),C(`profiles.${e}.deny`)&&P(f,[],!0),P(c,{},!0),P(a,``)}function te(){P(l,``),P(u,``),P(d,[],!0),P(f,[],!0),P(c,{},!0),P(a,``)}function ne(){P(l,void 0),P(c,{},!0)}async function re(){let e=B(u).trim();if(e===``){P(c,{name:`请填写配置档名字`},!0),P(o,`error`),P(a,`配置档名字不能为空`);return}let r=B(l)===``;if(r&&Object.hasOwn(B(g)?.profiles??{},e)){P(c,{name:`这个配置档已经存在,点「编辑」来改`},!0),P(o,`error`),P(a,`这个配置档已经存在,点「编辑」来改`);return}let p={};if(C(`profiles.${e}.allow`)&&B(d).length===0||(!r||B(d).length>0)&&(p.allow=B(d)),C(`profiles.${e}.deny`)&&B(f).length===0||(!r||B(f).length>0)&&(p.deny=B(f)),Object.keys(p).length===0)P(c,{name:`至少填写一个工具名再保存`},!0),P(o,`error`),P(a,`至少填写一个工具名再保存`);else{P(i,!0);try{let r=await Ya.saveToolProfiles({profiles:{[e]:p}});P(n,r.document,!0),P(s,r.warnings??[],!0),P(l,void 0),P(c,{},!0),P(o,`ok`),P(a,r.restartRequired?r.note:`已保存。${r.note}`,!0),r.restartRequired&&t.onrestart?.([`tool-profiles:${e}`])}catch(e){T(e)}finally{P(i,!1)}}}async function ie(e){let t={profiles:{[e]:null}},r={},u=[];for(let[t,n]of Object.entries(B(g)?.chats??{}))n===e&&(r[t]=null,u.push(t));Object.keys(r).length>0&&(t.chats=r);let d=!1;B(y)===e&&(t.defaultProfile=null,d=!0),P(i,!0);try{let r=await Ya.saveToolProfiles(t);P(n,r.document,!0),P(s,r.warnings??[],!0),P(c,{},!0),P(o,`ok`);let i=[];u.length>0&&i.push(`已解掉聊天映射 ${u.join(`、`)}`),d&&i.push(`已把默认配置档改回内置默认`),P(a,[`已删除配置档 ${e}。`,...i,r.note].join(` `),!0),B(l)===e&&P(l,void 0)}catch(e){T(e)}finally{P(i,!1)}}async function ae(e){P(i,!0);try{let r=await Ya.saveToolProfiles({defaultProfile:e});P(n,r.document,!0),P(s,r.warnings??[],!0),P(c,{},!0),P(o,`ok`),P(a,r.restartRequired?r.note:`已保存。${r.note}`,!0),r.restartRequired&&t.onrestart?.([`tool-profiles:defaultProfile`])}catch(e){T(e)}finally{P(i,!1)}}function oe(e){P(p,e,!0),P(m,e,!0),P(h,B(g)?.chats?.[e]??``,!0),P(c,{},!0),P(a,``)}function se(){P(p,``),P(m,``),P(h,B(b)[0]??``,!0),P(c,{},!0),P(a,``)}function ce(){P(p,void 0),P(c,{},!0)}async function le(){let e=B(m).trim();if(e===``)P(c,{mappingKey:`请填写聊天键`},!0),P(o,`error`),P(a,`聊天键不能为空`);else if(B(h)===``)P(c,{mappingProfile:`请选择配置档`},!0),P(o,`error`),P(a,`聊天映射要指向一个配置档`);else{P(i,!0);try{let r=await Ya.saveToolProfiles({chats:{[e]:B(h)}});P(n,r.document,!0),P(s,r.warnings??[],!0),P(p,void 0),P(c,{},!0),P(o,`ok`),P(a,r.restartRequired?r.note:`已保存。${r.note}`,!0),r.restartRequired&&t.onrestart?.([`tool-profiles:chats.${e}`])}catch(e){T(e)}finally{P(i,!1)}}}async function ue(e){P(i,!0);try{let t=await Ya.saveToolProfiles({chats:{[e]:null}});P(n,t.document,!0),P(s,t.warnings??[],!0),P(c,{},!0),P(o,`ok`),P(a,`已删除 ${e} 的映射。${t.note}`),B(p)===e&&P(p,void 0)}catch(e){T(e)}finally{P(i,!1)}}function T(e){if(P(o,`error`),e instanceof qa){if(e.fields.length>0){let t={};for(let n of e.fields)t[n.path]=n.message;P(c,t,!0),P(a,e.fields.map(e=>e.message).join(`;`),!0)}else P(a,e.message,!0)}else P(a,e instanceof Error?e.message:String(e),!0)}function de(e){return B(c)[e]??``}var fe=Qx(),pe=F(fe),me=F(pe),he=L(me,!0),ge=R(me,2),_e=e=>{Jl(e,{variant:`outline`,children:(e,t)=>{k(),W(e,H(`文件不存在,保存后新建`))},$$slots:{default:!0}})};K(ge,e=>{B(n)&&!B(n).exists&&e(_e)});var ve=R(ge,2),E=F(ve);$l(E,{variant:`ghost`,size:`sm`,onclick:()=>void S(),children:(e,t)=>{k(),W(e,H(`重新读取`))},$$slots:{default:!0}}),$l(R(E,2),{size:`sm`,onclick:te,children:(e,t)=>{var n=Mx();za(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),O(ve),O(pe);var ye=R(pe,2),be=e=>{var t=Nx(),n=L(t,!0);z(()=>{Ri(t,1,Mi(B(o)===`error`?`text-destructive text-sm`:`text-emerald-600 text-sm`)),G(n,B(a))}),W(e,t)};K(ye,e=>{B(a)&&e(be)});var xe=R(ye,2),Se=e=>{var t=Fx();xi(t,21,()=>B(s),_i,(e,t)=>{var n=Px(),r=L(n);z(()=>G(r,`· ${B(t)??``}`)),W(e,n)}),O(t),W(e,t)};K(xe,e=>{B(s).length>0&&e(Se)});var Ce=R(xe,2),we=e=>{W(e,Ix())},Te=e=>{var t=Zx(),n=I(t),r=R(F(n),2),a=F(r);{let e=M(()=>B(y)===``?x:B(y));J(a,()=>Ty,(t,n)=>{n(t,{type:`single`,get value(){return B(e)},onValueChange:e=>{e===x?ae(null):e&&ae(e)},children:(e,t)=>{var n=Lx(),r=I(n);J(r,()=>xy,(e,t)=>{t(e,{class:`w-64`,children:(e,t)=>{var n=U();J(I(n),()=>Cy,(e,t)=>{t(e,{placeholder:`选择默认配置档`})}),W(e,n)},$$slots:{default:!0}})}),J(R(r,2),()=>fy,(e,t)=>{t(e,{children:(e,t)=>{var n=Lx(),r=I(n);J(r,()=>vy,(e,t)=>{t(e,{value:x,children:(e,t)=>{k(),W(e,H(`跟随默认`))},$$slots:{default:!0}})}),xi(R(r,2),16,()=>B(b),e=>e,(e,t)=>{var n=U();J(I(n),()=>vy,(e,n)=>{n(e,{get value(){return t},children:(e,n)=>{k();var r=H();z(()=>G(r,t)),W(e,r)},$$slots:{default:!0}})}),W(e,n)}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})})}k(2),O(r);var o=R(r,2),s=e=>{var t=Rx(),n=L(t,!0);z(e=>G(n,e),[()=>de(`defaultProfile`)]),W(e,t)},c=M(()=>de(`defaultProfile`));K(o,e=>{B(c)&&e(s)}),O(n);var v=R(n,2),S=R(F(v),2),te=e=>{W(e,zx())},T=e=>{var t=U();J(I(t),()=>Uy,(e,t)=>{t(e,{children:(e,t)=>{var n=Lx(),r=I(n);J(r,()=>Ly,(e,t)=>{t(e,{children:(e,t)=>{var n=U();J(I(n),()=>By,(e,t)=>{t(e,{children:(e,t)=>{var n=Bx(),r=I(n);J(r,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`档名`))},$$slots:{default:!0}})});var i=R(r,2);J(i,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`allow`))},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`deny`))},$$slots:{default:!0}})}),J(R(a,2),()=>Py,(e,t)=>{t(e,{})}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(r,2),()=>Oy,(e,t)=>{t(e,{children:(e,t)=>{var n=U();xi(I(n),16,()=>B(b),e=>e,(e,t)=>{var n=U();J(I(n),()=>By,(e,n)=>{n(e,{children:(e,n)=>{var r=Bx(),a=I(r);J(a,()=>jy,(e,n)=>{n(e,{class:`font-mono text-xs`,children:(e,n)=>{k();var r=Vx(),i=I(r),a=R(i),o=e=>{Jl(e,{variant:`secondary`,class:`ml-1`,children:(e,t)=>{k(),W(e,H(`内置`))},$$slots:{default:!0}})},s=M(()=>w(t));K(a,e=>{B(s)&&e(o)}),z(()=>G(i,`${t??``} `)),W(e,r)},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>jy,(e,n)=>{n(e,{class:`text-xs`,children:(e,n)=>{k();var r=H();z(e=>G(r,e),[()=>C(`profiles.${t}.allow`)?`已隐藏`:(B(g)?.profiles?.[t]?.allow??[]).join(` / `)||`-`]),W(e,r)},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>jy,(e,n)=>{n(e,{class:`text-xs`,children:(e,n)=>{k();var r=H();z(e=>G(r,e),[()=>C(`profiles.${t}.deny`)?`已隐藏`:(B(g)?.profiles?.[t]?.deny??[]).join(` / `)||`-`]),W(e,r)},$$slots:{default:!0}})}),J(R(s,2),()=>jy,(e,n)=>{n(e,{children:(e,n)=>{var r=Wx(),a=F(r);$l(a,{variant:`ghost`,size:`sm`,onclick:()=>ee(t),children:(e,t)=>{var n=Hx();La(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}});var o=R(a,2);{let e=M(()=>B(i)||w(t));$l(o,{variant:`ghost`,size:`sm`,get disabled(){return B(e)},onclick:()=>void ie(t),children:(e,t)=>{var n=Ux();Ga(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}})}O(r),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),W(e,n)}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,t)};K(S,e=>{B(b).length===0?e(te):e(T,-1)}),O(v);var fe=R(v,2),pe=e=>{var t=Kx(),n=F(t),r=L(n,!0),a=R(n,2),o=F(a);Av(o,{for:`profile-name`,class:`text-sm`,children:(e,t)=>{k(),W(e,H(`档名`))},$$slots:{default:!0}});var s=R(o,2);{let e=M(()=>B(l)!==``);nu(s,{id:`profile-name`,get value(){return B(u)},get disabled(){return B(e)},placeholder:`例如 readonly`,oninput:e=>P(u,e.currentTarget.value,!0)})}var c=R(s,2),p=e=>{var t=Rx(),n=L(t,!0);z(e=>G(n,e),[()=>de(`profiles`)||de(`profiles.${B(u).trim()}`)]),W(e,t)},m=M(()=>de(`profiles`)||de(`profiles.${B(u).trim()}`));K(c,e=>{B(m)&&e(p)}),O(a);var h=R(a,2),g=F(h),_=F(g);Av(_,{for:`profile-allow`,class:`text-sm`,children:(e,t)=>{k(),W(e,H(`allow`))},$$slots:{default:!0}});var v=R(_,2);Ky(v,{id:`profile-allow`,get value(){return B(d)},placeholder:`工具名或通配符,输入后回车`,onchange:e=>P(d,e,!0)});var y=R(v,4),b=e=>{var t=Rx(),n=L(t,!0);z(e=>G(n,e),[()=>de(`profiles.${B(u).trim()}.allow`)]),W(e,t)},x=M(()=>de(`profiles.${B(u).trim()}.allow`));K(y,e=>{B(x)&&e(b)}),O(g);var S=R(g,2),C=F(S);Av(C,{for:`profile-deny`,class:`text-sm`,children:(e,t)=>{k(),W(e,H(`deny`))},$$slots:{default:!0}});var w=R(C,2);Ky(w,{id:`profile-deny`,get value(){return B(f)},placeholder:`工具名或通配符,输入后回车`,onchange:e=>P(f,e,!0)});var ee=R(w,4),te=e=>{var t=Rx(),n=L(t,!0);z(e=>G(n,e),[()=>de(`profiles.${B(u).trim()}.deny`)]),W(e,t)},ie=M(()=>de(`profiles.${B(u).trim()}.deny`));K(ee,e=>{B(ie)&&e(te)}),O(S),O(h);var ae=R(h,2),oe=F(ae);$l(oe,{size:`sm`,get disabled(){return B(i)},onclick:()=>void re(),children:(e,t)=>{var n=Gx();Ua(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),$l(R(oe,2),{variant:`ghost`,size:`sm`,onclick:ne,children:(e,t)=>{k(),W(e,H(`取消`))},$$slots:{default:!0}}),O(ae),O(t),z(()=>G(r,B(l)===``?`新增配置档`:`编辑配置档 ${B(l)}`)),W(e,t)};K(fe,e=>{B(l)!==void 0&&e(pe)});var me=R(fe,2),he=F(me);$l(R(F(he),2),{variant:`ghost`,size:`sm`,class:`ml-auto`,onclick:se,children:(e,t)=>{var n=qx();za(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),O(he);var ge=R(he,2),_e=e=>{W(e,Jx())},ve=M(()=>Object.keys(B(g)?.chats??{}).length===0),E=e=>{var t=U();J(I(t),()=>Uy,(e,t)=>{t(e,{children:(e,t)=>{var n=Lx(),r=I(n);J(r,()=>Ly,(e,t)=>{t(e,{children:(e,t)=>{var n=U();J(I(n),()=>By,(e,t)=>{t(e,{children:(e,t)=>{var n=Yx(),r=I(n);J(r,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`聊天键`))},$$slots:{default:!0}})});var i=R(r,2);J(i,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`配置档`))},$$slots:{default:!0}})}),J(R(i,2),()=>Py,(e,t)=>{t(e,{})}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(r,2),()=>Oy,(e,t)=>{t(e,{children:(e,t)=>{var n=U();xi(I(n),17,()=>Object.entries(B(g)?.chats??{}),([e,t])=>e,(e,t)=>{var n=M(()=>_(B(t),2));let r=()=>B(n)[0],a=()=>B(n)[1];var o=U();J(I(o),()=>By,(e,t)=>{t(e,{children:(e,t)=>{var n=Yx(),o=I(n);J(o,()=>jy,(e,t)=>{t(e,{class:`font-mono text-xs`,children:(e,t)=>{k();var n=H();z(()=>G(n,r())),W(e,n)},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>jy,(e,t)=>{t(e,{children:(e,t)=>{Jl(e,{variant:`outline`,children:(e,t)=>{k();var n=H();z(()=>G(n,a())),W(e,n)},$$slots:{default:!0}})},$$slots:{default:!0}})}),J(R(s,2),()=>jy,(e,t)=>{t(e,{children:(e,t)=>{var n=Wx(),a=F(n);$l(a,{variant:`ghost`,size:`sm`,onclick:()=>oe(r()),children:(e,t)=>{var n=Hx();La(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),$l(R(a,2),{variant:`ghost`,size:`sm`,get disabled(){return B(i)},onclick:()=>void ue(r()),children:(e,t)=>{var n=Ux();Ga(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),O(n),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,o)}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,t)};K(ge,e=>{B(ve)?e(_e):e(E,-1)}),O(me);var ye=R(me,2),be=e=>{var t=Xx(),n=F(t),r=L(n,!0),a=R(n,2),o=F(a),s=F(o);Av(s,{for:`mapping-key`,class:`text-sm`,children:(e,t)=>{k(),W(e,H(`聊天键`))},$$slots:{default:!0}});var c=R(s,2);{let e=M(()=>B(p)!==``);nu(c,{id:`mapping-key`,get value(){return B(m)},get disabled(){return B(e)},placeholder:`group:100 或 private:200`,oninput:e=>P(m,e.currentTarget.value,!0)})}var l=R(c,4),u=e=>{var t=Rx(),n=L(t,!0);z(e=>G(n,e),[()=>de(`chats`)||de(`chats.${B(m).trim()}`)]),W(e,t)},d=M(()=>de(`chats`)||de(`chats.${B(m).trim()}`));K(l,e=>{B(d)&&e(u)}),O(o);var f=R(o,2),g=F(f);Av(g,{for:`mapping-profile`,class:`text-sm`,children:(e,t)=>{k(),W(e,H(`配置档`))},$$slots:{default:!0}});var _=R(g,2);J(_,()=>Ty,(e,t)=>{t(e,{type:`single`,get value(){return B(h)},onValueChange:e=>P(h,e??``,!0),children:(e,t)=>{var n=Lx(),r=I(n);J(r,()=>xy,(e,t)=>{t(e,{id:`mapping-profile`,class:`w-full`,children:(e,t)=>{var n=U();J(I(n),()=>Cy,(e,t)=>{t(e,{placeholder:`选择配置档`})}),W(e,n)},$$slots:{default:!0}})}),J(R(r,2),()=>fy,(e,t)=>{t(e,{children:(e,t)=>{var n=U();xi(I(n),16,()=>B(b),e=>e,(e,t)=>{var n=U();J(I(n),()=>vy,(e,n)=>{n(e,{get value(){return t},children:(e,n)=>{k();var r=H();z(()=>G(r,t)),W(e,r)},$$slots:{default:!0}})}),W(e,n)}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})});var v=R(_,2),y=e=>{var t=Rx(),n=L(t,!0);z(e=>G(n,e),[()=>de(`chats.${B(m).trim()}`)]),W(e,t)},x=M(()=>de(`chats.${B(m).trim()}`));K(v,e=>{B(x)&&e(y)}),O(f),O(a);var S=R(a,2),C=F(S);$l(C,{size:`sm`,get disabled(){return B(i)},onclick:()=>void le(),children:(e,t)=>{var n=Gx();Ua(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),$l(R(C,2),{variant:`ghost`,size:`sm`,onclick:ce,children:(e,t)=>{k(),W(e,H(`取消`))},$$slots:{default:!0}}),O(S),O(t),z(()=>G(r,B(p)===``?`新增聊天映射`:`编辑映射 ${B(p)}`)),W(e,t)};K(ye,e=>{B(p)!==void 0&&e(be)}),W(e,t)};K(Ce,e=>{B(r)?e(we):e(Te,-1)}),O(fe),z(()=>G(he,B(n)?.path??`-`)),W(e,fe),j()}var eS=V(`<p class="text-muted-foreground p-4 text-sm">正在读取追踪数据…</p>`),tS=V(`<!> <!>`,1),nS=V(`<p class="text-muted-foreground text-sm">还没有追踪节点。</p>`),rS=V(`<!> <!> <!> <!> <!>`,1),iS=V(`<details><summary class="text-muted-foreground cursor-pointer text-xs"> </summary> <pre class="bg-muted mt-1 overflow-auto rounded p-2 text-[11px]"> </pre></details>`),aS=V(`<span class="text-muted-foreground text-xs">-</span>`);function oS(e,t){A(t,!0);let n=M(()=>[...t.status?.traces??[]].reverse());var r=U(),i=I(r),a=e=>{W(e,eS())},o=e=>{var t=U();J(I(t),()=>fx,(e,t)=>{t(e,{children:(e,t)=>{var r=tS(),i=I(r);J(i,()=>ox,(e,t)=>{t(e,{children:(e,t)=>{var r=tS(),i=I(r);J(i,()=>lx,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`调用追踪`))},$$slots:{default:!0}})}),J(R(i,2),()=>rx,(e,t)=>{t(e,{children:(e,t)=>{k();var r=H();z(()=>G(r,`最近 ${B(n).length??``} 个节点;完整调用链在 trace 目录里,这里只展示运行中的摘要。`)),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),J(R(i,2),()=>ex,(e,t)=>{t(e,{children:(e,t)=>{var r=U(),i=I(r),a=e=>{W(e,nS())},o=e=>{var t=U();J(I(t),()=>Uy,(e,t)=>{t(e,{children:(e,t)=>{var r=tS(),i=I(r);J(i,()=>Ly,(e,t)=>{t(e,{children:(e,t)=>{var n=U();J(I(n),()=>By,(e,t)=>{t(e,{children:(e,t)=>{var n=rS(),r=I(n);J(r,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`时间`))},$$slots:{default:!0}})});var i=R(r,2);J(i,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`节点`))},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`目标`))},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`trace`))},$$slots:{default:!0}})}),J(R(o,2),()=>Py,(e,t)=>{t(e,{children:(e,t)=>{k(),W(e,H(`属性`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),J(R(i,2),()=>Oy,(e,t)=>{t(e,{children:(e,t)=>{var r=U();xi(I(r),17,()=>B(n),e=>e.spanId,(e,t)=>{var n=U();J(I(n),()=>By,(e,n)=>{n(e,{children:(e,n)=>{var r=rS(),i=I(r);J(i,()=>jy,(e,n)=>{n(e,{class:`whitespace-nowrap font-mono text-xs`,children:(e,n)=>{k();var r=H();z(e=>G(r,e),[()=>Ib(B(t).at)]),W(e,r)},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>jy,(e,n)=>{n(e,{children:(e,n)=>{Jl(e,{variant:`outline`,children:(e,n)=>{k();var r=H();z(()=>G(r,B(t).name)),W(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>jy,(e,n)=>{n(e,{class:`font-mono text-xs`,children:(e,n)=>{k();var r=H();z(()=>G(r,B(t).target??`-`)),W(e,r)},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>jy,(e,n)=>{n(e,{class:`font-mono text-xs`,children:(e,n)=>{k();var r=H();z(e=>G(r,e),[()=>B(t).traceId.slice(0,8)]),W(e,r)},$$slots:{default:!0}})}),J(R(s,2),()=>jy,(e,n)=>{n(e,{class:`max-w-72`,children:(e,n)=>{var r=U(),i=I(r),a=e=>{var n=iS(),r=F(n),i=L(r),a=L(R(r,2),!0);O(n),z((e,t)=>{G(i,`${e??``} 项`),G(a,t)},[()=>Object.keys(B(t).attributes).length,()=>Bb(B(t).attributes)]),W(e,n)},o=M(()=>B(t).attributes&&Object.keys(B(t).attributes).length>0),s=e=>{W(e,aS())};K(i,e=>{B(o)?e(a):e(s,-1)}),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),W(e,n)}),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),W(e,t)};K(i,e=>{B(n).length===0?e(a):e(o,-1)}),W(e,r)},$$slots:{default:!0}})}),W(e,r)},$$slots:{default:!0}})}),W(e,t)};K(i,e=>{t.status?e(o,-1):e(a)}),W(e,r),j()}var sS=V(`<!> `,1),cS=V(`<!> 刷新`,1),lS=V(`<!> <span class="text-muted-foreground text-sm"> </span> <div class="ml-auto flex items-center gap-2"><!> <!> <!></div>`,1),uS=V(`<p class="text-destructive text-sm"> </p>`),dS=V(`<!> 登录`,1),fS=V(`<div class="mx-auto mt-16 w-full max-w-sm space-y-3"><h2 class="text-base font-medium">需要访问令牌</h2> <p class="text-muted-foreground text-sm">令牌在 <code>config.json</code> 的 <code>panel.token</code> 里;没有配置时插件启动会生成一个并写回文件。</p> <!> <!> <!> <!></div>`),pS=V(`<!> <!> <!> <!> <!> <!>`,1),mS=V(`<!> <!> <!> <!> <!> <!> <!>`,1),hS=V(`<span>·</span> <span> </span>`,1),gS=V(`<div class="mx-auto flex min-h-screen max-w-6xl flex-col gap-4 p-4"><header class="flex flex-wrap items-center gap-3"><h1 class="text-lg font-semibold">opencode-qq-bot 面板</h1> <!></header> <!> <!> <!> <footer class="text-muted-foreground mt-auto flex items-center gap-2 pt-4 text-xs"><!> <span> </span> <span>·</span> <span> </span> <!> <span>·</span> <span> </span></footer></div>`);function _S(e,t){A(t,!0);let n=N(``),r=N(!1),i=N(``),a=N(!1),o=N(`config`),s=N(void 0),c=N(ln([])),l=N(void 0),u,d=N(!1),f=N(!1),p=N(``);new Intl.DateTimeFormat(`zh-CN`,{timeStyle:`medium`});let m=new Intl.NumberFormat(`zh-CN`);Ea(()=>(h(),()=>u?.()));async function h(){try{P(s,await Ya.status(),!0),P(r,!0),P(i,``),g()}catch(e){if(e instanceof qa&&e.status===401){P(r,!1);return}P(i,e instanceof Error?e.message:String(e),!0)}}function g(){u?.(),u=Xa({status:e=>{P(s,e,!0)},log:e=>{P(c,[...B(c),e].slice(-500),!0)},config:e=>{P(l,e,!0)}})}async function _(){P(a,!0),P(i,``);try{await Ya.login(B(n)),P(p,B(n),!0),P(n,``),await h()}catch(e){P(i,e instanceof Error?e.message:String(e),!0)}finally{P(a,!1)}}function v(){P(d,!0)}async function y(){if(!B(f)){P(f,!0),P(i,``),u?.(),u=void 0;try{if(await Ya.restart(),!await b())return;P(d,!1)}catch(e){P(i,e instanceof qa&&e.status===501?`当前运行时不支持重启,请手动重启。`:e instanceof Error?e.message:String(e),!0)}finally{P(f,!1)}}}async function b(){for(let e=0;e<60;e+=1){await new Promise(e=>setTimeout(e,500));try{return P(s,await Ya.status(),!0),P(r,!0),P(c,[],!0),g(),!0}catch(e){if(e instanceof qa&&e.status===401){if(B(p)&&await x())continue;return P(r,!1),P(i,`插件已重启,请重新登录。`),!1}}}return P(i,`重启超时,请手动刷新页面。`),!1}async function x(){try{return await Ya.login(B(p)),!0}catch{return P(p,``),!1}}var S=gS(),C=F(S),w=R(F(C),2),ee=e=>{var t=lS(),n=I(t);{let e=M(()=>B(s).connection.connected?`default`:`destructive`);Jl(n,{get variant(){return B(e)},children:(e,t)=>{k();var n=H();z(()=>G(n,B(s).connection.connected?`已连接`:`未连接`)),W(e,n)},$$slots:{default:!0}})}var r=R(n,2),i=L(r),a=R(r,2),o=F(a),c=e=>{Jl(e,{variant:`outline`,children:(e,t)=>{k(),W(e,H(`有字段需要重启生效`))},$$slots:{default:!0}})};K(o,e=>{B(d)&&e(c)});var l=R(o,2);{let e=M(()=>B(d)?`default`:`outline`);$l(l,{get variant(){return B(e)},size:`sm`,get disabled(){return B(f)},onclick:()=>void y(),children:(e,t)=>{var n=sS(),r=I(n);{let e=M(()=>B(f)?`size-4 animate-spin`:`size-4`);Ha(r,{get class(){return B(e)}})}var i=R(r);z(()=>G(i,` ${B(f)?`正在重启…`:`重启插件`}`)),W(e,n)},$$slots:{default:!0}})}$l(R(l,2),{variant:`ghost`,size:`sm`,get disabled(){return B(f)},onclick:()=>void h(),children:(e,t)=>{var n=cS();Ba(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}}),O(a),z(e=>G(i,`v${B(s).version??``} · 运行 ${e??``} 秒`),[()=>Math.floor(B(s).uptimeMs/1e3)]),W(e,t)};K(w,e=>{B(s)&&e(ee)}),O(C);var te=R(C,2);Mv(te,{});var ne=R(te,2),re=e=>{var t=uS(),n=L(t,!0);z(()=>G(n,B(i))),W(e,t)};K(ne,e=>{B(r)&&B(i)&&e(re)});var ie=R(ne,2),ae=e=>{var t=fS(),r=R(F(t),4);Av(r,{for:`token`,children:(e,t)=>{k(),W(e,H(`令牌`))},$$slots:{default:!0}});var o=R(r,2);nu(o,{id:`token`,type:`password`,placeholder:`面板访问令牌`,onkeydown:e=>{e.key===`Enter`&&_()},get value(){return B(n)},set value(e){P(n,e,!0)}});var s=R(o,2),c=e=>{var t=uS(),n=L(t,!0);z(()=>G(n,B(i))),W(e,t)};K(s,e=>{B(i)&&e(c)});var l=R(s,2);{let e=M(()=>B(a)||!B(n));$l(l,{class:`w-full`,get disabled(){return B(e)},onclick:()=>void _(),children:(e,t)=>{var n=dS();Fa(I(n),{class:`size-4`}),k(),W(e,n)},$$slots:{default:!0}})}O(t),W(e,t)},oe=e=>{var t=U();J(I(t),()=>Rv,(e,t)=>{t(e,{class:`flex-1`,get value(){return B(o)},set value(e){P(o,e,!0)},children:(e,t)=>{var n=mS(),r=I(n);J(r,()=>Vv,(e,t)=>{t(e,{children:(e,t)=>{var n=pS(),r=I(n);J(r,()=>Iv,(e,t)=>{t(e,{value:`config`,children:(e,t)=>{k(),W(e,H(`配置`))},$$slots:{default:!0}})});var i=R(r,2);J(i,()=>Iv,(e,t)=>{t(e,{value:`chat-overrides`,children:(e,t)=>{k(),W(e,H(`会话覆盖`))},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>Iv,(e,t)=>{t(e,{value:`tool-profiles`,children:(e,t)=>{k(),W(e,H(`工具档案`))},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>Iv,(e,t)=>{t(e,{value:`status`,children:(e,t)=>{k(),W(e,H(`状态`))},$$slots:{default:!0}})});var s=R(o,2);J(s,()=>Iv,(e,t)=>{t(e,{value:`logs`,children:(e,t)=>{k(),W(e,H(`日志`))},$$slots:{default:!0}})}),J(R(s,2),()=>Iv,(e,t)=>{t(e,{value:`trace`,children:(e,t)=>{k(),W(e,H(`追踪`))},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})});var i=R(r,2);J(i,()=>Pv,(e,t)=>{t(e,{value:`config`,children:(e,t)=>{jb(e,{get config(){return B(l)},onrestart:v})},$$slots:{default:!0}})});var a=R(i,2);J(a,()=>Pv,(e,t)=>{t(e,{value:`chat-overrides`,children:(e,t)=>{pb(e,{onrestart:v})},$$slots:{default:!0}})});var o=R(a,2);J(o,()=>Pv,(e,t)=>{t(e,{value:`tool-profiles`,children:(e,t)=>{$x(e,{onrestart:v})},$$slots:{default:!0}})});var u=R(o,2);J(u,()=>Pv,(e,t)=>{t(e,{value:`status`,children:(e,t)=>{jx(e,{get status(){return B(s)}})},$$slots:{default:!0}})});var d=R(u,2);J(d,()=>Pv,(e,t)=>{t(e,{value:`logs`,children:(e,t)=>{Zb(e,{get logs(){return B(c)}})},$$slots:{default:!0}})}),J(R(d,2),()=>Pv,(e,t)=>{t(e,{value:`trace`,children:(e,t)=>{oS(e,{get status(){return B(s)}})},$$slots:{default:!0}})}),W(e,n)},$$slots:{default:!0}})}),W(e,t)};K(ie,e=>{B(r)?e(oe,-1):e(ae)});var se=R(ie,2),ce=F(se);Na(ce,{class:`size-3`});var le=R(ce,2),ue=L(le),T=R(le,4),de=L(T),fe=R(T,2),pe=e=>{var t=hS(),n=L(R(I(t),2));z(()=>G(n,`agent ${B(s).runtime.agent??``}`)),W(e,t)};K(fe,e=>{B(s)?.runtime.agent&&e(pe)});var me=L(R(fe,4));O(se),O(S),z(e=>{G(ue,`工作目录 ${B(s)?.runtime.home??`-`??``}`),G(de,`日志 ${B(s)?.runtime.logDir??`-`??``}`),G(me,`${e??``} 个会话`)},[()=>m.format(B(s)?.sessions.length??0)]),W(e,S),j()}var vS=document.getElementById(`app`);if(!vS)throw Error(`缺少 #app 挂载点`);li(_S,{target:vS});