uEdition-Editor 2.0.0b12__py3-none-any.whl → 2.0.0b14__py3-none-any.whl
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.
Potentially problematic release.
This version of uEdition-Editor might be problematic. Click here for more details.
- uedition_editor/__about__.py +1 -1
- uedition_editor/api/branches.py +2 -0
- uedition_editor/api/configs.py +5 -0
- uedition_editor/api/files.py +5 -0
- uedition_editor/cron.py +1 -1
- uedition_editor/frontend/dist/assets/{CodeMirrorEditor-BZHvgu2x.js → CodeMirrorEditor-BnesAZT6.js} +1 -1
- uedition_editor/frontend/dist/assets/{FolderEditor-CcG0Qmsw.js → FolderEditor-nIZG3t8O.js} +1 -1
- uedition_editor/frontend/dist/assets/{ImageEditor-DjhHDons.js → ImageEditor-DJZZQ8mL.js} +1 -1
- uedition_editor/frontend/dist/assets/PdfEditor-9ynBQ5aP.js +1 -0
- uedition_editor/frontend/dist/assets/{TeiEditor-BzZjSfy6.js → TeiEditor-C62CxKTn.js} +1 -1
- uedition_editor/frontend/dist/assets/index-C49506g6.js +20 -0
- uedition_editor/frontend/dist/index.html +1 -1
- {uedition_editor-2.0.0b12.dist-info → uedition_editor-2.0.0b14.dist-info}/METADATA +1 -1
- uedition_editor-2.0.0b14.dist-info/RECORD +30 -0
- uedition_editor/frontend/dist/assets/index-Cavrgnlw.js +0 -20
- uedition_editor-2.0.0b12.dist-info/RECORD +0 -29
- {uedition_editor-2.0.0b12.dist-info → uedition_editor-2.0.0b14.dist-info}/WHEEL +0 -0
- {uedition_editor-2.0.0b12.dist-info → uedition_editor-2.0.0b14.dist-info}/entry_points.txt +0 -0
- {uedition_editor-2.0.0b12.dist-info → uedition_editor-2.0.0b14.dist-info}/licenses/LICENSE.txt +0 -0
uedition_editor/__about__.py
CHANGED
uedition_editor/api/branches.py
CHANGED
|
@@ -129,6 +129,7 @@ async def merge_from_default(
|
|
|
129
129
|
current_user: Annotated[dict, Depends(get_current_user)],
|
|
130
130
|
) -> None:
|
|
131
131
|
"""Merge all changes from the default branch."""
|
|
132
|
+
branch_id = branch_id.replace("%2F", "/")
|
|
132
133
|
async with BranchContextManager(branch_id) as repo:
|
|
133
134
|
repo.checkout(repo.branches[init_settings.git.default_branch])
|
|
134
135
|
if init_settings.git.remote_name in list(repo.remotes.names()):
|
|
@@ -157,6 +158,7 @@ async def delete_branch(
|
|
|
157
158
|
local_delete: Annotated[bool, Header(alias="x-ueditor-delete-local-only")] = False, # noqa:FBT002
|
|
158
159
|
) -> None:
|
|
159
160
|
"""Delete the given branch locally and remotely."""
|
|
161
|
+
branch_id = branch_id.replace("%2F", "/")
|
|
160
162
|
async with BranchContextManager(branch_id) as repo:
|
|
161
163
|
fetch_and_pull_branch(repo, init_settings.git.remote_name, branch_id)
|
|
162
164
|
if init_settings.git.default_branch == branch_id:
|
uedition_editor/api/configs.py
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
# SPDX-License-Identifier: MIT
|
|
4
4
|
"""The uEditor API for accessing configurations."""
|
|
5
5
|
|
|
6
|
+
import logging
|
|
6
7
|
import os
|
|
7
8
|
from typing import Annotated
|
|
8
9
|
|
|
@@ -22,6 +23,7 @@ from uedition_editor.settings import (
|
|
|
22
23
|
)
|
|
23
24
|
|
|
24
25
|
router = APIRouter(prefix="/configs")
|
|
26
|
+
logger = logging.getLogger(__name__)
|
|
25
27
|
|
|
26
28
|
|
|
27
29
|
@router.get("/uedition", response_model=UEditionSettings)
|
|
@@ -30,6 +32,7 @@ async def uedition_config(
|
|
|
30
32
|
current_user: Annotated[dict, Depends(get_current_user)], # noqa:ARG001
|
|
31
33
|
) -> dict:
|
|
32
34
|
"""Fetch the uEdition configuration."""
|
|
35
|
+
branch_id = branch_id.replace("%2F", "/")
|
|
33
36
|
try:
|
|
34
37
|
async with BranchContextManager(branch_id):
|
|
35
38
|
settings = get_uedition_settings()
|
|
@@ -53,6 +56,7 @@ async def tei_config(
|
|
|
53
56
|
current_user: Annotated[dict, Depends(get_current_user)], # noqa:ARG001
|
|
54
57
|
) -> dict:
|
|
55
58
|
"""Fetch the uEditor configuration."""
|
|
59
|
+
branch_id = branch_id.replace("%2F", "/")
|
|
56
60
|
try:
|
|
57
61
|
async with BranchContextManager(branch_id):
|
|
58
62
|
return get_ueditor_settings().model_dump()
|
|
@@ -66,6 +70,7 @@ async def ui_stylesheet(
|
|
|
66
70
|
current_user: Annotated[dict, Depends(get_current_user)], # noqa:ARG001
|
|
67
71
|
) -> str:
|
|
68
72
|
"""Fetch the configured CSS stylesheets."""
|
|
73
|
+
branch_id = branch_id.replace("%2F", "/")
|
|
69
74
|
try:
|
|
70
75
|
async with BranchContextManager(branch_id):
|
|
71
76
|
tmp = []
|
uedition_editor/api/files.py
CHANGED
|
@@ -106,6 +106,7 @@ async def get_files(
|
|
|
106
106
|
current_user: Annotated[dict, Depends(get_current_user)], # noqa:ARG001
|
|
107
107
|
) -> list[dict]:
|
|
108
108
|
"""Fetch the full tree of files."""
|
|
109
|
+
branch_id = branch_id.replace("%2F", "/")
|
|
109
110
|
try:
|
|
110
111
|
async with BranchContextManager(branch_id):
|
|
111
112
|
full_path = os.path.abspath(init_settings.base_path)
|
|
@@ -349,6 +350,7 @@ async def get_file(
|
|
|
349
350
|
response: Response,
|
|
350
351
|
) -> dict | FileResponse:
|
|
351
352
|
"""Fetch a single file from the repo."""
|
|
353
|
+
branch_id = branch_id.replace("%2F", "/")
|
|
352
354
|
try:
|
|
353
355
|
async with BranchContextManager(branch_id):
|
|
354
356
|
ueditor_settings = get_ueditor_settings()
|
|
@@ -383,6 +385,7 @@ async def create_file(
|
|
|
383
385
|
rename_from: Annotated[str | None, Header(alias="X-uEditor-Rename-From")] = None,
|
|
384
386
|
) -> None:
|
|
385
387
|
"""Create a new file in the repo."""
|
|
388
|
+
branch_id = branch_id.replace("%2F", "/")
|
|
386
389
|
try:
|
|
387
390
|
if init_settings.git.protect_default_branch and init_settings.git.default_branch == branch_id:
|
|
388
391
|
raise HTTPException(
|
|
@@ -733,6 +736,7 @@ async def update_file(
|
|
|
733
736
|
current_user: Annotated[dict, Depends(get_current_user)],
|
|
734
737
|
) -> None:
|
|
735
738
|
"""Update the file in the repo."""
|
|
739
|
+
branch_id = branch_id.replace("%2F", "/")
|
|
736
740
|
try:
|
|
737
741
|
if init_settings.git.protect_default_branch and init_settings.git.default_branch == branch_id:
|
|
738
742
|
raise HTTPException(
|
|
@@ -802,6 +806,7 @@ async def delete_file(
|
|
|
802
806
|
current_user: Annotated[dict, Depends(get_current_user)],
|
|
803
807
|
) -> None:
|
|
804
808
|
"""Delete a file in the repo."""
|
|
809
|
+
branch_id = branch_id.replace("%2F", "/")
|
|
805
810
|
try:
|
|
806
811
|
if init_settings.git.protect_default_branch and init_settings.git.default_branch == branch_id:
|
|
807
812
|
raise HTTPException(
|
uedition_editor/cron.py
CHANGED
|
@@ -50,7 +50,7 @@ async def insecure_track_branches():
|
|
|
50
50
|
diff = repo.diff(merge_base, repo.revparse_single(init_settings.git.default_branch))
|
|
51
51
|
local_branches.append(
|
|
52
52
|
{
|
|
53
|
-
"id": branch_name,
|
|
53
|
+
"id": branch_name.replace("/", "%252F"),
|
|
54
54
|
"title": de_slugify(branch_name),
|
|
55
55
|
"update_from_default": diff.stats.files_changed > 0,
|
|
56
56
|
}
|
uedition_editor/frontend/dist/assets/{CodeMirrorEditor-BZHvgu2x.js → CodeMirrorEditor-BnesAZT6.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{S as af,i as hf,s as cf,J as ff,c as qn,w as uo,l as En,K as Rp,p as Ap,q as uf,v as wl,e as bi,a as df,t as Mp,b as Qt,d as pi,f as Lp,g as qp,h as Ar,j as Ep,k as Mr,m as Un,L as Nn,n as xa,M as Vp,o as Dp,u as Wp,N as ka,O as vs,P as _p,A as Of,B as pf,C as Bp,Q as jp,E as mf,R as Yp}from"./index-Cavrgnlw.js";import{k as zp,b as Ip,s as Up}from"./index-Vcq4gwWv.js";const gf=1024;let Np=0,We=class{constructor(e,t){this.from=e,this.to=t}};class L{constructor(e={}){this.id=Np++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=ae.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}L.closedBy=new L({deserialize:n=>n.split(" ")});L.openedBy=new L({deserialize:n=>n.split(" ")});L.group=new L({deserialize:n=>n.split(" ")});L.isolate=new L({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});L.contextHash=new L({perNode:!0});L.lookAhead=new L({perNode:!0});L.mounted=new L({perNode:!0});class dn{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[L.mounted.id]}}const Gp=Object.create(null);class ae{constructor(e,t,i,r=0){this.name=e,this.props=t,this.id=i,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):Gp,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new ae(e.name||"",t,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(L.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let r of i.split(" "))t[r]=e[i];return i=>{for(let r=i.prop(L.group),s=-1;s<(r?r.length:0);s++){let o=t[s<0?i.name:r[s]];if(o)return o}}}}ae.none=new ae("",Object.create(null),0,8);class Vn{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let i of this.types){let r=null;for(let s of e){let o=s(i);o&&(r||(r=Object.assign({},i.props)),r[o[0].id]=o[1])}t.push(r?new ae(i.name,r,i.id,i.flags):i)}return new Vn(t)}}const Gn=new WeakMap,wa=new WeakMap;var K;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays"})(K||(K={}));class U{constructor(e,t,i,r,s){if(this.type=e,this.children=t,this.positions=i,this.length=r,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=dn.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let i of this.children){let r=i.toString();r&&(t&&(t+=","),t+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new Lr(this.topNode,e)}cursorAt(e,t=0,i=0){let r=Gn.get(this)||this.topNode,s=new Lr(r);return s.moveTo(e,t),Gn.set(this,s._tree),s}get topNode(){return new be(this,0,0,null)}resolve(e,t=0){let i=On(Gn.get(this)||this.topNode,e,t,!1);return Gn.set(this,i),i}resolveInner(e,t=0){let i=On(wa.get(this)||this.topNode,e,t,!0);return wa.set(this,i),i}resolveStack(e,t=0){return Kp(this,e,t)}iterate(e){let{enter:t,leave:i,from:r=0,to:s=this.length}=e,o=e.mode||0,l=(o&K.IncludeAnonymous)>0;for(let a=this.cursor(o|K.IncludeAnonymous);;){let h=!1;if(a.from<=s&&a.to>=r&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;h=!0}for(;h&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:vl(ae.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,r)=>new U(this.type,t,i,r,this.propValues),e.makeTree||((t,i,r)=>new U(ae.none,t,i,r)))}static build(e){return Jp(e)}}U.empty=new U(ae.none,[],[],0);class Pl{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Pl(this.buffer,this.index)}}class Wt{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return ae.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],i=this.buffer[e+3],r=this.set.types[t],s=r.name;if(/\W/.test(s)&&!r.isError&&(s=JSON.stringify(s)),e+=4,i==e)return s;let o=[];for(;e<i;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,t,i,r,s){let{buffer:o}=this,l=-1;for(let a=e;a!=t&&!(bf(s,r,o[a+1],o[a+2])&&(l=a,i>0));a=o[a+3]);return l}slice(e,t,i){let r=this.buffer,s=new Uint16Array(t-e),o=0;for(let l=e,a=0;l<t;){s[a++]=r[l++],s[a++]=r[l++]-i;let h=s[a++]=r[l++]-i;s[a++]=r[l++]-e,o=Math.max(o,h)}return new Wt(s,o,this.set)}}function bf(n,e,t,i){switch(n){case-2:return t<e;case-1:return i>=e&&t<e;case 0:return t<e&&i>e;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function On(n,e,t,i){for(var r;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let o=!i&&n instanceof be&&n.index<0?null:n.parent;if(!o)return n;n=o}let s=i?0:K.IgnoreOverlays;if(i)for(let o=n,l=o.parent;l;o=l,l=o.parent)o instanceof be&&o.index<0&&((r=l.enter(e,t,s))===null||r===void 0?void 0:r.from)!=o.from&&(n=l);for(;;){let o=n.enter(e,t,s);if(!o)return n;n=o}}class Sf{cursor(e=0){return new Lr(this,e)}getChild(e,t=null,i=null){let r=Pa(this,e,t,i);return r.length?r[0]:null}getChildren(e,t=null,i=null){return Pa(this,e,t,i)}resolve(e,t=0){return On(this,e,t,!1)}resolveInner(e,t=0){return On(this,e,t,!0)}matchContext(e){return Oo(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),i=this;for(;t;){let r=t.lastChild;if(!r||r.to!=t.to)break;r.type.isError&&r.from==r.to?(i=t,t=r.prevSibling):t=r}return i}get node(){return this}get next(){return this.parent}}class be extends Sf{constructor(e,t,i,r){super(),this._tree=e,this.from=t,this.index=i,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,i,r,s=0){for(let o=this;;){for(let{children:l,positions:a}=o._tree,h=t>0?l.length:-1;e!=h;e+=t){let c=l[e],f=a[e]+o.from;if(bf(r,i,f,f+c.length)){if(c instanceof Wt){if(s&K.ExcludeBuffers)continue;let u=c.findChild(0,c.buffer.length,t,i-f,r);if(u>-1)return new ot(new Hp(o,c,e,f),null,u)}else if(s&K.IncludeAnonymous||!c.type.isAnonymous||$l(c)){let u;if(!(s&K.IgnoreMounts)&&(u=dn.get(c))&&!u.overlay)return new be(u.tree,f,e,o);let d=new be(c,f,e,o);return s&K.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?c.children.length-1:0,t,i,r)}}}if(s&K.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let r;if(!(i&K.IgnoreOverlays)&&(r=dn.get(this._tree))&&r.overlay){let s=e-this.from;for(let{from:o,to:l}of r.overlay)if((t>0?o<=s:o<s)&&(t<0?l>=s:l>s))return new be(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Pa(n,e,t,i){let r=n.cursor(),s=[];if(!r.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=r.type.is(t),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function Oo(n,e,t=e.length-1){for(let i=n;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class Hp{constructor(e,t,i,r){this.parent=e,this.buffer=t,this.index=i,this.start=r}}class ot extends Sf{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,i);return s<0?null:new ot(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&K.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new ot(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new ot(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new ot(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let o=i.buffer[this.index+1];e.push(i.slice(r,s,o)),t.push(0)}return new U(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Qf(n){if(!n.length)return null;let e=0,t=n[0];for(let s=1;s<n.length;s++){let o=n[s];(o.from>t.from||o.to<t.to)&&(t=o,e=s)}let i=t instanceof be&&t.index<0?null:t.parent,r=n.slice();return i?r[e]=i:r.splice(e,1),new Fp(r,t)}class Fp{constructor(e,t){this.heads=e,this.node=t}get next(){return Qf(this.heads)}}function Kp(n,e,t){let i=n.resolveInner(e,t),r=null;for(let s=i instanceof be?i:i.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(r||(r=[i])).push(o.resolve(e,t)),s=o}else{let o=dn.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let l=new be(o.tree,o.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(On(l,e,t,!1))}}return r?Qf(r):i}class Lr{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof be)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof be?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&K.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&K.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&K.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(r.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:i}=r)}else({index:t,_parent:i}=this._tree);for(;i;{index:t,_parent:i}=i)if(t>-1)for(let s=t+e,o=e<0?-1:i._tree.children.length;s!=o;s+=e){let l=i._tree.children[s];if(this.mode&K.IncludeAnonymous||l instanceof Wt||!l.type.isAnonymous||$l(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,i=0;if(e&&e.context==this.buffer)e:for(let r=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,i=s+1;break e}r=this.stack[--s]}for(let r=i;r<this.stack.length;r++)t=new ot(this.buffer,t,this.stack[r]);return this.bufferNode=new ot(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let i=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,r=!0}}}matchContext(e){if(!this.buffer)return Oo(this.node.parent,e);let{buffer:t}=this.buffer,{types:i}=t.set;for(let r=e.length-1,s=this.stack.length-1;r>=0;s--){if(s<0)return Oo(this._tree,e,r);let o=i[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function $l(n){return n.children.some(e=>e instanceof Wt||!e.type.isAnonymous||$l(e))}function Jp(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:r=gf,reused:s=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new Pl(t,t.length):t,a=i.types,h=0,c=0;function f(y,w,$,E,D,I){let{id:V,start:M,end:z,size:_}=l,N=c,fe=h;for(;_<0;)if(l.next(),_==-1){let xe=s[V];$.push(xe),E.push(M-y);return}else if(_==-3){h=V;return}else if(_==-4){c=V;return}else throw new RangeError(`Unrecognized record size: ${_}`);let ye=a[V],Ve,X,ue=M-y;if(z-M<=r&&(X=g(l.pos-w,D))){let xe=new Uint16Array(X.size-X.skip),Pe=l.pos-X.size,Re=xe.length;for(;l.pos>Pe;)Re=b(X.start,xe,Re);Ve=new Wt(xe,z-X.start,i),ue=X.start-y}else{let xe=l.pos-_;l.next();let Pe=[],Re=[],pt=V>=o?V:-1,Rt=0,It=z;for(;l.pos>xe;)pt>=0&&l.id==pt&&l.size>=0?(l.end<=It-r&&(O(Pe,Re,M,Rt,l.end,It,pt,N,fe),Rt=Pe.length,It=l.end),l.next()):I>2500?u(M,xe,Pe,Re):f(M,xe,Pe,Re,pt,I+1);if(pt>=0&&Rt>0&&Rt<Pe.length&&O(Pe,Re,M,Rt,M,It,pt,N,fe),Pe.reverse(),Re.reverse(),pt>-1&&Rt>0){let mt=d(ye,fe);Ve=vl(ye,Pe,Re,0,Pe.length,0,z-M,mt,mt)}else Ve=m(ye,Pe,Re,z-M,N-z,fe)}$.push(Ve),E.push(ue)}function u(y,w,$,E){let D=[],I=0,V=-1;for(;l.pos>w;){let{id:M,start:z,end:_,size:N}=l;if(N>4)l.next();else{if(V>-1&&z<V)break;V<0&&(V=_-r),D.push(M,z,_),I++,l.next()}}if(I){let M=new Uint16Array(I*4),z=D[D.length-2];for(let _=D.length-3,N=0;_>=0;_-=3)M[N++]=D[_],M[N++]=D[_+1]-z,M[N++]=D[_+2]-z,M[N++]=N;$.push(new Wt(M,D[2]-z,i)),E.push(z-y)}}function d(y,w){return($,E,D)=>{let I=0,V=$.length-1,M,z;if(V>=0&&(M=$[V])instanceof U){if(!V&&M.type==y&&M.length==D)return M;(z=M.prop(L.lookAhead))&&(I=E[V]+M.length+z)}return m(y,$,E,D,I,w)}}function O(y,w,$,E,D,I,V,M,z){let _=[],N=[];for(;y.length>E;)_.push(y.pop()),N.push(w.pop()+$-D);y.push(m(i.types[V],_,N,I-D,M-I,z)),w.push(D-$)}function m(y,w,$,E,D,I,V){if(I){let M=[L.contextHash,I];V=V?[M].concat(V):[M]}if(D>25){let M=[L.lookAhead,D];V=V?[M].concat(V):[M]}return new U(y,w,$,E,V)}function g(y,w){let $=l.fork(),E=0,D=0,I=0,V=$.end-r,M={size:0,start:0,skip:0};e:for(let z=$.pos-y;$.pos>z;){let _=$.size;if($.id==w&&_>=0){M.size=E,M.start=D,M.skip=I,I+=4,E+=4,$.next();continue}let N=$.pos-_;if(_<0||N<z||$.start<V)break;let fe=$.id>=o?4:0,ye=$.start;for($.next();$.pos>N;){if($.size<0)if($.size==-3)fe+=4;else break e;else $.id>=o&&(fe+=4);$.next()}D=ye,E+=_,I+=fe}return(w<0||E==y)&&(M.size=E,M.start=D,M.skip=I),M.size>4?M:void 0}function b(y,w,$){let{id:E,start:D,end:I,size:V}=l;if(l.next(),V>=0&&E<o){let M=$;if(V>4){let z=l.pos-(V-4);for(;l.pos>z;)$=b(y,w,$)}w[--$]=M,w[--$]=I-y,w[--$]=D-y,w[--$]=E}else V==-3?h=E:V==-4&&(c=E);return $}let S=[],x=[];for(;l.pos>0;)f(n.start||0,n.bufferStart||0,S,x,-1,0);let k=(e=n.length)!==null&&e!==void 0?e:S.length?x[0]+S[0].length:0;return new U(a[n.topID],S.reverse(),x.reverse(),k)}const $a=new WeakMap;function Qr(n,e){if(!n.isAnonymous||e instanceof Wt||e.type!=n)return 1;let t=$a.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof U)){t=1;break}t+=Qr(n,i)}$a.set(e,t)}return t}function vl(n,e,t,i,r,s,o,l,a){let h=0;for(let O=i;O<r;O++)h+=Qr(n,e[O]);let c=Math.ceil(h*1.5/8),f=[],u=[];function d(O,m,g,b,S){for(let x=g;x<b;){let k=x,y=m[x],w=Qr(n,O[x]);for(x++;x<b;x++){let $=Qr(n,O[x]);if(w+$>=c)break;w+=$}if(x==k+1){if(w>c){let $=O[k];d($.children,$.positions,0,$.children.length,m[k]+S);continue}f.push(O[k])}else{let $=m[x-1]+O[x-1].length-y;f.push(vl(n,O,m,k,x,y,$,null,a))}u.push(y+S-s)}}return d(e,t,i,r,0),(l||a)(f,u,o)}class yf{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof ot?this.setBuffer(e.context.buffer,e.index,t):e instanceof be&&this.map.set(e.tree,t)}get(e){return e instanceof ot?this.getBuffer(e.context.buffer,e.index):e instanceof be?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class yt{constructor(e,t,i,r,s=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=r,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let r=[new yt(0,e.length,e,0,!1,i)];for(let s of t)s.to>e.length&&r.push(s);return r}static applyChanges(e,t,i=128){if(!t.length)return e;let r=[],s=1,o=e.length?e[0]:null;for(let l=0,a=0,h=0;;l++){let c=l<t.length?t[l]:null,f=c?c.fromA:1e9;if(f-a>=i)for(;o&&o.from<f;){let u=o;if(a>=u.from||f<=u.to||h){let d=Math.max(u.from,a)-h,O=Math.min(u.to,f)-h;u=d>=O?null:new yt(d,O,u.tree,u.offset+h,l>0,!!c)}if(u&&r.push(u),o.to>f)break;o=s<e.length?e[s++]:null}if(!c)break;a=c.toA,h=c.toA-c.toB}return r}}class Cl{startParse(e,t,i){return typeof e=="string"&&(e=new em(e)),i=i?i.length?i.map(r=>new We(r.from,r.to)):[new We(0,0)]:[new We(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let r=this.startParse(e,t,i);for(;;){let s=r.advance();if(s)return s}}}class em{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function xf(n){return(e,t,i,r)=>new im(e,n,t,i,r)}class va{constructor(e,t,i,r,s){this.parser=e,this.parse=t,this.overlay=i,this.target=r,this.from=s}}function Ca(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class tm{constructor(e,t,i,r,s,o,l){this.parser=e,this.predicate=t,this.mounts=i,this.index=r,this.start=s,this.target=o,this.prev=l,this.depth=0,this.ranges=[]}}const po=new L({perNode:!0});class im{constructor(e,t,i,r,s){this.nest=t,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new U(i.type,i.children,i.positions,i.length,i.propValues.concat([[po,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[L.mounted.id]=new dn(t,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new sm(this.fragments),t=null,i=null,r=new Lr(new be(this.baseTree,this.ranges[0].from,0,null),K.IncludeAnonymous|K.IgnoreMounts);e:for(let s,o;;){let l=!0,a;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)l=!1;else if(e.hasNode(r)){if(t){let h=t.mounts.find(c=>c.frag.from<=r.from&&c.frag.to>=r.to&&c.mount.overlay);if(h)for(let c of h.mount.overlay){let f=c.from+h.pos,u=c.to+h.pos;f>=r.from&&u<=r.to&&!t.ranges.some(d=>d.from<u&&d.to>f)&&t.ranges.push({from:f,to:u})}}l=!1}else if(i&&(o=nm(i.ranges,r.from,r.to)))l=o!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.from<r.to||!s.overlay)){r.tree||rm(r);let h=e.findMounts(r.from,s.parser);if(typeof s.overlay=="function")t=new tm(s.parser,s.overlay,h,this.inner.length,r.from,r.tree,t);else{let c=Xa(this.ranges,s.overlay||(r.from<r.to?[new We(r.from,r.to)]:[]));c.length&&Ca(c),(c.length||!s.overlay)&&this.inner.push(new va(s.parser,c.length?s.parser.startParse(this.input,Ra(h,c),c):s.parser.startParse(""),s.overlay?s.overlay.map(f=>new We(f.from-r.from,f.to-r.from)):null,r.tree,c.length?c[0].from:r.from)),s.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):l=!1}}else if(t&&(a=t.predicate(r))&&(a===!0&&(a=new We(r.from,r.to)),a.from<a.to)){let h=t.ranges.length-1;h>=0&&t.ranges[h].to==a.from?t.ranges[h]={from:t.ranges[h].from,to:a.to}:t.ranges.push(a)}if(l&&r.firstChild())t&&t.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(t&&!--t.depth){let h=Xa(this.ranges,t.ranges);h.length&&(Ca(h),this.inner.splice(t.index,0,new va(t.parser,t.parser.startParse(this.input,Ra(t.mounts,h),h),t.ranges.map(c=>new We(c.from-t.start,c.to-t.start)),t.target,h[0].from))),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function nm(n,e,t){for(let i of n){if(i.from>=t)break;if(i.to>e)return i.from<=e&&i.to>=t?2:1}return 0}function Za(n,e,t,i,r,s){if(e<t){let o=n.buffer[e+1];i.push(n.slice(e,t,o)),r.push(o-s)}}function rm(n){let{node:e}=n,t=[],i=e.context.buffer;do t.push(n.index),n.parent();while(!n.tree);let r=n.tree,s=r.children.indexOf(i),o=r.children[s],l=o.buffer,a=[s];function h(c,f,u,d,O,m){let g=t[m],b=[],S=[];Za(o,c,g,b,S,d);let x=l[g+1],k=l[g+2];a.push(b.length);let y=m?h(g+4,l[g+3],o.set.types[l[g]],x,k-x,m-1):e.toTree();return b.push(y),S.push(x-d),Za(o,l[g+3],f,b,S,d),new U(u,b,S,O)}r.children[s]=h(0,l.length,ae.none,0,o.length,t.length-1);for(let c of a){let f=n.tree.children[c],u=n.tree.positions[c];n.yield(new be(f,u+n.from,c,n._tree))}}class Ta{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(K.IncludeAnonymous|K.IgnoreMounts)}moveTo(e){let{cursor:t}=this,i=e-this.offset;for(;!this.done&&t.from<i;)t.to>=e&&t.enter(i,1,K.IgnoreOverlays|K.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof U)t=t.children[0];else break}return!1}}let sm=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(t=i.tree.prop(po))!==null&&t!==void 0?t:i.to,this.inner=new Ta(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(po))!==null&&e!==void 0?e:t.to,this.inner=new Ta(t.tree,-t.offset)}}findMounts(e,t){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(i=s.tree)===null||i===void 0?void 0:i.prop(L.mounted);if(o&&o.parser==t)for(let l=this.fragI;l<this.fragments.length;l++){let a=this.fragments[l];if(a.from>=s.to)break;a.tree==this.curFrag.tree&&r.push({frag:a,pos:s.from-a.offset,mount:o})}}}return r}};function Xa(n,e){let t=null,i=e;for(let r=1,s=0;r<n.length;r++){let o=n[r-1].to,l=n[r].from;for(;s<i.length;s++){let a=i[s];if(a.from>=l)break;a.to<=o||(t||(i=t=e.slice()),a.from<o?(t[s]=new We(a.from,o),a.to>l&&t.splice(s+1,0,new We(l,a.to))):a.to>l?t[s--]=new We(l,a.to):t.splice(s--,1))}}return i}function om(n,e,t,i){let r=0,s=0,o=!1,l=!1,a=-1e9,h=[];for(;;){let c=r==n.length?1e9:o?n[r].to:n[r].from,f=s==e.length?1e9:l?e[s].to:e[s].from;if(o!=l){let u=Math.max(a,t),d=Math.min(c,f,i);u<d&&h.push(new We(u,d))}if(a=Math.min(c,f),a==1e9)break;c==a&&(o?(o=!1,r++):o=!0),f==a&&(l?(l=!1,s++):l=!0)}return h}function Ra(n,e){let t=[];for(let{pos:i,mount:r,frag:s}of n){let o=i+(r.overlay?r.overlay[0].from:0),l=o+r.tree.length,a=Math.max(s.from,o),h=Math.min(s.to,l);if(r.overlay){let c=r.overlay.map(u=>new We(u.from+i,u.to+i)),f=om(e,c,a,h);for(let u=0,d=a;;u++){let O=u==f.length,m=O?h:f[u].from;if(m>d&&t.push(new yt(d,m,r.tree,-o,s.from>=d||s.openStart,s.to<=m||s.openEnd)),O)break;d=f[u].to}}else t.push(new yt(a,h,r.tree,-o,s.from>=o||s.openStart,s.to<=l||s.openEnd))}return t}let mo=[],kf=[];(()=>{let n="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,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?kf:mo).push(t=t+n[e])})();function lm(n){if(n<768)return!1;for(let e=0,t=mo.length;;){let i=e+t>>1;if(n<mo[i])t=i;else if(n>=kf[i])e=i+1;else return!0;if(e==t)return!1}}function Aa(n){return n>=127462&&n<=127487}const Ma=8205;function am(n,e,t=!0,i=!0){return(t?wf:hm)(n,e,i)}function wf(n,e,t){if(e==n.length)return e;e&&Pf(n.charCodeAt(e))&&$f(n.charCodeAt(e-1))&&e--;let i=Cs(n,e);for(e+=La(i);e<n.length;){let r=Cs(n,e);if(i==Ma||r==Ma||t&&lm(r))e+=La(r),i=r;else if(Aa(r)){let s=0,o=e-2;for(;o>=0&&Aa(Cs(n,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function hm(n,e,t){for(;e>0;){let i=wf(n,e-2,t);if(i<e)return i;e--}return 0}function Cs(n,e){let t=n.charCodeAt(e);if(!$f(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Pf(i)?(t-55296<<10)+(i-56320)+65536:t}function Pf(n){return n>=56320&&n<57344}function $f(n){return n>=55296&&n<56320}function La(n){return n<65536?1:2}class Y{lineAt(e){if(e<0||e>this.length)throw new 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 new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=$i(this,e,t);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),nt.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=$i(this,e,t);let i=[];return this.decompose(e,t,i,0),nt.from(i,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),i=this.length-this.scanIdentical(e,-1),r=new sn(this),s=new sn(e);for(let o=t,l=t;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(l+=r.value.length,r.done||l>=i)return!0}}iter(e=1){return new sn(this,e)}iterRange(e,t=this.length){return new vf(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Cf(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Y.empty:e.length<=32?new ne(e):nt.from(ne.split(e,[]))}}class ne extends Y{constructor(e,t=cm(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let s=0;;s++){let o=this.text[s],l=r+o.length;if((t?i:l)>=e)return new fm(r,l,i,o);r=l+1,i++}}decompose(e,t,i,r){let s=e<=0&&t>=this.length?this:new ne(qa(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let o=i.pop(),l=yr(s.text,o.text.slice(),0,s.length);if(l.length<=32)i.push(new ne(l,o.length+s.length));else{let a=l.length>>1;i.push(new ne(l.slice(0,a)),new ne(l.slice(a)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof ne))return super.replace(e,t,i);[e,t]=$i(this,e,t);let r=yr(this.text,yr(i.text,qa(this.text,0,e)),t),s=this.length+i.length-(t-e);return r.length<=32?new ne(r,s):nt.from(ne.split(r,[]),s)}sliceString(e,t=this.length,i=`
|
|
1
|
+
import{S as af,i as hf,s as cf,J as ff,c as qn,w as uo,l as En,K as Rp,p as Ap,q as uf,v as wl,e as bi,a as df,t as Mp,b as Qt,d as pi,f as Lp,g as qp,h as Ar,j as Ep,k as Mr,m as Un,L as Nn,n as xa,M as Vp,o as Dp,u as Wp,N as ka,O as vs,P as _p,A as Of,B as pf,C as Bp,Q as jp,E as mf,R as Yp}from"./index-C49506g6.js";import{k as zp,b as Ip,s as Up}from"./index-Vcq4gwWv.js";const gf=1024;let Np=0,We=class{constructor(e,t){this.from=e,this.to=t}};class L{constructor(e={}){this.id=Np++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=ae.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}L.closedBy=new L({deserialize:n=>n.split(" ")});L.openedBy=new L({deserialize:n=>n.split(" ")});L.group=new L({deserialize:n=>n.split(" ")});L.isolate=new L({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});L.contextHash=new L({perNode:!0});L.lookAhead=new L({perNode:!0});L.mounted=new L({perNode:!0});class dn{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[L.mounted.id]}}const Gp=Object.create(null);class ae{constructor(e,t,i,r=0){this.name=e,this.props=t,this.id=i,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):Gp,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new ae(e.name||"",t,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(L.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let r of i.split(" "))t[r]=e[i];return i=>{for(let r=i.prop(L.group),s=-1;s<(r?r.length:0);s++){let o=t[s<0?i.name:r[s]];if(o)return o}}}}ae.none=new ae("",Object.create(null),0,8);class Vn{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let i of this.types){let r=null;for(let s of e){let o=s(i);o&&(r||(r=Object.assign({},i.props)),r[o[0].id]=o[1])}t.push(r?new ae(i.name,r,i.id,i.flags):i)}return new Vn(t)}}const Gn=new WeakMap,wa=new WeakMap;var K;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays"})(K||(K={}));class U{constructor(e,t,i,r,s){if(this.type=e,this.children=t,this.positions=i,this.length=r,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=dn.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let i of this.children){let r=i.toString();r&&(t&&(t+=","),t+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new Lr(this.topNode,e)}cursorAt(e,t=0,i=0){let r=Gn.get(this)||this.topNode,s=new Lr(r);return s.moveTo(e,t),Gn.set(this,s._tree),s}get topNode(){return new be(this,0,0,null)}resolve(e,t=0){let i=On(Gn.get(this)||this.topNode,e,t,!1);return Gn.set(this,i),i}resolveInner(e,t=0){let i=On(wa.get(this)||this.topNode,e,t,!0);return wa.set(this,i),i}resolveStack(e,t=0){return Kp(this,e,t)}iterate(e){let{enter:t,leave:i,from:r=0,to:s=this.length}=e,o=e.mode||0,l=(o&K.IncludeAnonymous)>0;for(let a=this.cursor(o|K.IncludeAnonymous);;){let h=!1;if(a.from<=s&&a.to>=r&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;h=!0}for(;h&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:vl(ae.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,r)=>new U(this.type,t,i,r,this.propValues),e.makeTree||((t,i,r)=>new U(ae.none,t,i,r)))}static build(e){return Jp(e)}}U.empty=new U(ae.none,[],[],0);class Pl{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Pl(this.buffer,this.index)}}class Wt{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return ae.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],i=this.buffer[e+3],r=this.set.types[t],s=r.name;if(/\W/.test(s)&&!r.isError&&(s=JSON.stringify(s)),e+=4,i==e)return s;let o=[];for(;e<i;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,t,i,r,s){let{buffer:o}=this,l=-1;for(let a=e;a!=t&&!(bf(s,r,o[a+1],o[a+2])&&(l=a,i>0));a=o[a+3]);return l}slice(e,t,i){let r=this.buffer,s=new Uint16Array(t-e),o=0;for(let l=e,a=0;l<t;){s[a++]=r[l++],s[a++]=r[l++]-i;let h=s[a++]=r[l++]-i;s[a++]=r[l++]-e,o=Math.max(o,h)}return new Wt(s,o,this.set)}}function bf(n,e,t,i){switch(n){case-2:return t<e;case-1:return i>=e&&t<e;case 0:return t<e&&i>e;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function On(n,e,t,i){for(var r;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let o=!i&&n instanceof be&&n.index<0?null:n.parent;if(!o)return n;n=o}let s=i?0:K.IgnoreOverlays;if(i)for(let o=n,l=o.parent;l;o=l,l=o.parent)o instanceof be&&o.index<0&&((r=l.enter(e,t,s))===null||r===void 0?void 0:r.from)!=o.from&&(n=l);for(;;){let o=n.enter(e,t,s);if(!o)return n;n=o}}class Sf{cursor(e=0){return new Lr(this,e)}getChild(e,t=null,i=null){let r=Pa(this,e,t,i);return r.length?r[0]:null}getChildren(e,t=null,i=null){return Pa(this,e,t,i)}resolve(e,t=0){return On(this,e,t,!1)}resolveInner(e,t=0){return On(this,e,t,!0)}matchContext(e){return Oo(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),i=this;for(;t;){let r=t.lastChild;if(!r||r.to!=t.to)break;r.type.isError&&r.from==r.to?(i=t,t=r.prevSibling):t=r}return i}get node(){return this}get next(){return this.parent}}class be extends Sf{constructor(e,t,i,r){super(),this._tree=e,this.from=t,this.index=i,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,i,r,s=0){for(let o=this;;){for(let{children:l,positions:a}=o._tree,h=t>0?l.length:-1;e!=h;e+=t){let c=l[e],f=a[e]+o.from;if(bf(r,i,f,f+c.length)){if(c instanceof Wt){if(s&K.ExcludeBuffers)continue;let u=c.findChild(0,c.buffer.length,t,i-f,r);if(u>-1)return new ot(new Hp(o,c,e,f),null,u)}else if(s&K.IncludeAnonymous||!c.type.isAnonymous||$l(c)){let u;if(!(s&K.IgnoreMounts)&&(u=dn.get(c))&&!u.overlay)return new be(u.tree,f,e,o);let d=new be(c,f,e,o);return s&K.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?c.children.length-1:0,t,i,r)}}}if(s&K.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let r;if(!(i&K.IgnoreOverlays)&&(r=dn.get(this._tree))&&r.overlay){let s=e-this.from;for(let{from:o,to:l}of r.overlay)if((t>0?o<=s:o<s)&&(t<0?l>=s:l>s))return new be(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Pa(n,e,t,i){let r=n.cursor(),s=[];if(!r.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=r.type.is(t),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function Oo(n,e,t=e.length-1){for(let i=n;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class Hp{constructor(e,t,i,r){this.parent=e,this.buffer=t,this.index=i,this.start=r}}class ot extends Sf{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,i);return s<0?null:new ot(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&K.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new ot(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new ot(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new ot(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let o=i.buffer[this.index+1];e.push(i.slice(r,s,o)),t.push(0)}return new U(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Qf(n){if(!n.length)return null;let e=0,t=n[0];for(let s=1;s<n.length;s++){let o=n[s];(o.from>t.from||o.to<t.to)&&(t=o,e=s)}let i=t instanceof be&&t.index<0?null:t.parent,r=n.slice();return i?r[e]=i:r.splice(e,1),new Fp(r,t)}class Fp{constructor(e,t){this.heads=e,this.node=t}get next(){return Qf(this.heads)}}function Kp(n,e,t){let i=n.resolveInner(e,t),r=null;for(let s=i instanceof be?i:i.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(r||(r=[i])).push(o.resolve(e,t)),s=o}else{let o=dn.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let l=new be(o.tree,o.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(On(l,e,t,!1))}}return r?Qf(r):i}class Lr{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof be)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof be?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&K.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&K.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&K.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(r.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:i}=r)}else({index:t,_parent:i}=this._tree);for(;i;{index:t,_parent:i}=i)if(t>-1)for(let s=t+e,o=e<0?-1:i._tree.children.length;s!=o;s+=e){let l=i._tree.children[s];if(this.mode&K.IncludeAnonymous||l instanceof Wt||!l.type.isAnonymous||$l(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,i=0;if(e&&e.context==this.buffer)e:for(let r=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,i=s+1;break e}r=this.stack[--s]}for(let r=i;r<this.stack.length;r++)t=new ot(this.buffer,t,this.stack[r]);return this.bufferNode=new ot(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let i=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,r=!0}}}matchContext(e){if(!this.buffer)return Oo(this.node.parent,e);let{buffer:t}=this.buffer,{types:i}=t.set;for(let r=e.length-1,s=this.stack.length-1;r>=0;s--){if(s<0)return Oo(this._tree,e,r);let o=i[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function $l(n){return n.children.some(e=>e instanceof Wt||!e.type.isAnonymous||$l(e))}function Jp(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:r=gf,reused:s=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new Pl(t,t.length):t,a=i.types,h=0,c=0;function f(y,w,$,E,D,I){let{id:V,start:M,end:z,size:_}=l,N=c,fe=h;for(;_<0;)if(l.next(),_==-1){let xe=s[V];$.push(xe),E.push(M-y);return}else if(_==-3){h=V;return}else if(_==-4){c=V;return}else throw new RangeError(`Unrecognized record size: ${_}`);let ye=a[V],Ve,X,ue=M-y;if(z-M<=r&&(X=g(l.pos-w,D))){let xe=new Uint16Array(X.size-X.skip),Pe=l.pos-X.size,Re=xe.length;for(;l.pos>Pe;)Re=b(X.start,xe,Re);Ve=new Wt(xe,z-X.start,i),ue=X.start-y}else{let xe=l.pos-_;l.next();let Pe=[],Re=[],pt=V>=o?V:-1,Rt=0,It=z;for(;l.pos>xe;)pt>=0&&l.id==pt&&l.size>=0?(l.end<=It-r&&(O(Pe,Re,M,Rt,l.end,It,pt,N,fe),Rt=Pe.length,It=l.end),l.next()):I>2500?u(M,xe,Pe,Re):f(M,xe,Pe,Re,pt,I+1);if(pt>=0&&Rt>0&&Rt<Pe.length&&O(Pe,Re,M,Rt,M,It,pt,N,fe),Pe.reverse(),Re.reverse(),pt>-1&&Rt>0){let mt=d(ye,fe);Ve=vl(ye,Pe,Re,0,Pe.length,0,z-M,mt,mt)}else Ve=m(ye,Pe,Re,z-M,N-z,fe)}$.push(Ve),E.push(ue)}function u(y,w,$,E){let D=[],I=0,V=-1;for(;l.pos>w;){let{id:M,start:z,end:_,size:N}=l;if(N>4)l.next();else{if(V>-1&&z<V)break;V<0&&(V=_-r),D.push(M,z,_),I++,l.next()}}if(I){let M=new Uint16Array(I*4),z=D[D.length-2];for(let _=D.length-3,N=0;_>=0;_-=3)M[N++]=D[_],M[N++]=D[_+1]-z,M[N++]=D[_+2]-z,M[N++]=N;$.push(new Wt(M,D[2]-z,i)),E.push(z-y)}}function d(y,w){return($,E,D)=>{let I=0,V=$.length-1,M,z;if(V>=0&&(M=$[V])instanceof U){if(!V&&M.type==y&&M.length==D)return M;(z=M.prop(L.lookAhead))&&(I=E[V]+M.length+z)}return m(y,$,E,D,I,w)}}function O(y,w,$,E,D,I,V,M,z){let _=[],N=[];for(;y.length>E;)_.push(y.pop()),N.push(w.pop()+$-D);y.push(m(i.types[V],_,N,I-D,M-I,z)),w.push(D-$)}function m(y,w,$,E,D,I,V){if(I){let M=[L.contextHash,I];V=V?[M].concat(V):[M]}if(D>25){let M=[L.lookAhead,D];V=V?[M].concat(V):[M]}return new U(y,w,$,E,V)}function g(y,w){let $=l.fork(),E=0,D=0,I=0,V=$.end-r,M={size:0,start:0,skip:0};e:for(let z=$.pos-y;$.pos>z;){let _=$.size;if($.id==w&&_>=0){M.size=E,M.start=D,M.skip=I,I+=4,E+=4,$.next();continue}let N=$.pos-_;if(_<0||N<z||$.start<V)break;let fe=$.id>=o?4:0,ye=$.start;for($.next();$.pos>N;){if($.size<0)if($.size==-3)fe+=4;else break e;else $.id>=o&&(fe+=4);$.next()}D=ye,E+=_,I+=fe}return(w<0||E==y)&&(M.size=E,M.start=D,M.skip=I),M.size>4?M:void 0}function b(y,w,$){let{id:E,start:D,end:I,size:V}=l;if(l.next(),V>=0&&E<o){let M=$;if(V>4){let z=l.pos-(V-4);for(;l.pos>z;)$=b(y,w,$)}w[--$]=M,w[--$]=I-y,w[--$]=D-y,w[--$]=E}else V==-3?h=E:V==-4&&(c=E);return $}let S=[],x=[];for(;l.pos>0;)f(n.start||0,n.bufferStart||0,S,x,-1,0);let k=(e=n.length)!==null&&e!==void 0?e:S.length?x[0]+S[0].length:0;return new U(a[n.topID],S.reverse(),x.reverse(),k)}const $a=new WeakMap;function Qr(n,e){if(!n.isAnonymous||e instanceof Wt||e.type!=n)return 1;let t=$a.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof U)){t=1;break}t+=Qr(n,i)}$a.set(e,t)}return t}function vl(n,e,t,i,r,s,o,l,a){let h=0;for(let O=i;O<r;O++)h+=Qr(n,e[O]);let c=Math.ceil(h*1.5/8),f=[],u=[];function d(O,m,g,b,S){for(let x=g;x<b;){let k=x,y=m[x],w=Qr(n,O[x]);for(x++;x<b;x++){let $=Qr(n,O[x]);if(w+$>=c)break;w+=$}if(x==k+1){if(w>c){let $=O[k];d($.children,$.positions,0,$.children.length,m[k]+S);continue}f.push(O[k])}else{let $=m[x-1]+O[x-1].length-y;f.push(vl(n,O,m,k,x,y,$,null,a))}u.push(y+S-s)}}return d(e,t,i,r,0),(l||a)(f,u,o)}class yf{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof ot?this.setBuffer(e.context.buffer,e.index,t):e instanceof be&&this.map.set(e.tree,t)}get(e){return e instanceof ot?this.getBuffer(e.context.buffer,e.index):e instanceof be?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class yt{constructor(e,t,i,r,s=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=r,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let r=[new yt(0,e.length,e,0,!1,i)];for(let s of t)s.to>e.length&&r.push(s);return r}static applyChanges(e,t,i=128){if(!t.length)return e;let r=[],s=1,o=e.length?e[0]:null;for(let l=0,a=0,h=0;;l++){let c=l<t.length?t[l]:null,f=c?c.fromA:1e9;if(f-a>=i)for(;o&&o.from<f;){let u=o;if(a>=u.from||f<=u.to||h){let d=Math.max(u.from,a)-h,O=Math.min(u.to,f)-h;u=d>=O?null:new yt(d,O,u.tree,u.offset+h,l>0,!!c)}if(u&&r.push(u),o.to>f)break;o=s<e.length?e[s++]:null}if(!c)break;a=c.toA,h=c.toA-c.toB}return r}}class Cl{startParse(e,t,i){return typeof e=="string"&&(e=new em(e)),i=i?i.length?i.map(r=>new We(r.from,r.to)):[new We(0,0)]:[new We(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let r=this.startParse(e,t,i);for(;;){let s=r.advance();if(s)return s}}}class em{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function xf(n){return(e,t,i,r)=>new im(e,n,t,i,r)}class va{constructor(e,t,i,r,s){this.parser=e,this.parse=t,this.overlay=i,this.target=r,this.from=s}}function Ca(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class tm{constructor(e,t,i,r,s,o,l){this.parser=e,this.predicate=t,this.mounts=i,this.index=r,this.start=s,this.target=o,this.prev=l,this.depth=0,this.ranges=[]}}const po=new L({perNode:!0});class im{constructor(e,t,i,r,s){this.nest=t,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new U(i.type,i.children,i.positions,i.length,i.propValues.concat([[po,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[L.mounted.id]=new dn(t,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new sm(this.fragments),t=null,i=null,r=new Lr(new be(this.baseTree,this.ranges[0].from,0,null),K.IncludeAnonymous|K.IgnoreMounts);e:for(let s,o;;){let l=!0,a;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)l=!1;else if(e.hasNode(r)){if(t){let h=t.mounts.find(c=>c.frag.from<=r.from&&c.frag.to>=r.to&&c.mount.overlay);if(h)for(let c of h.mount.overlay){let f=c.from+h.pos,u=c.to+h.pos;f>=r.from&&u<=r.to&&!t.ranges.some(d=>d.from<u&&d.to>f)&&t.ranges.push({from:f,to:u})}}l=!1}else if(i&&(o=nm(i.ranges,r.from,r.to)))l=o!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.from<r.to||!s.overlay)){r.tree||rm(r);let h=e.findMounts(r.from,s.parser);if(typeof s.overlay=="function")t=new tm(s.parser,s.overlay,h,this.inner.length,r.from,r.tree,t);else{let c=Xa(this.ranges,s.overlay||(r.from<r.to?[new We(r.from,r.to)]:[]));c.length&&Ca(c),(c.length||!s.overlay)&&this.inner.push(new va(s.parser,c.length?s.parser.startParse(this.input,Ra(h,c),c):s.parser.startParse(""),s.overlay?s.overlay.map(f=>new We(f.from-r.from,f.to-r.from)):null,r.tree,c.length?c[0].from:r.from)),s.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):l=!1}}else if(t&&(a=t.predicate(r))&&(a===!0&&(a=new We(r.from,r.to)),a.from<a.to)){let h=t.ranges.length-1;h>=0&&t.ranges[h].to==a.from?t.ranges[h]={from:t.ranges[h].from,to:a.to}:t.ranges.push(a)}if(l&&r.firstChild())t&&t.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(t&&!--t.depth){let h=Xa(this.ranges,t.ranges);h.length&&(Ca(h),this.inner.splice(t.index,0,new va(t.parser,t.parser.startParse(this.input,Ra(t.mounts,h),h),t.ranges.map(c=>new We(c.from-t.start,c.to-t.start)),t.target,h[0].from))),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function nm(n,e,t){for(let i of n){if(i.from>=t)break;if(i.to>e)return i.from<=e&&i.to>=t?2:1}return 0}function Za(n,e,t,i,r,s){if(e<t){let o=n.buffer[e+1];i.push(n.slice(e,t,o)),r.push(o-s)}}function rm(n){let{node:e}=n,t=[],i=e.context.buffer;do t.push(n.index),n.parent();while(!n.tree);let r=n.tree,s=r.children.indexOf(i),o=r.children[s],l=o.buffer,a=[s];function h(c,f,u,d,O,m){let g=t[m],b=[],S=[];Za(o,c,g,b,S,d);let x=l[g+1],k=l[g+2];a.push(b.length);let y=m?h(g+4,l[g+3],o.set.types[l[g]],x,k-x,m-1):e.toTree();return b.push(y),S.push(x-d),Za(o,l[g+3],f,b,S,d),new U(u,b,S,O)}r.children[s]=h(0,l.length,ae.none,0,o.length,t.length-1);for(let c of a){let f=n.tree.children[c],u=n.tree.positions[c];n.yield(new be(f,u+n.from,c,n._tree))}}class Ta{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(K.IncludeAnonymous|K.IgnoreMounts)}moveTo(e){let{cursor:t}=this,i=e-this.offset;for(;!this.done&&t.from<i;)t.to>=e&&t.enter(i,1,K.IgnoreOverlays|K.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof U)t=t.children[0];else break}return!1}}let sm=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(t=i.tree.prop(po))!==null&&t!==void 0?t:i.to,this.inner=new Ta(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(po))!==null&&e!==void 0?e:t.to,this.inner=new Ta(t.tree,-t.offset)}}findMounts(e,t){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(i=s.tree)===null||i===void 0?void 0:i.prop(L.mounted);if(o&&o.parser==t)for(let l=this.fragI;l<this.fragments.length;l++){let a=this.fragments[l];if(a.from>=s.to)break;a.tree==this.curFrag.tree&&r.push({frag:a,pos:s.from-a.offset,mount:o})}}}return r}};function Xa(n,e){let t=null,i=e;for(let r=1,s=0;r<n.length;r++){let o=n[r-1].to,l=n[r].from;for(;s<i.length;s++){let a=i[s];if(a.from>=l)break;a.to<=o||(t||(i=t=e.slice()),a.from<o?(t[s]=new We(a.from,o),a.to>l&&t.splice(s+1,0,new We(l,a.to))):a.to>l?t[s--]=new We(l,a.to):t.splice(s--,1))}}return i}function om(n,e,t,i){let r=0,s=0,o=!1,l=!1,a=-1e9,h=[];for(;;){let c=r==n.length?1e9:o?n[r].to:n[r].from,f=s==e.length?1e9:l?e[s].to:e[s].from;if(o!=l){let u=Math.max(a,t),d=Math.min(c,f,i);u<d&&h.push(new We(u,d))}if(a=Math.min(c,f),a==1e9)break;c==a&&(o?(o=!1,r++):o=!0),f==a&&(l?(l=!1,s++):l=!0)}return h}function Ra(n,e){let t=[];for(let{pos:i,mount:r,frag:s}of n){let o=i+(r.overlay?r.overlay[0].from:0),l=o+r.tree.length,a=Math.max(s.from,o),h=Math.min(s.to,l);if(r.overlay){let c=r.overlay.map(u=>new We(u.from+i,u.to+i)),f=om(e,c,a,h);for(let u=0,d=a;;u++){let O=u==f.length,m=O?h:f[u].from;if(m>d&&t.push(new yt(d,m,r.tree,-o,s.from>=d||s.openStart,s.to<=m||s.openEnd)),O)break;d=f[u].to}}else t.push(new yt(a,h,r.tree,-o,s.from>=o||s.openStart,s.to<=l||s.openEnd))}return t}let mo=[],kf=[];(()=>{let n="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,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?kf:mo).push(t=t+n[e])})();function lm(n){if(n<768)return!1;for(let e=0,t=mo.length;;){let i=e+t>>1;if(n<mo[i])t=i;else if(n>=kf[i])e=i+1;else return!0;if(e==t)return!1}}function Aa(n){return n>=127462&&n<=127487}const Ma=8205;function am(n,e,t=!0,i=!0){return(t?wf:hm)(n,e,i)}function wf(n,e,t){if(e==n.length)return e;e&&Pf(n.charCodeAt(e))&&$f(n.charCodeAt(e-1))&&e--;let i=Cs(n,e);for(e+=La(i);e<n.length;){let r=Cs(n,e);if(i==Ma||r==Ma||t&&lm(r))e+=La(r),i=r;else if(Aa(r)){let s=0,o=e-2;for(;o>=0&&Aa(Cs(n,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function hm(n,e,t){for(;e>0;){let i=wf(n,e-2,t);if(i<e)return i;e--}return 0}function Cs(n,e){let t=n.charCodeAt(e);if(!$f(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Pf(i)?(t-55296<<10)+(i-56320)+65536:t}function Pf(n){return n>=56320&&n<57344}function $f(n){return n>=55296&&n<56320}function La(n){return n<65536?1:2}class Y{lineAt(e){if(e<0||e>this.length)throw new 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 new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=$i(this,e,t);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),nt.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=$i(this,e,t);let i=[];return this.decompose(e,t,i,0),nt.from(i,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),i=this.length-this.scanIdentical(e,-1),r=new sn(this),s=new sn(e);for(let o=t,l=t;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(l+=r.value.length,r.done||l>=i)return!0}}iter(e=1){return new sn(this,e)}iterRange(e,t=this.length){return new vf(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Cf(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Y.empty:e.length<=32?new ne(e):nt.from(ne.split(e,[]))}}class ne extends Y{constructor(e,t=cm(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let s=0;;s++){let o=this.text[s],l=r+o.length;if((t?i:l)>=e)return new fm(r,l,i,o);r=l+1,i++}}decompose(e,t,i,r){let s=e<=0&&t>=this.length?this:new ne(qa(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let o=i.pop(),l=yr(s.text,o.text.slice(),0,s.length);if(l.length<=32)i.push(new ne(l,o.length+s.length));else{let a=l.length>>1;i.push(new ne(l.slice(0,a)),new ne(l.slice(a)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof ne))return super.replace(e,t,i);[e,t]=$i(this,e,t);let r=yr(this.text,yr(i.text,qa(this.text,0,e)),t),s=this.length+i.length-(t-e);return r.length<=32?new ne(r,s):nt.from(ne.split(r,[]),s)}sliceString(e,t=this.length,i=`
|
|
2
2
|
`){[e,t]=$i(this,e,t);let r="";for(let s=0,o=0;s<=t&&o<this.text.length;o++){let l=this.text[o],a=s+l.length;s>e&&o&&(r+=i),e<a&&t>s&&(r+=l.slice(Math.max(0,e-s),t-s)),s=a+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(t.push(new ne(i,r)),i=[],r=-1);return r>-1&&t.push(new ne(i,r)),t}}class nt extends Y{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,r){for(let s=0;;s++){let o=this.children[s],l=r+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,r);r=l+1,i=a+1}}decompose(e,t,i,r){for(let s=0,o=0;o<=t&&s<this.children.length;s++){let l=this.children[s],a=o+l.length;if(e<=a&&t>=o){let h=r&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!h?i.push(l):l.decompose(e-o,t-o,i,h)}o=a+1}}replace(e,t,i){if([e,t]=$i(this,e,t),i.lines<this.lines)for(let r=0,s=0;r<this.children.length;r++){let o=this.children[r],l=s+o.length;if(e>=s&&t<=l){let a=o.replace(e-s,t-s,i),h=this.lines-o.lines+a.lines;if(a.lines<h>>4&&a.lines>h>>6){let c=this.children.slice();return c[r]=a,new nt(c,this.length-(t-e)+i.length)}return super.replace(s,l,a)}s=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
|
|
3
3
|
`){[e,t]=$i(this,e,t);let r="";for(let s=0,o=0;s<this.children.length&&o<=t;s++){let l=this.children[s],a=o+l.length;o>e&&s&&(r+=i),e<a&&t>o&&(r+=l.sliceString(e-o,t-o,i)),o=a+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof nt))return 0;let i=0,[r,s,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,s+=t){if(r==o||s==l)return i;let a=this.children[r],h=e.children[s];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let O of e)O.flatten(d);return new ne(d,t)}let r=Math.max(32,i>>5),s=r<<1,o=r>>1,l=[],a=0,h=-1,c=[];function f(d){let O;if(d.lines>s&&d instanceof nt)for(let m of d.children)f(m);else d.lines>o&&(a>o||!a)?(u(),l.push(d)):d instanceof ne&&a&&(O=c[c.length-1])instanceof ne&&d.lines+O.lines<=32?(a+=d.lines,h+=d.length+1,c[c.length-1]=new ne(O.text.concat(d.text),O.length+1+d.length)):(a+d.lines>r&&u(),a+=d.lines,h+=d.length+1,c.push(d))}function u(){a!=0&&(l.push(c.length==1?c[0]:nt.from(c,h)),h=-1,a=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new nt(l,t)}}Y.empty=new ne([""],0);function cm(n){let e=-1;for(let t of n)e+=t.length+1;return e}function yr(n,e,t=0,i=1e9){for(let r=0,s=0,o=!0;s<n.length&&r<=i;s++){let l=n[s],a=r+l.length;a>=t&&(a>i&&(l=l.slice(0,i-r)),r<t&&(l=l.slice(t-r)),o?(e[e.length-1]+=l,o=!1):e.push(l)),r=a+1}return e}function qa(n,e,t){return yr(n,[""],e,t)}class sn{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 ne?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],o=s>>1,l=r instanceof ne?r.text.length:r.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
4
4
|
`,this;e--}else if(r instanceof ne){let a=r.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=r.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof ne?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class vf{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new sn(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}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 i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=i?r:t<0?r.slice(r.length-i):r.slice(0,i),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!=""}}class Cf{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Y.prototype[Symbol.iterator]=function(){return this.iter()},sn.prototype[Symbol.iterator]=vf.prototype[Symbol.iterator]=Cf.prototype[Symbol.iterator]=function(){return this});let fm=class{constructor(e,t,i,r){this.from=e,this.to=t,this.number=i,this.text=r}get length(){return this.to-this.from}};function $i(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function pe(n,e,t=!0,i=!0){return am(n,e,t,i)}function um(n){return n>=56320&&n<57344}function dm(n){return n>=55296&&n<56320}function ve(n,e){let t=n.charCodeAt(e);if(!dm(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return um(i)?(t-55296<<10)+(i-56320)+65536:t}function Zl(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function rt(n){return n<65536?1:2}const go=/\r\n?|\n/;var Oe=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(Oe||(Oe={}));class ht{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 i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,r=0;t<this.sections.length;){let s=this.sections[t++],o=this.sections[t++];o<0?(e(i,r,s),r+=s):r+=o,i+=s}}iterChangedRanges(e,t=!1){bo(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];r<0?e.push(i,r):e.push(r,i)}return new ht(e)}composeDesc(e){return this.empty?e:e.empty?this:Zf(this,e)}mapDesc(e,t=!1){return e.empty?this:So(this,e,t)}mapPos(e,t=-1,i=Oe.Simple){let r=0,s=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],h=r+l;if(a<0){if(h>e)return s+(e-r);s+=l}else{if(i!=Oe.Simple&&h>=e&&(i==Oe.TrackDel&&r<e&&h>e||i==Oe.TrackBefore&&r<e||i==Oe.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!l)return e==r||t<0?s:s+a;s+=a}r=h}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,t=e){for(let i=0,r=0;i<this.sections.length&&r<=t;){let s=this.sections[i++],o=this.sections[i++],l=r+s;if(o>=0&&r<=t&&l>=e)return r<e&&l>t?"cover":!0;r=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+i+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ht(e)}static create(e){return new ht(e)}}class le extends ht{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return bo(this,(t,i,r,s,o)=>e=e.replace(r,r+(i-t),o),!1),e}mapDesc(e,t=!1){return So(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let r=0,s=0;r<t.length;r+=2){let o=t[r],l=t[r+1];if(l>=0){t[r]=l,t[r+1]=o;let a=r>>1;for(;i.length<a;)i.push(Y.empty);i.push(o?e.slice(s,s+o):Y.empty)}s+=o}return new le(t,i)}compose(e){return this.empty?e:e.empty?this:Zf(this,e,!0)}map(e,t=!1){return e.empty?this:So(this,e,t,!0)}iterChanges(e,t=!1){bo(this,e,t)}get desc(){return ht.create(this.sections)}filter(e){let t=[],i=[],r=[],s=new pn(this);e:for(let o=0,l=0;;){let a=o==e.length?1e9:e[o++];for(;l<a||l==a&&s.len==0;){if(s.done)break e;let c=Math.min(s.len,a-l);me(r,c,-1);let f=s.ins==-1?-1:s.off==0?s.ins:0;me(t,c,f),f>0&&qt(i,t,s.text),s.forward(c),l+=c}let h=e[o++];for(;l<h;){if(s.done)break e;let c=Math.min(s.len,h-l);me(t,c,-1),me(r,c,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(c),l+=c}}return{changes:new le(t,i),filtered:ht.create(r)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],r=this.sections[t+1];r<0?e.push(i):r==0?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let r=[],s=[],o=0,l=null;function a(c=!1){if(!c&&!r.length)return;o<t&&me(r,t-o,-1);let f=new le(r,s);l=l?l.compose(f.map(l)):f,r=[],s=[],o=0}function h(c){if(Array.isArray(c))for(let f of c)h(f);else if(c instanceof le){if(c.length!=t)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${t})`);a(),l=l?l.compose(c.map(l)):c}else{let{from:f,to:u=f,insert:d}=c;if(f>u||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let O=d?typeof d=="string"?Y.of(d.split(i||go)):d:Y.empty,m=O.length;if(f==u&&m==0)return;f<o&&a(),f>o&&me(r,f-o,-1),me(r,u-f,m),qt(s,r,O),o=u}}return h(e),a(!l),l}static empty(e){return new le(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let r=0;r<e.length;r++){let s=e[r];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;i.length<r;)i.push(Y.empty);i[r]=Y.of(s.slice(1)),t.push(s[0],i[r].length)}}}return new le(t,i)}static createSet(e,t){return new le(e,t)}}function me(n,e,t,i=!1){if(e==0&&t<=0)return;let r=n.length-2;r>=0&&t<=0&&t==n[r+1]?n[r]+=e:r>=0&&e==0&&n[r]==0?n[r+1]+=t:i?(n[r]+=e,n[r+1]+=t):n.push(e,t)}function qt(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<i;)n.push(Y.empty);n.push(t)}}function bo(n,e,t){let i=n.inserted;for(let r=0,s=0,o=0;o<n.sections.length;){let l=n.sections[o++],a=n.sections[o++];if(a<0)r+=l,s+=l;else{let h=r,c=s,f=Y.empty;for(;h+=l,c+=a,a&&i&&(f=f.append(i[o-2>>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],a=n.sections[o++];e(r,h,s,c,f),r=h,s=c}}}function So(n,e,t,i=!1){let r=[],s=i?[]:null,o=new pn(n),l=new pn(e);for(let a=-1;;){if(o.done&&l.len||l.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);me(r,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!t))){let h=l.len;for(me(r,l.ins,-1);h;){let c=Math.min(o.len,h);o.ins>=0&&a<o.i&&o.len<=c&&(me(r,0,o.ins),s&&qt(s,r,o.text),a=o.i),o.forward(c),h-=c}l.next()}else if(o.ins>=0){let h=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);h+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.len<c)c-=l.len,l.next();else break;me(r,h,a<o.i?o.ins:0),s&&a<o.i&&qt(s,r,o.text),a=o.i,o.forward(o.len-c)}else{if(o.done&&l.done)return s?le.createSet(r,s):ht.create(r);throw new Error("Mismatched change set lengths")}}}function Zf(n,e,t=!1){let i=[],r=t?[]:null,s=new pn(n),o=new pn(e);for(let l=!1;;){if(s.done&&o.done)return r?le.createSet(i,r):ht.create(i);if(s.ins==0)me(i,s.len,0,l),s.next();else if(o.len==0&&!o.done)me(i,0,o.ins,l),r&&qt(r,i,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let a=Math.min(s.len2,o.len),h=i.length;if(s.ins==-1){let c=o.ins==-1?-1:o.off?0:o.ins;me(i,a,c,l),r&&c&&qt(r,i,o.text)}else o.ins==-1?(me(i,s.off?0:s.len,a,l),r&&qt(r,i,s.textBit(a))):(me(i,s.off?0:s.len,o.off?0:o.ins,l),r&&!o.off&&qt(r,i,o.text));l=(s.ins>a||o.ins>=0&&o.len>a)&&(l||i.length>h),s.forward2(a),o.forward(a)}}}}class pn{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?Y.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?Y.empty:t[i].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)}}class Kt{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}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 bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new Kt(i,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return Q.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return Q.range(this.anchor,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!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 new RangeError("Invalid JSON representation for SelectionRange");return Q.range(e.anchor,e.head)}static create(e,t,i){return new Kt(e,t,i)}}class Q{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:Q.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Q([this.main],0)}addRange(e,t=!0){return Q.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,Q.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Q(e.ranges.map(t=>Kt.fromJSON(t)),e.main)}static single(e,t=e){return new Q([Q.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;r<e.length;r++){let s=e[r];if(s.empty?s.from<=i:s.from<i)return Q.normalized(e.slice(),t);i=s.to}return new Q(e,t)}static cursor(e,t=0,i,r){return Kt.create(e,e,(t==0?0:t<0?8:16)|(i==null?7:Math.min(6,i))|(r??16777215)<<6)}static range(e,t,i,r){let s=(i??16777215)<<6|(r==null?7:Math.min(6,r));return t<e?Kt.create(t,e,48|s):Kt.create(e,t,(t>e?8:0)|s)}static normalized(e,t=0){let i=e[t];e.sort((r,s)=>r.from-s.from),t=e.indexOf(i);for(let r=1;r<e.length;r++){let s=e[r],o=e[r-1];if(s.empty?s.from<=o.to:s.from<o.to){let l=o.from,a=Math.max(s.to,o.to);r<=t&&t--,e.splice(--r,2,s.anchor>s.head?Q.range(a,l):Q.range(l,a))}}return new Q(e,t)}}function Tf(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Tl=0;class Z{constructor(e,t,i,r,s){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=r,this.id=Tl++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Z(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Xl),!!e.static,e.enables)}of(e){return new xr([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new xr(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new xr(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function Xl(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class xr{constructor(e,t,i,r){this.dependencies=e,this.facet=t,this.type=i,this.value=r,this.id=Tl++}dynamicSlot(e){var t;let i=this.value,r=this.facet.compareInput,s=this.id,o=e[s]>>1,l=this.type==2,a=!1,h=!1,c=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?h=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(a&&u.docChanged||h&&(u.docChanged||u.selection)||Qo(f,c)){let d=i(f);if(l?!Ea(d,f.values[o],r):!r(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,u)=>{let d,O=u.config.address[s];if(O!=null){let m=Er(u,O);if(this.dependencies.every(g=>g instanceof Z?u.facet(g)===f.facet(g):g instanceof ce?u.field(g,!1)==f.field(g,!1):!0)||(l?Ea(d=i(f),m,r):r(d=i(f),m)))return f.values[o]=m,0}else d=i(f);return f.values[o]=d,1}}}}function Ea(n,e,t){if(n.length!=e.length)return!1;for(let i=0;i<n.length;i++)if(!t(n[i],e[i]))return!1;return!0}function Qo(n,e){let t=!1;for(let i of e)on(n,i)&1&&(t=!0);return t}function Om(n,e,t){let i=t.map(a=>n[a.id]),r=t.map(a=>a.type),s=i.filter(a=>!(a&1)),o=n[e.id]>>1;function l(a){let h=[];for(let c=0;c<i.length;c++){let f=Er(a,i[c]);if(r[c]==2)for(let u of f)h.push(u);else h.push(f)}return e.combine(h)}return{create(a){for(let h of i)on(a,h);return a.values[o]=l(a),1},update(a,h){if(!Qo(a,s))return 0;let c=l(a);return e.compare(c,a.values[o])?0:(a.values[o]=c,1)},reconfigure(a,h){let c=Qo(a,i),f=h.config.facets[e.id],u=h.facet(e);if(f&&!c&&Xl(t,f))return a.values[o]=u,0;let d=l(a);return e.compare(d,u)?(a.values[o]=u,0):(a.values[o]=d,1)}}}const Va=Z.define({static:!0});class ce{constructor(e,t,i,r,s){this.id=e,this.createF=t,this.updateF=i,this.compareF=r,this.spec=s,this.provides=void 0}static define(e){let t=new ce(Tl++,e.create,e.update,e.compare||((i,r)=>i===r),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Va).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,r)=>{let s=i.values[t],o=this.updateF(s,r);return this.compareF(s,o)?0:(i.values[t]=o,1)},reconfigure:(i,r)=>r.config.address[this.id]!=null?(i.values[t]=r.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,Va.of({field:this,create:e})]}get extension(){return this}}const Gt={lowest:4,low:3,default:2,high:1,highest:0};function ji(n){return e=>new Xf(e,n)}const Zt={highest:ji(Gt.highest),high:ji(Gt.high),default:ji(Gt.default),low:ji(Gt.low),lowest:ji(Gt.lowest)};class Xf{constructor(e,t){this.inner=e,this.prec=t}}class ds{of(e){return new yo(this,e)}reconfigure(e){return ds.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class yo{constructor(e,t){this.compartment=e,this.inner=t}}class qr{constructor(e,t,i,r,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,i){let r=[],s=Object.create(null),o=new Map;for(let u of pm(e,t,o))u instanceof ce?r.push(u):(s[u.facet.id]||(s[u.facet.id]=[])).push(u);let l=Object.create(null),a=[],h=[];for(let u of r)l[u.id]=h.length<<1,h.push(d=>u.slot(d));let c=i==null?void 0:i.config.facets;for(let u in s){let d=s[u],O=d[0].facet,m=c&&c[u]||[];if(d.every(g=>g.type==0))if(l[O.id]=a.length<<1|1,Xl(m,d))a.push(i.facet(O));else{let g=O.combine(d.map(b=>b.value));a.push(i&&O.compare(g,i.facet(O))?i.facet(O):g)}else{for(let g of d)g.type==0?(l[g.id]=a.length<<1|1,a.push(g.value)):(l[g.id]=h.length<<1,h.push(b=>g.dynamicSlot(b)));l[O.id]=h.length<<1,h.push(g=>Om(g,O,d))}}let f=h.map(u=>u(l));return new qr(e,o,f,l,a,s)}}function pm(n,e,t){let i=[[],[],[],[],[]],r=new Map;function s(o,l){let a=r.get(o);if(a!=null){if(a<=l)return;let h=i[a].indexOf(o);h>-1&&i[a].splice(h,1),o instanceof yo&&t.delete(o.compartment)}if(r.set(o,l),Array.isArray(o))for(let h of o)s(h,l);else if(o instanceof yo){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),s(h,l)}else if(o instanceof Xf)s(o.inner,o.prec);else if(o instanceof ce)i[l].push(o),o.provides&&s(o.provides,l);else if(o instanceof xr)i[l].push(o),o.facet.extensions&&s(o.facet.extensions,Gt.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(h,l)}}return s(n,Gt.default),i.reduce((o,l)=>o.concat(l))}function on(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let r=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|r}function Er(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const Rf=Z.define(),xo=Z.define({combine:n=>n.some(e=>e),static:!0}),Af=Z.define({combine:n=>n.length?n[0]:void 0,static:!0}),Mf=Z.define(),Lf=Z.define(),qf=Z.define(),Ef=Z.define({combine:n=>n.length?n[0]:!1});class Tt{constructor(e,t){this.type=e,this.value=t}static define(){return new mm}}class mm{of(e){return new Tt(this,e)}}class gm{constructor(e){this.map=e}of(e){return new q(this,e)}}class q{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new q(this.type,t)}is(e){return this.type==e}static define(e={}){return new gm(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(t);s&&i.push(s)}return i}}q.reconfigure=q.define();q.appendConfig=q.define();class oe{constructor(e,t,i,r,s,o){this.startState=e,this.changes=t,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,i&&Tf(i,t.newLength),s.some(l=>l.type==oe.time)||(this.annotations=s.concat(oe.time.of(Date.now())))}static create(e,t,i,r,s,o){return new oe(e,t,i,r,s,o)}get newDoc(){return this._doc||(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(e){let t=this.annotation(oe.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}oe.time=Tt.define();oe.userEvent=Tt.define();oe.addToHistory=Tt.define();oe.remote=Tt.define();function bm(n,e){let t=[];for(let i=0,r=0;;){let s,o;if(i<n.length&&(r==e.length||e[r]>=n[i]))s=n[i++],o=n[i++];else if(r<e.length)s=e[r++],o=e[r++];else return t;!t.length||t[t.length-1]<s?t.push(s,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function Vf(n,e,t){var i;let r,s,o;return t?(r=e.changes,s=le.empty(e.changes.length),o=n.changes.compose(e.changes)):(r=e.changes.map(n.changes),s=n.changes.mapDesc(e.changes,!0),o=n.changes.compose(r)),{changes:o,selection:e.selection?e.selection.map(s):(i=n.selection)===null||i===void 0?void 0:i.map(r),effects:q.mapEffects(n.effects,r).concat(q.mapEffects(e.effects,s)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function ko(n,e,t){let i=e.selection,r=Si(e.annotations);return e.userEvent&&(r=r.concat(oe.userEvent.of(e.userEvent))),{changes:e.changes instanceof le?e.changes:le.of(e.changes||[],t,n.facet(Af)),selection:i&&(i instanceof Q?i:Q.single(i.anchor,i.head)),effects:Si(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}function Df(n,e,t){let i=ko(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let o=!!e[s].sequential;i=Vf(i,ko(n,e[s],o?i.changes.newLength:n.doc.length),o)}let r=oe.create(n,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return Qm(t?Sm(r):r)}function Sm(n){let e=n.startState,t=!0;for(let r of e.facet(Mf)){let s=r(n);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:bm(t,s))}if(t!==!0){let r,s;if(t===!1)s=n.changes.invertedDesc,r=le.empty(e.doc.length);else{let o=n.changes.filter(t);r=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}n=oe.create(e,r,n.selection&&n.selection.map(s),q.mapEffects(n.effects,s),n.annotations,n.scrollIntoView)}let i=e.facet(Lf);for(let r=i.length-1;r>=0;r--){let s=i[r](n);s instanceof oe?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof oe?n=s[0]:n=Df(e,Si(s),!1)}return n}function Qm(n){let e=n.startState,t=e.facet(qf),i=n;for(let r=t.length-1;r>=0;r--){let s=t[r](n);s&&Object.keys(s).length&&(i=Vf(i,ko(e,s,n.changes.newLength),!0))}return i==n?n:oe.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const ym=[];function Si(n){return n==null?ym:Array.isArray(n)?n:[n]}var ie=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(ie||(ie={}));const xm=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let wo;try{wo=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function km(n){if(wo)return wo.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||xm.test(t)))return!0}return!1}function wm(n){return e=>{if(!/\S/.test(e))return ie.Space;if(km(e))return ie.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return ie.Word;return ie.Other}}class W{constructor(e,t,i,r,s,o){this.config=e,this.doc=t,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)on(this,l<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(i==null){if(t)throw new RangeError("Field is not present in this state");return}return on(this,i),Er(this,i)}update(...e){return Df(this,e,!0)}applyTransaction(e){let t=this.config,{base:i,compartments:r}=t;for(let l of e.effects)l.is(ds.reconfigure)?(t&&(r=new Map,t.compartments.forEach((a,h)=>r.set(h,a)),t=null),r.set(l.value.compartment,l.value.extension)):l.is(q.reconfigure)?(t=null,i=l.value):l.is(q.appendConfig)&&(t=null,i=Si(i).concat(l.value));let s;t?s=e.startState.values.slice():(t=qr.resolve(i,r,this),s=new W(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,h)=>h.reconfigure(a,this),null).values);let o=e.startState.facet(xo)?e.newSelection:e.newSelection.asSingle();new W(t,e.newDoc,o,s,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:Q.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),r=this.changes(i.changes),s=[i.range],o=Si(i.effects);for(let l=1;l<t.ranges.length;l++){let a=e(t.ranges[l]),h=this.changes(a.changes),c=h.map(r);for(let u=0;u<l;u++)s[u]=s[u].map(c);let f=r.mapDesc(h,!0);s.push(a.range.map(f)),r=r.compose(c),o=q.mapEffects(o,c).concat(q.mapEffects(Si(a.effects),f))}return{changes:r,selection:Q.create(s,t.mainIndex),effects:o}}changes(e=[]){return e instanceof le?e:le.of(e,this.doc.length,this.facet(W.lineSeparator))}toText(e){return Y.of(e.split(this.facet(W.lineSeparator)||go))}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:(on(this,t),Er(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let r=e[i];r instanceof ce&&this.config.address[r.id]!=null&&(t[i]=r.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(i){for(let s in i)if(Object.prototype.hasOwnProperty.call(e,s)){let o=i[s],l=e[s];r.push(o.init(a=>o.spec.fromJSON(l,a)))}}return W.create({doc:e.doc,selection:Q.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=qr.resolve(e.extensions||[],new Map),i=e.doc instanceof Y?e.doc:Y.of((e.doc||"").split(t.staticFacet(W.lineSeparator)||go)),r=e.selection?e.selection instanceof Q?e.selection:Q.single(e.selection.anchor,e.selection.head):Q.single(0);return Tf(r,i.length),t.staticFacet(xo)||(r=r.asSingle()),new W(t,i,r,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(W.tabSize)}get lineBreak(){return this.facet(W.lineSeparator)||`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as Q,i as V,s as W,e as h,t as z,a as E,b as w,c as O,d as r,f as X,g as N,h as v,j as J,k as F,l as R,m as U,n as G,u as Y,o as Z,p as tt,q as et,r as A,D as L,v as nt,w as q,I as S,x as lt,y as at,z as st,A as B,B as I,C as T,E as x,F as K,G as ot,H as rt}from"./index-
|
|
1
|
+
import{S as Q,i as V,s as W,e as h,t as z,a as E,b as w,c as O,d as r,f as X,g as N,h as v,j as J,k as F,l as R,m as U,n as G,u as Y,o as Z,p as tt,q as et,r as A,D as L,v as nt,w as q,I as S,x as lt,y as at,z as st,A as B,B as I,C as T,E as x,F as K,G as ot,H as rt}from"./index-C49506g6.js";function it(o){let t;return{c(){t=h("div"),t.textContent="This branch is protected and no changes can be made.",w(t,"class","flex-1 relative px-2 py-1 text-gray-700")},m(n,i){O(n,t,i)},p:q,i:q,o:q,d(n){n&&R(t)}}}function ut(o){var M;let t,n,i,d,_,u,e,l,m,g,c,p,s,k,a,C,$,D,y;i=new S({props:{path:lt,class:"w4 h-4"}}),l=new S({props:{path:at,class:"w4 h-4"}}),s=new S({props:{path:st,class:"w4 h-4"}});let f=((M=o[1])==null?void 0:M.fullpath)&&H(o);return{c(){t=h("div"),n=h("button"),B(i.$$.fragment),d=E(),_=h("span"),_.textContent="Create a new Folder",u=E(),e=h("button"),B(l.$$.fragment),m=E(),g=h("span"),g.textContent="Create a new File",c=E(),p=h("button"),B(s.$$.fragment),k=E(),a=h("span"),a.textContent="Upload Files",C=E(),f&&f.c(),w(n,"data-button",""),w(e,"data-button",""),w(p,"data-button",""),w(t,"class","flex flex-col w-60 space-y-2")},m(b,P){O(b,t,P),r(t,n),I(i,n,null),r(n,d),r(n,_),r(t,u),r(t,e),I(l,e,null),r(e,m),r(e,g),r(t,c),r(t,p),I(s,p,null),r(p,k),r(p,a),r(t,C),f&&f.m(t,null),$=!0,D||(y=[T(n,"click",o[6]),T(e,"click",o[7]),T(p,"click",o[8])],D=!0)},p(b,P){var j;(j=b[1])!=null&&j.fullpath?f?P&2&&F(f,1):(f=H(b),f.c(),F(f,1),f.m(t,null)):f&&(N(),v(f,1,1,()=>{f=null}),J())},i(b){$||(F(i.$$.fragment,b),F(l.$$.fragment,b),F(s.$$.fragment,b),F(f),$=!0)},o(b){v(i.$$.fragment,b),v(l.$$.fragment,b),v(s.$$.fragment,b),v(f),$=!1},d(b){b&&R(t),x(i),x(l),x(s),f&&f.d(),D=!1,K(y)}}}function H(o){let t,n,i,d,_,u,e,l,m,g,c,p;return n=new S({props:{path:ot,class:"w-4 h-4"}}),e=new S({props:{path:rt,class:"w-4 h-4"}}),{c(){t=h("button"),B(n.$$.fragment),i=E(),d=h("span"),d.textContent="Rename",_=E(),u=h("button"),B(e.$$.fragment),l=E(),m=h("span"),m.textContent="Delete this Folder",w(t,"data-button",""),w(u,"data-button","")},m(s,k){O(s,t,k),I(n,t,null),r(t,i),r(t,d),O(s,_,k),O(s,u,k),I(e,u,null),r(u,l),r(u,m),g=!0,c||(p=[T(t,"click",o[9]),T(u,"click",o[10])],c=!0)},i(s){g||(F(n.$$.fragment,s),F(e.$$.fragment,s),g=!0)},o(s){v(n.$$.fragment,s),v(e.$$.fragment,s),g=!1},d(s){s&&(R(t),R(_),R(u)),x(n),x(e),c=!1,K(p)}}}function ct(o){var s,k;let t,n,i,d=((s=o[1])!=null&&s.fullpath?(k=o[1])==null?void 0:k.fullpath:"/")+"",_,u,e,l,m;const g=[ut,it],c=[];function p(a,C){var $,D,y;return!(($=a[2].data)!=null&&$.git.protect_default_branch)||((D=a[2].data)==null?void 0:D.git.default_branch)!==((y=a[3])==null?void 0:y.id)?0:1}return e=p(o),l=c[e]=g[e](o),{c(){t=h("div"),n=h("h2"),i=z("Actions for the directory "),_=z(d),u=E(),l.c(),w(n,"class","sr-only"),w(t,"class","flex-1 px-2 py-2"),w(t,"tabindex","-1")},m(a,C){O(a,t,C),r(t,n),r(n,i),r(n,_),r(t,u),c[e].m(t,null),o[11](t),m=!0},p(a,[C]){var D,y;(!m||C&2)&&d!==(d=((D=a[1])!=null&&D.fullpath?(y=a[1])==null?void 0:y.fullpath:"/")+"")&&X(_,d);let $=e;e=p(a),e===$?c[e].p(a,C):(N(),v(c[$],1,1,()=>{c[$]=null}),J(),l=c[e],l?l.p(a,C):(l=c[e]=g[e](a),l.c()),F(l,1),l.m(t,null))},i(a){m||(F(l),m=!0)},o(a){v(l),m=!1},d(a){a&&R(t),c[e].d(),o[11](null)}}}function ft(o,t,n){let i,d,_;U(o,G,a=>n(1,i=a));const u=Y();U(o,u,a=>n(2,d=a));const e=Z();U(o,e,a=>n(3,_=a));let l=null;tt(()=>{l&&l.focus()}),et(G.subscribe(()=>{l&&l.focus()}));const m=()=>{A.set(L.FOLDER_CREATE)},g=()=>{A.set(L.FILE_CREATE)},c=()=>{A.set(L.FILE_UPLOAD)},p=()=>{A.set(L.FOLDER_RENAME)},s=()=>{A.set(L.FOLDER_DELETE)};function k(a){nt[a?"unshift":"push"](()=>{l=a,n(0,l)})}return[l,i,d,_,u,e,m,g,c,p,s,k]}class dt extends Q{constructor(t){super(),V(this,t,ft,ct,W,{})}}export{dt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as _,i as h,s as b,e as m,b as a,c as p,w as c,l as d,m as u,n as g,o as v,bq as o}from"./index-
|
|
1
|
+
import{S as _,i as h,s as b,e as m,b as a,c as p,w as c,l as d,m as u,n as g,o as v,bq as o}from"./index-C49506g6.js";function f(n){let r,e;return{c(){r=m("img"),o(r.src,e="/api/branches/"+n[0].id+"/files/"+n[1].fullpath)||a(r,"src",e),a(r,"alt","")},m(s,l){p(s,r,l)},p(s,l){l&3&&!o(r.src,e="/api/branches/"+s[0].id+"/files/"+s[1].fullpath)&&a(r,"src",e)},d(s){s&&d(r)}}}function q(n){let r,e=n[0]!==null&&n[1]&&f(n);return{c(){r=m("div"),e&&e.c(),a(r,"class","overflow-auto")},m(s,l){p(s,r,l),e&&e.m(r,null)},p(s,[l]){s[0]!==null&&s[1]?e?e.p(s,l):(e=f(s),e.c(),e.m(r,null)):e&&(e.d(1),e=null)},i:c,o:c,d(s){s&&d(r),e&&e.d()}}}function B(n,r,e){let s,l;u(n,g,i=>e(1,l=i));const t=v();return u(n,t,i=>e(0,s=i)),[s,l,t]}class w extends _{constructor(r){super(),h(this,r,B,q,b,{})}}export{w as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as _,i as h,s as b,e as p,b as a,c as m,w as u,l as d,m as c,n as v,o as w,bq as f}from"./index-C49506g6.js";function o(s){let r,e;return{c(){r=p("iframe"),f(r.src,e="/api/branches/"+s[0].id+"/files/"+s[1].fullpath)||a(r,"src",e),a(r,"title","Test"),a(r,"class","w-full h-full")},m(l,n){m(l,r,n)},p(l,n){n&3&&!f(r.src,e="/api/branches/"+l[0].id+"/files/"+l[1].fullpath)&&a(r,"src",e)},d(l){l&&d(r)}}}function q(s){let r,e=s[0]!==null&&s[1]&&o(s);return{c(){r=p("div"),e&&e.c(),a(r,"class","overflow-auto w-full")},m(l,n){m(l,r,n),e&&e.m(r,null)},p(l,[n]){l[0]!==null&&l[1]?e?e.p(l,n):(e=o(l),e.c(),e.m(r,null)):e&&(e.d(1),e=null)},i:u,o:u,d(l){l&&d(r),e&&e.d()}}}function B(s,r,e){let l,n;c(s,v,t=>e(1,n=t));const i=w();return c(s,i,t=>e(0,l=t)),[l,n,i]}class C extends _{constructor(r){super(),h(this,r,B,q,b,{})}}export{C as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{T as Ge,U as jc,V as ql,W as Jc,X as Ke,Y as lt,Z as Cs,_ as Vt,$ as Si,a0 as St,a1 as Ci,a2 as pr,a3 as $i,a4 as Kc,a5 as $c,a6 as Uc,a7 as Mn,a8 as Hc,a9 as Gc,aa as mr,ab as an,ac as Y,ad as Ms,ae as lr,af as ar,ag as Yc,ah as ws,ai as Xc,aj as Zc,ak as jl,al as Jl,am as Kl,an as Ts,ao as Tn,ap as Qc,aq as eu,ar as tu,as as nu,at as ru,au as iu,av as su,aw as An,ax as ou,ay as lu,az as au,aA as Mi,aB as cr,aC as cu,aD as uu,aE as Es,aF as fu,aG as Ui,aH as Hi,aI as Dr,aJ as Gi,aK as pn,aL as du,S as qe,i as je,s as Ae,aM as ge,aN as be,aO as ye,aP as ke,k,h as S,m as oe,J as de,c as N,g as re,j as ie,l as A,aQ as ve,aR as xr,aS as se,aT as vt,aU as mt,v as Re,e as B,aV as le,aW as Je,C as te,aX as Ve,F as ft,aY as $l,aZ as Yi,a_ as Ul,a$ as Os,w as ne,t as he,f as Ie,b0 as hu,b1 as fe,b2 as it,a as K,b as J,d as R,A as V,B as L,E as W,I as we,b3 as pu,b4 as vr,K as Xi,b5 as mu,b6 as Sn,b7 as et,b8 as Zi,b9 as Qi,ba as es,bb as gu,bc as Hl,bd as bu,p as yu,be as xt,bf as gr,bg as br,bh as ku,P as wi,bi as _u,Q as Ti,bj as Su,bk as Cu,bl as Mu,bm as wu,bn as Tu,bo as Eu,bp as Ou,L as Yn,n as Ns,o as Nu,u as Au,O as tn,N as As,q as Du,R as xu}from"./index-Cavrgnlw.js";import{k as vu,b as Iu}from"./index-Vcq4gwWv.js";function Qr(r){return Array.from(r.querySelectorAll('[role="option"]:not([data-disabled])')).filter(e=>Ge(e))}function Pu(r){return window.getComputedStyle(r).getPropertyValue("direction")}function Ru(r){return e=>{const t=e.target,n=jc(r);if(!n||!ql(t))return!1;const i=n.id;return!!(Jc(t)&&i===t.htmlFor||t.closest(`label[for="${i}"]`))}}function Bu(){return{elements:{root:Ke("label",{action:e=>({destroy:lt(e,"mousedown",n=>{!n.defaultPrevented&&n.detail>1&&n.preventDefault()})})})}}}const zu=[Y.ARROW_LEFT,Y.ESCAPE,Y.ARROW_RIGHT,Y.SHIFT,Y.CAPS_LOCK,Y.CONTROL,Y.ALT,Y.META,Y.ENTER,Y.F1,Y.F2,Y.F3,Y.F4,Y.F5,Y.F6,Y.F7,Y.F8,Y.F9,Y.F10,Y.F11,Y.F12],Fu={positioning:{placement:"bottom",sameWidth:!0},scrollAlignment:"nearest",loop:!0,defaultOpen:!1,closeOnOutsideClick:!0,preventScroll:!0,closeOnEscape:!0,forceVisible:!1,portal:void 0,builder:"listbox",disabled:!1,required:!1,name:void 0,typeahead:!0,highlightOnHover:!0,onOutsideClick:void 0},Vu=["trigger","menu","label"];function Lu(r){const e={...Fu,...r},t=Cs(Vt(null)),n=Cs(Vt(null)),i=e.selected??Vt(e.defaultSelected),s=Si(i,e==null?void 0:e.onSelectedChange),o=St(n,P=>P?I(P):void 0),a=e.open??Vt(e.defaultOpen),l=Si(a,e==null?void 0:e.onOpenChange),c=Ci({...pr(e,"open","defaultOpen","builder","ids"),multiple:e.multiple??!1}),{scrollAlignment:u,loop:f,closeOnOutsideClick:d,closeOnEscape:p,preventScroll:h,portal:m,forceVisible:g,positioning:b,multiple:y,arrowSize:C,disabled:w,required:_,typeahead:T,name:j,highlightOnHover:v,onOutsideClick:D}=c,{name:M,selector:x}=$i(e.builder),U=Ci({...Kc(Vu),...e.ids}),{handleTypeaheadSearch:Q}=$c({onMatch:P=>{n.set(P),P.scrollIntoView({block:u.get()})},getCurrentItem(){return n.get()}});function I(P){const $=P.getAttribute("data-value"),ae=P.getAttribute("data-label"),He=P.hasAttribute("data-disabled");return{value:$&&JSON.parse($),label:ae??P.textContent??void 0,disabled:!!He}}const G=P=>{s.update($=>{if(y.get()){const He=Array.isArray($)?[...$]:[];return cu(P,He,(en,ue)=>Mn(en.value,ue.value))}return P})};function O(P){const $=I(P);G($)}async function pe(){l.set(!0);const P=document.getElementById(U.trigger.get());if(!P)return;P!==t.get()&&t.set(P),await lr();const $=document.getElementById(U.menu.get());if(!Ge($))return;const ae=$.querySelector("[aria-selected=true]");Ge(ae)&&n.set(ae)}function Ue(){l.set(!1),n.set(null)}const $n=Uc({open:l,forceVisible:g,activeTrigger:t}),Un=St([s],([P])=>$=>Array.isArray(P)?P.some(ae=>Mn(ae.value,$)):Hc($)?Mn(P==null?void 0:P.value,Gc($,void 0)):Mn(P==null?void 0:P.value,$)),Ur=St([o],([P])=>$=>Mn(P==null?void 0:P.value,$)),Hr=Ke(M("trigger"),{stores:[l,n,w,U.menu,U.trigger,U.label],returned:([P,$,ae,He,en,ue])=>({"aria-activedescendant":$==null?void 0:$.id,"aria-autocomplete":"list","aria-controls":He,"aria-expanded":P,"aria-labelledby":ue,id:en,role:"combobox",disabled:mr(ae),type:e.builder==="select"?"button":void 0}),action:P=>{const $=Mi(P),ae=an(lt(P,"click",()=>{P.focus(),l.get()?Ue():pe()}),lt(P,"keydown",ue=>{if(!l.get()){if(zu.includes(ue.key)||ue.key===Y.TAB||ue.key===Y.BACKSPACE&&$&&P.value===""||ue.key===Y.SPACE&&Ms(P))return;pe(),lr().then(()=>{if(s.get())return;const Rt=document.getElementById(U.menu.get());if(!Ge(Rt))return;const _e=Array.from(Rt.querySelectorAll(`${x("item")}:not([data-disabled]):not([data-hidden])`)).filter(yt=>Ge(yt));_e.length&&(ue.key===Y.ARROW_DOWN?(n.set(_e[0]),_e[0].scrollIntoView({block:u.get()})):ue.key===Y.ARROW_UP&&(n.set(ar(_e)),ar(_e).scrollIntoView({block:u.get()})))})}if(ue.key===Y.TAB){Ue();return}if(ue.key===Y.ENTER&&!ue.isComposing||ue.key===Y.SPACE&&Ms(P)){ue.preventDefault();const Le=n.get();Le&&O(Le),y.get()||Ue()}if(ue.key===Y.ARROW_UP&&ue.altKey&&Ue(),Yc.includes(ue.key)){ue.preventDefault();const Le=document.getElementById(U.menu.get());if(!Ge(Le))return;const Rt=Qr(Le);if(!Rt.length)return;const _e=Rt.filter(Ss=>!ws(Ss)&&Ss.dataset.hidden===void 0),yt=n.get(),Bt=yt?_e.indexOf(yt):-1,Gn=f.get(),qc=u.get();let st;switch(ue.key){case Y.ARROW_DOWN:st=Jl(_e,Bt,Gn);break;case Y.ARROW_UP:st=jl(_e,Bt,Gn);break;case Y.PAGE_DOWN:st=Zc(_e,Bt,10,Gn);break;case Y.PAGE_UP:st=Xc(_e,Bt,10,Gn);break;case Y.HOME:st=_e[0];break;case Y.END:st=ar(_e);break;default:return}n.set(st),st==null||st.scrollIntoView({block:qc})}else if(T.get()){const Le=document.getElementById(U.menu.get());if(!Ge(Le))return;Q(ue.key,Qr(Le))}}));let He=cr;return He=Kl(P,{handler:Ue,enabled:St([l,p],([ue,Hn])=>ue&&Hn)}).destroy,{destroy(){ae(),He()}}}}),Gr=Ke(M("menu"),{stores:[$n,U.menu],returned:([P,$])=>({hidden:P?void 0:!0,id:$,role:"listbox",style:Ts({display:P?void 0:"none"})}),action:P=>{let $=cr;const ae=an(Tn([$n,m,d,b,t],([He,en,ue,Hn,Le])=>{$(),!(!He||!Le)&&lr().then(()=>{$();const Rt=Ru(U.trigger.get());$=Qc(P,{anchorElement:Le,open:l,options:{floating:Hn,focusTrap:null,modal:{closeOnInteractOutside:ue,onClose:Ue,open:He,shouldCloseOnInteractOutside:_e=>{var Bt;if((Bt=D.get())==null||Bt(_e),_e.defaultPrevented)return!1;const yt=_e.target;return!(!ql(yt)||yt===Le||Le.contains(yt)||Rt(_e))}},escapeKeydown:null,portal:eu(P,en)}}).destroy})}));return{destroy:()=>{ae(),$()}}}}),{elements:{root:Yr}}=Bu(),{action:Xr}=tu(Yr),Zr=Ke(M("label"),{stores:[U.label,U.trigger],returned:([P,$])=>({id:P,for:$}),action:Xr}),F=Ke(M("option"),{stores:[Un],returned:([P])=>$=>{const ae=P($.value);return{"data-value":JSON.stringify($.value),"data-label":$.label,"data-disabled":mr($.disabled),"aria-disabled":$.disabled?!0:void 0,"aria-selected":ae,"data-selected":ae?"":void 0,id:nu(),role:"option"}},action:P=>({destroy:an(lt(P,"click",ae=>{if(ws(P)){ae.preventDefault();return}O(P),y.get()||Ue()}),Tn(v,ae=>ae?an(lt(P,"mouseover",()=>{n.set(P)}),lt(P,"mouseleave",()=>{n.set(null)})):void 0))})}),Fc=Ke(M("group"),{returned:()=>P=>({role:"group","aria-labelledby":P})}),Vc=Ke(M("group-label"),{returned:()=>P=>({id:P})}),Lc=ru({value:St([s],([P])=>{const $=Array.isArray(P)?P.map(ae=>ae.value):P==null?void 0:P.value;return typeof $=="string"?$:JSON.stringify($)}),name:iu(j),required:_,prefix:e.builder}),Wc=Ke(M("arrow"),{stores:C,returned:P=>({"data-arrow":!0,style:Ts({position:"absolute",width:`var(--arrow-size, ${P}px)`,height:`var(--arrow-size, ${P}px)`})})});return su(()=>{if(!An)return;const P=document.getElementById(U.menu.get()),$=document.getElementById(U.trigger.get());if($&&t.set($),!P)return;const ae=P.querySelector("[data-selected]");Ge(ae)}),Tn([n],([P])=>{if(!An)return;const $=document.getElementById(U.menu.get());Ge($)&&Qr($).forEach(ae=>{ae===P?ou(ae):lu(ae)})}),Tn([l],([P])=>{if(!An)return;let $=cr;return h.get()&&P&&($=au()),()=>{$()}}),{ids:U,elements:{trigger:Hr,group:Fc,option:F,menu:Gr,groupLabel:Vc,label:Zr,hiddenInput:Lc,arrow:Wc},states:{open:l,selected:s,highlighted:o,highlightedItem:n},helpers:{isSelected:Un,isHighlighted:Ur,closeMenu:Ue},options:c}}const{name:Wu}=$i("combobox");function qu(r){const e=Lu({...r,builder:"combobox",typeahead:!1}),t=Vt(""),n=Vt(!1),i=Ke(Wu("input"),{stores:[e.elements.trigger,t],returned:([s,o])=>({...pr(s,"action"),role:"combobox",value:o,autocomplete:"off"}),action:s=>{const o=an(lt(s,"input",u=>{!Mi(u.target)&&!Es(u.target)||n.set(!0)}),uu(s,"input",u=>{Mi(u.target)&&t.set(u.target.value),Es(u.target)&&t.set(u.target.innerText)}));let a=cr;a=Kl(s,{handler:()=>{e.helpers.closeMenu()}}).destroy;const{destroy:c}=e.elements.trigger(s);return{destroy(){c==null||c(),o(),a()}}}});return Tn(e.states.open,s=>{s||n.set(!1)}),{...e,elements:{...pr(e.elements,"trigger"),input:i},states:{...e.states,touchedInput:n,inputValue:t}}}const ju={orientation:"horizontal",activateOnFocus:!0,loop:!0,autoSet:!0},{name:Xn,selector:Ju}=$i("tabs");function Ku(r){const e={...ju,...r},t=Ci(pr(e,"defaultValue","value","onValueChange","autoSet")),{orientation:n,activateOnFocus:i,loop:s}=t,o=e.value??Vt(e.defaultValue),a=Si(o,e==null?void 0:e.onValueChange);let l=e.defaultValue??a.get();const c=Ke(Xn(),{stores:n,returned:h=>({"data-orientation":h})}),u=Ke(Xn("list"),{stores:n,returned:h=>({role:"tablist","aria-orientation":h,"data-orientation":h})}),f=h=>typeof h=="string"?{value:h}:h,d=Ke(Xn("trigger"),{stores:[a,n],returned:([h,m])=>g=>{const{value:b,disabled:y}=f(g);!h&&!l&&e.autoSet&&(l=b,h=b,a.set(b));const w=(An?h:l)===b;return{type:"button",role:"tab","data-state":w?"active":"inactive",tabindex:w?0:-1,"data-value":b,"data-orientation":m,"data-disabled":mr(y),disabled:mr(y)}},action:h=>({destroy:an(lt(h,"focus",()=>{const g=h.dataset.disabled==="true",b=h.dataset.value;i.get()&&!g&&b!==void 0&&a.set(b)}),lt(h,"click",g=>{if(h.focus(),g.preventDefault(),h.dataset.disabled==="true")return;const y=h.dataset.value;h.focus(),y!==void 0&&a.set(y)}),lt(h,"keydown",g=>{const b=h.dataset.value;if(!b)return;const y=g.currentTarget;if(!Ge(y))return;const C=y.closest(Ju());if(!Ge(C))return;const w=s.get(),T=Array.from(C.querySelectorAll('[role="tab"]')).filter(x=>Ge(x)).filter(x=>!x.hasAttribute("data-disabled")),j=T.findIndex(x=>x===g.target),v=Pu(C),{nextKey:D,prevKey:M}=fu(v,n.get());g.key===D?(g.preventDefault(),Jl(T,j,w).focus()):g.key===M?(g.preventDefault(),jl(T,j,w).focus()):g.key===Y.ENTER||g.key===Y.SPACE?(g.preventDefault(),a.set(b)):g.key===Y.HOME?(g.preventDefault(),T[0].focus()):g.key===Y.END&&(g.preventDefault(),ar(T).focus())}))})}),p=Ke(Xn("content"),{stores:a,returned:h=>m=>({role:"tabpanel","aria-labelledby":m,hidden:An?h===m?void 0:!0:l===m?void 0:!0,tabindex:0})});return{elements:{root:c,list:u,trigger:d,content:p},states:{value:a},options:t}}function $u(r,e){return r.length!==e.length?!1:r.every((t,n)=>t===e[n])}function ts(){return{NAME:"combobox",GROUP_NAME:"combobox-group",ITEM_NAME:"combobox-item",PARTS:["content","menu","input","item","label","group","group-label","arrow","hidden-input","indicator"]}}function Ir(){const{NAME:r}=ts();return pn(r)}function Uu(r){const{NAME:e,PARTS:t}=ts(),n=Ui(e,t),i={...qu({...Hi(r),forceVisible:!0}),getAttrs:n};return Dr(e,i),{...i,updateOption:Gi(i.options)}}function Hu(r){const{ITEM_NAME:e}=ts(),t=Ir();return Dr(e,r),t}function Gu(r){const t={...{side:"bottom",align:"center",sameWidth:!0},...r},{options:{positioning:n}}=Ir();du(n)(t)}const Yu=r=>({ids:r&1}),Ds=r=>({ids:r[0]});function Xu(r){let e;const t=r[24].default,n=ge(t,r,r[23],Ds);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,[s]){n&&n.p&&(!e||s&8388609)&&be(n,t,i,i[23],e?ke(t,i[23],s,Yu):ye(i[23]),Ds)},i(i){e||(k(n,i),e=!0)},o(i){S(n,i),e=!1},d(i){n&&n.d(i)}}}function Zu(r,e,t){let n,i,s,{$$slots:o={},$$scope:a}=e,{required:l=void 0}=e,{disabled:c=void 0}=e,{preventScroll:u=void 0}=e,{loop:f=void 0}=e,{closeOnEscape:d=void 0}=e,{closeOnOutsideClick:p=void 0}=e,{portal:h=void 0}=e,{name:m=void 0}=e,{multiple:g=!1}=e,{selected:b=void 0}=e,{onSelectedChange:y=void 0}=e,{open:C=void 0}=e,{onOpenChange:w=void 0}=e,{items:_=[]}=e,{onOutsideClick:T=void 0}=e,{inputValue:j=""}=e,{touchedInput:v=!1}=e;const{states:{open:D,selected:M,inputValue:x,touchedInput:U},updateOption:Q,ids:I}=Uu({required:l,disabled:c,preventScroll:u,loop:f,closeOnEscape:d,closeOnOutsideClick:p,portal:h,name:m,onOutsideClick:T,multiple:g,forceVisible:!0,defaultSelected:Array.isArray(b)?[...b]:b,defaultOpen:C,onSelectedChange:({next:O})=>Array.isArray(O)?((!Array.isArray(b)||!$u(b,O))&&(y==null||y(O),t(4,b=O)),O):(b!==O&&(y==null||y(O),t(4,b=O)),t(6,j=(O==null?void 0:O.label)??(typeof(O==null?void 0:O.value)=="string"?O==null?void 0:O.value:"")),x.set(j),O),onOpenChange:({next:O})=>(C!==O&&(w==null||w(O),t(5,C=O)),O),items:_});oe(r,x,O=>t(21,n=O)),oe(r,U,O=>t(22,i=O));const G=St([I.menu,I.trigger,I.label],([O,pe,Ue])=>({menu:O,trigger:pe,label:Ue}));return oe(r,G,O=>t(0,s=O)),r.$$set=O=>{"required"in O&&t(8,l=O.required),"disabled"in O&&t(9,c=O.disabled),"preventScroll"in O&&t(10,u=O.preventScroll),"loop"in O&&t(11,f=O.loop),"closeOnEscape"in O&&t(12,d=O.closeOnEscape),"closeOnOutsideClick"in O&&t(13,p=O.closeOnOutsideClick),"portal"in O&&t(14,h=O.portal),"name"in O&&t(15,m=O.name),"multiple"in O&&t(16,g=O.multiple),"selected"in O&&t(4,b=O.selected),"onSelectedChange"in O&&t(17,y=O.onSelectedChange),"open"in O&&t(5,C=O.open),"onOpenChange"in O&&t(18,w=O.onOpenChange),"items"in O&&t(19,_=O.items),"onOutsideClick"in O&&t(20,T=O.onOutsideClick),"inputValue"in O&&t(6,j=O.inputValue),"touchedInput"in O&&t(7,v=O.touchedInput),"$$scope"in O&&t(23,a=O.$$scope)},r.$$.update=()=>{r.$$.dirty&4194304&&t(7,v=i),r.$$.dirty&6291456&&i&&t(6,j=n),r.$$.dirty&64&&j!==void 0&&x.set(j),r.$$.dirty&32&&C!==void 0&&D.set(C),r.$$.dirty&16&&b!==void 0&&M.set(Array.isArray(b)?[...b]:b),r.$$.dirty&256&&Q("required",l),r.$$.dirty&512&&Q("disabled",c),r.$$.dirty&1024&&Q("preventScroll",u),r.$$.dirty&2048&&Q("loop",f),r.$$.dirty&4096&&Q("closeOnEscape",d),r.$$.dirty&8192&&Q("closeOnOutsideClick",p),r.$$.dirty&16384&&Q("portal",h),r.$$.dirty&32768&&Q("name",m),r.$$.dirty&65536&&Q("multiple",g),r.$$.dirty&1048576&&Q("onOutsideClick",T)},[s,x,U,G,b,C,j,v,l,c,u,f,d,p,h,m,g,y,w,_,T,n,i,a,o]}class Gl extends qe{constructor(e){super(),je(this,e,Zu,Xu,Ae,{required:8,disabled:9,preventScroll:10,loop:11,closeOnEscape:12,closeOnOutsideClick:13,portal:14,name:15,multiple:16,selected:4,onSelectedChange:17,open:5,onOpenChange:18,items:19,onOutsideClick:20,inputValue:6,touchedInput:7})}}const Qu=r=>({builder:r[0]&256}),xs=r=>({builder:r[8]}),ef=r=>({builder:r[0]&256}),vs=r=>({builder:r[8]}),tf=r=>({builder:r[0]&256}),Is=r=>({builder:r[8]}),nf=r=>({builder:r[0]&256}),Ps=r=>({builder:r[8]}),rf=r=>({builder:r[0]&256}),Rs=r=>({builder:r[8]}),sf=r=>({builder:r[0]&256}),Bs=r=>({builder:r[8]});function of(r){let e,t,n,i;const s=r[26].default,o=ge(s,r,r[25],xs);let a=[r[8],r[13]],l={};for(let c=0;c<a.length;c+=1)l=se(l,a[c]);return{c(){e=B("div"),o&&o.c(),le(e,l)},m(c,u){N(c,e,u),o&&o.m(e,null),r[35](e),t=!0,n||(i=[Je(r[8].action(e)),te(e,"m-pointerleave",r[12]),te(e,"keydown",r[31])],n=!0)},p(c,u){o&&o.p&&(!t||u[0]&33554688)&&be(o,s,c,c[25],t?ke(s,c[25],u,Qu):ye(c[25]),xs),le(e,l=Ve(a,[u[0]&256&&c[8],u[0]&8192&&c[13]]))},i(c){t||(k(o,c),t=!0)},o(c){S(o,c),t=!1},d(c){c&&A(e),o&&o.d(c),r[35](null),n=!1,ft(i)}}}function lf(r){let e,t,n,i,s;const o=r[26].default,a=ge(o,r,r[25],vs);let l=[r[8],r[13]],c={};for(let u=0;u<l.length;u+=1)c=se(c,l[u]);return{c(){e=B("div"),a&&a.c(),le(e,c)},m(u,f){N(u,e,f),a&&a.m(e,null),r[34](e),n=!0,i||(s=[Je(r[8].action(e)),te(e,"m-pointerleave",r[12]),te(e,"keydown",r[30])],i=!0)},p(u,f){r=u,a&&a.p&&(!n||f[0]&33554688)&&be(a,o,r,r[25],n?ke(o,r[25],f,ef):ye(r[25]),vs),le(e,c=Ve(l,[f[0]&256&&r[8],f[0]&8192&&r[13]]))},i(u){n||(k(a,u),t&&t.end(1),n=!0)},o(u){S(a,u),u&&(t=$l(e,r[5],r[6])),n=!1},d(u){u&&A(e),a&&a.d(u),r[34](null),u&&t&&t.end(),i=!1,ft(s)}}}function af(r){let e,t,n,i,s;const o=r[26].default,a=ge(o,r,r[25],Is);let l=[r[8],r[13]],c={};for(let u=0;u<l.length;u+=1)c=se(c,l[u]);return{c(){e=B("div"),a&&a.c(),le(e,c)},m(u,f){N(u,e,f),a&&a.m(e,null),n=!0,i||(s=[Je(r[8].action(e)),te(e,"m-pointerleave",r[12]),te(e,"keydown",r[29])],i=!0)},p(u,f){r=u,a&&a.p&&(!n||f[0]&33554688)&&be(a,o,r,r[25],n?ke(o,r[25],f,tf):ye(r[25]),Is),le(e,c=Ve(l,[f[0]&256&&r[8],f[0]&8192&&r[13]]))},i(u){n||(k(a,u),u&&(t||Yi(()=>{t=Ul(e,r[3],r[4]),t.start()})),n=!0)},o(u){S(a,u),n=!1},d(u){u&&A(e),a&&a.d(u),i=!1,ft(s)}}}function cf(r){let e,t,n,i,s,o;const a=r[26].default,l=ge(a,r,r[25],Ps);let c=[r[8],r[13]],u={};for(let f=0;f<c.length;f+=1)u=se(u,c[f]);return{c(){e=B("div"),l&&l.c(),le(e,u)},m(f,d){N(f,e,d),l&&l.m(e,null),r[33](e),i=!0,s||(o=[Je(r[8].action(e)),te(e,"m-pointerleave",r[12]),te(e,"keydown",r[28])],s=!0)},p(f,d){r=f,l&&l.p&&(!i||d[0]&33554688)&&be(l,a,r,r[25],i?ke(a,r[25],d,nf):ye(r[25]),Ps),le(e,u=Ve(c,[d[0]&256&&r[8],d[0]&8192&&r[13]]))},i(f){i||(k(l,f),f&&Yi(()=>{i&&(n&&n.end(1),t=Ul(e,r[3],r[4]),t.start())}),i=!0)},o(f){S(l,f),t&&t.invalidate(),f&&(n=$l(e,r[5],r[6])),i=!1},d(f){f&&A(e),l&&l.d(f),r[33](null),f&&n&&n.end(),s=!1,ft(o)}}}function uf(r){let e,t,n,i,s;const o=r[26].default,a=ge(o,r,r[25],Rs);let l=[r[8],r[13]],c={};for(let u=0;u<l.length;u+=1)c=se(c,l[u]);return{c(){e=B("div"),a&&a.c(),le(e,c)},m(u,f){N(u,e,f),a&&a.m(e,null),r[32](e),n=!0,i||(s=[Je(r[8].action(e)),te(e,"m-pointerleave",r[12]),te(e,"keydown",r[27])],i=!0)},p(u,f){r=u,a&&a.p&&(!n||f[0]&33554688)&&be(a,o,r,r[25],n?ke(o,r[25],f,rf):ye(r[25]),Rs),le(e,c=Ve(l,[f[0]&256&&r[8],f[0]&8192&&r[13]]))},i(u){n||(k(a,u),u&&Yi(()=>{n&&(t||(t=Os(e,r[1],r[2],!0)),t.run(1))}),n=!0)},o(u){S(a,u),u&&(t||(t=Os(e,r[1],r[2],!1)),t.run(0)),n=!1},d(u){u&&A(e),a&&a.d(u),r[32](null),u&&t&&t.end(),i=!1,ft(s)}}}function ff(r){let e;const t=r[26].default,n=ge(t,r,r[25],Bs);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s[0]&33554688)&&be(n,t,i,i[25],e?ke(t,i[25],s,sf):ye(i[25]),Bs)},i(i){e||(k(n,i),e=!0)},o(i){S(n,i),e=!1},d(i){n&&n.d(i)}}}function df(r){let e,t,n,i;const s=[ff,uf,cf,af,lf,of],o=[];function a(l,c){return l[7]&&l[9]?0:l[1]&&l[9]?1:l[3]&&l[5]&&l[9]?2:l[3]&&l[9]?3:l[5]&&l[9]?4:l[9]?5:-1}return~(e=a(r))&&(t=o[e]=s[e](r)),{c(){t&&t.c(),n=de()},m(l,c){~e&&o[e].m(l,c),N(l,n,c),i=!0},p(l,c){let u=e;e=a(l),e===u?~e&&o[e].p(l,c):(t&&(re(),S(o[u],1,1,()=>{o[u]=null}),ie()),~e?(t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n)):t=null)},i(l){i||(k(t),i=!0)},o(l){S(t),i=!1},d(l){l&&A(n),~e&&o[e].d(l)}}}function hf(r,e,t){let n;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","side","align","sideOffset","alignOffset","collisionPadding","avoidCollisions","collisionBoundary","sameWidth","fitViewport","el"];let s=ve(e,i),o,a,{$$slots:l={},$$scope:c}=e,{transition:u=void 0}=e,{transitionConfig:f=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:p=void 0}=e,{outTransition:h=void 0}=e,{outTransitionConfig:m=void 0}=e,{asChild:g=!1}=e,{id:b=void 0}=e,{side:y="bottom"}=e,{align:C="center"}=e,{sideOffset:w=0}=e,{alignOffset:_=0}=e,{collisionPadding:T=8}=e,{avoidCollisions:j=!0}=e,{collisionBoundary:v=void 0}=e,{sameWidth:D=!0}=e,{fitViewport:M=!1}=e,{el:x=void 0}=e;const{elements:{menu:U},states:{open:Q},ids:I,getAttrs:G}=Ir();oe(r,U,F=>t(24,a=F)),oe(r,Q,F=>t(9,o=F));const O=xr(),pe=G("content");function Ue(F){mt.call(this,r,F)}function $n(F){mt.call(this,r,F)}function Un(F){mt.call(this,r,F)}function Ur(F){mt.call(this,r,F)}function Hr(F){mt.call(this,r,F)}function Gr(F){Re[F?"unshift":"push"](()=>{x=F,t(0,x)})}function Yr(F){Re[F?"unshift":"push"](()=>{x=F,t(0,x)})}function Xr(F){Re[F?"unshift":"push"](()=>{x=F,t(0,x)})}function Zr(F){Re[F?"unshift":"push"](()=>{x=F,t(0,x)})}return r.$$set=F=>{e=se(se({},e),vt(F)),t(13,s=ve(e,i)),"transition"in F&&t(1,u=F.transition),"transitionConfig"in F&&t(2,f=F.transitionConfig),"inTransition"in F&&t(3,d=F.inTransition),"inTransitionConfig"in F&&t(4,p=F.inTransitionConfig),"outTransition"in F&&t(5,h=F.outTransition),"outTransitionConfig"in F&&t(6,m=F.outTransitionConfig),"asChild"in F&&t(7,g=F.asChild),"id"in F&&t(14,b=F.id),"side"in F&&t(15,y=F.side),"align"in F&&t(16,C=F.align),"sideOffset"in F&&t(17,w=F.sideOffset),"alignOffset"in F&&t(18,_=F.alignOffset),"collisionPadding"in F&&t(19,T=F.collisionPadding),"avoidCollisions"in F&&t(20,j=F.avoidCollisions),"collisionBoundary"in F&&t(21,v=F.collisionBoundary),"sameWidth"in F&&t(22,D=F.sameWidth),"fitViewport"in F&&t(23,M=F.fitViewport),"el"in F&&t(0,x=F.el),"$$scope"in F&&t(25,c=F.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&16384&&b&&I.menu.set(b),r.$$.dirty[0]&16777216&&t(8,n=a),r.$$.dirty[0]&256&&Object.assign(n,pe),r.$$.dirty[0]&16744960&&o&&Gu({side:y,align:C,sideOffset:w,alignOffset:_,collisionPadding:T,avoidCollisions:j,collisionBoundary:v,sameWidth:D,fitViewport:M})},[x,u,f,d,p,h,m,g,n,o,U,Q,O,s,b,y,C,w,_,T,j,v,D,M,a,c,l,Ue,$n,Un,Ur,Hr,Gr,Yr,Xr,Zr]}class Yl extends qe{constructor(e){super(),je(this,e,hf,df,Ae,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:14,side:15,align:16,sideOffset:17,alignOffset:18,collisionPadding:19,avoidCollisions:20,collisionBoundary:21,sameWidth:22,fitViewport:23,el:0},null,[-1,-1])}}const pf=r=>({builder:r&8,placeholder:r&4}),zs=r=>({builder:r[3],placeholder:r[2]});function mf(r){let e,t,n,i=[r[3],r[6],{placeholder:r[2]}],s={};for(let o=0;o<i.length;o+=1)s=se(s,i[o]);return{c(){e=B("input"),le(e,s)},m(o,a){N(o,e,a),e.autofocus&&e.focus(),r[11](e),t||(n=[Je(r[3].action(e)),te(e,"m-click",r[5]),te(e,"m-keydown",r[5]),te(e,"m-input",r[5])],t=!0)},p(o,a){le(e,s=Ve(i,[a&8&&o[3],a&64&&o[6],a&4&&{placeholder:o[2]}]))},i:ne,o:ne,d(o){o&&A(e),r[11](null),t=!1,ft(n)}}}function gf(r){let e;const t=r[10].default,n=ge(t,r,r[9],zs);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&524)&&be(n,t,i,i[9],e?ke(t,i[9],s,pf):ye(i[9]),zs)},i(i){e||(k(n,i),e=!0)},o(i){S(n,i),e=!1},d(i){n&&n.d(i)}}}function bf(r){let e,t,n,i;const s=[gf,mf],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),N(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(re(),S(o[u],1,1,()=>{o[u]=null}),ie(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){S(t),i=!1},d(l){l&&A(n),o[e].d(l)}}}function yf(r,e,t){let n;const i=["asChild","placeholder","el","id"];let s=ve(e,i),o,{$$slots:a={},$$scope:l}=e,{asChild:c=!1}=e,{placeholder:u=void 0}=e,{el:f=void 0}=e,{id:d=void 0}=e;const{elements:{input:p},ids:h,getAttrs:m}=Ir();oe(r,p,C=>t(8,o=C));const g=xr(),b=m("input");function y(C){Re[C?"unshift":"push"](()=>{f=C,t(0,f)})}return r.$$set=C=>{e=se(se({},e),vt(C)),t(6,s=ve(e,i)),"asChild"in C&&t(1,c=C.asChild),"placeholder"in C&&t(2,u=C.placeholder),"el"in C&&t(0,f=C.el),"id"in C&&t(7,d=C.id),"$$scope"in C&&t(9,l=C.$$scope)},r.$$.update=()=>{r.$$.dirty&128&&d&&h.trigger.set(d),r.$$.dirty&256&&t(3,n=o),r.$$.dirty&8&&Object.assign(n,b)},[f,c,u,n,p,g,s,d,o,l,a,y]}class Xl extends qe{constructor(e){super(),je(this,e,yf,bf,Ae,{asChild:1,placeholder:2,el:0,id:7})}}const kf=r=>({builder:r&16,isSelected:r&32}),Fs=r=>({builder:r[4],isSelected:r[5]}),_f=r=>({builder:r&16,isSelected:r&32}),Vs=r=>({builder:r[4],isSelected:r[5]});function Sf(r){let e,t,n,i;const s=r[14].default,o=ge(s,r,r[13],Fs),a=o||Mf(r);let l=[r[4],r[9]],c={};for(let u=0;u<l.length;u+=1)c=se(c,l[u]);return{c(){e=B("div"),a.c(),le(e,c)},m(u,f){N(u,e,f),a.m(e,null),r[19](e),t=!0,n||(i=[Je(r[4].action(e)),te(e,"m-click",r[8]),te(e,"m-pointermove",r[8]),te(e,"focusin",r[15]),te(e,"keydown",r[16]),te(e,"focusout",r[17]),te(e,"pointerleave",r[18])],n=!0)},p(u,f){o?o.p&&(!t||f&8240)&&be(o,s,u,u[13],t?ke(s,u[13],f,kf):ye(u[13]),Fs):a.p&&(!t||f&5)&&a.p(u,t?f:-1),le(e,c=Ve(l,[f&16&&u[4],f&512&&u[9]]))},i(u){t||(k(a,u),t=!0)},o(u){S(a,u),t=!1},d(u){u&&A(e),a.d(u),r[19](null),n=!1,ft(i)}}}function Cf(r){let e;const t=r[14].default,n=ge(t,r,r[13],Vs);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&8240)&&be(n,t,i,i[13],e?ke(t,i[13],s,_f):ye(i[13]),Vs)},i(i){e||(k(n,i),e=!0)},o(i){S(n,i),e=!1},d(i){n&&n.d(i)}}}function Mf(r){let e=(r[0]||r[2])+"",t;return{c(){t=he(e)},m(n,i){N(n,t,i)},p(n,i){i&5&&e!==(e=(n[0]||n[2])+"")&&Ie(t,e)},d(n){n&&A(t)}}}function wf(r){let e,t,n,i;const s=[Cf,Sf],o=[];function a(l,c){return l[3]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),N(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(re(),S(o[u],1,1,()=>{o[u]=null}),ie(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){S(t),i=!1},d(l){l&&A(n),o[e].d(l)}}}function Tf(r,e,t){let n,i;const s=["value","disabled","label","asChild","el"];let o=ve(e,s),a,l,{$$slots:c={},$$scope:u}=e,{value:f}=e,{disabled:d=void 0}=e,{label:p=void 0}=e,{asChild:h=!1}=e,{el:m=void 0}=e;const{elements:{option:g},helpers:{isSelected:b},getAttrs:y}=Hu(f);oe(r,g,M=>t(12,l=M)),oe(r,b,M=>t(11,a=M));const C=xr(),w=y("item");function _(M){mt.call(this,r,M)}function T(M){mt.call(this,r,M)}function j(M){mt.call(this,r,M)}function v(M){mt.call(this,r,M)}function D(M){Re[M?"unshift":"push"](()=>{m=M,t(1,m)})}return r.$$set=M=>{e=se(se({},e),vt(M)),t(9,o=ve(e,s)),"value"in M&&t(2,f=M.value),"disabled"in M&&t(10,d=M.disabled),"label"in M&&t(0,p=M.label),"asChild"in M&&t(3,h=M.asChild),"el"in M&&t(1,m=M.el),"$$scope"in M&&t(13,u=M.$$scope)},r.$$.update=()=>{r.$$.dirty&5&&!p&&typeof f=="string"&&t(0,p=f),r.$$.dirty&5125&&t(4,n=l({value:f,disabled:d,label:p})),r.$$.dirty&16&&Object.assign(n,w),r.$$.dirty&2052&&t(5,i=a(f))},[p,m,f,h,n,i,g,b,C,o,d,a,l,u,c,_,T,j,v,D]}class Zl extends qe{constructor(e){super(),je(this,e,Tf,wf,Ae,{value:2,disabled:10,label:0,asChild:3,el:1})}}function Ef(){return{NAME:"separator",PARTS:["root"]}}function Of(r){const{NAME:e,PARTS:t}=Ef(),n=Ui(e,t),i={...hu(Hi(r)),getAttrs:n};return{...i,updateOption:Gi(i.options)}}const Nf=r=>({builder:r&4}),Ls=r=>({builder:r[2]});function Af(r){let e,t,n,i=[r[2],r[4]],s={};for(let o=0;o<i.length;o+=1)s=se(s,i[o]);return{c(){e=B("div"),le(e,s)},m(o,a){N(o,e,a),r[10](e),t||(n=Je(r[2].action(e)),t=!0)},p(o,a){le(e,s=Ve(i,[a&4&&o[2],a&16&&o[4]]))},i:ne,o:ne,d(o){o&&A(e),r[10](null),t=!1,n()}}}function Df(r){let e;const t=r[9].default,n=ge(t,r,r[8],Ls);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&260)&&be(n,t,i,i[8],e?ke(t,i[8],s,Nf):ye(i[8]),Ls)},i(i){e||(k(n,i),e=!0)},o(i){S(n,i),e=!1},d(i){n&&n.d(i)}}}function xf(r){let e,t,n,i;const s=[Df,Af],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),N(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(re(),S(o[u],1,1,()=>{o[u]=null}),ie(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){S(t),i=!1},d(l){l&&A(n),o[e].d(l)}}}function vf(r,e,t){let n;const i=["orientation","decorative","asChild","el"];let s=ve(e,i),o,{$$slots:a={},$$scope:l}=e,{orientation:c="horizontal"}=e,{decorative:u=!0}=e,{asChild:f=!1}=e,{el:d=void 0}=e;const{elements:{root:p},updateOption:h,getAttrs:m}=Of({orientation:c,decorative:u});oe(r,p,y=>t(7,o=y));const g=m("root");function b(y){Re[y?"unshift":"push"](()=>{d=y,t(0,d)})}return r.$$set=y=>{e=se(se({},e),vt(y)),t(4,s=ve(e,i)),"orientation"in y&&t(5,c=y.orientation),"decorative"in y&&t(6,u=y.decorative),"asChild"in y&&t(1,f=y.asChild),"el"in y&&t(0,d=y.el),"$$scope"in y&&t(8,l=y.$$scope)},r.$$.update=()=>{r.$$.dirty&32&&h("orientation",c),r.$$.dirty&64&&h("decorative",u),r.$$.dirty&128&&t(2,n=o),r.$$.dirty&4&&Object.assign(n,g)},[d,f,n,p,s,c,u,o,l,a,b]}class Ql extends qe{constructor(e){super(),je(this,e,vf,xf,Ae,{orientation:5,decorative:6,asChild:1,el:0})}}function ea(){return{NAME:"tabs",PARTS:["root","content","list","trigger"]}}function If(r){const{NAME:e,PARTS:t}=ea(),n=Ui(e,t),i={...Ku(Hi(r)),getAttrs:n};return Dr(e,i),{...i,updateOption:Gi(i.options)}}function ns(){const{NAME:r}=ea();return pn(r)}const Pf=r=>({builder:r&4,value:r&8}),Ws=r=>({builder:r[2],value:r[3]}),Rf=r=>({builder:r&4,value:r&8}),qs=r=>({builder:r[2],value:r[3]});function Bf(r){let e,t,n,i;const s=r[15].default,o=ge(s,r,r[14],Ws);let a=[r[2],r[6]],l={};for(let c=0;c<a.length;c+=1)l=se(l,a[c]);return{c(){e=B("div"),o&&o.c(),le(e,l)},m(c,u){N(c,e,u),o&&o.m(e,null),r[16](e),t=!0,n||(i=Je(r[2].action(e)),n=!0)},p(c,u){o&&o.p&&(!t||u&16396)&&be(o,s,c,c[14],t?ke(s,c[14],u,Pf):ye(c[14]),Ws),le(e,l=Ve(a,[u&4&&c[2],u&64&&c[6]]))},i(c){t||(k(o,c),t=!0)},o(c){S(o,c),t=!1},d(c){c&&A(e),o&&o.d(c),r[16](null),n=!1,i()}}}function zf(r){let e;const t=r[15].default,n=ge(t,r,r[14],qs);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&16396)&&be(n,t,i,i[14],e?ke(t,i[14],s,Rf):ye(i[14]),qs)},i(i){e||(k(n,i),e=!0)},o(i){S(n,i),e=!1},d(i){n&&n.d(i)}}}function Ff(r){let e,t,n,i;const s=[zf,Bf],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),N(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(re(),S(o[u],1,1,()=>{o[u]=null}),ie(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){S(t),i=!1},d(l){l&&A(n),o[e].d(l)}}}function Vf(r,e,t){let n;const i=["orientation","activateOnFocus","loop","autoSet","value","onValueChange","asChild","el"];let s=ve(e,i),o,a,{$$slots:l={},$$scope:c}=e,{orientation:u=void 0}=e,{activateOnFocus:f=void 0}=e,{loop:d=void 0}=e,{autoSet:p=void 0}=e,{value:h=void 0}=e,{onValueChange:m=void 0}=e,{asChild:g=!1}=e,{el:b=void 0}=e;const{elements:{root:y},states:{value:C},updateOption:w,getAttrs:_}=If({orientation:u,activateOnFocus:f,loop:d,autoSet:p,defaultValue:h,onValueChange:({next:v})=>(h!==v&&(m==null||m(v),t(7,h=v)),v)});oe(r,y,v=>t(13,o=v)),oe(r,C,v=>t(3,a=v));const T=_("root");function j(v){Re[v?"unshift":"push"](()=>{b=v,t(0,b)})}return r.$$set=v=>{e=se(se({},e),vt(v)),t(6,s=ve(e,i)),"orientation"in v&&t(8,u=v.orientation),"activateOnFocus"in v&&t(9,f=v.activateOnFocus),"loop"in v&&t(10,d=v.loop),"autoSet"in v&&t(11,p=v.autoSet),"value"in v&&t(7,h=v.value),"onValueChange"in v&&t(12,m=v.onValueChange),"asChild"in v&&t(1,g=v.asChild),"el"in v&&t(0,b=v.el),"$$scope"in v&&t(14,c=v.$$scope)},r.$$.update=()=>{r.$$.dirty&128&&h!==void 0&&C.set(h),r.$$.dirty&256&&w("orientation",u),r.$$.dirty&512&&w("activateOnFocus",f),r.$$.dirty&1024&&w("loop",d),r.$$.dirty&2048&&w("autoSet",p),r.$$.dirty&8192&&t(2,n=o),r.$$.dirty&4&&Object.assign(n,T)},[b,g,n,a,y,C,s,h,u,f,d,p,m,o,c,l,j]}class Lf extends qe{constructor(e){super(),je(this,e,Vf,Ff,Ae,{orientation:8,activateOnFocus:9,loop:10,autoSet:11,value:7,onValueChange:12,asChild:1,el:0})}}const Wf=r=>({builder:r&4}),js=r=>({builder:r[2]}),qf=r=>({builder:r&4}),Js=r=>({builder:r[2]});function jf(r){let e,t,n,i;const s=r[8].default,o=ge(s,r,r[7],js);let a=[r[2],r[4]],l={};for(let c=0;c<a.length;c+=1)l=se(l,a[c]);return{c(){e=B("div"),o&&o.c(),le(e,l)},m(c,u){N(c,e,u),o&&o.m(e,null),r[9](e),t=!0,n||(i=Je(r[2].action(e)),n=!0)},p(c,u){o&&o.p&&(!t||u&132)&&be(o,s,c,c[7],t?ke(s,c[7],u,Wf):ye(c[7]),js),le(e,l=Ve(a,[u&4&&c[2],u&16&&c[4]]))},i(c){t||(k(o,c),t=!0)},o(c){S(o,c),t=!1},d(c){c&&A(e),o&&o.d(c),r[9](null),n=!1,i()}}}function Jf(r){let e;const t=r[8].default,n=ge(t,r,r[7],Js);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&132)&&be(n,t,i,i[7],e?ke(t,i[7],s,qf):ye(i[7]),Js)},i(i){e||(k(n,i),e=!0)},o(i){S(n,i),e=!1},d(i){n&&n.d(i)}}}function Kf(r){let e,t,n,i;const s=[Jf,jf],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),N(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(re(),S(o[u],1,1,()=>{o[u]=null}),ie(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){S(t),i=!1},d(l){l&&A(n),o[e].d(l)}}}function $f(r,e,t){let n;const i=["value","asChild","el"];let s=ve(e,i),o,{$$slots:a={},$$scope:l}=e,{value:c}=e,{asChild:u=!1}=e,{el:f=void 0}=e;const{elements:{content:d},getAttrs:p}=ns();oe(r,d,g=>t(6,o=g));const h=p("content");function m(g){Re[g?"unshift":"push"](()=>{f=g,t(0,f)})}return r.$$set=g=>{e=se(se({},e),vt(g)),t(4,s=ve(e,i)),"value"in g&&t(5,c=g.value),"asChild"in g&&t(1,u=g.asChild),"el"in g&&t(0,f=g.el),"$$scope"in g&&t(7,l=g.$$scope)},r.$$.update=()=>{r.$$.dirty&96&&t(2,n=o(c)),r.$$.dirty&4&&Object.assign(n,h)},[f,u,n,d,s,c,o,l,a,m]}class Uf extends qe{constructor(e){super(),je(this,e,$f,Kf,Ae,{value:5,asChild:1,el:0})}}const Hf=r=>({builder:r&4}),Ks=r=>({builder:r[2]}),Gf=r=>({builder:r&4}),$s=r=>({builder:r[2]});function Yf(r){let e,t,n,i;const s=r[7].default,o=ge(s,r,r[6],Ks);let a=[r[2],r[4]],l={};for(let c=0;c<a.length;c+=1)l=se(l,a[c]);return{c(){e=B("div"),o&&o.c(),le(e,l)},m(c,u){N(c,e,u),o&&o.m(e,null),r[8](e),t=!0,n||(i=Je(r[2].action(e)),n=!0)},p(c,u){o&&o.p&&(!t||u&68)&&be(o,s,c,c[6],t?ke(s,c[6],u,Hf):ye(c[6]),Ks),le(e,l=Ve(a,[u&4&&c[2],u&16&&c[4]]))},i(c){t||(k(o,c),t=!0)},o(c){S(o,c),t=!1},d(c){c&&A(e),o&&o.d(c),r[8](null),n=!1,i()}}}function Xf(r){let e;const t=r[7].default,n=ge(t,r,r[6],$s);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&68)&&be(n,t,i,i[6],e?ke(t,i[6],s,Gf):ye(i[6]),$s)},i(i){e||(k(n,i),e=!0)},o(i){S(n,i),e=!1},d(i){n&&n.d(i)}}}function Zf(r){let e,t,n,i;const s=[Xf,Yf],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),N(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(re(),S(o[u],1,1,()=>{o[u]=null}),ie(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){S(t),i=!1},d(l){l&&A(n),o[e].d(l)}}}function Qf(r,e,t){let n;const i=["asChild","el"];let s=ve(e,i),o,{$$slots:a={},$$scope:l}=e,{asChild:c=!1}=e,{el:u=void 0}=e;const{elements:{list:f},getAttrs:d}=ns();oe(r,f,m=>t(5,o=m));const p=d("list");function h(m){Re[m?"unshift":"push"](()=>{u=m,t(0,u)})}return r.$$set=m=>{e=se(se({},e),vt(m)),t(4,s=ve(e,i)),"asChild"in m&&t(1,c=m.asChild),"el"in m&&t(0,u=m.el),"$$scope"in m&&t(6,l=m.$$scope)},r.$$.update=()=>{r.$$.dirty&32&&t(2,n=o),r.$$.dirty&4&&Object.assign(n,p)},[u,c,n,f,s,o,l,a,h]}class ed extends qe{constructor(e){super(),je(this,e,Qf,Zf,Ae,{asChild:1,el:0})}}const td=r=>({builder:r&4}),Us=r=>({builder:r[2]}),nd=r=>({builder:r&4}),Hs=r=>({builder:r[2]});function rd(r){let e,t,n,i;const s=r[10].default,o=ge(s,r,r[9],Us);let a=[r[2],{type:"button"},r[5]],l={};for(let c=0;c<a.length;c+=1)l=se(l,a[c]);return{c(){e=B("button"),o&&o.c(),le(e,l)},m(c,u){N(c,e,u),o&&o.m(e,null),e.autofocus&&e.focus(),r[11](e),t=!0,n||(i=[Je(r[2].action(e)),te(e,"m-click",r[4]),te(e,"m-focus",r[4]),te(e,"m-keydown",r[4])],n=!0)},p(c,u){o&&o.p&&(!t||u&516)&&be(o,s,c,c[9],t?ke(s,c[9],u,td):ye(c[9]),Us),le(e,l=Ve(a,[u&4&&c[2],{type:"button"},u&32&&c[5]]))},i(c){t||(k(o,c),t=!0)},o(c){S(o,c),t=!1},d(c){c&&A(e),o&&o.d(c),r[11](null),n=!1,ft(i)}}}function id(r){let e;const t=r[10].default,n=ge(t,r,r[9],Hs);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&516)&&be(n,t,i,i[9],e?ke(t,i[9],s,nd):ye(i[9]),Hs)},i(i){e||(k(n,i),e=!0)},o(i){S(n,i),e=!1},d(i){n&&n.d(i)}}}function sd(r){let e,t,n,i;const s=[id,rd],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),N(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(re(),S(o[u],1,1,()=>{o[u]=null}),ie(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){S(t),i=!1},d(l){l&&A(n),o[e].d(l)}}}function od(r,e,t){let n;const i=["value","disabled","asChild","el"];let s=ve(e,i),o,{$$slots:a={},$$scope:l}=e,{value:c}=e,{disabled:u=void 0}=e,{asChild:f=!1}=e,{el:d=void 0}=e;const{elements:{trigger:p},getAttrs:h}=ns();oe(r,p,y=>t(8,o=y));const m=xr(),g=h("trigger");function b(y){Re[y?"unshift":"push"](()=>{d=y,t(0,d)})}return r.$$set=y=>{e=se(se({},e),vt(y)),t(5,s=ve(e,i)),"value"in y&&t(6,c=y.value),"disabled"in y&&t(7,u=y.disabled),"asChild"in y&&t(1,f=y.asChild),"el"in y&&t(0,d=y.el),"$$scope"in y&&t(9,l=y.$$scope)},r.$$.update=()=>{r.$$.dirty&448&&t(2,n=o({value:c,disabled:u})),r.$$.dirty&4&&Object.assign(n,g)},[d,f,n,p,m,s,c,u,o,l,a,b]}class ld extends qe{constructor(e){super(),je(this,e,od,sd,Ae,{value:6,disabled:7,asChild:1,el:0})}}/*!
|
|
1
|
+
import{T as Ge,U as jc,V as ql,W as Jc,X as Ke,Y as lt,Z as Cs,_ as Vt,$ as Si,a0 as St,a1 as Ci,a2 as pr,a3 as $i,a4 as Kc,a5 as $c,a6 as Uc,a7 as Mn,a8 as Hc,a9 as Gc,aa as mr,ab as an,ac as Y,ad as Ms,ae as lr,af as ar,ag as Yc,ah as ws,ai as Xc,aj as Zc,ak as jl,al as Jl,am as Kl,an as Ts,ao as Tn,ap as Qc,aq as eu,ar as tu,as as nu,at as ru,au as iu,av as su,aw as An,ax as ou,ay as lu,az as au,aA as Mi,aB as cr,aC as cu,aD as uu,aE as Es,aF as fu,aG as Ui,aH as Hi,aI as Dr,aJ as Gi,aK as pn,aL as du,S as qe,i as je,s as Ae,aM as ge,aN as be,aO as ye,aP as ke,k,h as S,m as oe,J as de,c as N,g as re,j as ie,l as A,aQ as ve,aR as xr,aS as se,aT as vt,aU as mt,v as Re,e as B,aV as le,aW as Je,C as te,aX as Ve,F as ft,aY as $l,aZ as Yi,a_ as Ul,a$ as Os,w as ne,t as he,f as Ie,b0 as hu,b1 as fe,b2 as it,a as K,b as J,d as R,A as V,B as L,E as W,I as we,b3 as pu,b4 as vr,K as Xi,b5 as mu,b6 as Sn,b7 as et,b8 as Zi,b9 as Qi,ba as es,bb as gu,bc as Hl,bd as bu,p as yu,be as xt,bf as gr,bg as br,bh as ku,P as wi,bi as _u,Q as Ti,bj as Su,bk as Cu,bl as Mu,bm as wu,bn as Tu,bo as Eu,bp as Ou,L as Yn,n as Ns,o as Nu,u as Au,O as tn,N as As,q as Du,R as xu}from"./index-C49506g6.js";import{k as vu,b as Iu}from"./index-Vcq4gwWv.js";function Qr(r){return Array.from(r.querySelectorAll('[role="option"]:not([data-disabled])')).filter(e=>Ge(e))}function Pu(r){return window.getComputedStyle(r).getPropertyValue("direction")}function Ru(r){return e=>{const t=e.target,n=jc(r);if(!n||!ql(t))return!1;const i=n.id;return!!(Jc(t)&&i===t.htmlFor||t.closest(`label[for="${i}"]`))}}function Bu(){return{elements:{root:Ke("label",{action:e=>({destroy:lt(e,"mousedown",n=>{!n.defaultPrevented&&n.detail>1&&n.preventDefault()})})})}}}const zu=[Y.ARROW_LEFT,Y.ESCAPE,Y.ARROW_RIGHT,Y.SHIFT,Y.CAPS_LOCK,Y.CONTROL,Y.ALT,Y.META,Y.ENTER,Y.F1,Y.F2,Y.F3,Y.F4,Y.F5,Y.F6,Y.F7,Y.F8,Y.F9,Y.F10,Y.F11,Y.F12],Fu={positioning:{placement:"bottom",sameWidth:!0},scrollAlignment:"nearest",loop:!0,defaultOpen:!1,closeOnOutsideClick:!0,preventScroll:!0,closeOnEscape:!0,forceVisible:!1,portal:void 0,builder:"listbox",disabled:!1,required:!1,name:void 0,typeahead:!0,highlightOnHover:!0,onOutsideClick:void 0},Vu=["trigger","menu","label"];function Lu(r){const e={...Fu,...r},t=Cs(Vt(null)),n=Cs(Vt(null)),i=e.selected??Vt(e.defaultSelected),s=Si(i,e==null?void 0:e.onSelectedChange),o=St(n,P=>P?I(P):void 0),a=e.open??Vt(e.defaultOpen),l=Si(a,e==null?void 0:e.onOpenChange),c=Ci({...pr(e,"open","defaultOpen","builder","ids"),multiple:e.multiple??!1}),{scrollAlignment:u,loop:f,closeOnOutsideClick:d,closeOnEscape:p,preventScroll:h,portal:m,forceVisible:g,positioning:b,multiple:y,arrowSize:C,disabled:w,required:_,typeahead:T,name:j,highlightOnHover:v,onOutsideClick:D}=c,{name:M,selector:x}=$i(e.builder),U=Ci({...Kc(Vu),...e.ids}),{handleTypeaheadSearch:Q}=$c({onMatch:P=>{n.set(P),P.scrollIntoView({block:u.get()})},getCurrentItem(){return n.get()}});function I(P){const $=P.getAttribute("data-value"),ae=P.getAttribute("data-label"),He=P.hasAttribute("data-disabled");return{value:$&&JSON.parse($),label:ae??P.textContent??void 0,disabled:!!He}}const G=P=>{s.update($=>{if(y.get()){const He=Array.isArray($)?[...$]:[];return cu(P,He,(en,ue)=>Mn(en.value,ue.value))}return P})};function O(P){const $=I(P);G($)}async function pe(){l.set(!0);const P=document.getElementById(U.trigger.get());if(!P)return;P!==t.get()&&t.set(P),await lr();const $=document.getElementById(U.menu.get());if(!Ge($))return;const ae=$.querySelector("[aria-selected=true]");Ge(ae)&&n.set(ae)}function Ue(){l.set(!1),n.set(null)}const $n=Uc({open:l,forceVisible:g,activeTrigger:t}),Un=St([s],([P])=>$=>Array.isArray(P)?P.some(ae=>Mn(ae.value,$)):Hc($)?Mn(P==null?void 0:P.value,Gc($,void 0)):Mn(P==null?void 0:P.value,$)),Ur=St([o],([P])=>$=>Mn(P==null?void 0:P.value,$)),Hr=Ke(M("trigger"),{stores:[l,n,w,U.menu,U.trigger,U.label],returned:([P,$,ae,He,en,ue])=>({"aria-activedescendant":$==null?void 0:$.id,"aria-autocomplete":"list","aria-controls":He,"aria-expanded":P,"aria-labelledby":ue,id:en,role:"combobox",disabled:mr(ae),type:e.builder==="select"?"button":void 0}),action:P=>{const $=Mi(P),ae=an(lt(P,"click",()=>{P.focus(),l.get()?Ue():pe()}),lt(P,"keydown",ue=>{if(!l.get()){if(zu.includes(ue.key)||ue.key===Y.TAB||ue.key===Y.BACKSPACE&&$&&P.value===""||ue.key===Y.SPACE&&Ms(P))return;pe(),lr().then(()=>{if(s.get())return;const Rt=document.getElementById(U.menu.get());if(!Ge(Rt))return;const _e=Array.from(Rt.querySelectorAll(`${x("item")}:not([data-disabled]):not([data-hidden])`)).filter(yt=>Ge(yt));_e.length&&(ue.key===Y.ARROW_DOWN?(n.set(_e[0]),_e[0].scrollIntoView({block:u.get()})):ue.key===Y.ARROW_UP&&(n.set(ar(_e)),ar(_e).scrollIntoView({block:u.get()})))})}if(ue.key===Y.TAB){Ue();return}if(ue.key===Y.ENTER&&!ue.isComposing||ue.key===Y.SPACE&&Ms(P)){ue.preventDefault();const Le=n.get();Le&&O(Le),y.get()||Ue()}if(ue.key===Y.ARROW_UP&&ue.altKey&&Ue(),Yc.includes(ue.key)){ue.preventDefault();const Le=document.getElementById(U.menu.get());if(!Ge(Le))return;const Rt=Qr(Le);if(!Rt.length)return;const _e=Rt.filter(Ss=>!ws(Ss)&&Ss.dataset.hidden===void 0),yt=n.get(),Bt=yt?_e.indexOf(yt):-1,Gn=f.get(),qc=u.get();let st;switch(ue.key){case Y.ARROW_DOWN:st=Jl(_e,Bt,Gn);break;case Y.ARROW_UP:st=jl(_e,Bt,Gn);break;case Y.PAGE_DOWN:st=Zc(_e,Bt,10,Gn);break;case Y.PAGE_UP:st=Xc(_e,Bt,10,Gn);break;case Y.HOME:st=_e[0];break;case Y.END:st=ar(_e);break;default:return}n.set(st),st==null||st.scrollIntoView({block:qc})}else if(T.get()){const Le=document.getElementById(U.menu.get());if(!Ge(Le))return;Q(ue.key,Qr(Le))}}));let He=cr;return He=Kl(P,{handler:Ue,enabled:St([l,p],([ue,Hn])=>ue&&Hn)}).destroy,{destroy(){ae(),He()}}}}),Gr=Ke(M("menu"),{stores:[$n,U.menu],returned:([P,$])=>({hidden:P?void 0:!0,id:$,role:"listbox",style:Ts({display:P?void 0:"none"})}),action:P=>{let $=cr;const ae=an(Tn([$n,m,d,b,t],([He,en,ue,Hn,Le])=>{$(),!(!He||!Le)&&lr().then(()=>{$();const Rt=Ru(U.trigger.get());$=Qc(P,{anchorElement:Le,open:l,options:{floating:Hn,focusTrap:null,modal:{closeOnInteractOutside:ue,onClose:Ue,open:He,shouldCloseOnInteractOutside:_e=>{var Bt;if((Bt=D.get())==null||Bt(_e),_e.defaultPrevented)return!1;const yt=_e.target;return!(!ql(yt)||yt===Le||Le.contains(yt)||Rt(_e))}},escapeKeydown:null,portal:eu(P,en)}}).destroy})}));return{destroy:()=>{ae(),$()}}}}),{elements:{root:Yr}}=Bu(),{action:Xr}=tu(Yr),Zr=Ke(M("label"),{stores:[U.label,U.trigger],returned:([P,$])=>({id:P,for:$}),action:Xr}),F=Ke(M("option"),{stores:[Un],returned:([P])=>$=>{const ae=P($.value);return{"data-value":JSON.stringify($.value),"data-label":$.label,"data-disabled":mr($.disabled),"aria-disabled":$.disabled?!0:void 0,"aria-selected":ae,"data-selected":ae?"":void 0,id:nu(),role:"option"}},action:P=>({destroy:an(lt(P,"click",ae=>{if(ws(P)){ae.preventDefault();return}O(P),y.get()||Ue()}),Tn(v,ae=>ae?an(lt(P,"mouseover",()=>{n.set(P)}),lt(P,"mouseleave",()=>{n.set(null)})):void 0))})}),Fc=Ke(M("group"),{returned:()=>P=>({role:"group","aria-labelledby":P})}),Vc=Ke(M("group-label"),{returned:()=>P=>({id:P})}),Lc=ru({value:St([s],([P])=>{const $=Array.isArray(P)?P.map(ae=>ae.value):P==null?void 0:P.value;return typeof $=="string"?$:JSON.stringify($)}),name:iu(j),required:_,prefix:e.builder}),Wc=Ke(M("arrow"),{stores:C,returned:P=>({"data-arrow":!0,style:Ts({position:"absolute",width:`var(--arrow-size, ${P}px)`,height:`var(--arrow-size, ${P}px)`})})});return su(()=>{if(!An)return;const P=document.getElementById(U.menu.get()),$=document.getElementById(U.trigger.get());if($&&t.set($),!P)return;const ae=P.querySelector("[data-selected]");Ge(ae)}),Tn([n],([P])=>{if(!An)return;const $=document.getElementById(U.menu.get());Ge($)&&Qr($).forEach(ae=>{ae===P?ou(ae):lu(ae)})}),Tn([l],([P])=>{if(!An)return;let $=cr;return h.get()&&P&&($=au()),()=>{$()}}),{ids:U,elements:{trigger:Hr,group:Fc,option:F,menu:Gr,groupLabel:Vc,label:Zr,hiddenInput:Lc,arrow:Wc},states:{open:l,selected:s,highlighted:o,highlightedItem:n},helpers:{isSelected:Un,isHighlighted:Ur,closeMenu:Ue},options:c}}const{name:Wu}=$i("combobox");function qu(r){const e=Lu({...r,builder:"combobox",typeahead:!1}),t=Vt(""),n=Vt(!1),i=Ke(Wu("input"),{stores:[e.elements.trigger,t],returned:([s,o])=>({...pr(s,"action"),role:"combobox",value:o,autocomplete:"off"}),action:s=>{const o=an(lt(s,"input",u=>{!Mi(u.target)&&!Es(u.target)||n.set(!0)}),uu(s,"input",u=>{Mi(u.target)&&t.set(u.target.value),Es(u.target)&&t.set(u.target.innerText)}));let a=cr;a=Kl(s,{handler:()=>{e.helpers.closeMenu()}}).destroy;const{destroy:c}=e.elements.trigger(s);return{destroy(){c==null||c(),o(),a()}}}});return Tn(e.states.open,s=>{s||n.set(!1)}),{...e,elements:{...pr(e.elements,"trigger"),input:i},states:{...e.states,touchedInput:n,inputValue:t}}}const ju={orientation:"horizontal",activateOnFocus:!0,loop:!0,autoSet:!0},{name:Xn,selector:Ju}=$i("tabs");function Ku(r){const e={...ju,...r},t=Ci(pr(e,"defaultValue","value","onValueChange","autoSet")),{orientation:n,activateOnFocus:i,loop:s}=t,o=e.value??Vt(e.defaultValue),a=Si(o,e==null?void 0:e.onValueChange);let l=e.defaultValue??a.get();const c=Ke(Xn(),{stores:n,returned:h=>({"data-orientation":h})}),u=Ke(Xn("list"),{stores:n,returned:h=>({role:"tablist","aria-orientation":h,"data-orientation":h})}),f=h=>typeof h=="string"?{value:h}:h,d=Ke(Xn("trigger"),{stores:[a,n],returned:([h,m])=>g=>{const{value:b,disabled:y}=f(g);!h&&!l&&e.autoSet&&(l=b,h=b,a.set(b));const w=(An?h:l)===b;return{type:"button",role:"tab","data-state":w?"active":"inactive",tabindex:w?0:-1,"data-value":b,"data-orientation":m,"data-disabled":mr(y),disabled:mr(y)}},action:h=>({destroy:an(lt(h,"focus",()=>{const g=h.dataset.disabled==="true",b=h.dataset.value;i.get()&&!g&&b!==void 0&&a.set(b)}),lt(h,"click",g=>{if(h.focus(),g.preventDefault(),h.dataset.disabled==="true")return;const y=h.dataset.value;h.focus(),y!==void 0&&a.set(y)}),lt(h,"keydown",g=>{const b=h.dataset.value;if(!b)return;const y=g.currentTarget;if(!Ge(y))return;const C=y.closest(Ju());if(!Ge(C))return;const w=s.get(),T=Array.from(C.querySelectorAll('[role="tab"]')).filter(x=>Ge(x)).filter(x=>!x.hasAttribute("data-disabled")),j=T.findIndex(x=>x===g.target),v=Pu(C),{nextKey:D,prevKey:M}=fu(v,n.get());g.key===D?(g.preventDefault(),Jl(T,j,w).focus()):g.key===M?(g.preventDefault(),jl(T,j,w).focus()):g.key===Y.ENTER||g.key===Y.SPACE?(g.preventDefault(),a.set(b)):g.key===Y.HOME?(g.preventDefault(),T[0].focus()):g.key===Y.END&&(g.preventDefault(),ar(T).focus())}))})}),p=Ke(Xn("content"),{stores:a,returned:h=>m=>({role:"tabpanel","aria-labelledby":m,hidden:An?h===m?void 0:!0:l===m?void 0:!0,tabindex:0})});return{elements:{root:c,list:u,trigger:d,content:p},states:{value:a},options:t}}function $u(r,e){return r.length!==e.length?!1:r.every((t,n)=>t===e[n])}function ts(){return{NAME:"combobox",GROUP_NAME:"combobox-group",ITEM_NAME:"combobox-item",PARTS:["content","menu","input","item","label","group","group-label","arrow","hidden-input","indicator"]}}function Ir(){const{NAME:r}=ts();return pn(r)}function Uu(r){const{NAME:e,PARTS:t}=ts(),n=Ui(e,t),i={...qu({...Hi(r),forceVisible:!0}),getAttrs:n};return Dr(e,i),{...i,updateOption:Gi(i.options)}}function Hu(r){const{ITEM_NAME:e}=ts(),t=Ir();return Dr(e,r),t}function Gu(r){const t={...{side:"bottom",align:"center",sameWidth:!0},...r},{options:{positioning:n}}=Ir();du(n)(t)}const Yu=r=>({ids:r&1}),Ds=r=>({ids:r[0]});function Xu(r){let e;const t=r[24].default,n=ge(t,r,r[23],Ds);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,[s]){n&&n.p&&(!e||s&8388609)&&be(n,t,i,i[23],e?ke(t,i[23],s,Yu):ye(i[23]),Ds)},i(i){e||(k(n,i),e=!0)},o(i){S(n,i),e=!1},d(i){n&&n.d(i)}}}function Zu(r,e,t){let n,i,s,{$$slots:o={},$$scope:a}=e,{required:l=void 0}=e,{disabled:c=void 0}=e,{preventScroll:u=void 0}=e,{loop:f=void 0}=e,{closeOnEscape:d=void 0}=e,{closeOnOutsideClick:p=void 0}=e,{portal:h=void 0}=e,{name:m=void 0}=e,{multiple:g=!1}=e,{selected:b=void 0}=e,{onSelectedChange:y=void 0}=e,{open:C=void 0}=e,{onOpenChange:w=void 0}=e,{items:_=[]}=e,{onOutsideClick:T=void 0}=e,{inputValue:j=""}=e,{touchedInput:v=!1}=e;const{states:{open:D,selected:M,inputValue:x,touchedInput:U},updateOption:Q,ids:I}=Uu({required:l,disabled:c,preventScroll:u,loop:f,closeOnEscape:d,closeOnOutsideClick:p,portal:h,name:m,onOutsideClick:T,multiple:g,forceVisible:!0,defaultSelected:Array.isArray(b)?[...b]:b,defaultOpen:C,onSelectedChange:({next:O})=>Array.isArray(O)?((!Array.isArray(b)||!$u(b,O))&&(y==null||y(O),t(4,b=O)),O):(b!==O&&(y==null||y(O),t(4,b=O)),t(6,j=(O==null?void 0:O.label)??(typeof(O==null?void 0:O.value)=="string"?O==null?void 0:O.value:"")),x.set(j),O),onOpenChange:({next:O})=>(C!==O&&(w==null||w(O),t(5,C=O)),O),items:_});oe(r,x,O=>t(21,n=O)),oe(r,U,O=>t(22,i=O));const G=St([I.menu,I.trigger,I.label],([O,pe,Ue])=>({menu:O,trigger:pe,label:Ue}));return oe(r,G,O=>t(0,s=O)),r.$$set=O=>{"required"in O&&t(8,l=O.required),"disabled"in O&&t(9,c=O.disabled),"preventScroll"in O&&t(10,u=O.preventScroll),"loop"in O&&t(11,f=O.loop),"closeOnEscape"in O&&t(12,d=O.closeOnEscape),"closeOnOutsideClick"in O&&t(13,p=O.closeOnOutsideClick),"portal"in O&&t(14,h=O.portal),"name"in O&&t(15,m=O.name),"multiple"in O&&t(16,g=O.multiple),"selected"in O&&t(4,b=O.selected),"onSelectedChange"in O&&t(17,y=O.onSelectedChange),"open"in O&&t(5,C=O.open),"onOpenChange"in O&&t(18,w=O.onOpenChange),"items"in O&&t(19,_=O.items),"onOutsideClick"in O&&t(20,T=O.onOutsideClick),"inputValue"in O&&t(6,j=O.inputValue),"touchedInput"in O&&t(7,v=O.touchedInput),"$$scope"in O&&t(23,a=O.$$scope)},r.$$.update=()=>{r.$$.dirty&4194304&&t(7,v=i),r.$$.dirty&6291456&&i&&t(6,j=n),r.$$.dirty&64&&j!==void 0&&x.set(j),r.$$.dirty&32&&C!==void 0&&D.set(C),r.$$.dirty&16&&b!==void 0&&M.set(Array.isArray(b)?[...b]:b),r.$$.dirty&256&&Q("required",l),r.$$.dirty&512&&Q("disabled",c),r.$$.dirty&1024&&Q("preventScroll",u),r.$$.dirty&2048&&Q("loop",f),r.$$.dirty&4096&&Q("closeOnEscape",d),r.$$.dirty&8192&&Q("closeOnOutsideClick",p),r.$$.dirty&16384&&Q("portal",h),r.$$.dirty&32768&&Q("name",m),r.$$.dirty&65536&&Q("multiple",g),r.$$.dirty&1048576&&Q("onOutsideClick",T)},[s,x,U,G,b,C,j,v,l,c,u,f,d,p,h,m,g,y,w,_,T,n,i,a,o]}class Gl extends qe{constructor(e){super(),je(this,e,Zu,Xu,Ae,{required:8,disabled:9,preventScroll:10,loop:11,closeOnEscape:12,closeOnOutsideClick:13,portal:14,name:15,multiple:16,selected:4,onSelectedChange:17,open:5,onOpenChange:18,items:19,onOutsideClick:20,inputValue:6,touchedInput:7})}}const Qu=r=>({builder:r[0]&256}),xs=r=>({builder:r[8]}),ef=r=>({builder:r[0]&256}),vs=r=>({builder:r[8]}),tf=r=>({builder:r[0]&256}),Is=r=>({builder:r[8]}),nf=r=>({builder:r[0]&256}),Ps=r=>({builder:r[8]}),rf=r=>({builder:r[0]&256}),Rs=r=>({builder:r[8]}),sf=r=>({builder:r[0]&256}),Bs=r=>({builder:r[8]});function of(r){let e,t,n,i;const s=r[26].default,o=ge(s,r,r[25],xs);let a=[r[8],r[13]],l={};for(let c=0;c<a.length;c+=1)l=se(l,a[c]);return{c(){e=B("div"),o&&o.c(),le(e,l)},m(c,u){N(c,e,u),o&&o.m(e,null),r[35](e),t=!0,n||(i=[Je(r[8].action(e)),te(e,"m-pointerleave",r[12]),te(e,"keydown",r[31])],n=!0)},p(c,u){o&&o.p&&(!t||u[0]&33554688)&&be(o,s,c,c[25],t?ke(s,c[25],u,Qu):ye(c[25]),xs),le(e,l=Ve(a,[u[0]&256&&c[8],u[0]&8192&&c[13]]))},i(c){t||(k(o,c),t=!0)},o(c){S(o,c),t=!1},d(c){c&&A(e),o&&o.d(c),r[35](null),n=!1,ft(i)}}}function lf(r){let e,t,n,i,s;const o=r[26].default,a=ge(o,r,r[25],vs);let l=[r[8],r[13]],c={};for(let u=0;u<l.length;u+=1)c=se(c,l[u]);return{c(){e=B("div"),a&&a.c(),le(e,c)},m(u,f){N(u,e,f),a&&a.m(e,null),r[34](e),n=!0,i||(s=[Je(r[8].action(e)),te(e,"m-pointerleave",r[12]),te(e,"keydown",r[30])],i=!0)},p(u,f){r=u,a&&a.p&&(!n||f[0]&33554688)&&be(a,o,r,r[25],n?ke(o,r[25],f,ef):ye(r[25]),vs),le(e,c=Ve(l,[f[0]&256&&r[8],f[0]&8192&&r[13]]))},i(u){n||(k(a,u),t&&t.end(1),n=!0)},o(u){S(a,u),u&&(t=$l(e,r[5],r[6])),n=!1},d(u){u&&A(e),a&&a.d(u),r[34](null),u&&t&&t.end(),i=!1,ft(s)}}}function af(r){let e,t,n,i,s;const o=r[26].default,a=ge(o,r,r[25],Is);let l=[r[8],r[13]],c={};for(let u=0;u<l.length;u+=1)c=se(c,l[u]);return{c(){e=B("div"),a&&a.c(),le(e,c)},m(u,f){N(u,e,f),a&&a.m(e,null),n=!0,i||(s=[Je(r[8].action(e)),te(e,"m-pointerleave",r[12]),te(e,"keydown",r[29])],i=!0)},p(u,f){r=u,a&&a.p&&(!n||f[0]&33554688)&&be(a,o,r,r[25],n?ke(o,r[25],f,tf):ye(r[25]),Is),le(e,c=Ve(l,[f[0]&256&&r[8],f[0]&8192&&r[13]]))},i(u){n||(k(a,u),u&&(t||Yi(()=>{t=Ul(e,r[3],r[4]),t.start()})),n=!0)},o(u){S(a,u),n=!1},d(u){u&&A(e),a&&a.d(u),i=!1,ft(s)}}}function cf(r){let e,t,n,i,s,o;const a=r[26].default,l=ge(a,r,r[25],Ps);let c=[r[8],r[13]],u={};for(let f=0;f<c.length;f+=1)u=se(u,c[f]);return{c(){e=B("div"),l&&l.c(),le(e,u)},m(f,d){N(f,e,d),l&&l.m(e,null),r[33](e),i=!0,s||(o=[Je(r[8].action(e)),te(e,"m-pointerleave",r[12]),te(e,"keydown",r[28])],s=!0)},p(f,d){r=f,l&&l.p&&(!i||d[0]&33554688)&&be(l,a,r,r[25],i?ke(a,r[25],d,nf):ye(r[25]),Ps),le(e,u=Ve(c,[d[0]&256&&r[8],d[0]&8192&&r[13]]))},i(f){i||(k(l,f),f&&Yi(()=>{i&&(n&&n.end(1),t=Ul(e,r[3],r[4]),t.start())}),i=!0)},o(f){S(l,f),t&&t.invalidate(),f&&(n=$l(e,r[5],r[6])),i=!1},d(f){f&&A(e),l&&l.d(f),r[33](null),f&&n&&n.end(),s=!1,ft(o)}}}function uf(r){let e,t,n,i,s;const o=r[26].default,a=ge(o,r,r[25],Rs);let l=[r[8],r[13]],c={};for(let u=0;u<l.length;u+=1)c=se(c,l[u]);return{c(){e=B("div"),a&&a.c(),le(e,c)},m(u,f){N(u,e,f),a&&a.m(e,null),r[32](e),n=!0,i||(s=[Je(r[8].action(e)),te(e,"m-pointerleave",r[12]),te(e,"keydown",r[27])],i=!0)},p(u,f){r=u,a&&a.p&&(!n||f[0]&33554688)&&be(a,o,r,r[25],n?ke(o,r[25],f,rf):ye(r[25]),Rs),le(e,c=Ve(l,[f[0]&256&&r[8],f[0]&8192&&r[13]]))},i(u){n||(k(a,u),u&&Yi(()=>{n&&(t||(t=Os(e,r[1],r[2],!0)),t.run(1))}),n=!0)},o(u){S(a,u),u&&(t||(t=Os(e,r[1],r[2],!1)),t.run(0)),n=!1},d(u){u&&A(e),a&&a.d(u),r[32](null),u&&t&&t.end(),i=!1,ft(s)}}}function ff(r){let e;const t=r[26].default,n=ge(t,r,r[25],Bs);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s[0]&33554688)&&be(n,t,i,i[25],e?ke(t,i[25],s,sf):ye(i[25]),Bs)},i(i){e||(k(n,i),e=!0)},o(i){S(n,i),e=!1},d(i){n&&n.d(i)}}}function df(r){let e,t,n,i;const s=[ff,uf,cf,af,lf,of],o=[];function a(l,c){return l[7]&&l[9]?0:l[1]&&l[9]?1:l[3]&&l[5]&&l[9]?2:l[3]&&l[9]?3:l[5]&&l[9]?4:l[9]?5:-1}return~(e=a(r))&&(t=o[e]=s[e](r)),{c(){t&&t.c(),n=de()},m(l,c){~e&&o[e].m(l,c),N(l,n,c),i=!0},p(l,c){let u=e;e=a(l),e===u?~e&&o[e].p(l,c):(t&&(re(),S(o[u],1,1,()=>{o[u]=null}),ie()),~e?(t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n)):t=null)},i(l){i||(k(t),i=!0)},o(l){S(t),i=!1},d(l){l&&A(n),~e&&o[e].d(l)}}}function hf(r,e,t){let n;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","side","align","sideOffset","alignOffset","collisionPadding","avoidCollisions","collisionBoundary","sameWidth","fitViewport","el"];let s=ve(e,i),o,a,{$$slots:l={},$$scope:c}=e,{transition:u=void 0}=e,{transitionConfig:f=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:p=void 0}=e,{outTransition:h=void 0}=e,{outTransitionConfig:m=void 0}=e,{asChild:g=!1}=e,{id:b=void 0}=e,{side:y="bottom"}=e,{align:C="center"}=e,{sideOffset:w=0}=e,{alignOffset:_=0}=e,{collisionPadding:T=8}=e,{avoidCollisions:j=!0}=e,{collisionBoundary:v=void 0}=e,{sameWidth:D=!0}=e,{fitViewport:M=!1}=e,{el:x=void 0}=e;const{elements:{menu:U},states:{open:Q},ids:I,getAttrs:G}=Ir();oe(r,U,F=>t(24,a=F)),oe(r,Q,F=>t(9,o=F));const O=xr(),pe=G("content");function Ue(F){mt.call(this,r,F)}function $n(F){mt.call(this,r,F)}function Un(F){mt.call(this,r,F)}function Ur(F){mt.call(this,r,F)}function Hr(F){mt.call(this,r,F)}function Gr(F){Re[F?"unshift":"push"](()=>{x=F,t(0,x)})}function Yr(F){Re[F?"unshift":"push"](()=>{x=F,t(0,x)})}function Xr(F){Re[F?"unshift":"push"](()=>{x=F,t(0,x)})}function Zr(F){Re[F?"unshift":"push"](()=>{x=F,t(0,x)})}return r.$$set=F=>{e=se(se({},e),vt(F)),t(13,s=ve(e,i)),"transition"in F&&t(1,u=F.transition),"transitionConfig"in F&&t(2,f=F.transitionConfig),"inTransition"in F&&t(3,d=F.inTransition),"inTransitionConfig"in F&&t(4,p=F.inTransitionConfig),"outTransition"in F&&t(5,h=F.outTransition),"outTransitionConfig"in F&&t(6,m=F.outTransitionConfig),"asChild"in F&&t(7,g=F.asChild),"id"in F&&t(14,b=F.id),"side"in F&&t(15,y=F.side),"align"in F&&t(16,C=F.align),"sideOffset"in F&&t(17,w=F.sideOffset),"alignOffset"in F&&t(18,_=F.alignOffset),"collisionPadding"in F&&t(19,T=F.collisionPadding),"avoidCollisions"in F&&t(20,j=F.avoidCollisions),"collisionBoundary"in F&&t(21,v=F.collisionBoundary),"sameWidth"in F&&t(22,D=F.sameWidth),"fitViewport"in F&&t(23,M=F.fitViewport),"el"in F&&t(0,x=F.el),"$$scope"in F&&t(25,c=F.$$scope)},r.$$.update=()=>{r.$$.dirty[0]&16384&&b&&I.menu.set(b),r.$$.dirty[0]&16777216&&t(8,n=a),r.$$.dirty[0]&256&&Object.assign(n,pe),r.$$.dirty[0]&16744960&&o&&Gu({side:y,align:C,sideOffset:w,alignOffset:_,collisionPadding:T,avoidCollisions:j,collisionBoundary:v,sameWidth:D,fitViewport:M})},[x,u,f,d,p,h,m,g,n,o,U,Q,O,s,b,y,C,w,_,T,j,v,D,M,a,c,l,Ue,$n,Un,Ur,Hr,Gr,Yr,Xr,Zr]}class Yl extends qe{constructor(e){super(),je(this,e,hf,df,Ae,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:14,side:15,align:16,sideOffset:17,alignOffset:18,collisionPadding:19,avoidCollisions:20,collisionBoundary:21,sameWidth:22,fitViewport:23,el:0},null,[-1,-1])}}const pf=r=>({builder:r&8,placeholder:r&4}),zs=r=>({builder:r[3],placeholder:r[2]});function mf(r){let e,t,n,i=[r[3],r[6],{placeholder:r[2]}],s={};for(let o=0;o<i.length;o+=1)s=se(s,i[o]);return{c(){e=B("input"),le(e,s)},m(o,a){N(o,e,a),e.autofocus&&e.focus(),r[11](e),t||(n=[Je(r[3].action(e)),te(e,"m-click",r[5]),te(e,"m-keydown",r[5]),te(e,"m-input",r[5])],t=!0)},p(o,a){le(e,s=Ve(i,[a&8&&o[3],a&64&&o[6],a&4&&{placeholder:o[2]}]))},i:ne,o:ne,d(o){o&&A(e),r[11](null),t=!1,ft(n)}}}function gf(r){let e;const t=r[10].default,n=ge(t,r,r[9],zs);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&524)&&be(n,t,i,i[9],e?ke(t,i[9],s,pf):ye(i[9]),zs)},i(i){e||(k(n,i),e=!0)},o(i){S(n,i),e=!1},d(i){n&&n.d(i)}}}function bf(r){let e,t,n,i;const s=[gf,mf],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),N(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(re(),S(o[u],1,1,()=>{o[u]=null}),ie(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){S(t),i=!1},d(l){l&&A(n),o[e].d(l)}}}function yf(r,e,t){let n;const i=["asChild","placeholder","el","id"];let s=ve(e,i),o,{$$slots:a={},$$scope:l}=e,{asChild:c=!1}=e,{placeholder:u=void 0}=e,{el:f=void 0}=e,{id:d=void 0}=e;const{elements:{input:p},ids:h,getAttrs:m}=Ir();oe(r,p,C=>t(8,o=C));const g=xr(),b=m("input");function y(C){Re[C?"unshift":"push"](()=>{f=C,t(0,f)})}return r.$$set=C=>{e=se(se({},e),vt(C)),t(6,s=ve(e,i)),"asChild"in C&&t(1,c=C.asChild),"placeholder"in C&&t(2,u=C.placeholder),"el"in C&&t(0,f=C.el),"id"in C&&t(7,d=C.id),"$$scope"in C&&t(9,l=C.$$scope)},r.$$.update=()=>{r.$$.dirty&128&&d&&h.trigger.set(d),r.$$.dirty&256&&t(3,n=o),r.$$.dirty&8&&Object.assign(n,b)},[f,c,u,n,p,g,s,d,o,l,a,y]}class Xl extends qe{constructor(e){super(),je(this,e,yf,bf,Ae,{asChild:1,placeholder:2,el:0,id:7})}}const kf=r=>({builder:r&16,isSelected:r&32}),Fs=r=>({builder:r[4],isSelected:r[5]}),_f=r=>({builder:r&16,isSelected:r&32}),Vs=r=>({builder:r[4],isSelected:r[5]});function Sf(r){let e,t,n,i;const s=r[14].default,o=ge(s,r,r[13],Fs),a=o||Mf(r);let l=[r[4],r[9]],c={};for(let u=0;u<l.length;u+=1)c=se(c,l[u]);return{c(){e=B("div"),a.c(),le(e,c)},m(u,f){N(u,e,f),a.m(e,null),r[19](e),t=!0,n||(i=[Je(r[4].action(e)),te(e,"m-click",r[8]),te(e,"m-pointermove",r[8]),te(e,"focusin",r[15]),te(e,"keydown",r[16]),te(e,"focusout",r[17]),te(e,"pointerleave",r[18])],n=!0)},p(u,f){o?o.p&&(!t||f&8240)&&be(o,s,u,u[13],t?ke(s,u[13],f,kf):ye(u[13]),Fs):a.p&&(!t||f&5)&&a.p(u,t?f:-1),le(e,c=Ve(l,[f&16&&u[4],f&512&&u[9]]))},i(u){t||(k(a,u),t=!0)},o(u){S(a,u),t=!1},d(u){u&&A(e),a.d(u),r[19](null),n=!1,ft(i)}}}function Cf(r){let e;const t=r[14].default,n=ge(t,r,r[13],Vs);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&8240)&&be(n,t,i,i[13],e?ke(t,i[13],s,_f):ye(i[13]),Vs)},i(i){e||(k(n,i),e=!0)},o(i){S(n,i),e=!1},d(i){n&&n.d(i)}}}function Mf(r){let e=(r[0]||r[2])+"",t;return{c(){t=he(e)},m(n,i){N(n,t,i)},p(n,i){i&5&&e!==(e=(n[0]||n[2])+"")&&Ie(t,e)},d(n){n&&A(t)}}}function wf(r){let e,t,n,i;const s=[Cf,Sf],o=[];function a(l,c){return l[3]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),N(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(re(),S(o[u],1,1,()=>{o[u]=null}),ie(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){S(t),i=!1},d(l){l&&A(n),o[e].d(l)}}}function Tf(r,e,t){let n,i;const s=["value","disabled","label","asChild","el"];let o=ve(e,s),a,l,{$$slots:c={},$$scope:u}=e,{value:f}=e,{disabled:d=void 0}=e,{label:p=void 0}=e,{asChild:h=!1}=e,{el:m=void 0}=e;const{elements:{option:g},helpers:{isSelected:b},getAttrs:y}=Hu(f);oe(r,g,M=>t(12,l=M)),oe(r,b,M=>t(11,a=M));const C=xr(),w=y("item");function _(M){mt.call(this,r,M)}function T(M){mt.call(this,r,M)}function j(M){mt.call(this,r,M)}function v(M){mt.call(this,r,M)}function D(M){Re[M?"unshift":"push"](()=>{m=M,t(1,m)})}return r.$$set=M=>{e=se(se({},e),vt(M)),t(9,o=ve(e,s)),"value"in M&&t(2,f=M.value),"disabled"in M&&t(10,d=M.disabled),"label"in M&&t(0,p=M.label),"asChild"in M&&t(3,h=M.asChild),"el"in M&&t(1,m=M.el),"$$scope"in M&&t(13,u=M.$$scope)},r.$$.update=()=>{r.$$.dirty&5&&!p&&typeof f=="string"&&t(0,p=f),r.$$.dirty&5125&&t(4,n=l({value:f,disabled:d,label:p})),r.$$.dirty&16&&Object.assign(n,w),r.$$.dirty&2052&&t(5,i=a(f))},[p,m,f,h,n,i,g,b,C,o,d,a,l,u,c,_,T,j,v,D]}class Zl extends qe{constructor(e){super(),je(this,e,Tf,wf,Ae,{value:2,disabled:10,label:0,asChild:3,el:1})}}function Ef(){return{NAME:"separator",PARTS:["root"]}}function Of(r){const{NAME:e,PARTS:t}=Ef(),n=Ui(e,t),i={...hu(Hi(r)),getAttrs:n};return{...i,updateOption:Gi(i.options)}}const Nf=r=>({builder:r&4}),Ls=r=>({builder:r[2]});function Af(r){let e,t,n,i=[r[2],r[4]],s={};for(let o=0;o<i.length;o+=1)s=se(s,i[o]);return{c(){e=B("div"),le(e,s)},m(o,a){N(o,e,a),r[10](e),t||(n=Je(r[2].action(e)),t=!0)},p(o,a){le(e,s=Ve(i,[a&4&&o[2],a&16&&o[4]]))},i:ne,o:ne,d(o){o&&A(e),r[10](null),t=!1,n()}}}function Df(r){let e;const t=r[9].default,n=ge(t,r,r[8],Ls);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&260)&&be(n,t,i,i[8],e?ke(t,i[8],s,Nf):ye(i[8]),Ls)},i(i){e||(k(n,i),e=!0)},o(i){S(n,i),e=!1},d(i){n&&n.d(i)}}}function xf(r){let e,t,n,i;const s=[Df,Af],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),N(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(re(),S(o[u],1,1,()=>{o[u]=null}),ie(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){S(t),i=!1},d(l){l&&A(n),o[e].d(l)}}}function vf(r,e,t){let n;const i=["orientation","decorative","asChild","el"];let s=ve(e,i),o,{$$slots:a={},$$scope:l}=e,{orientation:c="horizontal"}=e,{decorative:u=!0}=e,{asChild:f=!1}=e,{el:d=void 0}=e;const{elements:{root:p},updateOption:h,getAttrs:m}=Of({orientation:c,decorative:u});oe(r,p,y=>t(7,o=y));const g=m("root");function b(y){Re[y?"unshift":"push"](()=>{d=y,t(0,d)})}return r.$$set=y=>{e=se(se({},e),vt(y)),t(4,s=ve(e,i)),"orientation"in y&&t(5,c=y.orientation),"decorative"in y&&t(6,u=y.decorative),"asChild"in y&&t(1,f=y.asChild),"el"in y&&t(0,d=y.el),"$$scope"in y&&t(8,l=y.$$scope)},r.$$.update=()=>{r.$$.dirty&32&&h("orientation",c),r.$$.dirty&64&&h("decorative",u),r.$$.dirty&128&&t(2,n=o),r.$$.dirty&4&&Object.assign(n,g)},[d,f,n,p,s,c,u,o,l,a,b]}class Ql extends qe{constructor(e){super(),je(this,e,vf,xf,Ae,{orientation:5,decorative:6,asChild:1,el:0})}}function ea(){return{NAME:"tabs",PARTS:["root","content","list","trigger"]}}function If(r){const{NAME:e,PARTS:t}=ea(),n=Ui(e,t),i={...Ku(Hi(r)),getAttrs:n};return Dr(e,i),{...i,updateOption:Gi(i.options)}}function ns(){const{NAME:r}=ea();return pn(r)}const Pf=r=>({builder:r&4,value:r&8}),Ws=r=>({builder:r[2],value:r[3]}),Rf=r=>({builder:r&4,value:r&8}),qs=r=>({builder:r[2],value:r[3]});function Bf(r){let e,t,n,i;const s=r[15].default,o=ge(s,r,r[14],Ws);let a=[r[2],r[6]],l={};for(let c=0;c<a.length;c+=1)l=se(l,a[c]);return{c(){e=B("div"),o&&o.c(),le(e,l)},m(c,u){N(c,e,u),o&&o.m(e,null),r[16](e),t=!0,n||(i=Je(r[2].action(e)),n=!0)},p(c,u){o&&o.p&&(!t||u&16396)&&be(o,s,c,c[14],t?ke(s,c[14],u,Pf):ye(c[14]),Ws),le(e,l=Ve(a,[u&4&&c[2],u&64&&c[6]]))},i(c){t||(k(o,c),t=!0)},o(c){S(o,c),t=!1},d(c){c&&A(e),o&&o.d(c),r[16](null),n=!1,i()}}}function zf(r){let e;const t=r[15].default,n=ge(t,r,r[14],qs);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&16396)&&be(n,t,i,i[14],e?ke(t,i[14],s,Rf):ye(i[14]),qs)},i(i){e||(k(n,i),e=!0)},o(i){S(n,i),e=!1},d(i){n&&n.d(i)}}}function Ff(r){let e,t,n,i;const s=[zf,Bf],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),N(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(re(),S(o[u],1,1,()=>{o[u]=null}),ie(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){S(t),i=!1},d(l){l&&A(n),o[e].d(l)}}}function Vf(r,e,t){let n;const i=["orientation","activateOnFocus","loop","autoSet","value","onValueChange","asChild","el"];let s=ve(e,i),o,a,{$$slots:l={},$$scope:c}=e,{orientation:u=void 0}=e,{activateOnFocus:f=void 0}=e,{loop:d=void 0}=e,{autoSet:p=void 0}=e,{value:h=void 0}=e,{onValueChange:m=void 0}=e,{asChild:g=!1}=e,{el:b=void 0}=e;const{elements:{root:y},states:{value:C},updateOption:w,getAttrs:_}=If({orientation:u,activateOnFocus:f,loop:d,autoSet:p,defaultValue:h,onValueChange:({next:v})=>(h!==v&&(m==null||m(v),t(7,h=v)),v)});oe(r,y,v=>t(13,o=v)),oe(r,C,v=>t(3,a=v));const T=_("root");function j(v){Re[v?"unshift":"push"](()=>{b=v,t(0,b)})}return r.$$set=v=>{e=se(se({},e),vt(v)),t(6,s=ve(e,i)),"orientation"in v&&t(8,u=v.orientation),"activateOnFocus"in v&&t(9,f=v.activateOnFocus),"loop"in v&&t(10,d=v.loop),"autoSet"in v&&t(11,p=v.autoSet),"value"in v&&t(7,h=v.value),"onValueChange"in v&&t(12,m=v.onValueChange),"asChild"in v&&t(1,g=v.asChild),"el"in v&&t(0,b=v.el),"$$scope"in v&&t(14,c=v.$$scope)},r.$$.update=()=>{r.$$.dirty&128&&h!==void 0&&C.set(h),r.$$.dirty&256&&w("orientation",u),r.$$.dirty&512&&w("activateOnFocus",f),r.$$.dirty&1024&&w("loop",d),r.$$.dirty&2048&&w("autoSet",p),r.$$.dirty&8192&&t(2,n=o),r.$$.dirty&4&&Object.assign(n,T)},[b,g,n,a,y,C,s,h,u,f,d,p,m,o,c,l,j]}class Lf extends qe{constructor(e){super(),je(this,e,Vf,Ff,Ae,{orientation:8,activateOnFocus:9,loop:10,autoSet:11,value:7,onValueChange:12,asChild:1,el:0})}}const Wf=r=>({builder:r&4}),js=r=>({builder:r[2]}),qf=r=>({builder:r&4}),Js=r=>({builder:r[2]});function jf(r){let e,t,n,i;const s=r[8].default,o=ge(s,r,r[7],js);let a=[r[2],r[4]],l={};for(let c=0;c<a.length;c+=1)l=se(l,a[c]);return{c(){e=B("div"),o&&o.c(),le(e,l)},m(c,u){N(c,e,u),o&&o.m(e,null),r[9](e),t=!0,n||(i=Je(r[2].action(e)),n=!0)},p(c,u){o&&o.p&&(!t||u&132)&&be(o,s,c,c[7],t?ke(s,c[7],u,Wf):ye(c[7]),js),le(e,l=Ve(a,[u&4&&c[2],u&16&&c[4]]))},i(c){t||(k(o,c),t=!0)},o(c){S(o,c),t=!1},d(c){c&&A(e),o&&o.d(c),r[9](null),n=!1,i()}}}function Jf(r){let e;const t=r[8].default,n=ge(t,r,r[7],Js);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&132)&&be(n,t,i,i[7],e?ke(t,i[7],s,qf):ye(i[7]),Js)},i(i){e||(k(n,i),e=!0)},o(i){S(n,i),e=!1},d(i){n&&n.d(i)}}}function Kf(r){let e,t,n,i;const s=[Jf,jf],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),N(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(re(),S(o[u],1,1,()=>{o[u]=null}),ie(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){S(t),i=!1},d(l){l&&A(n),o[e].d(l)}}}function $f(r,e,t){let n;const i=["value","asChild","el"];let s=ve(e,i),o,{$$slots:a={},$$scope:l}=e,{value:c}=e,{asChild:u=!1}=e,{el:f=void 0}=e;const{elements:{content:d},getAttrs:p}=ns();oe(r,d,g=>t(6,o=g));const h=p("content");function m(g){Re[g?"unshift":"push"](()=>{f=g,t(0,f)})}return r.$$set=g=>{e=se(se({},e),vt(g)),t(4,s=ve(e,i)),"value"in g&&t(5,c=g.value),"asChild"in g&&t(1,u=g.asChild),"el"in g&&t(0,f=g.el),"$$scope"in g&&t(7,l=g.$$scope)},r.$$.update=()=>{r.$$.dirty&96&&t(2,n=o(c)),r.$$.dirty&4&&Object.assign(n,h)},[f,u,n,d,s,c,o,l,a,m]}class Uf extends qe{constructor(e){super(),je(this,e,$f,Kf,Ae,{value:5,asChild:1,el:0})}}const Hf=r=>({builder:r&4}),Ks=r=>({builder:r[2]}),Gf=r=>({builder:r&4}),$s=r=>({builder:r[2]});function Yf(r){let e,t,n,i;const s=r[7].default,o=ge(s,r,r[6],Ks);let a=[r[2],r[4]],l={};for(let c=0;c<a.length;c+=1)l=se(l,a[c]);return{c(){e=B("div"),o&&o.c(),le(e,l)},m(c,u){N(c,e,u),o&&o.m(e,null),r[8](e),t=!0,n||(i=Je(r[2].action(e)),n=!0)},p(c,u){o&&o.p&&(!t||u&68)&&be(o,s,c,c[6],t?ke(s,c[6],u,Hf):ye(c[6]),Ks),le(e,l=Ve(a,[u&4&&c[2],u&16&&c[4]]))},i(c){t||(k(o,c),t=!0)},o(c){S(o,c),t=!1},d(c){c&&A(e),o&&o.d(c),r[8](null),n=!1,i()}}}function Xf(r){let e;const t=r[7].default,n=ge(t,r,r[6],$s);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&68)&&be(n,t,i,i[6],e?ke(t,i[6],s,Gf):ye(i[6]),$s)},i(i){e||(k(n,i),e=!0)},o(i){S(n,i),e=!1},d(i){n&&n.d(i)}}}function Zf(r){let e,t,n,i;const s=[Xf,Yf],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),N(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(re(),S(o[u],1,1,()=>{o[u]=null}),ie(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){S(t),i=!1},d(l){l&&A(n),o[e].d(l)}}}function Qf(r,e,t){let n;const i=["asChild","el"];let s=ve(e,i),o,{$$slots:a={},$$scope:l}=e,{asChild:c=!1}=e,{el:u=void 0}=e;const{elements:{list:f},getAttrs:d}=ns();oe(r,f,m=>t(5,o=m));const p=d("list");function h(m){Re[m?"unshift":"push"](()=>{u=m,t(0,u)})}return r.$$set=m=>{e=se(se({},e),vt(m)),t(4,s=ve(e,i)),"asChild"in m&&t(1,c=m.asChild),"el"in m&&t(0,u=m.el),"$$scope"in m&&t(6,l=m.$$scope)},r.$$.update=()=>{r.$$.dirty&32&&t(2,n=o),r.$$.dirty&4&&Object.assign(n,p)},[u,c,n,f,s,o,l,a,h]}class ed extends qe{constructor(e){super(),je(this,e,Qf,Zf,Ae,{asChild:1,el:0})}}const td=r=>({builder:r&4}),Us=r=>({builder:r[2]}),nd=r=>({builder:r&4}),Hs=r=>({builder:r[2]});function rd(r){let e,t,n,i;const s=r[10].default,o=ge(s,r,r[9],Us);let a=[r[2],{type:"button"},r[5]],l={};for(let c=0;c<a.length;c+=1)l=se(l,a[c]);return{c(){e=B("button"),o&&o.c(),le(e,l)},m(c,u){N(c,e,u),o&&o.m(e,null),e.autofocus&&e.focus(),r[11](e),t=!0,n||(i=[Je(r[2].action(e)),te(e,"m-click",r[4]),te(e,"m-focus",r[4]),te(e,"m-keydown",r[4])],n=!0)},p(c,u){o&&o.p&&(!t||u&516)&&be(o,s,c,c[9],t?ke(s,c[9],u,td):ye(c[9]),Us),le(e,l=Ve(a,[u&4&&c[2],{type:"button"},u&32&&c[5]]))},i(c){t||(k(o,c),t=!0)},o(c){S(o,c),t=!1},d(c){c&&A(e),o&&o.d(c),r[11](null),n=!1,ft(i)}}}function id(r){let e;const t=r[10].default,n=ge(t,r,r[9],Hs);return{c(){n&&n.c()},m(i,s){n&&n.m(i,s),e=!0},p(i,s){n&&n.p&&(!e||s&516)&&be(n,t,i,i[9],e?ke(t,i[9],s,nd):ye(i[9]),Hs)},i(i){e||(k(n,i),e=!0)},o(i){S(n,i),e=!1},d(i){n&&n.d(i)}}}function sd(r){let e,t,n,i;const s=[id,rd],o=[];function a(l,c){return l[1]?0:1}return e=a(r),t=o[e]=s[e](r),{c(){t.c(),n=de()},m(l,c){o[e].m(l,c),N(l,n,c),i=!0},p(l,[c]){let u=e;e=a(l),e===u?o[e].p(l,c):(re(),S(o[u],1,1,()=>{o[u]=null}),ie(),t=o[e],t?t.p(l,c):(t=o[e]=s[e](l),t.c()),k(t,1),t.m(n.parentNode,n))},i(l){i||(k(t),i=!0)},o(l){S(t),i=!1},d(l){l&&A(n),o[e].d(l)}}}function od(r,e,t){let n;const i=["value","disabled","asChild","el"];let s=ve(e,i),o,{$$slots:a={},$$scope:l}=e,{value:c}=e,{disabled:u=void 0}=e,{asChild:f=!1}=e,{el:d=void 0}=e;const{elements:{trigger:p},getAttrs:h}=ns();oe(r,p,y=>t(8,o=y));const m=xr(),g=h("trigger");function b(y){Re[y?"unshift":"push"](()=>{d=y,t(0,d)})}return r.$$set=y=>{e=se(se({},e),vt(y)),t(5,s=ve(e,i)),"value"in y&&t(6,c=y.value),"disabled"in y&&t(7,u=y.disabled),"asChild"in y&&t(1,f=y.asChild),"el"in y&&t(0,d=y.el),"$$scope"in y&&t(9,l=y.$$scope)},r.$$.update=()=>{r.$$.dirty&448&&t(2,n=o({value:c,disabled:u})),r.$$.dirty&4&&Object.assign(n,g)},[d,f,n,p,m,s,c,u,o,l,a,b]}class ld extends qe{constructor(e){super(),je(this,e,od,sd,Ae,{value:6,disabled:7,asChild:1,el:0})}}/*!
|
|
2
2
|
* deep-eql
|
|
3
3
|
* Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
|
|
4
4
|
* MIT Licensed
|