cognova 0.2.8 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{CH_jROT9.js → 0NJ3PaRM.js} +1 -1
- package/.output/public/_nuxt/{C075hYlX.js → 0yk-pS3R.js} +2 -2
- package/.output/public/_nuxt/{CVYcsqmL.js → 10_wwHSz.js} +1 -1
- package/.output/public/_nuxt/{BUC36BHp.js → 1zUTf4AP.js} +1 -1
- package/.output/public/_nuxt/{njnzCNrH.js → 2dNDtTiv.js} +3 -3
- package/.output/public/_nuxt/{B8TQvzYX.js → 2nOqGUPr.js} +1 -1
- package/.output/public/_nuxt/{ijmD2cEW.js → 3jQMk_5H.js} +1 -1
- package/.output/public/_nuxt/{D4X6ONPF.js → 4K03TkGA.js} +1 -1
- package/.output/public/_nuxt/{C3tximD1.js → 6boMs_nF.js} +1 -1
- package/.output/public/_nuxt/{Drxf7nJz.js → 7oCGSglN.js} +1 -1
- package/.output/public/_nuxt/{Dt5mOzXj.js → 8q5NepGW.js} +1 -1
- package/.output/public/_nuxt/{GYf-vnR6.js → B93pdGAW.js} +1 -1
- package/.output/public/_nuxt/{BZBNJD7U.js → BA_pRWwX.js} +1 -1
- package/.output/public/_nuxt/{eE8TtXgC.js → BDyn4ApB.js} +3 -3
- package/.output/public/_nuxt/{0dqQoCHY.js → BGgwYWjH.js} +1 -1
- package/.output/public/_nuxt/{BrOKokPO.js → BH0QDWEm.js} +1 -1
- package/.output/public/_nuxt/{B5SnZL2l.js → BHtY0l0l.js} +1 -1
- package/.output/public/_nuxt/{ImPsUDiH.js → BIXrSYwR.js} +1 -1
- package/.output/public/_nuxt/BK8S2ony.js +1 -0
- package/.output/public/_nuxt/{Bkc1Hpcf.js → BKXg-alD.js} +1 -1
- package/.output/public/_nuxt/{BahXyh-A.js → BLnYhy_t.js} +1 -1
- package/.output/public/_nuxt/{Bhhg7oSf.js → BR8bKz8h.js} +1 -1
- package/.output/public/_nuxt/{D2kQkOaG.js → BS2ZNXI1.js} +1 -1
- package/.output/public/_nuxt/{BLm0UviR.js → BUghTae1.js} +1 -1
- package/.output/public/_nuxt/{D4_89MZm.js → BXuWCWsJ.js} +1 -1
- package/.output/public/_nuxt/{LQNRVThr.js → BYHCP8x7.js} +1 -1
- package/.output/public/_nuxt/{BYtVdUIW.js → BZrSPX0S.js} +1 -1
- package/.output/public/_nuxt/{U3f6dy8i.js → B_wilgcd.js} +1 -1
- package/.output/public/_nuxt/BaZwjF8o.js +1 -0
- package/.output/public/_nuxt/{BefOhWHD.js → Bciqk4dX.js} +1 -1
- package/.output/public/_nuxt/{CewcVxDS.js → Beom-INj.js} +1 -1
- package/.output/public/_nuxt/{BlsIfvSf.js → BfcLZ_fC.js} +1 -1
- package/.output/public/_nuxt/{dB7G4iIC.js → Bk6JUtIo.js} +1 -1
- package/.output/public/_nuxt/BkfI94R8.js +1 -0
- package/.output/public/_nuxt/{DqzomZoo.js → BmOtR1wX.js} +1 -1
- package/.output/public/_nuxt/{4XnyUc7C.js → BmVLxnDU.js} +1 -1
- package/.output/public/_nuxt/{DtJnWtpL.js → BtHQ1T0f.js} +1 -1
- package/.output/public/_nuxt/{DcbbfwCe.js → ByYh0uRg.js} +1 -1
- package/.output/public/_nuxt/{CbvNJVrk.js → C27WoGNZ.js} +1 -1
- package/.output/public/_nuxt/{CY7f553E.js → C2FxZbO_.js} +1 -1
- package/.output/public/_nuxt/{zO9MgHj2.js → C2vq6Te8.js} +1 -1
- package/.output/public/_nuxt/{BXtZVbmx.js → C39dQ88F.js} +1 -1
- package/.output/public/_nuxt/{DmDPSvxi.js → C3NST0BU.js} +1 -1
- package/.output/public/_nuxt/{nHSiDk8N.js → C4mwL7SE.js} +1 -1
- package/.output/public/_nuxt/{BBDxhFYY.js → C5R5QaCA.js} +1 -1
- package/.output/public/_nuxt/{D79lbuWG.js → C6qKcgOY.js} +1 -1
- package/.output/public/_nuxt/{C-HCArYP.js → C71_a1IX.js} +1 -1
- package/.output/public/_nuxt/{CSjOaBKu.js → C9WIgRRL.js} +1 -1
- package/.output/public/_nuxt/{DmOS3vFH.js → CBTkrk2M.js} +1 -1
- package/.output/public/_nuxt/CEnSeCqn.js +1 -0
- package/.output/public/_nuxt/{CAfyXyeo.js → CKxSHyww.js} +1 -1
- package/.output/public/_nuxt/{D4Cizi4y.js → CLfF6dSn.js} +1 -1
- package/.output/public/_nuxt/{C7qhmmZh.js → CPutXj8l.js} +1 -1
- package/.output/public/_nuxt/{BCCYopTB.js → CQqCBrXj.js} +1 -1
- package/.output/public/_nuxt/{D-Ge96eV.js → CSKJ-Ahh.js} +1 -1
- package/.output/public/_nuxt/{B2Xfh7am.js → CTCcEJU3.js} +1 -1
- package/.output/public/_nuxt/{BnJ-6YDw.js → CVFwOzbl.js} +1 -1
- package/.output/public/_nuxt/{C21BjagS.js → CVdCqaby.js} +1 -1
- package/.output/public/_nuxt/{2QHXgMyi.js → CVqlefTY.js} +1 -1
- package/.output/public/_nuxt/CWyMCJQH.js +1 -0
- package/.output/public/_nuxt/{B6-U3KqJ.js → CY-QVcA5.js} +2 -2
- package/.output/public/_nuxt/{Cr0NfhPB.js → CY-cjAwJ.js} +1 -1
- package/.output/public/_nuxt/{Bwn-CRYH.js → CYPO5o_C.js} +1 -1
- package/.output/public/_nuxt/{B-AlyT2D.js → CZRnNmU8.js} +1 -1
- package/.output/public/_nuxt/{DwIYtFfA.js → CZVzFlpI.js} +1 -1
- package/.output/public/_nuxt/{BkO884Ds.js → CZoEPC_Q.js} +3 -3
- package/.output/public/_nuxt/{BJUff9Ku.js → Cc-2ziaZ.js} +1 -1
- package/.output/public/_nuxt/{BLwctszt.js → ChcO9s3o.js} +1 -1
- package/.output/public/_nuxt/{DX_9SfFb.js → Cl-LOSDV.js} +1 -1
- package/.output/public/_nuxt/{CSHcfejh.js → CobqYwkp.js} +1 -1
- package/.output/public/_nuxt/{B0xuHXvN.js → CqNwHCpo.js} +1 -1
- package/.output/public/_nuxt/{DMb_1D81.js → CuxrHsu-.js} +1 -1
- package/.output/public/_nuxt/{GGcn5KPW.js → CwPdIZ9J.js} +1 -1
- package/.output/public/_nuxt/{D7pKT3IW.js → D0ifH682.js} +1 -1
- package/.output/public/_nuxt/{KEeoKtq_.js → D3AZaldL.js} +1 -1
- package/.output/public/_nuxt/{BdxP21ep.js → D4UJwDQJ.js} +1 -1
- package/.output/public/_nuxt/{C-Ygk9x5.js → D5jZq8b3.js} +1 -1
- package/.output/public/_nuxt/{B6G3NLfW.js → D5q8SnqE.js} +1 -1
- package/.output/public/_nuxt/{CDkyQ1eQ.js → D8M722pn.js} +1 -1
- package/.output/public/_nuxt/{BjnQ1pI1.js → D8lwrAYS.js} +1 -1
- package/.output/public/_nuxt/{C13FKhqK.js → D9nmzBAw.js} +1 -1
- package/.output/public/_nuxt/{ClGn48iq.js → DC4idAGt.js} +1 -1
- package/.output/public/_nuxt/{vES4kgx7.js → DEd2xVbS.js} +1 -1
- package/.output/public/_nuxt/{CClsKJ9A.js → DH4YkDAi.js} +1 -1
- package/.output/public/_nuxt/{D-5A6cMB.js → DJTCT0bl.js} +1 -1
- package/.output/public/_nuxt/{D_O7SlHm.js → DNP5E1bC.js} +1 -1
- package/.output/public/_nuxt/{BF3tVKtX.js → DO9SFIh1.js} +1 -1
- package/.output/public/_nuxt/DPklr_tJ.js +2 -0
- package/.output/public/_nuxt/{mfAEx0Kz.js → DQM4eBdt.js} +1 -1
- package/.output/public/_nuxt/{cPPThz84.js → DQh6I9z9.js} +1 -1
- package/.output/public/_nuxt/{CXTrUfQ5.js → DS2wStH1.js} +1 -1
- package/.output/public/_nuxt/{CYQP4zpi.js → DTAStixR.js} +1 -1
- package/.output/public/_nuxt/{CEz288t8.js → DTGenhcA.js} +1 -1
- package/.output/public/_nuxt/{B9zgEO8N.js → DUAAXJ6Q.js} +1 -1
- package/.output/public/_nuxt/{CzAZpALW.js → DUVzIl3o.js} +1 -1
- package/.output/public/_nuxt/{DJt7Rogf.js → DXdwpJ-I.js} +1 -1
- package/.output/public/_nuxt/{MWUW1sIF.js → DY3uK7wM.js} +1 -1
- package/.output/public/_nuxt/{CfY_bsV0.js → DYbZBZet.js} +1 -1
- package/.output/public/_nuxt/{DZEuR9ms.js → D_4LPm1U.js} +1 -1
- package/.output/public/_nuxt/{CrmE-JGu.js → Db4KMnt8.js} +1 -1
- package/.output/public/_nuxt/{BwC62XRN.js → DcJbYLTp.js} +1 -1
- package/.output/public/_nuxt/{C6sX7TYf.js → DfF81NlA.js} +1 -1
- package/.output/public/_nuxt/{BHn8tRjg.js → DhI5cA_n.js} +1 -1
- package/.output/public/_nuxt/{CQ3tAemj.js → DhuOKJda.js} +1 -1
- package/.output/public/_nuxt/{D887s9k9.js → Di-Nc75e.js} +1 -1
- package/.output/public/_nuxt/{D_obX2Hj.js → Djs0Tlpa.js} +1 -1
- package/.output/public/_nuxt/DmmdPt_5.js +1 -0
- package/.output/public/_nuxt/{DKKY8zWm.js → Dn5a-guE.js} +1 -1
- package/.output/public/_nuxt/{BvstjGHC.js → DtjjnHnt.js} +1 -1
- package/.output/public/_nuxt/{Dbfwn2zk.js → DuvzM-P1.js} +1 -1
- package/.output/public/_nuxt/{BxShcW0K.js → DwY7rCd_.js} +1 -1
- package/.output/public/_nuxt/{BmaHzvZM.js → Dya5oK8u.js} +1 -1
- package/.output/public/_nuxt/{CO3hceDE.js → DzA58_Lm.js} +1 -1
- package/.output/public/_nuxt/{CF33v_m5.js → DzGy77Vr.js} +1 -1
- package/.output/public/_nuxt/{DmlZSBjF.js → E3rXPwU8.js} +1 -1
- package/.output/public/_nuxt/{CEDw8osP.js → EgKnQnf-.js} +1 -1
- package/.output/public/_nuxt/{it8syoZI.js → GtEM7xVU.js} +1 -1
- package/.output/public/_nuxt/{DLUvsixu.js → H6JbrRBU.js} +1 -1
- package/.output/public/_nuxt/{BE1CVWts.js → ILEvizzp.js} +1 -1
- package/.output/public/_nuxt/{BSA-U0so.js → JX1oqJI9.js} +1 -1
- package/.output/public/_nuxt/{yJ9vRvHj.js → JbHa4oXq.js} +1 -1
- package/.output/public/_nuxt/{zXvvpsZj.js → Kw0zy3FG.js} +1 -1
- package/.output/public/_nuxt/{C6FFW_cO.js → N5XtbYVD.js} +1 -1
- package/.output/public/_nuxt/{D04CyXmf.js → PP_4ebzl.js} +1 -1
- package/.output/public/_nuxt/{6QDVg5TO.js → SrncdpaW.js} +1 -1
- package/.output/public/_nuxt/{36ZHqDPo.js → U1MWjQMi.js} +1 -1
- package/.output/public/_nuxt/{mT7Mt2d7.js → Um1vPiAz.js} +1 -1
- package/.output/public/_nuxt/{CqFcWBkW.js → XCjS70z4.js} +1 -1
- package/.output/public/_nuxt/{C24so3m7.js → YX8avsvq.js} +2 -2
- package/.output/public/_nuxt/{DaBSQDif.js → _cy8R3nk.js} +1 -1
- package/.output/public/_nuxt/{D9aYkNhQ.js → apYB9dr5.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/def74b99-d70c-4f30-aa29-70248cbeac7d.json +1 -0
- package/.output/public/_nuxt/entry.NKPfH2kE.css +1 -0
- package/.output/public/_nuxt/{BqTdsCnW.js → fbyIeNkc.js} +1 -1
- package/.output/public/_nuxt/{-2AbaFNH.js → g5MjDvm5.js} +1 -1
- package/.output/public/_nuxt/{C1tCdK-M.js → gTrVszwd.js} +1 -1
- package/.output/public/_nuxt/{BVEFmI4I.js → ixlNW2So.js} +1 -1
- package/.output/public/_nuxt/{DtyyytRx.js → nnQqD5pb.js} +1 -1
- package/.output/public/_nuxt/{pHCJ6lhw.js → rfGRTJJW.js} +1 -1
- package/.output/public/_nuxt/{Buf1PAiO.js → t8aDAkZ5.js} +1 -1
- package/.output/public/_nuxt/{BmdlymIW.js → vIOxcXKR.js} +1 -1
- package/.output/public/_nuxt/{Cve4psva.js → vScW1Zgm.js} +1 -1
- package/.output/public/_nuxt/{SfaNtyKS.js → wO6z2ugJ.js} +1 -1
- package/.output/public/_nuxt/{BhYoxmLV.js → x6FRJ5ac.js} +1 -1
- package/.output/public/_nuxt/{Pn7VD6uQ.js → zq-a1TeT.js} +1 -1
- package/.output/server/chunks/build/{chat-CZMiB68R.mjs → chat-CR3JIVEq.mjs} +65 -11
- package/.output/server/chunks/build/chat-CR3JIVEq.mjs.map +1 -0
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/server.mjs +3 -3
- package/.output/server/chunks/build/{settings-ByUXa46k.mjs → settings-B2KXoGcz.mjs} +213 -26
- package/.output/server/chunks/build/settings-B2KXoGcz.mjs.map +1 -0
- package/.output/server/chunks/build/styles.mjs +2 -2
- package/.output/server/chunks/build/{usage-CSrBh4Or.mjs → usage-BHdQZbfI.mjs} +9 -5
- package/.output/server/chunks/build/{usage-CSrBh4Or.mjs.map → usage-BHdQZbfI.mjs.map} +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +1161 -891
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/_ws/chat.mjs +2 -1
- package/.output/server/chunks/routes/_ws/chat.mjs.map +1 -1
- package/.output/server/chunks/routes/api/conversations/_id_.delete.mjs +4 -1
- package/.output/server/chunks/routes/api/conversations/_id_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get3.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get3.mjs.map +1 -1
- package/.output/server/chunks/routes/api/usage/stats.get.mjs +2 -0
- package/.output/server/chunks/routes/api/usage/stats.get.mjs.map +1 -1
- package/.output/server/package.json +1 -1
- package/app/components/chat/ConversationList.vue +7 -1
- package/app/components/chat/MessageBubble.vue +45 -1
- package/app/components/usage/UsageRecordsTable.vue +4 -2
- package/app/components/usage/UsageSourceDonut.client.vue +4 -2
- package/app/components/usage/UsageTopConsumers.vue +4 -2
- package/app/composables/useChat.ts +3 -0
- package/app/pages/settings.vue +148 -9
- package/package.json +1 -1
- package/server/api/conversations/[id].delete.ts +9 -0
- package/server/api/conversations/index.get.ts +2 -1
- package/server/api/usage/stats.get.ts +2 -0
- package/server/bridge/adapters/telegram.ts +83 -8
- package/server/bridge/responder.ts +248 -0
- package/server/bridge/router.ts +6 -4
- package/server/db/schema.ts +3 -1
- package/server/drizzle/migrations/0015_great_mephistopheles.sql +2 -0
- package/server/drizzle/migrations/meta/0015_snapshot.json +1972 -0
- package/server/drizzle/migrations/meta/_journal.json +7 -0
- package/server/routes/_ws/chat.ts +2 -1
- package/server/utils/log-token-usage.ts +1 -1
- package/shared/types/index.ts +6 -0
- package/.output/public/_nuxt/BIo-9u_O.js +0 -1
- package/.output/public/_nuxt/BMs0mHEp.js +0 -1
- package/.output/public/_nuxt/BwyXWqBY.js +0 -1
- package/.output/public/_nuxt/CE9_ECxx.js +0 -1
- package/.output/public/_nuxt/DmcMCO8x.js +0 -1
- package/.output/public/_nuxt/JReYPlwF.js +0 -2
- package/.output/public/_nuxt/builds/meta/410e449d-9fe8-43a0-ae07-80797693b9b8.json +0 -1
- package/.output/public/_nuxt/entry._7ZkP07A.css +0 -1
- package/.output/public/_nuxt/iBaivqi8.js +0 -1
- package/.output/server/chunks/build/chat-CZMiB68R.mjs.map +0 -1
- package/.output/server/chunks/build/settings-ByUXa46k.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as r,c,G as n,R as p,a4 as m,U as u,am as s}from"./
|
|
1
|
+
import{N as r,c,G as n,R as p,a4 as m,U as u,am as s}from"./2dNDtTiv.js";const i={base:"list-decimal ps-6 my-5 marker:text-muted"},_={__name:"ProseOl",props:{class:{type:null,required:!1}},setup(e){const a=e,t=r(),o=c(()=>s({extend:s(i),...t.ui?.prose?.ol||{}}));return(l,d)=>(p(),n("ol",{class:u(o.value({class:a.class}))},[m(l.$slots,"default")],2))}};export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as r,c as p,G as n,R as c,a4 as d,U as m,am as e}from"./
|
|
1
|
+
import{N as r,c as p,G as n,R as c,a4 as d,U as m,am as e}from"./2dNDtTiv.js";const u={base:"py-3 px-4 text-sm text-left align-top border-e border-b first:border-s border-muted [&_code]:text-xs/5 [&_p]:my-0 [&_p]:leading-6 [&_ul]:my-0 [&_ol]:my-0 [&_ul]:ps-4.5 [&_ol]:ps-4.5 [&_li]:leading-6 [&_li]:my-0.5"},f={__name:"ProseTd",props:{class:{type:null,required:!1}},setup(s){const t=s,a=r(),o=p(()=>e({extend:e(u),...a.ui?.prose?.td||{}}));return(l,i)=>(c(),n("td",{class:m(o.value({class:t.class}))},[d(l.$slots,"default")],2))}};export{f as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{X as Tt,c as M,i as Ot,a as Pt,D as Q,e as H,b as J,g as F,k as E,j as Nt,u as Ct,v as ai,s as D,h as ri,w as hi,n as li,q as At,r as jt,t as Et}from"./BmdlymIW.js";import{a as Dt,aA as Rt,c as $t,e as Bt,G as Lt,q as Ht,k as Ft,a2 as It,f as I,R as Xt}from"./njnzCNrH.js";var K=Math.PI,tt=2*K,N=1e-6,_i=tt-N;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function lt(){return new it}it.prototype=lt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,e,n){this._+="Q"+ +t+","+ +i+","+(this._x1=+e)+","+(this._y1=+n)},bezierCurveTo:function(t,i,e,n,s,o){this._+="C"+ +t+","+ +i+","+ +e+","+ +n+","+(this._x1=+s)+","+(this._y1=+o)},arcTo:function(t,i,e,n,s){t=+t,i=+i,e=+e,n=+n,s=+s;var o=this._x1,r=this._y1,a=e-t,h=n-i,u=o-t,_=r-i,l=u*u+_*_;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(l>N)if(!(Math.abs(_*a-h*u)>N)||!s)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var c=e-o,d=n-r,x=a*a+h*h,m=c*c+d*d,f=Math.sqrt(x),y=Math.sqrt(l),v=s*Math.tan((K-Math.acos((x+l-m)/(2*f*y)))/2),p=v/y,b=v/f;Math.abs(p-1)>N&&(this._+="L"+(t+p*u)+","+(i+p*_)),this._+="A"+s+","+s+",0,0,"+ +(_*c>u*d)+","+(this._x1=t+b*a)+","+(this._y1=i+b*h)}},arc:function(t,i,e,n,s,o){t=+t,i=+i,e=+e,o=!!o;var r=e*Math.cos(n),a=e*Math.sin(n),h=t+r,u=i+a,_=1^o,l=o?n-s:s-n;if(e<0)throw new Error("negative radius: "+e);this._x1===null?this._+="M"+h+","+u:(Math.abs(this._x1-h)>N||Math.abs(this._y1-u)>N)&&(this._+="L"+h+","+u),e&&(l<0&&(l=l%tt+tt),l>_i?this._+="A"+e+","+e+",0,1,"+_+","+(t-r)+","+(i-a)+"A"+e+","+e+",0,1,"+_+","+(this._x1=h)+","+(this._y1=u):l>N&&(this._+="A"+e+","+e+",0,"+ +(l>=K)+","+_+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=i+e*Math.sin(s))))},rect:function(t,i,e,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +e+"v"+ +n+"h"+-e+"Z"},toString:function(){return this._}};function k(t){return function(){return t}}var Ji=Math.abs,Ki=Math.atan2,te=Math.cos,ie=Math.max,ee=Math.min,ne=Math.sin,se=Math.sqrt,vt=1e-12,_t=Math.PI,dt=_t/2,oe=2*_t;function ae(t){return t>1?0:t<-1?_t:Math.acos(t)}function re(t){return t>=1?dt:t<=-1?-dt:Math.asin(t)}function Gt(t){this._context=t}Gt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i);break}}};function ct(t){return new Gt(t)}function Yt(t){return t[0]}function zt(t){return t[1]}function Vt(){var t=Yt,i=zt,e=k(!0),n=null,s=ct,o=null;function r(a){var h,u=a.length,_,l=!1,c;for(n==null&&(o=s(c=lt())),h=0;h<=u;++h)!(h<u&&e(_=a[h],h,a))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(_,h,a),+i(_,h,a));if(c)return o=null,c+""||null}return r.x=function(a){return arguments.length?(t=typeof a=="function"?a:k(+a),r):t},r.y=function(a){return arguments.length?(i=typeof a=="function"?a:k(+a),r):i},r.defined=function(a){return arguments.length?(e=typeof a=="function"?a:k(!!a),r):e},r.curve=function(a){return arguments.length?(s=a,n!=null&&(o=s(n)),r):s},r.context=function(a){return arguments.length?(a==null?n=o=null:o=s(n=a),r):n},r}function ci(){var t=Yt,i=null,e=k(0),n=zt,s=k(!0),o=null,r=ct,a=null;function h(_){var l,c,d,x=_.length,m,f=!1,y,v=new Array(x),p=new Array(x);for(o==null&&(a=r(y=lt())),l=0;l<=x;++l){if(!(l<x&&s(m=_[l],l,_))===f)if(f=!f)c=l,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),d=l-1;d>=c;--d)a.point(v[d],p[d]);a.lineEnd(),a.areaEnd()}f&&(v[l]=+t(m,l,_),p[l]=+e(m,l,_),a.point(i?+i(m,l,_):v[l],n?+n(m,l,_):p[l]))}if(y)return a=null,y+""||null}function u(){return Vt().defined(s).curve(r).context(o)}return h.x=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),i=null,h):t},h.x0=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),h):t},h.x1=function(_){return arguments.length?(i=_==null?null:typeof _=="function"?_:k(+_),h):i},h.y=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),n=null,h):e},h.y0=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),h):e},h.y1=function(_){return arguments.length?(n=_==null?null:typeof _=="function"?_:k(+_),h):n},h.lineX0=h.lineY0=function(){return u().x(t).y(e)},h.lineY1=function(){return u().x(t).y(n)},h.lineX1=function(){return u().x(i).y(e)},h.defined=function(_){return arguments.length?(s=typeof _=="function"?_:k(!!_),h):s},h.curve=function(_){return arguments.length?(r=_,o!=null&&(a=r(o)),h):r},h.context=function(_){return arguments.length?(_==null?o=a=null:a=r(o=_),h):o},h}function w(){}function X(t,i,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+e)/6)}function V(t){this._context=t}V.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:X(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function ui(t){return new V(t)}function qt(t){this._context=t}qt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function fi(t){return new qt(t)}function Zt(t){this._context=t}Zt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 3:this._point=4;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function pi(t){return new Zt(t)}function Wt(t,i){this._basis=new V(t),this._beta=i}Wt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,e=t.length-1;if(e>0)for(var n=t[0],s=i[0],o=t[e]-n,r=i[e]-s,a=-1,h;++a<=e;)h=a/e,this._basis.point(this._beta*t[a]+(1-this._beta)*(n+h*o),this._beta*i[a]+(1-this._beta)*(s+h*r));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};const yi=(function t(i){function e(n){return i===1?new V(n):new Wt(n,i)}return e.beta=function(n){return t(+n)},e})(.85);function G(t,i,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function ut(t,i){this._context=t,this._k=(1-i)/6}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:G(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const vi=(function t(i){function e(n){return new ut(n,i)}return e.tension=function(n){return t(+n)},e})(0);function ft(t,i){this._context=t,this._k=(1-i)/6}ft.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const di=(function t(i){function e(n){return new ft(n,i)}return e.tension=function(n){return t(+n)},e})(0);function pt(t,i){this._context=t,this._k=(1-i)/6}pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const xi=(function t(i){function e(n){return new pt(n,i)}return e.tension=function(n){return t(+n)},e})(0);function yt(t,i,e){var n=t._x1,s=t._y1,o=t._x2,r=t._y2;if(t._l01_a>vt){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,h=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/h,s=(s*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/h}if(t._l23_a>vt){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,_=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-i*t._l12_2a)/_,r=(r*u+t._y1*t._l23_2a-e*t._l12_2a)/_}t._context.bezierCurveTo(n,s,o,r,t._x2,t._y2)}function Qt(t,i){this._context=t,this._alpha=i}Qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const gi=(function t(i){function e(n){return i?new Qt(n,i):new ut(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Ut(t,i){this._context=t,this._alpha=i}Ut.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const bi=(function t(i){function e(n){return i?new Ut(n,i):new ft(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Jt(t,i){this._context=t,this._alpha=i}Jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const mi=(function t(i){function e(n){return i?new Jt(n,i):new pt(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Kt(t){this._context=t}Kt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}};function ki(t){return new Kt(t)}function xt(t){return t<0?-1:1}function gt(t,i,e){var n=t._x1-t._x0,s=i-t._x1,o=(t._y1-t._y0)/(n||s<0&&-0),r=(e-t._y1)/(s||n<0&&-0),a=(o*s+r*n)/(n+s);return(xt(o)+xt(r))*Math.min(Math.abs(o),Math.abs(r),.5*Math.abs(a))||0}function bt(t,i){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-i)/2:i}function U(t,i,e){var n=t._x0,s=t._y0,o=t._x1,r=t._y1,a=(o-n)/3;t._context.bezierCurveTo(n+a,s+a*i,o-a,r-a*e,o,r)}function Y(t){this._context=t}Y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:U(this,this._t0,bt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var e=NaN;if(t=+t,i=+i,!(t===this._x1&&i===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,U(this,bt(this,e=gt(this,t,i)),e);break;default:U(this,this._t0,e=gt(this,t,i));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=e}}};function ti(t){this._context=new ii(t)}(ti.prototype=Object.create(Y.prototype)).point=function(t,i){Y.prototype.point.call(this,i,t)};function ii(t){this._context=t}ii.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,e,n,s,o){this._context.bezierCurveTo(i,t,n,e,o,s)}};function Si(t){return new Y(t)}function wi(t){return new ti(t)}function ei(t){this._context=t}ei.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),e===2)this._context.lineTo(t[1],i[1]);else for(var n=mt(t),s=mt(i),o=0,r=1;r<e;++o,++r)this._context.bezierCurveTo(n[0][o],s[0][o],n[1][o],s[1][o],t[r],i[r]);(this._line||this._line!==0&&e===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}};function mt(t){var i,e=t.length-1,n,s=new Array(e),o=new Array(e),r=new Array(e);for(s[0]=0,o[0]=2,r[0]=t[0]+2*t[1],i=1;i<e-1;++i)s[i]=1,o[i]=4,r[i]=4*t[i]+2*t[i+1];for(s[e-1]=2,o[e-1]=7,r[e-1]=8*t[e-1]+t[e],i=1;i<e;++i)n=s[i]/o[i-1],o[i]-=n,r[i]-=n*r[i-1];for(s[e-1]=r[e-1]/o[e-1],i=e-2;i>=0;--i)s[i]=(r[i]-s[i+1])/o[i];for(o[e-1]=(t[e]+s[e-1])/2,i=0;i<e-1;++i)o[i]=2*t[i+1]-s[i+1];return[s,o]}function Mi(t){return new ei(t)}function q(t,i){this._context=t,this._t=i}q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,i)}break}}this._x=t,this._y=i}};function Ti(t){return new q(t,.5)}function Oi(t){return new q(t,0)}function Pi(t){return new q(t,1)}function kt(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),e.push.apply(e,n)}return e}function Ni(t){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?kt(Object(e),!0).forEach(function(n){Ci(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):kt(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function R(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?R=function(i){return typeof i}:R=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},R(t)}function Ci(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function z(){return z=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},z.apply(this,arguments)}function Ai(t,i){if(t){if(typeof t=="string")return St(t,i);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return St(t,i)}}function St(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=new Array(i);e<i;e++)n[e]=t[e];return n}function ni(t,i){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Ai(t))||i){e&&(t=e);var n=0,s=function(){};return{s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(h){throw h},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1
|
+
import{X as Tt,c as M,i as Ot,a as Pt,D as Q,e as H,b as J,g as F,k as E,j as Nt,u as Ct,v as ai,s as D,h as ri,w as hi,n as li,q as At,r as jt,t as Et}from"./vIOxcXKR.js";import{a as Dt,aA as Rt,c as $t,e as Bt,G as Lt,q as Ht,k as Ft,a2 as It,f as I,R as Xt}from"./2dNDtTiv.js";var K=Math.PI,tt=2*K,N=1e-6,_i=tt-N;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function lt(){return new it}it.prototype=lt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,e,n){this._+="Q"+ +t+","+ +i+","+(this._x1=+e)+","+(this._y1=+n)},bezierCurveTo:function(t,i,e,n,s,o){this._+="C"+ +t+","+ +i+","+ +e+","+ +n+","+(this._x1=+s)+","+(this._y1=+o)},arcTo:function(t,i,e,n,s){t=+t,i=+i,e=+e,n=+n,s=+s;var o=this._x1,r=this._y1,a=e-t,h=n-i,u=o-t,_=r-i,l=u*u+_*_;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(l>N)if(!(Math.abs(_*a-h*u)>N)||!s)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var c=e-o,d=n-r,x=a*a+h*h,m=c*c+d*d,f=Math.sqrt(x),y=Math.sqrt(l),v=s*Math.tan((K-Math.acos((x+l-m)/(2*f*y)))/2),p=v/y,b=v/f;Math.abs(p-1)>N&&(this._+="L"+(t+p*u)+","+(i+p*_)),this._+="A"+s+","+s+",0,0,"+ +(_*c>u*d)+","+(this._x1=t+b*a)+","+(this._y1=i+b*h)}},arc:function(t,i,e,n,s,o){t=+t,i=+i,e=+e,o=!!o;var r=e*Math.cos(n),a=e*Math.sin(n),h=t+r,u=i+a,_=1^o,l=o?n-s:s-n;if(e<0)throw new Error("negative radius: "+e);this._x1===null?this._+="M"+h+","+u:(Math.abs(this._x1-h)>N||Math.abs(this._y1-u)>N)&&(this._+="L"+h+","+u),e&&(l<0&&(l=l%tt+tt),l>_i?this._+="A"+e+","+e+",0,1,"+_+","+(t-r)+","+(i-a)+"A"+e+","+e+",0,1,"+_+","+(this._x1=h)+","+(this._y1=u):l>N&&(this._+="A"+e+","+e+",0,"+ +(l>=K)+","+_+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=i+e*Math.sin(s))))},rect:function(t,i,e,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +e+"v"+ +n+"h"+-e+"Z"},toString:function(){return this._}};function k(t){return function(){return t}}var Ji=Math.abs,Ki=Math.atan2,te=Math.cos,ie=Math.max,ee=Math.min,ne=Math.sin,se=Math.sqrt,vt=1e-12,_t=Math.PI,dt=_t/2,oe=2*_t;function ae(t){return t>1?0:t<-1?_t:Math.acos(t)}function re(t){return t>=1?dt:t<=-1?-dt:Math.asin(t)}function Gt(t){this._context=t}Gt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i);break}}};function ct(t){return new Gt(t)}function Yt(t){return t[0]}function zt(t){return t[1]}function Vt(){var t=Yt,i=zt,e=k(!0),n=null,s=ct,o=null;function r(a){var h,u=a.length,_,l=!1,c;for(n==null&&(o=s(c=lt())),h=0;h<=u;++h)!(h<u&&e(_=a[h],h,a))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(_,h,a),+i(_,h,a));if(c)return o=null,c+""||null}return r.x=function(a){return arguments.length?(t=typeof a=="function"?a:k(+a),r):t},r.y=function(a){return arguments.length?(i=typeof a=="function"?a:k(+a),r):i},r.defined=function(a){return arguments.length?(e=typeof a=="function"?a:k(!!a),r):e},r.curve=function(a){return arguments.length?(s=a,n!=null&&(o=s(n)),r):s},r.context=function(a){return arguments.length?(a==null?n=o=null:o=s(n=a),r):n},r}function ci(){var t=Yt,i=null,e=k(0),n=zt,s=k(!0),o=null,r=ct,a=null;function h(_){var l,c,d,x=_.length,m,f=!1,y,v=new Array(x),p=new Array(x);for(o==null&&(a=r(y=lt())),l=0;l<=x;++l){if(!(l<x&&s(m=_[l],l,_))===f)if(f=!f)c=l,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),d=l-1;d>=c;--d)a.point(v[d],p[d]);a.lineEnd(),a.areaEnd()}f&&(v[l]=+t(m,l,_),p[l]=+e(m,l,_),a.point(i?+i(m,l,_):v[l],n?+n(m,l,_):p[l]))}if(y)return a=null,y+""||null}function u(){return Vt().defined(s).curve(r).context(o)}return h.x=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),i=null,h):t},h.x0=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),h):t},h.x1=function(_){return arguments.length?(i=_==null?null:typeof _=="function"?_:k(+_),h):i},h.y=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),n=null,h):e},h.y0=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),h):e},h.y1=function(_){return arguments.length?(n=_==null?null:typeof _=="function"?_:k(+_),h):n},h.lineX0=h.lineY0=function(){return u().x(t).y(e)},h.lineY1=function(){return u().x(t).y(n)},h.lineX1=function(){return u().x(i).y(e)},h.defined=function(_){return arguments.length?(s=typeof _=="function"?_:k(!!_),h):s},h.curve=function(_){return arguments.length?(r=_,o!=null&&(a=r(o)),h):r},h.context=function(_){return arguments.length?(_==null?o=a=null:a=r(o=_),h):o},h}function w(){}function X(t,i,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+e)/6)}function V(t){this._context=t}V.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:X(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function ui(t){return new V(t)}function qt(t){this._context=t}qt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function fi(t){return new qt(t)}function Zt(t){this._context=t}Zt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 3:this._point=4;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function pi(t){return new Zt(t)}function Wt(t,i){this._basis=new V(t),this._beta=i}Wt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,e=t.length-1;if(e>0)for(var n=t[0],s=i[0],o=t[e]-n,r=i[e]-s,a=-1,h;++a<=e;)h=a/e,this._basis.point(this._beta*t[a]+(1-this._beta)*(n+h*o),this._beta*i[a]+(1-this._beta)*(s+h*r));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};const yi=(function t(i){function e(n){return i===1?new V(n):new Wt(n,i)}return e.beta=function(n){return t(+n)},e})(.85);function G(t,i,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function ut(t,i){this._context=t,this._k=(1-i)/6}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:G(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const vi=(function t(i){function e(n){return new ut(n,i)}return e.tension=function(n){return t(+n)},e})(0);function ft(t,i){this._context=t,this._k=(1-i)/6}ft.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const di=(function t(i){function e(n){return new ft(n,i)}return e.tension=function(n){return t(+n)},e})(0);function pt(t,i){this._context=t,this._k=(1-i)/6}pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const xi=(function t(i){function e(n){return new pt(n,i)}return e.tension=function(n){return t(+n)},e})(0);function yt(t,i,e){var n=t._x1,s=t._y1,o=t._x2,r=t._y2;if(t._l01_a>vt){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,h=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/h,s=(s*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/h}if(t._l23_a>vt){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,_=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-i*t._l12_2a)/_,r=(r*u+t._y1*t._l23_2a-e*t._l12_2a)/_}t._context.bezierCurveTo(n,s,o,r,t._x2,t._y2)}function Qt(t,i){this._context=t,this._alpha=i}Qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const gi=(function t(i){function e(n){return i?new Qt(n,i):new ut(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Ut(t,i){this._context=t,this._alpha=i}Ut.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const bi=(function t(i){function e(n){return i?new Ut(n,i):new ft(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Jt(t,i){this._context=t,this._alpha=i}Jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const mi=(function t(i){function e(n){return i?new Jt(n,i):new pt(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Kt(t){this._context=t}Kt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}};function ki(t){return new Kt(t)}function xt(t){return t<0?-1:1}function gt(t,i,e){var n=t._x1-t._x0,s=i-t._x1,o=(t._y1-t._y0)/(n||s<0&&-0),r=(e-t._y1)/(s||n<0&&-0),a=(o*s+r*n)/(n+s);return(xt(o)+xt(r))*Math.min(Math.abs(o),Math.abs(r),.5*Math.abs(a))||0}function bt(t,i){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-i)/2:i}function U(t,i,e){var n=t._x0,s=t._y0,o=t._x1,r=t._y1,a=(o-n)/3;t._context.bezierCurveTo(n+a,s+a*i,o-a,r-a*e,o,r)}function Y(t){this._context=t}Y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:U(this,this._t0,bt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var e=NaN;if(t=+t,i=+i,!(t===this._x1&&i===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,U(this,bt(this,e=gt(this,t,i)),e);break;default:U(this,this._t0,e=gt(this,t,i));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=e}}};function ti(t){this._context=new ii(t)}(ti.prototype=Object.create(Y.prototype)).point=function(t,i){Y.prototype.point.call(this,i,t)};function ii(t){this._context=t}ii.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,e,n,s,o){this._context.bezierCurveTo(i,t,n,e,o,s)}};function Si(t){return new Y(t)}function wi(t){return new ti(t)}function ei(t){this._context=t}ei.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),e===2)this._context.lineTo(t[1],i[1]);else for(var n=mt(t),s=mt(i),o=0,r=1;r<e;++o,++r)this._context.bezierCurveTo(n[0][o],s[0][o],n[1][o],s[1][o],t[r],i[r]);(this._line||this._line!==0&&e===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}};function mt(t){var i,e=t.length-1,n,s=new Array(e),o=new Array(e),r=new Array(e);for(s[0]=0,o[0]=2,r[0]=t[0]+2*t[1],i=1;i<e-1;++i)s[i]=1,o[i]=4,r[i]=4*t[i]+2*t[i+1];for(s[e-1]=2,o[e-1]=7,r[e-1]=8*t[e-1]+t[e],i=1;i<e;++i)n=s[i]/o[i-1],o[i]-=n,r[i]-=n*r[i-1];for(s[e-1]=r[e-1]/o[e-1],i=e-2;i>=0;--i)s[i]=(r[i]-s[i+1])/o[i];for(o[e-1]=(t[e]+s[e-1])/2,i=0;i<e-1;++i)o[i]=2*t[i+1]-s[i+1];return[s,o]}function Mi(t){return new ei(t)}function q(t,i){this._context=t,this._t=i}q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,i)}break}}this._x=t,this._y=i}};function Ti(t){return new q(t,.5)}function Oi(t){return new q(t,0)}function Pi(t){return new q(t,1)}function kt(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),e.push.apply(e,n)}return e}function Ni(t){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?kt(Object(e),!0).forEach(function(n){Ci(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):kt(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function R(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?R=function(i){return typeof i}:R=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},R(t)}function Ci(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function z(){return z=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},z.apply(this,arguments)}function Ai(t,i){if(t){if(typeof t=="string")return St(t,i);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return St(t,i)}}function St(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=new Array(i);e<i;e++)n[e]=t[e];return n}function ni(t,i){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Ai(t))||i){e&&(t=e);var n=0,s=function(){};return{s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(h){throw h},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,r=!1,a;return{s:function(){e=e.call(t)},n:function(){var h=e.next();return o=h.done,h},e:function(h){r=!0,a=h},f:function(){try{!o&&e.return!=null&&e.return()}finally{if(r)throw a}}}}function ji(t,i){var e=[],n=[];function s(o,r){if(o.length===1)e.push(o[0]),n.push(o[0]);else{for(var a=Array(o.length-1),h=0;h<a.length;h++)h===0&&e.push(o[0]),h===a.length-1&&n.push(o[h+1]),a[h]=[(1-r)*o[h][0]+r*o[h+1][0],(1-r)*o[h][1]+r*o[h+1][1]];s(a,r)}}return t.length&&s(t,i),{left:e,right:n.reverse()}}function Ei(t){var i={};return t.length===4&&(i.x2=t[2][0],i.y2=t[2][1]),t.length>=3&&(i.x1=t[1][0],i.y1=t[1][1]),i.x=t[t.length-1][0],i.y=t[t.length-1][1],t.length===4?i.type="C":t.length===3?i.type="Q":i.type="L",i}function Di(t,i){i=i||2;for(var e=[],n=t,s=1/i,o=0;o<i-1;o++){var r=s/(1-s*o),a=ji(n,r);e.push(a.left),n=a.right}return e.push(n),e}function Ri(t,i,e){var n=[[t.x,t.y]];return i.x1!=null&&n.push([i.x1,i.y1]),i.x2!=null&&n.push([i.x2,i.y2]),n.push([i.x,i.y]),Di(n,e).map(Ei)}var $i=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,A={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};Object.keys(A).forEach(function(t){A[t.toLowerCase()]=A[t]});function et(t,i){for(var e=Array(t),n=0;n<t;n++)e[n]=i;return e}function Bi(t){return"".concat(t.type).concat(A[t.type].map(function(i){return t[i]}).join(","))}function Li(t,i){var e={x1:"x",y1:"y",x2:"x",y2:"y"},n=["xAxisRotation","largeArcFlag","sweepFlag"];if(t.type!==i.type&&i.type.toUpperCase()!=="M"){var s={};Object.keys(i).forEach(function(o){var r=i[o],a=t[o];a===void 0&&(n.includes(o)?a=r:(a===void 0&&e[o]&&(a=t[e[o]]),a===void 0&&(a=0))),s[o]=a}),s.type=i.type,t=s}return t}function Hi(t,i,e){var n=[];if(i.type==="L"||i.type==="Q"||i.type==="C")n=n.concat(Ri(t,i,e));else{var s=z({},t);s.type==="M"&&(s.type="L"),n=n.concat(et(e-1).map(function(){return s})),n.push(i)}return n}function wt(t,i,e){var n=t.length-1,s=i.length-1,o=n/s,r=et(s).reduce(function(h,u,_){var l=Math.floor(o*_);if(e&&l<t.length-1&&e(t[l],t[l+1])){var c=o*_%1<.5;h[l]&&(c?l>0?l-=1:l<t.length-1&&(l+=1):l<t.length-1?l+=1:l>0&&(l-=1))}return h[l]=(h[l]||0)+1,h},[]),a=r.reduce(function(h,u,_){if(_===t.length-1){var l=et(u,z({},t[t.length-1]));return l[0].type==="M"&&l.forEach(function(c){c.type="L"}),h.concat(l)}return h.concat(Hi(t[_],t[_+1],u))},[]);return a.unshift(t[0]),a}function Mt(t){for(var i=(t||"").match($i)||[],e=[],n,s,o=0;o<i.length;++o)if(n=A[i[o]],n){s={type:i[o]};for(var r=0;r<n.length;++r)s[n[r]]=+i[o+r+1];o+=n.length,e.push(s)}return e}function Fi(t,i,e){var n=t==null?[]:t.slice(),s=i==null?[]:i.slice(),o=R(e)==="object"?e:{excludeSegment:e,snapEndsToInput:!0},r=o.excludeSegment,a=o.snapEndsToInput;if(!n.length&&!s.length)return function(){return[]};var h=(n.length===0||n[n.length-1].type==="Z")&&(s.length===0||s[s.length-1].type==="Z");n.length>0&&n[n.length-1].type==="Z"&&n.pop(),s.length>0&&s[s.length-1].type==="Z"&&s.pop(),n.length?s.length||s.push(n[0]):n.push(s[0]);var u=Math.abs(s.length-n.length);u!==0&&(s.length>n.length?n=wt(n,s,r):s.length<n.length&&(s=wt(s,n,r))),n=n.map(function(l,c){return Li(l,s[c])});var _=n.map(function(l){return Ni({},l)});return h&&(_.push({type:"Z"}),n.push({type:"Z"})),function(c){if(c===1&&a)return i??[];if(c===0)return n;for(var d=0;d<_.length;++d){var x=n[d],m=s[d],f=_[d],y=ni(A[f.type]),v;try{for(y.s();!(v=y.n()).done;){var p=v.value;f[p]=(1-c)*x[p]+c*m[p],(p==="largeArcFlag"||p==="sweepFlag")&&(f[p]=Math.round(f[p]))}}catch(b){y.e(b)}finally{y.f()}}return _}}function si(t,i,e){var n=Mt(t),s=Mt(i),o=R(e)==="object"?e:{excludeSegment:e,snapEndsToInput:!0},r=o.excludeSegment,a=o.snapEndsToInput;if(!n.length&&!s.length)return function(){return""};var h=Fi(n,s,{excludeSegment:r,snapEndsToInput:a});return function(_){if(_===1&&a)return i??"";var l=h(_),c="",d=ni(l),x;try{for(d.s();!(x=d.n()).done;){var m=x.value;c+=Bi(m)}}catch(f){d.e(f)}finally{d.f()}return c}}var g;(function(t){t.Basis="basis",t.BasisClosed="basisClosed",t.BasisOpen="basisOpen",t.Bundle="bundle",t.Cardinal="cardinal",t.CardinalClosed="cardinalClosed",t.CardinalOpen="cardinalOpen",t.CatmullRom="catmullRom",t.CatmullRomClosed="catmullRomClosed",t.CatmullRomOpen="catmullRomOpen",t.Linear="linear",t.LinearClosed="linearClosed",t.MonotoneX="monotoneX",t.MonotoneY="monotoneY",t.Natural="natural",t.Step="step",t.StepAfter="stepAfter",t.StepBefore="stepBefore"})(g||(g={}));const nt={[g.Basis]:ui,[g.BasisClosed]:fi,[g.BasisOpen]:pi,[g.Bundle]:yi,[g.Cardinal]:vi,[g.CardinalClosed]:di,[g.CardinalOpen]:xi,[g.CatmullRom]:gi,[g.CatmullRomClosed]:bi,[g.CatmullRomOpen]:mi,[g.Linear]:ct,[g.LinearClosed]:ki,[g.MonotoneX]:Si,[g.MonotoneY]:wi,[g.Natural]:Mi,[g.Step]:Ti,[g.StepAfter]:Pi,[g.StepBefore]:Oi},Ii=Object.assign(Object.assign({},Tt),{curveType:g.MonotoneX,lineWidth:2,lineDashArray:void 0,fallbackValue:void 0,highlightOnHover:!1,cursor:null,interpolateMissingData:!1}),Xi=Ot`
|
|
3
3
|
:root {
|
|
4
4
|
--vis-line-cursor: default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as r,c as i,Q as n,R as u,S as c,a4 as p,U as d,C as f,a3 as m,am as e}from"./
|
|
1
|
+
import{N as r,c as i,Q as n,R as u,S as c,a4 as p,U as d,C as f,a3 as m,am as e}from"./2dNDtTiv.js";const v={base:"my-5 divide-y divide-default *:not-last:pb-5"},_={__name:"ProseFieldGroup",props:{as:{type:null,required:!1},class:{type:null,required:!1}},setup(s){const a=s,t=r(),l=i(()=>e({extend:e(v),...t.ui?.prose?.fieldGroup||{}}));return(o,C)=>(u(),n(f(m),{as:s.as,class:d(l.value({class:a.class}))},{default:c(()=>[p(o.$slots,"default")]),_:3},8,["as","class"]))}};export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as fe,ao as Q,bA as me,a1 as pe,$ as be,c as w,E as ye,a0 as X,k as ve,G as h,R as s,ai as D,aj as R,Q as d,au as le,aV as oe,C as n,N as ie,aJ as ne,aI as ue,aT as re,aC as se,am as J,aG as xe,T as b,S as m,ab as H,U as u,a4 as x,a9 as O,V as L,_ as E,aa as Z,ae as _,Y as W,L as he,aK as ke,P as Ie,b7 as Te,ax as Le,b8 as de,b9 as ce,ap as ze,ba as qe,bb as Se,aN as ee,aO as te}from"./njnzCNrH.js";import{i as Ce,a as Ke,T as $e}from"./CAfyXyeo.js";import{g as we}from"./BCCYopTB.js";import{M as Oe}from"./Bwn-CRYH.js";import{u as Ae}from"./D2kQkOaG.js";import{c as ae}from"./BHn8tRjg.js";import{g as Be}from"./MWUW1sIF.js";import{C as $,d as Pe,e as Ve}from"./CXTrUfQ5.js";import{_ as Ne}from"./BjnQ1pI1.js";var We=fe({__name:"TreeVirtualizer",props:{overscan:{type:Number,required:!1},estimateSize:{type:Number,required:!1},textContent:{type:Function,required:!1}},setup(e){const A=e,o=Q(),i=Ce(),K=me(),{getItems:V}=pe(),k=be("",1e3),N=w(()=>{const r=c=>A.textContent?A.textContent(c):c.toString().toLowerCase();return i.expandedItems.value.map((c,y)=>({index:y,textContent:r(c.value)}))});i.isVirtual.value=!0;const B=w(()=>{const r=K.value;if(r){const c=window.getComputedStyle(r);return{start:Number.parseFloat(c.paddingBlockStart||c.paddingTop),end:Number.parseFloat(c.paddingBlockEnd||c.paddingBottom)}}else return{start:0,end:0}}),I=Ae({get scrollPaddingStart(){return B.value.start},get scrollPaddingEnd(){return B.value.end},get count(){return i.expandedItems.value.length??0},get horizontal(){return!1},getItemKey(r){return r+i.getKey(i.expandedItems.value[r].value)},estimateSize(){return A.estimateSize??28},getScrollElement(){return K.value},overscan:A.overscan??12}),M=w(()=>I.value.getVirtualItems().map(r=>({item:r,is:ye(o.default({item:i.expandedItems.value[r.index],virtualizer:I.value,virtualItem:r})[0],{"data-index":r.index,style:{position:"absolute",top:0,left:0,transform:`translateY(${r.start}px)`,overflowAnchor:"none"}})})));function P(r){I.value.scrollToIndex(r,{align:"start"}),requestAnimationFrame(()=>{const c=K.value.querySelector(`[data-index="${r}"]`);c instanceof HTMLElement&&c.focus()})}return i.virtualKeydownHook.on(r=>{const c=r.altKey||r.ctrlKey||r.metaKey;if(r.key==="Tab"&&!c)return;const z=Oe[r.key];if(["first","last"].includes(z)){r.preventDefault();const t=z==="first"?0:i.expandedItems.value.length-1;I.value.scrollToIndex(t),requestAnimationFrame(()=>{const g=V();(z==="first"?g[0]:g[g.length-1]).ref.focus()})}else if(z==="prev"&&r.key!=="ArrowUp"){const t=X(),g=Number(t.getAttribute("data-index")),l=Number(t.getAttribute("data-indent")),q=i.expandedItems.value.slice(0,g).map((S,f)=>({...S,index:f})).reverse().find(S=>S.level===l-1);q&&P(q.index)}else if(!z&&!c){k.value+=r.key;const t=Number(X()?.getAttribute("data-index")),g=N.value[t].textContent,l=N.value.map(S=>S.textContent),T=we(l,k.value,g),q=N.value.find(S=>S.textContent===T);q&&P(q.index)}ve(()=>{r.shiftKey&&z&&i.handleMultipleReplace(z,X(),V,i.expandedItems.value.map(t=>t.value))})}),(r,c)=>(s(),h("div",{"data-reka-virtualizer":"",style:oe({position:"relative",width:"100%",height:`${n(I).getTotalSize()}px`})},[(s(!0),h(D,null,R(M.value,({is:y,item:z})=>(s(),d(le(y),{key:z.key}))),128))],4))}}),De=We;const Ee={slots:{root:"relative isolate",item:"w-full",listWithChildren:"border-s border-default",itemWithChildren:"ps-1.5 -ms-px",link:"relative group w-full flex items-center text-sm select-none before:absolute before:inset-y-px before:inset-x-0 before:z-[-1] before:rounded-md focus:outline-none focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",linkLeadingIcon:"shrink-0 relative",linkLabel:"truncate",linkTrailing:"ms-auto inline-flex gap-1.5 items-center",linkTrailingIcon:"shrink-0 transform transition-transform duration-200 group-data-expanded:rotate-180"},variants:{virtualize:{true:{root:"overflow-y-auto"}},color:{primary:{link:"focus-visible:before:ring-primary"},secondary:{link:"focus-visible:before:ring-secondary"},success:{link:"focus-visible:before:ring-success"},info:{link:"focus-visible:before:ring-info"},warning:{link:"focus-visible:before:ring-warning"},error:{link:"focus-visible:before:ring-error"},neutral:{link:"focus-visible:before:ring-inverted"}},size:{xs:{listWithChildren:"ms-4",link:"px-2 py-1 text-xs gap-1",linkLeadingIcon:"size-4",linkTrailingIcon:"size-4"},sm:{listWithChildren:"ms-4.5",link:"px-2.5 py-1.5 text-xs gap-1.5",linkLeadingIcon:"size-4",linkTrailingIcon:"size-4"},md:{listWithChildren:"ms-5",link:"px-2.5 py-1.5 text-sm gap-1.5",linkLeadingIcon:"size-5",linkTrailingIcon:"size-5"},lg:{listWithChildren:"ms-5.5",link:"px-3 py-2 text-sm gap-2",linkLeadingIcon:"size-5",linkTrailingIcon:"size-5"},xl:{listWithChildren:"ms-6",link:"px-3 py-2 text-base gap-2",linkLeadingIcon:"size-6",linkTrailingIcon:"size-6"}},selected:{true:{link:"before:bg-elevated"}},disabled:{true:{link:"cursor-not-allowed opacity-75"}}},compoundVariants:[{color:"primary",selected:!0,class:{link:"text-primary"}},{color:"secondary",selected:!0,class:{link:"text-secondary"}},{color:"success",selected:!0,class:{link:"text-success"}},{color:"info",selected:!0,class:{link:"text-info"}},{color:"warning",selected:!0,class:{link:"text-warning"}},{color:"error",selected:!0,class:{link:"text-error"}},{color:"neutral",selected:!0,class:{link:"text-highlighted"}},{selected:!1,disabled:!1,class:{link:["hover:text-highlighted hover:before:bg-elevated/50","transition-colors before:transition-colors"]}}],defaultVariants:{color:"primary",size:"md"}},Xe=Object.assign({inheritAttrs:!1},{__name:"UTree",props:{as:{type:null,required:!1},color:{type:null,required:!1},size:{type:null,required:!1},getKey:{type:Function,required:!1},labelKey:{type:null,required:!1,default:"label"},trailingIcon:{type:null,required:!1},expandedIcon:{type:null,required:!1},collapsedIcon:{type:null,required:!1},items:{type:null,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},nested:{type:Boolean,required:!1,default:!0},virtualize:{type:[Boolean,Object],required:!1,default:!1},onSelect:{type:Function,required:!1},onToggle:{type:Function,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},expanded:{type:Array,required:!1},defaultExpanded:{type:Array,required:!1},selectionBehavior:{type:String,required:!1},propagateSelect:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},bubbleSelect:{type:Boolean,required:!1}},emits:["update:modelValue","update:expanded"],setup(e,{expose:A,emit:o}){const i=e,K=o,V=Q(),k=ie(),N=ne(ue(i,"items","multiple","expanded","disabled","propagateSelect","bubbleSelect"),K),B=w(()=>typeof i.as=="string"||typeof i.as?.render=="function"?{root:i.as,link:"button"}:re(i.as,{root:"ul",link:"button"})),I=w(()=>i.virtualize?!1:i.nested),M=w(()=>{const U={xs:{base:2,perLevel:5.5},sm:{base:2.5,perLevel:6},md:{base:2.5,perLevel:6.5},lg:{base:3,perLevel:7},xl:{base:3,perLevel:7.5}}[i.size||"md"];return a=>`calc(var(--spacing) * ${(a-1)*U.perLevel+U.base})`}),P=se(()=>i.virtualize?re(typeof i.virtualize=="boolean"?{}:i.virtualize,{estimateSize:Be(i.items||[],i.size||"md")}):!1),[r,c]=ae(),[y,z]=ae({props:{item:{type:Object,required:!0},index:{type:Number,required:!0},level:{type:Number,required:!0}}}),t=w(()=>J({extend:J(Ee),...k.ui?.tree||{}})({color:i.color,size:i.size,virtualize:!!i.virtualize})),g=xe("rootRef");function l(f){return W(f,i.labelKey)}function T(f){return i.getKey&&i.getKey(f)||l(f)}function q(f){const U=f.defaultExpanded?T(f):null,a=f.children?.flatMap(p=>q(p))??[];return[U,...a].filter(Boolean)}const S=w(()=>i.defaultExpanded??i.items?.flatMap(f=>q(f)));return A({get $el(){return g.value?.$el}}),(f,U)=>(s(),h(D,null,[b(n(y),null,{default:m(({item:a,index:p,level:v})=>[H("li",{role:"presentation",class:u(I.value&&v>1?t.value.itemWithChildren({class:[i.ui?.itemWithChildren,a.ui?.itemWithChildren]}):t.value.item({class:[i.ui?.item,a.ui?.item]}))},[b(n(Ke),{level:v,value:a,"as-child":"",onToggle:C=>(a.onToggle??i.onToggle)?.(C,a),onSelect:C=>(a.onSelect??i.onSelect)?.(C,a)},{default:m(({isExpanded:C,isSelected:F,isIndeterminate:j,handleSelect:G,handleToggle:Y})=>[x(f.$slots,a.slot?`${a.slot}-wrapper`:"item-wrapper",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[(s(),d(le(B.value.link),{type:B.value.link==="button"?"button":void 0,disabled:a.disabled||e.disabled,"data-slot":"link",class:u(t.value.link({class:[i.ui?.link,a.ui?.link,a.class],selected:F,disabled:a.disabled||e.disabled})),style:oe(!I.value&&v>1?{paddingLeft:M.value(v)}:void 0)},{default:m(()=>[x(f.$slots,a.slot||"item",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[x(f.$slots,a.slot?`${a.slot}-leading`:"item-leading",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[a.icon?(s(),d(E,{key:0,name:a.icon,"data-slot":"linkLeadingIcon",class:u(t.value.linkLeadingIcon({class:[i.ui?.linkLeadingIcon,a.ui?.linkLeadingIcon]}))},null,8,["name","class"])):a.children?.length?(s(),d(E,{key:1,name:C?e.expandedIcon??n(k).ui.icons.folderOpen:e.collapsedIcon??n(k).ui.icons.folder,"data-slot":"linkLeadingIcon",class:u(t.value.linkLeadingIcon({class:[i.ui?.linkLeadingIcon,a.ui?.linkLeadingIcon]}))},null,8,["name","class"])):O("",!0)]),l(a)||V[a.slot?`${a.slot}-label`:"item-label"]?(s(),h("span",{key:0,"data-slot":"linkLabel",class:u(t.value.linkLabel({class:[i.ui?.linkLabel,a.ui?.linkLabel]}))},[x(f.$slots,a.slot?`${a.slot}-label`:"item-label",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[Z(_(l(a)),1)])],2)):O("",!0),a.trailingIcon||a.children?.length||V[a.slot?`${a.slot}-trailing`:"item-trailing"]?(s(),h("span",{key:1,"data-slot":"linkTrailing",class:u(t.value.linkTrailing({class:[i.ui?.linkTrailing,a.ui?.linkTrailing]}))},[x(f.$slots,a.slot?`${a.slot}-trailing`:"item-trailing",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[a.trailingIcon?(s(),d(E,{key:0,name:a.trailingIcon,"data-slot":"linkTrailingIcon",class:u(t.value.linkTrailingIcon({class:[i.ui?.linkTrailingIcon,a.ui?.linkTrailingIcon]}))},null,8,["name","class"])):a.children?.length?(s(),d(E,{key:1,name:e.trailingIcon??n(k).ui.icons.chevronDown,"data-slot":"linkTrailingIcon",class:u(t.value.linkTrailingIcon({class:[i.ui?.linkTrailingIcon,a.ui?.linkTrailingIcon]}))},null,8,["name","class"])):O("",!0)])],2)):O("",!0)])]),_:2},1032,["type","disabled","class","style"]))]),I.value&&a.children?.length&&C?(s(),h("ul",{key:0,role:"group","data-slot":"listWithChildren",class:u(t.value.listWithChildren({class:[i.ui?.listWithChildren,a.ui?.listWithChildren]}))},[b(n(c),{items:a.children,level:v+1},null,8,["items","level"])],2)):O("",!0)]),_:2},1032,["level","value","onToggle","onSelect"])],2)]),_:3}),b(n(r),null,{default:m(({items:a,level:p})=>[(s(!0),h(D,null,R(a,(v,C)=>(s(),d(n(z),{key:`${p}-${C}`,item:v,index:C,level:p},null,8,["item","index","level"]))),128))]),_:1}),b(n($e),L({ref_key:"rootRef",ref:g},{...n(N),...f.$attrs},{as:B.value.root,"model-value":e.modelValue,"default-value":e.defaultValue,"data-slot":"root",class:t.value.root({class:[i.ui?.root,i.class]}),"get-key":T,"default-expanded":S.value,"selection-behavior":e.selectionBehavior}),{default:m(({flattenItems:a})=>[e.virtualize?(s(),d(n(De),L({key:0,"text-content":p=>l(p.value)},P.value),{default:m(({item:p,virtualItem:v})=>[b(n(z),{item:p.value,index:v.index,level:p.level},null,8,["item","index","level"])]),_:1},16,["text-content"])):I.value?(s(),d(n(c),{key:2,items:e.items,level:1},null,8,["items"])):(s(!0),h(D,{key:1},R(a,(p,v)=>(s(),d(n(z),{key:p._id,item:p.value,index:v,level:p.level},null,8,["item","index","level"]))),128))]),_:1},16,["as","model-value","default-value","class","default-expanded","selection-behavior"])],64))}}),ge={__name:"UContextMenuContent",props:{items:{type:null,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0},sub:{type:Boolean,required:!1},labelKey:{type:null,required:!0},descriptionKey:{type:null,required:!0},checkedIcon:{type:null,required:!1},loadingIcon:{type:null,required:!1},externalIcon:{type:[Boolean,String],required:!1,skipCheck:!0},class:{type:null,required:!1},ui:{type:null,required:!0},uiOverride:{type:null,required:!1},loop:{type:Boolean,required:!1},sideFlip:{type:Boolean,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:A}){const o=e,i=A,K=Q(),{dir:V}=he(),k=ie(),N=ke(se(()=>o.portal)),B=ne(Ie(o,"sub","items","portal","labelKey","descriptionKey","checkedIcon","loadingIcon","externalIcon","class","ui","uiOverride"),i),I=()=>ce(K,["default"]),[M,P]=ae(),r=w(()=>V.value==="rtl"?k.ui.icons.chevronLeft:k.ui.icons.chevronRight),c=w(()=>o.items?.length?Te(o.items)?o.items:[o.items]:[]);return(y,z)=>(s(),h(D,null,[b(n(M),null,{default:m(({item:t,active:g,index:l})=>[x(y.$slots,t.slot||"item",{item:t,index:l,ui:e.ui},()=>[x(y.$slots,t.slot?`${t.slot}-leading`:"item-leading",{item:t,active:g,index:l,ui:e.ui},()=>[t.loading?(s(),d(E,{key:0,name:e.loadingIcon||n(k).ui.icons.loading,"data-slot":"itemLeadingIcon",class:u(e.ui.itemLeadingIcon({class:[e.uiOverride?.itemLeadingIcon,t.ui?.itemLeadingIcon],color:t?.color,loading:!0}))},null,8,["name","class"])):t.icon?(s(),d(E,{key:1,name:t.icon,"data-slot":"itemLeadingIcon",class:u(e.ui.itemLeadingIcon({class:[e.uiOverride?.itemLeadingIcon,t.ui?.itemLeadingIcon],color:t?.color,active:g}))},null,8,["name","class"])):t.avatar?(s(),d(Le,L({key:2,size:t.ui?.itemLeadingAvatarSize||e.uiOverride?.itemLeadingAvatarSize||e.ui.itemLeadingAvatarSize()},t.avatar,{"data-slot":"itemLeadingAvatar",class:e.ui.itemLeadingAvatar({class:[e.uiOverride?.itemLeadingAvatar,t.ui?.itemLeadingAvatar],active:g})}),null,16,["size","class"])):O("",!0)]),n(W)(t,o.labelKey)||K[t.slot?`${t.slot}-label`:"item-label"]||n(W)(t,o.descriptionKey)||K[t.slot?`${t.slot}-description`:"item-description"]?(s(),h("span",{key:0,"data-slot":"itemWrapper",class:u(e.ui.itemWrapper({class:[e.uiOverride?.itemWrapper,t.ui?.itemWrapper]}))},[H("span",{"data-slot":"itemLabel",class:u(e.ui.itemLabel({class:[e.uiOverride?.itemLabel,t.ui?.itemLabel],active:g}))},[x(y.$slots,t.slot?`${t.slot}-label`:"item-label",{item:t,active:g,index:l},()=>[Z(_(n(W)(t,o.labelKey)),1)]),t.target==="_blank"&&e.externalIcon!==!1?(s(),d(E,{key:0,name:typeof e.externalIcon=="string"?e.externalIcon:n(k).ui.icons.external,"data-slot":"itemLabelExternalIcon",class:u(e.ui.itemLabelExternalIcon({class:[e.uiOverride?.itemLabelExternalIcon,t.ui?.itemLabelExternalIcon],color:t?.color,active:g}))},null,8,["name","class"])):O("",!0)],2),n(W)(t,o.descriptionKey)?(s(),h("span",{key:0,"data-slot":"itemDescription",class:u(e.ui.itemDescription({class:[e.uiOverride?.itemDescription,t.ui?.itemDescription]}))},[x(y.$slots,t.slot?`${t.slot}-description`:"item-description",{item:t,active:g,index:l},()=>[Z(_(n(W)(t,o.descriptionKey)),1)])],2)):O("",!0)],2)):O("",!0),H("span",{"data-slot":"itemTrailing",class:u(e.ui.itemTrailing({class:[e.uiOverride?.itemTrailing,t.ui?.itemTrailing]}))},[x(y.$slots,t.slot?`${t.slot}-trailing`:"item-trailing",{item:t,active:g,index:l,ui:e.ui},()=>[t.children?.length?(s(),d(E,{key:0,name:r.value,"data-slot":"itemTrailingIcon",class:u(e.ui.itemTrailingIcon({class:[e.uiOverride?.itemTrailingIcon,t.ui?.itemTrailingIcon],color:t?.color,active:g}))},null,8,["name","class"])):t.kbds?.length?(s(),h("span",{key:1,"data-slot":"itemTrailingKbds",class:u(e.ui.itemTrailingKbds({class:[e.uiOverride?.itemTrailingKbds,t.ui?.itemTrailingKbds]}))},[(s(!0),h(D,null,R(t.kbds,(T,q)=>(s(),d(Ne,L({key:q,size:t.ui?.itemTrailingKbdsSize||e.uiOverride?.itemTrailingKbdsSize||e.ui.itemTrailingKbdsSize()},{ref_for:!0},typeof T=="string"?{value:T}:T),null,16,["size"]))),128))],2)):O("",!0)]),b(n($).ItemIndicator,{"as-child":""},{default:m(()=>[b(E,{name:e.checkedIcon||n(k).ui.icons.check,"data-slot":"itemTrailingIcon",class:u(e.ui.itemTrailingIcon({class:[e.uiOverride?.itemTrailingIcon,t.ui?.itemTrailingIcon],color:t?.color}))},null,8,["name","class"])]),_:2},1024)],2)])]),_:3}),b(n($).Portal,ee(te(n(N))),{default:m(()=>[(s(),d(le(e.sub?n($).SubContent:n($).Content),L({"data-slot":"content",class:e.ui.content({class:[e.uiOverride?.content,o.class]})},n(B)),{default:m(()=>[x(y.$slots,"content-top",{sub:e.sub??!1}),H("div",{role:"presentation","data-slot":"viewport",class:u(e.ui.viewport({class:e.uiOverride?.viewport}))},[(s(!0),h(D,null,R(c.value,(t,g)=>(s(),d(n($).Group,{key:`group-${g}`,"data-slot":"group",class:u(e.ui.group({class:e.uiOverride?.group}))},{default:m(()=>[(s(!0),h(D,null,R(t,(l,T)=>(s(),h(D,{key:`group-${g}-${T}`},[l.type==="label"?(s(),d(n($).Label,{key:0,"data-slot":"label",class:u(e.ui.label({class:[e.uiOverride?.label,l.ui?.label,l.class]}))},{default:m(()=>[b(n(P),{item:l,index:T},null,8,["item","index"])]),_:2},1032,["class"])):l.type==="separator"?(s(),d(n($).Separator,{key:1,"data-slot":"separator",class:u(e.ui.separator({class:[e.uiOverride?.separator,l.ui?.separator,l.class]}))},null,8,["class"])):l?.children?.length?(s(),d(n($).Sub,{key:2,open:l.open,"default-open":l.defaultOpen},{default:m(()=>[b(n($).SubTrigger,{as:"button",type:"button",disabled:l.disabled,"text-value":n(W)(l,o.labelKey),"data-slot":"item",class:u(e.ui.item({class:[e.uiOverride?.item,l.ui?.item,l.class],color:l?.color}))},{default:m(()=>[b(n(P),{item:l,index:T},null,8,["item","index"])]),_:2},1032,["disabled","text-value","class"]),b(ge,L({sub:"",class:l.ui?.content,ui:e.ui,"ui-override":e.uiOverride,portal:e.portal,items:l.children,"align-offset":-4,"label-key":e.labelKey,"description-key":e.descriptionKey,"checked-icon":e.checkedIcon,"loading-icon":e.loadingIcon,"external-icon":e.externalIcon},{ref_for:!0},l.content),de({_:2},[R(I(),(q,S)=>({name:S,fn:m(f=>[x(y.$slots,S,L({ref_for:!0},f))])}))]),1040,["class","ui","ui-override","portal","items","label-key","description-key","checked-icon","loading-icon","external-icon"])]),_:2},1032,["open","default-open"])):l.type==="checkbox"?(s(),d(n($).CheckboxItem,{key:3,"model-value":l.checked,disabled:l.disabled,"text-value":n(W)(l,o.labelKey),"data-slot":"item",class:u(e.ui.item({class:[e.uiOverride?.item,l.ui?.item,l.class],color:l?.color})),"onUpdate:modelValue":l.onUpdateChecked,onSelect:l.onSelect},{default:m(()=>[b(n(P),{item:l,index:T},null,8,["item","index"])]),_:2},1032,["model-value","disabled","text-value","class","onUpdate:modelValue","onSelect"])):(s(),d(n($).Item,{key:4,"as-child":"",disabled:l.disabled,"text-value":n(W)(l,o.labelKey),onSelect:l.onSelect},{default:m(()=>[b(ze,L({ref_for:!0},n(qe)(l),{custom:""}),{default:m(({active:q,...S})=>[b(Se,L({ref_for:!0},S,{"data-slot":"item",class:e.ui.item({class:[e.uiOverride?.item,l.ui?.item,l.class],active:q,color:l?.color})}),{default:m(()=>[b(n(P),{item:l,active:q,index:T},null,8,["item","active","index"])]),_:2},1040,["class"])]),_:2},1040)]),_:2},1032,["disabled","text-value","onSelect"]))],64))),128))]),_:2},1032,["class"]))),128))],2),x(y.$slots,"default"),x(y.$slots,"content-bottom",{sub:e.sub??!1})]),_:3},16,["class"]))]),_:3},16)],64))}},Me={slots:{content:"min-w-32 bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-context-menu-content-transform-origin) flex flex-col",viewport:"relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",group:"p-1 isolate",label:"w-full flex items-center font-semibold text-highlighted",separator:"-mx-1 my-1 h-px bg-border",item:"group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75",itemLeadingIcon:"shrink-0",itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0",itemTrailingKbds:"hidden lg:inline-flex items-center shrink-0",itemTrailingKbdsSize:"",itemWrapper:"flex-1 flex flex-col text-start min-w-0",itemLabel:"truncate",itemDescription:"truncate text-muted",itemLabelExternalIcon:"inline-block size-3 align-top text-dimmed"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},active:{true:{item:"text-highlighted before:bg-elevated",itemLeadingIcon:"text-default"},false:{item:["text-default data-highlighted:text-highlighted data-[state=open]:text-highlighted data-highlighted:before:bg-elevated/50 data-[state=open]:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["text-dimmed group-data-highlighted:text-default group-data-[state=open]:text-default","transition-colors"]}},loading:{true:{itemLeadingIcon:"animate-spin"}},size:{xs:{label:"p-1 text-xs gap-1",item:"p-1 text-xs gap-1",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemTrailingIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},sm:{label:"p-1.5 text-xs gap-1.5",item:"p-1.5 text-xs gap-1.5",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemTrailingIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},md:{label:"p-1.5 text-sm gap-1.5",item:"p-1.5 text-sm gap-1.5",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemTrailingIcon:"size-5",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"md"},lg:{label:"p-2 text-sm gap-2",item:"p-2 text-sm gap-2",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemTrailingIcon:"size-5",itemTrailingKbds:"gap-1",itemTrailingKbdsSize:"md"},xl:{label:"p-2 text-base gap-2",item:"p-2 text-base gap-2",itemLeadingIcon:"size-6",itemLeadingAvatarSize:"xs",itemTrailingIcon:"size-6",itemTrailingKbds:"gap-1",itemTrailingKbdsSize:"lg"}}},compoundVariants:[{color:"primary",active:!1,class:{item:"text-primary data-highlighted:text-primary data-highlighted:before:bg-primary/10 data-[state=open]:before:bg-primary/10",itemLeadingIcon:"text-primary/75 group-data-highlighted:text-primary group-data-[state=open]:text-primary"}},{color:"secondary",active:!1,class:{item:"text-secondary data-highlighted:text-secondary data-highlighted:before:bg-secondary/10 data-[state=open]:before:bg-secondary/10",itemLeadingIcon:"text-secondary/75 group-data-highlighted:text-secondary group-data-[state=open]:text-secondary"}},{color:"success",active:!1,class:{item:"text-success data-highlighted:text-success data-highlighted:before:bg-success/10 data-[state=open]:before:bg-success/10",itemLeadingIcon:"text-success/75 group-data-highlighted:text-success group-data-[state=open]:text-success"}},{color:"info",active:!1,class:{item:"text-info data-highlighted:text-info data-highlighted:before:bg-info/10 data-[state=open]:before:bg-info/10",itemLeadingIcon:"text-info/75 group-data-highlighted:text-info group-data-[state=open]:text-info"}},{color:"warning",active:!1,class:{item:"text-warning data-highlighted:text-warning data-highlighted:before:bg-warning/10 data-[state=open]:before:bg-warning/10",itemLeadingIcon:"text-warning/75 group-data-highlighted:text-warning group-data-[state=open]:text-warning"}},{color:"error",active:!1,class:{item:"text-error data-highlighted:text-error data-highlighted:before:bg-error/10 data-[state=open]:before:bg-error/10",itemLeadingIcon:"text-error/75 group-data-highlighted:text-error group-data-[state=open]:text-error"}},{color:"primary",active:!0,class:{item:"text-primary before:bg-primary/10",itemLeadingIcon:"text-primary"}},{color:"secondary",active:!0,class:{item:"text-secondary before:bg-secondary/10",itemLeadingIcon:"text-secondary"}},{color:"success",active:!0,class:{item:"text-success before:bg-success/10",itemLeadingIcon:"text-success"}},{color:"info",active:!0,class:{item:"text-info before:bg-info/10",itemLeadingIcon:"text-info"}},{color:"warning",active:!0,class:{item:"text-warning before:bg-warning/10",itemLeadingIcon:"text-warning"}},{color:"error",active:!0,class:{item:"text-error before:bg-error/10",itemLeadingIcon:"text-error"}}],defaultVariants:{size:"md"}},Ze={__name:"UContextMenu",props:{size:{type:null,required:!1},items:{type:null,required:!1},checkedIcon:{type:null,required:!1},loadingIcon:{type:null,required:!1},externalIcon:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},content:{type:Object,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},disabled:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},pressOpenDelay:{type:Number,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:A}){const o=e,i=A,K=Q(),V=ie(),k=ne(ue(o,"modal"),i),N=se(()=>o.content),B=()=>ce(K,["default"]),I=w(()=>J({extend:J(Me),...V.ui?.contextMenu||{}})({size:o.size}));return(M,P)=>(s(),d(n(Ve),ee(te(n(k))),{default:m(()=>[K.default?(s(),d(n(Pe),{key:0,"as-child":"",disabled:e.disabled,class:u(o.class)},{default:m(()=>[x(M.$slots,"default")]),_:3},8,["disabled","class"])):O("",!0),b(ge,L({class:I.value.content({class:[!K.default&&o.class,o.ui?.content]}),ui:I.value,"ui-override":o.ui},N.value,{items:e.items,portal:e.portal,"label-key":e.labelKey,"description-key":e.descriptionKey,"checked-icon":e.checkedIcon,"loading-icon":e.loadingIcon,"external-icon":e.externalIcon}),de({_:2},[R(B(),(r,c)=>({name:c,fn:m(y=>[x(M.$slots,c,ee(te(y)))])}))]),1040,["class","ui","ui-override","items","portal","label-key","description-key","checked-icon","loading-icon","external-icon"])]),_:3},16))}};export{Xe as _,Ze as a};
|
|
1
|
+
import{a as fe,ao as Q,bA as me,a1 as pe,$ as be,c as w,E as ye,a0 as X,k as ve,G as h,R as s,aj as D,ak as R,Q as d,au as le,aV as oe,C as n,N as ie,aJ as ne,aI as ue,aT as re,aC as se,am as J,aG as xe,T as b,S as m,ab as H,U as u,a4 as x,a9 as O,V as L,_ as E,aa as Z,ae as _,Y as W,L as he,aK as ke,P as Ie,b7 as Te,ax as Le,b8 as de,b9 as ce,ap as ze,ba as qe,bb as Se,aN as ee,aO as te}from"./2dNDtTiv.js";import{i as Ce,a as Ke,T as $e}from"./CKxSHyww.js";import{g as we}from"./CQqCBrXj.js";import{M as Oe}from"./CYPO5o_C.js";import{u as Ae}from"./BS2ZNXI1.js";import{c as ae}from"./DhI5cA_n.js";import{g as Be}from"./DY3uK7wM.js";import{C as $,d as Pe,e as Ve}from"./DS2wStH1.js";import{_ as Ne}from"./D8lwrAYS.js";var We=fe({__name:"TreeVirtualizer",props:{overscan:{type:Number,required:!1},estimateSize:{type:Number,required:!1},textContent:{type:Function,required:!1}},setup(e){const A=e,o=Q(),i=Ce(),K=me(),{getItems:V}=pe(),k=be("",1e3),N=w(()=>{const r=c=>A.textContent?A.textContent(c):c.toString().toLowerCase();return i.expandedItems.value.map((c,y)=>({index:y,textContent:r(c.value)}))});i.isVirtual.value=!0;const B=w(()=>{const r=K.value;if(r){const c=window.getComputedStyle(r);return{start:Number.parseFloat(c.paddingBlockStart||c.paddingTop),end:Number.parseFloat(c.paddingBlockEnd||c.paddingBottom)}}else return{start:0,end:0}}),I=Ae({get scrollPaddingStart(){return B.value.start},get scrollPaddingEnd(){return B.value.end},get count(){return i.expandedItems.value.length??0},get horizontal(){return!1},getItemKey(r){return r+i.getKey(i.expandedItems.value[r].value)},estimateSize(){return A.estimateSize??28},getScrollElement(){return K.value},overscan:A.overscan??12}),M=w(()=>I.value.getVirtualItems().map(r=>({item:r,is:ye(o.default({item:i.expandedItems.value[r.index],virtualizer:I.value,virtualItem:r})[0],{"data-index":r.index,style:{position:"absolute",top:0,left:0,transform:`translateY(${r.start}px)`,overflowAnchor:"none"}})})));function P(r){I.value.scrollToIndex(r,{align:"start"}),requestAnimationFrame(()=>{const c=K.value.querySelector(`[data-index="${r}"]`);c instanceof HTMLElement&&c.focus()})}return i.virtualKeydownHook.on(r=>{const c=r.altKey||r.ctrlKey||r.metaKey;if(r.key==="Tab"&&!c)return;const z=Oe[r.key];if(["first","last"].includes(z)){r.preventDefault();const t=z==="first"?0:i.expandedItems.value.length-1;I.value.scrollToIndex(t),requestAnimationFrame(()=>{const g=V();(z==="first"?g[0]:g[g.length-1]).ref.focus()})}else if(z==="prev"&&r.key!=="ArrowUp"){const t=X(),g=Number(t.getAttribute("data-index")),l=Number(t.getAttribute("data-indent")),q=i.expandedItems.value.slice(0,g).map((S,f)=>({...S,index:f})).reverse().find(S=>S.level===l-1);q&&P(q.index)}else if(!z&&!c){k.value+=r.key;const t=Number(X()?.getAttribute("data-index")),g=N.value[t].textContent,l=N.value.map(S=>S.textContent),T=we(l,k.value,g),q=N.value.find(S=>S.textContent===T);q&&P(q.index)}ve(()=>{r.shiftKey&&z&&i.handleMultipleReplace(z,X(),V,i.expandedItems.value.map(t=>t.value))})}),(r,c)=>(s(),h("div",{"data-reka-virtualizer":"",style:oe({position:"relative",width:"100%",height:`${n(I).getTotalSize()}px`})},[(s(!0),h(D,null,R(M.value,({is:y,item:z})=>(s(),d(le(y),{key:z.key}))),128))],4))}}),De=We;const Ee={slots:{root:"relative isolate",item:"w-full",listWithChildren:"border-s border-default",itemWithChildren:"ps-1.5 -ms-px",link:"relative group w-full flex items-center text-sm select-none before:absolute before:inset-y-px before:inset-x-0 before:z-[-1] before:rounded-md focus:outline-none focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",linkLeadingIcon:"shrink-0 relative",linkLabel:"truncate",linkTrailing:"ms-auto inline-flex gap-1.5 items-center",linkTrailingIcon:"shrink-0 transform transition-transform duration-200 group-data-expanded:rotate-180"},variants:{virtualize:{true:{root:"overflow-y-auto"}},color:{primary:{link:"focus-visible:before:ring-primary"},secondary:{link:"focus-visible:before:ring-secondary"},success:{link:"focus-visible:before:ring-success"},info:{link:"focus-visible:before:ring-info"},warning:{link:"focus-visible:before:ring-warning"},error:{link:"focus-visible:before:ring-error"},neutral:{link:"focus-visible:before:ring-inverted"}},size:{xs:{listWithChildren:"ms-4",link:"px-2 py-1 text-xs gap-1",linkLeadingIcon:"size-4",linkTrailingIcon:"size-4"},sm:{listWithChildren:"ms-4.5",link:"px-2.5 py-1.5 text-xs gap-1.5",linkLeadingIcon:"size-4",linkTrailingIcon:"size-4"},md:{listWithChildren:"ms-5",link:"px-2.5 py-1.5 text-sm gap-1.5",linkLeadingIcon:"size-5",linkTrailingIcon:"size-5"},lg:{listWithChildren:"ms-5.5",link:"px-3 py-2 text-sm gap-2",linkLeadingIcon:"size-5",linkTrailingIcon:"size-5"},xl:{listWithChildren:"ms-6",link:"px-3 py-2 text-base gap-2",linkLeadingIcon:"size-6",linkTrailingIcon:"size-6"}},selected:{true:{link:"before:bg-elevated"}},disabled:{true:{link:"cursor-not-allowed opacity-75"}}},compoundVariants:[{color:"primary",selected:!0,class:{link:"text-primary"}},{color:"secondary",selected:!0,class:{link:"text-secondary"}},{color:"success",selected:!0,class:{link:"text-success"}},{color:"info",selected:!0,class:{link:"text-info"}},{color:"warning",selected:!0,class:{link:"text-warning"}},{color:"error",selected:!0,class:{link:"text-error"}},{color:"neutral",selected:!0,class:{link:"text-highlighted"}},{selected:!1,disabled:!1,class:{link:["hover:text-highlighted hover:before:bg-elevated/50","transition-colors before:transition-colors"]}}],defaultVariants:{color:"primary",size:"md"}},Xe=Object.assign({inheritAttrs:!1},{__name:"UTree",props:{as:{type:null,required:!1},color:{type:null,required:!1},size:{type:null,required:!1},getKey:{type:Function,required:!1},labelKey:{type:null,required:!1,default:"label"},trailingIcon:{type:null,required:!1},expandedIcon:{type:null,required:!1},collapsedIcon:{type:null,required:!1},items:{type:null,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},nested:{type:Boolean,required:!1,default:!0},virtualize:{type:[Boolean,Object],required:!1,default:!1},onSelect:{type:Function,required:!1},onToggle:{type:Function,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},expanded:{type:Array,required:!1},defaultExpanded:{type:Array,required:!1},selectionBehavior:{type:String,required:!1},propagateSelect:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},bubbleSelect:{type:Boolean,required:!1}},emits:["update:modelValue","update:expanded"],setup(e,{expose:A,emit:o}){const i=e,K=o,V=Q(),k=ie(),N=ne(ue(i,"items","multiple","expanded","disabled","propagateSelect","bubbleSelect"),K),B=w(()=>typeof i.as=="string"||typeof i.as?.render=="function"?{root:i.as,link:"button"}:re(i.as,{root:"ul",link:"button"})),I=w(()=>i.virtualize?!1:i.nested),M=w(()=>{const U={xs:{base:2,perLevel:5.5},sm:{base:2.5,perLevel:6},md:{base:2.5,perLevel:6.5},lg:{base:3,perLevel:7},xl:{base:3,perLevel:7.5}}[i.size||"md"];return a=>`calc(var(--spacing) * ${(a-1)*U.perLevel+U.base})`}),P=se(()=>i.virtualize?re(typeof i.virtualize=="boolean"?{}:i.virtualize,{estimateSize:Be(i.items||[],i.size||"md")}):!1),[r,c]=ae(),[y,z]=ae({props:{item:{type:Object,required:!0},index:{type:Number,required:!0},level:{type:Number,required:!0}}}),t=w(()=>J({extend:J(Ee),...k.ui?.tree||{}})({color:i.color,size:i.size,virtualize:!!i.virtualize})),g=xe("rootRef");function l(f){return W(f,i.labelKey)}function T(f){return i.getKey&&i.getKey(f)||l(f)}function q(f){const U=f.defaultExpanded?T(f):null,a=f.children?.flatMap(p=>q(p))??[];return[U,...a].filter(Boolean)}const S=w(()=>i.defaultExpanded??i.items?.flatMap(f=>q(f)));return A({get $el(){return g.value?.$el}}),(f,U)=>(s(),h(D,null,[b(n(y),null,{default:m(({item:a,index:p,level:v})=>[H("li",{role:"presentation",class:u(I.value&&v>1?t.value.itemWithChildren({class:[i.ui?.itemWithChildren,a.ui?.itemWithChildren]}):t.value.item({class:[i.ui?.item,a.ui?.item]}))},[b(n(Ke),{level:v,value:a,"as-child":"",onToggle:C=>(a.onToggle??i.onToggle)?.(C,a),onSelect:C=>(a.onSelect??i.onSelect)?.(C,a)},{default:m(({isExpanded:C,isSelected:F,isIndeterminate:j,handleSelect:G,handleToggle:Y})=>[x(f.$slots,a.slot?`${a.slot}-wrapper`:"item-wrapper",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[(s(),d(le(B.value.link),{type:B.value.link==="button"?"button":void 0,disabled:a.disabled||e.disabled,"data-slot":"link",class:u(t.value.link({class:[i.ui?.link,a.ui?.link,a.class],selected:F,disabled:a.disabled||e.disabled})),style:oe(!I.value&&v>1?{paddingLeft:M.value(v)}:void 0)},{default:m(()=>[x(f.$slots,a.slot||"item",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[x(f.$slots,a.slot?`${a.slot}-leading`:"item-leading",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[a.icon?(s(),d(E,{key:0,name:a.icon,"data-slot":"linkLeadingIcon",class:u(t.value.linkLeadingIcon({class:[i.ui?.linkLeadingIcon,a.ui?.linkLeadingIcon]}))},null,8,["name","class"])):a.children?.length?(s(),d(E,{key:1,name:C?e.expandedIcon??n(k).ui.icons.folderOpen:e.collapsedIcon??n(k).ui.icons.folder,"data-slot":"linkLeadingIcon",class:u(t.value.linkLeadingIcon({class:[i.ui?.linkLeadingIcon,a.ui?.linkLeadingIcon]}))},null,8,["name","class"])):O("",!0)]),l(a)||V[a.slot?`${a.slot}-label`:"item-label"]?(s(),h("span",{key:0,"data-slot":"linkLabel",class:u(t.value.linkLabel({class:[i.ui?.linkLabel,a.ui?.linkLabel]}))},[x(f.$slots,a.slot?`${a.slot}-label`:"item-label",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[Z(_(l(a)),1)])],2)):O("",!0),a.trailingIcon||a.children?.length||V[a.slot?`${a.slot}-trailing`:"item-trailing"]?(s(),h("span",{key:1,"data-slot":"linkTrailing",class:u(t.value.linkTrailing({class:[i.ui?.linkTrailing,a.ui?.linkTrailing]}))},[x(f.$slots,a.slot?`${a.slot}-trailing`:"item-trailing",L({index:p,level:v,expanded:C,selected:F,indeterminate:j,handleSelect:G,handleToggle:Y,ui:t.value},{item:a}),()=>[a.trailingIcon?(s(),d(E,{key:0,name:a.trailingIcon,"data-slot":"linkTrailingIcon",class:u(t.value.linkTrailingIcon({class:[i.ui?.linkTrailingIcon,a.ui?.linkTrailingIcon]}))},null,8,["name","class"])):a.children?.length?(s(),d(E,{key:1,name:e.trailingIcon??n(k).ui.icons.chevronDown,"data-slot":"linkTrailingIcon",class:u(t.value.linkTrailingIcon({class:[i.ui?.linkTrailingIcon,a.ui?.linkTrailingIcon]}))},null,8,["name","class"])):O("",!0)])],2)):O("",!0)])]),_:2},1032,["type","disabled","class","style"]))]),I.value&&a.children?.length&&C?(s(),h("ul",{key:0,role:"group","data-slot":"listWithChildren",class:u(t.value.listWithChildren({class:[i.ui?.listWithChildren,a.ui?.listWithChildren]}))},[b(n(c),{items:a.children,level:v+1},null,8,["items","level"])],2)):O("",!0)]),_:2},1032,["level","value","onToggle","onSelect"])],2)]),_:3}),b(n(r),null,{default:m(({items:a,level:p})=>[(s(!0),h(D,null,R(a,(v,C)=>(s(),d(n(z),{key:`${p}-${C}`,item:v,index:C,level:p},null,8,["item","index","level"]))),128))]),_:1}),b(n($e),L({ref_key:"rootRef",ref:g},{...n(N),...f.$attrs},{as:B.value.root,"model-value":e.modelValue,"default-value":e.defaultValue,"data-slot":"root",class:t.value.root({class:[i.ui?.root,i.class]}),"get-key":T,"default-expanded":S.value,"selection-behavior":e.selectionBehavior}),{default:m(({flattenItems:a})=>[e.virtualize?(s(),d(n(De),L({key:0,"text-content":p=>l(p.value)},P.value),{default:m(({item:p,virtualItem:v})=>[b(n(z),{item:p.value,index:v.index,level:p.level},null,8,["item","index","level"])]),_:1},16,["text-content"])):I.value?(s(),d(n(c),{key:2,items:e.items,level:1},null,8,["items"])):(s(!0),h(D,{key:1},R(a,(p,v)=>(s(),d(n(z),{key:p._id,item:p.value,index:v,level:p.level},null,8,["item","index","level"]))),128))]),_:1},16,["as","model-value","default-value","class","default-expanded","selection-behavior"])],64))}}),ge={__name:"UContextMenuContent",props:{items:{type:null,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0},sub:{type:Boolean,required:!1},labelKey:{type:null,required:!0},descriptionKey:{type:null,required:!0},checkedIcon:{type:null,required:!1},loadingIcon:{type:null,required:!1},externalIcon:{type:[Boolean,String],required:!1,skipCheck:!0},class:{type:null,required:!1},ui:{type:null,required:!0},uiOverride:{type:null,required:!1},loop:{type:Boolean,required:!1},sideFlip:{type:Boolean,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:A}){const o=e,i=A,K=Q(),{dir:V}=he(),k=ie(),N=ke(se(()=>o.portal)),B=ne(Ie(o,"sub","items","portal","labelKey","descriptionKey","checkedIcon","loadingIcon","externalIcon","class","ui","uiOverride"),i),I=()=>ce(K,["default"]),[M,P]=ae(),r=w(()=>V.value==="rtl"?k.ui.icons.chevronLeft:k.ui.icons.chevronRight),c=w(()=>o.items?.length?Te(o.items)?o.items:[o.items]:[]);return(y,z)=>(s(),h(D,null,[b(n(M),null,{default:m(({item:t,active:g,index:l})=>[x(y.$slots,t.slot||"item",{item:t,index:l,ui:e.ui},()=>[x(y.$slots,t.slot?`${t.slot}-leading`:"item-leading",{item:t,active:g,index:l,ui:e.ui},()=>[t.loading?(s(),d(E,{key:0,name:e.loadingIcon||n(k).ui.icons.loading,"data-slot":"itemLeadingIcon",class:u(e.ui.itemLeadingIcon({class:[e.uiOverride?.itemLeadingIcon,t.ui?.itemLeadingIcon],color:t?.color,loading:!0}))},null,8,["name","class"])):t.icon?(s(),d(E,{key:1,name:t.icon,"data-slot":"itemLeadingIcon",class:u(e.ui.itemLeadingIcon({class:[e.uiOverride?.itemLeadingIcon,t.ui?.itemLeadingIcon],color:t?.color,active:g}))},null,8,["name","class"])):t.avatar?(s(),d(Le,L({key:2,size:t.ui?.itemLeadingAvatarSize||e.uiOverride?.itemLeadingAvatarSize||e.ui.itemLeadingAvatarSize()},t.avatar,{"data-slot":"itemLeadingAvatar",class:e.ui.itemLeadingAvatar({class:[e.uiOverride?.itemLeadingAvatar,t.ui?.itemLeadingAvatar],active:g})}),null,16,["size","class"])):O("",!0)]),n(W)(t,o.labelKey)||K[t.slot?`${t.slot}-label`:"item-label"]||n(W)(t,o.descriptionKey)||K[t.slot?`${t.slot}-description`:"item-description"]?(s(),h("span",{key:0,"data-slot":"itemWrapper",class:u(e.ui.itemWrapper({class:[e.uiOverride?.itemWrapper,t.ui?.itemWrapper]}))},[H("span",{"data-slot":"itemLabel",class:u(e.ui.itemLabel({class:[e.uiOverride?.itemLabel,t.ui?.itemLabel],active:g}))},[x(y.$slots,t.slot?`${t.slot}-label`:"item-label",{item:t,active:g,index:l},()=>[Z(_(n(W)(t,o.labelKey)),1)]),t.target==="_blank"&&e.externalIcon!==!1?(s(),d(E,{key:0,name:typeof e.externalIcon=="string"?e.externalIcon:n(k).ui.icons.external,"data-slot":"itemLabelExternalIcon",class:u(e.ui.itemLabelExternalIcon({class:[e.uiOverride?.itemLabelExternalIcon,t.ui?.itemLabelExternalIcon],color:t?.color,active:g}))},null,8,["name","class"])):O("",!0)],2),n(W)(t,o.descriptionKey)?(s(),h("span",{key:0,"data-slot":"itemDescription",class:u(e.ui.itemDescription({class:[e.uiOverride?.itemDescription,t.ui?.itemDescription]}))},[x(y.$slots,t.slot?`${t.slot}-description`:"item-description",{item:t,active:g,index:l},()=>[Z(_(n(W)(t,o.descriptionKey)),1)])],2)):O("",!0)],2)):O("",!0),H("span",{"data-slot":"itemTrailing",class:u(e.ui.itemTrailing({class:[e.uiOverride?.itemTrailing,t.ui?.itemTrailing]}))},[x(y.$slots,t.slot?`${t.slot}-trailing`:"item-trailing",{item:t,active:g,index:l,ui:e.ui},()=>[t.children?.length?(s(),d(E,{key:0,name:r.value,"data-slot":"itemTrailingIcon",class:u(e.ui.itemTrailingIcon({class:[e.uiOverride?.itemTrailingIcon,t.ui?.itemTrailingIcon],color:t?.color,active:g}))},null,8,["name","class"])):t.kbds?.length?(s(),h("span",{key:1,"data-slot":"itemTrailingKbds",class:u(e.ui.itemTrailingKbds({class:[e.uiOverride?.itemTrailingKbds,t.ui?.itemTrailingKbds]}))},[(s(!0),h(D,null,R(t.kbds,(T,q)=>(s(),d(Ne,L({key:q,size:t.ui?.itemTrailingKbdsSize||e.uiOverride?.itemTrailingKbdsSize||e.ui.itemTrailingKbdsSize()},{ref_for:!0},typeof T=="string"?{value:T}:T),null,16,["size"]))),128))],2)):O("",!0)]),b(n($).ItemIndicator,{"as-child":""},{default:m(()=>[b(E,{name:e.checkedIcon||n(k).ui.icons.check,"data-slot":"itemTrailingIcon",class:u(e.ui.itemTrailingIcon({class:[e.uiOverride?.itemTrailingIcon,t.ui?.itemTrailingIcon],color:t?.color}))},null,8,["name","class"])]),_:2},1024)],2)])]),_:3}),b(n($).Portal,ee(te(n(N))),{default:m(()=>[(s(),d(le(e.sub?n($).SubContent:n($).Content),L({"data-slot":"content",class:e.ui.content({class:[e.uiOverride?.content,o.class]})},n(B)),{default:m(()=>[x(y.$slots,"content-top",{sub:e.sub??!1}),H("div",{role:"presentation","data-slot":"viewport",class:u(e.ui.viewport({class:e.uiOverride?.viewport}))},[(s(!0),h(D,null,R(c.value,(t,g)=>(s(),d(n($).Group,{key:`group-${g}`,"data-slot":"group",class:u(e.ui.group({class:e.uiOverride?.group}))},{default:m(()=>[(s(!0),h(D,null,R(t,(l,T)=>(s(),h(D,{key:`group-${g}-${T}`},[l.type==="label"?(s(),d(n($).Label,{key:0,"data-slot":"label",class:u(e.ui.label({class:[e.uiOverride?.label,l.ui?.label,l.class]}))},{default:m(()=>[b(n(P),{item:l,index:T},null,8,["item","index"])]),_:2},1032,["class"])):l.type==="separator"?(s(),d(n($).Separator,{key:1,"data-slot":"separator",class:u(e.ui.separator({class:[e.uiOverride?.separator,l.ui?.separator,l.class]}))},null,8,["class"])):l?.children?.length?(s(),d(n($).Sub,{key:2,open:l.open,"default-open":l.defaultOpen},{default:m(()=>[b(n($).SubTrigger,{as:"button",type:"button",disabled:l.disabled,"text-value":n(W)(l,o.labelKey),"data-slot":"item",class:u(e.ui.item({class:[e.uiOverride?.item,l.ui?.item,l.class],color:l?.color}))},{default:m(()=>[b(n(P),{item:l,index:T},null,8,["item","index"])]),_:2},1032,["disabled","text-value","class"]),b(ge,L({sub:"",class:l.ui?.content,ui:e.ui,"ui-override":e.uiOverride,portal:e.portal,items:l.children,"align-offset":-4,"label-key":e.labelKey,"description-key":e.descriptionKey,"checked-icon":e.checkedIcon,"loading-icon":e.loadingIcon,"external-icon":e.externalIcon},{ref_for:!0},l.content),de({_:2},[R(I(),(q,S)=>({name:S,fn:m(f=>[x(y.$slots,S,L({ref_for:!0},f))])}))]),1040,["class","ui","ui-override","portal","items","label-key","description-key","checked-icon","loading-icon","external-icon"])]),_:2},1032,["open","default-open"])):l.type==="checkbox"?(s(),d(n($).CheckboxItem,{key:3,"model-value":l.checked,disabled:l.disabled,"text-value":n(W)(l,o.labelKey),"data-slot":"item",class:u(e.ui.item({class:[e.uiOverride?.item,l.ui?.item,l.class],color:l?.color})),"onUpdate:modelValue":l.onUpdateChecked,onSelect:l.onSelect},{default:m(()=>[b(n(P),{item:l,index:T},null,8,["item","index"])]),_:2},1032,["model-value","disabled","text-value","class","onUpdate:modelValue","onSelect"])):(s(),d(n($).Item,{key:4,"as-child":"",disabled:l.disabled,"text-value":n(W)(l,o.labelKey),onSelect:l.onSelect},{default:m(()=>[b(ze,L({ref_for:!0},n(qe)(l),{custom:""}),{default:m(({active:q,...S})=>[b(Se,L({ref_for:!0},S,{"data-slot":"item",class:e.ui.item({class:[e.uiOverride?.item,l.ui?.item,l.class],active:q,color:l?.color})}),{default:m(()=>[b(n(P),{item:l,active:q,index:T},null,8,["item","active","index"])]),_:2},1040,["class"])]),_:2},1040)]),_:2},1032,["disabled","text-value","onSelect"]))],64))),128))]),_:2},1032,["class"]))),128))],2),x(y.$slots,"default"),x(y.$slots,"content-bottom",{sub:e.sub??!1})]),_:3},16,["class"]))]),_:3},16)],64))}},Me={slots:{content:"min-w-32 bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-context-menu-content-transform-origin) flex flex-col",viewport:"relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",group:"p-1 isolate",label:"w-full flex items-center font-semibold text-highlighted",separator:"-mx-1 my-1 h-px bg-border",item:"group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75",itemLeadingIcon:"shrink-0",itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0",itemTrailingKbds:"hidden lg:inline-flex items-center shrink-0",itemTrailingKbdsSize:"",itemWrapper:"flex-1 flex flex-col text-start min-w-0",itemLabel:"truncate",itemDescription:"truncate text-muted",itemLabelExternalIcon:"inline-block size-3 align-top text-dimmed"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},active:{true:{item:"text-highlighted before:bg-elevated",itemLeadingIcon:"text-default"},false:{item:["text-default data-highlighted:text-highlighted data-[state=open]:text-highlighted data-highlighted:before:bg-elevated/50 data-[state=open]:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["text-dimmed group-data-highlighted:text-default group-data-[state=open]:text-default","transition-colors"]}},loading:{true:{itemLeadingIcon:"animate-spin"}},size:{xs:{label:"p-1 text-xs gap-1",item:"p-1 text-xs gap-1",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemTrailingIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},sm:{label:"p-1.5 text-xs gap-1.5",item:"p-1.5 text-xs gap-1.5",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemTrailingIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},md:{label:"p-1.5 text-sm gap-1.5",item:"p-1.5 text-sm gap-1.5",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemTrailingIcon:"size-5",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"md"},lg:{label:"p-2 text-sm gap-2",item:"p-2 text-sm gap-2",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemTrailingIcon:"size-5",itemTrailingKbds:"gap-1",itemTrailingKbdsSize:"md"},xl:{label:"p-2 text-base gap-2",item:"p-2 text-base gap-2",itemLeadingIcon:"size-6",itemLeadingAvatarSize:"xs",itemTrailingIcon:"size-6",itemTrailingKbds:"gap-1",itemTrailingKbdsSize:"lg"}}},compoundVariants:[{color:"primary",active:!1,class:{item:"text-primary data-highlighted:text-primary data-highlighted:before:bg-primary/10 data-[state=open]:before:bg-primary/10",itemLeadingIcon:"text-primary/75 group-data-highlighted:text-primary group-data-[state=open]:text-primary"}},{color:"secondary",active:!1,class:{item:"text-secondary data-highlighted:text-secondary data-highlighted:before:bg-secondary/10 data-[state=open]:before:bg-secondary/10",itemLeadingIcon:"text-secondary/75 group-data-highlighted:text-secondary group-data-[state=open]:text-secondary"}},{color:"success",active:!1,class:{item:"text-success data-highlighted:text-success data-highlighted:before:bg-success/10 data-[state=open]:before:bg-success/10",itemLeadingIcon:"text-success/75 group-data-highlighted:text-success group-data-[state=open]:text-success"}},{color:"info",active:!1,class:{item:"text-info data-highlighted:text-info data-highlighted:before:bg-info/10 data-[state=open]:before:bg-info/10",itemLeadingIcon:"text-info/75 group-data-highlighted:text-info group-data-[state=open]:text-info"}},{color:"warning",active:!1,class:{item:"text-warning data-highlighted:text-warning data-highlighted:before:bg-warning/10 data-[state=open]:before:bg-warning/10",itemLeadingIcon:"text-warning/75 group-data-highlighted:text-warning group-data-[state=open]:text-warning"}},{color:"error",active:!1,class:{item:"text-error data-highlighted:text-error data-highlighted:before:bg-error/10 data-[state=open]:before:bg-error/10",itemLeadingIcon:"text-error/75 group-data-highlighted:text-error group-data-[state=open]:text-error"}},{color:"primary",active:!0,class:{item:"text-primary before:bg-primary/10",itemLeadingIcon:"text-primary"}},{color:"secondary",active:!0,class:{item:"text-secondary before:bg-secondary/10",itemLeadingIcon:"text-secondary"}},{color:"success",active:!0,class:{item:"text-success before:bg-success/10",itemLeadingIcon:"text-success"}},{color:"info",active:!0,class:{item:"text-info before:bg-info/10",itemLeadingIcon:"text-info"}},{color:"warning",active:!0,class:{item:"text-warning before:bg-warning/10",itemLeadingIcon:"text-warning"}},{color:"error",active:!0,class:{item:"text-error before:bg-error/10",itemLeadingIcon:"text-error"}}],defaultVariants:{size:"md"}},Ze={__name:"UContextMenu",props:{size:{type:null,required:!1},items:{type:null,required:!1},checkedIcon:{type:null,required:!1},loadingIcon:{type:null,required:!1},externalIcon:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},content:{type:Object,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},disabled:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},pressOpenDelay:{type:Number,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:A}){const o=e,i=A,K=Q(),V=ie(),k=ne(ue(o,"modal"),i),N=se(()=>o.content),B=()=>ce(K,["default"]),I=w(()=>J({extend:J(Me),...V.ui?.contextMenu||{}})({size:o.size}));return(M,P)=>(s(),d(n(Ve),ee(te(n(k))),{default:m(()=>[K.default?(s(),d(n(Pe),{key:0,"as-child":"",disabled:e.disabled,class:u(o.class)},{default:m(()=>[x(M.$slots,"default")]),_:3},8,["disabled","class"])):O("",!0),b(ge,L({class:I.value.content({class:[!K.default&&o.class,o.ui?.content]}),ui:I.value,"ui-override":o.ui},N.value,{items:e.items,portal:e.portal,"label-key":e.labelKey,"description-key":e.descriptionKey,"checked-icon":e.checkedIcon,"loading-icon":e.loadingIcon,"external-icon":e.externalIcon}),de({_:2},[R(B(),(r,c)=>({name:c,fn:m(y=>[x(M.$slots,c,ee(te(y)))])}))]),1040,["class","ui","ui-override","items","portal","label-key","description-key","checked-icon","loading-icon","external-icon"])]),_:3},16))}};export{Xe as _,Ze as a};
|