@schlenkr/ragents 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/apps/server/src/provider.ts +8 -2
  2. package/apps/server/src/title-compactor.ts +1 -1
  3. package/apps/web/dist/assets/{highlighted-body-KPVGNVTW-CpPi6QLr.js → highlighted-body-KPVGNVTW-BslIwn_y.js} +1 -1
  4. package/apps/web/dist/assets/main-BUN8m8SW.js +11 -0
  5. package/apps/web/dist/assets/{mermaid-HWGCJPDP-q-mf1kLN.js → mermaid-HWGCJPDP-B1erZlFM.js} +4 -4
  6. package/apps/web/dist/assets/{runPanel-nk_aMxSn.js → runPanel-s8gGpr9M.js} +1 -1
  7. package/apps/web/dist/help/mini-app.css +9 -0
  8. package/apps/web/dist/host-web.json +7 -7
  9. package/apps/web/dist/index.html +2 -2
  10. package/apps/web/dist/run-panel.html +2 -2
  11. package/apps/web/src/App.tsx +12 -1
  12. package/apps/web/src/PluginRegistry.tsx +2 -2
  13. package/apps/web/src/SessionList.tsx +7 -6
  14. package/apps/web/src/SettingsModal.tsx +3 -3
  15. package/apps/web/src/actor-programs/client-ui/FilePicker.tsx +1 -1
  16. package/apps/web/src/api.ts +2 -0
  17. package/apps/web/src/run-overview.ts +1 -1
  18. package/apps/web/src/ui/relative-time.ts +1 -1
  19. package/bundles/ragents.documents/ragents-bundle.json +2 -2
  20. package/bundles/ragents.documents/web/classes.json +1 -1
  21. package/bundles/ragents.documents/web/index.js +1 -1
  22. package/bundles/ragents.documents/web/index.js.map +2 -2
  23. package/bundles/ragents.orchestration/ragents-bundle.json +2 -2
  24. package/bundles/ragents.orchestration/web/index.js +3 -3
  25. package/bundles/ragents.orchestration/web/index.js.map +2 -2
  26. package/bundles/ragents.overseer/ragents-bundle.json +4 -3
  27. package/bundles/ragents.overseer/web/classes.json +1 -1
  28. package/bundles/ragents.overseer/web/index.js +1 -1
  29. package/bundles/ragents.overseer/web/index.js.map +4 -4
  30. package/bundles/ragents.processes/ragents-bundle.json +2 -2
  31. package/bundles/ragents.processes/web/classes.json +1 -1
  32. package/bundles/ragents.processes/web/index.js +1 -1
  33. package/bundles/ragents.processes/web/index.js.map +2 -2
  34. package/bundles/ragents.workspace/ragents-bundle.json +2 -2
  35. package/bundles/ragents.workspace/web/classes.json +1 -1
  36. package/bundles/ragents.workspace/web/index.js +1 -1
  37. package/bundles/ragents.workspace/web/index.js.map +2 -2
  38. package/package.json +2 -2
  39. package/plugins/ragents.documents/web/DocumentViewer.tsx +2 -2
  40. package/plugins/ragents.orchestration/web/ExecutionsPanel.tsx +1 -1
  41. package/plugins/ragents.orchestration/web/FlowInspector.tsx +1 -1
  42. package/plugins/ragents.orchestration/web/JournalStatus.tsx +1 -1
  43. package/plugins/ragents.orchestration/web/format.ts +1 -1
  44. package/plugins/ragents.overseer/web/index.tsx +51 -3
  45. package/plugins/ragents.processes/web/processes.ts +1 -1
  46. package/plugins/ragents.workspace/web/FileBrowser.tsx +1 -1
  47. package/apps/web/dist/assets/main-DJmCHGzM.js +0 -11
@@ -237,7 +237,7 @@ Error generating stack: `+g.message+`
237
237
  *
238
238
  * This source code is licensed under the MIT license found in the
239
239
  * LICENSE file in the root directory of this source tree.
240
- */var c3;function sZ(){if(c3)return vT;c3=1;var e=Dm(),t=OP();function n(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,c=e.useMemo,u=e.useDebugValue;return vT.useSyncExternalStoreWithSelector=function(d,p,h,y,b){var v=a(null);if(v.current===null){var T={hasValue:!1,value:null};v.current=T}else T=v.current;v=c(function(){function w(N){if(!k){if(k=!0,C=N,N=y(N),b!==void 0&&T.hasValue){var I=T.value;if(b(I,N))return R=I}return R=N}if(I=R,r(C,N))return I;var L=y(N);return b!==void 0&&b(I,L)?(C=N,I):(C=N,R=L)}var k=!1,C,R,O=h===void 0?null:h;return[function(){return w(p())},O===null?void 0:function(){return w(O())}]},[p,h,y,b]);var A=i(d,v[0],v[1]);return o(function(){T.hasValue=!0,T.value=A},[A]),u(A),A},vT}var u3;function oZ(){return u3||(u3=1,xT.exports=sZ()),xT.exports}var lZ=oZ();const D2=[];let L2;function cZ(){return L2}function uZ(e){D2.push(e)}function Gm(e){const t=(n,r)=>{const i=Ai(dZ).current;let a;try{L2=i;for(const o of D2)o.before(i);a=e(n,r);for(const o of D2)o.after(i);i.didInitialize=!0}finally{L2=void 0}return a};return t.displayName=e.displayName||e.name,t}function ly(e){return x.forwardRef(Gm(e))}function dZ(){return{didInitialize:!1}}const fZ=yS(19),pZ=fZ?mZ:gZ;function IP(e,t,n,r,i){return pZ(e,t,n,r,i)}function hZ(e,t,n,r,i){const a=x.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return qS.useSyncExternalStore(e.subscribe,a,a)}uZ({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const i of e.syncHooks)n.add(i.store);const r=[];for(const i of n)r.push(i.subscribe(t));return()=>{for(const i of r)i()}}),qS.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function mZ(e,t,n,r,i){const a=cZ();if(!a)return hZ(e,t,n,r,i);const o=a.syncIndex;a.syncIndex+=1;let c;return a.didInitialize?(c=a.syncHooks[o],(c.store!==e||c.selector!==t||!Object.is(c.a1,n)||!Object.is(c.a2,r)||!Object.is(c.a3,i))&&(c.store!==e&&(a.didChangeStore=!0),c.store=e,c.selector=t,c.a1=n,c.a2=r,c.a3=i,c.value=t(e.getSnapshot(),n,r,i))):(c={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(c)),c.value}function gZ(e,t,n,r,i){return lZ.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a=>t(a,n,r,i))}class bZ{constructor(t){pt(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));pt(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}static create(t){return new this(t)}setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,i){return IP(this,t,n,r,i)}}class Qf extends bZ{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){x.useDebugValue(t);const r=this;lt(()=>{r.state[t]!==n&&r.set(t,n)},[r,t,n])}useSyncedValueWithCleanup(t,n){const r=this;lt(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);lt(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){x.useDebugValue(t);const r=this,i=n!==void 0;lt(()=>{i&&!Object.is(r.state[t],n)&&r.setState({...r.state,[t]:n})},[r,t,n,i])}select(t,n,r,i){const a=this.selectors[t];return a(this.state,n,r,i)}useState(t,n,r,i){return x.useDebugValue(t),IP(this,this.selectors[t],n,r,i)}useContextCallback(t,n){x.useDebugValue(t);const r=mt(n??xr);this.context[t]=r}useStateSetter(t){const n=x.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let i=r(this.state);return n(i,i,this),this.subscribe(a=>{const o=r(a);if(!Object.is(i,o)){const c=i;i=o,n(o,c,this)}})}}const yZ={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class VS extends Qf{constructor(n){const{syncOnly:r,nested:i,onOpenChange:a,triggerElements:o,...c}=n;super({...c,positionReference:c.referenceElement,domReferenceElement:c.referenceElement},{onOpenChange:a,dataRef:{current:{}},events:yP(),nested:i,triggerElements:o},yZ);pt(this,"syncOpenEvent",(n,r)=>{(!n||!this.state.open||r!=null&&PX(r))&&(this.context.dataRef.current.openEvent=n?r:void 0)});pt(this,"dispatchOpenChange",(n,r)=>{this.syncOpenEvent(n,r.event);const i={open:n,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",i)});pt(this,"setOpen",(n,r)=>{var i,a,o,c;if(this.syncOnly){(a=(i=this.context).onOpenChange)==null||a.call(i,n,r);return}this.dispatchOpenChange(n,r),(c=(o=this.context).onOpenChange)==null||c.call(o,n,r)});this.syncOnly=r}}function MP(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,c=t.useState("open"),u=t.useState("activeTriggerElement"),d=t.useState(n?"popupElement":"positionerElement"),p=t.context.triggerElements,h=o,y=x.useRef(null);r===void 0&&y.current===null&&(y.current=new VS({open:c,transitionStatus:void 0,referenceElement:u,floatingElement:d,triggerElements:p,onOpenChange:h,floatingId:i,syncOnly:!0,nested:a}));const b=r??y.current;return t.useSyncedValue("floatingId",i),lt(()=>{const v={open:c,floatingId:i,referenceElement:u,floatingElement:d};xn(u)&&(v.domReferenceElement=u),b.state.positionReference===b.state.referenceElement&&(v.positionReference=u),b.update(v)},[c,i,u,d,b]),b.context.onOpenChange=h,b.context.nested=a,b}const Km={tabIndex:-1,[C2]:""};function DP(e){return t=>t==="touch"?e.current:!0}function GS(e,t=!1){const n=td(),r=Gc()!=null,i=Ai(()=>e(n,r)).current;return MP({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function cy({handle:e,store:t}){return lt(()=>e.attachStore(t),[e,t]),null}function d3(e){const t=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==t&&e.set("triggerCount",t)}function LP(e,t){const n=x.useRef(null);return mt(r=>{const i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;const a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),d3(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),d3(t))})}function uy(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);const a=(n==null?void 0:n.id)??null;let o=e.activeTriggerId,c=e.activeTriggerElement;return(a||t)&&(o=a,c=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:c}}function KS(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function xZ(e,t,n,r={}){var p,h,y;const i=n.reason,a=i===ei,o=t&&i===_f,c=!t&&(i===wl||i===$m),u=KS(n);if((h=(p=e.context).onOpenChange)==null||h.call(p,t,n),n.isCanceled)return;(y=r.onBeforeDispatch)==null||y.call(r),e.state.floatingRootContext.dispatchOpenChange(t,n);const d=()=>{const b=uy(e.state,t,n.trigger,u()),v={...r.extraState,...b};o?v.instantType="focus":c?v.instantType="dismiss":a&&(v.instantType=void 0),e.update(v)};a?fi.flushSync(d):d()}function dy(e,t,n,r){const i=n.useState("isMountedByTrigger",e),a=LP(e,n),o=mt(u=>{const d=n.select("open"),p=n.select("activeTriggerId");if(p===e){const h={activeTriggerElement:u,...d?r:null};n.update(h);return}if(p==null&&d){const h={activeTriggerId:e??null,activeTriggerElement:u,...r};n.update(h)}}),c=mt(u=>{a(u),u&&o(u)});return lt(()=>(c(t.current),()=>c(null)),[c,t,n,e]),lt(()=>{if(i){const u={activeTriggerElement:t.current,...r};n.update(u)}},[i,n,t,...Object.values(r)]),{registerTrigger:c,isMountedByThisTrigger:i}}function fy(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=x.useRef(null),i=e.useState("open"),a=e.useState("triggerCount"),o=e.useState("activeTriggerId"),c=e.useState("activeTriggerElement");lt(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0);return}const u=e.context.triggerElements.size,d={};e.state.triggerCount!==u&&(d.triggerCount=u);const p=e.select("activeTriggerId");let h=null;if(p){const y=e.context.triggerElements.getById(p);if(y)r.current=p,y!==e.state.activeTriggerElement&&(d.activeTriggerElement=y);else{for(const[b,v]of e.context.triggerElements.entries())if(v===e.state.activeTriggerElement){d.activeTriggerId=b,d.activeTriggerElement=v,r.current=b;break}d.activeTriggerId===void 0&&(r.current===p?h=p:r.current=null)}}else r.current=null;if(!h&&!p&&u===1){const y=e.context.triggerElements.entries().next();if(!y.done){const[b,v]=y.value;d.activeTriggerId=b,d.activeTriggerElement=v,r.current=b}}(d.triggerCount!==void 0||d.activeTriggerId!==void 0||d.activeTriggerElement!==void 0)&&e.update(d),h&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===h&&!e.context.triggerElements.getById(h)){const y=jt(es);e.setOpen(!1,y),y.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,a,o,c,n])}function py(e,t,n,r){const{mounted:i,setMounted:a,transitionStatus:o}=Rl(e,!1,!1,r),c=t.useState("preventUnmountingOnClose"),u=e?!1:c;t.useSyncedValues({mounted:i,transitionStatus:o,preventUnmountingOnClose:u});const d=mt(()=>{var p,h;a(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n==null||n(),(h=(p=t.context).onOpenChangeComplete)==null||h.call(p,!1)});return $a({enabled:i&&!e&&!u,open:e,ref:t.context.popupRef,onComplete(){e||d()}}),{forceUnmount:d,transitionStatus:o}}function hy(e,t){e.useSyncedValues(t),lt(()=>()=>{e.update({activeTriggerProps:tr,inactiveTriggerProps:tr,popupProps:tr})},[e])}function PP(e,t){lt(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),lt(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class Ym{constructor(){this.idMap=new Map}add(t,n){this.idMap.set(t,n)}delete(t){this.idMap.delete(t)}hasElement(t){for(const n of this.idMap.values())if(n===t)return!0;return!1}hasMatchingElement(t){for(const n of this.idMap.values())if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}function my(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new VS({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:tr,inactiveTriggerProps:tr,popupProps:tr}}const jh=e=>e.triggerIdProp??e.activeTriggerId,YS=e=>e.openProp??e.open,f3=e=>{var n;return(((n=e.popupElement)==null?void 0:n.id)??e.floatingId)||void 0};function jP(e,t){return t!==void 0&&YS(e)&&jh(e)===t}function vZ(e,t){return jP(e,t)?!0:t!==void 0&&YS(e)&&jh(e)==null&&e.triggerCount===1}const gy={open:YS,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:jh,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:f3,isTriggerActive:(e,t)=>t!==void 0&&jh(e)===t,isOpenedByTrigger:(e,t)=>jP(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&jh(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>vZ(e,t)?f3(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function by(e){const t=x.useCallback(r=>e===void 0?xr:e.subscribeStore(r),[e]),n=x.useCallback(()=>e===void 0?void 0:e.store,[e]);return qS.useSyncExternalStore(t,n,()=>e==null?void 0:e.serverStore)}function EZ(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=td(),a=Gc()!=null,o=Ai(()=>new VS({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Ym,floatingId:i,syncOnly:!1,nested:a})).current;return lt(()=>{const c={open:t,floatingId:i};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=xn(r.reference)?r.reference:null),r.floating!==void 0&&(c.floatingElement=r.floating),o.update(c)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function TZ(e){return wZ(e,e.rootContext)}function wZ(e,t){const{nodeId:n,externalTree:r}=e,i=t.useState("referenceElement"),a=t.useState("floatingElement"),o=t.useState("domReferenceElement"),c=t.useState("open"),u=t.useState("floatingId"),[d,p]=x.useState(null),[h,y]=x.useState(void 0),[b,v]=x.useState(void 0),T=x.useRef(null),A=Kc(r),w=x.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),k=JQ({...e,elements:{...w,...d&&{reference:d}}}),C=xn(h)?h:null,R=b===void 0?t.state.floatingElement:b;t.useSyncedValue("referenceElement",h??null),t.useSyncedValue("domReferenceElement",h===void 0?o:C),t.useSyncedValue("floatingElement",R);const O=x.useCallback(B=>{const U=xn(B)?{getBoundingClientRect:()=>B.getBoundingClientRect(),getClientRects:()=>B.getClientRects(),contextElement:B}:B;p(U),k.refs.setReference(U)},[k.refs]),N=x.useCallback(B=>{(xn(B)||B===null)&&(T.current=B,y(B)),(xn(k.refs.reference.current)||k.refs.reference.current===null||B!==null&&!xn(B))&&k.refs.setReference(B)},[k.refs,y]),I=x.useCallback(B=>{v(B),k.refs.setFloating(B)},[k.refs]),L=x.useMemo(()=>({...k.refs,setReference:N,setFloating:I,setPositionReference:O,domReference:T}),[k.refs,N,I,O]),j=x.useMemo(()=>({...k.elements,domReference:o}),[k.elements,o]),P=x.useMemo(()=>({...k,dataRef:t.context.dataRef,open:c,onOpenChange:t.setOpen,events:t.context.events,floatingId:u,refs:L,elements:j,nodeId:n,rootStore:t}),[k,L,j,n,t,c,u]);return lt(()=>{o&&(T.current=o)},[o]),lt(()=>{t.context.dataRef.current.floatingContext=P;const B=A==null?void 0:A.nodesRef.current.find(U=>U.id===n);B&&(B.context=P)}),x.useMemo(()=>({...k,context:P,refs:L,elements:j,rootStore:t}),[k,L,j,P,t])}const ET=NS&&Il;function $P(e,t={}){const{enabled:n=!0,delay:r}=t,i="rootStore"in e?e.rootStore:e,{events:a,dataRef:o}=i.context,c=x.useRef(!1),u=x.useRef(null),d=x.useRef(!0),p=xi();x.useEffect(()=>{const y=i.select("domReferenceElement");if(!n)return;const b=_r(y);function v(){const w=i.select("domReferenceElement");!i.select("open")&&lr(w)&&w===ta(yn(w))&&(c.current=!0,u.current=w)}function T(){d.current=!0}function A(){d.current=!1}return _o(cn(b,"blur",v),ET&&cn(b,"keydown",T,!0),ET&&cn(b,"pointerdown",A,!0))},[i,n]),x.useEffect(()=>{if(!n)return;function y(b){if(b.reason===wl||b.reason===$m){const v=i.select("domReferenceElement");xn(v)&&(u.current=v,c.current=!0)}}return a.on("openchange",y),()=>{a.off("openchange",y)}},[a,n,i]);const h=x.useMemo(()=>{function y(){c.current=!1,u.current=null}return{onMouseLeave(){y()},onFocus(b){const v=b.currentTarget;if(c.current){if(u.current===v)return;y()}const T=Gi(b.nativeEvent);if(xn(T)){if(ET&&!b.relatedTarget){if(!d.current&&!ry(T))return}else if(!BX(T))return}const A=Hb(b.relatedTarget,i.context.triggerElements),{nativeEvent:w,currentTarget:k}=b,C=typeof r=="function"?r():r;if(i.select("open")&&A||C===0||C===void 0){i.setOpen(!0,jt(_f,w,k));return}p.start(C,()=>{c.current||i.setOpen(!0,jt(_f,w,k))})},onBlur(b){y();const v=b.relatedTarget,T=b.nativeEvent,A=xn(v)&&v.hasAttribute(im("focus-guard"))&&v.getAttribute("data-type")==="outside";p.start(0,()=>{var R;const w=i.select("domReferenceElement"),k=ta(yn(w));!v&&k===w||Lt((R=o.current.floatingContext)==null?void 0:R.refs.floating.current,k)||Lt(w,k)||A||Hb(v??k,i.context.triggerElements)||i.setOpen(!1,jt(_f,T))})}}},[o,r,i,p]);return x.useMemo(()=>n?{reference:h,trigger:h}:{},[n,h])}class WS{constructor(){pt(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});pt(this,"disposeEffect",()=>this.dispose);this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Ns,this.restTimeout=new Ns,this.handleCloseOptions=void 0}static create(){return new WS}}const Yb=new WeakMap;function Wb(e){var n,r,i;if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Yb.get(t)===e&&((n=e.pointerEventsScopeElement)==null||n.style.removeProperty("pointer-events"),(r=e.pointerEventsReferenceElement)==null||r.style.removeProperty("pointer-events"),(i=e.pointerEventsFloatingElement)==null||i.style.removeProperty("pointer-events"),Yb.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function BP(e,t){const{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Yb.get(n);a&&a!==e&&Wb(a),Wb(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Yb.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",i.style.pointerEvents="auto"}function XS(e){const t=e.context.dataRef.current,n=Ai(()=>t.hoverInteractionState??WS.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),SS(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function QS(e,t={}){const{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a="rootStore"in e?e.rootStore:e,o=a.useState("open"),c=a.useState("floatingElement"),u=a.useState("domReferenceElement"),{dataRef:d}=a.context,p=Kc(),h=Gc(),y=XS(a),b=xi(),v=mt(()=>{var w;return Z4((w=d.current.openEvent)==null?void 0:w.type,y.interactedInside)}),T=mt(()=>{var w;return zX((w=d.current.openEvent)==null?void 0:w.type)}),A=mt(()=>{Wb(y)});lt(()=>{o||(y.pointerType=void 0,y.restTimeoutPending=!1,y.interactedInside=!1,A())},[o,y,A]),x.useEffect(()=>A,[A]),lt(()=>{var w,k,C,R,O;if(n&&o&&(w=y.handleCloseOptions)!=null&&w.blockPointerEvents&&T()&&xn(u)&&c){const N=u,I=c,L=yn(c),j=(C=(k=p==null?void 0:p.nodesRef.current.find(q=>q.id===h))==null?void 0:k.context)==null?void 0:C.elements.floating;j&&(j.style.pointerEvents="");const P=y.pointerEventsScopeElement!==I?y.pointerEventsScopeElement:null,B=j!==I?j:null,U=((O=(R=y.handleCloseOptions)==null?void 0:R.getScope)==null?void 0:O.call(R))??P??B??N.closest("[data-rootownerid]")??L.body;return BP(y,{scopeElement:U,referenceElement:N,floatingElement:I}),()=>{A()}}},[n,o,u,c,y,T,p,h,A]),x.useEffect(()=>{if(!n)return;function w(){return!!(p&&h&&Mc(p.nodesRef.current,h).length>0)}function k(L){const j=nd(r,"close",y.pointerType),P=()=>{a.setOpen(!1,jt(ei,L)),p==null||p.events.emit("floating.closed",L)};j?y.openChangeTimeout.start(j,P):(y.openChangeTimeout.clear(),P())}function C(L){const j=Gi(L);if(!$X(j)){y.interactedInside=!1;return}y.interactedInside=(j==null?void 0:j.closest("[aria-haspopup]"))!=null}function R(){y.openChangeTimeout.clear(),b.clear(),p==null||p.events.off("floating.closed",N),A()}function O(L){var U;if(w()&&p){p.events.on("floating.closed",N);return}if(Hb(L.relatedTarget,a.context.triggerElements))return;const j=((U=d.current.floatingContext)==null?void 0:U.nodeId)??i,P=L.relatedTarget;if(!(p&&j&&xn(P)&&Mc(p.nodesRef.current,j,!1).some(q=>{var K;return Lt((K=q.context)==null?void 0:K.elements.floating,P)}))){if(y.handler){y.handler(L);return}A(),T()&&!v()&&k(L)}}function N(L){!p||!h||w()||b.start(0,()=>{p.events.off("floating.closed",N),a.setOpen(!1,jt(ei,L)),p.events.emit("floating.closed",L)})}const I=c;return _o(I&&cn(I,"mouseenter",R),I&&cn(I,"mouseleave",O),I&&cn(I,"pointerdown",C,!0),()=>{p==null||p.events.off("floating.closed",N)})},[n,c,a,d,r,i,T,v,A,y,p,h,b])}const SZ={current:null};function yy(e,t={}){const{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:c=!0,triggerElementRef:u=SZ,externalTree:d,isActiveTrigger:p=!0,getHandleCloseContext:h,isClosing:y,shouldOpen:b,guardStaleOpen:v=!1}=t,T="rootStore"in e?e.rootStore:e,{dataRef:A,events:w}=T.context,k=Kc(d),C=XS(T),R=x.useRef(!1),O=ai(i),N=ai(r),I=ai(o),L=ai(n),j=ai(b),P=ai(y),B=mt(()=>{var H;return Z4((H=A.current.openEvent)==null?void 0:H.type,C.interactedInside)}),U=mt(()=>{var H;return((H=j.current)==null?void 0:H.call(j))!==!1}),q=mt((H,W,Y)=>{const te=T.context.triggerElements;if(te.hasElement(W))return!H||!Lt(H,W);if(!xn(Y))return!1;const M=Y;return te.hasMatchingElement(z=>Lt(z,M))&&(!H||!Lt(H,M))}),K=mt(()=>{if(!C.handler)return;yn(T.select("domReferenceElement")).removeEventListener("mousemove",C.handler),C.handler=void 0}),V=mt(()=>{Wb(C)});return p&&(C.handleCloseOptions=i==null?void 0:i.__options),x.useEffect(()=>K,[K]),x.useEffect(()=>{if(!n)return;function H(W){W.open?R.current=!1:(R.current=W.reason===ei,K(),C.openChangeTimeout.clear(),C.restTimeout.clear(),C.blockMouseMove=!0,C.restTimeoutPending=!1)}return w.on("openchange",H),()=>{w.off("openchange",H)}},[n,w,C,K]),x.useEffect(()=>{if(!n)return;function H(G,F=!0){const ee=nd(N.current,"close",C.pointerType);ee?C.openChangeTimeout.start(ee,()=>{T.setOpen(!1,jt(ei,G)),k==null||k.events.emit("floating.closed",G)}):F&&(C.openChangeTimeout.clear(),T.setOpen(!1,jt(ei,G)),k==null||k.events.emit("floating.closed",G))}const W=u.current??(p?T.select("domReferenceElement"):null);if(!xn(W))return;function Y(G){var Oe;if(C.openChangeTimeout.clear(),C.blockMouseMove=!1,a&&!Ac(C.pointerType))return;const F=zI(I.current),ee=nd(N.current,"open",C.pointerType),ae=Gi(G),re=G.currentTarget??null,ye=T.select("domReferenceElement");let ge=re;if(xn(ae)&&!T.context.triggerElements.hasElement(ae)){for(const Ge of T.context.triggerElements.elements())if(Lt(Ge,ae)){ge=Ge;break}}xn(re)&&xn(ye)&&!T.context.triggerElements.hasElement(re)&&Lt(re,ye)&&(ge=ye);const Te=ge==null?!1:q(ye,ge,ae),$e=T.select("open"),He=((Oe=P.current)==null?void 0:Oe.call(P))??T.select("transitionStatus")==="ending",Ne=!$e&&He&&R.current,Ie=!Te&&xn(ge)&&xn(ye)&&Lt(ye,ge)&&Ne,be=F>0&&!ee,Le=Te&&($e||Ne)||Ie,Me=!$e||Te;if(Le){U()&&T.setOpen(!0,jt(ei,G,ge));return}be||(ee?C.openChangeTimeout.start(ee,()=>{Me&&U()&&T.setOpen(!0,jt(ei,G,ge))}):Me&&U()&&T.setOpen(!0,jt(ei,G,ge)))}function te(G){if(B()){V();return}K();const F=T.select("domReferenceElement"),ee=yn(F);C.restTimeout.clear(),C.restTimeoutPending=!1;const ae=A.current.floatingContext??(h==null?void 0:h());if(Hb(G.relatedTarget,T.context.triggerElements))return;if(O.current&&ae){T.select("open")||C.openChangeTimeout.clear();const ye=u.current;C.handler=O.current({...ae,tree:k,x:G.clientX,y:G.clientY,onClose(){V(),K(),L.current&&!B()&&ye===T.select("domReferenceElement")&&H(G,!0)}}),ee.addEventListener("mousemove",C.handler),C.handler(G);return}(C.pointerType==="touch"?!Lt(T.select("floatingElement"),G.relatedTarget):!0)&&H(G)}function M(G){Lt(W,G.relatedTarget)||(C.openChangeTimeout.clear(),C.restTimeout.clear(),C.restTimeoutPending=!1)}const z=v?cn(W,"mouseout",M):void 0;return c?_o(cn(W,"mousemove",Y,{once:!0}),cn(W,"mouseenter",Y),cn(W,"mouseleave",te),z):_o(cn(W,"mouseenter",Y),cn(W,"mouseleave",te),z)},[K,V,A,N,T,n,O,C,p,q,B,a,c,I,u,k,L,h,P,U,v]),x.useMemo(()=>{if(!n)return;function H(W){C.pointerType=W.pointerType}return{onPointerDown:H,onPointerEnter:H,onMouseMove(W){var ae,re,ye;const{nativeEvent:Y}=W,te=W.currentTarget,M=T.select("domReferenceElement"),z=T.select("open"),G=q(M,te,W.target);if(a&&!Ac(C.pointerType))return;if(z&&G&&((ae=C.handleCloseOptions)!=null&&ae.blockPointerEvents)){const ge=T.select("floatingElement");if(ge){const Te=((ye=(re=C.handleCloseOptions)==null?void 0:re.getScope)==null?void 0:ye.call(re))??te.ownerDocument.body;BP(C,{scopeElement:Te,referenceElement:te,floatingElement:ge})}}const F=zI(I.current);if(z&&!G||F===0||!G&&C.restTimeoutPending&&W.movementX**2+W.movementY**2<2)return;C.restTimeout.clear();function ee(){if(C.restTimeoutPending=!1,B())return;const ge=T.select("open");!C.blockMouseMove&&(!ge||G)&&U()&&T.setOpen(!0,jt(ei,Y,te))}C.pointerType==="touch"?fi.flushSync(()=>{ee()}):G&&z?ee():(C.restTimeoutPending=!0,C.restTimeout.start(F,ee))}}},[n,C,B,q,a,T,I,U])}const AZ="Escape";function p3(e){return Il&&e.movementX===0&&e.movementY===0}function xy(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function L0(e,t){return xy(t,e===Q4||e===IS,e===ty||e===ny)}function TT(e,t,n){return xy(t,e===IS,n?e===ty:e===ny)||e==="Enter"||e===" "||e===""}function _Z(e,t,n){return xy(t,n?e===ty:e===ny,e===IS)}function CZ(e,t,n,r){const i=n?e===ny:e===ty,a=e===Q4;return t==="both"||t==="horizontal"&&r?e===AZ:xy(t,i,a)}function FP(e,t){const{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:c=!1,loopFocus:u=!1,nested:d=!1,rtl:p=!1,virtual:h=!1,focusItemOnOpen:y="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:v=!0,disabledIndices:T=void 0,orientation:A="vertical",parentOrientation:w,id:k,resetOnPointerLeave:C=!0,externalTree:R,grid:O}=t,N=O!=null,I="rootStore"in e?e.rootStore:e,L=I.useState("open"),j=I.useState("floatingElement"),P=I.useState("domReferenceElement"),B=I.context.dataRef,U=qb(j),q=N2(P),K=ai(U),V=Gc(),H=Kc(R),W=x.useRef(y),Y=x.useRef(o??-1),te=x.useRef(null),M=x.useRef(!0),z=mt(xe=>{i(Y.current===-1?null:Y.current,xe)}),G=x.useRef(!!j),F=x.useRef(L),ee=x.useRef(!1),ae=x.useRef(!1),re=x.useRef(null),ye=ai(T),ge=ai(L),Te=ai(o),$e=ai(C),He=$f(),Ne=$f(),Ie=mt(()=>{function xe(ze){h?H==null||H.events.emit("virtualfocus",ze):re.current=Eb(ze,{sync:ee.current,preventScroll:!0})}const Qe=n.current[Y.current],oe=ae.current;Qe&&xe(Qe),(ee.current?ze=>ze():ze=>He.request(ze))(()=>{var ht;const ze=n.current[Y.current]||Qe;if(!ze)return;Qe||xe(ze),fe&&(oe||!M.current)&&((ht=ze.scrollIntoView)==null||ht.call(ze,{block:"nearest",inline:"nearest"}))})});lt(()=>{B.current.orientation=A},[B,A]),lt(()=>{a&&(L&&j?(Y.current=o??-1,W.current&&o!=null&&(ae.current=!0,z())):G.current&&(Y.current=-1,z()))},[a,L,j,o,z]),lt(()=>{if(a){if(!L){ee.current=!1;return}if(j)if(r==null){if(ee.current=!1,Te.current!=null)return;if(G.current&&(Y.current=-1,Ie()),(!F.current||!G.current)&&W.current&&(te.current!=null||W.current===!0&&te.current==null)){let xe=0;const Qe=()=>{n.current[0]==null?(xe<2&&(xe?ue=>Ne.request(ue):queueMicrotask)(Qe),xe+=1):(Y.current=te.current==null||TT(te.current,A,p)||d?vb(n):O2(n),te.current=null,z())};Qe()}}else Ph(n.current,r)||(Y.current=r,Ie(),ae.current=!1)}},[a,L,j,r,Te,d,n,A,p,z,Ie,Ne]),lt(()=>{var ze,nt;if(!a||j||!H||h||!G.current)return;const xe=H.nodesRef.current,Qe=(nt=(ze=xe.find(ht=>ht.id===V))==null?void 0:ze.context)==null?void 0:nt.elements.floating,oe=ta(yn(P??Qe??null)),ue=xe.some(ht=>ht.context&&Lt(ht.context.elements.floating,oe));Qe&&!ue&&M.current&&Qe.focus({preventScroll:!0})},[a,j,P,H,V,h]),lt(()=>{F.current=L,G.current=!!j}),lt(()=>{L||(te.current=null,W.current=y)},[L,y]);const be=r!=null,Le=mt(xe=>{if(!ge.current)return;const Qe=n.current.indexOf(xe.currentTarget);Qe!==-1&&(Y.current!==Qe||r!==Qe)&&(Y.current=Qe,z(xe))}),Me=mt(()=>{var xe,Qe,oe;return w??((oe=(Qe=(xe=H==null?void 0:H.nodesRef.current.find(ue=>ue.id===V))==null?void 0:xe.context)==null?void 0:Qe.dataRef)==null?void 0:oe.current.orientation)}),Oe=mt(()=>vb(n,ye.current)),Ge=mt(xe=>{if(M.current=!1,ee.current=!0,xe.which===229||!ge.current&&xe.currentTarget===K.current)return;if(d&&CZ(xe.key,A,p,N)){L0(xe.key,Me())||yo(xe),I.setOpen(!1,jt(zb,xe.nativeEvent)),lr(P)&&(h?H==null||H.events.emit("virtualfocus",P):P.focus());return}const Qe=Y.current,oe=vb(n,T),ue=O2(n,T);if(q||(xe.key==="Home"&&(yo(xe),Y.current=oe,z(xe)),xe.key==="End"&&(yo(xe),Y.current=ue,z(xe))),O!=null){const ze=O(xe,Y.current,n,A,u,p,T,oe,ue);if(ze!=null&&(Y.current=ze,z(xe)),A==="both")return}if(L0(xe.key,A)){if(yo(xe),L&&!h&&ta(xe.currentTarget.ownerDocument)===xe.currentTarget){Y.current=TT(xe.key,A,p)?oe:ue,z(xe);return}TT(xe.key,A,p)?u?Qe>=ue?c&&Qe!==n.current.length?Y.current=-1:(ee.current=!1,Y.current=oe):Y.current=hl(n.current,{startingIndex:Qe,disabledIndices:T}):Y.current=Math.min(ue,hl(n.current,{startingIndex:Qe,disabledIndices:T})):u?Qe<=oe?c&&Qe!==-1?Y.current=n.current.length:(ee.current=!1,Y.current=ue):Y.current=hl(n.current,{startingIndex:Qe,decrement:!0,disabledIndices:T}):Y.current=Math.max(oe,hl(n.current,{startingIndex:Qe,decrement:!0,disabledIndices:T})),Ph(n.current,Y.current)&&(Y.current=-1),z(xe)}}),fe=x.useMemo(()=>({onFocus(Qe){ee.current=!0,Le(Qe)},onClick:({currentTarget:Qe})=>Qe.focus({preventScroll:!0}),onMouseMove(Qe){p3(Qe)||(ee.current=!0,ae.current=!1,b&&Le(Qe))},onPointerLeave(Qe){var ue;if(!ge.current||!M.current||Qe.pointerType==="touch")return;ee.current=!0;const oe=Qe.relatedTarget;if(!(!b||n.current.includes(oe))&&$e.current&&((ue=re.current)==null||ue.call(re),re.current=null,Y.current=-1,z(Qe),!h)){const ze=K.current,nt=ta(yn(ze));ze&&Lt(ze,nt)&&ze.focus({preventScroll:!0})}}}),[Le,ge,K,b,n,z,$e,h]),Q=x.useMemo(()=>h&&L&&be&&{"aria-activedescendant":`${k}-${r}`},[h,L,be,k,r]),se=x.useMemo(()=>({...q?{}:Q,onKeyDown(xe){if(xe.key==="Tab"&&xe.shiftKey&&L&&!h){const Qe=Gi(xe.nativeEvent);if(Qe&&!Lt(K.current,Qe))return;yo(xe),I.setOpen(!1,jt(Rc,xe.nativeEvent)),lr(P)&&P.focus();return}Ge(xe)},onPointerMove(xe){p3(xe)||(M.current=!0)}}),[Q,Ge,K,q,I,L,h,P]),pe=x.useMemo(()=>{function xe(ue){I.setOpen(!0,jt(zb,ue.nativeEvent,ue.currentTarget))}function Qe(ue){y==="auto"&&ey(ue.nativeEvent)&&(W.current=!h)}function oe(ue){W.current=y,y==="auto"&&OS(ue.nativeEvent)&&(W.current=!0)}return{onKeyDown(ue){const ze=I.select("open");M.current=!1;const nt=ue.key.startsWith("Arrow"),ht=_Z(ue.key,Me(),p),Yt=L0(ue.key,A),Xt=(d?ht:Yt)||ue.key==="Enter"||ue.key.trim()==="";if(h&&ze)return Ge(ue);if(!(!ze&&!v&&nt)){if(Xt){const at=L0(ue.key,Me());te.current=d&&at?null:ue.key}if(d){ht&&(yo(ue),ze?(Y.current=Oe(),z(ue)):xe(ue));return}Yt&&(Te.current!=null&&(Y.current=Te.current),yo(ue),!ze&&v?xe(ue):Ge(ue),ze&&z(ue))}},onFocus(ue){I.select("open")&&!h&&(Y.current=-1,z(ue))},onPointerDown:oe,onPointerEnter:oe,onMouseDown:Qe,onClick:Qe}},[Ge,y,Oe,d,z,I,v,A,Me,p,Te,h]),Be=x.useMemo(()=>({...Q,...pe}),[Q,pe]);return x.useMemo(()=>a?{reference:Be,floating:se,item:fe,trigger:pe}:{},[a,Be,se,pe,fe])}function zP(e,t){const{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:c,enabled:u=!0,resetMs:d=750,selectedIndex:p=null}=t,h="rootStore"in e?e.rootStore:e,y=h.useState("open"),b=xi(),v=x.useRef(""),T=x.useRef(p??i??-1),A=x.useRef(null),w=mt(R=>{function O(K){return r==null?void 0:r.current[K]}function N(K){const V=O(K);return V&&!iy(V)||V!=null&&V.matches(":disabled")?!1:o==null||!Cf(ks,K,o)}function I(K,V,H=0){if(K.length===0)return-1;const W=(H%K.length+K.length)%K.length,Y=V.toLowerCase();for(let te=0;te<K.length;te+=1){const M=(W+te)%K.length,z=K[M];if(!(!(z!=null&&z.toLowerCase().startsWith(Y))||!N(M)))return M}return-1}const L=n.current;if(v.current.length>0&&R.key===" "&&(yo(R),c==null||c(!0)),v.current.length>0&&v.current[0]!==" "&&I(L,v.current)===-1&&R.key!==" "&&(c==null||c(!1)),L==null||R.key.length!==1||R.ctrlKey||R.metaKey||R.altKey)return;y&&R.key!==" "&&(yo(R),c==null||c(!0));const j=v.current==="";j&&(T.current=p??i??-1),L.every((K,V)=>{var H,W;return K&&N(V)?((H=K[0])==null?void 0:H.toLowerCase())!==((W=K[1])==null?void 0:W.toLowerCase()):!0})&&v.current===R.key&&(v.current="",T.current=A.current),v.current+=R.key,b.start(d,()=>{v.current="",T.current=A.current,c==null||c(!1)});const U=((j?p??i??-1:T.current)??0)+1,q=I(L,v.current,U);q!==-1?(a==null||a(q),A.current=q):R.key!==" "&&(v.current="",c==null||c(!1))}),k=mt(R=>{const O=R.relatedTarget,N=h.select("domReferenceElement"),I=h.select("floatingElement");Lt(N,O)||Lt(I,O)||(b.clear(),v.current="",T.current=A.current,c==null||c(!1))});lt(()=>{!y&&p!==null||(b.clear(),A.current=null,v.current!==""&&(v.current=""))},[y,p,b]);const C=x.useMemo(()=>({onKeyDown:w,onBlur:k}),[w,k]);return x.useMemo(()=>u?{reference:C,floating:C}:{},[u,C])}const h3=.1,kZ=h3*h3,br=.5;function P0(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function j0(e,t,n,r,i,a,o,c,u,d){let p=!1;return P0(e,t,n,r,i,a)&&(p=!p),P0(e,t,i,a,o,c)&&(p=!p),P0(e,t,o,c,u,d)&&(p=!p),P0(e,t,u,d,n,r)&&(p=!p),p}function NZ(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function $0(e,t,n,r,i,a){const o=Math.min(n,i),c=Math.max(n,i),u=Math.min(r,a),d=Math.max(r,a);return e>=o&&e<=c&&t>=u&&t<=d}function vy(e={}){const{blockPointerEvents:t=!1}=e,n=new Ns,r=({x:i,y:a,placement:o,elements:c,onClose:u,nodeId:d,tree:p})=>{const h=o==null?void 0:o.split("-")[0];let y=!1,b=null,v=null,T=typeof performance<"u"?performance.now():0;function A(k,C){const R=performance.now(),O=R-T;if(b===null||v===null||O===0)return b=k,v=C,T=R,!1;const N=k-b,I=C-v,L=N*N+I*I,j=O*O*kZ;return b=k,v=C,T=R,L<j}function w(){n.clear(),u()}return function(C){n.clear();const R=c.domReference,O=c.floating;if(!R||!O||h==null||i==null||a==null)return;const{clientX:N,clientY:I}=C,L=Gi(C),j=C.type==="mouseleave",P=Lt(O,L),B=Lt(R,L);if(P&&(y=!0,!j))return;if(B&&(y=!1,!j)){y=!0;return}if(j&&xn(C.relatedTarget)&&Lt(O,C.relatedTarget))return;function U(){return!!(p&&Mc(p.nodesRef.current,d).length>0)}function q(){U()||w()}if(U())return;const K=R.getBoundingClientRect(),V=O.getBoundingClientRect(),H=i>V.right-V.width/2,W=a>V.bottom-V.height/2,Y=V.width>K.width,te=V.height>K.height,M=(Y?K:V).left,z=(Y?K:V).right,G=(te?K:V).top,F=(te?K:V).bottom;if(h==="top"&&a>=K.bottom-1||h==="bottom"&&a<=K.top+1||h==="left"&&i>=K.right-1||h==="right"&&i<=K.left+1){q();return}let ee=!1;switch(h){case"top":ee=$0(N,I,M,K.top+1,z,V.bottom-1);break;case"bottom":ee=$0(N,I,M,V.top+1,z,K.bottom-1);break;case"left":ee=$0(N,I,V.right-1,F,K.left+1,G);break;case"right":ee=$0(N,I,K.right-1,F,V.left+1,G);break}if(ee)return;if(y&&!NZ(N,I,K)){q();return}if(!j&&A(N,I)){q();return}let ae=!1;switch(h){case"top":{const re=Y?br/2:br*4,ye=Y||H?i+re:i-re,ge=Y?i-re:H?i+re:i-re,Te=a+br+1,$e=H||Y?V.bottom-br:V.top,He=H?Y?V.bottom-br:V.top:V.bottom-br;ae=j0(N,I,ye,Te,ge,Te,V.left,$e,V.right,He);break}case"bottom":{const re=Y?br/2:br*4,ye=Y||H?i+re:i-re,ge=Y?i-re:H?i+re:i-re,Te=a-br,$e=H||Y?V.top+br:V.bottom,He=H?Y?V.top+br:V.bottom:V.top+br;ae=j0(N,I,ye,Te,ge,Te,V.left,$e,V.right,He);break}case"left":{const re=te?br/2:br*4,ye=te||W?a+re:a-re,ge=te?a-re:W?a+re:a-re,Te=i+br+1,$e=W||te?V.right-br:V.left,He=W?te?V.right-br:V.left:V.right-br;ae=j0(N,I,$e,V.top,He,V.bottom,Te,ye,Te,ge);break}case"right":{const re=te?br/2:br*4,ye=te||W?a+re:a-re,ge=te?a-re:W?a+re:a-re,Te=i-br,$e=W||te?V.left+br:V.right,He=W?te?V.left+br:V.right:V.left+br;ae=j0(N,I,Te,ye,Te,ge,$e,V.top,He,V.bottom);break}}ae?y||n.start(40,q):q()}};return r.__options={...e,blockPointerEvents:t},r}const UP=x.createContext(void 0);function RZ(){const e=x.useContext(UP);if(e===void 0)throw new Error(Cn(26));return e}const P2="ArrowUp",j2="ArrowDown",$2="ArrowLeft",B2="ArrowRight",F2="Home",z2="End",Wm=new Set([P2,j2,$2,B2,F2,z2]),HP="Shift",OZ=[HP,"Control","Alt","Meta"];function IZ(e){return lr(e)&&e.tagName==="INPUT"}function m3(e){return!!(IZ(e)&&e.selectionStart!=null||lr(e)&&e.tagName==="TEXTAREA")}function g3(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop;const o=e.clientWidth<e.scrollWidth,c=e.clientHeight<e.scrollHeight;if(o&&r!=="vertical"){const u=b3(e,t,"left"),d=B0(e),p=B0(t);n==="ltr"&&(u+t.offsetWidth+p.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight?i=u+t.offsetWidth+p.scrollMarginRight-e.clientWidth+d.scrollPaddingRight:u-p.scrollMarginLeft<e.scrollLeft+d.scrollPaddingLeft&&(i=u-p.scrollMarginLeft-d.scrollPaddingLeft)),n==="rtl"&&(u-p.scrollMarginLeft<e.scrollLeft+d.scrollPaddingLeft?i=u-p.scrollMarginLeft-d.scrollPaddingLeft:u+t.offsetWidth+p.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight&&(i=u+t.offsetWidth+p.scrollMarginRight-e.clientWidth+d.scrollPaddingRight))}if(c&&r!=="horizontal"){const u=b3(e,t,"top"),d=B0(e),p=B0(t);u-p.scrollMarginTop<e.scrollTop+d.scrollPaddingTop?a=u-p.scrollMarginTop-d.scrollPaddingTop:u+t.offsetHeight+p.scrollMarginBottom>e.scrollTop+e.clientHeight-d.scrollPaddingBottom&&(a=u+t.offsetHeight+p.scrollMarginBottom-e.clientHeight+d.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:"auto"})}function b3(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function B0(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}const MZ="--nested-dialogs",DZ="data-nested-dialog-open",LZ={...zm,...Ol,nestedDialogOpen(e){return e?{[DZ]:""}:null}},PZ=x.forwardRef(function(t,n){const{render:r,className:i,style:a,finalFocus:o,initialFocus:c,...u}=t,d=Vc(),p=d.useState("descriptionElementId"),h=d.useState("disablePointerDismissal"),y=d.useState("floatingRootContext"),b=d.useState("popupProps"),v=d.useState("modal"),T=d.useState("mounted"),A=d.useState("nested"),w=d.useState("nestedOpenDialogCount"),k=d.useState("open"),C=d.useState("openMethod"),R=d.useState("titleElementId"),O=d.useState("transitionStatus"),N=d.useState("role"),I=y.useState("floatingId");RZ(),$a({open:k,ref:d.context.popupRef,onComplete(){var q,K;k&&((K=(q=d.context).onOpenChangeComplete)==null||K.call(q,!0))}});const L=c===void 0?DP(d.context.popupRef):c,j=w>0,P=d.useStateSetter("popupElement"),U=It("div",t,{state:{open:k,nested:A,transitionStatus:O,nestedDialogOpen:j},props:[b,{id:I,"aria-labelledby":R,"aria-describedby":p,role:N,...Km,hidden:!T,onKeyDown(q){Wm.has(q.key)&&q.stopPropagation()},style:{[MZ]:w}},u],ref:[n,d.context.popupRef,P],stateAttributesMapping:LZ});return m.jsx(sy,{context:y,openInteractionType:C,disabled:!T,closeOnFocusOut:!h,initialFocus:L,returnFocus:o,modal:v!==!1,restoreFocus:"popup",children:U})});function Xm(e){return yS(19)?e:e?"true":void 0}const Ey=x.forwardRef(function(t,n){const{cutout:r,...i}=t;let a;if(r){const o=r.getBoundingClientRect();a=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${o.left}px ${o.top}px,${o.left}px ${o.bottom}px,${o.right}px ${o.bottom}px,${o.right}px ${o.top}px,${o.left}px ${o.top}px)`}return m.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:a}})}),jZ=x.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,a=Vc(),o=a.useState("mounted"),c=a.useState("modal"),u=a.useState("open");return o||r?m.jsx(UP.Provider,{value:r,children:m.jsxs(ay,{ref:n,...i,children:[o&&c===!0&&m.jsx(Ey,{ref:a.context.internalBackdropRef,inert:Xm(!u)}),t.children]})}):null});let y3={},x3={},v3="";function Ty(e,t){return Lm(e)?e:t}function E3(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Ty(t,n)).overflowY)}function $Z(e){if(typeof document>"u")return!1;const t=yn(e);return _r(t).innerWidth-t.documentElement.clientWidth>0}function BZ(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=yn(e),r=n.documentElement,i=n.body,a=Ty(r,i),o=a.style.overflowY,c=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",a.style.overflowY="scroll";const u=a.offsetWidth;a.style.overflowY="hidden";const d=a.offsetWidth;return a.style.overflowY=o,r.style.scrollbarGutter=c,u===d}function FZ(e){const t=yn(e),n=t.documentElement,r=t.body,i=Ty(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(i.style,a)}}function zZ(e){var b;const t=yn(e),n=t.documentElement,r=t.body,i=_r(n);let a=0,o=0,c=!1;const u=Eo.create();if(Il&&(((b=i.visualViewport)==null?void 0:b.scale)??1)!==1)return()=>{};function d(){const v=i.getComputedStyle(n),T=i.getComputedStyle(r),k=(v.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";a=n.scrollTop,o=n.scrollLeft,y3={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},v3=n.style.scrollBehavior,x3={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const C=n.scrollHeight>n.clientHeight,R=n.scrollWidth>n.clientWidth,O=v.overflowY==="scroll"||T.overflowY==="scroll",N=v.overflowX==="scroll"||T.overflowX==="scroll",I=Math.max(0,i.innerWidth-r.clientWidth),L=Math.max(0,i.innerHeight-r.clientHeight),j=parseFloat(T.marginTop)+parseFloat(T.marginBottom),P=parseFloat(T.marginLeft)+parseFloat(T.marginRight),B=Ty(n,r);if(c=BZ(e),c){n.style.scrollbarGutter=k,B.style.overflowY="hidden",B.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:k,overflowY:"hidden",overflowX:"hidden"}),(C||O)&&(n.style.overflowY="scroll"),(R||N)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:j||L?`calc(100dvh - ${j+L}px)`:"100dvh",width:P||I?`calc(100vw - ${P+I}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function p(){Object.assign(n.style,y3),Object.assign(r.style,x3),c||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=v3)}function h(){p(),u.request(d)}d();const y=cn(i,"resize",h);return()=>{u.cancel(),p(),typeof i.removeEventListener=="function"&&y()}}class UZ{constructor(){pt(this,"lockCount",0);pt(this,"restore",null);pt(this,"timeoutLock",Ns.create());pt(this,"timeoutUnlock",Ns.create());pt(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});pt(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const n=yn(t),r=n.documentElement,i=n.body,a=_r(r);if(E3(a,r,i)){const c=new a.MutationObserver(()=>{E3(a,r,i)||(c.disconnect(),this.restore=null,this.lock(t))}),u={attributes:!0};c.observe(r,u),c.observe(i,u),this.restore=()=>c.disconnect();return}const o=J1||!$Z(t);this.restore=o?FZ(t):zZ(t)}}const HZ=new UZ;function qP(e=!0,t=null){lt(()=>{if(e)return HZ.acquire(t)},[e,t])}function qZ({store:e,parentContext:t,isDrawer:n}){const r=e.useState("open"),i=e.useState("disablePointerDismissal"),a=e.useState("modal"),o=e.useState("popupElement"),c=e.useState("floatingRootContext"),[u,d]=x.useState(0),[p,h]=x.useState(0),y=u===0,b=Vm(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(v){if(!e.context.outsidePressEnabledRef.current||"button"in v&&v.button!==0)return!1;if("touches"in v){if(v.type==="touchend"){if(v.changedTouches.length!==1||v.touches.length!==0)return!1}else if(v.touches.length!==1)return!1}const T=Gi(v);if(y&&!i){if(a){const A=e.context.internalBackdropRef.current,w=e.context.backdropRef.current;return A||w?A===T||w===T||Lt(T,o)&&!(T!=null&&T.hasAttribute("data-base-ui-portal")):!0}return!0}return!1},escapeKey:y});return qP(r&&a===!0,o),e.useContextCallback("onNestedDialogOpen",(v,T)=>{d(v),h(T)}),lt(()=>(t!=null&&t.onNestedDialogOpen&&(r?t.onNestedDialogOpen(u+1,p+(n?1:0)):t.onNestedDialogOpen(0,0)),()=>{t!=null&&t.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,u,p,t]),hy(e,{activeTriggerProps:b.reference,inactiveTriggerProps:b.trigger,popupProps:b.floating,nestedOpenDialogCount:u,nestedOpenDrawerCount:p}),null}const VZ={...gy,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class GZ extends Qf{constructor(n,r,i){const a=new Ym,o=KZ(n,a,r,i);super(o,YZ(a),VZ);pt(this,"setOpen",(n,r)=>{var i,a;r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&r.trigger==null&&this.state.activeTriggerId!=null&&(r.trigger=this.state.activeTriggerElement??void 0),(a=(i=this.context).onOpenChange)==null||a.call(i,n,r),!r.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(n,r),this.update(uy(this.state,n,r.trigger)))})}}function KZ(e,t,n,r=!1){return{...my(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function YZ(e){return{popupRef:x.createRef(),backdropRef:x.createRef(),internalBackdropRef:x.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function WZ(e,t){const{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:c=!1,modal:u=!0,actionsRef:d,handle:p,triggerId:h,defaultTriggerId:y=null}=t,b=e==="drawer",v=u,T=c,A="dialog",w=Vc(!0),k=w!=null,C={modal:v,disablePointerDismissal:T,nested:k,role:A},R=GS((P,B)=>new GZ({open:i,openProp:r,activeTriggerId:y,triggerIdProp:h,...C},P,B),!0);R.useControlledProp("openProp",r),R.useControlledProp("triggerIdProp",h),R.useSyncedValues(C),R.useContextCallback("onOpenChange",a),R.useContextCallback("onOpenChangeComplete",o);const O=R.useState("open"),N=R.useState("mounted"),I=R.useState("payload");PP(R,O),fy(R);const{forceUnmount:L}=py(O,R);x.useImperativeHandle(d,()=>({unmount:L,close:()=>R.setOpen(!1,jt(Y1))}),[L,R]);const j=O||N;return m.jsxs(K4.Provider,{value:R,children:[p&&m.jsx(cy,{handle:p,store:R}),j&&m.jsx(qZ,{store:R,parentContext:w==null?void 0:w.context,isDrawer:b}),typeof n=="function"?n({payload:I}):n]})}const XZ=Gm(function(t){return WZ("dialog",t)}),QZ=x.forwardRef(function(t,n){const{render:r,className:i,style:a,id:o,...c}=t,u=Vc(),d=Gr(o);return u.useSyncedValueWithCleanup("titleElementId",d),It("h2",t,{ref:n,props:[{id:d},c]})});function ZZ(e){const t=x.useRef(""),n=x.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:x.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i?e(i,i.pointerType):e(i,t.current),t.current=""},[e]),onPointerDown:n}}function ZS(e,t){const n=mt((a,o)=>{(typeof e=="function"?e():e)||t(o||(J1?"touch":""))}),{onClick:r,onPointerDown:i}=ZZ(n);return x.useMemo(()=>({onClick:r,onPointerDown:i}),[r,i])}function VP(e){const[t,n]=x.useState(null),r=ZS(e,n);return Xf(e,i=>{i&&!e&&n(null)}),x.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}const JZ=ly(function(t,n){const{render:r,className:i,style:a,disabled:o=!1,nativeButton:c=!0,id:u,payload:d,handle:p,...h}=t,y=Vc(!0),v=by(p)??y;if(!v)throw new Error(Cn(79));const T=Gr(u),A=v.useState("floatingRootContext"),w=v.useState("isOpenedByTrigger",T),k=v.useState("triggerPopupId",T),C=x.useRef(null),{registerTrigger:R,isMountedByThisTrigger:O}=dy(T,C,v,{payload:d}),{getButtonProps:N,buttonRef:I}=is({disabled:o,native:c}),L=qm(A),j=ZS(()=>v.select("open"),U=>{v.set("openMethod",U)}),P={disabled:o,open:w},B=v.useState("triggerProps",O);return It("button",t,{state:P,ref:[I,n,R,C],props:[L.reference,B,j,{[$S]:"",id:T,"aria-haspopup":"dialog","aria-expanded":w,"aria-controls":k},h,N],stateAttributesMapping:Fm})}),JS=x.createContext(null),GP=x.createContext(null),eA=x.createContext(null),F0=new Map;function KP(e){const t=x.useContext(JS),n=x.useContext(GP),r=x.useContext(eA);return e==="surface"?r:e==="workspace"?n:e==="run"?t:null}function eJ(e,t,n){x.useLayoutEffect(()=>{if(!e||!n)return;const r=[...e.children].filter(i=>i instanceof HTMLElement&&!i.contains(t.current));for(const i of r){const a=F0.get(i)??{count:0,previous:i.inert};a.count+=1,F0.set(i,a),i.inert=!0}return()=>{for(const i of r){const a=F0.get(i);!a||--a.count>0||(i.inert=a.previous,F0.delete(i))}}},[n,e,t])}function wy({...e}){return m.jsx(XZ,{"data-slot":"dialog",...e})}function YP({...e}){return m.jsx(JZ,{"data-slot":"dialog-trigger",...e})}function tA({...e}){return m.jsx(jZ,{"data-slot":"dialog-portal",...e})}function WP({...e}){return m.jsx(kS,{"data-slot":"dialog-close",...e})}function nA({className:e,...t}){return m.jsx(kX,{"data-slot":"dialog-overlay",className:De("fixed inset-0 isolate z-50 bg-backdrop duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...t})}const tJ={small:"w-[min(420px,calc(100%-2rem))] max-h-[min(86%,900px)]",medium:"w-[min(560px,calc(100%-2rem))] max-h-[min(86%,900px)]",large:"w-[min(860px,calc(100%-2rem))] max-h-[min(86%,900px)]",wide:"w-[min(1180px,calc(100%-2rem))] h-[min(86%,900px)]",full:"w-[calc(100%-3rem)] h-[calc(100%-3rem)] max-sm:h-full max-sm:w-full max-sm:rounded-none"};function Sy({className:e,children:t,scope:n="page",size:r="medium",showCloseButton:i=!0,onBackdropClick:a,overlayClassName:o,keepMounted:c,open:u=!0,ref:d,...p}){const h=KP(n),y=x.useRef(null),[b,v]=x.useState(!1);eJ(h,y,b&&u);const T=h!==null;return m.jsxs(tA,{container:h??void 0,keepMounted:c,children:[m.jsx(nA,{className:De(T?"absolute z-[60]":"z-[100]",n==="workspace"&&"z-[75]",o),forceRender:!T,onClick:T?a:void 0}),m.jsxs(PZ,{"data-slot":"dialog-content","data-scope":n,className:De("top-1/2 left-1/2 z-50 flex max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col gap-4 overflow-hidden rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",T?"absolute z-[61] max-h-[calc(100%-2rem)]":"fixed z-[100]",n==="workspace"&&"z-[76]",tJ[r],e),ref:A=>{y.current=A,v(A!==null),typeof d=="function"?d(A):d&&(d.current=A)},...p,children:[t,i&&m.jsxs(kS,{"data-slot":"dialog-close",render:m.jsx(Er,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[m.jsx(CS,{}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function rA({className:e,...t}){return m.jsx("div",{"data-slot":"dialog-header",className:De("flex flex-col gap-1 pr-8",e),...t})}function iA({className:e,...t}){return m.jsx("div",{"data-slot":"dialog-body",className:De("flex min-h-0 flex-1 flex-col overflow-auto",e),...t})}function XP({className:e,showCloseButton:t=!1,children:n,...r}){return m.jsxs("div",{"data-slot":"dialog-footer",className:De("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",e),...r,children:[n,t&&m.jsx(kS,{render:m.jsx(Er,{variant:"outline"}),children:"Close"})]})}function Qm({className:e,...t}){return m.jsx(QZ,{"data-slot":"dialog-title",className:De("text-base leading-none font-medium",e),...t})}function aA({className:e,...t}){return m.jsx(NX,{"data-slot":"dialog-description",className:De("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}const nJ=Object.freeze(Object.defineProperty({__proto__:null,Dialog:wy,DialogBody:iA,DialogClose:WP,DialogContent:Sy,DialogDescription:aA,DialogFooter:XP,DialogHeader:rA,DialogOverlay:nA,DialogPortal:tA,DialogTitle:Qm,DialogTrigger:YP,RunModalContext:JS,SurfaceModalContext:eA,WorkspaceModalContext:GP,useModalContainer:KP},Symbol.toStringTag,{value:"Module"})),QP=x.createContext(void 0);function Zm(e){const t=x.useContext(QP);if(t===void 0&&!e)throw new Error(Cn(33));return t}const ZP=x.createContext(void 0);function Mo(e){const t=x.useContext(ZP);if(t===void 0&&!e)throw new Error(Cn(36));return t}const rJ=x.createContext(void 0);function sA(e=!0){const t=x.useContext(rJ);if(t===void 0&&!e)throw new Error(Cn(25));return t}const JP=x.createContext(void 0);function iJ(){const e=x.useContext(JP);if(e===void 0)throw new Error(Cn(30));return e}function aJ(e){const{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:c,itemMetadata:u}=e,{events:d}=a.useState("floatingTreeRoot"),p=a.useState("open"),h=sA(!0),y=h!==void 0;return x.useMemo(()=>({id:r,role:"menuitem",tabIndex:p&&n?0:-1,onKeyDown(b){b.key===" "&&(o!=null&&o.current)&&b.preventDefault()},onMouseMove(b){i&&d.emit("itemhover",{nodeId:i,target:b.currentTarget})},onClick(b){t&&d.emit("close",{domEvent:b,reason:qu})},onMouseUp(b){if(h){const v=h.initialCursorPointRef.current;if(h.initialCursorPointRef.current=null,y&&v&&Math.abs(b.clientX-v.x)<=1&&Math.abs(b.clientY-v.y)<=1||y&&!NS&&b.button===2)return}c.current&&a.context.allowMouseUpTriggerRef.current&&(!y||b.button===2)&&u.type==="regular-item"&&Hu(c.current,b,{detail:1})}}),[t,n,r,d,i,p,a,o,c,h,y,u])}const oA={type:"regular-item"};function Ay(e){const{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:c,itemMetadata:u,nodeId:d}=e,p=x.useRef(null),{getButtonProps:h,buttonRef:y}=is({disabled:n,focusableWhenDisabled:!0,native:c,composite:!0}),b=aJ({closeOnClick:t,highlighted:r,id:i,nodeId:d,store:a,typingRef:o,itemRef:p,itemMetadata:u}),v=x.useCallback(A=>La(b,{onMouseEnter(){u.type==="submenu-trigger"&&u.setActive()}},A,h),[b,h,u]),T=Ys(p,y);return x.useMemo(()=>({getItemProps:v,itemRef:T}),[v,T])}const e5=x.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function sJ(){return x.useContext(e5)}function pd(e={}){const{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:c,subscribeMapChange:u,nextIndexRef:d}=sJ(),p=x.useRef(-1),[h,y]=x.useState(a==null&&t?()=>{if(p.current===-1){const A=d.current;d.current+=1,p.current=A}return p.current}:-1),b=a??h,v=x.useRef(null),T=x.useCallback(A=>{const w=v.current;w&&c(w),v.current=A,A&&o(A,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,c,r,n,i]);return lt(()=>{if(a==null)return u(A=>{var k;const w=v.current?(k=A.get(v.current))==null?void 0:k.index:null;w!=null&&y(w)})},[a,u]),{ref:T,index:b}}const oJ="data-checked",lJ="data-unchecked",_y={checked(e){return e?{[oJ]:""}:{[lJ]:""}},...Ol},cJ=x.forwardRef(function(t,n){const{render:r,className:i,id:a,label:o,nativeButton:c=!1,disabled:u=!1,closeOnClick:d=!1,checked:p,defaultChecked:h,onCheckedChange:y,style:b,...v}=t,T=pd({guess:!0,label:o}),A=Zm(!0),w=Gr(a),{store:k}=Mo(),C=k.useState("disabled"),R=u||C,O=k.useState("isActive",T.index),N=k.useState("itemProps"),[I,L]=Ws({controlled:p,default:h??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:j,itemRef:P}=Ay({closeOnClick:d,disabled:R,highlighted:O,id:w,store:k,nativeButton:c,nodeId:A==null?void 0:A.context.nodeId,itemMetadata:oA}),B=x.useMemo(()=>({disabled:R,highlighted:O,checked:I}),[R,O,I]);function U(K){const V=jt(qu,K.nativeEvent,void 0,{preventUnmountOnClose:xr});y==null||y(!I,V),!V.isCanceled&&L(H=>!H)}const q=It("div",t,{state:B,stateAttributesMapping:_y,props:[N,{role:"menuitemcheckbox","aria-checked":I,onClick:U},v,j],ref:[P,n,T.ref]});return m.jsx(JP.Provider,{value:B,children:q})}),uJ=x.forwardRef(function(t,n){const{render:r,className:i,style:a,keepMounted:o=!1,...c}=t,u=iJ(),d=x.useRef(null),{transitionStatus:p,mounted:h,setMounted:y}=Rl(u.checked);$a({batch:!0,enabled:!u.checked,open:u.checked,ref:d,onComplete(){u.checked||y(!1)}});const b={checked:u.checked,disabled:u.disabled,highlighted:u.highlighted,transitionStatus:p};return It("span",t,{state:b,ref:[n,d],stateAttributesMapping:_y,props:{"aria-hidden":!0,...c},enabled:o||h})}),lA=x.createContext(void 0);function dJ(){const e=x.useContext(lA);if(e===void 0)throw new Error(Cn(31));return e}const fJ=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,[c,u]=x.useState(void 0),d=It("div",t,{ref:n,props:{role:"group","aria-labelledby":c,...o}});return m.jsx(lA.Provider,{value:u,children:d})}),pJ=x.forwardRef(function(t,n){const{render:r,className:i,style:a,id:o,...c}=t,u=Gr(o),d=dJ();return lt(()=>(d(u),()=>{d(p=>p===u?void 0:p)}),[d,u]),It("div",t,{ref:n,props:{id:u,"aria-hidden":!0,...c}})}),hJ=x.forwardRef(function(t,n){const{render:r,className:i,id:a,label:o,nativeButton:c=!1,disabled:u=!1,closeOnClick:d=!0,style:p,...h}=t,y=pd({guess:!0,label:o}),b=Zm(!0),v=Gr(a),{store:T}=Mo(),A=T.useState("disabled"),w=u||A,k=T.useState("isActive",y.index),C=T.useState("itemProps"),{getItemProps:R,itemRef:O}=Ay({closeOnClick:d,disabled:w,highlighted:k,id:v,store:T,nativeButton:c,nodeId:b==null?void 0:b.context.nodeId,itemMetadata:oA});return It("div",t,{state:{disabled:w,highlighted:k},props:[C,h,R],ref:[O,n,y.ref]})}),mJ=x.createContext(void 0);function Cy(e){return x.useContext(mJ)}function Jm(e){return e==="starting"?fQ:tr}const gJ=x.forwardRef(function(t,n){const{render:r,className:i,style:a,finalFocus:o,...c}=t,{store:u}=Mo(),{side:d,align:p}=Zm(),h=Cy()!=null,y=u.useState("open"),b=u.useState("transitionStatus"),v=u.useState("popupProps"),T=u.useState("mounted"),A=u.useState("instantType"),w=u.useState("activeTriggerElement"),k=u.useState("parent"),C=u.useState("lastOpenChangeReason"),R=u.useState("rootId"),O=u.useState("floatingRootContext"),N=u.useState("floatingTreeRoot"),I=u.useState("closeDelay"),L=u.useState("hoverEnabled"),j=u.useState("disabled"),P=u.useState("openMethod"),B=k.type==="context-menu";$a({open:y,ref:u.context.popupRef,onComplete(){var H,W;y&&((W=(H=u.context).onOpenChangeComplete)==null||W.call(H,!0))}}),x.useEffect(()=>{function H(W){u.setOpen(!1,jt(W.reason,W.domEvent))}return N.events.on("close",H),()=>{N.events.off("close",H)}},[N.events,u]),QS(O,{enabled:L&&!j&&!B&&k.type!=="menubar",closeDelay:I});const U=u.useStateSetter("popupElement"),q={transitionStatus:b,side:d,align:p,open:y,nested:k.type==="menu",instant:A},K=It("div",t,{state:q,ref:[n,u.context.popupRef,U],stateAttributesMapping:Um,props:[v,{onKeyDown(H){h&&Wm.has(H.key)&&H.stopPropagation()}},Jm(b),c,{"data-rootownerid":R}]});let V=k.type===void 0||B;return(w||k.type==="menubar"&&C!==K1)&&(V=!0),m.jsx(sy,{context:O,openInteractionType:P,modal:B,disabled:!T,returnFocus:o===void 0?V:o,initialFocus:k.type!=="menu",restoreFocus:!0,externalTree:k.type!=="menubar"?N:void 0,previousFocusableElement:w,nextFocusableElement:k.type===void 0?u.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:k.type===void 0?u.context.beforeContentFocusGuardRef:void 0,children:K})}),t5=x.createContext(void 0);function bJ(){const e=x.useContext(t5);if(e===void 0)throw new Error(Cn(32));return e}const n5=x.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:a,parent:o}=Mo();if(!(a.useState("mounted")||r))return null;const d=o.type==="menu"||o.type==="menubar"?"group":void 0;return m.jsx(t5.Provider,{value:r,children:m.jsx(ay,{ref:n,...i,portalOwnerRole:d})})}),yJ=x.createContext(void 0);function ky(){const e=x.useContext(yJ);return(e==null?void 0:e.direction)??"ltr"}const xJ=e=>({name:"arrow",options:e,async fn(t){var te,M;const{x:n,y:r,placement:i,rects:a,platform:o,elements:c,middlewareData:u}=t,{element:d,padding:p=0,offsetParent:h="real"}=Ic(e,t)||{};if(d==null)return{};const y=tP(p),b={x:n,y:r},v=LS(i),T=DS(v),A=await o.getDimensions(d),w=v==="y",k=w?"top":"left",C=w?"bottom":"right",R=w?"clientHeight":"clientWidth",O=a.reference[T]+a.reference[v]-b[v]-a.floating[T],N=b[v]-a.reference[v],I=h==="real"?await((te=o.getOffsetParent)==null?void 0:te.call(o,d)):c.floating;let L=c.floating[R]||a.floating[T];(!L||!await((M=o.isElement)==null?void 0:M.call(o,I)))&&(L=c.floating[R]||a.floating[T]);const j=O/2-N/2,P=L/2-A[T]/2-1,B=Math.min(y[k],P),U=Math.min(y[C],P),q=B,K=L-A[T]-U,V=L/2-A[T]/2+j,H=eP(q,V,K),W=!u.arrow&&Sl(i)!=null&&V!==H&&a.reference[T]/2-(V<q?B:U)-A[T]/2<0,Y=W?V<q?V-q:V-K:0;return{[v]:b[v]+Y,data:{[v]:H,centerOffset:V-H-Y,...W&&{alignmentOffset:Y}},reset:W}}}),vJ=(e,t)=>{const{name:n,fn:r}=xJ(e);return{name:n,fn:r,options:[e,t]}},EJ={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},TJ={sideX:"left",sideY:"top"},wJ="--available-width",SJ="--available-height",AJ="--anchor-width",_J="--anchor-height",CJ="--transform-origin",T3=wJ,w3=SJ;function r5(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function S3(e,t,n){const{rects:r,placement:i}=e;return{side:r5(t,Cs(i),n),align:Sl(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Ny(e){return kJ(e,TZ)}function kJ(e,t){var kn,Dt;const{anchor:n,positionMethod:r="absolute",side:i="bottom",sideOffset:a=0,align:o="center",alignOffset:c=0,collisionBoundary:u,collisionPadding:d=5,sticky:p=!1,arrowPadding:h=5,disableAnchorTracking:y=!1,inline:b,keepMounted:v=!1,floatingRootContext:T,mounted:A,collisionAvoidance:w,shift:k,nodeId:C,adaptiveOrigin:R,lazyFlip:O=!1,externalTree:N}=e,[I,L]=x.useState(null);!A&&I!==null&&L(null);const j=w.side||"flip",P=w.align||"flip",B=w.fallbackAxisSide||"end",U=(k==null?void 0:k.crossAxis)??!1,q=k==null?void 0:k.rootBoundary,K=typeof n=="function"?n:void 0,V=mt(K),H=K?V:n,W=ai(n),Y=ai(A),M=ky()==="rtl",z=I||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":M?"left":"right","inline-start":M?"right":"left"}[i],G=o==="center"?z:`${z}-${o}`;let F=d;typeof F=="number"?F={top:F,right:F,bottom:F,left:F}:F&&(F={top:F.top||0,right:F.right||0,bottom:F.bottom||0,left:F.left||0});const ee=1,ae=i==="bottom"?ee:0,re=i==="top"?ee:0,ye=i==="right"?ee:0,ge=i==="left"?ee:0,Te={boundary:u==="clipping-ancestors"?"clippingAncestors":u,padding:F},$e=x.useRef(null),He=ai(a),Ne=ai(c),Ie=typeof a!="function"?a:0,be=typeof c!="function"?c:0,Le=[];b&&Le.push(b),Le.push(eZ(ne=>{const Ce=S3(ne,i,M),le=typeof He.current=="function"?He.current(Ce):He.current,Fe=typeof Ne.current=="function"?Ne.current(Ce):Ne.current;return{mainAxis:le,crossAxis:Fe,alignmentAxis:Fe}},[Ie,be,M,i]));const Me=P==="none"&&j!=="shift",Oe=!Me&&(p||U||j==="shift"),Ge=j==="none"?null:rZ({...Te,padding:{top:F.top+ee+ae,right:F.right+ee+ge,bottom:F.bottom+ee+re,left:F.left+ee+ye},mainAxis:!U&&j==="flip",crossAxis:P==="flip"?"alignment":!1,fallbackAxisSideDirection:B}),fe=Me?null:tZ({...Te,rootBoundary:q,mainAxis:P!=="none",crossAxis:Oe,limiter:p||U?void 0:nZ(ne=>{if(!$e.current)return{};const{width:Ce,height:le}=$e.current.getBoundingClientRect(),Fe=_s(Cs(ne.placement)),dt=Fe==="y"?Ce:le,St=Fe==="y"?F.left+F.right:F.top+F.bottom;return{offset:dt/2+St/2}})},[Te,p,U,q,F,P]);j==="shift"||P==="shift"||o==="center"?Le.push(fe,Ge):Le.push(Ge,fe),Le.push(iZ({...Te,apply({elements:{floating:ne},availableWidth:Ce,availableHeight:le,rects:Fe}){if(!Y.current)return;const dt=ne.style;dt.setProperty(T3,`${Ce}px`),dt.setProperty(w3,`${le}px`);const St=_r(ne).devicePixelRatio||1,{x:We,y:rt,width:Xe,height:Tt}=Fe.reference,Pt=(Math.round((We+Xe)*St)-Math.round(We*St))/St,qn=(Math.round((rt+Tt)*St)-Math.round(rt*St))/St;dt.setProperty(AJ,`${Pt}px`),dt.setProperty(_J,`${qn}px`)}}),vJ(ne=>({element:$e.current||yn(ne.elements.floating).createElement("div"),padding:$e.current?h:0,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(ne){var Vn,zt,mn,kr,Wi,Ir;const{elements:{floating:Ce},middlewareData:le,placement:Fe,platform:dt,rects:St,y:We}=ne,rt=Cs(Fe),Xe=Sl(Fe),Tt=_s(rt)==="y",Pt=$e.current,qn=typeof a=="function"?a(S3(ne,i,M)):a;let Pn;if(!Pt&&Xe&&Math.abs(Tt?((Vn=le.shift)==null?void 0:Vn.x)||0:((zt=le.shift)==null?void 0:zt.y)||0)<=1)Pn=Xe==="start"===(Tt&&((mn=dt.isRTL)==null?void 0:mn.call(dt,Ce))===!0)?"100%":"0%";else{const va=Tt?((kr=le.arrow)==null?void 0:kr.x)||0:((Wi=le.arrow)==null?void 0:Wi.y)||0,Ea=Tt?(Pt==null?void 0:Pt.clientWidth)||0:(Pt==null?void 0:Pt.clientHeight)||0;Pn=`${va+Ea/2}px`}let Xn=rt==="top"||rt==="left"?`calc(100% + ${qn}px)`:`${-qn}px`;return Oe&&Tt&&Math.abs(((Ir=le.shift)==null?void 0:Ir.y)||0)>qn&&(Xn=`${St.reference.y+St.reference.height/2-We}px`),Ce.style.setProperty(CJ,Tt?`${Pn} ${Xn}`:`${Xn} ${Pn}`),{}}},EJ,R),lt(()=>{!A&&T&&T.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[A,T]);const Q=x.useMemo(()=>({ancestorScroll:!y,elementResize:!y&&typeof ResizeObserver<"u",layoutShift:!y&&typeof IntersectionObserver<"u"}),[y]),{refs:se,elements:pe,x:Be,y:xe,middlewareData:Qe,update:oe,placement:ue,context:ze,isPositioned:nt,floatingStyles:ht}=t({rootContext:T,open:v?A:void 0,placement:G,middleware:Le,strategy:r,whileElementsMounted:v?void 0:(...ne)=>a3(...ne,Q),nodeId:C,externalTree:N}),{sideX:Yt,sideY:Xt}=Qe.adaptiveOrigin||TJ,at=nt?r:"fixed",xt=x.useMemo(()=>{let ne;return nt?R?ne={position:at,[Yt]:Be,[Xt]:xe}:ne={...ht,position:at}:ne={position:at,top:0,left:0},ne[T3]="100vw",ne[w3]="100vh",nt||(ne.opacity=0),ne},[R,at,Yt,Be,Xt,xe,ht,nt]),Ft=x.useRef(null);lt(()=>{if(!A)return;const ne=W.current,Ce=typeof ne=="function"?ne():ne,Fe=(A3(Ce)?Ce.current:Ce)||null||null;Fe!==Ft.current&&(se.setPositionReference(Fe),Ft.current=Fe)},[A,se,H,W]),x.useEffect(()=>{if(!A)return;const ne=W.current;typeof ne!="function"&&A3(ne)&&ne.current!==Ft.current&&(se.setPositionReference(ne.current),Ft.current=ne.current)},[A,se,H,W]),x.useEffect(()=>{if(v&&A&&pe.reference&&pe.floating)return a3(pe.reference,pe.floating,oe,Q)},[v,A,pe,oe,Q]);const Mt=Cs(ue),Qt=r5(i,Mt,M),vt=Sl(ue)||"center",zn=!!((kn=Qe.hide)!=null&&kn.referenceHidden);lt(()=>{O&&A&&nt&&Mt!==z&&L(Mt)},[O,A,nt,Mt,z]);const Jt=x.useMemo(()=>{var ne,Ce;return{position:"absolute",top:(ne=Qe.arrow)==null?void 0:ne.y,left:(Ce=Qe.arrow)==null?void 0:Ce.x}},[Qe.arrow]),un=((Dt=Qe.arrow)==null?void 0:Dt.centerOffset)!==0;return x.useMemo(()=>({positionerStyles:xt,arrowStyles:Jt,arrowRef:$e,arrowUncentered:un,side:Qt,align:vt,physicalSide:Mt,anchorHidden:zn,refs:se,context:ze,isPositioned:nt,update:oe}),[xt,Jt,$e,un,Qt,vt,Mt,zn,se,ze,nt,oe])}function A3(e){return e!=null&&"current"in e}function Ry(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=mt(i),[,o]=x.useState(!1),c=Ai(RJ).current,u=Ai(NJ).current,d=x.useRef(0),p=x.useRef(!0),h=x.useRef(null),y=x.useRef(null),b=mt(()=>{p.current||(p.current=!0,o(O=>!O))}),v=mt((O,N)=>{u.set(O,N),b()}),T=mt(O=>{u.delete(O),b()}),A=mt(O=>{const N=new Map;return n.current.length=0,r&&(r.current.length=0),O.forEach(I=>{var L,j;N.set(I.element,{...I.registration.metadata??{},index:I.index}),n.current[I.index]=I.element,r&&(r.current[I.index]=I.registration.label!==void 0?I.registration.label:((j=(L=I.registration.textRef)==null?void 0:L.current)==null?void 0:j.textContent)??I.element.textContent)}),d.current=n.current.length,N});function w(O){var L;if((L=y.current)==null||L.disconnect(),y.current=null,typeof MutationObserver!="function"||O.length<2)return;const N=new MutationObserver(j=>{if(!MJ(j))return;let P=null;for(const B of O)if(B.isConnected){if(P&&i5(P,B)>0){N.disconnect(),b();return}P=B}});y.current=N;const I=new Set;for(let j=1;j<O.length;j+=1){const P=IJ(O[j-1],O[j]);P&&I.add(P)}I.forEach(j=>N.observe(j,{childList:!0}))}const k=mt(()=>{const[O,N]=OJ(u),I=A(O),L=h.current,j=!L||L.length!==O.length||O.some((P,B)=>{const U=L[B];return P.index!==U.index||P.element!==U.element||P.registration.index!==U.registration.index||P.registration.metadata!==U.registration.metadata});w(N),h.current=O,p.current=!1,j&&(c.forEach(P=>P(I)),a(I))});lt(()=>(!p.current&&h.current&&A(h.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,A]),lt(()=>{p.current&&k()}),lt(()=>()=>{var O;(O=y.current)==null||O.disconnect(),p.current=!0},[]);const C=mt(O=>(c.add(O),()=>{c.delete(O)})),R=x.useMemo(()=>({register:v,unregister:T,subscribeMapChange:C,nextIndexRef:d}),[v,T,C,d]);return m.jsx(e5.Provider,{value:R,children:t})}function NJ(){return new Map}function RJ(){return new Set}function OJ(e){const t=new Set,n=[],r=[];e.forEach((a,o)=>{if(!o.isConnected)return;const c=a.index,u={index:c??-1,element:o,registration:a};c===null?r.push(u):c>=0&&(t.add(c),n.push(u))});let i=0;return r.sort((a,o)=>i5(a.element,o.element)),r.forEach(a=>{for(;t.has(i);)i+=1;a.index=i,n.push(a),i+=1}),t.size>0&&n.sort((a,o)=>a.index-o.index),[n,r.map(a=>a.element)]}function IJ(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function MJ(e){for(const t of e)for(let n=0;n<t.removedNodes.length;n+=1)if(t.removedNodes[n].isConnected)return!0;return!1}function i5(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function Oy(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:c=!1}){const u={...n};return c&&(u.pointerEvents="none"),It("div",e,{state:t,ref:a,props:[{role:"presentation",hidden:o,style:u},Jm(r),i],stateAttributesMapping:zm})}const DJ=20;function cA(e,t,n,r){const[i,a]=x.useState(!1);lt(()=>{if(!e||!t||n==null){a(!1);return}const o=yn(n).documentElement.clientWidth,c=n.offsetWidth;a(o>0&&c>0&&c>=o-DJ)},[e,t,n]),qP(e&&(!t||i),r)}const LJ=x.forwardRef(function(t,n){var Q;const{anchor:r,positionMethod:i="absolute",className:a,render:o,side:c,align:u,sideOffset:d=0,alignOffset:p=0,collisionBoundary:h="clipping-ancestors",collisionPadding:y=5,arrowPadding:b=5,sticky:v=!1,disableAnchorTracking:T=!1,collisionAvoidance:A=hP,style:w,...k}=t,{store:C}=Mo(),R=bJ(),O=sA(!0),N=C.useState("parent"),I=C.useState("floatingRootContext"),L=C.useState("floatingTreeRoot"),j=C.useState("mounted"),P=C.useState("open"),B=C.useState("modal"),U=C.useState("openMethod"),q=C.useState("activeTriggerElement"),K=C.useState("transitionStatus"),V=C.useState("positionerElement"),H=C.useState("instantType"),W=C.useState("adaptiveOrigin"),Y=C.useState("lastOpenChangeReason"),te=C.useState("floatingNodeId"),M=C.useState("floatingParentNodeId"),z=I.useState("domReferenceElement"),G=x.useRef(null),F=W1(V);let ee=r,ae=d,re=p,ye=u,ge=A;N.type==="context-menu"&&(ee=r??((Q=N.context)==null?void 0:Q.anchor),ye=ye??"start",!c&&ye!=="center"&&(re=t.alignOffset??2,ae=t.sideOffset??-5));let Te=c,$e=ye;N.type==="menu"?(Te=Te??"inline-end",$e=$e??"start",ge=t.collisionAvoidance??BS):N.type==="menubar"&&(Te=Te??(N.context.orientation==="vertical"?"inline-end":"bottom"),$e=$e??"start");const He=N.type==="context-menu",Ne=Ny({anchor:ee,floatingRootContext:I,positionMethod:O?"fixed":i,mounted:j,side:Te,sideOffset:ae,align:$e,alignOffset:re,arrowPadding:He?0:b,collisionBoundary:h,collisionPadding:y,sticky:v,nodeId:te,keepMounted:R,disableAnchorTracking:T,collisionAvoidance:ge,shift:He?{crossAxis:!("side"in ge&&ge.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:L,adaptiveOrigin:W});x.useEffect(()=>{function se(pe){pe.open&&(pe.parentNodeId===te&&C.set("hoverEnabled",!1),pe.nodeId!==te&&pe.parentNodeId===C.select("floatingParentNodeId")&&C.setOpen(!1,jt(Ch)))}return L.events.on("menuopenchange",se),()=>{L.events.off("menuopenchange",se)}},[C,L.events,te]),x.useEffect(()=>{if(C.select("floatingParentNodeId")==null)return;function se(pe){if(pe.open||pe.nodeId!==C.select("floatingParentNodeId"))return;const Be=pe.reason??Ch;C.setOpen(!1,jt(Be))}return L.events.on("menuopenchange",se),()=>{L.events.off("menuopenchange",se)}},[L.events,C]);const Ie=xi();x.useEffect(()=>{P||Ie.clear()},[P,Ie]),x.useEffect(()=>{function se(pe){if(!(!P||pe.nodeId!==C.select("floatingParentNodeId")))if(pe.target&&q&&q!==pe.target){const Be=C.select("closeDelay");Be>0?Ie.isStarted()||Ie.start(Be,()=>{C.setOpen(!1,jt(Ch))}):C.setOpen(!1,jt(Ch))}else Ie.clear()}return L.events.on("itemhover",se),()=>{L.events.off("itemhover",se)}},[L.events,P,q,C,Ie]),x.useEffect(()=>{const se={open:P,nodeId:te,parentNodeId:M,reason:C.select("lastOpenChangeReason")};L.events.emit("menuopenchange",se)},[L.events,P,C,te,M]),lt(()=>{const se=z,pe=G.current;if(se&&(G.current=se),pe&&se&&se!==pe){C.set("instantType",void 0);const Be=new AbortController;return F(()=>{C.set("instantType","trigger-change")},Be.signal),()=>{Be.abort()}}},[z,F,C]);const be={open:P,side:Ne.side,align:Ne.align,anchorHidden:Ne.anchorHidden,nested:N.type==="menu",instant:H},Le=N.type==="menubar"&&N.context.modal;cA(P&&(Le||B&&Y!==ei),U==="touch",V,q);const Oe=Oy(t,be,{styles:Ne.positionerStyles,transitionStatus:K,props:k,refs:[n,C.useStateSetter("positionerElement")],hidden:!j,inert:!P}),Ge=j&&N.type!=="menu"&&(N.type!=="menubar"&&B&&Y!==ei||N.type==="menubar"&&N.context.modal);let fe=null;return N.type==="menubar"?fe=N.context.contentElement:N.type===void 0&&(fe=q),m.jsxs(QP.Provider,{value:Ne,children:[Ge&&m.jsx(Ey,{ref:N.type==="context-menu"||N.type==="nested-context-menu"?N.context.internalBackdropRef:null,inert:Xm(!P),cutout:fe}),m.jsx(EP,{id:te,children:m.jsx(Ry,{elementsRef:C.context.itemDomElements,labelsRef:C.context.itemLabels,children:Oe})})]})}),a5=x.createContext(void 0);function PJ(){const e=x.useContext(a5);if(e===void 0)throw new Error(Cn(34));return e}const jJ=x.memo(x.forwardRef(function(t,n){const{render:r,className:i,value:a,defaultValue:o,onValueChange:c,disabled:u=!1,style:d,"aria-labelledby":p,...h}=t,[y,b]=x.useState(void 0),[v,T]=Ws({controlled:a,default:o,name:"MenuRadioGroup"}),A=mt((R,O)=>{c==null||c(R,O),!O.isCanceled&&T(R)}),k=It("div",t,{state:{disabled:u},ref:n,props:{role:"group","aria-labelledby":p??y,"aria-disabled":u||void 0,...h}}),C=x.useMemo(()=>({value:v,setValue:A,disabled:u}),[v,A,u]);return m.jsx(lA.Provider,{value:b,children:m.jsx(a5.Provider,{value:C,children:k})})})),s5=x.createContext(void 0);function $J(){const e=x.useContext(s5);if(e===void 0)throw new Error(Cn(35));return e}const BJ=x.forwardRef(function(t,n){const{render:r,className:i,id:a,label:o,nativeButton:c=!1,disabled:u=!1,closeOnClick:d=!1,value:p,style:h,...y}=t,b=pd({guess:!0,label:o}),v=Zm(!0),T=Gr(a),{store:A}=Mo(),w=A.useState("isActive",b.index),k=A.useState("itemProps"),{value:C,setValue:R,disabled:O}=PJ(),N=A.useState("disabled"),I=u||O||N,L=C===p,{getItemProps:j,itemRef:P}=Ay({closeOnClick:d,disabled:I,highlighted:w,id:T,store:A,nativeButton:c,nodeId:v==null?void 0:v.context.nodeId,itemMetadata:oA}),B=x.useMemo(()=>({disabled:I,highlighted:w,checked:L}),[I,w,L]);function U(K){const V=jt(qu,K.nativeEvent,void 0,{preventUnmountOnClose:xr});R(p,V)}const q=It("div",t,{state:B,stateAttributesMapping:_y,props:[k,{role:"menuitemradio","aria-checked":L,onClick:U},y,j],ref:[P,n,b.ref]});return m.jsx(s5.Provider,{value:B,children:q})}),FJ=x.forwardRef(function(t,n){const{render:r,className:i,style:a,keepMounted:o=!1,...c}=t,u=$J(),d=x.useRef(null),{transitionStatus:p,mounted:h,setMounted:y}=Rl(u.checked);$a({batch:!0,enabled:!u.checked,open:u.checked,ref:d,onComplete(){u.checked||y(!1)}});const b={checked:u.checked,disabled:u.disabled,highlighted:u.highlighted,transitionStatus:p};return It("span",t,{state:b,stateAttributesMapping:_y,ref:[n,d],props:{"aria-hidden":!0,...c},enabled:o||h})}),zJ=x.createContext(null);function o5(e){return x.useContext(zJ)}const UJ={...gy,disabled:e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0),openMethod:e=>e.openMethod,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId,activeIndex:e=>e.activeIndex,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")}};class HJ extends Qf{constructor(n,r,i=!1){const a=new Ym,o=VJ(a,r,i,n);super(o,qJ(a),UJ);pt(this,"unsubscribeParentListener",null);this.unsubscribeParentListener=this.observe("parent",c=>{var u;if((u=this.unsubscribeParentListener)==null||u.call(this),c.type==="menu"){let d=c.store.select("rootId"),p=c.store.select("floatingTreeRoot"),h=c.store.select("keyboardEventRelay");this.unsubscribeParentListener=c.store.subscribe(()=>{const y=c.store.select("rootId"),b=c.store.select("floatingTreeRoot"),v=c.store.select("keyboardEventRelay");d===y&&p===b&&h===v||(d=y,p=b,h=v,this.notifyAll())}),this.context.allowMouseUpTriggerRef=c.store.context.allowMouseUpTriggerRef;return}c.type!==void 0&&(this.context.allowMouseUpTriggerRef=c.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(n,r){this.state.floatingRootContext.context.events.emit("setOpen",{open:n,eventDetails:r})}}function qJ(e){return{positionerRef:x.createRef(),popupRef:x.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:x.createRef(),beforeContentFocusGuardRef:x.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function VJ(e,t,n=!1,r){return{...my(e,t,n),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new FS,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:tr,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}const l5=x.createContext(void 0);function c5(){return x.useContext(l5)}const u5=Gm(function(t){const{children:n,open:r,onOpenChange:i,onOpenChangeComplete:a,defaultOpen:o=!1,disabled:c=!1,modal:u,loopFocus:d=!0,orientation:p="vertical",actionsRef:h,closeParentOnEsc:y=!1,handle:b,triggerId:v,defaultTriggerId:T=null,highlightItemOnHover:A=!0}=t,w=sA(!0),k=Mo(!0),C=o5(!0),R=c5(),O=x.useMemo(()=>R&&k?{type:"menu",store:k.store}:C?{type:"menubar",context:C}:w&&!k?{type:"context-menu",context:w}:{type:void 0},[w,k,C,R]),N=td(),I=td(),L=Gc(),j=O.type==="menu"?O.store:void 0,P=(r??o)&&(j==null?void 0:j.state.transitionStatus)==="starting",B=Ai(()=>P?j==null?void 0:j.state.instantType:void 0).current,U=GJ({open:o,openProp:r,activeTriggerId:T,triggerIdProp:v,parent:O,disabled:c,highlightItemOnHover:A,modal:O.type===void 0?u:void 0,rootId:N,instantType:B},I,L!=null);U.useControlledProp("openProp",r),U.useControlledProp("triggerIdProp",v),U.useContextCallback("onOpenChangeComplete",a);const q=U.useState("floatingTreeRoot"),K=zS(q),V=U.useState("open"),H=U.useState("activeTriggerElement"),W=U.useState("positionerElement"),Y=U.useState("hoverEnabled"),te=U.useState("disabled"),M=U.useState("lastOpenChangeReason"),z=U.useState("parent"),G=U.useState("activeIndex"),F=U.useState("payload"),ee=U.useState("floatingParentNodeId"),ae=x.useRef(null),re=x.useRef(z.type!=="context-menu"),ye=xi(),ge=x.useRef(!0),Te=xi(),$e=ee!=null,{openMethod:He,triggerProps:Ne}=VP(V);U.useSyncedValues({disabled:c,highlightItemOnHover:A,modal:z.type===void 0?u:void 0,openMethod:He,rootId:N}),fy(U);const{forceUnmount:Ie,transitionStatus:be}=py(V,U,()=>{U.set("allowMouseEnter",!1)},P),Le=W1(U.context.popupRef);x.useEffect(()=>{if(B===void 0)return;const at=()=>{U.state.instantType===B&&U.set("instantType",void 0)};if(!V){at();return}if(be!==void 0)return;if(U.context.popupRef.current==null){at();return}const xt=new AbortController;return Le(at,xt.signal),()=>{xt.abort()}},[B,V,be,Le,U]),lt(()=>{w&&!k?U.update({parent:{type:"context-menu",context:w},floatingNodeId:K,floatingParentNodeId:L}):k&&U.update({floatingNodeId:K,floatingParentNodeId:L})},[w,k,K,L,U]),x.useEffect(()=>{if(V||(ae.current=null),z.type==="context-menu"){if(!V){ye.clear(),re.current=!1;return}ye.start(500,()=>{re.current=!0})}},[ye,V,z.type]),lt(()=>{!V&&!Y&&U.set("hoverEnabled",!0)},[V,Y,U]);const Me=mt((at,xt)=>{const Ft=xt.reason;if(!at&&!U.select("open")||V===at&&xt.trigger===H&&M===Ft)return;const Mt=KS(xt);if(!at&&xt.trigger==null&&(xt.trigger=H??void 0),i==null||i(at,xt),xt.isCanceled)return;U.state.floatingRootContext.dispatchOpenChange(at,xt);const Qt=xt.event;if(at===!1&&(Qt==null?void 0:Qt.type)==="click"&&Qt.pointerType==="touch"&&!ge.current)return;at&&Ft===_f?(ge.current=!1,Te.start(300,()=>{ge.current=!0})):(ge.current=!0,Te.clear());const vt=(Ft===wl||Ft===qu)&&Qt.detail===0,zn=!at&&(Ft===$m||Ft==null);ae.current=xt.event;const Jt=uy(U.state,at,xt.trigger,Mt());Jt.openChangeReason=Ft,z.type==="menubar"&&(Ft===_f||Ft===Rc||Ft===ei||Ft===zb||Ft===Ch)?Jt.instantType="group":vt||zn?Jt.instantType=vt?"click":"dismiss":Jt.instantType=void 0,U.update(Jt)}),Oe=MP({popupStore:U,floatingRootContext:U.state.floatingRootContext,floatingId:I,nested:L!=null,onOpenChange:Me}),Ge=Oe.context.events;lt(()=>{const at=({open:xt,eventDetails:Ft})=>Me(xt,Ft);return Ge.on("setOpen",at),()=>{Ge==null||Ge.off("setOpen",at)}},[Ge,Me]);const fe=x.useCallback(()=>{U.setOpen(!1,jt(Y1))},[U]);x.useImperativeHandle(h,()=>({unmount:Ie,close:fe}),[Ie,fe]);let Q;z.type==="context-menu"&&(Q=z.context),x.useImperativeHandle(Q==null?void 0:Q.positionerRef,()=>W,[W]),x.useImperativeHandle(Q==null?void 0:Q.actionsRef,()=>({setOpen:Me}),[Me]);const se=Vm(Oe,{enabled:!te,bubbles:{escapeKey:y&&z.type==="menu"},outsidePress(){var at;return z.type!=="context-menu"||((at=ae.current)==null?void 0:at.type)==="contextmenu"?!0:re.current},externalTree:$e?q:void 0}),pe=ky(),Be=x.useCallback(at=>{U.select("activeIndex")!==at&&U.set("activeIndex",at)},[U]),xe=FP(Oe,{enabled:!te,listRef:U.context.itemDomElements,activeIndex:G,nested:z.type!==void 0,loopFocus:d,orientation:p,parentOrientation:z.type==="menubar"?z.context.orientation:void 0,rtl:pe==="rtl",disabledIndices:ks,onNavigate:Be,openOnArrowKeyDown:z.type!=="context-menu",externalTree:$e?q:void 0,focusItemOnHover:A}),Qe=x.useCallback(at=>{U.context.typingRef.current=at},[U]),oe=zP(Oe,{enabled:!te,listRef:U.context.itemLabels,elementsRef:U.context.itemDomElements,activeIndex:G,resetMs:dQ,onMatch:at=>{V&&at!==G&&U.set("activeIndex",at)},onTyping:Qe}),ue=x.useMemo(()=>{const at=La(oe.reference,xe.reference,se.reference,{onMouseMove(){U.set("allowMouseEnter",!0)}},Ne);return at["aria-haspopup"]="menu",at["aria-expanded"]=V,at},[U,oe.reference,xe.reference,se.reference,Ne,V]),ze=x.useMemo(()=>{const at=La(xe.trigger,se.trigger,Ne);return at["aria-haspopup"]="menu",at["aria-expanded"]=!1,at},[xe.trigger,se.trigger,Ne]);Ai(()=>(U.update({inactiveTriggerProps:ze}),null));const nt=x.useMemo(()=>La(Km,{id:I,role:"menu","aria-orientation":p==="horizontal"?"horizontal":void 0,"aria-labelledby":H==null?void 0:H.id,onMouseMove(){U.set("allowMouseEnter",!0),z.type==="menu"&&U.set("hoverEnabled",!1)},onClick(){U.select("hoverEnabled")&&U.set("hoverEnabled",!1)},onKeyDown(at){const xt=U.select("keyboardEventRelay");xt&&!at.isPropagationStopped()&&xt(at)}},oe.floating,xe.floating,se.floating),[H,I,p,z.type,U,oe.floating,xe.floating,se.floating]),ht=xe.item??tr;hy(U,{floatingRootContext:Oe,activeTriggerProps:ue,inactiveTriggerProps:ze,popupProps:nt,itemProps:ht});const Yt=x.useMemo(()=>({store:U,parent:O}),[U,O]),Xt=m.jsxs(ZP.Provider,{value:Yt,children:[b&&m.jsx(cy,{handle:b,store:U}),typeof n=="function"?n({payload:F}):n]});return z.type===void 0||z.type==="context-menu"?m.jsx(TP,{externalTree:q,children:Xt}):Xt});function GJ(e,t,n){return Ai(()=>new HJ(e,t,n)).current}function KJ(e){const t=Mo().store,n=x.useMemo(()=>({parentMenu:t}),[t]);return m.jsx(l5.Provider,{value:n,children:m.jsx(u5,{...e})})}const z0=5;function d5(e,t){const n=YJ(t);return e.clientX>=n.left-z0&&e.clientX<=n.right+z0&&e.clientY>=n.top-z0&&e.clientY<=n.bottom+z0}function YJ(e){const t=e.getBoundingClientRect(),n=_r(e);if(RS)return t;const r=n.getComputedStyle(e,"::before"),i=n.getComputedStyle(e,"::after");if(!(r.content!=="none"||i.content!=="none"))return t;const o=parseFloat(r.width)||0,c=parseFloat(r.height)||0,u=parseFloat(i.width)||0,d=parseFloat(i.height)||0,p=Math.max(t.width,o,u),h=Math.max(t.height,c,d),y=p-t.width,b=h-t.height;return{left:t.left-y/2,right:t.right+y/2,top:t.top-b/2,bottom:t.bottom+b/2}}function f5(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=V1(),{ref:i,index:a}=pd(e),o=n===a,c=x.useRef(null),u=Ys(i,c);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){const p=c.current;if(!t||!p)return;const h=p.hasAttribute("disabled")||p.ariaDisabled==="true";!o&&!h&&p.focus()}},compositeRef:u,index:a}}function uA(e){const{render:t,className:n,style:r,state:i=tr,props:a=ks,refs:o=ks,metadata:c,stateAttributesMapping:u,tag:d="div",...p}=e,{compositeProps:h,compositeRef:y}=f5({metadata:c});return It(d,e,{state:i,ref:[y,...o],props:[h,...a,p],stateAttributesMapping:u})}function p5(e){if(lr(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid");if(!gl(e))return p5(Tl(e))}function h5(e,t){const n=x.useRef(null);function r(a){fi.flushSync(()=>{e.setOpen(!1,jt(Rc,a.nativeEvent,a.currentTarget))});const o=oQ(n.current);o==null||o.focus()}function i(a){var c;const o=e.select("positionerElement");if(o&&kf(a,o))(c=e.context.beforeContentFocusGuardRef.current)==null||c.focus();else{fi.flushSync(()=>{e.setOpen(!1,jt(Rc,a.nativeEvent,a.currentTarget))});let u=sQ(e.context.triggerFocusTargetRef.current||t.current);for(;u!==null&&Lt(o,u);){const d=u;if(u=jS(u),u===d)break}u==null||u.focus()}}return{preFocusGuardRef:n,handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function WJ(e){const{enabled:t=!0,mouseDownAction:n,open:r}=e,i=x.useRef(!1);return x.useMemo(()=>t?{onMouseDown:a=>{(n==="open"&&!r||n==="close"&&r)&&(i.current=!0,yn(a.currentTarget).addEventListener("click",()=>{i.current=!1},{once:!0}))},onClick:a=>{i.current&&(i.current=!1,a.preventBaseUIHandler())}}:tr,[t,n,r])}const XJ=ly(function(t,n){const{render:r,className:i,style:a,disabled:o=!1,nativeButton:c=!0,id:u,openOnHover:d,delay:p=100,closeDelay:h=0,handle:y,payload:b,...v}=t,T=Mo(!0),w=by(y)??(T==null?void 0:T.store);if(!w)throw new Error(Cn(85));const k=Gr(u),C=w.useState("isTriggerActive",k),R=w.useState("floatingRootContext"),O=w.useState("isOpenedByTrigger",k),N=w.useState("triggerPopupId",k),I=x.useRef(null),L=ZJ(),j=V1(!0),P=Kc(),B=x.useMemo(()=>P??new FS,[P]),U=zS(B),q=Gc(),{registerTrigger:K,isMountedByThisTrigger:V}=dy(k,I,w,{payload:b,closeDelay:h,parent:L,floatingTreeRoot:B,floatingNodeId:U,floatingParentNodeId:q,keyboardEventRelay:j==null?void 0:j.relayKeyboardEvent}),H=L.type==="menubar",W=w.useState("disabled"),Y=o||W||H&&L.context.disabled,{getButtonProps:te,buttonRef:M}=is({disabled:Y,native:c});x.useEffect(()=>{!O&&L.type===void 0&&(w.context.allowMouseUpTriggerRef.current=!1)},[w,O,L.type]);const z=x.useRef(null),G=xi(),F=mt(Q=>{if(!z.current)return;G.clear(),w.context.allowMouseUpTriggerRef.current=!1;const se=Q.target;Lt(z.current,se)||Lt(w.select("positionerElement"),se)||se===z.current||se!=null&&p5(se)===w.select("rootId")||d5(Q,z.current)||B.events.emit("close",{domEvent:Q,reason:g4})});x.useEffect(()=>{O&&w.select("lastOpenChangeReason")===ei&&yn(z.current).addEventListener("mouseup",F,{once:!0})},[O,F,w]);const ee=H&&L.context.hasSubmenuOpen,re=yy(R,{enabled:(d??ee)&&!Y&&(!H||ee&&!V),handleClose:vy({blockPointerEvents:!H}),mouseOnly:!0,move:!1,restMs:L.type===void 0?p:void 0,delay:{close:h},triggerElementRef:I,externalTree:B,isActiveTrigger:C,isClosing:()=>w.select("transitionStatus")==="ending"}),ye=QJ(O,w.select("lastOpenChangeReason")),ge=qm(R,{enabled:!Y,event:O&&H?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:L.type===void 0?ye:!1}),Te=$P(R,{enabled:!Y&&ee}),$e=WJ({open:O,enabled:H,mouseDownAction:"open"}),He=x.useMemo(()=>La(Te.reference,ge.reference),[Te.reference,ge.reference]),Ne=w.useState("triggerProps",V),{preFocusGuardRef:Ie,handlePreFocusGuardFocus:be,handleFocusTargetFocus:Le}=h5(w,I),Me={disabled:Y,open:O},Oe=[z,n,M,K,I],Ge=[He,re??tr,Ne,{"aria-haspopup":"menu","aria-controls":N,id:k,onMouseDown:Q=>{if(w.select("open"))return;G.start(200,()=>{w.context.allowMouseUpTriggerRef.current=!0}),yn(Q.currentTarget).addEventListener("mouseup",F,{once:!0})}},H?{role:"menuitem"}:{},$e,v,te],fe=It("button",t,{enabled:!H,stateAttributesMapping:Ub,state:Me,ref:Oe,props:Ge});return H?m.jsx(uA,{tag:"button",render:r,className:i,style:a,state:Me,refs:Oe,props:Ge,stateAttributesMapping:Ub}):O?m.jsxs(x.Fragment,{children:[m.jsx(Oc,{ref:Ie,onFocus:be},`${k}-pre-focus-guard`),m.jsx(x.Fragment,{children:fe},k),m.jsx(Oc,{ref:w.context.triggerFocusTargetRef,onFocus:Le},`${k}-post-focus-guard`)]}):m.jsx(x.Fragment,{children:fe},k)});function QJ(e,t){const n=xi(),[r,i]=x.useState(!1);return lt(()=>{e&&t===ei?(i(!0),n.start(pP,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function ZJ(){const e=o5();return x.useMemo(()=>e?{type:"menubar",context:e}:{type:void 0},[e])}function JJ(e){const[t,n]=x.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}const m5=x.forwardRef(function(t,n){const{className:r,render:i,orientation:a="horizontal",style:o,...c}=t;return It("div",t,{state:{orientation:a},ref:n,props:[{role:"separator","aria-orientation":a},c]})});function g5(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const eee={"aria-expanded":void 0},tee=x.forwardRef(function(t,n){const{render:r,className:i,style:a,label:o,id:c,nativeButton:u=!1,openOnHover:d=!0,delay:p=100,closeDelay:h=0,disabled:y=!1,...b}=t,v=c5();if(!(v!=null&&v.parentMenu))throw new Error(Cn(37));const T=pd({guess:!0,label:o}),A=Zm(),{store:w}=Mo(),k=Gr(c),C=w.useState("open"),R=w.useState("floatingRootContext"),O=w.useState("floatingTreeRoot"),N=w.useState("triggerPopupId",k),I=LP(k,w),L=mt(He=>{I(He),He!==null&&w.select("open")&&w.select("activeTriggerId")==null&&w.update({activeTriggerId:k??null,activeTriggerElement:He,closeDelay:h})}),j=x.useRef(null),P=x.useCallback(He=>{j.current=He,w.set("activeTriggerElement",He)},[w]);lt(()=>(L(j.current),()=>L(null)),[L,k,w]),w.useSyncedValue("closeDelay",h);const B=v.parentMenu,U=w.useState("disabled"),q=B.useState("disabled"),K=y||U||q,V=B.useState("itemProps"),H=B.useState("isActive",T.index),W=x.useMemo(()=>({type:"submenu-trigger",setActive(){B.select("highlightItemOnHover")&&B.set("activeIndex",T.index)}}),[B,T.index]),{getItemProps:Y,itemRef:te}=Ay({closeOnClick:!1,disabled:K,highlighted:H,id:k,store:w,typingRef:B.context.typingRef,nativeButton:u,itemMetadata:W,nodeId:A==null?void 0:A.context.nodeId}),M=w.useState("hoverEnabled"),z=yy(R,{enabled:M&&d&&!K,handleClose:vy({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:p,delay:{open:p,close:h},shouldOpen:p>0?()=>B.select("allowMouseEnter"):void 0,triggerElementRef:j,externalTree:O,isClosing:()=>w.select("transitionStatus")==="ending",guardStaleOpen:!0}),F=qm(R,{enabled:!K,event:"mousedown",toggle:!d,ignoreMouse:d,stickIfOpen:!1}).reference??tr,ee=w.useState("triggerProps",!0);delete ee.id;const ae={disabled:K,highlighted:H,open:C},re=w.useState("openMethod"),ge=w.useState("lastOpenChangeReason")===zb||re==="keyboard";return It("div",t,{state:ae,stateAttributesMapping:Fm,props:[F,z,ee,V,C&&ge&&W4?eee:void 0,{"aria-controls":N,tabIndex:C||H?0:-1,onBlur(){H&&B.set("activeIndex",null)}},b,Y],ref:[n,T.ref,te,L,P]})});function nee({...e}){return m.jsx(u5,{"data-slot":"dropdown-menu",...e})}function ree({...e}){return m.jsx(n5,{"data-slot":"dropdown-menu-portal",...e})}function iee({...e}){return m.jsx(XJ,{"data-slot":"dropdown-menu-trigger",...e})}function b5({align:e="start",alignOffset:t=0,side:n="bottom",sideOffset:r=4,className:i,...a}){return m.jsx(n5,{children:m.jsx(LJ,{className:"isolate z-[110] outline-none",align:e,alignOffset:t,side:n,sideOffset:r,children:m.jsx(gJ,{"data-slot":"dropdown-menu-content",className:De("z-[110] max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",i),...a})})})}function aee({...e}){return m.jsx(fJ,{"data-slot":"dropdown-menu-group",...e})}function see({className:e,inset:t,...n}){return m.jsx(pJ,{"data-slot":"dropdown-menu-label","data-inset":t,className:De("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",e),...n})}function oee({className:e,inset:t,variant:n="default",...r}){return m.jsx(hJ,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:De("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...r})}function lee({...e}){return m.jsx(KJ,{"data-slot":"dropdown-menu-sub",...e})}function cee({className:e,inset:t,children:n,...r}){return m.jsxs(tee,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:De("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,m.jsx(_S,{className:"ml-auto"})]})}function uee({align:e="start",alignOffset:t=-3,side:n="right",sideOffset:r=0,className:i,...a}){return m.jsx(b5,{"data-slot":"dropdown-menu-sub-content",className:De("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",i),align:e,alignOffset:t,side:n,sideOffset:r,...a})}function dee({className:e,children:t,checked:n,inset:r,...i}){return m.jsxs(cJ,{"data-slot":"dropdown-menu-checkbox-item","data-inset":r,className:De("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...i,children:[m.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:m.jsx(uJ,{children:m.jsx(Bm,{})})}),t]})}function fee({...e}){return m.jsx(jJ,{"data-slot":"dropdown-menu-radio-group",...e})}function pee({className:e,children:t,inset:n,...r}){return m.jsxs(BJ,{"data-slot":"dropdown-menu-radio-item","data-inset":n,className:De("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[m.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:m.jsx(FJ,{children:m.jsx(Bm,{})})}),t]})}function hee({className:e,...t}){return m.jsx(m5,{"data-slot":"dropdown-menu-separator",className:De("-mx-1 my-1 h-px bg-border",e),...t})}function mee({className:e,...t}){return m.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:De("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",e),...t})}function Vu({className:e,...t}){return m.jsx("div",{"data-slot":"empty",className:De("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",e),...t})}function $h({className:e,...t}){return m.jsx("div",{"data-slot":"empty-header",className:De("flex max-w-sm flex-col items-center gap-2",e),...t})}const gee=kl("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});function dA({className:e,variant:t="default",...n}){return m.jsx("div",{"data-slot":"empty-icon","data-variant":t,className:De(gee({variant:t,className:e})),...n})}function Bh({className:e,...t}){return m.jsx("div",{"data-slot":"empty-title",className:De("text-sm font-medium tracking-tight",e),...t})}function Fh({className:e,...t}){return m.jsx("div",{"data-slot":"empty-description",className:De("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...t})}function bee({className:e,...t}){return m.jsx("div",{"data-slot":"empty-content",className:De("flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance",e),...t})}function y5({className:e,...t}){return m.jsx("label",{"data-slot":"label",className:De("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function x5({className:e,orientation:t="horizontal",...n}){return m.jsx(m5,{"data-slot":"separator",orientation:t,className:De("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...n})}function yee({className:e,...t}){return m.jsx("fieldset",{"data-slot":"field-set",className:De("flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",e),...t})}function xee({className:e,variant:t="legend",...n}){return m.jsx("legend",{"data-slot":"field-legend","data-variant":t,className:De("mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",e),...n})}function vee({className:e,...t}){return m.jsx("div",{"data-slot":"field-group",className:De("group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",e),...t})}const Eee=kl("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function Tee({className:e,orientation:t="vertical",...n}){return m.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:De(Eee({orientation:t}),e),...n})}function wee({className:e,...t}){return m.jsx("div",{"data-slot":"field-content",className:De("group/field-content flex flex-1 flex-col gap-0.5 leading-snug",e),...t})}function See({className:e,...t}){return m.jsx(y5,{"data-slot":"field-label",className:De("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...t})}function Aee({className:e,...t}){return m.jsx("div",{"data-slot":"field-label",className:De("flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",e),...t})}function _ee({className:e,...t}){return m.jsx("p",{"data-slot":"field-description",className:De("text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5","last:mt-0 nth-last-2:-mt-1","[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...t})}function Cee({children:e,className:t,...n}){return m.jsxs("div",{"data-slot":"field-separator","data-content":!!e,className:De("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",t),...n,children:[m.jsx(x5,{className:"absolute inset-0 top-1/2"}),e&&m.jsx("span",{className:"relative mx-auto block w-fit bg-background px-2 text-muted-foreground","data-slot":"field-separator-content",children:e})]})}function kee({className:e,children:t,errors:n,...r}){const i=x.useMemo(()=>{var o;if(t)return t;if(!(n!=null&&n.length))return null;const a=[...new Map(n.map(c=>[c==null?void 0:c.message,c])).values()];return(a==null?void 0:a.length)==1?(o=a[0])==null?void 0:o.message:m.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:a.map((c,u)=>(c==null?void 0:c.message)&&m.jsx("li",{children:c.message},u))})},[t,n]);return i?m.jsx("div",{role:"alert","data-slot":"field-error",className:De("text-sm font-normal text-destructive",e),...r,children:i}):null}const Nee=x.createContext(void 0);function Ree(e=!1){const t=x.useContext(Nee);if(!t&&!e)throw new Error(Cn(86));return t}function Oee(e,t){const n=Gr(e);return lt(()=>(t(n),()=>{t(r=>r===n?void 0:r)}),[n,t]),n}function Iee(e,t){return e.matches(":disabled")?!1:!t||e.form===t?!0:e.form===null&&!e.hasAttribute("form")}const Mee=x.forwardRef(function(t,n){const{render:r,className:i,id:a,name:o,value:c,disabled:u=!1,onValueChange:d,defaultValue:p,autoFocus:h=!1,style:y,...b}=t,{state:v,name:T,disabled:A,setTouched:w,setDirty:k,validityData:C,setFocused:R,setFilled:O,validationMode:N,validation:I}=qc(),{clearErrors:L,elementRef:j,submitCountRef:P}=jm(),B=A||u,U=T??o,q={...v,disabled:B},{labelId:K}=fd(),V=Wf({id:a}),[H]=Ws({controlled:c,default:p,name:"FieldControl",state:"value"}),W=c!==void 0,Y=W?H:void 0,te=Y==null?void 0:String(Y),M=mt(()=>{var ee;return(ee=I.inputRef.current)==null?void 0:ee.value});Pm(I.inputRef,V,te,M,!B,o),lt(()=>{var ae;const ee=te??((ae=I.inputRef.current)==null?void 0:ae.value);ee!==void 0&&O(ee!=="")},[te,I.inputRef,O]),Xf(te,()=>{te!==void 0&&(L(U),k(te!==(C.initialValue??"")),I.change(te))});const z=x.useRef(null),G=xi();return lt(()=>{h&&z.current===ta(yn(z.current))&&R(!0)},[h,R]),It("input",t,{ref:[n,z],state:q,props:[{id:V,disabled:B,name:U,ref:I.inputRef,"aria-labelledby":K,autoFocus:h,...W?{value:Y}:{defaultValue:p},onChange(ee){const ae=ee.currentTarget.value,re=jt(es,ee.nativeEvent);d==null||d(ae,re),!W&&(k(ae!==(C.initialValue??"")),O(ae!==""),!ee.nativeEvent.defaultPrevented&&!re.isCanceled&&(L(U),I.change(ae)))},onFocus(){R(!0)},onBlur(ee){if(w(!0),R(!1),N==="onBlur"){const ae=ee.currentTarget.value;I.commit(ae),W&&queueMicrotask(()=>{var ye;const re=(ye=I.inputRef.current)==null?void 0:ye.value;re!==void 0&&re!==ae&&re!==(C.initialValue??"")&&I.commit(re)})}},onKeyDown(ee){if(ee.currentTarget.tagName==="INPUT"&&ee.key==="Enter"){w(!0);const ae=ee.currentTarget.value,re=ee.currentTarget.form;if(re&&re===j.current&&!ee.defaultPrevented){const ye=ee.currentTarget,ge=P.current;G.start(0,()=>{P.current===ge&&I.commit(ye.value)})}else I.commit(ae)}}},b,ee=>I.getValidationProps(B,ee)],stateAttributesMapping:Yf})}),Dee=x.forwardRef(function(t,n){return m.jsx(Mee,{ref:n,...t})});function am({className:e,type:t,...n}){return m.jsx(Dee,{type:t,"data-slot":"input",className:De("h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 py-1 shadow-xs text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...n})}const v5=x.createContext(void 0);function Yc(e){const t=x.useContext(v5);if(t===void 0&&!e)throw new Error(Cn(47));return t}const Lee={...gy,disabled:e=>e.disabled,instantType:e=>e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,modal:e=>e.modal,focusManagerModal:e=>e.focusManagerModal,stickIfOpen:e=>e.stickIfOpen,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class Pee extends Qf{constructor(n,r,i){const a=new Ym;super(jee(n,a,r,i),$ee(a),Lee);pt(this,"setOpen",(n,r)=>{var h,y;const i=r.reason===ei,a=r.reason===wl&&r.event.detail===0,o=!n&&(r.reason===$m||r.reason==null),c=KS(r),u=this.select("activeTriggerId");if(!n&&r.reason===m4&&r.trigger==null&&u!=null&&(r.trigger=this.context.triggerElements.getById(u)??this.select("activeTriggerElement")??void 0),(y=(h=this.context).onOpenChange)==null||y.call(h,n,r),r.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(n,r);const d=()=>{const b=uy(this.state,n,r.trigger,c());b.openChangeReason=r.reason,this.update(b)};i?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(pP,()=>{this.set("stickIfOpen",!1)}),fi.flushSync(d)):d();let p;a?p="click":o?p="dismiss":r.reason===Rc&&(p="focus"),this.set("instantType",p)})}}function jee(e,t,n,r=!1){const i={...my(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&(e==null?void 0:e.mounted)===void 0&&(i.mounted=!0),i}function $ee(e){return{popupRef:x.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:x.createRef(),beforeContentFocusGuardRef:x.createRef(),stickIfOpenTimeout:new Ns,triggerElements:e}}const _3=Gm(function({props:t}){const{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,modal:c=!1,handle:u,triggerId:d,defaultTriggerId:p=null}=t,h=Bee(u,{modal:c,open:i,openProp:r,activeTriggerId:p,triggerIdProp:d});h.useControlledProp("openProp",r),h.useControlledProp("triggerIdProp",d);const y=h.useState("open"),b=h.useState("mounted"),v=h.useState("payload");h.useContextCallback("onOpenChange",a),h.useContextCallback("onOpenChangeComplete",o),PP(h,y),fy(h);const{forceUnmount:T}=py(y,h,()=>{h.update({stickIfOpen:!0,openChangeReason:null})});h.useSyncedValues({modal:c}),x.useEffect(()=>{y||h.context.stickIfOpenTimeout.clear()},[h,y]),x.useImperativeHandle(t.actionsRef,()=>({unmount:T,close:()=>h.setOpen(!1,jt(Y1))}),[T,h]);const A=y||b;return m.jsxs(v5.Provider,{value:h,children:[u&&m.jsx(cy,{handle:u,store:h}),A&&m.jsx(Fee,{store:h,modal:c}),typeof n=="function"?n({payload:v}):n]})});function E5(e){return Yc(!0)?m.jsx(_3,{props:e}):m.jsx(TP,{children:m.jsx(_3,{props:e})})}function Bee(e,t){const n=GS((r,i)=>new Pee(t,r,i));return x.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function Fee({store:e,modal:t}){const n=e.useState("floatingRootContext"),r=Vm(n,{outsidePressEvent:{mouse:t==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),i=r.reference,a=r.floating;return hy(e,{activeTriggerProps:i,inactiveTriggerProps:i,popupProps:a}),null}const zee=300,Uee=ly(function(t,n){const{render:r,className:i,style:a,disabled:o=!1,nativeButton:c=!0,handle:u,payload:d,openOnHover:p=!1,delay:h=zee,closeDelay:y=0,id:b,...v}=t,T=Yc(!0),w=by(u)??T;if(!w)throw new Error(Cn(74));const k=Gr(b),C=w.useState("isTriggerActive",k),R=w.useState("floatingRootContext"),O=w.useState("isOpenedByTrigger",k),N=w.useState("triggerPopupId",k),I=x.useRef(null),{registerTrigger:L,isMountedByThisTrigger:j}=dy(k,I,w,{payload:d,disabled:o,openOnHover:p,closeDelay:y}),P=w.useState("openChangeReason"),B=w.useState("stickIfOpen"),U=w.useState("openMethod"),q=w.useState("focusManagerModal"),K=yy(R,{enabled:!o&&p&&(U!=="touch"||P!==wl),mouseOnly:!0,move:!1,handleClose:vy(),restMs:h,delay:{close:y},triggerElementRef:I,isActiveTrigger:C,isClosing:()=>w.select("transitionStatus")==="ending"}),V=qm(R,{stickIfOpen:B}),H=ZS(()=>w.select("open"),ye=>{w.set("openMethod",ye)}),W=w.useState("triggerProps",j),{getButtonProps:Y,buttonRef:te}=is({disabled:o,native:c}),M={open(ye){return ye&&P===wl?Ub.open(ye):Fm.open(ye)}},{preFocusGuardRef:z,handlePreFocusGuardFocus:G,handleFocusTargetFocus:F}=h5(w,I),ae=It("button",t,{state:{disabled:o,open:O},ref:[te,n,L,I],props:[V.reference,K,W,H,{[$S]:"",id:k,"aria-haspopup":"dialog","aria-expanded":O,"aria-controls":N},v,Y],stateAttributesMapping:M}),re=m.jsx(x.Fragment,{children:ae},k);return j&&!q?m.jsxs(x.Fragment,{children:[m.jsx(Oc,{ref:z,onFocus:G}),re,m.jsx(Oc,{ref:w.context.triggerFocusTargetRef,onFocus:F})]}):re}),T5=x.createContext(void 0);function Hee(){const e=x.useContext(T5);if(e===void 0)throw new Error(Cn(45));return e}const w5=x.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t;return Yc().useState("mounted")||r?m.jsx(T5.Provider,{value:r,children:m.jsx(ay,{ref:n,...i})}):null}),S5=x.createContext(void 0);function qee(){const e=x.useContext(S5);if(!e)throw new Error(Cn(46));return e}const A5=x.forwardRef(function(t,n){const{render:r,className:i,style:a,anchor:o,positionMethod:c,side:u,align:d,sideOffset:p,alignOffset:h,collisionBoundary:y="clipping-ancestors",collisionPadding:b,arrowPadding:v,sticky:T,disableAnchorTracking:A=!1,collisionAvoidance:w=BS,...k}=t,C=Yc(),R=Hee(),O=zS(),N=C.useState("floatingRootContext"),I=C.useState("mounted"),L=C.useState("open"),j=C.useState("openChangeReason"),P=C.useState("activeTriggerElement"),B=C.useState("modal"),U=C.useState("openMethod"),q=C.useState("positionerElement"),K=C.useState("instantType"),V=C.useState("transitionStatus"),H=C.useState("adaptiveOrigin"),W=x.useRef(null),Y=W1(q),te=Ny({anchor:o,floatingRootContext:N,positionMethod:c,mounted:I,side:u,sideOffset:p,align:d,alignOffset:h,arrowPadding:v,collisionBoundary:y,collisionPadding:b,sticky:T,disableAnchorTracking:A,keepMounted:R,nodeId:O,collisionAvoidance:w,adaptiveOrigin:H}),M=N.useState("domReferenceElement");lt(()=>{const ae=M,re=W.current;if(ae&&(W.current=ae),re&&ae&&ae!==re){C.set("instantType",void 0);const ye=new AbortController;return Y(()=>{C.set("instantType","trigger-change")},ye.signal),()=>{ye.abort()}}},[M,Y,C]);const z=B===!0&&j!==ei;cA(L&&z,U==="touch",q,P);const G=C.useStateSetter("positionerElement"),F={open:L,side:te.side,align:te.align,anchorHidden:te.anchorHidden,instant:K},ee=Oy(t,F,{styles:te.positionerStyles,transitionStatus:V,props:k,refs:[n,G],hidden:!I,inert:!L});return m.jsxs(S5.Provider,{value:te,children:[I&&z&&m.jsx(Ey,{inert:Xm(!L),cutout:P}),m.jsx(EP,{id:O,children:ee})]})}),Vee=x.createContext(void 0);function Gee(){const[e,t]=x.useState(0),n=mt(()=>(t(i=>i+1),()=>{t(i=>Math.max(0,i-1))}));return{context:x.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}const _5=x.forwardRef(function(t,n){const{render:r,className:i,style:a,initialFocus:o,finalFocus:c,...u}=t,d=Yc(),p=qee(),h=Cy()!=null,{context:y,hasClosePart:b}=Gee(),v=d.useState("open"),T=d.useState("openMethod"),A=d.useState("instantType"),w=d.useState("transitionStatus"),k=d.useState("popupProps"),C=d.useState("titleElementId"),R=d.useState("descriptionElementId"),O=d.useState("modal"),N=d.useState("mounted"),I=d.useState("openChangeReason"),L=d.useState("activeTriggerElement"),j=d.useState("floatingRootContext"),P=j.useState("floatingId"),B=d.useState("disabled"),U=d.useState("openOnHover"),q=d.useState("closeDelay");$a({open:v,ref:d.context.popupRef,onComplete(){var te,M;v&&((M=(te=d.context).onOpenChangeComplete)==null||M.call(te,!0))}}),QS(j,{enabled:U&&!B,closeDelay:q});const K=o===void 0?DP(d.context.popupRef):o,V=O!==!1&&b;d.useSyncedValue("focusManagerModal",V);const H=d.useStateSetter("popupElement"),W={open:v,side:p.side,align:p.align,instant:A,transitionStatus:w},Y=It("div",t,{state:W,ref:[n,d.context.popupRef,H],props:[k,{id:P,role:"dialog",...Km,"aria-labelledby":C,"aria-describedby":R,onKeyDown(te){h&&Wm.has(te.key)&&te.stopPropagation()}},Jm(w),u],stateAttributesMapping:Um});return m.jsx(sy,{context:j,openInteractionType:T,modal:V,disabled:!N||I===ei,initialFocus:K,returnFocus:c,restoreFocus:"popup",previousFocusableElement:lr(L)?L:void 0,nextFocusableElement:d.context.triggerFocusTargetRef,beforeContentFocusGuardRef:d.context.beforeContentFocusGuardRef,children:m.jsx(Vee.Provider,{value:y,children:Y})})}),Kee=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,c=Yc(),u=c.useState("open"),d=c.useState("mounted"),p=c.useState("transitionStatus"),h=c.useState("openChangeReason");return It("div",t,{state:{open:u,transitionStatus:p},ref:n,props:[{role:"presentation",hidden:!d,style:{pointerEvents:h===ei?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},o],stateAttributesMapping:Um})}),Yee=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,c=Yc(),u=Gr(o.id);return c.useSyncedValueWithCleanup("titleElementId",u),It("h2",t,{ref:n,props:[{id:u},o]})}),Wee=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,c=Yc(),u=Gr(o.id);return c.useSyncedValueWithCleanup("descriptionElementId",u),It("p",t,{ref:n,props:[{id:u},o]})});function fA({...e}){return m.jsx(E5,{"data-slot":"popover",...e})}function Xee({...e}){return m.jsx(Uee,{"data-slot":"popover-trigger",...e})}function pA({className:e,align:t="center",alignOffset:n=0,side:r="bottom",sideOffset:i=8,anchor:a,collisionPadding:o,keepMounted:c,dim:u=!1,...d}){return m.jsxs(w5,{keepMounted:c,children:[u&&m.jsx(Kee,{className:"fixed inset-0 z-[105] bg-backdrop transition-opacity duration-200 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0","data-slot":"popover-backdrop"}),m.jsx(A5,{align:t,alignOffset:n,anchor:a,collisionPadding:o,side:r,sideOffset:i,className:"isolate z-[110]",children:m.jsx(_5,{"data-slot":"popover-content",className:De("z-[110] flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...d})})]})}function Qee({className:e,...t}){return m.jsx("div",{"data-slot":"popover-header",className:De("flex flex-col gap-0.5 text-sm",e),...t})}function Zee({className:e,...t}){return m.jsx(Yee,{"data-slot":"popover-title",className:De("font-medium",e),...t})}function Jee({className:e,...t}){return m.jsx(Wee,{"data-slot":"popover-description",className:De("text-muted-foreground",e),...t})}function C5(e){return Array.isArray(e)?e.map(t=>C5(t)).join(","):e==null?"":String(e)}const C3=new Map;function ete(e,t){const n=JSON.stringify({locale:C5(e),options:t}),r=C3.get(n);if(r)return r;const i=new Intl.NumberFormat(e,t);return C3.set(n,i),i}function k3(e,t,n){return e==null?"":ete(t,n).format(e)}function Pu(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function tte(e,t,n){return(e-t)*100/(n-t)}const k5=x.createContext(void 0);function Iy(){const e=x.useContext(k5);if(e===void 0)throw new Error(Cn(51));return e}const nte="data-complete",rte="data-indeterminate",ite="data-progressing",eg={status(e){return e==="progressing"?{[ite]:""}:e==="complete"?{[nte]:""}:e==="indeterminate"?{[rte]:""}:null}},ate=x.forwardRef(function(t,n){const{format:r,getAriaValueText:i,locale:a,max:o=100,min:c=0,value:u,render:d,className:p,children:h,style:y,...b}=t,[v,T]=x.useState();let A="indeterminate",w=null,k=null,C="",R="indeterminate progress";if(u!=null&&Number.isFinite(u)){const j=tte(u,c,o);w=Pu(Number.isNaN(j)?0:j,0,100),k=Pu(u,c,o),A=k===o?"complete":"progressing",C=r?k3(k,a,r):k3(w/100,a,{style:"percent"}),R=C}const O=x.useMemo(()=>({status:A}),[A]),N={"aria-labelledby":v,"aria-valuemax":o,"aria-valuemin":c,"aria-valuenow":k??void 0,"aria-valuetext":i?i(C,u):R,role:"progressbar",children:m.jsxs(x.Fragment,{children:[h,m.jsx("span",{role:"presentation",style:Kf,children:"x"})]})},I=x.useMemo(()=>({formattedValue:C,percentageValue:w,setLabelId:T,state:O,value:u}),[C,w,T,O,u]),L=It("div",t,{state:O,ref:n,props:[N,b],stateAttributesMapping:eg});return m.jsx(k5.Provider,{value:I,children:L})}),ste=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,{state:c}=Iy();return It("div",t,{state:c,ref:n,props:o,stateAttributesMapping:eg})}),ote=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,{percentageValue:c,state:u}=Iy(),d=c==null?{}:{insetInlineStart:0,height:"inherit",width:`${c}%`};return It("div",t,{state:u,ref:n,props:[{style:d},o],stateAttributesMapping:eg})}),lte=x.forwardRef(function(t,n){const{className:r,render:i,children:a,style:o,...c}=t,{value:u,formattedValue:d,state:p}=Iy(),h=p.status==="indeterminate";return It("span",t,{state:p,ref:n,props:[{"aria-hidden":!0,children:typeof a=="function"?a(h?"indeterminate":d,u):h?null:d},c],stateAttributesMapping:eg})}),cte=x.forwardRef(function(t,n){const{render:r,className:i,style:a,id:o,...c}=t,{setLabelId:u,state:d}=Iy(),p=Oee(o,u);return It("span",t,{state:d,ref:n,props:[{id:p,role:"presentation"},c],stateAttributesMapping:eg})});function ute({className:e,children:t,value:n,...r}){return m.jsxs(ate,{value:n,"data-slot":"progress",className:De("flex flex-wrap gap-3",e),...r,children:[t,m.jsx(N5,{children:m.jsx(R5,{})})]})}function N5({className:e,...t}){return m.jsx(ste,{className:De("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",e),"data-slot":"progress-track",...t})}function R5({className:e,...t}){return m.jsx(ote,{"data-slot":"progress-indicator",className:De("h-full bg-primary transition-all",e),...t})}function dte({className:e,...t}){return m.jsx(cte,{className:De("text-sm font-medium",e),"data-slot":"progress-label",...t})}function fte({className:e,...t}){return m.jsx(lte,{className:De("ml-auto text-sm text-muted-foreground tabular-nums",e),"data-slot":"progress-value",...t})}const pte="data-checked",hte="data-unchecked",U2={checked(e){return e?{[pte]:""}:{[hte]:""}},...Ol,...Yf},My="data-composite-item-active",O5=x.createContext(void 0);function mte(){return x.useContext(O5)}function Xb(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}const I5=x.createContext(void 0);function gte(){const e=x.useContext(I5);if(e===void 0)throw new Error(Cn(52));return e}const bte=x.forwardRef(function(t,n){const{render:r,className:i,disabled:a=!1,readOnly:o=!1,required:c=!1,"aria-labelledby":u,value:d,inputRef:p,nativeButton:h=!1,id:y,style:b,...v}=t,T=mte(),{disabled:A,readOnly:w,required:k,form:C,checkedValue:R,touched:O=!1,validation:N,name:I,setCheckedValue:L=xr,setTouched:j=xr,registerInputRef:P=xr}=T??{},{setTouched:B,setFilled:U,state:q,disabled:K}=qc(),V=p4(),{labelId:H,getDescriptionProps:W}=fd(),Y=K||V.disabled||A||a,te=w||o,M=k||c,z=C,G=T?R===d:d==="",F=x.useRef(null),ee=x.useRef(null),ae=N==null?void 0:N.registerInput,re=x.useCallback(pe=>ae==null?void 0:ae(pe,{controlRef:F,value:void 0}),[ae]),ye=Ys(p,ee,P,re);lt(()=>{var pe;(pe=ee.current)!=null&&pe.checked&&U(!0)},[U]),lt(()=>{if(ee.current){if(Y&&G){P(null);return}P(ee.current)}},[G,Y,P]);const ge=Gr(),Te=Wf({id:y}),$e=h?void 0:Te,He=wS(u,H,ee,!h,$e),Ne={role:"radio","aria-checked":G,"aria-labelledby":He,[My]:G?"":void 0,id:h?Te:ge,onKeyDown(pe){pe.key==="Enter"&&pe.preventDefault()},onClick(pe){if(pe.defaultPrevented||Y||te)return;pe.preventDefault();const Be=ee.current;Be&&Hu(Be,pe)},onFocus(pe){var Be;pe.defaultPrevented||Y||te||!O||((Be=ee.current)==null||Be.click(),j(!1))}},{getButtonProps:Ie,buttonRef:be}=is({disabled:Y,native:h,composite:!1}),Le={type:"radio",ref:ye,form:z,id:$e,name:I,tabIndex:-1,style:I?G1:Kf,"aria-hidden":!0,...d!==void 0?{value:Xb(d)}:tr,disabled:Y,checked:G,required:M,readOnly:te,onChange(pe){if(pe.nativeEvent.defaultPrevented||Y||te||d===void 0)return;const Be=jt(es,pe.nativeEvent);L(d,Be),!Be.isCanceled&&B(!0)},onClick(pe){pe.stopPropagation()},onFocus(){var pe;(pe=F.current)==null||pe.focus()}},Me=x.useMemo(()=>({...q,required:M,disabled:Y,readOnly:te,checked:G}),[q,Y,te,G,M]),Oe=Me,Ge=T!==void 0,fe=[n,F,be],Q=[Ne,v,Ie,W,N?pe=>N.getValidationProps(Y,pe):tr],se=It("span",t,{enabled:!Ge,state:Me,ref:fe,props:Q,stateAttributesMapping:U2});return m.jsxs(I5.Provider,{value:Oe,children:[Ge?m.jsx(uA,{tag:"span",render:r,className:i,style:b,state:Me,refs:fe,props:Q,stateAttributesMapping:U2}):se,m.jsx("input",{...Le,suppressHydrationWarning:!0})]})}),yte=x.forwardRef(function(t,n){const{render:r,className:i,style:a,keepMounted:o=!1,...c}=t,u=gte(),d=u.checked,{mounted:p,transitionStatus:h,setMounted:y}=Rl(d),b={...u,transitionStatus:h},v=x.useRef(null),T=o||p,A=It("span",t,{ref:[n,v],state:b,props:c,stateAttributesMapping:U2});return $a({batch:!0,enabled:!d,open:d,ref:v,onComplete(){d||y(!1)}}),T?A:null});function xte(e){const{loopFocus:t=!0,orientation:n="both",grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:c,rootRef:u,enableHomeAndEndKeys:d=!1,stopEventPropagation:p,disabledIndices:h,modifierKeys:y=ks}=e,[b,v]=x.useState(0),T=r!=null,A=x.useRef(null),w=Ys(A,u),k=x.useRef([]),C=x.useRef(!1),R=x.useRef(null),O=o??b,N=mt((B,U=!1)=>{if(R.current=k.current[B]??null,(c??v)(B),U){const q=k.current[B];g3(A.current,q,a,n)}}),I=mt(B=>{var V;if(B.size===0)return;if(C.current){const H=k.current,W=H.indexOf(R.current);if(W===-1){const Y=H[O];!Y||Cf(H,O,h)?N(vte(H,h)):R.current=Y}else W!==O&&N(W);return}C.current=!0;const U=Array.from(B.keys()),q=U.find(H=>H==null?void 0:H.hasAttribute(My))??null,K=q?((V=B.get(q))==null?void 0:V.index)??-1:-1;if(K!==-1)N(K);else if(Cf(U,O,h)){const H=hl(U,{disabledIndices:h});Ph(U,H)||N(H)}g3(A.current,q,a,n)});lt(()=>{if(h==null||o!=null||!C.current)return;const B=k.current;if(Cf(B,O,h)){const U=hl(B,{disabledIndices:h});Ph(B,U)||N(U)}},[h,o,O,k,N]);const L=mt((B,U,q)=>i?i(B,U,q,k):q),j=mt(B=>{const U=B.key===F2||B.key===z2;if(!Wm.has(B.key)||!d&&U||Ete(B,y)||!A.current)return;const K=a==="rtl",V=K?$2:B2,H=K?B2:$2,W=n==="vertical"?j2:V,Y=n==="vertical"?P2:H,te=Gi(B.nativeEvent);if(te!=null&&m3(te)&&!g5(te)){const ae=te.selectionStart,re=te.selectionEnd,ye=te.value;if(ae==null||B.shiftKey||ae!==re||B.key!==Y&&ae<ye.length||B.key!==W&&ae>0)return}let M=O;const z=vb(k,h),G=O2(k,h);r!=null&&(M=r({disabledIndices:h,elementsRef:k,event:B,highlightedIndex:O,loopFocus:t,maxIndex:G,minIndex:z,onLoop:L,orientation:n,rtl:K}));const F=n!=="vertical"&&B.key===V||n!=="horizontal"&&B.key===j2,ee=n!=="vertical"&&B.key===H||n!=="horizontal"&&B.key===P2;d&&(B.key===F2?M=z:B.key===z2&&(M=G)),M===O&&(F||ee)&&(t&&M===G&&F?(M=z,i&&(M=i(B,O,M,k))):t&&M===z&&ee?(M=G,i&&(M=i(B,O,M,k))):M=hl(k.current,{startingIndex:M,decrement:ee,disabledIndices:h})),M!==O&&!Ph(k.current,M)&&(p&&B.stopPropagation(),(T||U||F||ee)&&B.preventDefault(),N(M,!0),queueMicrotask(()=>{var ae;(ae=k.current[M])==null||ae.focus()}))});return{props:{ref:w,onFocus(B){const U=A.current,q=Gi(B.nativeEvent);!U||q==null||!m3(q)||q.setSelectionRange(0,q.value.length)},onKeyDown:j},highlightedIndex:O,onHighlightedIndexChange:N,elementsRef:k,onMapChange:I,relayKeyboardEvent:j}}function vte(e,t){let n=-1;for(let r=0;r<e.length;r+=1){const i=e[r];if(!(!i||Cf(e,r,t))){if(i.hasAttribute(My))return r;n===-1&&(n=r)}}return Math.max(n,0)}function Ete(e,t){for(const n of OZ)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function hA(e){const{render:t,className:n,style:r,refs:i=ks,props:a=ks,state:o=tr,stateAttributesMapping:c,highlightedIndex:u,onHighlightedIndexChange:d,orientation:p,grid:h,loopFocus:y,onLoop:b,enableHomeAndEndKeys:v,onMapChange:T,stopEventPropagation:A=!0,rootRef:w,disabledIndices:k,modifierKeys:C,highlightItemOnHover:R=!1,tag:O="div",...N}=e,I=ky(),{props:L,highlightedIndex:j,onHighlightedIndexChange:P,elementsRef:B,onMapChange:U,relayKeyboardEvent:q}=xte({grid:h,loopFocus:y,onLoop:b,orientation:p,highlightedIndex:u,onHighlightedIndexChange:d,rootRef:w,stopEventPropagation:A,enableHomeAndEndKeys:v,direction:I,disabledIndices:k,modifierKeys:C}),K=It(O,e,{state:o,ref:i,props:[L,...a,N],stateAttributesMapping:c}),V=x.useMemo(()=>({highlightedIndex:j,onHighlightedIndexChange:P,highlightItemOnHover:R,relayKeyboardEvent:q}),[j,P,R,q]);return m.jsx(l4.Provider,{value:V,children:m.jsx(Ry,{elementsRef:B,onMapChange:H=>{T==null||T(H),U(H)},children:K})})}const Tte=[HP],wte=x.forwardRef(function(t,n){const{render:r,className:i,disabled:a,readOnly:o,required:c,onValueChange:u,value:d,defaultValue:p,form:h,name:y,inputRef:b,id:v,style:T,...A}=t,{setTouched:w,setFocused:k,validationMode:C,name:R,disabled:O,state:N,validation:I,setDirty:L,setFilled:j,validityData:P}=qc(),{labelId:B}=fd(),{clearErrors:U,elementRef:q}=jm(),K=Ree(!0),V=O||a,H=R??y,W=Gr(v),[Y,te]=Ws({controlled:d,default:p,name:"RadioGroup",state:"value"}),[M,z]=x.useState(!1),G=mt((be,Le)=>{u==null||u(be,Le),!Le.isCanceled&&te(be)}),F=I.getInputControl,ee=x.useMemo(()=>({get current(){return F()}}),[F]),ae=x.useRef(null),re=x.useRef(null);function ye(be){let Le;return b&&(typeof b=="function"?Le=b(be):b.current=be),ae.current=be,Le}const ge=mt(be=>{if(!be||be.disabled)return;re.current||(re.current=be);const Le=ae.current,Me=be.checked||Le==null||Le.disabled?ye(be):void 0;return()=>{re.current===be&&(re.current=null),ae.current===be?Me?(Me(),ae.current=null):ye(null):Me==null||Me()}}),Te=mt(()=>{const be=q.current;if(!be)return Y??null;for(const Le of I.registeredInputs.keys())if(Le.checked&&Iee(Le,be))return Y??null;return null});Pm(ee,W,Y??null,Te,!V,y),Xf(Y,()=>{U(H),L(Y!==P.initialValue),j(Y!=null),I.change(Y);const be=re.current;Y==null&&be&&!be.disabled&&ye(be)});const $e=B??(K==null?void 0:K.legendId),He={...N,disabled:V??!1,required:c??!1,readOnly:o??!1},Ne=x.useMemo(()=>({checkedValue:Y,disabled:V,form:h,validation:I,name:H,readOnly:o,registerInputRef:ge,required:c,setCheckedValue:G,setTouched:z,touched:M}),[Y,V,h,I,H,o,ge,c,G,z,M]),Ie={id:v,role:"radiogroup","aria-required":c||void 0,"aria-disabled":V||void 0,"aria-readonly":o||void 0,"aria-labelledby":$e,onFocus(){k(!0)},onBlur(be){Lt(be.currentTarget,be.relatedTarget)||(w(!0),k(!1),C==="onBlur"&&I.commit(Y))},onKeyDownCapture(be){be.key.startsWith("Arrow")&&(z(!0),k(!0))}};return m.jsx(O5.Provider,{value:Ne,children:m.jsx(hA,{render:r,className:i,style:T,state:He,props:[Ie,A,be=>I.getValidationProps(V??!1,be)],refs:[n],stateAttributesMapping:Yf,enableHomeAndEndKeys:!1,modifierKeys:Tte})})});function Ste({className:e,...t}){return m.jsx(wte,{"data-slot":"radio-group",className:De("grid w-full gap-2",e),...t})}function Ate({className:e,...t}){return m.jsx(bte,{"data-slot":"radio-group-item",className:De("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",e),...t,children:m.jsx(yte,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:m.jsx("span",{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground"})})})}function _te(e){const t=x.useRef(!0);t.current&&(t.current=!1,e())}const M5=x.createContext(void 0),D5=x.createContext(void 0),L5=x.createContext(void 0);function Do(){const e=x.useContext(M5);if(e===void 0)throw new Error(Cn(60));return e}function Dy(){const e=x.useContext(D5);if(e===void 0)throw new Error(Cn(101));return e}function P5(){const e=x.useContext(L5);if(e===void 0)throw new Error(Cn(61));return e}function Cte(e,t,n=Object.is){const{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}const j5=(e,t)=>Object.is(e,t);function id(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function kte(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!Cte(e,t,(r,i)=>id(r,i,n)):e!==t}function H2(e,t,n){return e?e.some(r=>r===void 0?!1:id(t,r,n)):!1}function wb(e,t,n){return e?e.findIndex(r=>r===void 0?!1:id(r,t,n)):-1}function Nte(e,t){if(t!==j5)return r=>H2(e,r,t);const n=new Set(e);return n.delete(void 0),r=>n.has(r)&&(r!==0||e.some(i=>Object.is(r,i)))}function $5(e,t,n,r){const i=r&&Array.isArray(t)?e.findIndex(Nte(t,n)):wb(e,t,n);return i===-1?null:i}function Rte(e,t,n,r,i,a){return H2(r,t,i)?a!=null&&e>a&&H2(r,n[a],i)?a:e:e===a?$5(n,r,i,!0):a}function Ote(e,t,n){return e.filter(r=>!id(t,r,n))}function Ite(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function B5(e){return Ite(e==null?void 0:e[0])}function Mte(e){return B5(e)?e.flatMap(t=>t.items):e}function Dte(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(B5(t)){for(const n of t)for(const r of n.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function F5(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return Xb(e)}function cf(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Xb(e.value):Xb(e)}function z5(e,t,n){function r(){return F5(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){const a=Mte(t);if(e==null||typeof e!="object"){const o=a.find(c=>c.value===e);return o&&o.label!=null?o.label:r()}if("value"in e){const o=a.find(c=>c&&c.value===e.value);if(o&&o.label!=null)return o.label}}return r()}function Lte(e,t,n){return e.reduce((r,i,a)=>(a>0&&r.push(", "),r.push(m.jsx(x.Fragment,{children:z5(i,t,n)},a)),r),[])}const Pte={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:cf(t,r)!==""},hasNullItemLabel:(e,t)=>t?Dte(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{const n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(i=>id(t,i,n)):id(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows},Us=1;function mA(e,t){return Math.max(0,e-t)}function Qb(e,t){if(t<=0)return 0;const n=Pu(e,0,t),r=n,i=t-n,a=r<=Us,o=i<=Us;return a&&o?r<=i?0:t:a?0:o?t:n}function jte(e){const{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:c,name:u,form:d,autoComplete:p,disabled:h=!1,readOnly:y=!1,required:b=!1,modal:v=!0,actionsRef:T,inputRef:A,onOpenChangeComplete:w,items:k,multiple:C=!1,itemToStringLabel:R,itemToStringValue:O,isItemEqualToValue:N=j5,highlightItemOnHover:I=!0,children:L}=e,{clearErrors:j}=jm(),{setDirty:P,setTouched:B,setFocused:U,validityData:q,setFilled:K,name:V,disabled:H,validation:W,validationMode:Y}=qc(),te=Wf({id:t}),M=H||h,z=V??u,[G,F]=Ws({controlled:n,default:C?r??ks:r,name:"Select",state:"value"}),[ee,ae]=Ws({controlled:a,default:o,name:"Select",state:"open"}),re=x.useRef([]),ye=x.useRef([]),ge=x.useRef(null),Te=x.useRef(null),$e=x.useRef(0),He=x.useRef(null),Ne=x.useRef([]),Ie=x.useRef(!1),be=x.useRef(null),Le=x.useRef(null),Me=x.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Oe=x.useRef(!1),Ge=x.useRef(G),{mounted:fe,setMounted:Q,transitionStatus:se}=Rl(ee),{openMethod:pe,triggerProps:Be}=VP(ee),xe=Ai(()=>new Qf({id:te,labelId:void 0,modal:v,multiple:C,itemToStringLabel:R,itemToStringValue:O,isItemEqualToValue:N,value:G,open:ee,mounted:fe,transitionStatus:se,items:k,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:tr,triggerProps:tr,triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:xr,setOpen:xr,handleScrollArrowVisibility:xr,onOpenChangeComplete:xr,listRef:re,popupRef:ge,scrollHandlerRef:Te,scrollArrowsMountedCountRef:$e,valueRef:He,valuesRef:Ne,labelsRef:ye,typingRef:Ie,selectionRef:Me,firstItemTextRef:be,selectedItemTextRef:Le,alignItemWithTriggerActiveRef:Oe,initialValueRef:Ge},Pte)).current,Qe=xe.useState("activeIndex"),oe=xe.useState("selectedIndex"),ue=xe.useState("triggerElement"),ze=xe.useState("positionerElement"),nt=JJ(pe),ht=pe??nt,Yt=x.useMemo(()=>C?"":cf(G,O),[C,G,O]),Xt=x.useMemo(()=>C&&Array.isArray(G)?G.map(Xe=>cf(Xe,O)):cf(G,O),[C,G,O]),at=ai(ue),xt=mt(()=>Xt);Pm(at,te,G,xt,!M,u);const Ft=C?Array.isArray(G)&&G.length>0:G!=null&&Yt!=="";lt(()=>{K(Ft)},[Ft,K]),lt(function(){const Tt=$5(Ne.current,G,N,C);Tt===null&&(Le.current=null),!ee&&xe.set("selectedIndex",Tt)},[C,ee,G,N,xe]),Xf(G,()=>{j(z),P(kte(G,q.initialValue,N)),W.change(G)});const Mt=mt((Xe,Tt)=>{c==null||c(Xe,Tt),!Tt.isCanceled&&(ae(Xe),!Xe&&(Tt.reason===Rc||Tt.reason===K1)&&(B(!0),U(!1),Y==="onBlur"&&W.commit(G)))}),Qt=mt(()=>{Q(!1),xe.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),w==null||w(!1)});$a({enabled:!T,open:ee,ref:ge,onComplete(){ee||Qt()}}),x.useImperativeHandle(T,()=>({unmount:Qt}),[Qt]);const vt=mt((Xe,Tt)=>{i==null||i(Xe,Tt),!Tt.isCanceled&&F(Xe)}),zn=mt(Xe=>{const Tt=mA(Xe.scrollHeight,Xe.clientHeight),Pt=Qb(Xe.scrollTop,Tt),qn=Pt>0,Pn=Pt<Tt;xe.set("scrollUpArrowVisible",qn),xe.set("scrollDownArrowVisible",Pn)}),Jt=EZ({open:ee,onOpenChange:Mt,elements:{reference:ue,floating:ze}}),un=qm(Jt,{enabled:!M,event:"mousedown"}),kn=Vm(Jt),Dt=FP(Jt,{enabled:!M,listRef:re,activeIndex:Qe,selectedIndex:oe,disabledIndices:ks,onNavigate(Xe){Xe===null&&!ee||xe.set("activeIndex",Xe)},focusItemOnHover:I}),ne=zP(Jt,{enabled:!M&&(ee||!y&&!C),listRef:ye,activeIndex:Qe,selectedIndex:oe,disabledIndices:Xe=>g5(re.current[Xe]),onMatch(Xe){ee?xe.set("activeIndex",Xe):vt(Ne.current[Xe],jt(es))},onTyping(Xe){Ie.current=Xe}}),Ce=x.useMemo(()=>La(ne.reference,Dt.reference,kn.reference,un.reference,Be),[un.reference,ne.reference,Dt.reference,kn.reference,Be]),le=x.useMemo(()=>La(Km,ne.floating,Dt.floating,kn.floating),[ne.floating,Dt.floating,kn.floating]),Fe=Dt.item??tr;xe.useContextCallback("setValue",vt),xe.useContextCallback("setOpen",Mt),xe.useContextCallback("handleScrollArrowVisibility",zn),xe.useContextCallback("onOpenChangeComplete",w),_te(()=>{xe.update({popupProps:le,triggerProps:Ce})}),xe.useSyncedValues({id:te,modal:v,multiple:C,value:G,open:ee,mounted:fe,transitionStatus:se,popupProps:le,triggerProps:Ce,items:k,itemToStringLabel:R,itemToStringValue:O,isItemEqualToValue:N,openMethod:ht});const dt=x.useMemo(()=>({disabled:M,readOnly:y,required:b,multiple:C,highlightItemOnHover:I,itemProps:Fe}),[M,y,b,C,I,Fe]),St=Ys(A,W.inputRef),We=C?void 0:z,rt=x.useMemo(()=>!C||!Array.isArray(G)||!z?null:G.map(Xe=>{const Tt=cf(Xe,O);return m.jsx("input",{type:"hidden",form:d,name:z,value:Tt,disabled:M},Tt)}),[C,G,d,z,O,M]);return m.jsxs(M5.Provider,{value:xe,children:[m.jsx(D5.Provider,{value:dt,children:m.jsx(L5.Provider,{value:Jt,children:L})}),m.jsx("input",{...W.getValidationProps(M,{onFocus(){var Xe;(Xe=xe.state.triggerElement)==null||Xe.focus({focusVisible:!0})},onChange(Xe){if(Xe.nativeEvent.defaultPrevented||M||y)return;const Tt=Xe.currentTarget.value,Pt=jt(es,Xe.nativeEvent);function qn(){if(C)return;const Pn=Tt.toLowerCase();let Xn=Ne.current.findIndex(zt=>cf(zt,O).toLowerCase()===Pn||F5(zt,R).toLowerCase()===Pn);Xn===-1&&(Xn=Ne.current.findIndex((zt,mn)=>{const kr=ye.current[mn];return kr!=null&&kr.toLowerCase()===Pn}));const Vn=Ne.current[Xn];Vn!=null&&vt(Vn,Pt)}xe.set("forceMount",!0),queueMicrotask(qn)}}),id:te&&We==null?`${te}-hidden-input`:void 0,form:d,name:We,autoComplete:p,value:Yt,disabled:M,required:b&&!(C&&Ft),readOnly:y,ref:St,style:z?G1:Kf,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),rt]})}function $te(e,t){return e??t}const Bte="data-popup-side",Fte=400,zte={...Ub,...Yf,popupSide:e=>e?{[Bte]:e}:null,value:()=>null},Ute=x.forwardRef(function(t,n){var $e;const{render:r,className:i,id:a,disabled:o=!1,nativeButton:c=!0,style:u,...d}=t,{setTouched:p,setFocused:h,validationMode:y,validation:b,state:v,disabled:T}=qc(),{labelId:A}=fd(),w=Do(),{readOnly:k,required:C,disabled:R}=Dy(),O=T||R||o,N=w.useState("open"),I=w.useState("mounted"),L=w.useState("value"),j=w.useState("triggerProps"),P=w.useState("positionerElement"),B=w.useState("listElement"),U=w.useState("popupSide"),q=w.useState("id"),K=w.useState("labelId"),V=w.useState("hasSelectedValue"),H=I&&P?U:null,W=a??q,Y=$te(A,K);Wf({id:a});const te=ai(P),M=x.useRef(null),{getButtonProps:z,buttonRef:G}=is({disabled:O,native:c}),F=w.useStateSetter("triggerElement"),ee=xi(),ae=xi(),re=xi();x.useEffect(()=>{if(N)return re.start(Fte,()=>{w.context.selectionRef.current.allowUnselectedMouseUp=!0,w.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{re.clear()};w.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},ae.clear()},[N,w,ae,re]);const ye=La(j,{id:W,role:"combobox","aria-expanded":N,"aria-haspopup":"listbox","aria-controls":N?(B==null?void 0:B.id)??(($e=qb(P))==null?void 0:$e.id):void 0,"aria-labelledby":Y,"aria-readonly":k||void 0,"aria-required":C||void 0,tabIndex:O?-1:0,onFocus(He){h(!0),N&&w.context.alignItemWithTriggerActiveRef.current&&w.context.setOpen(!1,jt(es,He.nativeEvent)),ee.start(0,()=>{w.set("forceMount",!0)})},onBlur(He){Lt(P,He.relatedTarget)||(p(!0),h(!1),y==="onBlur"&&b.commit(L))},onMouseDown(He){if(N)return;const Ne=yn(He.currentTarget);function Ie(be){if(!M.current)return;const Le=be.target;Lt(M.current,Le)||Lt(te.current,Le)||d5(be,M.current)||w.context.setOpen(!1,jt(g4,be))}ae.start(0,()=>{Ne.addEventListener("mouseup",Ie,{once:!0})})}},d,z),ge=b.getValidationProps(O,ye);ge.role="combobox";const Te={...v,open:N,disabled:O,value:L,readOnly:k,popupSide:H,placeholder:!V};return It("button",t,{ref:[n,M,G,F],state:Te,stateAttributesMapping:zte,props:ge})}),Hte={value:()=>null},qte=x.forwardRef(function(t,n){const{className:r,render:i,children:a,placeholder:o,style:c,...u}=t,d=Do(),p=d.useState("value"),h=d.useState("items"),y=d.useState("itemToStringLabel"),b=d.useState("hasSelectedValue"),v=!b&&o!=null&&a==null,T=d.useState("hasNullItemLabel",v),A={value:p,placeholder:!b};let w=null;return typeof a=="function"?w=a(p):a!=null?w=a:v&&!T?w=o:Array.isArray(p)?w=Lte(p,h,y):w=z5(p,h,y),It("span",t,{state:A,ref:[n,d.context.valueRef],props:[{children:w},u],stateAttributesMapping:Hte})}),Vte=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,d={open:Do().useState("open")};return It("span",t,{state:d,ref:n,props:[{"aria-hidden":!0,children:"▼"},o],stateAttributesMapping:Fm})}),Gte=x.forwardRef(function(t,n){const r=Do(),i=r.useState("mounted"),a=r.useState("forceMount");return i||a?m.jsx(ay,{ref:n,...t}):null}),U5=x.createContext(void 0);function gA(){const e=x.useContext(U5);if(!e)throw new Error(Cn(59));return e}function Zb(e,t){e&&Object.assign(e.style,t)}const H5={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},Kte={position:"fixed"},Yte=x.forwardRef(function(t,n){const{anchor:r,className:i,render:a,positionMethod:o,side:c,align:u,sideOffset:d,alignOffset:p,collisionBoundary:h="clipping-ancestors",collisionPadding:y,arrowPadding:b,sticky:v,disableAnchorTracking:T,alignItemWithTrigger:A=!0,collisionAvoidance:w=hP,style:k,...C}=t,R=Do(),O=P5(),N=R.useState("open"),I=R.useState("mounted"),L=R.useState("modal"),j=R.useState("value"),P=R.useState("openMethod"),B=R.useState("positionerElement"),U=R.useState("triggerElement"),q=R.useState("isItemEqualToValue"),K=R.useState("transitionStatus"),V=x.useRef(null),H=x.useRef(null),[W,Y]=x.useState(A),te=I&&W&&P!=="touch";!I&&W!==A&&Y(A),x.useImperativeHandle(R.context.alignItemWithTriggerActiveRef,()=>te),cA((te||L)&&N,P==="touch",B,U);const M=Ny({anchor:r,floatingRootContext:O,positionMethod:o,mounted:I,side:c,sideOffset:d,align:u,alignOffset:p,arrowPadding:b,collisionBoundary:h,collisionPadding:y,sticky:v,disableAnchorTracking:T??te,collisionAvoidance:w,keepMounted:!0}),z=te?"none":M.side,G=te?Kte:M.positionerStyles,F={open:N,side:z,align:M.align,anchorHidden:M.anchorHidden};lt(()=>{R.set("popupSide",M.side)},[R,M.side]);const ee=R.useStateSetter("positionerElement"),ae=Oy(t,F,{styles:G,transitionStatus:K,props:C,refs:[n,ee],hidden:!I,inert:!N}),re=x.useRef(0),ye=mt(Te=>{if(R.context.valuesRef.current.length===0)return;const $e=re.current;re.current=Te.size;const He=jt(es);if($e!==0&&!R.state.multiple&&j!==null&&wb(R.context.valuesRef.current,j,q)===-1){const Ie=R.context.initialValueRef.current,Le=Ie!=null&&wb(R.context.valuesRef.current,Ie,q)!==-1?Ie:null;R.context.setValue(Le,He),Le===null&&(R.set("selectedIndex",null),R.context.selectedItemTextRef.current=null)}if($e!==0&&R.state.multiple&&Array.isArray(j)){const Ne=j.filter(Ie=>wb(R.context.valuesRef.current,Ie,q)!==-1);Ne.length!==j.length&&(R.context.setValue(Ne,He),Ne.length===0&&(R.set("selectedIndex",null),R.context.selectedItemTextRef.current=null))}if(N&&te){R.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Ne={height:""};Zb(B,Ne),Zb(R.context.popupRef.current,Ne)}}),ge=x.useMemo(()=>({...M,side:z,alignItemWithTriggerActive:te,setControlledAlignItemWithTrigger:Y,scrollUpArrowRef:V,scrollDownArrowRef:H}),[M,z,te,Y]);return m.jsx(Ry,{elementsRef:R.context.listRef,labelsRef:R.context.labelsRef,onMapChange:ye,children:m.jsxs(U5.Provider,{value:ge,children:[I&&L&&m.jsx(Ey,{inert:Xm(!N),cutout:U}),ae]})})}),U0="base-ui-disable-scrollbar",q2={className:U0,getElement(e){return m.jsx("style",{nonce:e,href:U0,precedence:"base-ui:low",children:`.${U0}{scrollbar-width:none}.${U0}::-webkit-scrollbar{display:none}`})}},Wte=x.createContext(void 0),Xte={disableStyleElements:!1};function Qte(){return x.useContext(Wte)??Xte}const N3="--transform-origin",Zte={...zm,...Ol},Jte=x.forwardRef(function(t,n){const{render:r,className:i,style:a,finalFocus:o,...c}=t,u=Do(),{multiple:d,readOnly:p,highlightItemOnHover:h}=Dy(),y=P5(),{side:b,align:v,alignItemWithTriggerActive:T,isPositioned:A,setControlledAlignItemWithTrigger:w}=gA(),k=Cy()!=null,C=ky(),{nonce:R,disableStyleElements:O}=Qte(),N=u.useState("id"),I=u.useState("open"),L=u.useState("openMethod"),j=u.useState("mounted"),P=u.useState("popupProps"),B=u.useState("transitionStatus"),U=u.useState("triggerElement"),q=u.useState("positionerElement"),K=u.useState("listElement"),V=x.useRef(!1),H=x.useRef(!1),W=x.useRef({}),Y=$f(),te=mt(F=>{if(!q||!u.context.popupRef.current||!H.current)return;const ee=q.style.top==="0px",ae=q.style.bottom==="0px";if(V.current||!T||!ee&&!ae){u.context.handleScrollArrowVisibility(F);return}const re=O3(q),ye=kh(q.getBoundingClientRect().height,"y",re),ge=yn(q),Te=_r(q),$e=Te.getComputedStyle(q),He=parseFloat($e.marginTop),Ne=parseFloat($e.marginBottom),Ie=R3(Te.getComputedStyle(u.context.popupRef.current)),be=Math.min(ge.documentElement.clientHeight-He-Ne,Ie),Le=F.scrollTop,Me=H0(F);let Oe=null;const Ge=pe=>{q.style.height=`${pe}px`},fe=ee?Me-Le:Le,Q=Math.min(ye+fe,be);if(fe<=Us){const pe=Pu(fe,0,be-ye);pe>0&&Ge(ye+pe),F.scrollTop=ee?Me:0,be-(ye+pe)<=Us&&(V.current=!0),u.context.handleScrollArrowVisibility(F);return}if(be-Q>Us)Oe=ee?1/0:0;else if(ae&&Le<Me){const pe=ye+fe-be;Oe=Le-(fe-pe)}const se=Math.ceil(Q);if(se!==0&&Ge(se),Oe!=null){const pe=Pu(Oe,0,H0(F));Math.abs(F.scrollTop-pe)>Us&&(F.scrollTop=pe)}se>=be-Us&&(V.current=!0),u.context.handleScrollArrowVisibility(F)});x.useImperativeHandle(u.context.scrollHandlerRef,()=>te,[te]),$a({open:I,ref:u.context.popupRef,onComplete(){I&&u.context.onOpenChangeComplete(!0)}});const M={open:I,transitionStatus:B,side:b,align:v};lt(()=>{!q||!u.context.popupRef.current||Object.keys(W.current).length||(W.current={top:q.style.top||"0",left:q.style.left||"0",right:q.style.right,height:q.style.height,bottom:q.style.bottom,minHeight:q.style.minHeight,maxHeight:q.style.maxHeight,marginTop:q.style.marginTop,marginBottom:q.style.marginBottom})},[u,q]),lt(()=>{I||T||(H.current=!1,V.current=!1,Zb(q,W.current))},[I,T,q]),lt(()=>{var ae,re;const F=u.context.popupRef.current;if(!I||!U||!q||!F||T&&!A||u.state.transitionStatus==="ending")return;if(H.current=!0,F.style.removeProperty(N3),!T){Y.request(()=>u.context.handleScrollArrowVisibility(K||F));return}const ee=ene(F);try{let ye=u.context.selectedItemTextRef.current;ye!=null&&ye.isConnected||(ye=!u.select("hasSelectedValue")&&((ae=u.context.firstItemTextRef.current)!=null&&ae.isConnected)?u.context.firstItemTextRef.current:null);const ge=u.context.valueRef.current,Te=_r(q),$e=Te.getComputedStyle(q),He=Te.getComputedStyle(F),Ne=yn(U),Ie=O3(U),be=q0(U.getBoundingClientRect(),Ie),Le=q0(q.getBoundingClientRect(),Ie),Me=be.height,Oe=K||F,Ge=Oe.scrollHeight,fe=parseFloat(He.borderBottomWidth),Q=parseFloat($e.marginTop)||10,se=parseFloat($e.marginBottom)||10,pe=parseFloat($e.minHeight)||100,Be=R3(He),xe=5,Qe=5,oe=20,ue=Ne.documentElement.clientHeight-Q-se,ze=Ne.documentElement.clientWidth,nt=ue-be.bottom+Me;let ht,Yt=C==="rtl"?be.right-Le.width:be.left,Xt=0;if(ye&&ge){const Dt=q0(ge.getBoundingClientRect(),Ie);ht=q0(ye.getBoundingClientRect(),Ie),Yt=Le.left+(C==="rtl"?Dt.right-ht.right:Dt.left-ht.left);const ne=Dt.top-be.top+Dt.height/2;Xt=ht.top-Le.top+ht.height/2-ne}const at=nt+Xt+se+fe;let xt=Math.min(ue,at);const Ft=ue-Q-se,Mt=at-xt,Qt=ze-Qe;q.style.left=`${Pu(Yt,xe,Qt-Le.width)}px`,q.style.height=`${xt}px`,q.style.maxHeight="none",q.style.marginTop=`${Q}px`,q.style.marginBottom=`${se}px`,F.style.height="100%";const vt=H0(Oe),zn=Mt>=vt-Us;zn&&(xt=Math.min(ue,Le.height)-(Mt-vt));const Jt=be.top<oe||be.bottom>ue-oe||Math.ceil(xt)+Us<Math.min(Ge,pe),un=(((re=Te.visualViewport)==null?void 0:re.scale)??1)!==1&&Il;if(Jt||un){Zb(q,W.current),w(!1);return}const kn=Math.max(pe,xt);if(zn){const Dt=Math.max(0,ue-at);q.style.top=Le.height>=Ft?"0":`${Dt}px`,q.style.height=`${xt}px`,Oe.scrollTop=H0(Oe)}else q.style.bottom="0",Oe.scrollTop=Mt;if(ht){const Dt=Le.top,ne=Le.height,Ce=ht.top+ht.height/2,le=Pu(ne>0?(Ce-Dt)/ne*100:50,0,100);F.style.setProperty(N3,`50% ${le}%`)}(kn===ue||xt>=Be)&&(V.current=!0),u.context.handleScrollArrowVisibility(Oe),h&&u.state.selectedIndex===null&&u.state.activeIndex===null&&u.context.listRef.current[0]!=null&&u.set("activeIndex",0)}finally{ee()}},[u,I,q,U,T,w,Y,K,h,C,A]),x.useEffect(()=>{if(!T||!q||!I)return;const F=_r(q);function ee(ae){u.context.setOpen(!1,jt($W,ae))}return cn(F,"resize",ee)},[u,T,q,I]);const z={...K?{role:"presentation"}:{role:"listbox","aria-multiselectable":d||void 0,"aria-readonly":p||void 0,id:`${N}-list`},onKeyDown(F){k&&Wm.has(F.key)&&F.stopPropagation()},onScroll(F){K||te(F.currentTarget)},...T&&{style:K?{height:"100%"}:H5},className:!K&&T?q2.className:void 0},G=It("div",t,{ref:[n,u.context.popupRef],state:M,stateAttributesMapping:Zte,props:[P,z,Jm(B),c]});return m.jsxs(x.Fragment,{children:[!O&&q2.getElement(R),m.jsx(sy,{context:y,modal:!1,disabled:!j,openInteractionType:L,returnFocus:o,restoreFocus:!0,children:G})]})});function R3(e){const t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function H0(e){return mA(e.scrollHeight,e.clientHeight)}function O3(e){return kP.getScale(e)}function kh(e,t,n){return e/n[t]}function q0(e,t){return rm({x:kh(e.x,"x",t),y:kh(e.y,"y",t),width:kh(e.width,"x",t),height:kh(e.height,"y",t)})}const I3=[["transform","none"],["scale","1"],["translate","0 0"]];function ene(e){const{style:t}=e,n={};for(const[r,i]of I3)n[r]=t.getPropertyValue(r),t.setProperty(r,i,"important");return()=>{for(const[r]of I3){const i=n[r];i?t.setProperty(r,i):t.removeProperty(r)}}}const tne=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,c=Do(),{multiple:u,readOnly:d}=Dy(),{alignItemWithTriggerActive:p}=gA(),h=c.useState("hasScrollArrows"),y=c.useState("openMethod"),v={id:`${c.useState("id")}-list`,role:"listbox","aria-multiselectable":u||void 0,"aria-readonly":d||void 0,onScroll(A){var w,k;(k=(w=c.context.scrollHandlerRef).current)==null||k.call(w,A.currentTarget)},...p&&{style:H5},className:h&&y!=="touch"?q2.className:void 0},T=c.useStateSetter("listElement");return It("div",t,{ref:[n,T],props:[v,o]})}),q5=x.createContext(void 0);function bA(){const e=x.useContext(q5);if(!e)throw new Error(Cn(57));return e}const nne=x.memo(x.forwardRef(function(t,n){const{render:r,className:i,style:a,value:o=null,label:c,disabled:u=!1,nativeButton:d=!1,...p}=t,h=x.useRef(null),y=pd({guess:!0,label:c,textRef:h}),b=Do(),{itemProps:v,multiple:T,disabled:A,readOnly:w}=Dy(),k=A||u,C=b.useState("isActive",y.index),R=b.useState("open"),O=b.useState("isSelected",o),N=b.useState("isSelectedByFocus",y.index),I=b.useState("isItemEqualToValue"),L=y.index,j=x.useRef(null);lt(()=>{const M=b.context.valuesRef.current;return M[L]=o,()=>{delete M[L]}},[L,o,b]),lt(()=>{const M=b.state.value,z=b.state.selectedIndex;let G=z,F;T&&Array.isArray(M)?(G=Rte(L,o,b.context.valuesRef.current,M,I,z),F=G===L,L===z&&!F&&(b.context.selectedItemTextRef.current=null)):(F=M!==void 0&&id(o,M,I),F&&(G=L)),b.set("selectedIndex",G),F&&h.current&&(b.context.selectedItemTextRef.current=h.current)},[L,T,I,b,o]);const P=x.useRef("mouse"),B=x.useRef(!1),{getButtonProps:U,buttonRef:q}=is({disabled:k,focusableWhenDisabled:!0,native:d,composite:!0}),K={disabled:k,selected:O,highlighted:C};function V(M){if(A||w)return;const z=b.state.value;if(T){const G=Array.isArray(z)?z:[],F=O?Ote(G,o,I):[...G,o];b.context.setValue(F,jt(qu,M))}else b.context.setValue(o,jt(qu,M)),b.context.setOpen(!1,jt(qu,M))}function H(){b.context.selectionRef.current.dragY=0}const W={role:"option","aria-selected":O,tabIndex:R&&C?0:-1,onKeyDown(M){b.set("activeIndex",L),M.key===" "&&b.context.typingRef.current&&M.preventDefault()},onClick(M){const z=P.current!=="touch",G=M.nativeEvent.pointerType,F=z&&ey(M.nativeEvent)&&(G!==void 0||C),ee=z&&!F&&!B.current;B.current=!1,!(k||ee)&&V(M.nativeEvent)},onPointerEnter(M){P.current=M.pointerType},onPointerMove(M){if(M.pointerType==="mouse"&&M.buttons===1){const z=b.context.selectionRef.current;z.dragY+=M.movementY,z.dragY**2>=64&&(z.allowUnselectedMouseUp=!0)}},onPointerDown(M){P.current=M.pointerType,B.current=!0,H()},onMouseUp(){var G;if(H(),k||P.current==="touch"||B.current)return;const M=!b.context.selectionRef.current.allowSelectedMouseUp&&O,z=!b.context.selectionRef.current.allowUnselectedMouseUp&&!O;M||z||(B.current=!0,(G=j.current)==null||G.click(),B.current=!1)}},Y=It("div",t,{ref:[q,n,y.ref,j],state:K,props:[v,W,p,U]}),te=x.useMemo(()=>({selected:O,index:L,textRef:h,selectedByFocus:N}),[O,L,h,N]);return m.jsx(q5.Provider,{value:te,children:Y})})),rne=x.forwardRef(function(t,n){const{selected:r}=bA();return t.keepMounted||r?m.jsx(ine,{...t,ref:n}):null}),ine=x.memo(x.forwardRef((e,t)=>{const{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:c}=bA(),u=x.useRef(null),{transitionStatus:d,setMounted:p}=Rl(c),y=It("span",e,{ref:[t,u],state:{selected:c,transitionStatus:d},props:[{"aria-hidden":!0,children:"✔️"},o],stateAttributesMapping:Ol});return $a({batch:!0,enabled:!c,open:c,ref:u,onComplete(){c||p(!1)}}),y})),ane=x.memo(x.forwardRef(function(t,n){const{index:r,textRef:i,selectedByFocus:a}=bA(),o=Do(),{render:c,className:u,style:d,...p}=t,h=x.useCallback(b=>{b&&(r===0&&(o.context.firstItemTextRef.current=b),a&&(o.context.selectedItemTextRef.current=b))},[o,r,a]);return It("div",t,{ref:[h,n,i],props:p})})),V5=x.forwardRef(function(t,n){const{render:r,className:i,style:a,direction:o,keepMounted:c,...u}=t,d=o==="up",p=Do(),{side:h,scrollDownArrowRef:y,scrollUpArrowRef:b}=gA(),v=d?"scrollUpArrowVisible":"scrollDownArrowVisible",T=p.useState(v),A=p.useState("openMethod"),w=T&&A!=="touch",k=xi(),C=d?b:y,{mounted:R,transitionStatus:O,setMounted:N}=Rl(w);lt(()=>(p.context.scrollArrowsMountedCountRef.current+=1,p.set("hasScrollArrows",!0),()=>{p.context.scrollArrowsMountedCountRef.current=Math.max(0,p.context.scrollArrowsMountedCountRef.current-1),p.context.scrollArrowsMountedCountRef.current===0&&p.set("hasScrollArrows",!1)}),[p]),$a({open:w,ref:C,onComplete(){w||N(!1)}});const j=It("div",t,{ref:[n,C],state:{direction:o,visible:w,side:h,transitionStatus:O},props:[{"aria-hidden":!0,children:d?"▲":"▼",style:{position:"absolute"},onMouseMove(B){if(B.movementX===0&&B.movementY===0||k.isStarted())return;p.set("activeIndex",null);function U(){var Y;const q=p.state.listElement??p.context.popupRef.current;if(!q)return;p.set("activeIndex",null),p.context.handleScrollArrowVisibility(q);const K=mA(q.scrollHeight,q.clientHeight),V=Qb(q.scrollTop,K),H=V===(d?0:K),W=p.context.listRef.current;if(V!==q.scrollTop&&(q.scrollTop=V),H){k.clear();return}if(W.length>0){const te=((Y=C.current)==null?void 0:Y.offsetHeight)||0;q.scrollTop=sne(W,d,V,q.clientHeight,te,K)}k.start(40,U)}k.start(40,U)},onMouseLeave(){k.clear()}},u],stateAttributesMapping:Ol});return R||c?j:null});function sne(e,t,n,r,i,a){if(t){let p=0;const h=n+i-Us;for(let v=0;v<e.length;v+=1){const T=e[v];if(T&&T.offsetTop>=h){p=v;break}}const y=Math.max(0,p-1),b=e[y];return y<p&&b?Qb(b.offsetTop-i,a):0}let o=e.length-1;const c=n+r-i+Us;for(let p=0;p<e.length;p+=1){const h=e[p];if(h&&h.offsetTop+h.offsetHeight>c){o=Math.max(0,p-1);break}}const u=Math.min(e.length-1,o+1),d=e[u];return u>o&&d?Qb(d.offsetTop+d.offsetHeight-r+i,a):a}const one=x.forwardRef(function(t,n){return m.jsx(V5,{...t,ref:n,direction:"down"})}),lne=x.forwardRef(function(t,n){return m.jsx(V5,{...t,ref:n,direction:"up"})}),G5=x.createContext(void 0);function cne(){const e=x.useContext(G5);if(e===void 0)throw new Error(Cn(56));return e}const une=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,[c,u]=x.useState(),d=x.useMemo(()=>({labelId:c,setLabelId:u}),[c,u]),p=It("div",t,{ref:n,props:[{role:"group","aria-labelledby":c},o]});return m.jsx(G5.Provider,{value:d,children:p})}),dne=x.forwardRef(function(t,n){const{render:r,className:i,style:a,id:o,...c}=t,{setLabelId:u}=cne(),d=Gr(o);return lt(()=>(u(d),()=>{u(h=>h===d?void 0:h)}),[d,u]),It("div",t,{ref:n,props:[{id:d,"aria-hidden":!0},c]})}),fne=x.forwardRef(function(t,n){const{className:r,render:i,orientation:a="horizontal",style:o,...c}=t;return It("div",t,{state:{orientation:a},ref:n,props:[{role:"presentation"},c]})}),pne=fne,Dc=jte;function hne({className:e,...t}){return m.jsx(une,{"data-slot":"select-group",className:De("scroll-my-1 p-1",e),...t})}function Lc({className:e,...t}){return m.jsx(qte,{"data-slot":"select-value",className:De("flex flex-1 text-left",e),...t})}function Pc({className:e,size:t="default",children:n,...r}){return m.jsxs(Ute,{"data-slot":"select-trigger","data-size":t,className:De("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-background py-2 pr-2 pl-2.5 shadow-xs text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,m.jsx(Vte,{render:m.jsx(X1,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function jc({className:e,children:t,side:n="bottom",sideOffset:r=4,align:i="center",alignOffset:a=0,alignItemWithTrigger:o=!0,...c}){return m.jsx(Gte,{children:m.jsx(Yte,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:"isolate z-[110]",children:m.jsxs(Jte,{"data-slot":"select-content","data-align-trigger":o,className:De("relative isolate z-[110] max-h-(--available-height) w-auto max-w-[min(420px,var(--available-width))] min-w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...c,children:[m.jsx(K5,{}),m.jsx(tne,{children:t}),m.jsx(Y5,{})]})})})}function mne({className:e,...t}){return m.jsx(dne,{"data-slot":"select-label",className:De("px-1.5 py-1 text-xs text-muted-foreground",e),...t})}function $c({className:e,children:t,...n}){return m.jsxs(nne,{"data-slot":"select-item",className:De("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[m.jsx(ane,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:t}),m.jsx(rne,{render:m.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:m.jsx(Bm,{className:"pointer-events-none"})})]})}function gne({className:e,...t}){return m.jsx(pne,{"data-slot":"select-separator",className:De("pointer-events-none -mx-1 my-1 h-px bg-border",e),...t})}function K5({className:e,...t}){return m.jsx(lne,{"data-slot":"select-scroll-up-button",className:De("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:m.jsx(sX,{})})}function Y5({className:e,...t}){return m.jsx(one,{"data-slot":"select-scroll-down-button",className:De("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:m.jsx(X1,{})})}function bne({className:e,...t}){return m.jsx("div",{"data-slot":"skeleton",className:De("animate-pulse rounded-md bg-muted",e),...t})}function Wc({className:e,...t}){return m.jsx(mX,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:De("size-4 animate-spin",e),...t})}const W5=x.createContext(void 0);function yne(){const e=x.useContext(W5);if(e===void 0)throw new Error(Cn(63));return e}const xne="data-checked",vne="data-unchecked",X5={...Yf,checked(e){return e?{[xne]:""}:{[vne]:""}}},Ene=x.forwardRef(function(t,n){const{checked:r,className:i,defaultChecked:a,"aria-labelledby":o,form:c,id:u,inputRef:d,name:p,nativeButton:h=!1,onCheckedChange:y,readOnly:b=!1,required:v=!1,disabled:T=!1,render:A,uncheckedValue:w,value:k,style:C,...R}=t,{clearErrors:O}=jm(),{state:N,setTouched:I,setDirty:L,validityData:j,setFilled:P,setFocused:B,validationMode:U,disabled:q,name:K,validation:V}=qc(),{labelId:H}=fd(),W=q||T,Y=K??p,te=x.useRef(null),M=Ys(te,d,V.inputRef),z=x.useRef(null),G=Gr(),F=Wf({id:u}),ee=h?void 0:F,[ae,re]=Ws({controlled:r,default:!!a,name:"Switch",state:"checked"});Pm(z,G,ae,void 0,!W,p),lt(()=>{P(ae)},[ae,P]),Xf(ae,()=>{O(Y),L(ae!==j.initialValue),V.change(ae)});const{getButtonProps:ye,buttonRef:ge}=is({disabled:W,native:h}),Te=wS(o,H,te,!h,ee),$e={id:h?F:G,role:"switch","aria-checked":ae,"aria-readonly":b||void 0,"aria-required":v||void 0,"aria-labelledby":Te,onFocus(){W||B(!0)},onBlur(){const be=te.current;!be||W||(I(!0),B(!1),U==="onBlur"&&V.commit(be.checked))},onClick(be){if(b||W)return;be.preventDefault();const Le=te.current;Le&&Hu(Le,be)}},He={...V.getValidationProps(W),checked:ae,disabled:W,form:c,id:ee,name:Y,required:v,style:Y?G1:Kf,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:M,onChange(be){if(be.nativeEvent.defaultPrevented)return;if(b){be.preventDefault();return}const Le=be.currentTarget.checked,Me=jt(es,be.nativeEvent);y==null||y(Le,Me),!Me.isCanceled&&re(Le)},onClick(be){be.stopPropagation()},onFocus(){var be;(be=z.current)==null||be.focus()},...k!==void 0?{value:k}:tr},Ne=x.useMemo(()=>({...N,checked:ae,disabled:W,readOnly:b,required:v}),[N,ae,W,b,v]),Ie=It("span",t,{state:Ne,ref:[n,z,ge],props:[$e,R,ye,be=>V.getValidationProps(W,be)],stateAttributesMapping:X5});return m.jsxs(W5.Provider,{value:Ne,children:[Ie,!ae&&Y&&w!==void 0&&m.jsx("input",{type:"hidden",form:c,name:Y,value:w,disabled:W}),m.jsx("input",{...He,suppressHydrationWarning:!0})]})}),Tne=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,c=yne();return It("span",t,{state:c,ref:n,stateAttributesMapping:X5,props:o})});function wne({className:e,size:t="default",...n}){return m.jsx(Ene,{"data-slot":"switch","data-size":t,className:De("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...n,children:m.jsx(Tne,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform 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)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}function Sne({className:e,...t}){return m.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:m.jsx("table",{"data-slot":"table",className:De("w-full caption-bottom text-sm",e),...t})})}function Ane({className:e,...t}){return m.jsx("thead",{"data-slot":"table-header",className:De("[&_tr]:border-b",e),...t})}function _ne({className:e,...t}){return m.jsx("tbody",{"data-slot":"table-body",className:De("[&_tr:last-child]:border-0",e),...t})}function Cne({className:e,...t}){return m.jsx("tfoot",{"data-slot":"table-footer",className:De("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})}function kne({className:e,...t}){return m.jsx("tr",{"data-slot":"table-row",className:De("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...t})}function Nne({className:e,...t}){return m.jsx("th",{"data-slot":"table-head",className:De("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",e),...t})}function Rne({className:e,...t}){return m.jsx("td",{"data-slot":"table-cell",className:De("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",e),...t})}function One({className:e,...t}){return m.jsx("caption",{"data-slot":"table-caption",className:De("mt-4 text-sm text-muted-foreground",e),...t})}const Q5=x.createContext(void 0);function yA(){const e=x.useContext(Q5);if(e===void 0)throw new Error(Cn(64));return e}const Ine="data-activation-direction",Ly={tabActivationDirection:e=>({[Ine]:e})},Mne=x.forwardRef(function(t,n){const{className:r,defaultValue:i=0,onValueChange:a,orientation:o="horizontal",render:c,value:u,style:d,...p}=t,h=t.defaultValue!==void 0,y=x.useRef([]),[b,v]=x.useState(()=>new Map),[T,A]=Ws({controlled:u,default:i,name:"Tabs",state:"value"}),w=u!==void 0,[k,C]=x.useState(()=>new Map),R=x.useRef(void 0),O=x.useCallback(ge=>V2(k,ge),[k]),[N,I]=x.useState(()=>({previousValue:T,tabActivationDirection:"none"})),{previousValue:L,tabActivationDirection:j}=N;let P=j,B=!1;L!==T&&(P=M3(L,T,o,k),B=L!=null&&T!=null&&O(T)==null);const U=B?L:T,q=L!==U||j!==P;lt(()=>{q&&I({previousValue:U,tabActivationDirection:P})},[U,q,P]);const K=mt((ge,Te)=>{const $e=M3(T,ge,o,k);Te.activationDirection=$e,a==null||a(ge,Te),!Te.isCanceled&&A(ge)}),V=mt((ge,Te)=>{a==null||a(ge,jt(Te,void 0,void 0,{activationDirection:"none"}))}),H=mt((ge,Te)=>(v($e=>{const He=new Map($e);return He.set(ge,Te),He}),()=>{v($e=>{if($e.get(ge)!==Te)return $e;const He=new Map($e);return He.delete(ge),He})})),W=x.useCallback(ge=>b.get(ge),[b]),Y=x.useCallback(ge=>{for(const Te of k.values())if(ge===Te.value)return Te.id},[k]),te=x.useMemo(()=>({getTabElementBySelectedValue:O,getTabIdByPanelValue:Y,getTabPanelIdByValue:W,onValueChange:K,orientation:o,registerMountedTabPanel:H,setTabMap:C,tabActivationDirection:P,value:T}),[O,Y,W,K,o,H,C,P,T]),M=x.useMemo(()=>{for(const ge of k.values())if(ge.value===T)return ge},[k,T]),z=x.useMemo(()=>{for(const ge of k.values())if(!ge.disabled)return ge.value},[k]),G=x.useRef(!h),F=x.useRef(i),ee=x.useRef(h),ae=x.useRef(!1);lt(()=>{var Ne;if(w)return;function ge(Ie,be){A(Ie),I({previousValue:Ie,tabActivationDirection:"none"}),V(Ie,be),G.current=!1}if(k.size===0){ae.current&&T!==null&&!((Ne=R.current)!=null&&Ne.isConnected)&&ge(null,PI);return}ae.current=!0,R.current=k.keys().next().value;const Te=M==null?void 0:M.disabled,$e=M==null&&T!==null;if(!Te&&T===F.current&&(ee.current=!1),ee.current&&Te&&T===F.current)return;const He=G.current;if(Te||$e){const Ie=z??null;if(T===Ie){G.current=!1;return}let be=PI;He?be=jI:Te&&(be=b4),ge(Ie,be);return}He&&M!=null&&(V(T,jI),G.current=!1)},[z,w,V,M,A,k,T]);const ye=It("div",t,{state:{orientation:o,tabActivationDirection:P},ref:n,props:p,stateAttributesMapping:Ly});return m.jsx(Q5.Provider,{value:te,children:m.jsx(Ry,{elementsRef:y,children:ye})})});function V2(e,t){for(const[n,r]of e.entries())if(t===r.value)return n;return null}function M3(e,t,n,r){if(e==null||t==null)return"none";const[i,a,o]=n==="horizontal"?["left","left","right"]:["top","up","down"],c=V2(r,e),u=V2(r,t);if(c==null||u==null)return c!==u&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?t>e?o:a:"none";const d=c.getBoundingClientRect()[i],p=u.getBoundingClientRect()[i];return p<d?a:p>d?o:"none"}const Z5=x.createContext(void 0);function Dne(){const e=x.useContext(Z5);if(e===void 0)throw new Error(Cn(65));return e}const Lne=x.forwardRef(function(t,n){const{className:r,disabled:i=!1,render:a,value:o,id:c,nativeButton:u=!0,style:d,...p}=t,{value:h,getTabPanelIdByValue:y,onValueChange:b,orientation:v,tabActivationDirection:T}=yA(),{activateOnFocus:A,registerTabResizeObserverElement:w,tabsListElement:k}=Dne(),{highlightedIndex:C,onHighlightedIndexChange:R}=V1(),O=Gr(c),N=x.useMemo(()=>({disabled:i,id:O,value:o}),[i,O,o]),{compositeProps:I,compositeRef:L,index:j}=f5({metadata:N}),P=o===h,B=x.useRef(!1),U=x.useRef(null),q=mt(ae=>{var re;(re=U.current)==null||re.call(U),U.current=ae?w(ae):null});lt(()=>{if(B.current){B.current=!1;return}if(!(P&&j>-1&&C!==j))return;const ae=k;if(ae!=null){const re=ta(yn(ae));if(re&&Lt(ae,re))return}i||R(j)},[P,j,C,R,i,k]);const{getButtonProps:K,buttonRef:V}=is({disabled:i,native:u,focusableWhenDisabled:!0}),H=y(o),W=x.useRef(!1),Y=x.useRef(!1);function te(ae){b(o,jt(es,ae.nativeEvent,void 0,{activationDirection:"none"}))}function M(ae){P||i||te(ae)}function z(ae){P||i||A&&(!W.current||Y.current)&&te(ae)}function G(ae){if(P||i)return;W.current=!0,Y.current=ae.button===0;const re=yn(ae.currentTarget);function ye(){W.current=!1,Y.current=!1,re.removeEventListener("pointerup",ye),re.removeEventListener("pointercancel",ye)}re.addEventListener("pointerup",ye),re.addEventListener("pointercancel",ye)}return It("button",t,{state:{disabled:i,active:P,orientation:v,tabActivationDirection:T},ref:[n,V,L,q],props:[I,{role:"tab","aria-controls":H,"aria-selected":P,id:O,onClick:M,onFocus:z,onPointerDown:G,[My]:P?"":void 0,onKeyDownCapture(){B.current=!0}},p,K],stateAttributesMapping:Ly})}),Pne="data-index",jne={...Ly,...Ol},$ne=x.forwardRef(function(t,n){const{className:r,value:i,render:a,keepMounted:o=!1,style:c,...u}=t,{value:d,getTabIdByPanelValue:p,orientation:h,tabActivationDirection:y,registerMountedTabPanel:b}=yA(),v=Gr(),{ref:T,index:A}=pd(),w=i===d,{mounted:k,transitionStatus:C,setMounted:R}=Rl(w),O=!k,N=p(i),I={hidden:O,orientation:h,tabActivationDirection:y,transitionStatus:C},L=x.useRef(null),j=It("div",t,{state:I,ref:[n,T,L],props:[{"aria-labelledby":N,hidden:O,id:v,role:"tabpanel",tabIndex:w?0:-1,inert:Xm(!w),[Pne]:A},u],stateAttributesMapping:jne});return $a({open:w,ref:L,onComplete(){w||R(!1)}}),lt(()=>{if(!(v==null||O&&!o))return b(i,v)},[O,o,i,v,b]),o||k?j:null}),Bne=x.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:i,loopFocus:a=!0,render:o,style:c,...u}=t,{orientation:d,setTabMap:p,tabActivationDirection:h}=yA(),[y,b]=x.useState(0),[v,T]=x.useState(null),A=x.useRef(new Set),w=x.useRef(new Set),k=x.useRef(null);lt(()=>{if(typeof ResizeObserver>"u")return;const L=new ResizeObserver(()=>{A.current.forEach(j=>{j()})});return k.current=L,v&&L.observe(v),w.current.forEach(j=>{L.observe(j)}),()=>{L.disconnect(),k.current=null}},[v]);const C=mt(L=>(A.current.add(L),()=>{A.current.delete(L)})),R=mt(L=>{var j;return w.current.add(L),(j=k.current)==null||j.observe(L),()=>{var P;w.current.delete(L),(P=k.current)==null||P.unobserve(L)}}),O={orientation:d,tabActivationDirection:h},N={"aria-orientation":d==="vertical"?"vertical":void 0,role:"tablist"},I=x.useMemo(()=>({activateOnFocus:r,registerIndicatorUpdateListener:C,registerTabResizeObserverElement:R,tabsListElement:v}),[r,C,R,v]);return m.jsx(Z5.Provider,{value:I,children:m.jsx(hA,{render:o,className:i,style:c,state:O,refs:[n,T],props:[N,u],stateAttributesMapping:Ly,highlightedIndex:y,enableHomeAndEndKeys:!0,loopFocus:a,orientation:d,onHighlightedIndexChange:b,onMapChange:p,disabledIndices:ks})})});function Fne({className:e,orientation:t="horizontal",...n}){return m.jsx(Mne,{"data-slot":"tabs","data-orientation":t,className:De("group/tabs flex gap-2 data-horizontal:flex-col",e),...n})}const J5=kl("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function zne({className:e,variant:t="default",...n}){return m.jsx(Bne,{"data-slot":"tabs-list","data-variant":t,className:De(J5({variant:t}),e),...n})}function Une({className:e,...t}){return m.jsx(Lne,{"data-slot":"tabs-trigger",className:De("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium 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 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","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",e),...t})}function Hne({className:e,...t}){return m.jsx($ne,{"data-slot":"tabs-content",className:De("flex-1 text-sm outline-none",e),...t})}function qne({className:e,...t}){return m.jsx("textarea",{"data-slot":"textarea",className:De("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-background px-2.5 py-2 shadow-xs text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...t})}const ej=x.createContext(void 0);function Vne(){return x.useContext(ej)}const xA=x.forwardRef(function(t,n){const{className:r,defaultPressed:i=!1,disabled:a=!1,form:o,onPressedChange:c,pressed:u,render:d,type:p,value:h,nativeButton:y=!0,style:b,...v}=t,T=Gr(h||void 0),A=Vne(),w=(A==null?void 0:A.value)??[],k=(a||(A==null?void 0:A.disabled))??!1,[C,R]=Ws({controlled:A?T!==void 0&&w.indexOf(T)>-1:u,default:i,name:"Toggle",state:"pressed"}),{getButtonProps:O,buttonRef:N}=is({disabled:k,native:y}),I={disabled:k,pressed:C},L=[N,n],j=[{"aria-pressed":C,onClick(U){var V;const q=!C,K=jt(es,U.nativeEvent);c==null||c(q,K),!K.isCanceled&&(T&&((V=A==null?void 0:A.setGroupValue)==null||V.call(A,T,q,K)),!K.isCanceled&&R(q))}},v,O],P=It("button",t,{enabled:!A,state:I,ref:L,props:j}),B=x.useMemo(()=>({disabled:k,focusableWhenDisabled:!1}),[k]);return A?m.jsx(uA,{tag:"button",render:d,className:r,style:b,metadata:B,state:I,refs:L,props:j}):P}),vA=kl("group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-muted"},size:{default:"h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",sm:"h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"}},defaultVariants:{variant:"default",size:"default"}});function tg({className:e,variant:t="default",size:n="default",...r}){return m.jsx(xA,{"data-slot":"toggle",className:De(vA({variant:t,size:n,className:e})),...r})}const Gne=x.createContext(void 0);function Kne(){return x.useContext(Gne)}const Yne=x.forwardRef(function(t,n){const{defaultValue:r,disabled:i=!1,loopFocus:a=!0,onValueChange:o,orientation:c="horizontal",multiple:u=!1,value:d,className:p,render:h,style:y,...b}=t,v=Cy(),T=Kne(),A=r??ks,w=d!==void 0||r!==void 0,k=((v==null?void 0:v.disabled)??!1)||((T==null?void 0:T.disabled)??!1)||i,[C,R]=Ws({controlled:d,default:A,name:"ToggleGroup",state:"value"}),O=mt((P,B,U)=>{let q;u?(q=C.slice(),B?q.push(P):q.splice(C.indexOf(P),1)):q=B?[P]:[],o==null||o(q,U),!U.isCanceled&&R(q)}),N={disabled:k,multiple:u,orientation:c},I=x.useMemo(()=>({disabled:k,setGroupValue:O,value:C,isValueInitialized:w}),[k,O,C,w]),L={role:"group"},j=It("div",t,{enabled:!!v,state:N,ref:n,props:[L,b]});return m.jsx(ej.Provider,{value:I,children:v?j:m.jsx(hA,{render:h,className:p,style:y,state:N,refs:[n],props:[L,b],loopFocus:a,enableHomeAndEndKeys:!0,orientation:c})})}),tj=x.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});function EA({className:e,variant:t,size:n,spacing:r=2,orientation:i="horizontal",children:a,...o}){return m.jsx(Yne,{"data-slot":"toggle-group","data-variant":t,"data-size":n,"data-spacing":r,"data-orientation":i,style:{"--gap":r},className:De("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch",e),...o,children:m.jsx(tj.Provider,{value:{variant:t,size:n,spacing:r,orientation:i},children:a})})}function Jb({className:e,children:t,variant:n="default",size:r="default",...i}){const a=x.useContext(tj);return m.jsx(xA,{"data-slot":"toggle-group-item","data-variant":a.variant||n,"data-size":a.size||r,"data-spacing":a.spacing,className:De("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",vA({variant:a.variant||n,size:a.size||r}),e),...i,children:t})}const nj=x.createContext(void 0);function ng(e){const t=x.useContext(nj);if(t===void 0&&!e)throw new Error(Cn(72));return t}const Wne={...gy,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class Xne extends Qf{constructor(n,r,i){const a=new Ym;super(Qne(n,a,r,i),Zne(a),Wne);pt(this,"setOpen",(n,r)=>{xZ(this,n,r,{extraState:{openChangeReason:r.reason}})})}cancelPendingOpen(n){this.state.floatingRootContext.dispatchOpenChange(!1,jt(wl,n))}}function Qne(e,t,n,r=!1){return{...my(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function Zne(e){return{popupRef:x.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const Jne=Gm(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:i,disableHoverablePopup:a=!1,trackCursorAxis:o="none",actionsRef:c,onOpenChange:u,onOpenChangeComplete:d,handle:p,triggerId:h,defaultTriggerId:y=null,children:b}=t,v=GS((B,U)=>new Xne({open:r,openProp:i,activeTriggerId:y,triggerIdProp:h},B,U));v.useControlledProp("openProp",i),v.useControlledProp("triggerIdProp",h),v.useContextCallback("onOpenChange",u),v.useContextCallback("onOpenChangeComplete",d);const T=v.useState("open"),A=!n&&T,w=v.useState("activeTriggerId"),k=v.useState("mounted"),C=v.useState("payload");v.useSyncedValues({trackCursorAxis:o,disableHoverablePopup:a,disabled:n}),fy(v,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:R,transitionStatus:O}=py(A,v),N=v.useState("isInstantPhase"),I=v.useState("instantType"),L=v.useState("lastOpenChangeReason"),j=x.useRef(null);lt(()=>{T&&n&&v.setOpen(!1,jt(b4))},[T,n,v]),lt(()=>{O==="ending"&&L===es||O!=="ending"&&N?(I!=="delay"&&(j.current=I),v.set("instantType","delay")):j.current!==null&&(v.set("instantType",j.current),j.current=null)},[O,N,L,I,v]),lt(()=>{A&&w==null&&v.set("payload",void 0)},[v,w,A]),x.useImperativeHandle(c,()=>({unmount:R,close:()=>v.setOpen(!1,jt(Y1))}),[R,v]);const P=A||k||!n&&o!=="none";return m.jsxs(nj.Provider,{value:v,children:[p&&m.jsx(cy,{handle:p,store:v}),P&&m.jsx(ere,{store:v,disabled:n,trackCursorAxis:o}),typeof b=="function"?b({payload:C}):b]})});function ere({store:e,disabled:t,trackCursorAxis:n}){const r=e.useState("floatingRootContext"),i=Vm(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),a=yQ(r,{enabled:!t&&n!=="none",axis:n==="none"?void 0:n}),o=x.useMemo(()=>La(a.reference,i.reference),[a.reference,i.reference]);return hy(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??tr}),null}const rj=x.createContext(void 0);function tre(){return x.useContext(rj)}const nre=600,ij="data-base-ui-tooltip-trigger";function D3(e){if("composedPath"in e){const n=e.composedPath();for(let r=0;r<n.length;r+=1){const i=n[r];if(xn(i))return i}}const t=e.target;return xn(t)?t:null}function rre(e){let t=e;for(;t;){const n=t.closest(`[${ij}]`);if(n)return n;const r=t.getRootNode();t="host"in r&&xn(r.host)?r.host:null}return null}const ire=ly(function(t,n){const{render:r,className:i,style:a,handle:o,payload:c,disabled:u,delay:d,closeOnClick:p=!0,closeDelay:h,id:y,...b}=t,v=ng(!0),A=by(o)??v;if(!A)throw new Error(Cn(82));const w=Gr(y),k=A.useState("isTriggerActive",w),C=A.useState("isOpenedByTrigger",w),R=A.useState("floatingRootContext"),O=x.useRef(null),N=h??0,{registerTrigger:I,isMountedByThisTrigger:L}=dy(w,O,A,{payload:c,closeOnClick:p,closeDelay:N}),j=tre(),{activeIdRef:P,delayRef:B,isInstantPhase:U,hasProvider:q}=qX(R,{open:C}),K=XS(R);A.useSyncedValue("isInstantPhase",U);const V=A.useState("disabled"),H=u??V,W=ai(H),Y=A.useState("trackCursorAxis"),te=A.useState("disableHoverablePopup"),M=x.useRef(!1),z=xi(),G=x.useRef(void 0);function F(){return q&&P.current!=null?0:d??j??nre}function ee(Ie){const be=O.current;if(!be||!Ie)return!1;const Le=rre(Ie);return Le!==null&&Le!==be&&Lt(be,Le)}function ae(Ie){const be=ee(Ie);return M.current=be,be&&(K.openChangeTimeout.clear(),K.restTimeout.clear(),K.restTimeoutPending=!1,z.clear()),be}const re=yy(R,{enabled:!H,mouseOnly:!0,move:!1,handleClose:!te&&Y!=="both"?vy():null,restMs:F,delay(){return h==null&&q?{close:nd(B.current,"close")}:{close:N}},triggerElementRef:O,isActiveTrigger:k,isClosing:()=>A.select("transitionStatus")==="ending",shouldOpen(){return!M.current}}),ye=$P(R,{enabled:!H}).reference,ge=Ie=>{const be=M.current,Le=D3(Ie),Me=ae(Le),Oe=O.current,Ge=Oe&&Le&&Lt(Oe,Le);if(Me&&A.select("open")&&A.select("lastOpenChangeReason")===ei){A.setOpen(!1,jt(ei,Ie));return}if(be&&!Me&&Ge&&!W.current&&!A.select("open")&&Oe&&Ac(G.current)){const fe=()=>{!M.current&&!W.current&&!A.select("open")&&A.setOpen(!0,jt(ei,Ie,Oe))},Q=F();Q===0?(z.clear(),fe()):z.start(Q,fe)}},Te=A.useState("triggerProps",L);return It("button",t,{state:{open:C},ref:[n,I,O],props:[re,ye,L||Y!=="none"?Te:void 0,{onMouseOver(Ie){ge(Ie.nativeEvent)},onFocus(Ie){ee(D3(Ie.nativeEvent))&&Ie.preventBaseUIHandler()},onMouseLeave(){M.current=!1,z.clear(),G.current=void 0},onPointerEnter(Ie){G.current=Ie.pointerType},onPointerDown(Ie){G.current=Ie.pointerType,A.set("closeOnClick",p),p&&!A.select("open")&&A.cancelPendingOpen(Ie.nativeEvent)},onClick(Ie){p&&!A.select("open")&&A.cancelPendingOpen(Ie.nativeEvent)},id:w,[k2]:H?"":void 0,[ij]:H?void 0:""},b],stateAttributesMapping:Fm})}),aj=x.createContext(void 0);function are(){const e=x.useContext(aj);if(e===void 0)throw new Error(Cn(70));return e}const sre=x.forwardRef(function(t,n){const{children:r,container:i,className:a,render:o,style:c,...u}=t,{node:d,subtree:p}=bP({container:i,ref:n,componentProps:t,elementProps:u});return!p&&!d?null:m.jsxs(x.Fragment,{children:[p,d&&fi.createPortal(r,d)]})}),ore=x.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t;return ng().useState("mounted")||r?m.jsx(aj.Provider,{value:r,children:m.jsx(sre,{ref:n,...i})}):null}),sj=x.createContext(void 0);function oj(){const e=x.useContext(sj);if(e===void 0)throw new Error(Cn(71));return e}const lre=x.forwardRef(function(t,n){const{render:r,className:i,anchor:a,positionMethod:o="absolute",side:c="top",align:u="center",sideOffset:d=0,alignOffset:p=0,collisionBoundary:h="clipping-ancestors",collisionPadding:y=5,arrowPadding:b=5,sticky:v=!1,disableAnchorTracking:T=!1,collisionAvoidance:A=BS,style:w,...k}=t,C=ng(),R=are(),O=C.useState("open"),N=C.useState("mounted"),I=C.useState("trackCursorAxis"),L=C.useState("disableHoverablePopup"),j=C.useState("floatingRootContext"),P=C.useState("instantType"),B=C.useState("transitionStatus"),U=C.useState("adaptiveOrigin"),q=Ny({anchor:a,positionMethod:o,floatingRootContext:j,mounted:N,side:c,sideOffset:d,align:u,alignOffset:p,collisionBoundary:h,collisionPadding:y,sticky:v,arrowPadding:b,disableAnchorTracking:T,keepMounted:R,collisionAvoidance:A,adaptiveOrigin:U}),K=x.useMemo(()=>({open:O,side:q.side,align:q.align,anchorHidden:q.anchorHidden,instant:I!=="none"?"tracking-cursor":P}),[O,q.side,q.align,q.anchorHidden,I,P]),V=Oy(t,K,{styles:q.positionerStyles,transitionStatus:B,props:k,refs:[n,C.useStateSetter("positionerElement")],hidden:!N,inert:!O||I==="both"||L});return m.jsx(sj.Provider,{value:q,children:V})}),cre=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,c=ng(),{side:u,align:d}=oj(),p=c.useState("open"),h=c.useState("instantType"),y=c.useState("transitionStatus"),b=c.useState("popupProps"),v=c.useState("floatingRootContext"),T=c.useState("disabled"),A=c.useState("closeDelay");$a({open:p,ref:c.context.popupRef,onComplete(){var R,O;p&&((O=(R=c.context).onOpenChangeComplete)==null||O.call(R,!0))}}),QS(v,{enabled:!T,closeDelay:A});const w=c.useStateSetter("popupElement");return It("div",t,{state:{open:p,side:u,align:d,instant:h,transitionStatus:y},ref:[n,c.context.popupRef,w],props:[Km,b,Jm(y),o],stateAttributesMapping:Um})}),ure=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,c=ng(),{arrowRef:u,side:d,align:p,arrowUncentered:h,arrowStyles:y}=oj(),b=c.useState("open"),v=c.useState("instantType");return It("div",t,{state:{open:b,side:d,align:p,uncentered:h,instant:v},ref:[n,u],props:[{style:y,"aria-hidden":!0},o],stateAttributesMapping:zm})}),dre=function(t){const{delay:n,closeDelay:r,timeout:i=400}=t,a=x.useMemo(()=>({open:n,close:r}),[n,r]);return m.jsx(rj.Provider,{value:n,children:m.jsx(HX,{delay:a,timeoutMs:i,children:t.children})})};function TA({delay:e=0,...t}){return m.jsx(dre,{"data-slot":"tooltip-provider",delay:e,...t})}function e1({...e}){return m.jsx(Jne,{"data-slot":"tooltip",...e})}function t1({...e}){return m.jsx(ire,{"data-slot":"tooltip-trigger",...e})}function n1({className:e,side:t="top",sideOffset:n=4,align:r="center",alignOffset:i=0,children:a,...o}){return m.jsx(ore,{children:m.jsx(lre,{align:r,alignOffset:i,side:t,sideOffset:n,className:"isolate z-[110]",children:m.jsxs(cre,{"data-slot":"tooltip-content",className:De("z-[110] inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-[110] **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...o,children:[a,m.jsx(ure,{className:"z-[110] size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}const lj="[--tone:var(--muted-foreground)] [--tone-soft:var(--secondary)] data-[tone=accent]:[--tone:var(--primary)] data-[tone=accent]:[--tone-soft:var(--accent)] data-[tone=success]:[--tone:var(--success)] data-[tone=success]:[--tone-soft:var(--success-soft)] data-[tone=purple]:[--tone:var(--primary)] data-[tone=purple]:[--tone-soft:var(--accent)]",Sb="focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-ring/60",fre=De(lj,Sb,"group/item flex w-full min-w-0 items-center gap-2.5 rounded-lg border border-transparent px-2.5 py-3 text-left","not-disabled:hover:bg-foreground/7 disabled:cursor-default disabled:opacity-55","aria-pressed:border-border-strong aria-pressed:bg-(--tone-soft)"),L3="min-h-0 min-w-0 flex-auto overflow-auto overscroll-contain [scrollbar-gutter:stable]",pre=900;function hre({label:e,items:t,selectedId:n,onSelect:r,disabled:i=!1,toolbar:a,detailHeader:o,children:c,detailFooter:u,emptyState:d,detailLabel:p="Details",className:h}){const y=x.useId(),b=x.useRef(null),v=x.useRef(null),T=x.useRef(null),A=x.useRef(new Map),w=x.useRef(null),[k,C]=x.useState(),[R,O]=x.useState(!1),N=new Map,I=new Set;for(const U of t){if(!U.id.trim()||I.has(U.id))throw new Error("ListDetail entries require unique, non-empty IDs.");I.add(U.id);const q=U.group??"",K=N.get(q)??[];K.push(U),N.set(q,K)}const L=t.find(U=>U.id===n),j=L!==void 0&&k===L.id;x.useEffect(()=>{const U=b.current;if(!U)throw new Error("ListDetail requires its root element for the width measurement.");const q=new ResizeObserver(([K])=>{const V=K.contentRect.width<pre;O(V),V||C(void 0)});return q.observe(U),()=>q.disconnect()},[]),x.useLayoutEffect(()=>{const U=w.current;if(!U||(w.current=null,U.target==="detail"&&(!j||(L==null?void 0:L.id)!==U.id)))return;const q=U.target==="detail"?v.current:A.current.get(U.id)??T.current;q==null||q.focus({preventScroll:!0}),q==null||q.scrollIntoView({block:"nearest",inline:"nearest"})},[k,L==null?void 0:L.id,j]);const P=U=>{R&&(w.current={target:"detail",id:U},C(U)),r(U)},B=()=>{L&&(w.current={target:"list",id:L.id},C(void 0))};return m.jsxs("section",{"aria-label":e,className:De("group/list-detail @container/list-detail flex min-h-0 min-w-0 flex-auto flex-col",h),"data-detail":j,ref:b,children:[a!==void 0&&m.jsx("div",{className:"flex flex-none flex-wrap items-center gap-2.5 pb-4.5 @max-[900px]/list-detail:group-data-[detail=true]/list-detail:hidden",children:a}),m.jsxs("div",{className:"grid min-h-0 min-w-0 flex-auto grid-cols-[minmax(0,0.9fr)_minmax(0,1.1fr)] grid-rows-[minmax(0,1fr)] gap-6 @max-[900px]/list-detail:grid-cols-[minmax(0,1fr)] @max-[900px]/list-detail:gap-0",children:[m.jsx("div",{"aria-label":e,className:De(L3,Sb,"pt-0.5 pr-1.5 pb-3 @max-[900px]/list-detail:group-data-[detail=true]/list-detail:hidden"),ref:T,role:"region",tabIndex:-1,children:t.length===0?m.jsx("div",{className:"p-6 text-[0.8rem] leading-relaxed text-muted-foreground",children:d??m.jsx("p",{children:"No entries available."})}):[...N].map(([U,q],K)=>m.jsxs("section",{"aria-labelledby":U?`${y}-group-${K}`:void 0,className:"not-first:mt-4.5",children:[U&&m.jsxs("h3",{className:"mx-2 mb-2 flex items-center gap-2.5 text-[0.67rem] font-bold tracking-[0.04em] text-muted-foreground",id:`${y}-group-${K}`,children:[U,m.jsx("span",{className:"font-mono text-[0.63rem] opacity-80","aria-label":`${q.length} entries`,children:q.length})]}),m.jsx("ul",{className:"grid grid-cols-[minmax(0,1fr)] gap-1 *:min-w-0",children:q.map(V=>m.jsx("li",{children:m.jsxs("button",{"aria-controls":`${y}-detail`,"aria-pressed":V.id===n,className:fre,"data-tone":V.tone??"neutral",disabled:i,onClick:()=>P(V.id),ref:H=>{H?A.current.set(V.id,H):A.current.delete(V.id)},type:"button",children:[V.icon!==void 0&&m.jsx("span",{className:"flex h-9 w-8 flex-none items-center justify-center rounded-sm border border-border-soft bg-(--tone-soft) text-(--tone) data-[tone=accent]:border-l-[3px] data-[tone=accent]:[border-left-color:var(--tone)] data-[tone=purple]:rounded-[10px_10px_10px_3px]","aria-hidden":"true","data-tone":V.tone??"neutral",children:V.icon}),m.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[m.jsx("span",{className:"text-[0.77rem] font-semibold leading-snug [overflow-wrap:anywhere] group-aria-pressed/item:font-bold group-aria-pressed/item:text-(--tone)",children:V.title}),V.description&&m.jsx("span",{className:"overflow-hidden text-[0.67rem] leading-[1.45] text-ellipsis whitespace-nowrap text-muted-foreground",children:V.description})]}),V.meta!==void 0&&m.jsx("span",{className:"max-w-[30%] flex-none text-[0.62rem] leading-snug text-muted-foreground [overflow-wrap:anywhere] @max-[900px]/list-detail:max-w-[24%] @max-[900px]/list-detail:text-[0.6rem]",children:V.meta}),m.jsx(X1,{className:"flex-none -rotate-90 text-muted-foreground",size:14})]})},V.id))})]},U))}),m.jsx("section",{"aria-label":p,className:De(lj,Sb,"flex max-h-full min-h-0 min-w-0 flex-col self-stretch overflow-hidden rounded-panel border border-border bg-card","@max-[900px]/list-detail:hidden @max-[900px]/list-detail:group-data-[detail=true]/list-detail:flex"),"data-tone":(L==null?void 0:L.tone)??"neutral",id:`${y}-detail`,ref:v,tabIndex:-1,children:L?m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"hidden flex-none border-b border-border-soft px-3.5 py-2.5 @max-[900px]/list-detail:flex",children:m.jsx(Er,{"aria-label":"Back to selection",className:"rounded-full",onClick:B,size:"icon",variant:"outline",children:m.jsx(AS,{})})}),o!==void 0&&m.jsx("header",{className:"flex-none border-b border-border-soft bg-(--tone-soft) px-6 py-6 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 @max-[900px]/list-detail:p-4.5",children:o}),m.jsx("div",{"aria-label":`${p}: content`,className:De(L3,Sb,"flex-1 px-6 py-6 text-[0.8rem] leading-[1.7] [overflow-wrap:anywhere] [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 @max-[900px]/list-detail:p-4.5"),role:"region",tabIndex:0,children:c}),u!==void 0&&m.jsx("footer",{className:"flex flex-none flex-wrap items-center gap-2.5 border-t border-border-soft px-6 py-4 @max-[900px]/list-detail:px-4.5 @max-[900px]/list-detail:py-3.5",children:u})]}):m.jsx("div",{className:"p-6 text-[0.8rem] leading-relaxed text-muted-foreground",children:m.jsx("p",{children:t.length?"Choose an entry to see the details.":"No selection available."})})})]})]})}const sm=6e4,om=60*sm,lm=24*om,cj=7*lm,uj=(e,t)=>new Date(e).toLocaleDateString("en-US",t?{day:"2-digit",month:"2-digit",year:"numeric"}:{day:"2-digit",month:"2-digit"}),mre=(e,t=Date.now())=>{const n=t-e;return n<sm?"now":n<om?`${Math.floor(n/sm)} min`:n<lm?`${Math.floor(n/om)} h`:n<cj?`${Math.floor(n/lm)} d`:uj(e,!1)},gre=(e,t=Date.now())=>{const n=t-e;if(n<sm)return"just now";if(n<om){const r=Math.floor(n/sm);return r===1?"1 minute ago":`${r} minutes ago`}if(n<lm){const r=Math.floor(n/om);return r===1?"1 hour ago":`${r} hours ago`}if(n<cj){const r=Math.floor(n/lm);return r===1?"1 day ago":`${r} days ago`}return uj(e,!0)};function bre({className:e,...t}){return m.jsx("div",{className:De("flex items-center justify-between text-[0.62rem] font-bold uppercase tracking-[0.07em] text-muted-foreground",e),...t})}function yre({children:e,className:t,state:n}){return m.jsxs("div",{"aria-live":"polite",className:De("w-[min(360px,100%)] text-center text-foreground",t),"data-startup":n.kind,role:n.kind==="error"?"alert":"status",children:[m.jsx("strong",{className:n.kind==="error"?"text-lg font-semibold text-destructive":"text-lg font-semibold",children:n.title}),n.kind==="working"&&m.jsx("div",{"aria-label":n.title,className:"mx-auto mt-5 h-[5px] overflow-hidden rounded-[5px] bg-border",role:"progressbar",children:m.jsx("span",{className:"block h-full w-[35%] rounded-[inherit] bg-primary animate-progress-sweep motion-reduce:animate-none motion-reduce:mx-auto"})}),m.jsx("p",{className:"pointer-events-auto mt-3.5 max-h-[30vh] overflow-auto text-[0.82rem] leading-[1.6] text-muted-foreground [overflow-wrap:anywhere]",children:n.detail}),e&&m.jsx("div",{className:"pointer-events-auto mt-4 flex flex-wrap justify-center gap-2",children:e})]})}const P3={running:"running",waiting:"waiting for input",idle:"idle",ended:"ended",failed:"failed",cancelled:"cancelled"},xre={connected:"connected",ready:"ready",starting:"starting","login-required":"sign-in required",unreachable:"unreachable",stopped:"stopped",failed:"failed",forbidden:"no access"},dj=(e,t=0)=>e==="waiting"&&t>0?`${P3.waiting} (${t})`:P3[e],fj=e=>xre[e],pj={running:{Icon:cX,tone:"text-success"},waiting:{Icon:lX,tone:"text-warning"},idle:{Icon:xb,tone:"text-muted-foreground"},ended:{Icon:oX,tone:"text-muted-foreground opacity-70"},failed:{Icon:uX,tone:"text-destructive"},cancelled:{Icon:O4,tone:"text-muted-foreground opacity-70"}},hj={connected:{Icon:xb,tone:"text-success",filled:!0},ready:{Icon:xb,tone:"text-success",filled:!0},starting:{Icon:pX,tone:"text-info"},"login-required":{Icon:BI,tone:"text-warning"},unreachable:{Icon:O4,tone:"text-destructive"},stopped:{Icon:xb,tone:"text-muted-foreground"},failed:{Icon:Q1,tone:"text-destructive"},forbidden:{Icon:BI,tone:"text-destructive"}},vre=e=>pj[e].tone,Ere=e=>hj[e].tone,mj="inline-flex flex-none items-center gap-1";function Tre({state:e,open:t=0,className:n}){const r=pj[e],i=dj(e,t),a=r.Icon;return m.jsxs("span",{className:De(mj,r.tone,n),title:i,children:[m.jsx(a,{className:"size-3.5"}),e==="waiting"&&t>0&&m.jsx("span",{"aria-hidden":!0,className:"font-mono text-[0.62rem] font-semibold leading-none",children:t}),m.jsx("span",{className:"sr-only",children:i})]})}function wre({state:e,className:t}){const n=hj[e],r=fj(e),i=n.Icon;return m.jsxs("span",{className:De(mj,n.tone,t),title:r,children:[m.jsx(i,{className:"size-3.5",...n.filled?{fill:"currentColor"}:{}}),m.jsx("span",{className:"sr-only",children:r})]})}function gj({className:e,...t}){return m.jsx(bX,{"aria-hidden":!0,className:De("text-destructive",e),fill:"currentColor",...t})}const Sre="text-destructive hover:bg-destructive/10 hover:text-destructive dark:hover:bg-destructive/20";function bj({label:e,busy:t=!1,className:n,title:r,...i}){return m.jsx(Er,{"aria-busy":t||void 0,"aria-label":e,className:De(Sre,n),title:r??e,variant:"ghost",...i,children:t?m.jsx(Wc,{}):m.jsx(gj,{})})}const Are={neutral:"text-border-strong",accent:"text-primary",success:"text-success",warning:"text-warning",danger:"text-destructive"},j3="fill-none stroke-current stroke-2 [stroke-linecap:round]";function _re({d:e,arrow:t="end",lineStyle:n="solid",tone:r="neutral",active:i=!1}){const a=`svg-edge${x.useId()}`;return m.jsxs("g",{className:Are[r],"data-active":i,"data-line-style":n,"data-tone":r,children:[t!=="none"&&m.jsx("defs",{children:m.jsx("marker",{id:a,viewBox:"0 0 12 12",markerWidth:"12",markerHeight:"12",markerUnits:"userSpaceOnUse",refX:"9",refY:"6",orient:"auto-start-reverse",children:m.jsx("path",{className:De(j3,"[stroke-linejoin:round]"),d:"M3,2 L9,6 L3,10"})})}),m.jsx("path",{className:De(j3,n==="dashed"&&"[stroke-dasharray:4_6]",i&&"[stroke-dasharray:9_5] animate-edge-flow motion-reduce:animate-none"),d:e,markerEnd:t==="none"?void 0:`url(#${a})`,markerStart:t==="both"?`url(#${a})`:void 0})]})}function Cre({disabled:e,onFiles:t,onPasteText:n}){const r=x.useRef(null),[i,a]=x.useState(!1),o=c=>{c.length&&t(c)};return{inputRef:r,dragging:i,clearDragging:()=>a(!1),inputProps:{ref:r,onChange:c=>{const u=Array.from(c.currentTarget.files??[]);c.currentTarget.value="",o(u)}},dropProps:{onDragOver:c=>{c.dataTransfer.types.includes("Files")&&(c.preventDefault(),c.dataTransfer.dropEffect=e?"none":"copy",a(!e))},onDragLeave:c=>{c.currentTarget.contains(c.relatedTarget)||a(!1)},onDrop:c=>{c.dataTransfer.types.includes("Files")&&(c.preventDefault(),a(!1),o(Array.from(c.dataTransfer.files)))},onPaste:c=>{const u=Array.from(c.clipboardData.files);if(!u.length)return;c.preventDefault(),o(u);const d=c.clipboardData.getData("text/plain");d&&(n==null||n(d))}}}}const kre=Object.freeze(Object.defineProperty({__proto__:null,Alert:Ju,AlertAction:Q6,AlertDescription:ed,AlertTitle:X6,Badge:s4,Button:Er,Card:Gf,CardAction:gW,CardContent:bW,CardDescription:mW,CardFooter:yW,CardHeader:pW,CardTitle:hW,Checkbox:G4,ConnectionStateIcon:wre,Dialog:wy,DialogBody:iA,DialogClose:WP,DialogContent:Sy,DialogDescription:aA,DialogFooter:XP,DialogHeader:rA,DialogOverlay:nA,DialogPortal:tA,DialogTitle:Qm,DialogTrigger:YP,DropdownMenu:nee,DropdownMenuCheckboxItem:dee,DropdownMenuContent:b5,DropdownMenuGroup:aee,DropdownMenuItem:oee,DropdownMenuLabel:see,DropdownMenuPortal:ree,DropdownMenuRadioGroup:fee,DropdownMenuRadioItem:pee,DropdownMenuSeparator:hee,DropdownMenuShortcut:mee,DropdownMenuSub:lee,DropdownMenuSubContent:uee,DropdownMenuSubTrigger:cee,DropdownMenuTrigger:iee,Empty:Vu,EmptyContent:bee,EmptyDescription:Fh,EmptyHeader:$h,EmptyMedia:dA,EmptyTitle:Bh,Field:Tee,FieldContent:wee,FieldDescription:_ee,FieldError:kee,FieldGroup:vee,FieldLabel:See,FieldLegend:xee,FieldSeparator:Cee,FieldSet:yee,FieldTitle:Aee,Input:am,Label:y5,ListDetail:hre,Popover:fA,PopoverContent:pA,PopoverDescription:Jee,PopoverHeader:Qee,PopoverTitle:Zee,PopoverTrigger:Xee,Progress:ute,ProgressIndicator:R5,ProgressLabel:dte,ProgressTrack:N5,ProgressValue:fte,RadioGroup:Ste,RadioGroupItem:Ate,RunStateIcon:Tre,SectionLabel:bre,Select:Dc,SelectContent:jc,SelectGroup:hne,SelectItem:$c,SelectLabel:mne,SelectScrollDownButton:Y5,SelectScrollUpButton:K5,SelectSeparator:gne,SelectTrigger:Pc,SelectValue:Lc,Separator:x5,Skeleton:bne,Spinner:Wc,StartupNotice:yre,StopButton:bj,StopGlyph:gj,SvgEdge:_re,Switch:wne,Table:Sne,TableBody:_ne,TableCaption:One,TableCell:Rne,TableFooter:Cne,TableHead:Nne,TableHeader:Ane,TableRow:kne,Tabs:Fne,TabsContent:Hne,TabsList:zne,TabsTrigger:Une,Textarea:qne,Toggle:tg,ToggleGroup:EA,ToggleGroupItem:Jb,Tooltip:e1,TooltipContent:n1,TooltipProvider:TA,TooltipTrigger:t1,badgeVariants:a4,buttonVariants:u4,cn:De,connectionStateTone:Ere,connectionStateWord:fj,longTime:gre,runStateTone:vre,runStateWord:dj,shortTime:mre,tabsListVariants:J5,toggleVariants:vA,useFileInput:Cre},Symbol.toStringTag,{value:"Module"})),yj="access",G2=(e,t)=>{var n;return!e.enabled&&!e.user||!!((n=e.user)!=null&&n.rights.some(r=>r==="*"||r===t))},wT=(e,t)=>{var n,r;return G2(e,"runs.write")&&(G2(e,"runs.create")||!!((r=(n=e.user)==null?void 0:n.startEntries)!=null&&r.includes(t)))},xj=e=>({...e,can:t=>G2(e,t)}),K2=xj({enabled:!1,user:null});function Y2(e){if(!e||typeof e!="object")throw new Error("Invalid user configuration");const t=e;if(typeof t.enabled!="boolean")throw new Error("Invalid sign-in mode");if(t.user===null)return{enabled:t.enabled,user:null};const n=t.user;if(!n||typeof n.id!="string"||typeof n.label!="string"||!Array.isArray(n.rights)||!n.rights.every(r=>typeof r=="string")||n.startEntries!==void 0&&(!Array.isArray(n.startEntries)||!n.startEntries.every(r=>typeof r=="string"&&r.length>0)))throw new Error("Invalid signed-in user");return{enabled:t.enabled,user:{id:n.id,label:n.label,rights:n.rights,...n.startEntries!==void 0?{startEntries:n.startEntries}:{}}}}const Nre=/^\/(?:api|rpc|files)(?:\/|$)/;function Rre(e,t,n){return async(r,i)=>{const a=await e(r,i),o=new URL(typeof r=="string"||r instanceof URL?r:r.url,t);return a.status===401&&o.origin===t&&!o.pathname.startsWith("/api/access/")&&Nre.test(o.pathname)&&n(),a}}const _n=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),vj=(e,t)=>{const n=Object.keys(e).sort(),r=[...t].sort();return n.length===r.length&&n.every((i,a)=>i===r[a])},Ore=Object.freeze(Object.defineProperty({__proto__:null,hasExactKeys:vj,isRecord:_n},Symbol.toStringTag,{value:"Module"})),r1=async(e,t)=>{try{const n=await e.json();if(_n(n)&&typeof n.error=="string"&&n.error.trim())return new Error(n.error)}catch{}return new Error(t)},Ire=Object.freeze(Object.defineProperty({__proto__:null,errorFrom:r1},Symbol.toStringTag,{value:"Module"})),Mre="flex flex-none items-center gap-2 self-stretch min-h-header max-w-[220px] px-3 py-1.5 border-r border-border text-left text-[0.72rem] leading-tight text-foreground no-underline [&>svg]:flex-none",Dre="cursor-pointer hover:not-disabled:bg-accent aria-expanded:bg-accent aria-pressed:bg-accent aria-expanded:text-primary aria-pressed:text-primary active:not-disabled:bg-accent active:not-disabled:text-primary aria-expanded:shadow-[inset_0_2px_5px_color-mix(in_srgb,var(--foreground)_25%,transparent),inset_0_-2px_0_var(--primary)] aria-pressed:shadow-[inset_0_2px_5px_color-mix(in_srgb,var(--foreground)_25%,transparent),inset_0_-2px_0_var(--primary)] focus-visible:outline-2 focus-visible:outline-ring/60 focus-visible:-outline-offset-3 disabled:opacity-50 disabled:cursor-not-allowed";function Vs({as:e="span",className:t,...n}){const r=e==="button"||e==="a";return x.createElement(e,{className:De(Mre,r&&Dre,t),...n})}function wA({className:e,...t}){return m.jsx("span",{className:De("flex min-w-0 flex-col gap-0.5",e),...t})}function SA({className:e,...t}){return m.jsx("span",{className:De("font-mono text-[0.58rem] font-medium uppercase tracking-[0.05em] text-muted-foreground",e),...t})}function wc({className:e,...t}){return m.jsx("span",{className:De("line-clamp-2 whitespace-normal [overflow-wrap:anywhere]",e),...t})}const Lre=Object.freeze(Object.defineProperty({__proto__:null,ToolbarCopy:wA,ToolbarItem:Vs,ToolbarLabel:SA,ToolbarText:wc},Symbol.toStringTag,{value:"Module"})),Ej="grid min-h-dvh place-items-center p-6",Tj="w-[min(100%,380px)]",wj="gap-0 p-8 shadow-pop max-sm:p-6",$3="mb-5 grid gap-2 text-[0.85rem] font-semibold",AA=x.createContext({...K2,logout:async()=>{}}),sa=()=>x.useContext(AA);function Sj({children:e}){return m.jsx("main",{className:Ej,children:m.jsx(Gf,{className:De(Tj,wj),children:e})})}function Pre({children:e,Login:t=jre}){const[n,r]=x.useState(),[i,a]=x.useState(),[o,c]=x.useState(0);x.useEffect(()=>{const p=new AbortController,h=window.fetch;return window.fetch=Rre(h.bind(window),window.location.origin,()=>{r(y=>y!=null&&y.enabled?{enabled:!0,user:null}:y)}),a(void 0),fetch("/api/access",{cache:"no-store",signal:p.signal}).then(async y=>{if(!y.ok)throw await r1(y,"Could not load the sign-in state.");const b=Y2(await y.json());p.signal.aborted||r(b)}).catch(y=>{p.signal.aborted||a(y instanceof Error?y.message:String(y))}),()=>{p.abort(),window.fetch=h}},[o]),x.useEffect(()=>{if(!(n!=null&&n.enabled))return;const p=()=>{document.visibilityState!=="hidden"&&fetch("/api/access",{cache:"no-store"}).then(async h=>{if(!h.ok)return;const y=Y2(await h.json());r(b=>{var v,T;return((v=b==null?void 0:b.user)==null?void 0:v.id)===((T=y.user)==null?void 0:T.id)?b:y})}).catch(()=>{})};return window.addEventListener("focus",p),document.addEventListener("visibilitychange",p),()=>{window.removeEventListener("focus",p),document.removeEventListener("visibilitychange",p)}},[n==null?void 0:n.enabled]);const u=x.useCallback(async()=>{const p=await fetch("/api/access/logout",{method:"POST"});if(!p.ok)throw await r1(p,"Sign-out failed.");r({enabled:!0,user:null})},[]),d=x.useMemo(()=>({...xj(n??{enabled:!0,user:null}),logout:u}),[n,u]);return n?m.jsx(AA.Provider,{value:d,children:n.enabled&&!n.user?m.jsx(t,{onLogin:r}):e}):m.jsxs(Sj,{children:[m.jsx("h1",{className:"my-3 text-[1.5rem]",children:"RAgents"}),i?m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"mb-6 leading-normal",role:"alert",children:i}),m.jsx(Er,{variant:"outline",onClick:()=>c(p=>p+1),children:"Reload"})]}):m.jsx("p",{className:"mb-6 leading-normal",role:"status",children:"Checking sign-in ..."})]})}function jre({onLogin:e}){const[t,n]=x.useState(""),[r,i]=x.useState(""),[a,o]=x.useState(!1),[c,u]=x.useState();return m.jsx("main",{className:Ej,children:m.jsx("form",{className:Tj,onSubmit:d=>{d.preventDefault(),!a&&(o(!0),u(void 0),fetch("/api/access/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:t.trim(),password:r})}).then(async p=>{if(!p.ok)throw await r1(p,"Sign-in failed.");const h=Y2(await p.json());if(h.enabled&&!h.user)throw new Error("The server did not confirm the sign-in.");i(""),e(h)}).catch(p=>{i(""),u(p instanceof Error?p.message:String(p))}).finally(()=>o(!1)))},children:m.jsxs(Gf,{className:wj,children:[m.jsx("span",{className:"text-sm font-semibold text-muted-foreground",children:"RAgents"}),m.jsx("h1",{className:"my-3 text-[1.5rem]",children:"Sign in"}),m.jsx("p",{className:"mb-6 leading-normal text-muted-foreground",children:"Sign in with your user account for this workshop."}),m.jsxs("label",{className:$3,children:["User",m.jsx(am,{autoComplete:"username",autoFocus:!0,disabled:a,name:"username",onChange:d=>n(d.target.value),required:!0,value:t})]}),m.jsxs("label",{className:$3,children:["Password",m.jsx(am,{autoComplete:"current-password",disabled:a,name:"password",onChange:d=>i(d.target.value),required:!0,type:"password",value:r})]}),c&&m.jsx("p",{className:"mb-6 text-destructive",role:"alert",children:c}),m.jsx(Er,{className:"w-full",disabled:a||!t.trim()||!r,type:"submit",children:a?"Signing in ...":"Sign in"})]})})})}function $re(){const e=sa(),[t,n]=x.useState(!1),[r,i]=x.useState();return!e.enabled||!e.user?null:m.jsxs("div",{className:"flex flex-none items-stretch text-sm",children:[m.jsx(Vs,{as:"button","aria-label":`Sign out ${e.user.label}`,className:"max-w-[160px] max-sm:max-w-[100px]",disabled:t,title:e.user.id,type:"button",onClick:()=>{n(!0),i(void 0),e.logout().catch(a=>i(a instanceof Error?a.message:String(a))).finally(()=>n(!1))},children:m.jsxs(wA,{children:[m.jsx(SA,{className:"normal-case [overflow-wrap:anywhere]",children:e.user.label}),m.jsx(wc,{children:"Sign out"})]})}),r&&m.jsx(Vs,{className:"text-destructive",role:"alert",children:r})]})}const Bre=Object.freeze(Object.defineProperty({__proto__:null,AccessContext:AA,AccessGate:Pre,AccessScreen:Sj,UserMenu:$re,useAccess:sa},Symbol.toStringTag,{value:"Module"}));function Fre(e){return Array.isArray(e)}function zre(e){return _c(typeof e,"bigint")}function Ure(e){return _c(typeof e,"boolean")}function Hre(e){return _c(e,null)}function qre(e){return Number.isFinite(e)}function _A(e){return _c(typeof e,"object")&&!Hre(e)}function Vre(e){return _c(typeof e,"string")}function _c(e,t){return e===t}function Gre(e){return _c(e,"__proto__")||_c(e,"constructor")||_c(e,"prototype")}function CA(e,t){return Gre(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function Kre(e){return Object.getOwnPropertyNames(e)}function Yre(e){return _A(e)&&CA(e,"~guard")}function Wre(e){return e.map(t=>kA(t))}function Xre(e){const t={},n=Object.getOwnPropertyDescriptors(e);for(const r of Object.keys(n)){const i=n[r];CA(i,"value")&&Object.defineProperty(t,r,{...i,value:kA(i.value)})}return t}function Qre(e){return new RegExp(e.source,e.flags)}function kA(e){return e instanceof RegExp?Qre(e):Yre(e)?e:Fre(e)?Wre(e):_A(e)?Xre(e):e}function Zre(e){return kA(e)}const Jre={immutableTypes:!1,maxErrors:8,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1};function eie(){return Jre}function tie(e,t){for(const n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function nie(e,t){return{...e,...t}}function hd(e,t,n={}){const r=nie(t,n);return tie(r,e)}function Aj(e,t,n){const r=eie(),i=Zre(e);for(const a of Object.keys(t))Object.defineProperty(i,a,{configurable:!0,writable:!0,enumerable:r.enumerableKind,value:t[a]});for(const a of Object.keys(n))Object.defineProperty(i,a,{configurable:!0,enumerable:!0,writable:!0,value:n[a]});return i}function rie(e){return _A(e)}function iie(e){return Aj(e,{"~optional":!0},{})}function Iu(e){return iie(e)}function aie(e){return rie(e)&&CA(e,"~optional")}function B3(e,t){return hd({"~kind":"Array"},{type:"array",items:e},t)}function sie(e){return Kre(e).filter(t=>!aie(e[t]))}function W2(e,t={}){const n=sie(e),r=n.length>0?{required:n}:{};return hd({"~kind":"Object"},{type:"object",...r,properties:e},t)}function F3(e,t={}){return hd({"~kind":"Union"},{anyOf:e},t)}function _j(e){return Aj(e,{"~unsafe":null},{})}var z3;(function(e){e[e.Array=0]="Array",e[e.BigInt=1]="BigInt",e[e.Boolean=2]="Boolean",e[e.Date=3]="Date",e[e.Constructor=4]="Constructor",e[e.Function=5]="Function",e[e.Null=6]="Null",e[e.Number=7]="Number",e[e.Object=8]="Object",e[e.RegExp=9]="RegExp",e[e.String=10]="String",e[e.Symbol=11]="Symbol",e[e.TypeArray=12]="TypeArray",e[e.Undefined=13]="Undefined"})(z3||(z3={}));BigInt("14695981039346656037");BigInt("1099511628211"),BigInt("18446744073709551616");Array.from({length:256}).map((e,t)=>BigInt(t));const Cj=new Float64Array(1);new DataView(Cj.buffer);new Uint8Array(Cj.buffer);new TextEncoder;function oie(e){return hd({"~kind":"Integer"},{type:"integer"},e)}let lie=class extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}};function cie(e){return zre(e)?"bigint":Ure(e)?"boolean":qre(e)?"number":Vre(e)?"string":(()=>{throw new lie(e)})()}function U3(e,t){return hd({"~kind":"Literal"},{type:cie(e),const:e},t)}function uie(e){return hd({"~kind":"Null"},{type:"null"},e)}function ha(e){return hd({"~kind":"String"},{type:"string"},e)}function X2(e,t){return Array.from({length:t-e+1},(n,r)=>String.fromCharCode(e+r))}[...X2(97,122),...X2(65,90)];const die="0",fie=X2(49,57);[...fie];const kj=/^[a-z][a-z0-9-]*(?:\.[a-zA-Z][a-zA-Z0-9-]*)+$/,Nj=e=>{if(!kj.test(e))throw new Error(`Invalid contract id: ${e}`)},pn=e=>{if(Nj(e.id),!e.description.trim())throw new Error(`Operation ${e.id} has no description`);return Object.freeze({kind:"operation",id:e.id,description:e.description,rights:Object.freeze([...e.rights??[]]),input:e.input,result:e.result,implementedBy:e.implementedBy??"server"})},Ab=e=>{if(Nj(e.id),!e.description.trim())throw new Error(`Channel ${e.id} has no description`);return Object.freeze({kind:"channel",id:e.id,description:e.description,rights:Object.freeze([...e.rights??[]]),params:e.params,message:e.message})},pie=Object.freeze(Object.defineProperty({__proto__:null,CONTRACT_ID:kj,defineChannel:Ab,defineOperation:pn},Symbol.toStringTag,{value:"Module"})),Rj=e=>e.trim().replace(/^@/,"").normalize("NFC").toLowerCase(),Oj=(e,t)=>{const n=Rj(t);return[...e].find(r=>r.handle===n)},hie=(e,t)=>{const n=[...e];return n.find(r=>r.id===t)??Oj(n,t)},Ar=e=>_j({type:"object",additionalProperties:!0,"x-typescript-type":e}),fc=Ar("RunView"),Ij=Ar("JournalEvent"),mie=_j({"x-typescript-type":"JsonValue"}),Q2=ha({minLength:1,maxLength:64,description:"ID of the run"}),gie={runId:Q2,commandId:ha({minLength:1}),correlationId:Iu(ha({minLength:1})),causationId:Iu(ha({minLength:1}))},af=e=>W2({...gie,...e},{additionalProperties:!1}),bie=/^\/files\/runs\/([A-Za-z0-9_-]{1,64})\/artifacts\/([A-Za-z0-9_-]{1,128})$/,Mj=(e,t)=>`/files/runs/${encodeURIComponent(e)}/artifacts/${encodeURIComponent(t)}`,Zf={view:pn({id:"ragents.runs.view",description:"Read the run view, optionally the state after a journal sequence; null for a run that has not started yet.",input:W2({runId:Q2,at:Iu(oie({minimum:0}))},{additionalProperties:!1}),result:F3([fc,uie()])}),events:pn({id:"ragents.runs.events",description:"Read all journal events of a run in sequence order.",input:W2({runId:Q2},{additionalProperties:!1}),result:B3(Ij)}),enqueueInput:pn({id:"ragents.runs.enqueueInput",description:"Put a message into the queue of an actor.",input:af({actorId:ha({minLength:1}),content:ha({minLength:1}),artifactIds:Iu(B3(ha({minLength:1})))}),result:fc}),restartActor:pn({id:"ragents.runs.restartActor",description:"Restart a stopped actor.",input:af({actorId:ha({minLength:1}),reason:Iu(ha({minLength:1}))}),result:fc}),stopActor:pn({id:"ragents.runs.stopActor",description:"Stop an actor together with its delegated children.",input:af({actorId:ha({minLength:1}),reason:ha({minLength:1})}),result:fc}),interruptTurn:pn({id:"ragents.runs.interruptTurn",description:"Interrupt the running turn of an actor; the actor stays active and accepts the next input. Without a running turn nothing happens.",input:af({actorId:ha({minLength:1}),reason:Iu(ha({minLength:1}))}),result:fc}),resolveAction:pn({id:"ragents.runs.resolveAction",description:"Answer or dismiss a pending action.",input:af({actionId:ha({minLength:1}),decision:F3([U3("approved"),U3("dismissed")]),result:Iu(mie)}),result:fc}),stopAll:pn({id:"ragents.runs.stopAll",description:"Stop the whole run with all agents and flows.",input:af({reason:ha({minLength:1})}),result:fc})},yie=Object.freeze(Object.defineProperty({__proto__:null,ARTIFACT_CONTENT_PATH:bie,actorByHandle:Oj,actorByReference:hie,artifactContentPath:Mj,handleKey:Rj,journalEventSchema:Ij,openJson:Ar,runContracts:Zf,runViewSchema:fc},Symbol.toStringTag,{value:"Module"}));function vi(e,t){return{...e,...t}}function as(e){return Array.isArray(e)}function Py(e){return we(typeof e,"bigint")}function jy(e){return we(typeof e,"boolean")}function H3(e){return we(typeof e,"function")}function NA(e){return we(e,null)}function Xc(e){return Number.isFinite(e)}function RA(e){return ts(e)&&!as(e)}function ts(e){return we(typeof e,"object")&&!NA(e)}function Ms(e){return we(typeof e,"string")}function we(e,t){return e===t}function xie(e,t){return e>t}function vie(e,t){return e<t}function Eie(e){if(!ts(e))return!1;const t=globalThis.Object.getPrototypeOf(e);return NA(t)?!1:we(typeof t.constructor,"function")&&!(we(t.constructor,globalThis.Object)||we(t.constructor.name,"Object"))}function Tie(e,t,n){for(let r=t;r<e.length;r++)if(!n(e[r],r))return!1;return!0}function En(e,t,n){return we(e.length,0)?n():t(e[0],e.slice(1))}function OA(e){return we(e,"__proto__")||we(e,"constructor")||we(e,"prototype")}function rr(e,t){return OA(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function Hn(e){return Object.getOwnPropertyNames(e)}function wie(e){return Object.getOwnPropertySymbols(e)}function Dj(e){return Object.values(e)}function Sie(e){return globalThis.ArrayBuffer.isView(e)}function Aie(e){return e instanceof globalThis.RegExp}function _ie(e){return e instanceof globalThis.Set}function Cie(e){return e instanceof globalThis.Map}function kie(e){return rr(e,"~kind")||rr(e,"~unsafe")}function Nie(e){const t={};for(const n of Hn(e)){if(OA(n))continue;const r=Object.getOwnPropertyDescriptor(e,n);r.value=ad(r.value),we(r.enumerable,!0)?t[n]=r.value:Object.defineProperty(t,n,r)}return t}function Rie(e){const t={};for(const n of Hn(e))OA(n)||(t[n]=ad(e[n]));for(const n of wie(e))t[n]=ad(e[n]);return t}function Oie(e){return Eie(e)?e:kie(e)?Nie(e):Rie(e)}function Iie(e){return e.map(t=>ad(t))}function Mie(e){return e.slice()}function Die(e){return new RegExp(e.source,e.flags)}function Lie(e){return new Map(ad([...e.entries()]))}function Pie(e){return new Set(ad([...e.values()]))}function ad(e){return Sie(e)?Mie(e):Aie(e)?Die(e):Cie(e)?Lie(e):_ie(e)?Pie(e):as(e)?Iie(e):ts(e)?Oie(e):e}function Lj(e){return ad(e)}const jie={immutableTypes:!1,maxErrors:8,maxInstantiationCount:128,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function Pj(){return jie}function $ie(e,t){for(const n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function Bie(e,t){return{...e,...t}}function Tn(e,t,n={}){const r=Bie(t,n);return $ie(r,e)}function ss(e,t){const n={};for(const r of Hn(e)){if(t.includes(r))continue;const i=Object.getOwnPropertyDescriptor(e,r);i.value=Lj(i.value),Object.defineProperty(n,r,i)}return n}function on(e,t,n){const r=Pj(),i=Lj(e);for(const a of Object.keys(t))Object.defineProperty(i,a,{configurable:!0,writable:!0,enumerable:r.enumerableKind,value:t[a]});for(const a of Object.keys(n))Object.defineProperty(i,a,{configurable:!0,enumerable:!0,writable:!0,value:n[a]});return i}function On(e,t){return ts(e)&&rr(e,"~kind")&&we(e["~kind"],t)}function Rs(e){return ts(e)}function Fn(e,t,n){return Tn({"~kind":"Deferred"},{type:"deferred",action:e,parameters:t,options:n},{})}function Gu(e){return On(e,"Deferred")}function Fie(e){return on(e,{"~readonly":!0},{})}function IA(e,t){return on(Fie(e),{},t)}function zie(e,t,n,r){const i=Ot(e,t,n);return IA(i,r)}function Uie(e){return on(e,{"~optional":!0},{})}function MA(e,t){return on(Uie(e),{},t)}function Hie(e,t,n,r){const i=Ot(e,t,n);return MA(i,r)}function na(e,t){return Tn({"~kind":"Array"},{type:"array",items:e},t)}function Ba(e){return On(e,"Array")}function DA(e){return ss(e,["~kind","type","items"])}function Jf(e,t,n={}){return Tn({"~kind":"Constructor"},{type:"constructor",parameters:e,instanceType:t},n)}function Js(e){return On(e,"Constructor")}function jj(e){return ss(e,["~kind","type","parameters","instanceType"])}function sd(e,t,n={}){return Tn({"~kind":"Function"},{type:"function",parameters:e,returnType:t},n)}function eo(e){return On(e,"Function")}function $j(e){return ss(e,["~kind","type","parameters","returnType"])}function od(e,t){return Tn({"~kind":"Ref"},{$ref:e},t)}function Os(e){return On(e,"Ref")}function ep(e,t){return Tn({"~kind":"Generic"},{type:"generic",parameters:e,expression:t})}function $y(e){return On(e,"Generic")}function Ku(e){return Tn({"~kind":"Any"},{},e)}function Pa(e){return On(e,"Any")}const Bj="(?!)";function Pi(e){return Tn({"~kind":"Never"},{not:{}},e)}function ld(e){return On(e,"Never")}function Co(e,t={}){return Fn("AddOptional",[e],t)}function cm(e,t={}){return MA(e,t)}function Fs(e){return cm(e)}function Is(e){return Rs(e)&&rr(e,"~optional")}function Fj(e){return Hn(e).filter(t=>!Is(e[t]))}function LA(e){return Hn(e)}function PA(e){return Dj(e)}function wt(e,t={}){const n=Fj(e),r=n.length>0?{required:n}:{};return Tn({"~kind":"Object"},{type:"object",...r,properties:e},t)}function _i(e){return On(e,"Object")}function zj(e){return ss(e,["~kind","type","properties","required"])}function ba(e){return Tn({"~kind":"Unknown"},{},e)}function ns(e){return On(e,"Unknown")}function tp(e,t,n){const r=Hn(e).reduce((i,a)=>({...i,[a]:on(e[a],{},{$id:a})}),{});return Tn({"~kind":"Cyclic"},{$defs:r,$ref:t},n)}function Lo(e){return On(e,"Cyclic")}function qie(e){return ss(e,["~kind","$defs","$ref"])}function Uj(e){return on(e,{"~unsafe":null},{})}function jA(e){return RA(e)&&rr(e,"~unsafe")&&NA(e["~unsafe"])}function By(e,t){var n;return((n=t[e.length])==null?void 0:n.call(t,...e))??(()=>{throw Error("Invalid Arguments")})()}function i1(...e){const[t,n]=By(e,{2:(r,i)=>[r,i,i],1:r=>[r,ba(),ba()]});return Tn({"~kind":"Infer"},{type:"infer",name:t,extends:n},{})}function ja(e){return On(e,"Infer")}function um(e,t,n,r={}){return Tn({"~kind":"Dependent"},{if:e,then:t,else:n},r)}function os(e){return On(e,"Dependent")}function Hj(e){return ss(e,["~kind","if","then","else"])}function qj(e){return RA(e)}function Vj(e){return Hn(e).filter(n=>isNaN(n)).reduce((n,r)=>[...n,e[r]],[])}function Gj(e){return Ms(e)||Xc(e)}function Kj(e,t){const n=qj(e)?Vj(e):e;return Tn({"~kind":"Enum"},{enum:n},t)}function Po(e){return On(e,"Enum")}function ko(e,t={}){return Tn({"~kind":"Intersect"},{allOf:e},t)}function pi(e){return On(e,"Intersect")}function Yj(e){return ss(e,["~kind","allOf"])}function Xs(){throw new Error("Unreachable")}var q3;(function(e){e[e.Array=0]="Array",e[e.BigInt=1]="BigInt",e[e.Boolean=2]="Boolean",e[e.Date=3]="Date",e[e.Constructor=4]="Constructor",e[e.Function=5]="Function",e[e.Null=6]="Null",e[e.Number=7]="Number",e[e.Object=8]="Object",e[e.RegExp=9]="RegExp",e[e.String=10]="String",e[e.Symbol=11]="Symbol",e[e.TypeArray=12]="TypeArray",e[e.Undefined=13]="Undefined"})(q3||(q3={}));BigInt("14695981039346656037");BigInt("1099511628211"),BigInt("18446744073709551616");Array.from({length:256}).map((e,t)=>BigInt(t));const Wj=new Float64Array(1);new DataView(Wj.buffer);new Uint8Array(Wj.buffer);new TextEncoder;class $A{constructor(t,n){this.type=t,this.decode=n}Encode(t){const n=this.type,r=a1(n)?o=>this.decode(n["~codec"].decode(o)):this.decode,i=a1(n)?o=>n["~codec"].encode(t(o)):t,a={decode:r,encode:i};return on(this.type,{"~codec":a},{})}}class BA{constructor(t){this.type=t}Decode(t){return new $A(this.type,t)}}function Fy(e){return new BA(e)}function Xj(e,t){return Fy(e).Decode(t).Encode(()=>{throw Error("Encode not implemented")})}function Qj(e,t){return Fy(e).Decode(()=>{throw Error("Decode not implemented")}).Encode(t)}function a1(e){return Rs(e)&&rr(e,"~codec")&&ts(e["~codec"])&&rr(e["~codec"],"encode")&&rr(e["~codec"],"decode")}function Zj(e){return hx(e)}function dm(e){return Rs(e)&&rr(e,"~immutable")}function No(e,t={}){return Fn("AddReadonly",[e],t)}function fm(e,t={}){return IA(e,t)}function Jj(e){return fm(e)}function pm(e){return Rs(e)&&rr(e,"~readonly")}function e$(e,t){const n=FA(e)?[...e["~refine"],t]:[t];return on(e,{"~refine":n},{})}function t$(...e){const[t,n,r]=By(e,{3:(i,a,o)=>[i,a,o],2:(i,a)=>[i,a,()=>"Refine Error"]});return e$(t,{check:n,error:r})}function n$(e){return RA(e)&&rr(e,"check")&&rr(e,"error")&&H3(e.check)&&H3(e.error)}function FA(e){return Rs(e)&&rr(e,"~refine")&&as(e["~refine"])&&Tie(e["~refine"],0,t=>n$(t))}const r$="-?(?:0|[1-9][0-9]*)n";function zy(e){return Tn({"~kind":"BigInt"},{type:"bigint"},e)}function np(e){return On(e,"BigInt")}function Uy(e){return Tn({"~kind":"Boolean"},{type:"boolean"},e)}function md(e){return On(e,"Boolean")}function s1(e){return Tn({"~kind":"Identifier"},{name:e})}function i$(e){return On(e,"Identifier")}const zA="-?(?:0|[1-9][0-9]*)";function rg(e){return Tn({"~kind":"Integer"},{type:"integer"},e)}function Ml(e){return On(e,"Integer")}class a$ extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}}function s$(e){return Py(e)?"bigint":jy(e)?"boolean":Xc(e)?"number":Ms(e)?"string":(()=>{throw new a$(e)})()}function Yn(e,t){return Tn({"~kind":"Literal"},{type:s$(e),const:e},t)}function UA(e){return Py(e)||jy(e)||Xc(e)||Ms(e)}function Vie(e){return Kr(e)&&Py(e.const)}function Gie(e){return Kr(e)&&jy(e.const)}function o$(e){return Kr(e)&&Xc(e.const)}function l$(e){return Kr(e)&&Ms(e.const)}function Kr(e){return On(e,"Literal")}function Hs(e){return Tn({"~kind":"Null"},{type:"null"},e)}function Hy(e){return On(e,"Null")}const HA="-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?";function Al(e){return Tn({"~kind":"Number"},{type:"number"},e)}function Ds(e){return On(e,"Number")}function qy(e){return Tn({"~kind":"Symbol"},{type:"symbol"},e)}function ig(e){return On(e,"Symbol")}function rp(...e){const[t,n,r]=By(e,{3:(i,a,o)=>[i,a,o],2:(i,a)=>[i,a,a],1:i=>[i,ba(),ba()]});return Tn({"~kind":"Parameter"},{name:t,extends:n,equals:r},{})}function c$(e){return On(e,"Parameter")}const qA=".*";function Un(e){return Tn({"~kind":"String"},{type:"string"},e)}function Dl(e){return On(e,"String")}function Tr(e,t={}){return Tn({"~kind":"Union"},{anyOf:e},t)}function Dn(e){return On(e,"Union")}function u$(e){return ss(e,["~kind","anyOf"])}function Vy(e){const t=wce(e);return we(t.length,2)?t[0]:[]}function Kie(e){return!0}function d$(e){return En(e,(t,n)=>Yie(t)?d$(n):!1,()=>!0)}function f$(e){return we(e.length,0)?!1:d$(e)}function Yie(e){return Dn(e)?f$(e.anyOf):Kr(e)?Kie(e.const):!1}function VA(e){return f$(e)}function GA(e){return Tn({"~kind":"TemplateLiteral"},{type:"string",pattern:e},{})}function p$(e,t,n=[]){return En(e,(r,i)=>p$(i,t,[...n,`${r}${t}`]),()=>n)}function Wie(e,t){return we(e.length,0)?[`${t}`]:p$(e,t)}function h$(e,t,n=[]){return En(t,(r,i)=>h$(e,i,[...n,...m$(e,r)]),()=>n)}function m$(e,t){return Dn(t)?h$(e,t.anyOf):Kr(t)?Wie(e,t.const):Xs()}function g$(e,t){return En(t,(n,r)=>g$(m$(e,n),r),()=>e)}function Xie(e){return e.map(t=>Yn(t))}function Qie(e){const t=g$([],e),n=Xie(t);return Tr(n)}function Zie(e){return we(e.length,0)?Xs():we(e.length,1)&&Kr(e[0])?e[0]:Qie(e)}function KA(e){const t=Vy(e);return we(t.length,0)?Un():VA(t)?Zie(t):GA(e)}function b$(e){const t=KA(e);return ls(t)?Un():t}function Bc(e,t){const n="object",r={[e]:t};return Tn({"~kind":"Record"},{type:n,patternProperties:r})}function Jie(e){return Bc(zc,e)}function eae(e){return wt({true:e,false:e})}function Ls(e,t={}){const[n,r,i]=[e,e.length,!1];return Tn({"~kind":"Tuple"},{type:"array",additionalItems:i,items:n,minItems:r},t)}function oa(e){return On(e,"Tuple")}function y$(e){return ss(e,["~kind","type","items","minItems","additionalItems"])}function tae(e){return ss(e,["~readonly"])}function x$(e,t){return on(tae(e),{},t)}function nae(e,t,n,r){const i=Ot(e,t,n);return x$(i,r)}function v$(e,t={}){return Fn("RemoveReadonly",[e],t)}function E$(e,t={}){return x$(e,t)}function rae(e){return ss(e,["~optional"])}function T$(e,t){return on(rae(e),{},t)}function iae(e,t,n,r){const i=Ot(e,t,n);return T$(i,r)}function w$(e,t={}){return Fn("RemoveOptional",[e],t)}function YA(e,t={}){return T$(e,t)}function S$(e){return e.reduceRight((n,r,i)=>({[i]:r,...n}),{})}function aae(e){const t=S$(e.items);return wt(t)}function Z2(e){return _i(e)||oa(e)}function sae(e,t){return pm(e)?!!pm(t):!1}function oae(e,t){return Is(e)?!!Is(t):!1}function lae(e,t){const n=sae(e,t),r=oae(e,t),i=xa([e,t]),a=E$(YA(i));return n&&r?fm(cm(a)):n&&!r?fm(a):!n&&r?cm(a):a}function cae(e,t,n){return n in e?n in t?lae(e[n],t[n]):e[n]:n in t?t[n]:Pi()}function uae(e,t){return[...new Set([...Hn(e),...Hn(t)])].reduce((i,a)=>({...i,[a]:cae(e,t,a)}),{})}function V3(e){return _i(e)?e.properties:oa(e)?S$(e.items):{}}function A$(e,t){const n=V3(e),r=V3(t),i=uae(n,r);return wt(i)}function dae(e,t){const n=ax(e,t);return we(n,rx)?e:we(n,ix)||we(n,tx)?t:Pi()}function fae(e,t){const n=Z2(e),r=Z2(t);return n&&r?A$(e,t):n&&!r?e:!n&&r?t:dae(e,t)}function _$(e,t){return ld(e)||Pa(e)?e:ns(e)||ld(t)||Pa(t)?t:ns(t)?e:fae(e,t)}function pae(e,t){return Dn(e)||Dn(t)}function hae(e,t){const n=Fc(e),r=Fc(t);return pae(n,r)?xa([n,r]):_$(n,r)}function C$(e,t,n=[]){return En(t,(r,i)=>C$(e,i,[...n,hae(r,e)]),()=>we(n.length,0)?[e]:n)}function k$(e,t,n=[]){return En(e,(r,i)=>k$(i,t,[...n,...hm([r],t)]),()=>n)}function hm(e,t=[]){return En(e,(n,r)=>Dn(n)?hm(r,k$(n.anyOf,t)):hm(r,C$(n,t)),()=>t)}function mae(e,t){const n=Ro({},e,t);return Da(n)?[]:[e]}function N$(e,t,n=[]){return En(e,(r,i)=>N$(i,t,[...n,...mae(r,t)]),()=>n)}function R$(e,t){const n=Fc(e),r=Dn(n)?n.anyOf:[n],i=N$(r,t);return to(i)}function gd(e,t,n){const r=xa([e,t]),i=R$(n,e);return to([r,i])}function jo(e,t=[]){return En(e,(n,r)=>jo(r,[...t,Yn(n)]),()=>to(t))}function xa(e){const t=hm(e),n=T_(t);return to(n)}function $o(e){const t=b$(e);return Fc(t)}function to(e){const t=T_(e);return ip(t)}function Fc(e){return os(e)?gd(e.if,e.then,e.else):Po(e)?jo(e.enum):pi(e)?xa(e.allOf):ls(e)?$o(e.pattern):Dn(e)?to(e.anyOf):e}function ip(e){return we(e.length,1)?e[0]:we(e.length,0)?Pi():Tr(e)}function gae(e,t){const n=jo(e);return Gy(n,t)}function bae(e,t){return Bc(ap,t)}function yae(e,t){const n=xa(e);return Gy(n,t)}function xae(e,t){return Ms(e)||Xc(e)?wt({[e]:t}):we(e,!1)?wt({false:t}):we(e,!0)?wt({true:t}):wt({})}function vae(e,t){return Bc(sg,t)}function Eae(e,t){return rr(e,"pattern")&&(Ms(e.pattern)||e.pattern instanceof RegExp)?Bc(e.pattern.toString(),t):Bc(zc,t)}function Tae(e,t){const n=Vy(e);return VA(n)?Gy($o(e),t):Bc(e,t)}function wae(e){return Dn(e)?ag(e.anyOf):[e]}function ag(e,t=[]){return En(e,(n,r)=>ag(r,[...t,...wae(n)]),()=>t)}function Sae(e){return e.some(t=>Dl(t)||Ds(t)||Ml(t))}function Aae(e,t){return we(Sae(e),!0)?Bc(zc,t):void 0}function _ae(e,t){return e.reduce((n,r)=>Kr(r)&&(Ms(r.const)||Xc(r.const))?{...n,[r.const]:t}:n,{})}function Cae(e,t){const n=_ae(e,t);return wt(n)}function kae(e,t){const n=ag(e),r=Aae(n,t);return Rs(r)?r:Cae(n,t)}function Gy(e,t){return Pa(e)?Jie(t):md(e)?eae(t):Po(e)?gae(e.enum,t):Ml(e)?bae(e,t):pi(e)?yae(e.allOf,t):Kr(e)?xae(e.const,t):Ds(e)?vae(e,t):Dn(e)?kae(e.anyOf,t):Dl(e)?Eae(e,t):ls(e)?Tae(e.pattern,t):wt({})}function WA(e,t,n){return zr([e])?on(Gy(e,t),{},n):XA(e,t,n)}function O$(e,t,n,r,i){const a=Ot(e,t,n),o=Ot(e,t,r);return WA(a,o,i)}const ap=`^${zA}$`,sg=`^${HA}$`,zc=`^${qA}$`;function XA(e,t,n={}){return Fn("Record",[e,t],n)}function QA(e,t,n={}){return WA(e,t,n)}function I$(e,t){return Bc(e,t)}function o1(e){return we(e,zc)?Un():we(e,ap)?rg():we(e,sg)?Al():KA(e)}function Qc(e){return Hn(e.patternProperties)[0]}function Ky(e){const t=Qc(e);return o1(t)}function Ll(e){return e.patternProperties[Qc(e)]}function Bo(e){return On(e,"Record")}function Nae(e){return ss(e,["~kind","type","patternProperties"])}function og(e){return Tn({"~kind":"Rest"},{type:"rest",items:e},{})}function lg(e){return On(e,"Rest")}function ZA(e){return Tn({"~kind":"This"},{$ref:"#"},e)}function JA(e){return On(e,"This")}function Yy(e){return Tn({"~kind":"Undefined"},{type:"undefined"},e)}function Wy(e){return On(e,"Undefined")}function e_(e){return Tn({"~kind":"Void"},{type:"void"},e)}function sp(e){return On(e,"Void")}function Rae(e,t){return we(e,"Array")?na(t[0]):we(e,"Capitalize")?A_(t[0]):we(e,"ConstructorParameters")?L_(t[0]):we(e,"Evaluate")?aB(t[0]):we(e,"Exclude")?j_(t[0],t[1]):we(e,"Extract")?$_(t[0],t[1]):we(e,"Index")?cx(t[0],t[1]):we(e,"InstanceType")?U_(t[0]):we(e,"Lowercase")?__(t[0]):we(e,"NonNullable")?K_(t[0]):we(e,"Omit")?W_(t[0],t[1]):we(e,"Parameters")?Q_(t[0]):we(e,"Partial")?J_(t[0]):we(e,"Pick")?tC(t[0],t[1]):we(e,"Readonly")?rC(t[0]):we(e,"KeyOf")?fx(t[0]):we(e,"Record")?XA(t[0],t[1]):we(e,"Required")?sC(t[0]):we(e,"ReturnType")?lC(t[0]):we(e,"Uncapitalize")?C_(t[0]):we(e,"Uppercase")?k_(t[0]):c1(od(e),t)}function bd(){throw Error("Unreachable")}function M$(e,t=[]){return En(e,(n,r)=>M$(r,[...t,n[1]]),()=>t)}function Pl(e){return we(e.length,3)?[e[0],...M$(e[1])]:[]}function Oae(e){return rp(e[0],e[2],e[4])}function Iae(e){return rp(e[0],e[2],e[2])}function Mae(e){return rp(e[0],ba(),e[2])}function Dae(e){return rp(e,ba(),ba())}function Lae(e){return Pl(e)}function Pae(e){return e[1]}function jae(e){return Pl(e)}function $ae(e){return e[1]}function Bae(e){return Rae(e[0],e[1])}function Fae(e){return null}function zae(e){return Un()}function Uae(e){return Al()}function Hae(e){return Uy()}function qae(e){return Yy()}function Vae(e){return Hs()}function Gae(e){return rg()}function Kae(e){return zy()}function Yae(e){return ba()}function Wae(e){return Ku()}function Xae(e){return wt({})}function Qae(e){return Pi()}function Zae(e){return qy()}function Jae(e){return e_()}function ese(e){return ZA()}function tse(e){return Yn(BigInt(e))}function nse(e){return Yn(we(e,"true"))}function rse(e){return Yn(parseFloat(e))}function ise(e){return Yn(e)}function ase(e){return e[1]}function sse(e){return Yn(e)}function ose(e){return we(e.length,3)?[e[0],e[1],...e[2]]:[e[0]]}function lse(e){return e[1]}function cse(e){return h_(e)}function use(e){return we(e.length,6)?um(e[1],e[3],e[5]):um(e[1],e[3],ba())}function dse(e){return e.length>0}function fse(e){return e.reduce((t,n)=>we(n.length,3)?[...t,[n[1]]]:[...t,[]],[])}function pse(e){return we(e.length,6)?[e[1],e[3],e[5]]:[]}function hse(e){return as(e)&&we(e.length,3)?e[1]:e}function mse(e){return we(e.length,2)?e[1]:[]}function G3(e,t){return t.reduce((n,r)=>{const i=r;return we(i.length,1)?cx(n,i[0]):we(i.length,0)?na(n):bd()},e)}function K3(e,t){return we(t.length,3)?M_(e,t[0],t[1],t[2]):e}function gse(e,t){return as(t)&&we(t.length,0)?e:uC(e,t)}function bse(e){const[t,n,r,i,a]=e;return gse(K3(t?fx(G3(n,r)):G3(n,r),i),a)}function t_(e,t){return we(t.length,3)?(()=>{const[n,r,i]=t,a=t_(r,i);if(we(n,"&"))return pi(a)?ko([e,...a.allOf]):ko([e,a]);if(we(n,"|"))return Dn(a)?Tr([e,...a.anyOf]):Tr([e,a]);bd()})():e}function yse(e){const[t,n]=e;return t_(t,n)}function xse(e){const[t,n]=e;return t_(t,n)}function vse(e){return iB(e[1])}function Ese(e){return e[1]}function Tse(e){return ep(e[0],e[2])}function wse(e){return we(e.length,4)?i1(e[1],e[3]):we(e.length,2)?i1(e[1],ba()):bd()}function Sse(e){return`${e}`}function Ase(e){return Ml(e[3])?ap:Ds(e[3])?sg:ig(e[3])||Dl(e[3])?zc:bd()}function _se(e){return e.length>0}function Cse(e){return e.length>0}function kse(e){const[t,n,r,i,a]=e;return{[n]:t&&r?No(Co(a)):t&&!r?No(a):!t&&r?Co(a):a}}function Nse(e){return Pl(e)}function D$(e){return e.reduce((t,n)=>rr(n,ap)||rr(n,sg)||rr(n,zc)?[t[0],vi(t[1],n)]:[vi(t[0],n),t[1]],[{},{}])}function Rse(e){return D$(e[1])}function Ose(e){const[t,n]=e,r=we(Hn(n).length,0)?{}:{patternProperties:n};return wt(t,r)}function Ise(e){return we(e.length,5)?No(Co(e[4])):we(e.length,3)?e[2]:we(e.length,4)?we(e[2],"readonly")?No(e[3]):Co(e[3]):bd()}function Mse(e){if(!as(e)||!we(e.length,3))return e;const[t,n,r]=e;return t&&r?No(Co(n)):t&&!r?No(n):!t&&r?Co(n):n}function Dse(e){return we(e.length,2)?og(e[1]):we(e.length,1)?e[0]:bd()}function Lse(e){return Pl(e)}function Pse(e){return Ls(e[1])}function jse(e){return No(Co(e[4]))}function $se(e){return No(e[3])}function Bse(e){return Co(e[3])}function Fse(e){return e[2]}function zse(e){return we(e.length,2)?og(e[1]):we(e.length,1)?e[0]:bd()}function Use(e){return Pl(e)}function Hse(e){return sd(e[1],e[4])}function qse(e){return Jf(e[2],e[5])}function Y3(e,t){return we(e,"remove")?v$(t):we(e,"add")?No(t):t}function Vse(e){return we(e.length,2)&&we(e[0],"-")?"remove":we(e.length,2)&&we(e[0],"+")||we(e.length,1)?"add":"none"}function W3(e,t){return we(e,"remove")?w$(t):we(e,"add")?Co(t):t}function Gse(e){return we(e.length,2)&&we(e[0],"-")?"remove":we(e.length,2)&&we(e[0],"+")||we(e.length,1)?"add":"none"}function Kse(e){return we(e.length,2)?[e[1]]:[]}function Yse(e){return as(e[6])&&we(e[6].length,1)?u1(s1(e[3]),e[5],e[6][0],Y3(e[1],W3(e[8],e[10]))):u1(s1(e[3]),e[5],od(e[3]),Y3(e[1],W3(e[8],e[10])))}function Wse(e){return od(e)}function Xse(e){return BigInt(e)}function Qse(e){return parseFloat(e)}function Zse(e){return we(e,"true")}function Jse(e){return null}function eoe(e){return{[e[0]]:e[2]}}function toe(e){return Pl(e)}function noe(e){return e.reduce((t,n)=>vi(t,n),{})}function roe(e){return noe(e[1])}function ioe(e){return Pl(e)}function aoe(e){return e[1]}function soe(e){return zy()}function ooe(e){return Un()}function loe(e){return Al()}function coe(e){return rg()}function uoe(e){return Pi()}function doe(e){return Yn(e)}function foe(e){return Tr(e[1])}function poe(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function hoe(e){return[e[0],...e[1]]}function moe(e){return e[1]}function goe(e){return Pl(e)}function boe(e){return we(e.length,2)?e[1]:[]}function yoe(e){const t=e[2],n=e[3],[r,i]=e[4],a=we(Hn(i).length,0)?{}:{patternProperties:i};return{[e[1]]:ep(t,Jy(n,r,a))}}function xoe(e){const t=e[2],[n,r]=e[3],i=we(Hn(r).length,0)?{}:{patternProperties:r};return{[e[1]]:Jy(t,n,i)}}function voe(e){return{[e[1]]:ep(e[2],e[4])}}function Eoe(e){return{[e[1]]:e[3]}}function Toe(e){return null}function woe(e){return Pl(e)}function Soe(e){return e[1]}function Aoe(e){const[t,n]=[e[0],e[1]];return oB(vi(t,D$(n)[0]))}function n_(e){return we(e.length,2)}function cr(e,t,n){return n_(e)?t(e[0],e[1]):n()}function _oe(e,t){return we(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function ia(e,t){for(let n=0;n<e.length;n++){const r=_oe(e[n],t);if(n_(r))return r}return[]}function J2(e,t){return Array.from({length:t-e+1},(n,r)=>String.fromCharCode(e+r))}const Coe=[...J2(97,122),...J2(65,90)],L$="0",P$=J2(49,57),r_=[L$,...P$],koe=" ",i_=`
240
+ */var c3;function sZ(){if(c3)return vT;c3=1;var e=Dm(),t=OP();function n(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,c=e.useMemo,u=e.useDebugValue;return vT.useSyncExternalStoreWithSelector=function(d,p,h,y,b){var v=a(null);if(v.current===null){var T={hasValue:!1,value:null};v.current=T}else T=v.current;v=c(function(){function w(N){if(!k){if(k=!0,C=N,N=y(N),b!==void 0&&T.hasValue){var I=T.value;if(b(I,N))return R=I}return R=N}if(I=R,r(C,N))return I;var L=y(N);return b!==void 0&&b(I,L)?(C=N,I):(C=N,R=L)}var k=!1,C,R,O=h===void 0?null:h;return[function(){return w(p())},O===null?void 0:function(){return w(O())}]},[p,h,y,b]);var A=i(d,v[0],v[1]);return o(function(){T.hasValue=!0,T.value=A},[A]),u(A),A},vT}var u3;function oZ(){return u3||(u3=1,xT.exports=sZ()),xT.exports}var lZ=oZ();const D2=[];let L2;function cZ(){return L2}function uZ(e){D2.push(e)}function Gm(e){const t=(n,r)=>{const i=Ai(dZ).current;let a;try{L2=i;for(const o of D2)o.before(i);a=e(n,r);for(const o of D2)o.after(i);i.didInitialize=!0}finally{L2=void 0}return a};return t.displayName=e.displayName||e.name,t}function ly(e){return x.forwardRef(Gm(e))}function dZ(){return{didInitialize:!1}}const fZ=yS(19),pZ=fZ?mZ:gZ;function IP(e,t,n,r,i){return pZ(e,t,n,r,i)}function hZ(e,t,n,r,i){const a=x.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return qS.useSyncExternalStore(e.subscribe,a,a)}uZ({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const i of e.syncHooks)n.add(i.store);const r=[];for(const i of n)r.push(i.subscribe(t));return()=>{for(const i of r)i()}}),qS.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function mZ(e,t,n,r,i){const a=cZ();if(!a)return hZ(e,t,n,r,i);const o=a.syncIndex;a.syncIndex+=1;let c;return a.didInitialize?(c=a.syncHooks[o],(c.store!==e||c.selector!==t||!Object.is(c.a1,n)||!Object.is(c.a2,r)||!Object.is(c.a3,i))&&(c.store!==e&&(a.didChangeStore=!0),c.store=e,c.selector=t,c.a1=n,c.a2=r,c.a3=i,c.value=t(e.getSnapshot(),n,r,i))):(c={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(c)),c.value}function gZ(e,t,n,r,i){return lZ.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a=>t(a,n,r,i))}class bZ{constructor(t){pt(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));pt(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}static create(t){return new this(t)}setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,i){return IP(this,t,n,r,i)}}class Qf extends bZ{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){x.useDebugValue(t);const r=this;lt(()=>{r.state[t]!==n&&r.set(t,n)},[r,t,n])}useSyncedValueWithCleanup(t,n){const r=this;lt(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);lt(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){x.useDebugValue(t);const r=this,i=n!==void 0;lt(()=>{i&&!Object.is(r.state[t],n)&&r.setState({...r.state,[t]:n})},[r,t,n,i])}select(t,n,r,i){const a=this.selectors[t];return a(this.state,n,r,i)}useState(t,n,r,i){return x.useDebugValue(t),IP(this,this.selectors[t],n,r,i)}useContextCallback(t,n){x.useDebugValue(t);const r=mt(n??xr);this.context[t]=r}useStateSetter(t){const n=x.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let i=r(this.state);return n(i,i,this),this.subscribe(a=>{const o=r(a);if(!Object.is(i,o)){const c=i;i=o,n(o,c,this)}})}}const yZ={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class VS extends Qf{constructor(n){const{syncOnly:r,nested:i,onOpenChange:a,triggerElements:o,...c}=n;super({...c,positionReference:c.referenceElement,domReferenceElement:c.referenceElement},{onOpenChange:a,dataRef:{current:{}},events:yP(),nested:i,triggerElements:o},yZ);pt(this,"syncOpenEvent",(n,r)=>{(!n||!this.state.open||r!=null&&PX(r))&&(this.context.dataRef.current.openEvent=n?r:void 0)});pt(this,"dispatchOpenChange",(n,r)=>{this.syncOpenEvent(n,r.event);const i={open:n,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",i)});pt(this,"setOpen",(n,r)=>{var i,a,o,c;if(this.syncOnly){(a=(i=this.context).onOpenChange)==null||a.call(i,n,r);return}this.dispatchOpenChange(n,r),(c=(o=this.context).onOpenChange)==null||c.call(o,n,r)});this.syncOnly=r}}function MP(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,c=t.useState("open"),u=t.useState("activeTriggerElement"),d=t.useState(n?"popupElement":"positionerElement"),p=t.context.triggerElements,h=o,y=x.useRef(null);r===void 0&&y.current===null&&(y.current=new VS({open:c,transitionStatus:void 0,referenceElement:u,floatingElement:d,triggerElements:p,onOpenChange:h,floatingId:i,syncOnly:!0,nested:a}));const b=r??y.current;return t.useSyncedValue("floatingId",i),lt(()=>{const v={open:c,floatingId:i,referenceElement:u,floatingElement:d};xn(u)&&(v.domReferenceElement=u),b.state.positionReference===b.state.referenceElement&&(v.positionReference=u),b.update(v)},[c,i,u,d,b]),b.context.onOpenChange=h,b.context.nested=a,b}const Km={tabIndex:-1,[C2]:""};function DP(e){return t=>t==="touch"?e.current:!0}function GS(e,t=!1){const n=td(),r=Gc()!=null,i=Ai(()=>e(n,r)).current;return MP({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function cy({handle:e,store:t}){return lt(()=>e.attachStore(t),[e,t]),null}function d3(e){const t=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==t&&e.set("triggerCount",t)}function LP(e,t){const n=x.useRef(null);return mt(r=>{const i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;const a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),d3(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),d3(t))})}function uy(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);const a=(n==null?void 0:n.id)??null;let o=e.activeTriggerId,c=e.activeTriggerElement;return(a||t)&&(o=a,c=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:c}}function KS(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function xZ(e,t,n,r={}){var p,h,y;const i=n.reason,a=i===ei,o=t&&i===_f,c=!t&&(i===wl||i===$m),u=KS(n);if((h=(p=e.context).onOpenChange)==null||h.call(p,t,n),n.isCanceled)return;(y=r.onBeforeDispatch)==null||y.call(r),e.state.floatingRootContext.dispatchOpenChange(t,n);const d=()=>{const b=uy(e.state,t,n.trigger,u()),v={...r.extraState,...b};o?v.instantType="focus":c?v.instantType="dismiss":a&&(v.instantType=void 0),e.update(v)};a?fi.flushSync(d):d()}function dy(e,t,n,r){const i=n.useState("isMountedByTrigger",e),a=LP(e,n),o=mt(u=>{const d=n.select("open"),p=n.select("activeTriggerId");if(p===e){const h={activeTriggerElement:u,...d?r:null};n.update(h);return}if(p==null&&d){const h={activeTriggerId:e??null,activeTriggerElement:u,...r};n.update(h)}}),c=mt(u=>{a(u),u&&o(u)});return lt(()=>(c(t.current),()=>c(null)),[c,t,n,e]),lt(()=>{if(i){const u={activeTriggerElement:t.current,...r};n.update(u)}},[i,n,t,...Object.values(r)]),{registerTrigger:c,isMountedByThisTrigger:i}}function fy(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=x.useRef(null),i=e.useState("open"),a=e.useState("triggerCount"),o=e.useState("activeTriggerId"),c=e.useState("activeTriggerElement");lt(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0);return}const u=e.context.triggerElements.size,d={};e.state.triggerCount!==u&&(d.triggerCount=u);const p=e.select("activeTriggerId");let h=null;if(p){const y=e.context.triggerElements.getById(p);if(y)r.current=p,y!==e.state.activeTriggerElement&&(d.activeTriggerElement=y);else{for(const[b,v]of e.context.triggerElements.entries())if(v===e.state.activeTriggerElement){d.activeTriggerId=b,d.activeTriggerElement=v,r.current=b;break}d.activeTriggerId===void 0&&(r.current===p?h=p:r.current=null)}}else r.current=null;if(!h&&!p&&u===1){const y=e.context.triggerElements.entries().next();if(!y.done){const[b,v]=y.value;d.activeTriggerId=b,d.activeTriggerElement=v,r.current=b}}(d.triggerCount!==void 0||d.activeTriggerId!==void 0||d.activeTriggerElement!==void 0)&&e.update(d),h&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===h&&!e.context.triggerElements.getById(h)){const y=jt(es);e.setOpen(!1,y),y.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,a,o,c,n])}function py(e,t,n,r){const{mounted:i,setMounted:a,transitionStatus:o}=Rl(e,!1,!1,r),c=t.useState("preventUnmountingOnClose"),u=e?!1:c;t.useSyncedValues({mounted:i,transitionStatus:o,preventUnmountingOnClose:u});const d=mt(()=>{var p,h;a(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n==null||n(),(h=(p=t.context).onOpenChangeComplete)==null||h.call(p,!1)});return $a({enabled:i&&!e&&!u,open:e,ref:t.context.popupRef,onComplete(){e||d()}}),{forceUnmount:d,transitionStatus:o}}function hy(e,t){e.useSyncedValues(t),lt(()=>()=>{e.update({activeTriggerProps:tr,inactiveTriggerProps:tr,popupProps:tr})},[e])}function PP(e,t){lt(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),lt(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class Ym{constructor(){this.idMap=new Map}add(t,n){this.idMap.set(t,n)}delete(t){this.idMap.delete(t)}hasElement(t){for(const n of this.idMap.values())if(n===t)return!0;return!1}hasMatchingElement(t){for(const n of this.idMap.values())if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}function my(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new VS({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:tr,inactiveTriggerProps:tr,popupProps:tr}}const jh=e=>e.triggerIdProp??e.activeTriggerId,YS=e=>e.openProp??e.open,f3=e=>{var n;return(((n=e.popupElement)==null?void 0:n.id)??e.floatingId)||void 0};function jP(e,t){return t!==void 0&&YS(e)&&jh(e)===t}function vZ(e,t){return jP(e,t)?!0:t!==void 0&&YS(e)&&jh(e)==null&&e.triggerCount===1}const gy={open:YS,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:jh,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:f3,isTriggerActive:(e,t)=>t!==void 0&&jh(e)===t,isOpenedByTrigger:(e,t)=>jP(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&jh(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>vZ(e,t)?f3(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function by(e){const t=x.useCallback(r=>e===void 0?xr:e.subscribeStore(r),[e]),n=x.useCallback(()=>e===void 0?void 0:e.store,[e]);return qS.useSyncExternalStore(t,n,()=>e==null?void 0:e.serverStore)}function EZ(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=td(),a=Gc()!=null,o=Ai(()=>new VS({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Ym,floatingId:i,syncOnly:!1,nested:a})).current;return lt(()=>{const c={open:t,floatingId:i};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=xn(r.reference)?r.reference:null),r.floating!==void 0&&(c.floatingElement=r.floating),o.update(c)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function TZ(e){return wZ(e,e.rootContext)}function wZ(e,t){const{nodeId:n,externalTree:r}=e,i=t.useState("referenceElement"),a=t.useState("floatingElement"),o=t.useState("domReferenceElement"),c=t.useState("open"),u=t.useState("floatingId"),[d,p]=x.useState(null),[h,y]=x.useState(void 0),[b,v]=x.useState(void 0),T=x.useRef(null),A=Kc(r),w=x.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),k=JQ({...e,elements:{...w,...d&&{reference:d}}}),C=xn(h)?h:null,R=b===void 0?t.state.floatingElement:b;t.useSyncedValue("referenceElement",h??null),t.useSyncedValue("domReferenceElement",h===void 0?o:C),t.useSyncedValue("floatingElement",R);const O=x.useCallback(B=>{const U=xn(B)?{getBoundingClientRect:()=>B.getBoundingClientRect(),getClientRects:()=>B.getClientRects(),contextElement:B}:B;p(U),k.refs.setReference(U)},[k.refs]),N=x.useCallback(B=>{(xn(B)||B===null)&&(T.current=B,y(B)),(xn(k.refs.reference.current)||k.refs.reference.current===null||B!==null&&!xn(B))&&k.refs.setReference(B)},[k.refs,y]),I=x.useCallback(B=>{v(B),k.refs.setFloating(B)},[k.refs]),L=x.useMemo(()=>({...k.refs,setReference:N,setFloating:I,setPositionReference:O,domReference:T}),[k.refs,N,I,O]),j=x.useMemo(()=>({...k.elements,domReference:o}),[k.elements,o]),P=x.useMemo(()=>({...k,dataRef:t.context.dataRef,open:c,onOpenChange:t.setOpen,events:t.context.events,floatingId:u,refs:L,elements:j,nodeId:n,rootStore:t}),[k,L,j,n,t,c,u]);return lt(()=>{o&&(T.current=o)},[o]),lt(()=>{t.context.dataRef.current.floatingContext=P;const B=A==null?void 0:A.nodesRef.current.find(U=>U.id===n);B&&(B.context=P)}),x.useMemo(()=>({...k,context:P,refs:L,elements:j,rootStore:t}),[k,L,j,P,t])}const ET=NS&&Il;function $P(e,t={}){const{enabled:n=!0,delay:r}=t,i="rootStore"in e?e.rootStore:e,{events:a,dataRef:o}=i.context,c=x.useRef(!1),u=x.useRef(null),d=x.useRef(!0),p=xi();x.useEffect(()=>{const y=i.select("domReferenceElement");if(!n)return;const b=_r(y);function v(){const w=i.select("domReferenceElement");!i.select("open")&&lr(w)&&w===ta(yn(w))&&(c.current=!0,u.current=w)}function T(){d.current=!0}function A(){d.current=!1}return _o(cn(b,"blur",v),ET&&cn(b,"keydown",T,!0),ET&&cn(b,"pointerdown",A,!0))},[i,n]),x.useEffect(()=>{if(!n)return;function y(b){if(b.reason===wl||b.reason===$m){const v=i.select("domReferenceElement");xn(v)&&(u.current=v,c.current=!0)}}return a.on("openchange",y),()=>{a.off("openchange",y)}},[a,n,i]);const h=x.useMemo(()=>{function y(){c.current=!1,u.current=null}return{onMouseLeave(){y()},onFocus(b){const v=b.currentTarget;if(c.current){if(u.current===v)return;y()}const T=Gi(b.nativeEvent);if(xn(T)){if(ET&&!b.relatedTarget){if(!d.current&&!ry(T))return}else if(!BX(T))return}const A=Hb(b.relatedTarget,i.context.triggerElements),{nativeEvent:w,currentTarget:k}=b,C=typeof r=="function"?r():r;if(i.select("open")&&A||C===0||C===void 0){i.setOpen(!0,jt(_f,w,k));return}p.start(C,()=>{c.current||i.setOpen(!0,jt(_f,w,k))})},onBlur(b){y();const v=b.relatedTarget,T=b.nativeEvent,A=xn(v)&&v.hasAttribute(im("focus-guard"))&&v.getAttribute("data-type")==="outside";p.start(0,()=>{var R;const w=i.select("domReferenceElement"),k=ta(yn(w));!v&&k===w||Lt((R=o.current.floatingContext)==null?void 0:R.refs.floating.current,k)||Lt(w,k)||A||Hb(v??k,i.context.triggerElements)||i.setOpen(!1,jt(_f,T))})}}},[o,r,i,p]);return x.useMemo(()=>n?{reference:h,trigger:h}:{},[n,h])}class WS{constructor(){pt(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});pt(this,"disposeEffect",()=>this.dispose);this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Ns,this.restTimeout=new Ns,this.handleCloseOptions=void 0}static create(){return new WS}}const Yb=new WeakMap;function Wb(e){var n,r,i;if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Yb.get(t)===e&&((n=e.pointerEventsScopeElement)==null||n.style.removeProperty("pointer-events"),(r=e.pointerEventsReferenceElement)==null||r.style.removeProperty("pointer-events"),(i=e.pointerEventsFloatingElement)==null||i.style.removeProperty("pointer-events"),Yb.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function BP(e,t){const{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Yb.get(n);a&&a!==e&&Wb(a),Wb(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Yb.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",i.style.pointerEvents="auto"}function XS(e){const t=e.context.dataRef.current,n=Ai(()=>t.hoverInteractionState??WS.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),SS(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function QS(e,t={}){const{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a="rootStore"in e?e.rootStore:e,o=a.useState("open"),c=a.useState("floatingElement"),u=a.useState("domReferenceElement"),{dataRef:d}=a.context,p=Kc(),h=Gc(),y=XS(a),b=xi(),v=mt(()=>{var w;return Z4((w=d.current.openEvent)==null?void 0:w.type,y.interactedInside)}),T=mt(()=>{var w;return zX((w=d.current.openEvent)==null?void 0:w.type)}),A=mt(()=>{Wb(y)});lt(()=>{o||(y.pointerType=void 0,y.restTimeoutPending=!1,y.interactedInside=!1,A())},[o,y,A]),x.useEffect(()=>A,[A]),lt(()=>{var w,k,C,R,O;if(n&&o&&(w=y.handleCloseOptions)!=null&&w.blockPointerEvents&&T()&&xn(u)&&c){const N=u,I=c,L=yn(c),j=(C=(k=p==null?void 0:p.nodesRef.current.find(q=>q.id===h))==null?void 0:k.context)==null?void 0:C.elements.floating;j&&(j.style.pointerEvents="");const P=y.pointerEventsScopeElement!==I?y.pointerEventsScopeElement:null,B=j!==I?j:null,U=((O=(R=y.handleCloseOptions)==null?void 0:R.getScope)==null?void 0:O.call(R))??P??B??N.closest("[data-rootownerid]")??L.body;return BP(y,{scopeElement:U,referenceElement:N,floatingElement:I}),()=>{A()}}},[n,o,u,c,y,T,p,h,A]),x.useEffect(()=>{if(!n)return;function w(){return!!(p&&h&&Mc(p.nodesRef.current,h).length>0)}function k(L){const j=nd(r,"close",y.pointerType),P=()=>{a.setOpen(!1,jt(ei,L)),p==null||p.events.emit("floating.closed",L)};j?y.openChangeTimeout.start(j,P):(y.openChangeTimeout.clear(),P())}function C(L){const j=Gi(L);if(!$X(j)){y.interactedInside=!1;return}y.interactedInside=(j==null?void 0:j.closest("[aria-haspopup]"))!=null}function R(){y.openChangeTimeout.clear(),b.clear(),p==null||p.events.off("floating.closed",N),A()}function O(L){var U;if(w()&&p){p.events.on("floating.closed",N);return}if(Hb(L.relatedTarget,a.context.triggerElements))return;const j=((U=d.current.floatingContext)==null?void 0:U.nodeId)??i,P=L.relatedTarget;if(!(p&&j&&xn(P)&&Mc(p.nodesRef.current,j,!1).some(q=>{var K;return Lt((K=q.context)==null?void 0:K.elements.floating,P)}))){if(y.handler){y.handler(L);return}A(),T()&&!v()&&k(L)}}function N(L){!p||!h||w()||b.start(0,()=>{p.events.off("floating.closed",N),a.setOpen(!1,jt(ei,L)),p.events.emit("floating.closed",L)})}const I=c;return _o(I&&cn(I,"mouseenter",R),I&&cn(I,"mouseleave",O),I&&cn(I,"pointerdown",C,!0),()=>{p==null||p.events.off("floating.closed",N)})},[n,c,a,d,r,i,T,v,A,y,p,h,b])}const SZ={current:null};function yy(e,t={}){const{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:c=!0,triggerElementRef:u=SZ,externalTree:d,isActiveTrigger:p=!0,getHandleCloseContext:h,isClosing:y,shouldOpen:b,guardStaleOpen:v=!1}=t,T="rootStore"in e?e.rootStore:e,{dataRef:A,events:w}=T.context,k=Kc(d),C=XS(T),R=x.useRef(!1),O=ai(i),N=ai(r),I=ai(o),L=ai(n),j=ai(b),P=ai(y),B=mt(()=>{var H;return Z4((H=A.current.openEvent)==null?void 0:H.type,C.interactedInside)}),U=mt(()=>{var H;return((H=j.current)==null?void 0:H.call(j))!==!1}),q=mt((H,W,Y)=>{const te=T.context.triggerElements;if(te.hasElement(W))return!H||!Lt(H,W);if(!xn(Y))return!1;const M=Y;return te.hasMatchingElement(z=>Lt(z,M))&&(!H||!Lt(H,M))}),K=mt(()=>{if(!C.handler)return;yn(T.select("domReferenceElement")).removeEventListener("mousemove",C.handler),C.handler=void 0}),V=mt(()=>{Wb(C)});return p&&(C.handleCloseOptions=i==null?void 0:i.__options),x.useEffect(()=>K,[K]),x.useEffect(()=>{if(!n)return;function H(W){W.open?R.current=!1:(R.current=W.reason===ei,K(),C.openChangeTimeout.clear(),C.restTimeout.clear(),C.blockMouseMove=!0,C.restTimeoutPending=!1)}return w.on("openchange",H),()=>{w.off("openchange",H)}},[n,w,C,K]),x.useEffect(()=>{if(!n)return;function H(G,F=!0){const ee=nd(N.current,"close",C.pointerType);ee?C.openChangeTimeout.start(ee,()=>{T.setOpen(!1,jt(ei,G)),k==null||k.events.emit("floating.closed",G)}):F&&(C.openChangeTimeout.clear(),T.setOpen(!1,jt(ei,G)),k==null||k.events.emit("floating.closed",G))}const W=u.current??(p?T.select("domReferenceElement"):null);if(!xn(W))return;function Y(G){var Oe;if(C.openChangeTimeout.clear(),C.blockMouseMove=!1,a&&!Ac(C.pointerType))return;const F=zI(I.current),ee=nd(N.current,"open",C.pointerType),ae=Gi(G),re=G.currentTarget??null,ye=T.select("domReferenceElement");let ge=re;if(xn(ae)&&!T.context.triggerElements.hasElement(ae)){for(const Ge of T.context.triggerElements.elements())if(Lt(Ge,ae)){ge=Ge;break}}xn(re)&&xn(ye)&&!T.context.triggerElements.hasElement(re)&&Lt(re,ye)&&(ge=ye);const Te=ge==null?!1:q(ye,ge,ae),$e=T.select("open"),He=((Oe=P.current)==null?void 0:Oe.call(P))??T.select("transitionStatus")==="ending",Ne=!$e&&He&&R.current,Ie=!Te&&xn(ge)&&xn(ye)&&Lt(ye,ge)&&Ne,be=F>0&&!ee,Le=Te&&($e||Ne)||Ie,Me=!$e||Te;if(Le){U()&&T.setOpen(!0,jt(ei,G,ge));return}be||(ee?C.openChangeTimeout.start(ee,()=>{Me&&U()&&T.setOpen(!0,jt(ei,G,ge))}):Me&&U()&&T.setOpen(!0,jt(ei,G,ge)))}function te(G){if(B()){V();return}K();const F=T.select("domReferenceElement"),ee=yn(F);C.restTimeout.clear(),C.restTimeoutPending=!1;const ae=A.current.floatingContext??(h==null?void 0:h());if(Hb(G.relatedTarget,T.context.triggerElements))return;if(O.current&&ae){T.select("open")||C.openChangeTimeout.clear();const ye=u.current;C.handler=O.current({...ae,tree:k,x:G.clientX,y:G.clientY,onClose(){V(),K(),L.current&&!B()&&ye===T.select("domReferenceElement")&&H(G,!0)}}),ee.addEventListener("mousemove",C.handler),C.handler(G);return}(C.pointerType==="touch"?!Lt(T.select("floatingElement"),G.relatedTarget):!0)&&H(G)}function M(G){Lt(W,G.relatedTarget)||(C.openChangeTimeout.clear(),C.restTimeout.clear(),C.restTimeoutPending=!1)}const z=v?cn(W,"mouseout",M):void 0;return c?_o(cn(W,"mousemove",Y,{once:!0}),cn(W,"mouseenter",Y),cn(W,"mouseleave",te),z):_o(cn(W,"mouseenter",Y),cn(W,"mouseleave",te),z)},[K,V,A,N,T,n,O,C,p,q,B,a,c,I,u,k,L,h,P,U,v]),x.useMemo(()=>{if(!n)return;function H(W){C.pointerType=W.pointerType}return{onPointerDown:H,onPointerEnter:H,onMouseMove(W){var ae,re,ye;const{nativeEvent:Y}=W,te=W.currentTarget,M=T.select("domReferenceElement"),z=T.select("open"),G=q(M,te,W.target);if(a&&!Ac(C.pointerType))return;if(z&&G&&((ae=C.handleCloseOptions)!=null&&ae.blockPointerEvents)){const ge=T.select("floatingElement");if(ge){const Te=((ye=(re=C.handleCloseOptions)==null?void 0:re.getScope)==null?void 0:ye.call(re))??te.ownerDocument.body;BP(C,{scopeElement:Te,referenceElement:te,floatingElement:ge})}}const F=zI(I.current);if(z&&!G||F===0||!G&&C.restTimeoutPending&&W.movementX**2+W.movementY**2<2)return;C.restTimeout.clear();function ee(){if(C.restTimeoutPending=!1,B())return;const ge=T.select("open");!C.blockMouseMove&&(!ge||G)&&U()&&T.setOpen(!0,jt(ei,Y,te))}C.pointerType==="touch"?fi.flushSync(()=>{ee()}):G&&z?ee():(C.restTimeoutPending=!0,C.restTimeout.start(F,ee))}}},[n,C,B,q,a,T,I,U])}const AZ="Escape";function p3(e){return Il&&e.movementX===0&&e.movementY===0}function xy(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function L0(e,t){return xy(t,e===Q4||e===IS,e===ty||e===ny)}function TT(e,t,n){return xy(t,e===IS,n?e===ty:e===ny)||e==="Enter"||e===" "||e===""}function _Z(e,t,n){return xy(t,n?e===ty:e===ny,e===IS)}function CZ(e,t,n,r){const i=n?e===ny:e===ty,a=e===Q4;return t==="both"||t==="horizontal"&&r?e===AZ:xy(t,i,a)}function FP(e,t){const{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:c=!1,loopFocus:u=!1,nested:d=!1,rtl:p=!1,virtual:h=!1,focusItemOnOpen:y="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:v=!0,disabledIndices:T=void 0,orientation:A="vertical",parentOrientation:w,id:k,resetOnPointerLeave:C=!0,externalTree:R,grid:O}=t,N=O!=null,I="rootStore"in e?e.rootStore:e,L=I.useState("open"),j=I.useState("floatingElement"),P=I.useState("domReferenceElement"),B=I.context.dataRef,U=qb(j),q=N2(P),K=ai(U),V=Gc(),H=Kc(R),W=x.useRef(y),Y=x.useRef(o??-1),te=x.useRef(null),M=x.useRef(!0),z=mt(xe=>{i(Y.current===-1?null:Y.current,xe)}),G=x.useRef(!!j),F=x.useRef(L),ee=x.useRef(!1),ae=x.useRef(!1),re=x.useRef(null),ye=ai(T),ge=ai(L),Te=ai(o),$e=ai(C),He=$f(),Ne=$f(),Ie=mt(()=>{function xe(ze){h?H==null||H.events.emit("virtualfocus",ze):re.current=Eb(ze,{sync:ee.current,preventScroll:!0})}const Qe=n.current[Y.current],oe=ae.current;Qe&&xe(Qe),(ee.current?ze=>ze():ze=>He.request(ze))(()=>{var ht;const ze=n.current[Y.current]||Qe;if(!ze)return;Qe||xe(ze),fe&&(oe||!M.current)&&((ht=ze.scrollIntoView)==null||ht.call(ze,{block:"nearest",inline:"nearest"}))})});lt(()=>{B.current.orientation=A},[B,A]),lt(()=>{a&&(L&&j?(Y.current=o??-1,W.current&&o!=null&&(ae.current=!0,z())):G.current&&(Y.current=-1,z()))},[a,L,j,o,z]),lt(()=>{if(a){if(!L){ee.current=!1;return}if(j)if(r==null){if(ee.current=!1,Te.current!=null)return;if(G.current&&(Y.current=-1,Ie()),(!F.current||!G.current)&&W.current&&(te.current!=null||W.current===!0&&te.current==null)){let xe=0;const Qe=()=>{n.current[0]==null?(xe<2&&(xe?ue=>Ne.request(ue):queueMicrotask)(Qe),xe+=1):(Y.current=te.current==null||TT(te.current,A,p)||d?vb(n):O2(n),te.current=null,z())};Qe()}}else Ph(n.current,r)||(Y.current=r,Ie(),ae.current=!1)}},[a,L,j,r,Te,d,n,A,p,z,Ie,Ne]),lt(()=>{var ze,nt;if(!a||j||!H||h||!G.current)return;const xe=H.nodesRef.current,Qe=(nt=(ze=xe.find(ht=>ht.id===V))==null?void 0:ze.context)==null?void 0:nt.elements.floating,oe=ta(yn(P??Qe??null)),ue=xe.some(ht=>ht.context&&Lt(ht.context.elements.floating,oe));Qe&&!ue&&M.current&&Qe.focus({preventScroll:!0})},[a,j,P,H,V,h]),lt(()=>{F.current=L,G.current=!!j}),lt(()=>{L||(te.current=null,W.current=y)},[L,y]);const be=r!=null,Le=mt(xe=>{if(!ge.current)return;const Qe=n.current.indexOf(xe.currentTarget);Qe!==-1&&(Y.current!==Qe||r!==Qe)&&(Y.current=Qe,z(xe))}),Me=mt(()=>{var xe,Qe,oe;return w??((oe=(Qe=(xe=H==null?void 0:H.nodesRef.current.find(ue=>ue.id===V))==null?void 0:xe.context)==null?void 0:Qe.dataRef)==null?void 0:oe.current.orientation)}),Oe=mt(()=>vb(n,ye.current)),Ge=mt(xe=>{if(M.current=!1,ee.current=!0,xe.which===229||!ge.current&&xe.currentTarget===K.current)return;if(d&&CZ(xe.key,A,p,N)){L0(xe.key,Me())||yo(xe),I.setOpen(!1,jt(zb,xe.nativeEvent)),lr(P)&&(h?H==null||H.events.emit("virtualfocus",P):P.focus());return}const Qe=Y.current,oe=vb(n,T),ue=O2(n,T);if(q||(xe.key==="Home"&&(yo(xe),Y.current=oe,z(xe)),xe.key==="End"&&(yo(xe),Y.current=ue,z(xe))),O!=null){const ze=O(xe,Y.current,n,A,u,p,T,oe,ue);if(ze!=null&&(Y.current=ze,z(xe)),A==="both")return}if(L0(xe.key,A)){if(yo(xe),L&&!h&&ta(xe.currentTarget.ownerDocument)===xe.currentTarget){Y.current=TT(xe.key,A,p)?oe:ue,z(xe);return}TT(xe.key,A,p)?u?Qe>=ue?c&&Qe!==n.current.length?Y.current=-1:(ee.current=!1,Y.current=oe):Y.current=hl(n.current,{startingIndex:Qe,disabledIndices:T}):Y.current=Math.min(ue,hl(n.current,{startingIndex:Qe,disabledIndices:T})):u?Qe<=oe?c&&Qe!==-1?Y.current=n.current.length:(ee.current=!1,Y.current=ue):Y.current=hl(n.current,{startingIndex:Qe,decrement:!0,disabledIndices:T}):Y.current=Math.max(oe,hl(n.current,{startingIndex:Qe,decrement:!0,disabledIndices:T})),Ph(n.current,Y.current)&&(Y.current=-1),z(xe)}}),fe=x.useMemo(()=>({onFocus(Qe){ee.current=!0,Le(Qe)},onClick:({currentTarget:Qe})=>Qe.focus({preventScroll:!0}),onMouseMove(Qe){p3(Qe)||(ee.current=!0,ae.current=!1,b&&Le(Qe))},onPointerLeave(Qe){var ue;if(!ge.current||!M.current||Qe.pointerType==="touch")return;ee.current=!0;const oe=Qe.relatedTarget;if(!(!b||n.current.includes(oe))&&$e.current&&((ue=re.current)==null||ue.call(re),re.current=null,Y.current=-1,z(Qe),!h)){const ze=K.current,nt=ta(yn(ze));ze&&Lt(ze,nt)&&ze.focus({preventScroll:!0})}}}),[Le,ge,K,b,n,z,$e,h]),Q=x.useMemo(()=>h&&L&&be&&{"aria-activedescendant":`${k}-${r}`},[h,L,be,k,r]),se=x.useMemo(()=>({...q?{}:Q,onKeyDown(xe){if(xe.key==="Tab"&&xe.shiftKey&&L&&!h){const Qe=Gi(xe.nativeEvent);if(Qe&&!Lt(K.current,Qe))return;yo(xe),I.setOpen(!1,jt(Rc,xe.nativeEvent)),lr(P)&&P.focus();return}Ge(xe)},onPointerMove(xe){p3(xe)||(M.current=!0)}}),[Q,Ge,K,q,I,L,h,P]),pe=x.useMemo(()=>{function xe(ue){I.setOpen(!0,jt(zb,ue.nativeEvent,ue.currentTarget))}function Qe(ue){y==="auto"&&ey(ue.nativeEvent)&&(W.current=!h)}function oe(ue){W.current=y,y==="auto"&&OS(ue.nativeEvent)&&(W.current=!0)}return{onKeyDown(ue){const ze=I.select("open");M.current=!1;const nt=ue.key.startsWith("Arrow"),ht=_Z(ue.key,Me(),p),Yt=L0(ue.key,A),Xt=(d?ht:Yt)||ue.key==="Enter"||ue.key.trim()==="";if(h&&ze)return Ge(ue);if(!(!ze&&!v&&nt)){if(Xt){const at=L0(ue.key,Me());te.current=d&&at?null:ue.key}if(d){ht&&(yo(ue),ze?(Y.current=Oe(),z(ue)):xe(ue));return}Yt&&(Te.current!=null&&(Y.current=Te.current),yo(ue),!ze&&v?xe(ue):Ge(ue),ze&&z(ue))}},onFocus(ue){I.select("open")&&!h&&(Y.current=-1,z(ue))},onPointerDown:oe,onPointerEnter:oe,onMouseDown:Qe,onClick:Qe}},[Ge,y,Oe,d,z,I,v,A,Me,p,Te,h]),Be=x.useMemo(()=>({...Q,...pe}),[Q,pe]);return x.useMemo(()=>a?{reference:Be,floating:se,item:fe,trigger:pe}:{},[a,Be,se,pe,fe])}function zP(e,t){const{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:c,enabled:u=!0,resetMs:d=750,selectedIndex:p=null}=t,h="rootStore"in e?e.rootStore:e,y=h.useState("open"),b=xi(),v=x.useRef(""),T=x.useRef(p??i??-1),A=x.useRef(null),w=mt(R=>{function O(K){return r==null?void 0:r.current[K]}function N(K){const V=O(K);return V&&!iy(V)||V!=null&&V.matches(":disabled")?!1:o==null||!Cf(ks,K,o)}function I(K,V,H=0){if(K.length===0)return-1;const W=(H%K.length+K.length)%K.length,Y=V.toLowerCase();for(let te=0;te<K.length;te+=1){const M=(W+te)%K.length,z=K[M];if(!(!(z!=null&&z.toLowerCase().startsWith(Y))||!N(M)))return M}return-1}const L=n.current;if(v.current.length>0&&R.key===" "&&(yo(R),c==null||c(!0)),v.current.length>0&&v.current[0]!==" "&&I(L,v.current)===-1&&R.key!==" "&&(c==null||c(!1)),L==null||R.key.length!==1||R.ctrlKey||R.metaKey||R.altKey)return;y&&R.key!==" "&&(yo(R),c==null||c(!0));const j=v.current==="";j&&(T.current=p??i??-1),L.every((K,V)=>{var H,W;return K&&N(V)?((H=K[0])==null?void 0:H.toLowerCase())!==((W=K[1])==null?void 0:W.toLowerCase()):!0})&&v.current===R.key&&(v.current="",T.current=A.current),v.current+=R.key,b.start(d,()=>{v.current="",T.current=A.current,c==null||c(!1)});const U=((j?p??i??-1:T.current)??0)+1,q=I(L,v.current,U);q!==-1?(a==null||a(q),A.current=q):R.key!==" "&&(v.current="",c==null||c(!1))}),k=mt(R=>{const O=R.relatedTarget,N=h.select("domReferenceElement"),I=h.select("floatingElement");Lt(N,O)||Lt(I,O)||(b.clear(),v.current="",T.current=A.current,c==null||c(!1))});lt(()=>{!y&&p!==null||(b.clear(),A.current=null,v.current!==""&&(v.current=""))},[y,p,b]);const C=x.useMemo(()=>({onKeyDown:w,onBlur:k}),[w,k]);return x.useMemo(()=>u?{reference:C,floating:C}:{},[u,C])}const h3=.1,kZ=h3*h3,br=.5;function P0(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function j0(e,t,n,r,i,a,o,c,u,d){let p=!1;return P0(e,t,n,r,i,a)&&(p=!p),P0(e,t,i,a,o,c)&&(p=!p),P0(e,t,o,c,u,d)&&(p=!p),P0(e,t,u,d,n,r)&&(p=!p),p}function NZ(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function $0(e,t,n,r,i,a){const o=Math.min(n,i),c=Math.max(n,i),u=Math.min(r,a),d=Math.max(r,a);return e>=o&&e<=c&&t>=u&&t<=d}function vy(e={}){const{blockPointerEvents:t=!1}=e,n=new Ns,r=({x:i,y:a,placement:o,elements:c,onClose:u,nodeId:d,tree:p})=>{const h=o==null?void 0:o.split("-")[0];let y=!1,b=null,v=null,T=typeof performance<"u"?performance.now():0;function A(k,C){const R=performance.now(),O=R-T;if(b===null||v===null||O===0)return b=k,v=C,T=R,!1;const N=k-b,I=C-v,L=N*N+I*I,j=O*O*kZ;return b=k,v=C,T=R,L<j}function w(){n.clear(),u()}return function(C){n.clear();const R=c.domReference,O=c.floating;if(!R||!O||h==null||i==null||a==null)return;const{clientX:N,clientY:I}=C,L=Gi(C),j=C.type==="mouseleave",P=Lt(O,L),B=Lt(R,L);if(P&&(y=!0,!j))return;if(B&&(y=!1,!j)){y=!0;return}if(j&&xn(C.relatedTarget)&&Lt(O,C.relatedTarget))return;function U(){return!!(p&&Mc(p.nodesRef.current,d).length>0)}function q(){U()||w()}if(U())return;const K=R.getBoundingClientRect(),V=O.getBoundingClientRect(),H=i>V.right-V.width/2,W=a>V.bottom-V.height/2,Y=V.width>K.width,te=V.height>K.height,M=(Y?K:V).left,z=(Y?K:V).right,G=(te?K:V).top,F=(te?K:V).bottom;if(h==="top"&&a>=K.bottom-1||h==="bottom"&&a<=K.top+1||h==="left"&&i>=K.right-1||h==="right"&&i<=K.left+1){q();return}let ee=!1;switch(h){case"top":ee=$0(N,I,M,K.top+1,z,V.bottom-1);break;case"bottom":ee=$0(N,I,M,V.top+1,z,K.bottom-1);break;case"left":ee=$0(N,I,V.right-1,F,K.left+1,G);break;case"right":ee=$0(N,I,K.right-1,F,V.left+1,G);break}if(ee)return;if(y&&!NZ(N,I,K)){q();return}if(!j&&A(N,I)){q();return}let ae=!1;switch(h){case"top":{const re=Y?br/2:br*4,ye=Y||H?i+re:i-re,ge=Y?i-re:H?i+re:i-re,Te=a+br+1,$e=H||Y?V.bottom-br:V.top,He=H?Y?V.bottom-br:V.top:V.bottom-br;ae=j0(N,I,ye,Te,ge,Te,V.left,$e,V.right,He);break}case"bottom":{const re=Y?br/2:br*4,ye=Y||H?i+re:i-re,ge=Y?i-re:H?i+re:i-re,Te=a-br,$e=H||Y?V.top+br:V.bottom,He=H?Y?V.top+br:V.bottom:V.top+br;ae=j0(N,I,ye,Te,ge,Te,V.left,$e,V.right,He);break}case"left":{const re=te?br/2:br*4,ye=te||W?a+re:a-re,ge=te?a-re:W?a+re:a-re,Te=i+br+1,$e=W||te?V.right-br:V.left,He=W?te?V.right-br:V.left:V.right-br;ae=j0(N,I,$e,V.top,He,V.bottom,Te,ye,Te,ge);break}case"right":{const re=te?br/2:br*4,ye=te||W?a+re:a-re,ge=te?a-re:W?a+re:a-re,Te=i-br,$e=W||te?V.left+br:V.right,He=W?te?V.left+br:V.right:V.left+br;ae=j0(N,I,Te,ye,Te,ge,$e,V.top,He,V.bottom);break}}ae?y||n.start(40,q):q()}};return r.__options={...e,blockPointerEvents:t},r}const UP=x.createContext(void 0);function RZ(){const e=x.useContext(UP);if(e===void 0)throw new Error(Cn(26));return e}const P2="ArrowUp",j2="ArrowDown",$2="ArrowLeft",B2="ArrowRight",F2="Home",z2="End",Wm=new Set([P2,j2,$2,B2,F2,z2]),HP="Shift",OZ=[HP,"Control","Alt","Meta"];function IZ(e){return lr(e)&&e.tagName==="INPUT"}function m3(e){return!!(IZ(e)&&e.selectionStart!=null||lr(e)&&e.tagName==="TEXTAREA")}function g3(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop;const o=e.clientWidth<e.scrollWidth,c=e.clientHeight<e.scrollHeight;if(o&&r!=="vertical"){const u=b3(e,t,"left"),d=B0(e),p=B0(t);n==="ltr"&&(u+t.offsetWidth+p.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight?i=u+t.offsetWidth+p.scrollMarginRight-e.clientWidth+d.scrollPaddingRight:u-p.scrollMarginLeft<e.scrollLeft+d.scrollPaddingLeft&&(i=u-p.scrollMarginLeft-d.scrollPaddingLeft)),n==="rtl"&&(u-p.scrollMarginLeft<e.scrollLeft+d.scrollPaddingLeft?i=u-p.scrollMarginLeft-d.scrollPaddingLeft:u+t.offsetWidth+p.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight&&(i=u+t.offsetWidth+p.scrollMarginRight-e.clientWidth+d.scrollPaddingRight))}if(c&&r!=="horizontal"){const u=b3(e,t,"top"),d=B0(e),p=B0(t);u-p.scrollMarginTop<e.scrollTop+d.scrollPaddingTop?a=u-p.scrollMarginTop-d.scrollPaddingTop:u+t.offsetHeight+p.scrollMarginBottom>e.scrollTop+e.clientHeight-d.scrollPaddingBottom&&(a=u+t.offsetHeight+p.scrollMarginBottom-e.clientHeight+d.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:"auto"})}function b3(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function B0(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}const MZ="--nested-dialogs",DZ="data-nested-dialog-open",LZ={...zm,...Ol,nestedDialogOpen(e){return e?{[DZ]:""}:null}},PZ=x.forwardRef(function(t,n){const{render:r,className:i,style:a,finalFocus:o,initialFocus:c,...u}=t,d=Vc(),p=d.useState("descriptionElementId"),h=d.useState("disablePointerDismissal"),y=d.useState("floatingRootContext"),b=d.useState("popupProps"),v=d.useState("modal"),T=d.useState("mounted"),A=d.useState("nested"),w=d.useState("nestedOpenDialogCount"),k=d.useState("open"),C=d.useState("openMethod"),R=d.useState("titleElementId"),O=d.useState("transitionStatus"),N=d.useState("role"),I=y.useState("floatingId");RZ(),$a({open:k,ref:d.context.popupRef,onComplete(){var q,K;k&&((K=(q=d.context).onOpenChangeComplete)==null||K.call(q,!0))}});const L=c===void 0?DP(d.context.popupRef):c,j=w>0,P=d.useStateSetter("popupElement"),U=It("div",t,{state:{open:k,nested:A,transitionStatus:O,nestedDialogOpen:j},props:[b,{id:I,"aria-labelledby":R,"aria-describedby":p,role:N,...Km,hidden:!T,onKeyDown(q){Wm.has(q.key)&&q.stopPropagation()},style:{[MZ]:w}},u],ref:[n,d.context.popupRef,P],stateAttributesMapping:LZ});return m.jsx(sy,{context:y,openInteractionType:C,disabled:!T,closeOnFocusOut:!h,initialFocus:L,returnFocus:o,modal:v!==!1,restoreFocus:"popup",children:U})});function Xm(e){return yS(19)?e:e?"true":void 0}const Ey=x.forwardRef(function(t,n){const{cutout:r,...i}=t;let a;if(r){const o=r.getBoundingClientRect();a=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${o.left}px ${o.top}px,${o.left}px ${o.bottom}px,${o.right}px ${o.bottom}px,${o.right}px ${o.top}px,${o.left}px ${o.top}px)`}return m.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:a}})}),jZ=x.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,a=Vc(),o=a.useState("mounted"),c=a.useState("modal"),u=a.useState("open");return o||r?m.jsx(UP.Provider,{value:r,children:m.jsxs(ay,{ref:n,...i,children:[o&&c===!0&&m.jsx(Ey,{ref:a.context.internalBackdropRef,inert:Xm(!u)}),t.children]})}):null});let y3={},x3={},v3="";function Ty(e,t){return Lm(e)?e:t}function E3(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Ty(t,n)).overflowY)}function $Z(e){if(typeof document>"u")return!1;const t=yn(e);return _r(t).innerWidth-t.documentElement.clientWidth>0}function BZ(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=yn(e),r=n.documentElement,i=n.body,a=Ty(r,i),o=a.style.overflowY,c=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",a.style.overflowY="scroll";const u=a.offsetWidth;a.style.overflowY="hidden";const d=a.offsetWidth;return a.style.overflowY=o,r.style.scrollbarGutter=c,u===d}function FZ(e){const t=yn(e),n=t.documentElement,r=t.body,i=Ty(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(i.style,a)}}function zZ(e){var b;const t=yn(e),n=t.documentElement,r=t.body,i=_r(n);let a=0,o=0,c=!1;const u=Eo.create();if(Il&&(((b=i.visualViewport)==null?void 0:b.scale)??1)!==1)return()=>{};function d(){const v=i.getComputedStyle(n),T=i.getComputedStyle(r),k=(v.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";a=n.scrollTop,o=n.scrollLeft,y3={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},v3=n.style.scrollBehavior,x3={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const C=n.scrollHeight>n.clientHeight,R=n.scrollWidth>n.clientWidth,O=v.overflowY==="scroll"||T.overflowY==="scroll",N=v.overflowX==="scroll"||T.overflowX==="scroll",I=Math.max(0,i.innerWidth-r.clientWidth),L=Math.max(0,i.innerHeight-r.clientHeight),j=parseFloat(T.marginTop)+parseFloat(T.marginBottom),P=parseFloat(T.marginLeft)+parseFloat(T.marginRight),B=Ty(n,r);if(c=BZ(e),c){n.style.scrollbarGutter=k,B.style.overflowY="hidden",B.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:k,overflowY:"hidden",overflowX:"hidden"}),(C||O)&&(n.style.overflowY="scroll"),(R||N)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:j||L?`calc(100dvh - ${j+L}px)`:"100dvh",width:P||I?`calc(100vw - ${P+I}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function p(){Object.assign(n.style,y3),Object.assign(r.style,x3),c||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=v3)}function h(){p(),u.request(d)}d();const y=cn(i,"resize",h);return()=>{u.cancel(),p(),typeof i.removeEventListener=="function"&&y()}}class UZ{constructor(){pt(this,"lockCount",0);pt(this,"restore",null);pt(this,"timeoutLock",Ns.create());pt(this,"timeoutUnlock",Ns.create());pt(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});pt(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const n=yn(t),r=n.documentElement,i=n.body,a=_r(r);if(E3(a,r,i)){const c=new a.MutationObserver(()=>{E3(a,r,i)||(c.disconnect(),this.restore=null,this.lock(t))}),u={attributes:!0};c.observe(r,u),c.observe(i,u),this.restore=()=>c.disconnect();return}const o=J1||!$Z(t);this.restore=o?FZ(t):zZ(t)}}const HZ=new UZ;function qP(e=!0,t=null){lt(()=>{if(e)return HZ.acquire(t)},[e,t])}function qZ({store:e,parentContext:t,isDrawer:n}){const r=e.useState("open"),i=e.useState("disablePointerDismissal"),a=e.useState("modal"),o=e.useState("popupElement"),c=e.useState("floatingRootContext"),[u,d]=x.useState(0),[p,h]=x.useState(0),y=u===0,b=Vm(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(v){if(!e.context.outsidePressEnabledRef.current||"button"in v&&v.button!==0)return!1;if("touches"in v){if(v.type==="touchend"){if(v.changedTouches.length!==1||v.touches.length!==0)return!1}else if(v.touches.length!==1)return!1}const T=Gi(v);if(y&&!i){if(a){const A=e.context.internalBackdropRef.current,w=e.context.backdropRef.current;return A||w?A===T||w===T||Lt(T,o)&&!(T!=null&&T.hasAttribute("data-base-ui-portal")):!0}return!0}return!1},escapeKey:y});return qP(r&&a===!0,o),e.useContextCallback("onNestedDialogOpen",(v,T)=>{d(v),h(T)}),lt(()=>(t!=null&&t.onNestedDialogOpen&&(r?t.onNestedDialogOpen(u+1,p+(n?1:0)):t.onNestedDialogOpen(0,0)),()=>{t!=null&&t.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,u,p,t]),hy(e,{activeTriggerProps:b.reference,inactiveTriggerProps:b.trigger,popupProps:b.floating,nestedOpenDialogCount:u,nestedOpenDrawerCount:p}),null}const VZ={...gy,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role};class GZ extends Qf{constructor(n,r,i){const a=new Ym,o=KZ(n,a,r,i);super(o,YZ(a),VZ);pt(this,"setOpen",(n,r)=>{var i,a;r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&r.trigger==null&&this.state.activeTriggerId!=null&&(r.trigger=this.state.activeTriggerElement??void 0),(a=(i=this.context).onOpenChange)==null||a.call(i,n,r),!r.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(n,r),this.update(uy(this.state,n,r.trigger)))})}}function KZ(e,t,n,r=!1){return{...my(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function YZ(e){return{popupRef:x.createRef(),backdropRef:x.createRef(),internalBackdropRef:x.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function WZ(e,t){const{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:c=!1,modal:u=!0,actionsRef:d,handle:p,triggerId:h,defaultTriggerId:y=null}=t,b=e==="drawer",v=u,T=c,A="dialog",w=Vc(!0),k=w!=null,C={modal:v,disablePointerDismissal:T,nested:k,role:A},R=GS((P,B)=>new GZ({open:i,openProp:r,activeTriggerId:y,triggerIdProp:h,...C},P,B),!0);R.useControlledProp("openProp",r),R.useControlledProp("triggerIdProp",h),R.useSyncedValues(C),R.useContextCallback("onOpenChange",a),R.useContextCallback("onOpenChangeComplete",o);const O=R.useState("open"),N=R.useState("mounted"),I=R.useState("payload");PP(R,O),fy(R);const{forceUnmount:L}=py(O,R);x.useImperativeHandle(d,()=>({unmount:L,close:()=>R.setOpen(!1,jt(Y1))}),[L,R]);const j=O||N;return m.jsxs(K4.Provider,{value:R,children:[p&&m.jsx(cy,{handle:p,store:R}),j&&m.jsx(qZ,{store:R,parentContext:w==null?void 0:w.context,isDrawer:b}),typeof n=="function"?n({payload:I}):n]})}const XZ=Gm(function(t){return WZ("dialog",t)}),QZ=x.forwardRef(function(t,n){const{render:r,className:i,style:a,id:o,...c}=t,u=Vc(),d=Gr(o);return u.useSyncedValueWithCleanup("titleElementId",d),It("h2",t,{ref:n,props:[{id:d},c]})});function ZZ(e){const t=x.useRef(""),n=x.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:x.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i?e(i,i.pointerType):e(i,t.current),t.current=""},[e]),onPointerDown:n}}function ZS(e,t){const n=mt((a,o)=>{(typeof e=="function"?e():e)||t(o||(J1?"touch":""))}),{onClick:r,onPointerDown:i}=ZZ(n);return x.useMemo(()=>({onClick:r,onPointerDown:i}),[r,i])}function VP(e){const[t,n]=x.useState(null),r=ZS(e,n);return Xf(e,i=>{i&&!e&&n(null)}),x.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}const JZ=ly(function(t,n){const{render:r,className:i,style:a,disabled:o=!1,nativeButton:c=!0,id:u,payload:d,handle:p,...h}=t,y=Vc(!0),v=by(p)??y;if(!v)throw new Error(Cn(79));const T=Gr(u),A=v.useState("floatingRootContext"),w=v.useState("isOpenedByTrigger",T),k=v.useState("triggerPopupId",T),C=x.useRef(null),{registerTrigger:R,isMountedByThisTrigger:O}=dy(T,C,v,{payload:d}),{getButtonProps:N,buttonRef:I}=is({disabled:o,native:c}),L=qm(A),j=ZS(()=>v.select("open"),U=>{v.set("openMethod",U)}),P={disabled:o,open:w},B=v.useState("triggerProps",O);return It("button",t,{state:P,ref:[I,n,R,C],props:[L.reference,B,j,{[$S]:"",id:T,"aria-haspopup":"dialog","aria-expanded":w,"aria-controls":k},h,N],stateAttributesMapping:Fm})}),JS=x.createContext(null),GP=x.createContext(null),eA=x.createContext(null),F0=new Map;function KP(e){const t=x.useContext(JS),n=x.useContext(GP),r=x.useContext(eA);return e==="surface"?r:e==="workspace"?n:e==="run"?t:null}function eJ(e,t,n){x.useLayoutEffect(()=>{if(!e||!n)return;const r=[...e.children].filter(i=>i instanceof HTMLElement&&!i.contains(t.current));for(const i of r){const a=F0.get(i)??{count:0,previous:i.inert};a.count+=1,F0.set(i,a),i.inert=!0}return()=>{for(const i of r){const a=F0.get(i);!a||--a.count>0||(i.inert=a.previous,F0.delete(i))}}},[n,e,t])}function wy({...e}){return m.jsx(XZ,{"data-slot":"dialog",...e})}function YP({...e}){return m.jsx(JZ,{"data-slot":"dialog-trigger",...e})}function tA({...e}){return m.jsx(jZ,{"data-slot":"dialog-portal",...e})}function WP({...e}){return m.jsx(kS,{"data-slot":"dialog-close",...e})}function nA({className:e,...t}){return m.jsx(kX,{"data-slot":"dialog-overlay",className:De("fixed inset-0 isolate z-50 bg-backdrop duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...t})}const tJ={small:"w-[min(420px,calc(100%-2rem))] max-h-[min(86%,900px)]",medium:"w-[min(560px,calc(100%-2rem))] max-h-[min(86%,900px)]",large:"w-[min(860px,calc(100%-2rem))] max-h-[min(86%,900px)]",wide:"w-[min(1180px,calc(100%-2rem))] h-[min(86%,900px)]",full:"w-[calc(100%-3rem)] h-[calc(100%-3rem)] max-sm:h-full max-sm:w-full max-sm:rounded-none"};function Sy({className:e,children:t,scope:n="page",size:r="medium",showCloseButton:i=!0,onBackdropClick:a,overlayClassName:o,keepMounted:c,open:u=!0,ref:d,...p}){const h=KP(n),y=x.useRef(null),[b,v]=x.useState(!1);eJ(h,y,b&&u);const T=h!==null;return m.jsxs(tA,{container:h??void 0,keepMounted:c,children:[m.jsx(nA,{className:De(T?"absolute z-[60]":"z-[100]",n==="workspace"&&"z-[75]",o),forceRender:!T,onClick:T?a:void 0}),m.jsxs(PZ,{"data-slot":"dialog-content","data-scope":n,className:De("top-1/2 left-1/2 z-50 flex max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col gap-4 overflow-hidden rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",T?"absolute z-[61] max-h-[calc(100%-2rem)]":"fixed z-[100]",n==="workspace"&&"z-[76]",tJ[r],e),ref:A=>{y.current=A,v(A!==null),typeof d=="function"?d(A):d&&(d.current=A)},...p,children:[t,i&&m.jsxs(kS,{"data-slot":"dialog-close",render:m.jsx(Er,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[m.jsx(CS,{}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function rA({className:e,...t}){return m.jsx("div",{"data-slot":"dialog-header",className:De("flex flex-col gap-1 pr-8",e),...t})}function iA({className:e,...t}){return m.jsx("div",{"data-slot":"dialog-body",className:De("flex min-h-0 flex-1 flex-col overflow-auto",e),...t})}function XP({className:e,showCloseButton:t=!1,children:n,...r}){return m.jsxs("div",{"data-slot":"dialog-footer",className:De("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",e),...r,children:[n,t&&m.jsx(kS,{render:m.jsx(Er,{variant:"outline"}),children:"Close"})]})}function Qm({className:e,...t}){return m.jsx(QZ,{"data-slot":"dialog-title",className:De("text-base leading-none font-medium",e),...t})}function aA({className:e,...t}){return m.jsx(NX,{"data-slot":"dialog-description",className:De("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}const nJ=Object.freeze(Object.defineProperty({__proto__:null,Dialog:wy,DialogBody:iA,DialogClose:WP,DialogContent:Sy,DialogDescription:aA,DialogFooter:XP,DialogHeader:rA,DialogOverlay:nA,DialogPortal:tA,DialogTitle:Qm,DialogTrigger:YP,RunModalContext:JS,SurfaceModalContext:eA,WorkspaceModalContext:GP,useModalContainer:KP},Symbol.toStringTag,{value:"Module"})),QP=x.createContext(void 0);function Zm(e){const t=x.useContext(QP);if(t===void 0&&!e)throw new Error(Cn(33));return t}const ZP=x.createContext(void 0);function Mo(e){const t=x.useContext(ZP);if(t===void 0&&!e)throw new Error(Cn(36));return t}const rJ=x.createContext(void 0);function sA(e=!0){const t=x.useContext(rJ);if(t===void 0&&!e)throw new Error(Cn(25));return t}const JP=x.createContext(void 0);function iJ(){const e=x.useContext(JP);if(e===void 0)throw new Error(Cn(30));return e}function aJ(e){const{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:c,itemMetadata:u}=e,{events:d}=a.useState("floatingTreeRoot"),p=a.useState("open"),h=sA(!0),y=h!==void 0;return x.useMemo(()=>({id:r,role:"menuitem",tabIndex:p&&n?0:-1,onKeyDown(b){b.key===" "&&(o!=null&&o.current)&&b.preventDefault()},onMouseMove(b){i&&d.emit("itemhover",{nodeId:i,target:b.currentTarget})},onClick(b){t&&d.emit("close",{domEvent:b,reason:qu})},onMouseUp(b){if(h){const v=h.initialCursorPointRef.current;if(h.initialCursorPointRef.current=null,y&&v&&Math.abs(b.clientX-v.x)<=1&&Math.abs(b.clientY-v.y)<=1||y&&!NS&&b.button===2)return}c.current&&a.context.allowMouseUpTriggerRef.current&&(!y||b.button===2)&&u.type==="regular-item"&&Hu(c.current,b,{detail:1})}}),[t,n,r,d,i,p,a,o,c,h,y,u])}const oA={type:"regular-item"};function Ay(e){const{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:c,itemMetadata:u,nodeId:d}=e,p=x.useRef(null),{getButtonProps:h,buttonRef:y}=is({disabled:n,focusableWhenDisabled:!0,native:c,composite:!0}),b=aJ({closeOnClick:t,highlighted:r,id:i,nodeId:d,store:a,typingRef:o,itemRef:p,itemMetadata:u}),v=x.useCallback(A=>La(b,{onMouseEnter(){u.type==="submenu-trigger"&&u.setActive()}},A,h),[b,h,u]),T=Ys(p,y);return x.useMemo(()=>({getItemProps:v,itemRef:T}),[v,T])}const e5=x.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function sJ(){return x.useContext(e5)}function pd(e={}){const{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:c,subscribeMapChange:u,nextIndexRef:d}=sJ(),p=x.useRef(-1),[h,y]=x.useState(a==null&&t?()=>{if(p.current===-1){const A=d.current;d.current+=1,p.current=A}return p.current}:-1),b=a??h,v=x.useRef(null),T=x.useCallback(A=>{const w=v.current;w&&c(w),v.current=A,A&&o(A,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,c,r,n,i]);return lt(()=>{if(a==null)return u(A=>{var k;const w=v.current?(k=A.get(v.current))==null?void 0:k.index:null;w!=null&&y(w)})},[a,u]),{ref:T,index:b}}const oJ="data-checked",lJ="data-unchecked",_y={checked(e){return e?{[oJ]:""}:{[lJ]:""}},...Ol},cJ=x.forwardRef(function(t,n){const{render:r,className:i,id:a,label:o,nativeButton:c=!1,disabled:u=!1,closeOnClick:d=!1,checked:p,defaultChecked:h,onCheckedChange:y,style:b,...v}=t,T=pd({guess:!0,label:o}),A=Zm(!0),w=Gr(a),{store:k}=Mo(),C=k.useState("disabled"),R=u||C,O=k.useState("isActive",T.index),N=k.useState("itemProps"),[I,L]=Ws({controlled:p,default:h??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:j,itemRef:P}=Ay({closeOnClick:d,disabled:R,highlighted:O,id:w,store:k,nativeButton:c,nodeId:A==null?void 0:A.context.nodeId,itemMetadata:oA}),B=x.useMemo(()=>({disabled:R,highlighted:O,checked:I}),[R,O,I]);function U(K){const V=jt(qu,K.nativeEvent,void 0,{preventUnmountOnClose:xr});y==null||y(!I,V),!V.isCanceled&&L(H=>!H)}const q=It("div",t,{state:B,stateAttributesMapping:_y,props:[N,{role:"menuitemcheckbox","aria-checked":I,onClick:U},v,j],ref:[P,n,T.ref]});return m.jsx(JP.Provider,{value:B,children:q})}),uJ=x.forwardRef(function(t,n){const{render:r,className:i,style:a,keepMounted:o=!1,...c}=t,u=iJ(),d=x.useRef(null),{transitionStatus:p,mounted:h,setMounted:y}=Rl(u.checked);$a({batch:!0,enabled:!u.checked,open:u.checked,ref:d,onComplete(){u.checked||y(!1)}});const b={checked:u.checked,disabled:u.disabled,highlighted:u.highlighted,transitionStatus:p};return It("span",t,{state:b,ref:[n,d],stateAttributesMapping:_y,props:{"aria-hidden":!0,...c},enabled:o||h})}),lA=x.createContext(void 0);function dJ(){const e=x.useContext(lA);if(e===void 0)throw new Error(Cn(31));return e}const fJ=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,[c,u]=x.useState(void 0),d=It("div",t,{ref:n,props:{role:"group","aria-labelledby":c,...o}});return m.jsx(lA.Provider,{value:u,children:d})}),pJ=x.forwardRef(function(t,n){const{render:r,className:i,style:a,id:o,...c}=t,u=Gr(o),d=dJ();return lt(()=>(d(u),()=>{d(p=>p===u?void 0:p)}),[d,u]),It("div",t,{ref:n,props:{id:u,"aria-hidden":!0,...c}})}),hJ=x.forwardRef(function(t,n){const{render:r,className:i,id:a,label:o,nativeButton:c=!1,disabled:u=!1,closeOnClick:d=!0,style:p,...h}=t,y=pd({guess:!0,label:o}),b=Zm(!0),v=Gr(a),{store:T}=Mo(),A=T.useState("disabled"),w=u||A,k=T.useState("isActive",y.index),C=T.useState("itemProps"),{getItemProps:R,itemRef:O}=Ay({closeOnClick:d,disabled:w,highlighted:k,id:v,store:T,nativeButton:c,nodeId:b==null?void 0:b.context.nodeId,itemMetadata:oA});return It("div",t,{state:{disabled:w,highlighted:k},props:[C,h,R],ref:[O,n,y.ref]})}),mJ=x.createContext(void 0);function Cy(e){return x.useContext(mJ)}function Jm(e){return e==="starting"?fQ:tr}const gJ=x.forwardRef(function(t,n){const{render:r,className:i,style:a,finalFocus:o,...c}=t,{store:u}=Mo(),{side:d,align:p}=Zm(),h=Cy()!=null,y=u.useState("open"),b=u.useState("transitionStatus"),v=u.useState("popupProps"),T=u.useState("mounted"),A=u.useState("instantType"),w=u.useState("activeTriggerElement"),k=u.useState("parent"),C=u.useState("lastOpenChangeReason"),R=u.useState("rootId"),O=u.useState("floatingRootContext"),N=u.useState("floatingTreeRoot"),I=u.useState("closeDelay"),L=u.useState("hoverEnabled"),j=u.useState("disabled"),P=u.useState("openMethod"),B=k.type==="context-menu";$a({open:y,ref:u.context.popupRef,onComplete(){var H,W;y&&((W=(H=u.context).onOpenChangeComplete)==null||W.call(H,!0))}}),x.useEffect(()=>{function H(W){u.setOpen(!1,jt(W.reason,W.domEvent))}return N.events.on("close",H),()=>{N.events.off("close",H)}},[N.events,u]),QS(O,{enabled:L&&!j&&!B&&k.type!=="menubar",closeDelay:I});const U=u.useStateSetter("popupElement"),q={transitionStatus:b,side:d,align:p,open:y,nested:k.type==="menu",instant:A},K=It("div",t,{state:q,ref:[n,u.context.popupRef,U],stateAttributesMapping:Um,props:[v,{onKeyDown(H){h&&Wm.has(H.key)&&H.stopPropagation()}},Jm(b),c,{"data-rootownerid":R}]});let V=k.type===void 0||B;return(w||k.type==="menubar"&&C!==K1)&&(V=!0),m.jsx(sy,{context:O,openInteractionType:P,modal:B,disabled:!T,returnFocus:o===void 0?V:o,initialFocus:k.type!=="menu",restoreFocus:!0,externalTree:k.type!=="menubar"?N:void 0,previousFocusableElement:w,nextFocusableElement:k.type===void 0?u.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:k.type===void 0?u.context.beforeContentFocusGuardRef:void 0,children:K})}),t5=x.createContext(void 0);function bJ(){const e=x.useContext(t5);if(e===void 0)throw new Error(Cn(32));return e}const n5=x.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:a,parent:o}=Mo();if(!(a.useState("mounted")||r))return null;const d=o.type==="menu"||o.type==="menubar"?"group":void 0;return m.jsx(t5.Provider,{value:r,children:m.jsx(ay,{ref:n,...i,portalOwnerRole:d})})}),yJ=x.createContext(void 0);function ky(){const e=x.useContext(yJ);return(e==null?void 0:e.direction)??"ltr"}const xJ=e=>({name:"arrow",options:e,async fn(t){var te,M;const{x:n,y:r,placement:i,rects:a,platform:o,elements:c,middlewareData:u}=t,{element:d,padding:p=0,offsetParent:h="real"}=Ic(e,t)||{};if(d==null)return{};const y=tP(p),b={x:n,y:r},v=LS(i),T=DS(v),A=await o.getDimensions(d),w=v==="y",k=w?"top":"left",C=w?"bottom":"right",R=w?"clientHeight":"clientWidth",O=a.reference[T]+a.reference[v]-b[v]-a.floating[T],N=b[v]-a.reference[v],I=h==="real"?await((te=o.getOffsetParent)==null?void 0:te.call(o,d)):c.floating;let L=c.floating[R]||a.floating[T];(!L||!await((M=o.isElement)==null?void 0:M.call(o,I)))&&(L=c.floating[R]||a.floating[T]);const j=O/2-N/2,P=L/2-A[T]/2-1,B=Math.min(y[k],P),U=Math.min(y[C],P),q=B,K=L-A[T]-U,V=L/2-A[T]/2+j,H=eP(q,V,K),W=!u.arrow&&Sl(i)!=null&&V!==H&&a.reference[T]/2-(V<q?B:U)-A[T]/2<0,Y=W?V<q?V-q:V-K:0;return{[v]:b[v]+Y,data:{[v]:H,centerOffset:V-H-Y,...W&&{alignmentOffset:Y}},reset:W}}}),vJ=(e,t)=>{const{name:n,fn:r}=xJ(e);return{name:n,fn:r,options:[e,t]}},EJ={name:"hide",async fn(e){const{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},TJ={sideX:"left",sideY:"top"},wJ="--available-width",SJ="--available-height",AJ="--anchor-width",_J="--anchor-height",CJ="--transform-origin",T3=wJ,w3=SJ;function r5(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function S3(e,t,n){const{rects:r,placement:i}=e;return{side:r5(t,Cs(i),n),align:Sl(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Ny(e){return kJ(e,TZ)}function kJ(e,t){var kn,Dt;const{anchor:n,positionMethod:r="absolute",side:i="bottom",sideOffset:a=0,align:o="center",alignOffset:c=0,collisionBoundary:u,collisionPadding:d=5,sticky:p=!1,arrowPadding:h=5,disableAnchorTracking:y=!1,inline:b,keepMounted:v=!1,floatingRootContext:T,mounted:A,collisionAvoidance:w,shift:k,nodeId:C,adaptiveOrigin:R,lazyFlip:O=!1,externalTree:N}=e,[I,L]=x.useState(null);!A&&I!==null&&L(null);const j=w.side||"flip",P=w.align||"flip",B=w.fallbackAxisSide||"end",U=(k==null?void 0:k.crossAxis)??!1,q=k==null?void 0:k.rootBoundary,K=typeof n=="function"?n:void 0,V=mt(K),H=K?V:n,W=ai(n),Y=ai(A),M=ky()==="rtl",z=I||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":M?"left":"right","inline-start":M?"right":"left"}[i],G=o==="center"?z:`${z}-${o}`;let F=d;typeof F=="number"?F={top:F,right:F,bottom:F,left:F}:F&&(F={top:F.top||0,right:F.right||0,bottom:F.bottom||0,left:F.left||0});const ee=1,ae=i==="bottom"?ee:0,re=i==="top"?ee:0,ye=i==="right"?ee:0,ge=i==="left"?ee:0,Te={boundary:u==="clipping-ancestors"?"clippingAncestors":u,padding:F},$e=x.useRef(null),He=ai(a),Ne=ai(c),Ie=typeof a!="function"?a:0,be=typeof c!="function"?c:0,Le=[];b&&Le.push(b),Le.push(eZ(ne=>{const Ce=S3(ne,i,M),le=typeof He.current=="function"?He.current(Ce):He.current,Fe=typeof Ne.current=="function"?Ne.current(Ce):Ne.current;return{mainAxis:le,crossAxis:Fe,alignmentAxis:Fe}},[Ie,be,M,i]));const Me=P==="none"&&j!=="shift",Oe=!Me&&(p||U||j==="shift"),Ge=j==="none"?null:rZ({...Te,padding:{top:F.top+ee+ae,right:F.right+ee+ge,bottom:F.bottom+ee+re,left:F.left+ee+ye},mainAxis:!U&&j==="flip",crossAxis:P==="flip"?"alignment":!1,fallbackAxisSideDirection:B}),fe=Me?null:tZ({...Te,rootBoundary:q,mainAxis:P!=="none",crossAxis:Oe,limiter:p||U?void 0:nZ(ne=>{if(!$e.current)return{};const{width:Ce,height:le}=$e.current.getBoundingClientRect(),Fe=_s(Cs(ne.placement)),dt=Fe==="y"?Ce:le,St=Fe==="y"?F.left+F.right:F.top+F.bottom;return{offset:dt/2+St/2}})},[Te,p,U,q,F,P]);j==="shift"||P==="shift"||o==="center"?Le.push(fe,Ge):Le.push(Ge,fe),Le.push(iZ({...Te,apply({elements:{floating:ne},availableWidth:Ce,availableHeight:le,rects:Fe}){if(!Y.current)return;const dt=ne.style;dt.setProperty(T3,`${Ce}px`),dt.setProperty(w3,`${le}px`);const St=_r(ne).devicePixelRatio||1,{x:We,y:rt,width:Xe,height:Tt}=Fe.reference,Pt=(Math.round((We+Xe)*St)-Math.round(We*St))/St,qn=(Math.round((rt+Tt)*St)-Math.round(rt*St))/St;dt.setProperty(AJ,`${Pt}px`),dt.setProperty(_J,`${qn}px`)}}),vJ(ne=>({element:$e.current||yn(ne.elements.floating).createElement("div"),padding:$e.current?h:0,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(ne){var Vn,zt,mn,kr,Wi,Ir;const{elements:{floating:Ce},middlewareData:le,placement:Fe,platform:dt,rects:St,y:We}=ne,rt=Cs(Fe),Xe=Sl(Fe),Tt=_s(rt)==="y",Pt=$e.current,qn=typeof a=="function"?a(S3(ne,i,M)):a;let Pn;if(!Pt&&Xe&&Math.abs(Tt?((Vn=le.shift)==null?void 0:Vn.x)||0:((zt=le.shift)==null?void 0:zt.y)||0)<=1)Pn=Xe==="start"===(Tt&&((mn=dt.isRTL)==null?void 0:mn.call(dt,Ce))===!0)?"100%":"0%";else{const va=Tt?((kr=le.arrow)==null?void 0:kr.x)||0:((Wi=le.arrow)==null?void 0:Wi.y)||0,Ea=Tt?(Pt==null?void 0:Pt.clientWidth)||0:(Pt==null?void 0:Pt.clientHeight)||0;Pn=`${va+Ea/2}px`}let Xn=rt==="top"||rt==="left"?`calc(100% + ${qn}px)`:`${-qn}px`;return Oe&&Tt&&Math.abs(((Ir=le.shift)==null?void 0:Ir.y)||0)>qn&&(Xn=`${St.reference.y+St.reference.height/2-We}px`),Ce.style.setProperty(CJ,Tt?`${Pn} ${Xn}`:`${Xn} ${Pn}`),{}}},EJ,R),lt(()=>{!A&&T&&T.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[A,T]);const Q=x.useMemo(()=>({ancestorScroll:!y,elementResize:!y&&typeof ResizeObserver<"u",layoutShift:!y&&typeof IntersectionObserver<"u"}),[y]),{refs:se,elements:pe,x:Be,y:xe,middlewareData:Qe,update:oe,placement:ue,context:ze,isPositioned:nt,floatingStyles:ht}=t({rootContext:T,open:v?A:void 0,placement:G,middleware:Le,strategy:r,whileElementsMounted:v?void 0:(...ne)=>a3(...ne,Q),nodeId:C,externalTree:N}),{sideX:Yt,sideY:Xt}=Qe.adaptiveOrigin||TJ,at=nt?r:"fixed",xt=x.useMemo(()=>{let ne;return nt?R?ne={position:at,[Yt]:Be,[Xt]:xe}:ne={...ht,position:at}:ne={position:at,top:0,left:0},ne[T3]="100vw",ne[w3]="100vh",nt||(ne.opacity=0),ne},[R,at,Yt,Be,Xt,xe,ht,nt]),Ft=x.useRef(null);lt(()=>{if(!A)return;const ne=W.current,Ce=typeof ne=="function"?ne():ne,Fe=(A3(Ce)?Ce.current:Ce)||null||null;Fe!==Ft.current&&(se.setPositionReference(Fe),Ft.current=Fe)},[A,se,H,W]),x.useEffect(()=>{if(!A)return;const ne=W.current;typeof ne!="function"&&A3(ne)&&ne.current!==Ft.current&&(se.setPositionReference(ne.current),Ft.current=ne.current)},[A,se,H,W]),x.useEffect(()=>{if(v&&A&&pe.reference&&pe.floating)return a3(pe.reference,pe.floating,oe,Q)},[v,A,pe,oe,Q]);const Mt=Cs(ue),Qt=r5(i,Mt,M),vt=Sl(ue)||"center",zn=!!((kn=Qe.hide)!=null&&kn.referenceHidden);lt(()=>{O&&A&&nt&&Mt!==z&&L(Mt)},[O,A,nt,Mt,z]);const Jt=x.useMemo(()=>{var ne,Ce;return{position:"absolute",top:(ne=Qe.arrow)==null?void 0:ne.y,left:(Ce=Qe.arrow)==null?void 0:Ce.x}},[Qe.arrow]),un=((Dt=Qe.arrow)==null?void 0:Dt.centerOffset)!==0;return x.useMemo(()=>({positionerStyles:xt,arrowStyles:Jt,arrowRef:$e,arrowUncentered:un,side:Qt,align:vt,physicalSide:Mt,anchorHidden:zn,refs:se,context:ze,isPositioned:nt,update:oe}),[xt,Jt,$e,un,Qt,vt,Mt,zn,se,ze,nt,oe])}function A3(e){return e!=null&&"current"in e}function Ry(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=mt(i),[,o]=x.useState(!1),c=Ai(RJ).current,u=Ai(NJ).current,d=x.useRef(0),p=x.useRef(!0),h=x.useRef(null),y=x.useRef(null),b=mt(()=>{p.current||(p.current=!0,o(O=>!O))}),v=mt((O,N)=>{u.set(O,N),b()}),T=mt(O=>{u.delete(O),b()}),A=mt(O=>{const N=new Map;return n.current.length=0,r&&(r.current.length=0),O.forEach(I=>{var L,j;N.set(I.element,{...I.registration.metadata??{},index:I.index}),n.current[I.index]=I.element,r&&(r.current[I.index]=I.registration.label!==void 0?I.registration.label:((j=(L=I.registration.textRef)==null?void 0:L.current)==null?void 0:j.textContent)??I.element.textContent)}),d.current=n.current.length,N});function w(O){var L;if((L=y.current)==null||L.disconnect(),y.current=null,typeof MutationObserver!="function"||O.length<2)return;const N=new MutationObserver(j=>{if(!MJ(j))return;let P=null;for(const B of O)if(B.isConnected){if(P&&i5(P,B)>0){N.disconnect(),b();return}P=B}});y.current=N;const I=new Set;for(let j=1;j<O.length;j+=1){const P=IJ(O[j-1],O[j]);P&&I.add(P)}I.forEach(j=>N.observe(j,{childList:!0}))}const k=mt(()=>{const[O,N]=OJ(u),I=A(O),L=h.current,j=!L||L.length!==O.length||O.some((P,B)=>{const U=L[B];return P.index!==U.index||P.element!==U.element||P.registration.index!==U.registration.index||P.registration.metadata!==U.registration.metadata});w(N),h.current=O,p.current=!1,j&&(c.forEach(P=>P(I)),a(I))});lt(()=>(!p.current&&h.current&&A(h.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,A]),lt(()=>{p.current&&k()}),lt(()=>()=>{var O;(O=y.current)==null||O.disconnect(),p.current=!0},[]);const C=mt(O=>(c.add(O),()=>{c.delete(O)})),R=x.useMemo(()=>({register:v,unregister:T,subscribeMapChange:C,nextIndexRef:d}),[v,T,C,d]);return m.jsx(e5.Provider,{value:R,children:t})}function NJ(){return new Map}function RJ(){return new Set}function OJ(e){const t=new Set,n=[],r=[];e.forEach((a,o)=>{if(!o.isConnected)return;const c=a.index,u={index:c??-1,element:o,registration:a};c===null?r.push(u):c>=0&&(t.add(c),n.push(u))});let i=0;return r.sort((a,o)=>i5(a.element,o.element)),r.forEach(a=>{for(;t.has(i);)i+=1;a.index=i,n.push(a),i+=1}),t.size>0&&n.sort((a,o)=>a.index-o.index),[n,r.map(a=>a.element)]}function IJ(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function MJ(e){for(const t of e)for(let n=0;n<t.removedNodes.length;n+=1)if(t.removedNodes[n].isConnected)return!0;return!1}function i5(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function Oy(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:c=!1}){const u={...n};return c&&(u.pointerEvents="none"),It("div",e,{state:t,ref:a,props:[{role:"presentation",hidden:o,style:u},Jm(r),i],stateAttributesMapping:zm})}const DJ=20;function cA(e,t,n,r){const[i,a]=x.useState(!1);lt(()=>{if(!e||!t||n==null){a(!1);return}const o=yn(n).documentElement.clientWidth,c=n.offsetWidth;a(o>0&&c>0&&c>=o-DJ)},[e,t,n]),qP(e&&(!t||i),r)}const LJ=x.forwardRef(function(t,n){var Q;const{anchor:r,positionMethod:i="absolute",className:a,render:o,side:c,align:u,sideOffset:d=0,alignOffset:p=0,collisionBoundary:h="clipping-ancestors",collisionPadding:y=5,arrowPadding:b=5,sticky:v=!1,disableAnchorTracking:T=!1,collisionAvoidance:A=hP,style:w,...k}=t,{store:C}=Mo(),R=bJ(),O=sA(!0),N=C.useState("parent"),I=C.useState("floatingRootContext"),L=C.useState("floatingTreeRoot"),j=C.useState("mounted"),P=C.useState("open"),B=C.useState("modal"),U=C.useState("openMethod"),q=C.useState("activeTriggerElement"),K=C.useState("transitionStatus"),V=C.useState("positionerElement"),H=C.useState("instantType"),W=C.useState("adaptiveOrigin"),Y=C.useState("lastOpenChangeReason"),te=C.useState("floatingNodeId"),M=C.useState("floatingParentNodeId"),z=I.useState("domReferenceElement"),G=x.useRef(null),F=W1(V);let ee=r,ae=d,re=p,ye=u,ge=A;N.type==="context-menu"&&(ee=r??((Q=N.context)==null?void 0:Q.anchor),ye=ye??"start",!c&&ye!=="center"&&(re=t.alignOffset??2,ae=t.sideOffset??-5));let Te=c,$e=ye;N.type==="menu"?(Te=Te??"inline-end",$e=$e??"start",ge=t.collisionAvoidance??BS):N.type==="menubar"&&(Te=Te??(N.context.orientation==="vertical"?"inline-end":"bottom"),$e=$e??"start");const He=N.type==="context-menu",Ne=Ny({anchor:ee,floatingRootContext:I,positionMethod:O?"fixed":i,mounted:j,side:Te,sideOffset:ae,align:$e,alignOffset:re,arrowPadding:He?0:b,collisionBoundary:h,collisionPadding:y,sticky:v,nodeId:te,keepMounted:R,disableAnchorTracking:T,collisionAvoidance:ge,shift:He?{crossAxis:!("side"in ge&&ge.side==="flip"),rootBoundary:"layoutViewport"}:void 0,externalTree:L,adaptiveOrigin:W});x.useEffect(()=>{function se(pe){pe.open&&(pe.parentNodeId===te&&C.set("hoverEnabled",!1),pe.nodeId!==te&&pe.parentNodeId===C.select("floatingParentNodeId")&&C.setOpen(!1,jt(Ch)))}return L.events.on("menuopenchange",se),()=>{L.events.off("menuopenchange",se)}},[C,L.events,te]),x.useEffect(()=>{if(C.select("floatingParentNodeId")==null)return;function se(pe){if(pe.open||pe.nodeId!==C.select("floatingParentNodeId"))return;const Be=pe.reason??Ch;C.setOpen(!1,jt(Be))}return L.events.on("menuopenchange",se),()=>{L.events.off("menuopenchange",se)}},[L.events,C]);const Ie=xi();x.useEffect(()=>{P||Ie.clear()},[P,Ie]),x.useEffect(()=>{function se(pe){if(!(!P||pe.nodeId!==C.select("floatingParentNodeId")))if(pe.target&&q&&q!==pe.target){const Be=C.select("closeDelay");Be>0?Ie.isStarted()||Ie.start(Be,()=>{C.setOpen(!1,jt(Ch))}):C.setOpen(!1,jt(Ch))}else Ie.clear()}return L.events.on("itemhover",se),()=>{L.events.off("itemhover",se)}},[L.events,P,q,C,Ie]),x.useEffect(()=>{const se={open:P,nodeId:te,parentNodeId:M,reason:C.select("lastOpenChangeReason")};L.events.emit("menuopenchange",se)},[L.events,P,C,te,M]),lt(()=>{const se=z,pe=G.current;if(se&&(G.current=se),pe&&se&&se!==pe){C.set("instantType",void 0);const Be=new AbortController;return F(()=>{C.set("instantType","trigger-change")},Be.signal),()=>{Be.abort()}}},[z,F,C]);const be={open:P,side:Ne.side,align:Ne.align,anchorHidden:Ne.anchorHidden,nested:N.type==="menu",instant:H},Le=N.type==="menubar"&&N.context.modal;cA(P&&(Le||B&&Y!==ei),U==="touch",V,q);const Oe=Oy(t,be,{styles:Ne.positionerStyles,transitionStatus:K,props:k,refs:[n,C.useStateSetter("positionerElement")],hidden:!j,inert:!P}),Ge=j&&N.type!=="menu"&&(N.type!=="menubar"&&B&&Y!==ei||N.type==="menubar"&&N.context.modal);let fe=null;return N.type==="menubar"?fe=N.context.contentElement:N.type===void 0&&(fe=q),m.jsxs(QP.Provider,{value:Ne,children:[Ge&&m.jsx(Ey,{ref:N.type==="context-menu"||N.type==="nested-context-menu"?N.context.internalBackdropRef:null,inert:Xm(!P),cutout:fe}),m.jsx(EP,{id:te,children:m.jsx(Ry,{elementsRef:C.context.itemDomElements,labelsRef:C.context.itemLabels,children:Oe})})]})}),a5=x.createContext(void 0);function PJ(){const e=x.useContext(a5);if(e===void 0)throw new Error(Cn(34));return e}const jJ=x.memo(x.forwardRef(function(t,n){const{render:r,className:i,value:a,defaultValue:o,onValueChange:c,disabled:u=!1,style:d,"aria-labelledby":p,...h}=t,[y,b]=x.useState(void 0),[v,T]=Ws({controlled:a,default:o,name:"MenuRadioGroup"}),A=mt((R,O)=>{c==null||c(R,O),!O.isCanceled&&T(R)}),k=It("div",t,{state:{disabled:u},ref:n,props:{role:"group","aria-labelledby":p??y,"aria-disabled":u||void 0,...h}}),C=x.useMemo(()=>({value:v,setValue:A,disabled:u}),[v,A,u]);return m.jsx(lA.Provider,{value:b,children:m.jsx(a5.Provider,{value:C,children:k})})})),s5=x.createContext(void 0);function $J(){const e=x.useContext(s5);if(e===void 0)throw new Error(Cn(35));return e}const BJ=x.forwardRef(function(t,n){const{render:r,className:i,id:a,label:o,nativeButton:c=!1,disabled:u=!1,closeOnClick:d=!1,value:p,style:h,...y}=t,b=pd({guess:!0,label:o}),v=Zm(!0),T=Gr(a),{store:A}=Mo(),w=A.useState("isActive",b.index),k=A.useState("itemProps"),{value:C,setValue:R,disabled:O}=PJ(),N=A.useState("disabled"),I=u||O||N,L=C===p,{getItemProps:j,itemRef:P}=Ay({closeOnClick:d,disabled:I,highlighted:w,id:T,store:A,nativeButton:c,nodeId:v==null?void 0:v.context.nodeId,itemMetadata:oA}),B=x.useMemo(()=>({disabled:I,highlighted:w,checked:L}),[I,w,L]);function U(K){const V=jt(qu,K.nativeEvent,void 0,{preventUnmountOnClose:xr});R(p,V)}const q=It("div",t,{state:B,stateAttributesMapping:_y,props:[k,{role:"menuitemradio","aria-checked":L,onClick:U},y,j],ref:[P,n,b.ref]});return m.jsx(s5.Provider,{value:B,children:q})}),FJ=x.forwardRef(function(t,n){const{render:r,className:i,style:a,keepMounted:o=!1,...c}=t,u=$J(),d=x.useRef(null),{transitionStatus:p,mounted:h,setMounted:y}=Rl(u.checked);$a({batch:!0,enabled:!u.checked,open:u.checked,ref:d,onComplete(){u.checked||y(!1)}});const b={checked:u.checked,disabled:u.disabled,highlighted:u.highlighted,transitionStatus:p};return It("span",t,{state:b,stateAttributesMapping:_y,ref:[n,d],props:{"aria-hidden":!0,...c},enabled:o||h})}),zJ=x.createContext(null);function o5(e){return x.useContext(zJ)}const UJ={...gy,disabled:e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0),openMethod:e=>e.openMethod,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId,activeIndex:e=>e.activeIndex,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")}};class HJ extends Qf{constructor(n,r,i=!1){const a=new Ym,o=VJ(a,r,i,n);super(o,qJ(a),UJ);pt(this,"unsubscribeParentListener",null);this.unsubscribeParentListener=this.observe("parent",c=>{var u;if((u=this.unsubscribeParentListener)==null||u.call(this),c.type==="menu"){let d=c.store.select("rootId"),p=c.store.select("floatingTreeRoot"),h=c.store.select("keyboardEventRelay");this.unsubscribeParentListener=c.store.subscribe(()=>{const y=c.store.select("rootId"),b=c.store.select("floatingTreeRoot"),v=c.store.select("keyboardEventRelay");d===y&&p===b&&h===v||(d=y,p=b,h=v,this.notifyAll())}),this.context.allowMouseUpTriggerRef=c.store.context.allowMouseUpTriggerRef;return}c.type!==void 0&&(this.context.allowMouseUpTriggerRef=c.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(n,r){this.state.floatingRootContext.context.events.emit("setOpen",{open:n,eventDetails:r})}}function qJ(e){return{positionerRef:x.createRef(),popupRef:x.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:x.createRef(),beforeContentFocusGuardRef:x.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function VJ(e,t,n=!1,r){return{...my(e,t,n),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new FS,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:tr,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}const l5=x.createContext(void 0);function c5(){return x.useContext(l5)}const u5=Gm(function(t){const{children:n,open:r,onOpenChange:i,onOpenChangeComplete:a,defaultOpen:o=!1,disabled:c=!1,modal:u,loopFocus:d=!0,orientation:p="vertical",actionsRef:h,closeParentOnEsc:y=!1,handle:b,triggerId:v,defaultTriggerId:T=null,highlightItemOnHover:A=!0}=t,w=sA(!0),k=Mo(!0),C=o5(!0),R=c5(),O=x.useMemo(()=>R&&k?{type:"menu",store:k.store}:C?{type:"menubar",context:C}:w&&!k?{type:"context-menu",context:w}:{type:void 0},[w,k,C,R]),N=td(),I=td(),L=Gc(),j=O.type==="menu"?O.store:void 0,P=(r??o)&&(j==null?void 0:j.state.transitionStatus)==="starting",B=Ai(()=>P?j==null?void 0:j.state.instantType:void 0).current,U=GJ({open:o,openProp:r,activeTriggerId:T,triggerIdProp:v,parent:O,disabled:c,highlightItemOnHover:A,modal:O.type===void 0?u:void 0,rootId:N,instantType:B},I,L!=null);U.useControlledProp("openProp",r),U.useControlledProp("triggerIdProp",v),U.useContextCallback("onOpenChangeComplete",a);const q=U.useState("floatingTreeRoot"),K=zS(q),V=U.useState("open"),H=U.useState("activeTriggerElement"),W=U.useState("positionerElement"),Y=U.useState("hoverEnabled"),te=U.useState("disabled"),M=U.useState("lastOpenChangeReason"),z=U.useState("parent"),G=U.useState("activeIndex"),F=U.useState("payload"),ee=U.useState("floatingParentNodeId"),ae=x.useRef(null),re=x.useRef(z.type!=="context-menu"),ye=xi(),ge=x.useRef(!0),Te=xi(),$e=ee!=null,{openMethod:He,triggerProps:Ne}=VP(V);U.useSyncedValues({disabled:c,highlightItemOnHover:A,modal:z.type===void 0?u:void 0,openMethod:He,rootId:N}),fy(U);const{forceUnmount:Ie,transitionStatus:be}=py(V,U,()=>{U.set("allowMouseEnter",!1)},P),Le=W1(U.context.popupRef);x.useEffect(()=>{if(B===void 0)return;const at=()=>{U.state.instantType===B&&U.set("instantType",void 0)};if(!V){at();return}if(be!==void 0)return;if(U.context.popupRef.current==null){at();return}const xt=new AbortController;return Le(at,xt.signal),()=>{xt.abort()}},[B,V,be,Le,U]),lt(()=>{w&&!k?U.update({parent:{type:"context-menu",context:w},floatingNodeId:K,floatingParentNodeId:L}):k&&U.update({floatingNodeId:K,floatingParentNodeId:L})},[w,k,K,L,U]),x.useEffect(()=>{if(V||(ae.current=null),z.type==="context-menu"){if(!V){ye.clear(),re.current=!1;return}ye.start(500,()=>{re.current=!0})}},[ye,V,z.type]),lt(()=>{!V&&!Y&&U.set("hoverEnabled",!0)},[V,Y,U]);const Me=mt((at,xt)=>{const Ft=xt.reason;if(!at&&!U.select("open")||V===at&&xt.trigger===H&&M===Ft)return;const Mt=KS(xt);if(!at&&xt.trigger==null&&(xt.trigger=H??void 0),i==null||i(at,xt),xt.isCanceled)return;U.state.floatingRootContext.dispatchOpenChange(at,xt);const Qt=xt.event;if(at===!1&&(Qt==null?void 0:Qt.type)==="click"&&Qt.pointerType==="touch"&&!ge.current)return;at&&Ft===_f?(ge.current=!1,Te.start(300,()=>{ge.current=!0})):(ge.current=!0,Te.clear());const vt=(Ft===wl||Ft===qu)&&Qt.detail===0,zn=!at&&(Ft===$m||Ft==null);ae.current=xt.event;const Jt=uy(U.state,at,xt.trigger,Mt());Jt.openChangeReason=Ft,z.type==="menubar"&&(Ft===_f||Ft===Rc||Ft===ei||Ft===zb||Ft===Ch)?Jt.instantType="group":vt||zn?Jt.instantType=vt?"click":"dismiss":Jt.instantType=void 0,U.update(Jt)}),Oe=MP({popupStore:U,floatingRootContext:U.state.floatingRootContext,floatingId:I,nested:L!=null,onOpenChange:Me}),Ge=Oe.context.events;lt(()=>{const at=({open:xt,eventDetails:Ft})=>Me(xt,Ft);return Ge.on("setOpen",at),()=>{Ge==null||Ge.off("setOpen",at)}},[Ge,Me]);const fe=x.useCallback(()=>{U.setOpen(!1,jt(Y1))},[U]);x.useImperativeHandle(h,()=>({unmount:Ie,close:fe}),[Ie,fe]);let Q;z.type==="context-menu"&&(Q=z.context),x.useImperativeHandle(Q==null?void 0:Q.positionerRef,()=>W,[W]),x.useImperativeHandle(Q==null?void 0:Q.actionsRef,()=>({setOpen:Me}),[Me]);const se=Vm(Oe,{enabled:!te,bubbles:{escapeKey:y&&z.type==="menu"},outsidePress(){var at;return z.type!=="context-menu"||((at=ae.current)==null?void 0:at.type)==="contextmenu"?!0:re.current},externalTree:$e?q:void 0}),pe=ky(),Be=x.useCallback(at=>{U.select("activeIndex")!==at&&U.set("activeIndex",at)},[U]),xe=FP(Oe,{enabled:!te,listRef:U.context.itemDomElements,activeIndex:G,nested:z.type!==void 0,loopFocus:d,orientation:p,parentOrientation:z.type==="menubar"?z.context.orientation:void 0,rtl:pe==="rtl",disabledIndices:ks,onNavigate:Be,openOnArrowKeyDown:z.type!=="context-menu",externalTree:$e?q:void 0,focusItemOnHover:A}),Qe=x.useCallback(at=>{U.context.typingRef.current=at},[U]),oe=zP(Oe,{enabled:!te,listRef:U.context.itemLabels,elementsRef:U.context.itemDomElements,activeIndex:G,resetMs:dQ,onMatch:at=>{V&&at!==G&&U.set("activeIndex",at)},onTyping:Qe}),ue=x.useMemo(()=>{const at=La(oe.reference,xe.reference,se.reference,{onMouseMove(){U.set("allowMouseEnter",!0)}},Ne);return at["aria-haspopup"]="menu",at["aria-expanded"]=V,at},[U,oe.reference,xe.reference,se.reference,Ne,V]),ze=x.useMemo(()=>{const at=La(xe.trigger,se.trigger,Ne);return at["aria-haspopup"]="menu",at["aria-expanded"]=!1,at},[xe.trigger,se.trigger,Ne]);Ai(()=>(U.update({inactiveTriggerProps:ze}),null));const nt=x.useMemo(()=>La(Km,{id:I,role:"menu","aria-orientation":p==="horizontal"?"horizontal":void 0,"aria-labelledby":H==null?void 0:H.id,onMouseMove(){U.set("allowMouseEnter",!0),z.type==="menu"&&U.set("hoverEnabled",!1)},onClick(){U.select("hoverEnabled")&&U.set("hoverEnabled",!1)},onKeyDown(at){const xt=U.select("keyboardEventRelay");xt&&!at.isPropagationStopped()&&xt(at)}},oe.floating,xe.floating,se.floating),[H,I,p,z.type,U,oe.floating,xe.floating,se.floating]),ht=xe.item??tr;hy(U,{floatingRootContext:Oe,activeTriggerProps:ue,inactiveTriggerProps:ze,popupProps:nt,itemProps:ht});const Yt=x.useMemo(()=>({store:U,parent:O}),[U,O]),Xt=m.jsxs(ZP.Provider,{value:Yt,children:[b&&m.jsx(cy,{handle:b,store:U}),typeof n=="function"?n({payload:F}):n]});return z.type===void 0||z.type==="context-menu"?m.jsx(TP,{externalTree:q,children:Xt}):Xt});function GJ(e,t,n){return Ai(()=>new HJ(e,t,n)).current}function KJ(e){const t=Mo().store,n=x.useMemo(()=>({parentMenu:t}),[t]);return m.jsx(l5.Provider,{value:n,children:m.jsx(u5,{...e})})}const z0=5;function d5(e,t){const n=YJ(t);return e.clientX>=n.left-z0&&e.clientX<=n.right+z0&&e.clientY>=n.top-z0&&e.clientY<=n.bottom+z0}function YJ(e){const t=e.getBoundingClientRect(),n=_r(e);if(RS)return t;const r=n.getComputedStyle(e,"::before"),i=n.getComputedStyle(e,"::after");if(!(r.content!=="none"||i.content!=="none"))return t;const o=parseFloat(r.width)||0,c=parseFloat(r.height)||0,u=parseFloat(i.width)||0,d=parseFloat(i.height)||0,p=Math.max(t.width,o,u),h=Math.max(t.height,c,d),y=p-t.width,b=h-t.height;return{left:t.left-y/2,right:t.right+y/2,top:t.top-b/2,bottom:t.bottom+b/2}}function f5(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=V1(),{ref:i,index:a}=pd(e),o=n===a,c=x.useRef(null),u=Ys(i,c);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){const p=c.current;if(!t||!p)return;const h=p.hasAttribute("disabled")||p.ariaDisabled==="true";!o&&!h&&p.focus()}},compositeRef:u,index:a}}function uA(e){const{render:t,className:n,style:r,state:i=tr,props:a=ks,refs:o=ks,metadata:c,stateAttributesMapping:u,tag:d="div",...p}=e,{compositeProps:h,compositeRef:y}=f5({metadata:c});return It(d,e,{state:i,ref:[y,...o],props:[h,...a,p],stateAttributesMapping:u})}function p5(e){if(lr(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid");if(!gl(e))return p5(Tl(e))}function h5(e,t){const n=x.useRef(null);function r(a){fi.flushSync(()=>{e.setOpen(!1,jt(Rc,a.nativeEvent,a.currentTarget))});const o=oQ(n.current);o==null||o.focus()}function i(a){var c;const o=e.select("positionerElement");if(o&&kf(a,o))(c=e.context.beforeContentFocusGuardRef.current)==null||c.focus();else{fi.flushSync(()=>{e.setOpen(!1,jt(Rc,a.nativeEvent,a.currentTarget))});let u=sQ(e.context.triggerFocusTargetRef.current||t.current);for(;u!==null&&Lt(o,u);){const d=u;if(u=jS(u),u===d)break}u==null||u.focus()}}return{preFocusGuardRef:n,handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function WJ(e){const{enabled:t=!0,mouseDownAction:n,open:r}=e,i=x.useRef(!1);return x.useMemo(()=>t?{onMouseDown:a=>{(n==="open"&&!r||n==="close"&&r)&&(i.current=!0,yn(a.currentTarget).addEventListener("click",()=>{i.current=!1},{once:!0}))},onClick:a=>{i.current&&(i.current=!1,a.preventBaseUIHandler())}}:tr,[t,n,r])}const XJ=ly(function(t,n){const{render:r,className:i,style:a,disabled:o=!1,nativeButton:c=!0,id:u,openOnHover:d,delay:p=100,closeDelay:h=0,handle:y,payload:b,...v}=t,T=Mo(!0),w=by(y)??(T==null?void 0:T.store);if(!w)throw new Error(Cn(85));const k=Gr(u),C=w.useState("isTriggerActive",k),R=w.useState("floatingRootContext"),O=w.useState("isOpenedByTrigger",k),N=w.useState("triggerPopupId",k),I=x.useRef(null),L=ZJ(),j=V1(!0),P=Kc(),B=x.useMemo(()=>P??new FS,[P]),U=zS(B),q=Gc(),{registerTrigger:K,isMountedByThisTrigger:V}=dy(k,I,w,{payload:b,closeDelay:h,parent:L,floatingTreeRoot:B,floatingNodeId:U,floatingParentNodeId:q,keyboardEventRelay:j==null?void 0:j.relayKeyboardEvent}),H=L.type==="menubar",W=w.useState("disabled"),Y=o||W||H&&L.context.disabled,{getButtonProps:te,buttonRef:M}=is({disabled:Y,native:c});x.useEffect(()=>{!O&&L.type===void 0&&(w.context.allowMouseUpTriggerRef.current=!1)},[w,O,L.type]);const z=x.useRef(null),G=xi(),F=mt(Q=>{if(!z.current)return;G.clear(),w.context.allowMouseUpTriggerRef.current=!1;const se=Q.target;Lt(z.current,se)||Lt(w.select("positionerElement"),se)||se===z.current||se!=null&&p5(se)===w.select("rootId")||d5(Q,z.current)||B.events.emit("close",{domEvent:Q,reason:g4})});x.useEffect(()=>{O&&w.select("lastOpenChangeReason")===ei&&yn(z.current).addEventListener("mouseup",F,{once:!0})},[O,F,w]);const ee=H&&L.context.hasSubmenuOpen,re=yy(R,{enabled:(d??ee)&&!Y&&(!H||ee&&!V),handleClose:vy({blockPointerEvents:!H}),mouseOnly:!0,move:!1,restMs:L.type===void 0?p:void 0,delay:{close:h},triggerElementRef:I,externalTree:B,isActiveTrigger:C,isClosing:()=>w.select("transitionStatus")==="ending"}),ye=QJ(O,w.select("lastOpenChangeReason")),ge=qm(R,{enabled:!Y,event:O&&H?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:L.type===void 0?ye:!1}),Te=$P(R,{enabled:!Y&&ee}),$e=WJ({open:O,enabled:H,mouseDownAction:"open"}),He=x.useMemo(()=>La(Te.reference,ge.reference),[Te.reference,ge.reference]),Ne=w.useState("triggerProps",V),{preFocusGuardRef:Ie,handlePreFocusGuardFocus:be,handleFocusTargetFocus:Le}=h5(w,I),Me={disabled:Y,open:O},Oe=[z,n,M,K,I],Ge=[He,re??tr,Ne,{"aria-haspopup":"menu","aria-controls":N,id:k,onMouseDown:Q=>{if(w.select("open"))return;G.start(200,()=>{w.context.allowMouseUpTriggerRef.current=!0}),yn(Q.currentTarget).addEventListener("mouseup",F,{once:!0})}},H?{role:"menuitem"}:{},$e,v,te],fe=It("button",t,{enabled:!H,stateAttributesMapping:Ub,state:Me,ref:Oe,props:Ge});return H?m.jsx(uA,{tag:"button",render:r,className:i,style:a,state:Me,refs:Oe,props:Ge,stateAttributesMapping:Ub}):O?m.jsxs(x.Fragment,{children:[m.jsx(Oc,{ref:Ie,onFocus:be},`${k}-pre-focus-guard`),m.jsx(x.Fragment,{children:fe},k),m.jsx(Oc,{ref:w.context.triggerFocusTargetRef,onFocus:Le},`${k}-post-focus-guard`)]}):m.jsx(x.Fragment,{children:fe},k)});function QJ(e,t){const n=xi(),[r,i]=x.useState(!1);return lt(()=>{e&&t===ei?(i(!0),n.start(pP,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function ZJ(){const e=o5();return x.useMemo(()=>e?{type:"menubar",context:e}:{type:void 0},[e])}function JJ(e){const[t,n]=x.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}const m5=x.forwardRef(function(t,n){const{className:r,render:i,orientation:a="horizontal",style:o,...c}=t;return It("div",t,{state:{orientation:a},ref:n,props:[{role:"separator","aria-orientation":a},c]})});function g5(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const eee={"aria-expanded":void 0},tee=x.forwardRef(function(t,n){const{render:r,className:i,style:a,label:o,id:c,nativeButton:u=!1,openOnHover:d=!0,delay:p=100,closeDelay:h=0,disabled:y=!1,...b}=t,v=c5();if(!(v!=null&&v.parentMenu))throw new Error(Cn(37));const T=pd({guess:!0,label:o}),A=Zm(),{store:w}=Mo(),k=Gr(c),C=w.useState("open"),R=w.useState("floatingRootContext"),O=w.useState("floatingTreeRoot"),N=w.useState("triggerPopupId",k),I=LP(k,w),L=mt(He=>{I(He),He!==null&&w.select("open")&&w.select("activeTriggerId")==null&&w.update({activeTriggerId:k??null,activeTriggerElement:He,closeDelay:h})}),j=x.useRef(null),P=x.useCallback(He=>{j.current=He,w.set("activeTriggerElement",He)},[w]);lt(()=>(L(j.current),()=>L(null)),[L,k,w]),w.useSyncedValue("closeDelay",h);const B=v.parentMenu,U=w.useState("disabled"),q=B.useState("disabled"),K=y||U||q,V=B.useState("itemProps"),H=B.useState("isActive",T.index),W=x.useMemo(()=>({type:"submenu-trigger",setActive(){B.select("highlightItemOnHover")&&B.set("activeIndex",T.index)}}),[B,T.index]),{getItemProps:Y,itemRef:te}=Ay({closeOnClick:!1,disabled:K,highlighted:H,id:k,store:w,typingRef:B.context.typingRef,nativeButton:u,itemMetadata:W,nodeId:A==null?void 0:A.context.nodeId}),M=w.useState("hoverEnabled"),z=yy(R,{enabled:M&&d&&!K,handleClose:vy({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:p,delay:{open:p,close:h},shouldOpen:p>0?()=>B.select("allowMouseEnter"):void 0,triggerElementRef:j,externalTree:O,isClosing:()=>w.select("transitionStatus")==="ending",guardStaleOpen:!0}),F=qm(R,{enabled:!K,event:"mousedown",toggle:!d,ignoreMouse:d,stickIfOpen:!1}).reference??tr,ee=w.useState("triggerProps",!0);delete ee.id;const ae={disabled:K,highlighted:H,open:C},re=w.useState("openMethod"),ge=w.useState("lastOpenChangeReason")===zb||re==="keyboard";return It("div",t,{state:ae,stateAttributesMapping:Fm,props:[F,z,ee,V,C&&ge&&W4?eee:void 0,{"aria-controls":N,tabIndex:C||H?0:-1,onBlur(){H&&B.set("activeIndex",null)}},b,Y],ref:[n,T.ref,te,L,P]})});function nee({...e}){return m.jsx(u5,{"data-slot":"dropdown-menu",...e})}function ree({...e}){return m.jsx(n5,{"data-slot":"dropdown-menu-portal",...e})}function iee({...e}){return m.jsx(XJ,{"data-slot":"dropdown-menu-trigger",...e})}function b5({align:e="start",alignOffset:t=0,side:n="bottom",sideOffset:r=4,className:i,...a}){return m.jsx(n5,{children:m.jsx(LJ,{className:"isolate z-[110] outline-none",align:e,alignOffset:t,side:n,sideOffset:r,children:m.jsx(gJ,{"data-slot":"dropdown-menu-content",className:De("z-[110] max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",i),...a})})})}function aee({...e}){return m.jsx(fJ,{"data-slot":"dropdown-menu-group",...e})}function see({className:e,inset:t,...n}){return m.jsx(pJ,{"data-slot":"dropdown-menu-label","data-inset":t,className:De("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",e),...n})}function oee({className:e,inset:t,variant:n="default",...r}){return m.jsx(hJ,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:De("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...r})}function lee({...e}){return m.jsx(KJ,{"data-slot":"dropdown-menu-sub",...e})}function cee({className:e,inset:t,children:n,...r}){return m.jsxs(tee,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:De("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,m.jsx(_S,{className:"ml-auto"})]})}function uee({align:e="start",alignOffset:t=-3,side:n="right",sideOffset:r=0,className:i,...a}){return m.jsx(b5,{"data-slot":"dropdown-menu-sub-content",className:De("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",i),align:e,alignOffset:t,side:n,sideOffset:r,...a})}function dee({className:e,children:t,checked:n,inset:r,...i}){return m.jsxs(cJ,{"data-slot":"dropdown-menu-checkbox-item","data-inset":r,className:De("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...i,children:[m.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:m.jsx(uJ,{children:m.jsx(Bm,{})})}),t]})}function fee({...e}){return m.jsx(jJ,{"data-slot":"dropdown-menu-radio-group",...e})}function pee({className:e,children:t,inset:n,...r}){return m.jsxs(BJ,{"data-slot":"dropdown-menu-radio-item","data-inset":n,className:De("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[m.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:m.jsx(FJ,{children:m.jsx(Bm,{})})}),t]})}function hee({className:e,...t}){return m.jsx(m5,{"data-slot":"dropdown-menu-separator",className:De("-mx-1 my-1 h-px bg-border",e),...t})}function mee({className:e,...t}){return m.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:De("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",e),...t})}function Vu({className:e,...t}){return m.jsx("div",{"data-slot":"empty",className:De("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",e),...t})}function $h({className:e,...t}){return m.jsx("div",{"data-slot":"empty-header",className:De("flex max-w-sm flex-col items-center gap-2",e),...t})}const gee=kl("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});function dA({className:e,variant:t="default",...n}){return m.jsx("div",{"data-slot":"empty-icon","data-variant":t,className:De(gee({variant:t,className:e})),...n})}function Bh({className:e,...t}){return m.jsx("div",{"data-slot":"empty-title",className:De("text-sm font-medium tracking-tight",e),...t})}function Fh({className:e,...t}){return m.jsx("div",{"data-slot":"empty-description",className:De("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...t})}function bee({className:e,...t}){return m.jsx("div",{"data-slot":"empty-content",className:De("flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance",e),...t})}function y5({className:e,...t}){return m.jsx("label",{"data-slot":"label",className:De("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function x5({className:e,orientation:t="horizontal",...n}){return m.jsx(m5,{"data-slot":"separator",orientation:t,className:De("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...n})}function yee({className:e,...t}){return m.jsx("fieldset",{"data-slot":"field-set",className:De("flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",e),...t})}function xee({className:e,variant:t="legend",...n}){return m.jsx("legend",{"data-slot":"field-legend","data-variant":t,className:De("mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",e),...n})}function vee({className:e,...t}){return m.jsx("div",{"data-slot":"field-group",className:De("group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",e),...t})}const Eee=kl("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function Tee({className:e,orientation:t="vertical",...n}){return m.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:De(Eee({orientation:t}),e),...n})}function wee({className:e,...t}){return m.jsx("div",{"data-slot":"field-content",className:De("group/field-content flex flex-1 flex-col gap-0.5 leading-snug",e),...t})}function See({className:e,...t}){return m.jsx(y5,{"data-slot":"field-label",className:De("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...t})}function Aee({className:e,...t}){return m.jsx("div",{"data-slot":"field-label",className:De("flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",e),...t})}function _ee({className:e,...t}){return m.jsx("p",{"data-slot":"field-description",className:De("text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5","last:mt-0 nth-last-2:-mt-1","[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...t})}function Cee({children:e,className:t,...n}){return m.jsxs("div",{"data-slot":"field-separator","data-content":!!e,className:De("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",t),...n,children:[m.jsx(x5,{className:"absolute inset-0 top-1/2"}),e&&m.jsx("span",{className:"relative mx-auto block w-fit bg-background px-2 text-muted-foreground","data-slot":"field-separator-content",children:e})]})}function kee({className:e,children:t,errors:n,...r}){const i=x.useMemo(()=>{var o;if(t)return t;if(!(n!=null&&n.length))return null;const a=[...new Map(n.map(c=>[c==null?void 0:c.message,c])).values()];return(a==null?void 0:a.length)==1?(o=a[0])==null?void 0:o.message:m.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:a.map((c,u)=>(c==null?void 0:c.message)&&m.jsx("li",{children:c.message},u))})},[t,n]);return i?m.jsx("div",{role:"alert","data-slot":"field-error",className:De("text-sm font-normal text-destructive",e),...r,children:i}):null}const Nee=x.createContext(void 0);function Ree(e=!1){const t=x.useContext(Nee);if(!t&&!e)throw new Error(Cn(86));return t}function Oee(e,t){const n=Gr(e);return lt(()=>(t(n),()=>{t(r=>r===n?void 0:r)}),[n,t]),n}function Iee(e,t){return e.matches(":disabled")?!1:!t||e.form===t?!0:e.form===null&&!e.hasAttribute("form")}const Mee=x.forwardRef(function(t,n){const{render:r,className:i,id:a,name:o,value:c,disabled:u=!1,onValueChange:d,defaultValue:p,autoFocus:h=!1,style:y,...b}=t,{state:v,name:T,disabled:A,setTouched:w,setDirty:k,validityData:C,setFocused:R,setFilled:O,validationMode:N,validation:I}=qc(),{clearErrors:L,elementRef:j,submitCountRef:P}=jm(),B=A||u,U=T??o,q={...v,disabled:B},{labelId:K}=fd(),V=Wf({id:a}),[H]=Ws({controlled:c,default:p,name:"FieldControl",state:"value"}),W=c!==void 0,Y=W?H:void 0,te=Y==null?void 0:String(Y),M=mt(()=>{var ee;return(ee=I.inputRef.current)==null?void 0:ee.value});Pm(I.inputRef,V,te,M,!B,o),lt(()=>{var ae;const ee=te??((ae=I.inputRef.current)==null?void 0:ae.value);ee!==void 0&&O(ee!=="")},[te,I.inputRef,O]),Xf(te,()=>{te!==void 0&&(L(U),k(te!==(C.initialValue??"")),I.change(te))});const z=x.useRef(null),G=xi();return lt(()=>{h&&z.current===ta(yn(z.current))&&R(!0)},[h,R]),It("input",t,{ref:[n,z],state:q,props:[{id:V,disabled:B,name:U,ref:I.inputRef,"aria-labelledby":K,autoFocus:h,...W?{value:Y}:{defaultValue:p},onChange(ee){const ae=ee.currentTarget.value,re=jt(es,ee.nativeEvent);d==null||d(ae,re),!W&&(k(ae!==(C.initialValue??"")),O(ae!==""),!ee.nativeEvent.defaultPrevented&&!re.isCanceled&&(L(U),I.change(ae)))},onFocus(){R(!0)},onBlur(ee){if(w(!0),R(!1),N==="onBlur"){const ae=ee.currentTarget.value;I.commit(ae),W&&queueMicrotask(()=>{var ye;const re=(ye=I.inputRef.current)==null?void 0:ye.value;re!==void 0&&re!==ae&&re!==(C.initialValue??"")&&I.commit(re)})}},onKeyDown(ee){if(ee.currentTarget.tagName==="INPUT"&&ee.key==="Enter"){w(!0);const ae=ee.currentTarget.value,re=ee.currentTarget.form;if(re&&re===j.current&&!ee.defaultPrevented){const ye=ee.currentTarget,ge=P.current;G.start(0,()=>{P.current===ge&&I.commit(ye.value)})}else I.commit(ae)}}},b,ee=>I.getValidationProps(B,ee)],stateAttributesMapping:Yf})}),Dee=x.forwardRef(function(t,n){return m.jsx(Mee,{ref:n,...t})});function am({className:e,type:t,...n}){return m.jsx(Dee,{type:t,"data-slot":"input",className:De("h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 py-1 shadow-xs text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...n})}const v5=x.createContext(void 0);function Yc(e){const t=x.useContext(v5);if(t===void 0&&!e)throw new Error(Cn(47));return t}const Lee={...gy,disabled:e=>e.disabled,instantType:e=>e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,modal:e=>e.modal,focusManagerModal:e=>e.focusManagerModal,stickIfOpen:e=>e.stickIfOpen,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class Pee extends Qf{constructor(n,r,i){const a=new Ym;super(jee(n,a,r,i),$ee(a),Lee);pt(this,"setOpen",(n,r)=>{var h,y;const i=r.reason===ei,a=r.reason===wl&&r.event.detail===0,o=!n&&(r.reason===$m||r.reason==null),c=KS(r),u=this.select("activeTriggerId");if(!n&&r.reason===m4&&r.trigger==null&&u!=null&&(r.trigger=this.context.triggerElements.getById(u)??this.select("activeTriggerElement")??void 0),(y=(h=this.context).onOpenChange)==null||y.call(h,n,r),r.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(n,r);const d=()=>{const b=uy(this.state,n,r.trigger,c());b.openChangeReason=r.reason,this.update(b)};i?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(pP,()=>{this.set("stickIfOpen",!1)}),fi.flushSync(d)):d();let p;a?p="click":o?p="dismiss":r.reason===Rc&&(p="focus"),this.set("instantType",p)})}}function jee(e,t,n,r=!1){const i={...my(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&(e==null?void 0:e.mounted)===void 0&&(i.mounted=!0),i}function $ee(e){return{popupRef:x.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:x.createRef(),beforeContentFocusGuardRef:x.createRef(),stickIfOpenTimeout:new Ns,triggerElements:e}}const _3=Gm(function({props:t}){const{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,modal:c=!1,handle:u,triggerId:d,defaultTriggerId:p=null}=t,h=Bee(u,{modal:c,open:i,openProp:r,activeTriggerId:p,triggerIdProp:d});h.useControlledProp("openProp",r),h.useControlledProp("triggerIdProp",d);const y=h.useState("open"),b=h.useState("mounted"),v=h.useState("payload");h.useContextCallback("onOpenChange",a),h.useContextCallback("onOpenChangeComplete",o),PP(h,y),fy(h);const{forceUnmount:T}=py(y,h,()=>{h.update({stickIfOpen:!0,openChangeReason:null})});h.useSyncedValues({modal:c}),x.useEffect(()=>{y||h.context.stickIfOpenTimeout.clear()},[h,y]),x.useImperativeHandle(t.actionsRef,()=>({unmount:T,close:()=>h.setOpen(!1,jt(Y1))}),[T,h]);const A=y||b;return m.jsxs(v5.Provider,{value:h,children:[u&&m.jsx(cy,{handle:u,store:h}),A&&m.jsx(Fee,{store:h,modal:c}),typeof n=="function"?n({payload:v}):n]})});function E5(e){return Yc(!0)?m.jsx(_3,{props:e}):m.jsx(TP,{children:m.jsx(_3,{props:e})})}function Bee(e,t){const n=GS((r,i)=>new Pee(t,r,i));return x.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function Fee({store:e,modal:t}){const n=e.useState("floatingRootContext"),r=Vm(n,{outsidePressEvent:{mouse:t==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),i=r.reference,a=r.floating;return hy(e,{activeTriggerProps:i,inactiveTriggerProps:i,popupProps:a}),null}const zee=300,Uee=ly(function(t,n){const{render:r,className:i,style:a,disabled:o=!1,nativeButton:c=!0,handle:u,payload:d,openOnHover:p=!1,delay:h=zee,closeDelay:y=0,id:b,...v}=t,T=Yc(!0),w=by(u)??T;if(!w)throw new Error(Cn(74));const k=Gr(b),C=w.useState("isTriggerActive",k),R=w.useState("floatingRootContext"),O=w.useState("isOpenedByTrigger",k),N=w.useState("triggerPopupId",k),I=x.useRef(null),{registerTrigger:L,isMountedByThisTrigger:j}=dy(k,I,w,{payload:d,disabled:o,openOnHover:p,closeDelay:y}),P=w.useState("openChangeReason"),B=w.useState("stickIfOpen"),U=w.useState("openMethod"),q=w.useState("focusManagerModal"),K=yy(R,{enabled:!o&&p&&(U!=="touch"||P!==wl),mouseOnly:!0,move:!1,handleClose:vy(),restMs:h,delay:{close:y},triggerElementRef:I,isActiveTrigger:C,isClosing:()=>w.select("transitionStatus")==="ending"}),V=qm(R,{stickIfOpen:B}),H=ZS(()=>w.select("open"),ye=>{w.set("openMethod",ye)}),W=w.useState("triggerProps",j),{getButtonProps:Y,buttonRef:te}=is({disabled:o,native:c}),M={open(ye){return ye&&P===wl?Ub.open(ye):Fm.open(ye)}},{preFocusGuardRef:z,handlePreFocusGuardFocus:G,handleFocusTargetFocus:F}=h5(w,I),ae=It("button",t,{state:{disabled:o,open:O},ref:[te,n,L,I],props:[V.reference,K,W,H,{[$S]:"",id:k,"aria-haspopup":"dialog","aria-expanded":O,"aria-controls":N},v,Y],stateAttributesMapping:M}),re=m.jsx(x.Fragment,{children:ae},k);return j&&!q?m.jsxs(x.Fragment,{children:[m.jsx(Oc,{ref:z,onFocus:G}),re,m.jsx(Oc,{ref:w.context.triggerFocusTargetRef,onFocus:F})]}):re}),T5=x.createContext(void 0);function Hee(){const e=x.useContext(T5);if(e===void 0)throw new Error(Cn(45));return e}const w5=x.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t;return Yc().useState("mounted")||r?m.jsx(T5.Provider,{value:r,children:m.jsx(ay,{ref:n,...i})}):null}),S5=x.createContext(void 0);function qee(){const e=x.useContext(S5);if(!e)throw new Error(Cn(46));return e}const A5=x.forwardRef(function(t,n){const{render:r,className:i,style:a,anchor:o,positionMethod:c,side:u,align:d,sideOffset:p,alignOffset:h,collisionBoundary:y="clipping-ancestors",collisionPadding:b,arrowPadding:v,sticky:T,disableAnchorTracking:A=!1,collisionAvoidance:w=BS,...k}=t,C=Yc(),R=Hee(),O=zS(),N=C.useState("floatingRootContext"),I=C.useState("mounted"),L=C.useState("open"),j=C.useState("openChangeReason"),P=C.useState("activeTriggerElement"),B=C.useState("modal"),U=C.useState("openMethod"),q=C.useState("positionerElement"),K=C.useState("instantType"),V=C.useState("transitionStatus"),H=C.useState("adaptiveOrigin"),W=x.useRef(null),Y=W1(q),te=Ny({anchor:o,floatingRootContext:N,positionMethod:c,mounted:I,side:u,sideOffset:p,align:d,alignOffset:h,arrowPadding:v,collisionBoundary:y,collisionPadding:b,sticky:T,disableAnchorTracking:A,keepMounted:R,nodeId:O,collisionAvoidance:w,adaptiveOrigin:H}),M=N.useState("domReferenceElement");lt(()=>{const ae=M,re=W.current;if(ae&&(W.current=ae),re&&ae&&ae!==re){C.set("instantType",void 0);const ye=new AbortController;return Y(()=>{C.set("instantType","trigger-change")},ye.signal),()=>{ye.abort()}}},[M,Y,C]);const z=B===!0&&j!==ei;cA(L&&z,U==="touch",q,P);const G=C.useStateSetter("positionerElement"),F={open:L,side:te.side,align:te.align,anchorHidden:te.anchorHidden,instant:K},ee=Oy(t,F,{styles:te.positionerStyles,transitionStatus:V,props:k,refs:[n,G],hidden:!I,inert:!L});return m.jsxs(S5.Provider,{value:te,children:[I&&z&&m.jsx(Ey,{inert:Xm(!L),cutout:P}),m.jsx(EP,{id:O,children:ee})]})}),Vee=x.createContext(void 0);function Gee(){const[e,t]=x.useState(0),n=mt(()=>(t(i=>i+1),()=>{t(i=>Math.max(0,i-1))}));return{context:x.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}const _5=x.forwardRef(function(t,n){const{render:r,className:i,style:a,initialFocus:o,finalFocus:c,...u}=t,d=Yc(),p=qee(),h=Cy()!=null,{context:y,hasClosePart:b}=Gee(),v=d.useState("open"),T=d.useState("openMethod"),A=d.useState("instantType"),w=d.useState("transitionStatus"),k=d.useState("popupProps"),C=d.useState("titleElementId"),R=d.useState("descriptionElementId"),O=d.useState("modal"),N=d.useState("mounted"),I=d.useState("openChangeReason"),L=d.useState("activeTriggerElement"),j=d.useState("floatingRootContext"),P=j.useState("floatingId"),B=d.useState("disabled"),U=d.useState("openOnHover"),q=d.useState("closeDelay");$a({open:v,ref:d.context.popupRef,onComplete(){var te,M;v&&((M=(te=d.context).onOpenChangeComplete)==null||M.call(te,!0))}}),QS(j,{enabled:U&&!B,closeDelay:q});const K=o===void 0?DP(d.context.popupRef):o,V=O!==!1&&b;d.useSyncedValue("focusManagerModal",V);const H=d.useStateSetter("popupElement"),W={open:v,side:p.side,align:p.align,instant:A,transitionStatus:w},Y=It("div",t,{state:W,ref:[n,d.context.popupRef,H],props:[k,{id:P,role:"dialog",...Km,"aria-labelledby":C,"aria-describedby":R,onKeyDown(te){h&&Wm.has(te.key)&&te.stopPropagation()}},Jm(w),u],stateAttributesMapping:Um});return m.jsx(sy,{context:j,openInteractionType:T,modal:V,disabled:!N||I===ei,initialFocus:K,returnFocus:c,restoreFocus:"popup",previousFocusableElement:lr(L)?L:void 0,nextFocusableElement:d.context.triggerFocusTargetRef,beforeContentFocusGuardRef:d.context.beforeContentFocusGuardRef,children:m.jsx(Vee.Provider,{value:y,children:Y})})}),Kee=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,c=Yc(),u=c.useState("open"),d=c.useState("mounted"),p=c.useState("transitionStatus"),h=c.useState("openChangeReason");return It("div",t,{state:{open:u,transitionStatus:p},ref:n,props:[{role:"presentation",hidden:!d,style:{pointerEvents:h===ei?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},o],stateAttributesMapping:Um})}),Yee=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,c=Yc(),u=Gr(o.id);return c.useSyncedValueWithCleanup("titleElementId",u),It("h2",t,{ref:n,props:[{id:u},o]})}),Wee=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,c=Yc(),u=Gr(o.id);return c.useSyncedValueWithCleanup("descriptionElementId",u),It("p",t,{ref:n,props:[{id:u},o]})});function fA({...e}){return m.jsx(E5,{"data-slot":"popover",...e})}function Xee({...e}){return m.jsx(Uee,{"data-slot":"popover-trigger",...e})}function pA({className:e,align:t="center",alignOffset:n=0,side:r="bottom",sideOffset:i=8,anchor:a,collisionPadding:o,keepMounted:c,dim:u=!1,...d}){return m.jsxs(w5,{keepMounted:c,children:[u&&m.jsx(Kee,{className:"fixed inset-0 z-[105] bg-backdrop transition-opacity duration-200 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0","data-slot":"popover-backdrop"}),m.jsx(A5,{align:t,alignOffset:n,anchor:a,collisionPadding:o,side:r,sideOffset:i,className:"isolate z-[110]",children:m.jsx(_5,{"data-slot":"popover-content",className:De("z-[110] flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...d})})]})}function Qee({className:e,...t}){return m.jsx("div",{"data-slot":"popover-header",className:De("flex flex-col gap-0.5 text-sm",e),...t})}function Zee({className:e,...t}){return m.jsx(Yee,{"data-slot":"popover-title",className:De("font-medium",e),...t})}function Jee({className:e,...t}){return m.jsx(Wee,{"data-slot":"popover-description",className:De("text-muted-foreground",e),...t})}function C5(e){return Array.isArray(e)?e.map(t=>C5(t)).join(","):e==null?"":String(e)}const C3=new Map;function ete(e,t){const n=JSON.stringify({locale:C5(e),options:t}),r=C3.get(n);if(r)return r;const i=new Intl.NumberFormat(e,t);return C3.set(n,i),i}function k3(e,t,n){return e==null?"":ete(t,n).format(e)}function Pu(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function tte(e,t,n){return(e-t)*100/(n-t)}const k5=x.createContext(void 0);function Iy(){const e=x.useContext(k5);if(e===void 0)throw new Error(Cn(51));return e}const nte="data-complete",rte="data-indeterminate",ite="data-progressing",eg={status(e){return e==="progressing"?{[ite]:""}:e==="complete"?{[nte]:""}:e==="indeterminate"?{[rte]:""}:null}},ate=x.forwardRef(function(t,n){const{format:r,getAriaValueText:i,locale:a,max:o=100,min:c=0,value:u,render:d,className:p,children:h,style:y,...b}=t,[v,T]=x.useState();let A="indeterminate",w=null,k=null,C="",R="indeterminate progress";if(u!=null&&Number.isFinite(u)){const j=tte(u,c,o);w=Pu(Number.isNaN(j)?0:j,0,100),k=Pu(u,c,o),A=k===o?"complete":"progressing",C=r?k3(k,a,r):k3(w/100,a,{style:"percent"}),R=C}const O=x.useMemo(()=>({status:A}),[A]),N={"aria-labelledby":v,"aria-valuemax":o,"aria-valuemin":c,"aria-valuenow":k??void 0,"aria-valuetext":i?i(C,u):R,role:"progressbar",children:m.jsxs(x.Fragment,{children:[h,m.jsx("span",{role:"presentation",style:Kf,children:"x"})]})},I=x.useMemo(()=>({formattedValue:C,percentageValue:w,setLabelId:T,state:O,value:u}),[C,w,T,O,u]),L=It("div",t,{state:O,ref:n,props:[N,b],stateAttributesMapping:eg});return m.jsx(k5.Provider,{value:I,children:L})}),ste=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,{state:c}=Iy();return It("div",t,{state:c,ref:n,props:o,stateAttributesMapping:eg})}),ote=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,{percentageValue:c,state:u}=Iy(),d=c==null?{}:{insetInlineStart:0,height:"inherit",width:`${c}%`};return It("div",t,{state:u,ref:n,props:[{style:d},o],stateAttributesMapping:eg})}),lte=x.forwardRef(function(t,n){const{className:r,render:i,children:a,style:o,...c}=t,{value:u,formattedValue:d,state:p}=Iy(),h=p.status==="indeterminate";return It("span",t,{state:p,ref:n,props:[{"aria-hidden":!0,children:typeof a=="function"?a(h?"indeterminate":d,u):h?null:d},c],stateAttributesMapping:eg})}),cte=x.forwardRef(function(t,n){const{render:r,className:i,style:a,id:o,...c}=t,{setLabelId:u,state:d}=Iy(),p=Oee(o,u);return It("span",t,{state:d,ref:n,props:[{id:p,role:"presentation"},c],stateAttributesMapping:eg})});function ute({className:e,children:t,value:n,...r}){return m.jsxs(ate,{value:n,"data-slot":"progress",className:De("flex flex-wrap gap-3",e),...r,children:[t,m.jsx(N5,{children:m.jsx(R5,{})})]})}function N5({className:e,...t}){return m.jsx(ste,{className:De("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",e),"data-slot":"progress-track",...t})}function R5({className:e,...t}){return m.jsx(ote,{"data-slot":"progress-indicator",className:De("h-full bg-primary transition-all",e),...t})}function dte({className:e,...t}){return m.jsx(cte,{className:De("text-sm font-medium",e),"data-slot":"progress-label",...t})}function fte({className:e,...t}){return m.jsx(lte,{className:De("ml-auto text-sm text-muted-foreground tabular-nums",e),"data-slot":"progress-value",...t})}const pte="data-checked",hte="data-unchecked",U2={checked(e){return e?{[pte]:""}:{[hte]:""}},...Ol,...Yf},My="data-composite-item-active",O5=x.createContext(void 0);function mte(){return x.useContext(O5)}function Xb(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}const I5=x.createContext(void 0);function gte(){const e=x.useContext(I5);if(e===void 0)throw new Error(Cn(52));return e}const bte=x.forwardRef(function(t,n){const{render:r,className:i,disabled:a=!1,readOnly:o=!1,required:c=!1,"aria-labelledby":u,value:d,inputRef:p,nativeButton:h=!1,id:y,style:b,...v}=t,T=mte(),{disabled:A,readOnly:w,required:k,form:C,checkedValue:R,touched:O=!1,validation:N,name:I,setCheckedValue:L=xr,setTouched:j=xr,registerInputRef:P=xr}=T??{},{setTouched:B,setFilled:U,state:q,disabled:K}=qc(),V=p4(),{labelId:H,getDescriptionProps:W}=fd(),Y=K||V.disabled||A||a,te=w||o,M=k||c,z=C,G=T?R===d:d==="",F=x.useRef(null),ee=x.useRef(null),ae=N==null?void 0:N.registerInput,re=x.useCallback(pe=>ae==null?void 0:ae(pe,{controlRef:F,value:void 0}),[ae]),ye=Ys(p,ee,P,re);lt(()=>{var pe;(pe=ee.current)!=null&&pe.checked&&U(!0)},[U]),lt(()=>{if(ee.current){if(Y&&G){P(null);return}P(ee.current)}},[G,Y,P]);const ge=Gr(),Te=Wf({id:y}),$e=h?void 0:Te,He=wS(u,H,ee,!h,$e),Ne={role:"radio","aria-checked":G,"aria-labelledby":He,[My]:G?"":void 0,id:h?Te:ge,onKeyDown(pe){pe.key==="Enter"&&pe.preventDefault()},onClick(pe){if(pe.defaultPrevented||Y||te)return;pe.preventDefault();const Be=ee.current;Be&&Hu(Be,pe)},onFocus(pe){var Be;pe.defaultPrevented||Y||te||!O||((Be=ee.current)==null||Be.click(),j(!1))}},{getButtonProps:Ie,buttonRef:be}=is({disabled:Y,native:h,composite:!1}),Le={type:"radio",ref:ye,form:z,id:$e,name:I,tabIndex:-1,style:I?G1:Kf,"aria-hidden":!0,...d!==void 0?{value:Xb(d)}:tr,disabled:Y,checked:G,required:M,readOnly:te,onChange(pe){if(pe.nativeEvent.defaultPrevented||Y||te||d===void 0)return;const Be=jt(es,pe.nativeEvent);L(d,Be),!Be.isCanceled&&B(!0)},onClick(pe){pe.stopPropagation()},onFocus(){var pe;(pe=F.current)==null||pe.focus()}},Me=x.useMemo(()=>({...q,required:M,disabled:Y,readOnly:te,checked:G}),[q,Y,te,G,M]),Oe=Me,Ge=T!==void 0,fe=[n,F,be],Q=[Ne,v,Ie,W,N?pe=>N.getValidationProps(Y,pe):tr],se=It("span",t,{enabled:!Ge,state:Me,ref:fe,props:Q,stateAttributesMapping:U2});return m.jsxs(I5.Provider,{value:Oe,children:[Ge?m.jsx(uA,{tag:"span",render:r,className:i,style:b,state:Me,refs:fe,props:Q,stateAttributesMapping:U2}):se,m.jsx("input",{...Le,suppressHydrationWarning:!0})]})}),yte=x.forwardRef(function(t,n){const{render:r,className:i,style:a,keepMounted:o=!1,...c}=t,u=gte(),d=u.checked,{mounted:p,transitionStatus:h,setMounted:y}=Rl(d),b={...u,transitionStatus:h},v=x.useRef(null),T=o||p,A=It("span",t,{ref:[n,v],state:b,props:c,stateAttributesMapping:U2});return $a({batch:!0,enabled:!d,open:d,ref:v,onComplete(){d||y(!1)}}),T?A:null});function xte(e){const{loopFocus:t=!0,orientation:n="both",grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:c,rootRef:u,enableHomeAndEndKeys:d=!1,stopEventPropagation:p,disabledIndices:h,modifierKeys:y=ks}=e,[b,v]=x.useState(0),T=r!=null,A=x.useRef(null),w=Ys(A,u),k=x.useRef([]),C=x.useRef(!1),R=x.useRef(null),O=o??b,N=mt((B,U=!1)=>{if(R.current=k.current[B]??null,(c??v)(B),U){const q=k.current[B];g3(A.current,q,a,n)}}),I=mt(B=>{var V;if(B.size===0)return;if(C.current){const H=k.current,W=H.indexOf(R.current);if(W===-1){const Y=H[O];!Y||Cf(H,O,h)?N(vte(H,h)):R.current=Y}else W!==O&&N(W);return}C.current=!0;const U=Array.from(B.keys()),q=U.find(H=>H==null?void 0:H.hasAttribute(My))??null,K=q?((V=B.get(q))==null?void 0:V.index)??-1:-1;if(K!==-1)N(K);else if(Cf(U,O,h)){const H=hl(U,{disabledIndices:h});Ph(U,H)||N(H)}g3(A.current,q,a,n)});lt(()=>{if(h==null||o!=null||!C.current)return;const B=k.current;if(Cf(B,O,h)){const U=hl(B,{disabledIndices:h});Ph(B,U)||N(U)}},[h,o,O,k,N]);const L=mt((B,U,q)=>i?i(B,U,q,k):q),j=mt(B=>{const U=B.key===F2||B.key===z2;if(!Wm.has(B.key)||!d&&U||Ete(B,y)||!A.current)return;const K=a==="rtl",V=K?$2:B2,H=K?B2:$2,W=n==="vertical"?j2:V,Y=n==="vertical"?P2:H,te=Gi(B.nativeEvent);if(te!=null&&m3(te)&&!g5(te)){const ae=te.selectionStart,re=te.selectionEnd,ye=te.value;if(ae==null||B.shiftKey||ae!==re||B.key!==Y&&ae<ye.length||B.key!==W&&ae>0)return}let M=O;const z=vb(k,h),G=O2(k,h);r!=null&&(M=r({disabledIndices:h,elementsRef:k,event:B,highlightedIndex:O,loopFocus:t,maxIndex:G,minIndex:z,onLoop:L,orientation:n,rtl:K}));const F=n!=="vertical"&&B.key===V||n!=="horizontal"&&B.key===j2,ee=n!=="vertical"&&B.key===H||n!=="horizontal"&&B.key===P2;d&&(B.key===F2?M=z:B.key===z2&&(M=G)),M===O&&(F||ee)&&(t&&M===G&&F?(M=z,i&&(M=i(B,O,M,k))):t&&M===z&&ee?(M=G,i&&(M=i(B,O,M,k))):M=hl(k.current,{startingIndex:M,decrement:ee,disabledIndices:h})),M!==O&&!Ph(k.current,M)&&(p&&B.stopPropagation(),(T||U||F||ee)&&B.preventDefault(),N(M,!0),queueMicrotask(()=>{var ae;(ae=k.current[M])==null||ae.focus()}))});return{props:{ref:w,onFocus(B){const U=A.current,q=Gi(B.nativeEvent);!U||q==null||!m3(q)||q.setSelectionRange(0,q.value.length)},onKeyDown:j},highlightedIndex:O,onHighlightedIndexChange:N,elementsRef:k,onMapChange:I,relayKeyboardEvent:j}}function vte(e,t){let n=-1;for(let r=0;r<e.length;r+=1){const i=e[r];if(!(!i||Cf(e,r,t))){if(i.hasAttribute(My))return r;n===-1&&(n=r)}}return Math.max(n,0)}function Ete(e,t){for(const n of OZ)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function hA(e){const{render:t,className:n,style:r,refs:i=ks,props:a=ks,state:o=tr,stateAttributesMapping:c,highlightedIndex:u,onHighlightedIndexChange:d,orientation:p,grid:h,loopFocus:y,onLoop:b,enableHomeAndEndKeys:v,onMapChange:T,stopEventPropagation:A=!0,rootRef:w,disabledIndices:k,modifierKeys:C,highlightItemOnHover:R=!1,tag:O="div",...N}=e,I=ky(),{props:L,highlightedIndex:j,onHighlightedIndexChange:P,elementsRef:B,onMapChange:U,relayKeyboardEvent:q}=xte({grid:h,loopFocus:y,onLoop:b,orientation:p,highlightedIndex:u,onHighlightedIndexChange:d,rootRef:w,stopEventPropagation:A,enableHomeAndEndKeys:v,direction:I,disabledIndices:k,modifierKeys:C}),K=It(O,e,{state:o,ref:i,props:[L,...a,N],stateAttributesMapping:c}),V=x.useMemo(()=>({highlightedIndex:j,onHighlightedIndexChange:P,highlightItemOnHover:R,relayKeyboardEvent:q}),[j,P,R,q]);return m.jsx(l4.Provider,{value:V,children:m.jsx(Ry,{elementsRef:B,onMapChange:H=>{T==null||T(H),U(H)},children:K})})}const Tte=[HP],wte=x.forwardRef(function(t,n){const{render:r,className:i,disabled:a,readOnly:o,required:c,onValueChange:u,value:d,defaultValue:p,form:h,name:y,inputRef:b,id:v,style:T,...A}=t,{setTouched:w,setFocused:k,validationMode:C,name:R,disabled:O,state:N,validation:I,setDirty:L,setFilled:j,validityData:P}=qc(),{labelId:B}=fd(),{clearErrors:U,elementRef:q}=jm(),K=Ree(!0),V=O||a,H=R??y,W=Gr(v),[Y,te]=Ws({controlled:d,default:p,name:"RadioGroup",state:"value"}),[M,z]=x.useState(!1),G=mt((be,Le)=>{u==null||u(be,Le),!Le.isCanceled&&te(be)}),F=I.getInputControl,ee=x.useMemo(()=>({get current(){return F()}}),[F]),ae=x.useRef(null),re=x.useRef(null);function ye(be){let Le;return b&&(typeof b=="function"?Le=b(be):b.current=be),ae.current=be,Le}const ge=mt(be=>{if(!be||be.disabled)return;re.current||(re.current=be);const Le=ae.current,Me=be.checked||Le==null||Le.disabled?ye(be):void 0;return()=>{re.current===be&&(re.current=null),ae.current===be?Me?(Me(),ae.current=null):ye(null):Me==null||Me()}}),Te=mt(()=>{const be=q.current;if(!be)return Y??null;for(const Le of I.registeredInputs.keys())if(Le.checked&&Iee(Le,be))return Y??null;return null});Pm(ee,W,Y??null,Te,!V,y),Xf(Y,()=>{U(H),L(Y!==P.initialValue),j(Y!=null),I.change(Y);const be=re.current;Y==null&&be&&!be.disabled&&ye(be)});const $e=B??(K==null?void 0:K.legendId),He={...N,disabled:V??!1,required:c??!1,readOnly:o??!1},Ne=x.useMemo(()=>({checkedValue:Y,disabled:V,form:h,validation:I,name:H,readOnly:o,registerInputRef:ge,required:c,setCheckedValue:G,setTouched:z,touched:M}),[Y,V,h,I,H,o,ge,c,G,z,M]),Ie={id:v,role:"radiogroup","aria-required":c||void 0,"aria-disabled":V||void 0,"aria-readonly":o||void 0,"aria-labelledby":$e,onFocus(){k(!0)},onBlur(be){Lt(be.currentTarget,be.relatedTarget)||(w(!0),k(!1),C==="onBlur"&&I.commit(Y))},onKeyDownCapture(be){be.key.startsWith("Arrow")&&(z(!0),k(!0))}};return m.jsx(O5.Provider,{value:Ne,children:m.jsx(hA,{render:r,className:i,style:T,state:He,props:[Ie,A,be=>I.getValidationProps(V??!1,be)],refs:[n],stateAttributesMapping:Yf,enableHomeAndEndKeys:!1,modifierKeys:Tte})})});function Ste({className:e,...t}){return m.jsx(wte,{"data-slot":"radio-group",className:De("grid w-full gap-2",e),...t})}function Ate({className:e,...t}){return m.jsx(bte,{"data-slot":"radio-group-item",className:De("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",e),...t,children:m.jsx(yte,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:m.jsx("span",{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground"})})})}function _te(e){const t=x.useRef(!0);t.current&&(t.current=!1,e())}const M5=x.createContext(void 0),D5=x.createContext(void 0),L5=x.createContext(void 0);function Do(){const e=x.useContext(M5);if(e===void 0)throw new Error(Cn(60));return e}function Dy(){const e=x.useContext(D5);if(e===void 0)throw new Error(Cn(101));return e}function P5(){const e=x.useContext(L5);if(e===void 0)throw new Error(Cn(61));return e}function Cte(e,t,n=Object.is){const{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}const j5=(e,t)=>Object.is(e,t);function id(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function kte(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!Cte(e,t,(r,i)=>id(r,i,n)):e!==t}function H2(e,t,n){return e?e.some(r=>r===void 0?!1:id(t,r,n)):!1}function wb(e,t,n){return e?e.findIndex(r=>r===void 0?!1:id(r,t,n)):-1}function Nte(e,t){if(t!==j5)return r=>H2(e,r,t);const n=new Set(e);return n.delete(void 0),r=>n.has(r)&&(r!==0||e.some(i=>Object.is(r,i)))}function $5(e,t,n,r){const i=r&&Array.isArray(t)?e.findIndex(Nte(t,n)):wb(e,t,n);return i===-1?null:i}function Rte(e,t,n,r,i,a){return H2(r,t,i)?a!=null&&e>a&&H2(r,n[a],i)?a:e:e===a?$5(n,r,i,!0):a}function Ote(e,t,n){return e.filter(r=>!id(t,r,n))}function Ite(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function B5(e){return Ite(e==null?void 0:e[0])}function Mte(e){return B5(e)?e.flatMap(t=>t.items):e}function Dte(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(B5(t)){for(const n of t)for(const r of n.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function F5(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return Xb(e)}function cf(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Xb(e.value):Xb(e)}function z5(e,t,n){function r(){return F5(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){const a=Mte(t);if(e==null||typeof e!="object"){const o=a.find(c=>c.value===e);return o&&o.label!=null?o.label:r()}if("value"in e){const o=a.find(c=>c&&c.value===e.value);if(o&&o.label!=null)return o.label}}return r()}function Lte(e,t,n){return e.reduce((r,i,a)=>(a>0&&r.push(", "),r.push(m.jsx(x.Fragment,{children:z5(i,t,n)},a)),r),[])}const Pte={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:cf(t,r)!==""},hasNullItemLabel:(e,t)=>t?Dte(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{const n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(i=>id(t,i,n)):id(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows},Us=1;function mA(e,t){return Math.max(0,e-t)}function Qb(e,t){if(t<=0)return 0;const n=Pu(e,0,t),r=n,i=t-n,a=r<=Us,o=i<=Us;return a&&o?r<=i?0:t:a?0:o?t:n}function jte(e){const{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:c,name:u,form:d,autoComplete:p,disabled:h=!1,readOnly:y=!1,required:b=!1,modal:v=!0,actionsRef:T,inputRef:A,onOpenChangeComplete:w,items:k,multiple:C=!1,itemToStringLabel:R,itemToStringValue:O,isItemEqualToValue:N=j5,highlightItemOnHover:I=!0,children:L}=e,{clearErrors:j}=jm(),{setDirty:P,setTouched:B,setFocused:U,validityData:q,setFilled:K,name:V,disabled:H,validation:W,validationMode:Y}=qc(),te=Wf({id:t}),M=H||h,z=V??u,[G,F]=Ws({controlled:n,default:C?r??ks:r,name:"Select",state:"value"}),[ee,ae]=Ws({controlled:a,default:o,name:"Select",state:"open"}),re=x.useRef([]),ye=x.useRef([]),ge=x.useRef(null),Te=x.useRef(null),$e=x.useRef(0),He=x.useRef(null),Ne=x.useRef([]),Ie=x.useRef(!1),be=x.useRef(null),Le=x.useRef(null),Me=x.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),Oe=x.useRef(!1),Ge=x.useRef(G),{mounted:fe,setMounted:Q,transitionStatus:se}=Rl(ee),{openMethod:pe,triggerProps:Be}=VP(ee),xe=Ai(()=>new Qf({id:te,labelId:void 0,modal:v,multiple:C,itemToStringLabel:R,itemToStringValue:O,isItemEqualToValue:N,value:G,open:ee,mounted:fe,transitionStatus:se,items:k,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:tr,triggerProps:tr,triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:xr,setOpen:xr,handleScrollArrowVisibility:xr,onOpenChangeComplete:xr,listRef:re,popupRef:ge,scrollHandlerRef:Te,scrollArrowsMountedCountRef:$e,valueRef:He,valuesRef:Ne,labelsRef:ye,typingRef:Ie,selectionRef:Me,firstItemTextRef:be,selectedItemTextRef:Le,alignItemWithTriggerActiveRef:Oe,initialValueRef:Ge},Pte)).current,Qe=xe.useState("activeIndex"),oe=xe.useState("selectedIndex"),ue=xe.useState("triggerElement"),ze=xe.useState("positionerElement"),nt=JJ(pe),ht=pe??nt,Yt=x.useMemo(()=>C?"":cf(G,O),[C,G,O]),Xt=x.useMemo(()=>C&&Array.isArray(G)?G.map(Xe=>cf(Xe,O)):cf(G,O),[C,G,O]),at=ai(ue),xt=mt(()=>Xt);Pm(at,te,G,xt,!M,u);const Ft=C?Array.isArray(G)&&G.length>0:G!=null&&Yt!=="";lt(()=>{K(Ft)},[Ft,K]),lt(function(){const Tt=$5(Ne.current,G,N,C);Tt===null&&(Le.current=null),!ee&&xe.set("selectedIndex",Tt)},[C,ee,G,N,xe]),Xf(G,()=>{j(z),P(kte(G,q.initialValue,N)),W.change(G)});const Mt=mt((Xe,Tt)=>{c==null||c(Xe,Tt),!Tt.isCanceled&&(ae(Xe),!Xe&&(Tt.reason===Rc||Tt.reason===K1)&&(B(!0),U(!1),Y==="onBlur"&&W.commit(G)))}),Qt=mt(()=>{Q(!1),xe.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),w==null||w(!1)});$a({enabled:!T,open:ee,ref:ge,onComplete(){ee||Qt()}}),x.useImperativeHandle(T,()=>({unmount:Qt}),[Qt]);const vt=mt((Xe,Tt)=>{i==null||i(Xe,Tt),!Tt.isCanceled&&F(Xe)}),zn=mt(Xe=>{const Tt=mA(Xe.scrollHeight,Xe.clientHeight),Pt=Qb(Xe.scrollTop,Tt),qn=Pt>0,Pn=Pt<Tt;xe.set("scrollUpArrowVisible",qn),xe.set("scrollDownArrowVisible",Pn)}),Jt=EZ({open:ee,onOpenChange:Mt,elements:{reference:ue,floating:ze}}),un=qm(Jt,{enabled:!M,event:"mousedown"}),kn=Vm(Jt),Dt=FP(Jt,{enabled:!M,listRef:re,activeIndex:Qe,selectedIndex:oe,disabledIndices:ks,onNavigate(Xe){Xe===null&&!ee||xe.set("activeIndex",Xe)},focusItemOnHover:I}),ne=zP(Jt,{enabled:!M&&(ee||!y&&!C),listRef:ye,activeIndex:Qe,selectedIndex:oe,disabledIndices:Xe=>g5(re.current[Xe]),onMatch(Xe){ee?xe.set("activeIndex",Xe):vt(Ne.current[Xe],jt(es))},onTyping(Xe){Ie.current=Xe}}),Ce=x.useMemo(()=>La(ne.reference,Dt.reference,kn.reference,un.reference,Be),[un.reference,ne.reference,Dt.reference,kn.reference,Be]),le=x.useMemo(()=>La(Km,ne.floating,Dt.floating,kn.floating),[ne.floating,Dt.floating,kn.floating]),Fe=Dt.item??tr;xe.useContextCallback("setValue",vt),xe.useContextCallback("setOpen",Mt),xe.useContextCallback("handleScrollArrowVisibility",zn),xe.useContextCallback("onOpenChangeComplete",w),_te(()=>{xe.update({popupProps:le,triggerProps:Ce})}),xe.useSyncedValues({id:te,modal:v,multiple:C,value:G,open:ee,mounted:fe,transitionStatus:se,popupProps:le,triggerProps:Ce,items:k,itemToStringLabel:R,itemToStringValue:O,isItemEqualToValue:N,openMethod:ht});const dt=x.useMemo(()=>({disabled:M,readOnly:y,required:b,multiple:C,highlightItemOnHover:I,itemProps:Fe}),[M,y,b,C,I,Fe]),St=Ys(A,W.inputRef),We=C?void 0:z,rt=x.useMemo(()=>!C||!Array.isArray(G)||!z?null:G.map(Xe=>{const Tt=cf(Xe,O);return m.jsx("input",{type:"hidden",form:d,name:z,value:Tt,disabled:M},Tt)}),[C,G,d,z,O,M]);return m.jsxs(M5.Provider,{value:xe,children:[m.jsx(D5.Provider,{value:dt,children:m.jsx(L5.Provider,{value:Jt,children:L})}),m.jsx("input",{...W.getValidationProps(M,{onFocus(){var Xe;(Xe=xe.state.triggerElement)==null||Xe.focus({focusVisible:!0})},onChange(Xe){if(Xe.nativeEvent.defaultPrevented||M||y)return;const Tt=Xe.currentTarget.value,Pt=jt(es,Xe.nativeEvent);function qn(){if(C)return;const Pn=Tt.toLowerCase();let Xn=Ne.current.findIndex(zt=>cf(zt,O).toLowerCase()===Pn||F5(zt,R).toLowerCase()===Pn);Xn===-1&&(Xn=Ne.current.findIndex((zt,mn)=>{const kr=ye.current[mn];return kr!=null&&kr.toLowerCase()===Pn}));const Vn=Ne.current[Xn];Vn!=null&&vt(Vn,Pt)}xe.set("forceMount",!0),queueMicrotask(qn)}}),id:te&&We==null?`${te}-hidden-input`:void 0,form:d,name:We,autoComplete:p,value:Yt,disabled:M,required:b&&!(C&&Ft),readOnly:y,ref:St,style:z?G1:Kf,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),rt]})}function $te(e,t){return e??t}const Bte="data-popup-side",Fte=400,zte={...Ub,...Yf,popupSide:e=>e?{[Bte]:e}:null,value:()=>null},Ute=x.forwardRef(function(t,n){var $e;const{render:r,className:i,id:a,disabled:o=!1,nativeButton:c=!0,style:u,...d}=t,{setTouched:p,setFocused:h,validationMode:y,validation:b,state:v,disabled:T}=qc(),{labelId:A}=fd(),w=Do(),{readOnly:k,required:C,disabled:R}=Dy(),O=T||R||o,N=w.useState("open"),I=w.useState("mounted"),L=w.useState("value"),j=w.useState("triggerProps"),P=w.useState("positionerElement"),B=w.useState("listElement"),U=w.useState("popupSide"),q=w.useState("id"),K=w.useState("labelId"),V=w.useState("hasSelectedValue"),H=I&&P?U:null,W=a??q,Y=$te(A,K);Wf({id:a});const te=ai(P),M=x.useRef(null),{getButtonProps:z,buttonRef:G}=is({disabled:O,native:c}),F=w.useStateSetter("triggerElement"),ee=xi(),ae=xi(),re=xi();x.useEffect(()=>{if(N)return re.start(Fte,()=>{w.context.selectionRef.current.allowUnselectedMouseUp=!0,w.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{re.clear()};w.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},ae.clear()},[N,w,ae,re]);const ye=La(j,{id:W,role:"combobox","aria-expanded":N,"aria-haspopup":"listbox","aria-controls":N?(B==null?void 0:B.id)??(($e=qb(P))==null?void 0:$e.id):void 0,"aria-labelledby":Y,"aria-readonly":k||void 0,"aria-required":C||void 0,tabIndex:O?-1:0,onFocus(He){h(!0),N&&w.context.alignItemWithTriggerActiveRef.current&&w.context.setOpen(!1,jt(es,He.nativeEvent)),ee.start(0,()=>{w.set("forceMount",!0)})},onBlur(He){Lt(P,He.relatedTarget)||(p(!0),h(!1),y==="onBlur"&&b.commit(L))},onMouseDown(He){if(N)return;const Ne=yn(He.currentTarget);function Ie(be){if(!M.current)return;const Le=be.target;Lt(M.current,Le)||Lt(te.current,Le)||d5(be,M.current)||w.context.setOpen(!1,jt(g4,be))}ae.start(0,()=>{Ne.addEventListener("mouseup",Ie,{once:!0})})}},d,z),ge=b.getValidationProps(O,ye);ge.role="combobox";const Te={...v,open:N,disabled:O,value:L,readOnly:k,popupSide:H,placeholder:!V};return It("button",t,{ref:[n,M,G,F],state:Te,stateAttributesMapping:zte,props:ge})}),Hte={value:()=>null},qte=x.forwardRef(function(t,n){const{className:r,render:i,children:a,placeholder:o,style:c,...u}=t,d=Do(),p=d.useState("value"),h=d.useState("items"),y=d.useState("itemToStringLabel"),b=d.useState("hasSelectedValue"),v=!b&&o!=null&&a==null,T=d.useState("hasNullItemLabel",v),A={value:p,placeholder:!b};let w=null;return typeof a=="function"?w=a(p):a!=null?w=a:v&&!T?w=o:Array.isArray(p)?w=Lte(p,h,y):w=z5(p,h,y),It("span",t,{state:A,ref:[n,d.context.valueRef],props:[{children:w},u],stateAttributesMapping:Hte})}),Vte=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,d={open:Do().useState("open")};return It("span",t,{state:d,ref:n,props:[{"aria-hidden":!0,children:"▼"},o],stateAttributesMapping:Fm})}),Gte=x.forwardRef(function(t,n){const r=Do(),i=r.useState("mounted"),a=r.useState("forceMount");return i||a?m.jsx(ay,{ref:n,...t}):null}),U5=x.createContext(void 0);function gA(){const e=x.useContext(U5);if(!e)throw new Error(Cn(59));return e}function Zb(e,t){e&&Object.assign(e.style,t)}const H5={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},Kte={position:"fixed"},Yte=x.forwardRef(function(t,n){const{anchor:r,className:i,render:a,positionMethod:o,side:c,align:u,sideOffset:d,alignOffset:p,collisionBoundary:h="clipping-ancestors",collisionPadding:y,arrowPadding:b,sticky:v,disableAnchorTracking:T,alignItemWithTrigger:A=!0,collisionAvoidance:w=hP,style:k,...C}=t,R=Do(),O=P5(),N=R.useState("open"),I=R.useState("mounted"),L=R.useState("modal"),j=R.useState("value"),P=R.useState("openMethod"),B=R.useState("positionerElement"),U=R.useState("triggerElement"),q=R.useState("isItemEqualToValue"),K=R.useState("transitionStatus"),V=x.useRef(null),H=x.useRef(null),[W,Y]=x.useState(A),te=I&&W&&P!=="touch";!I&&W!==A&&Y(A),x.useImperativeHandle(R.context.alignItemWithTriggerActiveRef,()=>te),cA((te||L)&&N,P==="touch",B,U);const M=Ny({anchor:r,floatingRootContext:O,positionMethod:o,mounted:I,side:c,sideOffset:d,align:u,alignOffset:p,arrowPadding:b,collisionBoundary:h,collisionPadding:y,sticky:v,disableAnchorTracking:T??te,collisionAvoidance:w,keepMounted:!0}),z=te?"none":M.side,G=te?Kte:M.positionerStyles,F={open:N,side:z,align:M.align,anchorHidden:M.anchorHidden};lt(()=>{R.set("popupSide",M.side)},[R,M.side]);const ee=R.useStateSetter("positionerElement"),ae=Oy(t,F,{styles:G,transitionStatus:K,props:C,refs:[n,ee],hidden:!I,inert:!N}),re=x.useRef(0),ye=mt(Te=>{if(R.context.valuesRef.current.length===0)return;const $e=re.current;re.current=Te.size;const He=jt(es);if($e!==0&&!R.state.multiple&&j!==null&&wb(R.context.valuesRef.current,j,q)===-1){const Ie=R.context.initialValueRef.current,Le=Ie!=null&&wb(R.context.valuesRef.current,Ie,q)!==-1?Ie:null;R.context.setValue(Le,He),Le===null&&(R.set("selectedIndex",null),R.context.selectedItemTextRef.current=null)}if($e!==0&&R.state.multiple&&Array.isArray(j)){const Ne=j.filter(Ie=>wb(R.context.valuesRef.current,Ie,q)!==-1);Ne.length!==j.length&&(R.context.setValue(Ne,He),Ne.length===0&&(R.set("selectedIndex",null),R.context.selectedItemTextRef.current=null))}if(N&&te){R.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Ne={height:""};Zb(B,Ne),Zb(R.context.popupRef.current,Ne)}}),ge=x.useMemo(()=>({...M,side:z,alignItemWithTriggerActive:te,setControlledAlignItemWithTrigger:Y,scrollUpArrowRef:V,scrollDownArrowRef:H}),[M,z,te,Y]);return m.jsx(Ry,{elementsRef:R.context.listRef,labelsRef:R.context.labelsRef,onMapChange:ye,children:m.jsxs(U5.Provider,{value:ge,children:[I&&L&&m.jsx(Ey,{inert:Xm(!N),cutout:U}),ae]})})}),U0="base-ui-disable-scrollbar",q2={className:U0,getElement(e){return m.jsx("style",{nonce:e,href:U0,precedence:"base-ui:low",children:`.${U0}{scrollbar-width:none}.${U0}::-webkit-scrollbar{display:none}`})}},Wte=x.createContext(void 0),Xte={disableStyleElements:!1};function Qte(){return x.useContext(Wte)??Xte}const N3="--transform-origin",Zte={...zm,...Ol},Jte=x.forwardRef(function(t,n){const{render:r,className:i,style:a,finalFocus:o,...c}=t,u=Do(),{multiple:d,readOnly:p,highlightItemOnHover:h}=Dy(),y=P5(),{side:b,align:v,alignItemWithTriggerActive:T,isPositioned:A,setControlledAlignItemWithTrigger:w}=gA(),k=Cy()!=null,C=ky(),{nonce:R,disableStyleElements:O}=Qte(),N=u.useState("id"),I=u.useState("open"),L=u.useState("openMethod"),j=u.useState("mounted"),P=u.useState("popupProps"),B=u.useState("transitionStatus"),U=u.useState("triggerElement"),q=u.useState("positionerElement"),K=u.useState("listElement"),V=x.useRef(!1),H=x.useRef(!1),W=x.useRef({}),Y=$f(),te=mt(F=>{if(!q||!u.context.popupRef.current||!H.current)return;const ee=q.style.top==="0px",ae=q.style.bottom==="0px";if(V.current||!T||!ee&&!ae){u.context.handleScrollArrowVisibility(F);return}const re=O3(q),ye=kh(q.getBoundingClientRect().height,"y",re),ge=yn(q),Te=_r(q),$e=Te.getComputedStyle(q),He=parseFloat($e.marginTop),Ne=parseFloat($e.marginBottom),Ie=R3(Te.getComputedStyle(u.context.popupRef.current)),be=Math.min(ge.documentElement.clientHeight-He-Ne,Ie),Le=F.scrollTop,Me=H0(F);let Oe=null;const Ge=pe=>{q.style.height=`${pe}px`},fe=ee?Me-Le:Le,Q=Math.min(ye+fe,be);if(fe<=Us){const pe=Pu(fe,0,be-ye);pe>0&&Ge(ye+pe),F.scrollTop=ee?Me:0,be-(ye+pe)<=Us&&(V.current=!0),u.context.handleScrollArrowVisibility(F);return}if(be-Q>Us)Oe=ee?1/0:0;else if(ae&&Le<Me){const pe=ye+fe-be;Oe=Le-(fe-pe)}const se=Math.ceil(Q);if(se!==0&&Ge(se),Oe!=null){const pe=Pu(Oe,0,H0(F));Math.abs(F.scrollTop-pe)>Us&&(F.scrollTop=pe)}se>=be-Us&&(V.current=!0),u.context.handleScrollArrowVisibility(F)});x.useImperativeHandle(u.context.scrollHandlerRef,()=>te,[te]),$a({open:I,ref:u.context.popupRef,onComplete(){I&&u.context.onOpenChangeComplete(!0)}});const M={open:I,transitionStatus:B,side:b,align:v};lt(()=>{!q||!u.context.popupRef.current||Object.keys(W.current).length||(W.current={top:q.style.top||"0",left:q.style.left||"0",right:q.style.right,height:q.style.height,bottom:q.style.bottom,minHeight:q.style.minHeight,maxHeight:q.style.maxHeight,marginTop:q.style.marginTop,marginBottom:q.style.marginBottom})},[u,q]),lt(()=>{I||T||(H.current=!1,V.current=!1,Zb(q,W.current))},[I,T,q]),lt(()=>{var ae,re;const F=u.context.popupRef.current;if(!I||!U||!q||!F||T&&!A||u.state.transitionStatus==="ending")return;if(H.current=!0,F.style.removeProperty(N3),!T){Y.request(()=>u.context.handleScrollArrowVisibility(K||F));return}const ee=ene(F);try{let ye=u.context.selectedItemTextRef.current;ye!=null&&ye.isConnected||(ye=!u.select("hasSelectedValue")&&((ae=u.context.firstItemTextRef.current)!=null&&ae.isConnected)?u.context.firstItemTextRef.current:null);const ge=u.context.valueRef.current,Te=_r(q),$e=Te.getComputedStyle(q),He=Te.getComputedStyle(F),Ne=yn(U),Ie=O3(U),be=q0(U.getBoundingClientRect(),Ie),Le=q0(q.getBoundingClientRect(),Ie),Me=be.height,Oe=K||F,Ge=Oe.scrollHeight,fe=parseFloat(He.borderBottomWidth),Q=parseFloat($e.marginTop)||10,se=parseFloat($e.marginBottom)||10,pe=parseFloat($e.minHeight)||100,Be=R3(He),xe=5,Qe=5,oe=20,ue=Ne.documentElement.clientHeight-Q-se,ze=Ne.documentElement.clientWidth,nt=ue-be.bottom+Me;let ht,Yt=C==="rtl"?be.right-Le.width:be.left,Xt=0;if(ye&&ge){const Dt=q0(ge.getBoundingClientRect(),Ie);ht=q0(ye.getBoundingClientRect(),Ie),Yt=Le.left+(C==="rtl"?Dt.right-ht.right:Dt.left-ht.left);const ne=Dt.top-be.top+Dt.height/2;Xt=ht.top-Le.top+ht.height/2-ne}const at=nt+Xt+se+fe;let xt=Math.min(ue,at);const Ft=ue-Q-se,Mt=at-xt,Qt=ze-Qe;q.style.left=`${Pu(Yt,xe,Qt-Le.width)}px`,q.style.height=`${xt}px`,q.style.maxHeight="none",q.style.marginTop=`${Q}px`,q.style.marginBottom=`${se}px`,F.style.height="100%";const vt=H0(Oe),zn=Mt>=vt-Us;zn&&(xt=Math.min(ue,Le.height)-(Mt-vt));const Jt=be.top<oe||be.bottom>ue-oe||Math.ceil(xt)+Us<Math.min(Ge,pe),un=(((re=Te.visualViewport)==null?void 0:re.scale)??1)!==1&&Il;if(Jt||un){Zb(q,W.current),w(!1);return}const kn=Math.max(pe,xt);if(zn){const Dt=Math.max(0,ue-at);q.style.top=Le.height>=Ft?"0":`${Dt}px`,q.style.height=`${xt}px`,Oe.scrollTop=H0(Oe)}else q.style.bottom="0",Oe.scrollTop=Mt;if(ht){const Dt=Le.top,ne=Le.height,Ce=ht.top+ht.height/2,le=Pu(ne>0?(Ce-Dt)/ne*100:50,0,100);F.style.setProperty(N3,`50% ${le}%`)}(kn===ue||xt>=Be)&&(V.current=!0),u.context.handleScrollArrowVisibility(Oe),h&&u.state.selectedIndex===null&&u.state.activeIndex===null&&u.context.listRef.current[0]!=null&&u.set("activeIndex",0)}finally{ee()}},[u,I,q,U,T,w,Y,K,h,C,A]),x.useEffect(()=>{if(!T||!q||!I)return;const F=_r(q);function ee(ae){u.context.setOpen(!1,jt($W,ae))}return cn(F,"resize",ee)},[u,T,q,I]);const z={...K?{role:"presentation"}:{role:"listbox","aria-multiselectable":d||void 0,"aria-readonly":p||void 0,id:`${N}-list`},onKeyDown(F){k&&Wm.has(F.key)&&F.stopPropagation()},onScroll(F){K||te(F.currentTarget)},...T&&{style:K?{height:"100%"}:H5},className:!K&&T?q2.className:void 0},G=It("div",t,{ref:[n,u.context.popupRef],state:M,stateAttributesMapping:Zte,props:[P,z,Jm(B),c]});return m.jsxs(x.Fragment,{children:[!O&&q2.getElement(R),m.jsx(sy,{context:y,modal:!1,disabled:!j,openInteractionType:L,returnFocus:o,restoreFocus:!0,children:G})]})});function R3(e){const t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function H0(e){return mA(e.scrollHeight,e.clientHeight)}function O3(e){return kP.getScale(e)}function kh(e,t,n){return e/n[t]}function q0(e,t){return rm({x:kh(e.x,"x",t),y:kh(e.y,"y",t),width:kh(e.width,"x",t),height:kh(e.height,"y",t)})}const I3=[["transform","none"],["scale","1"],["translate","0 0"]];function ene(e){const{style:t}=e,n={};for(const[r,i]of I3)n[r]=t.getPropertyValue(r),t.setProperty(r,i,"important");return()=>{for(const[r]of I3){const i=n[r];i?t.setProperty(r,i):t.removeProperty(r)}}}const tne=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,c=Do(),{multiple:u,readOnly:d}=Dy(),{alignItemWithTriggerActive:p}=gA(),h=c.useState("hasScrollArrows"),y=c.useState("openMethod"),v={id:`${c.useState("id")}-list`,role:"listbox","aria-multiselectable":u||void 0,"aria-readonly":d||void 0,onScroll(A){var w,k;(k=(w=c.context.scrollHandlerRef).current)==null||k.call(w,A.currentTarget)},...p&&{style:H5},className:h&&y!=="touch"?q2.className:void 0},T=c.useStateSetter("listElement");return It("div",t,{ref:[n,T],props:[v,o]})}),q5=x.createContext(void 0);function bA(){const e=x.useContext(q5);if(!e)throw new Error(Cn(57));return e}const nne=x.memo(x.forwardRef(function(t,n){const{render:r,className:i,style:a,value:o=null,label:c,disabled:u=!1,nativeButton:d=!1,...p}=t,h=x.useRef(null),y=pd({guess:!0,label:c,textRef:h}),b=Do(),{itemProps:v,multiple:T,disabled:A,readOnly:w}=Dy(),k=A||u,C=b.useState("isActive",y.index),R=b.useState("open"),O=b.useState("isSelected",o),N=b.useState("isSelectedByFocus",y.index),I=b.useState("isItemEqualToValue"),L=y.index,j=x.useRef(null);lt(()=>{const M=b.context.valuesRef.current;return M[L]=o,()=>{delete M[L]}},[L,o,b]),lt(()=>{const M=b.state.value,z=b.state.selectedIndex;let G=z,F;T&&Array.isArray(M)?(G=Rte(L,o,b.context.valuesRef.current,M,I,z),F=G===L,L===z&&!F&&(b.context.selectedItemTextRef.current=null)):(F=M!==void 0&&id(o,M,I),F&&(G=L)),b.set("selectedIndex",G),F&&h.current&&(b.context.selectedItemTextRef.current=h.current)},[L,T,I,b,o]);const P=x.useRef("mouse"),B=x.useRef(!1),{getButtonProps:U,buttonRef:q}=is({disabled:k,focusableWhenDisabled:!0,native:d,composite:!0}),K={disabled:k,selected:O,highlighted:C};function V(M){if(A||w)return;const z=b.state.value;if(T){const G=Array.isArray(z)?z:[],F=O?Ote(G,o,I):[...G,o];b.context.setValue(F,jt(qu,M))}else b.context.setValue(o,jt(qu,M)),b.context.setOpen(!1,jt(qu,M))}function H(){b.context.selectionRef.current.dragY=0}const W={role:"option","aria-selected":O,tabIndex:R&&C?0:-1,onKeyDown(M){b.set("activeIndex",L),M.key===" "&&b.context.typingRef.current&&M.preventDefault()},onClick(M){const z=P.current!=="touch",G=M.nativeEvent.pointerType,F=z&&ey(M.nativeEvent)&&(G!==void 0||C),ee=z&&!F&&!B.current;B.current=!1,!(k||ee)&&V(M.nativeEvent)},onPointerEnter(M){P.current=M.pointerType},onPointerMove(M){if(M.pointerType==="mouse"&&M.buttons===1){const z=b.context.selectionRef.current;z.dragY+=M.movementY,z.dragY**2>=64&&(z.allowUnselectedMouseUp=!0)}},onPointerDown(M){P.current=M.pointerType,B.current=!0,H()},onMouseUp(){var G;if(H(),k||P.current==="touch"||B.current)return;const M=!b.context.selectionRef.current.allowSelectedMouseUp&&O,z=!b.context.selectionRef.current.allowUnselectedMouseUp&&!O;M||z||(B.current=!0,(G=j.current)==null||G.click(),B.current=!1)}},Y=It("div",t,{ref:[q,n,y.ref,j],state:K,props:[v,W,p,U]}),te=x.useMemo(()=>({selected:O,index:L,textRef:h,selectedByFocus:N}),[O,L,h,N]);return m.jsx(q5.Provider,{value:te,children:Y})})),rne=x.forwardRef(function(t,n){const{selected:r}=bA();return t.keepMounted||r?m.jsx(ine,{...t,ref:n}):null}),ine=x.memo(x.forwardRef((e,t)=>{const{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:c}=bA(),u=x.useRef(null),{transitionStatus:d,setMounted:p}=Rl(c),y=It("span",e,{ref:[t,u],state:{selected:c,transitionStatus:d},props:[{"aria-hidden":!0,children:"✔️"},o],stateAttributesMapping:Ol});return $a({batch:!0,enabled:!c,open:c,ref:u,onComplete(){c||p(!1)}}),y})),ane=x.memo(x.forwardRef(function(t,n){const{index:r,textRef:i,selectedByFocus:a}=bA(),o=Do(),{render:c,className:u,style:d,...p}=t,h=x.useCallback(b=>{b&&(r===0&&(o.context.firstItemTextRef.current=b),a&&(o.context.selectedItemTextRef.current=b))},[o,r,a]);return It("div",t,{ref:[h,n,i],props:p})})),V5=x.forwardRef(function(t,n){const{render:r,className:i,style:a,direction:o,keepMounted:c,...u}=t,d=o==="up",p=Do(),{side:h,scrollDownArrowRef:y,scrollUpArrowRef:b}=gA(),v=d?"scrollUpArrowVisible":"scrollDownArrowVisible",T=p.useState(v),A=p.useState("openMethod"),w=T&&A!=="touch",k=xi(),C=d?b:y,{mounted:R,transitionStatus:O,setMounted:N}=Rl(w);lt(()=>(p.context.scrollArrowsMountedCountRef.current+=1,p.set("hasScrollArrows",!0),()=>{p.context.scrollArrowsMountedCountRef.current=Math.max(0,p.context.scrollArrowsMountedCountRef.current-1),p.context.scrollArrowsMountedCountRef.current===0&&p.set("hasScrollArrows",!1)}),[p]),$a({open:w,ref:C,onComplete(){w||N(!1)}});const j=It("div",t,{ref:[n,C],state:{direction:o,visible:w,side:h,transitionStatus:O},props:[{"aria-hidden":!0,children:d?"▲":"▼",style:{position:"absolute"},onMouseMove(B){if(B.movementX===0&&B.movementY===0||k.isStarted())return;p.set("activeIndex",null);function U(){var Y;const q=p.state.listElement??p.context.popupRef.current;if(!q)return;p.set("activeIndex",null),p.context.handleScrollArrowVisibility(q);const K=mA(q.scrollHeight,q.clientHeight),V=Qb(q.scrollTop,K),H=V===(d?0:K),W=p.context.listRef.current;if(V!==q.scrollTop&&(q.scrollTop=V),H){k.clear();return}if(W.length>0){const te=((Y=C.current)==null?void 0:Y.offsetHeight)||0;q.scrollTop=sne(W,d,V,q.clientHeight,te,K)}k.start(40,U)}k.start(40,U)},onMouseLeave(){k.clear()}},u],stateAttributesMapping:Ol});return R||c?j:null});function sne(e,t,n,r,i,a){if(t){let p=0;const h=n+i-Us;for(let v=0;v<e.length;v+=1){const T=e[v];if(T&&T.offsetTop>=h){p=v;break}}const y=Math.max(0,p-1),b=e[y];return y<p&&b?Qb(b.offsetTop-i,a):0}let o=e.length-1;const c=n+r-i+Us;for(let p=0;p<e.length;p+=1){const h=e[p];if(h&&h.offsetTop+h.offsetHeight>c){o=Math.max(0,p-1);break}}const u=Math.min(e.length-1,o+1),d=e[u];return u>o&&d?Qb(d.offsetTop+d.offsetHeight-r+i,a):a}const one=x.forwardRef(function(t,n){return m.jsx(V5,{...t,ref:n,direction:"down"})}),lne=x.forwardRef(function(t,n){return m.jsx(V5,{...t,ref:n,direction:"up"})}),G5=x.createContext(void 0);function cne(){const e=x.useContext(G5);if(e===void 0)throw new Error(Cn(56));return e}const une=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,[c,u]=x.useState(),d=x.useMemo(()=>({labelId:c,setLabelId:u}),[c,u]),p=It("div",t,{ref:n,props:[{role:"group","aria-labelledby":c},o]});return m.jsx(G5.Provider,{value:d,children:p})}),dne=x.forwardRef(function(t,n){const{render:r,className:i,style:a,id:o,...c}=t,{setLabelId:u}=cne(),d=Gr(o);return lt(()=>(u(d),()=>{u(h=>h===d?void 0:h)}),[d,u]),It("div",t,{ref:n,props:[{id:d,"aria-hidden":!0},c]})}),fne=x.forwardRef(function(t,n){const{className:r,render:i,orientation:a="horizontal",style:o,...c}=t;return It("div",t,{state:{orientation:a},ref:n,props:[{role:"presentation"},c]})}),pne=fne,Dc=jte;function hne({className:e,...t}){return m.jsx(une,{"data-slot":"select-group",className:De("scroll-my-1 p-1",e),...t})}function Lc({className:e,...t}){return m.jsx(qte,{"data-slot":"select-value",className:De("flex flex-1 text-left",e),...t})}function Pc({className:e,size:t="default",children:n,...r}){return m.jsxs(Ute,{"data-slot":"select-trigger","data-size":t,className:De("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-background py-2 pr-2 pl-2.5 shadow-xs text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,m.jsx(Vte,{render:m.jsx(X1,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function jc({className:e,children:t,side:n="bottom",sideOffset:r=4,align:i="center",alignOffset:a=0,alignItemWithTrigger:o=!0,...c}){return m.jsx(Gte,{children:m.jsx(Yte,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:"isolate z-[110]",children:m.jsxs(Jte,{"data-slot":"select-content","data-align-trigger":o,className:De("relative isolate z-[110] max-h-(--available-height) w-auto max-w-[min(420px,var(--available-width))] min-w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...c,children:[m.jsx(K5,{}),m.jsx(tne,{children:t}),m.jsx(Y5,{})]})})})}function mne({className:e,...t}){return m.jsx(dne,{"data-slot":"select-label",className:De("px-1.5 py-1 text-xs text-muted-foreground",e),...t})}function $c({className:e,children:t,...n}){return m.jsxs(nne,{"data-slot":"select-item",className:De("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[m.jsx(ane,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:t}),m.jsx(rne,{render:m.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:m.jsx(Bm,{className:"pointer-events-none"})})]})}function gne({className:e,...t}){return m.jsx(pne,{"data-slot":"select-separator",className:De("pointer-events-none -mx-1 my-1 h-px bg-border",e),...t})}function K5({className:e,...t}){return m.jsx(lne,{"data-slot":"select-scroll-up-button",className:De("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:m.jsx(sX,{})})}function Y5({className:e,...t}){return m.jsx(one,{"data-slot":"select-scroll-down-button",className:De("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:m.jsx(X1,{})})}function bne({className:e,...t}){return m.jsx("div",{"data-slot":"skeleton",className:De("animate-pulse rounded-md bg-muted",e),...t})}function Wc({className:e,...t}){return m.jsx(mX,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:De("size-4 animate-spin",e),...t})}const W5=x.createContext(void 0);function yne(){const e=x.useContext(W5);if(e===void 0)throw new Error(Cn(63));return e}const xne="data-checked",vne="data-unchecked",X5={...Yf,checked(e){return e?{[xne]:""}:{[vne]:""}}},Ene=x.forwardRef(function(t,n){const{checked:r,className:i,defaultChecked:a,"aria-labelledby":o,form:c,id:u,inputRef:d,name:p,nativeButton:h=!1,onCheckedChange:y,readOnly:b=!1,required:v=!1,disabled:T=!1,render:A,uncheckedValue:w,value:k,style:C,...R}=t,{clearErrors:O}=jm(),{state:N,setTouched:I,setDirty:L,validityData:j,setFilled:P,setFocused:B,validationMode:U,disabled:q,name:K,validation:V}=qc(),{labelId:H}=fd(),W=q||T,Y=K??p,te=x.useRef(null),M=Ys(te,d,V.inputRef),z=x.useRef(null),G=Gr(),F=Wf({id:u}),ee=h?void 0:F,[ae,re]=Ws({controlled:r,default:!!a,name:"Switch",state:"checked"});Pm(z,G,ae,void 0,!W,p),lt(()=>{P(ae)},[ae,P]),Xf(ae,()=>{O(Y),L(ae!==j.initialValue),V.change(ae)});const{getButtonProps:ye,buttonRef:ge}=is({disabled:W,native:h}),Te=wS(o,H,te,!h,ee),$e={id:h?F:G,role:"switch","aria-checked":ae,"aria-readonly":b||void 0,"aria-required":v||void 0,"aria-labelledby":Te,onFocus(){W||B(!0)},onBlur(){const be=te.current;!be||W||(I(!0),B(!1),U==="onBlur"&&V.commit(be.checked))},onClick(be){if(b||W)return;be.preventDefault();const Le=te.current;Le&&Hu(Le,be)}},He={...V.getValidationProps(W),checked:ae,disabled:W,form:c,id:ee,name:Y,required:v,style:Y?G1:Kf,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:M,onChange(be){if(be.nativeEvent.defaultPrevented)return;if(b){be.preventDefault();return}const Le=be.currentTarget.checked,Me=jt(es,be.nativeEvent);y==null||y(Le,Me),!Me.isCanceled&&re(Le)},onClick(be){be.stopPropagation()},onFocus(){var be;(be=z.current)==null||be.focus()},...k!==void 0?{value:k}:tr},Ne=x.useMemo(()=>({...N,checked:ae,disabled:W,readOnly:b,required:v}),[N,ae,W,b,v]),Ie=It("span",t,{state:Ne,ref:[n,z,ge],props:[$e,R,ye,be=>V.getValidationProps(W,be)],stateAttributesMapping:X5});return m.jsxs(W5.Provider,{value:Ne,children:[Ie,!ae&&Y&&w!==void 0&&m.jsx("input",{type:"hidden",form:c,name:Y,value:w,disabled:W}),m.jsx("input",{...He,suppressHydrationWarning:!0})]})}),Tne=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,c=yne();return It("span",t,{state:c,ref:n,stateAttributesMapping:X5,props:o})});function wne({className:e,size:t="default",...n}){return m.jsx(Ene,{"data-slot":"switch","data-size":t,className:De("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...n,children:m.jsx(Tne,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform 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)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}function Sne({className:e,...t}){return m.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:m.jsx("table",{"data-slot":"table",className:De("w-full caption-bottom text-sm",e),...t})})}function Ane({className:e,...t}){return m.jsx("thead",{"data-slot":"table-header",className:De("[&_tr]:border-b",e),...t})}function _ne({className:e,...t}){return m.jsx("tbody",{"data-slot":"table-body",className:De("[&_tr:last-child]:border-0",e),...t})}function Cne({className:e,...t}){return m.jsx("tfoot",{"data-slot":"table-footer",className:De("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})}function kne({className:e,...t}){return m.jsx("tr",{"data-slot":"table-row",className:De("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...t})}function Nne({className:e,...t}){return m.jsx("th",{"data-slot":"table-head",className:De("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",e),...t})}function Rne({className:e,...t}){return m.jsx("td",{"data-slot":"table-cell",className:De("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",e),...t})}function One({className:e,...t}){return m.jsx("caption",{"data-slot":"table-caption",className:De("mt-4 text-sm text-muted-foreground",e),...t})}const Q5=x.createContext(void 0);function yA(){const e=x.useContext(Q5);if(e===void 0)throw new Error(Cn(64));return e}const Ine="data-activation-direction",Ly={tabActivationDirection:e=>({[Ine]:e})},Mne=x.forwardRef(function(t,n){const{className:r,defaultValue:i=0,onValueChange:a,orientation:o="horizontal",render:c,value:u,style:d,...p}=t,h=t.defaultValue!==void 0,y=x.useRef([]),[b,v]=x.useState(()=>new Map),[T,A]=Ws({controlled:u,default:i,name:"Tabs",state:"value"}),w=u!==void 0,[k,C]=x.useState(()=>new Map),R=x.useRef(void 0),O=x.useCallback(ge=>V2(k,ge),[k]),[N,I]=x.useState(()=>({previousValue:T,tabActivationDirection:"none"})),{previousValue:L,tabActivationDirection:j}=N;let P=j,B=!1;L!==T&&(P=M3(L,T,o,k),B=L!=null&&T!=null&&O(T)==null);const U=B?L:T,q=L!==U||j!==P;lt(()=>{q&&I({previousValue:U,tabActivationDirection:P})},[U,q,P]);const K=mt((ge,Te)=>{const $e=M3(T,ge,o,k);Te.activationDirection=$e,a==null||a(ge,Te),!Te.isCanceled&&A(ge)}),V=mt((ge,Te)=>{a==null||a(ge,jt(Te,void 0,void 0,{activationDirection:"none"}))}),H=mt((ge,Te)=>(v($e=>{const He=new Map($e);return He.set(ge,Te),He}),()=>{v($e=>{if($e.get(ge)!==Te)return $e;const He=new Map($e);return He.delete(ge),He})})),W=x.useCallback(ge=>b.get(ge),[b]),Y=x.useCallback(ge=>{for(const Te of k.values())if(ge===Te.value)return Te.id},[k]),te=x.useMemo(()=>({getTabElementBySelectedValue:O,getTabIdByPanelValue:Y,getTabPanelIdByValue:W,onValueChange:K,orientation:o,registerMountedTabPanel:H,setTabMap:C,tabActivationDirection:P,value:T}),[O,Y,W,K,o,H,C,P,T]),M=x.useMemo(()=>{for(const ge of k.values())if(ge.value===T)return ge},[k,T]),z=x.useMemo(()=>{for(const ge of k.values())if(!ge.disabled)return ge.value},[k]),G=x.useRef(!h),F=x.useRef(i),ee=x.useRef(h),ae=x.useRef(!1);lt(()=>{var Ne;if(w)return;function ge(Ie,be){A(Ie),I({previousValue:Ie,tabActivationDirection:"none"}),V(Ie,be),G.current=!1}if(k.size===0){ae.current&&T!==null&&!((Ne=R.current)!=null&&Ne.isConnected)&&ge(null,PI);return}ae.current=!0,R.current=k.keys().next().value;const Te=M==null?void 0:M.disabled,$e=M==null&&T!==null;if(!Te&&T===F.current&&(ee.current=!1),ee.current&&Te&&T===F.current)return;const He=G.current;if(Te||$e){const Ie=z??null;if(T===Ie){G.current=!1;return}let be=PI;He?be=jI:Te&&(be=b4),ge(Ie,be);return}He&&M!=null&&(V(T,jI),G.current=!1)},[z,w,V,M,A,k,T]);const ye=It("div",t,{state:{orientation:o,tabActivationDirection:P},ref:n,props:p,stateAttributesMapping:Ly});return m.jsx(Q5.Provider,{value:te,children:m.jsx(Ry,{elementsRef:y,children:ye})})});function V2(e,t){for(const[n,r]of e.entries())if(t===r.value)return n;return null}function M3(e,t,n,r){if(e==null||t==null)return"none";const[i,a,o]=n==="horizontal"?["left","left","right"]:["top","up","down"],c=V2(r,e),u=V2(r,t);if(c==null||u==null)return c!==u&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?t>e?o:a:"none";const d=c.getBoundingClientRect()[i],p=u.getBoundingClientRect()[i];return p<d?a:p>d?o:"none"}const Z5=x.createContext(void 0);function Dne(){const e=x.useContext(Z5);if(e===void 0)throw new Error(Cn(65));return e}const Lne=x.forwardRef(function(t,n){const{className:r,disabled:i=!1,render:a,value:o,id:c,nativeButton:u=!0,style:d,...p}=t,{value:h,getTabPanelIdByValue:y,onValueChange:b,orientation:v,tabActivationDirection:T}=yA(),{activateOnFocus:A,registerTabResizeObserverElement:w,tabsListElement:k}=Dne(),{highlightedIndex:C,onHighlightedIndexChange:R}=V1(),O=Gr(c),N=x.useMemo(()=>({disabled:i,id:O,value:o}),[i,O,o]),{compositeProps:I,compositeRef:L,index:j}=f5({metadata:N}),P=o===h,B=x.useRef(!1),U=x.useRef(null),q=mt(ae=>{var re;(re=U.current)==null||re.call(U),U.current=ae?w(ae):null});lt(()=>{if(B.current){B.current=!1;return}if(!(P&&j>-1&&C!==j))return;const ae=k;if(ae!=null){const re=ta(yn(ae));if(re&&Lt(ae,re))return}i||R(j)},[P,j,C,R,i,k]);const{getButtonProps:K,buttonRef:V}=is({disabled:i,native:u,focusableWhenDisabled:!0}),H=y(o),W=x.useRef(!1),Y=x.useRef(!1);function te(ae){b(o,jt(es,ae.nativeEvent,void 0,{activationDirection:"none"}))}function M(ae){P||i||te(ae)}function z(ae){P||i||A&&(!W.current||Y.current)&&te(ae)}function G(ae){if(P||i)return;W.current=!0,Y.current=ae.button===0;const re=yn(ae.currentTarget);function ye(){W.current=!1,Y.current=!1,re.removeEventListener("pointerup",ye),re.removeEventListener("pointercancel",ye)}re.addEventListener("pointerup",ye),re.addEventListener("pointercancel",ye)}return It("button",t,{state:{disabled:i,active:P,orientation:v,tabActivationDirection:T},ref:[n,V,L,q],props:[I,{role:"tab","aria-controls":H,"aria-selected":P,id:O,onClick:M,onFocus:z,onPointerDown:G,[My]:P?"":void 0,onKeyDownCapture(){B.current=!0}},p,K],stateAttributesMapping:Ly})}),Pne="data-index",jne={...Ly,...Ol},$ne=x.forwardRef(function(t,n){const{className:r,value:i,render:a,keepMounted:o=!1,style:c,...u}=t,{value:d,getTabIdByPanelValue:p,orientation:h,tabActivationDirection:y,registerMountedTabPanel:b}=yA(),v=Gr(),{ref:T,index:A}=pd(),w=i===d,{mounted:k,transitionStatus:C,setMounted:R}=Rl(w),O=!k,N=p(i),I={hidden:O,orientation:h,tabActivationDirection:y,transitionStatus:C},L=x.useRef(null),j=It("div",t,{state:I,ref:[n,T,L],props:[{"aria-labelledby":N,hidden:O,id:v,role:"tabpanel",tabIndex:w?0:-1,inert:Xm(!w),[Pne]:A},u],stateAttributesMapping:jne});return $a({open:w,ref:L,onComplete(){w||R(!1)}}),lt(()=>{if(!(v==null||O&&!o))return b(i,v)},[O,o,i,v,b]),o||k?j:null}),Bne=x.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:i,loopFocus:a=!0,render:o,style:c,...u}=t,{orientation:d,setTabMap:p,tabActivationDirection:h}=yA(),[y,b]=x.useState(0),[v,T]=x.useState(null),A=x.useRef(new Set),w=x.useRef(new Set),k=x.useRef(null);lt(()=>{if(typeof ResizeObserver>"u")return;const L=new ResizeObserver(()=>{A.current.forEach(j=>{j()})});return k.current=L,v&&L.observe(v),w.current.forEach(j=>{L.observe(j)}),()=>{L.disconnect(),k.current=null}},[v]);const C=mt(L=>(A.current.add(L),()=>{A.current.delete(L)})),R=mt(L=>{var j;return w.current.add(L),(j=k.current)==null||j.observe(L),()=>{var P;w.current.delete(L),(P=k.current)==null||P.unobserve(L)}}),O={orientation:d,tabActivationDirection:h},N={"aria-orientation":d==="vertical"?"vertical":void 0,role:"tablist"},I=x.useMemo(()=>({activateOnFocus:r,registerIndicatorUpdateListener:C,registerTabResizeObserverElement:R,tabsListElement:v}),[r,C,R,v]);return m.jsx(Z5.Provider,{value:I,children:m.jsx(hA,{render:o,className:i,style:c,state:O,refs:[n,T],props:[N,u],stateAttributesMapping:Ly,highlightedIndex:y,enableHomeAndEndKeys:!0,loopFocus:a,orientation:d,onHighlightedIndexChange:b,onMapChange:p,disabledIndices:ks})})});function Fne({className:e,orientation:t="horizontal",...n}){return m.jsx(Mne,{"data-slot":"tabs","data-orientation":t,className:De("group/tabs flex gap-2 data-horizontal:flex-col",e),...n})}const J5=kl("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function zne({className:e,variant:t="default",...n}){return m.jsx(Bne,{"data-slot":"tabs-list","data-variant":t,className:De(J5({variant:t}),e),...n})}function Une({className:e,...t}){return m.jsx(Lne,{"data-slot":"tabs-trigger",className:De("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium 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 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","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",e),...t})}function Hne({className:e,...t}){return m.jsx($ne,{"data-slot":"tabs-content",className:De("flex-1 text-sm outline-none",e),...t})}function qne({className:e,...t}){return m.jsx("textarea",{"data-slot":"textarea",className:De("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-background px-2.5 py-2 shadow-xs text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...t})}const ej=x.createContext(void 0);function Vne(){return x.useContext(ej)}const xA=x.forwardRef(function(t,n){const{className:r,defaultPressed:i=!1,disabled:a=!1,form:o,onPressedChange:c,pressed:u,render:d,type:p,value:h,nativeButton:y=!0,style:b,...v}=t,T=Gr(h||void 0),A=Vne(),w=(A==null?void 0:A.value)??[],k=(a||(A==null?void 0:A.disabled))??!1,[C,R]=Ws({controlled:A?T!==void 0&&w.indexOf(T)>-1:u,default:i,name:"Toggle",state:"pressed"}),{getButtonProps:O,buttonRef:N}=is({disabled:k,native:y}),I={disabled:k,pressed:C},L=[N,n],j=[{"aria-pressed":C,onClick(U){var V;const q=!C,K=jt(es,U.nativeEvent);c==null||c(q,K),!K.isCanceled&&(T&&((V=A==null?void 0:A.setGroupValue)==null||V.call(A,T,q,K)),!K.isCanceled&&R(q))}},v,O],P=It("button",t,{enabled:!A,state:I,ref:L,props:j}),B=x.useMemo(()=>({disabled:k,focusableWhenDisabled:!1}),[k]);return A?m.jsx(uA,{tag:"button",render:d,className:r,style:b,metadata:B,state:I,refs:L,props:j}):P}),vA=kl("group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-muted"},size:{default:"h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",sm:"h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"}},defaultVariants:{variant:"default",size:"default"}});function tg({className:e,variant:t="default",size:n="default",...r}){return m.jsx(xA,{"data-slot":"toggle",className:De(vA({variant:t,size:n,className:e})),...r})}const Gne=x.createContext(void 0);function Kne(){return x.useContext(Gne)}const Yne=x.forwardRef(function(t,n){const{defaultValue:r,disabled:i=!1,loopFocus:a=!0,onValueChange:o,orientation:c="horizontal",multiple:u=!1,value:d,className:p,render:h,style:y,...b}=t,v=Cy(),T=Kne(),A=r??ks,w=d!==void 0||r!==void 0,k=((v==null?void 0:v.disabled)??!1)||((T==null?void 0:T.disabled)??!1)||i,[C,R]=Ws({controlled:d,default:A,name:"ToggleGroup",state:"value"}),O=mt((P,B,U)=>{let q;u?(q=C.slice(),B?q.push(P):q.splice(C.indexOf(P),1)):q=B?[P]:[],o==null||o(q,U),!U.isCanceled&&R(q)}),N={disabled:k,multiple:u,orientation:c},I=x.useMemo(()=>({disabled:k,setGroupValue:O,value:C,isValueInitialized:w}),[k,O,C,w]),L={role:"group"},j=It("div",t,{enabled:!!v,state:N,ref:n,props:[L,b]});return m.jsx(ej.Provider,{value:I,children:v?j:m.jsx(hA,{render:h,className:p,style:y,state:N,refs:[n],props:[L,b],loopFocus:a,enableHomeAndEndKeys:!0,orientation:c})})}),tj=x.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});function EA({className:e,variant:t,size:n,spacing:r=2,orientation:i="horizontal",children:a,...o}){return m.jsx(Yne,{"data-slot":"toggle-group","data-variant":t,"data-size":n,"data-spacing":r,"data-orientation":i,style:{"--gap":r},className:De("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch",e),...o,children:m.jsx(tj.Provider,{value:{variant:t,size:n,spacing:r,orientation:i},children:a})})}function Jb({className:e,children:t,variant:n="default",size:r="default",...i}){const a=x.useContext(tj);return m.jsx(xA,{"data-slot":"toggle-group-item","data-variant":a.variant||n,"data-size":a.size||r,"data-spacing":a.spacing,className:De("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",vA({variant:a.variant||n,size:a.size||r}),e),...i,children:t})}const nj=x.createContext(void 0);function ng(e){const t=x.useContext(nj);if(t===void 0&&!e)throw new Error(Cn(72));return t}const Wne={...gy,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class Xne extends Qf{constructor(n,r,i){const a=new Ym;super(Qne(n,a,r,i),Zne(a),Wne);pt(this,"setOpen",(n,r)=>{xZ(this,n,r,{extraState:{openChangeReason:r.reason}})})}cancelPendingOpen(n){this.state.floatingRootContext.dispatchOpenChange(!1,jt(wl,n))}}function Qne(e,t,n,r=!1){return{...my(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function Zne(e){return{popupRef:x.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const Jne=Gm(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:i,disableHoverablePopup:a=!1,trackCursorAxis:o="none",actionsRef:c,onOpenChange:u,onOpenChangeComplete:d,handle:p,triggerId:h,defaultTriggerId:y=null,children:b}=t,v=GS((B,U)=>new Xne({open:r,openProp:i,activeTriggerId:y,triggerIdProp:h},B,U));v.useControlledProp("openProp",i),v.useControlledProp("triggerIdProp",h),v.useContextCallback("onOpenChange",u),v.useContextCallback("onOpenChangeComplete",d);const T=v.useState("open"),A=!n&&T,w=v.useState("activeTriggerId"),k=v.useState("mounted"),C=v.useState("payload");v.useSyncedValues({trackCursorAxis:o,disableHoverablePopup:a,disabled:n}),fy(v,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:R,transitionStatus:O}=py(A,v),N=v.useState("isInstantPhase"),I=v.useState("instantType"),L=v.useState("lastOpenChangeReason"),j=x.useRef(null);lt(()=>{T&&n&&v.setOpen(!1,jt(b4))},[T,n,v]),lt(()=>{O==="ending"&&L===es||O!=="ending"&&N?(I!=="delay"&&(j.current=I),v.set("instantType","delay")):j.current!==null&&(v.set("instantType",j.current),j.current=null)},[O,N,L,I,v]),lt(()=>{A&&w==null&&v.set("payload",void 0)},[v,w,A]),x.useImperativeHandle(c,()=>({unmount:R,close:()=>v.setOpen(!1,jt(Y1))}),[R,v]);const P=A||k||!n&&o!=="none";return m.jsxs(nj.Provider,{value:v,children:[p&&m.jsx(cy,{handle:p,store:v}),P&&m.jsx(ere,{store:v,disabled:n,trackCursorAxis:o}),typeof b=="function"?b({payload:C}):b]})});function ere({store:e,disabled:t,trackCursorAxis:n}){const r=e.useState("floatingRootContext"),i=Vm(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),a=yQ(r,{enabled:!t&&n!=="none",axis:n==="none"?void 0:n}),o=x.useMemo(()=>La(a.reference,i.reference),[a.reference,i.reference]);return hy(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??tr}),null}const rj=x.createContext(void 0);function tre(){return x.useContext(rj)}const nre=600,ij="data-base-ui-tooltip-trigger";function D3(e){if("composedPath"in e){const n=e.composedPath();for(let r=0;r<n.length;r+=1){const i=n[r];if(xn(i))return i}}const t=e.target;return xn(t)?t:null}function rre(e){let t=e;for(;t;){const n=t.closest(`[${ij}]`);if(n)return n;const r=t.getRootNode();t="host"in r&&xn(r.host)?r.host:null}return null}const ire=ly(function(t,n){const{render:r,className:i,style:a,handle:o,payload:c,disabled:u,delay:d,closeOnClick:p=!0,closeDelay:h,id:y,...b}=t,v=ng(!0),A=by(o)??v;if(!A)throw new Error(Cn(82));const w=Gr(y),k=A.useState("isTriggerActive",w),C=A.useState("isOpenedByTrigger",w),R=A.useState("floatingRootContext"),O=x.useRef(null),N=h??0,{registerTrigger:I,isMountedByThisTrigger:L}=dy(w,O,A,{payload:c,closeOnClick:p,closeDelay:N}),j=tre(),{activeIdRef:P,delayRef:B,isInstantPhase:U,hasProvider:q}=qX(R,{open:C}),K=XS(R);A.useSyncedValue("isInstantPhase",U);const V=A.useState("disabled"),H=u??V,W=ai(H),Y=A.useState("trackCursorAxis"),te=A.useState("disableHoverablePopup"),M=x.useRef(!1),z=xi(),G=x.useRef(void 0);function F(){return q&&P.current!=null?0:d??j??nre}function ee(Ie){const be=O.current;if(!be||!Ie)return!1;const Le=rre(Ie);return Le!==null&&Le!==be&&Lt(be,Le)}function ae(Ie){const be=ee(Ie);return M.current=be,be&&(K.openChangeTimeout.clear(),K.restTimeout.clear(),K.restTimeoutPending=!1,z.clear()),be}const re=yy(R,{enabled:!H,mouseOnly:!0,move:!1,handleClose:!te&&Y!=="both"?vy():null,restMs:F,delay(){return h==null&&q?{close:nd(B.current,"close")}:{close:N}},triggerElementRef:O,isActiveTrigger:k,isClosing:()=>A.select("transitionStatus")==="ending",shouldOpen(){return!M.current}}),ye=$P(R,{enabled:!H}).reference,ge=Ie=>{const be=M.current,Le=D3(Ie),Me=ae(Le),Oe=O.current,Ge=Oe&&Le&&Lt(Oe,Le);if(Me&&A.select("open")&&A.select("lastOpenChangeReason")===ei){A.setOpen(!1,jt(ei,Ie));return}if(be&&!Me&&Ge&&!W.current&&!A.select("open")&&Oe&&Ac(G.current)){const fe=()=>{!M.current&&!W.current&&!A.select("open")&&A.setOpen(!0,jt(ei,Ie,Oe))},Q=F();Q===0?(z.clear(),fe()):z.start(Q,fe)}},Te=A.useState("triggerProps",L);return It("button",t,{state:{open:C},ref:[n,I,O],props:[re,ye,L||Y!=="none"?Te:void 0,{onMouseOver(Ie){ge(Ie.nativeEvent)},onFocus(Ie){ee(D3(Ie.nativeEvent))&&Ie.preventBaseUIHandler()},onMouseLeave(){M.current=!1,z.clear(),G.current=void 0},onPointerEnter(Ie){G.current=Ie.pointerType},onPointerDown(Ie){G.current=Ie.pointerType,A.set("closeOnClick",p),p&&!A.select("open")&&A.cancelPendingOpen(Ie.nativeEvent)},onClick(Ie){p&&!A.select("open")&&A.cancelPendingOpen(Ie.nativeEvent)},id:w,[k2]:H?"":void 0,[ij]:H?void 0:""},b],stateAttributesMapping:Fm})}),aj=x.createContext(void 0);function are(){const e=x.useContext(aj);if(e===void 0)throw new Error(Cn(70));return e}const sre=x.forwardRef(function(t,n){const{children:r,container:i,className:a,render:o,style:c,...u}=t,{node:d,subtree:p}=bP({container:i,ref:n,componentProps:t,elementProps:u});return!p&&!d?null:m.jsxs(x.Fragment,{children:[p,d&&fi.createPortal(r,d)]})}),ore=x.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t;return ng().useState("mounted")||r?m.jsx(aj.Provider,{value:r,children:m.jsx(sre,{ref:n,...i})}):null}),sj=x.createContext(void 0);function oj(){const e=x.useContext(sj);if(e===void 0)throw new Error(Cn(71));return e}const lre=x.forwardRef(function(t,n){const{render:r,className:i,anchor:a,positionMethod:o="absolute",side:c="top",align:u="center",sideOffset:d=0,alignOffset:p=0,collisionBoundary:h="clipping-ancestors",collisionPadding:y=5,arrowPadding:b=5,sticky:v=!1,disableAnchorTracking:T=!1,collisionAvoidance:A=BS,style:w,...k}=t,C=ng(),R=are(),O=C.useState("open"),N=C.useState("mounted"),I=C.useState("trackCursorAxis"),L=C.useState("disableHoverablePopup"),j=C.useState("floatingRootContext"),P=C.useState("instantType"),B=C.useState("transitionStatus"),U=C.useState("adaptiveOrigin"),q=Ny({anchor:a,positionMethod:o,floatingRootContext:j,mounted:N,side:c,sideOffset:d,align:u,alignOffset:p,collisionBoundary:h,collisionPadding:y,sticky:v,arrowPadding:b,disableAnchorTracking:T,keepMounted:R,collisionAvoidance:A,adaptiveOrigin:U}),K=x.useMemo(()=>({open:O,side:q.side,align:q.align,anchorHidden:q.anchorHidden,instant:I!=="none"?"tracking-cursor":P}),[O,q.side,q.align,q.anchorHidden,I,P]),V=Oy(t,K,{styles:q.positionerStyles,transitionStatus:B,props:k,refs:[n,C.useStateSetter("positionerElement")],hidden:!N,inert:!O||I==="both"||L});return m.jsx(sj.Provider,{value:q,children:V})}),cre=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,c=ng(),{side:u,align:d}=oj(),p=c.useState("open"),h=c.useState("instantType"),y=c.useState("transitionStatus"),b=c.useState("popupProps"),v=c.useState("floatingRootContext"),T=c.useState("disabled"),A=c.useState("closeDelay");$a({open:p,ref:c.context.popupRef,onComplete(){var R,O;p&&((O=(R=c.context).onOpenChangeComplete)==null||O.call(R,!0))}}),QS(v,{enabled:!T,closeDelay:A});const w=c.useStateSetter("popupElement");return It("div",t,{state:{open:p,side:u,align:d,instant:h,transitionStatus:y},ref:[n,c.context.popupRef,w],props:[Km,b,Jm(y),o],stateAttributesMapping:Um})}),ure=x.forwardRef(function(t,n){const{render:r,className:i,style:a,...o}=t,c=ng(),{arrowRef:u,side:d,align:p,arrowUncentered:h,arrowStyles:y}=oj(),b=c.useState("open"),v=c.useState("instantType");return It("div",t,{state:{open:b,side:d,align:p,uncentered:h,instant:v},ref:[n,u],props:[{style:y,"aria-hidden":!0},o],stateAttributesMapping:zm})}),dre=function(t){const{delay:n,closeDelay:r,timeout:i=400}=t,a=x.useMemo(()=>({open:n,close:r}),[n,r]);return m.jsx(rj.Provider,{value:n,children:m.jsx(HX,{delay:a,timeoutMs:i,children:t.children})})};function TA({delay:e=0,...t}){return m.jsx(dre,{"data-slot":"tooltip-provider",delay:e,...t})}function e1({...e}){return m.jsx(Jne,{"data-slot":"tooltip",...e})}function t1({...e}){return m.jsx(ire,{"data-slot":"tooltip-trigger",...e})}function n1({className:e,side:t="top",sideOffset:n=4,align:r="center",alignOffset:i=0,children:a,...o}){return m.jsx(ore,{children:m.jsx(lre,{align:r,alignOffset:i,side:t,sideOffset:n,className:"isolate z-[110]",children:m.jsxs(cre,{"data-slot":"tooltip-content",className:De("z-[110] inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-[110] **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...o,children:[a,m.jsx(ure,{className:"z-[110] size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}const lj="[--tone:var(--muted-foreground)] [--tone-soft:var(--secondary)] data-[tone=accent]:[--tone:var(--primary)] data-[tone=accent]:[--tone-soft:var(--accent)] data-[tone=success]:[--tone:var(--success)] data-[tone=success]:[--tone-soft:var(--success-soft)] data-[tone=purple]:[--tone:var(--primary)] data-[tone=purple]:[--tone-soft:var(--accent)]",Sb="focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-ring/60",fre=De(lj,Sb,"group/item flex w-full min-w-0 items-center gap-2.5 rounded-lg border border-transparent px-2.5 py-3 text-left","not-disabled:hover:bg-foreground/7 disabled:cursor-default disabled:opacity-55","aria-pressed:border-border-strong aria-pressed:bg-(--tone-soft)"),L3="min-h-0 min-w-0 flex-auto overflow-auto overscroll-contain [scrollbar-gutter:stable]",pre=900;function hre({label:e,items:t,selectedId:n,onSelect:r,disabled:i=!1,toolbar:a,detailHeader:o,children:c,detailFooter:u,emptyState:d,detailLabel:p="Details",className:h}){const y=x.useId(),b=x.useRef(null),v=x.useRef(null),T=x.useRef(null),A=x.useRef(new Map),w=x.useRef(null),[k,C]=x.useState(),[R,O]=x.useState(!1),N=new Map,I=new Set;for(const U of t){if(!U.id.trim()||I.has(U.id))throw new Error("ListDetail entries require unique, non-empty IDs.");I.add(U.id);const q=U.group??"",K=N.get(q)??[];K.push(U),N.set(q,K)}const L=t.find(U=>U.id===n),j=L!==void 0&&k===L.id;x.useEffect(()=>{const U=b.current;if(!U)throw new Error("ListDetail requires its root element for the width measurement.");const q=new ResizeObserver(([K])=>{const V=K.contentRect.width<pre;O(V),V||C(void 0)});return q.observe(U),()=>q.disconnect()},[]),x.useLayoutEffect(()=>{const U=w.current;if(!U||(w.current=null,U.target==="detail"&&(!j||(L==null?void 0:L.id)!==U.id)))return;const q=U.target==="detail"?v.current:A.current.get(U.id)??T.current;q==null||q.focus({preventScroll:!0}),q==null||q.scrollIntoView({block:"nearest",inline:"nearest"})},[k,L==null?void 0:L.id,j]);const P=U=>{R&&(w.current={target:"detail",id:U},C(U)),r(U)},B=()=>{L&&(w.current={target:"list",id:L.id},C(void 0))};return m.jsxs("section",{"aria-label":e,className:De("group/list-detail @container/list-detail flex min-h-0 min-w-0 flex-auto flex-col",h),"data-detail":j,ref:b,children:[a!==void 0&&m.jsx("div",{className:"flex flex-none flex-wrap items-center gap-2.5 pb-4.5 @max-[900px]/list-detail:group-data-[detail=true]/list-detail:hidden",children:a}),m.jsxs("div",{className:"grid min-h-0 min-w-0 flex-auto grid-cols-[minmax(0,0.9fr)_minmax(0,1.1fr)] grid-rows-[minmax(0,1fr)] gap-6 @max-[900px]/list-detail:grid-cols-[minmax(0,1fr)] @max-[900px]/list-detail:gap-0",children:[m.jsx("div",{"aria-label":e,className:De(L3,Sb,"pt-0.5 pr-1.5 pb-3 @max-[900px]/list-detail:group-data-[detail=true]/list-detail:hidden"),ref:T,role:"region",tabIndex:-1,children:t.length===0?m.jsx("div",{className:"p-6 text-[0.8rem] leading-relaxed text-muted-foreground",children:d??m.jsx("p",{children:"No entries available."})}):[...N].map(([U,q],K)=>m.jsxs("section",{"aria-labelledby":U?`${y}-group-${K}`:void 0,className:"not-first:mt-4.5",children:[U&&m.jsxs("h3",{className:"mx-2 mb-2 flex items-center gap-2.5 text-[0.67rem] font-bold tracking-[0.04em] text-muted-foreground",id:`${y}-group-${K}`,children:[U,m.jsx("span",{className:"font-mono text-[0.63rem] opacity-80","aria-label":`${q.length} entries`,children:q.length})]}),m.jsx("ul",{className:"grid grid-cols-[minmax(0,1fr)] gap-1 *:min-w-0",children:q.map(V=>m.jsx("li",{children:m.jsxs("button",{"aria-controls":`${y}-detail`,"aria-pressed":V.id===n,className:fre,"data-tone":V.tone??"neutral",disabled:i,onClick:()=>P(V.id),ref:H=>{H?A.current.set(V.id,H):A.current.delete(V.id)},type:"button",children:[V.icon!==void 0&&m.jsx("span",{className:"flex h-9 w-8 flex-none items-center justify-center rounded-sm border border-border-soft bg-(--tone-soft) text-(--tone) data-[tone=accent]:border-l-[3px] data-[tone=accent]:[border-left-color:var(--tone)] data-[tone=purple]:rounded-[10px_10px_10px_3px]","aria-hidden":"true","data-tone":V.tone??"neutral",children:V.icon}),m.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[m.jsx("span",{className:"text-[0.77rem] font-semibold leading-snug [overflow-wrap:anywhere] group-aria-pressed/item:font-bold group-aria-pressed/item:text-(--tone)",children:V.title}),V.description&&m.jsx("span",{className:"overflow-hidden text-[0.67rem] leading-[1.45] text-ellipsis whitespace-nowrap text-muted-foreground",children:V.description})]}),V.meta!==void 0&&m.jsx("span",{className:"max-w-[30%] flex-none text-[0.62rem] leading-snug text-muted-foreground [overflow-wrap:anywhere] @max-[900px]/list-detail:max-w-[24%] @max-[900px]/list-detail:text-[0.6rem]",children:V.meta}),m.jsx(X1,{className:"flex-none -rotate-90 text-muted-foreground",size:14})]})},V.id))})]},U))}),m.jsx("section",{"aria-label":p,className:De(lj,Sb,"flex max-h-full min-h-0 min-w-0 flex-col self-stretch overflow-hidden rounded-panel border border-border bg-card","@max-[900px]/list-detail:hidden @max-[900px]/list-detail:group-data-[detail=true]/list-detail:flex"),"data-tone":(L==null?void 0:L.tone)??"neutral",id:`${y}-detail`,ref:v,tabIndex:-1,children:L?m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"hidden flex-none border-b border-border-soft px-3.5 py-2.5 @max-[900px]/list-detail:flex",children:m.jsx(Er,{"aria-label":"Back to selection",className:"rounded-full",onClick:B,size:"icon",variant:"outline",children:m.jsx(AS,{})})}),o!==void 0&&m.jsx("header",{className:"flex-none border-b border-border-soft bg-(--tone-soft) px-6 py-6 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 @max-[900px]/list-detail:p-4.5",children:o}),m.jsx("div",{"aria-label":`${p}: content`,className:De(L3,Sb,"flex-1 px-6 py-6 text-[0.8rem] leading-[1.7] [overflow-wrap:anywhere] [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 @max-[900px]/list-detail:p-4.5"),role:"region",tabIndex:0,children:c}),u!==void 0&&m.jsx("footer",{className:"flex flex-none flex-wrap items-center gap-2.5 border-t border-border-soft px-6 py-4 @max-[900px]/list-detail:px-4.5 @max-[900px]/list-detail:py-3.5",children:u})]}):m.jsx("div",{className:"p-6 text-[0.8rem] leading-relaxed text-muted-foreground",children:m.jsx("p",{children:t.length?"Choose an entry to see the details.":"No selection available."})})})]})]})}const sm=6e4,om=60*sm,lm=24*om,cj=7*lm,uj=(e,t)=>new Date(e).toLocaleDateString(void 0,t?{day:"2-digit",month:"2-digit",year:"numeric"}:{day:"2-digit",month:"2-digit"}),mre=(e,t=Date.now())=>{const n=t-e;return n<sm?"now":n<om?`${Math.floor(n/sm)} min`:n<lm?`${Math.floor(n/om)} h`:n<cj?`${Math.floor(n/lm)} d`:uj(e,!1)},gre=(e,t=Date.now())=>{const n=t-e;if(n<sm)return"just now";if(n<om){const r=Math.floor(n/sm);return r===1?"1 minute ago":`${r} minutes ago`}if(n<lm){const r=Math.floor(n/om);return r===1?"1 hour ago":`${r} hours ago`}if(n<cj){const r=Math.floor(n/lm);return r===1?"1 day ago":`${r} days ago`}return uj(e,!0)};function bre({className:e,...t}){return m.jsx("div",{className:De("flex items-center justify-between text-[0.62rem] font-bold uppercase tracking-[0.07em] text-muted-foreground",e),...t})}function yre({children:e,className:t,state:n}){return m.jsxs("div",{"aria-live":"polite",className:De("w-[min(360px,100%)] text-center text-foreground",t),"data-startup":n.kind,role:n.kind==="error"?"alert":"status",children:[m.jsx("strong",{className:n.kind==="error"?"text-lg font-semibold text-destructive":"text-lg font-semibold",children:n.title}),n.kind==="working"&&m.jsx("div",{"aria-label":n.title,className:"mx-auto mt-5 h-[5px] overflow-hidden rounded-[5px] bg-border",role:"progressbar",children:m.jsx("span",{className:"block h-full w-[35%] rounded-[inherit] bg-primary animate-progress-sweep motion-reduce:animate-none motion-reduce:mx-auto"})}),m.jsx("p",{className:"pointer-events-auto mt-3.5 max-h-[30vh] overflow-auto text-[0.82rem] leading-[1.6] text-muted-foreground [overflow-wrap:anywhere]",children:n.detail}),e&&m.jsx("div",{className:"pointer-events-auto mt-4 flex flex-wrap justify-center gap-2",children:e})]})}const P3={running:"running",waiting:"waiting for input",idle:"idle",ended:"ended",failed:"failed",cancelled:"cancelled"},xre={connected:"connected",ready:"ready",starting:"starting","login-required":"sign-in required",unreachable:"unreachable",stopped:"stopped",failed:"failed",forbidden:"no access"},dj=(e,t=0)=>e==="waiting"&&t>0?`${P3.waiting} (${t})`:P3[e],fj=e=>xre[e],pj={running:{Icon:cX,tone:"text-success"},waiting:{Icon:lX,tone:"text-warning"},idle:{Icon:xb,tone:"text-muted-foreground"},ended:{Icon:oX,tone:"text-muted-foreground opacity-70"},failed:{Icon:uX,tone:"text-destructive"},cancelled:{Icon:O4,tone:"text-muted-foreground opacity-70"}},hj={connected:{Icon:xb,tone:"text-success",filled:!0},ready:{Icon:xb,tone:"text-success",filled:!0},starting:{Icon:pX,tone:"text-info"},"login-required":{Icon:BI,tone:"text-warning"},unreachable:{Icon:O4,tone:"text-destructive"},stopped:{Icon:xb,tone:"text-muted-foreground"},failed:{Icon:Q1,tone:"text-destructive"},forbidden:{Icon:BI,tone:"text-destructive"}},vre=e=>pj[e].tone,Ere=e=>hj[e].tone,mj="inline-flex flex-none items-center gap-1";function Tre({state:e,open:t=0,className:n}){const r=pj[e],i=dj(e,t),a=r.Icon;return m.jsxs("span",{className:De(mj,r.tone,n),title:i,children:[m.jsx(a,{className:"size-3.5"}),e==="waiting"&&t>0&&m.jsx("span",{"aria-hidden":!0,className:"font-mono text-[0.62rem] font-semibold leading-none",children:t}),m.jsx("span",{className:"sr-only",children:i})]})}function wre({state:e,className:t}){const n=hj[e],r=fj(e),i=n.Icon;return m.jsxs("span",{className:De(mj,n.tone,t),title:r,children:[m.jsx(i,{className:"size-3.5",...n.filled?{fill:"currentColor"}:{}}),m.jsx("span",{className:"sr-only",children:r})]})}function gj({className:e,...t}){return m.jsx(bX,{"aria-hidden":!0,className:De("text-destructive",e),fill:"currentColor",...t})}const Sre="text-destructive hover:bg-destructive/10 hover:text-destructive dark:hover:bg-destructive/20";function bj({label:e,busy:t=!1,className:n,title:r,...i}){return m.jsx(Er,{"aria-busy":t||void 0,"aria-label":e,className:De(Sre,n),title:r??e,variant:"ghost",...i,children:t?m.jsx(Wc,{}):m.jsx(gj,{})})}const Are={neutral:"text-border-strong",accent:"text-primary",success:"text-success",warning:"text-warning",danger:"text-destructive"},j3="fill-none stroke-current stroke-2 [stroke-linecap:round]";function _re({d:e,arrow:t="end",lineStyle:n="solid",tone:r="neutral",active:i=!1}){const a=`svg-edge${x.useId()}`;return m.jsxs("g",{className:Are[r],"data-active":i,"data-line-style":n,"data-tone":r,children:[t!=="none"&&m.jsx("defs",{children:m.jsx("marker",{id:a,viewBox:"0 0 12 12",markerWidth:"12",markerHeight:"12",markerUnits:"userSpaceOnUse",refX:"9",refY:"6",orient:"auto-start-reverse",children:m.jsx("path",{className:De(j3,"[stroke-linejoin:round]"),d:"M3,2 L9,6 L3,10"})})}),m.jsx("path",{className:De(j3,n==="dashed"&&"[stroke-dasharray:4_6]",i&&"[stroke-dasharray:9_5] animate-edge-flow motion-reduce:animate-none"),d:e,markerEnd:t==="none"?void 0:`url(#${a})`,markerStart:t==="both"?`url(#${a})`:void 0})]})}function Cre({disabled:e,onFiles:t,onPasteText:n}){const r=x.useRef(null),[i,a]=x.useState(!1),o=c=>{c.length&&t(c)};return{inputRef:r,dragging:i,clearDragging:()=>a(!1),inputProps:{ref:r,onChange:c=>{const u=Array.from(c.currentTarget.files??[]);c.currentTarget.value="",o(u)}},dropProps:{onDragOver:c=>{c.dataTransfer.types.includes("Files")&&(c.preventDefault(),c.dataTransfer.dropEffect=e?"none":"copy",a(!e))},onDragLeave:c=>{c.currentTarget.contains(c.relatedTarget)||a(!1)},onDrop:c=>{c.dataTransfer.types.includes("Files")&&(c.preventDefault(),a(!1),o(Array.from(c.dataTransfer.files)))},onPaste:c=>{const u=Array.from(c.clipboardData.files);if(!u.length)return;c.preventDefault(),o(u);const d=c.clipboardData.getData("text/plain");d&&(n==null||n(d))}}}}const kre=Object.freeze(Object.defineProperty({__proto__:null,Alert:Ju,AlertAction:Q6,AlertDescription:ed,AlertTitle:X6,Badge:s4,Button:Er,Card:Gf,CardAction:gW,CardContent:bW,CardDescription:mW,CardFooter:yW,CardHeader:pW,CardTitle:hW,Checkbox:G4,ConnectionStateIcon:wre,Dialog:wy,DialogBody:iA,DialogClose:WP,DialogContent:Sy,DialogDescription:aA,DialogFooter:XP,DialogHeader:rA,DialogOverlay:nA,DialogPortal:tA,DialogTitle:Qm,DialogTrigger:YP,DropdownMenu:nee,DropdownMenuCheckboxItem:dee,DropdownMenuContent:b5,DropdownMenuGroup:aee,DropdownMenuItem:oee,DropdownMenuLabel:see,DropdownMenuPortal:ree,DropdownMenuRadioGroup:fee,DropdownMenuRadioItem:pee,DropdownMenuSeparator:hee,DropdownMenuShortcut:mee,DropdownMenuSub:lee,DropdownMenuSubContent:uee,DropdownMenuSubTrigger:cee,DropdownMenuTrigger:iee,Empty:Vu,EmptyContent:bee,EmptyDescription:Fh,EmptyHeader:$h,EmptyMedia:dA,EmptyTitle:Bh,Field:Tee,FieldContent:wee,FieldDescription:_ee,FieldError:kee,FieldGroup:vee,FieldLabel:See,FieldLegend:xee,FieldSeparator:Cee,FieldSet:yee,FieldTitle:Aee,Input:am,Label:y5,ListDetail:hre,Popover:fA,PopoverContent:pA,PopoverDescription:Jee,PopoverHeader:Qee,PopoverTitle:Zee,PopoverTrigger:Xee,Progress:ute,ProgressIndicator:R5,ProgressLabel:dte,ProgressTrack:N5,ProgressValue:fte,RadioGroup:Ste,RadioGroupItem:Ate,RunStateIcon:Tre,SectionLabel:bre,Select:Dc,SelectContent:jc,SelectGroup:hne,SelectItem:$c,SelectLabel:mne,SelectScrollDownButton:Y5,SelectScrollUpButton:K5,SelectSeparator:gne,SelectTrigger:Pc,SelectValue:Lc,Separator:x5,Skeleton:bne,Spinner:Wc,StartupNotice:yre,StopButton:bj,StopGlyph:gj,SvgEdge:_re,Switch:wne,Table:Sne,TableBody:_ne,TableCaption:One,TableCell:Rne,TableFooter:Cne,TableHead:Nne,TableHeader:Ane,TableRow:kne,Tabs:Fne,TabsContent:Hne,TabsList:zne,TabsTrigger:Une,Textarea:qne,Toggle:tg,ToggleGroup:EA,ToggleGroupItem:Jb,Tooltip:e1,TooltipContent:n1,TooltipProvider:TA,TooltipTrigger:t1,badgeVariants:a4,buttonVariants:u4,cn:De,connectionStateTone:Ere,connectionStateWord:fj,longTime:gre,runStateTone:vre,runStateWord:dj,shortTime:mre,tabsListVariants:J5,toggleVariants:vA,useFileInput:Cre},Symbol.toStringTag,{value:"Module"})),yj="access",G2=(e,t)=>{var n;return!e.enabled&&!e.user||!!((n=e.user)!=null&&n.rights.some(r=>r==="*"||r===t))},wT=(e,t)=>{var n,r;return G2(e,"runs.write")&&(G2(e,"runs.create")||!!((r=(n=e.user)==null?void 0:n.startEntries)!=null&&r.includes(t)))},xj=e=>({...e,can:t=>G2(e,t)}),K2=xj({enabled:!1,user:null});function Y2(e){if(!e||typeof e!="object")throw new Error("Invalid user configuration");const t=e;if(typeof t.enabled!="boolean")throw new Error("Invalid sign-in mode");if(t.user===null)return{enabled:t.enabled,user:null};const n=t.user;if(!n||typeof n.id!="string"||typeof n.label!="string"||!Array.isArray(n.rights)||!n.rights.every(r=>typeof r=="string")||n.startEntries!==void 0&&(!Array.isArray(n.startEntries)||!n.startEntries.every(r=>typeof r=="string"&&r.length>0)))throw new Error("Invalid signed-in user");return{enabled:t.enabled,user:{id:n.id,label:n.label,rights:n.rights,...n.startEntries!==void 0?{startEntries:n.startEntries}:{}}}}const Nre=/^\/(?:api|rpc|files)(?:\/|$)/;function Rre(e,t,n){return async(r,i)=>{const a=await e(r,i),o=new URL(typeof r=="string"||r instanceof URL?r:r.url,t);return a.status===401&&o.origin===t&&!o.pathname.startsWith("/api/access/")&&Nre.test(o.pathname)&&n(),a}}const _n=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),vj=(e,t)=>{const n=Object.keys(e).sort(),r=[...t].sort();return n.length===r.length&&n.every((i,a)=>i===r[a])},Ore=Object.freeze(Object.defineProperty({__proto__:null,hasExactKeys:vj,isRecord:_n},Symbol.toStringTag,{value:"Module"})),r1=async(e,t)=>{try{const n=await e.json();if(_n(n)&&typeof n.error=="string"&&n.error.trim())return new Error(n.error)}catch{}return new Error(t)},Ire=Object.freeze(Object.defineProperty({__proto__:null,errorFrom:r1},Symbol.toStringTag,{value:"Module"})),Mre="flex flex-none items-center gap-2 self-stretch min-h-header max-w-[220px] px-3 py-1.5 border-r border-border text-left text-[0.72rem] leading-tight text-foreground no-underline [&>svg]:flex-none",Dre="cursor-pointer hover:not-disabled:bg-accent aria-expanded:bg-accent aria-pressed:bg-accent aria-expanded:text-primary aria-pressed:text-primary active:not-disabled:bg-accent active:not-disabled:text-primary aria-expanded:shadow-[inset_0_2px_5px_color-mix(in_srgb,var(--foreground)_25%,transparent),inset_0_-2px_0_var(--primary)] aria-pressed:shadow-[inset_0_2px_5px_color-mix(in_srgb,var(--foreground)_25%,transparent),inset_0_-2px_0_var(--primary)] focus-visible:outline-2 focus-visible:outline-ring/60 focus-visible:-outline-offset-3 disabled:opacity-50 disabled:cursor-not-allowed";function Vs({as:e="span",className:t,...n}){const r=e==="button"||e==="a";return x.createElement(e,{className:De(Mre,r&&Dre,t),...n})}function wA({className:e,...t}){return m.jsx("span",{className:De("flex min-w-0 flex-col gap-0.5",e),...t})}function SA({className:e,...t}){return m.jsx("span",{className:De("font-mono text-[0.58rem] font-medium uppercase tracking-[0.05em] text-muted-foreground",e),...t})}function wc({className:e,...t}){return m.jsx("span",{className:De("line-clamp-2 whitespace-normal [overflow-wrap:anywhere]",e),...t})}const Lre=Object.freeze(Object.defineProperty({__proto__:null,ToolbarCopy:wA,ToolbarItem:Vs,ToolbarLabel:SA,ToolbarText:wc},Symbol.toStringTag,{value:"Module"})),Ej="grid min-h-dvh place-items-center p-6",Tj="w-[min(100%,380px)]",wj="gap-0 p-8 shadow-pop max-sm:p-6",$3="mb-5 grid gap-2 text-[0.85rem] font-semibold",AA=x.createContext({...K2,logout:async()=>{}}),sa=()=>x.useContext(AA);function Sj({children:e}){return m.jsx("main",{className:Ej,children:m.jsx(Gf,{className:De(Tj,wj),children:e})})}function Pre({children:e,Login:t=jre}){const[n,r]=x.useState(),[i,a]=x.useState(),[o,c]=x.useState(0);x.useEffect(()=>{const p=new AbortController,h=window.fetch;return window.fetch=Rre(h.bind(window),window.location.origin,()=>{r(y=>y!=null&&y.enabled?{enabled:!0,user:null}:y)}),a(void 0),fetch("/api/access",{cache:"no-store",signal:p.signal}).then(async y=>{if(!y.ok)throw await r1(y,"Could not load the sign-in state.");const b=Y2(await y.json());p.signal.aborted||r(b)}).catch(y=>{p.signal.aborted||a(y instanceof Error?y.message:String(y))}),()=>{p.abort(),window.fetch=h}},[o]),x.useEffect(()=>{if(!(n!=null&&n.enabled))return;const p=()=>{document.visibilityState!=="hidden"&&fetch("/api/access",{cache:"no-store"}).then(async h=>{if(!h.ok)return;const y=Y2(await h.json());r(b=>{var v,T;return((v=b==null?void 0:b.user)==null?void 0:v.id)===((T=y.user)==null?void 0:T.id)?b:y})}).catch(()=>{})};return window.addEventListener("focus",p),document.addEventListener("visibilitychange",p),()=>{window.removeEventListener("focus",p),document.removeEventListener("visibilitychange",p)}},[n==null?void 0:n.enabled]);const u=x.useCallback(async()=>{const p=await fetch("/api/access/logout",{method:"POST"});if(!p.ok)throw await r1(p,"Sign-out failed.");r({enabled:!0,user:null})},[]),d=x.useMemo(()=>({...xj(n??{enabled:!0,user:null}),logout:u}),[n,u]);return n?m.jsx(AA.Provider,{value:d,children:n.enabled&&!n.user?m.jsx(t,{onLogin:r}):e}):m.jsxs(Sj,{children:[m.jsx("h1",{className:"my-3 text-[1.5rem]",children:"RAgents"}),i?m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"mb-6 leading-normal",role:"alert",children:i}),m.jsx(Er,{variant:"outline",onClick:()=>c(p=>p+1),children:"Reload"})]}):m.jsx("p",{className:"mb-6 leading-normal",role:"status",children:"Checking sign-in ..."})]})}function jre({onLogin:e}){const[t,n]=x.useState(""),[r,i]=x.useState(""),[a,o]=x.useState(!1),[c,u]=x.useState();return m.jsx("main",{className:Ej,children:m.jsx("form",{className:Tj,onSubmit:d=>{d.preventDefault(),!a&&(o(!0),u(void 0),fetch("/api/access/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:t.trim(),password:r})}).then(async p=>{if(!p.ok)throw await r1(p,"Sign-in failed.");const h=Y2(await p.json());if(h.enabled&&!h.user)throw new Error("The server did not confirm the sign-in.");i(""),e(h)}).catch(p=>{i(""),u(p instanceof Error?p.message:String(p))}).finally(()=>o(!1)))},children:m.jsxs(Gf,{className:wj,children:[m.jsx("span",{className:"text-sm font-semibold text-muted-foreground",children:"RAgents"}),m.jsx("h1",{className:"my-3 text-[1.5rem]",children:"Sign in"}),m.jsx("p",{className:"mb-6 leading-normal text-muted-foreground",children:"Sign in with your user account for this workshop."}),m.jsxs("label",{className:$3,children:["User",m.jsx(am,{autoComplete:"username",autoFocus:!0,disabled:a,name:"username",onChange:d=>n(d.target.value),required:!0,value:t})]}),m.jsxs("label",{className:$3,children:["Password",m.jsx(am,{autoComplete:"current-password",disabled:a,name:"password",onChange:d=>i(d.target.value),required:!0,type:"password",value:r})]}),c&&m.jsx("p",{className:"mb-6 text-destructive",role:"alert",children:c}),m.jsx(Er,{className:"w-full",disabled:a||!t.trim()||!r,type:"submit",children:a?"Signing in ...":"Sign in"})]})})})}function $re(){const e=sa(),[t,n]=x.useState(!1),[r,i]=x.useState();return!e.enabled||!e.user?null:m.jsxs("div",{className:"flex flex-none items-stretch text-sm",children:[m.jsx(Vs,{as:"button","aria-label":`Sign out ${e.user.label}`,className:"max-w-[160px] max-sm:max-w-[100px]",disabled:t,title:e.user.id,type:"button",onClick:()=>{n(!0),i(void 0),e.logout().catch(a=>i(a instanceof Error?a.message:String(a))).finally(()=>n(!1))},children:m.jsxs(wA,{children:[m.jsx(SA,{className:"normal-case [overflow-wrap:anywhere]",children:e.user.label}),m.jsx(wc,{children:"Sign out"})]})}),r&&m.jsx(Vs,{className:"text-destructive",role:"alert",children:r})]})}const Bre=Object.freeze(Object.defineProperty({__proto__:null,AccessContext:AA,AccessGate:Pre,AccessScreen:Sj,UserMenu:$re,useAccess:sa},Symbol.toStringTag,{value:"Module"}));function Fre(e){return Array.isArray(e)}function zre(e){return _c(typeof e,"bigint")}function Ure(e){return _c(typeof e,"boolean")}function Hre(e){return _c(e,null)}function qre(e){return Number.isFinite(e)}function _A(e){return _c(typeof e,"object")&&!Hre(e)}function Vre(e){return _c(typeof e,"string")}function _c(e,t){return e===t}function Gre(e){return _c(e,"__proto__")||_c(e,"constructor")||_c(e,"prototype")}function CA(e,t){return Gre(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function Kre(e){return Object.getOwnPropertyNames(e)}function Yre(e){return _A(e)&&CA(e,"~guard")}function Wre(e){return e.map(t=>kA(t))}function Xre(e){const t={},n=Object.getOwnPropertyDescriptors(e);for(const r of Object.keys(n)){const i=n[r];CA(i,"value")&&Object.defineProperty(t,r,{...i,value:kA(i.value)})}return t}function Qre(e){return new RegExp(e.source,e.flags)}function kA(e){return e instanceof RegExp?Qre(e):Yre(e)?e:Fre(e)?Wre(e):_A(e)?Xre(e):e}function Zre(e){return kA(e)}const Jre={immutableTypes:!1,maxErrors:8,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1};function eie(){return Jre}function tie(e,t){for(const n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function nie(e,t){return{...e,...t}}function hd(e,t,n={}){const r=nie(t,n);return tie(r,e)}function Aj(e,t,n){const r=eie(),i=Zre(e);for(const a of Object.keys(t))Object.defineProperty(i,a,{configurable:!0,writable:!0,enumerable:r.enumerableKind,value:t[a]});for(const a of Object.keys(n))Object.defineProperty(i,a,{configurable:!0,enumerable:!0,writable:!0,value:n[a]});return i}function rie(e){return _A(e)}function iie(e){return Aj(e,{"~optional":!0},{})}function Iu(e){return iie(e)}function aie(e){return rie(e)&&CA(e,"~optional")}function B3(e,t){return hd({"~kind":"Array"},{type:"array",items:e},t)}function sie(e){return Kre(e).filter(t=>!aie(e[t]))}function W2(e,t={}){const n=sie(e),r=n.length>0?{required:n}:{};return hd({"~kind":"Object"},{type:"object",...r,properties:e},t)}function F3(e,t={}){return hd({"~kind":"Union"},{anyOf:e},t)}function _j(e){return Aj(e,{"~unsafe":null},{})}var z3;(function(e){e[e.Array=0]="Array",e[e.BigInt=1]="BigInt",e[e.Boolean=2]="Boolean",e[e.Date=3]="Date",e[e.Constructor=4]="Constructor",e[e.Function=5]="Function",e[e.Null=6]="Null",e[e.Number=7]="Number",e[e.Object=8]="Object",e[e.RegExp=9]="RegExp",e[e.String=10]="String",e[e.Symbol=11]="Symbol",e[e.TypeArray=12]="TypeArray",e[e.Undefined=13]="Undefined"})(z3||(z3={}));BigInt("14695981039346656037");BigInt("1099511628211"),BigInt("18446744073709551616");Array.from({length:256}).map((e,t)=>BigInt(t));const Cj=new Float64Array(1);new DataView(Cj.buffer);new Uint8Array(Cj.buffer);new TextEncoder;function oie(e){return hd({"~kind":"Integer"},{type:"integer"},e)}let lie=class extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}};function cie(e){return zre(e)?"bigint":Ure(e)?"boolean":qre(e)?"number":Vre(e)?"string":(()=>{throw new lie(e)})()}function U3(e,t){return hd({"~kind":"Literal"},{type:cie(e),const:e},t)}function uie(e){return hd({"~kind":"Null"},{type:"null"},e)}function ha(e){return hd({"~kind":"String"},{type:"string"},e)}function X2(e,t){return Array.from({length:t-e+1},(n,r)=>String.fromCharCode(e+r))}[...X2(97,122),...X2(65,90)];const die="0",fie=X2(49,57);[...fie];const kj=/^[a-z][a-z0-9-]*(?:\.[a-zA-Z][a-zA-Z0-9-]*)+$/,Nj=e=>{if(!kj.test(e))throw new Error(`Invalid contract id: ${e}`)},pn=e=>{if(Nj(e.id),!e.description.trim())throw new Error(`Operation ${e.id} has no description`);return Object.freeze({kind:"operation",id:e.id,description:e.description,rights:Object.freeze([...e.rights??[]]),input:e.input,result:e.result,implementedBy:e.implementedBy??"server"})},Ab=e=>{if(Nj(e.id),!e.description.trim())throw new Error(`Channel ${e.id} has no description`);return Object.freeze({kind:"channel",id:e.id,description:e.description,rights:Object.freeze([...e.rights??[]]),params:e.params,message:e.message})},pie=Object.freeze(Object.defineProperty({__proto__:null,CONTRACT_ID:kj,defineChannel:Ab,defineOperation:pn},Symbol.toStringTag,{value:"Module"})),Rj=e=>e.trim().replace(/^@/,"").normalize("NFC").toLowerCase(),Oj=(e,t)=>{const n=Rj(t);return[...e].find(r=>r.handle===n)},hie=(e,t)=>{const n=[...e];return n.find(r=>r.id===t)??Oj(n,t)},Ar=e=>_j({type:"object",additionalProperties:!0,"x-typescript-type":e}),fc=Ar("RunView"),Ij=Ar("JournalEvent"),mie=_j({"x-typescript-type":"JsonValue"}),Q2=ha({minLength:1,maxLength:64,description:"ID of the run"}),gie={runId:Q2,commandId:ha({minLength:1}),correlationId:Iu(ha({minLength:1})),causationId:Iu(ha({minLength:1}))},af=e=>W2({...gie,...e},{additionalProperties:!1}),bie=/^\/files\/runs\/([A-Za-z0-9_-]{1,64})\/artifacts\/([A-Za-z0-9_-]{1,128})$/,Mj=(e,t)=>`/files/runs/${encodeURIComponent(e)}/artifacts/${encodeURIComponent(t)}`,Zf={view:pn({id:"ragents.runs.view",description:"Read the run view, optionally the state after a journal sequence; null for a run that has not started yet.",input:W2({runId:Q2,at:Iu(oie({minimum:0}))},{additionalProperties:!1}),result:F3([fc,uie()])}),events:pn({id:"ragents.runs.events",description:"Read all journal events of a run in sequence order.",input:W2({runId:Q2},{additionalProperties:!1}),result:B3(Ij)}),enqueueInput:pn({id:"ragents.runs.enqueueInput",description:"Put a message into the queue of an actor.",input:af({actorId:ha({minLength:1}),content:ha({minLength:1}),artifactIds:Iu(B3(ha({minLength:1})))}),result:fc}),restartActor:pn({id:"ragents.runs.restartActor",description:"Restart a stopped actor.",input:af({actorId:ha({minLength:1}),reason:Iu(ha({minLength:1}))}),result:fc}),stopActor:pn({id:"ragents.runs.stopActor",description:"Stop an actor together with its delegated children.",input:af({actorId:ha({minLength:1}),reason:ha({minLength:1})}),result:fc}),interruptTurn:pn({id:"ragents.runs.interruptTurn",description:"Interrupt the running turn of an actor; the actor stays active and accepts the next input. Without a running turn nothing happens.",input:af({actorId:ha({minLength:1}),reason:Iu(ha({minLength:1}))}),result:fc}),resolveAction:pn({id:"ragents.runs.resolveAction",description:"Answer or dismiss a pending action.",input:af({actionId:ha({minLength:1}),decision:F3([U3("approved"),U3("dismissed")]),result:Iu(mie)}),result:fc}),stopAll:pn({id:"ragents.runs.stopAll",description:"Stop the whole run with all agents and flows.",input:af({reason:ha({minLength:1})}),result:fc})},yie=Object.freeze(Object.defineProperty({__proto__:null,ARTIFACT_CONTENT_PATH:bie,actorByHandle:Oj,actorByReference:hie,artifactContentPath:Mj,handleKey:Rj,journalEventSchema:Ij,openJson:Ar,runContracts:Zf,runViewSchema:fc},Symbol.toStringTag,{value:"Module"}));function vi(e,t){return{...e,...t}}function as(e){return Array.isArray(e)}function Py(e){return we(typeof e,"bigint")}function jy(e){return we(typeof e,"boolean")}function H3(e){return we(typeof e,"function")}function NA(e){return we(e,null)}function Xc(e){return Number.isFinite(e)}function RA(e){return ts(e)&&!as(e)}function ts(e){return we(typeof e,"object")&&!NA(e)}function Ms(e){return we(typeof e,"string")}function we(e,t){return e===t}function xie(e,t){return e>t}function vie(e,t){return e<t}function Eie(e){if(!ts(e))return!1;const t=globalThis.Object.getPrototypeOf(e);return NA(t)?!1:we(typeof t.constructor,"function")&&!(we(t.constructor,globalThis.Object)||we(t.constructor.name,"Object"))}function Tie(e,t,n){for(let r=t;r<e.length;r++)if(!n(e[r],r))return!1;return!0}function En(e,t,n){return we(e.length,0)?n():t(e[0],e.slice(1))}function OA(e){return we(e,"__proto__")||we(e,"constructor")||we(e,"prototype")}function rr(e,t){return OA(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function Hn(e){return Object.getOwnPropertyNames(e)}function wie(e){return Object.getOwnPropertySymbols(e)}function Dj(e){return Object.values(e)}function Sie(e){return globalThis.ArrayBuffer.isView(e)}function Aie(e){return e instanceof globalThis.RegExp}function _ie(e){return e instanceof globalThis.Set}function Cie(e){return e instanceof globalThis.Map}function kie(e){return rr(e,"~kind")||rr(e,"~unsafe")}function Nie(e){const t={};for(const n of Hn(e)){if(OA(n))continue;const r=Object.getOwnPropertyDescriptor(e,n);r.value=ad(r.value),we(r.enumerable,!0)?t[n]=r.value:Object.defineProperty(t,n,r)}return t}function Rie(e){const t={};for(const n of Hn(e))OA(n)||(t[n]=ad(e[n]));for(const n of wie(e))t[n]=ad(e[n]);return t}function Oie(e){return Eie(e)?e:kie(e)?Nie(e):Rie(e)}function Iie(e){return e.map(t=>ad(t))}function Mie(e){return e.slice()}function Die(e){return new RegExp(e.source,e.flags)}function Lie(e){return new Map(ad([...e.entries()]))}function Pie(e){return new Set(ad([...e.values()]))}function ad(e){return Sie(e)?Mie(e):Aie(e)?Die(e):Cie(e)?Lie(e):_ie(e)?Pie(e):as(e)?Iie(e):ts(e)?Oie(e):e}function Lj(e){return ad(e)}const jie={immutableTypes:!1,maxErrors:8,maxInstantiationCount:128,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function Pj(){return jie}function $ie(e,t){for(const n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function Bie(e,t){return{...e,...t}}function Tn(e,t,n={}){const r=Bie(t,n);return $ie(r,e)}function ss(e,t){const n={};for(const r of Hn(e)){if(t.includes(r))continue;const i=Object.getOwnPropertyDescriptor(e,r);i.value=Lj(i.value),Object.defineProperty(n,r,i)}return n}function on(e,t,n){const r=Pj(),i=Lj(e);for(const a of Object.keys(t))Object.defineProperty(i,a,{configurable:!0,writable:!0,enumerable:r.enumerableKind,value:t[a]});for(const a of Object.keys(n))Object.defineProperty(i,a,{configurable:!0,enumerable:!0,writable:!0,value:n[a]});return i}function On(e,t){return ts(e)&&rr(e,"~kind")&&we(e["~kind"],t)}function Rs(e){return ts(e)}function Fn(e,t,n){return Tn({"~kind":"Deferred"},{type:"deferred",action:e,parameters:t,options:n},{})}function Gu(e){return On(e,"Deferred")}function Fie(e){return on(e,{"~readonly":!0},{})}function IA(e,t){return on(Fie(e),{},t)}function zie(e,t,n,r){const i=Ot(e,t,n);return IA(i,r)}function Uie(e){return on(e,{"~optional":!0},{})}function MA(e,t){return on(Uie(e),{},t)}function Hie(e,t,n,r){const i=Ot(e,t,n);return MA(i,r)}function na(e,t){return Tn({"~kind":"Array"},{type:"array",items:e},t)}function Ba(e){return On(e,"Array")}function DA(e){return ss(e,["~kind","type","items"])}function Jf(e,t,n={}){return Tn({"~kind":"Constructor"},{type:"constructor",parameters:e,instanceType:t},n)}function Js(e){return On(e,"Constructor")}function jj(e){return ss(e,["~kind","type","parameters","instanceType"])}function sd(e,t,n={}){return Tn({"~kind":"Function"},{type:"function",parameters:e,returnType:t},n)}function eo(e){return On(e,"Function")}function $j(e){return ss(e,["~kind","type","parameters","returnType"])}function od(e,t){return Tn({"~kind":"Ref"},{$ref:e},t)}function Os(e){return On(e,"Ref")}function ep(e,t){return Tn({"~kind":"Generic"},{type:"generic",parameters:e,expression:t})}function $y(e){return On(e,"Generic")}function Ku(e){return Tn({"~kind":"Any"},{},e)}function Pa(e){return On(e,"Any")}const Bj="(?!)";function Pi(e){return Tn({"~kind":"Never"},{not:{}},e)}function ld(e){return On(e,"Never")}function Co(e,t={}){return Fn("AddOptional",[e],t)}function cm(e,t={}){return MA(e,t)}function Fs(e){return cm(e)}function Is(e){return Rs(e)&&rr(e,"~optional")}function Fj(e){return Hn(e).filter(t=>!Is(e[t]))}function LA(e){return Hn(e)}function PA(e){return Dj(e)}function wt(e,t={}){const n=Fj(e),r=n.length>0?{required:n}:{};return Tn({"~kind":"Object"},{type:"object",...r,properties:e},t)}function _i(e){return On(e,"Object")}function zj(e){return ss(e,["~kind","type","properties","required"])}function ba(e){return Tn({"~kind":"Unknown"},{},e)}function ns(e){return On(e,"Unknown")}function tp(e,t,n){const r=Hn(e).reduce((i,a)=>({...i,[a]:on(e[a],{},{$id:a})}),{});return Tn({"~kind":"Cyclic"},{$defs:r,$ref:t},n)}function Lo(e){return On(e,"Cyclic")}function qie(e){return ss(e,["~kind","$defs","$ref"])}function Uj(e){return on(e,{"~unsafe":null},{})}function jA(e){return RA(e)&&rr(e,"~unsafe")&&NA(e["~unsafe"])}function By(e,t){var n;return((n=t[e.length])==null?void 0:n.call(t,...e))??(()=>{throw Error("Invalid Arguments")})()}function i1(...e){const[t,n]=By(e,{2:(r,i)=>[r,i,i],1:r=>[r,ba(),ba()]});return Tn({"~kind":"Infer"},{type:"infer",name:t,extends:n},{})}function ja(e){return On(e,"Infer")}function um(e,t,n,r={}){return Tn({"~kind":"Dependent"},{if:e,then:t,else:n},r)}function os(e){return On(e,"Dependent")}function Hj(e){return ss(e,["~kind","if","then","else"])}function qj(e){return RA(e)}function Vj(e){return Hn(e).filter(n=>isNaN(n)).reduce((n,r)=>[...n,e[r]],[])}function Gj(e){return Ms(e)||Xc(e)}function Kj(e,t){const n=qj(e)?Vj(e):e;return Tn({"~kind":"Enum"},{enum:n},t)}function Po(e){return On(e,"Enum")}function ko(e,t={}){return Tn({"~kind":"Intersect"},{allOf:e},t)}function pi(e){return On(e,"Intersect")}function Yj(e){return ss(e,["~kind","allOf"])}function Xs(){throw new Error("Unreachable")}var q3;(function(e){e[e.Array=0]="Array",e[e.BigInt=1]="BigInt",e[e.Boolean=2]="Boolean",e[e.Date=3]="Date",e[e.Constructor=4]="Constructor",e[e.Function=5]="Function",e[e.Null=6]="Null",e[e.Number=7]="Number",e[e.Object=8]="Object",e[e.RegExp=9]="RegExp",e[e.String=10]="String",e[e.Symbol=11]="Symbol",e[e.TypeArray=12]="TypeArray",e[e.Undefined=13]="Undefined"})(q3||(q3={}));BigInt("14695981039346656037");BigInt("1099511628211"),BigInt("18446744073709551616");Array.from({length:256}).map((e,t)=>BigInt(t));const Wj=new Float64Array(1);new DataView(Wj.buffer);new Uint8Array(Wj.buffer);new TextEncoder;class $A{constructor(t,n){this.type=t,this.decode=n}Encode(t){const n=this.type,r=a1(n)?o=>this.decode(n["~codec"].decode(o)):this.decode,i=a1(n)?o=>n["~codec"].encode(t(o)):t,a={decode:r,encode:i};return on(this.type,{"~codec":a},{})}}class BA{constructor(t){this.type=t}Decode(t){return new $A(this.type,t)}}function Fy(e){return new BA(e)}function Xj(e,t){return Fy(e).Decode(t).Encode(()=>{throw Error("Encode not implemented")})}function Qj(e,t){return Fy(e).Decode(()=>{throw Error("Decode not implemented")}).Encode(t)}function a1(e){return Rs(e)&&rr(e,"~codec")&&ts(e["~codec"])&&rr(e["~codec"],"encode")&&rr(e["~codec"],"decode")}function Zj(e){return hx(e)}function dm(e){return Rs(e)&&rr(e,"~immutable")}function No(e,t={}){return Fn("AddReadonly",[e],t)}function fm(e,t={}){return IA(e,t)}function Jj(e){return fm(e)}function pm(e){return Rs(e)&&rr(e,"~readonly")}function e$(e,t){const n=FA(e)?[...e["~refine"],t]:[t];return on(e,{"~refine":n},{})}function t$(...e){const[t,n,r]=By(e,{3:(i,a,o)=>[i,a,o],2:(i,a)=>[i,a,()=>"Refine Error"]});return e$(t,{check:n,error:r})}function n$(e){return RA(e)&&rr(e,"check")&&rr(e,"error")&&H3(e.check)&&H3(e.error)}function FA(e){return Rs(e)&&rr(e,"~refine")&&as(e["~refine"])&&Tie(e["~refine"],0,t=>n$(t))}const r$="-?(?:0|[1-9][0-9]*)n";function zy(e){return Tn({"~kind":"BigInt"},{type:"bigint"},e)}function np(e){return On(e,"BigInt")}function Uy(e){return Tn({"~kind":"Boolean"},{type:"boolean"},e)}function md(e){return On(e,"Boolean")}function s1(e){return Tn({"~kind":"Identifier"},{name:e})}function i$(e){return On(e,"Identifier")}const zA="-?(?:0|[1-9][0-9]*)";function rg(e){return Tn({"~kind":"Integer"},{type:"integer"},e)}function Ml(e){return On(e,"Integer")}class a$ extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}}function s$(e){return Py(e)?"bigint":jy(e)?"boolean":Xc(e)?"number":Ms(e)?"string":(()=>{throw new a$(e)})()}function Yn(e,t){return Tn({"~kind":"Literal"},{type:s$(e),const:e},t)}function UA(e){return Py(e)||jy(e)||Xc(e)||Ms(e)}function Vie(e){return Kr(e)&&Py(e.const)}function Gie(e){return Kr(e)&&jy(e.const)}function o$(e){return Kr(e)&&Xc(e.const)}function l$(e){return Kr(e)&&Ms(e.const)}function Kr(e){return On(e,"Literal")}function Hs(e){return Tn({"~kind":"Null"},{type:"null"},e)}function Hy(e){return On(e,"Null")}const HA="-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?";function Al(e){return Tn({"~kind":"Number"},{type:"number"},e)}function Ds(e){return On(e,"Number")}function qy(e){return Tn({"~kind":"Symbol"},{type:"symbol"},e)}function ig(e){return On(e,"Symbol")}function rp(...e){const[t,n,r]=By(e,{3:(i,a,o)=>[i,a,o],2:(i,a)=>[i,a,a],1:i=>[i,ba(),ba()]});return Tn({"~kind":"Parameter"},{name:t,extends:n,equals:r},{})}function c$(e){return On(e,"Parameter")}const qA=".*";function Un(e){return Tn({"~kind":"String"},{type:"string"},e)}function Dl(e){return On(e,"String")}function Tr(e,t={}){return Tn({"~kind":"Union"},{anyOf:e},t)}function Dn(e){return On(e,"Union")}function u$(e){return ss(e,["~kind","anyOf"])}function Vy(e){const t=wce(e);return we(t.length,2)?t[0]:[]}function Kie(e){return!0}function d$(e){return En(e,(t,n)=>Yie(t)?d$(n):!1,()=>!0)}function f$(e){return we(e.length,0)?!1:d$(e)}function Yie(e){return Dn(e)?f$(e.anyOf):Kr(e)?Kie(e.const):!1}function VA(e){return f$(e)}function GA(e){return Tn({"~kind":"TemplateLiteral"},{type:"string",pattern:e},{})}function p$(e,t,n=[]){return En(e,(r,i)=>p$(i,t,[...n,`${r}${t}`]),()=>n)}function Wie(e,t){return we(e.length,0)?[`${t}`]:p$(e,t)}function h$(e,t,n=[]){return En(t,(r,i)=>h$(e,i,[...n,...m$(e,r)]),()=>n)}function m$(e,t){return Dn(t)?h$(e,t.anyOf):Kr(t)?Wie(e,t.const):Xs()}function g$(e,t){return En(t,(n,r)=>g$(m$(e,n),r),()=>e)}function Xie(e){return e.map(t=>Yn(t))}function Qie(e){const t=g$([],e),n=Xie(t);return Tr(n)}function Zie(e){return we(e.length,0)?Xs():we(e.length,1)&&Kr(e[0])?e[0]:Qie(e)}function KA(e){const t=Vy(e);return we(t.length,0)?Un():VA(t)?Zie(t):GA(e)}function b$(e){const t=KA(e);return ls(t)?Un():t}function Bc(e,t){const n="object",r={[e]:t};return Tn({"~kind":"Record"},{type:n,patternProperties:r})}function Jie(e){return Bc(zc,e)}function eae(e){return wt({true:e,false:e})}function Ls(e,t={}){const[n,r,i]=[e,e.length,!1];return Tn({"~kind":"Tuple"},{type:"array",additionalItems:i,items:n,minItems:r},t)}function oa(e){return On(e,"Tuple")}function y$(e){return ss(e,["~kind","type","items","minItems","additionalItems"])}function tae(e){return ss(e,["~readonly"])}function x$(e,t){return on(tae(e),{},t)}function nae(e,t,n,r){const i=Ot(e,t,n);return x$(i,r)}function v$(e,t={}){return Fn("RemoveReadonly",[e],t)}function E$(e,t={}){return x$(e,t)}function rae(e){return ss(e,["~optional"])}function T$(e,t){return on(rae(e),{},t)}function iae(e,t,n,r){const i=Ot(e,t,n);return T$(i,r)}function w$(e,t={}){return Fn("RemoveOptional",[e],t)}function YA(e,t={}){return T$(e,t)}function S$(e){return e.reduceRight((n,r,i)=>({[i]:r,...n}),{})}function aae(e){const t=S$(e.items);return wt(t)}function Z2(e){return _i(e)||oa(e)}function sae(e,t){return pm(e)?!!pm(t):!1}function oae(e,t){return Is(e)?!!Is(t):!1}function lae(e,t){const n=sae(e,t),r=oae(e,t),i=xa([e,t]),a=E$(YA(i));return n&&r?fm(cm(a)):n&&!r?fm(a):!n&&r?cm(a):a}function cae(e,t,n){return n in e?n in t?lae(e[n],t[n]):e[n]:n in t?t[n]:Pi()}function uae(e,t){return[...new Set([...Hn(e),...Hn(t)])].reduce((i,a)=>({...i,[a]:cae(e,t,a)}),{})}function V3(e){return _i(e)?e.properties:oa(e)?S$(e.items):{}}function A$(e,t){const n=V3(e),r=V3(t),i=uae(n,r);return wt(i)}function dae(e,t){const n=ax(e,t);return we(n,rx)?e:we(n,ix)||we(n,tx)?t:Pi()}function fae(e,t){const n=Z2(e),r=Z2(t);return n&&r?A$(e,t):n&&!r?e:!n&&r?t:dae(e,t)}function _$(e,t){return ld(e)||Pa(e)?e:ns(e)||ld(t)||Pa(t)?t:ns(t)?e:fae(e,t)}function pae(e,t){return Dn(e)||Dn(t)}function hae(e,t){const n=Fc(e),r=Fc(t);return pae(n,r)?xa([n,r]):_$(n,r)}function C$(e,t,n=[]){return En(t,(r,i)=>C$(e,i,[...n,hae(r,e)]),()=>we(n.length,0)?[e]:n)}function k$(e,t,n=[]){return En(e,(r,i)=>k$(i,t,[...n,...hm([r],t)]),()=>n)}function hm(e,t=[]){return En(e,(n,r)=>Dn(n)?hm(r,k$(n.anyOf,t)):hm(r,C$(n,t)),()=>t)}function mae(e,t){const n=Ro({},e,t);return Da(n)?[]:[e]}function N$(e,t,n=[]){return En(e,(r,i)=>N$(i,t,[...n,...mae(r,t)]),()=>n)}function R$(e,t){const n=Fc(e),r=Dn(n)?n.anyOf:[n],i=N$(r,t);return to(i)}function gd(e,t,n){const r=xa([e,t]),i=R$(n,e);return to([r,i])}function jo(e,t=[]){return En(e,(n,r)=>jo(r,[...t,Yn(n)]),()=>to(t))}function xa(e){const t=hm(e),n=T_(t);return to(n)}function $o(e){const t=b$(e);return Fc(t)}function to(e){const t=T_(e);return ip(t)}function Fc(e){return os(e)?gd(e.if,e.then,e.else):Po(e)?jo(e.enum):pi(e)?xa(e.allOf):ls(e)?$o(e.pattern):Dn(e)?to(e.anyOf):e}function ip(e){return we(e.length,1)?e[0]:we(e.length,0)?Pi():Tr(e)}function gae(e,t){const n=jo(e);return Gy(n,t)}function bae(e,t){return Bc(ap,t)}function yae(e,t){const n=xa(e);return Gy(n,t)}function xae(e,t){return Ms(e)||Xc(e)?wt({[e]:t}):we(e,!1)?wt({false:t}):we(e,!0)?wt({true:t}):wt({})}function vae(e,t){return Bc(sg,t)}function Eae(e,t){return rr(e,"pattern")&&(Ms(e.pattern)||e.pattern instanceof RegExp)?Bc(e.pattern.toString(),t):Bc(zc,t)}function Tae(e,t){const n=Vy(e);return VA(n)?Gy($o(e),t):Bc(e,t)}function wae(e){return Dn(e)?ag(e.anyOf):[e]}function ag(e,t=[]){return En(e,(n,r)=>ag(r,[...t,...wae(n)]),()=>t)}function Sae(e){return e.some(t=>Dl(t)||Ds(t)||Ml(t))}function Aae(e,t){return we(Sae(e),!0)?Bc(zc,t):void 0}function _ae(e,t){return e.reduce((n,r)=>Kr(r)&&(Ms(r.const)||Xc(r.const))?{...n,[r.const]:t}:n,{})}function Cae(e,t){const n=_ae(e,t);return wt(n)}function kae(e,t){const n=ag(e),r=Aae(n,t);return Rs(r)?r:Cae(n,t)}function Gy(e,t){return Pa(e)?Jie(t):md(e)?eae(t):Po(e)?gae(e.enum,t):Ml(e)?bae(e,t):pi(e)?yae(e.allOf,t):Kr(e)?xae(e.const,t):Ds(e)?vae(e,t):Dn(e)?kae(e.anyOf,t):Dl(e)?Eae(e,t):ls(e)?Tae(e.pattern,t):wt({})}function WA(e,t,n){return zr([e])?on(Gy(e,t),{},n):XA(e,t,n)}function O$(e,t,n,r,i){const a=Ot(e,t,n),o=Ot(e,t,r);return WA(a,o,i)}const ap=`^${zA}$`,sg=`^${HA}$`,zc=`^${qA}$`;function XA(e,t,n={}){return Fn("Record",[e,t],n)}function QA(e,t,n={}){return WA(e,t,n)}function I$(e,t){return Bc(e,t)}function o1(e){return we(e,zc)?Un():we(e,ap)?rg():we(e,sg)?Al():KA(e)}function Qc(e){return Hn(e.patternProperties)[0]}function Ky(e){const t=Qc(e);return o1(t)}function Ll(e){return e.patternProperties[Qc(e)]}function Bo(e){return On(e,"Record")}function Nae(e){return ss(e,["~kind","type","patternProperties"])}function og(e){return Tn({"~kind":"Rest"},{type:"rest",items:e},{})}function lg(e){return On(e,"Rest")}function ZA(e){return Tn({"~kind":"This"},{$ref:"#"},e)}function JA(e){return On(e,"This")}function Yy(e){return Tn({"~kind":"Undefined"},{type:"undefined"},e)}function Wy(e){return On(e,"Undefined")}function e_(e){return Tn({"~kind":"Void"},{type:"void"},e)}function sp(e){return On(e,"Void")}function Rae(e,t){return we(e,"Array")?na(t[0]):we(e,"Capitalize")?A_(t[0]):we(e,"ConstructorParameters")?L_(t[0]):we(e,"Evaluate")?aB(t[0]):we(e,"Exclude")?j_(t[0],t[1]):we(e,"Extract")?$_(t[0],t[1]):we(e,"Index")?cx(t[0],t[1]):we(e,"InstanceType")?U_(t[0]):we(e,"Lowercase")?__(t[0]):we(e,"NonNullable")?K_(t[0]):we(e,"Omit")?W_(t[0],t[1]):we(e,"Parameters")?Q_(t[0]):we(e,"Partial")?J_(t[0]):we(e,"Pick")?tC(t[0],t[1]):we(e,"Readonly")?rC(t[0]):we(e,"KeyOf")?fx(t[0]):we(e,"Record")?XA(t[0],t[1]):we(e,"Required")?sC(t[0]):we(e,"ReturnType")?lC(t[0]):we(e,"Uncapitalize")?C_(t[0]):we(e,"Uppercase")?k_(t[0]):c1(od(e),t)}function bd(){throw Error("Unreachable")}function M$(e,t=[]){return En(e,(n,r)=>M$(r,[...t,n[1]]),()=>t)}function Pl(e){return we(e.length,3)?[e[0],...M$(e[1])]:[]}function Oae(e){return rp(e[0],e[2],e[4])}function Iae(e){return rp(e[0],e[2],e[2])}function Mae(e){return rp(e[0],ba(),e[2])}function Dae(e){return rp(e,ba(),ba())}function Lae(e){return Pl(e)}function Pae(e){return e[1]}function jae(e){return Pl(e)}function $ae(e){return e[1]}function Bae(e){return Rae(e[0],e[1])}function Fae(e){return null}function zae(e){return Un()}function Uae(e){return Al()}function Hae(e){return Uy()}function qae(e){return Yy()}function Vae(e){return Hs()}function Gae(e){return rg()}function Kae(e){return zy()}function Yae(e){return ba()}function Wae(e){return Ku()}function Xae(e){return wt({})}function Qae(e){return Pi()}function Zae(e){return qy()}function Jae(e){return e_()}function ese(e){return ZA()}function tse(e){return Yn(BigInt(e))}function nse(e){return Yn(we(e,"true"))}function rse(e){return Yn(parseFloat(e))}function ise(e){return Yn(e)}function ase(e){return e[1]}function sse(e){return Yn(e)}function ose(e){return we(e.length,3)?[e[0],e[1],...e[2]]:[e[0]]}function lse(e){return e[1]}function cse(e){return h_(e)}function use(e){return we(e.length,6)?um(e[1],e[3],e[5]):um(e[1],e[3],ba())}function dse(e){return e.length>0}function fse(e){return e.reduce((t,n)=>we(n.length,3)?[...t,[n[1]]]:[...t,[]],[])}function pse(e){return we(e.length,6)?[e[1],e[3],e[5]]:[]}function hse(e){return as(e)&&we(e.length,3)?e[1]:e}function mse(e){return we(e.length,2)?e[1]:[]}function G3(e,t){return t.reduce((n,r)=>{const i=r;return we(i.length,1)?cx(n,i[0]):we(i.length,0)?na(n):bd()},e)}function K3(e,t){return we(t.length,3)?M_(e,t[0],t[1],t[2]):e}function gse(e,t){return as(t)&&we(t.length,0)?e:uC(e,t)}function bse(e){const[t,n,r,i,a]=e;return gse(K3(t?fx(G3(n,r)):G3(n,r),i),a)}function t_(e,t){return we(t.length,3)?(()=>{const[n,r,i]=t,a=t_(r,i);if(we(n,"&"))return pi(a)?ko([e,...a.allOf]):ko([e,a]);if(we(n,"|"))return Dn(a)?Tr([e,...a.anyOf]):Tr([e,a]);bd()})():e}function yse(e){const[t,n]=e;return t_(t,n)}function xse(e){const[t,n]=e;return t_(t,n)}function vse(e){return iB(e[1])}function Ese(e){return e[1]}function Tse(e){return ep(e[0],e[2])}function wse(e){return we(e.length,4)?i1(e[1],e[3]):we(e.length,2)?i1(e[1],ba()):bd()}function Sse(e){return`${e}`}function Ase(e){return Ml(e[3])?ap:Ds(e[3])?sg:ig(e[3])||Dl(e[3])?zc:bd()}function _se(e){return e.length>0}function Cse(e){return e.length>0}function kse(e){const[t,n,r,i,a]=e;return{[n]:t&&r?No(Co(a)):t&&!r?No(a):!t&&r?Co(a):a}}function Nse(e){return Pl(e)}function D$(e){return e.reduce((t,n)=>rr(n,ap)||rr(n,sg)||rr(n,zc)?[t[0],vi(t[1],n)]:[vi(t[0],n),t[1]],[{},{}])}function Rse(e){return D$(e[1])}function Ose(e){const[t,n]=e,r=we(Hn(n).length,0)?{}:{patternProperties:n};return wt(t,r)}function Ise(e){return we(e.length,5)?No(Co(e[4])):we(e.length,3)?e[2]:we(e.length,4)?we(e[2],"readonly")?No(e[3]):Co(e[3]):bd()}function Mse(e){if(!as(e)||!we(e.length,3))return e;const[t,n,r]=e;return t&&r?No(Co(n)):t&&!r?No(n):!t&&r?Co(n):n}function Dse(e){return we(e.length,2)?og(e[1]):we(e.length,1)?e[0]:bd()}function Lse(e){return Pl(e)}function Pse(e){return Ls(e[1])}function jse(e){return No(Co(e[4]))}function $se(e){return No(e[3])}function Bse(e){return Co(e[3])}function Fse(e){return e[2]}function zse(e){return we(e.length,2)?og(e[1]):we(e.length,1)?e[0]:bd()}function Use(e){return Pl(e)}function Hse(e){return sd(e[1],e[4])}function qse(e){return Jf(e[2],e[5])}function Y3(e,t){return we(e,"remove")?v$(t):we(e,"add")?No(t):t}function Vse(e){return we(e.length,2)&&we(e[0],"-")?"remove":we(e.length,2)&&we(e[0],"+")||we(e.length,1)?"add":"none"}function W3(e,t){return we(e,"remove")?w$(t):we(e,"add")?Co(t):t}function Gse(e){return we(e.length,2)&&we(e[0],"-")?"remove":we(e.length,2)&&we(e[0],"+")||we(e.length,1)?"add":"none"}function Kse(e){return we(e.length,2)?[e[1]]:[]}function Yse(e){return as(e[6])&&we(e[6].length,1)?u1(s1(e[3]),e[5],e[6][0],Y3(e[1],W3(e[8],e[10]))):u1(s1(e[3]),e[5],od(e[3]),Y3(e[1],W3(e[8],e[10])))}function Wse(e){return od(e)}function Xse(e){return BigInt(e)}function Qse(e){return parseFloat(e)}function Zse(e){return we(e,"true")}function Jse(e){return null}function eoe(e){return{[e[0]]:e[2]}}function toe(e){return Pl(e)}function noe(e){return e.reduce((t,n)=>vi(t,n),{})}function roe(e){return noe(e[1])}function ioe(e){return Pl(e)}function aoe(e){return e[1]}function soe(e){return zy()}function ooe(e){return Un()}function loe(e){return Al()}function coe(e){return rg()}function uoe(e){return Pi()}function doe(e){return Yn(e)}function foe(e){return Tr(e[1])}function poe(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function hoe(e){return[e[0],...e[1]]}function moe(e){return e[1]}function goe(e){return Pl(e)}function boe(e){return we(e.length,2)?e[1]:[]}function yoe(e){const t=e[2],n=e[3],[r,i]=e[4],a=we(Hn(i).length,0)?{}:{patternProperties:i};return{[e[1]]:ep(t,Jy(n,r,a))}}function xoe(e){const t=e[2],[n,r]=e[3],i=we(Hn(r).length,0)?{}:{patternProperties:r};return{[e[1]]:Jy(t,n,i)}}function voe(e){return{[e[1]]:ep(e[2],e[4])}}function Eoe(e){return{[e[1]]:e[3]}}function Toe(e){return null}function woe(e){return Pl(e)}function Soe(e){return e[1]}function Aoe(e){const[t,n]=[e[0],e[1]];return oB(vi(t,D$(n)[0]))}function n_(e){return we(e.length,2)}function cr(e,t,n){return n_(e)?t(e[0],e[1]):n()}function _oe(e,t){return we(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function ia(e,t){for(let n=0;n<e.length;n++){const r=_oe(e[n],t);if(n_(r))return r}return[]}function J2(e,t){return Array.from({length:t-e+1},(n,r)=>String.fromCharCode(e+r))}const Coe=[...J2(97,122),...J2(65,90)],L$="0",P$=J2(49,57),r_=[L$,...P$],koe=" ",i_=`
241
241
  `,cg="_",a_=".",Noe="$",j$="-",$$="//",B$="/*",Roe="*/";function F$(e){const t=e.indexOf(Roe);return we(t,-1)?"":e.slice(t+2)}function z$(e){const t=e.indexOf(i_);return we(t,-1)?"":e.slice(t)}function Ooe(e){return e.replace(/^[ \t\r\f\v]+/,"")}function ew(e){const t=Ooe(e);return t.startsWith(B$)?ew(F$(t.slice(2))):t.startsWith($$)?ew(z$(t.slice(2))):t}function Qs(e){const t=e.trimStart();return t.startsWith(B$)?Qs(F$(t.slice(2))):t.startsWith($$)?Qs(z$(t.slice(2))):t}function U$(e,t){return cr(ia([e],t),(n,r)=>[n,r],()=>["",t])}function Ioe(e,t){return e.includes(t)}function l1(e,t,n,r=""){return cr(ia(e,n),(i,a)=>Ioe(t,i)?l1(e,t,a,r):l1(e,t,a,`${r}${i}`),()=>[r,n])}function Moe(e){return ia(P$,e)}const Doe=[...r_,cg];function Loe(e){return l1(Doe,[cg],e)}function Poe(e){return cr(ia([L$],e),(t,n)=>[t,n],()=>cr(Moe(e),(t,n)=>cr(Loe(n),(r,i)=>[`${t}${r}`,i],()=>[]),()=>[]))}function H$(e){return Poe(Qs(e))}function joe(e){return U$(j$,e)}function $oe(e){return cr(joe(e),(t,n)=>cr(H$(n),(r,i)=>[`${t}${r}`,i],()=>[]),()=>[])}function Boe(e){return $oe(Qs(e))}function Foe(e){return cr(Boe(e),(t,n)=>cr(ia(["n"],n),(r,i)=>[`${t}`,i],()=>[]),()=>[])}function q$(e){return Foe(e)}function ST(e,t){return ia([e],t)}function ke(e,t){return we(e,"")?["",t]:e.startsWith(i_)?ST(e,ew(t)):e.startsWith(koe)?ST(e,t):ST(e,Qs(t))}const V$=[...Coe,cg,Noe];function zoe(e){return ia(V$,e)}const Uoe=[...V$,...r_];function G$(e,t=""){return cr(ia(Uoe,e),(n,r)=>G$(r,`${t}${n}`),()=>[t,e])}function Hoe(e){return cr(zoe(e),(t,n)=>cr(G$(n),(r,i)=>[`${t}${r}`,i],()=>[]),()=>[])}function ti(e){return Hoe(Qs(e))}const qoe=[...r_,cg];function Voe(e){return n_(ia([a_],e))}function K$(e){return cr(l1(qoe,[cg],e),(t,n)=>we(t,"")?[]:[t,n],()=>[])}function Goe(e){return cr(ia([a_],e),(t,n)=>cr(K$(n),(r,i)=>[`0${t}${r}`,i],()=>[]),()=>[])}function Koe(e){return cr(H$(e),(t,n)=>cr(ia([a_],n),(r,i)=>cr(K$(i),(a,o)=>[`${t}${r}${a}`,o],()=>[`${t}`,i]),()=>[`${t}`,n]),()=>[])}function Yoe(e){return Voe(e)?Goe(e):Koe(e)}function Woe(e){return Yoe(Qs(e))}function Xoe(e){return U$(j$,e)}function Qoe(e){return cr(Xoe(e),(t,n)=>cr(Woe(n),(r,i)=>[`${t}${r}`,i],()=>[]),()=>[])}function s_(e){return Qoe(Qs(e))}function Zoe(e){return we(e,"")?[]:[e.slice(0,1),e.slice(1)]}function Y$(e,t){return En(e,(n,r)=>t.startsWith(n)?!0:Y$(r,t),()=>!1)}function ug(e,t,n=""){return cr(Zoe(t),(r,i)=>Y$(e,t)?[n,t]:ug(e,i,`${n}${r}`),()=>[])}function Joe(e,t,n){return cr(ia([e],n),(r,i)=>cr(ug([t],i),(a,o)=>cr(ia([t],o),(c,u)=>[`${a}`,u],()=>[]),()=>[]),()=>[])}function ele(e,t,n){return cr(ia([e],n),(r,i)=>cr(ug([i_,t],i),(a,o)=>cr(ia([t],o),(c,u)=>[`${a}`,u],()=>[]),()=>[]),()=>[])}function tle(e,t,n,r){return n?Joe(e,t,Qs(r)):ele(e,t,Qs(r))}function nle(e,t){return ia(e,t)}function rle(e,t){return tle(e,e,!1,t)}function ile(e,t){return cr(nle(e,t),(n,r)=>rle(n,`${n}${r}`),()=>[])}function o_(e,t){return ile(e,Qs(t))}function ale(e,t){return cr(ug(e,t),(n,r)=>we(n,"")?[]:[n,r],()=>[])}const D=(e,t,n=()=>[])=>e.length===2?t(e):n(),sle=e=>D(D(ti(e),([t,n])=>D(ke("extends",n),([r,i])=>D(vn(i),([a,o])=>D(ke("=",o),([c,u])=>D(vn(u),([d,p])=>[[t,r,a,c,d],p]))))),([t,n])=>[Oae(t),n]),ole=e=>D(D(ti(e),([t,n])=>D(ke("extends",n),([r,i])=>D(vn(i),([a,o])=>[[t,r,a],o]))),([t,n])=>[Iae(t),n]),lle=e=>D(D(ti(e),([t,n])=>D(ke("=",n),([r,i])=>D(vn(i),([a,o])=>[[t,r,a],o]))),([t,n])=>[Mae(t),n]),cle=e=>D(ti(e),([t,n])=>[Dae(t),n]),W$=e=>D(D(sle(e),([t,n])=>[t,n],()=>D(ole(e),([t,n])=>[t,n],()=>D(lle(e),([t,n])=>[t,n],()=>D(cle(e),([t,n])=>[t,n],()=>[])))),([t,n])=>[t,n]),X$=(e,t=[])=>D(D(ke(",",e),([n,r])=>D(W$(r),([i,a])=>[[n,i],a])),([n,r])=>X$(r,[...t,n]),()=>[t,e]),ule=e=>D(D(D(W$(e),([t,n])=>D(X$(n),([r,i])=>D(D(ke(",",i),([a,o])=>[[a],o],()=>[[],i]),([a,o])=>[[t,r,a],o]))),([t,n])=>[t,n],()=>D([[],e],([t,n])=>[t,n],()=>[])),([t,n])=>[Lae(t),n]),l_=e=>D(D(ke("<",e),([t,n])=>D(ule(n),([r,i])=>D(ke(">",i),([a,o])=>[[t,r,a],o]))),([t,n])=>[Pae(t),n]),Q$=(e,t=[])=>D(D(ke(",",e),([n,r])=>D(vn(r),([i,a])=>[[n,i],a])),([n,r])=>Q$(r,[...t,n]),()=>[t,e]),dle=e=>D(D(D(vn(e),([t,n])=>D(Q$(n),([r,i])=>D(D(ke(",",i),([a,o])=>[[a],o],()=>[[],i]),([a,o])=>[[t,r,a],o]))),([t,n])=>[t,n],()=>D([[],e],([t,n])=>[t,n],()=>[])),([t,n])=>[jae(t),n]),fle=e=>D(D(ke("<",e),([t,n])=>D(dle(n),([r,i])=>D(ke(">",i),([a,o])=>[[t,r,a],o]))),([t,n])=>[$ae(t),n]),ple=e=>D(D(ti(e),([t,n])=>D(fle(n),([r,i])=>[[t,r],i])),([t,n])=>[Bae(t),n]),Z$=e=>D(D(D(ke(";",e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>D([[],e],([t,n])=>[t,n],()=>[])),([t,n])=>[Fae(),n]),J$=e=>D(ke("string",e),([t,n])=>[zae(),n]),e8=e=>D(ke("number",e),([t,n])=>[Uae(),n]),hle=e=>D(ke("boolean",e),([t,n])=>[Hae(),n]),mle=e=>D(ke("undefined",e),([t,n])=>[qae(),n]),gle=e=>D(ke("null",e),([t,n])=>[Vae(),n]),t8=e=>D(ke("integer",e),([t,n])=>[Gae(),n]),ble=e=>D(ke("bigint",e),([t,n])=>[Kae(),n]),yle=e=>D(ke("unknown",e),([t,n])=>[Yae(),n]),xle=e=>D(ke("any",e),([t,n])=>[Wae(),n]),vle=e=>D(ke("object",e),([t,n])=>[Xae(),n]),Ele=e=>D(ke("never",e),([t,n])=>[Qae(),n]),n8=e=>D(ke("symbol",e),([t,n])=>[Zae(),n]),Tle=e=>D(ke("void",e),([t,n])=>[Jae(),n]),wle=e=>D(ke("this",e),([t,n])=>[ese(),n]),Sle=e=>D(D(ke("${",e),([t,n])=>D(vn(n),([r,i])=>D(ke("}",i),([a,o])=>[[t,r,a],o]))),([t,n])=>[ase(t),n]),AT=e=>D(ug(["${","`"],e),([t,n])=>[sse(t),n]),r8=e=>D(D(D(AT(e),([t,n])=>D(Sle(n),([r,i])=>D(r8(i),([a,o])=>[[t,r,a],o]))),([t,n])=>[t,n],()=>D(D(AT(e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>D(D(AT(e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>[]))),([t,n])=>[ose(t),n]),i8=e=>D(D(ke("`",e),([t,n])=>D(r8(n),([r,i])=>D(ke("`",i),([a,o])=>[[t,r,a],o]))),([t,n])=>[lse(t),n]),Ale=e=>D(i8(e),([t,n])=>[cse(t),n]),_le=e=>D(D(D(ke("if",e),([t,n])=>D(vn(n),([r,i])=>D(ke("then",i),([a,o])=>D(vn(o),([c,u])=>D(ke("else",u),([d,p])=>D(vn(p),([h,y])=>[[t,r,a,c,d,h],y])))))),([t,n])=>[t,n],()=>D(D(ke("if",e),([t,n])=>D(vn(n),([r,i])=>D(ke("then",i),([a,o])=>D(vn(o),([c,u])=>[[t,r,a,c],u])))),([t,n])=>[t,n],()=>[])),([t,n])=>[use(t),n]),Cle=e=>D(q$(e),([t,n])=>[tse(t),n]),kle=e=>D(D(ke("true",e),([t,n])=>[t,n],()=>D(ke("false",e),([t,n])=>[t,n],()=>[])),([t,n])=>[nse(t),n]),Nle=e=>D(s_(e),([t,n])=>[rse(t),n]),Rle=e=>D(o_(["'",'"'],e),([t,n])=>[ise(t),n]),Ole=e=>D(D(D(ke("keyof",e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>D([[],e],([t,n])=>[t,n],()=>[])),([t,n])=>[dse(t),n]),a8=(e,t=[])=>D(D(D(ke("[",e),([n,r])=>D(vn(r),([i,a])=>D(ke("]",a),([o,c])=>[[n,i,o],c]))),([n,r])=>[n,r],()=>D(D(ke("[",e),([n,r])=>D(ke("]",r),([i,a])=>[[n,i],a])),([n,r])=>[n,r],()=>[])),([n,r])=>a8(r,[...t,n]),()=>[t,e]),Ile=e=>D(a8(e),([t,n])=>[fse(t),n]),Mle=e=>D(D(D(ke("extends",e),([t,n])=>D(vn(n),([r,i])=>D(ke("?",i),([a,o])=>D(vn(o),([c,u])=>D(ke(":",u),([d,p])=>D(vn(p),([h,y])=>[[t,r,a,c,d,h],y])))))),([t,n])=>[t,n],()=>D([[],e],([t,n])=>[t,n],()=>[])),([t,n])=>[pse(t),n]),Dle=e=>D(D(D(ke("(",e),([t,n])=>D(vn(n),([r,i])=>D(ke(")",i),([a,o])=>[[t,r,a],o]))),([t,n])=>[t,n],()=>D(J$(e),([t,n])=>[t,n],()=>D(e8(e),([t,n])=>[t,n],()=>D(hle(e),([t,n])=>[t,n],()=>D(mle(e),([t,n])=>[t,n],()=>D(gle(e),([t,n])=>[t,n],()=>D(t8(e),([t,n])=>[t,n],()=>D(ble(e),([t,n])=>[t,n],()=>D(yle(e),([t,n])=>[t,n],()=>D(xle(e),([t,n])=>[t,n],()=>D(vle(e),([t,n])=>[t,n],()=>D(Ele(e),([t,n])=>[t,n],()=>D(n8(e),([t,n])=>[t,n],()=>D(Tle(e),([t,n])=>[t,n],()=>D(wle(e),([t,n])=>[t,n],()=>D(Cle(e),([t,n])=>[t,n],()=>D(kle(e),([t,n])=>[t,n],()=>D(Nle(e),([t,n])=>[t,n],()=>D(Rle(e),([t,n])=>[t,n],()=>D(Ale(e),([t,n])=>[t,n],()=>D(_le(e),([t,n])=>[t,n],()=>D(Vle(e),([t,n])=>[t,n],()=>D(Yle(e),([t,n])=>[t,n],()=>D(ece(e),([t,n])=>[t,n],()=>D(Jle(e),([t,n])=>[t,n],()=>D(ice(e),([t,n])=>[t,n],()=>D(ple(e),([t,n])=>[t,n],()=>D(ace(e),([t,n])=>[t,n],()=>[])))))))))))))))))))))))))))),([t,n])=>[hse(t),n]),Lle=e=>D(D(D(ke("with",e),([t,n])=>D(T8(n),([r,i])=>[[t,r],i])),([t,n])=>[t,n],()=>D([[],e],([t,n])=>[t,n],()=>[])),([t,n])=>[mse(t),n]),s8=e=>D(D(Ole(e),([t,n])=>D(Dle(n),([r,i])=>D(Ile(i),([a,o])=>D(Mle(o),([c,u])=>D(Lle(u),([d,p])=>[[t,r,a,c,d],p]))))),([t,n])=>[bse(t),n]),o8=e=>D(D(D(ke("&",e),([t,n])=>D(s8(n),([r,i])=>D(o8(i),([a,o])=>[[t,r,a],o]))),([t,n])=>[t,n],()=>D([[],e],([t,n])=>[t,n],()=>[])),([t,n])=>[t,n]),l8=e=>D(D(s8(e),([t,n])=>D(o8(n),([r,i])=>[[t,r],i])),([t,n])=>[yse(t),n]),c8=e=>D(D(D(ke("|",e),([t,n])=>D(l8(n),([r,i])=>D(c8(i),([a,o])=>[[t,r,a],o]))),([t,n])=>[t,n],()=>D([[],e],([t,n])=>[t,n],()=>[])),([t,n])=>[t,n]),Xy=e=>D(D(l8(e),([t,n])=>D(c8(n),([r,i])=>[[t,r],i])),([t,n])=>[xse(t),n]),Ple=e=>D(D(ke("readonly",e),([t,n])=>D(Xy(n),([r,i])=>[[t,r],i])),([t,n])=>[vse(t),n]),jle=e=>D(D(ke("|",e),([t,n])=>D(Xy(n),([r,i])=>[[t,r],i])),([t,n])=>[Ese(t),n]),$le=e=>D(D(l_(e),([t,n])=>D(ke("=",n),([r,i])=>D(vn(i),([a,o])=>[[t,r,a],o]))),([t,n])=>[Tse(t),n]),Ble=e=>D(D(D(ke("infer",e),([t,n])=>D(ti(n),([r,i])=>D(ke("extends",i),([a,o])=>D(Xy(o),([c,u])=>[[t,r,a,c],u])))),([t,n])=>[t,n],()=>D(D(ke("infer",e),([t,n])=>D(ti(n),([r,i])=>[[t,r],i])),([t,n])=>[t,n],()=>[])),([t,n])=>[wse(t),n]),vn=e=>D(D(Ble(e),([t,n])=>[t,n],()=>D(jle(e),([t,n])=>[t,n],()=>D(Ple(e),([t,n])=>[t,n],()=>D(Xy(e),([t,n])=>[t,n],()=>[])))),([t,n])=>[t,n]),Fle=e=>D(s_(e),([t,n])=>[Sse(t),n]),zle=e=>D(ti(e),([t,n])=>[t,n]),Ule=e=>D(o_(["'",'"'],e),([t,n])=>[t,n]),Hle=e=>D(D(ke("[",e),([t,n])=>D(ti(n),([r,i])=>D(ke(":",i),([a,o])=>D(D(t8(o),([c,u])=>[c,u],()=>D(e8(o),([c,u])=>[c,u],()=>D(J$(o),([c,u])=>[c,u],()=>D(n8(o),([c,u])=>[c,u],()=>[])))),([c,u])=>D(ke("]",u),([d,p])=>[[t,r,a,c,d],p]))))),([t,n])=>[Ase(t),n]),u8=e=>D(D(Fle(e),([t,n])=>[t,n],()=>D(zle(e),([t,n])=>[t,n],()=>D(Ule(e),([t,n])=>[t,n],()=>D(Hle(e),([t,n])=>[t,n],()=>[])))),([t,n])=>[t,n]),d8=e=>D(D(D(ke("readonly",e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>D([[],e],([t,n])=>[t,n],()=>[])),([t,n])=>[_se(t),n]),f8=e=>D(D(D(ke("?",e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>D([[],e],([t,n])=>[t,n],()=>[])),([t,n])=>[Cse(t),n]),p8=e=>D(D(d8(e),([t,n])=>D(u8(n),([r,i])=>D(f8(i),([a,o])=>D(ke(":",o),([c,u])=>D(vn(u),([d,p])=>[[t,r,a,c,d],p]))))),([t,n])=>[kse(t),n]),Qy=e=>D(D(D(ke(",",e),([t,n])=>D(ke(`
242
242
  `,n),([r,i])=>[[t,r],i])),([t,n])=>[t,n],()=>D(D(ke(";",e),([t,n])=>D(ke(`
243
243
  `,n),([r,i])=>[[t,r],i])),([t,n])=>[t,n],()=>D(D(ke(",",e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>D(D(ke(";",e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>D(D(ke(`
@@ -247,7 +247,7 @@ Error generating stack: `+g.message+`
247
247
 
248
248
  `);if(u<0)break;const d=i.slice(0,u);if(i=i.slice(u+2),!d||d.startsWith(":"))continue;const p=d.split(`
249
249
  `),h=(a=p.find(b=>b.startsWith("event:")))==null?void 0:a.slice(6).trim(),y=p.filter(b=>b.startsWith("data:")).map(b=>b.slice(5).trimStart()).join(`
250
- `);yield{event:h,data:y||void 0}}}}var Ec,zu,Om,Mf,Ji,Es,Df,ul,Lf,Pf,Im,Mm,Ia,dl,fl,vo,Uu,jn,uw,Nu,dw,fw,pw,mB,Cb,hw,gB,bB;class Ope{constructor(t={}){gr(this,jn);gr(this,Ec);gr(this,zu);gr(this,Om);gr(this,Mf);gr(this,Ji);gr(this,Es,new Set);gr(this,Df,new Map);gr(this,ul,new Map);gr(this,Lf,new Set);gr(this,Pf,new Set);gr(this,Im,{kind:"idle"});gr(this,Mm,Promise.resolve());gr(this,Ia);gr(this,dl);gr(this,fl);gr(this,vo);gr(this,Uu,0);jr(this,Ec,(t.baseUrl??"").replace(/\/$/,"")),jr(this,zu,t.fetch??((n,r)=>fetch(n,r))),jr(this,Om,t.retryDelayMs??Cpe),jr(this,Mf,t.idleTimeoutMs??kpe),jr(this,Ji,new Spe({send:n=>ar(this,jn,bB).call(this,n)})),Ze(this,Ji).onNotification(So.event,n=>ar(this,jn,gB).call(this,n))}get status(){return Ze(this,Im)}get connection(){return Ze(this,Ia)}call(t,n,r){return Ze(this,Ji).call(t,n,r)}subscribe(t,n,r,i){const a={contract:t,params:n,onMessage:r,onError:i,serverId:void 0};return Ze(this,Es).add(a),Ze(this,Ia)?ar(this,jn,hw).call(this,a):this.connect(),()=>{if(!Ze(this,Es).delete(a))return;const o=a.serverId;a.serverId=void 0,o&&Ze(this,Ia)&&Ze(this,Ji).request(So.unsubscribe,{subscription:o}).catch(()=>{}),ar(this,jn,uw).call(this)}}handle(t,n){const r=Ze(this,Ji).handle(t,n);return jr(this,Uu,Ze(this,Uu)+1),this.connect(),()=>{r(),jr(this,Uu,Ze(this,Uu)-1),ar(this,jn,uw).call(this)}}onStatus(t){return Ze(this,Lf).add(t),()=>{Ze(this,Lf).delete(t)}}onConnected(t){return Ze(this,Pf).add(t),()=>{Ze(this,Pf).delete(t)}}connect(){Ze(this,dl)||Ze(this,fl)!==void 0||ar(this,jn,pw).call(this)}close(){ar(this,jn,dw).call(this),ar(this,jn,Nu).call(this,{kind:"idle"})}}Ec=new WeakMap,zu=new WeakMap,Om=new WeakMap,Mf=new WeakMap,Ji=new WeakMap,Es=new WeakMap,Df=new WeakMap,ul=new WeakMap,Lf=new WeakMap,Pf=new WeakMap,Im=new WeakMap,Mm=new WeakMap,Ia=new WeakMap,dl=new WeakMap,fl=new WeakMap,vo=new WeakMap,Uu=new WeakMap,jn=new WeakSet,uw=function(){Ze(this,Es).size===0&&Ze(this,Uu)===0&&this.close()},Nu=function(t){jr(this,Im,t);for(const n of[...Ze(this,Lf)])n(t)},dw=function(){var t;Ze(this,fl)!==void 0&&clearTimeout(Ze(this,fl)),jr(this,fl,void 0),Ze(this,vo)!==void 0&&clearTimeout(Ze(this,vo)),jr(this,vo,void 0),(t=Ze(this,dl))==null||t.abort(),jr(this,dl,void 0),jr(this,Ia,void 0),Ze(this,Ji).cancelIncoming();for(const n of Ze(this,Es))n.serverId=void 0},fw=function(t){Ze(this,vo)!==void 0&&clearTimeout(Ze(this,vo)),jr(this,vo,setTimeout(()=>{jr(this,vo,void 0),Ze(this,dl)===t&&ar(this,jn,Cb).call(this,`The event stream has been silent for ${Math.round(Ze(this,Mf)/1e3)} s.`)},Ze(this,Mf)))},pw=function(){const t=new AbortController;jr(this,dl,t),ar(this,jn,Nu).call(this,{kind:"connecting"}),ar(this,jn,mB).call(this,t).catch(n=>{t.signal.aborted||ar(this,jn,Cb).call(this,_T(n))})},mB=async function(t){const n=await Ze(this,zu).call(this,`${Ze(this,Ec)}${Ape}`,{headers:{accept:"text/event-stream"},signal:t.signal,cache:"no-store"});if(n.status===401){jr(this,dl,void 0),Ze(this,Ji).cancelIncoming(),ar(this,jn,Nu).call(this,{kind:"unauthorized"});return}if(!n.ok||!n.body)throw new Error(`The event stream responded with ${n.status}.`);ar(this,jn,fw).call(this,t);for await(const r of Rpe(n.body,()=>ar(this,jn,fw).call(this,t))){if(t.signal.aborted)return;if(r.event==="hello"){jr(this,Ia,JSON.parse(r.data??"{}").connection),ar(this,jn,Nu).call(this,{kind:"connected"}),await Promise.all([...Ze(this,Es)].map(a=>ar(this,jn,hw).call(this,a)));for(const a of[...Ze(this,Pf)])a();continue}if(r.data===void 0)continue;const i=JSON.parse(r.data);lM(i)&&Ze(this,Ji).receive(i)}t.signal.aborted||ar(this,jn,Cb).call(this,"The server ended the event stream.")},Cb=function(t){var n;ar(this,jn,dw).call(this),ar(this,jn,Nu).call(this,{kind:"retrying",message:t});for(const r of Ze(this,Es))(n=r.onError)==null||n.call(r,t);jr(this,fl,setTimeout(()=>{jr(this,fl,void 0),Ze(this,Es).size>0||Ze(this,Uu)>0?ar(this,jn,pw).call(this):ar(this,jn,Nu).call(this,{kind:"idle"})},Ze(this,Om)))},hw=async function(t){var r;const n=Ze(this,Ia);if(!(!n||t.serverId!==void 0))try{const{subscription:i}=await Ze(this,Ji).request(So.subscribe,{channel:t.contract.id,params:t.params});if(Ze(this,Ia)!==n||!Ze(this,Es).has(t)){Ze(this,Ia)===n&&Ze(this,Ji).request(So.unsubscribe,{subscription:i}).catch(()=>{});return}t.serverId=i;const a=Ze(this,ul).get(i);Ze(this,ul).delete(i);for(const o of(a==null?void 0:a.messages)??[])t.onMessage(o)}catch(i){(r=t.onError)==null||r.call(t,`Channel ${t.contract.id}: ${_T(i)}`)}},gB=function(t){const n=[...Ze(this,Es)].find(a=>a.serverId===t.subscription);if(n){n.onMessage(t.message);return}const r=Date.now();for(const[a,o]of Ze(this,ul))r-o.at>Npe&&Ze(this,ul).delete(a);const i=Ze(this,ul).get(t.subscription)??{at:r,messages:[]};i.messages.push(t.message),Ze(this,ul).set(t.subscription,i)},bB=async function(t){if(mC(t)&&t.method===So.cancel){const a=String(t.params.id),o=Ze(this,Df).get(a);if(o){o.abort();return}}const n={"content-type":"application/json"};if(Ze(this,Ia)&&(n[_pe]=Ze(this,Ia)),!hC(t)){if(!Ze(this,Ia))return;const a=Ze(this,Mm).then(()=>Ze(this,zu).call(this,`${Ze(this,Ec)}${cM}`,{method:"POST",headers:n,body:JSON.stringify(t)}));jr(this,Mm,a.then(()=>{},()=>{})),await a;return}const r=String(t.id),i=new AbortController;Ze(this,Df).set(r,i);try{const a=await Ze(this,zu).call(this,`${Ze(this,Ec)}${cM}`,{method:"POST",headers:n,body:JSON.stringify(t),signal:i.signal}),o=await a.json().catch(()=>{});if(lM(o)){Ze(this,Ji).receive(o);return}const c=o,u=typeof(c==null?void 0:c.error)=="string"?c.error:`The server responded with ${a.status}.`;Ze(this,Ji).receive($u(t.id,Ma.application,u,{code:typeof(c==null?void 0:c.code)=="string"?c.code:"http-error",status:a.status}))}catch(a){const o=i.signal.aborted;Ze(this,Ji).receive($u(t.id,o?Ma.cancelled:Ma.connectionClosed,o?"Cancelled":`${Ze(this,Ec)||"The server"} is unreachable: ${_T(a)}`))}finally{Ze(this,Df).delete(r)}};const ur=new Ope,Ipe=Object.freeze(Object.defineProperty({__proto__:null,rpc:ur},Symbol.toStringTag,{value:"Module"})),Mpe="ragents.system-prompt",Dpe="ragents.model",gC=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Lpe=e=>gC(e)&&typeof e.value=="string"&&e.value.length>0&&typeof e.label=="string"&&e.label.length>0&&(e.hint===void 0||typeof e.hint=="string"),Ppe=(e,t)=>{if(!gC(e))throw new Error(`The start option ${t} provides no presentation`);if(e.kind==="choice"){if(typeof e.label!="string"||!e.label)throw new Error(`The choice presentation of the start option ${t} has no label`);if(!Array.isArray(e.options)||!e.options.every(Lpe))throw new Error(`The choice presentation of the start option ${t} needs options made of value and label`);return{kind:"choice",label:e.label,options:e.options}}},yB=e=>{if(!gC(e)||typeof e.id!="string"||!e.id||typeof e.owner!="string"||!e.owner||!("value"in e)||!("presentation"in e)||typeof e.selectable!="boolean"||typeof e.locked!="boolean"||typeof e.chosen!="boolean")throw new Error("The start option does not match the expected format");return{id:e.id,owner:e.owner,value:e.value,presentation:e.presentation,selectable:e.selectable,locked:e.locked,chosen:e.chosen}},xB=async(e,t,n=ur)=>{await n.call(Zf.interruptTurn,{runId:e,commandId:crypto.randomUUID(),actorId:t})},vB=async(e,t,n=ur)=>{await n.call(Zf.restartActor,{runId:e,commandId:crypto.randomUUID(),actorId:t})},jpe=async(e,t,n,r,i=ur)=>{await i.call(Li.chat.sendToActor,{runId:e,actorId:t,text:n,attachments:r})},$pe=async(e,t,n=ur)=>{await n.call(Zf.stopAll,{runId:e,commandId:crypto.randomUUID(),reason:t})},EB=async(e,t,n=ur)=>{await n.call(Zf.resolveAction,{runId:e,commandId:crypto.randomUUID(),actionId:t,decision:"dismissed"})},Bpe=(e=ur)=>e.call(Li.runs.list,{}),Fpe=async(e,t=ur)=>{await t.call(Li.runs.delete,{runId:e})},TB=async(e,t=ur)=>await t.call(Zf.view,{runId:e})??void 0,wB=async(e,t=ur)=>(await t.call(Li.chat.actorHistory,{runId:e})).actors,mw=async(e,t,n=ur)=>(await n.call(Li.startOptions.list,{runId:e},{signal:t})).map(yB),SB=async(e,t,n,r=ur)=>yB(await r.call(Li.startOptions.select,{runId:e,optionId:t,value:n})),bC=e=>Array.isArray(e)&&e.every(t=>typeof t=="string"),AB=e=>e==="manual"||e==="agent"||e==="claude-code"||e==="codex",zpe=e=>e==="off"||e==="minimal"||e==="low"||e==="medium"||e==="high"||e==="xhigh"||e==="max",Upe=e=>_n(e)&&AB(e.driver)&&typeof e.provider=="string"&&typeof e.model=="string"&&typeof e.label=="string",Hpe=e=>_n(e)&&typeof e.name=="string"&&typeof e.description=="string"&&AB(e.driver)&&(e.turnTimeoutMs===null||typeof e.turnTimeoutMs=="number")&&typeof e.isolateWorkspace=="boolean"&&(e.driver!=="agent"||typeof e.provider=="string"&&typeof e.model=="string"&&(e.thinking===void 0||zpe(e.thinking))),qpe=e=>_n(e)&&typeof e.id=="string"&&typeof e.owner=="string"&&typeof e.order=="number"&&typeof e.content=="string",Vpe=e=>_n(e)&&typeof e.id=="string"&&bC(e.requires)&&(e.clientConfig===void 0||_n(e.clientConfig))&&Array.isArray(e.configuration)&&e.configuration.every(t=>_n(t)&&typeof t.key=="string"&&typeof t.source=="string"&&typeof t.secret=="boolean"),Gpe=e=>_n(e)&&typeof e.id=="string"&&typeof e.owner=="string"&&(e.kind==="plugin"||e.kind==="internal")&&typeof e.resolvesPerAgent=="boolean"&&Array.isArray(e.factories)&&e.factories.every(t=>_n(t)&&typeof t.name=="string"&&t.scope==="per-agent"),_B=e=>_n(e)&&typeof e.id=="string"&&typeof e.owner=="string"&&Array.isArray(e.audiences)&&e.audiences.every(t=>t==="coordinator"||t==="agent")&&bC(e.paths),Kpe=e=>_n(e)&&typeof e.root=="string"&&typeof e.path=="string"&&typeof e.bytes=="number"&&(e.frontMatter===null||typeof e.frontMatter=="string")&&(e.content===null||typeof e.content=="string"),Ype=e=>_n(e)&&vj(e,["id","name","description","owner","source","kind","scope","availability","availabilityDetail",..."requiredCapabilities"in e?["requiredCapabilities"]:[],..."nativeTool"in e?["nativeTool"]:[]])&&typeof e.id=="string"&&typeof e.name=="string"&&typeof e.description=="string"&&typeof e.owner=="string"&&typeof e.source=="string"&&(e.kind==="ragents"||e.kind==="plugin")&&(e.scope==="global"||e.scope==="per-agent"||e.scope==="per-turn")&&(e.availability==="always"||e.availability==="conditional")&&typeof e.availabilityDetail=="string"&&(e.requiredCapabilities===void 0||bC(e.requiredCapabilities))&&(e.nativeTool===void 0||typeof e.nativeTool=="boolean"),Wpe=e=>_n(e)&&(e.audience==="coordinator"||e.audience==="agent")&&typeof e.content=="string",Xpe=e=>_n(e)&&e.scope==="product"&&typeof e.content=="string"&&e.finalPromptIsRunSpecific===!0&&typeof e.composition=="string"&&Array.isArray(e.runtimeContracts)&&e.runtimeContracts.every(Wpe),Qpe=e=>!_n(e)||typeof e.profile!="string"||e.profile.length===0||e.configFile!==null&&typeof e.configFile!="string"||typeof e.workspaceMode!="string"||e.workspaceMode.length===0||!_n(e.host)||e.host.mode!=="native"&&e.host.mode!=="container"||typeof e.host.platform!="string"||typeof e.host.workingDirectory!="string"||typeof e.dataDirectory!="string"||!_n(e.workspace)||typeof e.workspace.directoryPattern!="string"?!1:e.documents===null||_n(e.documents)&&typeof e.documents.directoryPattern=="string",Zpe=e=>{if(!_n(e)||e.version!==2||!_n(e.product)||typeof e.product.id!="string"||typeof e.product.title!="string"||!Qpe(e.runtime)||!Array.isArray(e.models)||!e.models.every(Upe)||!Array.isArray(e.profiles)||!e.profiles.every(Hpe)||!Xpe(e.systemPrompt)||!Array.isArray(e.promptContributions)||!e.promptContributions.every(qpe)||!Array.isArray(e.plugins)||!e.plugins.every(Vpe)||!Array.isArray(e.agentHooks)||!e.agentHooks.every(Gpe)||!Array.isArray(e.skills)||!e.skills.every(_B)||!Array.isArray(e.tools)||!e.tools.every(Ype))throw new Error("The settings do not match the expected format");return e},CB=async(e,t=ur)=>Zpe(await t.call(Li.settings.read,{},{signal:e})),Jpe=e=>{if(!_n(e)||!_B(e)||!Array.isArray(e.files)||!e.files.every(Kpe))throw new Error("The skill does not match the expected format");return e},kB=async(e,t,n=ur)=>{const r=await n.call(Li.settings.skill,{id:e},{signal:t});if(r===null)throw new Error("The skill could not be loaded");return Jpe(r)},ehe=Object.freeze(Object.defineProperty({__proto__:null,deleteSession:Fpe,dismissAction:EB,getActorConversations:wB,getRunView:TB,getSettings:CB,getSettingsSkill:kB,getStartOptions:mw,interruptActorTurn:xB,listSessions:Bpe,restartChatActor:vB,sendActorMessage:jpe,setStartOption:SB,stopRun:$pe},Symbol.toStringTag,{value:"Module"}));function the({nextBehavior:e,onClose:t,onNavigate:n}){let r=[{key:0,page:null}],i=1;const a=new Set,o=c=>{n==null||n(r[r.length-1].key),r=c;for(const u of a)u()};return{get canGoBack(){return r.length>1},open(c){if(!c.title.trim())throw new Error("A dialog step requires a title.");const u=e()==="push"?r:r.slice(0,-1);o([...u,{key:i++,page:c}])},back(){if(r.length<2)throw new Error("There is no previous dialog step.");o(r.slice(0,-1))},close(){t()},reset(){(r.length!==1||r[0].page!==null)&&o([{key:0,page:null}])},getSnapshot:()=>r,subscribe(c){return a.add(c),()=>{a.delete(c)}}}}const NB=x.createContext(null);function nhe(){const e=x.useContext(NB);if(!e)throw new Error("The dialog controller requires a modal host.");return e}function rhe({children:e,className:t,initialFocus:n,keepMounted:r,nextBehavior:i="push",onClose:a,open:o=!0,overlayClassName:c,scope:u="run",showCloseButton:d=!1,size:p="medium"}){var C;const h=x.useRef(a);h.current=a;const y=x.useRef(i);y.current=i;const[b]=x.useState(()=>the({nextBehavior:()=>y.current,onClose:()=>h.current()})),v=x.useSyncExternalStore(b.subscribe,b.getSnapshot,b.getSnapshot),T=v[v.length-1],A=x.useMemo(()=>({canGoBack:v.length>1,open:b.open,back:b.back,close:b.close}),[b,v]),w=()=>b.canGoBack?b.back():b.close(),k=x.useRef(o);return k.current&&!o&&b.reset(),k.current=o,m.jsx(wy,{open:o,onOpenChange:R=>{R||w()},modal:u==="page"?!0:"trap-focus",disablePointerDismissal:u!=="page",children:m.jsx(Sy,{className:t,initialFocus:((C=T.page)==null?void 0:C.initialFocusRef)??n??!0,keepMounted:r,onBackdropClick:w,open:o,overlayClassName:c,scope:u,showCloseButton:d||T.page!==null,size:p,children:m.jsx(NB.Provider,{value:A,children:v.map(R=>m.jsx("div",{className:De("contents",R.key!==T.key&&"hidden"),hidden:R.key!==T.key,inert:R.key!==T.key,children:R.page?m.jsxs(m.Fragment,{children:[m.jsxs(rA,{className:"flex-row items-start gap-3 px-4 pt-4 pb-3",children:[m.jsx(Er,{"aria-label":"Back",onClick:b.back,size:"icon-sm",variant:"ghost",children:m.jsx(AS,{})}),m.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[m.jsx(Qm,{children:R.page.title}),R.page.subtitle&&m.jsx(aA,{children:R.page.subtitle})]})]}),m.jsx(iA,{children:R.page.render(A)})]}):e},R.key))})})})}const CT=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`;function ihe(e,t=new Date){const n=CT(t),r=new Date(t);r.setDate(r.getDate()-1);const i=new Map;for(const a of[...e].sort((o,c)=>c.updatedAt-o.updatedAt||o.id.localeCompare(c.id))){const o=new Date(a.updatedAt),c=CT(o),u=i.get(c)??{date:c,label:c===n?"Today":c===CT(r)?"Yesterday":o.toLocaleDateString("en-US",{weekday:"long",day:"numeric",month:"long",...o.getFullYear()===t.getFullYear()?{}:{year:"numeric"}}),sessions:[]};u.sessions.push(a),i.set(c,u)}return[...i.values()]}function ahe(e,t){if(e.revision!==void 0)return t===void 0?"unseen":e.revision>t?"updated":void 0}const she="flex min-h-[148px] min-w-0 flex-1 cursor-pointer flex-col items-center justify-center gap-2 rounded-[12px] border border-dashed border-border-strong text-[0.9rem] font-semibold text-muted-foreground hover:border-primary hover:bg-[color-mix(in_srgb,var(--primary)_6%,var(--background))] hover:text-primary focus-visible:outline-2 focus-visible:outline-primary focus-visible:outline-offset-2",uM="grid list-none grid-cols-[repeat(auto-fill,minmax(min(100%,240px),1fr))] items-stretch gap-3",ohe=e=>{const t=new Date(e),n=new Date;return t.toDateString()===n.toDateString()?t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}):t.toLocaleDateString("en-US",{day:"2-digit",month:"2-digit"})},lhe={locked:{card:"border-[color-mix(in_srgb,var(--destructive)_55%,var(--border))]",head:"border-t-destructive bg-destructive/8",text:"text-destructive"},running:{card:"border-[color-mix(in_srgb,var(--info)_55%,var(--border))]",head:"border-t-info bg-info/8",text:"text-info"},unread:{card:"border-[color-mix(in_srgb,var(--primary)_55%,var(--border))]",head:"border-t-primary bg-primary/8",text:"text-primary"},idle:{card:"border-border",head:"border-t-muted-foreground bg-muted-foreground/8",text:"text-muted-foreground"}};function HLe({sessions:e,seenRevisions:t={},activeId:n,onSelect:r,onDelete:i,registry:a,selectMode:o,selectedIds:c,onToggleSelected:u,onCreate:d}){const p=d&&!o&&m.jsx("li",{className:"flex min-w-0",children:m.jsxs("button",{className:she,onClick:d,type:"button",children:[m.jsx(z4,{"aria-hidden":!0,className:"size-5"}),"New run"]})});return e.length===0?p?m.jsx("ul",{className:uM,children:p}):m.jsx(Vu,{className:"py-16 text-[0.9rem] text-muted-foreground",children:"No runs yet."}):m.jsx("div",{className:"grid gap-6.5",children:ihe(e).map((h,y)=>m.jsxs("section",{"aria-label":h.label,children:[m.jsxs("h3",{className:"mb-3 flex items-center gap-2.5 text-[0.85rem] after:flex-1 after:border-t after:border-border-soft after:content-['']",children:[m.jsx("time",{dateTime:h.date,children:h.label}),m.jsx("span",{className:"text-[0.7rem] font-normal text-muted-foreground",children:h.sessions.length})]}),m.jsxs("ul",{className:uM,children:[y===0&&p,h.sessions.map(b=>{const v=b.locked===void 0?ahe(b,t[b.id]):void 0,T=lhe[b.locked!==void 0?"locked":b.running?"running":v?"unread":"idle"],A=b.id===n||o&&c.has(b.id);return m.jsxs("li",{className:De("relative flex min-w-0 rounded-[12px] border bg-background",A?"border-primary bg-[color-mix(in_srgb,var(--primary)_8%,var(--background))]":De(T.card,"hover:border-muted-foreground hover:bg-[color-mix(in_srgb,var(--primary)_3%,var(--background))]")),children:[o&&m.jsx("input",{"aria-label":`Select ${b.title} for deletion`,checked:c.has(b.id),className:"absolute top-[17px] left-3.5 z-1 flex-none cursor-pointer accent-primary",onChange:()=>u(b.id),type:"checkbox"}),m.jsxs("button",{"aria-current":b.id===n?"true":void 0,"aria-pressed":o?c.has(b.id):void 0,className:De("flex min-h-[148px] min-w-0 flex-1 cursor-pointer flex-col items-stretch gap-2.5 rounded-[11px] px-4 pb-4 text-left focus-visible:outline-2 focus-visible:outline-primary focus-visible:outline-offset-2 disabled:cursor-default",o&&"pl-9"),disabled:b.locked!==void 0&&!o,onClick:()=>o?u(b.id):r(b.id),type:"button",children:[m.jsxs("span",{className:De("-mx-4 flex flex-col gap-2.5 rounded-t-[11px] border-t-[3px] px-4 pt-3.5 pb-3",T.head,o&&"-ml-9 pl-9"),children:[m.jsx("span",{className:"pr-6 text-[0.9rem] leading-[1.45] font-semibold [overflow-wrap:anywhere]",title:b.title,children:b.title}),m.jsxs("span",{className:"flex min-h-[18px] flex-wrap items-center gap-x-3.5 gap-y-1.5",children:[m.jsxs("span",{className:De("flex items-center gap-[7px] text-[0.75rem]",T.text),children:[b.running?m.jsx(Wc,{"aria-hidden":!0,className:"size-3"}):m.jsx("span",{"aria-hidden":!0,className:"size-[7px] flex-none rounded-full bg-current"}),b.locked!==void 0?"Locked":b.running?"Running":b.id===n?"Open":"Idle"]}),v&&m.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[0.7rem] font-semibold text-primary",title:v==="updated"?"New journal activity since you last viewed this run":"Not viewed in this browser yet",children:[m.jsx("span",{"aria-hidden":!0,className:"size-[7px] flex-none rounded-full bg-current"}),v==="updated"?"New activity":"Not viewed"]})]})]}),b.locked!==void 0?m.jsx("span",{className:"text-[0.75rem] leading-[1.45] text-destructive [overflow-wrap:anywhere]",children:b.locked}):a.sessionMetadata.map(({id:w,Metadata:k})=>m.jsx(k,{placement:"list",session:b},w)),m.jsxs("span",{className:"mt-auto grid gap-0.5 text-muted-foreground",children:[b.createdAt!==void 0&&m.jsxs("span",{className:"text-[0.7rem] tabular-nums",children:["Created ",m.jsx("time",{dateTime:new Date(b.createdAt).toISOString(),children:new Date(b.createdAt).toLocaleString("en-US",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})})]}),m.jsxs("span",{className:"text-[0.7rem] tabular-nums",children:["Last activity ",ohe(b.updatedAt)]})]})]}),!o&&i&&m.jsx(Er,{"aria-label":`Delete ${b.title}`,className:"absolute top-2.5 right-2.5 text-destructive hover:bg-destructive/12 hover:text-destructive",onClick:()=>i(b.id),size:"icon-sm",title:`Delete ${b.title}`,variant:"ghost",children:m.jsx(yX,{})})]},b.id)})]})]},h.date))})}var f1=8,yC=20*1024*1024,che=(e,t)=>{var i;const n=t.trim().toLowerCase();return n?n==="video/quicktime"?"video/mov":n:{png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",avif:"image/avif",svg:"image/svg+xml",pdf:"application/pdf",mp4:"video/mp4",webm:"video/webm",mov:"video/mov",mpeg:"video/mpeg",mpg:"video/mpeg",txt:"text/plain",md:"text/markdown",csv:"text/csv",tsv:"text/tab-separated-values",json:"application/json",jsonl:"application/x-ndjson",xml:"application/xml",yaml:"application/yaml",yml:"application/yaml",ts:"text/plain",tsx:"text/plain",js:"application/javascript",py:"text/plain",cs:"text/plain",fs:"text/plain",html:"text/html",css:"text/css",log:"text/plain"}[((i=e.split(".").at(-1))==null?void 0:i.toLowerCase())??""]??"application/octet-stream"},uhe=0,Rh=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`qsl-${Date.now().toString(36)}-${(uhe+=1).toString(36)}`;function RB(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(!n.closed&&(n.role==="assistant"||n.role==="thinking"))return t}return-1}function Oh(e){const t=RB(e);return t===-1?e:e.map((n,r)=>r===t?{...n,closed:!0}:n)}function dM(e,t,n,r,i){var c,u;const a=RB(e),o=e[a];return o&&o.role===t&&((c=o.textCursor)==null?void 0:c.conversationId)===(i==null?void 0:i.conversationId)&&((u=o.textCursor)==null?void 0:u.sequence)===(i==null?void 0:i.sequence)?e.map((d,p)=>p===a?{...d,text:d.text+n,...i?{textCursor:i}:{}}:d):[...Oh(e),{key:Rh(),role:t,text:n,at:r,...i?{textCursor:i}:{}}]}function OB(e,t){var n;switch(t.kind){case"reset":return[];case"user":return[...e,{key:Rh(),role:"user",text:t.text,closed:!0,at:t.at,...t.inputId?{inputId:t.inputId}:{},...(n=t.attachments)!=null&&n.length?{attachments:t.attachments}:{}}];case"steered":return e.map(r=>r.inputId===t.inputId?{...r,steered:!0}:r);case"text":return dM(e,"assistant",t.delta,t.at,t.cursor);case"thinking":return dM(e,"thinking",t.delta,t.at);case"tool":return[...Oh(e),{key:Rh(),role:"tool",text:t.label??t.name,closed:!0,tool:{id:t.id,name:t.name,arguments:t.arguments},at:t.at}];case"tool-result":{const r=e.map(i=>{var a;return(a=i.tool)==null?void 0:a.id}).lastIndexOf(t.id);return e.map((i,a)=>a===r&&i.tool?{...i,tool:{...i.tool,result:t.result,isError:t.isError}}:i)}case"action":return[...Oh(e),{key:Rh(),role:"action",text:t.text,closed:!0,action:{actionId:t.actionId,owner:t.owner,payload:t.payload},at:t.at}];case"action-resolved":return e.map(r=>{var i;return((i=r.action)==null?void 0:i.actionId)===t.actionId?{...r,action:{...r.action,status:t.status,result:t.result}}:r});case"system":return[...Oh(e),{key:Rh(),role:"system",text:t.text,closed:!0,at:t.at}];case"turn-done":return Oh(e);default:return e}}function mx(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function dhe(e){const t=e.arguments.replace(/\s+/g," ").trim(),n=t&&t!=="{}"?`${e.name} ${t}`:e.name;return n.length>160?`${n.slice(0,160)} ...`:n}var fM=Object.defineProperty,fhe=(e,t)=>{let n={};for(var r in e)fM(n,r,{get:e[r],enumerable:!0});return fM(n,Symbol.toStringTag,{value:"Module"}),n},phe=fhe({isAny:()=>DB,isAnyNonArbitrary:()=>Che,isArbitraryFamilyName:()=>Dhe,isArbitraryImage:()=>Phe,isArbitraryLength:()=>Ohe,isArbitraryNumber:()=>Ihe,isArbitraryPosition:()=>Lhe,isArbitraryShadow:()=>jhe,isArbitrarySize:()=>Rhe,isArbitraryValue:()=>UB,isArbitraryVariable:()=>HB,isArbitraryVariableFamilyName:()=>Bhe,isArbitraryVariableImage:()=>Uhe,isArbitraryVariableLength:()=>$he,isArbitraryVariablePosition:()=>Fhe,isArbitraryVariableShadow:()=>Hhe,isArbitraryVariableSize:()=>zhe,isArbitraryVariableWeight:()=>qhe,isArbitraryWeight:()=>Mhe,isFraction:()=>vhe,isInteger:()=>Ehe,isNamedContainerQuery:()=>khe,isNumber:()=>xC,isPercent:()=>The,isTshirtSize:()=>whe});const IB=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,MB=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hhe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,mhe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ghe=/\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$/,bhe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yhe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xhe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vhe=e=>hhe.test(e),xC=e=>!!e&&!Number.isNaN(Number(e)),Ehe=e=>!!e&&Number.isInteger(Number(e)),The=e=>e.endsWith("%")&&xC(e.slice(0,-1)),whe=e=>mhe.test(e),DB=()=>!0,She=e=>ghe.test(e)&&!bhe.test(e),vC=()=>!1,Ahe=e=>yhe.test(e),_he=e=>xhe.test(e),Che=e=>!UB(e)&&!HB(e),khe=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)),Jc=(e,t,n)=>{const r=IB.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},vd=(e,t,n=!1)=>{const r=MB.exec(e);return r?r[1]?t(r[1]):n:!1},LB=e=>e==="position"||e==="percentage",PB=e=>e==="image"||e==="url",jB=e=>e==="length"||e==="size"||e==="bg-size",$B=e=>e==="length",Nhe=e=>e==="number",BB=e=>e==="family-name",FB=e=>e==="number"||e==="weight",zB=e=>e==="shadow",Rhe=e=>Jc(e,jB,vC),UB=e=>IB.test(e),Ohe=e=>Jc(e,$B,She),Ihe=e=>Jc(e,Nhe,xC),Mhe=e=>Jc(e,FB,DB),Dhe=e=>Jc(e,BB,vC),Lhe=e=>Jc(e,LB,vC),Phe=e=>Jc(e,PB,_he),jhe=e=>Jc(e,zB,Ahe),HB=e=>MB.test(e),$he=e=>vd(e,$B),Bhe=e=>vd(e,BB),Fhe=e=>vd(e,LB),zhe=e=>vd(e,jB),Uhe=e=>vd(e,PB),Hhe=e=>vd(e,zB,!0),qhe=e=>vd(e,FB,!0),pM=(e,t)=>{const n=Object.keys(e);return n.length===1&&n[0]===t&&typeof e[t]=="string"},Vhe=e=>typeof e=="function"&&e.isThemeGetter===!0,Ghe=e=>({...e,theme:{...e.theme},classGroups:{...e.classGroups},conflictingClassGroups:{...e.conflictingClassGroups},conflictingClassGroupModifiers:{...e.conflictingClassGroupModifiers},orderSensitiveModifiers:[...e.orderSensitiveModifiers],postfixLookupClassGroups:[...e.postfixLookupClassGroups??[]]}),Khe=(e,t)=>{const n=Ghe(e);t.prefix!==void 0&&(n.prefix=t.prefix);const r=(c,u)=>{if(u)for(const d in u)u[d]!==void 0&&(c[d]=u[d])},i=t.override;i&&(i.orderSensitiveModifiers&&(n.orderSensitiveModifiers=[...i.orderSensitiveModifiers]),r(n.theme,i.theme),r(n.classGroups,i.classGroups),r(n.conflictingClassGroups,i.conflictingClassGroups),r(n.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers));const a=(c,u)=>{if(u)for(const d in u){const p=u[d];p&&(c[d]=(c[d]??[]).concat(p))}},o=t.extend;return o&&(o.orderSensitiveModifiers&&(n.orderSensitiveModifiers=[...n.orderSensitiveModifiers,...o.orderSensitiveModifiers]),a(n.theme,o.theme),a(n.classGroups,o.classGroups),a(n.conflictingClassGroups,o.conflictingClassGroups),a(n.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers)),n},qB={isAny:0,isAnyNonArbitrary:1,isArbitraryValue:2,isArbitraryVariable:3,isFraction:4,isNumber:5,isInteger:6,isPercent:7,isTshirtSize:8,isNamedContainerQuery:9,isArbitraryLength:10,isArbitraryNumber:11,isArbitraryWeight:12,isArbitraryFamilyName:13,isArbitraryPosition:14,isArbitrarySize:15,isArbitraryImage:16,isArbitraryShadow:17,isArbitraryVariableLength:18,isArbitraryVariableFamilyName:19,isArbitraryVariablePosition:20,isArbitraryVariableSize:21,isArbitraryVariableImage:22,isArbitraryVariableShadow:23,isArbitraryVariableWeight:24},Yhe=25,Whe=()=>({names:[],idByName:new Map,impls:{},fnName:new Map,classifierFns:new Map}),hM=(e,t,n)=>{let r=e.idByName.get(t);return r===void 0&&(r=e.names.length,e.names.push(t),e.idByName.set(t,r),e.classifierFns.set(t,n)),r},mM=(e,t)=>{if(typeof t=="function"){let i=e.fnName.get(t);return i===void 0&&(i="$c"+e.fnName.size,e.fnName.set(t,i),e.impls[i]=t),hM(e,i,t)}const n=t.$v,r=phe[n];if(qB[n]===void 0||!r)throw new Error(`cn: unknown validator "${n}"`);return hM(e,n,r)},gM=()=>({nextPart:new Map,validators:null,classGroupId:-1,lit:[]}),Xhe=(e,t)=>e.theme[t]??[],Qhe=(e,t,n)=>{const r=gM(),i=(o,c)=>{for(const u of c.split("-")){let d=o.nextPart.get(u);d||(d=gM(),o.nextPart.set(u,d)),o=d}return o},a=(o,c,u)=>{if(typeof o=="string"){const d=o===""?c:i(c,o);d.classGroupId=u;return}if(typeof o=="function"){if(Vhe(o)){for(const d of o(e.theme))a(d,c,u);return}(c.validators??(c.validators=[])).push({validatorId:mM(t,o),groupId:u});return}if(pM(o,"$t")){for(const d of Xhe(e,o.$t))a(d,c,u);return}if(pM(o,"$v")){(c.validators??(c.validators=[])).push({validatorId:mM(t,o),groupId:u});return}for(const[d,p]of Object.entries(o)){const h=i(c,d);for(const y of p)a(y,h,u)}};for(const[o,c]of Object.entries(e.classGroups)){const u=n(o);for(const d of c)a(d,r,u)}return r},Zhe=e=>{const t=Whe(),n=[],r=new Map,i=Q=>{let se=r.get(Q);return se===void 0&&(se=n.length,n.push(Q),r.set(Q,se)),se},a=Qhe(e,t,i),o=Q=>{if(Q.validators)return!1;for(const se of Q.nextPart.values())if(!o(se))return!1;return!0},c=(Q,se,pe)=>{Q.classGroupId>=0&&pe.push({tail:se,gid:Q.classGroupId});for(const[Be,xe]of Q.nextPart)c(xe,se+"-"+Be,pe)},u=Q=>{for(const[se,pe]of[...Q.nextPart])o(pe)?(c(pe,se,Q.lit),Q.nextPart.delete(se)):u(pe)};u(a);const d=[{edges:new Map,groupId:-1,vlist:-1}],p=()=>(d.push({edges:new Map,groupId:-1,vlist:-1}),d.length-1),h=[],y=new Map,b=Q=>{const se=Q.map(Be=>Be.validatorId+":"+Be.groupId).join(",");let pe=y.get(se);return pe===void 0&&(pe=h.length,h.push(Q.map(Be=>[Be.validatorId,Be.groupId])),y.set(se,pe)),pe},v=(Q,se)=>{let pe=Q;for(let Be=0;Be<se.length;Be++){const xe=se.charCodeAt(Be);let Qe=d[pe].edges.get(xe);Qe===void 0&&(Qe=p(),d[pe].edges.set(xe,Qe)),pe=Qe}return pe},T=45,A=[],w=(Q,se,pe)=>{Q.classGroupId>=0&&(d[se].groupId=Q.classGroupId),Q.validators&&(d[se].vlist=b(Q.validators));for(const{tail:Be,gid:xe}of Q.lit)A.push({anchor:se,tail:Be,gid:xe});for(const[Be,xe]of Q.nextPart){let Qe=se;if(!pe){let ue=d[se].edges.get(T);ue===void 0&&(ue=p(),d[se].edges.set(T,ue)),Qe=ue}const oe=v(Qe,Be);w(xe,oe,!1)}};w(a,0,!0);const k=new Set(A.map(Q=>Q.anchor)),C=Q=>d[Q].groupId>=0||d[Q].vlist>=0||k.has(Q),R=new Map,O=[],N=Q=>{const se=O.length;R.set(Q,se);const pe={edges:[],groupId:d[Q].groupId,vlist:d[Q].vlist};O.push(pe);const Be=[...d[Q].edges.entries()].sort((xe,Qe)=>xe[0]-Qe[0]);for(const[xe,Qe]of Be){let oe=String.fromCharCode(xe),ue=Qe;for(;d[ue].edges.size===1&&!C(ue);){const[[ze,nt]]=d[ue].edges.entries();oe+=String.fromCharCode(ze),ue=nt}pe.edges.push({label:oe,oldTarget:ue})}for(const xe of pe.edges)N(xe.oldTarget);return se};N(0);const I=O.length;let L=0;for(const Q of O)L+=Q.edges.length;const j=new Int32Array(I),P=new Int32Array(L);let B="";const U=new Int32Array(I),q=new Int32Array(I),K=[];{let Q=0;for(let se=0;se<I;se++){const pe=O[se];j[se]=pe.edges.length;for(const Be of pe.edges)P[Q]=Be.label.length,B+=Be.label,K.push(R.get(Be.oldTarget)),Q++;U[se]=pe.groupId,q[se]=pe.vlist}}{const Q=new Int32Array(I);for(let pe=I-1;pe>=0;pe--){let Be=1,xe=pe+1;for(let Qe=0;Qe<j[pe];Qe++)Be+=Q[xe],xe+=Q[xe];Q[pe]=Be}let se=0;for(let pe=0;pe<I;pe++){let Be=pe+1;for(let xe=0;xe<j[pe];xe++){if(Be!==K[se])throw new Error(`cn compiler: edge target mismatch at ${se}`);Be+=Q[Be],se++}}}for(const Q of A)Q.anchor=R.get(Q.anchor);{const Q=new Int32Array(h.length).fill(-1),se=[];for(let pe=0;pe<I;pe++){const Be=q[pe];Be>=0&&(Q[Be]===-1&&(Q[Be]=se.length,se.push(h[Be])),q[pe]=Q[Be])}h.length=0,h.push(...se)}let V=0;for(const Q of h)V+=Q.length;const H=new Int32Array(V),W=new Int32Array(V);{let Q=0;for(const se of h)for(const[pe,Be]of se)H[Q]=pe,W[Q]=Be,Q++}A.sort((Q,se)=>Q.anchor-se.anchor||Q.gid-se.gid||(Q.tail<se.tail?-1:1));const Y=[];for(const Q of A){const se=Y[Y.length-1];se&&se.anchor===Q.anchor&&se.gid===Q.gid?se.tails.push(Q.tail):Y.push({anchor:Q.anchor,gid:Q.gid,tails:[Q.tail],set:-1})}const te=new Map,M=[];for(const Q of Y){const se=Q.tails.join(" ");let pe=te.get(se);pe===void 0&&(pe=M.length,te.set(se,pe),M.push(Q.tails)),Q.set=pe}for(const Q of M.flat())if(Q.includes("|")||Q.includes(" "))throw new Error("cn compiler: tail contains delimiter: "+Q);const z=new Set(M.flat()).size;Y.sort((Q,se)=>Q.anchor-se.anchor||Q.set-se.set);for(const Q of Object.values(e.conflictingClassGroups))for(const se of Q)i(se);for(const Q of Object.values(e.conflictingClassGroupModifiers))for(const se of Q)i(se);for(const Q of e.postfixLookupClassGroups??[])i(Q);const G=n.length,F=new Int32Array(G).fill(-1);let ee=0;const ae=Q=>(F[Q]===-1&&(F[Q]=ee++),F[Q]);for(let Q=0;Q<W.length;Q++)W[Q]=ae(W[Q]);for(const Q of Y)Q.gid=ae(Q.gid);for(let Q=0;Q<U.length;Q++)U[Q]>=0&&(U[Q]=ae(U[Q]));for(let Q=0;Q<G;Q++)F[Q]===-1&&(F[Q]=ee++);const re=new Array(G);for(let Q=0;Q<G;Q++)re[F[Q]]=n[Q];const ye=[],ge=[],Te=[],$e=[],He=[];for(let Q=0;Q<G;Q++){const se=re[Q],pe=(e.conflictingClassGroups[se]??[]).map(xe=>F[r.get(xe)]),Be=(e.conflictingClassGroupModifiers[se]??[]).map(xe=>F[r.get(xe)]);pe.length&&(ye.push(Q),ge.push(pe.length),Te.push(...pe));for(const xe of Be)$e.push(Q),He.push(xe)}const Ne=(e.postfixLookupClassGroups??[]).map(Q=>F[r.get(Q)]),Ie=[],be=new Int32Array(H.length);for(let Q=0;Q<H.length;Q++){const se=t.names[H[Q]],pe=qB[se];if(pe!==void 0)be[Q]=pe;else{let Be=Ie.indexOf(se);Be===-1&&(Be=Ie.length,Ie.push(se)),be[Q]=Yhe+Be}}const Le=new Map,Me=[],Oe=[],Ge=[];{let Q=0;for(const se of h){const pe=[];for(let Qe=0;Qe<se.length;Qe++)pe.push(be[Q++]);const Be=pe.join(",");let xe=Le.get(Be);xe===void 0&&(xe=Me.length,Le.set(Be,xe),Me.push(pe.length),Oe.push(...pe)),Ge.push(xe)}}const fe={};for(const Q of Ie)fe[Q]=t.classifierFns.get(Q);return{G,customNames:Ie,impls:fe,edgeCounts:j,edgeLabelLen:P,labelText:B,edgeTargetActual:K,nodeGroup:U,nodeVlist:q,nodeCount:I,totalEdges:L,patCounts:Me,patOps:Oe,listPat:Ge,vlistGroup:W,litEntries:A,sets:M,attachments:Y,uniqueTailCount:z,adjGid:ye,adjCnt:ge,adjTgt:Te,patGid:$e,patTgt:He,postfixLookup:Ne,orderSensitiveModifiers:e.orderSensitiveModifiers.join(" "),prefix:e.prefix}},V0=e=>{const t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},Jhe=e=>{const t=Zhe(e),n=t.litEntries.length,r=new Int32Array(n),i=new Int32Array(n),a=new Int32Array(n);let o="";const c=new Int32Array(t.uniqueTailCount*2);{const u=new Map;let d=0,p=0;for(const h of t.attachments)for(const y of t.sets[h.set]){let b=u.get(y);b===void 0&&(b=d++,u.set(y,b),c[b*2]=o.length,c[b*2+1]=y.length,o+=y),r[p]=h.anchor,i[p]=h.gid,a[p]=b,p++}}return{tables:{GROUP_COUNT:t.G,edgeStart:V0(t.edgeCounts),labelStart:V0(t.edgeLabelLen),labelText:t.labelText,edgeTarget:Int32Array.from(t.edgeTargetActual),nodeGroup:t.nodeGroup,nodeVlist:t.nodeVlist,vlistPat:V0(t.patCounts),vlistOps:Int32Array.from(t.patOps),vlistRef:Int32Array.from(t.listPat),vlistGroup:t.vlistGroup,litAnchor:r,litGroup:i,litPool:a,poolOffsets:c,poolText:o,adjGid:Int32Array.from(t.adjGid),adjStart:V0(t.adjCnt),adjTgt:Int32Array.from(t.adjTgt),patGid:Int32Array.from(t.patGid),patTgt:Int32Array.from(t.patTgt),postfixLookupGroups:Int32Array.from(t.postfixLookup),customValidatorNames:t.customNames,orderSensitiveModifiers:t.orderSensitiveModifiers},validatorImpls:t.impls,prefix:t.prefix}},eme="line"in new Error,fo=-1,Tu=-1,kT=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},kb=(e,t,n)=>{const r=n-t;let i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){const 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 c=t+3,u=n-4;c<t+8&&c<u;c++,u--)i=Math.imul(i^e.charCodeAt(c)^e.charCodeAt(u)<<8,16777619)}return i^i>>>15|0},tme=(e,t,n={})=>{const{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:c,nodeGroup:u,nodeVlist:d,vlistPat:p,vlistOps:h,vlistRef:y,vlistGroup:b,litAnchor:v,litGroup:T,litPool:A,poolOffsets:w,poolText:k,adjGid:C,adjStart:R,adjTgt:O,patGid:N,patTgt:I,postfixLookupGroups:L,customValidatorNames:j,orderSensitiveModifiers:P}=e,B=new Int32Array(r).fill(-1);for(let Z=0;Z<C.length;Z++)B[C[Z]]=Z;let U=0;for(let Z=0;Z+1<R.length;Z++){const he=R[Z+1]-R[Z];he>U&&(U=he)}let q=32;for(;q<2*(1+U+N.length);)q<<=1;const K=new Int32Array(y.length+1);for(let Z=0;Z<y.length;Z++)K[Z+1]=K[Z]+p[y[Z]+1]-p[y[Z]];const V=new Uint8Array(r);for(let Z=0;Z<L.length;Z++)V[L[Z]]=1;const H=i.length-1,W=new Uint8Array(H);let Y=0,te=!0;for(let Z=0;Z<v.length;Z++){W[v[Z]]=1;const he=w[A[Z]*2+1];he>Y&&(Y=he);const ve=k.charCodeAt(w[A[Z]*2]);(ve===91||ve===40)&&(te=!1)}let M=1;for(;M<v.length*2;)M<<=1;const z=new Int32Array(M).fill(-1);for(let Z=0;Z<v.length;Z++){const he=w[A[Z]*2];let ve=(kT(k,he,he+w[A[Z]*2+1])^Math.imul(v[Z],2654435761)|0)&M-1;for(;z[ve]!==-1;)ve=ve+1&M-1;z[ve]=Z}const G=(Z,he,ve,Ye)=>{let it=(kT(he,ve,Ye)^Math.imul(Z,2654435761)|0)&M-1;const ot=Ye-ve;for(;;){const yt=z[it];if(yt===-1)return-1;if(v[yt]===Z&&w[A[yt]*2+1]===ot){const Kt=w[A[yt]*2];let gt=!0;for(let Je=0;Je<ot;Je++)if(k.charCodeAt(Kt+Je)!==he.charCodeAt(ve+Je)){gt=!1;break}if(gt)return T[yt]}it=it+1&M-1}},F=n.cacheSize??8192,ee=n.prefix??e.prefix??"",ae=ee===""?"":ee+":",re=ae.length,ye=(j??[]).map(Z=>{const he=t&&t[Z];if(!he)throw new Error("cn: missing validator "+Z);return he}),ge=/\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$/,Te=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$e=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,He=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;let Ne=0,Ie=-1,be=-1,Le=-1,Me=-1;const Oe=Z=>Z>=97&&Z<=122||Z>=65&&Z<=90||Z>=48&&Z<=57||Z===95,Ge=Z=>/\s/.test(String.fromCharCode(Z)),fe=(Z,he,ve)=>{if(Ne=0,Ie=-1,ve-he<3)return;const Ye=Z.charCodeAt(he),it=Z.charCodeAt(ve-1);if(Ye===91&&it===93)Ne=1;else if(Ye===40&&it===41)Ne=2;else return;Le=he+1,Me=ve-1;let ot=he+1;if(Oe(Z.charCodeAt(ot))){for(ot++;ot<ve-1;){const yt=Z.charCodeAt(ot);if(!Oe(yt)&&yt!==45)break;ot++}ot<ve-2&&Z.charCodeAt(ot)===58&&(Ie=he+1,be=ot,Le=ot+1)}},Q=(Z,he,ve,Ye)=>{if(ve-he!==Ye.length)return!1;for(let it=0;it<Ye.length;it++)if(Z.charCodeAt(he+it)!==Ye.charCodeAt(it))return!1;return!0},se=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,pe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Be=Z=>!!Z&&!Number.isNaN(Number(Z)),xe=(Z,he,ve)=>{if(ve-he<11||!Q(Z,he,he+10,"@container"))return!1;if(Z.charCodeAt(he+10)===47)return ve-he>=12;const Ye=Z.charCodeAt(he+11);return Ye===115&&ve-he>=17&&Q(Z,he+10,he+16,"-size/")||Ye===110&&ve-he>=19&&Q(Z,he+10,he+18,"-normal/")},Qe=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],oe="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(Z=>Z.split(" ")),ue=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],ze=(Z,he,ve,Ye)=>{if(Z>=10){if(Z>=25)return ye[Z-25](he.slice(ve,Ye));const it=Z-10;if(Ne!==Qe[it])return!1;if(Ie>=0){for(const ot of oe[it])if(Q(he,Ie,be,ot))return!0;return!1}switch(ue[it]){case 0:return!1;case 1:return!0;case 2:{const ot=he.slice(Le,Me);return ge.test(ot)&&!Te.test(ot)}case 3:return Be(he.slice(Le,Me));case 4:return He.test(he.slice(Le,Me));default:return $e.test(he.slice(Le,Me))}}switch(Z){case 0:return!0;case 1:return Ne===0;case 2:return Ne===1;case 3:return Ne===2;case 4:return se.test(he.slice(ve,Ye));case 5:return Be(he.slice(ve,Ye));case 6:{const it=he.slice(ve,Ye);return!!it&&Number.isInteger(Number(it))}case 7:return Ye>ve&&he.charCodeAt(Ye-1)===37&&Be(he.slice(ve,Ye-1));case 8:return pe.test(he.slice(ve,Ye));default:return xe(he,ve,Ye)}},nt=new Set(typeof P=="string"?P.split(" "):P),ht=(Z,he,ve,Ye,it,ot)=>{const yt=kT(he,ve,Ye)^(it?2654435769:0)|0;let Kt=Z.get(yt);if(Kt!==void 0)e:for(let ft=0;ft<Kt.length;ft++){const Ke=Kt[ft];if(!(Ke.imp!==it||Ke.k.length!==Ye-ve)){for(let tn=0;tn<Ke.k.length;tn++)if(Ke.k.charCodeAt(tn)!==he.charCodeAt(ve+tn))continue e;return Ke.id}}else Z.set(yt,Kt=[]);const gt=he.slice(ve,Ye),Je=ot(gt);return Kt.push({k:gt,imp:it,id:Je}),Je};let Yt=new Map,Xt=new Map,at=2;const xt=4096,Ft=(Z,he)=>{const ve=[];let Ye=0,it=0,ot=0;for(let Je=0;Je<Z.length;Je++){const ft=Z.charCodeAt(Je);Ye===0&&it===0&&ft===58?(ve.push(Z.slice(ot,Je)),ot=Je+1):ft===91?Ye++:ft===93?Ye--:ft===40?it++:ft===41&&it--}ve.push(Z.slice(ot));let yt=ve[0];if(ve.length>1){const Je=[];let ft=[];for(const Ke of ve)Ke.charCodeAt(0)===91||nt.has(Ke)?(ft.length&&(Je.push(...ft.sort()),ft=[]),Je.push(Ke)):ft.push(Ke);ft.length&&Je.push(...ft.sort()),yt=Je.join(":")}const Kt=he?yt+" !":yt;let gt=Xt.get(Kt);return gt===void 0&&Xt.set(Kt,gt=at++),gt};let Mt=new Map,Qt=r;const vt=r+4096,zn=()=>Qt++,Jt=2097152,un=8192,kn=new Int32Array(un),Dt=new Array(un).fill(null),ne=new Int32Array(un),Ce=new Int32Array(un),le=new Uint8Array(un);let Fe=0;const dt=(Z,he,ve,Ye,it,ot,yt,Kt)=>{let gt=Z;if(Dt[Z]!==null)if(Dt[Z|1]===null)gt=Z|1;else if((Fe++&3)===0)gt=Z|Fe>>2&1;else return;Dt[gt]=he.slice(ve,Ye),kn[gt]=it,ne[gt]=ot,Ce[gt]=yt,le[gt]=Kt},St=()=>Dt.fill(null);let We=256,rt=[new Int32Array(We),new Int32Array(We),new Int32Array(We),new Int32Array(We)],[Xe,Tt,Pt,qn]=rt,Pn=new Uint8Array(We),Xn=new Uint8Array(We);const Vn=()=>{We*=2,rt=rt.map(he=>{const ve=new Int32Array(We);return ve.set(he),ve}),[Xe,Tt,Pt,qn]=rt;const Z=new Uint8Array(We);Z.set(Pn),Pn=Z,Xn=new Uint8Array(We)};let zt=64,mn=new Int32Array(zt),kr=new Int32Array(zt);const Wi=new Int32Array(r);let Ir=2048,va=21,Ea=new Float64Array(Ir),ji=new Int32Array(Ir),Wr=0;const Xr=(Z,he)=>{if(Z===0&&he<r)return Wi[he]===Wr?1:(Wi[he]=Wr,0);const ve=Z*2097152+he+1;let Ye=Math.imul(ve,2654435761)>>>va;for(;ji[Ye]===Wr;){if(Ea[Ye]===ve)return 1;Ye=Ye+1&Ir-1}return Ea[Ye]=ve,ji[Ye]=Wr,0},Ei=(Z,he,ve,Ye,it)=>{if(ve-he>=2&&Z.charCodeAt(he)===91&&Z.charCodeAt(ve-1)===93){let ot=-1;for(let yt=he+1;yt<ve-1;yt++)if(Z.charCodeAt(yt)===58){ot=yt;break}return ot===-1||ot===he+1?fo:ht(Mt,Z,he+1,ot,0,zn)}if(Ye>=0&&u[Ye]>=0)return u[Ye];for(let ot=it-1;ot>=0;ot--){const yt=kr[ot];if(yt>ve)continue;const Kt=mn[ot],gt=ve-yt;if(W[Kt]===1&&gt>0&&gt<=Y){const At=Z.charCodeAt(yt);if(te===!1||At!==91&&At!==40){const Rr=G(Kt,Z,yt,ve);if(Rr>=0)return Rr}}const Je=d[Kt];if(Je<0)continue;const ft=y[Je],Ke=p[ft],tn=p[ft+1];if(Ke===tn)continue;fe(Z,yt,ve);const Bt=K[Je]-Ke;for(let At=Ke;At<tn;At++)if(ze(h[At],Z,yt,ve))return b[Bt+At]}return fo},ki=Z=>{const he=Z.length;let ve=0,Ye=0,it=!1;(at>xt||Yt.size>xt)&&(Yt=new Map,Xt=new Map,at=2,St()),Qt>vt&&(Mt=new Map,Qt=r,St());let ot=0;for(;ot<he;){let Je=Z.charCodeAt(ot);if(Je===32||Je>=9&&Je<=13||Je>=160&&Ge(Je)){Je!==32&&(it=!0),ot++;continue}const ft=ot;let Ke=0;for(;ot<he;){if(Je=Z.charCodeAt(ot),Je<=32){if(Je===32)break;if(Je>=9&&Je<=13){it=!0;break}}else if(Je>=160&&Ge(Je)){it=!0;break}Ke=Math.imul(Ke^Je,16777619),ot++}const tn=ot,Bt=tn-ft;ve===We&&Vn();const At=ve++;Xe[At]=ft,Tt[At]=tn,Ye+=Bt,Ke^=Math.imul(Bt,2654435761);const Rr=Ke^Ke>>>15|0,Jn=Rr&8190;{let Nt=-1;if(kn[Jn]===Rr&&Dt[Jn]!==null&&Dt[Jn].length===Bt?Nt=Jn:kn[Jn|1]===Rr&&Dt[Jn|1]!==null&&Dt[Jn|1].length===Bt&&(Nt=Jn|1),Nt>=0){const Dr=Dt[Nt];let Zr=!0;for(let Jr=0;Jr<Bt;Jr++)if(Dr.charCodeAt(Jr)!==Z.charCodeAt(ft+Jr)){Zr=!1;break}if(Zr){Pt[At]=ne[Nt],qn[At]=Ce[Nt],Pn[At]=le[Nt];continue}}}let Ti=ft;if(re!==0){if(tn-ft<=re||!Z.startsWith(ae,ft)){Pt[At]=fo,dt(Jn,Z,ft,tn,Rr,fo,0,0);continue}Ti=ft+re}let Xi=0,ut=0,bt=-1,Ht=-1;for(let Nt=Ti;Nt<tn;Nt++){const Dr=Z.charCodeAt(Nt);if(Xi===0&&ut===0){if(Dr===58){bt=Nt;continue}if(Dr===47){Ht=Nt;continue}}Dr===91?Xi++:Dr===93?Xi--:Dr===40?ut++:Dr===41&&ut--}const rn=bt>=Ti?bt+1:Ti;let Wt=rn,gn=tn,Bi=!1,io=0;gn>Wt&&Z.charCodeAt(gn-1)===33?(Bi=!0,gn--):gn>Wt&&Z.charCodeAt(Wt)===33&&(Bi=!0,Wt++,io=1);let li=-1;Ht>rn&&(li=Ht+io,li>=gn&&(li=-1));let Fi=Wt;gn-Wt>1&&Z.charCodeAt(Wt)===45&&(Fi=Wt+1);let Mr=0,Qr=0,ni=0,Ho=-1,Or=0;(d[0]>=0||W[0]===1)&&(mn[0]=0,kr[0]=Fi,Or=1);let ao=Tu,cs=0;for(let Nt=Fi;Nt<gn;Nt++)if(Nt===li&&(ao=Qr<ni?Tu:Mr,cs=Or),Mr!==Tu){const Dr=Z.charCodeAt(Nt);let Zr=-1;if(Qr<ni)o.charCodeAt(Qr)===Dr?(Qr++,Qr===ni&&(Zr=Mr=Ho)):Mr=Tu;else{const Jr=i[Mr],da=i[Mr+1];let fs=Tu;for(let Ri=Jr;Ri<da;Ri++){const qo=a[Ri];if(o.charCodeAt(qo)===Dr){a[Ri+1]-qo===1?Zr=fs=c[Ri]:(Qr=qo+1,ni=a[Ri+1],Ho=c[Ri],fs=Mr);break}}Mr=fs}if(Zr>=0&&(d[Zr]>=0||W[Zr]===1)&&Nt+1<gn&&Z.charCodeAt(Nt+1)===45){if(Or===zt){zt*=2;const Jr=new Int32Array(zt);Jr.set(mn),mn=Jr;const da=new Int32Array(zt);da.set(kr),kr=da}mn[Or]=Zr,kr[Or]=Nt+2,Or++}}li===gn&&(ao=Qr<ni?Tu:Mr,cs=Or);const us=Qr<ni?Tu:Mr;let fr,Hr=!1;if(li>=0)if(Hr=!0,fr=Ei(Z,Wt,li,ao,cs),fr!==fo&&fr<r&&V[fr]){const Nt=Ei(Z,Wt,gn,us,Or);Nt!==fo&&Nt!==fr&&(fr=Nt,Hr=!1)}else fr===fo&&(fr=Ei(Z,Wt,gn,us,Or),Hr=!1);else fr=Ei(Z,Wt,gn,us,Or);let ua=0,ds=0;fr===fo?Pt[At]=fo:(ds=Hr?1:0,ua=Ti>=bt?Bi?1:0:ht(Yt,Z,Ti,bt,Bi?1:0,Nt=>Ft(Nt,Bi)),Pt[At]=fr,Pn[At]=ds,qn[At]=ua),dt(Jn,Z,ft,tn,Rr,fr,ua,ds)}if(ve===0)return"";if(ve===1)return Xe[0]===0&&Tt[0]===he?Z:Z.slice(Xe[0],Tt[0]);if(ve*q>Ir){for(;ve*q>Ir;)Ir<<=1,va--;Ea=new Float64Array(Ir),ji=new Int32Array(Ir)}if(at>=Jt||Qt>=Jt)throw new Error("cn: too many distinct classes in one merge");Wr=Wr+1|0,Wr===0&&(Wi.fill(0),ji.fill(0),Wr=1);let yt=!1;for(let Je=ve-1;Je>=0;Je--){const ft=Pt[Je];if(ft===fo){Xn[Je]=1;continue}const Ke=qn[Je];if(Xr(Ke,ft)===1){Xn[Je]=0,yt=!0;continue}if(Xn[Je]=1,ft<r){const tn=B[ft];if(tn>=0)for(let Bt=R[tn];Bt<R[tn+1];Bt++)Xr(Ke,O[Bt]);if(Pn[Je]&1)for(let Bt=0;Bt<N.length;Bt++)N[Bt]===ft&&Xr(Ke,I[Bt])}}if(!yt&&!it&&he===Ye+ve-1)return Z;let Kt="",gt=0;for(;gt<ve;){if(!Xn[gt]){gt++;continue}const Je=Xe[gt];let ft=Tt[gt],Ke=gt+1;for(;Ke<ve&&Xn[Ke]&&Xe[Ke]===ft+1&&Z.charCodeAt(ft)===32;)ft=Tt[Ke],Ke++;Kt.length>0&&(Kt+=" "),Kt+=Z.slice(Je,ft),gt=Ke}return Kt},Nr=16384,ln=new Int32Array(Nr*2);let Ta=0,Qn=1,si=Object.create(null),tt=Object.create(null),Et=new Map,en=new Map,dn=0,Zn=0;const dr=()=>{Ta^=Nr,Qn=Qn+1|0,Zn=0},$i=Z=>{let he=si[Z];if(he!==void 0)return he;const ve=kb(Z,0,Z.length),Ye=(ve&16383)+Ta,it=ln[Ye]===(ve^Qn)||ln[Ye^Nr]===(ve^Qn-1);return it&&(he=tt[Z],he!==void 0)?(si[Z]=he,he):(he=ki(Z),it?(si[Z]=he,++dn>F&&(dn=0,tt=si,si=Object.create(null),dr())):(ln[Ye]=ve^Qn,++Zn>Nr&&dr()),he)},Ni=Z=>{let he=Et.get(Z);if(he!==void 0)return he;const ve=kb(Z,0,Z.length),Ye=(ve&16383)+Ta,it=ln[Ye]===(ve^Qn)||ln[Ye^Nr]===(ve^Qn-1);return it&&(he=en.get(Z),he!==void 0)?(Et.set(Z,he),he):(he=ki(Z),it?(Et.set(Z,he),++dn>F&&(dn=0,en=Et,Et=new Map,dr())):(ln[Ye]=ve^Qn,++Zn>Nr&&dr()),he)},ir=Z=>{const he=kb(Z,0,Z.length),ve=(he&16383)+Ta;return ln[ve]===(he^Qn)||ln[ve^Nr]===(he^Qn-1)?!0:(ln[ve]=he^Qn,++Zn>Nr&&dr(),!1)},oi=F===0?ki:eme?Z=>{const he=Et.get(Z);return he!==void 0?he:Ni(Z)}:$i;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?oi(arguments[0]):oi(rme.apply(null,arguments))},mergeString:oi,seenBefore:F===0?()=>!1:ir,mergeUncached:ki}},p1=(e,t)=>{if(!e)return"";if(typeof e=="string")return e;let n="";if(typeof e.length=="number"&&(!t||Array.isArray(e))){const r=e;for(let i=0;i<r.length;i++){const a=r[i];if(!a)continue;const o=typeof a=="string"?a:p1(a,t);o&&(n&&(n+=" "),n+=o)}return n}if(t){if(typeof e=="number")return""+e;if(typeof e=="object")for(const r in e)e[r]&&(n&&(n+=" "),n+=r)}return n},nme=(e,t)=>{let n="";for(let r=0;r<e.length;r++){const i=e[r];if(!i)continue;const a=typeof i=="string"?i:p1(i,t);a&&(n&&(n+=" "),n+=a)}return n},rme=function(){return nme(arguments,!1)},ime=256,bM=16,ame=1024,NT=4096,sme=(e,t)=>{const n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached;let i=new Map,a=new Map,o=0,c=null,u=null,d=[],p=[],h=0;const y=(w,k,C)=>{u===null&&(u=new Array(NT).fill(""),d=new Array(NT).fill(""),p=new Array(NT).fill(""));const R=kb(w,0,w.length)&4094;if(u[R]===w&&d[R]===k)return p[R];if(u[R|1]===w&&d[R|1]===k)return p[R|1];const O=e(C?k+" "+w:w),N=u[R]===""?R:R|(u[R|1]===""?1:h++&1);return u[N]=w,d[N]=k,p[N]=O,O},b=(w,k,C,R)=>{let O=0;if(k){if(k!==w.a0)return!1;O=1}if(C){if(C!==(O===0?w.a0:w.a1))return!1;O++}if(R){if(R!==(O===0?w.a0:O===1?w.a1:w.a2))return!1;O++}return O===w.t},v=(w,k)=>{const C=w.a;let R=0;for(let O=0;O<k.length;O++){const N=k[O];if(N){if(N!==C[R])return!1;R++}}return R===w.t},T=(w,k)=>{const C=w.length,R=c===null?null:c.n;if(!k){if(R!==null&&v(R,w))return c=R,R.r;if(c!==null&&c!==R&&v(c,w))return c.r}let O="",N=-1,I=0,L=!1;for(let B=0;B<C;B++){let U=w[B];if(U){if(typeof U!="string"){if(U=w[B]=p1(U,!0),!U)continue;L=!0}N<0&&(O=U,N=B),I++}}if(I===0)return"";if(I===1)return e(O);if(L){if(R!==null&&v(R,w))return c=R,R.r;if(c!==null&&c!==R&&v(c,w))return c.r}let j=i.get(O);j===void 0&&(j=a.get(O),j!==void 0&&i.set(O,j));let P=null;if(j!==void 0){if(j.skip>0){j.skip--,c=null;let U=O;for(let q=N+1;q<C;q++){const K=w[q];K&&(U+=" "+K)}return y(U,"",!1)}const B=j.e;e:for(let U=0;U<B.length;U++){const q=B[U];if(q.t!==I)continue;const K=q.a;let V=1;for(let H=N+1;H<C;H++){const W=w[H];if(W&&W!==K[V++])continue e}P=q;break}P!==null&&(j.miss=0)}if(P===null){let B=O;const U=[O];for(let K=N+1;K<C;K++){const V=w[K];V&&(B+=" "+V,U.push(V))}if(!n(B))return r(B);P={r:e(B),t:U.length,a0:U[0],a1:U[1],a2:U[2]??"",a:U,n:null},j===void 0?i.set(O,j={e:[],miss:0,skip:0,at:0}):++j.miss>bM&&(j.miss=bM,j.skip=ame,j.e.length=0,j.at=0);const q=j.e;q.length<ime?q.push(P):(q[j.at]=P,j.at=j.at+1&255),++o>1e3&&(o=0,a=i,i=new Map)}return c!==null&&c!==P&&(c.n=P),c=P,P.r},A=w=>Array.isArray(w)?T(w.slice(),!1):e(p1(w,!0));return function(w,k,C){const R=arguments.length;if((R|1)===3){const I=c;if(I!==null){const L=I.n;if(L!==null&&b(L,w,k,C))return c=L,L.r;if(I!==L&&b(I,w,k,C))return I.r}if(R===2&&typeof k=="string"&&k!==""){const L=i.get(w);if(L!==void 0&&L.skip>0)return L.skip--,c=null,y(k,w,!0)}return T([w,k,C],!0)}if(R===1)return typeof w=="string"?e(w):A(w);const O=c;if(O!==null){const I=O.n;if(I!==null){const L=I.a;let j=0,P=!0;for(let B=0;B<R;B++){const U=arguments[B];if(U){if(U!==L[j]){P=!1;break}j++}}if(P&&j===I.t)return c=I,I.r}if(O!==I){const L=O.a;let j=0,P=!0;for(let B=0;B<R;B++){const U=arguments[B];if(U){if(U!==L[j]){P=!1;break}j++}}if(P&&j===O.t)return O.r}}const N=[];for(let I=0;I<R;I++)N.push(arguments[I]);return T(N,!0)}},ome='{"theme":{"animate":["spin","ping","pulse","bounce"],"aspect":["video"],"blur":[{"$v":"isTshirtSize"}],"breakpoint":[{"$v":"isTshirtSize"}],"color":[{"$v":"isAny"}],"container":[{"$v":"isTshirtSize"}],"drop-shadow":[{"$v":"isTshirtSize"}],"ease":["in","out","in-out"],"font":[{"$v":"isAnyNonArbitrary"}],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[{"$v":"isTshirtSize"}],"leading":["none","tight","snug","normal","relaxed","loose"],"perspective":["dramatic","near","normal","midrange","distant","none"],"radius":[{"$v":"isTshirtSize"}],"shadow":[{"$v":"isTshirtSize"}],"spacing":["px",{"$v":"isNumber"}],"text":[{"$v":"isTshirtSize"}],"text-shadow":[{"$v":"isTshirtSize"}],"tracking":["tighter","tight","normal","wide","wider","widest"]},"classGroups":{"aspect":[{"aspect":["auto","square",{"$v":"isFraction"},{"$v":"isArbitraryValue"},{"$v":"isArbitraryVariable"},{"$t":"aspect"}]}],"container":["container"],"container-type":[{"@container":["","normal","size",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"container-named":[{"$v":"isNamedContainerQuery"}],"columns":[{"columns":[{"$v":"isNumber"},"auto",{"$v":"isArbitraryValue"},{"$v":"isArbitraryVariable"},{"$t":"container"}]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"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":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"overflow":[{"overflow":["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],"overscroll":[{"overscroll":["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],"position":["static","fixed","absolute","relative","sticky"],"inset":[{"inset":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-x":[{"inset-x":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-y":[{"inset-y":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"start":[{"inset-s":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}],"start":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"end":[{"inset-e":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}],"end":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-bs":[{"inset-bs":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-be":[{"inset-be":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"top":[{"top":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"right":[{"right":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"bottom":[{"bottom":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"left":[{"left":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"visibility":["visible","invisible","collapse"],"z":[{"z":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"basis":[{"basis":[{"$v":"isFraction"},"full","auto",{"$t":"container"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"flex-direction":[{"flex":["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{"flex":["nowrap","wrap","wrap-reverse"]}],"flex":[{"flex":[{"$v":"isNumber"},{"$v":"isFraction"},"auto","initial","none",{"$v":"isArbitraryValue"}]}],"grow":[{"grow":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"shrink":[{"shrink":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"order":[{"order":[{"$v":"isInteger"},"first","last","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-cols":[{"grid-cols":[{"$v":"isInteger"},"none","subgrid",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-start-end":[{"col":["auto",{"span":["full",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-start":[{"col-start":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-end":[{"col-end":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-rows":[{"grid-rows":[{"$v":"isInteger"},"none","subgrid",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-start-end":[{"row":["auto",{"span":["full",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-start":[{"row-start":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-end":[{"row-end":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"auto-cols":[{"$t":"spacing"}]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"auto-rows":[{"$t":"spacing"}]}],"gap":[{"gap":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"gap-x":[{"gap-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"gap-y":[{"gap-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"justify-content":[{"justify":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{"content":["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{"items":["start","end","center","stretch","center-safe","end-safe",{"baseline":["","last"]}]}],"align-self":[{"self":["auto","start","end","center","stretch","center-safe","end-safe",{"baseline":["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"p":[{"p":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"px":[{"px":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"py":[{"py":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ps":[{"ps":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pe":[{"pe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pbs":[{"pbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pbe":[{"pbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pt":[{"pt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pr":[{"pr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pb":[{"pb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pl":[{"pl":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"m":[{"m":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mx":[{"mx":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"my":[{"my":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ms":[{"ms":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"me":[{"me":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mbs":[{"mbs":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mbe":[{"mbe":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mt":[{"mt":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mr":[{"mr":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mb":[{"mb":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ml":[{"ml":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-x":[{"space-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-y-reverse":["space-y-reverse"],"size":[{"size":[{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inline-size":[{"inline":["auto",{"$t":"container"},{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-inline-size":[{"min-inline":["auto",{"$t":"container"},{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-inline-size":[{"max-inline":["none",{"$t":"container"},{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"block-size":[{"block":["auto",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-block-size":[{"min-block":["auto",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-block-size":[{"max-block":["none",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"w":[{"w":[{"$t":"container"},"screen",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-w":[{"min-w":[{"$t":"container"},"screen","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-w":[{"max-w":[{"$t":"container"},"screen","none","prose",{"screen":[{"$t":"breakpoint"}]},{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"h":[{"h":["screen","lh",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-h":[{"min-h":["screen","lh","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-h":[{"max-h":["screen","lh","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"font-size":[{"text":["base",{"$t":"text"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{"font":[{"$t":"font-weight"},{"$v":"isArbitraryVariableWeight"},{"$v":"isArbitraryWeight"}]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",{"$v":"isPercent"},{"$v":"isArbitraryValue"}]}],"font-family":[{"font":[{"$v":"isArbitraryVariableFamilyName"},{"$v":"isArbitraryFamilyName"},{"$t":"font"}]}],"font-features":[{"font-features":[{"$v":"isArbitraryValue"}]}],"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":[{"$t":"tracking"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"line-clamp":[{"line-clamp":[{"$v":"isNumber"},"none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryNumber"}]}],"leading":[{"leading":["none",{"$t":"leading"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"list-image":[{"list-image":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"list-style-position":[{"list":["inside","outside"]}],"list-style-type":[{"list":["disc","decimal","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-alignment":[{"text":["left","center","right","justify","start","end"]}],"placeholder-color":[{"placeholder":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-color":[{"text":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{"decoration":["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{"decoration":[{"$v":"isNumber"},"from-font","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryLength"}]}],"text-decoration-color":[{"decoration":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"underline-offset":[{"underline-offset":[{"$v":"isNumber"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{"text":["wrap","nowrap","balance","pretty"]}],"indent":[{"indent":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"tab-size":[{"tab":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"vertical-align":[{"align":["baseline","top","middle","bottom","text-top","text-bottom","sub","super",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"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",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"bg-attachment":[{"bg":["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{"bg":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"},{"position":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"bg-repeat":[{"bg":["no-repeat",{"repeat":["","x","y","space","round"]}]}],"bg-size":[{"bg":["auto","cover","contain",{"$v":"isArbitraryVariableSize"},{"$v":"isArbitrarySize"},{"size":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"bg-image":[{"bg":["none",{"linear":[{"to":["t","tr","r","br","b","bl","l","tl"]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}],"radial":["",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}],"conic":["",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isArbitraryVariableImage"},{"$v":"isArbitraryImage"}]},{"bg-gradient-to":["t","tr","r","br","b","bl","l","tl"]}],"bg-color":[{"bg":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-from-pos":[{"from":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-via-pos":[{"via":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-to-pos":[{"to":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-from":[{"from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-via":[{"via":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-to":[{"to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded":[{"rounded":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-s":[{"rounded-s":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-e":[{"rounded-e":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-t":[{"rounded-t":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-r":[{"rounded-r":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-b":[{"rounded-b":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-l":[{"rounded-l":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-ss":[{"rounded-ss":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-se":[{"rounded-se":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-ee":[{"rounded-ee":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-es":[{"rounded-es":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-tl":[{"rounded-tl":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-tr":[{"rounded-tr":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-br":[{"rounded-br":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-bl":[{"rounded-bl":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-w":[{"border":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-x":[{"border-x":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-y":[{"border-y":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-s":[{"border-s":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-e":[{"border-e":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-bs":[{"border-bs":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-be":[{"border-be":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-t":[{"border-t":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-r":[{"border-r":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-b":[{"border-b":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-l":[{"border-l":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-x":[{"divide-x":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{"border":["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{"divide":["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{"border":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-x":[{"border-x":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-y":[{"border-y":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-s":[{"border-s":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-e":[{"border-e":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-bs":[{"border-bs":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-be":[{"border-be":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-t":[{"border-t":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-r":[{"border-r":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-b":[{"border-b":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-l":[{"border-l":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"divide-color":[{"divide":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"outline-style":[{"outline":["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"outline-w":[{"outline":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"outline-color":[{"outline":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"shadow":[{"shadow":["","inner","none",{"$t":"shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"shadow-color":[{"shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"inset-shadow":[{"inset-shadow":["none",{"$t":"inset-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"inset-shadow-color":[{"inset-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ring-w":[{"ring":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"ring-w-inset":["ring-inset"],"ring-color":[{"ring":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ring-offset-w":[{"ring-offset":[{"$v":"isNumber"},{"$v":"isArbitraryLength"}]}],"ring-offset-color":[{"ring-offset":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"inset-ring-w":[{"inset-ring":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"inset-ring-color":[{"inset-ring":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-shadow":[{"text-shadow":["none",{"$t":"text-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"text-shadow-color":[{"text-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"opacity":[{"opacity":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"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":[{"$v":"isNumber"}]}],"mask-image-linear-from-pos":[{"mask-linear-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-linear-to-pos":[{"mask-linear-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-linear-from-color":[{"mask-linear-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-linear-to-color":[{"mask-linear-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-t-from-pos":[{"mask-t-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-t-to-pos":[{"mask-t-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-t-from-color":[{"mask-t-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-t-to-color":[{"mask-t-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-r-from-pos":[{"mask-r-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-r-to-pos":[{"mask-r-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-r-from-color":[{"mask-r-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-r-to-color":[{"mask-r-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-b-from-pos":[{"mask-b-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-b-to-pos":[{"mask-b-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-b-from-color":[{"mask-b-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-b-to-color":[{"mask-b-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-l-from-pos":[{"mask-l-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-l-to-pos":[{"mask-l-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-l-from-color":[{"mask-l-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-l-to-color":[{"mask-l-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-x-from-pos":[{"mask-x-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-x-to-pos":[{"mask-x-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-x-from-color":[{"mask-x-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-x-to-color":[{"mask-x-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-y-from-pos":[{"mask-y-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-y-to-pos":[{"mask-y-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-y-from-color":[{"mask-y-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-y-to-color":[{"mask-y-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial":[{"mask-radial":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-from-pos":[{"mask-radial-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-radial-to-pos":[{"mask-radial-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-radial-from-color":[{"mask-radial-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-to-color":[{"mask-radial-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"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":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[{"$v":"isNumber"}]}],"mask-image-conic-from-pos":[{"mask-conic-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-conic-to-pos":[{"mask-conic-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-conic-from-color":[{"mask-conic-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-conic-to-color":[{"mask-conic-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-mode":[{"mask":["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{"mask":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"},{"position":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"mask-repeat":[{"mask":["no-repeat",{"repeat":["","x","y","space","round"]}]}],"mask-size":[{"mask":["auto","cover","contain",{"$v":"isArbitraryVariableSize"},{"$v":"isArbitrarySize"},{"size":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{"mask":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"filter":[{"filter":["","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"blur":[{"blur":["","none",{"$t":"blur"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"brightness":[{"brightness":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"contrast":[{"contrast":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"drop-shadow":[{"drop-shadow":["","none",{"$t":"drop-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"drop-shadow-color":[{"drop-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grayscale":[{"grayscale":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"hue-rotate":[{"hue-rotate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"invert":[{"invert":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"saturate":[{"saturate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"sepia":[{"sepia":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-filter":[{"backdrop-filter":["","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-blur":[{"backdrop-blur":["","none",{"$t":"blur"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-brightness":[{"backdrop-brightness":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-contrast":[{"backdrop-contrast":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-grayscale":[{"backdrop-grayscale":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-invert":[{"backdrop-invert":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-opacity":[{"backdrop-opacity":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-saturate":[{"backdrop-saturate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-sepia":[{"backdrop-sepia":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-collapse":[{"border":["collapse","separate"]}],"border-spacing":[{"border-spacing":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"border-spacing-x":[{"border-spacing-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"border-spacing-y":[{"border-spacing-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"table-layout":[{"table":["auto","fixed"]}],"caption":[{"caption":["top","bottom"]}],"transition":[{"transition":["","all","colors","opacity","shadow","transform","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transition-behavior":[{"transition":["normal","discrete"]}],"duration":[{"duration":[{"$v":"isNumber"},"initial",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ease":[{"ease":["linear","initial",{"$t":"ease"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"delay":[{"delay":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"animate":[{"animate":["none",{"$t":"animate"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backface":[{"backface":["hidden","visible"]}],"perspective":[{"perspective":[{"$t":"perspective"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"perspective-origin":[{"perspective-origin":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate":[{"rotate":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-x":[{"rotate-x":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-y":[{"rotate-y":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-z":[{"rotate-z":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale":[{"scale":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-x":[{"scale-x":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-y":[{"scale-y":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-z":[{"scale-z":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-3d":["scale-3d"],"skew":[{"skew":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"skew-x":[{"skew-x":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"skew-y":[{"skew-y":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transform":[{"transform":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},"","none","gpu","cpu"]}],"transform-origin":[{"origin":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transform-style":[{"transform":["3d","flat"]}],"translate":[{"translate":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-x":[{"translate-x":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-y":[{"translate-y":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-z":[{"translate-z":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-none":["translate-none"],"zoom":[{"zoom":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"accent":[{"accent":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"appearance":[{"appearance":["none","auto"]}],"caret-color":[{"caret":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"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",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"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":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scrollbar-track-color":[{"scrollbar-track":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{"scrollbar":["auto","thin","none"]}],"scroll-m":[{"scroll-m":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mx":[{"scroll-mx":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-my":[{"scroll-my":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ms":[{"scroll-ms":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-me":[{"scroll-me":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mbs":[{"scroll-mbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mbe":[{"scroll-mbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mt":[{"scroll-mt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mr":[{"scroll-mr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mb":[{"scroll-mb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ml":[{"scroll-ml":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-p":[{"scroll-p":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-px":[{"scroll-px":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-py":[{"scroll-py":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ps":[{"scroll-ps":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pe":[{"scroll-pe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pbs":[{"scroll-pbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pbe":[{"scroll-pbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pt":[{"scroll-pt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pr":[{"scroll-pr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pb":[{"scroll-pb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pl":[{"scroll-pl":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"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",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"fill":[{"fill":["none",{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"stroke-w":[{"stroke":[{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"},{"$v":"isArbitraryNumber"}]}],"stroke":[{"stroke":["none",{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}],"contain":[{"contain":["none","content","strict",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"contain-size":[{"contain":["size","inline-size"]}],"contain-layout":["contain-layout"],"contain-paint":["contain-paint"],"contain-style":["contain-style"]},"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":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],"flex":["basis","grow","shrink"],"gap":["gap-x","gap-y"],"p":["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],"px":["ps","pe","pr","pl"],"py":["pbs","pbe","pt","pb"],"m":["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],"mx":["ms","me","mr","ml"],"my":["mbs","mbe","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-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","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-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","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-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","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-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],"touch":["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"],"contain":["contain-size","contain-layout","contain-paint","contain-style"],"contain-size":["contain"],"contain-layout":["contain"],"contain-paint":["contain"],"contain-style":["contain"]},"conflictingClassGroupModifiers":{"font-size":["leading"]},"orderSensitiveModifiers":["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"],"postfixLookupClassGroups":["container-type"]}',RT=()=>JSON.parse(ome),lme=e=>"classGroups"in e&&"theme"in e&&"conflictingClassGroups"in e,cme=e=>e===void 0?{config:RT()}:typeof e=="function"?{config:e(RT())}:lme(e)?{config:e}:{config:Khe(RT(),e),cacheSize:e.cacheSize},ume=e=>{const{config:t,cacheSize:n}=cme(e),{tables:r,validatorImpls:i,prefix:a}=Jhe(t);return tme(r,i,{cacheSize:n,prefix:a})},dme=e=>{let t=null;const n=()=>t??(t=ume(e));return sme(r=>n().mergeString(r),{seenBefore:r=>n().seenBefore(r),mergeUncached:r=>n().mergeUncached(r)})},fme="modulepreload",pme=function(e){return"/"+e},yM={},VB=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let o=function(d){return Promise.all(d.map(p=>Promise.resolve(p).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),u=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=o(n.map(d=>{if(d=pme(d),d in yM)return;yM[d]=!0;const p=d.endsWith(".css"),h=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${h}`))return;const y=document.createElement("link");if(y.rel=p?"stylesheet":fme,p||(y.as="script"),y.crossOrigin="",y.href=d,u&&y.setAttribute("nonce",u),document.head.appendChild(y),p)return new Promise((b,v)=>{y.addEventListener("load",b),y.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${d}`)))})}))}function a(o){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=o,window.dispatchEvent(c),!c.defaultPrevented)throw o}return i.then(o=>{for(const c of o||[])c.status==="rejected"&&a(c.reason);return t().catch(a)})},gx=(function(e){if(e==null)return bme;if(typeof e=="function")return bx(e);if(typeof e=="object")return Array.isArray(e)?hme(e):mme(e);if(typeof e=="string")return gme(e);throw new Error("Expected function, string, or object as test")});function hme(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=gx(e[n]);return bx(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function mme(e){const t=e;return bx(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function gme(e){return bx(t);function t(n){return n&&n.type===e}}function bx(e){return t;function t(n,r,i){return!!(yme(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function bme(){return!0}function yme(e){return e!==null&&typeof e=="object"&&"type"in e}const GB=[],Ih=!0,gw=!1,Bu="skip";function yx(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=gx(i),o=r?-1:1;c(e,void 0,[])();function c(u,d,p){const h=u&&typeof u=="object"?u:{};if(typeof h.type=="string"){const b=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(u.type+(b?"<"+b+">":""))+")"})}return y;function y(){let b=GB,v,T,A;if((!t||a(u,d,p[p.length-1]||void 0))&&(b=xme(n(u,p)),b[0]===gw))return b;if("children"in u&&u.children){const w=u;if(w.children&&b[0]!==Bu)for(T=(r?w.children.length:-1)+o,A=p.concat(w);T>-1&&T<w.children.length;){const k=w.children[T];if(v=c(k,T,A)(),v[0]===gw)return v;T=typeof v[1]=="number"?v[1]:T+o}}return b}}}function xme(e){return Array.isArray(e)?e:typeof e=="number"?[Ih,e]:e==null?GB:[e]}function Zs(e,t,n,r){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=r),yx(e,a,c,i);function c(u,d){const p=d[d.length-1],h=p?p.children.indexOf(u):void 0;return o(u,h,p)}}const Ff={indicator:"indicator",textOnly:"text-only",remove:"remove"};function vme({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:o="text-gray-500",linkBlockPolicy:c=Ff.indicator,imageBlockPolicy:u=Ff.indicator}){const d=t.length&&!t.every(h=>h==="*"),p=n.length&&!n.every(h=>h==="*");if(!e&&(d||p))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return h=>{const y=_me(e,t,n,r,i,a,o,c,u);KB(h),Zs(h,y)}}function xM(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function Eme(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Tme=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),wme=new Set(["javascript:","data:","file:","vbscript:"]);function vM(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const p=e.substring(5);if(p&&p.length>0&&p!=="invalid")return e}}catch{return null}return null}const o=xM(e,n);if(!o||wme.has(o.protocol)||!(Tme.has(o.protocol)||a.includes(o.protocol)||a.includes("*")))return null;if(o.protocol==="mailto:"||!o.protocol.match(/^https?:$/))return o.href;const u=Eme(e);return o&&t.some(d=>{const p=xM(d,n);return!p||p.origin!==o.origin?!1:o.href.startsWith(p.href)})?u?o.pathname+o.search+o.hash:o.href:t.includes("*")?o.protocol!=="https:"&&o.protocol!=="http:"?null:u?o.pathname+o.search+o.hash:o.href:null}function KB(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)KB(t)}}const OT=Symbol("node-seen");function Sme(e,t,n){return t===Ff.remove?{type:"remove"}:t===Ff.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function Ame(e,t,n){if(t===Ff.remove)return{type:"remove"};if(t===Ff.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const _me=(e,t,n,r,i,a,o,c,u)=>{const d=(p,h,y)=>{if(p.type!=="element"||p[OT])return Ih;if(p.tagName==="a"){const b=vM(p.properties.href,t,e,!1,!1,i);if(b===null){if(p[OT]=!0,Zs(p,d),y&&typeof h=="number"){const v=Sme(p,c,o);if(v.type==="remove")return y.children.splice(h,1),[Bu,h];y.children[h]=v.element}return Bu}else return p.properties.href=b,p.properties.target="_blank",p.properties.rel="noopener noreferrer",Ih}if(p.tagName==="img"){const b=vM(p.properties.src,n,e,r,!0,i);if(b===null){if(p[OT]=!0,Zs(p,d),y&&typeof h=="number"){const v=Ame(p,u,a);if(v.type==="remove")return y.children.splice(h,1),[Bu,h];y.children[h]=v.element}return Bu}else return p.properties.src=b,Ih}return Ih};return d},YB=-1,xx=0,Uh=1,h1=2,EC=3,TC=4,wC=5,SC=6,WB=7,XB=8,{defineProperty:Cme}=Object,QB=typeof self=="object"?self:globalThis,EM=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new QB[e](t)},kme=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case xx:case YB:return n(o,i);case Uh:{const c=n([],i);for(const u of o)c.push(r(u));return c}case h1:{const c=n({},i);for(const[u,d]of o){const p=r(u),h=r(d);p==="__proto__"?Cme(c,p,{value:h,configurable:!0,enumerable:!0,writable:!0}):c[p]=h}return c}case EC:return n(new Date(o),i);case TC:{const{source:c,flags:u}=o;return n(new RegExp(c,u),i)}case wC:{const c=n(new Map,i);for(const[u,d]of o)c.set(r(u),r(d));return c}case SC:{const c=n(new Set,i);for(const u of o)c.add(r(u));return c}case WB:{const{name:c,message:u}=o;return n(typeof QB[c]=="function"?EM(c,u):new Error(u),i)}case XB:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:c}=new Uint8Array(o);return n(new DataView(c),o)}case"-0":return-0}return n(EM(a,o),i)};return r},TM=e=>kme(new Map,e)(0),Ru="",{toString:Nme}={},{keys:Rme,is:Ome}=Object,ah=e=>{const t=typeof e;if(t!=="object"||!e)return[xx,t];const n=Nme.call(e).slice(8,-1);switch(n){case"Array":return[Uh,Ru];case"Object":return[h1,Ru];case"Date":return[EC,Ru];case"RegExp":return[TC,Ru];case"Map":return[wC,Ru];case"Set":return[SC,Ru];case"DataView":return[Uh,n]}return n.includes("Array")?[Uh,n]:e instanceof Error?[WB,e.name||"Error"]:[h1,n]},G0=([e,t])=>e===xx&&(t==="function"||t==="symbol"),Ime=(e,t,n,r)=>{const i=(o,c)=>{const u=r.push(o)-1;return n.set(c,u),u},a=o=>{if(n.has(o))return n.get(o);let[c,u]=ah(o);switch(c){case xx:{let p=o;switch(u){case"bigint":c=XB,p=o.toString();break;case"number":if(!o&&Ome(o,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);p=null;break;case"undefined":return i([YB],o)}return i([c,p],o)}case Uh:{if(u){let y=o;return u==="DataView"?y=new Uint8Array(o.buffer):u==="ArrayBuffer"&&(y=new Uint8Array(o)),i([u,[...y]],o)}const p=[],h=i([c,p],o);for(const y of o)p.push(a(y));return h}case h1:{if(u)switch(u){case"BigInt":return i([u,o.toString()],o);case"Boolean":case"Number":case"String":return i([u,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const p=[],h=i([c,p],o);for(const y of Rme(o))(e||!G0(ah(o[y])))&&p.push([a(y),a(o[y])]);return h}case EC:return i([c,isNaN(o.getTime())?Ru:o.toISOString()],o);case TC:{const{source:p,flags:h}=o;return i([c,{source:p,flags:h}],o)}case wC:{const p=[],h=i([c,p],o);for(const[y,b]of o)(e||!(G0(ah(y))||G0(ah(b))))&&p.push([a(y),a(b)]);return h}case SC:{const p=[],h=i([c,p],o);for(const y of o)(e||!G0(ah(y)))&&p.push(a(y));return h}}const{message:d}=o;return i([c,{name:u,message:d}],o)};return a},wM=(e,{json:t,lossy:n}={})=>{const r=[];return Ime(!(t||n),!!t,new Map,r)(e),r},cd=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?TM(wM(e,t)):structuredClone(e):(e,t)=>TM(wM(e,t));class gg{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}gg.prototype.normal={};gg.prototype.property={};gg.prototype.space=void 0;function ZB(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new gg(n,r,t)}function bm(e){return e.toLowerCase()}class Fa{constructor(t,n){this.attribute=n,this.property=t}}Fa.prototype.attribute="";Fa.prototype.booleanish=!1;Fa.prototype.boolean=!1;Fa.prototype.commaOrSpaceSeparated=!1;Fa.prototype.commaSeparated=!1;Fa.prototype.defined=!1;Fa.prototype.mustUseProperty=!1;Fa.prototype.number=!1;Fa.prototype.overloadedBoolean=!1;Fa.prototype.property="";Fa.prototype.spaceSeparated=!1;Fa.prototype.space=void 0;let Mme=0;const Zt=Ed(),yi=Ed(),bw=Ed(),ct=Ed(),Sr=Ed(),Yu=Ed(),Wa=Ed();function Ed(){return 2**++Mme}const yw=Object.freeze(Object.defineProperty({__proto__:null,boolean:Zt,booleanish:yi,commaOrSpaceSeparated:Wa,commaSeparated:Yu,number:ct,overloadedBoolean:bw,spaceSeparated:Sr},Symbol.toStringTag,{value:"Module"})),IT=Object.keys(yw);class AC extends Fa{constructor(t,n,r,i){let a=-1;if(super(t,n),SM(this,"space",i),typeof r=="number")for(;++a<IT.length;){const o=IT[a];SM(this,IT[a],(r&yw[o])===yw[o])}}}AC.prototype.defined=!0;function SM(e,t,n){n&&(e[t]=n)}function cp(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new AC(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[bm(r)]=r,n[bm(a.attribute)]=r}return new gg(t,n,e.space)}const JB=cp({properties:{ariaActiveDescendant:null,ariaAtomic:yi,ariaAutoComplete:null,ariaBusy:yi,ariaChecked:yi,ariaColCount:ct,ariaColIndex:ct,ariaColSpan:ct,ariaControls:Sr,ariaCurrent:null,ariaDescribedBy:Sr,ariaDetails:null,ariaDisabled:yi,ariaDropEffect:Sr,ariaErrorMessage:null,ariaExpanded:yi,ariaFlowTo:Sr,ariaGrabbed:yi,ariaHasPopup:null,ariaHidden:yi,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Sr,ariaLevel:ct,ariaLive:null,ariaModal:yi,ariaMultiLine:yi,ariaMultiSelectable:yi,ariaOrientation:null,ariaOwns:Sr,ariaPlaceholder:null,ariaPosInSet:ct,ariaPressed:yi,ariaReadOnly:yi,ariaRelevant:null,ariaRequired:yi,ariaRoleDescription:Sr,ariaRowCount:ct,ariaRowIndex:ct,ariaRowSpan:ct,ariaSelected:yi,ariaSetSize:ct,ariaSort:null,ariaValueMax:ct,ariaValueMin:ct,ariaValueNow:ct,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function eF(e,t){return t in e?e[t]:t}function tF(e,t){return eF(e,t.toLowerCase())}const Dme=cp({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Yu,acceptCharset:Sr,accessKey:Sr,action:null,allow:null,allowFullScreen:Zt,allowPaymentRequest:Zt,allowUserMedia:Zt,alpha:Zt,alt:null,as:null,async:Zt,autoCapitalize:null,autoComplete:Sr,autoFocus:Zt,autoPlay:Zt,blocking:Sr,capture:null,charSet:null,checked:Zt,cite:null,className:Sr,closedBy:null,colorSpace:null,cols:ct,colSpan:ct,command:null,commandFor:null,content:null,contentEditable:yi,controls:Zt,controlsList:Sr,coords:ct|Yu,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Zt,defer:Zt,dir:null,dirName:null,disabled:Zt,download:bw,draggable:yi,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Zt,formTarget:null,headers:Sr,height:ct,hidden:bw,high:ct,href:null,hrefLang:null,htmlFor:Sr,httpEquiv:Sr,id:null,imageSizes:null,imageSrcSet:null,inert:Zt,inputMode:null,integrity:null,is:null,isMap:Zt,itemId:null,itemProp:Sr,itemRef:Sr,itemScope:Zt,itemType:Sr,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Zt,low:ct,manifest:null,max:null,maxLength:ct,media:null,method:null,min:null,minLength:ct,multiple:Zt,muted:Zt,name:null,nonce:null,noModule:Zt,noValidate:Zt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Zt,optimum:ct,pattern:null,ping:Sr,placeholder:null,playsInline:Zt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Zt,referrerPolicy:null,rel:Sr,required:Zt,reversed:Zt,rows:ct,rowSpan:ct,sandbox:Sr,scope:null,scoped:Zt,seamless:Zt,selected:Zt,shadowRootClonable:Zt,shadowRootCustomElementRegistry:Zt,shadowRootDelegatesFocus:Zt,shadowRootMode:null,shadowRootSerializable:Zt,shape:null,size:ct,sizes:null,slot:null,span:ct,spellCheck:yi,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ct,step:null,style:null,tabIndex:ct,target:null,title:null,translate:null,type:null,typeMustMatch:Zt,useMap:null,value:yi,width:ct,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Sr,axis:null,background:null,bgColor:null,border:ct,borderColor:null,bottomMargin:ct,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Zt,declare:Zt,event:null,face:null,frame:null,frameBorder:null,hSpace:ct,leftMargin:ct,link:null,longDesc:null,lowSrc:null,marginHeight:ct,marginWidth:ct,noResize:Zt,noHref:Zt,noShade:Zt,noWrap:Zt,object:null,profile:null,prompt:null,rev:null,rightMargin:ct,rules:null,scheme:null,scrolling:yi,standby:null,summary:null,text:null,topMargin:ct,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ct,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Zt,disablePictureInPicture:Zt,disableRemotePlayback:Zt,exportParts:Yu,part:Sr,prefix:null,property:null,results:ct,security:null,unselectable:null},space:"html",transform:tF}),Lme=cp({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Wa,accentHeight:ct,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ct,amplitude:ct,arabicForm:null,ascent:ct,attributeName:null,attributeType:null,azimuth:ct,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ct,by:null,calcMode:null,capHeight:ct,className:Sr,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ct,diffuseConstant:ct,direction:null,display:null,dur:null,divisor:ct,dominantBaseline:null,download:Zt,dx:null,dy:null,edgeMode:null,editable:null,elevation:ct,enableBackground:null,end:null,event:null,exponent:ct,externalResourcesRequired:null,fill:null,fillOpacity:ct,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Yu,g2:Yu,glyphName:Yu,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ct,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ct,horizOriginX:ct,horizOriginY:ct,id:null,ideographic:ct,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ct,k:ct,k1:ct,k2:ct,k3:ct,k4:ct,kernelMatrix:Wa,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ct,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ct,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ct,overlineThickness:ct,paintOrder:null,panose1:null,path:null,pathLength:ct,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Sr,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ct,pointsAtY:ct,pointsAtZ:ct,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Wa,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Wa,rev:Wa,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Wa,requiredFeatures:Wa,requiredFonts:Wa,requiredFormats:Wa,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ct,specularExponent:ct,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ct,strikethroughThickness:ct,string:null,stroke:null,strokeDashArray:Wa,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ct,strokeOpacity:ct,strokeWidth:null,style:null,surfaceScale:ct,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Wa,tabIndex:ct,tableValues:null,target:null,targetX:ct,targetY:ct,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Wa,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ct,underlineThickness:ct,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ct,values:null,vAlphabetic:ct,vMathematical:ct,vectorEffect:null,vHanging:ct,vIdeographic:ct,version:null,vertAdvY:ct,vertOriginX:ct,vertOriginY:ct,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ct,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:eF}),nF=cp({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),rF=cp({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:tF}),iF=cp({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Pme={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},jme=/[A-Z]/g,AM=/-[a-z]/g,$me=/^data[-\w.:]+$/i;function vx(e,t){const n=bm(t);let r=t,i=Fa;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&$me.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(AM,Fme);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!AM.test(a)){let o=a.replace(jme,Bme);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=AC}return new i(r,t)}function Bme(e){return"-"+e.toLowerCase()}function Fme(e){return e.charAt(1).toUpperCase()}const bg=ZB([JB,Dme,nF,rF,iF],"html"),eu=ZB([JB,Lme,nF,rF,iF],"svg");function _M(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const o=n.slice(i,r).trim();(o||!a)&&t.push(o),i=r+1,r=n.indexOf(",",i)}return t}function aF(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const CM=/[#.]/g;function zme(e,t){const n=e||"",r={};let i=0,a,o;for(;i<n.length;){CM.lastIndex=i;const c=CM.exec(n),u=n.slice(i,c?c.index:n.length);u&&(a?a==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:o=u,i+=u.length),c&&(a=c[0],i++)}return{type:"element",tagName:o||t||"div",properties:r,children:[]}}function kM(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function sF(e){return e.join(" ").trim()}function oF(e,t,n){const r=n?Vme(n):void 0;function i(a,o,...c){let u;if(a==null){u={type:"root",children:[]};const d=o;c.unshift(d)}else{u=zme(a,t);const d=u.tagName.toLowerCase(),p=r?r.get(d):void 0;if(u.tagName=p||d,Ume(o))c.unshift(o);else for(const[h,y]of Object.entries(o))Hme(e,u.properties,h,y)}for(const d of c)xw(u.children,d);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return i}function Ume(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const o of a)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Hme(e,t,n,r){const i=vx(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=kM(r):i.commaSeparated?a=_M(r):i.commaOrSpaceSeparated?a=kM(_M(r).join(" ")):a=NM(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?qme(r):String(r);if(Array.isArray(a)){const o=[];for(const c of a)o.push(NM(i,i.property,c));a=o}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function xw(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)xw(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?xw(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function NM(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||bm(n)===bm(t)))return!0}return n}function qme(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Vme(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Gme=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],Kme=oF(bg,"div"),Yme=oF(eu,"g",Gme);function Wme(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let o=0;for(;;){let c=n[o];if(c===void 0){const u=RM(t,n[o-1]);c=u===-1?t.length+1:u+1,n[o]=c}if(c>a)return{line:o+1,column:a-(o>0?n[o-1]:0)+1,offset:a};o++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],u=RM(t,c),d=u===-1?t.length+1:u+1;if(c===d)break;n.push(d)}const o=(a.line>1?n[a.line-2]:0)+a.column-1;if(o<n[a.line-1])return o}}}function RM(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
250
+ `);yield{event:h,data:y||void 0}}}}var Ec,zu,Om,Mf,Ji,Es,Df,ul,Lf,Pf,Im,Mm,Ia,dl,fl,vo,Uu,jn,uw,Nu,dw,fw,pw,mB,Cb,hw,gB,bB;class Ope{constructor(t={}){gr(this,jn);gr(this,Ec);gr(this,zu);gr(this,Om);gr(this,Mf);gr(this,Ji);gr(this,Es,new Set);gr(this,Df,new Map);gr(this,ul,new Map);gr(this,Lf,new Set);gr(this,Pf,new Set);gr(this,Im,{kind:"idle"});gr(this,Mm,Promise.resolve());gr(this,Ia);gr(this,dl);gr(this,fl);gr(this,vo);gr(this,Uu,0);jr(this,Ec,(t.baseUrl??"").replace(/\/$/,"")),jr(this,zu,t.fetch??((n,r)=>fetch(n,r))),jr(this,Om,t.retryDelayMs??Cpe),jr(this,Mf,t.idleTimeoutMs??kpe),jr(this,Ji,new Spe({send:n=>ar(this,jn,bB).call(this,n)})),Ze(this,Ji).onNotification(So.event,n=>ar(this,jn,gB).call(this,n))}get status(){return Ze(this,Im)}get connection(){return Ze(this,Ia)}call(t,n,r){return Ze(this,Ji).call(t,n,r)}subscribe(t,n,r,i){const a={contract:t,params:n,onMessage:r,onError:i,serverId:void 0};return Ze(this,Es).add(a),Ze(this,Ia)?ar(this,jn,hw).call(this,a):this.connect(),()=>{if(!Ze(this,Es).delete(a))return;const o=a.serverId;a.serverId=void 0,o&&Ze(this,Ia)&&Ze(this,Ji).request(So.unsubscribe,{subscription:o}).catch(()=>{}),ar(this,jn,uw).call(this)}}handle(t,n){const r=Ze(this,Ji).handle(t,n);return jr(this,Uu,Ze(this,Uu)+1),this.connect(),()=>{r(),jr(this,Uu,Ze(this,Uu)-1),ar(this,jn,uw).call(this)}}onStatus(t){return Ze(this,Lf).add(t),()=>{Ze(this,Lf).delete(t)}}onConnected(t){return Ze(this,Pf).add(t),()=>{Ze(this,Pf).delete(t)}}connect(){Ze(this,dl)||Ze(this,fl)!==void 0||ar(this,jn,pw).call(this)}close(){ar(this,jn,dw).call(this),ar(this,jn,Nu).call(this,{kind:"idle"})}}Ec=new WeakMap,zu=new WeakMap,Om=new WeakMap,Mf=new WeakMap,Ji=new WeakMap,Es=new WeakMap,Df=new WeakMap,ul=new WeakMap,Lf=new WeakMap,Pf=new WeakMap,Im=new WeakMap,Mm=new WeakMap,Ia=new WeakMap,dl=new WeakMap,fl=new WeakMap,vo=new WeakMap,Uu=new WeakMap,jn=new WeakSet,uw=function(){Ze(this,Es).size===0&&Ze(this,Uu)===0&&this.close()},Nu=function(t){jr(this,Im,t);for(const n of[...Ze(this,Lf)])n(t)},dw=function(){var t;Ze(this,fl)!==void 0&&clearTimeout(Ze(this,fl)),jr(this,fl,void 0),Ze(this,vo)!==void 0&&clearTimeout(Ze(this,vo)),jr(this,vo,void 0),(t=Ze(this,dl))==null||t.abort(),jr(this,dl,void 0),jr(this,Ia,void 0),Ze(this,Ji).cancelIncoming();for(const n of Ze(this,Es))n.serverId=void 0},fw=function(t){Ze(this,vo)!==void 0&&clearTimeout(Ze(this,vo)),jr(this,vo,setTimeout(()=>{jr(this,vo,void 0),Ze(this,dl)===t&&ar(this,jn,Cb).call(this,`The event stream has been silent for ${Math.round(Ze(this,Mf)/1e3)} s.`)},Ze(this,Mf)))},pw=function(){const t=new AbortController;jr(this,dl,t),ar(this,jn,Nu).call(this,{kind:"connecting"}),ar(this,jn,mB).call(this,t).catch(n=>{t.signal.aborted||ar(this,jn,Cb).call(this,_T(n))})},mB=async function(t){const n=await Ze(this,zu).call(this,`${Ze(this,Ec)}${Ape}`,{headers:{accept:"text/event-stream"},signal:t.signal,cache:"no-store"});if(n.status===401){jr(this,dl,void 0),Ze(this,Ji).cancelIncoming(),ar(this,jn,Nu).call(this,{kind:"unauthorized"});return}if(!n.ok||!n.body)throw new Error(`The event stream responded with ${n.status}.`);ar(this,jn,fw).call(this,t);for await(const r of Rpe(n.body,()=>ar(this,jn,fw).call(this,t))){if(t.signal.aborted)return;if(r.event==="hello"){jr(this,Ia,JSON.parse(r.data??"{}").connection),ar(this,jn,Nu).call(this,{kind:"connected"}),await Promise.all([...Ze(this,Es)].map(a=>ar(this,jn,hw).call(this,a)));for(const a of[...Ze(this,Pf)])a();continue}if(r.data===void 0)continue;const i=JSON.parse(r.data);lM(i)&&Ze(this,Ji).receive(i)}t.signal.aborted||ar(this,jn,Cb).call(this,"The server ended the event stream.")},Cb=function(t){var n;ar(this,jn,dw).call(this),ar(this,jn,Nu).call(this,{kind:"retrying",message:t});for(const r of Ze(this,Es))(n=r.onError)==null||n.call(r,t);jr(this,fl,setTimeout(()=>{jr(this,fl,void 0),Ze(this,Es).size>0||Ze(this,Uu)>0?ar(this,jn,pw).call(this):ar(this,jn,Nu).call(this,{kind:"idle"})},Ze(this,Om)))},hw=async function(t){var r;const n=Ze(this,Ia);if(!(!n||t.serverId!==void 0))try{const{subscription:i}=await Ze(this,Ji).request(So.subscribe,{channel:t.contract.id,params:t.params});if(Ze(this,Ia)!==n||!Ze(this,Es).has(t)){Ze(this,Ia)===n&&Ze(this,Ji).request(So.unsubscribe,{subscription:i}).catch(()=>{});return}t.serverId=i;const a=Ze(this,ul).get(i);Ze(this,ul).delete(i);for(const o of(a==null?void 0:a.messages)??[])t.onMessage(o)}catch(i){(r=t.onError)==null||r.call(t,`Channel ${t.contract.id}: ${_T(i)}`)}},gB=function(t){const n=[...Ze(this,Es)].find(a=>a.serverId===t.subscription);if(n){n.onMessage(t.message);return}const r=Date.now();for(const[a,o]of Ze(this,ul))r-o.at>Npe&&Ze(this,ul).delete(a);const i=Ze(this,ul).get(t.subscription)??{at:r,messages:[]};i.messages.push(t.message),Ze(this,ul).set(t.subscription,i)},bB=async function(t){if(mC(t)&&t.method===So.cancel){const a=String(t.params.id),o=Ze(this,Df).get(a);if(o){o.abort();return}}const n={"content-type":"application/json"};if(Ze(this,Ia)&&(n[_pe]=Ze(this,Ia)),!hC(t)){if(!Ze(this,Ia))return;const a=Ze(this,Mm).then(()=>Ze(this,zu).call(this,`${Ze(this,Ec)}${cM}`,{method:"POST",headers:n,body:JSON.stringify(t)}));jr(this,Mm,a.then(()=>{},()=>{})),await a;return}const r=String(t.id),i=new AbortController;Ze(this,Df).set(r,i);try{const a=await Ze(this,zu).call(this,`${Ze(this,Ec)}${cM}`,{method:"POST",headers:n,body:JSON.stringify(t),signal:i.signal}),o=await a.json().catch(()=>{});if(lM(o)){Ze(this,Ji).receive(o);return}const c=o,u=typeof(c==null?void 0:c.error)=="string"?c.error:`The server responded with ${a.status}.`;Ze(this,Ji).receive($u(t.id,Ma.application,u,{code:typeof(c==null?void 0:c.code)=="string"?c.code:"http-error",status:a.status}))}catch(a){const o=i.signal.aborted;Ze(this,Ji).receive($u(t.id,o?Ma.cancelled:Ma.connectionClosed,o?"Cancelled":`${Ze(this,Ec)||"The server"} is unreachable: ${_T(a)}`))}finally{Ze(this,Df).delete(r)}};const ur=new Ope,Ipe=Object.freeze(Object.defineProperty({__proto__:null,rpc:ur},Symbol.toStringTag,{value:"Module"})),Mpe="ragents.system-prompt",Dpe="ragents.model",gC=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Lpe=e=>gC(e)&&typeof e.value=="string"&&e.value.length>0&&typeof e.label=="string"&&e.label.length>0&&(e.hint===void 0||typeof e.hint=="string"),Ppe=(e,t)=>{if(!gC(e))throw new Error(`The start option ${t} provides no presentation`);if(e.kind==="choice"){if(typeof e.label!="string"||!e.label)throw new Error(`The choice presentation of the start option ${t} has no label`);if(!Array.isArray(e.options)||!e.options.every(Lpe))throw new Error(`The choice presentation of the start option ${t} needs options made of value and label`);return{kind:"choice",label:e.label,options:e.options}}},yB=e=>{if(!gC(e)||typeof e.id!="string"||!e.id||typeof e.owner!="string"||!e.owner||!("value"in e)||!("presentation"in e)||typeof e.selectable!="boolean"||typeof e.locked!="boolean"||typeof e.chosen!="boolean")throw new Error("The start option does not match the expected format");return{id:e.id,owner:e.owner,value:e.value,presentation:e.presentation,selectable:e.selectable,locked:e.locked,chosen:e.chosen}},xB=async(e,t,n=ur)=>{await n.call(Zf.interruptTurn,{runId:e,commandId:crypto.randomUUID(),actorId:t})},vB=async(e,t,n=ur)=>{await n.call(Zf.restartActor,{runId:e,commandId:crypto.randomUUID(),actorId:t})},jpe=async(e,t,n,r,i=ur)=>{await i.call(Li.chat.sendToActor,{runId:e,actorId:t,text:n,attachments:r})},$pe=async(e,t,n=ur)=>{await n.call(Zf.stopAll,{runId:e,commandId:crypto.randomUUID(),reason:t})},EB=async(e,t,n=ur)=>{await n.call(Zf.resolveAction,{runId:e,commandId:crypto.randomUUID(),actionId:t,decision:"dismissed"})},Bpe=(e=ur)=>e.call(Li.runs.list,{}),Fpe=async(e,t=ur)=>{await t.call(Li.runs.delete,{runId:e})},TB=async(e,t=ur)=>await t.call(Zf.view,{runId:e})??void 0,wB=async(e,t=ur)=>(await t.call(Li.chat.actorHistory,{runId:e})).actors,mw=async(e,t,n=ur)=>(await n.call(Li.startOptions.list,{runId:e},{signal:t})).map(yB),SB=async(e,t,n,r=ur)=>yB(await r.call(Li.startOptions.select,{runId:e,optionId:t,value:n})),bC=e=>Array.isArray(e)&&e.every(t=>typeof t=="string"),AB=e=>e==="manual"||e==="agent"||e==="claude-code"||e==="codex",zpe=e=>e==="off"||e==="minimal"||e==="low"||e==="medium"||e==="high"||e==="xhigh"||e==="max",Upe=e=>_n(e)&&AB(e.driver)&&typeof e.provider=="string"&&typeof e.model=="string"&&typeof e.label=="string",Hpe=e=>_n(e)&&typeof e.name=="string"&&typeof e.description=="string"&&AB(e.driver)&&(e.turnTimeoutMs===null||typeof e.turnTimeoutMs=="number")&&typeof e.isolateWorkspace=="boolean"&&(e.driver!=="agent"||typeof e.provider=="string"&&typeof e.model=="string"&&(e.thinking===void 0||zpe(e.thinking))),qpe=e=>_n(e)&&typeof e.id=="string"&&typeof e.owner=="string"&&typeof e.order=="number"&&typeof e.content=="string",Vpe=e=>_n(e)&&typeof e.id=="string"&&bC(e.requires)&&(e.clientConfig===void 0||_n(e.clientConfig))&&Array.isArray(e.configuration)&&e.configuration.every(t=>_n(t)&&typeof t.key=="string"&&typeof t.source=="string"&&typeof t.secret=="boolean"),Gpe=e=>_n(e)&&typeof e.id=="string"&&typeof e.owner=="string"&&(e.kind==="plugin"||e.kind==="internal")&&typeof e.resolvesPerAgent=="boolean"&&Array.isArray(e.factories)&&e.factories.every(t=>_n(t)&&typeof t.name=="string"&&t.scope==="per-agent"),_B=e=>_n(e)&&typeof e.id=="string"&&typeof e.owner=="string"&&Array.isArray(e.audiences)&&e.audiences.every(t=>t==="coordinator"||t==="agent")&&bC(e.paths),Kpe=e=>_n(e)&&typeof e.root=="string"&&typeof e.path=="string"&&typeof e.bytes=="number"&&(e.frontMatter===null||typeof e.frontMatter=="string")&&(e.content===null||typeof e.content=="string"),Ype=e=>_n(e)&&vj(e,["id","name","description","owner","source","kind","scope","availability","availabilityDetail",..."requiredCapabilities"in e?["requiredCapabilities"]:[],..."nativeTool"in e?["nativeTool"]:[]])&&typeof e.id=="string"&&typeof e.name=="string"&&typeof e.description=="string"&&typeof e.owner=="string"&&typeof e.source=="string"&&(e.kind==="ragents"||e.kind==="plugin")&&(e.scope==="global"||e.scope==="per-agent"||e.scope==="per-turn")&&(e.availability==="always"||e.availability==="conditional")&&typeof e.availabilityDetail=="string"&&(e.requiredCapabilities===void 0||bC(e.requiredCapabilities))&&(e.nativeTool===void 0||typeof e.nativeTool=="boolean"),Wpe=e=>_n(e)&&(e.audience==="coordinator"||e.audience==="agent")&&typeof e.content=="string",Xpe=e=>_n(e)&&e.scope==="product"&&typeof e.content=="string"&&e.finalPromptIsRunSpecific===!0&&typeof e.composition=="string"&&Array.isArray(e.runtimeContracts)&&e.runtimeContracts.every(Wpe),Qpe=e=>!_n(e)||typeof e.profile!="string"||e.profile.length===0||e.configFile!==null&&typeof e.configFile!="string"||typeof e.workspaceMode!="string"||e.workspaceMode.length===0||!_n(e.host)||e.host.mode!=="native"&&e.host.mode!=="container"||typeof e.host.platform!="string"||typeof e.host.workingDirectory!="string"||typeof e.dataDirectory!="string"||!_n(e.workspace)||typeof e.workspace.directoryPattern!="string"?!1:e.documents===null||_n(e.documents)&&typeof e.documents.directoryPattern=="string",Zpe=e=>{if(!_n(e)||e.version!==2||!_n(e.product)||typeof e.product.id!="string"||typeof e.product.title!="string"||!Qpe(e.runtime)||!Array.isArray(e.models)||!e.models.every(Upe)||!Array.isArray(e.profiles)||!e.profiles.every(Hpe)||!Xpe(e.systemPrompt)||!Array.isArray(e.promptContributions)||!e.promptContributions.every(qpe)||!Array.isArray(e.plugins)||!e.plugins.every(Vpe)||!Array.isArray(e.agentHooks)||!e.agentHooks.every(Gpe)||!Array.isArray(e.skills)||!e.skills.every(_B)||!Array.isArray(e.tools)||!e.tools.every(Ype))throw new Error("The settings do not match the expected format");return e},CB=async(e,t=ur)=>Zpe(await t.call(Li.settings.read,{},{signal:e})),Jpe=e=>{if(!_n(e)||!_B(e)||!Array.isArray(e.files)||!e.files.every(Kpe))throw new Error("The skill does not match the expected format");return e},kB=async(e,t,n=ur)=>{const r=await n.call(Li.settings.skill,{id:e},{signal:t});if(r===null)throw new Error("The skill could not be loaded");return Jpe(r)},ehe=Object.freeze(Object.defineProperty({__proto__:null,deleteSession:Fpe,dismissAction:EB,getActorConversations:wB,getRunView:TB,getSettings:CB,getSettingsSkill:kB,getStartOptions:mw,interruptActorTurn:xB,listSessions:Bpe,restartChatActor:vB,sendActorMessage:jpe,setStartOption:SB,stopRun:$pe},Symbol.toStringTag,{value:"Module"}));function the({nextBehavior:e,onClose:t,onNavigate:n}){let r=[{key:0,page:null}],i=1;const a=new Set,o=c=>{n==null||n(r[r.length-1].key),r=c;for(const u of a)u()};return{get canGoBack(){return r.length>1},open(c){if(!c.title.trim())throw new Error("A dialog step requires a title.");const u=e()==="push"?r:r.slice(0,-1);o([...u,{key:i++,page:c}])},back(){if(r.length<2)throw new Error("There is no previous dialog step.");o(r.slice(0,-1))},close(){t()},reset(){(r.length!==1||r[0].page!==null)&&o([{key:0,page:null}])},getSnapshot:()=>r,subscribe(c){return a.add(c),()=>{a.delete(c)}}}}const NB=x.createContext(null);function nhe(){const e=x.useContext(NB);if(!e)throw new Error("The dialog controller requires a modal host.");return e}function rhe({children:e,className:t,initialFocus:n,keepMounted:r,nextBehavior:i="push",onClose:a,open:o=!0,overlayClassName:c,scope:u="run",showCloseButton:d=!1,size:p="medium"}){var C;const h=x.useRef(a);h.current=a;const y=x.useRef(i);y.current=i;const[b]=x.useState(()=>the({nextBehavior:()=>y.current,onClose:()=>h.current()})),v=x.useSyncExternalStore(b.subscribe,b.getSnapshot,b.getSnapshot),T=v[v.length-1],A=x.useMemo(()=>({canGoBack:v.length>1,open:b.open,back:b.back,close:b.close}),[b,v]),w=()=>b.canGoBack?b.back():b.close(),k=x.useRef(o);return k.current&&!o&&b.reset(),k.current=o,m.jsx(wy,{open:o,onOpenChange:R=>{R||w()},modal:u==="page"?!0:"trap-focus",disablePointerDismissal:u!=="page",children:m.jsx(Sy,{className:t,initialFocus:((C=T.page)==null?void 0:C.initialFocusRef)??n??!0,keepMounted:r,onBackdropClick:w,open:o,overlayClassName:c,scope:u,showCloseButton:d||T.page!==null,size:p,children:m.jsx(NB.Provider,{value:A,children:v.map(R=>m.jsx("div",{className:De("contents",R.key!==T.key&&"hidden"),hidden:R.key!==T.key,inert:R.key!==T.key,children:R.page?m.jsxs(m.Fragment,{children:[m.jsxs(rA,{className:"flex-row items-start gap-3 px-4 pt-4 pb-3",children:[m.jsx(Er,{"aria-label":"Back",onClick:b.back,size:"icon-sm",variant:"ghost",children:m.jsx(AS,{})}),m.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[m.jsx(Qm,{children:R.page.title}),R.page.subtitle&&m.jsx(aA,{children:R.page.subtitle})]})]}),m.jsx(iA,{children:R.page.render(A)})]}):e},R.key))})})})}const CT=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`;function ihe(e,t=new Date){const n=CT(t),r=new Date(t);r.setDate(r.getDate()-1);const i=new Map;for(const a of[...e].sort((o,c)=>c.updatedAt-o.updatedAt||o.id.localeCompare(c.id))){const o=new Date(a.updatedAt),c=CT(o),u=i.get(c)??{date:c,label:c===n?"Today":c===CT(r)?"Yesterday":o.toLocaleDateString(void 0,{weekday:"long",day:"numeric",month:"long",...o.getFullYear()===t.getFullYear()?{}:{year:"numeric"}}),sessions:[]};u.sessions.push(a),i.set(c,u)}return[...i.values()]}function ahe(e,t){if(e.revision!==void 0)return t===void 0?"unseen":e.revision>t?"updated":void 0}const she="flex min-h-[148px] min-w-0 flex-1 cursor-pointer flex-col items-center justify-center gap-2 rounded-[12px] border border-dashed border-border-strong text-[0.9rem] font-semibold text-muted-foreground hover:border-primary hover:bg-[color-mix(in_srgb,var(--primary)_6%,var(--background))] hover:text-primary focus-visible:outline-2 focus-visible:outline-primary focus-visible:outline-offset-2",uM="grid list-none grid-cols-[repeat(auto-fill,minmax(min(100%,240px),1fr))] items-stretch gap-3",ohe=e=>{const t=new Date(e),n=new Date;return t.toDateString()===n.toDateString()?t.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):t.toLocaleDateString(void 0,{day:"2-digit",month:"2-digit"})},lhe={locked:{card:"border-[color-mix(in_srgb,var(--destructive)_55%,var(--border))]",head:"border-t-destructive bg-destructive/8",text:"text-destructive"},running:{card:"border-[color-mix(in_srgb,var(--info)_55%,var(--border))]",head:"border-t-info bg-info/8",text:"text-info"},unread:{card:"border-[color-mix(in_srgb,var(--primary)_55%,var(--border))]",head:"border-t-primary bg-primary/8",text:"text-primary"},idle:{card:"border-border",head:"border-t-muted-foreground bg-muted-foreground/8",text:"text-muted-foreground"}};function HLe({sessions:e,seenRevisions:t={},activeId:n,onSelect:r,onDelete:i,registry:a,selectMode:o,selectedIds:c,onToggleSelected:u,onCreate:d}){const p=d&&!o&&m.jsx("li",{className:"flex min-w-0",children:m.jsxs("button",{className:she,onClick:d,type:"button",children:[m.jsx(z4,{"aria-hidden":!0,className:"size-5"}),"New run"]})});return e.length===0?p?m.jsx("ul",{className:uM,children:p}):m.jsx(Vu,{className:"py-16 text-[0.9rem] text-muted-foreground",children:"No runs yet."}):m.jsx("div",{className:"grid gap-6.5",children:ihe(e).map((h,y)=>m.jsxs("section",{"aria-label":h.label,children:[m.jsxs("h3",{className:"mb-3 flex items-center gap-2.5 text-[0.85rem] after:flex-1 after:border-t after:border-border-soft after:content-['']",children:[m.jsx("time",{dateTime:h.date,children:h.label}),m.jsx("span",{className:"text-[0.7rem] font-normal text-muted-foreground",children:h.sessions.length})]}),m.jsxs("ul",{className:uM,children:[y===0&&p,h.sessions.map(b=>{const v=b.locked===void 0?ahe(b,t[b.id]):void 0,T=lhe[b.locked!==void 0?"locked":b.running?"running":v?"unread":"idle"],A=b.id===n||o&&c.has(b.id);return m.jsxs("li",{className:De("relative flex min-w-0 rounded-[12px] border bg-background",A?"border-primary bg-[color-mix(in_srgb,var(--primary)_8%,var(--background))]":De(T.card,"hover:border-muted-foreground hover:bg-[color-mix(in_srgb,var(--primary)_3%,var(--background))]")),children:[o&&m.jsx("input",{"aria-label":`Select ${b.title} for deletion`,checked:c.has(b.id),className:"absolute top-[17px] left-3.5 z-1 flex-none cursor-pointer accent-primary",onChange:()=>u(b.id),type:"checkbox"}),m.jsxs("button",{"aria-current":b.id===n?"true":void 0,"aria-pressed":o?c.has(b.id):void 0,className:De("flex max-h-[240px] min-h-[148px] min-w-0 flex-1 cursor-pointer flex-col items-stretch gap-2.5 overflow-hidden rounded-[11px] px-4 pb-4 text-left focus-visible:outline-2 focus-visible:outline-primary focus-visible:outline-offset-2 disabled:cursor-default",o&&"pl-9"),disabled:b.locked!==void 0&&!o,onClick:()=>o?u(b.id):r(b.id),type:"button",children:[m.jsxs("span",{className:De("-mx-4 flex flex-col gap-2.5 rounded-t-[11px] border-t-[3px] px-4 pt-3.5 pb-3",T.head,o&&"-ml-9 pl-9"),children:[m.jsx("span",{className:"line-clamp-2 pr-6 text-[0.9rem] leading-[1.45] font-semibold [overflow-wrap:anywhere]",title:b.title,children:b.title}),m.jsxs("span",{className:"flex min-h-[18px] flex-wrap items-center gap-x-3.5 gap-y-1.5",children:[m.jsxs("span",{className:De("flex items-center gap-[7px] text-[0.75rem]",T.text),children:[b.running?m.jsx(Wc,{"aria-hidden":!0,className:"size-3"}):m.jsx("span",{"aria-hidden":!0,className:"size-[7px] flex-none rounded-full bg-current"}),b.locked!==void 0?"Locked":b.running?"Running":b.id===n?"Open":"Idle"]}),v&&m.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[0.7rem] font-semibold text-primary",title:v==="updated"?"New journal activity since you last viewed this run":"Not viewed in this browser yet",children:[m.jsx("span",{"aria-hidden":!0,className:"size-[7px] flex-none rounded-full bg-current"}),v==="updated"?"New activity":"Not viewed"]})]})]}),b.locked!==void 0?m.jsx("span",{className:"line-clamp-3 text-[0.75rem] leading-[1.45] text-destructive [overflow-wrap:anywhere]",title:b.locked,children:b.locked}):a.sessionMetadata.map(({id:w,Metadata:k})=>m.jsx(k,{placement:"list",session:b},w)),m.jsxs("span",{className:"mt-auto grid gap-0.5 text-muted-foreground",children:[b.createdAt!==void 0&&m.jsxs("span",{className:"text-[0.7rem] tabular-nums",children:["Created ",m.jsx("time",{dateTime:new Date(b.createdAt).toISOString(),children:new Date(b.createdAt).toLocaleString(void 0,{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})})]}),b.ownerLabel!==void 0&&m.jsxs("span",{className:"text-[0.7rem] [overflow-wrap:anywhere]",children:["Created by ",b.ownerLabel]}),m.jsxs("span",{className:"text-[0.7rem] tabular-nums",children:["Last activity ",ohe(b.updatedAt)]})]})]}),!o&&i&&m.jsx(Er,{"aria-label":`Delete ${b.title}`,className:"absolute top-2.5 right-2.5 text-destructive hover:bg-destructive/12 hover:text-destructive",onClick:()=>i(b.id),size:"icon-sm",title:`Delete ${b.title}`,variant:"ghost",children:m.jsx(yX,{})})]},b.id)})]})]},h.date))})}var f1=8,yC=20*1024*1024,che=(e,t)=>{var i;const n=t.trim().toLowerCase();return n?n==="video/quicktime"?"video/mov":n:{png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",avif:"image/avif",svg:"image/svg+xml",pdf:"application/pdf",mp4:"video/mp4",webm:"video/webm",mov:"video/mov",mpeg:"video/mpeg",mpg:"video/mpeg",txt:"text/plain",md:"text/markdown",csv:"text/csv",tsv:"text/tab-separated-values",json:"application/json",jsonl:"application/x-ndjson",xml:"application/xml",yaml:"application/yaml",yml:"application/yaml",ts:"text/plain",tsx:"text/plain",js:"application/javascript",py:"text/plain",cs:"text/plain",fs:"text/plain",html:"text/html",css:"text/css",log:"text/plain"}[((i=e.split(".").at(-1))==null?void 0:i.toLowerCase())??""]??"application/octet-stream"},uhe=0,Rh=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`qsl-${Date.now().toString(36)}-${(uhe+=1).toString(36)}`;function RB(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(!n.closed&&(n.role==="assistant"||n.role==="thinking"))return t}return-1}function Oh(e){const t=RB(e);return t===-1?e:e.map((n,r)=>r===t?{...n,closed:!0}:n)}function dM(e,t,n,r,i){var c,u;const a=RB(e),o=e[a];return o&&o.role===t&&((c=o.textCursor)==null?void 0:c.conversationId)===(i==null?void 0:i.conversationId)&&((u=o.textCursor)==null?void 0:u.sequence)===(i==null?void 0:i.sequence)?e.map((d,p)=>p===a?{...d,text:d.text+n,...i?{textCursor:i}:{}}:d):[...Oh(e),{key:Rh(),role:t,text:n,at:r,...i?{textCursor:i}:{}}]}function OB(e,t){var n;switch(t.kind){case"reset":return[];case"user":return[...e,{key:Rh(),role:"user",text:t.text,closed:!0,at:t.at,...t.inputId?{inputId:t.inputId}:{},...(n=t.attachments)!=null&&n.length?{attachments:t.attachments}:{}}];case"steered":return e.map(r=>r.inputId===t.inputId?{...r,steered:!0}:r);case"text":return dM(e,"assistant",t.delta,t.at,t.cursor);case"thinking":return dM(e,"thinking",t.delta,t.at);case"tool":return[...Oh(e),{key:Rh(),role:"tool",text:t.label??t.name,closed:!0,tool:{id:t.id,name:t.name,arguments:t.arguments},at:t.at}];case"tool-result":{const r=e.map(i=>{var a;return(a=i.tool)==null?void 0:a.id}).lastIndexOf(t.id);return e.map((i,a)=>a===r&&i.tool?{...i,tool:{...i.tool,result:t.result,isError:t.isError}}:i)}case"action":return[...Oh(e),{key:Rh(),role:"action",text:t.text,closed:!0,action:{actionId:t.actionId,owner:t.owner,payload:t.payload},at:t.at}];case"action-resolved":return e.map(r=>{var i;return((i=r.action)==null?void 0:i.actionId)===t.actionId?{...r,action:{...r.action,status:t.status,result:t.result}}:r});case"system":return[...Oh(e),{key:Rh(),role:"system",text:t.text,closed:!0,at:t.at}];case"turn-done":return Oh(e);default:return e}}function mx(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function dhe(e){const t=e.arguments.replace(/\s+/g," ").trim(),n=t&&t!=="{}"?`${e.name} ${t}`:e.name;return n.length>160?`${n.slice(0,160)} ...`:n}var fM=Object.defineProperty,fhe=(e,t)=>{let n={};for(var r in e)fM(n,r,{get:e[r],enumerable:!0});return fM(n,Symbol.toStringTag,{value:"Module"}),n},phe=fhe({isAny:()=>DB,isAnyNonArbitrary:()=>Che,isArbitraryFamilyName:()=>Dhe,isArbitraryImage:()=>Phe,isArbitraryLength:()=>Ohe,isArbitraryNumber:()=>Ihe,isArbitraryPosition:()=>Lhe,isArbitraryShadow:()=>jhe,isArbitrarySize:()=>Rhe,isArbitraryValue:()=>UB,isArbitraryVariable:()=>HB,isArbitraryVariableFamilyName:()=>Bhe,isArbitraryVariableImage:()=>Uhe,isArbitraryVariableLength:()=>$he,isArbitraryVariablePosition:()=>Fhe,isArbitraryVariableShadow:()=>Hhe,isArbitraryVariableSize:()=>zhe,isArbitraryVariableWeight:()=>qhe,isArbitraryWeight:()=>Mhe,isFraction:()=>vhe,isInteger:()=>Ehe,isNamedContainerQuery:()=>khe,isNumber:()=>xC,isPercent:()=>The,isTshirtSize:()=>whe});const IB=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,MB=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hhe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,mhe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ghe=/\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$/,bhe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yhe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xhe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vhe=e=>hhe.test(e),xC=e=>!!e&&!Number.isNaN(Number(e)),Ehe=e=>!!e&&Number.isInteger(Number(e)),The=e=>e.endsWith("%")&&xC(e.slice(0,-1)),whe=e=>mhe.test(e),DB=()=>!0,She=e=>ghe.test(e)&&!bhe.test(e),vC=()=>!1,Ahe=e=>yhe.test(e),_he=e=>xhe.test(e),Che=e=>!UB(e)&&!HB(e),khe=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)),Jc=(e,t,n)=>{const r=IB.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},vd=(e,t,n=!1)=>{const r=MB.exec(e);return r?r[1]?t(r[1]):n:!1},LB=e=>e==="position"||e==="percentage",PB=e=>e==="image"||e==="url",jB=e=>e==="length"||e==="size"||e==="bg-size",$B=e=>e==="length",Nhe=e=>e==="number",BB=e=>e==="family-name",FB=e=>e==="number"||e==="weight",zB=e=>e==="shadow",Rhe=e=>Jc(e,jB,vC),UB=e=>IB.test(e),Ohe=e=>Jc(e,$B,She),Ihe=e=>Jc(e,Nhe,xC),Mhe=e=>Jc(e,FB,DB),Dhe=e=>Jc(e,BB,vC),Lhe=e=>Jc(e,LB,vC),Phe=e=>Jc(e,PB,_he),jhe=e=>Jc(e,zB,Ahe),HB=e=>MB.test(e),$he=e=>vd(e,$B),Bhe=e=>vd(e,BB),Fhe=e=>vd(e,LB),zhe=e=>vd(e,jB),Uhe=e=>vd(e,PB),Hhe=e=>vd(e,zB,!0),qhe=e=>vd(e,FB,!0),pM=(e,t)=>{const n=Object.keys(e);return n.length===1&&n[0]===t&&typeof e[t]=="string"},Vhe=e=>typeof e=="function"&&e.isThemeGetter===!0,Ghe=e=>({...e,theme:{...e.theme},classGroups:{...e.classGroups},conflictingClassGroups:{...e.conflictingClassGroups},conflictingClassGroupModifiers:{...e.conflictingClassGroupModifiers},orderSensitiveModifiers:[...e.orderSensitiveModifiers],postfixLookupClassGroups:[...e.postfixLookupClassGroups??[]]}),Khe=(e,t)=>{const n=Ghe(e);t.prefix!==void 0&&(n.prefix=t.prefix);const r=(c,u)=>{if(u)for(const d in u)u[d]!==void 0&&(c[d]=u[d])},i=t.override;i&&(i.orderSensitiveModifiers&&(n.orderSensitiveModifiers=[...i.orderSensitiveModifiers]),r(n.theme,i.theme),r(n.classGroups,i.classGroups),r(n.conflictingClassGroups,i.conflictingClassGroups),r(n.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers));const a=(c,u)=>{if(u)for(const d in u){const p=u[d];p&&(c[d]=(c[d]??[]).concat(p))}},o=t.extend;return o&&(o.orderSensitiveModifiers&&(n.orderSensitiveModifiers=[...n.orderSensitiveModifiers,...o.orderSensitiveModifiers]),a(n.theme,o.theme),a(n.classGroups,o.classGroups),a(n.conflictingClassGroups,o.conflictingClassGroups),a(n.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers)),n},qB={isAny:0,isAnyNonArbitrary:1,isArbitraryValue:2,isArbitraryVariable:3,isFraction:4,isNumber:5,isInteger:6,isPercent:7,isTshirtSize:8,isNamedContainerQuery:9,isArbitraryLength:10,isArbitraryNumber:11,isArbitraryWeight:12,isArbitraryFamilyName:13,isArbitraryPosition:14,isArbitrarySize:15,isArbitraryImage:16,isArbitraryShadow:17,isArbitraryVariableLength:18,isArbitraryVariableFamilyName:19,isArbitraryVariablePosition:20,isArbitraryVariableSize:21,isArbitraryVariableImage:22,isArbitraryVariableShadow:23,isArbitraryVariableWeight:24},Yhe=25,Whe=()=>({names:[],idByName:new Map,impls:{},fnName:new Map,classifierFns:new Map}),hM=(e,t,n)=>{let r=e.idByName.get(t);return r===void 0&&(r=e.names.length,e.names.push(t),e.idByName.set(t,r),e.classifierFns.set(t,n)),r},mM=(e,t)=>{if(typeof t=="function"){let i=e.fnName.get(t);return i===void 0&&(i="$c"+e.fnName.size,e.fnName.set(t,i),e.impls[i]=t),hM(e,i,t)}const n=t.$v,r=phe[n];if(qB[n]===void 0||!r)throw new Error(`cn: unknown validator "${n}"`);return hM(e,n,r)},gM=()=>({nextPart:new Map,validators:null,classGroupId:-1,lit:[]}),Xhe=(e,t)=>e.theme[t]??[],Qhe=(e,t,n)=>{const r=gM(),i=(o,c)=>{for(const u of c.split("-")){let d=o.nextPart.get(u);d||(d=gM(),o.nextPart.set(u,d)),o=d}return o},a=(o,c,u)=>{if(typeof o=="string"){const d=o===""?c:i(c,o);d.classGroupId=u;return}if(typeof o=="function"){if(Vhe(o)){for(const d of o(e.theme))a(d,c,u);return}(c.validators??(c.validators=[])).push({validatorId:mM(t,o),groupId:u});return}if(pM(o,"$t")){for(const d of Xhe(e,o.$t))a(d,c,u);return}if(pM(o,"$v")){(c.validators??(c.validators=[])).push({validatorId:mM(t,o),groupId:u});return}for(const[d,p]of Object.entries(o)){const h=i(c,d);for(const y of p)a(y,h,u)}};for(const[o,c]of Object.entries(e.classGroups)){const u=n(o);for(const d of c)a(d,r,u)}return r},Zhe=e=>{const t=Whe(),n=[],r=new Map,i=Q=>{let se=r.get(Q);return se===void 0&&(se=n.length,n.push(Q),r.set(Q,se)),se},a=Qhe(e,t,i),o=Q=>{if(Q.validators)return!1;for(const se of Q.nextPart.values())if(!o(se))return!1;return!0},c=(Q,se,pe)=>{Q.classGroupId>=0&&pe.push({tail:se,gid:Q.classGroupId});for(const[Be,xe]of Q.nextPart)c(xe,se+"-"+Be,pe)},u=Q=>{for(const[se,pe]of[...Q.nextPart])o(pe)?(c(pe,se,Q.lit),Q.nextPart.delete(se)):u(pe)};u(a);const d=[{edges:new Map,groupId:-1,vlist:-1}],p=()=>(d.push({edges:new Map,groupId:-1,vlist:-1}),d.length-1),h=[],y=new Map,b=Q=>{const se=Q.map(Be=>Be.validatorId+":"+Be.groupId).join(",");let pe=y.get(se);return pe===void 0&&(pe=h.length,h.push(Q.map(Be=>[Be.validatorId,Be.groupId])),y.set(se,pe)),pe},v=(Q,se)=>{let pe=Q;for(let Be=0;Be<se.length;Be++){const xe=se.charCodeAt(Be);let Qe=d[pe].edges.get(xe);Qe===void 0&&(Qe=p(),d[pe].edges.set(xe,Qe)),pe=Qe}return pe},T=45,A=[],w=(Q,se,pe)=>{Q.classGroupId>=0&&(d[se].groupId=Q.classGroupId),Q.validators&&(d[se].vlist=b(Q.validators));for(const{tail:Be,gid:xe}of Q.lit)A.push({anchor:se,tail:Be,gid:xe});for(const[Be,xe]of Q.nextPart){let Qe=se;if(!pe){let ue=d[se].edges.get(T);ue===void 0&&(ue=p(),d[se].edges.set(T,ue)),Qe=ue}const oe=v(Qe,Be);w(xe,oe,!1)}};w(a,0,!0);const k=new Set(A.map(Q=>Q.anchor)),C=Q=>d[Q].groupId>=0||d[Q].vlist>=0||k.has(Q),R=new Map,O=[],N=Q=>{const se=O.length;R.set(Q,se);const pe={edges:[],groupId:d[Q].groupId,vlist:d[Q].vlist};O.push(pe);const Be=[...d[Q].edges.entries()].sort((xe,Qe)=>xe[0]-Qe[0]);for(const[xe,Qe]of Be){let oe=String.fromCharCode(xe),ue=Qe;for(;d[ue].edges.size===1&&!C(ue);){const[[ze,nt]]=d[ue].edges.entries();oe+=String.fromCharCode(ze),ue=nt}pe.edges.push({label:oe,oldTarget:ue})}for(const xe of pe.edges)N(xe.oldTarget);return se};N(0);const I=O.length;let L=0;for(const Q of O)L+=Q.edges.length;const j=new Int32Array(I),P=new Int32Array(L);let B="";const U=new Int32Array(I),q=new Int32Array(I),K=[];{let Q=0;for(let se=0;se<I;se++){const pe=O[se];j[se]=pe.edges.length;for(const Be of pe.edges)P[Q]=Be.label.length,B+=Be.label,K.push(R.get(Be.oldTarget)),Q++;U[se]=pe.groupId,q[se]=pe.vlist}}{const Q=new Int32Array(I);for(let pe=I-1;pe>=0;pe--){let Be=1,xe=pe+1;for(let Qe=0;Qe<j[pe];Qe++)Be+=Q[xe],xe+=Q[xe];Q[pe]=Be}let se=0;for(let pe=0;pe<I;pe++){let Be=pe+1;for(let xe=0;xe<j[pe];xe++){if(Be!==K[se])throw new Error(`cn compiler: edge target mismatch at ${se}`);Be+=Q[Be],se++}}}for(const Q of A)Q.anchor=R.get(Q.anchor);{const Q=new Int32Array(h.length).fill(-1),se=[];for(let pe=0;pe<I;pe++){const Be=q[pe];Be>=0&&(Q[Be]===-1&&(Q[Be]=se.length,se.push(h[Be])),q[pe]=Q[Be])}h.length=0,h.push(...se)}let V=0;for(const Q of h)V+=Q.length;const H=new Int32Array(V),W=new Int32Array(V);{let Q=0;for(const se of h)for(const[pe,Be]of se)H[Q]=pe,W[Q]=Be,Q++}A.sort((Q,se)=>Q.anchor-se.anchor||Q.gid-se.gid||(Q.tail<se.tail?-1:1));const Y=[];for(const Q of A){const se=Y[Y.length-1];se&&se.anchor===Q.anchor&&se.gid===Q.gid?se.tails.push(Q.tail):Y.push({anchor:Q.anchor,gid:Q.gid,tails:[Q.tail],set:-1})}const te=new Map,M=[];for(const Q of Y){const se=Q.tails.join(" ");let pe=te.get(se);pe===void 0&&(pe=M.length,te.set(se,pe),M.push(Q.tails)),Q.set=pe}for(const Q of M.flat())if(Q.includes("|")||Q.includes(" "))throw new Error("cn compiler: tail contains delimiter: "+Q);const z=new Set(M.flat()).size;Y.sort((Q,se)=>Q.anchor-se.anchor||Q.set-se.set);for(const Q of Object.values(e.conflictingClassGroups))for(const se of Q)i(se);for(const Q of Object.values(e.conflictingClassGroupModifiers))for(const se of Q)i(se);for(const Q of e.postfixLookupClassGroups??[])i(Q);const G=n.length,F=new Int32Array(G).fill(-1);let ee=0;const ae=Q=>(F[Q]===-1&&(F[Q]=ee++),F[Q]);for(let Q=0;Q<W.length;Q++)W[Q]=ae(W[Q]);for(const Q of Y)Q.gid=ae(Q.gid);for(let Q=0;Q<U.length;Q++)U[Q]>=0&&(U[Q]=ae(U[Q]));for(let Q=0;Q<G;Q++)F[Q]===-1&&(F[Q]=ee++);const re=new Array(G);for(let Q=0;Q<G;Q++)re[F[Q]]=n[Q];const ye=[],ge=[],Te=[],$e=[],He=[];for(let Q=0;Q<G;Q++){const se=re[Q],pe=(e.conflictingClassGroups[se]??[]).map(xe=>F[r.get(xe)]),Be=(e.conflictingClassGroupModifiers[se]??[]).map(xe=>F[r.get(xe)]);pe.length&&(ye.push(Q),ge.push(pe.length),Te.push(...pe));for(const xe of Be)$e.push(Q),He.push(xe)}const Ne=(e.postfixLookupClassGroups??[]).map(Q=>F[r.get(Q)]),Ie=[],be=new Int32Array(H.length);for(let Q=0;Q<H.length;Q++){const se=t.names[H[Q]],pe=qB[se];if(pe!==void 0)be[Q]=pe;else{let Be=Ie.indexOf(se);Be===-1&&(Be=Ie.length,Ie.push(se)),be[Q]=Yhe+Be}}const Le=new Map,Me=[],Oe=[],Ge=[];{let Q=0;for(const se of h){const pe=[];for(let Qe=0;Qe<se.length;Qe++)pe.push(be[Q++]);const Be=pe.join(",");let xe=Le.get(Be);xe===void 0&&(xe=Me.length,Le.set(Be,xe),Me.push(pe.length),Oe.push(...pe)),Ge.push(xe)}}const fe={};for(const Q of Ie)fe[Q]=t.classifierFns.get(Q);return{G,customNames:Ie,impls:fe,edgeCounts:j,edgeLabelLen:P,labelText:B,edgeTargetActual:K,nodeGroup:U,nodeVlist:q,nodeCount:I,totalEdges:L,patCounts:Me,patOps:Oe,listPat:Ge,vlistGroup:W,litEntries:A,sets:M,attachments:Y,uniqueTailCount:z,adjGid:ye,adjCnt:ge,adjTgt:Te,patGid:$e,patTgt:He,postfixLookup:Ne,orderSensitiveModifiers:e.orderSensitiveModifiers.join(" "),prefix:e.prefix}},V0=e=>{const t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},Jhe=e=>{const t=Zhe(e),n=t.litEntries.length,r=new Int32Array(n),i=new Int32Array(n),a=new Int32Array(n);let o="";const c=new Int32Array(t.uniqueTailCount*2);{const u=new Map;let d=0,p=0;for(const h of t.attachments)for(const y of t.sets[h.set]){let b=u.get(y);b===void 0&&(b=d++,u.set(y,b),c[b*2]=o.length,c[b*2+1]=y.length,o+=y),r[p]=h.anchor,i[p]=h.gid,a[p]=b,p++}}return{tables:{GROUP_COUNT:t.G,edgeStart:V0(t.edgeCounts),labelStart:V0(t.edgeLabelLen),labelText:t.labelText,edgeTarget:Int32Array.from(t.edgeTargetActual),nodeGroup:t.nodeGroup,nodeVlist:t.nodeVlist,vlistPat:V0(t.patCounts),vlistOps:Int32Array.from(t.patOps),vlistRef:Int32Array.from(t.listPat),vlistGroup:t.vlistGroup,litAnchor:r,litGroup:i,litPool:a,poolOffsets:c,poolText:o,adjGid:Int32Array.from(t.adjGid),adjStart:V0(t.adjCnt),adjTgt:Int32Array.from(t.adjTgt),patGid:Int32Array.from(t.patGid),patTgt:Int32Array.from(t.patTgt),postfixLookupGroups:Int32Array.from(t.postfixLookup),customValidatorNames:t.customNames,orderSensitiveModifiers:t.orderSensitiveModifiers},validatorImpls:t.impls,prefix:t.prefix}},eme="line"in new Error,fo=-1,Tu=-1,kT=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},kb=(e,t,n)=>{const r=n-t;let i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){const 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 c=t+3,u=n-4;c<t+8&&c<u;c++,u--)i=Math.imul(i^e.charCodeAt(c)^e.charCodeAt(u)<<8,16777619)}return i^i>>>15|0},tme=(e,t,n={})=>{const{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:c,nodeGroup:u,nodeVlist:d,vlistPat:p,vlistOps:h,vlistRef:y,vlistGroup:b,litAnchor:v,litGroup:T,litPool:A,poolOffsets:w,poolText:k,adjGid:C,adjStart:R,adjTgt:O,patGid:N,patTgt:I,postfixLookupGroups:L,customValidatorNames:j,orderSensitiveModifiers:P}=e,B=new Int32Array(r).fill(-1);for(let Z=0;Z<C.length;Z++)B[C[Z]]=Z;let U=0;for(let Z=0;Z+1<R.length;Z++){const he=R[Z+1]-R[Z];he>U&&(U=he)}let q=32;for(;q<2*(1+U+N.length);)q<<=1;const K=new Int32Array(y.length+1);for(let Z=0;Z<y.length;Z++)K[Z+1]=K[Z]+p[y[Z]+1]-p[y[Z]];const V=new Uint8Array(r);for(let Z=0;Z<L.length;Z++)V[L[Z]]=1;const H=i.length-1,W=new Uint8Array(H);let Y=0,te=!0;for(let Z=0;Z<v.length;Z++){W[v[Z]]=1;const he=w[A[Z]*2+1];he>Y&&(Y=he);const ve=k.charCodeAt(w[A[Z]*2]);(ve===91||ve===40)&&(te=!1)}let M=1;for(;M<v.length*2;)M<<=1;const z=new Int32Array(M).fill(-1);for(let Z=0;Z<v.length;Z++){const he=w[A[Z]*2];let ve=(kT(k,he,he+w[A[Z]*2+1])^Math.imul(v[Z],2654435761)|0)&M-1;for(;z[ve]!==-1;)ve=ve+1&M-1;z[ve]=Z}const G=(Z,he,ve,Ye)=>{let it=(kT(he,ve,Ye)^Math.imul(Z,2654435761)|0)&M-1;const ot=Ye-ve;for(;;){const yt=z[it];if(yt===-1)return-1;if(v[yt]===Z&&w[A[yt]*2+1]===ot){const Kt=w[A[yt]*2];let gt=!0;for(let Je=0;Je<ot;Je++)if(k.charCodeAt(Kt+Je)!==he.charCodeAt(ve+Je)){gt=!1;break}if(gt)return T[yt]}it=it+1&M-1}},F=n.cacheSize??8192,ee=n.prefix??e.prefix??"",ae=ee===""?"":ee+":",re=ae.length,ye=(j??[]).map(Z=>{const he=t&&t[Z];if(!he)throw new Error("cn: missing validator "+Z);return he}),ge=/\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$/,Te=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$e=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,He=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;let Ne=0,Ie=-1,be=-1,Le=-1,Me=-1;const Oe=Z=>Z>=97&&Z<=122||Z>=65&&Z<=90||Z>=48&&Z<=57||Z===95,Ge=Z=>/\s/.test(String.fromCharCode(Z)),fe=(Z,he,ve)=>{if(Ne=0,Ie=-1,ve-he<3)return;const Ye=Z.charCodeAt(he),it=Z.charCodeAt(ve-1);if(Ye===91&&it===93)Ne=1;else if(Ye===40&&it===41)Ne=2;else return;Le=he+1,Me=ve-1;let ot=he+1;if(Oe(Z.charCodeAt(ot))){for(ot++;ot<ve-1;){const yt=Z.charCodeAt(ot);if(!Oe(yt)&&yt!==45)break;ot++}ot<ve-2&&Z.charCodeAt(ot)===58&&(Ie=he+1,be=ot,Le=ot+1)}},Q=(Z,he,ve,Ye)=>{if(ve-he!==Ye.length)return!1;for(let it=0;it<Ye.length;it++)if(Z.charCodeAt(he+it)!==Ye.charCodeAt(it))return!1;return!0},se=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,pe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Be=Z=>!!Z&&!Number.isNaN(Number(Z)),xe=(Z,he,ve)=>{if(ve-he<11||!Q(Z,he,he+10,"@container"))return!1;if(Z.charCodeAt(he+10)===47)return ve-he>=12;const Ye=Z.charCodeAt(he+11);return Ye===115&&ve-he>=17&&Q(Z,he+10,he+16,"-size/")||Ye===110&&ve-he>=19&&Q(Z,he+10,he+18,"-normal/")},Qe=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],oe="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(Z=>Z.split(" ")),ue=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],ze=(Z,he,ve,Ye)=>{if(Z>=10){if(Z>=25)return ye[Z-25](he.slice(ve,Ye));const it=Z-10;if(Ne!==Qe[it])return!1;if(Ie>=0){for(const ot of oe[it])if(Q(he,Ie,be,ot))return!0;return!1}switch(ue[it]){case 0:return!1;case 1:return!0;case 2:{const ot=he.slice(Le,Me);return ge.test(ot)&&!Te.test(ot)}case 3:return Be(he.slice(Le,Me));case 4:return He.test(he.slice(Le,Me));default:return $e.test(he.slice(Le,Me))}}switch(Z){case 0:return!0;case 1:return Ne===0;case 2:return Ne===1;case 3:return Ne===2;case 4:return se.test(he.slice(ve,Ye));case 5:return Be(he.slice(ve,Ye));case 6:{const it=he.slice(ve,Ye);return!!it&&Number.isInteger(Number(it))}case 7:return Ye>ve&&he.charCodeAt(Ye-1)===37&&Be(he.slice(ve,Ye-1));case 8:return pe.test(he.slice(ve,Ye));default:return xe(he,ve,Ye)}},nt=new Set(typeof P=="string"?P.split(" "):P),ht=(Z,he,ve,Ye,it,ot)=>{const yt=kT(he,ve,Ye)^(it?2654435769:0)|0;let Kt=Z.get(yt);if(Kt!==void 0)e:for(let ft=0;ft<Kt.length;ft++){const Ke=Kt[ft];if(!(Ke.imp!==it||Ke.k.length!==Ye-ve)){for(let tn=0;tn<Ke.k.length;tn++)if(Ke.k.charCodeAt(tn)!==he.charCodeAt(ve+tn))continue e;return Ke.id}}else Z.set(yt,Kt=[]);const gt=he.slice(ve,Ye),Je=ot(gt);return Kt.push({k:gt,imp:it,id:Je}),Je};let Yt=new Map,Xt=new Map,at=2;const xt=4096,Ft=(Z,he)=>{const ve=[];let Ye=0,it=0,ot=0;for(let Je=0;Je<Z.length;Je++){const ft=Z.charCodeAt(Je);Ye===0&&it===0&&ft===58?(ve.push(Z.slice(ot,Je)),ot=Je+1):ft===91?Ye++:ft===93?Ye--:ft===40?it++:ft===41&&it--}ve.push(Z.slice(ot));let yt=ve[0];if(ve.length>1){const Je=[];let ft=[];for(const Ke of ve)Ke.charCodeAt(0)===91||nt.has(Ke)?(ft.length&&(Je.push(...ft.sort()),ft=[]),Je.push(Ke)):ft.push(Ke);ft.length&&Je.push(...ft.sort()),yt=Je.join(":")}const Kt=he?yt+" !":yt;let gt=Xt.get(Kt);return gt===void 0&&Xt.set(Kt,gt=at++),gt};let Mt=new Map,Qt=r;const vt=r+4096,zn=()=>Qt++,Jt=2097152,un=8192,kn=new Int32Array(un),Dt=new Array(un).fill(null),ne=new Int32Array(un),Ce=new Int32Array(un),le=new Uint8Array(un);let Fe=0;const dt=(Z,he,ve,Ye,it,ot,yt,Kt)=>{let gt=Z;if(Dt[Z]!==null)if(Dt[Z|1]===null)gt=Z|1;else if((Fe++&3)===0)gt=Z|Fe>>2&1;else return;Dt[gt]=he.slice(ve,Ye),kn[gt]=it,ne[gt]=ot,Ce[gt]=yt,le[gt]=Kt},St=()=>Dt.fill(null);let We=256,rt=[new Int32Array(We),new Int32Array(We),new Int32Array(We),new Int32Array(We)],[Xe,Tt,Pt,qn]=rt,Pn=new Uint8Array(We),Xn=new Uint8Array(We);const Vn=()=>{We*=2,rt=rt.map(he=>{const ve=new Int32Array(We);return ve.set(he),ve}),[Xe,Tt,Pt,qn]=rt;const Z=new Uint8Array(We);Z.set(Pn),Pn=Z,Xn=new Uint8Array(We)};let zt=64,mn=new Int32Array(zt),kr=new Int32Array(zt);const Wi=new Int32Array(r);let Ir=2048,va=21,Ea=new Float64Array(Ir),ji=new Int32Array(Ir),Wr=0;const Xr=(Z,he)=>{if(Z===0&&he<r)return Wi[he]===Wr?1:(Wi[he]=Wr,0);const ve=Z*2097152+he+1;let Ye=Math.imul(ve,2654435761)>>>va;for(;ji[Ye]===Wr;){if(Ea[Ye]===ve)return 1;Ye=Ye+1&Ir-1}return Ea[Ye]=ve,ji[Ye]=Wr,0},Ei=(Z,he,ve,Ye,it)=>{if(ve-he>=2&&Z.charCodeAt(he)===91&&Z.charCodeAt(ve-1)===93){let ot=-1;for(let yt=he+1;yt<ve-1;yt++)if(Z.charCodeAt(yt)===58){ot=yt;break}return ot===-1||ot===he+1?fo:ht(Mt,Z,he+1,ot,0,zn)}if(Ye>=0&&u[Ye]>=0)return u[Ye];for(let ot=it-1;ot>=0;ot--){const yt=kr[ot];if(yt>ve)continue;const Kt=mn[ot],gt=ve-yt;if(W[Kt]===1&&gt>0&&gt<=Y){const At=Z.charCodeAt(yt);if(te===!1||At!==91&&At!==40){const Rr=G(Kt,Z,yt,ve);if(Rr>=0)return Rr}}const Je=d[Kt];if(Je<0)continue;const ft=y[Je],Ke=p[ft],tn=p[ft+1];if(Ke===tn)continue;fe(Z,yt,ve);const Bt=K[Je]-Ke;for(let At=Ke;At<tn;At++)if(ze(h[At],Z,yt,ve))return b[Bt+At]}return fo},ki=Z=>{const he=Z.length;let ve=0,Ye=0,it=!1;(at>xt||Yt.size>xt)&&(Yt=new Map,Xt=new Map,at=2,St()),Qt>vt&&(Mt=new Map,Qt=r,St());let ot=0;for(;ot<he;){let Je=Z.charCodeAt(ot);if(Je===32||Je>=9&&Je<=13||Je>=160&&Ge(Je)){Je!==32&&(it=!0),ot++;continue}const ft=ot;let Ke=0;for(;ot<he;){if(Je=Z.charCodeAt(ot),Je<=32){if(Je===32)break;if(Je>=9&&Je<=13){it=!0;break}}else if(Je>=160&&Ge(Je)){it=!0;break}Ke=Math.imul(Ke^Je,16777619),ot++}const tn=ot,Bt=tn-ft;ve===We&&Vn();const At=ve++;Xe[At]=ft,Tt[At]=tn,Ye+=Bt,Ke^=Math.imul(Bt,2654435761);const Rr=Ke^Ke>>>15|0,Jn=Rr&8190;{let Nt=-1;if(kn[Jn]===Rr&&Dt[Jn]!==null&&Dt[Jn].length===Bt?Nt=Jn:kn[Jn|1]===Rr&&Dt[Jn|1]!==null&&Dt[Jn|1].length===Bt&&(Nt=Jn|1),Nt>=0){const Dr=Dt[Nt];let Zr=!0;for(let Jr=0;Jr<Bt;Jr++)if(Dr.charCodeAt(Jr)!==Z.charCodeAt(ft+Jr)){Zr=!1;break}if(Zr){Pt[At]=ne[Nt],qn[At]=Ce[Nt],Pn[At]=le[Nt];continue}}}let Ti=ft;if(re!==0){if(tn-ft<=re||!Z.startsWith(ae,ft)){Pt[At]=fo,dt(Jn,Z,ft,tn,Rr,fo,0,0);continue}Ti=ft+re}let Xi=0,ut=0,bt=-1,Ht=-1;for(let Nt=Ti;Nt<tn;Nt++){const Dr=Z.charCodeAt(Nt);if(Xi===0&&ut===0){if(Dr===58){bt=Nt;continue}if(Dr===47){Ht=Nt;continue}}Dr===91?Xi++:Dr===93?Xi--:Dr===40?ut++:Dr===41&&ut--}const rn=bt>=Ti?bt+1:Ti;let Wt=rn,gn=tn,Bi=!1,io=0;gn>Wt&&Z.charCodeAt(gn-1)===33?(Bi=!0,gn--):gn>Wt&&Z.charCodeAt(Wt)===33&&(Bi=!0,Wt++,io=1);let li=-1;Ht>rn&&(li=Ht+io,li>=gn&&(li=-1));let Fi=Wt;gn-Wt>1&&Z.charCodeAt(Wt)===45&&(Fi=Wt+1);let Mr=0,Qr=0,ni=0,Ho=-1,Or=0;(d[0]>=0||W[0]===1)&&(mn[0]=0,kr[0]=Fi,Or=1);let ao=Tu,cs=0;for(let Nt=Fi;Nt<gn;Nt++)if(Nt===li&&(ao=Qr<ni?Tu:Mr,cs=Or),Mr!==Tu){const Dr=Z.charCodeAt(Nt);let Zr=-1;if(Qr<ni)o.charCodeAt(Qr)===Dr?(Qr++,Qr===ni&&(Zr=Mr=Ho)):Mr=Tu;else{const Jr=i[Mr],da=i[Mr+1];let fs=Tu;for(let Ri=Jr;Ri<da;Ri++){const qo=a[Ri];if(o.charCodeAt(qo)===Dr){a[Ri+1]-qo===1?Zr=fs=c[Ri]:(Qr=qo+1,ni=a[Ri+1],Ho=c[Ri],fs=Mr);break}}Mr=fs}if(Zr>=0&&(d[Zr]>=0||W[Zr]===1)&&Nt+1<gn&&Z.charCodeAt(Nt+1)===45){if(Or===zt){zt*=2;const Jr=new Int32Array(zt);Jr.set(mn),mn=Jr;const da=new Int32Array(zt);da.set(kr),kr=da}mn[Or]=Zr,kr[Or]=Nt+2,Or++}}li===gn&&(ao=Qr<ni?Tu:Mr,cs=Or);const us=Qr<ni?Tu:Mr;let fr,Hr=!1;if(li>=0)if(Hr=!0,fr=Ei(Z,Wt,li,ao,cs),fr!==fo&&fr<r&&V[fr]){const Nt=Ei(Z,Wt,gn,us,Or);Nt!==fo&&Nt!==fr&&(fr=Nt,Hr=!1)}else fr===fo&&(fr=Ei(Z,Wt,gn,us,Or),Hr=!1);else fr=Ei(Z,Wt,gn,us,Or);let ua=0,ds=0;fr===fo?Pt[At]=fo:(ds=Hr?1:0,ua=Ti>=bt?Bi?1:0:ht(Yt,Z,Ti,bt,Bi?1:0,Nt=>Ft(Nt,Bi)),Pt[At]=fr,Pn[At]=ds,qn[At]=ua),dt(Jn,Z,ft,tn,Rr,fr,ua,ds)}if(ve===0)return"";if(ve===1)return Xe[0]===0&&Tt[0]===he?Z:Z.slice(Xe[0],Tt[0]);if(ve*q>Ir){for(;ve*q>Ir;)Ir<<=1,va--;Ea=new Float64Array(Ir),ji=new Int32Array(Ir)}if(at>=Jt||Qt>=Jt)throw new Error("cn: too many distinct classes in one merge");Wr=Wr+1|0,Wr===0&&(Wi.fill(0),ji.fill(0),Wr=1);let yt=!1;for(let Je=ve-1;Je>=0;Je--){const ft=Pt[Je];if(ft===fo){Xn[Je]=1;continue}const Ke=qn[Je];if(Xr(Ke,ft)===1){Xn[Je]=0,yt=!0;continue}if(Xn[Je]=1,ft<r){const tn=B[ft];if(tn>=0)for(let Bt=R[tn];Bt<R[tn+1];Bt++)Xr(Ke,O[Bt]);if(Pn[Je]&1)for(let Bt=0;Bt<N.length;Bt++)N[Bt]===ft&&Xr(Ke,I[Bt])}}if(!yt&&!it&&he===Ye+ve-1)return Z;let Kt="",gt=0;for(;gt<ve;){if(!Xn[gt]){gt++;continue}const Je=Xe[gt];let ft=Tt[gt],Ke=gt+1;for(;Ke<ve&&Xn[Ke]&&Xe[Ke]===ft+1&&Z.charCodeAt(ft)===32;)ft=Tt[Ke],Ke++;Kt.length>0&&(Kt+=" "),Kt+=Z.slice(Je,ft),gt=Ke}return Kt},Nr=16384,ln=new Int32Array(Nr*2);let Ta=0,Qn=1,si=Object.create(null),tt=Object.create(null),Et=new Map,en=new Map,dn=0,Zn=0;const dr=()=>{Ta^=Nr,Qn=Qn+1|0,Zn=0},$i=Z=>{let he=si[Z];if(he!==void 0)return he;const ve=kb(Z,0,Z.length),Ye=(ve&16383)+Ta,it=ln[Ye]===(ve^Qn)||ln[Ye^Nr]===(ve^Qn-1);return it&&(he=tt[Z],he!==void 0)?(si[Z]=he,he):(he=ki(Z),it?(si[Z]=he,++dn>F&&(dn=0,tt=si,si=Object.create(null),dr())):(ln[Ye]=ve^Qn,++Zn>Nr&&dr()),he)},Ni=Z=>{let he=Et.get(Z);if(he!==void 0)return he;const ve=kb(Z,0,Z.length),Ye=(ve&16383)+Ta,it=ln[Ye]===(ve^Qn)||ln[Ye^Nr]===(ve^Qn-1);return it&&(he=en.get(Z),he!==void 0)?(Et.set(Z,he),he):(he=ki(Z),it?(Et.set(Z,he),++dn>F&&(dn=0,en=Et,Et=new Map,dr())):(ln[Ye]=ve^Qn,++Zn>Nr&&dr()),he)},ir=Z=>{const he=kb(Z,0,Z.length),ve=(he&16383)+Ta;return ln[ve]===(he^Qn)||ln[ve^Nr]===(he^Qn-1)?!0:(ln[ve]=he^Qn,++Zn>Nr&&dr(),!1)},oi=F===0?ki:eme?Z=>{const he=Et.get(Z);return he!==void 0?he:Ni(Z)}:$i;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?oi(arguments[0]):oi(rme.apply(null,arguments))},mergeString:oi,seenBefore:F===0?()=>!1:ir,mergeUncached:ki}},p1=(e,t)=>{if(!e)return"";if(typeof e=="string")return e;let n="";if(typeof e.length=="number"&&(!t||Array.isArray(e))){const r=e;for(let i=0;i<r.length;i++){const a=r[i];if(!a)continue;const o=typeof a=="string"?a:p1(a,t);o&&(n&&(n+=" "),n+=o)}return n}if(t){if(typeof e=="number")return""+e;if(typeof e=="object")for(const r in e)e[r]&&(n&&(n+=" "),n+=r)}return n},nme=(e,t)=>{let n="";for(let r=0;r<e.length;r++){const i=e[r];if(!i)continue;const a=typeof i=="string"?i:p1(i,t);a&&(n&&(n+=" "),n+=a)}return n},rme=function(){return nme(arguments,!1)},ime=256,bM=16,ame=1024,NT=4096,sme=(e,t)=>{const n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached;let i=new Map,a=new Map,o=0,c=null,u=null,d=[],p=[],h=0;const y=(w,k,C)=>{u===null&&(u=new Array(NT).fill(""),d=new Array(NT).fill(""),p=new Array(NT).fill(""));const R=kb(w,0,w.length)&4094;if(u[R]===w&&d[R]===k)return p[R];if(u[R|1]===w&&d[R|1]===k)return p[R|1];const O=e(C?k+" "+w:w),N=u[R]===""?R:R|(u[R|1]===""?1:h++&1);return u[N]=w,d[N]=k,p[N]=O,O},b=(w,k,C,R)=>{let O=0;if(k){if(k!==w.a0)return!1;O=1}if(C){if(C!==(O===0?w.a0:w.a1))return!1;O++}if(R){if(R!==(O===0?w.a0:O===1?w.a1:w.a2))return!1;O++}return O===w.t},v=(w,k)=>{const C=w.a;let R=0;for(let O=0;O<k.length;O++){const N=k[O];if(N){if(N!==C[R])return!1;R++}}return R===w.t},T=(w,k)=>{const C=w.length,R=c===null?null:c.n;if(!k){if(R!==null&&v(R,w))return c=R,R.r;if(c!==null&&c!==R&&v(c,w))return c.r}let O="",N=-1,I=0,L=!1;for(let B=0;B<C;B++){let U=w[B];if(U){if(typeof U!="string"){if(U=w[B]=p1(U,!0),!U)continue;L=!0}N<0&&(O=U,N=B),I++}}if(I===0)return"";if(I===1)return e(O);if(L){if(R!==null&&v(R,w))return c=R,R.r;if(c!==null&&c!==R&&v(c,w))return c.r}let j=i.get(O);j===void 0&&(j=a.get(O),j!==void 0&&i.set(O,j));let P=null;if(j!==void 0){if(j.skip>0){j.skip--,c=null;let U=O;for(let q=N+1;q<C;q++){const K=w[q];K&&(U+=" "+K)}return y(U,"",!1)}const B=j.e;e:for(let U=0;U<B.length;U++){const q=B[U];if(q.t!==I)continue;const K=q.a;let V=1;for(let H=N+1;H<C;H++){const W=w[H];if(W&&W!==K[V++])continue e}P=q;break}P!==null&&(j.miss=0)}if(P===null){let B=O;const U=[O];for(let K=N+1;K<C;K++){const V=w[K];V&&(B+=" "+V,U.push(V))}if(!n(B))return r(B);P={r:e(B),t:U.length,a0:U[0],a1:U[1],a2:U[2]??"",a:U,n:null},j===void 0?i.set(O,j={e:[],miss:0,skip:0,at:0}):++j.miss>bM&&(j.miss=bM,j.skip=ame,j.e.length=0,j.at=0);const q=j.e;q.length<ime?q.push(P):(q[j.at]=P,j.at=j.at+1&255),++o>1e3&&(o=0,a=i,i=new Map)}return c!==null&&c!==P&&(c.n=P),c=P,P.r},A=w=>Array.isArray(w)?T(w.slice(),!1):e(p1(w,!0));return function(w,k,C){const R=arguments.length;if((R|1)===3){const I=c;if(I!==null){const L=I.n;if(L!==null&&b(L,w,k,C))return c=L,L.r;if(I!==L&&b(I,w,k,C))return I.r}if(R===2&&typeof k=="string"&&k!==""){const L=i.get(w);if(L!==void 0&&L.skip>0)return L.skip--,c=null,y(k,w,!0)}return T([w,k,C],!0)}if(R===1)return typeof w=="string"?e(w):A(w);const O=c;if(O!==null){const I=O.n;if(I!==null){const L=I.a;let j=0,P=!0;for(let B=0;B<R;B++){const U=arguments[B];if(U){if(U!==L[j]){P=!1;break}j++}}if(P&&j===I.t)return c=I,I.r}if(O!==I){const L=O.a;let j=0,P=!0;for(let B=0;B<R;B++){const U=arguments[B];if(U){if(U!==L[j]){P=!1;break}j++}}if(P&&j===O.t)return O.r}}const N=[];for(let I=0;I<R;I++)N.push(arguments[I]);return T(N,!0)}},ome='{"theme":{"animate":["spin","ping","pulse","bounce"],"aspect":["video"],"blur":[{"$v":"isTshirtSize"}],"breakpoint":[{"$v":"isTshirtSize"}],"color":[{"$v":"isAny"}],"container":[{"$v":"isTshirtSize"}],"drop-shadow":[{"$v":"isTshirtSize"}],"ease":["in","out","in-out"],"font":[{"$v":"isAnyNonArbitrary"}],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[{"$v":"isTshirtSize"}],"leading":["none","tight","snug","normal","relaxed","loose"],"perspective":["dramatic","near","normal","midrange","distant","none"],"radius":[{"$v":"isTshirtSize"}],"shadow":[{"$v":"isTshirtSize"}],"spacing":["px",{"$v":"isNumber"}],"text":[{"$v":"isTshirtSize"}],"text-shadow":[{"$v":"isTshirtSize"}],"tracking":["tighter","tight","normal","wide","wider","widest"]},"classGroups":{"aspect":[{"aspect":["auto","square",{"$v":"isFraction"},{"$v":"isArbitraryValue"},{"$v":"isArbitraryVariable"},{"$t":"aspect"}]}],"container":["container"],"container-type":[{"@container":["","normal","size",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"container-named":[{"$v":"isNamedContainerQuery"}],"columns":[{"columns":[{"$v":"isNumber"},"auto",{"$v":"isArbitraryValue"},{"$v":"isArbitraryVariable"},{"$t":"container"}]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"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":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"overflow":[{"overflow":["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],"overscroll":[{"overscroll":["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],"position":["static","fixed","absolute","relative","sticky"],"inset":[{"inset":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-x":[{"inset-x":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-y":[{"inset-y":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"start":[{"inset-s":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}],"start":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"end":[{"inset-e":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}],"end":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-bs":[{"inset-bs":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-be":[{"inset-be":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"top":[{"top":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"right":[{"right":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"bottom":[{"bottom":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"left":[{"left":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"visibility":["visible","invisible","collapse"],"z":[{"z":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"basis":[{"basis":[{"$v":"isFraction"},"full","auto",{"$t":"container"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"flex-direction":[{"flex":["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{"flex":["nowrap","wrap","wrap-reverse"]}],"flex":[{"flex":[{"$v":"isNumber"},{"$v":"isFraction"},"auto","initial","none",{"$v":"isArbitraryValue"}]}],"grow":[{"grow":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"shrink":[{"shrink":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"order":[{"order":[{"$v":"isInteger"},"first","last","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-cols":[{"grid-cols":[{"$v":"isInteger"},"none","subgrid",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-start-end":[{"col":["auto",{"span":["full",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-start":[{"col-start":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-end":[{"col-end":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-rows":[{"grid-rows":[{"$v":"isInteger"},"none","subgrid",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-start-end":[{"row":["auto",{"span":["full",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-start":[{"row-start":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-end":[{"row-end":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"auto-cols":[{"$t":"spacing"}]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"auto-rows":[{"$t":"spacing"}]}],"gap":[{"gap":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"gap-x":[{"gap-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"gap-y":[{"gap-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"justify-content":[{"justify":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{"content":["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{"items":["start","end","center","stretch","center-safe","end-safe",{"baseline":["","last"]}]}],"align-self":[{"self":["auto","start","end","center","stretch","center-safe","end-safe",{"baseline":["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"p":[{"p":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"px":[{"px":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"py":[{"py":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ps":[{"ps":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pe":[{"pe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pbs":[{"pbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pbe":[{"pbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pt":[{"pt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pr":[{"pr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pb":[{"pb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pl":[{"pl":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"m":[{"m":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mx":[{"mx":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"my":[{"my":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ms":[{"ms":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"me":[{"me":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mbs":[{"mbs":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mbe":[{"mbe":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mt":[{"mt":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mr":[{"mr":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mb":[{"mb":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ml":[{"ml":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-x":[{"space-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-y-reverse":["space-y-reverse"],"size":[{"size":[{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inline-size":[{"inline":["auto",{"$t":"container"},{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-inline-size":[{"min-inline":["auto",{"$t":"container"},{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-inline-size":[{"max-inline":["none",{"$t":"container"},{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"block-size":[{"block":["auto",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-block-size":[{"min-block":["auto",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-block-size":[{"max-block":["none",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"w":[{"w":[{"$t":"container"},"screen",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-w":[{"min-w":[{"$t":"container"},"screen","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-w":[{"max-w":[{"$t":"container"},"screen","none","prose",{"screen":[{"$t":"breakpoint"}]},{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"h":[{"h":["screen","lh",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-h":[{"min-h":["screen","lh","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-h":[{"max-h":["screen","lh","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"font-size":[{"text":["base",{"$t":"text"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{"font":[{"$t":"font-weight"},{"$v":"isArbitraryVariableWeight"},{"$v":"isArbitraryWeight"}]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",{"$v":"isPercent"},{"$v":"isArbitraryValue"}]}],"font-family":[{"font":[{"$v":"isArbitraryVariableFamilyName"},{"$v":"isArbitraryFamilyName"},{"$t":"font"}]}],"font-features":[{"font-features":[{"$v":"isArbitraryValue"}]}],"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":[{"$t":"tracking"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"line-clamp":[{"line-clamp":[{"$v":"isNumber"},"none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryNumber"}]}],"leading":[{"leading":["none",{"$t":"leading"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"list-image":[{"list-image":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"list-style-position":[{"list":["inside","outside"]}],"list-style-type":[{"list":["disc","decimal","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-alignment":[{"text":["left","center","right","justify","start","end"]}],"placeholder-color":[{"placeholder":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-color":[{"text":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{"decoration":["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{"decoration":[{"$v":"isNumber"},"from-font","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryLength"}]}],"text-decoration-color":[{"decoration":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"underline-offset":[{"underline-offset":[{"$v":"isNumber"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{"text":["wrap","nowrap","balance","pretty"]}],"indent":[{"indent":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"tab-size":[{"tab":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"vertical-align":[{"align":["baseline","top","middle","bottom","text-top","text-bottom","sub","super",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"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",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"bg-attachment":[{"bg":["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{"bg":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"},{"position":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"bg-repeat":[{"bg":["no-repeat",{"repeat":["","x","y","space","round"]}]}],"bg-size":[{"bg":["auto","cover","contain",{"$v":"isArbitraryVariableSize"},{"$v":"isArbitrarySize"},{"size":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"bg-image":[{"bg":["none",{"linear":[{"to":["t","tr","r","br","b","bl","l","tl"]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}],"radial":["",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}],"conic":["",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isArbitraryVariableImage"},{"$v":"isArbitraryImage"}]},{"bg-gradient-to":["t","tr","r","br","b","bl","l","tl"]}],"bg-color":[{"bg":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-from-pos":[{"from":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-via-pos":[{"via":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-to-pos":[{"to":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-from":[{"from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-via":[{"via":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-to":[{"to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded":[{"rounded":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-s":[{"rounded-s":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-e":[{"rounded-e":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-t":[{"rounded-t":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-r":[{"rounded-r":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-b":[{"rounded-b":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-l":[{"rounded-l":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-ss":[{"rounded-ss":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-se":[{"rounded-se":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-ee":[{"rounded-ee":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-es":[{"rounded-es":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-tl":[{"rounded-tl":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-tr":[{"rounded-tr":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-br":[{"rounded-br":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-bl":[{"rounded-bl":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-w":[{"border":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-x":[{"border-x":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-y":[{"border-y":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-s":[{"border-s":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-e":[{"border-e":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-bs":[{"border-bs":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-be":[{"border-be":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-t":[{"border-t":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-r":[{"border-r":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-b":[{"border-b":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-l":[{"border-l":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-x":[{"divide-x":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{"border":["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{"divide":["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{"border":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-x":[{"border-x":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-y":[{"border-y":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-s":[{"border-s":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-e":[{"border-e":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-bs":[{"border-bs":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-be":[{"border-be":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-t":[{"border-t":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-r":[{"border-r":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-b":[{"border-b":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-l":[{"border-l":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"divide-color":[{"divide":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"outline-style":[{"outline":["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"outline-w":[{"outline":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"outline-color":[{"outline":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"shadow":[{"shadow":["","inner","none",{"$t":"shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"shadow-color":[{"shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"inset-shadow":[{"inset-shadow":["none",{"$t":"inset-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"inset-shadow-color":[{"inset-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ring-w":[{"ring":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"ring-w-inset":["ring-inset"],"ring-color":[{"ring":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ring-offset-w":[{"ring-offset":[{"$v":"isNumber"},{"$v":"isArbitraryLength"}]}],"ring-offset-color":[{"ring-offset":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"inset-ring-w":[{"inset-ring":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"inset-ring-color":[{"inset-ring":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-shadow":[{"text-shadow":["none",{"$t":"text-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"text-shadow-color":[{"text-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"opacity":[{"opacity":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"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":[{"$v":"isNumber"}]}],"mask-image-linear-from-pos":[{"mask-linear-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-linear-to-pos":[{"mask-linear-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-linear-from-color":[{"mask-linear-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-linear-to-color":[{"mask-linear-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-t-from-pos":[{"mask-t-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-t-to-pos":[{"mask-t-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-t-from-color":[{"mask-t-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-t-to-color":[{"mask-t-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-r-from-pos":[{"mask-r-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-r-to-pos":[{"mask-r-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-r-from-color":[{"mask-r-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-r-to-color":[{"mask-r-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-b-from-pos":[{"mask-b-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-b-to-pos":[{"mask-b-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-b-from-color":[{"mask-b-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-b-to-color":[{"mask-b-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-l-from-pos":[{"mask-l-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-l-to-pos":[{"mask-l-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-l-from-color":[{"mask-l-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-l-to-color":[{"mask-l-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-x-from-pos":[{"mask-x-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-x-to-pos":[{"mask-x-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-x-from-color":[{"mask-x-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-x-to-color":[{"mask-x-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-y-from-pos":[{"mask-y-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-y-to-pos":[{"mask-y-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-y-from-color":[{"mask-y-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-y-to-color":[{"mask-y-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial":[{"mask-radial":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-from-pos":[{"mask-radial-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-radial-to-pos":[{"mask-radial-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-radial-from-color":[{"mask-radial-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-to-color":[{"mask-radial-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"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":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[{"$v":"isNumber"}]}],"mask-image-conic-from-pos":[{"mask-conic-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-conic-to-pos":[{"mask-conic-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-conic-from-color":[{"mask-conic-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-conic-to-color":[{"mask-conic-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-mode":[{"mask":["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{"mask":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"},{"position":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"mask-repeat":[{"mask":["no-repeat",{"repeat":["","x","y","space","round"]}]}],"mask-size":[{"mask":["auto","cover","contain",{"$v":"isArbitraryVariableSize"},{"$v":"isArbitrarySize"},{"size":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{"mask":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"filter":[{"filter":["","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"blur":[{"blur":["","none",{"$t":"blur"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"brightness":[{"brightness":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"contrast":[{"contrast":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"drop-shadow":[{"drop-shadow":["","none",{"$t":"drop-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"drop-shadow-color":[{"drop-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grayscale":[{"grayscale":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"hue-rotate":[{"hue-rotate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"invert":[{"invert":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"saturate":[{"saturate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"sepia":[{"sepia":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-filter":[{"backdrop-filter":["","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-blur":[{"backdrop-blur":["","none",{"$t":"blur"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-brightness":[{"backdrop-brightness":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-contrast":[{"backdrop-contrast":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-grayscale":[{"backdrop-grayscale":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-invert":[{"backdrop-invert":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-opacity":[{"backdrop-opacity":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-saturate":[{"backdrop-saturate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-sepia":[{"backdrop-sepia":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-collapse":[{"border":["collapse","separate"]}],"border-spacing":[{"border-spacing":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"border-spacing-x":[{"border-spacing-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"border-spacing-y":[{"border-spacing-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"table-layout":[{"table":["auto","fixed"]}],"caption":[{"caption":["top","bottom"]}],"transition":[{"transition":["","all","colors","opacity","shadow","transform","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transition-behavior":[{"transition":["normal","discrete"]}],"duration":[{"duration":[{"$v":"isNumber"},"initial",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ease":[{"ease":["linear","initial",{"$t":"ease"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"delay":[{"delay":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"animate":[{"animate":["none",{"$t":"animate"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backface":[{"backface":["hidden","visible"]}],"perspective":[{"perspective":[{"$t":"perspective"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"perspective-origin":[{"perspective-origin":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate":[{"rotate":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-x":[{"rotate-x":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-y":[{"rotate-y":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-z":[{"rotate-z":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale":[{"scale":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-x":[{"scale-x":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-y":[{"scale-y":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-z":[{"scale-z":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-3d":["scale-3d"],"skew":[{"skew":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"skew-x":[{"skew-x":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"skew-y":[{"skew-y":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transform":[{"transform":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},"","none","gpu","cpu"]}],"transform-origin":[{"origin":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transform-style":[{"transform":["3d","flat"]}],"translate":[{"translate":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-x":[{"translate-x":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-y":[{"translate-y":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-z":[{"translate-z":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-none":["translate-none"],"zoom":[{"zoom":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"accent":[{"accent":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"appearance":[{"appearance":["none","auto"]}],"caret-color":[{"caret":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"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",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"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":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scrollbar-track-color":[{"scrollbar-track":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{"scrollbar":["auto","thin","none"]}],"scroll-m":[{"scroll-m":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mx":[{"scroll-mx":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-my":[{"scroll-my":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ms":[{"scroll-ms":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-me":[{"scroll-me":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mbs":[{"scroll-mbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mbe":[{"scroll-mbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mt":[{"scroll-mt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mr":[{"scroll-mr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mb":[{"scroll-mb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ml":[{"scroll-ml":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-p":[{"scroll-p":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-px":[{"scroll-px":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-py":[{"scroll-py":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ps":[{"scroll-ps":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pe":[{"scroll-pe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pbs":[{"scroll-pbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pbe":[{"scroll-pbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pt":[{"scroll-pt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pr":[{"scroll-pr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pb":[{"scroll-pb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pl":[{"scroll-pl":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"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",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"fill":[{"fill":["none",{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"stroke-w":[{"stroke":[{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"},{"$v":"isArbitraryNumber"}]}],"stroke":[{"stroke":["none",{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}],"contain":[{"contain":["none","content","strict",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"contain-size":[{"contain":["size","inline-size"]}],"contain-layout":["contain-layout"],"contain-paint":["contain-paint"],"contain-style":["contain-style"]},"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":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],"flex":["basis","grow","shrink"],"gap":["gap-x","gap-y"],"p":["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],"px":["ps","pe","pr","pl"],"py":["pbs","pbe","pt","pb"],"m":["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],"mx":["ms","me","mr","ml"],"my":["mbs","mbe","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-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","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-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","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-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","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-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],"touch":["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"],"contain":["contain-size","contain-layout","contain-paint","contain-style"],"contain-size":["contain"],"contain-layout":["contain"],"contain-paint":["contain"],"contain-style":["contain"]},"conflictingClassGroupModifiers":{"font-size":["leading"]},"orderSensitiveModifiers":["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"],"postfixLookupClassGroups":["container-type"]}',RT=()=>JSON.parse(ome),lme=e=>"classGroups"in e&&"theme"in e&&"conflictingClassGroups"in e,cme=e=>e===void 0?{config:RT()}:typeof e=="function"?{config:e(RT())}:lme(e)?{config:e}:{config:Khe(RT(),e),cacheSize:e.cacheSize},ume=e=>{const{config:t,cacheSize:n}=cme(e),{tables:r,validatorImpls:i,prefix:a}=Jhe(t);return tme(r,i,{cacheSize:n,prefix:a})},dme=e=>{let t=null;const n=()=>t??(t=ume(e));return sme(r=>n().mergeString(r),{seenBefore:r=>n().seenBefore(r),mergeUncached:r=>n().mergeUncached(r)})},fme="modulepreload",pme=function(e){return"/"+e},yM={},VB=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let o=function(d){return Promise.all(d.map(p=>Promise.resolve(p).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),u=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=o(n.map(d=>{if(d=pme(d),d in yM)return;yM[d]=!0;const p=d.endsWith(".css"),h=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${h}`))return;const y=document.createElement("link");if(y.rel=p?"stylesheet":fme,p||(y.as="script"),y.crossOrigin="",y.href=d,u&&y.setAttribute("nonce",u),document.head.appendChild(y),p)return new Promise((b,v)=>{y.addEventListener("load",b),y.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${d}`)))})}))}function a(o){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=o,window.dispatchEvent(c),!c.defaultPrevented)throw o}return i.then(o=>{for(const c of o||[])c.status==="rejected"&&a(c.reason);return t().catch(a)})},gx=(function(e){if(e==null)return bme;if(typeof e=="function")return bx(e);if(typeof e=="object")return Array.isArray(e)?hme(e):mme(e);if(typeof e=="string")return gme(e);throw new Error("Expected function, string, or object as test")});function hme(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=gx(e[n]);return bx(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function mme(e){const t=e;return bx(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function gme(e){return bx(t);function t(n){return n&&n.type===e}}function bx(e){return t;function t(n,r,i){return!!(yme(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function bme(){return!0}function yme(e){return e!==null&&typeof e=="object"&&"type"in e}const GB=[],Ih=!0,gw=!1,Bu="skip";function yx(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=gx(i),o=r?-1:1;c(e,void 0,[])();function c(u,d,p){const h=u&&typeof u=="object"?u:{};if(typeof h.type=="string"){const b=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(u.type+(b?"<"+b+">":""))+")"})}return y;function y(){let b=GB,v,T,A;if((!t||a(u,d,p[p.length-1]||void 0))&&(b=xme(n(u,p)),b[0]===gw))return b;if("children"in u&&u.children){const w=u;if(w.children&&b[0]!==Bu)for(T=(r?w.children.length:-1)+o,A=p.concat(w);T>-1&&T<w.children.length;){const k=w.children[T];if(v=c(k,T,A)(),v[0]===gw)return v;T=typeof v[1]=="number"?v[1]:T+o}}return b}}}function xme(e){return Array.isArray(e)?e:typeof e=="number"?[Ih,e]:e==null?GB:[e]}function Zs(e,t,n,r){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=r),yx(e,a,c,i);function c(u,d){const p=d[d.length-1],h=p?p.children.indexOf(u):void 0;return o(u,h,p)}}const Ff={indicator:"indicator",textOnly:"text-only",remove:"remove"};function vme({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:o="text-gray-500",linkBlockPolicy:c=Ff.indicator,imageBlockPolicy:u=Ff.indicator}){const d=t.length&&!t.every(h=>h==="*"),p=n.length&&!n.every(h=>h==="*");if(!e&&(d||p))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return h=>{const y=_me(e,t,n,r,i,a,o,c,u);KB(h),Zs(h,y)}}function xM(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function Eme(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Tme=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),wme=new Set(["javascript:","data:","file:","vbscript:"]);function vM(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const p=e.substring(5);if(p&&p.length>0&&p!=="invalid")return e}}catch{return null}return null}const o=xM(e,n);if(!o||wme.has(o.protocol)||!(Tme.has(o.protocol)||a.includes(o.protocol)||a.includes("*")))return null;if(o.protocol==="mailto:"||!o.protocol.match(/^https?:$/))return o.href;const u=Eme(e);return o&&t.some(d=>{const p=xM(d,n);return!p||p.origin!==o.origin?!1:o.href.startsWith(p.href)})?u?o.pathname+o.search+o.hash:o.href:t.includes("*")?o.protocol!=="https:"&&o.protocol!=="http:"?null:u?o.pathname+o.search+o.hash:o.href:null}function KB(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)KB(t)}}const OT=Symbol("node-seen");function Sme(e,t,n){return t===Ff.remove?{type:"remove"}:t===Ff.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function Ame(e,t,n){if(t===Ff.remove)return{type:"remove"};if(t===Ff.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const _me=(e,t,n,r,i,a,o,c,u)=>{const d=(p,h,y)=>{if(p.type!=="element"||p[OT])return Ih;if(p.tagName==="a"){const b=vM(p.properties.href,t,e,!1,!1,i);if(b===null){if(p[OT]=!0,Zs(p,d),y&&typeof h=="number"){const v=Sme(p,c,o);if(v.type==="remove")return y.children.splice(h,1),[Bu,h];y.children[h]=v.element}return Bu}else return p.properties.href=b,p.properties.target="_blank",p.properties.rel="noopener noreferrer",Ih}if(p.tagName==="img"){const b=vM(p.properties.src,n,e,r,!0,i);if(b===null){if(p[OT]=!0,Zs(p,d),y&&typeof h=="number"){const v=Ame(p,u,a);if(v.type==="remove")return y.children.splice(h,1),[Bu,h];y.children[h]=v.element}return Bu}else return p.properties.src=b,Ih}return Ih};return d},YB=-1,xx=0,Uh=1,h1=2,EC=3,TC=4,wC=5,SC=6,WB=7,XB=8,{defineProperty:Cme}=Object,QB=typeof self=="object"?self:globalThis,EM=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new QB[e](t)},kme=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case xx:case YB:return n(o,i);case Uh:{const c=n([],i);for(const u of o)c.push(r(u));return c}case h1:{const c=n({},i);for(const[u,d]of o){const p=r(u),h=r(d);p==="__proto__"?Cme(c,p,{value:h,configurable:!0,enumerable:!0,writable:!0}):c[p]=h}return c}case EC:return n(new Date(o),i);case TC:{const{source:c,flags:u}=o;return n(new RegExp(c,u),i)}case wC:{const c=n(new Map,i);for(const[u,d]of o)c.set(r(u),r(d));return c}case SC:{const c=n(new Set,i);for(const u of o)c.add(r(u));return c}case WB:{const{name:c,message:u}=o;return n(typeof QB[c]=="function"?EM(c,u):new Error(u),i)}case XB:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:c}=new Uint8Array(o);return n(new DataView(c),o)}case"-0":return-0}return n(EM(a,o),i)};return r},TM=e=>kme(new Map,e)(0),Ru="",{toString:Nme}={},{keys:Rme,is:Ome}=Object,ah=e=>{const t=typeof e;if(t!=="object"||!e)return[xx,t];const n=Nme.call(e).slice(8,-1);switch(n){case"Array":return[Uh,Ru];case"Object":return[h1,Ru];case"Date":return[EC,Ru];case"RegExp":return[TC,Ru];case"Map":return[wC,Ru];case"Set":return[SC,Ru];case"DataView":return[Uh,n]}return n.includes("Array")?[Uh,n]:e instanceof Error?[WB,e.name||"Error"]:[h1,n]},G0=([e,t])=>e===xx&&(t==="function"||t==="symbol"),Ime=(e,t,n,r)=>{const i=(o,c)=>{const u=r.push(o)-1;return n.set(c,u),u},a=o=>{if(n.has(o))return n.get(o);let[c,u]=ah(o);switch(c){case xx:{let p=o;switch(u){case"bigint":c=XB,p=o.toString();break;case"number":if(!o&&Ome(o,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);p=null;break;case"undefined":return i([YB],o)}return i([c,p],o)}case Uh:{if(u){let y=o;return u==="DataView"?y=new Uint8Array(o.buffer):u==="ArrayBuffer"&&(y=new Uint8Array(o)),i([u,[...y]],o)}const p=[],h=i([c,p],o);for(const y of o)p.push(a(y));return h}case h1:{if(u)switch(u){case"BigInt":return i([u,o.toString()],o);case"Boolean":case"Number":case"String":return i([u,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const p=[],h=i([c,p],o);for(const y of Rme(o))(e||!G0(ah(o[y])))&&p.push([a(y),a(o[y])]);return h}case EC:return i([c,isNaN(o.getTime())?Ru:o.toISOString()],o);case TC:{const{source:p,flags:h}=o;return i([c,{source:p,flags:h}],o)}case wC:{const p=[],h=i([c,p],o);for(const[y,b]of o)(e||!(G0(ah(y))||G0(ah(b))))&&p.push([a(y),a(b)]);return h}case SC:{const p=[],h=i([c,p],o);for(const y of o)(e||!G0(ah(y)))&&p.push(a(y));return h}}const{message:d}=o;return i([c,{name:u,message:d}],o)};return a},wM=(e,{json:t,lossy:n}={})=>{const r=[];return Ime(!(t||n),!!t,new Map,r)(e),r},cd=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?TM(wM(e,t)):structuredClone(e):(e,t)=>TM(wM(e,t));class gg{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}gg.prototype.normal={};gg.prototype.property={};gg.prototype.space=void 0;function ZB(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new gg(n,r,t)}function bm(e){return e.toLowerCase()}class Fa{constructor(t,n){this.attribute=n,this.property=t}}Fa.prototype.attribute="";Fa.prototype.booleanish=!1;Fa.prototype.boolean=!1;Fa.prototype.commaOrSpaceSeparated=!1;Fa.prototype.commaSeparated=!1;Fa.prototype.defined=!1;Fa.prototype.mustUseProperty=!1;Fa.prototype.number=!1;Fa.prototype.overloadedBoolean=!1;Fa.prototype.property="";Fa.prototype.spaceSeparated=!1;Fa.prototype.space=void 0;let Mme=0;const Zt=Ed(),yi=Ed(),bw=Ed(),ct=Ed(),Sr=Ed(),Yu=Ed(),Wa=Ed();function Ed(){return 2**++Mme}const yw=Object.freeze(Object.defineProperty({__proto__:null,boolean:Zt,booleanish:yi,commaOrSpaceSeparated:Wa,commaSeparated:Yu,number:ct,overloadedBoolean:bw,spaceSeparated:Sr},Symbol.toStringTag,{value:"Module"})),IT=Object.keys(yw);class AC extends Fa{constructor(t,n,r,i){let a=-1;if(super(t,n),SM(this,"space",i),typeof r=="number")for(;++a<IT.length;){const o=IT[a];SM(this,IT[a],(r&yw[o])===yw[o])}}}AC.prototype.defined=!0;function SM(e,t,n){n&&(e[t]=n)}function cp(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new AC(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[bm(r)]=r,n[bm(a.attribute)]=r}return new gg(t,n,e.space)}const JB=cp({properties:{ariaActiveDescendant:null,ariaAtomic:yi,ariaAutoComplete:null,ariaBusy:yi,ariaChecked:yi,ariaColCount:ct,ariaColIndex:ct,ariaColSpan:ct,ariaControls:Sr,ariaCurrent:null,ariaDescribedBy:Sr,ariaDetails:null,ariaDisabled:yi,ariaDropEffect:Sr,ariaErrorMessage:null,ariaExpanded:yi,ariaFlowTo:Sr,ariaGrabbed:yi,ariaHasPopup:null,ariaHidden:yi,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Sr,ariaLevel:ct,ariaLive:null,ariaModal:yi,ariaMultiLine:yi,ariaMultiSelectable:yi,ariaOrientation:null,ariaOwns:Sr,ariaPlaceholder:null,ariaPosInSet:ct,ariaPressed:yi,ariaReadOnly:yi,ariaRelevant:null,ariaRequired:yi,ariaRoleDescription:Sr,ariaRowCount:ct,ariaRowIndex:ct,ariaRowSpan:ct,ariaSelected:yi,ariaSetSize:ct,ariaSort:null,ariaValueMax:ct,ariaValueMin:ct,ariaValueNow:ct,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function eF(e,t){return t in e?e[t]:t}function tF(e,t){return eF(e,t.toLowerCase())}const Dme=cp({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Yu,acceptCharset:Sr,accessKey:Sr,action:null,allow:null,allowFullScreen:Zt,allowPaymentRequest:Zt,allowUserMedia:Zt,alpha:Zt,alt:null,as:null,async:Zt,autoCapitalize:null,autoComplete:Sr,autoFocus:Zt,autoPlay:Zt,blocking:Sr,capture:null,charSet:null,checked:Zt,cite:null,className:Sr,closedBy:null,colorSpace:null,cols:ct,colSpan:ct,command:null,commandFor:null,content:null,contentEditable:yi,controls:Zt,controlsList:Sr,coords:ct|Yu,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Zt,defer:Zt,dir:null,dirName:null,disabled:Zt,download:bw,draggable:yi,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Zt,formTarget:null,headers:Sr,height:ct,hidden:bw,high:ct,href:null,hrefLang:null,htmlFor:Sr,httpEquiv:Sr,id:null,imageSizes:null,imageSrcSet:null,inert:Zt,inputMode:null,integrity:null,is:null,isMap:Zt,itemId:null,itemProp:Sr,itemRef:Sr,itemScope:Zt,itemType:Sr,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Zt,low:ct,manifest:null,max:null,maxLength:ct,media:null,method:null,min:null,minLength:ct,multiple:Zt,muted:Zt,name:null,nonce:null,noModule:Zt,noValidate:Zt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Zt,optimum:ct,pattern:null,ping:Sr,placeholder:null,playsInline:Zt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Zt,referrerPolicy:null,rel:Sr,required:Zt,reversed:Zt,rows:ct,rowSpan:ct,sandbox:Sr,scope:null,scoped:Zt,seamless:Zt,selected:Zt,shadowRootClonable:Zt,shadowRootCustomElementRegistry:Zt,shadowRootDelegatesFocus:Zt,shadowRootMode:null,shadowRootSerializable:Zt,shape:null,size:ct,sizes:null,slot:null,span:ct,spellCheck:yi,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ct,step:null,style:null,tabIndex:ct,target:null,title:null,translate:null,type:null,typeMustMatch:Zt,useMap:null,value:yi,width:ct,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Sr,axis:null,background:null,bgColor:null,border:ct,borderColor:null,bottomMargin:ct,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Zt,declare:Zt,event:null,face:null,frame:null,frameBorder:null,hSpace:ct,leftMargin:ct,link:null,longDesc:null,lowSrc:null,marginHeight:ct,marginWidth:ct,noResize:Zt,noHref:Zt,noShade:Zt,noWrap:Zt,object:null,profile:null,prompt:null,rev:null,rightMargin:ct,rules:null,scheme:null,scrolling:yi,standby:null,summary:null,text:null,topMargin:ct,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ct,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Zt,disablePictureInPicture:Zt,disableRemotePlayback:Zt,exportParts:Yu,part:Sr,prefix:null,property:null,results:ct,security:null,unselectable:null},space:"html",transform:tF}),Lme=cp({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Wa,accentHeight:ct,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ct,amplitude:ct,arabicForm:null,ascent:ct,attributeName:null,attributeType:null,azimuth:ct,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ct,by:null,calcMode:null,capHeight:ct,className:Sr,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ct,diffuseConstant:ct,direction:null,display:null,dur:null,divisor:ct,dominantBaseline:null,download:Zt,dx:null,dy:null,edgeMode:null,editable:null,elevation:ct,enableBackground:null,end:null,event:null,exponent:ct,externalResourcesRequired:null,fill:null,fillOpacity:ct,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Yu,g2:Yu,glyphName:Yu,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ct,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ct,horizOriginX:ct,horizOriginY:ct,id:null,ideographic:ct,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ct,k:ct,k1:ct,k2:ct,k3:ct,k4:ct,kernelMatrix:Wa,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ct,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ct,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ct,overlineThickness:ct,paintOrder:null,panose1:null,path:null,pathLength:ct,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Sr,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ct,pointsAtY:ct,pointsAtZ:ct,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Wa,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Wa,rev:Wa,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Wa,requiredFeatures:Wa,requiredFonts:Wa,requiredFormats:Wa,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ct,specularExponent:ct,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ct,strikethroughThickness:ct,string:null,stroke:null,strokeDashArray:Wa,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ct,strokeOpacity:ct,strokeWidth:null,style:null,surfaceScale:ct,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Wa,tabIndex:ct,tableValues:null,target:null,targetX:ct,targetY:ct,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Wa,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ct,underlineThickness:ct,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ct,values:null,vAlphabetic:ct,vMathematical:ct,vectorEffect:null,vHanging:ct,vIdeographic:ct,version:null,vertAdvY:ct,vertOriginX:ct,vertOriginY:ct,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ct,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:eF}),nF=cp({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),rF=cp({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:tF}),iF=cp({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Pme={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},jme=/[A-Z]/g,AM=/-[a-z]/g,$me=/^data[-\w.:]+$/i;function vx(e,t){const n=bm(t);let r=t,i=Fa;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&$me.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(AM,Fme);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!AM.test(a)){let o=a.replace(jme,Bme);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=AC}return new i(r,t)}function Bme(e){return"-"+e.toLowerCase()}function Fme(e){return e.charAt(1).toUpperCase()}const bg=ZB([JB,Dme,nF,rF,iF],"html"),eu=ZB([JB,Lme,nF,rF,iF],"svg");function _M(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const o=n.slice(i,r).trim();(o||!a)&&t.push(o),i=r+1,r=n.indexOf(",",i)}return t}function aF(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const CM=/[#.]/g;function zme(e,t){const n=e||"",r={};let i=0,a,o;for(;i<n.length;){CM.lastIndex=i;const c=CM.exec(n),u=n.slice(i,c?c.index:n.length);u&&(a?a==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:o=u,i+=u.length),c&&(a=c[0],i++)}return{type:"element",tagName:o||t||"div",properties:r,children:[]}}function kM(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function sF(e){return e.join(" ").trim()}function oF(e,t,n){const r=n?Vme(n):void 0;function i(a,o,...c){let u;if(a==null){u={type:"root",children:[]};const d=o;c.unshift(d)}else{u=zme(a,t);const d=u.tagName.toLowerCase(),p=r?r.get(d):void 0;if(u.tagName=p||d,Ume(o))c.unshift(o);else for(const[h,y]of Object.entries(o))Hme(e,u.properties,h,y)}for(const d of c)xw(u.children,d);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return i}function Ume(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const o of a)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Hme(e,t,n,r){const i=vx(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=kM(r):i.commaSeparated?a=_M(r):i.commaOrSpaceSeparated?a=kM(_M(r).join(" ")):a=NM(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?qme(r):String(r);if(Array.isArray(a)){const o=[];for(const c of a)o.push(NM(i,i.property,c));a=o}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function xw(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)xw(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?xw(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function NM(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||bm(n)===bm(t)))return!0}return n}function qme(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Vme(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Gme=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],Kme=oF(bg,"div"),Yme=oF(eu,"g",Gme);function Wme(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let o=0;for(;;){let c=n[o];if(c===void 0){const u=RM(t,n[o-1]);c=u===-1?t.length+1:u+1,n[o]=c}if(c>a)return{line:o+1,column:a-(o>0?n[o-1]:0)+1,offset:a};o++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],u=RM(t,c),d=u===-1?t.length+1:u+1;if(c===d)break;n.push(d)}const o=(a.line>1?n[a.line-2]:0)+a.column-1;if(o<n[a.line-1])return o}}}function RM(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
251
251
  `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Fu={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},lF={}.hasOwnProperty,Xme=Object.prototype;function Qme(e,t){const n=t||{};return _C({file:n.file||void 0,location:!1,schema:n.space==="svg"?eu:bg,verbose:n.verbose||!1},e)}function _C(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Nb(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:cF(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),o=Wme(a),c=o.toPoint(0),u=o.toPoint(a.length);n.position={start:c,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Nb(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Nb(e,r,n),n}default:return n=Zme(e,t),n}}function cF(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=_C(e,t[n]);r.push(i)}return r}function Zme(e,t){const n=e.schema;e.schema=t.namespaceURI===Fu.svg?eu:bg;let r=-1;const i={};for(;++r<t.attrs.length;){const c=t.attrs[r],u=(c.prefix?c.prefix+":":"")+c.name;lF.call(Xme,u)||(i[u]=c.value)}const o=(e.schema.space==="svg"?Yme:Kme)(t.tagName,i,cF(e,t.childNodes));if(Nb(e,t,o),o.tagName==="template"){const c=t,u=c.sourceCodeLocation,d=u&&u.startTag&&xf(u.startTag),p=u&&u.endTag&&xf(u.endTag),h=_C(e,c.content);d&&p&&e.file&&(h.position={start:d.end,end:p.start}),o.content=h}return e.schema=n,o}function Nb(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Jme(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Jme(e,t,n){const r=xf(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let o;if(n.attrs)for(o in n.attrs)lF.call(n.attrs,o)&&(a[vx(e.schema,o).property]=xf(n.attrs[o]));n.startTag;const c=xf(n.startTag),u=n.endTag?xf(n.endTag):void 0,d={opening:c};u&&(d.closing=u),d.properties=a,t.data={position:d}}}return r}function xf(e){const t=OM({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=OM({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function OM(e){return e.line&&e.column?e:void 0}const IM={}.hasOwnProperty;function uF(e,t){const n=t||{};function r(i,...a){let o=r.invalid;const c=r.handlers;if(i&&IM.call(i,e)){const u=String(i[e]);o=IM.call(c,u)?c[u]:r.unknown}if(o)return o.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const ege={},tge={}.hasOwnProperty,dF=uF("type",{handlers:{root:rge,element:lge,text:sge,comment:oge,doctype:age}});function nge(e,t){const r=(t||ege).space;return dF(e,r==="svg"?eu:bg)}function rge(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=CC(e.children,n,t),up(e,n),n}function ige(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=CC(e.children,n,t),up(e,n),n}function age(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return up(e,t),t}function sge(e){const t={nodeName:"#text",value:e.value,parentNode:null};return up(e,t),t}function oge(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return up(e,t),t}function lge(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=eu);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&tge.call(e.properties,a)){const u=cge(r,a,e.properties[a]);u&&i.push(u)}}const o=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Fu[o],childNodes:[],parentNode:null};return c.childNodes=CC(e.children,c,r),up(e,c),e.tagName==="template"&&e.content&&(c.content=ige(e.content,r)),c}function cge(e,t,n){const r=vx(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?aF(n):sF(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=Fu[r.space]}return i}function CC(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=dF(e[r],n);a.parentNode=t,i.push(a)}return i}function up(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const uge=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],dge=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Vr="�";var J;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(J||(J={}));const ka={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function fF(e){return e>=55296&&e<=57343}function fge(e){return e>=56320&&e<=57343}function pge(e,t){return(e-55296)*1024+9216+t}function pF(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function hF(e){return e>=64976&&e<=65007||dge.has(e)}var je;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(je||(je={}));const hge=65536;class mge{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=hge,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:a}=this,o=i+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:o,endCol:o,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(fge(n))return this.pos++,this._addGap(),pge(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,J.EOF;return this._err(je.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,J.EOF;const r=this.html.charCodeAt(n);return r===J.CARRIAGE_RETURN?J.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,J.EOF;let t=this.html.charCodeAt(this.pos);return t===J.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,J.LINE_FEED):t===J.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,fF(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===J.LINE_FEED||t===J.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){pF(t)?this._err(je.controlCharacterInInputStream):hF(t)&&this._err(je.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var bn;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(bn||(bn={}));function mF(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const gge=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),bge=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function yge(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=bge.get(e))!==null&&t!==void 0?t:e}var Mi;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Mi||(Mi={}));const xge=32;var Sc;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Sc||(Sc={}));function vw(e){return e>=Mi.ZERO&&e<=Mi.NINE}function vge(e){return e>=Mi.UPPER_A&&e<=Mi.UPPER_F||e>=Mi.LOWER_A&&e<=Mi.LOWER_F}function Ege(e){return e>=Mi.UPPER_A&&e<=Mi.UPPER_Z||e>=Mi.LOWER_A&&e<=Mi.LOWER_Z||vw(e)}function Tge(e){return e===Mi.EQUALS||Ege(e)}var Ii;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Ii||(Ii={}));var pl;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(pl||(pl={}));class wge{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ii.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=pl.Strict}startEntity(t){this.decodeMode=t,this.state=Ii.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ii.EntityStart:return t.charCodeAt(n)===Mi.NUM?(this.state=Ii.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ii.NamedEntity,this.stateNamedEntity(t,n));case Ii.NumericStart:return this.stateNumericStart(t,n);case Ii.NumericDecimal:return this.stateNumericDecimal(t,n);case Ii.NumericHex:return this.stateNumericHex(t,n);case Ii.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|xge)===Mi.LOWER_X?(this.state=Ii.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ii.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(vw(i)||vge(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(vw(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Mi.SEMI)this.consumed+=1;else if(this.decodeMode===pl.Strict)return 0;return this.emitCodePoint(yge(this.result),this.consumed),this.errors&&(t!==Mi.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&Sc.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const o=t.charCodeAt(n);if(this.treeIndex=Sge(r,i,this.treeIndex+Math.max(1,a),o),this.treeIndex<0)return this.result===0||this.decodeMode===pl.Attribute&&(a===0||Tge(o))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&Sc.VALUE_LENGTH)>>14,a!==0){if(o===Mi.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==pl.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Sc.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Sc.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Ii.NamedEntity:return this.result!==0&&(this.decodeMode!==pl.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ii.NumericDecimal:return this.emitNumericEntity(0,2);case Ii.NumericHex:return this.emitNumericEntity(0,3);case Ii.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ii.EntityStart:return 0}}}function Sge(e,t,n,r){const i=(t&Sc.BRANCH_LENGTH)>>7,a=t&Sc.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const u=r-a;return u<0||u>=i?-1:e[n+u]-1}let o=n,c=o+i-1;for(;o<=c;){const u=o+c>>>1,d=e[u];if(d<r)o=u+1;else if(d>r)c=u-1;else return e[u+i]}return-1}var et;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(et||(et={}));var Wu;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Wu||(Wu={}));var Ts;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ts||(Ts={}));var Se;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(Se||(Se={}));var _;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(_||(_={}));const Age=new Map([[Se.A,_.A],[Se.ADDRESS,_.ADDRESS],[Se.ANNOTATION_XML,_.ANNOTATION_XML],[Se.APPLET,_.APPLET],[Se.AREA,_.AREA],[Se.ARTICLE,_.ARTICLE],[Se.ASIDE,_.ASIDE],[Se.B,_.B],[Se.BASE,_.BASE],[Se.BASEFONT,_.BASEFONT],[Se.BGSOUND,_.BGSOUND],[Se.BIG,_.BIG],[Se.BLOCKQUOTE,_.BLOCKQUOTE],[Se.BODY,_.BODY],[Se.BR,_.BR],[Se.BUTTON,_.BUTTON],[Se.CAPTION,_.CAPTION],[Se.CENTER,_.CENTER],[Se.CODE,_.CODE],[Se.COL,_.COL],[Se.COLGROUP,_.COLGROUP],[Se.DD,_.DD],[Se.DESC,_.DESC],[Se.DETAILS,_.DETAILS],[Se.DIALOG,_.DIALOG],[Se.DIR,_.DIR],[Se.DIV,_.DIV],[Se.DL,_.DL],[Se.DT,_.DT],[Se.EM,_.EM],[Se.EMBED,_.EMBED],[Se.FIELDSET,_.FIELDSET],[Se.FIGCAPTION,_.FIGCAPTION],[Se.FIGURE,_.FIGURE],[Se.FONT,_.FONT],[Se.FOOTER,_.FOOTER],[Se.FOREIGN_OBJECT,_.FOREIGN_OBJECT],[Se.FORM,_.FORM],[Se.FRAME,_.FRAME],[Se.FRAMESET,_.FRAMESET],[Se.H1,_.H1],[Se.H2,_.H2],[Se.H3,_.H3],[Se.H4,_.H4],[Se.H5,_.H5],[Se.H6,_.H6],[Se.HEAD,_.HEAD],[Se.HEADER,_.HEADER],[Se.HGROUP,_.HGROUP],[Se.HR,_.HR],[Se.HTML,_.HTML],[Se.I,_.I],[Se.IMG,_.IMG],[Se.IMAGE,_.IMAGE],[Se.INPUT,_.INPUT],[Se.IFRAME,_.IFRAME],[Se.KEYGEN,_.KEYGEN],[Se.LABEL,_.LABEL],[Se.LI,_.LI],[Se.LINK,_.LINK],[Se.LISTING,_.LISTING],[Se.MAIN,_.MAIN],[Se.MALIGNMARK,_.MALIGNMARK],[Se.MARQUEE,_.MARQUEE],[Se.MATH,_.MATH],[Se.MENU,_.MENU],[Se.META,_.META],[Se.MGLYPH,_.MGLYPH],[Se.MI,_.MI],[Se.MO,_.MO],[Se.MN,_.MN],[Se.MS,_.MS],[Se.MTEXT,_.MTEXT],[Se.NAV,_.NAV],[Se.NOBR,_.NOBR],[Se.NOFRAMES,_.NOFRAMES],[Se.NOEMBED,_.NOEMBED],[Se.NOSCRIPT,_.NOSCRIPT],[Se.OBJECT,_.OBJECT],[Se.OL,_.OL],[Se.OPTGROUP,_.OPTGROUP],[Se.OPTION,_.OPTION],[Se.P,_.P],[Se.PARAM,_.PARAM],[Se.PLAINTEXT,_.PLAINTEXT],[Se.PRE,_.PRE],[Se.RB,_.RB],[Se.RP,_.RP],[Se.RT,_.RT],[Se.RTC,_.RTC],[Se.RUBY,_.RUBY],[Se.S,_.S],[Se.SCRIPT,_.SCRIPT],[Se.SEARCH,_.SEARCH],[Se.SECTION,_.SECTION],[Se.SELECT,_.SELECT],[Se.SOURCE,_.SOURCE],[Se.SMALL,_.SMALL],[Se.SPAN,_.SPAN],[Se.STRIKE,_.STRIKE],[Se.STRONG,_.STRONG],[Se.STYLE,_.STYLE],[Se.SUB,_.SUB],[Se.SUMMARY,_.SUMMARY],[Se.SUP,_.SUP],[Se.TABLE,_.TABLE],[Se.TBODY,_.TBODY],[Se.TEMPLATE,_.TEMPLATE],[Se.TEXTAREA,_.TEXTAREA],[Se.TFOOT,_.TFOOT],[Se.TD,_.TD],[Se.TH,_.TH],[Se.THEAD,_.THEAD],[Se.TITLE,_.TITLE],[Se.TR,_.TR],[Se.TRACK,_.TRACK],[Se.TT,_.TT],[Se.U,_.U],[Se.UL,_.UL],[Se.SVG,_.SVG],[Se.VAR,_.VAR],[Se.WBR,_.WBR],[Se.XMP,_.XMP]]);function dp(e){var t;return(t=Age.get(e))!==null&&t!==void 0?t:_.UNKNOWN}const st=_,_ge={[et.HTML]:new Set([st.ADDRESS,st.APPLET,st.AREA,st.ARTICLE,st.ASIDE,st.BASE,st.BASEFONT,st.BGSOUND,st.BLOCKQUOTE,st.BODY,st.BR,st.BUTTON,st.CAPTION,st.CENTER,st.COL,st.COLGROUP,st.DD,st.DETAILS,st.DIR,st.DIV,st.DL,st.DT,st.EMBED,st.FIELDSET,st.FIGCAPTION,st.FIGURE,st.FOOTER,st.FORM,st.FRAME,st.FRAMESET,st.H1,st.H2,st.H3,st.H4,st.H5,st.H6,st.HEAD,st.HEADER,st.HGROUP,st.HR,st.HTML,st.IFRAME,st.IMG,st.INPUT,st.LI,st.LINK,st.LISTING,st.MAIN,st.MARQUEE,st.MENU,st.META,st.NAV,st.NOEMBED,st.NOFRAMES,st.NOSCRIPT,st.OBJECT,st.OL,st.P,st.PARAM,st.PLAINTEXT,st.PRE,st.SCRIPT,st.SECTION,st.SELECT,st.SOURCE,st.STYLE,st.SUMMARY,st.TABLE,st.TBODY,st.TD,st.TEMPLATE,st.TEXTAREA,st.TFOOT,st.TH,st.THEAD,st.TITLE,st.TR,st.TRACK,st.UL,st.WBR,st.XMP]),[et.MATHML]:new Set([st.MI,st.MO,st.MN,st.MS,st.MTEXT,st.ANNOTATION_XML]),[et.SVG]:new Set([st.TITLE,st.FOREIGN_OBJECT,st.DESC]),[et.XLINK]:new Set,[et.XML]:new Set,[et.XMLNS]:new Set},Ew=new Set([st.H1,st.H2,st.H3,st.H4,st.H5,st.H6]);Se.STYLE,Se.SCRIPT,Se.XMP,Se.IFRAME,Se.NOEMBED,Se.NOFRAMES,Se.PLAINTEXT;var ie;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(ie||(ie={}));const di={DATA:ie.DATA,RCDATA:ie.RCDATA,RAWTEXT:ie.RAWTEXT,SCRIPT_DATA:ie.SCRIPT_DATA,PLAINTEXT:ie.PLAINTEXT,CDATA_SECTION:ie.CDATA_SECTION};function Cge(e){return e>=J.DIGIT_0&&e<=J.DIGIT_9}function Mh(e){return e>=J.LATIN_CAPITAL_A&&e<=J.LATIN_CAPITAL_Z}function kge(e){return e>=J.LATIN_SMALL_A&&e<=J.LATIN_SMALL_Z}function pc(e){return kge(e)||Mh(e)}function MM(e){return pc(e)||Cge(e)}function K0(e){return e+32}function gF(e){return e===J.SPACE||e===J.LINE_FEED||e===J.TABULATION||e===J.FORM_FEED}function DM(e){return gF(e)||e===J.SOLIDUS||e===J.GREATER_THAN_SIGN}function Nge(e){return e===J.NULL?je.nullCharacterReference:e>1114111?je.characterReferenceOutsideUnicodeRange:fF(e)?je.surrogateCharacterReference:hF(e)?je.noncharacterCharacterReference:pF(e)||e===J.CARRIAGE_RETURN?je.controlCharacterReference:null}class Rge{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=ie.DATA,this.returnState=ie.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new mge(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new wge(gge,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(je.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(je.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=Nge(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:bn.START_TAG,tagName:"",tagID:_.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:bn.END_TAG,tagName:"",tagID:_.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:bn.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:bn.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(mF(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(je.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=dp(t.tagName),t.type===bn.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(je.endTagWithAttributes),t.selfClosing&&this._err(je.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case bn.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case bn.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case bn.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:bn.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=gF(t)?bn.WHITESPACE_CHARACTER:t===J.NULL?bn.NULL_CHARACTER:bn.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(bn.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=ie.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?pl.Attribute:pl.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===ie.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===ie.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===ie.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case ie.DATA:{this._stateData(t);break}case ie.RCDATA:{this._stateRcdata(t);break}case ie.RAWTEXT:{this._stateRawtext(t);break}case ie.SCRIPT_DATA:{this._stateScriptData(t);break}case ie.PLAINTEXT:{this._statePlaintext(t);break}case ie.TAG_OPEN:{this._stateTagOpen(t);break}case ie.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case ie.TAG_NAME:{this._stateTagName(t);break}case ie.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case ie.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case ie.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case ie.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case ie.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case ie.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case ie.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case ie.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case ie.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case ie.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case ie.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case ie.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case ie.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case ie.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case ie.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case ie.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case ie.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case ie.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case ie.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case ie.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case ie.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case ie.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case ie.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case ie.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case ie.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case ie.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case ie.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case ie.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case ie.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case ie.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case ie.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case ie.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case ie.BOGUS_COMMENT:{this._stateBogusComment(t);break}case ie.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case ie.COMMENT_START:{this._stateCommentStart(t);break}case ie.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case ie.COMMENT:{this._stateComment(t);break}case ie.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case ie.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case ie.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case ie.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case ie.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case ie.COMMENT_END:{this._stateCommentEnd(t);break}case ie.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case ie.DOCTYPE:{this._stateDoctype(t);break}case ie.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case ie.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case ie.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case ie.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case ie.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case ie.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case ie.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case ie.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case ie.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case ie.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case ie.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case ie.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case ie.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case ie.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case ie.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case ie.CDATA_SECTION:{this._stateCdataSection(t);break}case ie.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case ie.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case ie.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case ie.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case J.LESS_THAN_SIGN:{this.state=ie.TAG_OPEN;break}case J.AMPERSAND:{this._startCharacterReference();break}case J.NULL:{this._err(je.unexpectedNullCharacter),this._emitCodePoint(t);break}case J.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case J.AMPERSAND:{this._startCharacterReference();break}case J.LESS_THAN_SIGN:{this.state=ie.RCDATA_LESS_THAN_SIGN;break}case J.NULL:{this._err(je.unexpectedNullCharacter),this._emitChars(Vr);break}case J.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case J.LESS_THAN_SIGN:{this.state=ie.RAWTEXT_LESS_THAN_SIGN;break}case J.NULL:{this._err(je.unexpectedNullCharacter),this._emitChars(Vr);break}case J.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case J.LESS_THAN_SIGN:{this.state=ie.SCRIPT_DATA_LESS_THAN_SIGN;break}case J.NULL:{this._err(je.unexpectedNullCharacter),this._emitChars(Vr);break}case J.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case J.NULL:{this._err(je.unexpectedNullCharacter),this._emitChars(Vr);break}case J.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(pc(t))this._createStartTagToken(),this.state=ie.TAG_NAME,this._stateTagName(t);else switch(t){case J.EXCLAMATION_MARK:{this.state=ie.MARKUP_DECLARATION_OPEN;break}case J.SOLIDUS:{this.state=ie.END_TAG_OPEN;break}case J.QUESTION_MARK:{this._err(je.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=ie.BOGUS_COMMENT,this._stateBogusComment(t);break}case J.EOF:{this._err(je.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(je.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=ie.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(pc(t))this._createEndTagToken(),this.state=ie.TAG_NAME,this._stateTagName(t);else switch(t){case J.GREATER_THAN_SIGN:{this._err(je.missingEndTagName),this.state=ie.DATA;break}case J.EOF:{this._err(je.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(je.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=ie.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:{this.state=ie.BEFORE_ATTRIBUTE_NAME;break}case J.SOLIDUS:{this.state=ie.SELF_CLOSING_START_TAG;break}case J.GREATER_THAN_SIGN:{this.state=ie.DATA,this.emitCurrentTagToken();break}case J.NULL:{this._err(je.unexpectedNullCharacter),n.tagName+=Vr;break}case J.EOF:{this._err(je.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Mh(t)?K0(t):t)}}_stateRcdataLessThanSign(t){t===J.SOLIDUS?this.state=ie.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=ie.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){pc(t)?(this.state=ie.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=ie.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=ie.BEFORE_ATTRIBUTE_NAME,!1;case J.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=ie.SELF_CLOSING_START_TAG,!1;case J.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=ie.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=ie.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===J.SOLIDUS?this.state=ie.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=ie.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){pc(t)?(this.state=ie.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=ie.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=ie.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case J.SOLIDUS:{this.state=ie.SCRIPT_DATA_END_TAG_OPEN;break}case J.EXCLAMATION_MARK:{this.state=ie.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=ie.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){pc(t)?(this.state=ie.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=ie.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=ie.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===J.HYPHEN_MINUS?(this.state=ie.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=ie.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===J.HYPHEN_MINUS?(this.state=ie.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=ie.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case J.HYPHEN_MINUS:{this.state=ie.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case J.LESS_THAN_SIGN:{this.state=ie.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case J.NULL:{this._err(je.unexpectedNullCharacter),this._emitChars(Vr);break}case J.EOF:{this._err(je.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case J.HYPHEN_MINUS:{this.state=ie.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case J.LESS_THAN_SIGN:{this.state=ie.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case J.NULL:{this._err(je.unexpectedNullCharacter),this.state=ie.SCRIPT_DATA_ESCAPED,this._emitChars(Vr);break}case J.EOF:{this._err(je.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=ie.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case J.HYPHEN_MINUS:{this._emitChars("-");break}case J.LESS_THAN_SIGN:{this.state=ie.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case J.GREATER_THAN_SIGN:{this.state=ie.SCRIPT_DATA,this._emitChars(">");break}case J.NULL:{this._err(je.unexpectedNullCharacter),this.state=ie.SCRIPT_DATA_ESCAPED,this._emitChars(Vr);break}case J.EOF:{this._err(je.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=ie.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===J.SOLIDUS?this.state=ie.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:pc(t)?(this._emitChars("<"),this.state=ie.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=ie.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){pc(t)?(this.state=ie.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=ie.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=ie.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(ka.SCRIPT,!1)&&DM(this.preprocessor.peek(ka.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<ka.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=ie.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=ie.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case J.HYPHEN_MINUS:{this.state=ie.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case J.LESS_THAN_SIGN:{this.state=ie.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case J.NULL:{this._err(je.unexpectedNullCharacter),this._emitChars(Vr);break}case J.EOF:{this._err(je.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case J.HYPHEN_MINUS:{this.state=ie.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case J.LESS_THAN_SIGN:{this.state=ie.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case J.NULL:{this._err(je.unexpectedNullCharacter),this.state=ie.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Vr);break}case J.EOF:{this._err(je.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=ie.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case J.HYPHEN_MINUS:{this._emitChars("-");break}case J.LESS_THAN_SIGN:{this.state=ie.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case J.GREATER_THAN_SIGN:{this.state=ie.SCRIPT_DATA,this._emitChars(">");break}case J.NULL:{this._err(je.unexpectedNullCharacter),this.state=ie.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Vr);break}case J.EOF:{this._err(je.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=ie.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===J.SOLIDUS?(this.state=ie.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=ie.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(ka.SCRIPT,!1)&&DM(this.preprocessor.peek(ka.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<ka.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=ie.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=ie.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:break;case J.SOLIDUS:case J.GREATER_THAN_SIGN:case J.EOF:{this.state=ie.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case J.EQUALS_SIGN:{this._err(je.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=ie.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=ie.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:case J.SOLIDUS:case J.GREATER_THAN_SIGN:case J.EOF:{this._leaveAttrName(),this.state=ie.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case J.EQUALS_SIGN:{this._leaveAttrName(),this.state=ie.BEFORE_ATTRIBUTE_VALUE;break}case J.QUOTATION_MARK:case J.APOSTROPHE:case J.LESS_THAN_SIGN:{this._err(je.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case J.NULL:{this._err(je.unexpectedNullCharacter),this.currentAttr.name+=Vr;break}default:this.currentAttr.name+=String.fromCodePoint(Mh(t)?K0(t):t)}}_stateAfterAttributeName(t){switch(t){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:break;case J.SOLIDUS:{this.state=ie.SELF_CLOSING_START_TAG;break}case J.EQUALS_SIGN:{this.state=ie.BEFORE_ATTRIBUTE_VALUE;break}case J.GREATER_THAN_SIGN:{this.state=ie.DATA,this.emitCurrentTagToken();break}case J.EOF:{this._err(je.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=ie.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:break;case J.QUOTATION_MARK:{this.state=ie.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case J.APOSTROPHE:{this.state=ie.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case J.GREATER_THAN_SIGN:{this._err(je.missingAttributeValue),this.state=ie.DATA,this.emitCurrentTagToken();break}default:this.state=ie.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case J.QUOTATION_MARK:{this.state=ie.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case J.AMPERSAND:{this._startCharacterReference();break}case J.NULL:{this._err(je.unexpectedNullCharacter),this.currentAttr.value+=Vr;break}case J.EOF:{this._err(je.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case J.APOSTROPHE:{this.state=ie.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case J.AMPERSAND:{this._startCharacterReference();break}case J.NULL:{this._err(je.unexpectedNullCharacter),this.currentAttr.value+=Vr;break}case J.EOF:{this._err(je.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:{this._leaveAttrValue(),this.state=ie.BEFORE_ATTRIBUTE_NAME;break}case J.AMPERSAND:{this._startCharacterReference();break}case J.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=ie.DATA,this.emitCurrentTagToken();break}case J.NULL:{this._err(je.unexpectedNullCharacter),this.currentAttr.value+=Vr;break}case J.QUOTATION_MARK:case J.APOSTROPHE:case J.LESS_THAN_SIGN:case J.EQUALS_SIGN:case J.GRAVE_ACCENT:{this._err(je.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case J.EOF:{this._err(je.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:{this._leaveAttrValue(),this.state=ie.BEFORE_ATTRIBUTE_NAME;break}case J.SOLIDUS:{this._leaveAttrValue(),this.state=ie.SELF_CLOSING_START_TAG;break}case J.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=ie.DATA,this.emitCurrentTagToken();break}case J.EOF:{this._err(je.eofInTag),this._emitEOFToken();break}default:this._err(je.missingWhitespaceBetweenAttributes),this.state=ie.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case J.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=ie.DATA,this.emitCurrentTagToken();break}case J.EOF:{this._err(je.eofInTag),this._emitEOFToken();break}default:this._err(je.unexpectedSolidusInTag),this.state=ie.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case J.GREATER_THAN_SIGN:{this.state=ie.DATA,this.emitCurrentComment(n);break}case J.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case J.NULL:{this._err(je.unexpectedNullCharacter),n.data+=Vr;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(ka.DASH_DASH,!0)?(this._createCommentToken(ka.DASH_DASH.length+1),this.state=ie.COMMENT_START):this._consumeSequenceIfMatch(ka.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(ka.DOCTYPE.length+1),this.state=ie.DOCTYPE):this._consumeSequenceIfMatch(ka.CDATA_START,!0)?this.inForeignNode?this.state=ie.CDATA_SECTION:(this._err(je.cdataInHtmlContent),this._createCommentToken(ka.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=ie.BOGUS_COMMENT):this._ensureHibernation()||(this._err(je.incorrectlyOpenedComment),this._createCommentToken(2),this.state=ie.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case J.HYPHEN_MINUS:{this.state=ie.COMMENT_START_DASH;break}case J.GREATER_THAN_SIGN:{this._err(je.abruptClosingOfEmptyComment),this.state=ie.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=ie.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case J.HYPHEN_MINUS:{this.state=ie.COMMENT_END;break}case J.GREATER_THAN_SIGN:{this._err(je.abruptClosingOfEmptyComment),this.state=ie.DATA,this.emitCurrentComment(n);break}case J.EOF:{this._err(je.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=ie.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case J.HYPHEN_MINUS:{this.state=ie.COMMENT_END_DASH;break}case J.LESS_THAN_SIGN:{n.data+="<",this.state=ie.COMMENT_LESS_THAN_SIGN;break}case J.NULL:{this._err(je.unexpectedNullCharacter),n.data+=Vr;break}case J.EOF:{this._err(je.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case J.EXCLAMATION_MARK:{n.data+="!",this.state=ie.COMMENT_LESS_THAN_SIGN_BANG;break}case J.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=ie.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===J.HYPHEN_MINUS?this.state=ie.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=ie.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===J.HYPHEN_MINUS?this.state=ie.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=ie.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==J.GREATER_THAN_SIGN&&t!==J.EOF&&this._err(je.nestedComment),this.state=ie.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case J.HYPHEN_MINUS:{this.state=ie.COMMENT_END;break}case J.EOF:{this._err(je.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=ie.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case J.GREATER_THAN_SIGN:{this.state=ie.DATA,this.emitCurrentComment(n);break}case J.EXCLAMATION_MARK:{this.state=ie.COMMENT_END_BANG;break}case J.HYPHEN_MINUS:{n.data+="-";break}case J.EOF:{this._err(je.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=ie.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case J.HYPHEN_MINUS:{n.data+="--!",this.state=ie.COMMENT_END_DASH;break}case J.GREATER_THAN_SIGN:{this._err(je.incorrectlyClosedComment),this.state=ie.DATA,this.emitCurrentComment(n);break}case J.EOF:{this._err(je.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=ie.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:{this.state=ie.BEFORE_DOCTYPE_NAME;break}case J.GREATER_THAN_SIGN:{this.state=ie.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case J.EOF:{this._err(je.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(je.missingWhitespaceBeforeDoctypeName),this.state=ie.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Mh(t))this._createDoctypeToken(String.fromCharCode(K0(t))),this.state=ie.DOCTYPE_NAME;else switch(t){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:break;case J.NULL:{this._err(je.unexpectedNullCharacter),this._createDoctypeToken(Vr),this.state=ie.DOCTYPE_NAME;break}case J.GREATER_THAN_SIGN:{this._err(je.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=ie.DATA;break}case J.EOF:{this._err(je.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=ie.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:{this.state=ie.AFTER_DOCTYPE_NAME;break}case J.GREATER_THAN_SIGN:{this.state=ie.DATA,this.emitCurrentDoctype(n);break}case J.NULL:{this._err(je.unexpectedNullCharacter),n.name+=Vr;break}case J.EOF:{this._err(je.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Mh(t)?K0(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:break;case J.GREATER_THAN_SIGN:{this.state=ie.DATA,this.emitCurrentDoctype(n);break}case J.EOF:{this._err(je.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(ka.PUBLIC,!1)?this.state=ie.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(ka.SYSTEM,!1)?this.state=ie.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(je.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=ie.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:{this.state=ie.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case J.QUOTATION_MARK:{this._err(je.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=ie.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case J.APOSTROPHE:{this._err(je.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=ie.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case J.GREATER_THAN_SIGN:{this._err(je.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=ie.DATA,this.emitCurrentDoctype(n);break}case J.EOF:{this._err(je.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(je.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=ie.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:break;case J.QUOTATION_MARK:{n.publicId="",this.state=ie.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case J.APOSTROPHE:{n.publicId="",this.state=ie.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case J.GREATER_THAN_SIGN:{this._err(je.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=ie.DATA,this.emitCurrentDoctype(n);break}case J.EOF:{this._err(je.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(je.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=ie.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case J.QUOTATION_MARK:{this.state=ie.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case J.NULL:{this._err(je.unexpectedNullCharacter),n.publicId+=Vr;break}case J.GREATER_THAN_SIGN:{this._err(je.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=ie.DATA;break}case J.EOF:{this._err(je.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case J.APOSTROPHE:{this.state=ie.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case J.NULL:{this._err(je.unexpectedNullCharacter),n.publicId+=Vr;break}case J.GREATER_THAN_SIGN:{this._err(je.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=ie.DATA;break}case J.EOF:{this._err(je.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:{this.state=ie.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case J.GREATER_THAN_SIGN:{this.state=ie.DATA,this.emitCurrentDoctype(n);break}case J.QUOTATION_MARK:{this._err(je.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=ie.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case J.APOSTROPHE:{this._err(je.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=ie.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case J.EOF:{this._err(je.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(je.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=ie.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:break;case J.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=ie.DATA;break}case J.QUOTATION_MARK:{n.systemId="",this.state=ie.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case J.APOSTROPHE:{n.systemId="",this.state=ie.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case J.EOF:{this._err(je.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(je.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=ie.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:{this.state=ie.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case J.QUOTATION_MARK:{this._err(je.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=ie.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case J.APOSTROPHE:{this._err(je.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=ie.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case J.GREATER_THAN_SIGN:{this._err(je.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=ie.DATA,this.emitCurrentDoctype(n);break}case J.EOF:{this._err(je.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(je.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=ie.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:break;case J.QUOTATION_MARK:{n.systemId="",this.state=ie.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case J.APOSTROPHE:{n.systemId="",this.state=ie.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case J.GREATER_THAN_SIGN:{this._err(je.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=ie.DATA,this.emitCurrentDoctype(n);break}case J.EOF:{this._err(je.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(je.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=ie.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case J.QUOTATION_MARK:{this.state=ie.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case J.NULL:{this._err(je.unexpectedNullCharacter),n.systemId+=Vr;break}case J.GREATER_THAN_SIGN:{this._err(je.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=ie.DATA;break}case J.EOF:{this._err(je.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case J.APOSTROPHE:{this.state=ie.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case J.NULL:{this._err(je.unexpectedNullCharacter),n.systemId+=Vr;break}case J.GREATER_THAN_SIGN:{this._err(je.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=ie.DATA;break}case J.EOF:{this._err(je.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:break;case J.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=ie.DATA;break}case J.EOF:{this._err(je.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(je.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=ie.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case J.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=ie.DATA;break}case J.NULL:{this._err(je.unexpectedNullCharacter);break}case J.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case J.RIGHT_SQUARE_BRACKET:{this.state=ie.CDATA_SECTION_BRACKET;break}case J.EOF:{this._err(je.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===J.RIGHT_SQUARE_BRACKET?this.state=ie.CDATA_SECTION_END:(this._emitChars("]"),this.state=ie.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case J.GREATER_THAN_SIGN:{this.state=ie.DATA;break}case J.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=ie.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(J.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&MM(this.preprocessor.peek(1))?ie.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){MM(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===J.SEMICOLON&&this._err(je.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const bF=new Set([_.DD,_.DT,_.LI,_.OPTGROUP,_.OPTION,_.P,_.RB,_.RP,_.RT,_.RTC]),LM=new Set([...bF,_.CAPTION,_.COLGROUP,_.TBODY,_.TD,_.TFOOT,_.TH,_.THEAD,_.TR]),m1=new Set([_.APPLET,_.CAPTION,_.HTML,_.MARQUEE,_.OBJECT,_.TABLE,_.TD,_.TEMPLATE,_.TH]),Oge=new Set([...m1,_.OL,_.UL]),Ige=new Set([...m1,_.BUTTON]),PM=new Set([_.ANNOTATION_XML,_.MI,_.MN,_.MO,_.MS,_.MTEXT]),jM=new Set([_.DESC,_.FOREIGN_OBJECT,_.TITLE]),Mge=new Set([_.TR,_.TEMPLATE,_.HTML]),Dge=new Set([_.TBODY,_.TFOOT,_.THEAD,_.TEMPLATE,_.HTML]),Lge=new Set([_.TABLE,_.TEMPLATE,_.HTML]),Pge=new Set([_.TD,_.TH]);class jge{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=_.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===_.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===et.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==et.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Ew,et.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Pge,et.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Lge,et.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Dge,et.HTML)}clearBackToTableRowContext(){this.clearBackTo(Mge,et.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===_.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===_.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case et.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case et.SVG:{if(jM.has(i))return!1;break}case et.MATHML:{if(PM.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,m1)}hasInListItemScope(t){return this.hasInDynamicScope(t,Oge)}hasInButtonScope(t){return this.hasInDynamicScope(t,Ige)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case et.HTML:{if(Ew.has(n))return!0;if(m1.has(n))return!1;break}case et.SVG:{if(jM.has(n))return!1;break}case et.MATHML:{if(PM.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===et.HTML)switch(this.tagIDs[n]){case t:return!0;case _.TABLE:case _.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===et.HTML)switch(this.tagIDs[t]){case _.TBODY:case _.THEAD:case _.TFOOT:return!0;case _.TABLE:case _.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===et.HTML)switch(this.tagIDs[n]){case t:return!0;case _.OPTION:case _.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&bF.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&LM.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&LM.has(this.currentTagId);)this.pop()}}const MT=3;var To;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(To||(To={}));const $M={type:To.Marker};class $ge{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),o=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const u=this.entries[c];if(u.type===To.Marker)break;const{element:d}=u;if(this.treeAdapter.getTagName(d)===a&&this.treeAdapter.getNamespaceURI(d)===o){const p=this.treeAdapter.getAttrList(d);p.length===i&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<MT)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<MT)return;const i=new Map(n.map(o=>[o.name,o.value]));let a=0;for(let o=0;o<r.length;o++){const c=r[o];c.attrs.every(u=>i.get(u.name)===u.value)&&(a+=1,a>=MT&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift($M)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:To.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:To.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf($M);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===To.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===To.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===To.Element&&n.element===t)}}const hc={createDocument(){return{nodeName:"#document",mode:Ts.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};hc.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(hc.isTextNode(n)){n.value+=t;return}}hc.appendChild(e,hc.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&hc.isTextNode(r)?r.value+=t:hc.insertBefore(e,hc.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},yF="html",Bge="about:legacy-compat",Fge="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",xF=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],zge=[...xF,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Uge=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),vF=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Hge=[...vF,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function BM(e,t){return t.some(n=>e.startsWith(n))}function qge(e){return e.name===yF&&e.publicId===null&&(e.systemId===null||e.systemId===Bge)}function Vge(e){if(e.name!==yF)return Ts.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Fge)return Ts.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Uge.has(n))return Ts.QUIRKS;let r=t===null?zge:xF;if(BM(n,r))return Ts.QUIRKS;if(r=t===null?vF:Hge,BM(n,r))return Ts.LIMITED_QUIRKS}return Ts.NO_QUIRKS}const FM={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Gge="definitionurl",Kge="definitionURL",Yge=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),Wge=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:et.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:et.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:et.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:et.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:et.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:et.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:et.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:et.XML}],["xml:space",{prefix:"xml",name:"space",namespace:et.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:et.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:et.XMLNS}]]),Xge=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Qge=new Set([_.B,_.BIG,_.BLOCKQUOTE,_.BODY,_.BR,_.CENTER,_.CODE,_.DD,_.DIV,_.DL,_.DT,_.EM,_.EMBED,_.H1,_.H2,_.H3,_.H4,_.H5,_.H6,_.HEAD,_.HR,_.I,_.IMG,_.LI,_.LISTING,_.MENU,_.META,_.NOBR,_.OL,_.P,_.PRE,_.RUBY,_.S,_.SMALL,_.SPAN,_.STRONG,_.STRIKE,_.SUB,_.SUP,_.TABLE,_.TT,_.U,_.UL,_.VAR]);function Zge(e){const t=e.tagID;return t===_.FONT&&e.attrs.some(({name:r})=>r===Wu.COLOR||r===Wu.SIZE||r===Wu.FACE)||Qge.has(t)}function EF(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Gge){e.attrs[t].name=Kge;break}}function TF(e){for(let t=0;t<e.attrs.length;t++){const n=Yge.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function kC(e){for(let t=0;t<e.attrs.length;t++){const n=Wge.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Jge(e){const t=Xge.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=dp(e.tagName))}function e0e(e,t){return t===et.MATHML&&(e===_.MI||e===_.MO||e===_.MN||e===_.MS||e===_.MTEXT)}function t0e(e,t,n){if(t===et.MATHML&&e===_.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Wu.ENCODING){const i=n[r].value.toLowerCase();return i===FM.TEXT_HTML||i===FM.APPLICATION_XML}}return t===et.SVG&&(e===_.FOREIGN_OBJECT||e===_.DESC||e===_.TITLE)}function n0e(e,t,n,r){return(!r||r===et.HTML)&&t0e(e,t,n)||(!r||r===et.MATHML)&&e0e(e,t)}const r0e="hidden",i0e=8,a0e=3;var ce;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(ce||(ce={}));const s0e={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},wF=new Set([_.TABLE,_.TBODY,_.TFOOT,_.THEAD,_.TR]),zM={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:hc,onParseError:null};class UM{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=ce.INITIAL,this.originalInsertionMode=ce.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...zM,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new Rge(this.options,this),this.activeFormattingElements=new $ge(this.treeAdapter),this.fragmentContextID=r?dp(this.treeAdapter.getTagName(r)):_.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new jge(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...zM,...n};t??(t=r.treeAdapter.createElement(Se.TEMPLATE,et.HTML,[]));const i=r.treeAdapter.createElement("documentmock",et.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===_.TEMPLATE&&a.tmplInsertionModeStack.unshift(ce.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:s0e,o={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(o)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,o;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,o=this.fragmentContextID):{current:a,currentTagId:o}=this.openElements,this._setContextModes(a,o)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===et.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,et.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=ce.TEXT}switchToPlaintextParsing(){this.insertionMode=ce.TEXT,this.originalInsertionMode=ce.IN_BODY,this.tokenizer.state=di.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===Se.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==et.HTML))switch(this.fragmentContextID){case _.TITLE:case _.TEXTAREA:{this.tokenizer.state=di.RCDATA;break}case _.STYLE:case _.XMP:case _.IFRAME:case _.NOEMBED:case _.NOFRAMES:case _.NOSCRIPT:{this.tokenizer.state=di.RAWTEXT;break}case _.SCRIPT:{this.tokenizer.state=di.SCRIPT_DATA;break}case _.PLAINTEXT:{this.tokenizer.state=di.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const o=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));o&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,et.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,et.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(Se.HTML,et.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,_.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,o=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:u,endCol:d,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:u,endCol:d,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),a=n.type===bn.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===_.SVG&&this.treeAdapter.getTagName(n)===Se.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===et.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===_.MGLYPH||t.tagID===_.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,et.HTML)}_processToken(t){switch(t.type){case bn.CHARACTER:{this.onCharacter(t);break}case bn.NULL_CHARACTER:{this.onNullCharacter(t);break}case bn.COMMENT:{this.onComment(t);break}case bn.DOCTYPE:{this.onDoctype(t);break}case bn.START_TAG:{this._processStartTag(t);break}case bn.END_TAG:{this.onEndTag(t);break}case bn.EOF:{this.onEof(t);break}case bn.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return n0e(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===To.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=ce.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(_.P),this.openElements.popUntilTagNamePopped(_.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case _.TR:{this.insertionMode=ce.IN_ROW;return}case _.TBODY:case _.THEAD:case _.TFOOT:{this.insertionMode=ce.IN_TABLE_BODY;return}case _.CAPTION:{this.insertionMode=ce.IN_CAPTION;return}case _.COLGROUP:{this.insertionMode=ce.IN_COLUMN_GROUP;return}case _.TABLE:{this.insertionMode=ce.IN_TABLE;return}case _.BODY:{this.insertionMode=ce.IN_BODY;return}case _.FRAMESET:{this.insertionMode=ce.IN_FRAMESET;return}case _.SELECT:{this._resetInsertionModeForSelect(t);return}case _.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case _.HTML:{this.insertionMode=this.headElement?ce.AFTER_HEAD:ce.BEFORE_HEAD;return}case _.TD:case _.TH:{if(t>0){this.insertionMode=ce.IN_CELL;return}break}case _.HEAD:{if(t>0){this.insertionMode=ce.IN_HEAD;return}break}}this.insertionMode=ce.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===_.TEMPLATE)break;if(r===_.TABLE){this.insertionMode=ce.IN_SELECT_IN_TABLE;return}}this.insertionMode=ce.IN_SELECT}_isElementCausesFosterParenting(t){return wF.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case _.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===et.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case _.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return _ge[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Pbe(this,t);return}switch(this.insertionMode){case ce.INITIAL:{sh(this,t);break}case ce.BEFORE_HTML:{Hh(this,t);break}case ce.BEFORE_HEAD:{qh(this,t);break}case ce.IN_HEAD:{Vh(this,t);break}case ce.IN_HEAD_NO_SCRIPT:{Gh(this,t);break}case ce.AFTER_HEAD:{Kh(this,t);break}case ce.IN_BODY:case ce.IN_CAPTION:case ce.IN_CELL:case ce.IN_TEMPLATE:{AF(this,t);break}case ce.TEXT:case ce.IN_SELECT:case ce.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case ce.IN_TABLE:case ce.IN_TABLE_BODY:case ce.IN_ROW:{DT(this,t);break}case ce.IN_TABLE_TEXT:{OF(this,t);break}case ce.IN_COLUMN_GROUP:{g1(this,t);break}case ce.AFTER_BODY:{b1(this,t);break}case ce.AFTER_AFTER_BODY:{Rb(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Lbe(this,t);return}switch(this.insertionMode){case ce.INITIAL:{sh(this,t);break}case ce.BEFORE_HTML:{Hh(this,t);break}case ce.BEFORE_HEAD:{qh(this,t);break}case ce.IN_HEAD:{Vh(this,t);break}case ce.IN_HEAD_NO_SCRIPT:{Gh(this,t);break}case ce.AFTER_HEAD:{Kh(this,t);break}case ce.TEXT:{this._insertCharacters(t);break}case ce.IN_TABLE:case ce.IN_TABLE_BODY:case ce.IN_ROW:{DT(this,t);break}case ce.IN_COLUMN_GROUP:{g1(this,t);break}case ce.AFTER_BODY:{b1(this,t);break}case ce.AFTER_AFTER_BODY:{Rb(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Tw(this,t);return}switch(this.insertionMode){case ce.INITIAL:case ce.BEFORE_HTML:case ce.BEFORE_HEAD:case ce.IN_HEAD:case ce.IN_HEAD_NO_SCRIPT:case ce.AFTER_HEAD:case ce.IN_BODY:case ce.IN_TABLE:case ce.IN_CAPTION:case ce.IN_COLUMN_GROUP:case ce.IN_TABLE_BODY:case ce.IN_ROW:case ce.IN_CELL:case ce.IN_SELECT:case ce.IN_SELECT_IN_TABLE:case ce.IN_TEMPLATE:case ce.IN_FRAMESET:case ce.AFTER_FRAMESET:{Tw(this,t);break}case ce.IN_TABLE_TEXT:{oh(this,t);break}case ce.AFTER_BODY:{p0e(this,t);break}case ce.AFTER_AFTER_BODY:case ce.AFTER_AFTER_FRAMESET:{h0e(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case ce.INITIAL:{m0e(this,t);break}case ce.BEFORE_HEAD:case ce.IN_HEAD:case ce.IN_HEAD_NO_SCRIPT:case ce.AFTER_HEAD:{this._err(t,je.misplacedDoctype);break}case ce.IN_TABLE_TEXT:{oh(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,je.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?jbe(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case ce.INITIAL:{sh(this,t);break}case ce.BEFORE_HTML:{g0e(this,t);break}case ce.BEFORE_HEAD:{y0e(this,t);break}case ce.IN_HEAD:{no(this,t);break}case ce.IN_HEAD_NO_SCRIPT:{E0e(this,t);break}case ce.AFTER_HEAD:{w0e(this,t);break}case ce.IN_BODY:{la(this,t);break}case ce.IN_TABLE:{zf(this,t);break}case ce.IN_TABLE_TEXT:{oh(this,t);break}case ce.IN_CAPTION:{xbe(this,t);break}case ce.IN_COLUMN_GROUP:{OC(this,t);break}case ce.IN_TABLE_BODY:{wx(this,t);break}case ce.IN_ROW:{Sx(this,t);break}case ce.IN_CELL:{Tbe(this,t);break}case ce.IN_SELECT:{DF(this,t);break}case ce.IN_SELECT_IN_TABLE:{Sbe(this,t);break}case ce.IN_TEMPLATE:{_be(this,t);break}case ce.AFTER_BODY:{kbe(this,t);break}case ce.IN_FRAMESET:{Nbe(this,t);break}case ce.AFTER_FRAMESET:{Obe(this,t);break}case ce.AFTER_AFTER_BODY:{Mbe(this,t);break}case ce.AFTER_AFTER_FRAMESET:{Dbe(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?$be(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case ce.INITIAL:{sh(this,t);break}case ce.BEFORE_HTML:{b0e(this,t);break}case ce.BEFORE_HEAD:{x0e(this,t);break}case ce.IN_HEAD:{v0e(this,t);break}case ce.IN_HEAD_NO_SCRIPT:{T0e(this,t);break}case ce.AFTER_HEAD:{S0e(this,t);break}case ce.IN_BODY:{Tx(this,t);break}case ce.TEXT:{cbe(this,t);break}case ce.IN_TABLE:{ym(this,t);break}case ce.IN_TABLE_TEXT:{oh(this,t);break}case ce.IN_CAPTION:{vbe(this,t);break}case ce.IN_COLUMN_GROUP:{Ebe(this,t);break}case ce.IN_TABLE_BODY:{ww(this,t);break}case ce.IN_ROW:{MF(this,t);break}case ce.IN_CELL:{wbe(this,t);break}case ce.IN_SELECT:{LF(this,t);break}case ce.IN_SELECT_IN_TABLE:{Abe(this,t);break}case ce.IN_TEMPLATE:{Cbe(this,t);break}case ce.AFTER_BODY:{jF(this,t);break}case ce.IN_FRAMESET:{Rbe(this,t);break}case ce.AFTER_FRAMESET:{Ibe(this,t);break}case ce.AFTER_AFTER_BODY:{Rb(this,t);break}}}onEof(t){switch(this.insertionMode){case ce.INITIAL:{sh(this,t);break}case ce.BEFORE_HTML:{Hh(this,t);break}case ce.BEFORE_HEAD:{qh(this,t);break}case ce.IN_HEAD:{Vh(this,t);break}case ce.IN_HEAD_NO_SCRIPT:{Gh(this,t);break}case ce.AFTER_HEAD:{Kh(this,t);break}case ce.IN_BODY:case ce.IN_TABLE:case ce.IN_CAPTION:case ce.IN_COLUMN_GROUP:case ce.IN_TABLE_BODY:case ce.IN_ROW:case ce.IN_CELL:case ce.IN_SELECT:case ce.IN_SELECT_IN_TABLE:{NF(this,t);break}case ce.TEXT:{ube(this,t);break}case ce.IN_TABLE_TEXT:{oh(this,t);break}case ce.IN_TEMPLATE:{PF(this,t);break}case ce.AFTER_BODY:case ce.IN_FRAMESET:case ce.AFTER_FRAMESET:case ce.AFTER_AFTER_BODY:case ce.AFTER_AFTER_FRAMESET:{RC(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===J.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case ce.IN_HEAD:case ce.IN_HEAD_NO_SCRIPT:case ce.AFTER_HEAD:case ce.TEXT:case ce.IN_COLUMN_GROUP:case ce.IN_SELECT:case ce.IN_SELECT_IN_TABLE:case ce.IN_FRAMESET:case ce.AFTER_FRAMESET:{this._insertCharacters(t);break}case ce.IN_BODY:case ce.IN_CAPTION:case ce.IN_CELL:case ce.IN_TEMPLATE:case ce.AFTER_BODY:case ce.AFTER_AFTER_BODY:case ce.AFTER_AFTER_FRAMESET:{SF(this,t);break}case ce.IN_TABLE:case ce.IN_TABLE_BODY:case ce.IN_ROW:{DT(this,t);break}case ce.IN_TABLE_TEXT:{RF(this,t);break}}}}function o0e(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):kF(e,t),n}function l0e(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function c0e(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);const c=e.activeFormattingElements.getElementEntry(o),u=c&&a>=a0e;!c||u?(u&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(o)):(o=u0e(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function u0e(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function d0e(e,t,n){const r=e.treeAdapter.getTagName(t),i=dp(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===_.TEMPLATE&&a===et.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function f0e(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function NC(e,t){for(let n=0;n<i0e;n++){const r=o0e(e,t);if(!r)break;const i=l0e(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=c0e(e,i,r.element),o=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),o&&d0e(e,o,a),f0e(e,i,r)}}function Tw(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function p0e(e,t){e._appendCommentNode(t,e.openElements.items[0])}function h0e(e,t){e._appendCommentNode(t,e.document)}function RC(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],o=e.treeAdapter.getNodeSourceCodeLocation(a);o&&!o.endTag&&e._setEndLocation(a,t)}}}}function m0e(e,t){e._setDocumentType(t);const n=t.forceQuirks?Ts.QUIRKS:Vge(t);qge(t)||e._err(t,je.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=ce.BEFORE_HTML}function sh(e,t){e._err(t,je.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ts.QUIRKS),e.insertionMode=ce.BEFORE_HTML,e._processToken(t)}function g0e(e,t){t.tagID===_.HTML?(e._insertElement(t,et.HTML),e.insertionMode=ce.BEFORE_HEAD):Hh(e,t)}function b0e(e,t){const n=t.tagID;(n===_.HTML||n===_.HEAD||n===_.BODY||n===_.BR)&&Hh(e,t)}function Hh(e,t){e._insertFakeRootElement(),e.insertionMode=ce.BEFORE_HEAD,e._processToken(t)}function y0e(e,t){switch(t.tagID){case _.HTML:{la(e,t);break}case _.HEAD:{e._insertElement(t,et.HTML),e.headElement=e.openElements.current,e.insertionMode=ce.IN_HEAD;break}default:qh(e,t)}}function x0e(e,t){const n=t.tagID;n===_.HEAD||n===_.BODY||n===_.HTML||n===_.BR?qh(e,t):e._err(t,je.endTagWithoutMatchingOpenElement)}function qh(e,t){e._insertFakeElement(Se.HEAD,_.HEAD),e.headElement=e.openElements.current,e.insertionMode=ce.IN_HEAD,e._processToken(t)}function no(e,t){switch(t.tagID){case _.HTML:{la(e,t);break}case _.BASE:case _.BASEFONT:case _.BGSOUND:case _.LINK:case _.META:{e._appendElement(t,et.HTML),t.ackSelfClosing=!0;break}case _.TITLE:{e._switchToTextParsing(t,di.RCDATA);break}case _.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,di.RAWTEXT):(e._insertElement(t,et.HTML),e.insertionMode=ce.IN_HEAD_NO_SCRIPT);break}case _.NOFRAMES:case _.STYLE:{e._switchToTextParsing(t,di.RAWTEXT);break}case _.SCRIPT:{e._switchToTextParsing(t,di.SCRIPT_DATA);break}case _.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=ce.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(ce.IN_TEMPLATE);break}case _.HEAD:{e._err(t,je.misplacedStartTagForHeadElement);break}default:Vh(e,t)}}function v0e(e,t){switch(t.tagID){case _.HEAD:{e.openElements.pop(),e.insertionMode=ce.AFTER_HEAD;break}case _.BODY:case _.BR:case _.HTML:{Vh(e,t);break}case _.TEMPLATE:{Td(e,t);break}default:e._err(t,je.endTagWithoutMatchingOpenElement)}}function Td(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==_.TEMPLATE&&e._err(t,je.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(_.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,je.endTagWithoutMatchingOpenElement)}function Vh(e,t){e.openElements.pop(),e.insertionMode=ce.AFTER_HEAD,e._processToken(t)}function E0e(e,t){switch(t.tagID){case _.HTML:{la(e,t);break}case _.BASEFONT:case _.BGSOUND:case _.HEAD:case _.LINK:case _.META:case _.NOFRAMES:case _.STYLE:{no(e,t);break}case _.NOSCRIPT:{e._err(t,je.nestedNoscriptInHead);break}default:Gh(e,t)}}function T0e(e,t){switch(t.tagID){case _.NOSCRIPT:{e.openElements.pop(),e.insertionMode=ce.IN_HEAD;break}case _.BR:{Gh(e,t);break}default:e._err(t,je.endTagWithoutMatchingOpenElement)}}function Gh(e,t){const n=t.type===bn.EOF?je.openElementsLeftAfterEof:je.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=ce.IN_HEAD,e._processToken(t)}function w0e(e,t){switch(t.tagID){case _.HTML:{la(e,t);break}case _.BODY:{e._insertElement(t,et.HTML),e.framesetOk=!1,e.insertionMode=ce.IN_BODY;break}case _.FRAMESET:{e._insertElement(t,et.HTML),e.insertionMode=ce.IN_FRAMESET;break}case _.BASE:case _.BASEFONT:case _.BGSOUND:case _.LINK:case _.META:case _.NOFRAMES:case _.SCRIPT:case _.STYLE:case _.TEMPLATE:case _.TITLE:{e._err(t,je.abandonedHeadElementChild),e.openElements.push(e.headElement,_.HEAD),no(e,t),e.openElements.remove(e.headElement);break}case _.HEAD:{e._err(t,je.misplacedStartTagForHeadElement);break}default:Kh(e,t)}}function S0e(e,t){switch(t.tagID){case _.BODY:case _.HTML:case _.BR:{Kh(e,t);break}case _.TEMPLATE:{Td(e,t);break}default:e._err(t,je.endTagWithoutMatchingOpenElement)}}function Kh(e,t){e._insertFakeElement(Se.BODY,_.BODY),e.insertionMode=ce.IN_BODY,Ex(e,t)}function Ex(e,t){switch(t.type){case bn.CHARACTER:{AF(e,t);break}case bn.WHITESPACE_CHARACTER:{SF(e,t);break}case bn.COMMENT:{Tw(e,t);break}case bn.START_TAG:{la(e,t);break}case bn.END_TAG:{Tx(e,t);break}case bn.EOF:{NF(e,t);break}}}function SF(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function AF(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function A0e(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function _0e(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function C0e(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,et.HTML),e.insertionMode=ce.IN_FRAMESET)}function k0e(e,t){e.openElements.hasInButtonScope(_.P)&&e._closePElement(),e._insertElement(t,et.HTML)}function N0e(e,t){e.openElements.hasInButtonScope(_.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Ew.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,et.HTML)}function R0e(e,t){e.openElements.hasInButtonScope(_.P)&&e._closePElement(),e._insertElement(t,et.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function O0e(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(_.P)&&e._closePElement(),e._insertElement(t,et.HTML),n||(e.formElement=e.openElements.current))}function I0e(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===_.LI&&i===_.LI||(n===_.DD||n===_.DT)&&(i===_.DD||i===_.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==_.ADDRESS&&i!==_.DIV&&i!==_.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(_.P)&&e._closePElement(),e._insertElement(t,et.HTML)}function M0e(e,t){e.openElements.hasInButtonScope(_.P)&&e._closePElement(),e._insertElement(t,et.HTML),e.tokenizer.state=di.PLAINTEXT}function D0e(e,t){e.openElements.hasInScope(_.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(_.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,et.HTML),e.framesetOk=!1}function L0e(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Se.A);n&&(NC(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,et.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function P0e(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,et.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function j0e(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(_.NOBR)&&(NC(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,et.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function $0e(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,et.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function B0e(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ts.QUIRKS&&e.openElements.hasInButtonScope(_.P)&&e._closePElement(),e._insertElement(t,et.HTML),e.framesetOk=!1,e.insertionMode=ce.IN_TABLE}function _F(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,et.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function CF(e){const t=mF(e,Wu.TYPE);return t!=null&&t.toLowerCase()===r0e}function F0e(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,et.HTML),CF(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function z0e(e,t){e._appendElement(t,et.HTML),t.ackSelfClosing=!0}function U0e(e,t){e.openElements.hasInButtonScope(_.P)&&e._closePElement(),e._appendElement(t,et.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function H0e(e,t){t.tagName=Se.IMG,t.tagID=_.IMG,_F(e,t)}function q0e(e,t){e._insertElement(t,et.HTML),e.skipNextNewLine=!0,e.tokenizer.state=di.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=ce.TEXT}function V0e(e,t){e.openElements.hasInButtonScope(_.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,di.RAWTEXT)}function G0e(e,t){e.framesetOk=!1,e._switchToTextParsing(t,di.RAWTEXT)}function HM(e,t){e._switchToTextParsing(t,di.RAWTEXT)}function K0e(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,et.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===ce.IN_TABLE||e.insertionMode===ce.IN_CAPTION||e.insertionMode===ce.IN_TABLE_BODY||e.insertionMode===ce.IN_ROW||e.insertionMode===ce.IN_CELL?ce.IN_SELECT_IN_TABLE:ce.IN_SELECT}function Y0e(e,t){e.openElements.currentTagId===_.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,et.HTML)}function W0e(e,t){e.openElements.hasInScope(_.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,et.HTML)}function X0e(e,t){e.openElements.hasInScope(_.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(_.RTC),e._insertElement(t,et.HTML)}function Q0e(e,t){e._reconstructActiveFormattingElements(),EF(t),kC(t),t.selfClosing?e._appendElement(t,et.MATHML):e._insertElement(t,et.MATHML),t.ackSelfClosing=!0}function Z0e(e,t){e._reconstructActiveFormattingElements(),TF(t),kC(t),t.selfClosing?e._appendElement(t,et.SVG):e._insertElement(t,et.SVG),t.ackSelfClosing=!0}function qM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,et.HTML)}function la(e,t){switch(t.tagID){case _.I:case _.S:case _.B:case _.U:case _.EM:case _.TT:case _.BIG:case _.CODE:case _.FONT:case _.SMALL:case _.STRIKE:case _.STRONG:{P0e(e,t);break}case _.A:{L0e(e,t);break}case _.H1:case _.H2:case _.H3:case _.H4:case _.H5:case _.H6:{N0e(e,t);break}case _.P:case _.DL:case _.OL:case _.UL:case _.DIV:case _.DIR:case _.NAV:case _.MAIN:case _.MENU:case _.ASIDE:case _.CENTER:case _.FIGURE:case _.FOOTER:case _.HEADER:case _.HGROUP:case _.DIALOG:case _.DETAILS:case _.ADDRESS:case _.ARTICLE:case _.SEARCH:case _.SECTION:case _.SUMMARY:case _.FIELDSET:case _.BLOCKQUOTE:case _.FIGCAPTION:{k0e(e,t);break}case _.LI:case _.DD:case _.DT:{I0e(e,t);break}case _.BR:case _.IMG:case _.WBR:case _.AREA:case _.EMBED:case _.KEYGEN:{_F(e,t);break}case _.HR:{U0e(e,t);break}case _.RB:case _.RTC:{W0e(e,t);break}case _.RT:case _.RP:{X0e(e,t);break}case _.PRE:case _.LISTING:{R0e(e,t);break}case _.XMP:{V0e(e,t);break}case _.SVG:{Z0e(e,t);break}case _.HTML:{A0e(e,t);break}case _.BASE:case _.LINK:case _.META:case _.STYLE:case _.TITLE:case _.SCRIPT:case _.BGSOUND:case _.BASEFONT:case _.TEMPLATE:{no(e,t);break}case _.BODY:{_0e(e,t);break}case _.FORM:{O0e(e,t);break}case _.NOBR:{j0e(e,t);break}case _.MATH:{Q0e(e,t);break}case _.TABLE:{B0e(e,t);break}case _.INPUT:{F0e(e,t);break}case _.PARAM:case _.TRACK:case _.SOURCE:{z0e(e,t);break}case _.IMAGE:{H0e(e,t);break}case _.BUTTON:{D0e(e,t);break}case _.APPLET:case _.OBJECT:case _.MARQUEE:{$0e(e,t);break}case _.IFRAME:{G0e(e,t);break}case _.SELECT:{K0e(e,t);break}case _.OPTION:case _.OPTGROUP:{Y0e(e,t);break}case _.NOEMBED:case _.NOFRAMES:{HM(e,t);break}case _.FRAMESET:{C0e(e,t);break}case _.TEXTAREA:{q0e(e,t);break}case _.NOSCRIPT:{e.options.scriptingEnabled?HM(e,t):qM(e,t);break}case _.PLAINTEXT:{M0e(e,t);break}case _.COL:case _.TH:case _.TD:case _.TR:case _.HEAD:case _.FRAME:case _.TBODY:case _.TFOOT:case _.THEAD:case _.CAPTION:case _.COLGROUP:break;default:qM(e,t)}}function J0e(e,t){if(e.openElements.hasInScope(_.BODY)&&(e.insertionMode=ce.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function ebe(e,t){e.openElements.hasInScope(_.BODY)&&(e.insertionMode=ce.AFTER_BODY,jF(e,t))}function tbe(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function nbe(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(_.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(_.FORM):n&&e.openElements.remove(n))}function rbe(e){e.openElements.hasInButtonScope(_.P)||e._insertFakeElement(Se.P,_.P),e._closePElement()}function ibe(e){e.openElements.hasInListItemScope(_.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(_.LI),e.openElements.popUntilTagNamePopped(_.LI))}function abe(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function sbe(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function obe(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function lbe(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Se.BR,_.BR),e.openElements.pop(),e.framesetOk=!1}function kF(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],o=e.openElements.tagIDs[i];if(r===o&&(r!==_.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,o))break}}function Tx(e,t){switch(t.tagID){case _.A:case _.B:case _.I:case _.S:case _.U:case _.EM:case _.TT:case _.BIG:case _.CODE:case _.FONT:case _.NOBR:case _.SMALL:case _.STRIKE:case _.STRONG:{NC(e,t);break}case _.P:{rbe(e);break}case _.DL:case _.UL:case _.OL:case _.DIR:case _.DIV:case _.NAV:case _.PRE:case _.MAIN:case _.MENU:case _.ASIDE:case _.BUTTON:case _.CENTER:case _.FIGURE:case _.FOOTER:case _.HEADER:case _.HGROUP:case _.DIALOG:case _.ADDRESS:case _.ARTICLE:case _.DETAILS:case _.SEARCH:case _.SECTION:case _.SUMMARY:case _.LISTING:case _.FIELDSET:case _.BLOCKQUOTE:case _.FIGCAPTION:{tbe(e,t);break}case _.LI:{ibe(e);break}case _.DD:case _.DT:{abe(e,t);break}case _.H1:case _.H2:case _.H3:case _.H4:case _.H5:case _.H6:{sbe(e);break}case _.BR:{lbe(e);break}case _.BODY:{J0e(e,t);break}case _.HTML:{ebe(e,t);break}case _.FORM:{nbe(e);break}case _.APPLET:case _.OBJECT:case _.MARQUEE:{obe(e,t);break}case _.TEMPLATE:{Td(e,t);break}default:kF(e,t)}}function NF(e,t){e.tmplInsertionModeStack.length>0?PF(e,t):RC(e,t)}function cbe(e,t){var n;t.tagID===_.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function ube(e,t){e._err(t,je.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function DT(e,t){if(e.openElements.currentTagId!==void 0&&wF.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=ce.IN_TABLE_TEXT,t.type){case bn.CHARACTER:{OF(e,t);break}case bn.WHITESPACE_CHARACTER:{RF(e,t);break}}else yg(e,t)}function dbe(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,et.HTML),e.insertionMode=ce.IN_CAPTION}function fbe(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,et.HTML),e.insertionMode=ce.IN_COLUMN_GROUP}function pbe(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Se.COLGROUP,_.COLGROUP),e.insertionMode=ce.IN_COLUMN_GROUP,OC(e,t)}function hbe(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,et.HTML),e.insertionMode=ce.IN_TABLE_BODY}function mbe(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Se.TBODY,_.TBODY),e.insertionMode=ce.IN_TABLE_BODY,wx(e,t)}function gbe(e,t){e.openElements.hasInTableScope(_.TABLE)&&(e.openElements.popUntilTagNamePopped(_.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function bbe(e,t){CF(t)?e._appendElement(t,et.HTML):yg(e,t),t.ackSelfClosing=!0}function ybe(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,et.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function zf(e,t){switch(t.tagID){case _.TD:case _.TH:case _.TR:{mbe(e,t);break}case _.STYLE:case _.SCRIPT:case _.TEMPLATE:{no(e,t);break}case _.COL:{pbe(e,t);break}case _.FORM:{ybe(e,t);break}case _.TABLE:{gbe(e,t);break}case _.TBODY:case _.TFOOT:case _.THEAD:{hbe(e,t);break}case _.INPUT:{bbe(e,t);break}case _.CAPTION:{dbe(e,t);break}case _.COLGROUP:{fbe(e,t);break}default:yg(e,t)}}function ym(e,t){switch(t.tagID){case _.TABLE:{e.openElements.hasInTableScope(_.TABLE)&&(e.openElements.popUntilTagNamePopped(_.TABLE),e._resetInsertionMode());break}case _.TEMPLATE:{Td(e,t);break}case _.BODY:case _.CAPTION:case _.COL:case _.COLGROUP:case _.HTML:case _.TBODY:case _.TD:case _.TFOOT:case _.TH:case _.THEAD:case _.TR:break;default:yg(e,t)}}function yg(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ex(e,t),e.fosterParentingEnabled=n}function RF(e,t){e.pendingCharacterTokens.push(t)}function OF(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function oh(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)yg(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const IF=new Set([_.CAPTION,_.COL,_.COLGROUP,_.TBODY,_.TD,_.TFOOT,_.TH,_.THEAD,_.TR]);function xbe(e,t){const n=t.tagID;IF.has(n)?e.openElements.hasInTableScope(_.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(_.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=ce.IN_TABLE,zf(e,t)):la(e,t)}function vbe(e,t){const n=t.tagID;switch(n){case _.CAPTION:case _.TABLE:{e.openElements.hasInTableScope(_.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(_.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=ce.IN_TABLE,n===_.TABLE&&ym(e,t));break}case _.BODY:case _.COL:case _.COLGROUP:case _.HTML:case _.TBODY:case _.TD:case _.TFOOT:case _.TH:case _.THEAD:case _.TR:break;default:Tx(e,t)}}function OC(e,t){switch(t.tagID){case _.HTML:{la(e,t);break}case _.COL:{e._appendElement(t,et.HTML),t.ackSelfClosing=!0;break}case _.TEMPLATE:{no(e,t);break}default:g1(e,t)}}function Ebe(e,t){switch(t.tagID){case _.COLGROUP:{e.openElements.currentTagId===_.COLGROUP&&(e.openElements.pop(),e.insertionMode=ce.IN_TABLE);break}case _.TEMPLATE:{Td(e,t);break}case _.COL:break;default:g1(e,t)}}function g1(e,t){e.openElements.currentTagId===_.COLGROUP&&(e.openElements.pop(),e.insertionMode=ce.IN_TABLE,e._processToken(t))}function wx(e,t){switch(t.tagID){case _.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,et.HTML),e.insertionMode=ce.IN_ROW;break}case _.TH:case _.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Se.TR,_.TR),e.insertionMode=ce.IN_ROW,Sx(e,t);break}case _.CAPTION:case _.COL:case _.COLGROUP:case _.TBODY:case _.TFOOT:case _.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=ce.IN_TABLE,zf(e,t));break}default:zf(e,t)}}function ww(e,t){const n=t.tagID;switch(t.tagID){case _.TBODY:case _.TFOOT:case _.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=ce.IN_TABLE);break}case _.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=ce.IN_TABLE,ym(e,t));break}case _.BODY:case _.CAPTION:case _.COL:case _.COLGROUP:case _.HTML:case _.TD:case _.TH:case _.TR:break;default:ym(e,t)}}function Sx(e,t){switch(t.tagID){case _.TH:case _.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,et.HTML),e.insertionMode=ce.IN_CELL,e.activeFormattingElements.insertMarker();break}case _.CAPTION:case _.COL:case _.COLGROUP:case _.TBODY:case _.TFOOT:case _.THEAD:case _.TR:{e.openElements.hasInTableScope(_.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=ce.IN_TABLE_BODY,wx(e,t));break}default:zf(e,t)}}function MF(e,t){switch(t.tagID){case _.TR:{e.openElements.hasInTableScope(_.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=ce.IN_TABLE_BODY);break}case _.TABLE:{e.openElements.hasInTableScope(_.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=ce.IN_TABLE_BODY,ww(e,t));break}case _.TBODY:case _.TFOOT:case _.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(_.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=ce.IN_TABLE_BODY,ww(e,t));break}case _.BODY:case _.CAPTION:case _.COL:case _.COLGROUP:case _.HTML:case _.TD:case _.TH:break;default:ym(e,t)}}function Tbe(e,t){const n=t.tagID;IF.has(n)?(e.openElements.hasInTableScope(_.TD)||e.openElements.hasInTableScope(_.TH))&&(e._closeTableCell(),Sx(e,t)):la(e,t)}function wbe(e,t){const n=t.tagID;switch(n){case _.TD:case _.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=ce.IN_ROW);break}case _.TABLE:case _.TBODY:case _.TFOOT:case _.THEAD:case _.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),MF(e,t));break}case _.BODY:case _.CAPTION:case _.COL:case _.COLGROUP:case _.HTML:break;default:Tx(e,t)}}function DF(e,t){switch(t.tagID){case _.HTML:{la(e,t);break}case _.OPTION:{e.openElements.currentTagId===_.OPTION&&e.openElements.pop(),e._insertElement(t,et.HTML);break}case _.OPTGROUP:{e.openElements.currentTagId===_.OPTION&&e.openElements.pop(),e.openElements.currentTagId===_.OPTGROUP&&e.openElements.pop(),e._insertElement(t,et.HTML);break}case _.HR:{e.openElements.currentTagId===_.OPTION&&e.openElements.pop(),e.openElements.currentTagId===_.OPTGROUP&&e.openElements.pop(),e._appendElement(t,et.HTML),t.ackSelfClosing=!0;break}case _.INPUT:case _.KEYGEN:case _.TEXTAREA:case _.SELECT:{e.openElements.hasInSelectScope(_.SELECT)&&(e.openElements.popUntilTagNamePopped(_.SELECT),e._resetInsertionMode(),t.tagID!==_.SELECT&&e._processStartTag(t));break}case _.SCRIPT:case _.TEMPLATE:{no(e,t);break}}}function LF(e,t){switch(t.tagID){case _.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===_.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===_.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===_.OPTGROUP&&e.openElements.pop();break}case _.OPTION:{e.openElements.currentTagId===_.OPTION&&e.openElements.pop();break}case _.SELECT:{e.openElements.hasInSelectScope(_.SELECT)&&(e.openElements.popUntilTagNamePopped(_.SELECT),e._resetInsertionMode());break}case _.TEMPLATE:{Td(e,t);break}}}function Sbe(e,t){const n=t.tagID;n===_.CAPTION||n===_.TABLE||n===_.TBODY||n===_.TFOOT||n===_.THEAD||n===_.TR||n===_.TD||n===_.TH?(e.openElements.popUntilTagNamePopped(_.SELECT),e._resetInsertionMode(),e._processStartTag(t)):DF(e,t)}function Abe(e,t){const n=t.tagID;n===_.CAPTION||n===_.TABLE||n===_.TBODY||n===_.TFOOT||n===_.THEAD||n===_.TR||n===_.TD||n===_.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(_.SELECT),e._resetInsertionMode(),e.onEndTag(t)):LF(e,t)}function _be(e,t){switch(t.tagID){case _.BASE:case _.BASEFONT:case _.BGSOUND:case _.LINK:case _.META:case _.NOFRAMES:case _.SCRIPT:case _.STYLE:case _.TEMPLATE:case _.TITLE:{no(e,t);break}case _.CAPTION:case _.COLGROUP:case _.TBODY:case _.TFOOT:case _.THEAD:{e.tmplInsertionModeStack[0]=ce.IN_TABLE,e.insertionMode=ce.IN_TABLE,zf(e,t);break}case _.COL:{e.tmplInsertionModeStack[0]=ce.IN_COLUMN_GROUP,e.insertionMode=ce.IN_COLUMN_GROUP,OC(e,t);break}case _.TR:{e.tmplInsertionModeStack[0]=ce.IN_TABLE_BODY,e.insertionMode=ce.IN_TABLE_BODY,wx(e,t);break}case _.TD:case _.TH:{e.tmplInsertionModeStack[0]=ce.IN_ROW,e.insertionMode=ce.IN_ROW,Sx(e,t);break}default:e.tmplInsertionModeStack[0]=ce.IN_BODY,e.insertionMode=ce.IN_BODY,la(e,t)}}function Cbe(e,t){t.tagID===_.TEMPLATE&&Td(e,t)}function PF(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(_.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):RC(e,t)}function kbe(e,t){t.tagID===_.HTML?la(e,t):b1(e,t)}function jF(e,t){var n;if(t.tagID===_.HTML){if(e.fragmentContext||(e.insertionMode=ce.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===_.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else b1(e,t)}function b1(e,t){e.insertionMode=ce.IN_BODY,Ex(e,t)}function Nbe(e,t){switch(t.tagID){case _.HTML:{la(e,t);break}case _.FRAMESET:{e._insertElement(t,et.HTML);break}case _.FRAME:{e._appendElement(t,et.HTML),t.ackSelfClosing=!0;break}case _.NOFRAMES:{no(e,t);break}}}function Rbe(e,t){t.tagID===_.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==_.FRAMESET&&(e.insertionMode=ce.AFTER_FRAMESET))}function Obe(e,t){switch(t.tagID){case _.HTML:{la(e,t);break}case _.NOFRAMES:{no(e,t);break}}}function Ibe(e,t){t.tagID===_.HTML&&(e.insertionMode=ce.AFTER_AFTER_FRAMESET)}function Mbe(e,t){t.tagID===_.HTML?la(e,t):Rb(e,t)}function Rb(e,t){e.insertionMode=ce.IN_BODY,Ex(e,t)}function Dbe(e,t){switch(t.tagID){case _.HTML:{la(e,t);break}case _.NOFRAMES:{no(e,t);break}}}function Lbe(e,t){t.chars=Vr,e._insertCharacters(t)}function Pbe(e,t){e._insertCharacters(t),e.framesetOk=!1}function $F(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==et.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function jbe(e,t){if(Zge(t))$F(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===et.MATHML?EF(t):r===et.SVG&&(Jge(t),TF(t)),kC(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function $be(e,t){if(t.tagID===_.P||t.tagID===_.BR){$F(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===et.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}Se.AREA,Se.BASE,Se.BASEFONT,Se.BGSOUND,Se.BR,Se.COL,Se.EMBED,Se.FRAME,Se.HR,Se.IMG,Se.INPUT,Se.KEYGEN,Se.LINK,Se.META,Se.PARAM,Se.SOURCE,Se.TRACK,Se.WBR;const Ax=BF("end"),Fo=BF("start");function BF(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function FF(e){const t=Fo(e),n=Ax(e);if(t&&n)return{start:t,end:n}}const Bbe=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Fbe=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),VM={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function zF(e,t){const n=Xbe(e),r=uF("type",{handlers:{root:zbe,element:Ube,text:Hbe,comment:HF,doctype:qbe,raw:Gbe},unknown:Kbe}),i={parser:n?new UM(VM):UM.getFragmentParser(void 0,VM),handle(c){r(c,i)},stitches:!1,options:t||{}};r(e,i),fp(i,Fo());const a=n?i.parser.document:i.parser.getFragment(),o=Qme(a,{file:i.options.file});return i.stitches&&Zs(o,"comment",function(c,u,d){const p=c;if(p.value.stitch&&d&&u!==void 0){const h=d.children;return h[u]=p.value.stitch,u}}),o.type==="root"&&o.children.length===1&&o.children[0].type===e.type?o.children[0]:o}function UF(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function zbe(e,t){UF(e.children,t)}function Ube(e,t){Ybe(e,t),UF(e.children,t),Wbe(e,t)}function Hbe(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:bn.CHARACTER,chars:e.value,location:xg(e)};fp(t,Fo(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function qbe(e,t){const n={type:bn.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:xg(e)};fp(t,Fo(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Vbe(e,t){t.stitches=!0;const n=Qbe(e);if("children"in e&&"children"in n){const r=zF({type:"root",children:e.children},t.options);n.children=r.children}HF({type:"comment",value:{stitch:n}},t)}function HF(e,t){const n=e.value,r={type:bn.COMMENT,data:n,location:xg(e)};fp(t,Fo(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Gbe(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,qF(t,Fo(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Bbe,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function Kbe(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Vbe(n,t);else{let r="";throw Fbe.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function fp(e,t){qF(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=di.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function qF(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Ybe(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===di.PLAINTEXT)return;fp(t,Fo(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Fu.html;i===Fu.html&&n==="svg"&&(i=Fu.svg);const a=nge({...e,children:[]},{space:i===Fu.svg?"svg":"html"}),o={type:bn.START_TAG,tagName:n,tagID:dp(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:xg(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Wbe(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&uge.includes(n)||t.parser.tokenizer.state===di.PLAINTEXT)return;fp(t,Ax(e));const r={type:bn.END_TAG,tagName:n,tagID:dp(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:xg(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===di.RCDATA||t.parser.tokenizer.state===di.RAWTEXT||t.parser.tokenizer.state===di.SCRIPT_DATA)&&(t.parser.tokenizer.state=di.DATA)}function Xbe(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function xg(e){const t=Fo(e)||{line:void 0,column:void 0,offset:void 0},n=Ax(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Qbe(e){return"children"in e?cd({...e,children:[]}):cd(e)}function Sw(e){return function(t,n){return zF(t,{...e,file:n})}}const wu=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Du={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...wu,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...wu],h2:[["className","sr-only"]],img:[...wu,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...wu,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...wu],table:[...wu],ul:[...wu,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},gc={}.hasOwnProperty;function Zbe(e,t){let n={type:"root",children:[]};const r={schema:t?{...Du,...t}:Du,stack:[]},i=VF(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function VF(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return Jbe(e,n);case"doctype":return e1e(e,n);case"element":return t1e(e,n);case"root":return n1e(e,n);case"text":return r1e(e,n)}}}function Jbe(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return vg(a,t),a}}function e1e(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return vg(n,t),n}}function t1e(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=GF(e,t.children),i=i1e(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&gc.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let u=-1;for(a=!1;++u<c.length;)e.stack.includes(c[u])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const o={type:"element",tagName:n,properties:i,children:r};return vg(o,t),o}function n1e(e,t){const r={type:"root",children:GF(e,t.children)};return vg(r,t),r}function r1e(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return vg(r,t),r}function GF(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=VF(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function i1e(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&gc.call(r,n)?r[n]:void 0,o=r&&gc.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},u={};let d;for(d in c)if(gc.call(c,d)){const p=c[d];let h=GM(e,KM(a,d),d,p);h==null&&(h=GM(e,KM(o,d),d,p)),h!=null&&(u[d]=h)}if(i&&gc.call(i,n)){const p=i[n];for(d in p)gc.call(p,d)&&!gc.call(u,d)&&(u[d]=p[d])}return u}function GM(e,t,n,r){return t?Array.isArray(r)?a1e(e,t,n,r):KF(e,t,n,r):void 0}function a1e(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const o=KF(e,t,n,r[i]);(typeof o=="number"||typeof o=="string")&&a.push(o)}return a}function KF(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&s1e(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const o=t[a];if(o&&typeof o=="object"&&"flags"in o){if(o.test(String(r))){i=!0;break}}else if(o===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function s1e(e,t,n){const r=e.schema.protocols&&gc.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),a=i.indexOf(":"),o=i.indexOf("?"),c=i.indexOf("#"),u=i.indexOf("/");if(a<0||u>-1&&a>u||o>-1&&a>o||c>-1&&a>c)return!0;let d=-1;for(;++d<r.length;){const p=r[d];if(a===p.length&&i.slice(0,p.length)===p)return!0}return!1}function vg(e,t){const n=FF(t);t.data&&(e.data=cd(t.data)),n&&(e.position=n)}function KM(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function YF(e){return function(t){return Zbe(t,e)}}function YM(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const ma=tu(/[A-Za-z]/),ra=tu(/[\dA-Za-z]/),o1e=tu(/[#-'*+\--9=?A-Z^-~]/);function y1(e){return e!==null&&(e<32||e===127)}const Aw=tu(/\d/),l1e=tu(/[\dA-Fa-f]/),c1e=tu(/[!-/:-@[-`{-~]/);function Vt(e){return e!==null&&e<-2}function Cr(e){return e!==null&&(e<0||e===32)}function hn(e){return e===-2||e===-1||e===32}const _x=tu(new RegExp("\\p{P}|\\p{S}","u")),ud=tu(/\s/);function tu(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function u1e(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function d1e(e,t,n){const i=gx((n||{}).ignore||[]),a=f1e(t);let o=-1;for(;++o<a.length;)yx(e,"text",c);function c(d,p){let h=-1,y;for(;++h<p.length;){const b=p[h],v=y?y.children:void 0;if(i(b,v?v.indexOf(b):void 0,y))return;y=b}if(y)return u(d,p)}function u(d,p){const h=p[p.length-1],y=a[o][0],b=a[o][1];let v=0;const A=h.children.indexOf(d);let w=!1,k=[];y.lastIndex=0;let C=y.exec(d.value);for(;C;){const R=C.index,O={index:C.index,input:C.input,stack:[...p,d]};let N=b(...C,O);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?y.lastIndex=R+1:(v!==R&&k.push({type:"text",value:d.value.slice(v,R)}),Array.isArray(N)?k.push(...N):N&&k.push(N),v=R+C[0].length,w=!0),!y.global)break;C=y.exec(d.value)}return w?(v<d.value.length&&k.push({type:"text",value:d.value.slice(v)}),h.children.splice(A,1,...k)):k=[d],A+k.length}}function f1e(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([p1e(i[0]),h1e(i[1])])}return t}function p1e(e){return typeof e=="string"?new RegExp(u1e(e),"g"):e}function h1e(e){return typeof e=="function"?e:function(){return e}}const LT="phrasing",PT=["autolink","link","image","label"];function m1e(){return{transforms:[T1e],enter:{literalAutolink:b1e,literalAutolinkEmail:jT,literalAutolinkHttp:jT,literalAutolinkWww:jT},exit:{literalAutolink:E1e,literalAutolinkEmail:v1e,literalAutolinkHttp:y1e,literalAutolinkWww:x1e}}}function g1e(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:LT,notInConstruct:PT},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:LT,notInConstruct:PT},{character:":",before:"[ps]",after:"\\/",inConstruct:LT,notInConstruct:PT}]}}function b1e(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function jT(e){this.config.enter.autolinkProtocol.call(this,e)}function y1e(e){this.config.exit.autolinkProtocol.call(this,e)}function x1e(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function v1e(e){this.config.exit.autolinkEmail.call(this,e)}function E1e(e){this.exit(e)}function T1e(e){d1e(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,w1e],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),S1e]],{ignore:["link","linkReference"]})}function w1e(e,t,n,r,i){let a="";if(!WF(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!A1e(n)))return!1;const o=_1e(n+r);if(!o[0])return!1;const c={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[c,{type:"text",value:o[1]}]:c}function S1e(e,t,n,r){return!WF(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function A1e(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function _1e(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=YM(e,"(");let a=YM(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function WF(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ud(n)||_x(n))&&(!t||n!==47)}function Gs(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}XF.peek=L1e;function C1e(){this.buffer()}function k1e(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function N1e(){this.buffer()}function R1e(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function O1e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Gs(this.sliceSerialize(e)).toLowerCase(),n.label=t}function I1e(e){this.exit(e)}function M1e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Gs(this.sliceSerialize(e)).toLowerCase(),n.label=t}function D1e(e){this.exit(e)}function L1e(){return"["}function XF(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),c=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),o(),a+=i.move("]"),a}function P1e(){return{enter:{gfmFootnoteCallString:C1e,gfmFootnoteCall:k1e,gfmFootnoteDefinitionLabelString:N1e,gfmFootnoteDefinition:R1e},exit:{gfmFootnoteCallString:O1e,gfmFootnoteCall:I1e,gfmFootnoteDefinitionLabelString:M1e,gfmFootnoteDefinition:D1e}}}function j1e(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:XF},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,o){const c=a.createTracker(o);let u=c.move("[^");const d=a.enter("footnoteDefinition"),p=a.enter("label");return u+=c.move(a.safe(a.associationId(r),{before:u,after:"]"})),p(),u+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),u+=c.move((t?`
252
252
  `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?QF:$1e))),d(),u}}function $1e(e,t,n){return t===0?e:QF(e,t,n)}function QF(e,t,n){return(n?"":" ")+e}const B1e=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];IC.attention=q1e;IC.peek=V1e;function F1e(){return{canContainEols:["delete"],enter:{strikethrough:U1e},exit:{strikethrough:H1e}}}function z1e(){return{handlers:{delete:IC},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:B1e}]}}function U1e(e){this.enter({type:"delete",children:[],position:void 0},e)}function H1e(e){this.exit(e)}function IC(e,t,n,r){const i=n.createTracker(r),a=n.stack.includes("strikethrough")?"~":"~~",o=n.enter("strikethrough");let c=i.move(a);return c+=n.containerPhrasing(e,{...i.current(),before:c,after:"~"}),c+=i.move(a),o(),c}function q1e(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function V1e(){return"~"}function G1e(e){return e.length}function K1e(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||G1e,a=[],o=[],c=[],u=[];let d=0,p=-1;for(;++p<e.length;){const T=[],A=[];let w=-1;for(e[p].length>d&&(d=e[p].length);++w<e[p].length;){const k=Y1e(e[p][w]);if(n.alignDelimiters!==!1){const C=i(k);A[w]=C,(u[w]===void 0||C>u[w])&&(u[w]=C)}T.push(k)}o[p]=T,c[p]=A}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<d;)a[h]=WM(r[h]);else{const T=WM(r);for(;++h<d;)a[h]=T}h=-1;const y=[],b=[];for(;++h<d;){const T=a[h];let A="",w="";T===99?(A=":",w=":"):T===108?A=":":T===114&&(w=":");let k=n.alignDelimiters===!1?1:Math.max(1,u[h]-A.length-w.length);const C=A+"-".repeat(k)+w;n.alignDelimiters!==!1&&(k=A.length+k+w.length,k>u[h]&&(u[h]=k),b[h]=k),y[h]=C}o.splice(1,0,y),c.splice(1,0,b),p=-1;const v=[];for(;++p<o.length;){const T=o[p],A=c[p];h=-1;const w=[];for(;++h<d;){const k=T[h]||"";let C="",R="";if(n.alignDelimiters!==!1){const O=u[h]-(A[h]||0),N=a[h];N===114?C=" ".repeat(O):N===99?O%2?(C=" ".repeat(O/2+.5),R=" ".repeat(O/2-.5)):(C=" ".repeat(O/2),R=C):R=" ".repeat(O)}n.delimiterStart!==!1&&!h&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||h)&&w.push(" "),n.alignDelimiters!==!1&&w.push(C),w.push(k),n.alignDelimiters!==!1&&w.push(R),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||h!==d-1)&&w.push("|")}v.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return v.join(`
253
253
  `)}function Y1e(e){return e==null?"":String(e)}function WM(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const W1e=gx(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function X1e(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),Q1e);return i(),o}function Q1e(e,t,n){return">"+(n?"":" ")+e}function Z1e(e,t){return XM(e,t.inConstruct,!0)&&!XM(e,t.notInConstruct,!1)}function XM(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function QM(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){const a=n.unsafe[i];if(a.character===`
@@ -356,7 +356,7 @@ ${e}</tr>
356
356
  `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${mo(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=VD(e);if(i===null)return r;e=i;let a='<a href="'+e+'"';return t&&(a+=' title="'+mo(t)+'"'),a+=">"+r+"</a>",a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=VD(e);if(i===null)return mo(n);e=i;let a=`<img src="${e}" alt="${mo(n)}"`;return t&&(a+=` title="${mo(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:mo(e.text)}},rk=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},qs=class Pw{constructor(t){pt(this,"options");pt(this,"renderer");pt(this,"textRenderer");this.options=t||Ad,this.options.renderer=this.options.renderer||new A1,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new rk}static parse(t,n){return new Pw(n).parse(t)}static parseInline(t,n){return new Pw(n).parseInline(t)}parse(t){var r,i;this.renderer.parser=this;let n="";for(let a=0;a<t.length;a++){let o=t[a];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[o.type]){let u=o,d=this.options.extensions.renderers[u.type].call({parser:this},u);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(u.type)){n+=d||"";continue}}let c=o;switch(c.type){case"space":{n+=this.renderer.space(c);break}case"hr":{n+=this.renderer.hr(c);break}case"heading":{n+=this.renderer.heading(c);break}case"code":{n+=this.renderer.code(c);break}case"table":{n+=this.renderer.table(c);break}case"blockquote":{n+=this.renderer.blockquote(c);break}case"list":{n+=this.renderer.list(c);break}case"checkbox":{n+=this.renderer.checkbox(c);break}case"html":{n+=this.renderer.html(c);break}case"def":{n+=this.renderer.def(c);break}case"paragraph":{n+=this.renderer.paragraph(c);break}case"text":{n+=this.renderer.text(c);break}default:{let u='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}parseInline(t,n=this.renderer){var i,a;this.renderer.parser=this;let r="";for(let o=0;o<t.length;o++){let c=t[o];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[c.type]){let d=this.options.extensions.renderers[c.type].call({parser:this},c);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){r+=d||"";continue}}let u=c;switch(u.type){case"escape":{r+=n.text(u);break}case"html":{r+=n.html(u);break}case"link":{r+=n.link(u);break}case"image":{r+=n.image(u);break}case"checkbox":{r+=n.checkbox(u);break}case"strong":{r+=n.strong(u);break}case"em":{r+=n.em(u);break}case"codespan":{r+=n.codespan(u);break}case"br":{r+=n.br(u);break}case"del":{r+=n.del(u);break}case"text":{r+=n.text(u);break}default:{let d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return r}},yb,Dh=(yb=class{constructor(e){pt(this,"options");pt(this,"block");this.options=e||Ad}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?Ss.lex:Ss.lexInline}provideParser(e=this.block){return e?qs.parse:qs.parseInline}},pt(yb,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),pt(yb,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),yb),YSe=class{constructor(...t){pt(this,"defaults",WC());pt(this,"options",this.setOptions);pt(this,"parse",this.parseMarkdown(!0));pt(this,"parseInline",this.parseMarkdown(!1));pt(this,"Parser",qs);pt(this,"Renderer",A1);pt(this,"TextRenderer",rk);pt(this,"Lexer",Ss);pt(this,"Tokenizer",S1);pt(this,"Hooks",Dh);this.use(...t)}walkTokens(t,n){var i,a;let r=[];for(let o of t)switch(r=r.concat(n.call(this,o)),o.type){case"table":{let c=o;for(let u of c.header)r=r.concat(this.walkTokens(u.tokens,n));for(let u of c.rows)for(let d of u)r=r.concat(this.walkTokens(d.tokens,n));break}case"list":{let c=o;r=r.concat(this.walkTokens(c.items,n));break}default:{let c=o;(a=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&a[c.type]?this.defaults.extensions.childTokens[c.type].forEach(u=>{let d=c[u].flat(1/0);r=r.concat(this.walkTokens(d,n))}):c.tokens&&(r=r.concat(this.walkTokens(c.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=n.renderers[a.name];o?n.renderers[a.name]=function(...c){let u=a.renderer.apply(this,c);return u===!1&&(u=o.apply(this,c)),u}:n.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=n[a.level];o?o.unshift(a.tokenizer):n[a.level]=[a.tokenizer],a.start&&(a.level==="block"?n.startBlock?n.startBlock.push(a.start):n.startBlock=[a.start]:a.level==="inline"&&(n.startInline?n.startInline.push(a.start):n.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(n.childTokens[a.name]=a.childTokens)}),i.extensions=n),r.renderer){let a=this.defaults.renderer||new A1(this.defaults);for(let o in r.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let c=o,u=r.renderer[c],d=a[c];a[c]=(...p)=>{let h=u.apply(a,p);return h===!1&&(h=d.apply(a,p)),h||""}}i.renderer=a}if(r.tokenizer){let a=this.defaults.tokenizer||new S1(this.defaults);for(let o in r.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let c=o,u=r.tokenizer[c],d=a[c];a[c]=(...p)=>{let h=u.apply(a,p);return h===!1&&(h=d.apply(a,p)),h}}i.tokenizer=a}if(r.hooks){let a=this.defaults.hooks||new Dh;for(let o in r.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let c=o,u=r.hooks[c],d=a[c];Dh.passThroughHooks.has(o)?a[c]=p=>{if(this.defaults.async&&Dh.passThroughHooksRespectAsync.has(o))return(async()=>{let y=await u.call(a,p);return d.call(a,y)})();let h=u.call(a,p);return d.call(a,h)}:a[c]=(...p)=>{if(this.defaults.async)return(async()=>{let y=await u.apply(a,p);return y===!1&&(y=await d.apply(a,p)),y})();let h=u.apply(a,p);return h===!1&&(h=d.apply(a,p)),h}}i.hooks=a}if(r.walkTokens){let a=this.defaults.walkTokens,o=r.walkTokens;i.walkTokens=function(c){let u=[];return u.push(o.call(this,c)),a&&(u=u.concat(a.call(this,c))),u}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Ss.lex(t,n??this.defaults)}parser(t,n){return qs.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},a={...this.defaults,...i},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let c=a.hooks?await a.hooks.preprocess(n):n,u=await(a.hooks?await a.hooks.provideLexer(t):t?Ss.lex:Ss.lexInline)(c,a),d=a.hooks?await a.hooks.processAllTokens(u):u;a.walkTokens&&await Promise.all(this.walkTokens(d,a.walkTokens));let p=await(a.hooks?await a.hooks.provideParser(t):t?qs.parse:qs.parseInline)(d,a);return a.hooks?await a.hooks.postprocess(p):p})().catch(o);try{a.hooks&&(n=a.hooks.preprocess(n));let c=(a.hooks?a.hooks.provideLexer(t):t?Ss.lex:Ss.lexInline)(n,a);a.hooks&&(c=a.hooks.processAllTokens(c)),a.walkTokens&&this.walkTokens(c,a.walkTokens);let u=(a.hooks?a.hooks.provideParser(t):t?qs.parse:qs.parseInline)(c,a);return a.hooks&&(u=a.hooks.postprocess(u)),u}catch(c){return o(c)}}}onError(t,n){return r=>{if(r.message+=`
357
357
  Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+mo(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},dd=new YSe;function vr(e,t){return dd.parse(e,t)}vr.options=vr.setOptions=function(e){return dd.setOptions(e),vr.defaults=dd.defaults,oU(vr.defaults),vr};vr.getDefaults=WC;vr.defaults=Ad;vr.use=function(...e){return dd.use(...e),vr.defaults=dd.defaults,oU(vr.defaults),vr};vr.walkTokens=function(e,t){return dd.walkTokens(e,t)};vr.parseInline=dd.parseInline;vr.Parser=qs;vr.parser=qs.parse;vr.Renderer=A1;vr.TextRenderer=rk;vr.Lexer=Ss;vr.lexer=Ss.lex;vr.Tokenizer=S1;vr.Hooks=Dh;vr.parse=vr;vr.options;vr.setOptions;vr.use;vr.walkTokens;vr.parseInline;qs.parse;Ss.lex;var WSe=300,XSe="300px",QSe=500;function ZSe(e={}){let{immediate:t=!1,debounceDelay:n=WSe,rootMargin:r=XSe,idleTimeout:i=QSe}=e,[a,o]=x.useState(!1),c=x.useRef(null),u=x.useRef(null),d=x.useRef(null),p=x.useMemo(()=>b=>{let v=Date.now();return window.setTimeout(()=>{b({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-v))})},1)},[]),h=x.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(b,v)=>window.requestIdleCallback(b,v):p,[p]),y=x.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?b=>window.cancelIdleCallback(b):b=>{clearTimeout(b)},[]);return x.useEffect(()=>{if(t){o(!0);return}let b=c.current;if(!b)return;u.current&&(clearTimeout(u.current),u.current=null),d.current&&(y(d.current),d.current=null);let v=()=>{u.current&&(clearTimeout(u.current),u.current=null),d.current&&(y(d.current),d.current=null)},T=C=>{d.current=h(R=>{R.timeRemaining()>0||R.didTimeout?(o(!0),C.disconnect()):d.current=h(()=>{o(!0),C.disconnect()},{timeout:i/2})},{timeout:i})},A=C=>{v(),u.current=window.setTimeout(()=>{var R,O;let N=C.takeRecords();(N.length===0||(O=(R=N.at(-1))==null?void 0:R.isIntersecting)!=null&&O)&&T(C)},n)},w=(C,R)=>{C.isIntersecting?A(R):v()},k=new IntersectionObserver(C=>{for(let R of C)w(R,k)},{rootMargin:r,threshold:0});return k.observe(b),()=>{u.current&&clearTimeout(u.current),d.current&&y(d.current),k.disconnect()}},[t,n,r,i,y,h]),{shouldRender:a,containerRef:c}}var JSe=320,eAe=4,bU=()=>typeof performance>"u"?Date.now():performance.now();function YD(e){var t,n;let r=(t=e==null?void 0:e.now)!=null?t:bU,i=(n=e==null?void 0:e.maxBacklogMs)!=null?n:JSe,a=0,o=0;return{now:r,beginPass(c){o=Math.min(Math.max(a,c),c+i)},mark(){return o},rewind(c){o=c},take(c,u,d){if(c<=0)return{baseDelay:0,step:Math.max(0,u)};let p=Math.max(0,u),h=p===0?0:Math.min(p,eAe),y=Math.max(o,d),b=d+i,v=y+Math.max(0,c-1)*p,T=p;if(v>b&&c>1)if(y<b){let w=b-y;T=Math.max(h,w/(c-1))}else T=h;let A=Math.max(0,Math.round(y-d));return o=y+c*T,{baseDelay:A,step:T}},commitPass(){a=o}}}var yU=/\s/,ik=/^\s+$/,tAe=new Set(["pre","svg","math","annotation"]),nAe=new Set(["img","hr"]),Sg=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",ak=e=>e.some(t=>Sg(t)&&tAe.has(t.tagName)),rAe=e=>{for(let t=e.length-1;t>=0;t--){let n=e[t];if(Sg(n)&&n.tagName==="li")return n}},iAe=(e,t,n,r)=>{e.properties!=null||(e.properties={}),e.properties["data-sd-animate-marker"]=!0;let i=typeof e.properties.style=="string"?`${e.properties.style};`:"";e.properties.style=`${i}--sd-marker-duration:${t}ms;--sd-marker-delay:${Math.round(n)}ms;--sd-marker-easing:${r}`},aAe=new Set(["ul","ol","li"]),xU=e=>{for(let t of e.children)if(Sg(t)){if(t.tagName==="input")return t;if(aAe.has(t.tagName))continue;let n=xU(t);if(n)return n}},vU=(e,t,n,r)=>{e.properties!=null||(e.properties={}),e.properties["data-sd-animate"]=!0;let i=typeof e.properties.style=="string"?`${e.properties.style};`:"";e.properties.style=`${i}--sd-animation:sd-${t.animation};--sd-duration:${n}ms;--sd-easing:${t.easing};--sd-delay:${Math.round(r)}ms`},sAe=(e,t,n,r)=>{let i=xU(e);i&&vU(i,t,n,r)},oAe=(e,t,n,r,i,a)=>{if(ak(t))return;let o=r.prevContentLength,c=i.count;i.count+=1;let u=o>0&&c<o,d=u?0:a.baseDelay+i.newIndex++*a.step;vU(e,n,u?0:n.duration,d)},lAe=e=>{var t;for(let n=e.length-1;n>=0;n-=1){let r=e[n];if(Sg(r)){if((t=r.properties)!=null&&t["data-sd-animated"])break;r.properties={...r.properties,"data-sd-animated":!0}}}},EU=e=>{let t=[],n="",r=!1;for(let i of e){let a=yU.test(i);if(a!==r&&n){if(a){n+=i,r=!0;continue}t.push(n),n=""}n+=i,r=a}return n&&t.push(n),t},TU=e=>{let t=[],n="";for(let r of e)yU.test(r)?t.length>0&&!ik.test(t.at(-1))?t[t.length-1]+=r:n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&(t.length>0?t[t.length-1]+=n:t.push(n)),t},cAe=(e,t,n,r,i,a)=>{let o=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return a&&(o+=`;--sd-delay:${Math.round(a)}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:o},children:[{type:"text",value:e}]}},WD=(e,t)=>!(e>0&&t<e),jw=e=>Sg(e)&&nAe.has(e.tagName),uAe=(e,t,n)=>{let r=0,i=0;return yx(e,a=>a.type==="text"||jw(a),(a,o)=>{if(ak(o))return Bu;if(jw(a)){WD(n,i)&&(r+=1),i+=1;return}let c=a.value;if(!c.trim()){i+=c.length;return}let u=t.sep==="char"?TU(c):EU(c);for(let d of u){let p=i;i+=d.length,!ik.test(d)&&WD(n,p)&&(r+=1)}}),r},dAe=(e,t,n,r,i,a)=>{var o;let c=t.at(-1);if(!(c&&"children"in c))return;if(ak(t))return Bu;let u=c,d=u.children.indexOf(e);if(d===-1)return;let p=e.value;if(!p.trim()){i.count+=p.length;return}let h=n.sep==="char"?TU(p):EU(p),y=r.prevContentLength,b=!1,v=rAe(t),T=!!(v&&!((o=v.properties)!=null&&o["data-sd-animate-marker"])),A=!1,w=h.map(k=>{let C=i.count;if(i.count+=k.length,ik.test(k))return{type:"text",value:k};let R=y>0&&C<y,O=R?0:a.baseDelay+i.newIndex++*a.step;if(b=!0,v&&T&&!A){let N=R?0:n.duration;iAe(v,N,O,n.easing),sAe(v,n,N,O),A=!0}return cAe(k,n.animation,n.duration,n.easing,R,O)});return b&&lAe(t),u.children.splice(d,1,...w),d+w.length},fAe=0;function wU(e){var t,n,r,i,a;let o={animation:(t=e==null?void 0:e.animation)!=null?t:"fadeIn",duration:(n=e==null?void 0:e.duration)!=null?n:150,easing:(r=e==null?void 0:e.easing)!=null?r:"ease",sep:(i=e==null?void 0:e.sep)!=null?i:"word",stagger:(a=e==null?void 0:e.stagger)!=null?a:40,timeline:e==null?void 0:e.timeline},c={committedCharCount:0,prevContentLength:0,lastRenderCharCount:0,pendingMark:null},u=fAe++,d=()=>p=>{var h;let y={count:0,newIndex:0};c.prevContentLength=c.committedCharCount;let b=o.timeline,v=(h=b==null?void 0:b.now())!=null?h:bU();b&&(c.pendingMark===null?c.pendingMark=b.mark():b.rewind(c.pendingMark));let T=b?b.take(uAe(p,o,c.prevContentLength),o.stagger,v):{baseDelay:0,step:o.stagger};yx(p,A=>A.type==="text"||jw(A),(A,w)=>{if(A.type==="text")return dAe(A,w,o,c,y,T);oAe(A,w,o,c,y,T)}),c.lastRenderCharCount=y.count,c.prevContentLength=0};return Object.defineProperty(d,"name",{value:`rehypeAnimate$${u}`}),{name:"animate",type:"animate",rehypePlugin:d,setPrevContentLength(p){c.committedCharCount=p,c.prevContentLength=p},getLastRenderCharCount(){return c.lastRenderCharCount},commit(){c.committedCharCount=c.lastRenderCharCount,c.pendingMark=null}}}wU();var SU=x.createContext(!1),pAe=()=>x.useContext(SU),Ox=(...e)=>Xz(mS(e)),hAe=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(r=>r.startsWith(n)?r:`${e}:${r}`).join(" ")},mAe=e=>e?(...t)=>hAe(e,Xz(mS(t))):Ox,Rf=(e,t,n)=>{let r=typeof t=="string"&&n.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([r+t],{type:n}):t,a=URL.createObjectURL(i),o=document.createElement("a");o.href=a,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},$w=x.createContext(Ox),wn=()=>x.useContext($w),gAe=8,AU=e=>{if(!(e===void 0||e===0||e===Number.POSITIVE_INFINITY)){if(typeof e=="number")return Number.isFinite(e)&&e>0?`${e}px`:void 0;if(!(e==="0"||e==="none"||e==="Infinity"))return e}},_U=(e,t,n)=>{let r=x.useRef(null),i=x.useRef(!0),a=x.useRef(!1);return x.useEffect(()=>{let o=r.current;if(!(o&&t))return;let c=()=>{let u=o.scrollHeight-o.scrollTop-o.clientHeight<gAe;i.current=u};return o.addEventListener("scroll",c,{passive:!0}),()=>o.removeEventListener("scroll",c)},[t]),x.useEffect(()=>{e&&!a.current&&(i.current=!0),e||(i.current=!0),a.current=e},[e]),x.useEffect(()=>{let o=r.current;o&&t&&e&&i.current&&o.scrollTo({top:o.scrollHeight,behavior:"instant"})},[e,t,n]),r},bAe=Ox("block"),yAe=Ox("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),xAe=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),a=n.slice(r+1).trim();i&&a&&(t[i]=a)}}return t},vAe=x.memo(({children:e,result:t,language:n,className:r,maxHeight:i,startLine:a,lineNumbers:o=!0,...c})=>{let u=wn(),{isAnimating:d}=x.useContext(Yi),p=AU(i),h=_U(d,!!p,t),y=x.useMemo(()=>u(yAe),[u]),b=x.useMemo(()=>u(bAe),[u]),v=x.useMemo(()=>{let T={};return t.bg&&(T["--sdm-bg"]=t.bg),t.fg&&(T["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(T,xAe(t.rootStyle)),T},[t.bg,t.fg,t.rootStyle]);return m.jsx("div",{className:u(r,p?"overflow-y-auto":null,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",ref:h,style:p?{maxHeight:p}:void 0,...c,children:m.jsx("pre",{className:u(r,"bg-[var(--sdm-bg,inherit)]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit))]"),style:v,children:m.jsx("code",{className:o?u("[counter-increment:line_0] [counter-reset:line]"):void 0,style:o&&a&&a>1?{counterReset:`line ${a-1}`}:void 0,children:t.tokens.map((T,A)=>m.jsx("span",{className:o?y:b,children:T.length===0||T.length===1&&T[0].content===""?`
358
358
  `:T.map((w,k)=>{let C={},R=!!w.bgColor;if(w.color&&(C["--sdm-c"]=w.color),w.bgColor&&(C["--sdm-tbg"]=w.bgColor),w.htmlStyle)for(let[O,N]of Object.entries(w.htmlStyle))O==="color"?C["--sdm-c"]=N:O==="background-color"?(C["--sdm-tbg"]=N,R=!0):C[O]=N;return m.jsx("span",{className:u("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",R&&"bg-[var(--sdm-tbg)]",R&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:C,...w.htmlAttrs,children:w.content},k)})},A))})})})}),EAe=({className:e,language:t,style:n,isIncomplete:r,...i})=>{let a=wn();return m.jsx("div",{className:a("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...i})},CU=x.createContext({code:""}),kU=()=>x.useContext(CU),TAe=({language:e})=>{let t=wn();return m.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:m.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},wAe=e=>{let t=e.length;for(;t>0&&e[t-1]===`
359
- `;)t--;return e.slice(0,t)},SAe=x.lazy(()=>VB(()=>import("./highlighted-body-KPVGNVTW-CpPi6QLr.js"),[]).then(e=>({default:e.HighlightedCodeBlockBody}))),AAe=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:a,lineNumbers:o,...c})=>{let u=wn(),{codeBlockMaxHeight:d}=x.useContext(Yi),p=x.useMemo(()=>wAe(e),[e]),h=x.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:p.split(`
359
+ `;)t--;return e.slice(0,t)},SAe=x.lazy(()=>VB(()=>import("./highlighted-body-KPVGNVTW-BslIwn_y.js"),[]).then(e=>({default:e.HighlightedCodeBlockBody}))),AAe=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:a,lineNumbers:o,...c})=>{let u=wn(),{codeBlockMaxHeight:d}=x.useContext(Yi),p=x.useMemo(()=>wAe(e),[e]),h=x.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:p.split(`
360
360
  `).map(y=>[{content:y,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[p]);return m.jsx(CU.Provider,{value:{code:e},children:m.jsxs(EAe,{dir:"ltr",isIncomplete:i,language:t,children:[m.jsx(TAe,{language:t}),r?m.jsx("div",{className:u("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:m.jsx("div",{className:u("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:r})}):null,m.jsx(x.Suspense,{fallback:m.jsx(vAe,{className:n,language:t,lineNumbers:o,maxHeight:d,result:h,startLine:a,...c}),children:m.jsx(SAe,{className:n,code:p,language:t,lineNumbers:o,maxHeight:d,raw:h,startLine:a,...c})})]})})},_Ae=e=>m.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),CAe=e=>m.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),kAe=e=>m.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),NAe=e=>m.jsxs("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[m.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),m.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),RAe=e=>m.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),OAe=e=>m.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),IAe=e=>m.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),MAe=e=>m.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),DAe=e=>m.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),LAe=e=>m.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Lh={CheckIcon:_Ae,CopyIcon:CAe,DownloadIcon:kAe,ExternalLinkIcon:MAe,Loader2Icon:NAe,Maximize2Icon:RAe,RotateCcwIcon:OAe,XIcon:IAe,ZoomInIcon:DAe,ZoomOutIcon:LAe},NU=x.createContext(Lh),PAe=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>e[i]===t[i])},XD=({icons:e,children:t})=>{let n=x.useRef(e),r=x.useRef(e?{...Lh,...e}:Lh);PAe(n.current,e)||(n.current=e,r.current=e?{...Lh,...e}:Lh);let i=r.current;return m.jsx(NU.Provider,{value:i,children:t})},ro=()=>x.useContext(NU),RU={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",zoomIn:"Zoom in",zoomOut:"Zoom out",resetView:"Reset zoom and pan",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},Bw=x.createContext(RU),Uo=()=>x.useContext(Bw),Fw=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...o})=>{let c=wn(),[u,d]=x.useState(!1),p=x.useRef(0),{code:h}=kU(),{isAnimating:y}=x.useContext(Yi),b=Uo(),v=a??h,T=async()=>{var k;if(typeof window>"u"||!((k=navigator==null?void 0:navigator.clipboard)!=null&&k.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(v),d(!0),e==null||e(),p.current=window.setTimeout(()=>d(!1),n))}catch(C){t==null||t(C)}};x.useEffect(()=>()=>{window.clearTimeout(p.current)},[]);let A=ro(),w=u?A.CheckIcon:A.CopyIcon;return m.jsxs(m.Fragment,{children:[m.jsx("button",{"aria-label":b.copyCode,className:c("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:y,onClick:T,title:b.copyCode,type:"button",...o,children:r??m.jsx(w,{"aria-hidden":"true",size:14})}),u&&m.jsx("output",{"aria-live":"polite",className:"sr-only",children:b.copied})]})},sk=(e,t,n)=>{if(typeof e=="boolean")return n;let r=e[t];if(typeof r!="object")return n;let i=r.download;return typeof i!="object"?n:i.filename||n},QD={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},jAe=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...o})=>{let c=wn(),{code:u}=kU(),{isAnimating:d,controls:p}=x.useContext(Yi),h=Uo(),y=ro(),b=a??u,v=n&&n in QD?QD[n]:"txt",T=`${sk(p,"code","file")}.${v}`,A="text/plain",w=()=>{try{Rf(T,b,A),e==null||e()}catch(k){t==null||t(k)}};return m.jsx("button",{"aria-label":h.downloadFile,className:c("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:d,onClick:w,title:h.downloadFile,type:"button",...o,children:r??m.jsx(y.DownloadIcon,{size:14})})},ZD=()=>{let{Loader2Icon:e}=ro(),t=wn();return m.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[m.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),m.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:m.jsx(e,{className:t("size-4 animate-spin")})})]})},$Ae=/\.[^/.]+$/,BAe=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,showControls:o=!0,showDownloadControl:c=!0,...u})=>{let{DownloadIcon:d}=ro(),p=wn(),h=x.useRef(null),[y,b]=x.useState(!1),[v,T]=x.useState(!1),A=Uo(),w=u.width!=null||u.height!=null,k=(y||w)&&!v&&o&&c,C=v&&!w;x.useEffect(()=>{let I=h.current;if(I!=null&&I.complete){let L=I.naturalWidth>0;b(L),T(!L)}},[]);let R=x.useCallback(I=>{b(!0),T(!1),i==null||i(I)},[i]),O=x.useCallback(I=>{b(!1),T(!0),a==null||a(I)},[a]),N=async()=>{if(n)try{let I=await(await fetch(n)).blob(),L=new URL(n,window.location.origin).pathname.split("/").pop()||"",j=L.split(".").pop(),P=L.includes(".")&&j!==void 0&&j.length<=4,B="";if(P)B=L;else{let U=I.type,q="png";U.includes("jpeg")||U.includes("jpg")?q="jpg":U.includes("png")?q="png":U.includes("svg")?q="svg":U.includes("gif")?q="gif":U.includes("webp")&&(q="webp"),B=`${(r||L||"image").replace($Ae,"")}.${q}`}Rf(B,I,I.type)}catch{window.open(n,"_blank")}};return n?m.jsxs("div",{className:p("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[m.jsx("img",{alt:r,className:p("max-w-full rounded-lg",C&&"hidden",t),"data-streamdown":"image",onError:O,onLoad:R,ref:h,src:n,...u}),C&&m.jsx("span",{className:p("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:A.imageNotAvailable}),o&&m.jsx("div",{className:p("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"),"data-streamdown":"image-overlay"}),k&&m.jsx("button",{className:p("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:N,title:A.downloadImage,type:"button",children:m.jsx(d,{size:14})})]}):null},Xh=0,ok=()=>{Xh+=1,Xh===1&&(document.body.style.overflow="hidden")},lk=()=>{Xh=Math.max(0,Xh-1),Xh===0&&(document.body.style.overflow="")},FAe=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:o,XIcon:c}=ro(),u=wn(),[d,p]=x.useState(!1),h=Uo(),y=x.useCallback(async()=>{try{await navigator.clipboard.writeText(e),p(!0),setTimeout(()=>p(!1),2e3)}catch{}},[e]),b=x.useCallback(()=>{r(),n()},[r,n]);if(x.useEffect(()=>{if(t){ok();let T=A=>{A.key==="Escape"&&n()};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T),lk()}}},[t,n]),!t||typeof document>"u")return null;let v=m.jsx("div",{className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:T=>{T.key==="Escape"&&n()},role:"button",tabIndex:0,children:m.jsxs("div",{className:u("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:T=>T.stopPropagation(),onKeyDown:T=>T.stopPropagation(),role:"presentation",children:[m.jsx("button",{className:u("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:h.close,type:"button",children:m.jsx(c,{size:16})}),m.jsxs("div",{className:u("flex flex-col gap-2"),children:[m.jsxs("div",{className:u("flex items-center gap-2 font-semibold text-lg"),children:[m.jsx(o,{size:20}),m.jsx("span",{children:h.openExternalLink})]}),m.jsx("p",{className:u("text-muted-foreground text-sm"),children:h.externalLinkWarning})]}),m.jsx("div",{className:u("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),m.jsxs("div",{className:u("flex gap-2"),children:[m.jsx("button",{className:u("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:y,type:"button",children:d?m.jsxs(m.Fragment,{children:[m.jsx(i,{size:14}),m.jsx("span",{children:h.copied})]}):m.jsxs(m.Fragment,{children:[m.jsx(a,{size:14}),m.jsx("span",{children:h.copyLink})]})}),m.jsxs("button",{className:u("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:b,type:"button",children:[m.jsx(o,{size:14}),m.jsx("span",{children:h.openLink})]})]})]})});return fi.createPortal(v,document.body)},zw=x.createContext(null),ck=()=>x.useContext(zw),GLe=()=>{var e;let t=ck();return(e=t==null?void 0:t.code)!=null?e:null},uk=()=>{var e;let t=ck();return(e=t==null?void 0:t.mermaid)!=null?e:null},zAe=e=>{var t;let n=ck();return n!=null&&n.renderers&&e&&(t=n.renderers.find(r=>Array.isArray(r.language)?r.language.includes(e):r.language===e))!=null?t:null},UAe=e=>{if(typeof DOMParser>"u"||typeof XMLSerializer>"u")return e;let t=new DOMParser().parseFromString(e,"text/html").querySelector("svg");return t?new XMLSerializer().serializeToString(t):e},HAe=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,a)=>{let o="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),c=new Image;c.crossOrigin="anonymous",c.onload=()=>{let u=document.createElement("canvas"),d=c.width*r,p=c.height*r;u.width=d,u.height=p;let h=u.getContext("2d");if(!h){a(new Error("Failed to create 2D canvas context for PNG export"));return}h.drawImage(c,0,0,d,p),u.toBlob(y=>{if(!y){a(new Error("Failed to create PNG blob"));return}i(y)},"image/png")},c.onerror=()=>a(new Error("Failed to load SVG image")),c.src=o})},OU=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let o=wn(),[c,u]=x.useState(!1),d=x.useRef(null),{isAnimating:p,controls:h}=x.useContext(Yi),y=ro(),b=uk(),v=Uo(),T=sk(h,"mermaid","diagram"),A=async w=>{try{if(w==="mmd"){let I=`${T}.mmd`;Rf(I,e,"text/plain"),u(!1),r==null||r(w);return}if(!b){a==null||a(new Error("Mermaid plugin not available"));return}let k=b.getMermaid(i),C=e.split("").reduce((I,L)=>(I<<5)-I+L.charCodeAt(0)|0,0),R=`mermaid-${Math.abs(C)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:O}=await k.render(R,e);if(!O){a==null||a(new Error("SVG not found. Please wait for the diagram to render."));return}let N=UAe(O);if(w==="svg"){let I=`${T}.svg`;Rf(I,N,"image/svg+xml"),u(!1),r==null||r(w);return}if(w==="png"){let I=await HAe(N);Rf(`${T}.png`,I,"image/png"),r==null||r(w),u(!1);return}}catch(k){a==null||a(k)}};return x.useEffect(()=>{let w=k=>{let C=k.composedPath();d.current&&!C.includes(d.current)&&u(!1)};return document.addEventListener("mousedown",w),()=>{document.removeEventListener("mousedown",w)}},[]),m.jsxs("div",{className:o("relative"),ref:d,children:[m.jsx("button",{"aria-label":v.downloadDiagram,className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:p,onClick:()=>u(!c),title:v.downloadDiagram,type:"button",children:t??m.jsx(y.DownloadIcon,{"aria-hidden":"true",size:14})}),c?m.jsxs("div",{className:o("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[m.jsx("button",{"aria-label":v.downloadDiagramAsSvg,className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>A("svg"),title:v.downloadDiagramAsSvg,type:"button",children:v.mermaidFormatSvg}),m.jsx("button",{"aria-label":v.downloadDiagramAsPng,className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>A("png"),title:v.downloadDiagramAsPng,type:"button",children:v.mermaidFormatPng}),m.jsx("button",{"aria-label":v.downloadDiagramAsMmd,className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>A("mmd"),title:v.downloadDiagramAsMmd,type:"button",children:v.mermaidFormatMmd})]}):null]})},qAe=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:o,XIcon:c}=ro(),u=wn(),[d,p]=x.useState(!1),{isAnimating:h,controls:y}=x.useContext(Yi),b=Uo(),v=(()=>{if(typeof y=="boolean")return y;let k=y.mermaid;return k===!1?!1:k===!0||k===void 0?!0:k.panZoom!==!1})(),T=(()=>{if(typeof y=="boolean")return y;let k=y.mermaid;return k===!1?!1:k===!0||k===void 0?!0:k.download!==!1})(),A=(()=>{if(typeof y=="boolean")return y;let k=y.mermaid;return k===!1?!1:k===!0||k===void 0?!0:k.copy!==!1})(),w=()=>{p(!d)};return x.useEffect(()=>{if(d){ok();let k=C=>{C.key==="Escape"&&p(!1)};return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k),lk()}}},[d]),x.useEffect(()=>{d?n==null||n():r&&r()},[d,n,r]),m.jsxs(m.Fragment,{children:[m.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:h,onClick:w,title:b.viewFullscreen,type:"button",...a,"aria-label":b.viewFullscreen,children:m.jsx(o,{"aria-hidden":"true",size:14})}),d?fi.createPortal(m.jsxs("div",{"aria-label":b.viewFullscreen,"aria-modal":"true",className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),"data-streamdown":"mermaid-fullscreen",onClick:w,onKeyDown:k=>{k.key==="Escape"&&w()},role:"dialog",children:[m.jsxs("div",{className:u("absolute top-4 right-4 z-10 flex items-center gap-1"),onClick:k=>k.stopPropagation(),onKeyDown:k=>k.stopPropagation(),role:"presentation",children:[T?m.jsx(OU,{chart:e,config:t}):null,A?m.jsx(Fw,{code:e}):null,m.jsx("button",{"aria-label":b.exitFullscreen,className:u("rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:w,title:b.exitFullscreen,type:"button",children:m.jsx(c,{"aria-hidden":"true",size:20})})]}),m.jsx("div",{className:u("flex size-full items-center justify-center p-4"),onClick:k=>k.stopPropagation(),onKeyDown:k=>k.stopPropagation(),role:"presentation",children:m.jsx(b7,{chart:e,className:u("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:v})})]}),document.body):null]})};function Uw(e){var t;if(e.nodeType===Node.TEXT_NODE)return(t=e.textContent)!=null?t:"";if(e.nodeType!==Node.ELEMENT_NODE)return"";let n=e;return n.tagName==="BR"?`
361
361
  `:Array.from(n.childNodes).map(Uw).join("")}var IU=e=>{let t=[],n=[],r=e.querySelectorAll("thead th");for(let a of r)t.push(Uw(a).trim());let i=e.querySelectorAll("tbody tr");for(let a of i){let o=[],c=a.querySelectorAll("td");for(let u of c)o.push(Uw(u).trim());n.push(o)}return{headers:t,rows:n}},MU=e=>{var t;if(typeof e!="object")return",";let n=e.table;return typeof n!="object"?",":(t=n.csvSeparator)!=null?t:","},DU=(e,t=",")=>{let n;t==="auto"?Intl.NumberFormat().format(1.1).includes(",")?n=";":n=",":n=t;let{headers:r,rows:i}=e,a=d=>{let p=!1;for(let h of d)if(h===n||h==='"'||h===`
362
362
  `||h==="\r"){p=!0;break}return p?`"${d.replace(/"/g,'""')}"`:d},o=r.length>0?i.length+1:i.length,c=new Array(o),u=0;r.length>0&&(c[u]=r.map(a).join(n),u+=1);for(let d of i)c[u]=d.map(a).join(n),u+=1;return c.join(`
@@ -578,7 +578,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Zn=tt,dn=Et),en===void
578
578
  ${e.frontMatter}
579
579
  ---
580
580
 
581
- ${e.content??""}`,BOe=e=>{const t=e/1e3;if(t<60)return`${t.toLocaleString("en-US")} s`;const n=t/60;return n<60?`${n.toLocaleString("en-US")} min`:`${(n/60).toLocaleString("en-US")} h`},FOe=e=>/secret|token|password|credential|api.?key|authorization|cookie/i.test(e),rS=(e,t="")=>t&&FOe(t)?"[hidden]":Array.isArray(e)?e.map(n=>rS(n)):typeof e!="object"||e===null?e:Object.fromEntries(Object.entries(e).map(([n,r])=>[n,rS(r,n)])),GL=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),ho=e=>typeof e=="string"&&e.length>0,zOe=["id","owner","title","description","order","guide","tags","fixedStartOptions","action"],Na=e=>new Error(`The plugin configuration contains an invalid template: ${e}`),UOe=e=>{if(!GL(e))throw Na("not an object");if(!ho(e.id))throw Na("id is missing");const t=e.id;if(!ho(e.owner)||!ho(e.title)||!ho(e.description))throw Na(`${t}: owner, title and description are required`);if(e.order!==void 0&&typeof e.order!="number")throw Na(`${t}: order is not a number`);if(e.guide!==void 0&&!ho(e.guide))throw Na(`${t}: guide is empty`);if(e.tags!==void 0&&(!Array.isArray(e.tags)||e.tags.some(i=>!ho(i)||i!==i.trim())||new Set(e.tags).size!==e.tags.length))throw Na(`${t}: tags must be unique, non-empty keywords`);if(e.fixedStartOptions!==void 0&&(!GL(e.fixedStartOptions)||Object.keys(e.fixedStartOptions).length===0))throw Na(`${t}: fixedStartOptions must fix at least one start option`);const n={id:t,owner:e.owner,title:e.title,description:e.description,...e.order!==void 0?{order:e.order}:{},...e.guide!==void 0?{guide:e.guide}:{},...e.tags!==void 0?{tags:[...e.tags]}:{},...e.fixedStartOptions!==void 0?{fixedStartOptions:{...e.fixedStartOptions}}:{}},r=i=>{const a=Object.keys(e).filter(o=>!zOe.includes(o)&&!i.includes(o));if(a.length>0)throw Na(`${t}: unknown fields ${a.join(", ")}`)};switch(e.action){case"skill":{if(r(["skill","prompt","category"]),!ho(e.skill))throw Na(`${t}: skill is missing`);if(!ho(e.category)||!e.category.trim()||e.category!==e.category.trim())throw Na(`${t}: category must be a single non-empty text`);if(!ho(e.prompt)||!e.prompt.trim())throw Na(`${t}: prompt is missing or empty`);return{...n,action:"skill",skill:e.skill,category:e.category,prompt:e.prompt}}case"script":if(r(["coordinator","category"]),typeof e.coordinator!="boolean")throw Na(`${t}: coordinator must be true or false`);if(e.category!==void 0&&(!ho(e.category)||e.category!==e.category.trim()))throw Na(`${t}: category must be a single non-empty text`);return{...n,action:"script",coordinator:e.coordinator,...e.category!==void 0?{category:e.category}:{}};default:throw Na(`${t}: unknown action ${String(e.action)}; valid are skill and script`)}},HOe=e=>typeof e=="object"&&e!==null&&typeof e.id=="string",qOe=(e,t)=>{const n=t.webPlugin;if(!HOe(n))throw new Error(`The web entry of plugin ${e} does not export a webPlugin constant with a plugin id`);if(n.id!==e)throw new Error(`The bundle ${e} reports the different id ${n.id}`);return n},KL=(e,t,n)=>n.catch(r=>{throw new Error(`The web half of plugin ${e} does not load from ${t}: ${r instanceof Error?r.message:String(r)}`)}),VOe=async(e,t)=>{const n=e.web;if(!n)return{id:e.id};const[r]=await Promise.all([KL(e.id,n.entry,t.module(n.entry)),...n.css===void 0?[]:[KL(e.id,n.css,t.stylesheet(n.css))]]);return qOe(e.id,r)},GOe=async(e,t)=>{const n=await Promise.allSettled(e.plugins.map(o=>VOe(o,t))),r=n.flatMap((o,c)=>o.status==="rejected"?[{id:e.plugins[c].id,message:o.reason instanceof Error?o.reason.message:String(o.reason)}]:[]),i=n.map((o,c)=>o.status==="fulfilled"?o.value:{id:e.plugins[c].id}),a=new Map(e.plugins.map(o=>[o.id,o.config??{}]));try{const o=new RH({plugins:i,product:e.product,startEntries:e.startEntries,...e.defaultStartEntry===void 0?{}:{defaultStartEntry:e.defaultStartEntry}},a);return{bootstrap:e,registry:o,failures:r}}catch(o){const c=o instanceof Error?o.message:String(o);throw new Error([c,...r.map(u=>u.message)].join(`
581
+ ${e.content??""}`,BOe=e=>{const t=e/1e3;if(t<60)return`${t.toLocaleString()} s`;const n=t/60;return n<60?`${n.toLocaleString()} min`:`${(n/60).toLocaleString()} h`},FOe=e=>/secret|token|password|credential|api.?key|authorization|cookie/i.test(e),rS=(e,t="")=>t&&FOe(t)?"[hidden]":Array.isArray(e)?e.map(n=>rS(n)):typeof e!="object"||e===null?e:Object.fromEntries(Object.entries(e).map(([n,r])=>[n,rS(r,n)])),GL=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),ho=e=>typeof e=="string"&&e.length>0,zOe=["id","owner","title","description","order","guide","tags","fixedStartOptions","action"],Na=e=>new Error(`The plugin configuration contains an invalid template: ${e}`),UOe=e=>{if(!GL(e))throw Na("not an object");if(!ho(e.id))throw Na("id is missing");const t=e.id;if(!ho(e.owner)||!ho(e.title)||!ho(e.description))throw Na(`${t}: owner, title and description are required`);if(e.order!==void 0&&typeof e.order!="number")throw Na(`${t}: order is not a number`);if(e.guide!==void 0&&!ho(e.guide))throw Na(`${t}: guide is empty`);if(e.tags!==void 0&&(!Array.isArray(e.tags)||e.tags.some(i=>!ho(i)||i!==i.trim())||new Set(e.tags).size!==e.tags.length))throw Na(`${t}: tags must be unique, non-empty keywords`);if(e.fixedStartOptions!==void 0&&(!GL(e.fixedStartOptions)||Object.keys(e.fixedStartOptions).length===0))throw Na(`${t}: fixedStartOptions must fix at least one start option`);const n={id:t,owner:e.owner,title:e.title,description:e.description,...e.order!==void 0?{order:e.order}:{},...e.guide!==void 0?{guide:e.guide}:{},...e.tags!==void 0?{tags:[...e.tags]}:{},...e.fixedStartOptions!==void 0?{fixedStartOptions:{...e.fixedStartOptions}}:{}},r=i=>{const a=Object.keys(e).filter(o=>!zOe.includes(o)&&!i.includes(o));if(a.length>0)throw Na(`${t}: unknown fields ${a.join(", ")}`)};switch(e.action){case"skill":{if(r(["skill","prompt","category"]),!ho(e.skill))throw Na(`${t}: skill is missing`);if(!ho(e.category)||!e.category.trim()||e.category!==e.category.trim())throw Na(`${t}: category must be a single non-empty text`);if(!ho(e.prompt)||!e.prompt.trim())throw Na(`${t}: prompt is missing or empty`);return{...n,action:"skill",skill:e.skill,category:e.category,prompt:e.prompt}}case"script":if(r(["coordinator","category"]),typeof e.coordinator!="boolean")throw Na(`${t}: coordinator must be true or false`);if(e.category!==void 0&&(!ho(e.category)||e.category!==e.category.trim()))throw Na(`${t}: category must be a single non-empty text`);return{...n,action:"script",coordinator:e.coordinator,...e.category!==void 0?{category:e.category}:{}};default:throw Na(`${t}: unknown action ${String(e.action)}; valid are skill and script`)}},HOe=e=>typeof e=="object"&&e!==null&&typeof e.id=="string",qOe=(e,t)=>{const n=t.webPlugin;if(!HOe(n))throw new Error(`The web entry of plugin ${e} does not export a webPlugin constant with a plugin id`);if(n.id!==e)throw new Error(`The bundle ${e} reports the different id ${n.id}`);return n},KL=(e,t,n)=>n.catch(r=>{throw new Error(`The web half of plugin ${e} does not load from ${t}: ${r instanceof Error?r.message:String(r)}`)}),VOe=async(e,t)=>{const n=e.web;if(!n)return{id:e.id};const[r]=await Promise.all([KL(e.id,n.entry,t.module(n.entry)),...n.css===void 0?[]:[KL(e.id,n.css,t.stylesheet(n.css))]]);return qOe(e.id,r)},GOe=async(e,t)=>{const n=await Promise.allSettled(e.plugins.map(o=>VOe(o,t))),r=n.flatMap((o,c)=>o.status==="rejected"?[{id:e.plugins[c].id,message:o.reason instanceof Error?o.reason.message:String(o.reason)}]:[]),i=n.map((o,c)=>o.status==="fulfilled"?o.value:{id:e.plugins[c].id}),a=new Map(e.plugins.map(o=>[o.id,o.config??{}]));try{const o=new RH({plugins:i,product:e.product,startEntries:e.startEntries,...e.defaultStartEntry===void 0?{}:{defaultStartEntry:e.defaultStartEntry}},a);return{bootstrap:e,registry:o,failures:r}}catch(o){const c=o instanceof Error?o.message:String(o);throw new Error([c,...r.map(u=>u.message)].join(`
582
582
  `),{cause:o})}},KOe=e=>_n(e)&&typeof e.entry=="string"&&e.entry.length>0&&(e.css===void 0||typeof e.css=="string"&&e.css.length>0)&&Object.keys(e).every(t=>t==="entry"||t==="css"),YOe=e=>{if(!_n(e)||!_n(e.product)||!Array.isArray(e.plugins)||!Array.isArray(e.startEntries)||e.defaultStartEntry!==void 0&&typeof e.defaultStartEntry!="string"||typeof e.product.id!="string"||!e.product.id||typeof e.product.title!="string"||!e.product.title)throw new Error("The plugin configuration does not match the expected format");const t=e.plugins.map(n=>{if(!_n(n)||typeof n.id!="string"||!n.id||n.web!==void 0&&!KOe(n.web)||n.config!==void 0&&!_n(n.config))throw new Error("The plugin configuration contains an invalid plugin descriptor");return{id:n.id,...n.web===void 0?{}:{web:n.web},config:n.config}});return{product:{id:e.product.id,title:e.product.title},plugins:t,startEntries:e.startEntries.map(UOe),...e.defaultStartEntry===void 0?{}:{defaultStartEntry:e.defaultStartEntry}}};function QLe(){const[e,t]=x.useState({status:"loading"});return x.useEffect(()=>{const n=new AbortController;return QOe(n.signal).then(r=>{n.signal.aborted||t(r)}).catch(r=>{n.signal.aborted||t({status:"failed",error:r instanceof Error?r.message:String(r)})}),()=>n.abort()},[]),e}const YL=new Map,WOe=e=>new Promise((t,n)=>{const r=document.createElement("link");r.rel="stylesheet",r.href=e,r.onload=()=>t(),r.onerror=()=>n(new Error(`the stylesheet ${e} is missing`)),document.head.append(r)}),XOe={module:e=>import(e),stylesheet:e=>{const t=YL.get(e)??WOe(e);return YL.set(e,t),t}},QOe=async e=>{const t=await ZOe(e);return{status:"ready",...await GOe(t,XOe)}},ZOe=async e=>YOe(await ur.call(Li.plugins.bootstrap,{},{signal:e}));function ZLe({failures:e}){return e.length===0?null:m.jsxs(Ju,{className:"flex-none rounded-none border-x-0 border-t-0","data-slot":"plugin-failures",variant:"destructive",children:[m.jsx(X6,{children:e.length===1?`The plugin ${e[0].id} failed to load`:`${e.length} plugins failed to load`}),m.jsx(ed,{children:e.map(t=>m.jsx("p",{children:t.message},t.id))})]})}const Gq="ragents.runReadRevisions:";function Kq(e){if(!e)return{};try{const t=JSON.parse(e);return _n(t)?Object.fromEntries(Object.entries(t).filter(([,n])=>Number.isSafeInteger(n)&&n>=0)):{}}catch{return{}}}const WL=$x({changeEvent:"ragents:run-read-revisions",matchesKey:e=>e.startsWith(Gq),parse:Kq,serialize:JSON.stringify});function JLe(e){const t=`${Gq}${encodeURIComponent(JSON.stringify(e??null))}`,n=WL.useValue(t),r=x.useCallback((i,a)=>{if(!Number.isSafeInteger(a)||a<0)return;const o=Kq(window.localStorage.getItem(t));a<=(o[i]??-1)||WL.save(t,{...o,[i]:a})},[t]);return{revisions:n,markViewed:r}}const JOe={Button:Er,Toggle:tg,Card:Gf,StopButton:bj,Popover:fA,PopoverContent:pA},eIe=e=>/^flow:(actor|input|turn|subscription|action|artifact)\/.+/.test(e);function e6e({children:e}){return m.jsx(G7,{allowUrl:eIe,components:JOe,children:e})}const Yq={"run.created":!0,"run.forked":!0,"run.primary-actor-selected":!0,"run.title-changed":!0,"agent.spawned":!0,"script.created":!0,"actor.input.enqueued":!0,"turn.started":!0,"turn.input-steered":!0,"turn.finished":!0,"turn.interrupted":!0,"model.input.presented":!0,"model.step.completed":!0,"model.tool-result.presented":!0,"context.compacted":!0,"model.output.completed":!0,"model.output.interrupted":!0,"model.reasoning.completed":!0,"runtime.output.recorded":!0,"tool.call.started":!0,"tool.call.source":!0,"tool.call.completed":!0,"tool.call.failed":!0,"actor.tools.opened":!0,"actor.stopped":!0,"actor.restarted":!0,"subscription.created":!0,"subscription.removed":!0,"subscription.failed":!0,"plugin.state-replaced":!0,"plugin.state-patched":!0,"action.proposed":!0,"action.resolved":!0,"artifact.published":!0},tIe=e=>typeof e=="string"&&Object.hasOwn(Yq,e),nIe=Object.freeze(Object.defineProperty({__proto__:null,eventTypeMap:Yq,isEventType:tIe},Symbol.toStringTag,{value:"Module"})),rIe="ragents.actor-programs",iIe="ragents.actor-programs.invocations",aIe="ragents.actor-programs.script",sIe="ragents.actor-state",oIe=(e,t)=>{const n=t.trim().toLowerCase(),r=e.flatMap(c=>c.views.map(u=>({program:c,view:u}))),i=r.filter(({program:c,view:u})=>[u.id,`${c.name}/${u.key}`,`@${c.actorHandle}/${u.key}`].some(d=>d.toLowerCase()===n)),a=i.length>0?i:r.filter(({view:c})=>c.title.toLowerCase()===n),o=c=>c.map(({program:u,view:d})=>`${u.name}/${d.key} (@${u.actorHandle}/${d.key})`).join(", ")||"none";if(a.length===0)throw new Error(`${t} is not an active actor view of this run. Activate the program first. Available: ${o(r)}`);if(a.length>1)throw new Error(`${t} is ambiguous. Use a unique name: ${o(a)}`);return a[0]},lf=Un({pattern:"^[A-Za-z0-9_-]{1,64}$",description:"Identifier of the run"}),p2=Un({pattern:"^[a-z][a-z0-9_-]{0,129}$",description:"Identifier of the actor view or the program"}),XL=Un({pattern:"^[a-z][a-z0-9-]{0,63}$",description:"Handle of the actor without @"}),QL=Un({pattern:"^[a-zA-Z][a-zA-Z0-9_-]{0,63}$",description:"Identifier of the function"}),ZL=Un({pattern:"^[A-Za-z0-9_-]{1,100}$",description:"Identifier of the function call"}),JL=Un({pattern:"^[a-f0-9]{64}$",description:"Revision of the active actor package"}),e6=Un({minLength:1,maxLength:200,description:"The caller's own identifier; repeated calls return the same call"}),t6=ba({description:"Input of the function according to its own schema"}),db=Ar("ActorFunctionInvocation"),lIe={apps:pn({id:"ragents.actor-programs.apps",description:"The actor views of a run with state and calls; the tool list stays empty without runs.inspect.",rights:["runs.read"],input:wt({runId:lf},{additionalProperties:!1}),result:wt({apps:na(Ar("ActorViewListing")),tools:na(Ar("ActorLocalTool"))},{additionalProperties:!1})}),source:pn({id:"ragents.actor-programs.source",description:"Read the source code of an actor program.",rights:["runs.read","runs.inspect"],input:wt({runId:lf,moduleId:p2},{additionalProperties:!1}),result:wt({files:na(wt({path:Un({minLength:1}),content:Un()},{additionalProperties:!1}))},{additionalProperties:!1})}),action:pn({id:"ragents.actor-programs.action",description:"Start a function of an actor view; the response is the queued call.",rights:["runs.read","runs.write"],input:wt({runId:lf,appId:p2,revision:JL,actionId:QL,requestId:e6,input:t6},{additionalProperties:!1}),result:db}),invocation:pn({id:"ragents.actor-programs.invocation",description:"Read the state of a call of an actor view.",rights:["runs.read"],input:wt({runId:lf,appId:p2,invocationId:ZL},{additionalProperties:!1}),result:db}),function:pn({id:"ragents.actor-programs.function",description:"Start a function of an actor independently of its views.",rights:["runs.read","runs.write","runs.inspect"],input:wt({runId:lf,actorHandle:XL,revision:JL,functionId:QL,requestId:e6,input:t6},{additionalProperties:!1}),result:db}),functionInvocation:pn({id:"ragents.actor-programs.function-invocation",description:"Read the state of a call of an actor function.",rights:["runs.read","runs.inspect"],input:wt({runId:lf,actorHandle:XL,invocationId:ZL},{additionalProperties:!1}),result:db})},cIe=Object.freeze(Object.defineProperty({__proto__:null,ACTOR_INVOCATIONS_STATE_ID:iIe,ACTOR_PROGRAMS_STATE_ID:rIe,ACTOR_SCRIPT_STATE_ID:aIe,ACTOR_STATE_ID:sIe,actorProgramContracts:lIe,resolveActorView:oIe},Symbol.toStringTag,{value:"Module"}));function n6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function nr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n6(Object(n),!0).forEach((function(r){iS(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n6(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function iS(e,t,n){return(t=(function(r){var i=(function(a,o){if(typeof a!="object"||a===null)return a;var c=a[Symbol.toPrimitive];if(c!==void 0){var u=c.call(a,o);if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(a)})(r,"string");return typeof i=="symbol"?i:String(i)})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hc(e,t){if(e==null)return{};var n,r,i=(function(o,c){if(o==null)return{};var u,d,p={},h=Object.keys(o);for(d=0;d<h.length;d++)u=h[d],c.indexOf(u)>=0||(p[u]=o[u]);return p})(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Mn(e,t){return Xq(e)||(function(n,r){var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var a,o,c,u,d=[],p=!0,h=!1;try{if(c=(i=i.call(n)).next,r===0){if(Object(i)!==i)return;p=!1}else for(;!(p=(a=c.call(i)).done)&&(d.push(a.value),d.length!==r);p=!0);}catch(y){h=!0,o=y}finally{try{if(!p&&i.return!=null&&(u=i.return(),Object(u)!==u))return}finally{if(h)throw o}}return d}})(e,t)||Ux(e,t)||Zq()}function Wq(e){return Xq(e)||Qq(e)||Ux(e)||Zq()}function Qa(e){return(function(t){if(Array.isArray(t))return aS(t)})(e)||Qq(e)||Ux(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
583
583
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Xq(e){if(Array.isArray(e))return e}function Qq(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ux(e,t){if(e){if(typeof e=="string")return aS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aS(e,t):void 0}}function aS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
584
584
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ok(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ux(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.