@ubean/devtools 0.6.1-beta.2 → 0.6.1-beta.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./index-
|
|
1
|
+
import{t as e}from"./index-CEsrKQJ2.js";var t=Symbol.for(`devframe:browser-agent-registry`),{tools:n,listeners:r}=globalThis[t]??={tools:new Map,listeners:new Set};function i(){return[...n.values()]}function a(e){return r.add(e),()=>r.delete(e)}var o=`devframe:client-id`,s;function c(t=globalThis.window){try{let n=t?.sessionStorage;if(n){let t=n.getItem(o);return t||(t=e(),n.setItem(o,t)),t}}catch{}return s??=e(),s}function l(e){e.client.register({name:`devframe:agent:invoke-client-tool`,type:`action`,jsonSerializable:!0,handler:async(e,t)=>{let n=i().find(t=>t.id===e);if(!n)throw Error(`[devframe/agent] browser tool "${e}" not found`);return await n.invoke(t)}});let t=!1,n=!1,r=0,o=()=>{t||n||(t=!0,queueMicrotask(async()=>{if(t=!1,n)return;let a=i().map(({invoke:e,...t})=>t);(a.length!==0||r!==0)&&(r=a.length,await e.callOptional(`devframe:agent:sync-client-tools`,c(),a).catch(()=>{}))}))},s=a(o),l=e.events.on(`connection:status`,e=>{e===`connected`&&o()});return o(),()=>{n=!0,s(),l()}}export{l as setupBrowserAgentRpcBridge};
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
`)}}function Ru(e,t,n={}){let{window:r=Ou,...i}=n,a,o=Nu(()=>r&&`ResizeObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=nr(U(()=>{let t=N(e);return Array.isArray(t)?t.map(e=>Au(e)):[Au(t)]}),e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t instanceof Element&&a.observe(t,i)}},{immediate:!0,flush:`post`}),l=()=>{s(),c()};return yu(l),{isSupported:o,stop:l}}function zu(e,t={width:0,height:0},n={}){let{window:r=Ou,box:i=`content-box`}=n,a=U(()=>{var t;return(t=Au(e))==null||(t=t.namespaceURI)==null?void 0:t.includes(`svg`)}),o=on(t.width),s=on(t.height),{stop:c}=Ru(e,([t])=>{let n=i===`border-box`?t.borderBoxSize:i===`content-box`?t.contentBoxSize:t.devicePixelContentBoxSize;if(r&&a.value){let t=Au(e);if(t){let e=t.getBoundingClientRect();o.value=e.width,s.value=e.height}}else if(n){let e=Cu(n);o.value=e.reduce((e,{inlineSize:t})=>e+t,0),s.value=e.reduce((e,{blockSize:t})=>e+t,0)}else o.value=t.contentRect.width,s.value=t.contentRect.height},n);Eu(()=>{let n=Au(e);if(n&&`offsetWidth`in n){if(i===`content-box`&&r){let e=r.getComputedStyle(n),t=Number.parseFloat(e.paddingLeft)+Number.parseFloat(e.paddingRight),i=Number.parseFloat(e.paddingTop)+Number.parseFloat(e.paddingBottom),a=Number.parseFloat(e.borderLeftWidth)+Number.parseFloat(e.borderRightWidth),c=Number.parseFloat(e.borderTopWidth)+Number.parseFloat(e.borderBottomWidth);o.value=n.offsetWidth-t-a,s.value=n.offsetHeight-i-c}else o.value=n.offsetWidth,s.value=n.offsetHeight}else n&&(o.value=t.width,s.value=t.height)});let l=nr(()=>Au(e),e=>{o.value=e?t.width:0,s.value=e?t.height:0});function u(){c(),l()}return{width:o,height:s,stop:u}}function Bu(e){return e==null}function Vu(e){return e instanceof Date}function Hu(e){return typeof e==`object`}function Uu(e){return!Bu(e)&&!Array.isArray(e)&&Hu(e)&&!Vu(e)}function Wu(e){return Object.keys(e)}function Gu(e,...t){let n={};for(let r of[e,...t])if(Uu(r))for(let e of Object.keys(r)){let t=r[e],i=n[e];i===void 0?n[e]=t:Uu(i)&&Uu(t)&&(n[e]=Gu(i,t))}return n}function Ku(e,t){let n={};for(let r in e){let i=r;t.includes(i)||(n[i]=e[i])}return n}function qu(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ju(e,t,n,r){let i=e();if(i!==void 0)return U({get:()=>e(),set:e=>{t?.(e)}});let a=on(i??n),o=!1;return nr(e,e=>{o||(e!==void 0||r)&&(o=!0,a.value=e,Fn(()=>{o=!1}))}),nr(a,e=>{!o&&(e!==void 0||r)&&t?.(e)}),a}var Yu=[],Xu;function Zu(e,t){tr(()=>{let n=N(e);if(!n)return;let r=Yu.length===0,i=Xu!==n;(r||i)&&(i&&Xu&&Xu.removeEventListener(`keydown`,Qu),Xu=n,n.addEventListener(`keydown`,Qu)),Yu.includes(t)||Yu.push(t),xn(()=>{Yu=Yu.filter(e=>e!==t),Yu.length===0&&(Xu?.removeEventListener(`keydown`,Qu),Xu=void 0)})})}function Qu(e){let t=e;if(t.key===`Escape`)for(let e of Yu.slice())e(t)}function $u(e,t,n){let r=n.originalEvent.target;if(!r)return;let i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(i)}var ed=`data-dismissable-layer`,td={layers:Kt(new Set),layersWithOutsidePointerEventsDisabled:Kt(new Set),branches:Kt(new Set)},nd;function rd(e,t={}){let{disableOutsidePointerEvents:n,enable:r=!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c}=t,l=()=>e.value?.ownerDocument??globalThis?.document,u=U(()=>e.value?Array.from(td.layers).indexOf(e.value):-1),d=U(()=>td.layersWithOutsidePointerEventsDisabled.size>0),f=U(()=>{let e=Array.from(td.layers),[t]=[...td.layersWithOutsidePointerEventsDisabled].slice(-1),n=t?e.indexOf(t):-1;return u.value>=n}),p=U(()=>{if(d.value)return f.value?`auto`:`none`}),{onPointerdownCapture:m}=id(e,e=>{if(!f.value)return;let t=e.target;[...td.branches].some(e=>e.contains(t))||(a?.(e),s?.(e),e.defaultPrevented||c?.())},r),{onFocusCapture:h,onBlurCapture:g}=ad(e,e=>{let t=e.target;[...td.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},r);return Zu(l,e=>{u.value===td.layers.size-1&&(i?.(e),e.defaultPrevented||(e.preventDefault(),c?.()))}),nr([e,()=>N(r)&&N(n)],([e,t],n,r)=>{if(!e)return;let i=l();t&&(td.layersWithOutsidePointerEventsDisabled.size===0&&(nd=i.body.style.pointerEvents,i.body.style.pointerEvents=`none`),td.layersWithOutsidePointerEventsDisabled.add(e),r(()=>{td.layersWithOutsidePointerEventsDisabled.delete(e),td.layersWithOutsidePointerEventsDisabled.size===0&&(nd?i.body.style.pointerEvents=nd:i.body.style.removeProperty(`pointer-events`))}))},{immediate:!0}),nr(e,(e,t,n)=>{e&&(td.layers.add(e),n(()=>{td.layers.delete(e)}))},{immediate:!0}),{pointerEvents:p,onPointerdownCapture:m,onFocusCapture:h,onBlurCapture:g}}function id(e,t,n=!0){let r=!1,i=()=>{};return er(()=>{if(!Gl||!N(n)||!e.value)return;let a=e.value.ownerDocument;async function o(n){if(!e.value)return;let o=n.target;if(r=od(e.value,o),o&&!r){let e={originalEvent:n};function r(){$u(`dismissableLayer.pointerDownOutside`,t,e)}n.pointerType===`touch`?(a.removeEventListener(`click`,i),i=r,a.addEventListener(`click`,i,{once:!0})):r()}else a.removeEventListener(`click`,i);r=!1}let s=window.setTimeout(()=>{a.addEventListener(`pointerdown`,o)},0);xn(()=>{window.clearTimeout(s),a.removeEventListener(`pointerdown`,o),a.removeEventListener(`click`,i)})}),{onPointerdownCapture:()=>{N(n)&&(r=!0)}}}function ad(e,t,n=!0){let r=!1,i=n=>{if(!e.value||r)return;let i=n.target;i instanceof HTMLElement&&(r=od(e.value,i),r||$u(`dismissableLayer.focusOutside`,t,{originalEvent:n}))};return er(()=>{if(!Gl||!N(n)||!e.value)return;let t=e.value.ownerDocument;t.addEventListener(`focusin`,i),xn(()=>{t.removeEventListener(`focusin`,i)})}),{onFocusCapture:()=>{N(n)&&(r=!0)},onBlurCapture:()=>{N(n)&&(r=!1)}}}function od(e,t){if(!e)return!1;if(e.contains(t))return!0;let n=sd(e),r=t.closest(`[${ed}]`);if(!n||!r)return!1;if(n===r)return!0;let i=Array.from(td.layers).map(sd),a=i.indexOf(n),o=i.indexOf(r);if(a!==-1&&o!==-1)return a<o;let s=Array.from(n.ownerDocument.querySelectorAll(`[${ed}]`));return s.indexOf(n)<s.indexOf(r)}function sd(e){return e.hasAttribute(ed)?e:e.querySelector(`[${ed}]`)}var cd=0,ld=`data-vean-focus-guard`;function ud(e=!0){tr(()=>{if(!Gl||!N(e))return;let t=document.querySelectorAll(`[${ld}]`);if(cd===0||t.length===0){let e=t[0]??dd(),n=t[1]??dd();e.parentNode||document.body.insertAdjacentElement(`afterbegin`,e),n.parentNode||document.body.insertAdjacentElement(`beforeend`,n)}cd++,xn(()=>{cd--,cd===0&&document.querySelectorAll(`[${ld}]`).forEach(e=>e.remove())})})}function dd(){let e=document.createElement(`span`);return e.setAttribute(ld,``),e.tabIndex=0,Object.assign(e.style,{outline:`none`,opacity:`0`,position:`fixed`,pointerEvents:`none`}),e}function fd(e,{select:t=!1}={}){let n=vu();for(let r of e)if(vd(r,{select:t}),vu()!==n)return}function pd(e){let t=md(e);return[hd(t,e),hd(t.slice().reverse(),e)]}function md(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function hd(e,t){return e.find(e=>!gd(e,{upTo:t}))}function gd(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;let n=e;for(;n;){if(t!==void 0&&n===t)return!1;if(getComputedStyle(n).display===`none`)return!0;n=n.parentElement}return!1}function _d(e){return e instanceof HTMLInputElement&&`select`in e}function vd(e,{select:t=!1}={}){if(!e||!e.focus)return;let n=vu();e.focus({preventScroll:!0}),t&&e!==n&&_d(e)&&e.select()}var yd=`focusScope.autoFocusOnOpen`,bd=`focusScope.autoFocusOnClose`,xd={bubbles:!1,cancelable:!0},Sd=wd();function Cd(e,t){let{loop:n,trapped:r,onOpenAutoFocus:i,onCloseAutoFocus:a}=t||{},o,s={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}};if(Gl){function t(t){if(s.paused||!e.value)return;let n=t.target;e.value.contains(n)?o=n:vd(o,{select:!0})}function n(t){if(s.paused||!e.value)return;let n=t.relatedTarget;n!==null&&(e.value.contains(n)||vd(o,{select:!0}))}function c(){e.value?.contains(o)||vd(e.value)}er(()=>{if(!N(r))return;document.addEventListener(`focusin`,t),document.addEventListener(`focusout`,n);let i=new MutationObserver(c);e.value&&i.observe(e.value,{childList:!0,subtree:!0}),xn(()=>{document.removeEventListener(`focusin`,t),document.removeEventListener(`focusout`,n),i.disconnect()})}),nr(e,(e,t,n)=>{if(!e)return;Sd.add(s);let r=vu(),o=e.contains(r);if(i&&e.addEventListener(yd,i),a&&e.addEventListener(bd,a),!o){let t=new CustomEvent(yd,xd);e.dispatchEvent(t),t.defaultPrevented||(fd(_u(md(e)),{select:!0}),vu()===r&&vd(e))}n(()=>{i&&e.removeEventListener(yd,i);let t=new CustomEvent(bd,xd);e.dispatchEvent(t),window.setTimeout(()=>{t.defaultPrevented||vd(r??document.body,{select:!0}),a&&e.removeEventListener(bd,a),Sd.remove(s)},0)})})}function c(e){let t=N(n),i=N(r);if(!t&&!i||s.paused)return;let a=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=vu();if(!a||!o)return;let c=e.currentTarget,[l,u]=pd(c);l&&u?!e.shiftKey&&o===u?(e.preventDefault(),t&&vd(l,{select:!0})):e.shiftKey&&o===l&&(e.preventDefault(),t&&vd(u,{select:!0})):o===c&&e.preventDefault()}return{onKeydown:c}}function wd(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=qu(e,t),e.unshift(t)},remove(t){e=qu(e,t),e[0]?.resume()}}}function Td(e){let t=ro()?.type?.emits||[],n={};return t.forEach(t=>{n[t]=(...n)=>{e(t,...n)}}),n}function Ed(e){return e.filter(e=>!Bu(e))}var Dd={inert:new WeakMap,"aria-hidden":new WeakMap},Od={inert:new WeakSet,"aria-hidden":new WeakSet},kd=new WeakMap,Ad=0;function jd(e){return typeof ShadowRoot<`u`&&e instanceof ShadowRoot}function Md(e){return(e.nodeName??``).toLowerCase()}function Nd(e){return e?jd(e)?e.host:Nd(e.parentNode):null}function Pd(e,t){return t.map(t=>{if(e.contains(t))return t;let n=Nd(t);return e.contains(n)?n:null}).filter(e=>e!==null)}function Fd(e){let t=new Set;for(let n of e){let e=n;for(;e&&!t.has(e);)t.add(e),e=e.parentNode}return t}function Id(e,t){let n=[];return(e=>{if(e)for(let r of Array.from(e.children))Md(r)!==`script`&&(t.has(r)||n.push(r))})(e),n}function Ld(e,t,n){let r=Dd[t],i=Od[t],a=[],o=Pd(e,Array.from(e.querySelectorAll(`[aria-live]`))),s=[...n,...o];for(let n of Id(e,Fd(s))){let e=n.getAttribute(t),o=e!==null&&e!==`false`,s=(r.get(n)??0)+1;r.set(n,s),a.push(n),s===1&&o&&i.add(n),o||n.setAttribute(t,t===`inert`?``:`true`)}return{hiddenElements:a,uncontrolledElementsSet:i}}function Rd(e,t){let n=[];for(let r of Id(e,Fd(t))){let e=(kd.get(r)??0)+1;kd.set(r,e),n.push(r),e===1&&r.setAttribute(Bl,``)}return n}function zd(e,t,n,r){return()=>{if(e){let r=Dd[e];for(let i of t){let t=(r.get(i)??0)-1;r.set(i,t),t===0&&(n&&!n.has(i)&&i.removeAttribute(e),n?.delete(i))}}for(let e of r){let t=(kd.get(e)??0)-1;kd.set(e,t),t===0&&e.removeAttribute(Bl)}--Ad,Ad===0&&(Dd.inert=new WeakMap,Dd[`aria-hidden`]=new WeakMap,Od.inert=new WeakSet,Od[`aria-hidden`]=new WeakSet,kd=new WeakMap)}}function Bd(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0}=t;if(!Gl||e.length===0)return()=>{};let a=e[0].ownerDocument.body,o=Pd(a,e),s=r?`inert`:n?`aria-hidden`:null;Ad+=1;let c=[],l=null;if(s){let e=Ld(a,s,o);c=e.hiddenElements,l=e.uncontrolledElementsSet}let u=i?Rd(a,o):[];return zd(s,c,l,u)}function Vd(e,t=!0,n={}){tr(()=>{if(!Gl)return;let r=N(e),i=Ed(Array.isArray(r)?r:[r]);if(i.length===0||i.some(e=>e.closest(`[popover]:not(:popover-open)`))||!N(t))return;let{inert:a,ariaHidden:o,...s}=n,c=Bd(i,{...s,inert:a??Yl(),ariaHidden:o??!Yl()});xn(()=>{c()})})}function Hd(e){let{modal:t,triggerElement:n,swallowTriggerPointerDown:r}=e,i=!1,a=!1;return{onFocusOutside:e=>{t.value&&e.preventDefault()},onInteractOutside:e=>{if(t.value===!0)return;e.defaultPrevented||(i=!0,e.detail.originalEvent.type===`pointerdown`&&(a=!0));let o=e.target;N(r??!0)&&n.value?.contains(o)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&a&&e.preventDefault()},onCloseAutoFocus:e=>{if(t.value){e.defaultPrevented||(e.preventDefault(),n.value?.focus());return}e.defaultPrevented||(i||n.value?.focus(),e.preventDefault()),i=!1,a=!1}}}function Ud(e,t){let n=on(e);function r(e){return t[n.value][e]??n.value}function i(e){n.value=r(e)}return[n,i]}function Wd(e,t,n){let r={},i=`none`,[a,o]=Ud(N(t)?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),s=U(()=>[`mounted`,`unmountSuspended`].includes(a.value)),c=t=>{if(t.target!==e.value)return;let n=Gd(r);if(n.includes(CSS.escape(t.animationName))){o(`ANIMATION_END`);return}n===`none`&&o(`ANIMATION_END`)},l=t=>{t.target===e.value&&(i=Gd(r))};return tr(()=>{let e=Gd(r);i=a.value===`mounted`?e:`none`}),tr(()=>{let e=N(t);n?.(!!e);let a=Gd(r);e?o(`MOUNT`):a===`none`||r?.display===`none`?o(`UNMOUNT`):o(i===a?`UNMOUNT`:`ANIMATION_OUT`)}),tr(()=>{let t=e.value;t?(r=getComputedStyle(t),t.addEventListener(`animationstart`,l),t.addEventListener(`animationcancel`,c),t.addEventListener(`animationend`,c),xn(()=>{t.removeEventListener(`animationstart`,l),t.removeEventListener(`animationcancel`,c),t.removeEventListener(`animationend`,c)})):o(`ANIMATION_END`)}),s}function Gd(e){return e?.animationName||`none`}function Kd(e,t,...n){return U(()=>({...Ku(e,t),...qd(...n)}))}function qd(...e){return e.length===0?{}:e.map(e=>N(e)||{}).reduce((e,t)=>({...e,...t}),{})}var Jd={name:`English`,key:`en`,dir:`ltr`,messages:{pagination:{firstPage:`First page`,prevPage:`Previous page`,nextPage:`Next page`,lastPage:`Last page`,pageLabel:`Page {value}`},pageTabs:{closeTab:`Close tab`,pinTab:`Pin tab`,unpinTab:`Unpin tab`},table:{emptyTitle:`No data`,emptyDescription:`There is no data to display.`,selectAllRows:`Select all rows`,sortByColumn:`Sort by {column}`,sortByColumnAsc:`Sort by {column}, currently ascending`,sortByColumnDesc:`Sort by {column}, currently descending`,resizeColumn:`Resize {column} column`,expandRow:`Expand row {row}`,collapseRow:`Collapse row {row}`,selectRow:`Select row {row}`,filterSelected:`{count} selected`,filterKeywordActive:`Keyword active`,filterOptionsCount:`{count} options`,filterNoOptions:`No filter options`,filterEdit:`Edit filter for {column}`,filter:`Filter {column}`,filterSearch:`Search filter options for {column}`,filterNoMatching:`No matching options`,filterClear:`Clear`,filterSelect:`Select {label}`,filterSearchPlaceholder:`Search {column}`},calendar:{prevPage:`Previous page`,nextPage:`Next page`,selectMonth:`Select month`,selectYear:`Select year`},datePicker:{toggle:`Open calendar`,popupLabel:`Choose date`},dateRangePicker:{toggle:`Open calendar`,popupLabel:`Choose date range`},carousel:{previous:`Previous slide`,next:`Next slide`,ariaLabel:`Carousel`},cascader:{clear:`Clear value`,noResults:`No data`,removeTag:`Remove {label}`,search:`Search`},clipboard:{copy:`Copy`,copied:`Copied`},layout:{toggleSidebar:`Toggle Sidebar`},input:{clear:`Clear input`},inputNumber:{increment:`Increase`,decrement:`Decrease`,clear:`Clear value`},textarea:{clear:`Clear textarea`},tag:{remove:`Remove {label}`},tagsInput:{addTag:`Add tag`,clear:`Clear tags`},treeMenu:{openActions:`Open {label} actions`},progress:{ariaLabel:`Progress`,loading:`Loading`},alert:{close:`Close alert`},anchor:{nav:`Anchor`},breadcrumb:{nav:`breadcrumb`},stepper:{step:`Step {step}`,ariaLabel:`Step-by-step progress`,stepOf:`Step {current} of {total}`},editable:{cancel:`Cancel`,edit:`Edit`,submit:`Submit`},combobox:{clear:`Clear value`,clearInput:`Clear input`,noResults:`No results found.`,search:`Search`,options:`Options`},autocomplete:{toggleSuggestions:`Toggle suggestions`,clearInput:`Clear input`,noResults:`No results found.`,options:`Options`},command:{noResults:`No results found.`},select:{clear:`Clear value`},dialog:{cancel:`Cancel`,confirm:`Confirm`,fullscreen:`Fullscreen`,exitFullscreen:`Exit fullscreen`,close:`Close`},rating:{ariaLabel:`Rating`,starN:`{count} of {max} stars`,empty:`No rating`},slider:{valueN:`Value {index} of {total}`,minimum:`Minimum`,maximum:`Maximum`},password:{clearInput:`Clear input`,showPassword:`Show password`,hidePassword:`Hide password`},date:{daySegment:`day,`,monthSegment:`month, `,yearSegment:`year, `,hourSegment:`hour, `,minuteSegment:`minute, `,secondSegment:`second, `,dayPeriodSegment:`AM/PM, `,timeZoneSegment:`time zone, `,empty:`Empty`,placeholder:{year:`yyyy`,month:`mm`,day:`dd`,time:`––`}}}},Yd={name:`简体中文`,key:`zh-CN`,dir:`ltr`,messages:{pagination:{firstPage:`第一页`,prevPage:`上一页`,nextPage:`下一页`,lastPage:`最后一页`,pageLabel:`第 {value} 页`},pageTabs:{closeTab:`关闭标签页`,pinTab:`固定标签页`,unpinTab:`取消固定标签页`},table:{emptyTitle:`暂无数据`,emptyDescription:`当前没有可显示的数据。`,selectAllRows:`全选`,sortByColumn:`按{column}排序`,sortByColumnAsc:`按{column}排序,当前升序`,sortByColumnDesc:`按{column}排序,当前降序`,resizeColumn:`调整{column}列宽`,expandRow:`展开行 {row}`,collapseRow:`收起行 {row}`,selectRow:`选择行 {row}`,filterSelected:`已选 {count} 项`,filterKeywordActive:`关键字筛选生效`,filterOptionsCount:`{count} 个选项`,filterNoOptions:`无筛选项`,filterEdit:`编辑「{column}」筛选`,filter:`筛选「{column}」`,filterSearch:`搜索「{column}」的筛选选项`,filterNoMatching:`无匹配选项`,filterClear:`清除`,filterSelect:`选择 {label}`,filterSearchPlaceholder:`搜索 {column}`},calendar:{prevPage:`上一页`,nextPage:`下一页`,selectMonth:`选择月份`,selectYear:`选择年份`},datePicker:{toggle:`打开日历`,popupLabel:`选择日期`},dateRangePicker:{toggle:`打开日历`,popupLabel:`选择日期范围`},carousel:{previous:`上一张幻灯片`,next:`下一张幻灯片`,ariaLabel:`轮播图`},cascader:{clear:`清除`,noResults:`暂无数据`,removeTag:`移除 {label}`,search:`搜索`},clipboard:{copy:`复制`,copied:`已复制`},layout:{toggleSidebar:`切换侧边栏`},input:{clear:`清除输入`},inputNumber:{increment:`增加`,decrement:`减少`,clear:`清除数值`},textarea:{clear:`清除文本域`},tag:{remove:`移除 {label}`},tagsInput:{addTag:`添加标签`,clear:`清除标签`},treeMenu:{openActions:`打开 {label} 的操作`},progress:{ariaLabel:`进度`,loading:`加载中`},alert:{close:`关闭提示`},anchor:{nav:`锚点导航`},breadcrumb:{nav:`面包屑`},stepper:{step:`第 {step} 步`,ariaLabel:`分步进度`,stepOf:`第 {current} 步,共 {total} 步`},editable:{cancel:`取消`,edit:`编辑`,submit:`提交`},combobox:{clear:`清除`,clearInput:`清除输入`,noResults:`无匹配结果。`,search:`搜索`,options:`选项`},autocomplete:{toggleSuggestions:`切换建议列表`,clearInput:`清除输入`,noResults:`无匹配结果。`,options:`选项`},command:{noResults:`无匹配结果。`},select:{clear:`清除`},dialog:{cancel:`取消`,confirm:`确认`,fullscreen:`全屏`,exitFullscreen:`退出全屏`,close:`关闭`},rating:{ariaLabel:`评分`,starN:`{count}/{max} 星`,empty:`未评分`},slider:{valueN:`第 {index} 个值,共 {total} 个`,minimum:`最小值`,maximum:`最大值`},password:{clearInput:`清除输入`,showPassword:`显示密码`,hidePassword:`隐藏密码`},date:{daySegment:`日,`,monthSegment:`月, `,yearSegment:`年, `,hourSegment:`时, `,minuteSegment:`分, `,secondSegment:`秒, `,dayPeriodSegment:`上午/下午, `,timeZoneSegment:`时区, `,empty:`空`,placeholder:{year:`年`,month:`月`,day:`日`,time:`––`}}}},Xd={[Jd.key]:Jd,[Yd.key]:Yd};function Zd(e){return e?Xd[e]??Jd:Jd}function Qd(e){return Zd(e).messages}var $d=new Set([`ar`,`he`,`fa`,`ur`,`yi`,`ps`,`sd`,`ug`,`ku`,`dv`]);function ef(e){if(!e)return`ltr`;let t=Xd[e]?.dir;if(t)return t;let n=e.split(`-`)[0]?.toLowerCase();return n&&$d.has(n)?`rtl`:`ltr`}var[tf,nf]=Wl({name:`ConfigProvider`,key:Vl});function rf(e){let t=Zn(Vl);return U(()=>N(e)||t?.dir||ef(t?.locale)||`ltr`)}function af(e,t=e=>e){let[n,r]=Wl(e,t);return[n,e=>{let t=r();return U(e?()=>t?.value?.[e]:()=>t?.value??{})}]}var of=P((e,{slots:t,attrs:n})=>()=>{if(!t.default)return null;let e=pu(t.default());if(!e?.length)return null;let r=e.find(e=>e.type!==Na);return r?qa(r,n,!0):null},{name:`Slot`}),sf=new Set([`area`,`input`,`img`]),cf=P((e,{slots:t,attrs:n})=>{let r=e.asChild?`template`:e.as;return typeof r==`string`&&sf.has(r)?()=>bo(r,n):r===`template`?()=>bo(of,n,{default:t.default}):()=>bo(e.as||`div`,n,{default:t.default})},{name:`Primitive`,inheritAttrs:!1,props:[`as`,`asChild`]});function lf(e){return e?`open`:`closed`}function uf(e,t=-1/0,n=1/0){return Math.min(n,Math.max(t,e))}var df=P({name:`Portal`,__name:`portal`,props:{to:{default:`body`},disabled:{type:Boolean},defer:{type:Boolean},forceMount:{type:Boolean}},setup(e){let t=on(!1);return Zr(()=>{t.value=!0}),(n,r)=>t.value||e.forceMount?(I(),R(_r,{key:0,to:e.to,disabled:e.disabled,defer:e.defer},[pi(n.$slots,`default`)],8,[`to`,`disabled`,`defer`])):H(`v-if`,!0)}}),ff=P({name:`Icon`,__name:`icon`,props:{icon:{}},setup(e){let t=e,n=Zn(Vl,{}),r=U(()=>n?.iconRender?.(t.icon));return(e,t)=>r.value?(I(),R(ci(r.value),{key:0})):H(`v-if`,!0)}}),pf={grad:360/400,turn:360,rad:360/(Math.PI*2)},mf={x:.95047,y:1,z:1.08883},hf={x:.96422,y:1,z:.82521},gf=e=>typeof e==`string`?e.length>0:typeof e==`number`,_f=(e,t=0)=>{let n=10**t;return Math.round(n*e)/n+0},vf=(e,t=0,n=1)=>e>n?n:e<t?t:e,yf=e=>{let t=Number.isFinite(e)?e%360:0;return t>0?t:t+360},bf=(e,t=`deg`)=>Number.parseFloat(e)*(pf[t]||1);function xf(e,t){return[e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2]]}function Sf(e){if(!e)return 1;let t=Number.parseFloat(e);return e.endsWith(`%`)&&(t/=100),t}function Cf(e){let t=Number.parseFloat(e);return e.endsWith(`%`)||t>1?vf(t/100):vf(t)}var wf=[[.4122214708,.5363325363,.0514459929],[.2119034982,.6806995451,.1073969566],[.0883024619,.2817188376,.6299787005]],Tf=[[4.076741661347993,-3.3077115904081937,.2309699287294278],[-1.2684380040921763,2.609757400663372,-.3413193963102196],[-.0041960865418371,-.7034186144594495,1.7076147009309446]],Ef=[[.2104542553,.793617785,-.0040720468],[1.9779984951,-2.428592205,.4505937099],[.0259040371,.7827717662,-.808675766]],Df=[[.9999999984505198,.3963377921737678,.2158037580607588],[1.0000000088817607,-.1055613423236563,-.0638541747717059],[1.0000000546724108,-.0894841820949657,-1.2914855378640917]],Of=[[.4124564391,.3575760776,.1804374833],[.2126728514,.7151521552,.0721749934],[.0193338956,.1191920259,.9503040785]],kf=[[3.2404541621,-1.5371385127,-.4985314095],[-.9692660305,1.8760108454,.0415560175],[.055643431,-.2040259135,1.0572251882]],Af=[[1.0478112,.0228866,-.050127],[.0295424,.9904844,-.0170491],[-.0092345,.0150436,.7521316]],jf=[[.9555766,-.0230393,.0631636],[-.0282895,1.0099416,.0210077],[.0122982,-.020483,1.3299098]],Mf=e=>{let{r:t,g:n,b:r,alpha:i}=e;return{r:vf(t,0,255),g:vf(n,0,255),b:vf(r,0,255),alpha:vf(i)}},Nf=e=>{let{r:t,g:n,b:r,alpha:i}=e;return{r:_f(t,2),g:_f(n,2),b:_f(r,2),alpha:_f(i,3)}},Pf=e=>{let{r:t,g:n,b:r,alpha:i}=e;return{r:vf(t),g:vf(n),b:vf(r),alpha:vf(i)}},Ff=({r:e,g:t,b:n,alpha:r=1})=>!gf(e)||!gf(t)||!gf(n)?null:Mf({r:Number(e),g:Number(t),b:Number(n),alpha:Number(r)}),If=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4};function Lf(e){return(e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055)*255}function Rf(e){return{r:If(e.r),g:If(e.g),b:If(e.b),alpha:e.alpha}}function zf(e){return{r:Lf(e.r),g:Lf(e.g),b:Lf(e.b),alpha:e.alpha}}var Bf=/^rgb?\(\s*([\d.]+%?)\s*[, ]\s*([\d.]+%?)\s*[, ]\s*([\d.]+%?)(?:\s*[,/]\s*([\d.]+%?))?\s*\)$/i,Vf=e=>{let t=Bf.exec(e);if(!t)return null;let[n,r,i,a,o]=t;return Mf({r:Hf(r),g:Hf(i),b:Hf(a),alpha:Sf(o)})};function Hf(e){if(e.endsWith(`%`)){let t=Number.parseFloat(e.slice(0,-1));return Math.round(t/100*255)}return Number.parseFloat(e)}var Uf=e=>{let{r:t,g:n,b:r,alpha:i}=Nf(e);return i<1?`rgb(${t} ${n} ${r} / ${i})`:`rgb(${t} ${n} ${r})`},Wf=e=>({h:yf(e.h),s:vf(e.s,0,100),v:vf(e.v,0,100),alpha:vf(e.alpha)}),Gf=e=>({h:_f(e.h,3),s:_f(e.s,3),v:_f(e.v,3),alpha:_f(e.alpha,3)}),Kf=e=>{let t=e.h/360*6,n=e.s/100,r=e.v/100,i=Math.floor(t),a=r*(1-n),o=r*(1-(t-i)*n),s=r*(1-(1-t+i)*n),c=i%6;return{r:[r,o,a,a,s,r][c]*255,g:[s,r,r,o,a,a][c]*255,b:[a,a,s,r,r,o][c]*255,alpha:e.alpha}},qf=({h:e,s:t,v:n,alpha:r=1})=>!gf(e)||!gf(t)||!gf(n)?null:Kf(Wf({h:Number(e),s:Number(t),v:Number(n),alpha:Number(r)})),Jf=({r:e,g:t,b:n,alpha:r})=>{let i=Math.max(e,t,n),a=i-Math.min(e,t,n),o=0;return a&&(o=i===e?(t-n)/a:i===t?2+(n-e)/a:4+(e-t)/a),{h:60*(o<0?o+6:o),s:i?a/i*100:0,v:i/255*100,alpha:r}},Yf=e=>{let{x:t,y:n,z:r,alpha:i}=e;return{x:vf(t,0,mf.x*1.2),y:vf(n,0,mf.y*1.2),z:vf(r,0,mf.z*1.2),alpha:vf(i)}},Xf=e=>{let{x:t,y:n,z:r,alpha:i}=e,[a,o,s]=xf(kf,[t,n,r]);return Mf(zf({r:a,g:o,b:s,alpha:i}))},Zf=e=>{let{r:t,g:n,b:r,alpha:i}=Rf(e),[a,o,s]=xf(Of,[t,n,r]);return Yf({x:a,y:o,z:s,alpha:i})},Qf=216/24389,$f=24389/27,ep=e=>{let{l:t,a:n,b:r,alpha:i}=e;return{l:vf(t,0,100),a:vf(n,-160,160),b:vf(r,-160,160),alpha:vf(i)}},tp=e=>{let{l:t,a:n,b:r,alpha:i}=e;return{l:_f(t,3),a:_f(n,3),b:_f(r,3),alpha:_f(i,3)}},np=e=>{let t=Zf(e),{alpha:n}=t,[r,i,a]=xf(Af,[t.x,t.y,t.z]);return sp({x:r,y:i,z:a,alpha:n})},rp=e=>{let t=cp(e),[n,r,i]=xf(jf,[t.x,t.y,t.z]);return Xf({x:n,y:r,z:i,alpha:e.alpha})},ip=(e,t=.01)=>e.r>=-t&&e.r<=255+t&&e.g>=-t&&e.g<=255+t&&e.b>=-t&&e.b<=255+t,ap=(e,t,n)=>{let r=0,i=150;if(ip(rp({l:e,a:i*Math.cos(t),b:i*Math.sin(t),alpha:n})))return i;for(;i-r>.01;){let a=(r+i)/2;ip(rp({l:e,a:a*Math.cos(t),b:a*Math.sin(t),alpha:n}))?r=a:i=a}return r},op=e=>{let{l:t,a:n,b:r,alpha:i}=e,a=rp(e);if(!ip(a)&&Math.sqrt(n*n+r*r)>1e-4){let e=Math.atan2(r,n),o=ap(t,e,i);a=rp({l:t,a:o*Math.cos(e),b:o*Math.sin(e),alpha:i})}return Mf(a)};function sp(e){let{x:t,y:n,z:r,alpha:i}=e,a=t/hf.x,o=n/hf.y,s=r/hf.z,c=e=>e>Qf?Math.cbrt(e):($f*e+16)/116,l=c(a),u=c(o),d=c(s);return{l:116*u-16,a:500*(l-u),b:200*(u-d),alpha:i}}function cp(e){let{l:t,a:n,b:r,alpha:i}=e,a=(t+16)/116,o=n/500+a,s=a-r/200,c=e=>e*e*e>Qf?e*e*e:(116*e-16)/$f,l=c(o),u=t>$f*Qf?((t+16)/116)**3:t/$f,d=c(s);return{x:l*hf.x,y:u*hf.y,z:d*hf.z,alpha:i}}var lp=({l:e,a:t,b:n,alpha:r=1})=>!gf(e)||!gf(t)||!gf(n)?null:ep({l:Number(e),a:Number(t),b:Number(n),alpha:Number(r)}),up=e=>{let t=lp(e);return t?op(t):null},dp=/^lab\(\s*([+-]?[\d.]+)%?\s+([+-]?[\d.]+)\s+([+-]?[\d.]+)(?:\s*\/\s*([+-]?[\d.]+%?))?\s*\)$/i,fp=e=>{let t=dp.exec(e);if(!t)return null;let[n,r,i,a,o]=t;return ep({l:Number.parseFloat(r),a:Number.parseFloat(i),b:Number.parseFloat(a),alpha:Sf(o)})},pp=e=>{let t=fp(e);return t?op(t):null},mp=e=>{let{l:t,a:n,b:r,alpha:i}=tp(e);return i<1?`lab(${t}% ${n} ${r} / ${i})`:`lab(${t}% ${n} ${r})`},hp=e=>mp(np(e)),gp=e=>{if(!e||e.format!==`lab`)return null;let{input:t}=e;return typeof t==`string`?fp(t):typeof t==`object`?lp(t):null},_p=e=>{let t=gp(e);return t?mp(t):null},vp=e=>{let{h:t,s:n,l:r,alpha:i}=e;return{h:yf(t),s:vf(n,0,100),l:vf(r,0,100),alpha:vf(i)}},yp=e=>{let{h:t,s:n,l:r,alpha:i}=e;return{h:_f(t,3),s:_f(n,3),l:_f(r,3),alpha:_f(i,3)}},bp=e=>{let{h:t,l:n,alpha:r}=e,i=e.s*(n<50?n:100-n)/100;return{h:t,s:i>0?2*i/(n+i)*100:0,v:n+i,alpha:r}},xp=({h:e,s:t,v:n,alpha:r})=>{let i=(200-t)*n/100;return{h:e,s:i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0,l:i/2,alpha:r}},Sp=e=>Kf(bp(e)),Cp=e=>xp(Jf(e)),wp=({h:e,s:t,l:n,alpha:r=1})=>!gf(e)||!gf(t)||!gf(n)?null:Sp(vp({h:Number(e),s:Number(t),l:Number(n),alpha:Number(r)})),Tp=e=>{let{h:t,s:n,l:r,alpha:i}=yp(Cp(e));return i<1?`hsl(${t} ${n}% ${r}% / ${i})`:`hsl(${t} ${n}% ${r}%)`},Ep=/^hsl?\(\s*([+-]?[\d.]+)(deg|grad|rad|turn)?\s*[, ]\s*([+-]?[\d.]+)%\s*[, ]\s*([+-]?[\d.]+)%(?:\s*\/\s*([+-]?[\d.]+%?))?\s*\)$/i,Dp=e=>{let t=Ep.exec(e);if(!t)return null;let[,n,r,i,a,o]=t;return Sp(vp({h:bf(n,r),s:Number.parseFloat(i),l:Number.parseFloat(a),alpha:Sf(o)}))},Op=(e,t)=>({r:e.r,g:e.g,b:e.b,alpha:t}),kp=e=>({r:255-e.r,g:255-e.g,b:255-e.b,alpha:e.alpha}),Ap=(e,t)=>{let n=Cp(e);return{h:n.h,s:n.s,l:vf(n.l+t*100,0,100),alpha:n.alpha}},jp=(e,t)=>{let{h:n,s:r,l:i,alpha:a}=Cp(e);return{h:n,s:vf(r+t*100,0,100),l:i,alpha:a}},Mp=e=>(e.r*299+e.g*587+e.b*114)/1e3/255;function Np(e,t){let{l:n,a:r,b:i}=e,{l:a,a:o,b:s}=t,c=180/Math.PI,l=Math.PI/180,u=((r**2+i**2)**.5+(o**2+s**2)**.5)/2,d=(n+a)/2,f=u**7,p=.5*(1-(f/(f+25**7))**.5),m=r*(1+p),h=o*(1+p),g=(m**2+i**2)**.5,_=(h**2+s**2)**.5,v=(g+_)/2,y=m===0&&i===0?0:Math.atan2(i,m)*c,b=h===0&&s===0?0:Math.atan2(s,h)*c;y<0&&(y+=360),b<0&&(b+=360);let x=b-y,S=Math.abs(b-y);S>180&&b<=y?x+=360:S>180&&b>y&&(x-=360);let C=y+b;S<=180?C/=2:C=(y+b<360?C+360:C-360)/2;let w=1-.17*Math.cos(l*(C-30))+.24*Math.cos(l*2*C)+.32*Math.cos(l*(3*C+6))-.2*Math.cos(l*(4*C-63)),ee=a-n,T=_-g,E=2*Math.sin(l*x/2)*(g*_)**.5,D=1+.015*(d-50)**2/(20+(d-50)**2)**.5,te=1+.045*v,ne=1+.015*v*w,re=30*Math.exp(-1*((C-275)/25)**2),ie=-(2*(f/(f+25**7))**.5)*Math.sin(l*2*re);return((ee/1/D)**2+(T/1/te)**2+(E/1/ne)**2+ie*T*E/(1*te*1*ne))**.5}var Pp=/^#([0-9a-f]{3,8})$/i,Fp=e=>{let t=Pp.exec(e);if(!t)return null;let n=t[1];return n.length<=4?{r:Number.parseInt(n[0]+n[0],16),g:Number.parseInt(n[1]+n[1],16),b:Number.parseInt(n[2]+n[2],16),alpha:n.length===4?_f(Number.parseInt(n[3]+n[3],16)/255,2):1}:n.length===6||n.length===8?{r:Number.parseInt(n.slice(0,2),16),g:Number.parseInt(n.slice(2,4),16),b:Number.parseInt(n.slice(4,6),16),alpha:n.length===8?_f(Number.parseInt(n.slice(6,8),16)/255,2):1}:null},Ip=e=>{let t=Math.round(e).toString(16);return t.length<2?`0${t}`:t},Lp=e=>{let{r:t,g:n,b:r,alpha:i}=Nf(e),a=i<1?Ip(_f(i*255)):``;return`#${Ip(t)}${Ip(n)}${Ip(r)}${a}`},Rp=e=>{let{l:t,c:n,h:r,alpha:i}=e;return{l:vf(t,0,1),c:vf(n,0,.37),h:yf(r),alpha:vf(i)}},zp=e=>{let{l:t,c:n,h:r,alpha:i}=e;return{l:_f(t,3),c:_f(n,3),h:_f(r,3),alpha:_f(i,3)}},Bp=e=>{let{l:t,c:n,h:r,alpha:i}=e,a=r*Math.PI/180,[o,s,c]=xf(Tf,xf(Df,[t,n*Math.cos(a),n*Math.sin(a)]).map(e=>e*e*e));return{r:o,g:s,b:c,alpha:i}},Vp=(e,t=1e-6)=>e.r>=-t&&e.r<=1+t&&e.g>=-t&&e.g<=1+t&&e.b>=-t&&e.b<=1+t,Hp=(e,t,n)=>{let r=0,i=.37,a=1e-5;if(Vp(Bp({l:e,c:i,h:t,alpha:n}),a))return i;for(;i-r>a;){let o=(r+i)/2;Vp(Bp({l:e,c:o,h:t,alpha:n}),a)?r=o:i=o}return r},Up=e=>{let{l:t,h:n,alpha:r}=e,i=Bp(e);return Vp(i)||(i=Bp({l:t,c:Hp(t,n,r),h:n,alpha:r})),i=Pf(i),Mf(zf(i))},Wp=e=>{let t=Rf(e),[n,r,i]=xf(Ef,xf(wf,[t.r,t.g,t.b]).map(e=>Math.cbrt(e))),a=Math.sqrt(r*r+i*i),o;return a<1e-4?o=0:(o=180/Math.PI*Math.atan2(i,r),o<0&&(o+=360)),Rp({l:n,c:a,h:o,alpha:e.alpha})},Gp=({l:e,c:t,h:n,alpha:r=1})=>!gf(e)||!gf(t)||!gf(n)?null:Rp({l:Number(e),c:Number(t),h:Number(n),alpha:Number(r)}),Kp=e=>{let t=Gp(e);return t?Up(t):null},qp=/^oklch\(\s*([+-]?[\d.]+)%?\s+([+-]?[\d.]+)\s+([+-]?[\d.]+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?[\d.]+%?))?\s*\)$/i,Jp=e=>{let t=qp.exec(e);if(!t)return null;let[n,r,i,a,o,s]=t;return Rp({l:Cf(r),c:Number.parseFloat(i),h:bf(a,o),alpha:Sf(s)})},Yp=e=>{let t=Jp(e);return t?Up(t):null},Xp=e=>{let{l:t,c:n,h:r,alpha:i}=zp(e),a=_f(t*100,1);return i<1?`oklch(${a}% ${n} ${r} / ${i})`:`oklch(${a}% ${n} ${r})`},Zp=e=>Xp(Wp(e)),Qp=e=>{if(!e||e.format!==`oklch`)return null;let{input:t}=e;return typeof t==`string`?Jp(t):typeof t==`object`?Gp(t):null},$p=e=>{let t=Qp(e);return t?Xp(t):null},em={string:[[Fp,`hex`],[Vf,`rgb`],[Dp,`hsl`],[Yp,`oklch`]],object:[[Ff,`rgb`],[wp,`hsl`],[qf,`hsv`],[Kp,`oklch`]]},tm=(e,t)=>{for(let n=0;n<t.length;n+=1){let r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},nm=e=>typeof e==`string`?tm(e.trim(),em.string):typeof e==`object`&&e?tm(e,em.object):[null,void 0],rm=e=>e instanceof im?e:new im(e),im=class{parsed;rgb;source;constructor(e){let[t,n]=nm(e);this.parsed=t,this.rgb=this.parsed||{r:0,g:0,b:0,alpha:1},n&&this.parsed&&(this.source={format:n,input:e})}getSource(){return this.source}isValid(){return this.parsed!==null}brightness(){return _f(Mp(this.rgb),2)}isDark(){return Mp(this.rgb)<.5}isLight(){return Mp(this.rgb)>=.5}toHex(){return Lp(this.rgb)}toRgb(){return Nf(this.rgb)}toRgbString(){return Uf(this.rgb)}toHsl(){return yp(Cp(this.rgb))}toHslString(){return Tp(this.rgb)}toHsv(){return Gf(Jf(this.rgb))}toOklch(){return zp(Qp(this.getSource())||Wp(this.rgb))}toOklchString(){return $p(this.getSource())||Zp(this.rgb)}invert(){return rm(kp(this.rgb))}saturate(e=.1){return rm(jp(this.rgb,e))}desaturate(e=.1){return rm(jp(this.rgb,-e))}grayscale(){return rm(jp(this.rgb,-1))}lighten(e=.1){return rm(Ap(this.rgb,e))}darken(e=.1){return rm(Ap(this.rgb,-e))}rotate(e=15){return this.hue(this.hue()+e)}alpha(e){return typeof e==`number`?rm(Op(this.rgb,e)):_f(this.rgb.alpha,3)}hue(e){let t=Cp(this.rgb);return typeof e==`number`?rm({h:e,s:t.s,l:t.l,alpha:t.alpha}):_f(t.h)}isEqual(e){return this.toHex()===rm(e).toHex()}},am=[],om=e=>{e.forEach(e=>{am.includes(e)||(e(im,em),am.push(e))})},sm=P({name:`Button`,__name:`button`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t,i=U(()=>n.as===`button`?n.disabled:void 0),a=Kd(n,[`disabled`,`type`],()=>i.value?{tabindex:`-1`}:{}),o=U(()=>n.disabled?``:void 0),s=U(()=>n.disabled?void 0:``),c=U(()=>n.disabled?!0:void 0),l=U(()=>{if(n.as===`button`)return n.type??`button`}),u=e=>{if(n.disabled){e.preventDefault(),e.stopPropagation();return}r(`click`,e)};return(e,t)=>(I(),R(M(cf),Za(M(a),{"data-vean-button":``,disabled:i.value,"aria-disabled":c.value,"data-disabled":o.value,"data-normal":s.value,type:l.value,onClick:u}),{default:qn(()=>[pi(e.$slots,`default`)]),_:3},16,[`disabled`,`aria-disabled`,`data-disabled`,`data-normal`,`type`]))}}),cm=(e,t)=>{e.prototype.toLab=function(){return tp(gp(this.getSource())||np(this.rgb))},e.prototype.toLabString=function(){return _p(this.getSource())||hp(this.rgb)},e.prototype.delta=function(t=`#FFF`){let n=t instanceof e?t:new e(t);return vf(_f(Np(this.toLab(),n.toLab())/100,3))},t.string.push([pp,`lab`]),t.object.push([up,`lab`])},lm=[50,100,200,300,400,500,600,700,800,900,950],um={inherit:`inherit`,current:`currentColor`,transparent:`transparent`,black:{hex:`#000000`,rgb:`rgb(0 0 0)`,hsl:`hsl(0 0% 0%)`,oklch:`oklch(0% 0 0)`},white:{hex:`#ffffff`,rgb:`rgb(255 255 255)`,hsl:`hsl(0 0% 100%)`,oklch:`oklch(100% 0 0)`}},dm={slate:{50:{level:50,hex:`#f8fafc`,rgb:`rgb(248 250 252)`,hsl:`hsl(210 40% 98%)`,oklch:`oklch(98% 0 248)`},100:{level:100,hex:`#f1f5f9`,rgb:`rgb(241 245 249)`,hsl:`hsl(210 40% 96.1%)`,oklch:`oklch(97% 0.01 248)`},200:{level:200,hex:`#e2e8f0`,rgb:`rgb(226 232 240)`,hsl:`hsl(214.3 31.8% 91.4%)`,oklch:`oklch(93% 0.01 256)`},300:{level:300,hex:`#cbd5e1`,rgb:`rgb(203 213 225)`,hsl:`hsl(212.7 26.8% 83.9%)`,oklch:`oklch(87% 0.02 253)`},400:{level:400,hex:`#94a3b8`,rgb:`rgb(148 163 184)`,hsl:`hsl(215 20.2% 65.1%)`,oklch:`oklch(71% 0.04 257)`},500:{level:500,hex:`#64748b`,rgb:`rgb(100 116 139)`,hsl:`hsl(215.4 16.3% 46.9%)`,oklch:`oklch(55% 0.04 257)`},600:{level:600,hex:`#475569`,rgb:`rgb(71 85 105)`,hsl:`hsl(215.3 19.3% 34.5%)`,oklch:`oklch(45% 0.04 257)`},700:{level:700,hex:`#334155`,rgb:`rgb(51 65 85)`,hsl:`hsl(215.3 25% 26.7%)`,oklch:`oklch(37% 0.04 257)`},800:{level:800,hex:`#1e293b`,rgb:`rgb(30 41 59)`,hsl:`hsl(217.2 32.6% 17.5%)`,oklch:`oklch(28% 0.04 260)`},900:{level:900,hex:`#0f172a`,rgb:`rgb(15 23 42)`,hsl:`hsl(222.2 47.4% 11.2%)`,oklch:`oklch(21% 0.04 266)`},950:{level:950,hex:`#020617`,rgb:`rgb(2 6 23)`,hsl:`hsl(222.2 84% 4.9%)`,oklch:`oklch(13% 0.04 265)`}},mist:{50:{level:50,hex:`#f9fafb`,rgb:`rgb(249 250 251)`,hsl:`hsl(189.3 20.3% 97.9%)`,oklch:`oklch(98% 0 210)`},100:{level:100,hex:`#f0f4f5`,rgb:`rgb(240 244 245)`,hsl:`hsl(189.4 21.6% 95.1%)`,oklch:`oklch(96% 0.01 210)`},200:{level:200,hex:`#dce5e6`,rgb:`rgb(220 229 230)`,hsl:`hsl(189.4 16.2% 88.4%)`,oklch:`oklch(92% 0.01 210)`},300:{level:300,hex:`#c1cfd2`,rgb:`rgb(193 207 210)`,hsl:`hsl(189.4 15.8% 79%)`,oklch:`oklch(84% 0.02 210)`},400:{level:400,hex:`#8da5a9`,rgb:`rgb(141 165 169)`,hsl:`hsl(189.3 14% 60.9%)`,oklch:`oklch(70% 0.03 210)`},500:{level:500,hex:`#648085`,rgb:`rgb(100 128 133)`,hsl:`hsl(189.3 14.2% 45.7%)`,oklch:`oklch(58% 0.03 210)`},600:{level:600,hex:`#4f676b`,rgb:`rgb(79 103 107)`,hsl:`hsl(189.3 15.1% 36.5%)`,oklch:`oklch(49% 0.03 210)`},700:{level:700,hex:`#3d5155`,rgb:`rgb(61 81 85)`,hsl:`hsl(189.3 15.9% 28.6%)`,oklch:`oklch(42% 0.03 210)`},800:{level:800,hex:`#2d3c3f`,rgb:`rgb(45 60 63)`,hsl:`hsl(189.3 17.2% 21.2%)`,oklch:`oklch(34% 0.02 210)`},900:{level:900,hex:`#1e2a2c`,rgb:`rgb(30 42 44)`,hsl:`hsl(189.3 19.2% 14.6%)`,oklch:`oklch(28% 0.02 210)`},950:{level:950,hex:`#0e1517`,rgb:`rgb(14 21 23)`,hsl:`hsl(189.3 25.3% 7.1%)`,oklch:`oklch(19% 0.01 210)`}},gray:{50:{level:50,hex:`#f9fafb`,rgb:`rgb(249 250 251)`,hsl:`hsl(210 20% 98%)`,oklch:`oklch(98% 0 248)`},100:{level:100,hex:`#f3f4f6`,rgb:`rgb(243 244 246)`,hsl:`hsl(220 14.3% 95.9%)`,oklch:`oklch(97% 0 265)`},200:{level:200,hex:`#e5e7eb`,rgb:`rgb(229 231 235)`,hsl:`hsl(220 13% 91%)`,oklch:`oklch(93% 0.01 265)`},300:{level:300,hex:`#d1d5db`,rgb:`rgb(209 213 219)`,hsl:`hsl(216 12.2% 83.9%)`,oklch:`oklch(87% 0.01 258)`},400:{level:400,hex:`#9ca3af`,rgb:`rgb(156 163 175)`,hsl:`hsl(217.9 10.6% 64.9%)`,oklch:`oklch(71% 0.02 261)`},500:{level:500,hex:`#6b7280`,rgb:`rgb(107 114 128)`,hsl:`hsl(220 8.9% 46.1%)`,oklch:`oklch(55% 0.02 264)`},600:{level:600,hex:`#4b5563`,rgb:`rgb(75 85 99)`,hsl:`hsl(215 13.8% 34.1%)`,oklch:`oklch(45% 0.03 257)`},700:{level:700,hex:`#374151`,rgb:`rgb(55 65 81)`,hsl:`hsl(216.9 19.1% 26.7%)`,oklch:`oklch(37% 0.03 260)`},800:{level:800,hex:`#1f2937`,rgb:`rgb(31 41 55)`,hsl:`hsl(215 27.9% 16.9%)`,oklch:`oklch(28% 0.03 257)`},900:{level:900,hex:`#111827`,rgb:`rgb(17 24 39)`,hsl:`hsl(220.9 39.3% 11%)`,oklch:`oklch(21% 0.03 265)`},950:{level:950,hex:`#030712`,rgb:`rgb(3 7 18)`,hsl:`hsl(224 71.4% 4.1%)`,oklch:`oklch(13% 0.03 262)`}},zinc:{50:{level:50,hex:`#fafafa`,rgb:`rgb(250 250 250)`,hsl:`hsl(0 0% 98%)`,oklch:`oklch(99% 0 360)`},100:{level:100,hex:`#f4f4f5`,rgb:`rgb(244 244 245)`,hsl:`hsl(240 4.8% 95.9%)`,oklch:`oklch(97% 0 286)`},200:{level:200,hex:`#e4e4e7`,rgb:`rgb(228 228 231)`,hsl:`hsl(240 5.9% 90%)`,oklch:`oklch(92% 0 286)`},300:{level:300,hex:`#d4d4d8`,rgb:`rgb(212 212 216)`,hsl:`hsl(240 4.9% 83.9%)`,oklch:`oklch(87% 0.01 286)`},400:{level:400,hex:`#a1a1aa`,rgb:`rgb(161 161 170)`,hsl:`hsl(240 5% 64.9%)`,oklch:`oklch(71% 0.01 286)`},500:{level:500,hex:`#71717a`,rgb:`rgb(113 113 122)`,hsl:`hsl(240 3.8% 46.1%)`,oklch:`oklch(55% 0.01 286)`},600:{level:600,hex:`#52525b`,rgb:`rgb(82 82 91)`,hsl:`hsl(240 5.2% 33.9%)`,oklch:`oklch(44% 0.01 286)`},700:{level:700,hex:`#3f3f46`,rgb:`rgb(63 63 70)`,hsl:`hsl(240 5.3% 26.1%)`,oklch:`oklch(37% 0.01 286)`},800:{level:800,hex:`#27272a`,rgb:`rgb(39 39 42)`,hsl:`hsl(240 3.7% 15.9%)`,oklch:`oklch(27% 0.01 286)`},900:{level:900,hex:`#18181b`,rgb:`rgb(24 24 27)`,hsl:`hsl(240 5.9% 10%)`,oklch:`oklch(21% 0.01 286)`},950:{level:950,hex:`#09090b`,rgb:`rgb(9 9 11)`,hsl:`hsl(240 10% 3.9%)`,oklch:`oklch(14% 0 286)`}},neutral:{50:{level:50,hex:`#fafafa`,rgb:`rgb(250 250 250)`,hsl:`hsl(0 0% 98%)`,oklch:`oklch(99% 0 360)`},100:{level:100,hex:`#f5f5f5`,rgb:`rgb(245 245 245)`,hsl:`hsl(0 0% 96.1%)`,oklch:`oklch(97% 0 360)`},200:{level:200,hex:`#e5e5e5`,rgb:`rgb(229 229 229)`,hsl:`hsl(0 0% 89.8%)`,oklch:`oklch(92% 0 360)`},300:{level:300,hex:`#d4d4d4`,rgb:`rgb(212 212 212)`,hsl:`hsl(0 0% 83.1%)`,oklch:`oklch(87% 0 360)`},400:{level:400,hex:`#a3a3a3`,rgb:`rgb(163 163 163)`,hsl:`hsl(0 0% 63.9%)`,oklch:`oklch(72% 0 360)`},500:{level:500,hex:`#737373`,rgb:`rgb(115 115 115)`,hsl:`hsl(0 0% 45.1%)`,oklch:`oklch(56% 0 360)`},600:{level:600,hex:`#525252`,rgb:`rgb(82 82 82)`,hsl:`hsl(0 0% 32.2%)`,oklch:`oklch(44% 0 360)`},700:{level:700,hex:`#404040`,rgb:`rgb(64 64 64)`,hsl:`hsl(0 0% 25.1%)`,oklch:`oklch(37% 0 360)`},800:{level:800,hex:`#262626`,rgb:`rgb(38 38 38)`,hsl:`hsl(0 0% 14.9%)`,oklch:`oklch(27% 0 360)`},900:{level:900,hex:`#171717`,rgb:`rgb(23 23 23)`,hsl:`hsl(0 0% 9%)`,oklch:`oklch(20% 0 360)`},950:{level:950,hex:`#0a0a0a`,rgb:`rgb(10 10 10)`,hsl:`hsl(0 0% 3.9%)`,oklch:`oklch(14% 0 360)`}},stone:{50:{level:50,hex:`#fafaf9`,rgb:`rgb(250 250 249)`,hsl:`hsl(60 9.1% 97.8%)`,oklch:`oklch(98% 0 106)`},100:{level:100,hex:`#f5f5f4`,rgb:`rgb(245 245 244)`,hsl:`hsl(60 4.8% 95.9%)`,oklch:`oklch(97% 0 106)`},200:{level:200,hex:`#e7e5e4`,rgb:`rgb(231 229 228)`,hsl:`hsl(20 5.9% 90%)`,oklch:`oklch(92% 0 49)`},300:{level:300,hex:`#d6d3d1`,rgb:`rgb(214 211 209)`,hsl:`hsl(24 5.7% 82.9%)`,oklch:`oklch(87% 0 56)`},400:{level:400,hex:`#a8a29e`,rgb:`rgb(168 162 158)`,hsl:`hsl(24 5.4% 63.9%)`,oklch:`oklch(72% 0.01 56)`},500:{level:500,hex:`#78716c`,rgb:`rgb(120 113 108)`,hsl:`hsl(25 5.3% 44.7%)`,oklch:`oklch(55% 0.01 58)`},600:{level:600,hex:`#57534e`,rgb:`rgb(87 83 78)`,hsl:`hsl(33.3 5.5% 32.4%)`,oklch:`oklch(44% 0.01 74)`},700:{level:700,hex:`#44403c`,rgb:`rgb(68 64 60)`,hsl:`hsl(30 6.3% 25.1%)`,oklch:`oklch(37% 0.01 68)`},800:{level:800,hex:`#292524`,rgb:`rgb(41 37 36)`,hsl:`hsl(12 6.5% 15.1%)`,oklch:`oklch(27% 0.01 34)`},900:{level:900,hex:`#1c1917`,rgb:`rgb(28 25 23)`,hsl:`hsl(24 9.8% 10%)`,oklch:`oklch(22% 0.01 56)`},950:{level:950,hex:`#0c0a09`,rgb:`rgb(12 10 9)`,hsl:`hsl(20 14.3% 4.1%)`,oklch:`oklch(15% 0 49)`}},taupe:{50:{level:50,hex:`#fbfaf9`,rgb:`rgb(251 250 249)`,hsl:`hsl(34 21.3% 97.9%)`,oklch:`oklch(98% 0 75)`},100:{level:100,hex:`#f5f3f0`,rgb:`rgb(245 243 240)`,hsl:`hsl(34 22.7% 95.1%)`,oklch:`oklch(96% 0.01 75)`},200:{level:200,hex:`#e7e2dc`,rgb:`rgb(231 226 220)`,hsl:`hsl(34.1 18.7% 88.4%)`,oklch:`oklch(92% 0.01 75)`},300:{level:300,hex:`#d3cbc0`,rgb:`rgb(211 203 192)`,hsl:`hsl(34.1 18.3% 79%)`,oklch:`oklch(84% 0.02 75)`},400:{level:400,hex:`#aa9e8d`,rgb:`rgb(170 158 141)`,hsl:`hsl(34.2 14.8% 61.1%)`,oklch:`oklch(70% 0.03 75)`},500:{level:500,hex:`#867865`,rgb:`rgb(134 120 101)`,hsl:`hsl(34.3 14.1% 46.1%)`,oklch:`oklch(58% 0.03 75)`},600:{level:600,hex:`#6c6050`,rgb:`rgb(108 96 80)`,hsl:`hsl(34.3 14.9% 36.8%)`,oklch:`oklch(49% 0.03 75)`},700:{level:700,hex:`#554b3e`,rgb:`rgb(85 75 62)`,hsl:`hsl(34.3 15.7% 28.9%)`,oklch:`oklch(42% 0.03 75)`},800:{level:800,hex:`#40382d`,rgb:`rgb(64 56 45)`,hsl:`hsl(34.3 17% 21.4%)`,oklch:`oklch(34% 0.02 75)`},900:{level:900,hex:`#2c271f`,rgb:`rgb(44 39 31)`,hsl:`hsl(34.3 17.7% 14.8%)`,oklch:`oklch(28% 0.02 75)`},950:{level:950,hex:`#17130e`,rgb:`rgb(23 19 14)`,hsl:`hsl(34.4 24.8% 7.2%)`,oklch:`oklch(19% 0.01 75)`}},olive:{50:{level:50,hex:`#f9faf9`,rgb:`rgb(249 250 249)`,hsl:`hsl(136.8 13.4% 97.9%)`,oklch:`oklch(98% 0 155)`},100:{level:100,hex:`#f1f4f2`,rgb:`rgb(241 244 242)`,hsl:`hsl(136.9 14.2% 95.2%)`,oklch:`oklch(96% 0.01 155)`},200:{level:200,hex:`#dee5e0`,rgb:`rgb(222 229 224)`,hsl:`hsl(137 10.6% 88.5%)`,oklch:`oklch(92% 0.01 155)`},300:{level:300,hex:`#c4cfc8`,rgb:`rgb(196 207 200)`,hsl:`hsl(137.2 10.3% 79.2%)`,oklch:`oklch(84% 0.02 155)`},400:{level:400,hex:`#94a599`,rgb:`rgb(148 165 153)`,hsl:`hsl(137.8 8.7% 61.4%)`,oklch:`oklch(70% 0.03 155)`},500:{level:500,hex:`#6c8072`,rgb:`rgb(108 128 114)`,hsl:`hsl(138.4 8.6% 46.3%)`,oklch:`oklch(58% 0.03 155)`},600:{level:600,hex:`#56675b`,rgb:`rgb(86 103 91)`,hsl:`hsl(138.4 9.1% 37%)`,oklch:`oklch(49% 0.03 155)`},700:{level:700,hex:`#435147`,rgb:`rgb(67 81 71)`,hsl:`hsl(138.4 9.5% 29.1%)`,oklch:`oklch(42% 0.02 155)`},800:{level:800,hex:`#313c35`,rgb:`rgb(49 60 53)`,hsl:`hsl(138.4 10.2% 21.5%)`,oklch:`oklch(34% 0.02 155)`},900:{level:900,hex:`#222a24`,rgb:`rgb(34 42 36)`,hsl:`hsl(138.5 11.2% 14.8%)`,oklch:`oklch(28% 0.02 155)`},950:{level:950,hex:`#101512`,rgb:`rgb(16 21 18)`,hsl:`hsl(138.4 14.2% 7.3%)`,oklch:`oklch(19% 0.01 155)`}},mauve:{50:{level:50,hex:`#fafafb`,rgb:`rgb(250 250 251)`,hsl:`hsl(272.4 15% 98.2%)`,oklch:`oklch(98% 0 310)`},100:{level:100,hex:`#f4f2f6`,rgb:`rgb(244 242 246)`,hsl:`hsl(272.4 16.1% 95.8%)`,oklch:`oklch(96% 0.01 310)`},200:{level:200,hex:`#e5e1e8`,rgb:`rgb(229 225 232)`,hsl:`hsl(272.5 13% 89.6%)`,oklch:`oklch(92% 0.01 310)`},300:{level:300,hex:`#d0c9d5`,rgb:`rgb(208 201 213)`,hsl:`hsl(272.6 12.6% 81.2%)`,oklch:`oklch(84% 0.02 310)`},400:{level:400,hex:`#a69bae`,rgb:`rgb(166 155 174)`,hsl:`hsl(272.9 10.6% 64.6%)`,oklch:`oklch(70% 0.03 310)`},500:{level:500,hex:`#81758b`,rgb:`rgb(129 117 139)`,hsl:`hsl(273.2 8.6% 50.1%)`,oklch:`oklch(58% 0.04 310)`},600:{level:600,hex:`#675d70`,rgb:`rgb(103 93 112)`,hsl:`hsl(273.2 9.2% 40.2%)`,oklch:`oklch(49% 0.03 310)`},700:{level:700,hex:`#524959`,rgb:`rgb(82 73 89)`,hsl:`hsl(273.3 9.7% 31.7%)`,oklch:`oklch(42% 0.03 310)`},800:{level:800,hex:`#3d3642`,rgb:`rgb(61 54 66)`,hsl:`hsl(273.3 10.2% 23.6%)`,oklch:`oklch(34% 0.02 310)`},900:{level:900,hex:`#2a252e`,rgb:`rgb(42 37 46)`,hsl:`hsl(273.3 10.9% 16.4%)`,oklch:`oklch(28% 0.02 310)`},950:{level:950,hex:`#161218`,rgb:`rgb(22 18 24)`,hsl:`hsl(273.3 14.1% 8.3%)`,oklch:`oklch(19% 0.01 310)`}},red:{50:{level:50,hex:`#fef2f2`,rgb:`rgb(254 242 242)`,hsl:`hsl(0 85.7% 97.3%)`,oklch:`oklch(97% 0.01 17)`},100:{level:100,hex:`#fee2e2`,rgb:`rgb(254 226 226)`,hsl:`hsl(0 93.3% 94.1%)`,oklch:`oklch(94% 0.03 18)`},200:{level:200,hex:`#fecaca`,rgb:`rgb(254 202 202)`,hsl:`hsl(0 96.3% 89.4%)`,oklch:`oklch(88% 0.06 18)`},300:{level:300,hex:`#fca5a5`,rgb:`rgb(252 165 165)`,hsl:`hsl(0 93.5% 81.8%)`,oklch:`oklch(81% 0.1 20)`},400:{level:400,hex:`#f87171`,rgb:`rgb(248 113 113)`,hsl:`hsl(0 90.6% 70.8%)`,oklch:`oklch(71% 0.17 22)`},500:{level:500,hex:`#ef4444`,rgb:`rgb(239 68 68)`,hsl:`hsl(0 84.2% 60.2%)`,oklch:`oklch(64% 0.21 25)`},600:{level:600,hex:`#dc2626`,rgb:`rgb(220 38 38)`,hsl:`hsl(0 72.2% 50.6%)`,oklch:`oklch(58% 0.22 27)`},700:{level:700,hex:`#b91c1c`,rgb:`rgb(185 28 28)`,hsl:`hsl(0 73.7% 41.8%)`,oklch:`oklch(51% 0.19 28)`},800:{level:800,hex:`#991b1b`,rgb:`rgb(153 27 27)`,hsl:`hsl(0 70% 35.3%)`,oklch:`oklch(44% 0.16 27)`},900:{level:900,hex:`#7f1d1d`,rgb:`rgb(127 29 29)`,hsl:`hsl(0 62.8% 30.6%)`,oklch:`oklch(40% 0.13 26)`},950:{level:950,hex:`#450a0a`,rgb:`rgb(69 10 10)`,hsl:`hsl(0 74.7% 15.5%)`,oklch:`oklch(26% 0.09 26)`}},orange:{50:{level:50,hex:`#fff7ed`,rgb:`rgb(255 247 237)`,hsl:`hsl(33.3 100% 96.5%)`,oklch:`oklch(98% 0.02 74)`},100:{level:100,hex:`#ffedd5`,rgb:`rgb(255 237 213)`,hsl:`hsl(34.3 100% 91.8%)`,oklch:`oklch(95% 0.04 75)`},200:{level:200,hex:`#fed7aa`,rgb:`rgb(254 215 170)`,hsl:`hsl(32.1 97.7% 83.1%)`,oklch:`oklch(90% 0.07 71)`},300:{level:300,hex:`#fdba74`,rgb:`rgb(253 186 116)`,hsl:`hsl(30.7 97.2% 72.4%)`,oklch:`oklch(84% 0.12 66)`},400:{level:400,hex:`#fb923c`,rgb:`rgb(251 146 60)`,hsl:`hsl(27 96% 61%)`,oklch:`oklch(76% 0.16 56)`},500:{level:500,hex:`#f97316`,rgb:`rgb(249 115 22)`,hsl:`hsl(24.6 95% 53.1%)`,oklch:`oklch(70% 0.19 48)`},600:{level:600,hex:`#ea580c`,rgb:`rgb(234 88 12)`,hsl:`hsl(20.5 90.2% 48.2%)`,oklch:`oklch(65% 0.19 41)`},700:{level:700,hex:`#c2410c`,rgb:`rgb(194 65 12)`,hsl:`hsl(17.5 88.3% 40.4%)`,oklch:`oklch(55% 0.17 38)`},800:{level:800,hex:`#9a3412`,rgb:`rgb(154 52 18)`,hsl:`hsl(15 79.1% 33.7%)`,oklch:`oklch(47% 0.14 37)`},900:{level:900,hex:`#7c2d12`,rgb:`rgb(124 45 18)`,hsl:`hsl(15.3 74.6% 27.8%)`,oklch:`oklch(41% 0.12 38)`},950:{level:950,hex:`#431407`,rgb:`rgb(67 20 7)`,hsl:`hsl(13 81.1% 14.5%)`,oklch:`oklch(27% 0.08 36)`}},amber:{50:{level:50,hex:`#fffbeb`,rgb:`rgb(255 251 235)`,hsl:`hsl(48 100% 96.1%)`,oklch:`oklch(99% 0.02 95)`},100:{level:100,hex:`#fef3c7`,rgb:`rgb(254 243 199)`,hsl:`hsl(48 96.5% 88.8%)`,oklch:`oklch(96% 0.06 96)`},200:{level:200,hex:`#fde68a`,rgb:`rgb(253 230 138)`,hsl:`hsl(48 96.6% 76.7%)`,oklch:`oklch(92% 0.12 96)`},300:{level:300,hex:`#fcd34d`,rgb:`rgb(252 211 77)`,hsl:`hsl(45.9 96.7% 64.5%)`,oklch:`oklch(88% 0.15 92)`},400:{level:400,hex:`#fbbf24`,rgb:`rgb(251 191 36)`,hsl:`hsl(43.3 96.4% 56.3%)`,oklch:`oklch(84% 0.16 84)`},500:{level:500,hex:`#f59e0b`,rgb:`rgb(245 158 11)`,hsl:`hsl(37.7 92.1% 50.2%)`,oklch:`oklch(77% 0.16 70)`},600:{level:600,hex:`#d97706`,rgb:`rgb(217 119 6)`,hsl:`hsl(32.1 94.6% 43.7%)`,oklch:`oklch(67% 0.16 58)`},700:{level:700,hex:`#b45309`,rgb:`rgb(180 83 9)`,hsl:`hsl(26 90.5% 37.1%)`,oklch:`oklch(56% 0.15 49)`},800:{level:800,hex:`#92400e`,rgb:`rgb(146 64 14)`,hsl:`hsl(22.7 82.5% 31.4%)`,oklch:`oklch(47% 0.12 46)`},900:{level:900,hex:`#78350f`,rgb:`rgb(120 53 15)`,hsl:`hsl(21.7 77.8% 26.5%)`,oklch:`oklch(41% 0.11 46)`},950:{level:950,hex:`#451a03`,rgb:`rgb(69 26 3)`,hsl:`hsl(20.9 91.7% 14.1%)`,oklch:`oklch(28% 0.07 46)`}},yellow:{50:{level:50,hex:`#fefce8`,rgb:`rgb(254 252 232)`,hsl:`hsl(54.5 91.7% 95.3%)`,oklch:`oklch(99% 0.03 102)`},100:{level:100,hex:`#fef9c3`,rgb:`rgb(254 249 195)`,hsl:`hsl(54.9 96.7% 88%)`,oklch:`oklch(97% 0.07 103)`},200:{level:200,hex:`#fef08a`,rgb:`rgb(254 240 138)`,hsl:`hsl(52.8 98.3% 76.9%)`,oklch:`oklch(95% 0.12 102)`},300:{level:300,hex:`#fde047`,rgb:`rgb(253 224 71)`,hsl:`hsl(50.4 97.8% 63.5%)`,oklch:`oklch(91% 0.17 98)`},400:{level:400,hex:`#facc15`,rgb:`rgb(250 204 21)`,hsl:`hsl(47.9 95.8% 53.1%)`,oklch:`oklch(86% 0.17 92)`},500:{level:500,hex:`#eab308`,rgb:`rgb(234 179 8)`,hsl:`hsl(45.4 93.4% 47.5%)`,oklch:`oklch(80% 0.16 86)`},600:{level:600,hex:`#ca8a04`,rgb:`rgb(202 138 4)`,hsl:`hsl(40.6 96.1% 40.4%)`,oklch:`oklch(68% 0.14 76)`},700:{level:700,hex:`#a16207`,rgb:`rgb(161 98 7)`,hsl:`hsl(35.5 91.7% 32.9%)`,oklch:`oklch(55% 0.12 66)`},800:{level:800,hex:`#854d0e`,rgb:`rgb(133 77 14)`,hsl:`hsl(31.8 81% 28.8%)`,oklch:`oklch(48% 0.1 62)`},900:{level:900,hex:`#713f12`,rgb:`rgb(113 63 18)`,hsl:`hsl(28.4 72.5% 25.7%)`,oklch:`oklch(42% 0.09 58)`},950:{level:950,hex:`#422006`,rgb:`rgb(66 32 6)`,hsl:`hsl(26 83.3% 14.1%)`,oklch:`oklch(29% 0.06 54)`}},lime:{50:{level:50,hex:`#f7fee7`,rgb:`rgb(247 254 231)`,hsl:`hsl(78.3 92% 95.1%)`,oklch:`oklch(99% 0.03 121)`},100:{level:100,hex:`#ecfccb`,rgb:`rgb(236 252 203)`,hsl:`hsl(79.6 89.1% 89.2%)`,oklch:`oklch(97% 0.07 122)`},200:{level:200,hex:`#d9f99d`,rgb:`rgb(217 249 157)`,hsl:`hsl(80.9 88.5% 79.6%)`,oklch:`oklch(94% 0.12 124)`},300:{level:300,hex:`#bef264`,rgb:`rgb(190 242 100)`,hsl:`hsl(82 84.5% 67.1%)`,oklch:`oklch(90% 0.18 127)`},400:{level:400,hex:`#a3e635`,rgb:`rgb(163 230 53)`,hsl:`hsl(82.7 78% 55.5%)`,oklch:`oklch(85% 0.21 129)`},500:{level:500,hex:`#84cc16`,rgb:`rgb(132 204 22)`,hsl:`hsl(83.7 80.5% 44.3%)`,oklch:`oklch(77% 0.2 131)`},600:{level:600,hex:`#65a30d`,rgb:`rgb(101 163 13)`,hsl:`hsl(84.8 85.2% 34.5%)`,oklch:`oklch(65% 0.18 132)`},700:{level:700,hex:`#4d7c0f`,rgb:`rgb(77 124 15)`,hsl:`hsl(85.9 78.4% 27.3%)`,oklch:`oklch(53% 0.14 132)`},800:{level:800,hex:`#3f6212`,rgb:`rgb(63 98 18)`,hsl:`hsl(86.3 69% 22.7%)`,oklch:`oklch(45% 0.11 131)`},900:{level:900,hex:`#365314`,rgb:`rgb(54 83 20)`,hsl:`hsl(87.6 61.2% 20.2%)`,oklch:`oklch(41% 0.1 131)`},950:{level:950,hex:`#1a2e05`,rgb:`rgb(26 46 5)`,hsl:`hsl(89.3 80.4% 10%)`,oklch:`oklch(27% 0.07 132)`}},green:{50:{level:50,hex:`#f0fdf4`,rgb:`rgb(240 253 244)`,hsl:`hsl(138.5 76.5% 96.7%)`,oklch:`oklch(98% 0.02 156)`},100:{level:100,hex:`#dcfce7`,rgb:`rgb(220 252 231)`,hsl:`hsl(140.6 84.2% 92.5%)`,oklch:`oklch(96% 0.04 157)`},200:{level:200,hex:`#bbf7d0`,rgb:`rgb(187 247 208)`,hsl:`hsl(141 78.9% 85.1%)`,oklch:`oklch(93% 0.08 156)`},300:{level:300,hex:`#86efac`,rgb:`rgb(134 239 172)`,hsl:`hsl(141.7 76.6% 73.1%)`,oklch:`oklch(87% 0.14 154)`},400:{level:400,hex:`#4ade80`,rgb:`rgb(74 222 128)`,hsl:`hsl(141.9 69.2% 58%)`,oklch:`oklch(80% 0.18 152)`},500:{level:500,hex:`#22c55e`,rgb:`rgb(34 197 94)`,hsl:`hsl(142.1 70.6% 45.3%)`,oklch:`oklch(72% 0.19 150)`},600:{level:600,hex:`#16a34a`,rgb:`rgb(22 163 74)`,hsl:`hsl(142.1 76.2% 36.3%)`,oklch:`oklch(63% 0.17 149)`},700:{level:700,hex:`#15803d`,rgb:`rgb(21 128 61)`,hsl:`hsl(142.4 71.8% 29.2%)`,oklch:`oklch(53% 0.14 150)`},800:{level:800,hex:`#166534`,rgb:`rgb(22 101 52)`,hsl:`hsl(142.8 64.2% 24.1%)`,oklch:`oklch(45% 0.11 151)`},900:{level:900,hex:`#14532d`,rgb:`rgb(20 83 45)`,hsl:`hsl(143.8 61.2% 20.2%)`,oklch:`oklch(39% 0.09 153)`},950:{level:950,hex:`#052e16`,rgb:`rgb(5 46 22)`,hsl:`hsl(144.9 80.4% 10%)`,oklch:`oklch(27% 0.06 153)`}},emerald:{50:{level:50,hex:`#ecfdf5`,rgb:`rgb(236 253 245)`,hsl:`hsl(151.8 81% 95.9%)`,oklch:`oklch(98% 0.02 166)`},100:{level:100,hex:`#d1fae5`,rgb:`rgb(209 250 229)`,hsl:`hsl(149.3 80.4% 90%)`,oklch:`oklch(95% 0.05 163)`},200:{level:200,hex:`#a7f3d0`,rgb:`rgb(167 243 208)`,hsl:`hsl(152.4 76% 80.4%)`,oklch:`oklch(90% 0.09 164)`},300:{level:300,hex:`#6ee7b7`,rgb:`rgb(110 231 183)`,hsl:`hsl(156.2 71.6% 66.9%)`,oklch:`oklch(85% 0.13 165)`},400:{level:400,hex:`#34d399`,rgb:`rgb(52 211 153)`,hsl:`hsl(158.1 64.4% 51.6%)`,oklch:`oklch(77% 0.15 163)`},500:{level:500,hex:`#10b981`,rgb:`rgb(16 185 129)`,hsl:`hsl(160.1 84.1% 39.4%)`,oklch:`oklch(70% 0.15 162)`},600:{level:600,hex:`#059669`,rgb:`rgb(5 150 105)`,hsl:`hsl(161.4 93.5% 30.4%)`,oklch:`oklch(60% 0.13 163)`},700:{level:700,hex:`#047857`,rgb:`rgb(4 120 87)`,hsl:`hsl(162.9 93.5% 24.3%)`,oklch:`oklch(51% 0.1 166)`},800:{level:800,hex:`#065f46`,rgb:`rgb(6 95 70)`,hsl:`hsl(163.1 88.1% 19.8%)`,oklch:`oklch(43% 0.09 167)`},900:{level:900,hex:`#064e3b`,rgb:`rgb(6 78 59)`,hsl:`hsl(164.2 85.7% 16.5%)`,oklch:`oklch(38% 0.07 169)`},950:{level:950,hex:`#022c22`,rgb:`rgb(2 44 34)`,hsl:`hsl(165.7 91.3% 9%)`,oklch:`oklch(26% 0.05 173)`}},teal:{50:{level:50,hex:`#f0fdfa`,rgb:`rgb(240 253 250)`,hsl:`hsl(166.2 76.5% 96.7%)`,oklch:`oklch(98% 0.01 181)`},100:{level:100,hex:`#ccfbf1`,rgb:`rgb(204 251 241)`,hsl:`hsl(167.2 85.5% 89.2%)`,oklch:`oklch(95% 0.05 181)`},200:{level:200,hex:`#99f6e4`,rgb:`rgb(153 246 228)`,hsl:`hsl(168.4 83.8% 78.2%)`,oklch:`oklch(91% 0.09 180)`},300:{level:300,hex:`#5eead4`,rgb:`rgb(94 234 212)`,hsl:`hsl(170.6 76.9% 64.3%)`,oklch:`oklch(85% 0.13 181)`},400:{level:400,hex:`#2dd4bf`,rgb:`rgb(45 212 191)`,hsl:`hsl(172.5 66% 50.4%)`,oklch:`oklch(78% 0.13 182)`},500:{level:500,hex:`#14b8a6`,rgb:`rgb(20 184 166)`,hsl:`hsl(173.4 80.4% 40%)`,oklch:`oklch(70% 0.12 183)`},600:{level:600,hex:`#0d9488`,rgb:`rgb(13 148 136)`,hsl:`hsl(174.7 83.9% 31.6%)`,oklch:`oklch(60% 0.1 185)`},700:{level:700,hex:`#0f766e`,rgb:`rgb(15 118 110)`,hsl:`hsl(175.3 77.4% 26.1%)`,oklch:`oklch(51% 0.09 186)`},800:{level:800,hex:`#115e59`,rgb:`rgb(17 94 89)`,hsl:`hsl(176.1 69.4% 21.8%)`,oklch:`oklch(44% 0.07 188)`},900:{level:900,hex:`#134e4a`,rgb:`rgb(19 78 74)`,hsl:`hsl(175.9 60.8% 19%)`,oklch:`oklch(39% 0.06 188)`},950:{level:950,hex:`#042f2e`,rgb:`rgb(4 47 46)`,hsl:`hsl(178.6 84.3% 10%)`,oklch:`oklch(28% 0.04 193)`}},cyan:{50:{level:50,hex:`#ecfeff`,rgb:`rgb(236 254 255)`,hsl:`hsl(183.2 100% 96.3%)`,oklch:`oklch(98% 0.02 201)`},100:{level:100,hex:`#cffafe`,rgb:`rgb(207 250 254)`,hsl:`hsl(185.1 95.9% 90.4%)`,oklch:`oklch(96% 0.04 203)`},200:{level:200,hex:`#a5f3fc`,rgb:`rgb(165 243 252)`,hsl:`hsl(186.2 93.5% 81.8%)`,oklch:`oklch(92% 0.08 205)`},300:{level:300,hex:`#67e8f9`,rgb:`rgb(103 232 249)`,hsl:`hsl(187 92.4% 69%)`,oklch:`oklch(87% 0.12 207)`},400:{level:400,hex:`#22d3ee`,rgb:`rgb(34 211 238)`,hsl:`hsl(187.9 85.7% 53.3%)`,oklch:`oklch(80% 0.13 212)`},500:{level:500,hex:`#06b6d4`,rgb:`rgb(6 182 212)`,hsl:`hsl(188.7 94.5% 42.7%)`,oklch:`oklch(71% 0.13 215)`},600:{level:600,hex:`#0891b2`,rgb:`rgb(8 145 178)`,hsl:`hsl(191.6 91.4% 36.5%)`,oklch:`oklch(61% 0.11 222)`},700:{level:700,hex:`#0e7490`,rgb:`rgb(14 116 144)`,hsl:`hsl(192.9 82.3% 31%)`,oklch:`oklch(52% 0.09 223)`},800:{level:800,hex:`#155e75`,rgb:`rgb(21 94 117)`,hsl:`hsl(194.4 69.6% 27.1%)`,oklch:`oklch(45% 0.08 224)`},900:{level:900,hex:`#164e63`,rgb:`rgb(22 78 99)`,hsl:`hsl(196.4 63.6% 23.7%)`,oklch:`oklch(40% 0.07 227)`},950:{level:950,hex:`#083344`,rgb:`rgb(8 51 68)`,hsl:`hsl(197 78.9% 14.9%)`,oklch:`oklch(30% 0.05 230)`}},sky:{50:{level:50,hex:`#f0f9ff`,rgb:`rgb(240 249 255)`,hsl:`hsl(204 100% 97.1%)`,oklch:`oklch(98% 0.01 237)`},100:{level:100,hex:`#e0f2fe`,rgb:`rgb(224 242 254)`,hsl:`hsl(204 93.8% 93.7%)`,oklch:`oklch(95% 0.03 237)`},200:{level:200,hex:`#bae6fd`,rgb:`rgb(186 230 253)`,hsl:`hsl(200.6 94.4% 86.1%)`,oklch:`oklch(90% 0.06 231)`},300:{level:300,hex:`#7dd3fc`,rgb:`rgb(125 211 252)`,hsl:`hsl(199.4 95.5% 73.9%)`,oklch:`oklch(83% 0.1 230)`},400:{level:400,hex:`#38bdf8`,rgb:`rgb(56 189 248)`,hsl:`hsl(198.4 93.2% 59.6%)`,oklch:`oklch(75% 0.14 233)`},500:{level:500,hex:`#0ea5e9`,rgb:`rgb(14 165 233)`,hsl:`hsl(198.6 88.7% 48.4%)`,oklch:`oklch(68% 0.15 237)`},600:{level:600,hex:`#0284c7`,rgb:`rgb(2 132 199)`,hsl:`hsl(200.4 98% 39.4%)`,oklch:`oklch(59% 0.14 242)`},700:{level:700,hex:`#0369a1`,rgb:`rgb(3 105 161)`,hsl:`hsl(201.3 96.3% 32.2%)`,oklch:`oklch(50% 0.12 243)`},800:{level:800,hex:`#075985`,rgb:`rgb(7 89 133)`,hsl:`hsl(201 90% 27.5%)`,oklch:`oklch(44% 0.1 241)`},900:{level:900,hex:`#0c4a6e`,rgb:`rgb(12 74 110)`,hsl:`hsl(202 80.3% 23.9%)`,oklch:`oklch(39% 0.08 241)`},950:{level:950,hex:`#082f49`,rgb:`rgb(8 47 73)`,hsl:`hsl(204 80.2% 15.9%)`,oklch:`oklch(29% 0.06 243)`}},blue:{50:{level:50,hex:`#eff6ff`,rgb:`rgb(239 246 255)`,hsl:`hsl(213.8 100% 96.9%)`,oklch:`oklch(97% 0.01 255)`},100:{level:100,hex:`#dbeafe`,rgb:`rgb(219 234 254)`,hsl:`hsl(214.3 94.6% 92.7%)`,oklch:`oklch(93% 0.03 256)`},200:{level:200,hex:`#bfdbfe`,rgb:`rgb(191 219 254)`,hsl:`hsl(213.3 96.9% 87.3%)`,oklch:`oklch(88% 0.06 254)`},300:{level:300,hex:`#93c5fd`,rgb:`rgb(147 197 253)`,hsl:`hsl(211.7 96.4% 78.4%)`,oklch:`oklch(81% 0.1 252)`},400:{level:400,hex:`#60a5fa`,rgb:`rgb(96 165 250)`,hsl:`hsl(213.1 93.9% 67.8%)`,oklch:`oklch(71% 0.14 255)`},500:{level:500,hex:`#3b82f6`,rgb:`rgb(59 130 246)`,hsl:`hsl(217.2 91.2% 59.8%)`,oklch:`oklch(62% 0.19 260)`},600:{level:600,hex:`#2563eb`,rgb:`rgb(37 99 235)`,hsl:`hsl(221.2 83.2% 53.3%)`,oklch:`oklch(55% 0.22 263)`},700:{level:700,hex:`#1d4ed8`,rgb:`rgb(29 78 216)`,hsl:`hsl(224.3 76.3% 48%)`,oklch:`oklch(49% 0.22 264)`},800:{level:800,hex:`#1e40af`,rgb:`rgb(30 64 175)`,hsl:`hsl(225.9 70.7% 40.2%)`,oklch:`oklch(42% 0.18 266)`},900:{level:900,hex:`#1e3a8a`,rgb:`rgb(30 58 138)`,hsl:`hsl(224.4 64.3% 32.9%)`,oklch:`oklch(38% 0.14 266)`},950:{level:950,hex:`#172554`,rgb:`rgb(23 37 84)`,hsl:`hsl(226.2 57% 21%)`,oklch:`oklch(28% 0.09 268)`}},indigo:{50:{level:50,hex:`#eef2ff`,rgb:`rgb(238 242 255)`,hsl:`hsl(225.9 100% 96.7%)`,oklch:`oklch(96% 0.02 272)`},100:{level:100,hex:`#e0e7ff`,rgb:`rgb(224 231 255)`,hsl:`hsl(226.5 100% 93.9%)`,oklch:`oklch(93% 0.03 273)`},200:{level:200,hex:`#c7d2fe`,rgb:`rgb(199 210 254)`,hsl:`hsl(228 96.5% 88.8%)`,oklch:`oklch(87% 0.06 274)`},300:{level:300,hex:`#a5b4fc`,rgb:`rgb(165 180 252)`,hsl:`hsl(229.7 93.5% 81.8%)`,oklch:`oklch(79% 0.1 275)`},400:{level:400,hex:`#818cf8`,rgb:`rgb(129 140 248)`,hsl:`hsl(234.5 89.5% 73.9%)`,oklch:`oklch(68% 0.16 277)`},500:{level:500,hex:`#6366f1`,rgb:`rgb(99 102 241)`,hsl:`hsl(238.7 83.5% 66.7%)`,oklch:`oklch(59% 0.2 277)`},600:{level:600,hex:`#4f46e5`,rgb:`rgb(79 70 229)`,hsl:`hsl(243.4 75.4% 58.6%)`,oklch:`oklch(51% 0.23 277)`},700:{level:700,hex:`#4338ca`,rgb:`rgb(67 56 202)`,hsl:`hsl(244.5 57.9% 50.6%)`,oklch:`oklch(46% 0.21 277)`},800:{level:800,hex:`#3730a3`,rgb:`rgb(55 48 163)`,hsl:`hsl(243.7 54.5% 41.4%)`,oklch:`oklch(40% 0.18 277)`},900:{level:900,hex:`#312e81`,rgb:`rgb(49 46 129)`,hsl:`hsl(242.2 47.4% 34.3%)`,oklch:`oklch(36% 0.14 279)`},950:{level:950,hex:`#1e1b4b`,rgb:`rgb(30 27 75)`,hsl:`hsl(243.8 47.1% 20%)`,oklch:`oklch(26% 0.09 281)`}},violet:{50:{level:50,hex:`#f5f3ff`,rgb:`rgb(245 243 255)`,hsl:`hsl(250 100% 97.6%)`,oklch:`oklch(97% 0.02 294)`},100:{level:100,hex:`#ede9fe`,rgb:`rgb(237 233 254)`,hsl:`hsl(251.4 91.3% 95.5%)`,oklch:`oklch(94% 0.03 295)`},200:{level:200,hex:`#ddd6fe`,rgb:`rgb(221 214 254)`,hsl:`hsl(250.5 95.2% 91.8%)`,oklch:`oklch(89% 0.05 293)`},300:{level:300,hex:`#c4b5fd`,rgb:`rgb(196 181 253)`,hsl:`hsl(252.5 94.7% 85.1%)`,oklch:`oklch(81% 0.1 294)`},400:{level:400,hex:`#a78bfa`,rgb:`rgb(167 139 250)`,hsl:`hsl(255.1 91.7% 76.3%)`,oklch:`oklch(71% 0.16 294)`},500:{level:500,hex:`#8b5cf6`,rgb:`rgb(139 92 246)`,hsl:`hsl(258.3 89.5% 66.3%)`,oklch:`oklch(61% 0.22 293)`},600:{level:600,hex:`#7c3aed`,rgb:`rgb(124 58 237)`,hsl:`hsl(262.1 83.3% 57.8%)`,oklch:`oklch(54% 0.25 293)`},700:{level:700,hex:`#6d28d9`,rgb:`rgb(109 40 217)`,hsl:`hsl(263.4 70% 50.4%)`,oklch:`oklch(49% 0.24 293)`},800:{level:800,hex:`#5b21b6`,rgb:`rgb(91 33 182)`,hsl:`hsl(263.4 69.3% 42.2%)`,oklch:`oklch(43% 0.21 293)`},900:{level:900,hex:`#4c1d95`,rgb:`rgb(76 29 149)`,hsl:`hsl(263.5 67.4% 34.9%)`,oklch:`oklch(38% 0.18 294)`},950:{level:950,hex:`#1e1b4b`,rgb:`rgb(46 16 101)`,hsl:`hsl(261.2 72.6% 22.9%)`,oklch:`oklch(28% 0.14 291)`}},purple:{50:{level:50,hex:`#faf5ff`,rgb:`rgb(250 245 255)`,hsl:`hsl(270 100% 98%)`,oklch:`oklch(98% 0.01 308)`},100:{level:100,hex:`#f3e8ff`,rgb:`rgb(243 232 255)`,hsl:`hsl(268.7 100% 95.5%)`,oklch:`oklch(95% 0.03 307)`},200:{level:200,hex:`#e9d5ff`,rgb:`rgb(233 213 255)`,hsl:`hsl(268.6 100% 91.8%)`,oklch:`oklch(90% 0.06 307)`},300:{level:300,hex:`#d8b4fe`,rgb:`rgb(216 180 254)`,hsl:`hsl(269.2 97.4% 85.1%)`,oklch:`oklch(83% 0.11 306)`},400:{level:400,hex:`#c084fc`,rgb:`rgb(192 132 252)`,hsl:`hsl(270 95.2% 75.3%)`,oklch:`oklch(72% 0.18 306)`},500:{level:500,hex:`#a855f7`,rgb:`rgb(168 85 247)`,hsl:`hsl(270.7 91% 65.1%)`,oklch:`oklch(63% 0.23 304)`},600:{level:600,hex:`#9333ea`,rgb:`rgb(147 51 234)`,hsl:`hsl(271.5 81.3% 55.9%)`,oklch:`oklch(56% 0.25 302)`},700:{level:700,hex:`#7e22ce`,rgb:`rgb(126 34 206)`,hsl:`hsl(272.1 71.7% 47.1%)`,oklch:`oklch(50% 0.24 302)`},800:{level:800,hex:`#6b21a8`,rgb:`rgb(107 33 168)`,hsl:`hsl(272.9 67.2% 39.4%)`,oklch:`oklch(44% 0.2 304)`},900:{level:900,hex:`#581c87`,rgb:`rgb(88 28 135)`,hsl:`hsl(273.6 65.6% 32%)`,oklch:`oklch(38% 0.17 305)`},950:{level:950,hex:`#3b0764`,rgb:`rgb(59 7 100)`,hsl:`hsl(273.5 86.9% 21%)`,oklch:`oklch(29% 0.14 303)`}},fuchsia:{50:{level:50,hex:`#fdf4ff`,rgb:`rgb(253 244 255)`,hsl:`hsl(289.1 100% 97.8%)`,oklch:`oklch(98% 0.02 320)`},100:{level:100,hex:`#fae8ff`,rgb:`rgb(250 232 255)`,hsl:`hsl(287 100% 95.5%)`,oklch:`oklch(95% 0.04 319)`},200:{level:200,hex:`#f5d0fe`,rgb:`rgb(245 208 254)`,hsl:`hsl(288.3 95.8% 90.6%)`,oklch:`oklch(90% 0.07 320)`},300:{level:300,hex:`#f0abfc`,rgb:`rgb(240 171 252)`,hsl:`hsl(291.1 93.1% 82.9%)`,oklch:`oklch(83% 0.13 321)`},400:{level:400,hex:`#e879f9`,rgb:`rgb(232 121 249)`,hsl:`hsl(292 91.4% 72.5%)`,oklch:`oklch(75% 0.21 322)`},500:{level:500,hex:`#d946ef`,rgb:`rgb(217 70 239)`,hsl:`hsl(292.2 84.1% 60.6%)`,oklch:`oklch(67% 0.26 322)`},600:{level:600,hex:`#c026d3`,rgb:`rgb(192 38 211)`,hsl:`hsl(293.4 69.5% 48.8%)`,oklch:`oklch(59% 0.26 323)`},700:{level:700,hex:`#a21caf`,rgb:`rgb(162 28 175)`,hsl:`hsl(294.7 72.4% 39.8%)`,oklch:`oklch(52% 0.23 324)`},800:{level:800,hex:`#86198f`,rgb:`rgb(134 25 143)`,hsl:`hsl(295.4 70.2% 32.9%)`,oklch:`oklch(45% 0.19 325)`},900:{level:900,hex:`#701a75`,rgb:`rgb(112 26 117)`,hsl:`hsl(296.7 63.6% 28%)`,oklch:`oklch(40% 0.16 326)`},950:{level:950,hex:`#4a044e`,rgb:`rgb(74 4 78)`,hsl:`hsl(296.8 90.2% 16.1%)`,oklch:`oklch(29% 0.13 326)`}},pink:{50:{level:50,hex:`#fdf2f8`,rgb:`rgb(253 242 248)`,hsl:`hsl(327.3 73.3% 97.1%)`,oklch:`oklch(97% 0.01 343)`},100:{level:100,hex:`#fce7f3`,rgb:`rgb(252 231 243)`,hsl:`hsl(325.7 77.8% 94.7%)`,oklch:`oklch(95% 0.03 342)`},200:{level:200,hex:`#fbcfe8`,rgb:`rgb(251 207 232)`,hsl:`hsl(325.9 84.6% 89.8%)`,oklch:`oklch(90% 0.06 343)`},300:{level:300,hex:`#f9a8d4`,rgb:`rgb(249 168 212)`,hsl:`hsl(327.4 87.1% 81.8%)`,oklch:`oklch(82% 0.11 346)`},400:{level:400,hex:`#f472b6`,rgb:`rgb(244 114 182)`,hsl:`hsl(328.6 85.5% 70.2%)`,oklch:`oklch(73% 0.18 350)`},500:{level:500,hex:`#ec4899`,rgb:`rgb(236 72 153)`,hsl:`hsl(330.4 81.2% 60.4%)`,oklch:`oklch(66% 0.21 354)`},600:{level:600,hex:`#db2777`,rgb:`rgb(219 39 119)`,hsl:`hsl(333.3 71.4% 50.6%)`,oklch:`oklch(59% 0.22 1)`},700:{level:700,hex:`#be185d`,rgb:`rgb(190 24 93)`,hsl:`hsl(335.1 77.6% 42%)`,oklch:`oklch(52% 0.2 4)`},800:{level:800,hex:`#9d174d`,rgb:`rgb(157 23 77)`,hsl:`hsl(335.8 74.4% 35.3%)`,oklch:`oklch(46% 0.17 4)`},900:{level:900,hex:`#831843`,rgb:`rgb(131 24 67)`,hsl:`hsl(335.9 69% 30.4%)`,oklch:`oklch(41% 0.14 2)`},950:{level:950,hex:`#500724`,rgb:`rgb(80 7 36)`,hsl:`hsl(336.2 83.9% 17.1%)`,oklch:`oklch(28% 0.1 4)`}},rose:{50:{level:50,hex:`#fff1f2`,rgb:`rgb(255 241 242)`,hsl:`hsl(355.7 100% 97.3%)`,oklch:`oklch(97% 0.02 12)`},100:{level:100,hex:`#ffe4e6`,rgb:`rgb(255 228 230)`,hsl:`hsl(355.6 100% 94.7%)`,oklch:`oklch(94% 0.03 13)`},200:{level:200,hex:`#fecdd3`,rgb:`rgb(254 205 211)`,hsl:`hsl(352.7 96.1% 90%)`,oklch:`oklch(89% 0.06 10)`},300:{level:300,hex:`#fda4af`,rgb:`rgb(253 164 175)`,hsl:`hsl(352.6 95.7% 81.8%)`,oklch:`oklch(81% 0.11 12)`},400:{level:400,hex:`#fb7185`,rgb:`rgb(251 113 133)`,hsl:`hsl(351.3 94.5% 71.4%)`,oklch:`oklch(72% 0.17 13)`},500:{level:500,hex:`#f43f5e`,rgb:`rgb(244 63 94)`,hsl:`hsl(349.7 89.2% 60.2%)`,oklch:`oklch(65% 0.22 16)`},600:{level:600,hex:`#e11d48`,rgb:`rgb(225 29 72)`,hsl:`hsl(346.8 77.2% 49.8%)`,oklch:`oklch(59% 0.22 18)`},700:{level:700,hex:`#be123c`,rgb:`rgb(190 18 60)`,hsl:`hsl(345.3 82.7% 40.8%)`,oklch:`oklch(51% 0.2 17)`},800:{level:800,hex:`#9f1239`,rgb:`rgb(159 18 57)`,hsl:`hsl(343.4 79.7% 34.7%)`,oklch:`oklch(45% 0.17 14)`},900:{level:900,hex:`#881337`,rgb:`rgb(136 19 55)`,hsl:`hsl(341.5 75.5% 30.4%)`,oklch:`oklch(41% 0.15 10)`},950:{level:950,hex:`#4c0519`,rgb:`rgb(76 5 25)`,hsl:`hsl(343.1 87.7% 15.9%)`,oklch:`oklch(27% 0.1 12)`}}},fm=Object.keys(dm),pm=[`slate`,`mist`,`gray`,`zinc`,`neutral`,`stone`,`taupe`,`olive`,`mauve`];om([cm]);var mm={xs:12,sm:14,md:16,lg:18,xl:20,"2xl":24},hm={"2xs":`0.125rem`,xs:`0.25rem`,sm:`0.375rem`,md:`0.5rem`,lg:`0.625rem`,xl:`0.75rem`,"2xl":`0.875rem`,"3xl":`1rem`,"4xl":`1.125rem`},gm=`0.25rem`,_m={compact:.75,default:1,relaxed:1.25,spacious:1.5},vm=`classic`,ym={class:`.dark`,media:`@media (prefers-color-scheme: dark)`};Object.keys(mm),Object.keys(hm),Object.keys(_m);var bm={geist:`Geist`,inter:`Inter`,"noto-sans":`Noto Sans`,"nunito-sans":`Nunito Sans`,figtree:`Figtree`,roboto:`Roboto`,raleway:`Raleway`,"dm-sans":`DM Sans`,"public-sans":`Public Sans`,outfit:`Outfit`,oxanium:`Oxanium`,manrope:`Manrope`,"space-grotesk":`Space Grotesk`,montserrat:`Montserrat`,"ibm-plex-sans":`IBM Plex Sans`,"source-sans-3":`Source Sans 3`,"instrument-sans":`Instrument Sans`},xm={"jetbrains-mono":`JetBrains Mono`,"geist-mono":`Geist Mono`},Sm={"noto-serif":`Noto Serif`,"roboto-slab":`Roboto Slab`,merriweather:`Merriweather`,lora:`Lora`,"playfair-display":`Playfair Display`,"eb-garamond":`EB Garamond`,"instrument-serif":`Instrument Serif`},Cm={system:void 0,...bm},wm={system:void 0,...xm},Tm={system:void 0,...Sm},Em={system:void 0,...bm,...xm,...Sm};Object.keys(Cm),Object.keys(Em),Object.keys(wm),Object.keys(Tm),[...Object.keys(Cm).filter(e=>e!==`system`),...Object.keys(wm).filter(e=>e!==`system`),...Object.keys(Tm).filter(e=>e!==`system`)];var Dm={base:`zinc`,primary:`indigo`,feedback:vm,surfaceStyle:`layered`,prefix:!1,size:`md`,radius:`md`,spacing:`default`,font:void 0,borderOpacity:1,format:`hsl`,styleTarget:`:root`,darkSelector:`class`},Om=fm,km=pm;function Am(e){return km.includes(e)}var jm=lm;function Mm(e){return typeof e==`string`&&e in dm}function Nm(e){return typeof e==`number`&&lm.includes(e)}function Pm(e){return e.replace(/^[a-z]+\(/i,``).replace(/\)$/,``)}function Fm(e){return typeof e==`string`&&e in um&&typeof um[e]!=`string`}function Im(e){let t=rm(e);return t.isValid()?t.alpha():void 0}function Lm(e,t){let n=rm(e);if(!n.isValid())return;let r=n.alpha(1);return Pm(t===`oklch`?r.toOklchString():r.toHslString())}function Rm(e,t=`md`){let n=e??t;return n in mm?`${mm[n]}px`:n}function zm(e,t=`md`){let n=e??t;return n in hm?hm[n]:n}function Bm(e){return typeof e==`string`&&Object.hasOwn(_m,e)}function Vm(e,t=`default`){let n=e??t,r=typeof n==`number`?n:Bm(n)?_m[n]:void 0;return r===void 0||!Number.isFinite(r)||r<=0||r===1?gm:`calc(${gm} * ${r})`}function Hm(e){return e===`class`||e===`media`?ym[e]:e}function Um(e,t){return t===`media`?e===`light`?`light dark`:null:e===`light`?`light`:`dark`}function Wm(e,t){return t===`media`?`light dark`:e===`light`?`light`:`dark`}function Gm(e){let[t,n]=e.split(`.`);return Mm(t)&&Nm(Number(n))}var Km=[`destructive`,`success`,`warning`,`info`],qm=[`primary`,...Km],Jm=[``,`-foreground`],Ym={"chart-1":600,"chart-2":500,"chart-3":400,"chart-4":300,"chart-5":200},Xm=Object.keys(Ym),Zm=[`background`,`card`,`popover`],Qm=[`muted`,`accent`,`accent-foreground`,`secondary`,`secondary-foreground`],$m=[`foreground`,`muted-foreground`,`card-foreground`,`popover-foreground`,`carbon-foreground`],eh=[`border`,`input`,`ring`],th=[`primary`,`primary-foreground`],nh=[`carbon`],rh=[`mask`],ih=[`sidebar`,`sidebar-foreground`,`sidebar-border`,`sidebar-accent`,`sidebar-accent-foreground`,`sidebar-primary`,`sidebar-primary-foreground`,`sidebar-ring`],ah=[`border`,`sidebar-border`,`input`],oh=[...ah,...rh],sh=[...Zm,...rh,...Qm,...$m,...eh,...th,...nh,...ih],ch=e=>lh.includes(e),lh=[...sh,...Km.flatMap(e=>Jm.map(t=>`${e}${t}`)),...Xm],uh={background:{kind:`level`,source:`base`,light:50,dark:950},card:{kind:`level`,source:`base`,light:`white`,dark:900},popover:{kind:`level`,source:`base`,light:`white`,dark:900},mask:{kind:`simple`,light:`black`,dark:`black`},muted:{kind:`level`,source:`base`,light:100,dark:800},accent:{kind:`level`,source:`base`,light:100,dark:800},"accent-foreground":{kind:`level`,source:`base`,light:900,dark:50},secondary:{kind:`level`,source:`base`,light:200,dark:800},"secondary-foreground":{kind:`level`,source:`base`,light:900,dark:50},foreground:{kind:`level`,source:`base`,light:900,dark:50},"muted-foreground":{kind:`level`,source:`base`,light:600,dark:400},"card-foreground":{kind:`mirror`,light:`foreground`,dark:`foreground`},"popover-foreground":{kind:`mirror`,light:`foreground`,dark:`foreground`},"carbon-foreground":{kind:`level`,source:`base`,light:50,dark:900},border:{kind:`level`,source:`base`,light:200,dark:`white`},input:{kind:`level`,source:`base`,light:200,dark:`white`},ring:{kind:`level`,source:`primary`,light:500,dark:500},primary:{kind:`level`,source:`primary`,light:500,dark:500,neutral:{light:800,dark:200}},"primary-foreground":{kind:`level`,source:`base`,light:50,dark:50,neutral:{light:50,dark:950}},carbon:{kind:`level`,source:`base`,light:800,dark:100},sidebar:{kind:`mirror`,light:`background`,dark:`muted`},"sidebar-foreground":{kind:`mirror`,light:`foreground`,dark:`foreground`},"sidebar-border":{kind:`mirror`,light:`border`,dark:`border`},"sidebar-accent":{kind:`mirror`,light:`accent`,dark:`accent`},"sidebar-accent-foreground":{kind:`mirror`,light:`accent-foreground`,dark:`accent-foreground`},"sidebar-primary":{kind:`mirror`,light:`primary`,dark:`primary`},"sidebar-primary-foreground":{kind:`mirror`,light:`primary-foreground`,dark:`primary-foreground`},"sidebar-ring":{kind:`mirror`,light:`ring`,dark:`ring`}},dh={border:{light:1,dark:.1},"sidebar-border":{light:1,dark:.1},input:{light:1,dark:.15},mask:{light:.25,dark:.3}},fh={light:50,dark:900},ph={size:`16px`,radius:`0.5rem`,"radius-2xs":`calc(var(--radius) * 0.25)`,"radius-xs":`calc(var(--radius) * 0.5)`,"radius-sm":`calc(var(--radius) * 0.75)`,"radius-md":`var(--radius)`,"radius-lg":`calc(var(--radius) * 1.25)`,"radius-xl":`calc(var(--radius) * 1.5)`,"radius-2xl":`calc(var(--radius) * 1.75)`,"radius-3xl":`calc(var(--radius) * 2)`,"radius-4xl":`calc(var(--radius) * 2.25)`,"radius-none":`0`,"radius-full":`9999px`,"spacing-unit":gm,"z-layout":`10`,"z-base":`50`,"z-toast":`100`,"z-max":`2147483647`,"border-width":`1px`,"border-width-strong":`2px`,"ring-width":`3px`,"ring-offset-width":`2px`,"font-sans":`ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif`,"font-heading":`ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif`,"font-mono":`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`,"font-serif":`ui-serif, Georgia, Cambria, "Times New Roman", Times, serif`},mh=[`radius-none`,`radius-full`];Object.keys(ph).filter(e=>e.startsWith(`radius-`)&&!mh.includes(e)).map(e=>e.slice(7));function hh(e,t){let n=ph[`font-${e}`],r=t?.trim();return r?r.includes(`,`)?r:`${r}, ${n}`:n}function gh(e){return{"font-sans":hh(`sans`,e?.sans),"font-heading":hh(`heading`,e?.heading),"font-mono":hh(`mono`,e?.mono),"font-serif":hh(`serif`,e?.serif)}}function _h(e,t){return t?`--${t}-${e}`:`--${e}`}function vh(e){let{size:t,radius:n,spacingUnit:r=ph[`spacing-unit`],font:i,prefix:a=!1}=e,o=`var(${_h(`radius`,a)})`;return Object.entries({...ph,size:t,radius:n,"spacing-unit":r,...gh(i)}).reduce((e,[t,n])=>{let r=n.replaceAll(`var(--radius)`,o);return Object.assign(e,{[t]:r})},{})}var yh={classic:{light:{destructive:`red.500`,success:`green.500`,warning:`amber.500`,info:`blue.500`},dark:{destructive:`red.400`,success:`green.400`,warning:`amber.400`,info:`blue.400`}},vivid:{light:{destructive:`red.500`,success:`emerald.500`,warning:`amber.500`,info:`sky.500`},dark:{destructive:`red.400`,success:`emerald.400`,warning:`amber.400`,info:`sky.400`}},subtle:{light:{destructive:`rose.500`,success:`emerald.500`,warning:`amber.500`,info:`indigo.500`},dark:{destructive:`rose.300`,success:`emerald.300`,warning:`amber.300`,info:`indigo.300`}},modern:{light:{destructive:`red.500`,success:`emerald.500`,warning:`orange.500`,info:`sky.500`},dark:{destructive:`red.400`,success:`emerald.400`,warning:`orange.400`,info:`sky.400`}},professional:{light:{destructive:`red.500`,success:`green.600`,warning:`amber.600`,info:`blue.600`},dark:{destructive:`red.300`,success:`green.300`,warning:`amber.300`,info:`blue.300`}}};function bh(e){return yh[e??`classic`]??yh.classic}function xh(e){let[t,n]=e.split(`.`);return{palette:t,level:Number(n)}}function Sh(e,t){let{mode:n,base:r,primary:i}=t,a=e.neutral!==void 0&&Am(i)&&e.neutral?e.neutral:e,o=n===`light`?a.light:a.dark,s=e.source===`base`?r:i;return o===`white`?{kind:`simple`,name:`white`}:{kind:`palette`,palette:s,level:o}}function Ch(e,t){let n=e=>({kind:`palette`,palette:t,level:e});return{background:e===`light`?{kind:`simple`,name:`white`}:n(950),card:e===`light`?{kind:`simple`,name:`white`}:n(900),popover:e===`light`?{kind:`simple`,name:`white`}:n(900)}}function wh(e,t){return e?.split(`.`)[0]||t}function Th(e){let{mode:t,base:n,primary:r,feedback:i,surfaceStyle:a}=e,o=[];Object.entries(uh).forEach(([e,i])=>{let a=e;if(i.kind===`level`){o.push([a,Sh(i,{mode:t,base:n,primary:r})]);return}if(i.kind===`simple`){o.push([a,{kind:`simple`,name:t===`light`?i.light:i.dark}]);return}});let s=(t===`light`?bh(i).light:bh(i).dark)??{};Km.forEach(e=>{let r=s[e],i=wh(r,n),a=r?xh(r).level:500;o.push([e,{kind:`palette`,palette:i,level:a}]),o.push([`${e}-foreground`,{kind:`palette`,palette:n,level:fh[t]}])}),Xm.forEach(e=>{o.push([e,{kind:`palette`,palette:r,level:Ym[e]}])});let c=Object.fromEntries(o);return a===`flat`?{...c,...Ch(t,n)}:c}function Eh(e){let t=Object.keys({...uh}).concat(Km.flatMap(e=>Jm.map(t=>`${e}${t}`)),[...Xm]).filter(t=>e[t]===void 0);if(t.length>0)throw Error(`[@vean/theme] theme map is missing tokens: ${t.join(`, `)}`);return e}function Dh(e,t){return Object.entries(uh).filter(([,e])=>e.kind===`mirror`).reduce((n,[r,i])=>{if(i.kind!==`mirror`)return n;let a=e[t===`light`?i.light:i.dark];return a?{...n,[r]:a}:n},{...e})}function Oh(e){return vh({size:Rm(e.size),radius:zm(e.radius),spacingUnit:Vm(e.spacing),font:e.font,prefix:e.prefix??Dm.prefix})}function kh(e){return e.startsWith(`token.`)}function Ah(e,t){if(!kh(e))return;let n=e.slice(6);if(ch(n)&&n!==t)return n}function jh(e){if(Gm(e)){let{palette:t,level:n}=xh(e);return{kind:`palette`,palette:t,level:n}}return Fm(e)?{kind:`simple`,name:e}:rm(e).isValid()?{kind:`color`,value:e}:void 0}function Mh(e,t){let n=new Set([e]),r=e;for(;;){let e=t.get(r);if(e===void 0)return r;if(n.has(e))return;n.add(e),r=e}}function Nh(e,t,n){let r=Object.entries(t??{}).filter(([e])=>ch(e));if(r.length===0)return{map:e,alpha:{}};let i=e=>oh.includes(e),a=r.map(([e,t])=>[e,Ah(t,e)]).filter(e=>e[1]!==void 0),o=r.filter(([,e])=>!kh(e)),s=Object.fromEntries(o.map(([e,t])=>[e,jh(t)]).filter(e=>e[1]!==void 0).filter(([e,t])=>t.kind!==`color`||i(e)||(Im(t.value)??1)>0)),c=Object.fromEntries(o.filter(([e])=>i(e)).map(([e,t])=>[e,Im(t)]).filter(e=>e[1]!==void 0&&e[1]<1)),l=new Map(a),u=a.flatMap(([t])=>{let n=Mh(t,l),r=n===void 0?void 0:s[n]??e[n];return r===void 0?[]:[[t,r]]}),d=a.flatMap(([e])=>{if(!i(e))return[];let t=Mh(e,l);if(t===void 0||!i(t))return[];let r=t in c?c[t]:dh[t][n];return r===void 0?[]:[[e,r]]});return{map:{...e,...s,...Object.fromEntries(u)},alpha:{...c,...Object.fromEntries(d)}}}function Ph(e={}){let t=e.base??Dm.base,n=e.primary??Dm.primary,r=e.surfaceStyle??Dm.surfaceStyle,i=e.feedback??Dm.feedback,a=e.borderOpacity??Dm.borderOpacity,o=Oh(e),s=a=>{let o=Nh(Eh(Dh(Th({mode:a,base:t,primary:n,feedback:i,surfaceStyle:r}),a)),a===`light`?e.overrides?.light:e.overrides?.dark,a);return{map:o.map,alpha:o.alpha}},c=s(`light`),l=s(`dark`);return{light:c.map,dark:l.map,alpha:Object.fromEntries(Object.entries(dh).map(([e,t])=>{let n=ah.includes(e)?a:1,r=e;return[r,{light:(c.alpha[r]??t.light)*n,dark:(l.alpha[r]??t.dark)*n}]})),literal:o}}var Fh=e=>e?`--${e}-`:`--`;function Ih(e,t){return`${Fh(t)}${e}`}function Lh(e,t){return e.kind===`palette`?`var(--${e.palette}-${e.level})`:e.kind===`simple`?`var(--${e.name})`:Lm(e.value,t)??e.value}function Rh(e){return e.filter(Boolean).join(`
|
|
24
24
|
`)}function zh(e,t={}){let{styleTarget:n=`:root`,format:r=`hsl`,darkSelector:i=`class`,weakSelectors:a=!1}=t,o=e=>{let t=Um(e,i);return t?[` color-scheme: ${t};`]:[]},s=e=>{let t=e===`light`?n:Hm(i);return!a||e===`dark`?a?`:where(${t})`:t:`:where(${t})`},c=Object.entries(e.literal).map(([e,n])=>` ${_h(e,t.prefix??!1)}: ${n};`),l=n=>Object.keys(e.light).map(i=>{let a=e[n][i];return` ${Ih(i,t.prefix)}: ${Lh(a,r)};`}),u=n=>oh.map(r=>` ${Fh(t.prefix)}${r}-alpha: ${e.alpha[r][n]};`),d=qm.flatMap(n=>{let r=e.light[n];return r.kind===`palette`?jm.map(e=>` ${Fh(t.prefix)}${n}-${e}: var(--${r.palette}-${e});`):[]}),f=[...o(`light`),...l(`light`),...d,...u(`light`),...c],p=[...o(`dark`),...Object.keys(e.light).filter(t=>Lh(e.dark[t],r)!==Lh(e.light[t],r)).map(n=>` ${Ih(n,t.prefix)}: ${Lh(e.dark[n],r)};`),...u(`dark`)];return[`${s(`light`)} {\n${Rh(f)}\n}`,`${s(`dark`)} {\n${Rh(p)}\n}`].join(`
|
|
25
25
|
|
|
26
|
-
`)}new Set(oh);var Bh=mm,Vh={xs:`xs`,sm:`xs`,md:`sm`,lg:`md`,xl:`lg`,"2xl":`xl`};Object.fromEntries(Object.entries(Bh).map(([e,t])=>[e,t/Bh.md]));var Hh=`__VEAN_THEME`,Uh=`vean-theme`,Wh=65536;function Gh(){if(typeof window>`u`)return null;try{return window.localStorage??null}catch{return null}}var Kh=e=>typeof e==`object`&&!!e&&!Array.isArray(e),qh=e=>e===`light`||e===`dark`||e===`auto`,Jh=e=>e===`layered`||e===`flat`,Yh=e=>typeof e==`string`&&e.trim().length>0;function Xh(e){return Kh(e)?[`sans`,`heading`,`mono`,`serif`].every(t=>{let n=e[t];return n===void 0||Yh(n)}):!1}var Zh={surface:`card`,elevated:`popover`,"sidebar-surface":`sidebar`,scrim:`mask`};function Qh(e,t){if(ch(e))return e;if(t>=2)return;let n=Zh[e];return n&&ch(n)?n:void 0}function $h(e,t){if(!Kh(e))return;let n=Object.entries(e).flatMap(([e,n])=>{if(typeof n!=`string`||n.length===0)return[];let r=Qh(e,t);return r?[[r,n]]:[]});return n.length>0?Object.fromEntries(n):void 0}function eg(e,t){if(!Kh(e))return;let n=$h(e.light,t),r=$h(e.dark,t);return n||r?{...n?{light:n}:{},...r?{dark:r}:{}}:void 0}function tg(e,t){if(!Kh(e))return;if(t>=2)return e;let n=Object.entries(e).flatMap(([e,n])=>{if(!Kh(n))return[[e,n]];let r=$h(n.light,t);if(!r)return[];let i=$h(n.dark,t);return[[e,i?{light:r,dark:i}:{light:r}]]});return n.length>0?Object.fromEntries(n):void 0}function ng(e,t=2){if(!Kh(e))return{};let n={},r=(t,r)=>{e[t]!==void 0&&r(e[t])&&(n[t]=e[t])};r(`base`,e=>Mm(e)&&Om.includes(e)),r(`primary`,e=>Mm(e)&&Om.includes(e)),r(`feedback`,e=>typeof e==`string`&&e.length>0),r(`surfaceStyle`,Jh),r(`prefix`,e=>e===!1||typeof e==`string`&&e.length>0),r(`size`,e=>typeof e==`string`&&e.length>0),r(`radius`,e=>typeof e==`string`&&e.length>0),r(`spacing`,e=>Bm(e)||typeof e==`number`&&Number.isFinite(e)&&e>0&&e<=4),r(`font`,Xh),r(`borderOpacity`,e=>typeof e==`number`&&e>=0&&e<=1),r(`format`,e=>e===`hsl`||e===`oklch`),r(`styleTarget`,e=>e===`html`||e===`:root`),r(`darkSelector`,e=>typeof e==`string`&&e.length>0);let i=eg(e.overrides,t);return i&&(n.overrides=i),n}function rg(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(!Kh(t))return null;let n=typeof t.v==`number`&&Number.isInteger(t.v)&&t.v>0?t.v:0;if(n>2)return null;let r={v:2,options:ng(t.options,n)};qh(t.mode)&&(r.mode=t.mode),n>=2&&typeof t.style==`string`&&t.style.length>0&&t.style.length<=Wh&&(r.style=t.style);let i=tg(t.presets,n);return i&&(r.presets=i),typeof t.appliedPreset==`string`&&t.appliedPreset.length>0&&(i===void 0||t.appliedPreset in i)&&(r.appliedPreset=t.appliedPreset),r}function ig(e=Hh){let t=null;try{t=Gh()?.getItem(e)??null}catch{return null}return rg(t)}function ag(e,t=Hh){let n=Gh();if(!n)return!1;let r={v:2,...e};r.style&&r.style.length>Wh&&delete r.style;try{return n.setItem(t,JSON.stringify(r)),!0}catch{return!1}}function og(e={}){let{key:t=Hh,delay:n=250}=e,r=null,i=null,a=()=>{i!==null&&(clearTimeout(i),i=null),r&&=(ag(r,t),null)};return{write:e=>{r=e,i===null&&(i=setTimeout(a,n))},flush:a,cancel:()=>{i!==null&&(clearTimeout(i),i=null),r=null}}}function sg(e,t){return zh(Ph(e),{prefix:e.prefix??Dm.prefix,styleTarget:e.styleTarget,darkSelector:e.darkSelector,format:e.format,...t})}function cg(){let e=nf();return U(()=>{let t=Qd(e?.locale??`en`),n=e?.messages;return n?Gu(n,t):t})}var lg=fl({base:[`inline-flex items-center justify-center font-medium transition-all-150`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-card`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],variants:{color:{primary:`focus-visible:ring-primary/30`,destructive:`focus-visible:ring-destructive/30`,success:`focus-visible:ring-success/30`,warning:`focus-visible:ring-warning/30`,info:`focus-visible:ring-info/30`,carbon:`focus-visible:ring-carbon/30`,secondary:`focus-visible:ring-secondary-foreground/20 text-secondary-foreground`,accent:`focus-visible:ring-accent-foreground/10 text-accent-foreground`},variant:{solid:``,pure:`border border-border bg-card text-accent-foreground data-[normal]:hover:bg-accent data-[normal]:active:bg-accent-foreground/10`,plain:`border border-border bg-card text-foreground`,outline:`border bg-card`,dashed:`border border-dashed bg-card`,soft:`bg-primary/10 data-[normal]:hover:bg-primary/10 data-[normal]:active:bg-primary/20`,ghost:`bg-transparent`,link:`bg-transparent underline-offset-4 data-[normal]:hover:underline`},size:{xs:`gap-1 text-2xs`,sm:`gap-2 text-xs`,md:`gap-3 text-sm`,lg:`gap-4 text-base`,xl:`gap-5 text-lg`,"2xl":`gap-6 text-xl`},shape:{auto:`rounded-md`,rounded:`rounded-full`,square:`rounded-md`,circle:`rounded-full`},shadow:{none:`shadow-none`,sm:`shadow-sm`,md:`shadow-md`,lg:`shadow-lg`},fitContent:{true:`w-fit h-fit`,false:``}},compoundVariants:[{color:`primary`,variant:`solid`,class:`bg-primary text-primary-foreground data-[normal]:hover:bg-primary/80 data-[normal]:active:bg-primary-600`},{color:`destructive`,variant:`solid`,class:`bg-destructive text-destructive-foreground data-[normal]:hover:bg-destructive/80 data-[normal]:active:bg-destructive-600`},{color:`success`,variant:`solid`,class:`bg-success text-success-foreground data-[normal]:hover:bg-success/80 data-[normal]:active:bg-success-600`},{color:`warning`,variant:`solid`,class:`bg-warning text-warning-foreground data-[normal]:hover:bg-warning/80 data-[normal]:active:bg-warning-600`},{color:`info`,variant:`solid`,class:`bg-info text-info-foreground data-[normal]:hover:bg-info/80 data-[normal]:active:bg-info-600`},{color:`carbon`,variant:`solid`,class:`bg-carbon text-carbon-foreground data-[normal]:hover:bg-carbon/80 data-[normal]:active:bg-carbon`},{color:`secondary`,variant:[`solid`,`soft`],class:`bg-secondary`},{color:`accent`,variant:[`solid`,`soft`],class:`bg-accent`},{color:`primary`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-primary`},{color:`destructive`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-destructive`},{color:`success`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-success`},{color:`warning`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-warning`},{color:`info`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-info`},{color:`carbon`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-carbon`},{color:`primary`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-primary/10 data-[normal]:active:bg-primary/20`},{color:`destructive`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-destructive/10 data-[normal]:active:bg-destructive/20`},{color:`success`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-success/10 data-[normal]:active:bg-success/20`},{color:`warning`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-warning/10 data-[normal]:active:bg-warning/20`},{color:`info`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-info/10 data-[normal]:active:bg-info/20`},{color:`carbon`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-carbon/10 data-[normal]:active:bg-carbon/20`},{color:`secondary`,variant:[`solid`,`outline`,`dashed`,`soft`,`ghost`],class:`data-[normal]:hover:bg-secondary data-[normal]:active:bg-secondary-foreground/20`},{color:`accent`,variant:[`solid`,`outline`,`dashed`,`soft`,`ghost`],class:`data-[normal]:hover:bg-accent data-[normal]:active:bg-accent-foreground/10`},{color:`primary`,variant:`plain`,class:`data-[normal]:hover:border-primary data-[normal]:hover:text-primary`},{color:`destructive`,variant:`plain`,class:`data-[normal]:hover:border-destructive data-[normal]:hover:text-destructive`},{color:`success`,variant:`plain`,class:`data-[normal]:hover:border-success data-[normal]:hover:text-success`},{color:`warning`,variant:`plain`,class:`data-[normal]:hover:border-warning data-[normal]:hover:text-warning`},{color:`info`,variant:`plain`,class:`data-[normal]:hover:border-info data-[normal]:hover:text-info`},{color:`carbon`,variant:`plain`,class:`data-[normal]:hover:border-carbon data-[normal]:hover:text-carbon`},{color:`secondary`,variant:`plain`,class:`data-[normal]:hover:border-secondary-foreground/20`},{color:`accent`,variant:`plain`,class:`data-[normal]:hover:border-accent-foreground/10`},{color:`primary`,variant:[`outline`,`dashed`],class:`border-primary`},{color:`destructive`,variant:[`outline`,`dashed`],class:`border-destructive`},{color:`success`,variant:[`outline`,`dashed`],class:`border-success`},{color:`warning`,variant:[`outline`,`dashed`],class:`border-warning`},{color:`info`,variant:[`outline`,`dashed`],class:`border-info`},{color:`carbon`,variant:[`outline`,`dashed`],class:`border-carbon`},{color:`secondary`,variant:[`outline`,`dashed`],class:`border-secondary-foreground/20`},{color:`accent`,variant:[`outline`,`dashed`],class:`border-accent-foreground/10`},{color:`destructive`,variant:`soft`,class:`bg-destructive/10 data-[normal]:hover:bg-destructive/10 data-[normal]:active:bg-destructive/20`},{color:`success`,variant:`soft`,class:`bg-success/10 data-[normal]:hover:bg-success/10 data-[normal]:active:bg-success/20`},{color:`warning`,variant:`soft`,class:`bg-warning/10 data-[normal]:hover:bg-warning/10 data-[normal]:active:bg-warning/20`},{color:`info`,variant:`soft`,class:`bg-info/10 data-[normal]:hover:bg-info/10 data-[normal]:active:bg-info/20`},{color:`carbon`,variant:`soft`,class:`bg-carbon/10 data-[normal]:hover:bg-carbon/10 data-[normal]:active:bg-carbon/20`},{size:`xs`,fitContent:!0,class:`p-0.75`},{size:`sm`,fitContent:!0,class:`p-0.875`},{size:`md`,fitContent:!0,class:`p-1`},{size:`lg`,fitContent:!0,class:`p-1.25`},{size:`xl`,fitContent:!0,class:`p-1.5`},{size:`2xl`,fitContent:!0,class:`p-1.75`},{size:`xs`,fitContent:!1,class:`h-6 px-1.5`},{size:`sm`,fitContent:!1,class:`h-7 px-2`},{size:`md`,fitContent:!1,class:`h-8 px-4`},{size:`lg`,fitContent:!1,class:`h-9 px-6`},{size:`xl`,fitContent:!1,class:`h-10 px-8`},{size:`2xl`,fitContent:!1,class:`h-12 px-10`},{shape:[`square`,`circle`],fitContent:!1,class:`p-0 gap-0`},{size:`xs`,fitContent:!1,shape:[`square`,`circle`],class:`w-6`},{size:`sm`,fitContent:!1,shape:[`square`,`circle`],class:`w-7`},{size:`md`,fitContent:!1,shape:[`square`,`circle`],class:`w-8`},{size:`lg`,fitContent:!1,shape:[`square`,`circle`],class:`w-9`},{size:`xl`,fitContent:!1,shape:[`square`,`circle`],class:`w-10`},{size:`2xl`,fitContent:!1,shape:[`square`,`circle`],class:`w-12`},{variant:[`ghost`,`link`],shadow:[`sm`,`md`,`lg`],class:`shadow-none`},{variant:`plain`,shadow:`sm`,class:`active:shadow-md`},{variant:`plain`,shadow:`md`,class:`active:shadow-lg`},{variant:`plain`,shadow:`lg`,class:`active:shadow-xl`},{variant:`pure`,shadow:`sm`,class:`active:shadow-sm`},{variant:`pure`,shadow:`md`,class:`active:shadow-md`},{variant:`pure`,shadow:`lg`,class:`active:shadow-lg`}],defaultVariants:{color:`primary`,variant:`solid`,size:`md`,shape:`auto`,shadow:`sm`,fitContent:!1}});fl({base:`[&>*]:relative focus-visible:[&>*]:z-2 not-first:not-last:[&>*]:rounded-0`,variants:{orientation:{horizontal:`inline-flex not-last:[&>*]:border-e-0 focus-visible:[&>*]:border-e first:[&>*]:rounded-e-0 last:[&>*]:rounded-s-0`,vertical:`flex flex-col not-last:[&>*]:border-b-0 focus-visible:[&>*]:border-b first:[&>*]:rounded-b-0 last:[&>*]:rounded-t-0`}},defaultVariants:{orientation:`horizontal`}});var ug=zl(lg,{size:`md`,color:`accent`,variant:`ghost`,shape:`square`,fitContent:!0}),dg=_l(lg,e=>({...e,size:Vh[e.size??`md`]})),fg=_l(ug,e=>({...e,size:Vh[e.size??`md`]})),pg=Nl({extendBase:e=>({close:fg({size:e.size}),cancel:dg({size:e.size,variant:`pure`}),action:dg({size:e.size})}),slots:{toaster:[`fixed z-[--z-index] list-none outline-none transition-transform-400 ease`,`data-[x-position=right]:end-[--offset-right] data-[x-position=left]:start-[--offset-left] data-[x-position=center]:start-1/2 data-[x-position=center]:-translate-x-1/2 [&[dir=rtl]]:data-[x-position=center]:translate-x-1/2`,`data-[y-position=top]:top-[--offset-top] data-[y-position=bottom]:bottom-[--offset-bottom]`,`max-[600px]:w-full max-[600px]:data-[x-position=right]:start-[--mobile-offset-left] max-[600px]:data-[x-position=left]:end-[--mobile-offset-right] max-[600px]:data-[x-position=center]:start-[--mobile-offset-left] max-[600px]:data-[x-position=center]:end-[--mobile-offset-right] max-[600px]:data-[x-position=center]:[transform:none]`,`max-[600px]:data-[y-position=top]:top-[--mobile-offset-top] max-[600px]:data-[y-position=bottom]:bottom-[--mobile-offset-bottom]`],toast:[`group absolute w-full rounded-md bg-popover text-popover-foreground border border-transparent opacity-0 outline-none touch-none`,`z-[--z-index] break-anywhere [--y:translateY(100%)] [--lift:1] [--lift-amount:calc(var(--lift)*var(--gap))] [transform:var(--y)]`,`[transition:transform_400ms,opacity_400ms,height_400ms,box-shadow_200ms] [box-shadow:0_4px_12px_hsl(var(--foreground)/0.1)]`,`focus-visible:[box-shadow:0_4px_12px_hsl(var(--foreground)/0.1),0_0_0_2px_hsl(var(--foreground)/0.2)] [&>*]:[transition:opacity_400ms]`,`data-[y-position=top]:top-0 data-[mounted=false]:data-[y-position=top]:[--y:translateY(-100%)] data-[mounted=true]:[--y:translateY(0)]`,`data-[y-position=bottom]:[--lift:-1] data-[y-position=bottom]:bottom-0`,`data-[x-position=left]:start-0 data-[x-position=right]:end-0`,`data-[swiping=true]:transition-none data-[swiping=true]:[transform:var(--y)_translateY(var(--swipe-amount-y,0px))_translateX(var(--swipe-amount-x,0px))]`,`data-[swiping=true]:before:content-empty data-[swiping=true]:before:absolute data-[swiping=true]:before:[inset-inline:-100%] data-[swiping=true]:before:h-full data-[swiping=true]:before:-z-1`,`data-[y-position=top]:data-[swiping=true]:before:bottom-1/2 data-[y-position=top]:data-[swiping=true]:before:[transform:scaleY(3)_translateY(50%)]`,`data-[y-position=bottom]:data-[swiping=true]:before:top-1/2 data-[y-position=bottom]:data-[swiping=true]:before:[transform:scaleY(3)_translateY(-50%)]`,`data-[swiping=false]:data-[removed=true]:before:content-empty data-[swiping=false]:data-[removed=true]:before:absolute data-[swiping=false]:data-[removed=true]:before:inset-0 data-[swiping=false]:data-[removed=true]:before:[transform:scaleY(2)]`,`data-[expanded=true]:after:content-empty data-[expanded=true]:after:absolute data-[expanded=true]:after:start-0 data-[expanded=true]:after:bottom-full data-[expanded=true]:after:w-full data-[expanded=true]:after:h-[calc(var(--gap)_+_1px)]`,`data-[mounted=true]:opacity-100 data-[visible=false]:pointer-events-none data-[visible=false]:data-[mounted=true]:opacity-0`,`data-[expanded=false]:data-[front=false]:[--scale:var(--toasts-before)*0.05_+_1] data-[expanded=false]:data-[front=false]:[--y:translateY(calc(var(--lift-amount)*var(--toasts-before)))_scale(calc(-1*var(--scale)))] data-[expanded=false]:data-[front=false]:h-[var(--front-toast-height)] [&[data-expanded=false][data-front=false]>*]:opacity-0`,`data-[mounted=true]:data-[expanded=true]:[--y:translateY(calc(var(--lift)*var(--offset)))] data-[mounted=true]:data-[expanded=true]:h-[var(--initial-height)]`,`data-[removed=true]:data-[front=true]:data-[swipe-out=false]:[--y:translateY(calc(var(--lift)*-100%))] data-[removed=true]:data-[front=true]:data-[swipe-out=false]:opacity-0`,`data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=true]:[--y:translateY(calc(var(--lift)*var(--offset)_+_var(--lift)*-100%))] data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=true]:opacity-0`,`data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=false]:[--y:translateY(40%)] data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=false]:opacity-0 data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=false]:[transition:transform_500ms,opacity_200ms]`,`data-[removed=true]:data-[front=false]:before:h-[calc(var(--initial-height)_+_20%)]`,`data-[swiped=true]:select-none`,`data-[swipe-out=true]:data-[y-position=top]:[animation-duration:200ms] data-[swipe-out=true]:data-[y-position=bottom]:[animation-duration:200ms]`,`data-[swipe-out=true]:data-[y-position=top]:[animation-timing-function:ease-out] data-[swipe-out=true]:data-[y-position=bottom]:[animation-timing-function:ease-out]`,`data-[swipe-out=true]:data-[y-position=top]:[animation-fill-mode:forwards] data-[swipe-out=true]:data-[y-position=bottom]:[animation-fill-mode:forwards]`,`data-[swipe-out=true]:data-[swipe-direction=left]:[animation-name:toast-swipe-out-left] data-[swipe-out=true]:data-[swipe-direction=right]:[animation-name:toast-swipe-out-right] data-[swipe-out=true]:data-[swipe-direction=up]:[animation-name:toast-swipe-out-up] data-[swipe-out=true]:data-[swipe-direction=down]:[animation-name:toast-swipe-out-down]`,`data-[rich-color=true]:data-[type=success]:bg-success-100 data-[rich-color=true]:data-[type=success]:border-success`,`data-[rich-color=true]:data-[type=info]:bg-info-100 data-[rich-color=true]:data-[type=info]:border-info`,`data-[rich-color=true]:data-[type=warning]:bg-warning-100 data-[rich-color=true]:data-[type=warning]:border-warning`,`data-[rich-color=true]:data-[type=error]:bg-destructive-100 data-[rich-color=true]:data-[type=error]:border-destructive`,`data-[inverted=true]:bg-carbon data-[inverted=true]:border-carbon data-[inverted=true]:text-carbon-foreground`],wrapper:`flex flex-col items-stretch`,content:``,title:`flex items-center font-semibold`,description:`text-muted-foreground`,icon:[`group-data-[type=info]:text-info group-data-[type=success]:text-success group-data-[type=warning]:text-warning group-data-[type=error]:text-destructive`],footer:`flex justify-end items-center`,action:``,cancel:``,close:[`absolute`,`group-data-[inverted=true]:text-accent group-data-[inverted=true]:hover:bg-accent/15`,`group-data-[rich-color=true]:group-data-[type=success]:hover:bg-success/15`,`group-data-[rich-color=true]:group-data-[type=info]:hover:bg-info/15`,`group-data-[rich-color=true]:group-data-[type=warning]:hover:bg-warning/15`,`group-data-[rich-color=true]:group-data-[type=error]:hover:bg-destructive/15`]},variants:{size:{xs:{toaster:`w-80 text-2xs`,toast:`p-3`,wrapper:`gap-1`,title:`gap-1.25`,footer:`gap-1.25`,close:`top-1 end-1`},sm:{toaster:`w-85 text-xs`,toast:`p-3.5`,wrapper:`gap-1.25`,title:`gap-1.5`,footer:`gap-1.5`,close:`top-1.25 end-1.25`},md:{toaster:`w-90 text-sm`,toast:`p-4`,wrapper:`gap-1.5`,title:`gap-2`,footer:`gap-2`,close:`top-1.5 end-1.5`},lg:{toaster:`w-95 text-base`,toast:`p-4.5`,wrapper:`gap-1.75`,title:`gap-2.5`,footer:`gap-2.5`,close:`top-1.75 end-1.75`},xl:{toaster:`w-100 text-lg`,toast:`p-5`,wrapper:`gap-2`,title:`gap-3`,footer:`gap-3`,close:`top-2 end-2`},"2xl":{toaster:`w-110 text-xl`,toast:`p-6`,wrapper:`gap-2.5`,title:`gap-4`,footer:`gap-4`,close:`top-2.5 end-2.5`}}},defaultVariants:{size:`md`}}),[mg,hg]=Wl(`Toaster`),[gg,_g]=af(`ToastUi`),vg=1,yg=new class{subscribers;toasts;dismissed;constructor(){this.subscribers=[],this.toasts=[],this.dismissed=new Set}subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);t>=0&&this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};resetDismissed=e=>{this.dismissed.has(e)&&this.dismissed.delete(e)};upsert=e=>{let t=this.toasts.findIndex(t=>t.id===e.id);if(t<0){this.publish(e),this.toasts=[...this.toasts,e];return}let n={...this.toasts[t],...e};this.publish(n),this.toasts=this.toasts.map((e,r)=>r===t?n:e)};create=e=>{let{message:t,dismissible:n=!0,...r}=e,i=Cg(e.id);this.resetDismissed(i);let a={...r,id:i,dismissible:n,title:t};return this.upsert(a),i};dismiss=e=>{if(e!==void 0)return this.dismissed.add(e),requestAnimationFrame(()=>this.publish({id:e,dismiss:!0})),e;this.toasts.forEach(e=>{this.dismissed.add(e.id),this.publish({id:e.id,dismiss:!0})})};message=(e,t)=>this.create({...t,message:e,type:`default`});error=(e,t)=>this.create({...t,message:e,type:`error`});success=(e,t)=>this.create({...t,message:e,type:`success`});info=(e,t)=>this.create({...t,message:e,type:`info`});warning=(e,t)=>this.create({...t,message:e,type:`warning`});loading=(e,t)=>this.create({...t,message:e,type:`loading`});custom=(e,t)=>{let n=Cg(t?.id),r=t?.dismissible??!0;return this.resetDismissed(n),this.upsert({custom:e,dismissible:r,id:n,...t}),n};promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(typeof e==`function`?e():e),i=n!==void 0,a,o=async(e,t,r,a)=>{i=!1;let{description:o,settings:s}=await wg(t,r,a,n);this.create({id:n,type:e,description:o,...s})},s=r.then(async e=>{if(a=[`resolve`,e],Va(e)){i=!1,this.create({id:n,type:`default`,message:e});return}if(Sg(e)&&!e.ok){await o(`error`,t.error,t.description,`HTTP error! status: ${e.status}`);return}if(e instanceof Error){await o(`error`,t.error,t.description,e);return}t.success!==void 0&&await o(`success`,t.success,t.description,e)}).catch(async e=>{a=[`reject`,e],t.error!==void 0&&await o(`error`,t.error,t.description,e)}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally?.()}),c=()=>new Promise((e,t)=>s.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:c}:Object.assign(n,{unwrap:c})};getActives=()=>this.toasts.filter(e=>!this.dismissed.has(e.id))},bg=yg.message,xg=Object.assign(bg,{success:yg.success,info:yg.info,warning:yg.warning,error:yg.error,custom:yg.custom,message:yg.message,promise:yg.promise,dismiss:yg.dismiss,loading:yg.loading},{getHistory:()=>yg.toasts,getToasts:()=>yg.getActives()});function Sg(e){return typeof e==`object`&&!!e&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`}function Cg(e){return typeof e==`number`||typeof e==`string`&&e.length>0?e:vg++}async function wg(e,t,n,r){let[i,a]=await Promise.all([Tg(e,n),Tg(t,n)]);return{description:a,settings:Dg(i,r)}}async function Tg(e,t){return typeof e==`function`?await e(t):e}function Eg(e){return typeof e==`object`&&!!e&&`message`in e}function Dg(e,t){return Eg(e)?e:{id:t??``,message:e??``}}var Og={gap:`--gap`,offsetTop:`--offset-top`,offsetRight:`--offset-right`,offsetBottom:`--offset-bottom`,offsetLeft:`--offset-left`,mobileOffsetTop:`--mobile-offset-top`,mobileOffsetRight:`--mobile-offset-right`,mobileOffsetBottom:`--mobile-offset-bottom`,mobileOffsetLeft:`--mobile-offset-left`,frontHeight:`--front-toast-height`},kg={index:`--index`,offset:`--offset`,beforeIndex:`--toasts-before`,zIndex:`--z-index`,swipeAmountX:`--swipe-amount-x`,swipeAmountY:`--swipe-amount-y`,swipeDirection:`--swipe-direction`,swipeOut:`--swipe-out`,initialHeight:`--initial-height`},Ag=`top-right`,jg=4e3,Mg={info:`lucide:info`,success:`lucide:circle-check`,warning:`lucide:circle-alert`,error:`lucide:circle-x`,close:`lucide:x`,loading:`svg-spinners:270-ring`},Ng=[`top-right`,`top-center`,`top-left`,`bottom-right`,`bottom-center`,`bottom-left`],Pg={left:`left`,right:`right`,top:`up`,bottom:`down`};function Fg(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(Pg[t]),n&&r.push(Pg[n]),r}var Ig=e=>{let t={top:Og.offsetTop,right:Og.offsetRight,bottom:Og.offsetBottom,left:Og.offsetLeft},n={top:Og.mobileOffsetTop,right:Og.mobileOffsetRight,bottom:Og.mobileOffsetBottom,left:Og.mobileOffsetLeft},r={};return Wu(t).forEach(i=>{let a=(typeof e==`number`?e:e[i])??24;r[t[i]]=`${a}px`,r[n[i]]=`calc(${a}px * 0.67)`}),r},Lg=e=>{if(!e)return{x:0,y:0};let t=e.style.getPropertyValue(kg.swipeAmountX),n=e.style.getPropertyValue(kg.swipeAmountY);return{x:Number(t.replace(`px`,``))||0,y:Number(n.replace(`px`,``))||0}},Rg=(e,t)=>{e&&(e.style.setProperty(kg.swipeAmountX,`${t.x}px`),e.style.setProperty(kg.swipeAmountY,`${t.y}px`))},zg=e=>{e&&Rg(e,{x:0,y:0})},Bg=e=>`dismiss`in e&&e.dismiss===!0,Vg=e=>[`altKey`,`ctrlKey`,`metaKey`,`shiftKey`].includes(e),Hg=e=>{let{id:t,position:n}=e,r=on([]),i=on([]),a=U(()=>r.value.filter(e=>N(t)&&e.toasterId===N(t)||!e.toasterId)),o=U(()=>{let e=new Set;return a.value.forEach(t=>{let r=t.position||N(n);e.add(r)}),Ng.forEach(t=>{e.has(t)||e.add(t)}),Array.from(e)});return{toasts:r,filtered:a,heights:i,allPositions:o,positionZIndex:U(()=>{let e={};return o.value.forEach((t,n)=>{e[t]=9999-n}),e}),allToasts:U(()=>{let e=Ng.reduce((e,t)=>(e[t]=[],e),{});return a.value.forEach(t=>{let r=t.position||N(n);e[r].push(t)}),e}),allHeights:U(()=>{let e=Ng.reduce((e,t)=>(e[t]=[],e),{});return i.value.forEach(t=>{e[t.position].push(t)}),e})}},Ug=P({name:`DynamicRender`,inheritAttrs:!1,__name:`dynamic-render`,props:{is:{}},setup(e){let t=xi();return(n,r)=>typeof e.is==`string`?(I(),L(F,{key:0},[V(A(e.is),1)],64)):(I(),R(ci(e.is),ge(Za({key:1},M(t))),null,16))}}),Wg=[`dir`,`data-rich-color`,`data-inverted`,`data-mounted`,`data-promise`,`data-swiped`,`data-removed`,`data-visible`,`data-y-position`,`data-x-position`,`data-index`,`data-front`,`data-swiping`,`data-dismissible`,`data-type`,`data-swipe-out`,`data-swipe-direction`,`data-expanded`,`data-testid`],Gg=P({name:`Toast`,__name:`toast`,props:{index:{},toast:{},position:{}},emits:[`update:height`,`remove`],setup(e,{emit:t}){let n=e,r=t,{dir:i,allToasts:a,allHeights:o,gap:s,duration:c,visibleCounts:l,defaultExpanded:u,swipeDirections:d,interactingPosition:f,expandedPosition:p,showIcon:m,showClose:h,icons:g,toastProps:_,wrapperProps:v,contentProps:y,titleProps:b,descriptionProps:x,iconProps:S,footerProps:C,actionProps:w,cancelProps:ee,closeProps:T}=hg(`Toast`),E=_g(),D=Lr(`toast`),te=Lr(`wrapper`),ne=Mu(),{height:re}=zu(te),ie=Pu(),O=on(null),ae=on(null),oe=on(!1),se=on(!1),ce=on(!1),le=on(!1),ue=on(0),de=on(0),fe=on(n.toast.duration??c.value),pe=on(null),me=on(0),he=on(0),k=on(null),ge=U(()=>n.toast.type),_e=U(()=>{if(m.value){if(n.toast.icon)return n.toast.icon;if(ge.value&&ge.value!=="default")return g.value[ge.value];if(n.toast.promise)return g.value.loading}}),ve=U(()=>n.index===0),ye=U(()=>n.index+1<=l.value),be=U(()=>ge.value===`loading`),xe=U(()=>n.toast.dismissible!==!1),Se=U(()=>Math.max(o.value[n.position].findIndex(e=>e.toastId===n.toast.id),0)),Ce=U(()=>(n.toast.showClose??h.value)&&xe.value&&ge.value!==`loading`),we=U(()=>n.toast.duration??c.value),Te=U(()=>{let[e,t]=n.position.split(`-`);return{x:t,y:e}}),Ee=U(()=>o.value[n.position].reduce((e,t,n)=>n>=Se.value?e:e+t.height,0)),A=U(()=>Se.value*s.value+Ee.value),De=U(()=>p.value===n.position||u.value&&ne.value),Oe=U(()=>({[kg.index]:n.index,[kg.beforeIndex]:n.index,[kg.zIndex]:a.value[n.position].length-n.index,[kg.offset]:`${oe.value?ue.value:A.value}px`,[kg.initialHeight]:u.value?`auto`:`${de.value}px`})),ke=()=>{oe.value=!0,ue.value=A.value,window.setTimeout(()=>{r(`remove`,n.toast)},200)},Ae=()=>{!be.value&&xe.value&&(ke(),n.toast.onDismiss?.(n.toast))},je=e=>{e.button!==2&&!be.value&&xe.value&&(pe.value=new Date,ue.value=A.value,e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(se.value=!0,k.value={x:e.clientX,y:e.clientY}))},Me=()=>{if(ce.value||!xe.value)return;k.value=null;let{x:e,y:t}=Lg(D.value),r=Date.now()-(pe.value?.getTime()??Date.now()),i=O.value===`x`?e:t,a=Math.abs(i)/Math.max(r,1);if(Math.abs(i)>=45||a>.11){ue.value=A.value,n.toast.onDismiss?.(n.toast),O.value===`x`?ae.value=e>0?`right`:`left`:ae.value=t>0?`down`:`up`,ke(),ce.value=!0;return}zg(D.value),le.value=!1,se.value=!1,O.value=null},Ne=e=>{if(!k.value||!xe.value||(typeof window<`u`?window.getSelection()?.toString().length??0:0)>0)return;let t=e.clientY-k.value.y,r=e.clientX-k.value.x,i=d.value??Fg(n.position);!O.value&&(Math.abs(r)>1||Math.abs(t)>1)&&(O.value=Math.abs(r)>Math.abs(t)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(O.value===`y`){if(i.includes(`up`)||i.includes(`down`)){if(i.includes(`up`)&&t<0||i.includes(`down`)&&t>0)a.y=t;else{let e=t*o(t);a.y=Math.abs(e)<Math.abs(t)?e:t}}}else if(O.value===`x`&&(i.includes(`left`)||i.includes(`right`))){if(i.includes(`left`)&&r<0||i.includes(`right`)&&r>0)a.x=r;else{let e=r*o(r);a.x=Math.abs(e)<Math.abs(r)?e:r}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&(le.value=!0),Rg(D.value,a)},Pe=()=>{se.value=!1,O.value=null,k.value=null},Fe=e=>{n.toast.onAction?.(e),!e.defaultPrevented&&ke()},Ie=e=>{n.toast.onCancel?.(e),xe.value&&ke()};function Le(e){de.value=e,r(`update:height`,{toastId:n.toast.id,height:e,position:n.toast.position??n.position})}function Re(){let e=D.value;if(!e)return;let t=e.style.height;e.style.height=`auto`;let n=e.getBoundingClientRect().height;e.style.height=t,Le(n)}return nr(we,e=>{fe.value=e},{immediate:!0}),nr(re,e=>{ne.value&&e&&Re()},{flush:`post`}),nr(()=>n.toast.delete,e=>{e&&(ke(),n.toast.onDismiss?.(n.toast))}),er(()=>{let e=n.toast;if(e.type===`loading`||e.promise||e.duration===1/0)return;let t;p.value===n.position||f.value===n.position||ie.value===`hidden`?(()=>{if(he.value<me.value){let e=Date.now()-me.value;fe.value-=e}he.value=Date.now()})():fe.value!==1/0&&(me.value=Date.now(),t=setTimeout(()=>{n.toast.onAutoClose?.(n.toast),ke()},fe.value)),xn(()=>{t!==void 0&&clearTimeout(t)})}),(t,n)=>(I(),L(`li`,Za(M(_),{ref:`toast`,"data-vean-toast":``,class:[M(E).toast,e.toast.ui?.toast],dir:M(i),tabindex:`0`,"data-rich-color":e.toast.richColor,"data-inverted":e.toast.inverted,"data-mounted":M(ne),"data-promise":!!e.toast.promise,"data-swiped":le.value,"data-removed":oe.value,"data-visible":ye.value,"data-y-position":Te.value.y,"data-x-position":Te.value.x,"data-index":e.index,"data-front":ve.value,"data-swiping":se.value,"data-dismissible":xe.value,"data-type":ge.value,"data-swipe-out":ce.value,"data-swipe-direction":ae.value,"data-expanded":De.value,"data-testid":e.toast.testId,style:Oe.value,onDragend:Pe,onPointerdown:je,onPointerup:Me,onPointermove:Ne}),[z(`div`,Za({ref:`wrapper`},M(v),{class:[M(E).wrapper,e.toast.ui?.wrapper],"data-vean-toast-wrapper":``}),[e.toast.custom?(I(),R(ci(e.toast.custom),{key:0})):(I(),L(F,{key:1},[z(`h3`,Za(M(b),{class:[M(E).title,e.toast.ui?.title],"data-vean-toast-title":``}),[_e.value?(I(),R(ff,Za({key:0},M(S),{icon:_e.value,class:[M(E).icon,e.toast.ui?.icon]}),null,16,[`icon`,`class`])):H(`v-if`,!0),B(Ug,{is:e.toast.title},null,8,[`is`])],16),e.toast.description?(I(),L(`p`,Za({key:0},M(x),{class:[M(E).description,e.toast.ui?.description],"data-vean-toast-description":``}),[B(Ug,{is:e.toast.description},null,8,[`is`])],16)):H(`v-if`,!0),e.toast.content?(I(),R(ci(e.toast.content),Za({key:1},M(y),{class:[M(E).content,e.toast.ui?.content],"data-vean-toast-content":``}),null,16,[`class`])):H(`v-if`,!0),e.toast.action||e.toast.cancel?(I(),L(`div`,Za({key:2},M(C),{class:[M(E).footer,e.toast.ui?.footer],"data-vean-toast-footer":``}),[e.toast.cancel?(I(),R(sm,Za({key:0},M(ee),{class:[M(E).cancel,e.toast.ui?.cancel],"data-vean-toast-cancel":``,onClick:Ie}),{default:qn(()=>[B(Ug,{is:e.toast.cancel},null,8,[`is`])]),_:1},16,[`class`])):H(`v-if`,!0),e.toast.action?(I(),R(sm,Za({key:1},M(w),{class:[M(E).action,e.toast.ui?.action],"data-vean-toast-action":``,onClick:Fe}),{default:qn(()=>[B(Ug,{is:e.toast.action},null,8,[`is`])]),_:1},16,[`class`])):H(`v-if`,!0)],16)):H(`v-if`,!0)],64))],16),Ce.value&&M(g)?.close?(I(),R(sm,Za({key:0},M(T),{class:[M(E).close,e.toast.ui?.close],"data-vean-toast-close":``,onClick:Ae}),{default:qn(()=>[B(ff,{icon:M(g)?.close},null,8,[`icon`])]),_:1},16,[`class`])):H(`v-if`,!0)],16,Wg))}}),Kg=[`aria-label`],qg=[`dir`,`data-y-position`,`data-x-position`,`onBlur`,`onFocus`,`onMouseenter`,`onMousemove`,`onMouseleave`,`onDragend`,`onPointerdown`,`onPointerup`],Jg=P({name:`Toaster`,inheritAttrs:!1,__name:`toaster`,props:{id:{},dir:{},hotkey:{default:()=>[`altKey`,`KeyT`]},customAriaLabel:{},containerAriaLabel:{default:`Notifications`},position:{default:Ag},defaultExpanded:{type:Boolean},duration:{default:jg},gap:{default:12},offset:{default:24},visibleCounts:{default:3},swipeDirections:{},showIcon:{type:Boolean},showClose:{type:Boolean},icons:{},toastProps:{},wrapperProps:{},contentProps:{},titleProps:{},descriptionProps:{},iconProps:{},footerProps:{},actionProps:{},cancelProps:{},closeProps:{}},setup(e){let t=e,n=xi(),r=_g(),i=rf(()=>t.dir),a=U(()=>t.hotkey.join(`+`).replace(/Key/g,``).replace(/Digit/g,``)),o=U(()=>t.customAriaLabel??`${t.containerAriaLabel} ${a.value}`),s={},c=(e,t)=>{s[e]=mu(t)},{toasts:l,allToasts:u,filtered:d,heights:f,allHeights:p,allPositions:m,positionZIndex:h}=Hg({id:()=>t.id,position:()=>t.position}),g=U(()=>({...Mg,...t.icons})),_=on(null),v=on(null),y=on(null),b=on(null),x=U(()=>({[Og.gap]:`${t.gap}px`,...Ig(t.offset)})),S=e=>{_.value===e&&(_.value=null),v.value===e&&(v.value=null),b.value===e&&(b.value=null)},C=e=>{s[e]?.focus()},w=e=>{if(f.value.findIndex(t=>t.toastId===e.toastId)!==-1){f.value=f.value.map(t=>t.toastId===e.toastId?e:t);return}let t=f.value.findIndex(t=>t.position===e.position);if(t!==-1){f.value=[...f.value.slice(0,t),e,...f.value.slice(t)];return}f.value=[e,...f.value]},ee=e=>{let t=l.value.findIndex(t=>t.id===e.id);if(t!==-1){let n=Object.assign({},l.value[t],e);l.value=[...l.value.slice(0,t),n,...l.value.slice(t+1)];return}l.value=[e,...l.value]},T=e=>{l.value=l.value.filter(t=>t.id!==e.id||(t.delete||yg.dismiss(e.id),!1)),f.value=f.value.filter(t=>t.toastId!==e.id)},E=(e,t)=>{let n=t.currentTarget;b.value===e&&n&&!n.contains(t.relatedTarget)&&(b.value=null,_.value===e&&v.value!==e&&(_.value=null),y.value&&=(y.value.focus({preventScroll:!0}),null))},D=(e,t)=>{t.target.dataset.dismissible!==`false`&&b.value!==e&&(b.value=e,y.value=t.relatedTarget)},te=e=>{_.value=e},ne=e=>{v.value!==e&&b.value!==e&&_.value===e&&(_.value=null)},re=(e,t)=>{t.target.dataset.dismissible!==`false`&&(v.value=e,_.value=e)},ie=e=>{v.value===e&&(v.value=null)};return mg({dir:i,allToasts:u,allHeights:p,interactingPosition:v,expandedPosition:_,icons:g,...hu(t,[`gap`,`duration`,`visibleCounts`,`defaultExpanded`,`swipeDirections`,`showIcon`,`showClose`,`toastProps`,`wrapperProps`,`contentProps`,`titleProps`,`descriptionProps`,`iconProps`,`footerProps`,`actionProps`,`cancelProps`,`closeProps`])}),er(()=>{let e=yg.subscribe(e=>{if(Bg(e)){requestAnimationFrame(()=>{l.value=l.value.map(t=>t.id===e.id?{...t,delete:!0}:t)});return}Fn(()=>{ee(e)})});xn(()=>{e()})},{flush:`post`}),nr(()=>l.value.length,e=>{e===0&&(_.value=null,v.value=null,b.value=null)}),nr(()=>d.value,e=>{let n=new Set(e.map(e=>e.position??t.position));_.value&&!n.has(_.value)&&(_.value=null),v.value&&!n.has(v.value)&&(v.value=null),b.value&&!n.has(b.value)&&(b.value=null)},{deep:!0}),er(()=>{if(!Gl)return;let e=e=>{if(t.hotkey.length>0&&t.hotkey.every(t=>Vg(t)?e[t]:e.code===t)){let e=d.value[0]?.position??t.position??m.value[0];_.value=e,C(e)}let n=Object.values(s).some(e=>e===document.activeElement||e?.contains(document.activeElement));e.code===`Escape`&&n&&(_.value=null,b.value=null)};document.addEventListener(`keydown`,e),xn(()=>{document.removeEventListener(`keydown`,e)})}),ei(()=>{y.value&&(y.value.focus({preventScroll:!0}),y.value=null,b.value=null)}),(e,t)=>(I(),L(F,null,[z(`section`,{"data-vean-toaster-container":``,"aria-label":o.value,tabindex:`-1`,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`},[(I(!0),L(F,null,di(M(Ng),e=>(I(),L(`ol`,Za({key:e},{ref_for:!0},M(n),{ref_for:!0,ref:t=>c(e,t),class:M(r).toaster,tabindex:`-1`,dir:M(i),"data-vean-toaster":``,"data-y-position":e.split(`-`)[0],"data-x-position":e.split(`-`)[1],style:{"--z-index":M(h)[e],"--front-toast-height":`${M(p)[e][0]?.height??0}px`,...x.value},onBlur:t=>E(e,t),onFocus:t=>D(e,t),onMouseenter:t=>te(e),onMousemove:t=>te(e),onMouseleave:t=>ne(e),onDragend:t=>S(e),onPointerdown:t=>re(e,t),onPointerup:t=>ie(e)}),[(I(!0),L(F,null,di(M(u)[e],(t,n)=>(I(),R(Gg,{key:t.id,index:n,toast:t,position:e,"onUpdate:height":w,onRemove:T},null,8,[`index`,`toast`,`position`]))),128))],16,qg))),128))],8,Kg),pi(e.$slots,`default`)],64))}}),Yg=P({name:`ToastProvider`,__name:`toast-provider`,props:{id:{},dir:{},hotkey:{},customAriaLabel:{},containerAriaLabel:{},position:{},defaultExpanded:{type:Boolean},duration:{},gap:{},offset:{},visibleCounts:{},swipeDirections:{},showIcon:{type:Boolean},showClose:{type:Boolean},icons:{},toastProps:{},wrapperProps:{},contentProps:{},titleProps:{},descriptionProps:{},iconProps:{},footerProps:{},actionProps:{},cancelProps:{},closeProps:{}},setup(e){let t=e;return(e,n)=>(I(),R(Jg,Za({"data-vean-toast-provider":``},t),{default:qn(()=>[pi(e.$slots,`default`)]),_:3},16))}}),Xg=P({name:`SToastProvider`,__name:`toast-provider`,props:{size:{},ui:{},id:{},dir:{},hotkey:{},customAriaLabel:{},containerAriaLabel:{},position:{},defaultExpanded:{type:Boolean},duration:{},gap:{},offset:{},visibleCounts:{},swipeDirections:{},showIcon:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},icons:{},toastProps:{},wrapperProps:{},contentProps:{},titleProps:{},descriptionProps:{},iconProps:{},footerProps:{},actionProps:{},cancelProps:{},closeProps:{}},setup(e){let t=e,n=Kd(t,[`size`,`ui`]);return gg(U(()=>pg({size:t.size},t.ui))),(e,t)=>(I(),R(M(Yg),ge(Ka(M(n))),{default:qn(()=>[pi(e.$slots,`default`)]),_:3},16))}});function Zg(){return typeof window>`u`}var Qg=Dm.base,$g=Dm.primary,e_=Dm.radius,t_=Dm.size,n_=Dm.spacing,r_=`light`,[i_,a_]=Wl(`UiThemeContext`),o_=e=>e===`media`?null:e===`class`?`dark`:e.replace(/^\./,``),s_=e=>!!e&&`light`in e;function c_(e){let t=e.isServer??Zg(),n=null;e.persistTheme&&(e.themeConfig?n=e.themeConfig:t||(n=ig()));let r=Gt({...n?.options,base:n?.options?.base??Qg,primary:n?.options?.primary??$g,radius:n?.options?.radius??e_,size:n?.options?.size??t_,spacing:n?.options?.spacing??n_,mode:n?.mode??r_}),i=U({get:()=>r.base??Qg,set:e=>{r.base=e}}),a=U({get:()=>r.primary??$g,set:e=>{r.primary=e}}),o=U({get:()=>r.radius??e_,set:e=>{r.radius=e}}),s=U({get:()=>r.size??t_,set:e=>{r.size=e}}),c=U({get:()=>r.spacing??n_,set:e=>{r.spacing=e}}),l=U({get:()=>r.mode??r_,set:e=>{r.mode=e}}),u=j(!1),d;!t&&typeof window<`u`&&typeof window.matchMedia==`function`&&(d=window.matchMedia(`(prefers-color-scheme: dark)`),u.value=d.matches);let f=e=>{u.value=e.matches};d?.addEventListener(`change`,f),ti(()=>{d?.removeEventListener(`change`,f)});let p=U(()=>l.value===`auto`?u.value?`dark`:`light`:l.value);nr(p,t=>{if(typeof document>`u`)return;let n=e.theme?.darkSelector??`class`,r=o_(n);if(document.documentElement.style.colorScheme=Wm(t,n),!r)return;let i=document.createElement(`style`);i.appendChild(document.createTextNode(`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`)),document.head.appendChild(i),document.documentElement.classList.toggle(r,t===`dark`),window.getComputedStyle(i).opacity,document.head.removeChild(i)},{immediate:!0});let m=j(0),h=j(n?.presets??{}),g=j(n?.appliedPreset??null),_=()=>{if(!e.persistTheme||e.themeConfig)return;let t=ig();t&&(Object.assign(r,t.options,{mode:t.mode??r.mode}),h.value=t.presets??{},g.value=t.appliedPreset??null),m.value++},v=e=>{let t={light:{primary:`${a.value}.600`,ring:`${a.value}.500`},dark:{primary:`${a.value}.400`,ring:`${a.value}.300`}};return h.value={...h.value,[e]:t},S(e),!0},y=e=>{if(!(e in h.value))return!1;let t={...h.value};return delete t[e],h.value=t,g.value===e&&S(null),!0},b=e=>{S(e)},x=()=>{S(null)},S=e=>{g.value=e},C=()=>{let n=e.theme?.preset;if(s_(n))return n;let r=n?.name??g.value;if(!r||!e.persistTheme)return;let i=t?e.presetProvider?.(r)??void 0:h.value[r];return!i&&t&&console.warn(`[SConfigProvider] theme preset "${r}" not found, falling back to built-in colors.`),i};return{base:i,primary:a,radius:o,size:s,spacing:c,mode:l,effectiveMode:p,setRadius:e=>{o.value=e},setSize:e=>{s.value=e},setSpacing:e=>{c.value=e},setMode:e=>{l.value=e},customPresets:h,appliedPresetName:g,savePreset:v,removePreset:y,applyPreset:b,resetPreset:x,theme:U(()=>{m.value;let t=e.theme??{},n=C(),i=t.overrides??r.overrides??(n?{light:n.light,...n.dark?{dark:n.dark}:{}}:void 0);return{base:t.base??r.base??Qg,primary:t.primary??r.primary??$g,feedback:t.feedback??r.feedback,overrides:i,size:t.size??r.size??e.size??t_,radius:t.radius??r.radius??e_,spacing:t.spacing??r.spacing,font:t.font??r.font,format:t.format??r.format,surfaceStyle:t.surfaceStyle??r.surfaceStyle,borderOpacity:t.borderOpacity??r.borderOpacity,styleTarget:t.styleTarget??r.styleTarget,darkSelector:t.darkSelector??r.darkSelector}}),setThemeState:e=>{Object.assign(r,e)},refreshThemeConfig:_}}var l_=Symbol.for(`UIConfigProvider`),u_=/^[a-z0-9]+(-[a-z0-9]+)*$/,d_=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!f_(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!f_(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!f_(e,n)?null:e}return null},f_=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function p_(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return Object.keys(n).concat(Object.keys(r)).forEach(a),i}var m_=Object.freeze({left:0,top:0,width:16,height:16}),h_=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),g_=Object.freeze({...m_,...h_}),__=Object.freeze({...g_,body:``,hidden:!1});function v_(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function y_(e,t){let n=v_(e,t);for(let r in __)r in h_?r in e&&!(r in n)&&(n[r]=h_[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function b_(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=y_(r[e]||i[e],a)}return o(t),n.forEach(o),y_(e,a)}function x_(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=p_(e);for(let i in r){let a=r[i];a&&(t(i,b_(e,i,a)),n.push(i))}return n}var S_={provider:``,aliases:{},not_found:{},...m_};function C_(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function w_(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!C_(e,S_))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!C_(t,__))return null}let r=t.aliases||Object.create(null);for(let e in r){let t=r[e],i=t.parent;if(!e||typeof i!=`string`||!n[i]&&!r[i]||!C_(t,__))return null}return t}var T_=Object.create(null);function E_(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function D_(e,t){let n=T_[e]||(T_[e]=Object.create(null));return n[t]||(n[t]=E_(e,t))}function O_(e,t){return w_(t)?x_(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function k_(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}var A_=!1;function j_(e){return typeof e==`boolean`&&(A_=e),A_}function M_(e){let t=typeof e==`string`?d_(e,!0,A_):e;if(t){let e=D_(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function N_(e,t){let n=d_(e,!0,A_);if(!n)return!1;let r=D_(n.provider,n.prefix);return t?k_(r,n.name,t):(r.missing.add(n.name),!0)}function P_(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),A_&&!t&&!e.prefix){let t=!1;return w_(e)&&(e.prefix=``,x_(e,(e,n)=>{N_(e,n)&&(t=!0)})),t}let n=e.prefix;return f_({prefix:n,name:`a`})?!!O_(D_(t,n),e):!1}var F_=Object.freeze({width:null,height:null}),I_=Object.freeze({...F_,...h_}),L_=/(-?[0-9.]*[0-9]+[0-9.]*)/g,R_=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function z_(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(L_);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=R_.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function B_(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function V_(e,t){return e?`<defs>`+e+`</defs>`+t:t}function H_(e,t,n){let r=B_(e);return V_(r.defs,t+r.content+n)}var U_=e=>e===`unset`||e===`undefined`||e===`none`;function W_(e,t){let n={...g_,...e},r={...I_,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`)}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=H_(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=z_(d,c/l)):(u=o===`auto`?c:o,d=s===null?z_(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{U_(t)||(f[e]=t.toString())};p(`width`,u),p(`height`,d);let m=[i.left,i.top,c,l];return f.viewBox=m.join(` `),{attributes:f,viewBox:m,body:a}}var G_=/\sid="(\S+)"/g,K_=new Map;function q_(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=K_.get(e)||0;return K_.set(e,t+1),t?`${e}${t}`:e}function J_(e){let t=[],n;for(;n=G_.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=q_(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}var Y_=Object.create(null);function X_(e,t){Y_[e]=t}function Z_(e){return Y_[e]||Y_[``]}function Q_(e){let t;if(typeof e.resources==`string`)t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||`/`,maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}for(var $_=Object.create(null),ev=[`https://api.simplesvg.com`,`https://api.unisvg.com`],tv=[];ev.length>0;)ev.length===1||Math.random()>.5?tv.push(ev.shift()):tv.push(ev.pop());$_[``]=Q_({resources:[`https://api.iconify.design`].concat(tv)});function nv(e,t){let n=Q_(t);return n!==null&&($_[e]=n,!0)}function rv(e){return $_[e]}var iv=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}})();function av(e,t){let n=rv(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{e=Math.max(e,t.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function ov(e){return e===404}var sv=(e,t,n)=>{let r=[],i=av(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function cv(e){if(typeof e==`string`){let t=rv(e);if(t)return t.path}return`/`}var lv={prepare:sv,send:(e,t,n)=>{if(!iv){n(`abort`,424);return}let r=cv(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;iv(e+r).then(e=>{let t=e.status;if(t!==200){setTimeout(()=>{n(ov(t)?`abort`:`next`,t)});return}return i=501,e.json()}).then(e=>{if(typeof e!=`object`||!e){setTimeout(()=>{e===404?n(`abort`,e):n(`next`,i)});return}setTimeout(()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})}};function uv(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function dv(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||uv([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var fv=0;function pv(e,t,n){let r=fv++,i=uv.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||=[]).push(a)}),i}function mv(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=D_(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}function hv(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?d_(e,t,n):e;i&&r.push(i)}),r}var gv={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function _v(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&=(clearTimeout(d),null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`){u=r,v();return}if(i){u=r,f.length||(o.length?x():v());return}if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function vv(e){let t={...gv,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=_v(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function yv(){}var bv=Object.create(null);function xv(e){if(!bv[e]){let t=rv(e);if(!t)return;bv[e]={config:t,redundancy:vv(t)}}return bv[e]}function Sv(e,t,n){let r,i;if(typeof e==`string`){let t=Z_(e);if(!t)return n(void 0,424),yv;i=t.send;let a=xv(e);a&&(r=a.redundancy)}else{let t=Q_(e);if(t){r=vv(t);let n=Z_(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),yv):r.query(t,i,n)().abort}function Cv(){}function wv(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,dv(e)}))}function Tv(e){let t=[],n=[];return e.forEach(e=>{(e.match(u_)?t:n).push(e)}),{valid:t,invalid:n}}function Ev(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&typeof n==`object`)try{if(!O_(e,n).length){r();return}}catch(e){console.error(e)}r(),wv(e)}function Dv(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function Ov(e,t){e.iconsToLoad=e.iconsToLoad?e.iconsToLoad.concat(t).sort():t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;let i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){Dv(e.loadIcons(r,n,t),t=>{Ev(e,r,t)});return}if(i){r.forEach(r=>{Dv(i(r,n,t),t=>{Ev(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=Tv(r);if(o.length&&Ev(e,o,null),!a.length)return;let s=n.match(u_)?Z_(t):null;if(!s){Ev(e,a,null);return}s.prepare(t,n,a).forEach(n=>{Sv(t,n,t=>{Ev(e,n.icons,t)})})}))}var kv=(e,t)=>{let n=mv(hv(e,!0,j_()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,Cv)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(D_(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=D_(t,n),o=a.pendingIcons||=new Set;o.has(i)||(o.add(i),r[t][n].push(i))}),i.forEach(e=>{let t=r[e.provider][e.prefix];t.length&&Ov(e,t)}),t?pv(t,n,i):Cv};function Av(e,t){let n={...e};for(let e in t){let r=t[e],i=typeof r;e in F_?(r===null||r&&(i===`string`||i===`number`))&&(n[e]=r):i===typeof n[e]&&(n[e]=e===`rotate`?r%4:r)}return n}var jv=/[\s,]+/;function Mv(e,t){t.split(jv).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0}})}function Nv(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}function Pv(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function Fv(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `).replace(/:/g,`%3A`).replace(/\//g,`%2F`)}function Iv(e){return`data:image/svg+xml,`+Fv(e)}function Lv(e){return`url("`+Iv(e)+`")`}var Rv={...I_,inline:!1},zv={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":!0,role:`img`},Bv={display:`inline-block`},Vv={backgroundColor:`currentColor`},Hv={backgroundColor:`transparent`},Uv={Image:`var(--svg)`,Repeat:`no-repeat`,Size:`100% 100%`},Wv={webkitMask:Vv,mask:Vv,background:Hv};for(let e in Wv){let t=Wv[e];for(let n in Uv)t[e+n]=Uv[n]}var Gv={};[`horizontal`,`vertical`].forEach(e=>{let t=e.slice(0,1)+`Flip`;Gv[e+`-flip`]=t,Gv[e.slice(0,1)+`-flip`]=t,Gv[e+`Flip`]=t});function Kv(e){return e+(e.match(/^[-0-9.]+$/)?`px`:``)}var qv=(e,t)=>{let n=Av(Rv,t),r={...zv},i=t.mode||`svg`,a={},o=t.style,s=typeof o==`object`&&!(o instanceof Array)?o:{};for(let e in t){let i=t[e];if(i!==void 0)switch(e){case`icon`:case`style`:case`onLoad`:case`mode`:case`ssr`:case`customise`:break;case`inline`:case`hFlip`:case`vFlip`:n[e]=i===!0||i===`true`||i===1;break;case`flip`:break;case`color`:a.color=i;break;case`rotate`:typeof i==`string`?n[e]=Nv(i):typeof i==`number`&&(n[e]=i);break;case`ariaHidden`:case`aria-hidden`:i!==!0&&i!==`true`&&delete r[`aria-hidden`];break;default:{let t=Gv[e];t?(i===!0||i===`true`||i===1)&&(n[t]=!0):Rv[e]===void 0&&(r[e]=i)}}}typeof t.flip==`string`&&Mv(n,t.flip);let c=W_(e,n),l=c.attributes;if(n.inline&&(a.verticalAlign=`-0.125em`),i===`svg`)return r.style={...a,...s},Object.assign(r,l),r.innerHTML=J_(c.body),bo(`svg`,r);let{body:u,width:d,height:f}=e,p=i===`mask`||i!==`bg`&&u.indexOf(`currentColor`)!==-1,m=Pv(u,{...l,width:d+``,height:f+``});return r.style={...a,"--svg":Lv(m),width:Kv(l.width),height:Kv(l.height),...Bv,...p?Vv:Hv,...s},bo(`span`,r)};if(j_(!0),X_(``,lv),typeof document<`u`&&typeof window<`u`){let e=window;if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!P_(e))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;nv(e,r)||console.error(n)}catch{console.error(n)}}}}var Jv={...g_,body:``},Yv=P((e,{emit:t})=>{let n=j(null);function r(){n.value&&=(n.value.abort?.(),null)}let i=j(!!e.ssr),a=j(``),o=on(null);function s(){let i=e.icon;if(typeof i==`object`&&i&&typeof i.body==`string`)return a.value=``,{data:i};let o;if(typeof i!=`string`||(o=d_(i,!1,!0))===null)return null;let s=M_(o);if(!s){let e=n.value;return(!e||e.name!==i)&&(s===null?n.value={name:i}:n.value={name:i,abort:kv([o],c)}),null}r(),a.value!==i&&(a.value=i,Fn(()=>{t(`load`,i)}));let l=e.customise;if(l){s=Object.assign({},s);let e=l(s.body,o.name,o.prefix,o.provider);typeof e==`string`&&(s.body=e)}let u=[`iconify`];return o.prefix!==``&&u.push(`iconify--`+o.prefix),o.provider!==``&&u.push(`iconify--`+o.provider),{data:s,classes:u}}function c(){let e=s();e?e.data!==o.value?.data&&(o.value=e):o.value=null}return i.value?c():Zr(()=>{i.value=!0,c()}),nr(()=>e.icon,c),ti(r),()=>{let t=o.value;if(!t)return qv(Jv,e);let n=e;return t.classes&&(n={...e,class:t.classes.join(` `)}),qv({...g_,...t.data},n)}},{props:{icon:{type:[String,Object],required:!0},mode:{type:String},ssr:{type:Boolean},width:{type:[String,Number]},height:{type:[String,Number]},style:{type:[String,Object]},color:{type:String},inline:{type:Boolean},rotate:{type:[Number,String]},hFlip:{type:Boolean},horizontalFlip:{type:Boolean},vFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{type:String},id:{type:String},ariaHidden:{type:[Boolean,String],default:void 0},customise:{type:Function},title:{type:String}},emits:[`load`]}),W=P({name:`SIcon`,__name:`icon`,props:{icon:{},ariaHidden:{type:Boolean,default:!0},ariaLabel:{},ariaLabelledby:{},ssr:{type:Boolean},customise:{},id:{},style:{},title:{},mode:{},color:{},flip:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},rotate:{},hFlip:{type:Boolean},vFlip:{type:Boolean},width:{},height:{},inline:{type:Boolean}},setup(e){let t=e,n=Zn(l_),r=U(()=>{let{width:e,height:r}=t,i=n?.iconify||{};return{width:e||i.width,height:r||i.height}}),i=U(()=>t.ariaLabel||t.ariaLabelledby?!1:t.ariaHidden),a=U(()=>({"aria-hidden":i.value,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby})),o=U(()=>s(t.icon)?{...a.value,"data-allow-mismatch":`class,attribute`,...r.value,mode:t.mode,color:t.color,flip:t.flip,horizontalFlip:t.horizontalFlip||void 0,verticalFlip:t.verticalFlip||void 0,rotate:t.rotate,hFlip:t.hFlip||void 0,vFlip:t.vFlip||void 0,inline:t.inline,id:t.id,style:t.style,title:t.title,ssr:t.ssr,customise:t.customise,icon:t.icon}:null);function s(e){return e?typeof e==`string`||typeof e==`object`&&`body`in e:!1}return(t,n)=>o.value?(I(),R(M(Yv),Za({key:0},o.value,{class:`shrink-0`,"data-vean-icon":``}),null,16)):e.icon?(I(),R(ci(e.icon),Za({key:1,class:`shrink-0`,"data-vean-icon":``},a.value,{style:{width:r.value.width,height:r.value.height}}),null,16,[`style`])):H(`v-if`,!0)}}),Xv=P({name:`ConfigProvider`,__name:`config-provider`,props:{dir:{},locale:{default:`en`},nonce:{default:void 0},tooltip:{},iconRender:{},linkComponent:{},messages:{}},setup(e){return tf(Jt(e)),(e,t)=>pi(e.$slots,`default`)}}),[Zv,Qv]=Wl(`DialogRoot`,e=>{let[t,n]=gu(),[r,i]=gu(),[a,o]=gu(),[s,c]=gu(),[l,u]=gu(),{open:d,fullscreen:f}=e,p=e=>{d.value=e},m=()=>{d.value=!d.value},h=e=>{f.value=e},g=()=>{f.value=!f.value},_=U(()=>lf(d.value)),v=on(``),y=`vean-dialog-popup-${Fr()}`,b=()=>{v.value||=y},x=on(``),S=`vean-dialog-title-${Fr()}`,C=()=>{x.value||=S},w=on(``),ee=`vean-dialog-description-${Fr()}`,T=()=>{w.value||=ee},E=async()=>{await Fn(),s.value?.focus({preventScroll:!0})};return{...e,onOpenChange:p,onOpenToggle:m,onFullscreenChange:h,onFullscreenToggle:g,dataState:_,overlayElement:t,setOverlayElement:n,triggerElement:r,setTriggerElement:i,popupElement:a,setPopupElement:o,cancelElement:s,setCancelElement:c,headerElement:l,setHeaderElement:u,popupId:v,initPopupId:b,titleId:x,initTitleId:C,descriptionId:w,initDescriptionId:T,focusCancel:E}}),[$v,ey]=Wl(`DialogProvider`,e=>{let{dialogs:t}=e;return{dialogs:t,getCurrentDialog:e=>t.value.find(t=>String(t.id)===String(e))}}),[ty,ny]=Wl(`DialogCompact`,e=>{let{dialog:t}=e;return{dialog:t}}),[ry,iy]=af(`DialogUi`),ay=(e=>{if(!e)return iy();let t=ny(),n=iy(e);return U(()=>{let r=t?.dialog?.value?.ui?.[e];return[n.value,r].filter(Boolean).join(` `)})}),oy=P({name:`DialogCancel`,__name:`dialog-cancel`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`cancel`],setup(e,{emit:t}){let n=e,r=t,i=ay(`cancel`),{setCancelElement:a,onOpenChange:o}=Qv(`DialogCancel`),s=async e=>{r(`cancel`,e),o(!1)};return(e,t)=>(I(),R(sm,Za({ref:M(a)},n,{"data-vean-dialog-cancel":``,class:M(i),onClick:s}),{default:qn(()=>[pi(e.$slots,`default`)]),_:3},16,[`class`]))}}),sy=P({name:`DialogClose`,__name:`dialog-close`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=xi(),a=ay(`close`),{onOpenChange:o}=Qv(`DialogClose`),s=cg(),c=U(()=>i[`aria-label`]??s.value.dialog.close),l=async e=>{r(`close`,e),o(!1)};return(e,t)=>(I(),R(sm,Za(n,{"data-vean-dialog-close":``,"aria-label":c.value,class:M(a),onClick:l}),{default:qn(()=>[pi(e.$slots,`default`,{},()=>[B(ff,{icon:`lucide:x`})])]),_:3},16,[`aria-label`,`class`]))}}),cy=P({name:`DialogConfirm`,__name:`dialog-confirm`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`confirm`],setup(e,{emit:t}){let n=e,r=t,i=ay(`confirm`),{onOpenChange:a}=Qv(`DialogConfirm`),o=async e=>{r(`confirm`,e),a(!1)};return(e,t)=>(I(),R(sm,Za(n,{"data-vean-dialog-confirm":``,class:M(i),onClick:o}),{default:qn(()=>[pi(e.$slots,`default`)]),_:3},16,[`class`]))}}),ly=P({name:`DialogContent`,__name:`dialog-content`,setup(e){let t=ay(`content`);return(e,n)=>(I(),L(`div`,{"data-vean-dialog-content":``,class:k(M(t))},[pi(e.$slots,`default`)],2))}}),uy=[`id`],dy=P({name:`DialogDescription`,__name:`dialog-description`,setup(e){let{descriptionId:t,initDescriptionId:n}=Qv(`DialogDescription`),r=ay(`description`);return n(),(e,n)=>(I(),L(`p`,{id:M(t),"data-vean-dialog-description":``,class:k(M(r))},[pi(e.$slots,`default`)],10,uy))}}),fy=P({name:`DialogFooter`,__name:`dialog-footer`,setup(e){let t=ay(`footer`);return(e,n)=>(I(),L(`div`,{"data-vean-dialog-footer":``,class:k(M(t))},[pi(e.$slots,`default`)],2))}}),py=P({name:`DialogFullscreen`,__name:`dialog-fullscreen`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`fullscreen`],setup(e,{emit:t}){let n=e,r=t,i=ay(`fullscreen`),{fullscreen:a,onFullscreenToggle:o}=Qv(`DialogFullscreen`),s=cg(),c=U(()=>a.value?s.value.dialog.exitFullscreen:s.value.dialog.fullscreen),l=e=>{r(`fullscreen`,e),o()};return(e,t)=>(I(),R(sm,Za(n,{"data-vean-dialog-fullscreen":``,"aria-label":c.value,"aria-pressed":M(a)?`true`:`false`,class:M(i),onClick:l}),{default:qn(()=>[pi(e.$slots,`default`,{},()=>[B(ff,{icon:M(a)?`lucide:minimize`:`lucide:maximize`},null,8,[`icon`])])]),_:3},16,[`aria-label`,`aria-pressed`,`class`]))}}),my=[`data-draggable`],hy=P({name:`DialogHeader`,__name:`dialog-header`,setup(e){let{setHeaderElement:t,draggable:n}=Qv(`DialogHeader`),r=ay(`header`);return(e,i)=>(I(),L(`div`,{ref:M(t),"data-vean-dialog-header":``,"data-draggable":M(n)?``:void 0,class:k(M(r))},[pi(e.$slots,`default`)],10,my))}}),gy=[`data-state`],_y=P({name:`DialogOverlay`,__name:`dialog-overlay`,props:{forceMount:{type:Boolean}},setup(e){let t=e,{overlayElement:n,setOverlayElement:r,open:i,dataState:a}=Qv(`DialogOverlay`),o=ay(`overlay`),s=t.forceMount?on(!0):Wd(n,i);return er(()=>{s.value&&i.value&&xn(nu())}),(e,t)=>M(s)?(I(),L(`div`,{key:0,ref:M(r),"data-vean-dialog-overlay":``,class:k(M(o)),"data-state":M(a),style:{"pointer-events":`auto`}},[pi(e.$slots,`default`)],10,gy)):H(`v-if`,!0)}}),vy=P({name:`DialogPopupImpl`,__name:`dialog-popup-impl`,props:{trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,{dir:i,modal:a,isAlert:o,alertType:s,draggable:c,fullscreen:l,open:u,onOpenChange:d,setTriggerElement:f,popupElement:p,setPopupElement:m,headerElement:h,popupId:g,initPopupId:_,dataState:v,titleId:y,descriptionId:b,focusCancel:x}=Qv(`DialogPopupImpl`),{pointerEvents:S,onFocusCapture:C,onBlurCapture:w}=rd(p,{disableOutsidePointerEvents:()=>n.disableOutsidePointerEvents,enable:()=>!!u.value,onEscapeKeyDown:e=>{r(`escapeKeyDown`,e)},onPointerDownOutside:e=>{r(`pointerDownOutside`,e)},onFocusOutside:e=>{r(`focusOutside`,e)},onInteractOutside:e=>{r(`interactOutside`,e)},onDismiss:()=>{d(!1)}}),{onKeydown:ee}=Cd(p,{trapped:()=>n.trapFocus,loop:!0,onOpenAutoFocus:e=>{o.value&&x(),r(`openAutoFocus`,e)},onCloseAutoFocus:e=>{r(`closeAutoFocus`,e)}}),T=Kd(n,[`trapFocus`,`disableOutsidePointerEvents`]),E=ay(`popup`),D=on({x:0,y:0}),te=on({x:0,y:0}),ne=on({x:0,y:0}),{isDragging:re}=Lu(p,{handle:h,disabled:U(()=>!c.value||l.value===!0||!h.value),onStart:(e,t)=>{te.value={x:t.clientX,y:t.clientY},ne.value={...D.value}},onMove:(e,t)=>{D.value={x:ne.value.x+t.clientX-te.value.x,y:ne.value.y+t.clientY-te.value.y}}});nr(l,e=>{e&&(D.value={x:0,y:0})});let ie=U(()=>{let{x:e,y:t}=D.value;return{pointerEvents:S.value,translate:e!==0||t!==0?`${e}px ${t}px`:void 0}}),O=()=>{let e=vu();e!==document.body&&f(e)};return ud(),Vd(p,U(()=>a.value===!0)),_(),Zr(()=>{O()}),(e,t)=>(I(),R(M(cf),Za(M(T),{id:M(g),ref:M(m),class:M(E),dir:M(i),"aria-labelledby":M(y),"aria-describedby":M(b),"data-dismissable-layer":``,"data-state":M(v),"data-type":M(o)?M(s):void 0,"data-fullscreen":M(l)?``:void 0,"data-dragging":M(re)?``:void 0,role:M(o)?`alertdialog`:`dialog`,"aria-live":M(o)?M(s)===`error`?`assertive`:`polite`:void 0,tabindex:`-1`,style:ie.value,onFocusCapture:M(C),onBlurCapture:M(w),onKeydown:M(ee)}),{default:qn(()=>[pi(e.$slots,`default`)]),_:3},16,[`id`,`class`,`dir`,`aria-labelledby`,`aria-describedby`,`data-state`,`data-type`,`data-fullscreen`,`data-dragging`,`role`,`aria-live`,`style`,`onFocusCapture`,`onBlurCapture`,`onKeydown`]))}}),yy=P({name:`DialogPopup`,__name:`dialog-popup`,props:{asChild:{type:Boolean},as:{},forceMount:{type:Boolean}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Kd(n,[`forceMount`]),a=Td(r),{popupElement:o,open:s,modal:c,isAlert:l,triggerElement:u}=Qv(`DialogPopup`),d=n.forceMount?on(!0):Wd(o,s),f=U(()=>c.value!==!1&&s.value),p=U(()=>c.value===!0),{onFocusOutside:m,onInteractOutside:h,onCloseAutoFocus:g}=Hd({modal:c,triggerElement:u}),_=e=>{if(l.value){e.preventDefault();return}if(c.value===!1)return;let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()},v=e=>{l.value&&e.preventDefault(),h(e)};return(e,t)=>M(d)?(I(),R(vy,Za({key:0},M(i),{"data-vean-dialog-popup":``,"trap-focus":f.value,"disable-outside-pointer-events":p.value},hi(M(a)),{onPointerDownOutside:_,onFocusOutside:M(m),onInteractOutside:v,onCloseAutoFocus:M(g)}),{default:qn(()=>[pi(e.$slots,`default`)]),_:3},16,[`trap-focus`,`disable-outside-pointer-events`,`onFocusOutside`,`onCloseAutoFocus`])):H(`v-if`,!0)}}),by=P({name:`DialogRoot`,inheritAttrs:!1,__name:`dialog-root`,props:{modal:{type:[Boolean,String],default:!0},dir:{},isAlert:{type:Boolean},alertType:{},draggable:{type:Boolean},fullscreen:{type:Boolean,default:void 0},defaultFullscreen:{type:Boolean},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean}},emits:[`update:open`,`update:fullscreen`],setup(e,{emit:t}){let n=e,r=t,i=Ju(()=>n.open,e=>{r(`update:open`,e)},n.defaultOpen??!1),a=Ju(()=>n.fullscreen,e=>{r(`update:fullscreen`,e)},n.defaultFullscreen??!1),{onOpenChange:o}=Zv({dir:rf(()=>n.dir),open:i,modal:U(()=>n.isAlert===!0||n.modal),fullscreen:a,...hu(n,[`isAlert`,`alertType`,`draggable`])}),s=()=>{o(!1)};return nr(i,e=>{e&&n.fullscreen===void 0&&(a.value=n.defaultFullscreen??!1)}),(e,t)=>pi(e.$slots,`default`,{open:M(i),close:s})}}),xy=[`id`],Sy=P({name:`DialogTitle`,__name:`dialog-title`,setup(e){let{titleId:t,initTitleId:n}=Qv(`DialogTitle`),r=ay(`title`);return n(),(e,n)=>(I(),L(`h2`,{id:M(t),"data-vean-dialog-title":``,class:k(M(r))},[pi(e.$slots,`default`)],10,xy))}}),Cy=P({name:`DialogTrigger`,__name:`dialog-trigger`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t,{open:i,onOpenToggle:a,dataState:o,popupId:s,setTriggerElement:c}=Qv(`DialogTrigger`),l=e=>{r(`click`,e),a()};return(e,t)=>(I(),R(sm,Za(n,{ref:M(c),"data-vean-dialog-trigger":``,"aria-haspopup":`dialog`,"aria-expanded":M(i)||!1,"aria-controls":M(i)?M(s):void 0,"data-state":M(o),onClick:l}),{default:qn(()=>[pi(e.$slots,`default`)]),_:3},16,[`aria-expanded`,`aria-controls`,`data-state`]))}}),wy=P({name:`DialogCompact`,__name:`dialog-compact`,props:{title:{},description:{},icon:{},showClose:{type:Boolean,default:!0},showFullscreen:{type:Boolean,default:!0},pure:{type:Boolean},showCancel:{type:[String,Boolean],default:`onlyWarning`},cancelText:{},showConfirm:{type:Boolean,default:!0},confirmText:{},triggerProps:{},overlayProps:{},portalProps:{},popupProps:{},headerProps:{},contentProps:{},footerProps:{},titleProps:{},descriptionProps:{},closeProps:{},fullscreenProps:{},cancelProps:{},confirmProps:{},modal:{type:[Boolean,String],default:!0},dir:{},isAlert:{type:Boolean},alertType:{default:`default`},draggable:{type:Boolean},fullscreen:{type:Boolean,default:void 0},defaultFullscreen:{type:Boolean},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean}},emits:[`update:open`,`update:fullscreen`,`click`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`close`,`fullscreen`,`confirm`,`cancel`],setup(e,{emit:t}){let n=e,r=Kd(n,[`title`,`description`,`icon`,`showClose`,`showFullscreen`,`pure`,`showCancel`,`cancelText`,`showConfirm`,`confirmText`,`triggerProps`,`overlayProps`,`portalProps`,`popupProps`,`headerProps`,`contentProps`,`footerProps`,`titleProps`,`descriptionProps`,`closeProps`,`fullscreenProps`,`cancelProps`,`confirmProps`]),i=t,a=bi(),o=xi(),s=Td(i),c=cg(),l=ey(),u=U(()=>l?.getCurrentDialog(o[`data-dialog-id`])),d=U(()=>[ay().value?.icon,u.value?.ui?.icon].filter(Boolean).join(` `)),f=U(()=>({...n.triggerProps,asChild:n.triggerProps?.asChild??!0})),p={default:null,info:`lucide:info`,warning:`lucide:circle-alert`,error:`lucide:circle-x`,success:`lucide:circle-check`},m=U(()=>n.icon?n.icon:n.isAlert&&n.alertType?p[n.alertType]:null),h=U(()=>n.showConfirm??n.isAlert),g=U(()=>typeof n.showCancel==`boolean`?n.showCancel:n.isAlert===!0&&n.alertType===`warning`),_=U(()=>n.pure?!1:a.footer?!0:g.value||h.value),v=U(()=>n.cancelText??c.value.dialog.cancel),y=U(()=>n.confirmText??c.value.dialog.confirm);return ty({dialog:u}),(t,n)=>(I(),R(by,Za(M(r),{"onUpdate:open":n[5]||=e=>i(`update:open`,e),"onUpdate:fullscreen":n[6]||=e=>i(`update:fullscreen`,e)}),{default:qn(r=>[B(Cy,ge(Ka(f.value)),{default:qn(()=>[pi(t.$slots,`trigger`,ge(Ka(r)))]),_:2},1040),B(df,ge(Ka(e.portalProps)),{default:qn(()=>[B(_y,ge(Ka(e.overlayProps)),null,16),B(yy,Za(e.popupProps,hi(M(s))),{default:qn(()=>[e.pure?H(`v-if`,!0):(I(),R(hy,ge(Za({key:0},e.headerProps)),{default:qn(()=>[B(Sy,ge(Ka(e.titleProps)),{default:qn(()=>[m.value?(I(),R(ff,{key:0,icon:m.value,class:k(d.value)},null,8,[`icon`,`class`])):H(`v-if`,!0),pi(t.$slots,`title`,ge(Ka(r)),()=>[z(`span`,null,A(e.title),1)])]),_:2},1040),a.description||e.description?(I(),R(dy,ge(Za({key:0},e.descriptionProps)),{default:qn(()=>[pi(t.$slots,`description`,ge(Ka(r)),()=>[V(A(e.description),1)])]),_:2},1040)):H(`v-if`,!0),!e.isAlert&&e.showFullscreen?(I(),R(py,Za({key:1},e.fullscreenProps,{onFullscreen:n[0]||=e=>i(`fullscreen`,e)}),{default:qn(()=>[pi(t.$slots,`fullscreen`,ge(Ka(r)))]),_:2},1040)):H(`v-if`,!0),!e.isAlert&&e.showClose?(I(),R(sy,{key:2,onClose:n[1]||=e=>i(`close`,e)},{default:qn(()=>[pi(t.$slots,`close`,ge(Ka(r)))]),_:2},1024)):H(`v-if`,!0)]),_:2},1040)),B(ly,ge(Ka(e.contentProps)),{default:qn(()=>[pi(t.$slots,`default`,ge(Ka(r)))]),_:2},1040),e.pure&&!e.isAlert&&e.showClose?(I(),R(sy,{key:1,onClose:n[2]||=e=>i(`close`,e)},{default:qn(()=>[pi(t.$slots,`close`,ge(Ka(r)))]),_:2},1024)):H(`v-if`,!0),_.value?(I(),R(fy,ge(Za({key:2},e.footerProps)),{default:qn(()=>[pi(t.$slots,`footer`,ge(Ka(r)),()=>[g.value?(I(),R(oy,Za({key:0},e.cancelProps,{onCancel:n[3]||=e=>i(`cancel`,e)}),{default:qn(()=>[pi(t.$slots,`cancel`,ge(Ka(r)),()=>[V(A(v.value),1)])]),_:2},1040)):H(`v-if`,!0),h.value?(I(),R(cy,Za({key:1},e.confirmProps,{onConfirm:n[4]||=e=>i(`confirm`,e)}),{default:qn(()=>[pi(t.$slots,`confirm`,ge(Ka(r)),()=>[V(A(y.value),1)])]),_:2},1040)):H(`v-if`,!0)])]),_:2},1040)):H(`v-if`,!0)]),_:2},1040)]),_:2},1040)]),_:3},16))}}),Ty=1,Ey=new class{subscribers;dialogs;dismissed;constructor(){this.subscribers=[],this.dialogs=[],this.dismissed=new Set}subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);t>=0&&this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};resetDismissed=e=>{this.dismissed.has(e)&&this.dismissed.delete(e)};upsert=e=>{let t=this.dialogs.findIndex(t=>t.id===e.id);if(t<0){this.publish(e),this.dialogs=[...this.dialogs,e];return}let n={...this.dialogs[t],...e};this.publish(n),this.dialogs=this.dialogs.map((e,r)=>r===t?n:e)};create=e=>{let{open:t=!0,...n}=e,r=Oy(e.id),i={...n,id:r,open:t};return this.upsert(i),r};dismiss=e=>{if(e!==void 0)return this.dismissed.add(e),requestAnimationFrame(()=>this.publish({id:e,open:!1})),e;this.dialogs.forEach(e=>{this.dismissed.add(e.id),this.publish({id:e.id,open:!1})})};message=(e,t)=>this.create({...t,title:e,type:`default`});error=(e,t)=>this.create({...t,title:e,type:`error`});success=(e,t)=>this.create({...t,title:e,type:`success`});info=(e,t)=>this.create({...t,title:e,type:`info`});warning=(e,t)=>this.create({...t,title:e,type:`warning`});getDialogs=()=>this.dialogs.filter(e=>!this.dismissed.has(e.id));activeDialogs=()=>(this.dialogs=this.getDialogs(),this.dismissed.clear(),this.dialogs)},Dy=Ey.message;Object.assign(Dy,{success:Ey.success,error:Ey.error,info:Ey.info,warning:Ey.warning,getHistory:()=>Ey.dialogs,getDialogs:()=>Ey.getDialogs()});function Oy(e){return typeof e==`number`||typeof e==`string`&&e.length>0?e:Ty++}var ky=P({name:`DialogProvider`,inheritAttrs:!1,__name:`dialog-provider`,setup(e){let t=on([]),n=e=>{let n=t.value.findIndex(t=>t.id===e.id);if(n!==-1){let r=Object.assign({},t.value[n],e);t.value=[...t.value.slice(0,n),r,...t.value.slice(n+1)];return}t.value=[e,...t.value]},r=e=>{e.onDismiss?.(e),Ey.dismiss(e.id)},i=(e,t)=>{e.onCancel?.(t),!t.defaultPrevented&&r(e)},a=(e,t)=>{e.onConfirm?.(t),!t.defaultPrevented&&r(e)};return $v({dialogs:t}),er(()=>{let e=Ey.subscribe(e=>{Fn(()=>{n(e)}),e.open===!1&&setTimeout(()=>{t.value=Ey.activeDialogs()},500)});xn(()=>{e()})},{flush:`post`}),(e,n)=>(I(),L(F,null,[(I(!0),L(F,null,di(t.value,e=>(I(),R(wy,{key:e.id,open:e.open,"is-alert":``,"alert-type":e.type,"data-dialog-id":e.id,icon:e.icon,onClose:t=>r(e),onCancel:t=>i(e,t),onConfirm:t=>a(e,t)},fi({default:qn(()=>[e.content?(I(),R(ci(e.content),{key:0})):H(`v-if`,!0)]),_:2},[e.title?{name:`title`,fn:qn(()=>[B(Ug,{is:e.title},null,8,[`is`])]),key:`0`}:void 0,e.description?{name:`description`,fn:qn(()=>[B(Ug,{is:e.description},null,8,[`is`])]),key:`1`}:void 0,e.footer?{name:`footer`,fn:qn(()=>[B(Ug,{is:e.footer},null,8,[`is`])]),key:`2`}:void 0,e.cancelText?{name:`cancel`,fn:qn(()=>[B(Ug,{is:e.cancelText},null,8,[`is`])]),key:`3`}:void 0,e.confirmText?{name:`confirm`,fn:qn(()=>[B(Ug,{is:e.confirmText},null,8,[`is`])]),key:`4`}:void 0]),1032,[`open`,`alert-type`,`data-dialog-id`,`icon`,`onClose`,`onCancel`,`onConfirm`]))),128)),pi(e.$slots,`default`)],64))}}),[Ay,jy]=Wl(`ProgressRoot`),[My,Ny]=af(`ProgressUi`),[Py,Fy]=af(`ProgressProviderUi`),Iy={direction:`ltr`,minimum:.08,maximum:1,easing:`linear`,speed:200,trickle:!0,trickleSpeed:200},Ly=class{static options=Iy;static status=null;static pending=[];static isPaused=!1;static trickleTimer;static reset(){return this.status=null,this.isPaused=!1,this.pending=[],this.options=Iy,this.clearTrickleTimer(),this}static configure(e){return this.options=Gu({...e},this.options),this}static isStarted(){return typeof this.status==`number`}static isRendered(){return Gl?document.querySelector(`[data-vean-progress-provider]`)!==null:!1}static set(e){if(!Gl||this.isPaused)return this;let t=this.isStarted();e=uf(e,this.options.minimum,this.options.maximum),this.status=e===this.options.maximum?null:e,this.status===null&&this.clearTrickleTimer();let n=this.render(!t),r=this.options.speed,i=this.options.easing;return n.forEach(e=>e.offsetWidth),this.queue(t=>{n.forEach(t=>{zy(t.querySelector(`[data-vean-progress-bar]`),this.barPositionCSS({n:e,speed:r,ease:i}))}),e===this.options.maximum?(n.forEach(e=>{zy(e,{transition:`none`,opacity:`1`}),e.offsetWidth}),setTimeout(()=>{n.forEach(e=>{zy(e,{transition:`all ${r}ms ${i}`,opacity:`0`})}),setTimeout(()=>{n.forEach(e=>{this.remove(e),zy(e,{transition:`none`,opacity:`1`})}),t()},r)},r)):setTimeout(t,r)}),this}static start(){return Gl?(this.status||this.set(0),this.options.trickle&&this.startTrickling(),this):this}static done(e){return!Gl||!e&&!this.status?this:this.inc(.3+.5*Math.random()).set(1)}static inc(e){if(this.isPaused)return this;let t=this.status;return t?t>1?this:(typeof e!=`number`&&(e=t>=0&&t<.2?.1:t>=.2&&t<.5?.04:t>=.5&&t<.8?.02:t>=.8&&t<.99?.005:0),t=uf(t+e,0,.994),this.set(t)):this.start()}static dec(e){if(this.isPaused)return this;let t=this.status;return typeof t==`number`?(typeof e!=`number`&&(e=t>.8?.1:t>.5?.05:t>.2?.02:.01),t=uf(t-e,0,.994),this.set(t)):this}static trickle(){return this.isPaused?this:this.inc()}static promise(e){let t=typeof e==`function`?e():e;if(!t)return this;if(typeof t.then==`function`)return this.start(),Promise.resolve(t).then(()=>{this.done()},()=>{this.done(!0)}),this;if(typeof t.state!=`function`||typeof t.always!=`function`||t.state()===`resolved`)return this;let n=0,r=0;return this.start(),n++,r++,t.always(()=>{r--,r===0?(n=0,this.done()):this.set((n-r)/n)}),this}static render(e=!1){if(!Gl)return[];let t=Array.from(document.querySelectorAll(`[data-vean-progress-provider]`));return t.forEach(t=>{t.style.display=``;let n=t.querySelector(`[data-vean-progress-bar]`),r=Ry(e?0:this.status||0,this.options.direction);zy(n,this.barPositionCSS({n:this.status||0,speed:this.options.speed,ease:this.options.easing,percent:r})),typeof this.status==`number`?t.setAttribute(`aria-valuenow`,`${this.status}`):t.removeAttribute(`aria-valuenow`)}),t}static remove(e){Gl&&(this.clearTrickleTimer(),e?e.style.display=`none`:document.querySelectorAll(`[data-vean-progress-provider]`).forEach(e=>{let t=e;t.style.display=`none`}))}static pause(){return this.isStarted()?(this.isPaused=!0,this.clearTrickleTimer(),this):this}static resume(){return this.isStarted()?(this.isPaused=!1,this.options.trickle&&this.startTrickling(),this):this}static queue(e){this.pending.push(e),this.pending.length===1&&this.next()}static next(){let e=this.pending.shift();e&&e(this.next.bind(this))}static clearTrickleTimer(){this.trickleTimer&&=(clearTimeout(this.trickleTimer),void 0)}static startTrickling(){if(this.trickleTimer||this.isPaused||!this.isStarted())return;let e=()=>{this.trickleTimer=void 0,!this.isPaused&&this.isStarted()&&(this.trickle(),!this.isPaused&&this.isStarted()&&(this.trickleTimer=setTimeout(e,this.options.trickleSpeed)))};this.trickleTimer=setTimeout(e,this.options.trickleSpeed)}static barPositionCSS({n:e,speed:t,ease:n,percent:r}){return{transform:`translate3d(${r??Ry(e,this.options.direction)}%,0,0)`,transition:`all ${t}ms ${n}`}}};function Ry(e,t){return t===`rtl`?(1-e)*100:(-1+e)*100}function zy(e,t,n){if(typeof t==`string`)n!==void 0&&(e.style[t]=n);else for(let n in t)if(t.hasOwnProperty(n)){let r=t[n];r!==void 0&&(e.style[n]=r)}}var By=[`aria-label`],Vy=P({name:`ProgressProvider`,__name:`progress-provider`,props:{direction:{},minimum:{},maximum:{},easing:{},speed:{},trickle:{type:Boolean},trickleSpeed:{}},setup(e){let t=e,n=Fy(),r=cg();return er(()=>{Ly.configure(t)}),(e,t)=>(I(),L(`div`,{"data-vean-progress-provider":``,"data-allow-mismatch":`style`,class:k(M(n).root),role:`progressbar`,"aria-label":M(r).progress.loading,"aria-valuemin":`0`,"aria-valuemax":`1`,style:{display:`none`}},[z(`div`,{class:k(M(n).indicator),"data-vean-progress-bar":``},null,2)],10,By))}}),Hy=Nl({extendBase:e=>({close:fg({size:e.size}),fullscreen:fg({size:e.size}),cancel:dg({size:e.size,variant:`pure`}),confirm:dg({size:e.size})}),slots:{overlay:[`fixed inset-0 z-base bg-mask`,`data-[state=open]:animate-in data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0`],popup:[`group fixed start-1/2 top-1/2 z-base flex flex-col w-max lt-sm:w-full lt-sm:min-w-auto lt-sm:max-w-full border bg-popover shadow-lg outline-none duration-200 rounded-lg`,`-translate-x-1/2 -translate-y-1/2 [&[dir=rtl]]:translate-x-1/2`,`data-[dragging]:transition-none data-[dragging]:select-none`,`data-[fullscreen]:w-screen data-[fullscreen]:h-screen`,`data-[fullscreen]:max-w-none data-[fullscreen]:rounded-none data-[fullscreen]:shadow-none`,`data-[fullscreen]:data-[state=open]:slide-in-from-top-1/2`,`data-[fullscreen]:data-[state=closed]:slide-out-to-top-1/2`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2`],header:`flex flex-col lt-sm:text-center data-[draggable]:cursor-grab data-[draggable]:touch-none group-data-[dragging]:cursor-grabbing`,title:`flex items-center font-semibold leading-none tracking-tight m-0`,icon:`group-data-[type=info]:text-info group-data-[type=success]:text-success group-data-[type=warning]:text-warning group-data-[type=error]:text-destructive`,description:`text-muted-foreground m-0`,close:`absolute`,fullscreen:`absolute`,content:`grow overflow-auto [overscroll-behavior:contain]`,footer:`flex justify-end lt-sm:flex-col-reverse`,cancel:``,confirm:``},variants:{size:{xs:{popup:`gap-y-1.5 min-w-xs max-w-3xl px-2 py-1.5 text-2xs`,header:`gap-y-1.5`,title:`gap-x-1.5 text-xs`,description:`text-2xs`,close:`end-1.5 top-1.5`,fullscreen:`end-8 top-1.5`,footer:`gap-1.5`},sm:{popup:`gap-y-2 min-w-sm max-w-4xl px-3 py-2 text-xs`,header:`gap-y-2`,title:`gap-x-1.75 text-sm`,description:`text-xs`,close:`end-1.75 top-1.75`,fullscreen:`end-8 top-1.75`,footer:`gap-2`},md:{popup:`gap-y-3 min-w-md max-w-5xl px-4 py-3 text-sm`,header:`gap-y-3`,title:`gap-x-2 text-base`,description:`text-sm`,close:`end-2 top-2`,fullscreen:`end-10 top-2`,footer:`gap-3`},lg:{popup:`gap-y-4 min-w-lg max-w-6xl px-5 py-4 text-base`,header:`gap-y-4`,title:`gap-x-2.5 text-lg`,description:`text-base`,close:`end-2.5 top-2.5`,fullscreen:`end-10 top-2.5`,footer:`gap-4`},xl:{popup:`gap-y-5 min-w-xl max-w-7xl px-6 py-5 text-lg`,header:`gap-y-5`,title:`gap-x-3 text-xl`,description:`text-lg`,close:`end-3 top-3`,fullscreen:`end-12 top-3`,footer:`gap-5`},"2xl":{popup:`gap-y-6 min-w-2xl max-w-7xl px-7 py-6 text-xl`,header:`gap-y-6`,title:`gap-x-3.5 text-2xl`,description:`text-xl`,close:`end-4 top-4`,fullscreen:`end-13 top-4`,footer:`gap-6`}},pure:{true:{popup:`p-0 gap-0 border-none`}}},defaultVariants:{size:`md`}});Nl({slots:{root:`relative w-full overflow-hidden rounded-full bg-muted`,indicator:`h-full w-full flex-1 rounded-full transition-[transform,width] duration-300 transform-gpu will-change-transform data-[state=indeterminate]:w-2/5 data-[state=indeterminate]:opacity-80`,circle:``,track:``,label:``},variants:{color:{primary:{indicator:`bg-primary`},destructive:{indicator:`bg-destructive`},success:{indicator:`bg-success`},warning:{indicator:`bg-warning`},info:{indicator:`bg-info`},carbon:{indicator:`bg-carbon`},secondary:{indicator:`bg-secondary-foreground/20`},accent:{indicator:`bg-accent-foreground/20`}},size:{xs:{root:`h-1.5`},sm:{root:`h-2`},md:{root:`h-2.5`},lg:{root:`h-3`},xl:{root:`h-3.5`},"2xl":{root:`h-4`}}},defaultVariants:{color:`primary`,size:`md`}}),Nl({slots:{root:`relative inline-flex shrink-0 items-center justify-center rounded-full`,indicator:`fill-none stroke-current transition-[stroke-dasharray,stroke-dashoffset] duration-300 ease-in-out`,circle:`size-full`,track:`fill-none stroke-current text-muted`,label:`pointer-events-none absolute inset-0 flex items-center justify-center`},variants:{color:{primary:{indicator:`text-primary`},destructive:{indicator:`text-destructive`},success:{indicator:`text-success`},warning:{indicator:`text-warning`},info:{indicator:`text-info`},carbon:{indicator:`text-carbon`},secondary:{indicator:`text-secondary-foreground/40`},accent:{indicator:`text-accent-foreground/40`}},size:{xs:{root:`h-8 w-8 text-[10px]`},sm:{root:`h-10 w-10 text-xs`},md:{root:`h-12 w-12 text-sm`},lg:{root:`h-16 w-16 text-base`},xl:{root:`h-20 w-20 text-lg`},"2xl":{root:`h-24 w-24 text-xl`}}},defaultVariants:{color:`primary`,size:`md`}});var Uy=Nl({slots:{root:`fixed z-max w-0 h-0 pointer-events-none`,indicator:`fixed top-0 start-0 w-full h-0.75 bg-primary`}}),Wy=P({name:`SProgressProvider`,__name:`progress-provider`,props:{direction:{},minimum:{},maximum:{},easing:{},speed:{},trickle:{type:Boolean},trickleSpeed:{}},setup(e){let t=e;return Py(U(()=>Uy())),(e,n)=>(I(),R(M(Vy),ge(Ka(t)),null,16))}}),Gy=P({name:`SDialogProvider`,__name:`dialog-provider`,setup(e){return ry(U(()=>Hy({size:`md`}))),(e,t)=>(I(),R(M(ky)))}}),[Ky,qy]=Wl({name:`UIConfigProvider`,key:l_});function Jy(e){let t=c_(e);i_(t);let n=U(()=>t.theme.value),r=U(()=>sg(n.value)),i=Yy(),a=()=>{let t=i.current()??i.acquire(e.nonce);t&&(t.textContent=r.value)};Zr(a),nr(r,a);let o=og();nr([r,()=>t.mode.value,t.customPresets,t.appliedPresetName],()=>{e.persistTheme&&typeof document<`u`&&o.write({options:n.value,mode:t.mode.value,style:r.value,presets:t.customPresets.value,...t.appliedPresetName.value?{appliedPreset:t.appliedPresetName.value}:{}})},{immediate:!0}),ti(()=>o.flush());let s=e=>{e.key===`__VEAN_THEME`&&t.refreshThemeConfig()};return Zr(()=>{e.persistTheme&&window.addEventListener(`storage`,s)}),ti(()=>{window.removeEventListener(`storage`,s)}),{themeCss:r,themeOptions:n,commitThemeConfig:e=>{t.setThemeState(e)}}}function Yy(){let e=null;return{current:()=>e,acquire:t=>{if(e||typeof document>`u`)return e;let n=document.getElementById(Uh);return e=n instanceof HTMLStyleElement?n:document.createElement(`style`),n||(e.id=`vean-theme`,document.head.appendChild(e)),t&&!e.getAttribute(`nonce`)&&e.setAttribute(`nonce`,t),e}}}var Xy=P({name:`SConfigProvider`,__name:`config-provider`,props:{theme:{default:()=>({})},size:{default:`md`},iconify:{default:()=>({width:`1.25em`,height:`1.25em`})},progress:{},toast:{},customToast:{type:Boolean},persistTheme:{type:Boolean,default:!1},themeConfig:{},presetProvider:{},isServer:{type:Boolean,default:Zg},dir:{},locale:{},nonce:{},tooltip:{},iconRender:{},linkComponent:{},messages:{}},setup(e,{expose:t}){let n=e,r=Kd(n,[`iconRender`,`theme`,`size`,`iconify`,`progress`,`toast`,`customToast`,`persistTheme`,`themeConfig`,`presetProvider`,`isServer`]),i=n.iconRender??(e=>bo(W,{icon:e,ssr:n.isServer})),{commitThemeConfig:a}=Jy(n);return Ky(Jt(n)),t({commitThemeConfig:a}),(t,n)=>(I(),R(M(Xv),Za(M(r),{"icon-render":M(i)}),{default:qn(()=>[pi(t.$slots,`default`),e.customToast?H(`v-if`,!0):(I(),R(Xg,ge(Za({key:0},e.toast)),null,16)),B(Gy),B(Wy,ge(Ka(e.progress)),null,16)]),_:3},16,[`icon-render`]))}}),Zy=/^[\w+.-]{2,}:\/\//;function Qy(e){return e.endsWith(`/`)?e:`${e}/`}function $y(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function eb(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?Qy(n)+e.replace(/^\.?\//,``):e);return n}function tb(e,t){if(!t||t===`/`||Zy.test(e))return e;let n=$y(t);return e.startsWith(n)?e:eb(n,e)}function nb(e,t){let n=e.match(Zy);return t+(n?e.slice(n[0].length):e)}function rb(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e<i.length;e++)a+=i[e],e<t.length&&(a+=String(t[e]));return`${n}${a}${r}`}return`${n}${String(e)}${r}`})}var ib={blue:rb(34,39),cyan:rb(36,39),gray:rb(90,39),green:rb(32,39),red:rb(31,39),yellow:rb(33,39),bold:rb(1,22),dim:rb(2,22),reset:rb(0,0),underline:rb(4,24)};function ab(e,...t){return typeof e==`function`?e(...t):e}var ob=Error.captureStackTrace,sb=class e extends Error{name;code;docs;fix;sources;data;get why(){return this.message}constructor(t,n=e){super(t.why,{cause:t.cause}),this.code=this.name=t.code,this.fix=t.fix,this.docs=t.docs,this.sources=t.sources,this.data=t.data,ob?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,data:this.data,stack:this.stack}}};function cb(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}function lb(e){let t=e.reporters??[],n={},{docsBase:r}=e;for(let i of Object.keys(e.codes)){let a=e.codes[i],o=a.docs===!1?void 0:a.docs||cb(r,i),s=(e={},n={})=>{let r=new sb({code:i,why:ab(a.why,e),fix:ab(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:ab(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function ub(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n<r.length-1?`├▶`:`╰▶`)} ${t}`)].join(`
|
|
26
|
+
`)}new Set(oh);var Bh=mm,Vh={xs:`xs`,sm:`xs`,md:`sm`,lg:`md`,xl:`lg`,"2xl":`xl`};Object.fromEntries(Object.entries(Bh).map(([e,t])=>[e,t/Bh.md]));var Hh=`__VEAN_THEME`,Uh=`vean-theme`,Wh=65536;function Gh(){if(typeof window>`u`)return null;try{return window.localStorage??null}catch{return null}}var Kh=e=>typeof e==`object`&&!!e&&!Array.isArray(e),qh=e=>e===`light`||e===`dark`||e===`auto`,Jh=e=>e===`layered`||e===`flat`,Yh=e=>typeof e==`string`&&e.trim().length>0;function Xh(e){return Kh(e)?[`sans`,`heading`,`mono`,`serif`].every(t=>{let n=e[t];return n===void 0||Yh(n)}):!1}var Zh={surface:`card`,elevated:`popover`,"sidebar-surface":`sidebar`,scrim:`mask`};function Qh(e,t){if(ch(e))return e;if(t>=2)return;let n=Zh[e];return n&&ch(n)?n:void 0}function $h(e,t){if(!Kh(e))return;let n=Object.entries(e).flatMap(([e,n])=>{if(typeof n!=`string`||n.length===0)return[];let r=Qh(e,t);return r?[[r,n]]:[]});return n.length>0?Object.fromEntries(n):void 0}function eg(e,t){if(!Kh(e))return;let n=$h(e.light,t),r=$h(e.dark,t);return n||r?{...n?{light:n}:{},...r?{dark:r}:{}}:void 0}function tg(e,t){if(!Kh(e))return;if(t>=2)return e;let n=Object.entries(e).flatMap(([e,n])=>{if(!Kh(n))return[[e,n]];let r=$h(n.light,t);if(!r)return[];let i=$h(n.dark,t);return[[e,i?{light:r,dark:i}:{light:r}]]});return n.length>0?Object.fromEntries(n):void 0}function ng(e,t=2){if(!Kh(e))return{};let n={},r=(t,r)=>{e[t]!==void 0&&r(e[t])&&(n[t]=e[t])};r(`base`,e=>Mm(e)&&Om.includes(e)),r(`primary`,e=>Mm(e)&&Om.includes(e)),r(`feedback`,e=>typeof e==`string`&&e.length>0),r(`surfaceStyle`,Jh),r(`prefix`,e=>e===!1||typeof e==`string`&&e.length>0),r(`size`,e=>typeof e==`string`&&e.length>0),r(`radius`,e=>typeof e==`string`&&e.length>0),r(`spacing`,e=>Bm(e)||typeof e==`number`&&Number.isFinite(e)&&e>0&&e<=4),r(`font`,Xh),r(`borderOpacity`,e=>typeof e==`number`&&e>=0&&e<=1),r(`format`,e=>e===`hsl`||e===`oklch`),r(`styleTarget`,e=>e===`html`||e===`:root`),r(`darkSelector`,e=>typeof e==`string`&&e.length>0);let i=eg(e.overrides,t);return i&&(n.overrides=i),n}function rg(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(!Kh(t))return null;let n=typeof t.v==`number`&&Number.isInteger(t.v)&&t.v>0?t.v:0;if(n>2)return null;let r={v:2,options:ng(t.options,n)};qh(t.mode)&&(r.mode=t.mode),n>=2&&typeof t.style==`string`&&t.style.length>0&&t.style.length<=Wh&&(r.style=t.style);let i=tg(t.presets,n);return i&&(r.presets=i),typeof t.appliedPreset==`string`&&t.appliedPreset.length>0&&(i===void 0||t.appliedPreset in i)&&(r.appliedPreset=t.appliedPreset),r}function ig(e=Hh){let t=null;try{t=Gh()?.getItem(e)??null}catch{return null}return rg(t)}function ag(e,t=Hh){let n=Gh();if(!n)return!1;let r={v:2,...e};r.style&&r.style.length>Wh&&delete r.style;try{return n.setItem(t,JSON.stringify(r)),!0}catch{return!1}}function og(e={}){let{key:t=Hh,delay:n=250}=e,r=null,i=null,a=()=>{i!==null&&(clearTimeout(i),i=null),r&&=(ag(r,t),null)};return{write:e=>{r=e,i===null&&(i=setTimeout(a,n))},flush:a,cancel:()=>{i!==null&&(clearTimeout(i),i=null),r=null}}}function sg(e,t){return zh(Ph(e),{prefix:e.prefix??Dm.prefix,styleTarget:e.styleTarget,darkSelector:e.darkSelector,format:e.format,...t})}function cg(){let e=nf();return U(()=>{let t=Qd(e?.locale??`en`),n=e?.messages;return n?Gu(n,t):t})}var lg=fl({base:[`inline-flex items-center justify-center font-medium transition-all-150`,`outline-none focus-visible:ring-3 focus-visible:ring-offset-card`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],variants:{color:{primary:`focus-visible:ring-primary/30`,destructive:`focus-visible:ring-destructive/30`,success:`focus-visible:ring-success/30`,warning:`focus-visible:ring-warning/30`,info:`focus-visible:ring-info/30`,carbon:`focus-visible:ring-carbon/30`,secondary:`focus-visible:ring-secondary-foreground/20 text-secondary-foreground`,accent:`focus-visible:ring-accent-foreground/10 text-accent-foreground`},variant:{solid:``,pure:`border border-border bg-card text-accent-foreground data-[normal]:hover:bg-accent data-[normal]:active:bg-accent-foreground/10`,plain:`border border-border bg-card text-foreground`,outline:`border bg-card`,dashed:`border border-dashed bg-card`,soft:``,ghost:`bg-transparent`,link:`bg-transparent underline-offset-4 data-[normal]:hover:underline`},size:{xs:`gap-1 text-2xs`,sm:`gap-2 text-xs`,md:`gap-3 text-sm`,lg:`gap-4 text-base`,xl:`gap-5 text-lg`,"2xl":`gap-6 text-xl`},shape:{auto:`rounded-md`,rounded:`rounded-full`,square:`rounded-md`,circle:`rounded-full`},shadow:{none:`shadow-none`,sm:`shadow-sm`,md:`shadow-md`,lg:`shadow-lg`},fitContent:{true:`w-fit h-fit`,false:``}},compoundVariants:[{color:`primary`,variant:`solid`,class:`bg-primary text-primary-foreground data-[normal]:hover:bg-primary/80 data-[normal]:active:bg-primary-600`},{color:`destructive`,variant:`solid`,class:`bg-destructive text-destructive-foreground data-[normal]:hover:bg-destructive/80 data-[normal]:active:bg-destructive-600`},{color:`success`,variant:`solid`,class:`bg-success text-success-foreground data-[normal]:hover:bg-success/80 data-[normal]:active:bg-success-600`},{color:`warning`,variant:`solid`,class:`bg-warning text-warning-foreground data-[normal]:hover:bg-warning/80 data-[normal]:active:bg-warning-600`},{color:`info`,variant:`solid`,class:`bg-info text-info-foreground data-[normal]:hover:bg-info/80 data-[normal]:active:bg-info-600`},{color:`carbon`,variant:`solid`,class:`bg-carbon text-carbon-foreground data-[normal]:hover:bg-carbon/80 data-[normal]:active:bg-carbon`},{color:`secondary`,variant:[`solid`,`soft`],class:`bg-secondary`},{color:`accent`,variant:[`solid`,`soft`],class:`bg-accent`},{color:`primary`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-primary`},{color:`destructive`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-destructive`},{color:`success`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-success`},{color:`warning`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-warning`},{color:`info`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-info`},{color:`carbon`,variant:[`outline`,`dashed`,`soft`,`ghost`,`link`],class:`text-carbon`},{color:`primary`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-primary/10 data-[normal]:active:bg-primary/20`},{color:`destructive`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-destructive/10 data-[normal]:active:bg-destructive/20`},{color:`success`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-success/10 data-[normal]:active:bg-success/20`},{color:`warning`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-warning/10 data-[normal]:active:bg-warning/20`},{color:`info`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-info/10 data-[normal]:active:bg-info/20`},{color:`carbon`,variant:[`outline`,`dashed`,`ghost`],class:`data-[normal]:hover:bg-carbon/10 data-[normal]:active:bg-carbon/20`},{color:`secondary`,variant:[`solid`,`outline`,`dashed`,`soft`,`ghost`],class:`data-[normal]:hover:bg-secondary data-[normal]:active:bg-secondary-foreground/20`},{color:`accent`,variant:[`solid`,`outline`,`dashed`,`soft`,`ghost`],class:`data-[normal]:hover:bg-accent data-[normal]:active:bg-accent-foreground/10`},{color:`primary`,variant:`plain`,class:`data-[normal]:hover:border-primary data-[normal]:hover:text-primary`},{color:`destructive`,variant:`plain`,class:`data-[normal]:hover:border-destructive data-[normal]:hover:text-destructive`},{color:`success`,variant:`plain`,class:`data-[normal]:hover:border-success data-[normal]:hover:text-success`},{color:`warning`,variant:`plain`,class:`data-[normal]:hover:border-warning data-[normal]:hover:text-warning`},{color:`info`,variant:`plain`,class:`data-[normal]:hover:border-info data-[normal]:hover:text-info`},{color:`carbon`,variant:`plain`,class:`data-[normal]:hover:border-carbon data-[normal]:hover:text-carbon`},{color:`secondary`,variant:`plain`,class:`data-[normal]:hover:border-secondary-foreground/20`},{color:`accent`,variant:`plain`,class:`data-[normal]:hover:border-accent-foreground/10`},{color:`primary`,variant:[`outline`,`dashed`],class:`border-primary`},{color:`destructive`,variant:[`outline`,`dashed`],class:`border-destructive`},{color:`success`,variant:[`outline`,`dashed`],class:`border-success`},{color:`warning`,variant:[`outline`,`dashed`],class:`border-warning`},{color:`info`,variant:[`outline`,`dashed`],class:`border-info`},{color:`carbon`,variant:[`outline`,`dashed`],class:`border-carbon`},{color:`secondary`,variant:[`outline`,`dashed`],class:`border-secondary-foreground/20`},{color:`accent`,variant:[`outline`,`dashed`],class:`border-accent-foreground/10`},{color:`primary`,variant:`soft`,class:`bg-primary/10 data-[normal]:hover:bg-primary/10 data-[normal]:active:bg-primary/20`},{color:`destructive`,variant:`soft`,class:`bg-destructive/10 data-[normal]:hover:bg-destructive/10 data-[normal]:active:bg-destructive/20`},{color:`success`,variant:`soft`,class:`bg-success/10 data-[normal]:hover:bg-success/10 data-[normal]:active:bg-success/20`},{color:`warning`,variant:`soft`,class:`bg-warning/10 data-[normal]:hover:bg-warning/10 data-[normal]:active:bg-warning/20`},{color:`info`,variant:`soft`,class:`bg-info/10 data-[normal]:hover:bg-info/10 data-[normal]:active:bg-info/20`},{color:`carbon`,variant:`soft`,class:`bg-carbon/10 data-[normal]:hover:bg-carbon/10 data-[normal]:active:bg-carbon/20`},{size:`xs`,fitContent:!0,class:`p-0.75`},{size:`sm`,fitContent:!0,class:`p-0.875`},{size:`md`,fitContent:!0,class:`p-1`},{size:`lg`,fitContent:!0,class:`p-1.25`},{size:`xl`,fitContent:!0,class:`p-1.5`},{size:`2xl`,fitContent:!0,class:`p-1.75`},{size:`xs`,fitContent:!1,class:`h-6 px-1.5`},{size:`sm`,fitContent:!1,class:`h-7 px-2`},{size:`md`,fitContent:!1,class:`h-8 px-4`},{size:`lg`,fitContent:!1,class:`h-9 px-6`},{size:`xl`,fitContent:!1,class:`h-10 px-8`},{size:`2xl`,fitContent:!1,class:`h-12 px-10`},{shape:[`square`,`circle`],fitContent:!1,class:`p-0 gap-0`},{size:`xs`,fitContent:!1,shape:[`square`,`circle`],class:`w-6`},{size:`sm`,fitContent:!1,shape:[`square`,`circle`],class:`w-7`},{size:`md`,fitContent:!1,shape:[`square`,`circle`],class:`w-8`},{size:`lg`,fitContent:!1,shape:[`square`,`circle`],class:`w-9`},{size:`xl`,fitContent:!1,shape:[`square`,`circle`],class:`w-10`},{size:`2xl`,fitContent:!1,shape:[`square`,`circle`],class:`w-12`},{variant:[`ghost`,`link`],shadow:[`sm`,`md`,`lg`],class:`shadow-none`},{variant:`plain`,shadow:`sm`,class:`active:shadow-md`},{variant:`plain`,shadow:`md`,class:`active:shadow-lg`},{variant:`plain`,shadow:`lg`,class:`active:shadow-xl`},{variant:`pure`,shadow:`sm`,class:`active:shadow-sm`},{variant:`pure`,shadow:`md`,class:`active:shadow-md`},{variant:`pure`,shadow:`lg`,class:`active:shadow-lg`}],defaultVariants:{color:`primary`,variant:`solid`,size:`md`,shape:`auto`,shadow:`sm`,fitContent:!1}});fl({base:`[&>*]:relative focus-visible:[&>*]:z-2 not-first:not-last:[&>*]:rounded-0`,variants:{orientation:{horizontal:`inline-flex not-last:[&>*]:border-e-0 focus-visible:[&>*]:border-e first:[&>*]:rounded-e-0 last:[&>*]:rounded-s-0`,vertical:`flex flex-col not-last:[&>*]:border-b-0 focus-visible:[&>*]:border-b first:[&>*]:rounded-b-0 last:[&>*]:rounded-t-0`}},defaultVariants:{orientation:`horizontal`}});var ug=zl(lg,{size:`md`,color:`accent`,variant:`ghost`,shape:`square`,fitContent:!0}),dg=_l(lg,e=>({...e,size:Vh[e.size??`md`]})),fg=_l(ug,e=>({...e,size:Vh[e.size??`md`]})),pg=Nl({extendBase:e=>({close:fg({size:e.size}),cancel:dg({size:e.size,variant:`pure`}),action:dg({size:e.size})}),slots:{toaster:[`fixed z-[--z-index] list-none outline-none transition-transform-400 ease`,`data-[x-position=right]:end-[--offset-right] data-[x-position=left]:start-[--offset-left] data-[x-position=center]:start-1/2 data-[x-position=center]:-translate-x-1/2 [&[dir=rtl]]:data-[x-position=center]:translate-x-1/2`,`data-[y-position=top]:top-[--offset-top] data-[y-position=bottom]:bottom-[--offset-bottom]`,`max-[600px]:w-full max-[600px]:data-[x-position=right]:start-[--mobile-offset-left] max-[600px]:data-[x-position=left]:end-[--mobile-offset-right] max-[600px]:data-[x-position=center]:start-[--mobile-offset-left] max-[600px]:data-[x-position=center]:end-[--mobile-offset-right] max-[600px]:data-[x-position=center]:[transform:none]`,`max-[600px]:data-[y-position=top]:top-[--mobile-offset-top] max-[600px]:data-[y-position=bottom]:bottom-[--mobile-offset-bottom]`],toast:[`group absolute w-full rounded-md bg-popover text-popover-foreground border border-transparent opacity-0 outline-none touch-none`,`z-[--z-index] break-anywhere [--y:translateY(100%)] [--lift:1] [--lift-amount:calc(var(--lift)*var(--gap))] [transform:var(--y)]`,`[transition:transform_400ms,opacity_400ms,height_400ms,box-shadow_200ms] [box-shadow:0_4px_12px_hsl(var(--foreground)/0.1)]`,`focus-visible:[box-shadow:0_4px_12px_hsl(var(--foreground)/0.1),0_0_0_2px_hsl(var(--foreground)/0.2)] [&>*]:[transition:opacity_400ms]`,`data-[y-position=top]:top-0 data-[mounted=false]:data-[y-position=top]:[--y:translateY(-100%)] data-[mounted=true]:[--y:translateY(0)]`,`data-[y-position=bottom]:[--lift:-1] data-[y-position=bottom]:bottom-0`,`data-[x-position=left]:start-0 data-[x-position=right]:end-0`,`data-[swiping=true]:transition-none data-[swiping=true]:[transform:var(--y)_translateY(var(--swipe-amount-y,0px))_translateX(var(--swipe-amount-x,0px))]`,`data-[swiping=true]:before:content-empty data-[swiping=true]:before:absolute data-[swiping=true]:before:[inset-inline:-100%] data-[swiping=true]:before:h-full data-[swiping=true]:before:-z-1`,`data-[y-position=top]:data-[swiping=true]:before:bottom-1/2 data-[y-position=top]:data-[swiping=true]:before:[transform:scaleY(3)_translateY(50%)]`,`data-[y-position=bottom]:data-[swiping=true]:before:top-1/2 data-[y-position=bottom]:data-[swiping=true]:before:[transform:scaleY(3)_translateY(-50%)]`,`data-[swiping=false]:data-[removed=true]:before:content-empty data-[swiping=false]:data-[removed=true]:before:absolute data-[swiping=false]:data-[removed=true]:before:inset-0 data-[swiping=false]:data-[removed=true]:before:[transform:scaleY(2)]`,`data-[expanded=true]:after:content-empty data-[expanded=true]:after:absolute data-[expanded=true]:after:start-0 data-[expanded=true]:after:bottom-full data-[expanded=true]:after:w-full data-[expanded=true]:after:h-[calc(var(--gap)_+_1px)]`,`data-[mounted=true]:opacity-100 data-[visible=false]:pointer-events-none data-[visible=false]:data-[mounted=true]:opacity-0`,`data-[expanded=false]:data-[front=false]:[--scale:var(--toasts-before)*0.05_+_1] data-[expanded=false]:data-[front=false]:[--y:translateY(calc(var(--lift-amount)*var(--toasts-before)))_scale(calc(-1*var(--scale)))] data-[expanded=false]:data-[front=false]:h-[var(--front-toast-height)] [&[data-expanded=false][data-front=false]>*]:opacity-0`,`data-[mounted=true]:data-[expanded=true]:[--y:translateY(calc(var(--lift)*var(--offset)))] data-[mounted=true]:data-[expanded=true]:h-[var(--initial-height)]`,`data-[removed=true]:data-[front=true]:data-[swipe-out=false]:[--y:translateY(calc(var(--lift)*-100%))] data-[removed=true]:data-[front=true]:data-[swipe-out=false]:opacity-0`,`data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=true]:[--y:translateY(calc(var(--lift)*var(--offset)_+_var(--lift)*-100%))] data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=true]:opacity-0`,`data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=false]:[--y:translateY(40%)] data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=false]:opacity-0 data-[removed=true]:data-[front=false]:data-[swipe-out=false]:data-[expanded=false]:[transition:transform_500ms,opacity_200ms]`,`data-[removed=true]:data-[front=false]:before:h-[calc(var(--initial-height)_+_20%)]`,`data-[swiped=true]:select-none`,`data-[swipe-out=true]:data-[y-position=top]:[animation-duration:200ms] data-[swipe-out=true]:data-[y-position=bottom]:[animation-duration:200ms]`,`data-[swipe-out=true]:data-[y-position=top]:[animation-timing-function:ease-out] data-[swipe-out=true]:data-[y-position=bottom]:[animation-timing-function:ease-out]`,`data-[swipe-out=true]:data-[y-position=top]:[animation-fill-mode:forwards] data-[swipe-out=true]:data-[y-position=bottom]:[animation-fill-mode:forwards]`,`data-[swipe-out=true]:data-[swipe-direction=left]:[animation-name:toast-swipe-out-left] data-[swipe-out=true]:data-[swipe-direction=right]:[animation-name:toast-swipe-out-right] data-[swipe-out=true]:data-[swipe-direction=up]:[animation-name:toast-swipe-out-up] data-[swipe-out=true]:data-[swipe-direction=down]:[animation-name:toast-swipe-out-down]`,`data-[rich-color=true]:data-[type=success]:bg-success-100 data-[rich-color=true]:data-[type=success]:border-success`,`data-[rich-color=true]:data-[type=info]:bg-info-100 data-[rich-color=true]:data-[type=info]:border-info`,`data-[rich-color=true]:data-[type=warning]:bg-warning-100 data-[rich-color=true]:data-[type=warning]:border-warning`,`data-[rich-color=true]:data-[type=error]:bg-destructive-100 data-[rich-color=true]:data-[type=error]:border-destructive`,`data-[inverted=true]:bg-carbon data-[inverted=true]:border-carbon data-[inverted=true]:text-carbon-foreground`],wrapper:`flex flex-col items-stretch`,content:``,title:`flex items-center font-semibold`,description:`text-muted-foreground`,icon:[`group-data-[type=info]:text-info group-data-[type=success]:text-success group-data-[type=warning]:text-warning group-data-[type=error]:text-destructive`],footer:`flex justify-end items-center`,action:``,cancel:``,close:[`absolute`,`group-data-[inverted=true]:text-accent group-data-[inverted=true]:hover:bg-accent/15`,`group-data-[rich-color=true]:group-data-[type=success]:hover:bg-success/15`,`group-data-[rich-color=true]:group-data-[type=info]:hover:bg-info/15`,`group-data-[rich-color=true]:group-data-[type=warning]:hover:bg-warning/15`,`group-data-[rich-color=true]:group-data-[type=error]:hover:bg-destructive/15`]},variants:{size:{xs:{toaster:`w-80 text-2xs`,toast:`p-3`,wrapper:`gap-1`,title:`gap-1.25`,footer:`gap-1.25`,close:`top-1 end-1`},sm:{toaster:`w-85 text-xs`,toast:`p-3.5`,wrapper:`gap-1.25`,title:`gap-1.5`,footer:`gap-1.5`,close:`top-1.25 end-1.25`},md:{toaster:`w-90 text-sm`,toast:`p-4`,wrapper:`gap-1.5`,title:`gap-2`,footer:`gap-2`,close:`top-1.5 end-1.5`},lg:{toaster:`w-95 text-base`,toast:`p-4.5`,wrapper:`gap-1.75`,title:`gap-2.5`,footer:`gap-2.5`,close:`top-1.75 end-1.75`},xl:{toaster:`w-100 text-lg`,toast:`p-5`,wrapper:`gap-2`,title:`gap-3`,footer:`gap-3`,close:`top-2 end-2`},"2xl":{toaster:`w-110 text-xl`,toast:`p-6`,wrapper:`gap-2.5`,title:`gap-4`,footer:`gap-4`,close:`top-2.5 end-2.5`}}},defaultVariants:{size:`md`}}),[mg,hg]=Wl(`Toaster`),[gg,_g]=af(`ToastUi`),vg=1,yg=new class{subscribers;toasts;dismissed;constructor(){this.subscribers=[],this.toasts=[],this.dismissed=new Set}subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);t>=0&&this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};resetDismissed=e=>{this.dismissed.has(e)&&this.dismissed.delete(e)};upsert=e=>{let t=this.toasts.findIndex(t=>t.id===e.id);if(t<0){this.publish(e),this.toasts=[...this.toasts,e];return}let n={...this.toasts[t],...e};this.publish(n),this.toasts=this.toasts.map((e,r)=>r===t?n:e)};create=e=>{let{message:t,dismissible:n=!0,...r}=e,i=Cg(e.id);this.resetDismissed(i);let a={...r,id:i,dismissible:n,title:t};return this.upsert(a),i};dismiss=e=>{if(e!==void 0)return this.dismissed.add(e),requestAnimationFrame(()=>this.publish({id:e,dismiss:!0})),e;this.toasts.forEach(e=>{this.dismissed.add(e.id),this.publish({id:e.id,dismiss:!0})})};message=(e,t)=>this.create({...t,message:e,type:`default`});error=(e,t)=>this.create({...t,message:e,type:`error`});success=(e,t)=>this.create({...t,message:e,type:`success`});info=(e,t)=>this.create({...t,message:e,type:`info`});warning=(e,t)=>this.create({...t,message:e,type:`warning`});loading=(e,t)=>this.create({...t,message:e,type:`loading`});custom=(e,t)=>{let n=Cg(t?.id),r=t?.dismissible??!0;return this.resetDismissed(n),this.upsert({custom:e,dismissible:r,id:n,...t}),n};promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(typeof e==`function`?e():e),i=n!==void 0,a,o=async(e,t,r,a)=>{i=!1;let{description:o,settings:s}=await wg(t,r,a,n);this.create({id:n,type:e,description:o,...s})},s=r.then(async e=>{if(a=[`resolve`,e],Va(e)){i=!1,this.create({id:n,type:`default`,message:e});return}if(Sg(e)&&!e.ok){await o(`error`,t.error,t.description,`HTTP error! status: ${e.status}`);return}if(e instanceof Error){await o(`error`,t.error,t.description,e);return}t.success!==void 0&&await o(`success`,t.success,t.description,e)}).catch(async e=>{a=[`reject`,e],t.error!==void 0&&await o(`error`,t.error,t.description,e)}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally?.()}),c=()=>new Promise((e,t)=>s.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:c}:Object.assign(n,{unwrap:c})};getActives=()=>this.toasts.filter(e=>!this.dismissed.has(e.id))},bg=yg.message,xg=Object.assign(bg,{success:yg.success,info:yg.info,warning:yg.warning,error:yg.error,custom:yg.custom,message:yg.message,promise:yg.promise,dismiss:yg.dismiss,loading:yg.loading},{getHistory:()=>yg.toasts,getToasts:()=>yg.getActives()});function Sg(e){return typeof e==`object`&&!!e&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`}function Cg(e){return typeof e==`number`||typeof e==`string`&&e.length>0?e:vg++}async function wg(e,t,n,r){let[i,a]=await Promise.all([Tg(e,n),Tg(t,n)]);return{description:a,settings:Dg(i,r)}}async function Tg(e,t){return typeof e==`function`?await e(t):e}function Eg(e){return typeof e==`object`&&!!e&&`message`in e}function Dg(e,t){return Eg(e)?e:{id:t??``,message:e??``}}var Og={gap:`--gap`,offsetTop:`--offset-top`,offsetRight:`--offset-right`,offsetBottom:`--offset-bottom`,offsetLeft:`--offset-left`,mobileOffsetTop:`--mobile-offset-top`,mobileOffsetRight:`--mobile-offset-right`,mobileOffsetBottom:`--mobile-offset-bottom`,mobileOffsetLeft:`--mobile-offset-left`,frontHeight:`--front-toast-height`},kg={index:`--index`,offset:`--offset`,beforeIndex:`--toasts-before`,zIndex:`--z-index`,swipeAmountX:`--swipe-amount-x`,swipeAmountY:`--swipe-amount-y`,swipeDirection:`--swipe-direction`,swipeOut:`--swipe-out`,initialHeight:`--initial-height`},Ag=`top-right`,jg=4e3,Mg={info:`lucide:info`,success:`lucide:circle-check`,warning:`lucide:circle-alert`,error:`lucide:circle-x`,close:`lucide:x`,loading:`svg-spinners:270-ring`},Ng=[`top-right`,`top-center`,`top-left`,`bottom-right`,`bottom-center`,`bottom-left`],Pg={left:`left`,right:`right`,top:`up`,bottom:`down`};function Fg(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(Pg[t]),n&&r.push(Pg[n]),r}var Ig=e=>{let t={top:Og.offsetTop,right:Og.offsetRight,bottom:Og.offsetBottom,left:Og.offsetLeft},n={top:Og.mobileOffsetTop,right:Og.mobileOffsetRight,bottom:Og.mobileOffsetBottom,left:Og.mobileOffsetLeft},r={};return Wu(t).forEach(i=>{let a=(typeof e==`number`?e:e[i])??24;r[t[i]]=`${a}px`,r[n[i]]=`calc(${a}px * 0.67)`}),r},Lg=e=>{if(!e)return{x:0,y:0};let t=e.style.getPropertyValue(kg.swipeAmountX),n=e.style.getPropertyValue(kg.swipeAmountY);return{x:Number(t.replace(`px`,``))||0,y:Number(n.replace(`px`,``))||0}},Rg=(e,t)=>{e&&(e.style.setProperty(kg.swipeAmountX,`${t.x}px`),e.style.setProperty(kg.swipeAmountY,`${t.y}px`))},zg=e=>{e&&Rg(e,{x:0,y:0})},Bg=e=>`dismiss`in e&&e.dismiss===!0,Vg=e=>[`altKey`,`ctrlKey`,`metaKey`,`shiftKey`].includes(e),Hg=e=>{let{id:t,position:n}=e,r=on([]),i=on([]),a=U(()=>r.value.filter(e=>N(t)&&e.toasterId===N(t)||!e.toasterId)),o=U(()=>{let e=new Set;return a.value.forEach(t=>{let r=t.position||N(n);e.add(r)}),Ng.forEach(t=>{e.has(t)||e.add(t)}),Array.from(e)});return{toasts:r,filtered:a,heights:i,allPositions:o,positionZIndex:U(()=>{let e={};return o.value.forEach((t,n)=>{e[t]=9999-n}),e}),allToasts:U(()=>{let e=Ng.reduce((e,t)=>(e[t]=[],e),{});return a.value.forEach(t=>{let r=t.position||N(n);e[r].push(t)}),e}),allHeights:U(()=>{let e=Ng.reduce((e,t)=>(e[t]=[],e),{});return i.value.forEach(t=>{e[t.position].push(t)}),e})}},Ug=P({name:`DynamicRender`,inheritAttrs:!1,__name:`dynamic-render`,props:{is:{}},setup(e){let t=xi();return(n,r)=>typeof e.is==`string`?(I(),L(F,{key:0},[V(A(e.is),1)],64)):(I(),R(ci(e.is),ge(Za({key:1},M(t))),null,16))}}),Wg=[`dir`,`data-rich-color`,`data-inverted`,`data-mounted`,`data-promise`,`data-swiped`,`data-removed`,`data-visible`,`data-y-position`,`data-x-position`,`data-index`,`data-front`,`data-swiping`,`data-dismissible`,`data-type`,`data-swipe-out`,`data-swipe-direction`,`data-expanded`,`data-testid`],Gg=P({name:`Toast`,__name:`toast`,props:{index:{},toast:{},position:{}},emits:[`update:height`,`remove`],setup(e,{emit:t}){let n=e,r=t,{dir:i,allToasts:a,allHeights:o,gap:s,duration:c,visibleCounts:l,defaultExpanded:u,swipeDirections:d,interactingPosition:f,expandedPosition:p,showIcon:m,showClose:h,icons:g,toastProps:_,wrapperProps:v,contentProps:y,titleProps:b,descriptionProps:x,iconProps:S,footerProps:C,actionProps:w,cancelProps:ee,closeProps:T}=hg(`Toast`),E=_g(),D=Lr(`toast`),te=Lr(`wrapper`),ne=Mu(),{height:re}=zu(te),ie=Pu(),O=on(null),ae=on(null),oe=on(!1),se=on(!1),ce=on(!1),le=on(!1),ue=on(0),de=on(0),fe=on(n.toast.duration??c.value),pe=on(null),me=on(0),he=on(0),k=on(null),ge=U(()=>n.toast.type),_e=U(()=>{if(m.value){if(n.toast.icon)return n.toast.icon;if(ge.value&&ge.value!=="default")return g.value[ge.value];if(n.toast.promise)return g.value.loading}}),ve=U(()=>n.index===0),ye=U(()=>n.index+1<=l.value),be=U(()=>ge.value===`loading`),xe=U(()=>n.toast.dismissible!==!1),Se=U(()=>Math.max(o.value[n.position].findIndex(e=>e.toastId===n.toast.id),0)),Ce=U(()=>(n.toast.showClose??h.value)&&xe.value&&ge.value!==`loading`),we=U(()=>n.toast.duration??c.value),Te=U(()=>{let[e,t]=n.position.split(`-`);return{x:t,y:e}}),Ee=U(()=>o.value[n.position].reduce((e,t,n)=>n>=Se.value?e:e+t.height,0)),A=U(()=>Se.value*s.value+Ee.value),De=U(()=>p.value===n.position||u.value&&ne.value),Oe=U(()=>({[kg.index]:n.index,[kg.beforeIndex]:n.index,[kg.zIndex]:a.value[n.position].length-n.index,[kg.offset]:`${oe.value?ue.value:A.value}px`,[kg.initialHeight]:u.value?`auto`:`${de.value}px`})),ke=()=>{oe.value=!0,ue.value=A.value,window.setTimeout(()=>{r(`remove`,n.toast)},200)},Ae=()=>{!be.value&&xe.value&&(ke(),n.toast.onDismiss?.(n.toast))},je=e=>{e.button!==2&&!be.value&&xe.value&&(pe.value=new Date,ue.value=A.value,e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(se.value=!0,k.value={x:e.clientX,y:e.clientY}))},Me=()=>{if(ce.value||!xe.value)return;k.value=null;let{x:e,y:t}=Lg(D.value),r=Date.now()-(pe.value?.getTime()??Date.now()),i=O.value===`x`?e:t,a=Math.abs(i)/Math.max(r,1);if(Math.abs(i)>=45||a>.11){ue.value=A.value,n.toast.onDismiss?.(n.toast),O.value===`x`?ae.value=e>0?`right`:`left`:ae.value=t>0?`down`:`up`,ke(),ce.value=!0;return}zg(D.value),le.value=!1,se.value=!1,O.value=null},Ne=e=>{if(!k.value||!xe.value||(typeof window<`u`?window.getSelection()?.toString().length??0:0)>0)return;let t=e.clientY-k.value.y,r=e.clientX-k.value.x,i=d.value??Fg(n.position);!O.value&&(Math.abs(r)>1||Math.abs(t)>1)&&(O.value=Math.abs(r)>Math.abs(t)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(O.value===`y`){if(i.includes(`up`)||i.includes(`down`)){if(i.includes(`up`)&&t<0||i.includes(`down`)&&t>0)a.y=t;else{let e=t*o(t);a.y=Math.abs(e)<Math.abs(t)?e:t}}}else if(O.value===`x`&&(i.includes(`left`)||i.includes(`right`))){if(i.includes(`left`)&&r<0||i.includes(`right`)&&r>0)a.x=r;else{let e=r*o(r);a.x=Math.abs(e)<Math.abs(r)?e:r}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&(le.value=!0),Rg(D.value,a)},Pe=()=>{se.value=!1,O.value=null,k.value=null},Fe=e=>{n.toast.onAction?.(e),!e.defaultPrevented&&ke()},Ie=e=>{n.toast.onCancel?.(e),xe.value&&ke()};function Le(e){de.value=e,r(`update:height`,{toastId:n.toast.id,height:e,position:n.toast.position??n.position})}function Re(){let e=D.value;if(!e)return;let t=e.style.height;e.style.height=`auto`;let n=e.getBoundingClientRect().height;e.style.height=t,Le(n)}return nr(we,e=>{fe.value=e},{immediate:!0}),nr(re,e=>{ne.value&&e&&Re()},{flush:`post`}),nr(()=>n.toast.delete,e=>{e&&(ke(),n.toast.onDismiss?.(n.toast))}),er(()=>{let e=n.toast;if(e.type===`loading`||e.promise||e.duration===1/0)return;let t;p.value===n.position||f.value===n.position||ie.value===`hidden`?(()=>{if(he.value<me.value){let e=Date.now()-me.value;fe.value-=e}he.value=Date.now()})():fe.value!==1/0&&(me.value=Date.now(),t=setTimeout(()=>{n.toast.onAutoClose?.(n.toast),ke()},fe.value)),xn(()=>{t!==void 0&&clearTimeout(t)})}),(t,n)=>(I(),L(`li`,Za(M(_),{ref:`toast`,"data-vean-toast":``,class:[M(E).toast,e.toast.ui?.toast],dir:M(i),tabindex:`0`,"data-rich-color":e.toast.richColor,"data-inverted":e.toast.inverted,"data-mounted":M(ne),"data-promise":!!e.toast.promise,"data-swiped":le.value,"data-removed":oe.value,"data-visible":ye.value,"data-y-position":Te.value.y,"data-x-position":Te.value.x,"data-index":e.index,"data-front":ve.value,"data-swiping":se.value,"data-dismissible":xe.value,"data-type":ge.value,"data-swipe-out":ce.value,"data-swipe-direction":ae.value,"data-expanded":De.value,"data-testid":e.toast.testId,style:Oe.value,onDragend:Pe,onPointerdown:je,onPointerup:Me,onPointermove:Ne}),[z(`div`,Za({ref:`wrapper`},M(v),{class:[M(E).wrapper,e.toast.ui?.wrapper],"data-vean-toast-wrapper":``}),[e.toast.custom?(I(),R(ci(e.toast.custom),{key:0})):(I(),L(F,{key:1},[z(`h3`,Za(M(b),{class:[M(E).title,e.toast.ui?.title],"data-vean-toast-title":``}),[_e.value?(I(),R(ff,Za({key:0},M(S),{icon:_e.value,class:[M(E).icon,e.toast.ui?.icon]}),null,16,[`icon`,`class`])):H(`v-if`,!0),B(Ug,{is:e.toast.title},null,8,[`is`])],16),e.toast.description?(I(),L(`p`,Za({key:0},M(x),{class:[M(E).description,e.toast.ui?.description],"data-vean-toast-description":``}),[B(Ug,{is:e.toast.description},null,8,[`is`])],16)):H(`v-if`,!0),e.toast.content?(I(),R(ci(e.toast.content),Za({key:1},M(y),{class:[M(E).content,e.toast.ui?.content],"data-vean-toast-content":``}),null,16,[`class`])):H(`v-if`,!0),e.toast.action||e.toast.cancel?(I(),L(`div`,Za({key:2},M(C),{class:[M(E).footer,e.toast.ui?.footer],"data-vean-toast-footer":``}),[e.toast.cancel?(I(),R(sm,Za({key:0},M(ee),{class:[M(E).cancel,e.toast.ui?.cancel],"data-vean-toast-cancel":``,onClick:Ie}),{default:qn(()=>[B(Ug,{is:e.toast.cancel},null,8,[`is`])]),_:1},16,[`class`])):H(`v-if`,!0),e.toast.action?(I(),R(sm,Za({key:1},M(w),{class:[M(E).action,e.toast.ui?.action],"data-vean-toast-action":``,onClick:Fe}),{default:qn(()=>[B(Ug,{is:e.toast.action},null,8,[`is`])]),_:1},16,[`class`])):H(`v-if`,!0)],16)):H(`v-if`,!0)],64))],16),Ce.value&&M(g)?.close?(I(),R(sm,Za({key:0},M(T),{class:[M(E).close,e.toast.ui?.close],"data-vean-toast-close":``,onClick:Ae}),{default:qn(()=>[B(ff,{icon:M(g)?.close},null,8,[`icon`])]),_:1},16,[`class`])):H(`v-if`,!0)],16,Wg))}}),Kg=[`aria-label`],qg=[`dir`,`data-y-position`,`data-x-position`,`onBlur`,`onFocus`,`onMouseenter`,`onMousemove`,`onMouseleave`,`onDragend`,`onPointerdown`,`onPointerup`],Jg=P({name:`Toaster`,inheritAttrs:!1,__name:`toaster`,props:{id:{},dir:{},hotkey:{default:()=>[`altKey`,`KeyT`]},customAriaLabel:{},containerAriaLabel:{default:`Notifications`},position:{default:Ag},defaultExpanded:{type:Boolean},duration:{default:jg},gap:{default:12},offset:{default:24},visibleCounts:{default:3},swipeDirections:{},showIcon:{type:Boolean},showClose:{type:Boolean},icons:{},toastProps:{},wrapperProps:{},contentProps:{},titleProps:{},descriptionProps:{},iconProps:{},footerProps:{},actionProps:{},cancelProps:{},closeProps:{}},setup(e){let t=e,n=xi(),r=_g(),i=rf(()=>t.dir),a=U(()=>t.hotkey.join(`+`).replace(/Key/g,``).replace(/Digit/g,``)),o=U(()=>t.customAriaLabel??`${t.containerAriaLabel} ${a.value}`),s={},c=(e,t)=>{s[e]=mu(t)},{toasts:l,allToasts:u,filtered:d,heights:f,allHeights:p,allPositions:m,positionZIndex:h}=Hg({id:()=>t.id,position:()=>t.position}),g=U(()=>({...Mg,...t.icons})),_=on(null),v=on(null),y=on(null),b=on(null),x=U(()=>({[Og.gap]:`${t.gap}px`,...Ig(t.offset)})),S=e=>{_.value===e&&(_.value=null),v.value===e&&(v.value=null),b.value===e&&(b.value=null)},C=e=>{s[e]?.focus()},w=e=>{if(f.value.findIndex(t=>t.toastId===e.toastId)!==-1){f.value=f.value.map(t=>t.toastId===e.toastId?e:t);return}let t=f.value.findIndex(t=>t.position===e.position);if(t!==-1){f.value=[...f.value.slice(0,t),e,...f.value.slice(t)];return}f.value=[e,...f.value]},ee=e=>{let t=l.value.findIndex(t=>t.id===e.id);if(t!==-1){let n=Object.assign({},l.value[t],e);l.value=[...l.value.slice(0,t),n,...l.value.slice(t+1)];return}l.value=[e,...l.value]},T=e=>{l.value=l.value.filter(t=>t.id!==e.id||(t.delete||yg.dismiss(e.id),!1)),f.value=f.value.filter(t=>t.toastId!==e.id)},E=(e,t)=>{let n=t.currentTarget;b.value===e&&n&&!n.contains(t.relatedTarget)&&(b.value=null,_.value===e&&v.value!==e&&(_.value=null),y.value&&=(y.value.focus({preventScroll:!0}),null))},D=(e,t)=>{t.target.dataset.dismissible!==`false`&&b.value!==e&&(b.value=e,y.value=t.relatedTarget)},te=e=>{_.value=e},ne=e=>{v.value!==e&&b.value!==e&&_.value===e&&(_.value=null)},re=(e,t)=>{t.target.dataset.dismissible!==`false`&&(v.value=e,_.value=e)},ie=e=>{v.value===e&&(v.value=null)};return mg({dir:i,allToasts:u,allHeights:p,interactingPosition:v,expandedPosition:_,icons:g,...hu(t,[`gap`,`duration`,`visibleCounts`,`defaultExpanded`,`swipeDirections`,`showIcon`,`showClose`,`toastProps`,`wrapperProps`,`contentProps`,`titleProps`,`descriptionProps`,`iconProps`,`footerProps`,`actionProps`,`cancelProps`,`closeProps`])}),er(()=>{let e=yg.subscribe(e=>{if(Bg(e)){requestAnimationFrame(()=>{l.value=l.value.map(t=>t.id===e.id?{...t,delete:!0}:t)});return}Fn(()=>{ee(e)})});xn(()=>{e()})},{flush:`post`}),nr(()=>l.value.length,e=>{e===0&&(_.value=null,v.value=null,b.value=null)}),nr(()=>d.value,e=>{let n=new Set(e.map(e=>e.position??t.position));_.value&&!n.has(_.value)&&(_.value=null),v.value&&!n.has(v.value)&&(v.value=null),b.value&&!n.has(b.value)&&(b.value=null)},{deep:!0}),er(()=>{if(!Gl)return;let e=e=>{if(t.hotkey.length>0&&t.hotkey.every(t=>Vg(t)?e[t]:e.code===t)){let e=d.value[0]?.position??t.position??m.value[0];_.value=e,C(e)}let n=Object.values(s).some(e=>e===document.activeElement||e?.contains(document.activeElement));e.code===`Escape`&&n&&(_.value=null,b.value=null)};document.addEventListener(`keydown`,e),xn(()=>{document.removeEventListener(`keydown`,e)})}),ei(()=>{y.value&&(y.value.focus({preventScroll:!0}),y.value=null,b.value=null)}),(e,t)=>(I(),L(F,null,[z(`section`,{"data-vean-toaster-container":``,"aria-label":o.value,tabindex:`-1`,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`},[(I(!0),L(F,null,di(M(Ng),e=>(I(),L(`ol`,Za({key:e},{ref_for:!0},M(n),{ref_for:!0,ref:t=>c(e,t),class:M(r).toaster,tabindex:`-1`,dir:M(i),"data-vean-toaster":``,"data-y-position":e.split(`-`)[0],"data-x-position":e.split(`-`)[1],style:{"--z-index":M(h)[e],"--front-toast-height":`${M(p)[e][0]?.height??0}px`,...x.value},onBlur:t=>E(e,t),onFocus:t=>D(e,t),onMouseenter:t=>te(e),onMousemove:t=>te(e),onMouseleave:t=>ne(e),onDragend:t=>S(e),onPointerdown:t=>re(e,t),onPointerup:t=>ie(e)}),[(I(!0),L(F,null,di(M(u)[e],(t,n)=>(I(),R(Gg,{key:t.id,index:n,toast:t,position:e,"onUpdate:height":w,onRemove:T},null,8,[`index`,`toast`,`position`]))),128))],16,qg))),128))],8,Kg),pi(e.$slots,`default`)],64))}}),Yg=P({name:`ToastProvider`,__name:`toast-provider`,props:{id:{},dir:{},hotkey:{},customAriaLabel:{},containerAriaLabel:{},position:{},defaultExpanded:{type:Boolean},duration:{},gap:{},offset:{},visibleCounts:{},swipeDirections:{},showIcon:{type:Boolean},showClose:{type:Boolean},icons:{},toastProps:{},wrapperProps:{},contentProps:{},titleProps:{},descriptionProps:{},iconProps:{},footerProps:{},actionProps:{},cancelProps:{},closeProps:{}},setup(e){let t=e;return(e,n)=>(I(),R(Jg,Za({"data-vean-toast-provider":``},t),{default:qn(()=>[pi(e.$slots,`default`)]),_:3},16))}}),Xg=P({name:`SToastProvider`,__name:`toast-provider`,props:{size:{},ui:{},id:{},dir:{},hotkey:{},customAriaLabel:{},containerAriaLabel:{},position:{},defaultExpanded:{type:Boolean},duration:{},gap:{},offset:{},visibleCounts:{},swipeDirections:{},showIcon:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},icons:{},toastProps:{},wrapperProps:{},contentProps:{},titleProps:{},descriptionProps:{},iconProps:{},footerProps:{},actionProps:{},cancelProps:{},closeProps:{}},setup(e){let t=e,n=Kd(t,[`size`,`ui`]);return gg(U(()=>pg({size:t.size},t.ui))),(e,t)=>(I(),R(M(Yg),ge(Ka(M(n))),{default:qn(()=>[pi(e.$slots,`default`)]),_:3},16))}});function Zg(){return typeof window>`u`}var Qg=Dm.base,$g=Dm.primary,e_=Dm.radius,t_=Dm.size,n_=Dm.spacing,r_=`light`,[i_,a_]=Wl(`UiThemeContext`),o_=e=>e===`media`?null:e===`class`?`dark`:e.replace(/^\./,``),s_=e=>!!e&&`light`in e;function c_(e){let t=e.isServer??Zg(),n=null;e.persistTheme&&(e.themeConfig?n=e.themeConfig:t||(n=ig()));let r=Gt({...n?.options,base:n?.options?.base??Qg,primary:n?.options?.primary??$g,radius:n?.options?.radius??e_,size:n?.options?.size??t_,spacing:n?.options?.spacing??n_,mode:n?.mode??r_}),i=U({get:()=>r.base??Qg,set:e=>{r.base=e}}),a=U({get:()=>r.primary??$g,set:e=>{r.primary=e}}),o=U({get:()=>r.radius??e_,set:e=>{r.radius=e}}),s=U({get:()=>r.size??t_,set:e=>{r.size=e}}),c=U({get:()=>r.spacing??n_,set:e=>{r.spacing=e}}),l=U({get:()=>r.mode??r_,set:e=>{r.mode=e}}),u=j(!1),d;!t&&typeof window<`u`&&typeof window.matchMedia==`function`&&(d=window.matchMedia(`(prefers-color-scheme: dark)`),u.value=d.matches);let f=e=>{u.value=e.matches};d?.addEventListener(`change`,f),ti(()=>{d?.removeEventListener(`change`,f)});let p=U(()=>l.value===`auto`?u.value?`dark`:`light`:l.value);nr(p,t=>{if(typeof document>`u`)return;let n=e.theme?.darkSelector??`class`,r=o_(n);if(document.documentElement.style.colorScheme=Wm(t,n),!r)return;let i=document.createElement(`style`);i.appendChild(document.createTextNode(`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`)),document.head.appendChild(i),document.documentElement.classList.toggle(r,t===`dark`),window.getComputedStyle(i).opacity,document.head.removeChild(i)},{immediate:!0});let m=j(0),h=j(n?.presets??{}),g=j(n?.appliedPreset??null),_=()=>{if(!e.persistTheme||e.themeConfig)return;let t=ig();t&&(Object.assign(r,t.options,{mode:t.mode??r.mode}),h.value=t.presets??{},g.value=t.appliedPreset??null),m.value++},v=e=>{let t={light:{primary:`${a.value}.600`,ring:`${a.value}.500`},dark:{primary:`${a.value}.400`,ring:`${a.value}.300`}};return h.value={...h.value,[e]:t},S(e),!0},y=e=>{if(!(e in h.value))return!1;let t={...h.value};return delete t[e],h.value=t,g.value===e&&S(null),!0},b=e=>{S(e)},x=()=>{S(null)},S=e=>{g.value=e},C=()=>{let n=e.theme?.preset;if(s_(n))return n;let r=n?.name??g.value;if(!r||!e.persistTheme)return;let i=t?e.presetProvider?.(r)??void 0:h.value[r];return!i&&t&&console.warn(`[SConfigProvider] theme preset "${r}" not found, falling back to built-in colors.`),i};return{base:i,primary:a,radius:o,size:s,spacing:c,mode:l,effectiveMode:p,setRadius:e=>{o.value=e},setSize:e=>{s.value=e},setSpacing:e=>{c.value=e},setMode:e=>{l.value=e},customPresets:h,appliedPresetName:g,savePreset:v,removePreset:y,applyPreset:b,resetPreset:x,theme:U(()=>{m.value;let t=e.theme??{},n=C(),i=t.overrides??r.overrides??(n?{light:n.light,...n.dark?{dark:n.dark}:{}}:void 0);return{base:t.base??r.base??Qg,primary:t.primary??r.primary??$g,feedback:t.feedback??r.feedback,overrides:i,size:t.size??r.size??e.size??t_,radius:t.radius??r.radius??e_,spacing:t.spacing??r.spacing,font:t.font??r.font,format:t.format??r.format,surfaceStyle:t.surfaceStyle??r.surfaceStyle,borderOpacity:t.borderOpacity??r.borderOpacity,styleTarget:t.styleTarget??r.styleTarget,darkSelector:t.darkSelector??r.darkSelector}}),setThemeState:e=>{Object.assign(r,e)},refreshThemeConfig:_}}var l_=Symbol.for(`UIConfigProvider`),u_=/^[a-z0-9]+(-[a-z0-9]+)*$/,d_=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!f_(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!f_(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!f_(e,n)?null:e}return null},f_=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function p_(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return Object.keys(n).concat(Object.keys(r)).forEach(a),i}var m_=Object.freeze({left:0,top:0,width:16,height:16}),h_=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),g_=Object.freeze({...m_,...h_}),__=Object.freeze({...g_,body:``,hidden:!1});function v_(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function y_(e,t){let n=v_(e,t);for(let r in __)r in h_?r in e&&!(r in n)&&(n[r]=h_[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function b_(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=y_(r[e]||i[e],a)}return o(t),n.forEach(o),y_(e,a)}function x_(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=p_(e);for(let i in r){let a=r[i];a&&(t(i,b_(e,i,a)),n.push(i))}return n}var S_={provider:``,aliases:{},not_found:{},...m_};function C_(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function w_(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!C_(e,S_))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!C_(t,__))return null}let r=t.aliases||Object.create(null);for(let e in r){let t=r[e],i=t.parent;if(!e||typeof i!=`string`||!n[i]&&!r[i]||!C_(t,__))return null}return t}var T_=Object.create(null);function E_(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function D_(e,t){let n=T_[e]||(T_[e]=Object.create(null));return n[t]||(n[t]=E_(e,t))}function O_(e,t){return w_(t)?x_(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function k_(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}var A_=!1;function j_(e){return typeof e==`boolean`&&(A_=e),A_}function M_(e){let t=typeof e==`string`?d_(e,!0,A_):e;if(t){let e=D_(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function N_(e,t){let n=d_(e,!0,A_);if(!n)return!1;let r=D_(n.provider,n.prefix);return t?k_(r,n.name,t):(r.missing.add(n.name),!0)}function P_(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),A_&&!t&&!e.prefix){let t=!1;return w_(e)&&(e.prefix=``,x_(e,(e,n)=>{N_(e,n)&&(t=!0)})),t}let n=e.prefix;return f_({prefix:n,name:`a`})?!!O_(D_(t,n),e):!1}var F_=Object.freeze({width:null,height:null}),I_=Object.freeze({...F_,...h_}),L_=/(-?[0-9.]*[0-9]+[0-9.]*)/g,R_=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function z_(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(L_);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=R_.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function B_(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function V_(e,t){return e?`<defs>`+e+`</defs>`+t:t}function H_(e,t,n){let r=B_(e);return V_(r.defs,t+r.content+n)}var U_=e=>e===`unset`||e===`undefined`||e===`none`;function W_(e,t){let n={...g_,...e},r={...I_,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`)}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=H_(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=z_(d,c/l)):(u=o===`auto`?c:o,d=s===null?z_(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{U_(t)||(f[e]=t.toString())};p(`width`,u),p(`height`,d);let m=[i.left,i.top,c,l];return f.viewBox=m.join(` `),{attributes:f,viewBox:m,body:a}}var G_=/\sid="(\S+)"/g,K_=new Map;function q_(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=K_.get(e)||0;return K_.set(e,t+1),t?`${e}${t}`:e}function J_(e){let t=[],n;for(;n=G_.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=q_(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}var Y_=Object.create(null);function X_(e,t){Y_[e]=t}function Z_(e){return Y_[e]||Y_[``]}function Q_(e){let t;if(typeof e.resources==`string`)t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||`/`,maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}for(var $_=Object.create(null),ev=[`https://api.simplesvg.com`,`https://api.unisvg.com`],tv=[];ev.length>0;)ev.length===1||Math.random()>.5?tv.push(ev.shift()):tv.push(ev.pop());$_[``]=Q_({resources:[`https://api.iconify.design`].concat(tv)});function nv(e,t){let n=Q_(t);return n!==null&&($_[e]=n,!0)}function rv(e){return $_[e]}var iv=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}})();function av(e,t){let n=rv(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{e=Math.max(e,t.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function ov(e){return e===404}var sv=(e,t,n)=>{let r=[],i=av(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function cv(e){if(typeof e==`string`){let t=rv(e);if(t)return t.path}return`/`}var lv={prepare:sv,send:(e,t,n)=>{if(!iv){n(`abort`,424);return}let r=cv(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;iv(e+r).then(e=>{let t=e.status;if(t!==200){setTimeout(()=>{n(ov(t)?`abort`:`next`,t)});return}return i=501,e.json()}).then(e=>{if(typeof e!=`object`||!e){setTimeout(()=>{e===404?n(`abort`,e):n(`next`,i)});return}setTimeout(()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})}};function uv(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function dv(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||uv([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var fv=0;function pv(e,t,n){let r=fv++,i=uv.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||=[]).push(a)}),i}function mv(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=D_(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}function hv(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?d_(e,t,n):e;i&&r.push(i)}),r}var gv={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function _v(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&=(clearTimeout(d),null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`){u=r,v();return}if(i){u=r,f.length||(o.length?x():v());return}if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function vv(e){let t={...gv,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=_v(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function yv(){}var bv=Object.create(null);function xv(e){if(!bv[e]){let t=rv(e);if(!t)return;bv[e]={config:t,redundancy:vv(t)}}return bv[e]}function Sv(e,t,n){let r,i;if(typeof e==`string`){let t=Z_(e);if(!t)return n(void 0,424),yv;i=t.send;let a=xv(e);a&&(r=a.redundancy)}else{let t=Q_(e);if(t){r=vv(t);let n=Z_(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),yv):r.query(t,i,n)().abort}function Cv(){}function wv(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,dv(e)}))}function Tv(e){let t=[],n=[];return e.forEach(e=>{(e.match(u_)?t:n).push(e)}),{valid:t,invalid:n}}function Ev(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&typeof n==`object`)try{if(!O_(e,n).length){r();return}}catch(e){console.error(e)}r(),wv(e)}function Dv(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function Ov(e,t){e.iconsToLoad=e.iconsToLoad?e.iconsToLoad.concat(t).sort():t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;let i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){Dv(e.loadIcons(r,n,t),t=>{Ev(e,r,t)});return}if(i){r.forEach(r=>{Dv(i(r,n,t),t=>{Ev(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=Tv(r);if(o.length&&Ev(e,o,null),!a.length)return;let s=n.match(u_)?Z_(t):null;if(!s){Ev(e,a,null);return}s.prepare(t,n,a).forEach(n=>{Sv(t,n,t=>{Ev(e,n.icons,t)})})}))}var kv=(e,t)=>{let n=mv(hv(e,!0,j_()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,Cv)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(D_(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=D_(t,n),o=a.pendingIcons||=new Set;o.has(i)||(o.add(i),r[t][n].push(i))}),i.forEach(e=>{let t=r[e.provider][e.prefix];t.length&&Ov(e,t)}),t?pv(t,n,i):Cv};function Av(e,t){let n={...e};for(let e in t){let r=t[e],i=typeof r;e in F_?(r===null||r&&(i===`string`||i===`number`))&&(n[e]=r):i===typeof n[e]&&(n[e]=e===`rotate`?r%4:r)}return n}var jv=/[\s,]+/;function Mv(e,t){t.split(jv).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0}})}function Nv(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}function Pv(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function Fv(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `).replace(/:/g,`%3A`).replace(/\//g,`%2F`)}function Iv(e){return`data:image/svg+xml,`+Fv(e)}function Lv(e){return`url("`+Iv(e)+`")`}var Rv={...I_,inline:!1},zv={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":!0,role:`img`},Bv={display:`inline-block`},Vv={backgroundColor:`currentColor`},Hv={backgroundColor:`transparent`},Uv={Image:`var(--svg)`,Repeat:`no-repeat`,Size:`100% 100%`},Wv={webkitMask:Vv,mask:Vv,background:Hv};for(let e in Wv){let t=Wv[e];for(let n in Uv)t[e+n]=Uv[n]}var Gv={};[`horizontal`,`vertical`].forEach(e=>{let t=e.slice(0,1)+`Flip`;Gv[e+`-flip`]=t,Gv[e.slice(0,1)+`-flip`]=t,Gv[e+`Flip`]=t});function Kv(e){return e+(e.match(/^[-0-9.]+$/)?`px`:``)}var qv=(e,t)=>{let n=Av(Rv,t),r={...zv},i=t.mode||`svg`,a={},o=t.style,s=typeof o==`object`&&!(o instanceof Array)?o:{};for(let e in t){let i=t[e];if(i!==void 0)switch(e){case`icon`:case`style`:case`onLoad`:case`mode`:case`ssr`:case`customise`:break;case`inline`:case`hFlip`:case`vFlip`:n[e]=i===!0||i===`true`||i===1;break;case`flip`:break;case`color`:a.color=i;break;case`rotate`:typeof i==`string`?n[e]=Nv(i):typeof i==`number`&&(n[e]=i);break;case`ariaHidden`:case`aria-hidden`:i!==!0&&i!==`true`&&delete r[`aria-hidden`];break;default:{let t=Gv[e];t?(i===!0||i===`true`||i===1)&&(n[t]=!0):Rv[e]===void 0&&(r[e]=i)}}}typeof t.flip==`string`&&Mv(n,t.flip);let c=W_(e,n),l=c.attributes;if(n.inline&&(a.verticalAlign=`-0.125em`),i===`svg`)return r.style={...a,...s},Object.assign(r,l),r.innerHTML=J_(c.body),bo(`svg`,r);let{body:u,width:d,height:f}=e,p=i===`mask`||i!==`bg`&&u.indexOf(`currentColor`)!==-1,m=Pv(u,{...l,width:d+``,height:f+``});return r.style={...a,"--svg":Lv(m),width:Kv(l.width),height:Kv(l.height),...Bv,...p?Vv:Hv,...s},bo(`span`,r)};if(j_(!0),X_(``,lv),typeof document<`u`&&typeof window<`u`){let e=window;if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!P_(e))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;nv(e,r)||console.error(n)}catch{console.error(n)}}}}var Jv={...g_,body:``},Yv=P((e,{emit:t})=>{let n=j(null);function r(){n.value&&=(n.value.abort?.(),null)}let i=j(!!e.ssr),a=j(``),o=on(null);function s(){let i=e.icon;if(typeof i==`object`&&i&&typeof i.body==`string`)return a.value=``,{data:i};let o;if(typeof i!=`string`||(o=d_(i,!1,!0))===null)return null;let s=M_(o);if(!s){let e=n.value;return(!e||e.name!==i)&&(s===null?n.value={name:i}:n.value={name:i,abort:kv([o],c)}),null}r(),a.value!==i&&(a.value=i,Fn(()=>{t(`load`,i)}));let l=e.customise;if(l){s=Object.assign({},s);let e=l(s.body,o.name,o.prefix,o.provider);typeof e==`string`&&(s.body=e)}let u=[`iconify`];return o.prefix!==``&&u.push(`iconify--`+o.prefix),o.provider!==``&&u.push(`iconify--`+o.provider),{data:s,classes:u}}function c(){let e=s();e?e.data!==o.value?.data&&(o.value=e):o.value=null}return i.value?c():Zr(()=>{i.value=!0,c()}),nr(()=>e.icon,c),ti(r),()=>{let t=o.value;if(!t)return qv(Jv,e);let n=e;return t.classes&&(n={...e,class:t.classes.join(` `)}),qv({...g_,...t.data},n)}},{props:{icon:{type:[String,Object],required:!0},mode:{type:String},ssr:{type:Boolean},width:{type:[String,Number]},height:{type:[String,Number]},style:{type:[String,Object]},color:{type:String},inline:{type:Boolean},rotate:{type:[Number,String]},hFlip:{type:Boolean},horizontalFlip:{type:Boolean},vFlip:{type:Boolean},verticalFlip:{type:Boolean},flip:{type:String},id:{type:String},ariaHidden:{type:[Boolean,String],default:void 0},customise:{type:Function},title:{type:String}},emits:[`load`]}),W=P({name:`SIcon`,__name:`icon`,props:{icon:{},ariaHidden:{type:Boolean,default:!0},ariaLabel:{},ariaLabelledby:{},ssr:{type:Boolean},customise:{},id:{},style:{},title:{},mode:{},color:{},flip:{},horizontalFlip:{type:Boolean},verticalFlip:{type:Boolean},rotate:{},hFlip:{type:Boolean},vFlip:{type:Boolean},width:{},height:{},inline:{type:Boolean}},setup(e){let t=e,n=Zn(l_),r=U(()=>{let{width:e,height:r}=t,i=n?.iconify||{};return{width:e||i.width,height:r||i.height}}),i=U(()=>t.ariaLabel||t.ariaLabelledby?!1:t.ariaHidden),a=U(()=>({"aria-hidden":i.value,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby})),o=U(()=>s(t.icon)?{...a.value,"data-allow-mismatch":`class,attribute`,...r.value,mode:t.mode,color:t.color,flip:t.flip,horizontalFlip:t.horizontalFlip||void 0,verticalFlip:t.verticalFlip||void 0,rotate:t.rotate,hFlip:t.hFlip||void 0,vFlip:t.vFlip||void 0,inline:t.inline,id:t.id,style:t.style,title:t.title,ssr:t.ssr,customise:t.customise,icon:t.icon}:null);function s(e){return e?typeof e==`string`||typeof e==`object`&&`body`in e:!1}return(t,n)=>o.value?(I(),R(M(Yv),Za({key:0},o.value,{class:`shrink-0`,"data-vean-icon":``}),null,16)):e.icon?(I(),R(ci(e.icon),Za({key:1,class:`shrink-0`,"data-vean-icon":``},a.value,{style:{width:r.value.width,height:r.value.height}}),null,16,[`style`])):H(`v-if`,!0)}}),Xv=P({name:`ConfigProvider`,__name:`config-provider`,props:{dir:{},locale:{default:`en`},nonce:{default:void 0},tooltip:{},iconRender:{},linkComponent:{},messages:{}},setup(e){return tf(Jt(e)),(e,t)=>pi(e.$slots,`default`)}}),[Zv,Qv]=Wl(`DialogRoot`,e=>{let[t,n]=gu(),[r,i]=gu(),[a,o]=gu(),[s,c]=gu(),[l,u]=gu(),{open:d,fullscreen:f}=e,p=e=>{d.value=e},m=()=>{d.value=!d.value},h=e=>{f.value=e},g=()=>{f.value=!f.value},_=U(()=>lf(d.value)),v=on(``),y=`vean-dialog-popup-${Fr()}`,b=()=>{v.value||=y},x=on(``),S=`vean-dialog-title-${Fr()}`,C=()=>{x.value||=S},w=on(``),ee=`vean-dialog-description-${Fr()}`,T=()=>{w.value||=ee},E=async()=>{await Fn(),s.value?.focus({preventScroll:!0})};return{...e,onOpenChange:p,onOpenToggle:m,onFullscreenChange:h,onFullscreenToggle:g,dataState:_,overlayElement:t,setOverlayElement:n,triggerElement:r,setTriggerElement:i,popupElement:a,setPopupElement:o,cancelElement:s,setCancelElement:c,headerElement:l,setHeaderElement:u,popupId:v,initPopupId:b,titleId:x,initTitleId:C,descriptionId:w,initDescriptionId:T,focusCancel:E}}),[$v,ey]=Wl(`DialogProvider`,e=>{let{dialogs:t}=e;return{dialogs:t,getCurrentDialog:e=>t.value.find(t=>String(t.id)===String(e))}}),[ty,ny]=Wl(`DialogCompact`,e=>{let{dialog:t}=e;return{dialog:t}}),[ry,iy]=af(`DialogUi`),ay=(e=>{if(!e)return iy();let t=ny(),n=iy(e);return U(()=>{let r=t?.dialog?.value?.ui?.[e];return[n.value,r].filter(Boolean).join(` `)})}),oy=P({name:`DialogCancel`,__name:`dialog-cancel`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`cancel`],setup(e,{emit:t}){let n=e,r=t,i=ay(`cancel`),{setCancelElement:a,onOpenChange:o}=Qv(`DialogCancel`),s=async e=>{r(`cancel`,e),o(!1)};return(e,t)=>(I(),R(sm,Za({ref:M(a)},n,{"data-vean-dialog-cancel":``,class:M(i),onClick:s}),{default:qn(()=>[pi(e.$slots,`default`)]),_:3},16,[`class`]))}}),sy=P({name:`DialogClose`,__name:`dialog-close`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=xi(),a=ay(`close`),{onOpenChange:o}=Qv(`DialogClose`),s=cg(),c=U(()=>i[`aria-label`]??s.value.dialog.close),l=async e=>{r(`close`,e),o(!1)};return(e,t)=>(I(),R(sm,Za(n,{"data-vean-dialog-close":``,"aria-label":c.value,class:M(a),onClick:l}),{default:qn(()=>[pi(e.$slots,`default`,{},()=>[B(ff,{icon:`lucide:x`})])]),_:3},16,[`aria-label`,`class`]))}}),cy=P({name:`DialogConfirm`,__name:`dialog-confirm`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`confirm`],setup(e,{emit:t}){let n=e,r=t,i=ay(`confirm`),{onOpenChange:a}=Qv(`DialogConfirm`),o=async e=>{r(`confirm`,e),a(!1)};return(e,t)=>(I(),R(sm,Za(n,{"data-vean-dialog-confirm":``,class:M(i),onClick:o}),{default:qn(()=>[pi(e.$slots,`default`)]),_:3},16,[`class`]))}}),ly=P({name:`DialogContent`,__name:`dialog-content`,setup(e){let t=ay(`content`);return(e,n)=>(I(),L(`div`,{"data-vean-dialog-content":``,class:k(M(t))},[pi(e.$slots,`default`)],2))}}),uy=[`id`],dy=P({name:`DialogDescription`,__name:`dialog-description`,setup(e){let{descriptionId:t,initDescriptionId:n}=Qv(`DialogDescription`),r=ay(`description`);return n(),(e,n)=>(I(),L(`p`,{id:M(t),"data-vean-dialog-description":``,class:k(M(r))},[pi(e.$slots,`default`)],10,uy))}}),fy=P({name:`DialogFooter`,__name:`dialog-footer`,setup(e){let t=ay(`footer`);return(e,n)=>(I(),L(`div`,{"data-vean-dialog-footer":``,class:k(M(t))},[pi(e.$slots,`default`)],2))}}),py=P({name:`DialogFullscreen`,__name:`dialog-fullscreen`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{default:`button`}},emits:[`fullscreen`],setup(e,{emit:t}){let n=e,r=t,i=ay(`fullscreen`),{fullscreen:a,onFullscreenToggle:o}=Qv(`DialogFullscreen`),s=cg(),c=U(()=>a.value?s.value.dialog.exitFullscreen:s.value.dialog.fullscreen),l=e=>{r(`fullscreen`,e),o()};return(e,t)=>(I(),R(sm,Za(n,{"data-vean-dialog-fullscreen":``,"aria-label":c.value,"aria-pressed":M(a)?`true`:`false`,class:M(i),onClick:l}),{default:qn(()=>[pi(e.$slots,`default`,{},()=>[B(ff,{icon:M(a)?`lucide:minimize`:`lucide:maximize`},null,8,[`icon`])])]),_:3},16,[`aria-label`,`aria-pressed`,`class`]))}}),my=[`data-draggable`],hy=P({name:`DialogHeader`,__name:`dialog-header`,setup(e){let{setHeaderElement:t,draggable:n}=Qv(`DialogHeader`),r=ay(`header`);return(e,i)=>(I(),L(`div`,{ref:M(t),"data-vean-dialog-header":``,"data-draggable":M(n)?``:void 0,class:k(M(r))},[pi(e.$slots,`default`)],10,my))}}),gy=[`data-state`],_y=P({name:`DialogOverlay`,__name:`dialog-overlay`,props:{forceMount:{type:Boolean}},setup(e){let t=e,{overlayElement:n,setOverlayElement:r,open:i,dataState:a}=Qv(`DialogOverlay`),o=ay(`overlay`),s=t.forceMount?on(!0):Wd(n,i);return er(()=>{s.value&&i.value&&xn(nu())}),(e,t)=>M(s)?(I(),L(`div`,{key:0,ref:M(r),"data-vean-dialog-overlay":``,class:k(M(o)),"data-state":M(a),style:{"pointer-events":`auto`}},[pi(e.$slots,`default`)],10,gy)):H(`v-if`,!0)}}),vy=P({name:`DialogPopupImpl`,__name:`dialog-popup-impl`,props:{trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,{dir:i,modal:a,isAlert:o,alertType:s,draggable:c,fullscreen:l,open:u,onOpenChange:d,setTriggerElement:f,popupElement:p,setPopupElement:m,headerElement:h,popupId:g,initPopupId:_,dataState:v,titleId:y,descriptionId:b,focusCancel:x}=Qv(`DialogPopupImpl`),{pointerEvents:S,onFocusCapture:C,onBlurCapture:w}=rd(p,{disableOutsidePointerEvents:()=>n.disableOutsidePointerEvents,enable:()=>!!u.value,onEscapeKeyDown:e=>{r(`escapeKeyDown`,e)},onPointerDownOutside:e=>{r(`pointerDownOutside`,e)},onFocusOutside:e=>{r(`focusOutside`,e)},onInteractOutside:e=>{r(`interactOutside`,e)},onDismiss:()=>{d(!1)}}),{onKeydown:ee}=Cd(p,{trapped:()=>n.trapFocus,loop:!0,onOpenAutoFocus:e=>{o.value&&x(),r(`openAutoFocus`,e)},onCloseAutoFocus:e=>{r(`closeAutoFocus`,e)}}),T=Kd(n,[`trapFocus`,`disableOutsidePointerEvents`]),E=ay(`popup`),D=on({x:0,y:0}),te=on({x:0,y:0}),ne=on({x:0,y:0}),{isDragging:re}=Lu(p,{handle:h,disabled:U(()=>!c.value||l.value===!0||!h.value),onStart:(e,t)=>{te.value={x:t.clientX,y:t.clientY},ne.value={...D.value}},onMove:(e,t)=>{D.value={x:ne.value.x+t.clientX-te.value.x,y:ne.value.y+t.clientY-te.value.y}}});nr(l,e=>{e&&(D.value={x:0,y:0})});let ie=U(()=>{let{x:e,y:t}=D.value;return{pointerEvents:S.value,translate:e!==0||t!==0?`${e}px ${t}px`:void 0}}),O=()=>{let e=vu();e!==document.body&&f(e)};return ud(),Vd(p,U(()=>a.value===!0)),_(),Zr(()=>{O()}),(e,t)=>(I(),R(M(cf),Za(M(T),{id:M(g),ref:M(m),class:M(E),dir:M(i),"aria-labelledby":M(y),"aria-describedby":M(b),"data-dismissable-layer":``,"data-state":M(v),"data-type":M(o)?M(s):void 0,"data-fullscreen":M(l)?``:void 0,"data-dragging":M(re)?``:void 0,role:M(o)?`alertdialog`:`dialog`,"aria-live":M(o)?M(s)===`error`?`assertive`:`polite`:void 0,tabindex:`-1`,style:ie.value,onFocusCapture:M(C),onBlurCapture:M(w),onKeydown:M(ee)}),{default:qn(()=>[pi(e.$slots,`default`)]),_:3},16,[`id`,`class`,`dir`,`aria-labelledby`,`aria-describedby`,`data-state`,`data-type`,`data-fullscreen`,`data-dragging`,`role`,`aria-live`,`style`,`onFocusCapture`,`onBlurCapture`,`onKeydown`]))}}),yy=P({name:`DialogPopup`,__name:`dialog-popup`,props:{asChild:{type:Boolean},as:{},forceMount:{type:Boolean}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Kd(n,[`forceMount`]),a=Td(r),{popupElement:o,open:s,modal:c,isAlert:l,triggerElement:u}=Qv(`DialogPopup`),d=n.forceMount?on(!0):Wd(o,s),f=U(()=>c.value!==!1&&s.value),p=U(()=>c.value===!0),{onFocusOutside:m,onInteractOutside:h,onCloseAutoFocus:g}=Hd({modal:c,triggerElement:u}),_=e=>{if(l.value){e.preventDefault();return}if(c.value===!1)return;let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()},v=e=>{l.value&&e.preventDefault(),h(e)};return(e,t)=>M(d)?(I(),R(vy,Za({key:0},M(i),{"data-vean-dialog-popup":``,"trap-focus":f.value,"disable-outside-pointer-events":p.value},hi(M(a)),{onPointerDownOutside:_,onFocusOutside:M(m),onInteractOutside:v,onCloseAutoFocus:M(g)}),{default:qn(()=>[pi(e.$slots,`default`)]),_:3},16,[`trap-focus`,`disable-outside-pointer-events`,`onFocusOutside`,`onCloseAutoFocus`])):H(`v-if`,!0)}}),by=P({name:`DialogRoot`,inheritAttrs:!1,__name:`dialog-root`,props:{modal:{type:[Boolean,String],default:!0},dir:{},isAlert:{type:Boolean},alertType:{},draggable:{type:Boolean},fullscreen:{type:Boolean,default:void 0},defaultFullscreen:{type:Boolean},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean}},emits:[`update:open`,`update:fullscreen`],setup(e,{emit:t}){let n=e,r=t,i=Ju(()=>n.open,e=>{r(`update:open`,e)},n.defaultOpen??!1),a=Ju(()=>n.fullscreen,e=>{r(`update:fullscreen`,e)},n.defaultFullscreen??!1),{onOpenChange:o}=Zv({dir:rf(()=>n.dir),open:i,modal:U(()=>n.isAlert===!0||n.modal),fullscreen:a,...hu(n,[`isAlert`,`alertType`,`draggable`])}),s=()=>{o(!1)};return nr(i,e=>{e&&n.fullscreen===void 0&&(a.value=n.defaultFullscreen??!1)}),(e,t)=>pi(e.$slots,`default`,{open:M(i),close:s})}}),xy=[`id`],Sy=P({name:`DialogTitle`,__name:`dialog-title`,setup(e){let{titleId:t,initTitleId:n}=Qv(`DialogTitle`),r=ay(`title`);return n(),(e,n)=>(I(),L(`h2`,{id:M(t),"data-vean-dialog-title":``,class:k(M(r))},[pi(e.$slots,`default`)],10,xy))}}),Cy=P({name:`DialogTrigger`,__name:`dialog-trigger`,props:{type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`click`],setup(e,{emit:t}){let n=e,r=t,{open:i,onOpenToggle:a,dataState:o,popupId:s,setTriggerElement:c}=Qv(`DialogTrigger`),l=e=>{r(`click`,e),a()};return(e,t)=>(I(),R(sm,Za(n,{ref:M(c),"data-vean-dialog-trigger":``,"aria-haspopup":`dialog`,"aria-expanded":M(i)||!1,"aria-controls":M(i)?M(s):void 0,"data-state":M(o),onClick:l}),{default:qn(()=>[pi(e.$slots,`default`)]),_:3},16,[`aria-expanded`,`aria-controls`,`data-state`]))}}),wy=P({name:`DialogCompact`,__name:`dialog-compact`,props:{title:{},description:{},icon:{},showClose:{type:Boolean,default:!0},showFullscreen:{type:Boolean,default:!0},pure:{type:Boolean},showCancel:{type:[String,Boolean],default:`onlyWarning`},cancelText:{},showConfirm:{type:Boolean,default:!0},confirmText:{},triggerProps:{},overlayProps:{},portalProps:{},popupProps:{},headerProps:{},contentProps:{},footerProps:{},titleProps:{},descriptionProps:{},closeProps:{},fullscreenProps:{},cancelProps:{},confirmProps:{},modal:{type:[Boolean,String],default:!0},dir:{},isAlert:{type:Boolean},alertType:{default:`default`},draggable:{type:Boolean},fullscreen:{type:Boolean,default:void 0},defaultFullscreen:{type:Boolean},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean}},emits:[`update:open`,`update:fullscreen`,`click`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`close`,`fullscreen`,`confirm`,`cancel`],setup(e,{emit:t}){let n=e,r=Kd(n,[`title`,`description`,`icon`,`showClose`,`showFullscreen`,`pure`,`showCancel`,`cancelText`,`showConfirm`,`confirmText`,`triggerProps`,`overlayProps`,`portalProps`,`popupProps`,`headerProps`,`contentProps`,`footerProps`,`titleProps`,`descriptionProps`,`closeProps`,`fullscreenProps`,`cancelProps`,`confirmProps`]),i=t,a=bi(),o=xi(),s=Td(i),c=cg(),l=ey(),u=U(()=>l?.getCurrentDialog(o[`data-dialog-id`])),d=U(()=>[ay().value?.icon,u.value?.ui?.icon].filter(Boolean).join(` `)),f=U(()=>({...n.triggerProps,asChild:n.triggerProps?.asChild??!0})),p={default:null,info:`lucide:info`,warning:`lucide:circle-alert`,error:`lucide:circle-x`,success:`lucide:circle-check`},m=U(()=>n.icon?n.icon:n.isAlert&&n.alertType?p[n.alertType]:null),h=U(()=>n.showConfirm??n.isAlert),g=U(()=>typeof n.showCancel==`boolean`?n.showCancel:n.isAlert===!0&&n.alertType===`warning`),_=U(()=>n.pure?!1:a.footer?!0:g.value||h.value),v=U(()=>n.cancelText??c.value.dialog.cancel),y=U(()=>n.confirmText??c.value.dialog.confirm);return ty({dialog:u}),(t,n)=>(I(),R(by,Za(M(r),{"onUpdate:open":n[5]||=e=>i(`update:open`,e),"onUpdate:fullscreen":n[6]||=e=>i(`update:fullscreen`,e)}),{default:qn(r=>[B(Cy,ge(Ka(f.value)),{default:qn(()=>[pi(t.$slots,`trigger`,ge(Ka(r)))]),_:2},1040),B(df,ge(Ka(e.portalProps)),{default:qn(()=>[B(_y,ge(Ka(e.overlayProps)),null,16),B(yy,Za(e.popupProps,hi(M(s))),{default:qn(()=>[e.pure?H(`v-if`,!0):(I(),R(hy,ge(Za({key:0},e.headerProps)),{default:qn(()=>[B(Sy,ge(Ka(e.titleProps)),{default:qn(()=>[m.value?(I(),R(ff,{key:0,icon:m.value,class:k(d.value)},null,8,[`icon`,`class`])):H(`v-if`,!0),pi(t.$slots,`title`,ge(Ka(r)),()=>[z(`span`,null,A(e.title),1)])]),_:2},1040),a.description||e.description?(I(),R(dy,ge(Za({key:0},e.descriptionProps)),{default:qn(()=>[pi(t.$slots,`description`,ge(Ka(r)),()=>[V(A(e.description),1)])]),_:2},1040)):H(`v-if`,!0),!e.isAlert&&e.showFullscreen?(I(),R(py,Za({key:1},e.fullscreenProps,{onFullscreen:n[0]||=e=>i(`fullscreen`,e)}),{default:qn(()=>[pi(t.$slots,`fullscreen`,ge(Ka(r)))]),_:2},1040)):H(`v-if`,!0),!e.isAlert&&e.showClose?(I(),R(sy,{key:2,onClose:n[1]||=e=>i(`close`,e)},{default:qn(()=>[pi(t.$slots,`close`,ge(Ka(r)))]),_:2},1024)):H(`v-if`,!0)]),_:2},1040)),B(ly,ge(Ka(e.contentProps)),{default:qn(()=>[pi(t.$slots,`default`,ge(Ka(r)))]),_:2},1040),e.pure&&!e.isAlert&&e.showClose?(I(),R(sy,{key:1,onClose:n[2]||=e=>i(`close`,e)},{default:qn(()=>[pi(t.$slots,`close`,ge(Ka(r)))]),_:2},1024)):H(`v-if`,!0),_.value?(I(),R(fy,ge(Za({key:2},e.footerProps)),{default:qn(()=>[pi(t.$slots,`footer`,ge(Ka(r)),()=>[g.value?(I(),R(oy,Za({key:0},e.cancelProps,{onCancel:n[3]||=e=>i(`cancel`,e)}),{default:qn(()=>[pi(t.$slots,`cancel`,ge(Ka(r)),()=>[V(A(v.value),1)])]),_:2},1040)):H(`v-if`,!0),h.value?(I(),R(cy,Za({key:1},e.confirmProps,{onConfirm:n[4]||=e=>i(`confirm`,e)}),{default:qn(()=>[pi(t.$slots,`confirm`,ge(Ka(r)),()=>[V(A(y.value),1)])]),_:2},1040)):H(`v-if`,!0)])]),_:2},1040)):H(`v-if`,!0)]),_:2},1040)]),_:2},1040)]),_:3},16))}}),Ty=1,Ey=new class{subscribers;dialogs;dismissed;constructor(){this.subscribers=[],this.dialogs=[],this.dismissed=new Set}subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);t>=0&&this.subscribers.splice(t,1)});publish=e=>{this.subscribers.forEach(t=>t(e))};resetDismissed=e=>{this.dismissed.has(e)&&this.dismissed.delete(e)};upsert=e=>{let t=this.dialogs.findIndex(t=>t.id===e.id);if(t<0){this.publish(e),this.dialogs=[...this.dialogs,e];return}let n={...this.dialogs[t],...e};this.publish(n),this.dialogs=this.dialogs.map((e,r)=>r===t?n:e)};create=e=>{let{open:t=!0,...n}=e,r=Oy(e.id),i={...n,id:r,open:t};return this.upsert(i),r};dismiss=e=>{if(e!==void 0)return this.dismissed.add(e),requestAnimationFrame(()=>this.publish({id:e,open:!1})),e;this.dialogs.forEach(e=>{this.dismissed.add(e.id),this.publish({id:e.id,open:!1})})};message=(e,t)=>this.create({...t,title:e,type:`default`});error=(e,t)=>this.create({...t,title:e,type:`error`});success=(e,t)=>this.create({...t,title:e,type:`success`});info=(e,t)=>this.create({...t,title:e,type:`info`});warning=(e,t)=>this.create({...t,title:e,type:`warning`});getDialogs=()=>this.dialogs.filter(e=>!this.dismissed.has(e.id));activeDialogs=()=>(this.dialogs=this.getDialogs(),this.dismissed.clear(),this.dialogs)},Dy=Ey.message;Object.assign(Dy,{success:Ey.success,error:Ey.error,info:Ey.info,warning:Ey.warning,getHistory:()=>Ey.dialogs,getDialogs:()=>Ey.getDialogs()});function Oy(e){return typeof e==`number`||typeof e==`string`&&e.length>0?e:Ty++}var ky=P({name:`DialogProvider`,inheritAttrs:!1,__name:`dialog-provider`,setup(e){let t=on([]),n=e=>{let n=t.value.findIndex(t=>t.id===e.id);if(n!==-1){let r=Object.assign({},t.value[n],e);t.value=[...t.value.slice(0,n),r,...t.value.slice(n+1)];return}t.value=[e,...t.value]},r=e=>{e.onDismiss?.(e),Ey.dismiss(e.id)},i=(e,t)=>{e.onCancel?.(t),!t.defaultPrevented&&r(e)},a=(e,t)=>{e.onConfirm?.(t),!t.defaultPrevented&&r(e)};return $v({dialogs:t}),er(()=>{let e=Ey.subscribe(e=>{Fn(()=>{n(e)}),e.open===!1&&setTimeout(()=>{t.value=Ey.activeDialogs()},500)});xn(()=>{e()})},{flush:`post`}),(e,n)=>(I(),L(F,null,[(I(!0),L(F,null,di(t.value,e=>(I(),R(wy,{key:e.id,open:e.open,"is-alert":``,"alert-type":e.type,"data-dialog-id":e.id,icon:e.icon,onClose:t=>r(e),onCancel:t=>i(e,t),onConfirm:t=>a(e,t)},fi({default:qn(()=>[e.content?(I(),R(ci(e.content),{key:0})):H(`v-if`,!0)]),_:2},[e.title?{name:`title`,fn:qn(()=>[B(Ug,{is:e.title},null,8,[`is`])]),key:`0`}:void 0,e.description?{name:`description`,fn:qn(()=>[B(Ug,{is:e.description},null,8,[`is`])]),key:`1`}:void 0,e.footer?{name:`footer`,fn:qn(()=>[B(Ug,{is:e.footer},null,8,[`is`])]),key:`2`}:void 0,e.cancelText?{name:`cancel`,fn:qn(()=>[B(Ug,{is:e.cancelText},null,8,[`is`])]),key:`3`}:void 0,e.confirmText?{name:`confirm`,fn:qn(()=>[B(Ug,{is:e.confirmText},null,8,[`is`])]),key:`4`}:void 0]),1032,[`open`,`alert-type`,`data-dialog-id`,`icon`,`onClose`,`onCancel`,`onConfirm`]))),128)),pi(e.$slots,`default`)],64))}}),[Ay,jy]=Wl(`ProgressRoot`),[My,Ny]=af(`ProgressUi`),[Py,Fy]=af(`ProgressProviderUi`),Iy={direction:`ltr`,minimum:.08,maximum:1,easing:`linear`,speed:200,trickle:!0,trickleSpeed:200},Ly=class{static options=Iy;static status=null;static pending=[];static isPaused=!1;static trickleTimer;static reset(){return this.status=null,this.isPaused=!1,this.pending=[],this.options=Iy,this.clearTrickleTimer(),this}static configure(e){return this.options=Gu({...e},this.options),this}static isStarted(){return typeof this.status==`number`}static isRendered(){return Gl?document.querySelector(`[data-vean-progress-provider]`)!==null:!1}static set(e){if(!Gl||this.isPaused)return this;let t=this.isStarted();e=uf(e,this.options.minimum,this.options.maximum),this.status=e===this.options.maximum?null:e,this.status===null&&this.clearTrickleTimer();let n=this.render(!t),r=this.options.speed,i=this.options.easing;return n.forEach(e=>e.offsetWidth),this.queue(t=>{n.forEach(t=>{zy(t.querySelector(`[data-vean-progress-bar]`),this.barPositionCSS({n:e,speed:r,ease:i}))}),e===this.options.maximum?(n.forEach(e=>{zy(e,{transition:`none`,opacity:`1`}),e.offsetWidth}),setTimeout(()=>{n.forEach(e=>{zy(e,{transition:`all ${r}ms ${i}`,opacity:`0`})}),setTimeout(()=>{n.forEach(e=>{this.remove(e),zy(e,{transition:`none`,opacity:`1`})}),t()},r)},r)):setTimeout(t,r)}),this}static start(){return Gl?(this.status||this.set(0),this.options.trickle&&this.startTrickling(),this):this}static done(e){return!Gl||!e&&!this.status?this:this.inc(.3+.5*Math.random()).set(1)}static inc(e){if(this.isPaused)return this;let t=this.status;return t?t>1?this:(typeof e!=`number`&&(e=t>=0&&t<.2?.1:t>=.2&&t<.5?.04:t>=.5&&t<.8?.02:t>=.8&&t<.99?.005:0),t=uf(t+e,0,.994),this.set(t)):this.start()}static dec(e){if(this.isPaused)return this;let t=this.status;return typeof t==`number`?(typeof e!=`number`&&(e=t>.8?.1:t>.5?.05:t>.2?.02:.01),t=uf(t-e,0,.994),this.set(t)):this}static trickle(){return this.isPaused?this:this.inc()}static promise(e){let t=typeof e==`function`?e():e;if(!t)return this;if(typeof t.then==`function`)return this.start(),Promise.resolve(t).then(()=>{this.done()},()=>{this.done(!0)}),this;if(typeof t.state!=`function`||typeof t.always!=`function`||t.state()===`resolved`)return this;let n=0,r=0;return this.start(),n++,r++,t.always(()=>{r--,r===0?(n=0,this.done()):this.set((n-r)/n)}),this}static render(e=!1){if(!Gl)return[];let t=Array.from(document.querySelectorAll(`[data-vean-progress-provider]`));return t.forEach(t=>{t.style.display=``;let n=t.querySelector(`[data-vean-progress-bar]`),r=Ry(e?0:this.status||0,this.options.direction);zy(n,this.barPositionCSS({n:this.status||0,speed:this.options.speed,ease:this.options.easing,percent:r})),typeof this.status==`number`?t.setAttribute(`aria-valuenow`,`${this.status}`):t.removeAttribute(`aria-valuenow`)}),t}static remove(e){Gl&&(this.clearTrickleTimer(),e?e.style.display=`none`:document.querySelectorAll(`[data-vean-progress-provider]`).forEach(e=>{let t=e;t.style.display=`none`}))}static pause(){return this.isStarted()?(this.isPaused=!0,this.clearTrickleTimer(),this):this}static resume(){return this.isStarted()?(this.isPaused=!1,this.options.trickle&&this.startTrickling(),this):this}static queue(e){this.pending.push(e),this.pending.length===1&&this.next()}static next(){let e=this.pending.shift();e&&e(this.next.bind(this))}static clearTrickleTimer(){this.trickleTimer&&=(clearTimeout(this.trickleTimer),void 0)}static startTrickling(){if(this.trickleTimer||this.isPaused||!this.isStarted())return;let e=()=>{this.trickleTimer=void 0,!this.isPaused&&this.isStarted()&&(this.trickle(),!this.isPaused&&this.isStarted()&&(this.trickleTimer=setTimeout(e,this.options.trickleSpeed)))};this.trickleTimer=setTimeout(e,this.options.trickleSpeed)}static barPositionCSS({n:e,speed:t,ease:n,percent:r}){return{transform:`translate3d(${r??Ry(e,this.options.direction)}%,0,0)`,transition:`all ${t}ms ${n}`}}};function Ry(e,t){return t===`rtl`?(1-e)*100:(-1+e)*100}function zy(e,t,n){if(typeof t==`string`)n!==void 0&&(e.style[t]=n);else for(let n in t)if(t.hasOwnProperty(n)){let r=t[n];r!==void 0&&(e.style[n]=r)}}var By=[`aria-label`],Vy=P({name:`ProgressProvider`,__name:`progress-provider`,props:{direction:{},minimum:{},maximum:{},easing:{},speed:{},trickle:{type:Boolean},trickleSpeed:{}},setup(e){let t=e,n=Fy(),r=cg();return er(()=>{Ly.configure(t)}),(e,t)=>(I(),L(`div`,{"data-vean-progress-provider":``,"data-allow-mismatch":`style`,class:k(M(n).root),role:`progressbar`,"aria-label":M(r).progress.loading,"aria-valuemin":`0`,"aria-valuemax":`1`,style:{display:`none`}},[z(`div`,{class:k(M(n).indicator),"data-vean-progress-bar":``},null,2)],10,By))}}),Hy=Nl({extendBase:e=>({close:fg({size:e.size}),fullscreen:fg({size:e.size}),cancel:dg({size:e.size,variant:`pure`}),confirm:dg({size:e.size})}),slots:{overlay:[`fixed inset-0 z-base bg-mask`,`data-[state=open]:animate-in data-[state=open]:fade-in-0`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0`],popup:[`group fixed start-1/2 top-1/2 z-base flex flex-col w-max lt-sm:w-full lt-sm:min-w-auto lt-sm:max-w-full border bg-popover shadow-lg outline-none duration-200 rounded-lg`,`-translate-x-1/2 -translate-y-1/2 [&[dir=rtl]]:translate-x-1/2`,`data-[dragging]:transition-none data-[dragging]:select-none`,`data-[fullscreen]:w-screen data-[fullscreen]:h-screen`,`data-[fullscreen]:max-w-none data-[fullscreen]:rounded-none data-[fullscreen]:shadow-none`,`data-[fullscreen]:data-[state=open]:slide-in-from-top-1/2`,`data-[fullscreen]:data-[state=closed]:slide-out-to-top-1/2`,`data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2`],header:`flex flex-col lt-sm:text-center data-[draggable]:cursor-grab data-[draggable]:touch-none group-data-[dragging]:cursor-grabbing`,title:`flex items-center font-semibold leading-none tracking-tight m-0`,icon:`group-data-[type=info]:text-info group-data-[type=success]:text-success group-data-[type=warning]:text-warning group-data-[type=error]:text-destructive`,description:`text-muted-foreground m-0`,close:`absolute`,fullscreen:`absolute`,content:`grow overflow-auto [overscroll-behavior:contain]`,footer:`flex justify-end lt-sm:flex-col-reverse`,cancel:``,confirm:``},variants:{size:{xs:{popup:`gap-y-1.5 min-w-xs max-w-3xl px-2 py-1.5 text-2xs`,header:`gap-y-1.5`,title:`gap-x-1.5 text-xs`,description:`text-2xs`,close:`end-1.5 top-1.5`,fullscreen:`end-8 top-1.5`,footer:`gap-1.5`},sm:{popup:`gap-y-2 min-w-sm max-w-4xl px-3 py-2 text-xs`,header:`gap-y-2`,title:`gap-x-1.75 text-sm`,description:`text-xs`,close:`end-1.75 top-1.75`,fullscreen:`end-8 top-1.75`,footer:`gap-2`},md:{popup:`gap-y-3 min-w-md max-w-5xl px-4 py-3 text-sm`,header:`gap-y-3`,title:`gap-x-2 text-base`,description:`text-sm`,close:`end-2 top-2`,fullscreen:`end-10 top-2`,footer:`gap-3`},lg:{popup:`gap-y-4 min-w-lg max-w-6xl px-5 py-4 text-base`,header:`gap-y-4`,title:`gap-x-2.5 text-lg`,description:`text-base`,close:`end-2.5 top-2.5`,fullscreen:`end-10 top-2.5`,footer:`gap-4`},xl:{popup:`gap-y-5 min-w-xl max-w-7xl px-6 py-5 text-lg`,header:`gap-y-5`,title:`gap-x-3 text-xl`,description:`text-lg`,close:`end-3 top-3`,fullscreen:`end-12 top-3`,footer:`gap-5`},"2xl":{popup:`gap-y-6 min-w-2xl max-w-7xl px-7 py-6 text-xl`,header:`gap-y-6`,title:`gap-x-3.5 text-2xl`,description:`text-xl`,close:`end-4 top-4`,fullscreen:`end-13 top-4`,footer:`gap-6`}},pure:{true:{popup:`p-0 gap-0 border-none`}}},defaultVariants:{size:`md`}});Nl({slots:{root:`relative w-full overflow-hidden rounded-full bg-muted`,indicator:`h-full w-full flex-1 rounded-full transition-[transform,width] duration-300 transform-gpu will-change-transform data-[state=indeterminate]:w-2/5 data-[state=indeterminate]:opacity-80`,circle:``,track:``,label:``},variants:{color:{primary:{indicator:`bg-primary`},destructive:{indicator:`bg-destructive`},success:{indicator:`bg-success`},warning:{indicator:`bg-warning`},info:{indicator:`bg-info`},carbon:{indicator:`bg-carbon`},secondary:{indicator:`bg-secondary-foreground/20`},accent:{indicator:`bg-accent-foreground/20`}},size:{xs:{root:`h-1.5`},sm:{root:`h-2`},md:{root:`h-2.5`},lg:{root:`h-3`},xl:{root:`h-3.5`},"2xl":{root:`h-4`}}},defaultVariants:{color:`primary`,size:`md`}}),Nl({slots:{root:`relative inline-flex shrink-0 items-center justify-center rounded-full`,indicator:`fill-none stroke-current transition-[stroke-dasharray,stroke-dashoffset] duration-300 ease-in-out`,circle:`size-full`,track:`fill-none stroke-current text-muted`,label:`pointer-events-none absolute inset-0 flex items-center justify-center`},variants:{color:{primary:{indicator:`text-primary`},destructive:{indicator:`text-destructive`},success:{indicator:`text-success`},warning:{indicator:`text-warning`},info:{indicator:`text-info`},carbon:{indicator:`text-carbon`},secondary:{indicator:`text-secondary-foreground/40`},accent:{indicator:`text-accent-foreground/40`}},size:{xs:{root:`h-8 w-8 text-[10px]`},sm:{root:`h-10 w-10 text-xs`},md:{root:`h-12 w-12 text-sm`},lg:{root:`h-16 w-16 text-base`},xl:{root:`h-20 w-20 text-lg`},"2xl":{root:`h-24 w-24 text-xl`}}},defaultVariants:{color:`primary`,size:`md`}});var Uy=Nl({slots:{root:`fixed z-max w-0 h-0 pointer-events-none`,indicator:`fixed top-0 start-0 w-full h-0.75 bg-primary`}}),Wy=P({name:`SProgressProvider`,__name:`progress-provider`,props:{direction:{},minimum:{},maximum:{},easing:{},speed:{},trickle:{type:Boolean},trickleSpeed:{}},setup(e){let t=e;return Py(U(()=>Uy())),(e,n)=>(I(),R(M(Vy),ge(Ka(t)),null,16))}}),Gy=P({name:`SDialogProvider`,__name:`dialog-provider`,setup(e){return ry(U(()=>Hy({size:`md`}))),(e,t)=>(I(),R(M(ky)))}}),[Ky,qy]=Wl({name:`UIConfigProvider`,key:l_});function Jy(e){let t=c_(e);i_(t);let n=U(()=>t.theme.value),r=U(()=>sg(n.value)),i=Yy(),a=()=>{let t=i.current()??i.acquire(e.nonce);t&&(t.textContent=r.value)};Zr(a),nr(r,a);let o=og();nr([r,()=>t.mode.value,t.customPresets,t.appliedPresetName],()=>{e.persistTheme&&typeof document<`u`&&o.write({options:n.value,mode:t.mode.value,style:r.value,presets:t.customPresets.value,...t.appliedPresetName.value?{appliedPreset:t.appliedPresetName.value}:{}})},{immediate:!0}),ti(()=>o.flush());let s=e=>{e.key===`__VEAN_THEME`&&t.refreshThemeConfig()};return Zr(()=>{e.persistTheme&&window.addEventListener(`storage`,s)}),ti(()=>{window.removeEventListener(`storage`,s)}),{themeCss:r,themeOptions:n,commitThemeConfig:e=>{t.setThemeState(e)}}}function Yy(){let e=null;return{current:()=>e,acquire:t=>{if(e||typeof document>`u`)return e;let n=document.getElementById(Uh);return e=n instanceof HTMLStyleElement?n:document.createElement(`style`),n||(e.id=`vean-theme`,document.head.appendChild(e)),t&&!e.getAttribute(`nonce`)&&e.setAttribute(`nonce`,t),e}}}var Xy=P({name:`SConfigProvider`,__name:`config-provider`,props:{theme:{default:()=>({})},size:{default:`md`},iconify:{default:()=>({width:`1.25em`,height:`1.25em`})},progress:{},toast:{},customToast:{type:Boolean},persistTheme:{type:Boolean,default:!1},themeConfig:{},presetProvider:{},isServer:{type:Boolean,default:Zg},dir:{},locale:{},nonce:{},tooltip:{},iconRender:{},linkComponent:{},messages:{}},setup(e,{expose:t}){let n=e,r=Kd(n,[`iconRender`,`theme`,`size`,`iconify`,`progress`,`toast`,`customToast`,`persistTheme`,`themeConfig`,`presetProvider`,`isServer`]),i=n.iconRender??(e=>bo(W,{icon:e,ssr:n.isServer})),{commitThemeConfig:a}=Jy(n);return Ky(Jt(n)),t({commitThemeConfig:a}),(t,n)=>(I(),R(M(Xv),Za(M(r),{"icon-render":M(i)}),{default:qn(()=>[pi(t.$slots,`default`),e.customToast?H(`v-if`,!0):(I(),R(Xg,ge(Za({key:0},e.toast)),null,16)),B(Gy),B(Wy,ge(Ka(e.progress)),null,16)]),_:3},16,[`icon-render`]))}}),Zy=/^[\w+.-]{2,}:\/\//;function Qy(e){return e.endsWith(`/`)?e:`${e}/`}function $y(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function eb(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?Qy(n)+e.replace(/^\.?\//,``):e);return n}function tb(e,t){if(!t||t===`/`||Zy.test(e))return e;let n=$y(t);return e.startsWith(n)?e:eb(n,e)}function nb(e,t){let n=e.match(Zy);return t+(n?e.slice(n[0].length):e)}function rb(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e<i.length;e++)a+=i[e],e<t.length&&(a+=String(t[e]));return`${n}${a}${r}`}return`${n}${String(e)}${r}`})}var ib={blue:rb(34,39),cyan:rb(36,39),gray:rb(90,39),green:rb(32,39),red:rb(31,39),yellow:rb(33,39),bold:rb(1,22),dim:rb(2,22),reset:rb(0,0),underline:rb(4,24)};function ab(e,...t){return typeof e==`function`?e(...t):e}var ob=Error.captureStackTrace,sb=class e extends Error{name;code;docs;fix;sources;data;get why(){return this.message}constructor(t,n=e){super(t.why,{cause:t.cause}),this.code=this.name=t.code,this.fix=t.fix,this.docs=t.docs,this.sources=t.sources,this.data=t.data,ob?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,data:this.data,stack:this.stack}}};function cb(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}function lb(e){let t=e.reporters??[],n={},{docsBase:r}=e;for(let i of Object.keys(e.codes)){let a=e.codes[i],o=a.docs===!1?void 0:a.docs||cb(r,i),s=(e={},n={})=>{let r=new sb({code:i,why:ab(a.why,e),fix:ab(a.fix,e),docs:o,cause:e.cause,sources:e.sources,data:ab(a.data,e)},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function ub(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n<r.length-1?`├▶`:`╰▶`)} ${t}`)].join(`
|
|
27
27
|
`)}}var db={bus:{agentManifestChanged:`agent:manifest:changed`,agentToolRegistered:`agent:tool:registered`,agentToolUnregistered:`agent:tool:unregistered`,agentResourceRegistered:`agent:resource:registered`,agentResourceUnregistered:`agent:resource:unregistered`},client:{isTrustedUpdated:`rpc:is-trusted:updated`,error:`rpc:error`,connectionStatus:`connection:status`,connectionError:`connection:error`},broadcast:{authRevoked:`devframe:auth:revoked`,clientStateUpdated:`devframe:rpc:client-state:updated`,clientStatePatch:`devframe:rpc:client-state:patch`,streamingChunk:`devframe:streaming:chunk`,streamingEnd:`devframe:streaming:end`,streamingUploadCancel:`devframe:streaming:upload-cancel`},inPageChannel:{panelStateUpdated:`devframe:in-page:panel-state:updated`,panelStatePatch:`devframe:in-page:panel-state:patch`},postMessage:{remoteAssetsError:`devframe:remote-assets-error`,inPageChannel:`devframe:in-page-channel`}},fb=ub(ib);function pb(e,{method:t=`warn`}={}){console[t](fb(e))}function mb(e){return lb({...e,reporters:[pb,...e.reporters??[]]})}function hb(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var gb=Math.random.bind(Math),_b=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function vb(e=21){let t=``,n=e;for(;n--;)t+=_b[gb()*64|0];return t}var yb=6e4,bb=e=>e,xb=bb,{clearTimeout:Sb,setTimeout:Cb}=globalThis;function wb(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=bb,deserialize:s=xb,resolver:c,bind:l=`rpc`,timeout:u=yb,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=hb(),_=vb();s.i=_;let v;async function y(n=s){return u>=0&&(v=Cb(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof v==`object`&&(v=v.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:v,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,y,d):await y()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{Sb(v),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:y,get $closed(){return f},get $meta(){return t.meta},$close:v,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.hasOwn(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function v(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(b)}function y(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function b(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(Sb(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}function Tb(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var Eb=Object.freeze({type:`object`,additionalProperties:!0});function Db(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Eb}return Eb}function Ob(e){if(!e||e.length===0)return{type:`object`,properties:{}};let t={},n=[];for(let r=0;r<e.length;r++){let i=`arg${r}`;t[i]=Db(e[r]),n.push(i)}return{type:`object`,properties:t,required:n,additionalProperties:!1}}function kb(e,t){if(Array.isArray(e))return e;if(e==null)return[];if(typeof e!=`object`)return;let n=e;if(t!=null)return Array.from({length:t},(e,t)=>n[`arg${t}`]);if(`arg0`in n){let e=[];for(;`arg${e.length}`in n;)e.push(n[`arg${e.length}`]);return e}return Object.keys(n).length===0?[]:void 0}function Ab(e,t){return kb(e,t)??[e]}function jb(e){return typeof e==`string`?`'${e}'`:new Fb().serialize(e)}var Mb=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Nb=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Mb.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Pb(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;i<n;i++){let n=e.charCodeAt(i),a=t.charCodeAt(i);if(n===a)continue;let o=n<128&&Nb[n]?Nb[n]:n+128,s=a<128&&Nb[a]?Nb[a]:a+128;if(o!==s)return o<s?-1:1;r===0&&(r=n>a?-1:1)}return e.length===t.length?r:e.length<t.length?-1:1}var Fb=(function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?Pb(e,t):n===`number`&&r===`number`?e-t:Pb(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(`toJSON`in e&&typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}let i=Object.keys(e).sort(Pb),a=`${r}{`;for(let t=0;t<i.length;t++){let n=i[t];a+=`${n}:${this.serialize(e[n])}`,t<i.length-1&&(a+=`,`)}return a+`}`}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e})(),Ib=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Lb=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Rb=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,zb=[],Bb=class{_data=new Vb;_hash=new Vb([...Ib]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)zb[n]=e[t+n]|0;else{let e=zb[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=zb[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;zb[n]=t+zb[n-7]+i+zb[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+Lb[n]+zb[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=Vb.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e<r;e+=16)this._doProcessBlock(this._data.words,e);t=this._data.words.splice(0,r),this._data.sigBytes-=i}return new Vb(t,i)}},Vb=class e{words;sigBytes;constructor(e,t){e=this.words=e||[],this.sigBytes=t===void 0?e.length*4:t}static fromUtf8(t){let n=unescape(encodeURIComponent(t)),r=n.length,i=[];for(let e=0;e<r;e++)i[e>>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t<this.sigBytes;t+=3){let n=this.words[t>>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6<this.sigBytes*8;n++)e.push(Rb.charAt(a>>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t<e.sigBytes;t++){let n=e.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<e.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function Hb(e){return new Bb().finalize(e).toBase64()}function Ub(e){return Hb(jb(e))}function Wb(e){return Ub(e)}function Gb(){let e={};function t(t,...n){let r=e[t]||[];for(let e=0,t=r.length;e<t;e++){let t=r[e];t&&t(...n)}}function n(n,...r){t(n,...r),delete e[n]}function r(t,n){return(e[t]||=[]).push(n),()=>{e[t]=e[t]?.filter(e=>n!==e)}}function i(e,t){let n=r(e,((...e)=>(n(),t(...e))));return n}return{_listeners:e,emit:t,emitOnce:n,on:r,once:i}}var Kb=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function qb(e=21){let t=``,n=e;for(;n--;)t+=Kb[Math.random()*64|0];return t}var Jb=Symbol.for(`immer-nothing`),Yb=Symbol.for(`immer-draftable`),Xb=Symbol.for(`immer-state`),Zb=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},`This object has been frozen and should not be mutated`,function(e){return`Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? `+e},`An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.`,`Immer forbids circular references`,"The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},`Object.defineProperty() cannot be used on an Immer draft`,`Object.setPrototypeOf() cannot be used on an Immer draft`,`Immer only supports deleting array indices`,`Immer only supports setting array indices and the 'length' property`,function(e){return`'original' expects a draft, got: ${e}`}];function Qb(e,...t){{let n=Zb[e],r=Sx(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var $b=Object,ex=$b.getPrototypeOf,tx=`constructor`,nx=`prototype`,rx=`configurable`,ix=`enumerable`,ax=`writable`,ox=`value`,sx=e=>!!e&&!!e[Xb];function cx(e){return e?dx(e)||vx(e)||!!e[Yb]||!!e[tx]?.[Yb]||yx(e)||bx(e):!1}var lx=$b[nx][tx].toString(),ux=new WeakMap;function dx(e){if(!e||!xx(e))return!1;let t=ex(e);if(t===null||t===$b[nx])return!0;let n=$b.hasOwnProperty.call(t,tx)&&t[tx];if(n===Object)return!0;if(!Sx(n))return!1;let r=ux.get(n);return r===void 0&&(r=Function.toString.call(n),ux.set(n,r)),r===lx}function fx(e,t,n=!0){px(e)===0?(n?Reflect.ownKeys(e):$b.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function px(e){let t=e[Xb];return t?t.type_:vx(e)?1:yx(e)?2:bx(e)?3:0}var mx=(e,t,n=px(e))=>n===2?e.has(t):$b[nx].hasOwnProperty.call(e,t),hx=(e,t,n=px(e))=>n===2?e.get(t):e[t],gx=(e,t,n,r=px(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function _x(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var vx=Array.isArray,yx=e=>e instanceof Map,bx=e=>e instanceof Set,xx=e=>typeof e==`object`,Sx=e=>typeof e==`function`,Cx=e=>typeof e==`boolean`;function wx(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Tx=e=>xx(e)?e?.[Xb]:null,Ex=e=>e.copy_||e.base_,Dx=e=>e.modified_?e.copy_:e.base_;function Ox(e,t){if(yx(e))return new Map(e);if(bx(e))return new Set(e);if(vx(e))return Array[nx].slice.call(e);let n=dx(e);if(t===!0||t===`class_only`&&!n){let t=$b.getOwnPropertyDescriptors(e);delete t[Xb];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[ax]===!1&&(a[ax]=!0,a[rx]=!0),(a.get||a.set)&&(t[i]={[rx]:!0,[ax]:!0,[ix]:a[ix],[ox]:e[i]})}return $b.create(ex(e),t)}{let t=ex(e);if(t!==null&&n)return{...e};let r=$b.create(t);return $b.assign(r,e)}}function kx(e,t=!1){return Mx(e)||sx(e)||!cx(e)?e:(px(e)>1&&$b.defineProperties(e,{set:jx,add:jx,clear:jx,delete:jx}),$b.freeze(e),t&&fx(e,(e,t)=>{kx(t,!0)},!1),e)}function Ax(){Qb(2)}var jx={[ox]:Ax};function Mx(e){return e===null||!xx(e)||$b.isFrozen(e)}var Nx=`MapSet`,Px=`Patches`,Fx=`ArrayMethods`,Ix={};function Lx(e){let t=Ix[e];return t||Qb(0,e),t}var Rx=e=>!!Ix[e];function zx(e,t){Ix[e]||(Ix[e]=t)}var Bx,Vx=()=>Bx,Hx=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Rx(Nx)?Lx(Nx):void 0,arrayMethodsPlugin_:Rx(Fx)?Lx(Fx):void 0});function Ux(e,t){t&&(e.patchPlugin_=Lx(Px),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Wx(e){Gx(e),e.drafts_.forEach(qx),e.drafts_=null}function Gx(e){e===Bx&&(Bx=e.parent_)}var Kx=e=>Bx=Hx(Bx,e);function qx(e){let t=e[Xb];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Jx(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[Xb].modified_&&(Wx(t),Qb(4)),cx(e)&&(e=Yx(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[Xb].base_,e,t)}else e=Yx(t,n);return Xx(t,e,!0),Wx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===Jb?void 0:e}function Yx(e,t){if(Mx(t))return t;let n=t[Xb];if(!n)return iS(t,e.handledSet_,e);if(!Qx(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);nS(n,e)}return n.copy_}function Xx(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&kx(t,n)}function Zx(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Qx=(e,t)=>e.scope_===t,$x=[];function eS(e,t,n,r){let i=Ex(e),a=e.type_;if(r!==void 0&&hx(i,r,a)===t){gx(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;fx(i,(e,n)=>{if(sx(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??$x;for(let e of o)gx(i,e,n,a)}function tS(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!Qx(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Dx(i);eS(e,i.draft_??i,a,n),nS(i,r)})}function nS(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Zx(e)}}function rS(e,t,n){let{scope_:r}=e;if(sx(n)){let i=n[Xb];Qx(i,r)&&i.callbacks_.push(function(){pS(e),eS(e,n,Dx(i),t)})}else cx(n)&&e.callbacks_.push(function(){let i=Ex(e);e.type_===3?i.has(n)&&iS(n,r.handledSet_,r):hx(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&iS(hx(e.copy_,t,e.type_),r.handledSet_,r)})}function iS(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||sx(e)||t.has(e)||!cx(e)||Mx(e)?e:(t.add(e),fx(e,(r,i)=>{if(sx(i)){let t=i[Xb];Qx(t,n)&&(gx(e,r,Dx(t),e.type_),Zx(t))}else cx(i)&&iS(i,t,n)}),e)}function aS(e,t){let n=vx(e),r={type_:+!!n,scope_:t?t.scope_:Vx(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=oS;n&&(i=[r],a=sS);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var oS={get(e,t){if(t===Xb)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=Ex(e);if(!mx(i,t,e.type_))return uS(e,i,t);let a=i[t];if(e.finalized_||!cx(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&wx(t))return a;if(a===cS(e.base_,t)||lS(e,t,a)){pS(e);let n=e.type_===1?+t:t,r=hS(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Ex(e)},ownKeys(e){return Reflect.ownKeys(Ex(e))},set(e,t,n){let r=dS(Ex(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=cS(Ex(e),t),i=r?.[Xb];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(_x(n,r)&&(n!==void 0||mx(e.base_,t,e.type_)))return!0;pS(e),fS(e)}return e.copy_[t]===n&&(n!==void 0||mx(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),rS(e,t,n),!0)},deleteProperty(e,t){return pS(e),cS(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),fS(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Ex(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[ax]:!0,[rx]:e.type_!==1||t!==`length`,[ix]:r[ix],[ox]:n[t]}},defineProperty(){Qb(11)},getPrototypeOf(e){return ex(e.base_)},setPrototypeOf(){Qb(12)}},sS={};for(let e in oS){let t=oS[e];sS[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}sS.deleteProperty=function(e,t){return isNaN(parseInt(t))&&Qb(13),sS.set.call(this,e,t,void 0)},sS.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&Qb(14),oS.set.call(this,e[0],t,n,e[0])};function cS(e,t){let n=e[Xb];return(n?Ex(n):e)[t]}function lS(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!cx(n)||n[Xb]?!1:e.baseRefs_.has(n)}function uS(e,t,n){let r=dS(t,n);return r?ox in r?r[ox]:r.get?.call(e.draft_):void 0}function dS(e,t){if(!(t in e))return;let n=ex(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=ex(n)}}function fS(e){e.modified_||(e.modified_=!0,e.parent_&&fS(e.parent_))}function pS(e){e.copy_||=(e.assigned_=new Map,Ox(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var mS=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Sx(e)&&!Sx(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Sx(t)||Qb(6),n!==void 0&&!Sx(n)&&Qb(7);let r;if(cx(e)){let i=Kx(this),a=hS(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Wx(i):Gx(i)}return Ux(i,n),Jx(r,i)}if(!e||!xx(e)){if(r=t(e),r===void 0&&(r=e),r===Jb&&(r=void 0),this.autoFreeze_&&kx(r,!0),n){let t=[],i=[];Lx(Px).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Qb(1,e)},this.produceWithPatches=(e,t)=>{if(Sx(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},Cx(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Cx(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Cx(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){cx(e)||Qb(8),sx(e)&&(e=gS(e));let t=Kx(this),n=hS(t,e,void 0);return n[Xb].isManual_=!0,Gx(t),n}finishDraft(e,t){let n=e&&e[Xb];(!n||!n.isManual_)&&Qb(9);let{scope_:r}=n;return Ux(r,t),Jx(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=Lx(Px).applyPatches_;return sx(e)?r(e,t):this.produce(e,e=>r(e,t))}};function hS(e,t,n,r){let[i,a]=yx(t)?Lx(Nx).proxyMap_(t,n):bx(t)?Lx(Nx).proxySet_(t,n):aS(t,n);return(n?.scope_??Vx()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?tS(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function gS(e){return sx(e)||Qb(10,e),_S(e)}function _S(e){if(!cx(e)||Mx(e))return e;let t=e[Xb],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ox(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Ox(e,!0);return fx(n,(e,t)=>{gx(n,e,_S(t))},r),t&&(t.finalized_=!1),n}function vS(){Zb.push(`Sets cannot have "replace" patches.`,function(e){return`Unsupported patch operation: `+e},function(e){return`Cannot apply patch, path doesn't resolve: `+e},`Patching reserved attributes like __proto__, prototype and constructor is not allowed`);function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=Tx(hx(e,n.key_)),i=hx(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.base_&&i!==n.copy_||t!=null&&t.base_!==n.base_)return null;let a=n.parent_.type_===3,o;if(a){let e=n.parent_;o=Array.from(e.drafts_.keys()).indexOf(n.key_)}else o=n.key_;if(!(a&&e.size>o||mx(e,o)))return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let r=t[e];if(n=hx(n,r),!xx(n)||n===null)throw Error(`Cannot resolve path at '${t.join(`/`)}'`)}return n}let n=`replace`,r=`remove`;function i(e,t,n){if(e.scope_.processedForPatches_.has(e))return;e.scope_.processedForPatches_.add(e);let{patches_:r,inversePatches_:i}=n;switch(e.type_){case 0:case 2:return o(e,t,r,i);case 1:return a(e,t,r,i);case 3:return s(e,t,r,i)}}function a(e,t,i,a){let{base_:o,assigned_:s}=e,c=e.copy_;c.length<o.length&&([o,c]=[c,o],[i,a]=[a,i]);let l=e.allIndicesReassigned_===!0;for(let e=0;e<o.length;e++){let r=c[e],u=o[e];if((l||s?.get(e.toString()))&&r!==u){let o=r?.[Xb];if(o&&o.modified_)continue;let s=t.concat([e]);i.push({op:n,path:s,value:d(r)}),a.push({op:n,path:s,value:d(u)})}}for(let e=o.length;e<c.length;e++){let n=t.concat([e]);i.push({op:`add`,path:n,value:d(c[e])})}for(let e=c.length-1;o.length<=e;--e){let n=t.concat([e]);a.push({op:r,path:n})}}function o(e,t,i,a){let{base_:o,copy_:s,type_:c}=e;fx(e.assigned_,(e,l)=>{let u=hx(o,e,c),f=hx(s,e,c),p=l?mx(o,e)?n:`add`:r;if(u===f&&p===n)return;let m=t.concat(e);i.push(p===r?{op:p,path:m}:{op:p,path:m,value:d(f)}),a.push(p===`add`?{op:r,path:m}:p===r?{op:`add`,path:m,value:d(u)}:{op:n,path:m,value:d(u)})})}function s(e,t,n,i){let{base_:a,copy_:o}=e,s=0;a.forEach(e=>{if(!o.has(e)){let a=t.concat([s]);n.push({op:r,path:a,value:e}),i.unshift({op:`add`,path:a,value:e})}s++}),s=0,o.forEach(e=>{if(!a.has(e)){let a=t.concat([s]);n.push({op:`add`,path:a,value:e}),i.unshift({op:r,path:a,value:e})}s++})}function c(e,t,r){let{patches_:i,inversePatches_:a}=r;i.push({op:n,path:[],value:t===Jb?void 0:t}),a.push({op:n,path:[],value:e})}function l(e,t){return t.forEach(t=>{let{path:i,op:a}=t,o=e;for(let e=0;e<i.length-1;e++){let t=px(o),n=i[e];typeof n!=`string`&&typeof n!=`number`&&(n=``+n),(t===0||t===1)&&(n===`__proto__`||n===tx)&&Qb(19),Sx(o)&&n===nx&&Qb(19),o=hx(o,n),(o===null||!xx(o))&&Qb(18,i.join(`/`))}let s=px(o),c=u(t.value),l=i[i.length-1];switch(a){case n:switch(s){case 2:return o.set(l,c);case 3:Qb(16);default:return o[l]=c}case`add`:switch(s){case 1:return l===`-`?o.push(c):o.splice(l,0,c);case 2:return o.set(l,c);case 3:return o.add(c);default:return o[l]=c}case r:switch(s){case 1:return o.splice(l,1);case 2:return o.delete(l);case 3:return o.delete(t.value);default:return delete o[l]}default:Qb(17,a)}}),e}function u(e){if(!cx(e))return e;if(vx(e))return e.map(u);if(yx(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,u(t)]));if(bx(e))return new Set(Array.from(e).map(u));let t=Object.create(ex(e));for(let n in e)t[n]=u(e[n]);return mx(e,Yb)&&(t[Yb]=e[Yb]),t}function d(e){return sx(e)?u(e):e}zx(Px,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var yS=new mS,bS=yS.produce,xS=yS.produceWithPatches.bind(yS),SS=yS.applyPatches.bind(yS),CS=1e3;function wS(e,t){if(e.add(t),e.size>CS){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function TS(e){let{enablePatches:t=!1}=e;t&&vS();let n=Gb(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=qb())=>{i.has(t)||(vS(),r=SS(r,e),wS(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=qb())=>{if(!i.has(a)){if(wS(i,a),t){let[t,i]=xS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=bS(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var ES=typeof self==`object`?self:globalThis,DS=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),OS=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function kS(e,t){let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o,r=DS.has(e)?ES[e]:void 0;return n(new(r??ES.Error)(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}if(typeof a==`string`&&OS.has(a))return n(new ES[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function AS(e){return kS(new Map,e)(0)}var jS=``,{toString:MS}={},{keys:NS}=Object;function PS(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=MS.call(e).slice(8,-1);switch(n){case`Array`:return[1,jS];case`Object`:return[2,jS];case`Date`:return[3,jS];case`RegExp`:return[4,jS];case`Map`:return[5,jS];case`Set`:return[6,jS];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function FS([e,t]){return e===0&&(t===`function`||t===`symbol`)}function IS(e,t,n,r){let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=PS(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize ${s}`);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of NS(r))(e||!FS(PS(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(FS(PS(n))||FS(PS(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!FS(PS(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function LS(e,t={}){let n=[];return IS(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:RS,stringify:zS}=JSON,BS={json:!0,lossy:!0};function VS(e){return AS(RS(e))}function HS(e){return zS(LS(e,BS))}function US(e){return AS(e)}function WS(e){return HS(e)}function GS(e){return VS(e)}var KS=256,qS=class extends Error{name=`StreamClosedError`};function JS(e={}){let t=e.id??qb(),n=Math.max(0,e.replayWindow??0),r=Gb(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new qS(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(a.push({seq:s,chunk:e}),a.length>n&&(a.length-n===1?a.shift():a.splice(0,a.length-n))),r.emit(`chunk`,s,e)}function l(e){if(o)return;o=!0;let t=XS(e);i.abort(e),r.emit(`end`,t)}function u(){o||(o=!0,i.signal.aborted||i.abort(`stream closed`),r.emit(`end`,void 0))}function d(e){o||i.signal.aborted||i.abort(e??`aborted`)}let f=new WritableStream({write(e){c(e)},close(){u()},abort(e){l(e)}});return{id:t,signal:i.signal,get closed(){return o},get lastSeq(){return s},write:c,error:l,close:u,abort:d,writable:f,events:r,buffer:a}}function YS(e={}){let t=e.id??qb(),n=Math.max(1,e.highWaterMark??KS),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1});return}if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function h(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function g(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){h()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return g()},cancel:h,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return h(),Promise.resolve({value:void 0,done:!0})}}}}}function XS(e){if(e instanceof Error)return{name:e.name||`Error`,message:e.message};if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)}}catch{return{name:`Error`,message:String(e)}}}var ZS=128;function QS(e){return e.replace(/[^\w-]+/g,`_`).slice(0,ZS)}var $S=`modulepreload`,eC=function(e){return`/_devtools/`+e},tC={},nC=function(e){return e.pathname.endsWith(`.css`)},rC=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=eC(t,n);let r=s(t);if(r.href in tC)return;tC[r.href]=!0;let i=nC(r);if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let o=document.createElement(`link`);if(o.rel=i?`stylesheet`:$S,i||(o.as=`script`),o.crossOrigin=``,o.href=r.href,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),i)return new Promise((e,t)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${r}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},iC=`__connection.json`,aC=`__DEVFRAME_CONNECTION__`,oC=`x-birpc-session`,sC=`__rpc-dump/index.json`,cC=`devframe:services`,lC=`devframe_otp`,uC=`devframe_auth_token`;db.postMessage.remoteAssetsError;var dC=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Wb(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}has(e,t){return this.cacheMap.get(e)?.has(this.keySerializer(t))??!1}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}},fC=mb({docsBase:`https://devfra.me/errors`,codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is \`false\`; MCP requires JSON-serializable data.`,fix:"Remove `jsonSerializable: false`, or remove `agent` to keep it RPC-only."},DF0020:{why:e=>`RPC function "${e.name}" declares \`jsonSerializable: true\` but the value at "${e.path}" is a ${e.type}.`,fix:"Either drop `jsonSerializable: true` (falls back to structured-clone) or change the value to a JSON-safe shape."},DF0021:{why:e=>`RPC function "${e.name}" is already registered`,fix:"Use the `force` parameter to overwrite an existing registration."},DF0022:{why:e=>`RPC function "${e.name}" is not registered. Use register() to add new functions.`},DF0023:{why:e=>`RPC function "${e.name}" is not registered`},DF0024:{why:e=>`Either handler or setup function must be provided for RPC function "${e.name}"`},DF0025:{why:e=>`Function "${e.name}" not found in dump store`},DF0026:{why:e=>`No dump match for "${e.name}" with args: ${e.args}`},DF0027:{why:e=>`Function "${e.name}" with type "${e.type}" cannot have dump configuration. Only "static" and "query" types support dumps.`},DF0028:{why:e=>`Function "${e.name}" with type "${e.type}" cannot use \`snapshot: true\`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.`,fix:"Remove `snapshot: true`, or change the function type to `query`."},DF0043:{why:e=>`RPC function "${e.name}" received an invalid argument at position ${e.index}: ${e.issues}`,fix:"Pass a value that satisfies the `args` schema declared for this function."},DF0044:{why:e=>`RPC function "${e.name}" returned a value that failed its \`returns\` schema: ${e.issues}`,fix:"Make the handler return a value that satisfies the `returns` schema, or relax the schema."}}});function pC(e){if(e.agent&&e.jsonSerializable===!1)throw fC.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function mC(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function hC(e){return e.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `)}async function gC(e,t,n){let r=n.slice();if(!t||t.length===0)return r;for(let r=0;r<t.length;r++){let i=t[r];if(!i)continue;let a=await mC(i,n[r]);if(a.issues)throw fC.DF0043({name:e,index:r,issues:hC(a.issues)})}return r}async function _C(e,t,n){if(!t)return n;let r=await mC(t,n);if(r.issues)throw fC.DF0044({name:e,issues:hC(r.issues)});return n}async function vC(e,t){if(!e.setup)return{};if(typeof t==`object`&&t){e.__cache??=new WeakMap;let n=e.__cache,r=n.get(t);return r||(r=Promise.resolve(e.setup(t)),r.catch(()=>{n.get(t)===r&&n.delete(t)}),n.set(t,r)),await r}if(!e.__promise){let n=Promise.resolve(e.setup(t));n.catch(()=>{e.__promise===n&&(e.__promise=void 0)}),e.__promise=n}return await e.__promise}async function yC(e,t){let n=e.handler;if(!n){let r=await vC(e,t);if(!r.handler)throw fC.DF0024({name:e.name});n=r.handler}let r=e.args,i=e.returns;if(!r&&!i)return n;let a=n;return async(...t)=>{let n=await gC(e.name,r,t),o=await a(...n);return await _C(e.name,i,o)}}var bC=class{context;definitions=new Map;functions;_onChanged=[];constructor(e){this.context=e;let t=this.definitions,n=this;this.functions=new Proxy({},{get(e,r){let i=t.get(r);if(i)return yC(i,n.context)},has(e,n){return t.has(n)},getOwnPropertyDescriptor(e,n){return{value:t.get(n)?.handler,configurable:!0,enumerable:!0}},ownKeys(){return Array.from(t.keys())}})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw fC.DF0021({name:e.name});pC(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw fC.DF0022({name:e.name});pC(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}onChanged(e){return this._onChanged.push(e),()=>{let t=this._onChanged.indexOf(e);t!==-1&&this._onChanged.splice(t,1)}}async getHandler(e){return await yC(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw fC.DF0023({name:String(e)});return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}};function xC(e,t=``){return JSON.stringify(e,function(e,n){let r=this,i=r==null?n:r[e];if(i===void 0){if(Array.isArray(r))throw CC(t,`undefined`,r,e);return n}return i!==null&&SC(i,r,e,t),n})}function SC(e,t,n,r){if(typeof e==`bigint`)throw CC(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw CC(r,`Map`,t,n);if(e instanceof Set)throw CC(r,`Set`,t,n);if(e instanceof Date)throw CC(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw CC(r,e.constructor?.name??`class instance`,t,n)}function CC(e,t,n,r){let i=wC(n,r);return fC.DF0020({name:e||`<anonymous>`,type:t,path:i})}function wC(e,t){return Array.isArray(e)?`[${t}]`:t===``?`<root>`:t}var TC=`__DEVFRAME_CONNECTION_META__`,EC=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function DC(e){let t=[()=>window?.[e],()=>globalThis?.[e],()=>parent.window?.[e]];for(let e of t)try{let t=e();if(t)return t}catch{}}function OC(){return DC(aC)}function kC(){return DC(TC)}function AC(e){if(e)return e;try{let e=localStorage.getItem(EC);if(e)return e}catch{}return DC(EC)}function jC(e){globalThis[aC]=e,globalThis[TC]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&MC(e.authToken)}function MC(e){try{localStorage.setItem(EC,e)}catch{}globalThis[EC]=e;let t=OC();t&&(globalThis[aC]={...t,authToken:e})}function NC(e){let t=tb(iC,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function PC(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function FC(){let e=OC();if(e)return PC(e,AC()??e.authToken??e.connectionMeta.authToken);let t=kC();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??NC(`./`),authToken:AC(t.authToken)}}async function IC(e={}){if(e.connection){let t=PC(e.connection,AC(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return jC(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:NC(t[0]??`./`),authToken:AC(e.authToken??e.connectionMeta.authToken)};return jC(n),n}let n=FC();if(n){let t=PC(n,AC(e.authToken??n.authToken??n.connectionMeta.authToken));return jC(t),t}let r=[];for(let n of t){let t=tb(iC,n),i=NC(n);try{let n=await fetch(t);if(!n.ok)throw Error(`Failed to fetch connection meta from ${i}: ${n.status}`);let r=await n.json(),a=n.url||i,o={connectionMeta:r,metaBaseUrl:r.baseUrl?new URL(r.baseUrl,a).href:a,authToken:AC(e.authToken??r.authToken)};return jC(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var LC=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function RC(e=lC){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function zC(e){try{let t=new URL(globalThis.location.href),n=new URLSearchParams(t.hash.replace(/^#/,``));if(!n.has(e))return;n.delete(e),t.hash=n.toString(),globalThis.history?.replaceState(globalThis.history.state,``,t.href)}catch{}}function BC(e=lC){let t=RC(e);return t&&zC(e),t}async function VC(e,t={}){let n=BC(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function HC(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(cC,{initialValue:{}}).then(e=>(t=e.value(),e.on(`updated`,e=>{t=e}),e)),r);return i(),{state:i,has:e=>e in t,keys:()=>Object.keys(t),get:r=>{let i=t[r];if(!i)return;let a=n.get(i);return a||(a={...i,rpc:e.scope(i.scope).rpc},n.set(i,a)),a}}}function UC(e){let t=new Map,n=new Map,r=new Map,i=new Set,a=e.connectionMeta.backend===`static`;function o(e,t){let n=r.get(e);return n&&typeof n==`object`&&!Array.isArray(n)&&typeof t==`object`&&!Array.isArray(t)?{...n,...t}:t}e.client.register({name:db.broadcast.clientStateUpdated,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.mutate(()=>o(e,n),r)}}),e.client.register({name:db.broadcast.clientStatePatch,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.patch(n,r)}});function s(t,n){let r=[];return r.push(n.on(`updated`,(n,r,i)=>{a||(r?e.callEvent(`devframe:rpc:server-state:patch`,t,r,i):e.callEvent(`devframe:rpc:server-state:set`,t,n,i))})),()=>{for(let e of r)e()}}return{keys:()=>Array.from(t.keys()),onKeyAdded(e){return i.add(e),()=>{i.delete(e)}},delete(e){let i=n.get(e);n.delete(e);let a=t.delete(e);return r.delete(e),i?.(),a},get:async(c,l)=>{if(l?.initialValue!==void 0&&r.set(c,l.initialValue),t.has(c))return t.get(c);let u=TS({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise(t=>{if(e.isTrusted)d().then(t);else{t(u);let n=!1;e.events.on(db.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var WC=new Map;function GC(e=WC){let t=new Map;return{serialize:n=>{let r;return n.t===`q`?r=n.m:(r=t.get(n.i),t.delete(n.i)),!(n.t===`s`&&`e`in n)&&r&&e.get(r)?.jsonSerializable===!0?xC(n,r??``):`s:${WS(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?GS(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function KC(){}function qC(e){let t=e.search(/\n\n|\r\n\r\n/);if(!(t<0))return{frame:e.slice(0,t),rest:e.slice(t+(e[t]===`\r`?4:2))}}function JC(e){let t=`message`,n=[];for(let r of e.split(/\r?\n/))r.startsWith(`:`)||(r.startsWith(`event:`)?t=r.slice(6).trimStart():r.startsWith(`data:`)&&n.push(r.slice(5).replace(/^ /,``)));return{event:t,data:n}}function YC(e){let{onConnected:t=KC,onError:n=KC,onDisconnected:r=KC,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${uC}=${encodeURIComponent(e.authToken)}`);let s=GC(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function h(e){l||(l=!0,p(e),n(e),r())}function g(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function _(e,n){if(e===`session`){f(n),t();return}u?.(n)}async function v(e){let t=e.getReader();d=t;let n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;for(r+=n.decode(i,{stream:!0});;){let e=qC(r);if(!e)break;r=e.rest;let{event:t,data:n}=JC(e.frame);n.length>0&&_(t,n.join(`
|
|
28
|
-
`))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await v(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[oC]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function XC(e,t){let{channel:n,rpcOptions:r={}}=t;return wb(e,{...n,timeout:-1,...r,proxify:!1})}function ZC(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(db.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new LC(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new LC(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(db.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new LC(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(db.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let v=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(db.client.connectionError,e),m(new LC(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new LC(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),y=XC(a.functions,{channel:v,rpcOptions:o});a.register({name:db.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new LC(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(db.client.connectionError,e),m(e),i.emit(db.client.isTrustedUpdated,!1)}});let b=n;async function x(e){b=e;let t=await y.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new LC(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(db.client.connectionError,e)}return i.emit(db.client.isTrustedUpdated,c),t.isTrusted}async function S(e){let t=(await y.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(b=t,c=!0,d.resolve(!0),f(`connected`),i.emit(db.client.isTrustedUpdated,!0)),t}async function C(e={}){await y.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function w(){return c?!0:x(b??``)}async function ee(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:w,requestTrustWithToken:x,requestTrustWithCode:S,requestAuthCode:C,ensureTrusted:ee,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(db.client.error,n,t),Promise.reject(n)):g(y.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(db.client.error,t,String(e[0]));return}return y.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(db.client.error,n,t),Promise.reject(n)):g(y.$callOptional(...e),t)},close:()=>{v.close()}}}function QC(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function $C(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=QC(n.sse,r??`./`,location);return ZC({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>YC({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function ew(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:tw(r)?ew(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function tw(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function nw(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function rw(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function iw(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function aw(e){if(e.error)throw ew(e.error);return e.output}function ow(e){return e.some(e=>e!=null)}function sw(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function cw(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?US(e):e}function a(e,t){return i(sw(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return iw(r)?aw(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(nw(r)){if(ow(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(rw(r)){let e=Wb(n),i=r.records[e];if(i)return aw(await s(i,r.serialization));if(r.fallback)return aw(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!ow(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function lw(e){let t=cw(await e.fetchJsonFromBases(sC),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var uw=``;function dw(e,t){return`${e}${uw}${t}`}function fw(e){let t=new Map,n=new Map;e.client.register({name:db.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(dw(e,n))?._push(r,i)}}),e.client.register({name:db.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=dw(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:db.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=dw(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(db.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(uw);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=dw(n,r),o=t.get(a);if(o)return o;let s=YS({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(db.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=dw(t,r),a=n.get(i);if(a)return a;let o=JS({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function pw(){}var mw=new Map;function hw(e){let t=e.url;e.authToken&&(t=`${t}?${uC}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=pw,onError:i=pw,onDisconnected:a=pw,definitions:o=mw}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=GC(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN){n.send(e);return}if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r);return}i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function gw(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return nb(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function _w(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=gw(n.websocket,r??`./`,location);return ZC({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>hw({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function vw(e){return e.includes(`:`)}function yw(e,t){return vw(t)?t:`${e}:${t}`}function bw(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function xw(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return bw(a)}function Sw(e,t){return{global:xw(e,t,`global`),project:xw(e,t,`project`)}}function Cw(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(vw(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(yw(t,n),...r)),callEvent:((n,...r)=>e.callEvent(yw(t,n),...r)),callOptional:((n,...r)=>e.callOptional(yw(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(yw(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(yw(t,n),r,i),upload:(n,r)=>e.streaming.upload(yw(t,n),r)}},settings:Sw(e,t),scope:e.scope}}function ww(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function Tw(e,t={}){let n=t.modelContext??ww();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=QS(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=Tb(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Ob(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>Ew(t,e.context,n)},{signal:c.signal});u&&`then`in u&&u.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),u&&`unregister`in u&&typeof u.unregister==`function`&&u.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function Ew(e,t,n){try{let r=Ab(n,e.args?.length);return{content:[{type:`text`,text:Dw(await(await yC(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:Ow(e)}]}}}function Dw(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function Ow(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function kw(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function Aw(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Gb(),a=Array.isArray(t)?t:[t],o=await IC(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new dC({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new bC(f),m=e.webmcp===!1?void 0:Tw(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(tb(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let v={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},y=kw(e.transport??`auto`,s),b=y===`static`?await lw({fetchJsonFromBases:_}):y===`sse`?$C({...v,sseOptions:e.sseOptions}):_w({...v,wsOptions:e.wsOptions}),x;try{x=new BroadcastChannel(`devframe-auth`)}catch{}let S,C=!1;function w(e){return((...t)=>C||!S?e(...t):S.then(()=>e(...t)))}function ee(){g=!0;try{h?.(),m?.()}finally{try{x?.close()}finally{b.close?.()}}}let T={events:i,get isTrusted(){return b.isTrusted},get status(){return b.status},get connectionError(){return b.connectionError},get transport(){return b.transport??y},get connection(){return o},connectionMeta:s,ensureTrusted:b.ensureTrusted,requestTrust:b.requestTrust,requestTrustWithToken:async e=>(MC(e),o={...o,authToken:e},b.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await b.requestTrustWithCode(e);if(!t)return!1;MC(t),o={...o,authToken:t};try{x?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>b.requestAuthCode(e),call:w(b.call),callEvent:w(b.callEvent),callOptional:w(b.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:ee};T.sharedState=UC(T),T.streaming=fw(T),T.services=HC(T);let E=new Map;T.scope=(e=>{if(!e)return T;let t=E.get(e);return t||(t=Cw(T,e),E.set(e,t)),t}),f.rpc=T;function D(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function te(){if(e.simpleAuth!==!1&&D()&&typeof globalThis.prompt==`function`)for(await T.requestAuthCode().catch(()=>{});!T.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await T.requestTrustWithCode(t))return}}async function ne(){let t=await b.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await VC(T,{param:n}):!1;t||r||T.isTrusted||await te()}return S=ne().then(()=>{C=!0},()=>{C=!0}),s.mcp&&rC(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-DBuadgve.js`);return{setupBrowserAgentRpcBridge:e}},[]).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(T))}).catch(()=>{}),x&&(x.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&T.requestTrustWithToken(e.data.authToken)}),T}function jw(e={}){return Aw({...e,simpleAuth:!1})}var Mw=`https://api.deepseek.com/v1`,Nw=`deepseek-chat`,Pw=null;function Fw(){if(!Pw){let e=new Promise((e,t)=>setTimeout(()=>t(Error(`DTK connection timeout — open this page via the Vite DevTools dock shell, not directly.`)),5e3));Pw=Promise.race([jw(),e])}return Pw}async function Iw(e,t,n){return e.call(t,...n)}function Lw(e){let t=Math.floor(e/1e3),n=Math.floor(t/60),r=Math.floor(n/60);return r>0?`${r}h ${n%60}m`:n>0?`${n}m ${t%60}s`:`${t}s`}function Rw(e){return new Date(e).toLocaleTimeString()}function zw(e){return e==null?`—`:typeof e==`boolean`?e?`true`:`false`:typeof e==`number`?String(e):typeof e==`string`?e:Array.isArray(e)?`[${e.length} items]`:typeof e==`object`?JSON.stringify(e):String(e)}function Bw(e){return e?e.split(`/`).pop()||e:``}function Vw(e){if(!e)return``;let t=e.split(`/`);return t.length<=5?e:`${t.slice(0,3).join(`/`)}/…/${t.slice(-2).join(`/`)}`}var Hw={GET:`bg-success/12 text-success`,POST:`bg-info/12 text-info`,PUT:`bg-warning/12 text-warning`,DELETE:`bg-destructive/12 text-destructive`,PATCH:`bg-purple-500/12 text-purple-400`};function Uw(e){return Hw[e]||`bg-secondary text-muted-foreground`}function Ww(e={}){let t=e.client??Fw;async function n(e,...n){return Iw(await t(),e,n)}let r=j(!0),i=j(null),a=j(null),o=j({}),s=j(0),c=null,l=null,u=!1,d=!1;function f(e,t){let n={duration:3e3,position:`top-right`};switch(e){case`success`:xg.success(t,n);break;case`error`:xg.error(t,n);break;case`warning`:xg.warning(t,n);break;default:xg(t,n)}}async function p(){if(!(u||d)){u=!0;try{let e=await(await t()).sharedState.get(`ubean:info`);a.value=e.value(),r.value=!1,l=e.on(`updated`,e=>{a.value=e}),o.value=await n(`ubean:get-env`),c=setInterval(()=>{a.value&&(s.value=Date.now()-a.value.startTime)},1e3)}catch(e){i.value=e instanceof Error?e.message:`Failed to connect`,r.value=!1}}}async function m(){try{o.value=await n(`ubean:get-env`),a.value||=await n(`ubean:get-info`)}catch{}}async function h(e,t,r){try{let i=await n(`ubean:crud:create`,{type:e,path:t,...r});return i.success?(f(`success`,`Created ${e}: ${t}`),await m()):i.errors?.length&&f(`error`,i.errors[0]),i}catch(e){let t=e instanceof Error?e.message:`Create failed`;return f(`error`,t),{success:!1,errors:[t]}}}async function g(e,t){try{return await n(`ubean:crud:read`,{type:e,path:t})}catch(e){return{success:!1,error:e instanceof Error?e.message:`Read failed`}}}async function _(e,t){try{let r=await n(`ubean:crud:update`,{type:e,...t});return r.success?(f(`success`,`Updated ${e}`),await m()):r.errors?.length&&f(`error`,r.errors[0]),r}catch(e){let t=e instanceof Error?e.message:`Update failed`;return f(`error`,t),{success:!1,errors:[t]}}}async function v(e,t){try{let r=await n(`ubean:crud:delete`,{type:e,...t});return r.success?(f(`success`,`Deleted ${e}`),await m()):r.errors?.length&&f(`error`,r.errors[0]),r}catch(e){let t=e instanceof Error?e.message:`Delete failed`;return f(`error`,t),{success:!1,errors:[t]}}}async function y(e){try{let t=await n(`ubean:crud:restore`,e);return t.success?(f(`success`,`Restored: ${e}`),await m()):t.errors?.length&&f(`error`,t.errors[0]),t}catch(e){let t=e instanceof Error?e.message:`Restore failed`;return f(`error`,t),{success:!1,errors:[t]}}}async function b(e,t){try{return await n(`ubean:ai:chat`,{messages:e,...t})}catch(e){return{message:{role:`assistant`,content:`Error: ${e instanceof Error?e.message:`AI request failed`}`,timestamp:Date.now()}}}}async function x(){try{return await n(`ubean:ai:tools`)}catch{return[]}}async function S(e,r,i){let a=`stream_${Date.now()}_${Math.random().toString(36).slice(2,8)}`;try{let o=(await(await t()).sharedState.get(`ubean:ai:stream`)).on(`updated`,e=>{e&&e.requestId===a&&i(e)});try{return await n(`ubean:ai:chat-stream`,{messages:e,requestId:a,...r})}finally{o()}}catch(e){return{message:{role:`assistant`,content:`Error: ${e instanceof Error?e.message:`AI stream failed`}`,timestamp:Date.now()}}}}async function C(e){try{return await n(`ubean:terminal:start`,e)}catch(e){return f(`error`,e instanceof Error?e.message:`Terminal start failed`),null}}async function w(e,t){try{return await n(`ubean:terminal:input`,{sessionId:e,data:t})}catch{return!1}}async function ee(e,t,r){try{return await n(`ubean:terminal:resize`,{sessionId:e,cols:t,rows:r})}catch{return!1}}async function T(e){try{return await n(`ubean:terminal:poll`,{sessionId:e})}catch{return{data:``,exited:!0,exitCode:-1}}}async function E(e){try{return await n(`ubean:terminal:kill`,{sessionId:e})}catch{return!1}}function D(){d||(d=!0,l&&=(l(),null),c&&=(clearInterval(c),null))}return ro()&&(Zr(()=>{p()}),ti(D)),{loading:r,error:i,info:a,env:o,uptime:s,fmtUptime:Lw,fmtTime:Rw,fmtVal:zw,fileName:Bw,filePath:Vw,methodClass:Uw,init:p,dispose:D,refresh:m,crudCreate:h,crudRead:g,crudUpdate:_,crudDelete:v,crudRestore:y,aiChat:b,aiChatStream:S,aiGetTools:x,showToast:f,terminalStart:C,terminalInput:w,terminalResize:ee,terminalPoll:T,terminalKill:E}}var Gw={key:0,class:`fixed inset-0 z-50 flex items-center justify-center`},Kw={class:`relative bg-background border border-base rounded-xl shadow-2xl w-full max-w-md mx-4 overflow-hidden animate-scale-in`},qw={class:`flex items-center justify-between px-4 py-3 border-b border-base`},Jw={class:`flex items-center gap-2`},Yw={class:`size-7 rounded-lg bg-primary/15 flex items-center justify-center`},Xw={class:`grid grid-cols-5 gap-1.5`},Zw=[`onClick`],Qw={class:`text-[10px] font-medium`},$w={key:0},eT={class:`flex gap-1.5`},tT=[`onClick`],nT={class:`block text-[11px] font-medium text-muted-foreground mb-1.5 uppercase tracking-wider`},rT=[`placeholder`],iT={key:0,class:`mt-1 text-[10px] text-muted-foreground`},aT={key:1,class:`mt-1 text-[10px] text-muted-foreground`},oT={key:1,class:`flex items-center gap-2 px-3 py-2 rounded-lg bg-destructive/10 text-destructive text-xs border border-destructive/20`},sT={class:`flex items-center justify-end gap-2 pt-1`},cT=[`disabled`],lT=[`disabled`],uT={key:0,class:`size-3 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin`},dT=P({__name:`CreateDialog`,props:{open:{type:Boolean},initialType:{},onCreate:{type:Function}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=j(`page`),a=j(``),o=j(`GET`),s=j(!1),c=j(``),l=[`GET`,`POST`,`PUT`,`DELETE`,`PATCH`],u=[{value:`page`,label:`Page`,icon:`lucide:file-text`,placeholder:`/about`},{value:`api`,label:`API Route`,icon:`lucide:send`,placeholder:`/api/hello`},{value:`middleware`,label:`Middleware`,icon:`lucide:layers`,placeholder:`/auth`},{value:`layout`,label:`Layout`,icon:`lucide:layout`,placeholder:`admin`},{value:`cron`,label:`Cron Job`,icon:`lucide:clock`,placeholder:`daily-cleanup`}],d=U(()=>u.find(e=>e.value===i.value));nr(()=>n.open,e=>{e&&(i.value=n.initialType||`page`,a.value=``,o.value=`GET`,c.value=``)}),nr(i,()=>{c.value=``});function f(){s.value||r(`close`)}async function p(){if(!a.value.trim()){c.value=`Path is required`;return}s.value=!0,c.value=``;try{let e=i.value===`api`?{method:o.value}:void 0,t=await n.onCreate(i.value,a.value.trim(),e);t.success?r(`close`):t.errors?.length&&(c.value=t.errors[0])}catch(e){c.value=e instanceof Error?e.message:`Failed to create resource`}finally{s.value=!1}}return(t,n)=>(I(),R(_r,{to:`body`},[e.open?(I(),L(`div`,Gw,[z(`div`,{class:`absolute inset-0 bg-black/50 backdrop-blur-sm`,onClick:f}),z(`div`,Kw,[z(`div`,qw,[z(`div`,Jw,[z(`div`,Yw,[B(M(W),{icon:d.value?.icon||`lucide:plus`,size:15,class:`text-primary`},null,8,[`icon`])]),n[1]||=z(`div`,null,[z(`div`,{class:`text-sm font-semibold text-foreground`},`Create New`),z(`div`,{class:`text-[11px] text-muted-foreground`},`Add a new resource to your project`)],-1)]),z(`button`,{class:`size-7 flex items-center justify-center rounded-md hover:bg-active text-muted-foreground hover:text-foreground transition-colors cursor-pointer`,onClick:f},[B(M(W),{icon:`lucide:x`,size:14})])]),z(`form`,{class:`p-4 space-y-4`,onSubmit:Ws(p,[`prevent`])},[z(`div`,null,[n[2]||=z(`label`,{class:`block text-[11px] font-medium text-muted-foreground mb-1.5 uppercase tracking-wider`},` Resource Type `,-1),z(`div`,Xw,[(I(),L(F,null,di(u,e=>z(`button`,{key:e.value,type:`button`,class:k([`flex flex-col items-center gap-1 py-2 px-1 rounded-lg border transition-all cursor-pointer`,i.value===e.value?`border-active bg-active text-foreground`:`border-base bg-background text-muted-foreground hover:text-foreground hover:bg-active`]),onClick:t=>i.value=e.value},[B(M(W),{icon:e.icon,size:16},null,8,[`icon`]),z(`span`,Qw,A(e.label),1)],10,Zw)),64))])]),i.value===`api`?(I(),L(`div`,$w,[n[3]||=z(`label`,{class:`block text-[11px] font-medium text-muted-foreground mb-1.5 uppercase tracking-wider`},` HTTP Method `,-1),z(`div`,eT,[(I(),L(F,null,di(l,e=>z(`button`,{key:e,type:`button`,class:k([`px-3 py-1.5 rounded-md text-xs font-mono font-semibold border transition-all cursor-pointer`,o.value===e?`border-active bg-active text-foreground`:`border-base bg-background text-muted-foreground hover:text-foreground hover:bg-active`]),onClick:t=>o.value=e},A(e),11,tT)),64))])])):H(``,!0),z(`div`,null,[z(`label`,nT,A(i.value===`cron`?`Name`:`Path`),1),Jn(z(`input`,{"onUpdate:modelValue":n[0]||=e=>a.value=e,type:`text`,placeholder:d.value?.placeholder,class:`w-full px-3 py-2 bg-background border border-base rounded-lg text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all font-mono`,onKeydown:Ks(p,[`enter`])},null,40,rT),[[Ps,a.value]]),i.value===`layout`?(I(),L(`p`,iT,` Layout name without extension (e.g. "admin" → layouts/admin.vue) `)):i.value===`cron`?(I(),L(`p`,aT,` Cron job file name (e.g. "daily" → server/crons/daily.ts) `)):H(``,!0)]),c.value?(I(),L(`div`,oT,[B(M(W),{icon:`lucide:alert-circle`,size:13,class:`flex-shrink-0`}),V(` `+A(c.value),1)])):H(``,!0),z(`div`,sT,[z(`button`,{type:`button`,class:`px-3 py-1.5 text-xs font-medium text-muted-foreground hover:text-foreground rounded-lg hover:bg-active transition-colors cursor-pointer`,disabled:s.value,onClick:f},` Cancel `,8,cT),z(`button`,{type:`submit`,class:`px-4 py-1.5 text-xs font-medium bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors flex items-center gap-1.5 cursor-pointer disabled:opacity-50`,disabled:s.value||!a.value.trim()},[s.value?(I(),L(`div`,uT)):(I(),R(M(W),{key:1,icon:`lucide:plus`,size:12})),V(` `+A(s.value?`Creating...`:`Create`),1)],8,lT)])],32)])])):H(``,!0)]))}}),fT=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},pT=fT(dT,[[`__scopeId`,`data-v-d058cb8c`]]),mT=[],hT=[];(()=>{let e=`lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,a,b,7,21,2,r,,,,,,4,2,1d,k,,2,5,b,,10,9,,2u,b,,6,n,4,4,3,g,4,d,,,3,6,,f,,jj,3,qa,4,s,3,t,2,u,2,1s,w,9,,19,3,,,39,2,y,,3a,c,4,c,63,5,1l,a,,,,,2,o,2,,1c,1a,2,c,k,5,1b,h,12,9,c,3,u,d,1k,e,1c,k,48,3,,l,4,,6,,2,3,5i,1s,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,n,5,4,,2b,2,1e,i,q,i,d,,12,8,p,d,18,4,1b,e,10,,1v,e,c,,8,2,1a,,1f,,,3,2,2,5,2,,,15,5,5,2,6k,8,,2,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,1t,5,8t,2,25,6,1y,b,1d,4,3e,3,1h,f,15,,2,2,a,4,19,b,7,,1p,3,10,e,g,2,18,,c,3,1c,e,8,4,,2,2k,c,6,,2,,4d,c,l,4,1j,2,,7,2,2,2,3,9,,a,2,2,7,3,5,1v,9,,,2,,,4,,5,,,e,2,2a,i,n,,29,k,6j,7,2,9,r,2,2a,h,2y,d,2t,3,2,a,74,f,6t,6,,2,2,4,,,,2,3x,7,2,7,3,,s,a,14,7,,4,8,,9,b,1a,g,5i,8,5j,8,,8,2a,m,,e,3e,6,3,,,2,,7,,,1u,5,,2,,5,9n,4,9,2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5`.split(`,`).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?hT:mT).push(n+=e[t])})();function gT(e){if(e<768)return!1;for(let t=0,n=mT.length;;){let r=t+n>>1;if(e<mT[r])n=r;else if(e>=hT[r])t=r+1;else return!0;if(t==n)return!1}}function _T(e){return e>=127462&&e<=127487}var vT=8205;function yT(e,t,n=!0,r=!0){return(n?bT:xT)(e,t,r)}function bT(e,t,n){if(t==e.length)return t;t&&CT(e.charCodeAt(t))&&wT(e.charCodeAt(t-1))&&t--;let r=ST(e,t);for(t+=TT(r);t<e.length;){let i=ST(e,t);if(r==vT||i==vT||n&&gT(i))t+=TT(i),r=i;else if(_T(i)){let n=0,r=t-2;for(;r>=0&&_T(ST(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function xT(e,t,n){for(;t>1;){let r=bT(e,t-2,n);if(r<t)return r;t--}return 0}function ST(e,t){let n=e.charCodeAt(t);if(!wT(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return CT(r)?(n-55296<<10)+(r-56320)+65536:n}function CT(e){return e>=56320&&e<57344}function wT(e){return e>=55296&&e<56320}function TT(e){return e<65536?1:2}var ET=class e{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=IT(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),OT.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=IT(this,e,t);let n=[];return this.decompose(e,t,n,0),OT.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new MT(this),i=new MT(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new MT(this,e)}iterRange(e,t=this.length){return new NT(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new PT(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new DT(t):OT.from(DT.split(t,[]))}},DT=class e extends ET{constructor(e,t=kT(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new FT(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(jT(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=AT(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=IT(this,t,n);let i=AT(this.text,AT(r.text,jT(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):OT.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
|
|
28
|
+
`))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await v(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l){n(Error(`Devframe SSE channel is closed; message dropped`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[oC]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function XC(e,t){let{channel:n,rpcOptions:r={}}=t;return wb(e,{...n,timeout:-1,...r,proxify:!1})}function ZC(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(db.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new LC(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new LC(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(db.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new LC(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(db.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let v=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(db.client.connectionError,e),m(new LC(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new LC(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),y=XC(a.functions,{channel:v,rpcOptions:o});a.register({name:db.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new LC(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(db.client.connectionError,e),m(e),i.emit(db.client.isTrustedUpdated,!1)}});let b=n;async function x(e){b=e;let t=await y.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new LC(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(db.client.connectionError,e)}return i.emit(db.client.isTrustedUpdated,c),t.isTrusted}async function S(e){let t=(await y.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(b=t,c=!0,d.resolve(!0),f(`connected`),i.emit(db.client.isTrustedUpdated,!0)),t}async function C(e={}){await y.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function w(){return c?!0:x(b??``)}async function ee(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:w,requestTrustWithToken:x,requestTrustWithCode:S,requestAuthCode:C,ensureTrusted:ee,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(db.client.error,n,t),Promise.reject(n)):g(y.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(db.client.error,t,String(e[0]));return}return y.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(db.client.error,n,t),Promise.reject(n)):g(y.$callOptional(...e),t)},close:()=>{v.close()}}}function QC(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function $C(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=QC(n.sse,r??`./`,location);return ZC({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>YC({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function ew(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:tw(r)?ew(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function tw(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function nw(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function rw(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function iw(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function aw(e){if(e.error)throw ew(e.error);return e.output}function ow(e){return e.some(e=>e!=null)}function sw(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function cw(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?US(e):e}function a(e,t){return i(sw(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return iw(r)?aw(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(nw(r)){if(ow(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(rw(r)){let e=Wb(n),i=r.records[e];if(i)return aw(await s(i,r.serialization));if(r.fallback)return aw(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!ow(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function lw(e){let t=cw(await e.fetchJsonFromBases(sC),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var uw=``;function dw(e,t){return`${e}${uw}${t}`}function fw(e){let t=new Map,n=new Map;e.client.register({name:db.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(dw(e,n))?._push(r,i)}}),e.client.register({name:db.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=dw(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:db.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=dw(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(db.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(uw);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=dw(n,r),o=t.get(a);if(o)return o;let s=YS({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(db.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=dw(t,r),a=n.get(i);if(a)return a;let o=JS({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function pw(){}var mw=new Map;function hw(e){let t=e.url;e.authToken&&(t=`${t}?${uC}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=pw,onError:i=pw,onDisconnected:a=pw,definitions:o=mw}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=GC(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN){n.send(e);return}if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r);return}i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function gw(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return nb(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function _w(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=gw(n.websocket,r??`./`,location);return ZC({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>hw({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function vw(e){return e.includes(`:`)}function yw(e,t){return vw(t)?t:`${e}:${t}`}function bw(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function xw(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return bw(a)}function Sw(e,t){return{global:xw(e,t,`global`),project:xw(e,t,`project`)}}function Cw(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(vw(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(yw(t,n),...r)),callEvent:((n,...r)=>e.callEvent(yw(t,n),...r)),callOptional:((n,...r)=>e.callOptional(yw(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(yw(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(yw(t,n),r,i),upload:(n,r)=>e.streaming.upload(yw(t,n),r)}},settings:Sw(e,t),scope:e.scope}}function ww(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function Tw(e,t={}){let n=t.modelContext??ww();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=QS(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=Tb(t.type,n),u=r.registerTool({name:o,description:n.description,inputSchema:Ob(t.args),annotations:{title:n.title??t.name,readOnlyHint:l===`read`,destructiveHint:l===`destructive`},execute:n=>Ew(t,e.context,n)},{signal:c.signal});u&&`then`in u&&u.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),u&&`unregister`in u&&typeof u.unregister==`function`&&u.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function Ew(e,t,n){try{let r=Ab(n,e.args?.length);return{content:[{type:`text`,text:Dw(await(await yC(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:Ow(e)}]}}}function Dw(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function Ow(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function kw(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function Aw(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Gb(),a=Array.isArray(t)?t:[t],o=await IC(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new dC({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new bC(f),m=e.webmcp===!1?void 0:Tw(p),h,g=!1;async function _(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(tb(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let v={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&d?.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);d.apply(e,n)}else await t(e)}}},y=kw(e.transport??`auto`,s),b=y===`static`?await lw({fetchJsonFromBases:_}):y===`sse`?$C({...v,sseOptions:e.sseOptions}):_w({...v,wsOptions:e.wsOptions}),x;try{x=new BroadcastChannel(`devframe-auth`)}catch{}let S,C=!1;function w(e){return((...t)=>C||!S?e(...t):S.then(()=>e(...t)))}function ee(){g=!0;try{h?.(),m?.()}finally{try{x?.close()}finally{b.close?.()}}}let T={events:i,get isTrusted(){return b.isTrusted},get status(){return b.status},get connectionError(){return b.connectionError},get transport(){return b.transport??y},get connection(){return o},connectionMeta:s,ensureTrusted:b.ensureTrusted,requestTrust:b.requestTrust,requestTrustWithToken:async e=>(MC(e),o={...o,authToken:e},b.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await b.requestTrustWithCode(e);if(!t)return!1;MC(t),o={...o,authToken:t};try{x?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>b.requestAuthCode(e),call:w(b.call),callEvent:w(b.callEvent),callOptional:w(b.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:ee};T.sharedState=UC(T),T.streaming=fw(T),T.services=HC(T);let E=new Map;T.scope=(e=>{if(!e)return T;let t=E.get(e);return t||(t=Cw(T,e),E.set(e,t)),t}),f.rpc=T;function D(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function te(){if(e.simpleAuth!==!1&&D()&&typeof globalThis.prompt==`function`)for(await T.requestAuthCode().catch(()=>{});!T.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await T.requestTrustWithCode(t))return}}async function ne(){let t=await b.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await VC(T,{param:n}):!1;t||r||T.isTrusted||await te()}return S=ne().then(()=>{C=!0},()=>{C=!0}),s.mcp&&rC(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-BXhoSh1z-y1ovomuM.js`);return{setupBrowserAgentRpcBridge:e}},[]).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(T))}).catch(()=>{}),x&&(x.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&T.requestTrustWithToken(e.data.authToken)}),T}function jw(e={}){return Aw({...e,simpleAuth:!1})}var Mw=`https://api.deepseek.com/v1`,Nw=`deepseek-chat`,Pw=null;function Fw(){if(!Pw){let e=new Promise((e,t)=>setTimeout(()=>t(Error(`DTK connection timeout — open this page via the Vite DevTools dock shell, not directly.`)),5e3));Pw=Promise.race([jw(),e])}return Pw}async function Iw(e,t,n){return e.call(t,...n)}function Lw(e){let t=Math.floor(e/1e3),n=Math.floor(t/60),r=Math.floor(n/60);return r>0?`${r}h ${n%60}m`:n>0?`${n}m ${t%60}s`:`${t}s`}function Rw(e){return new Date(e).toLocaleTimeString()}function zw(e){return e==null?`—`:typeof e==`boolean`?e?`true`:`false`:typeof e==`number`?String(e):typeof e==`string`?e:Array.isArray(e)?`[${e.length} items]`:typeof e==`object`?JSON.stringify(e):String(e)}function Bw(e){return e?e.split(`/`).pop()||e:``}function Vw(e){if(!e)return``;let t=e.split(`/`);return t.length<=5?e:`${t.slice(0,3).join(`/`)}/…/${t.slice(-2).join(`/`)}`}var Hw={GET:`bg-success/12 text-success`,POST:`bg-info/12 text-info`,PUT:`bg-warning/12 text-warning`,DELETE:`bg-destructive/12 text-destructive`,PATCH:`bg-purple-500/12 text-purple-400`};function Uw(e){return Hw[e]||`bg-secondary text-muted-foreground`}function Ww(e={}){let t=e.client??Fw;async function n(e,...n){return Iw(await t(),e,n)}let r=j(!0),i=j(null),a=j(null),o=j({}),s=j(0),c=null,l=null,u=!1,d=!1;function f(e,t){let n={duration:3e3,position:`top-right`};switch(e){case`success`:xg.success(t,n);break;case`error`:xg.error(t,n);break;case`warning`:xg.warning(t,n);break;default:xg(t,n)}}async function p(){if(!(u||d)){u=!0;try{let e=await(await t()).sharedState.get(`ubean:info`);a.value=e.value(),r.value=!1,l=e.on(`updated`,e=>{a.value=e}),o.value=await n(`ubean:get-env`),c=setInterval(()=>{a.value&&(s.value=Date.now()-a.value.startTime)},1e3)}catch(e){i.value=e instanceof Error?e.message:`Failed to connect`,r.value=!1}}}async function m(){try{o.value=await n(`ubean:get-env`),a.value||=await n(`ubean:get-info`)}catch{}}async function h(e,t,r){try{let i=await n(`ubean:crud:create`,{type:e,path:t,...r});return i.success?(f(`success`,`Created ${e}: ${t}`),await m()):i.errors?.length&&f(`error`,i.errors[0]),i}catch(e){let t=e instanceof Error?e.message:`Create failed`;return f(`error`,t),{success:!1,errors:[t]}}}async function g(e,t){try{return await n(`ubean:crud:read`,{type:e,path:t})}catch(e){return{success:!1,error:e instanceof Error?e.message:`Read failed`}}}async function _(e,t){try{let r=await n(`ubean:crud:update`,{type:e,...t});return r.success?(f(`success`,`Updated ${e}`),await m()):r.errors?.length&&f(`error`,r.errors[0]),r}catch(e){let t=e instanceof Error?e.message:`Update failed`;return f(`error`,t),{success:!1,errors:[t]}}}async function v(e,t){try{let r=await n(`ubean:crud:delete`,{type:e,...t});return r.success?(f(`success`,`Deleted ${e}`),await m()):r.errors?.length&&f(`error`,r.errors[0]),r}catch(e){let t=e instanceof Error?e.message:`Delete failed`;return f(`error`,t),{success:!1,errors:[t]}}}async function y(e){try{let t=await n(`ubean:crud:restore`,e);return t.success?(f(`success`,`Restored: ${e}`),await m()):t.errors?.length&&f(`error`,t.errors[0]),t}catch(e){let t=e instanceof Error?e.message:`Restore failed`;return f(`error`,t),{success:!1,errors:[t]}}}async function b(e,t){try{return await n(`ubean:ai:chat`,{messages:e,...t})}catch(e){return{message:{role:`assistant`,content:`Error: ${e instanceof Error?e.message:`AI request failed`}`,timestamp:Date.now()}}}}async function x(){try{return await n(`ubean:ai:tools`)}catch{return[]}}async function S(e,r,i){let a=`stream_${Date.now()}_${Math.random().toString(36).slice(2,8)}`;try{let o=(await(await t()).sharedState.get(`ubean:ai:stream`)).on(`updated`,e=>{e&&e.requestId===a&&i(e)});try{return await n(`ubean:ai:chat-stream`,{messages:e,requestId:a,...r})}finally{o()}}catch(e){return{message:{role:`assistant`,content:`Error: ${e instanceof Error?e.message:`AI stream failed`}`,timestamp:Date.now()}}}}async function C(e){try{return await n(`ubean:terminal:start`,e)}catch(e){return f(`error`,e instanceof Error?e.message:`Terminal start failed`),null}}async function w(e,t){try{return await n(`ubean:terminal:input`,{sessionId:e,data:t})}catch{return!1}}async function ee(e,t,r){try{return await n(`ubean:terminal:resize`,{sessionId:e,cols:t,rows:r})}catch{return!1}}async function T(e){try{return await n(`ubean:terminal:poll`,{sessionId:e})}catch{return{data:``,exited:!0,exitCode:-1}}}async function E(e){try{return await n(`ubean:terminal:kill`,{sessionId:e})}catch{return!1}}function D(){d||(d=!0,l&&=(l(),null),c&&=(clearInterval(c),null))}return ro()&&(Zr(()=>{p()}),ti(D)),{loading:r,error:i,info:a,env:o,uptime:s,fmtUptime:Lw,fmtTime:Rw,fmtVal:zw,fileName:Bw,filePath:Vw,methodClass:Uw,init:p,dispose:D,refresh:m,crudCreate:h,crudRead:g,crudUpdate:_,crudDelete:v,crudRestore:y,aiChat:b,aiChatStream:S,aiGetTools:x,showToast:f,terminalStart:C,terminalInput:w,terminalResize:ee,terminalPoll:T,terminalKill:E}}var Gw={key:0,class:`fixed inset-0 z-50 flex items-center justify-center`},Kw={class:`relative bg-background border border-base rounded-xl shadow-2xl w-full max-w-md mx-4 overflow-hidden animate-scale-in`},qw={class:`flex items-center justify-between px-4 py-3 border-b border-base`},Jw={class:`flex items-center gap-2`},Yw={class:`size-7 rounded-lg bg-primary/15 flex items-center justify-center`},Xw={class:`grid grid-cols-5 gap-1.5`},Zw=[`onClick`],Qw={class:`text-[10px] font-medium`},$w={key:0},eT={class:`flex gap-1.5`},tT=[`onClick`],nT={class:`block text-[11px] font-medium text-muted-foreground mb-1.5 uppercase tracking-wider`},rT=[`placeholder`],iT={key:0,class:`mt-1 text-[10px] text-muted-foreground`},aT={key:1,class:`mt-1 text-[10px] text-muted-foreground`},oT={key:1,class:`flex items-center gap-2 px-3 py-2 rounded-lg bg-destructive/10 text-destructive text-xs border border-destructive/20`},sT={class:`flex items-center justify-end gap-2 pt-1`},cT=[`disabled`],lT=[`disabled`],uT={key:0,class:`size-3 border-2 border-primary-foreground/30 border-t-primary-foreground rounded-full animate-spin`},dT=P({__name:`CreateDialog`,props:{open:{type:Boolean},initialType:{},onCreate:{type:Function}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=j(`page`),a=j(``),o=j(`GET`),s=j(!1),c=j(``),l=[`GET`,`POST`,`PUT`,`DELETE`,`PATCH`],u=[{value:`page`,label:`Page`,icon:`lucide:file-text`,placeholder:`/about`},{value:`api`,label:`API Route`,icon:`lucide:send`,placeholder:`/api/hello`},{value:`middleware`,label:`Middleware`,icon:`lucide:layers`,placeholder:`/auth`},{value:`layout`,label:`Layout`,icon:`lucide:layout`,placeholder:`admin`},{value:`cron`,label:`Cron Job`,icon:`lucide:clock`,placeholder:`daily-cleanup`}],d=U(()=>u.find(e=>e.value===i.value));nr(()=>n.open,e=>{e&&(i.value=n.initialType||`page`,a.value=``,o.value=`GET`,c.value=``)}),nr(i,()=>{c.value=``});function f(){s.value||r(`close`)}async function p(){if(!a.value.trim()){c.value=`Path is required`;return}s.value=!0,c.value=``;try{let e=i.value===`api`?{method:o.value}:void 0,t=await n.onCreate(i.value,a.value.trim(),e);t.success?r(`close`):t.errors?.length&&(c.value=t.errors[0])}catch(e){c.value=e instanceof Error?e.message:`Failed to create resource`}finally{s.value=!1}}return(t,n)=>(I(),R(_r,{to:`body`},[e.open?(I(),L(`div`,Gw,[z(`div`,{class:`absolute inset-0 bg-black/50 backdrop-blur-sm`,onClick:f}),z(`div`,Kw,[z(`div`,qw,[z(`div`,Jw,[z(`div`,Yw,[B(M(W),{icon:d.value?.icon||`lucide:plus`,size:15,class:`text-primary`},null,8,[`icon`])]),n[1]||=z(`div`,null,[z(`div`,{class:`text-sm font-semibold text-foreground`},`Create New`),z(`div`,{class:`text-[11px] text-muted-foreground`},`Add a new resource to your project`)],-1)]),z(`button`,{class:`size-7 flex items-center justify-center rounded-md hover:bg-active text-muted-foreground hover:text-foreground transition-colors cursor-pointer`,onClick:f},[B(M(W),{icon:`lucide:x`,size:14})])]),z(`form`,{class:`p-4 space-y-4`,onSubmit:Ws(p,[`prevent`])},[z(`div`,null,[n[2]||=z(`label`,{class:`block text-[11px] font-medium text-muted-foreground mb-1.5 uppercase tracking-wider`},` Resource Type `,-1),z(`div`,Xw,[(I(),L(F,null,di(u,e=>z(`button`,{key:e.value,type:`button`,class:k([`flex flex-col items-center gap-1 py-2 px-1 rounded-lg border transition-all cursor-pointer`,i.value===e.value?`border-active bg-active text-foreground`:`border-base bg-background text-muted-foreground hover:text-foreground hover:bg-active`]),onClick:t=>i.value=e.value},[B(M(W),{icon:e.icon,size:16},null,8,[`icon`]),z(`span`,Qw,A(e.label),1)],10,Zw)),64))])]),i.value===`api`?(I(),L(`div`,$w,[n[3]||=z(`label`,{class:`block text-[11px] font-medium text-muted-foreground mb-1.5 uppercase tracking-wider`},` HTTP Method `,-1),z(`div`,eT,[(I(),L(F,null,di(l,e=>z(`button`,{key:e,type:`button`,class:k([`px-3 py-1.5 rounded-md text-xs font-mono font-semibold border transition-all cursor-pointer`,o.value===e?`border-active bg-active text-foreground`:`border-base bg-background text-muted-foreground hover:text-foreground hover:bg-active`]),onClick:t=>o.value=e},A(e),11,tT)),64))])])):H(``,!0),z(`div`,null,[z(`label`,nT,A(i.value===`cron`?`Name`:`Path`),1),Jn(z(`input`,{"onUpdate:modelValue":n[0]||=e=>a.value=e,type:`text`,placeholder:d.value?.placeholder,class:`w-full px-3 py-2 bg-background border border-base rounded-lg text-xs text-foreground placeholder:text-muted-foreground outline-none focus:border-active focus:ring-1 focus:ring-primary-500/25 transition-all font-mono`,onKeydown:Ks(p,[`enter`])},null,40,rT),[[Ps,a.value]]),i.value===`layout`?(I(),L(`p`,iT,` Layout name without extension (e.g. "admin" → layouts/admin.vue) `)):i.value===`cron`?(I(),L(`p`,aT,` Cron job file name (e.g. "daily" → server/crons/daily.ts) `)):H(``,!0)]),c.value?(I(),L(`div`,oT,[B(M(W),{icon:`lucide:alert-circle`,size:13,class:`flex-shrink-0`}),V(` `+A(c.value),1)])):H(``,!0),z(`div`,sT,[z(`button`,{type:`button`,class:`px-3 py-1.5 text-xs font-medium text-muted-foreground hover:text-foreground rounded-lg hover:bg-active transition-colors cursor-pointer`,disabled:s.value,onClick:f},` Cancel `,8,cT),z(`button`,{type:`submit`,class:`px-4 py-1.5 text-xs font-medium bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors flex items-center gap-1.5 cursor-pointer disabled:opacity-50`,disabled:s.value||!a.value.trim()},[s.value?(I(),L(`div`,uT)):(I(),R(M(W),{key:1,icon:`lucide:plus`,size:12})),V(` `+A(s.value?`Creating...`:`Create`),1)],8,lT)])],32)])])):H(``,!0)]))}}),fT=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},pT=fT(dT,[[`__scopeId`,`data-v-d058cb8c`]]),mT=[],hT=[];(()=>{let e=`lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,a,b,7,21,2,r,,,,,,4,2,1d,k,,2,5,b,,10,9,,2u,b,,6,n,4,4,3,g,4,d,,,3,6,,f,,jj,3,qa,4,s,3,t,2,u,2,1s,w,9,,19,3,,,39,2,y,,3a,c,4,c,63,5,1l,a,,,,,2,o,2,,1c,1a,2,c,k,5,1b,h,12,9,c,3,u,d,1k,e,1c,k,48,3,,l,4,,6,,2,3,5i,1s,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,n,5,4,,2b,2,1e,i,q,i,d,,12,8,p,d,18,4,1b,e,10,,1v,e,c,,8,2,1a,,1f,,,3,2,2,5,2,,,15,5,5,2,6k,8,,2,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,1t,5,8t,2,25,6,1y,b,1d,4,3e,3,1h,f,15,,2,2,a,4,19,b,7,,1p,3,10,e,g,2,18,,c,3,1c,e,8,4,,2,2k,c,6,,2,,4d,c,l,4,1j,2,,7,2,2,2,3,9,,a,2,2,7,3,5,1v,9,,,2,,,4,,5,,,e,2,2a,i,n,,29,k,6j,7,2,9,r,2,2a,h,2y,d,2t,3,2,a,74,f,6t,6,,2,2,4,,,,2,3x,7,2,7,3,,s,a,14,7,,4,8,,9,b,1a,g,5i,8,5j,8,,8,2a,m,,e,3e,6,3,,,2,,7,,,1u,5,,2,,5,9n,4,9,2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5`.split(`,`).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?hT:mT).push(n+=e[t])})();function gT(e){if(e<768)return!1;for(let t=0,n=mT.length;;){let r=t+n>>1;if(e<mT[r])n=r;else if(e>=hT[r])t=r+1;else return!0;if(t==n)return!1}}function _T(e){return e>=127462&&e<=127487}var vT=8205;function yT(e,t,n=!0,r=!0){return(n?bT:xT)(e,t,r)}function bT(e,t,n){if(t==e.length)return t;t&&CT(e.charCodeAt(t))&&wT(e.charCodeAt(t-1))&&t--;let r=ST(e,t);for(t+=TT(r);t<e.length;){let i=ST(e,t);if(r==vT||i==vT||n&&gT(i))t+=TT(i),r=i;else if(_T(i)){let n=0,r=t-2;for(;r>=0&&_T(ST(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function xT(e,t,n){for(;t>1;){let r=bT(e,t-2,n);if(r<t)return r;t--}return 0}function ST(e,t){let n=e.charCodeAt(t);if(!wT(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return CT(r)?(n-55296<<10)+(r-56320)+65536:n}function CT(e){return e>=56320&&e<57344}function wT(e){return e>=55296&&e<56320}function TT(e){return e<65536?1:2}var ET=class e{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=IT(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),OT.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=IT(this,e,t);let n=[];return this.decompose(e,t,n,0),OT.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new MT(this),i=new MT(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new MT(this,e)}iterRange(e,t=this.length){return new NT(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new PT(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new DT(t):OT.from(DT.split(t,[]))}},DT=class e extends ET{constructor(e,t=kT(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new FT(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(jT(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=AT(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=IT(this,t,n);let i=AT(this.text,AT(r.text,jT(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):OT.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
|
|
29
29
|
`){[e,t]=IT(this,e,t);let r=``;for(let i=0,a=0;i<=t&&a<this.text.length;a++){let o=this.text[a],s=i+o.length;i>e&&a&&(r+=n),e<s&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},OT=class e extends ET{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(e<=s&&t>=a){let i=r&(a<=e|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=IT(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(t>=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=`
|
|
30
30
|
`){[e,t]=IT(this,e,t);let r=``;for(let i=0,a=0;i<this.children.length&&a<=t;i++){let o=this.children[i],s=a+o.length;a>e&&i&&(r+=n),e<s&&t>a&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new DT(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof DT&&c&&(n=u[u.length-1])instanceof DT&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new DT(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}};ET.empty=new DT([``],0);function kT(e){let t=-1;for(let n of e)t+=n.length+1;return t}function AT(e,t,n=0,r=1e9){for(let i=0,a=0,o=!0;a<e.length&&i<=r;a++){let s=e[a],c=i+s.length;c>=n&&(c>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),o?(t[t.length-1]+=s,o=!1):t.push(s)),i=c+1}return t}function jT(e,t,n){return AT(e,[``],t,n)}var MT=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value=``,this.nodes=[e],this.offsets=[t>0?1:(e instanceof DT?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof DT?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
31
31
|
`,this;e--}else if(r instanceof DT){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof DT?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},NT=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new MT(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=``}},PT=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<`u`&&(ET.prototype[Symbol.iterator]=function(){return this.iter()},MT.prototype[Symbol.iterator]=NT.prototype[Symbol.iterator]=PT.prototype[Symbol.iterator]=function(){return this});var FT=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function IT(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function LT(e,t,n=!0,r=!0){return yT(e,t,n,r)}function RT(e){return e>=56320&&e<57344}function zT(e){return e>=55296&&e<56320}function BT(e,t){let n=e.charCodeAt(t);if(!zT(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return RT(r)?(n-55296<<10)+(r-56320)+65536:n}function VT(e){return e<65536?1:2}var HT=/\r\n?|\n/,UT=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(UT||={}),WT=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],a=this.sections[t++];a<0?(e(n,r,i),r+=i):r+=a,n+=i}}iterChangedRanges(e,t=!1){JT(this,e,t)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new e(t)}composeDesc(e){return this.empty?e:e.empty?this:XT(this,e)}mapDesc(e,t=!1){return e.empty?this:YT(this,e,t)}mapPos(e,t=-1,n=UT.Simple){let r=0,i=0;for(let a=0;a<this.sections.length;){let o=this.sections[a++],s=this.sections[a++],c=r+o;if(s<0){if(c>e)return i+(e-r);i+=o}else{if(n!=UT.Simple&&c>=e&&(n==UT.TrackDel&&r<e&&c>e||n==UT.TrackBefore&&r<e||n==UT.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],a=this.sections[n++],o=r+i;if(a>=0&&r<=t&&o>=e)return r<e&&o>t?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?` `:``)+n+(r>=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},GT=class e extends WT{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return JT(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return YT(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e<n.length;e+=2){let a=n[e],o=n[e+1];if(o>=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length<s;)r.push(ET.empty);r.push(a?t.slice(i,i+a):ET.empty)}i+=a}return new e(n,r)}compose(e){return this.empty?e:e.empty?this:XT(this,e,!0)}map(e,t=!1){return e.empty?this:YT(this,e,t,!0)}iterChanges(e,t=!1){JT(this,e,t)}get desc(){return WT.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new ZT(this);done:for(let e=0,o=0;;){let s=e==t.length?1e9:t[e++];for(;o<s||o==s&&a.len==0;){if(a.done)break done;let e=Math.min(a.len,s-o);KT(i,e,-1);let t=a.ins==-1?-1:a.off==0?a.ins:0;KT(n,e,t),t>0&&qT(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o<c;){if(a.done)break done;let e=Math.min(a.len,c-o);KT(n,e,-1),KT(i,e,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(e),o+=e}}return{changes:new e(n,r),filtered:WT.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):r==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(t,n,r){let i=[],a=[],o=0,s=null;function c(t=!1){if(!t&&!i.length)return;o<n&&KT(i,n-o,-1);let r=new e(i,a);s=s?s.compose(r.map(s)):r,i=[],a=[],o=0}function l(t){if(Array.isArray(t))for(let e of t)l(e);else if(t instanceof e){if(t.length!=n)throw RangeError(`Mismatched change set length (got ${t.length}, expected ${n})`);c(),s=s?s.compose(t.map(s)):t}else{let{from:e,to:s=e,insert:l}=t;if(e>s||e<0||s>n)throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${n})`);let u=l?typeof l==`string`?ET.of(l.split(r||HT)):l:ET.empty,d=u.length;if(e==s&&d==0)return;e<o&&c(),e>o&&KT(i,e-o,-1),KT(i,s-e,d),qT(a,i,u),o=s}}return l(t),c(!s),s}static empty(t){return new e(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError(`Invalid JSON representation of ChangeSet`);let n=[],r=[];for(let e=0;e<t.length;e++){let i=t[e];if(typeof i==`number`)n.push(i,-1);else if(!Array.isArray(i)||typeof i[0]!=`number`||i.some((e,t)=>t&&typeof e!=`string`))throw RangeError(`Invalid JSON representation of ChangeSet`);else if(i.length==1)n.push(i[0],0);else{for(;r.length<e;)r.push(ET.empty);r[e]=ET.of(i.slice(1)),n.push(i[0],r[e].length)}}return new e(n,r)}static createSet(t,n){return new e(t,n)}};function KT(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function qT(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(ET.empty);e.push(n)}}function JT(e,t,n){let r=e.inserted;for(let i=0,a=0,o=0;o<e.sections.length;){let s=e.sections[o++],c=e.sections[o++];if(c<0)i+=s,a+=s;else{let l=i,u=a,d=ET.empty;for(;l+=s,u+=c,c&&r&&(d=d.append(r[o-2>>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)s=e.sections[o++],c=e.sections[o++];t(i,l,a,u,d),i=l,a=u}}}function YT(e,t,n,r=!1){let i=[],a=r?[]:null,o=new ZT(e),s=new ZT(t);for(let e=-1;;)if(o.done&&s.len||s.done&&o.len)throw Error(`Mismatched change set lengths`);else if(o.ins==-1&&s.ins==-1){let e=Math.min(o.len,s.len);KT(i,e,-1),o.forward(e),s.forward(e)}else if(s.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(s.len<o.len||s.len==o.len&&!n))){let t=s.len;for(KT(i,s.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(KT(i,0,o.ins),a&&qT(a,i,o.text),e=o.i),o.forward(n),t-=n}s.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(s.ins==-1){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else if(s.ins==0&&s.len<n)n-=s.len,s.next();else break;KT(i,t,e<o.i?o.ins:0),a&&e<o.i&&qT(a,i,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&s.done)return a?GT.createSet(i,a):WT.create(i);else throw Error(`Mismatched change set lengths`)}function XT(e,t,n=!1){let r=[],i=n?[]:null,a=new ZT(e),o=new ZT(t);for(let e=!1;;)if(a.done&&o.done)return i?GT.createSet(r,i):WT.create(r);else if(a.ins==0)KT(r,a.len,0,e),a.next();else if(o.len==0&&!o.done)KT(r,0,o.ins,e),i&&qT(i,r,o.text),o.next();else if(a.done||o.done)throw Error(`Mismatched change set lengths`);else{let t=Math.min(a.len2,o.len),n=r.length;if(a.ins==-1){let n=o.ins==-1?-1:o.off?0:o.ins;KT(r,t,n,e),i&&n&&qT(i,r,o.text)}else o.ins==-1?(KT(r,a.off?0:a.len,t,e),i&&qT(i,r,a.textBit(t))):(KT(r,a.off?0:a.len,o.off?0:o.ins,e),i&&!o.off&&qT(i,r,o.text));e=(a.ins>t||o.ins>=0&&o.len>t)&&(e||r.length>n),a.forward2(t),o.forward(t)}}var ZT=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?ET.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?ET.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},QT=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.flags=n,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new e(r,i,this.flags,this.goalColumn)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return G.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return G.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!=`number`||typeof e.head!=`number`)throw RangeError(`Invalid JSON representation for SelectionRange`);return G.range(e.anchor,e.head)}static create(t,n,r,i){return new e(t,n,r,i)}},G=class e{constructor(e,t){this.ranges=e,this.mainIndex=t}map(t,n=-1){return t.empty?this:e.create(this.ranges.map(e=>e.map(t,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new e([this.main],0)}addRange(t,n=!0){return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!=`number`||t.main>=t.ranges.length)throw RangeError(`Invalid JSON representation for EditorSelection`);return new e(t.ranges.map(e=>QT.fromJSON(e)),t.main)}static single(t,n=t){return new e([e.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw RangeError(`A selection needs at least one range`);for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return e.normalized(t.slice(),n);r=a.to}return new e(t,n)}static cursor(e,t=0,n,r){return QT.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n)),r)}static range(e,t,n,r,i){let a=r==null?7:Math.min(6,r);return!i&&e!=t&&(i=t<e?1:-1),i&&(a|=i<0?8:16),t<e?QT.create(t,e,a|32,n):QT.create(e,t,a,n)}static undirectionalRange(e,t){return QT.create(e,t,64,void 0)}static normalized(t,n=0){let r=t[n];t.sort((e,t)=>e.from-t.from),n=t.indexOf(r);for(let r=1;r<t.length;r++){let i=t[r],a=t[r-1];if(i.empty?i.from<=a.to:i.from<a.to){let o=a.from,s=Math.max(i.to,a.to);r<=n&&n--,t.splice(--r,2,i.anchor>i.head?e.range(s,o):e.range(o,s))}}return new e(t,n)}};function $T(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError(`Selection points outside of document`)}var eE=0,K=class e{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=eE++,this.default=e([]),this.extensions=typeof i==`function`?i(this):i}get reader(){return this}static define(t={}){return new e(t.combine||(e=>e),t.compareInput||((e,t)=>e===t),t.compare||(t.combine?(e,t)=>e===t:tE),!!t.static,t.enables)}of(e){return new nE([],this,0,e)}compute(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new nE(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new nE(e,this,2,t)}from(e,t){return t||=e=>e,this.compute([e],n=>t(n.field(e)))}};function tE(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}var nE=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=eE++}dynamicSlot(e){let t=this.value,n=this.facet.compareInput,r=this.id,i=e[r]>>1,a=this.type==2,o=!1,s=!1,c=[];for(let t of this.dependencies)t==`doc`?o=!0:t==`selection`?s=!0:(e[t.id]??1)&1||c.push(e[t.id]);return{create(e){return e.values[i]=t(e),1},update(e,r){if(o&&r.docChanged||s&&(r.docChanged||r.selection)||iE(e,c)){let r=t(e);if(a?!rE(r,e.values[i],n):!n(r,e.values[i]))return e.values[i]=r,1}return 0},reconfigure:(e,o)=>{let s,c=o.config.address[r];if(c!=null){let r=_E(o,c);if(this.dependencies.every(t=>t instanceof K?o.facet(t)===e.facet(t):t instanceof sE?o.field(t,!1)==e.field(t,!1):!0)||(a?rE(s=t(e),r,n):n(s=t(e),r)))return e.values[i]=r,0}else s=t(e);return e.values[i]=s,1}}}get extension(){return this}};function rE(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function iE(e,t){let n=!1;for(let r of t)gE(e,r)&1&&(n=!0);return n}function aE(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),a=r.filter(e=>!(e&1)),o=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<r.length;t++){let a=_E(e,r[t]);if(i[t]==2)for(let e of a)n.push(e);else n.push(a)}return t.combine(n)}return{create(e){for(let t of r)gE(e,t);return e.values[o]=s(e),1},update(e,n){if(!iE(e,a))return 0;let r=s(e);return t.compare(r,e.values[o])?0:(e.values[o]=r,1)},reconfigure(e,i){let a=iE(e,r),c=i.config.facets[t.id],l=i.facet(t);if(c&&!a&&tE(n,c))return e.values[o]=l,0;let u=s(e);return t.compare(u,l)?(e.values[o]=l,0):(e.values[o]=u,1)}}}var oE=K.define({static:!0}),sE=class e{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let n=new e(eE++,t.create,t.update,t.compare||((e,t)=>e===t),t);return t.provide&&(n.provides=t.provide(n)),n}create(e){return(e.facet(oE).find(e=>e.field==this)?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(oE),i=n.facet(oE),a;return(a=r.find(e=>e.field==this))&&a!=i.find(e=>e.field==this)?(e.values[t]=a.create(e),1):n.config.address[this.id]==null?(e.values[t]=this.create(e),1):(e.values[t]=n.field(this),0)}}}init(e){return[this,oE.of({field:this,create:e})]}get extension(){return this}},cE={lowest:4,low:3,default:2,high:1,highest:0};function lE(e){return t=>new dE(t,e)}var uE={highest:lE(cE.highest),high:lE(cE.high),default:lE(cE.default),low:lE(cE.low),lowest:lE(cE.lowest)},dE=class{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}},fE=class e{of(e){return new pE(this,e)}reconfigure(t){return e.reconfigure.of({compartment:this,extension:t})}get(e){return e.config.compartments.get(this)}},pE=class{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}},mE=class e{constructor(e,t,n,r,i,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),o=new Map;for(let e of hE(t,n,o))e instanceof sE?i.push(e):(a[e.facet.id]||(a[e.facet.id]=[])).push(e);let s=Object.create(null),c=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let u=r?.config.facets;for(let e in a){let t=a[e],n=t[0].facet,i=u&&u[e]||[];if(t.every(e=>e.type==0)){if(s[n.id]=c.length<<1|1,tE(i,t))c.push(r.facet(n));else{let e=n.combine(t.map(e=>e.value));c.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}}else{for(let e of t)e.type==0?(s[e.id]=c.length<<1|1,c.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[n.id]=l.length<<1,l.push(e=>aE(e,n,t))}}let d=l.map(e=>e(s));return new e(t,o,d,s,c,a)}};function hE(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(e,o){let s=i.get(e);if(s!=null){if(s<=o)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof pE&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)a(t,o);else if(e instanceof pE){if(n.has(e.compartment))throw RangeError(`Duplicate use of compartment in extensions`);let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),a(r,o)}else if(e instanceof dE)a(e.inner,e.prec);else if(e instanceof sE)r[o].push(e),e.provides&&a(e.provides,o);else if(e instanceof nE)r[o].push(e),e.facet.extensions&&a(e.facet.extensions,cE.default);else{let t=e.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${e}).`);if(t==e)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(t,o)}}return a(e,cE.default),r.reduce((e,t)=>e.concat(t))}function gE(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw Error(`Cyclic dependency between fields and/or facets`);if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function _E(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var vE=K.define(),yE=K.define({combine:e=>e.some(e=>e),static:!0}),bE=K.define({combine:e=>e.length?e[0]:void 0,static:!0}),xE=K.define(),SE=K.define(),CE=K.define(),wE=K.define({combine:e=>e.length?e[0]:!1}),TE=class{constructor(e,t){this.type=e,this.value=t}static define(){return new EE}},EE=class{of(e){return new TE(this,e)}},DE=class{constructor(e){this.map=e}of(e){return new OE(this,e)}},OE=class e{constructor(e,t){this.type=e,this.value=t}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new e(this.type,n)}is(e){return this.type==e}static define(e={}){return new DE(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}};OE.reconfigure=OE.define(),OE.appendConfig=OE.define();var kE=class e{constructor(t,n,r,i,a,o){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,r&&$T(r,n.newLength),a.some(t=>t.type==e.time)||(this.annotations=a.concat(e.time.of(Date.now())))}static create(t,n,r,i,a,o){return new e(t,n,r,i,a,o)}get newDoc(){return this._doc||=this.changes.apply(this.startState.doc)}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(e.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]==`.`))}};kE.time=TE.define(),kE.userEvent=TE.define(),kE.addToHistory=TE.define(),kE.remote=TE.define();function AE(e,t){let n=[];for(let r=0,i=0;;){let a,o;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],o=e[r++];else if(i<t.length)a=t[i++],o=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function jE(e,t,n){let r,i,a;return n?(r=t.changes,i=GT.empty(t.changes.length),a=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(r)),{changes:a,selection:t.selection?t.selection.map(i):e.selection?.map(r),effects:OE.mapEffects(e.effects,r).concat(OE.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function ME(e,t,n){let r=t.selection,i=LE(t.annotations);return t.userEvent&&(i=i.concat(kE.userEvent.of(t.userEvent))),{changes:t.changes instanceof GT?t.changes:GT.of(t.changes||[],n,e.facet(bE)),selection:r&&(r instanceof G?r:G.single(r.anchor,r.head)),effects:LE(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function NE(e,t,n){let r=ME(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let i=1;i<t.length;i++){t[i].filter===!1&&(n=!1);let a=!!t[i].sequential;r=jE(r,ME(e,t[i],a?r.changes.newLength:e.doc.length),a)}let i=kE.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return FE(n?PE(i):i)}function PE(e){let t=e.startState,n=!0;for(let r of t.facet(xE)){let t=r(e);if(t===!1){n=!1;break}Array.isArray(t)&&(n=n===!0?t:AE(n,t))}if(n!==!0){let r,i;if(n===!1)i=e.changes.invertedDesc,r=GT.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=kE.create(t,r,e.selection&&e.selection.map(i),OE.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(SE);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof kE?i:Array.isArray(i)&&i.length==1&&i[0]instanceof kE?i[0]:NE(t,LE(i),!1)}return e}function FE(e){let t=e.startState,n=t.facet(CE),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=jE(r,ME(t,a,e.changes.newLength),!0))}return r==e?e:kE.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var IE=[];function LE(e){return e==null?IE:Array.isArray(e)?e:[e]}var RE=(function(e){return e[e.Word=0]=`Word`,e[e.Space=1]=`Space`,e[e.Other=2]=`Other`,e})(RE||={}),zE=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,BE;try{BE=RegExp(`[\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{}function VE(e){if(BE)return BE.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>``&&(n.toUpperCase()!=n.toLowerCase()||zE.test(n)))return!0}return!1}function HE(e){return t=>{if(!/\S/.test(t))return RE.Space;if(VE(t))return RE.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return RE.Word;return RE.Other}}var UE=class e{constructor(e,t,n,r,i,a){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)gE(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw RangeError(`Field is not present in this state`);return}return gE(this,n),_E(this,n)}update(...e){return NE(this,e,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let e of t.effects)e.is(fE.reconfigure)?(n&&=(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),null),i.set(e.value.compartment,e.value.extension)):e.is(OE.reconfigure)?(n=null,r=e.value):e.is(OE.appendConfig)&&(n=null,r=LE(r).concat(e.value));let a;n?a=t.startState.values.slice():(n=mE.resolve(r,i,this),a=new e(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values);let o=t.startState.facet(yE)?t.newSelection:t.newSelection.asSingle();new e(n,t.newDoc,o,a,(e,n)=>n.update(e,t),t)}replaceSelection(e){return typeof e==`string`&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:G.cursor(t.from+e.length,-1)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],a=LE(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),s=this.changes(o.changes),c=s.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(c);let l=r.mapDesc(s,!0);i.push(o.range.map(l)),r=r.compose(c),a=OE.mapEffects(a,c).concat(OE.mapEffects(LE(o.effects),l))}return{changes:r,selection:G.create(i,t.mainIndex),effects:a}}changes(t=[]){return t instanceof GT?t:GT.of(t,this.doc.length,this.facet(e.lineSeparator))}toText(t){return ET.of(t.split(this.facet(e.lineSeparator)||HT))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(gE(this,t),_E(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof sE&&this.config.address[r.id]!=null&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(t,n={},r){if(!t||typeof t.doc!=`string`)throw RangeError(`Invalid JSON representation for EditorState`);let i=[];if(r){for(let e in r)if(Object.prototype.hasOwnProperty.call(t,e)){let n=r[e],a=t[e];i.push(n.init(e=>n.spec.fromJSON(a,e)))}}return e.create({doc:t.doc,selection:G.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=mE.resolve(t.extensions||[],new Map),r=t.doc instanceof ET?t.doc:ET.of((t.doc||``).split(n.staticFacet(e.lineSeparator)||HT)),i=t.selection?t.selection instanceof G?t.selection:G.single(t.selection.anchor,t.selection.head):G.single(0);return $T(i,r.length),n.staticFacet(yE)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(e.tabSize)}get lineBreak(){return this.facet(e.lineSeparator)||`
|
package/dist/client/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="icon" href="https://r2.soybeanjs.tech/soybeanjs/logo-ubean.svg?v=202608192144" type="image/svg+xml" />
|
|
7
7
|
<title>Ubean DevTools</title>
|
|
8
|
-
<script type="module" crossorigin src="/_devtools/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/_devtools/assets/index-CEsrKQJ2.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/_devtools/assets/index-Cie3Z4C0.css">
|
|
10
10
|
</head>
|
|
11
11
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ubean/devtools",
|
|
3
|
-
"version": "0.6.1-beta.
|
|
3
|
+
"version": "0.6.1-beta.3",
|
|
4
4
|
"description": "DevTools for the ubean framework — server middleware, RPC, and the iframe SPA client",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"@codemirror/view": "6.43.14",
|
|
30
30
|
"@soybeanjs/unocss-preset": "^0.2.0",
|
|
31
31
|
"@types/node": "^26.6.4",
|
|
32
|
-
"@vean/ui": "^0.50.
|
|
33
|
-
"@vean/unocss": "^0.50.
|
|
32
|
+
"@vean/ui": "^0.50.2",
|
|
33
|
+
"@vean/unocss": "^0.50.2",
|
|
34
34
|
"@vitejs/devtools": "^0.7.6",
|
|
35
35
|
"@vitejs/devtools-kit": "^0.7.6",
|
|
36
36
|
"@vitejs/plugin-vue": "^6.0.9",
|