cognova 0.2.7 → 0.2.8
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/{BjFs8Ujb.js → -2AbaFNH.js} +1 -1
- package/.output/public/_nuxt/{B5OWqWCh.js → 0dqQoCHY.js} +1 -1
- package/.output/public/_nuxt/{DZ_azKLI.js → 2QHXgMyi.js} +1 -1
- package/.output/public/_nuxt/{DaiWSWdm.js → 36ZHqDPo.js} +1 -1
- package/.output/public/_nuxt/4XnyUc7C.js +1 -0
- package/.output/public/_nuxt/{DgKeJf5C.js → 6QDVg5TO.js} +1 -1
- package/.output/public/_nuxt/{RRoc4m9d.js → B-AlyT2D.js} +1 -1
- package/.output/public/_nuxt/{1Hz98MKF.js → B0xuHXvN.js} +1 -1
- package/.output/public/_nuxt/{BW-E-Sar.js → B2Xfh7am.js} +1 -1
- package/.output/public/_nuxt/{Bb1B0ntt.js → B5SnZL2l.js} +1 -1
- package/.output/public/_nuxt/{CEfkp9Rl.js → B6-U3KqJ.js} +2 -2
- package/.output/public/_nuxt/{Cebw7Q7c.js → B6G3NLfW.js} +1 -1
- package/.output/public/_nuxt/B8TQvzYX.js +1 -0
- package/.output/public/_nuxt/{D3V98LVR.js → B9zgEO8N.js} +1 -1
- package/.output/public/_nuxt/{CNwGp6eP.js → BBDxhFYY.js} +1 -1
- package/.output/public/_nuxt/{Dkzqkzki.js → BCCYopTB.js} +1 -1
- package/.output/public/_nuxt/{CfWDee_q.js → BE1CVWts.js} +1 -1
- package/.output/public/_nuxt/{BTk5mgdf.js → BF3tVKtX.js} +1 -1
- package/.output/public/_nuxt/{HCCuOAgZ.js → BHn8tRjg.js} +1 -1
- package/.output/public/_nuxt/BIo-9u_O.js +1 -0
- package/.output/public/_nuxt/{CG0fS-BQ.js → BJUff9Ku.js} +1 -1
- package/.output/public/_nuxt/{CrjKigv8.js → BLm0UviR.js} +1 -1
- package/.output/public/_nuxt/BLwctszt.js +1 -0
- package/.output/public/_nuxt/BMs0mHEp.js +1 -0
- package/.output/public/_nuxt/{DV0JMebZ.js → BSA-U0so.js} +1 -1
- package/.output/public/_nuxt/{D-wVwRIx.js → BUC36BHp.js} +1 -1
- package/.output/public/_nuxt/{CzqLfT8k.js → BVEFmI4I.js} +1 -1
- package/.output/public/_nuxt/{B43p0So7.js → BXtZVbmx.js} +1 -1
- package/.output/public/_nuxt/{BJ_GgKV0.js → BYtVdUIW.js} +1 -1
- package/.output/public/_nuxt/{CJ85o8FK.js → BZBNJD7U.js} +1 -1
- package/.output/public/_nuxt/{Dpp5cOwJ.js → BahXyh-A.js} +1 -1
- package/.output/public/_nuxt/{BmTCDcNm.js → BdxP21ep.js} +1 -1
- package/.output/public/_nuxt/{Bc0NIKN7.js → BefOhWHD.js} +1 -1
- package/.output/public/_nuxt/{DuOsLoVR.js → BhYoxmLV.js} +1 -1
- package/.output/public/_nuxt/{BMLwzSDu.js → Bhhg7oSf.js} +1 -1
- package/.output/public/_nuxt/{deSeNTOh.js → BjnQ1pI1.js} +1 -1
- package/.output/public/_nuxt/{qW7F87d8.js → BkO884Ds.js} +3 -3
- package/.output/public/_nuxt/{BNlugvM3.js → Bkc1Hpcf.js} +1 -1
- package/.output/public/_nuxt/{DgPiIWA2.js → BlsIfvSf.js} +1 -1
- package/.output/public/_nuxt/{Dysa6np_.js → BmaHzvZM.js} +1 -1
- package/.output/public/_nuxt/{CBrXB4hk.js → BmdlymIW.js} +1 -1
- package/.output/public/_nuxt/{CK5Ef4YR.js → BnJ-6YDw.js} +1 -1
- package/.output/public/_nuxt/{C5nfaH9w.js → BqTdsCnW.js} +1 -1
- package/.output/public/_nuxt/{CjRmY2OQ.js → BrOKokPO.js} +1 -1
- package/.output/public/_nuxt/{B7-0ADn3.js → Buf1PAiO.js} +1 -1
- package/.output/public/_nuxt/{CqiOV9n1.js → BvstjGHC.js} +1 -1
- package/.output/public/_nuxt/{DsKy-gee.js → BwC62XRN.js} +1 -1
- package/.output/public/_nuxt/{WWNeb45u.js → Bwn-CRYH.js} +1 -1
- package/.output/public/_nuxt/{BsXPllgv.js → BwyXWqBY.js} +1 -1
- package/.output/public/_nuxt/{C6Kc4XvS.js → BxShcW0K.js} +1 -1
- package/.output/public/_nuxt/{NBE83ZQn.js → C-HCArYP.js} +1 -1
- package/.output/public/_nuxt/{sdvIKLwS.js → C-Ygk9x5.js} +1 -1
- package/.output/public/_nuxt/{Dx2Tgm6S.js → C075hYlX.js} +1 -1
- package/.output/public/_nuxt/{C14DGwaT.js → C13FKhqK.js} +1 -1
- package/.output/public/_nuxt/{BLszW9T3.js → C1tCdK-M.js} +1 -1
- package/.output/public/_nuxt/{BdCB2PoJ.js → C21BjagS.js} +1 -1
- package/.output/public/_nuxt/{B_28CKij.js → C24so3m7.js} +2 -2
- package/.output/public/_nuxt/{Drr-RSSP.js → C3tximD1.js} +1 -1
- package/.output/public/_nuxt/{XzRnkkwG.js → C6FFW_cO.js} +1 -1
- package/.output/public/_nuxt/{Cedv1M65.js → C6sX7TYf.js} +1 -1
- package/.output/public/_nuxt/{CnW8zyuA.js → C7qhmmZh.js} +1 -1
- package/.output/public/_nuxt/{CSQ-nblB.js → CAfyXyeo.js} +1 -1
- package/.output/public/_nuxt/{DxR8g9So.js → CClsKJ9A.js} +1 -1
- package/.output/public/_nuxt/{Ci-MVdCd.js → CDkyQ1eQ.js} +1 -1
- package/.output/public/_nuxt/CE9_ECxx.js +1 -0
- package/.output/public/_nuxt/{JJIcQEna.js → CEDw8osP.js} +1 -1
- package/.output/public/_nuxt/{CwJR22-0.js → CEz288t8.js} +1 -1
- package/.output/public/_nuxt/{BvuV9uCn.js → CF33v_m5.js} +1 -1
- package/.output/public/_nuxt/{DytaiikM.js → CH_jROT9.js} +1 -1
- package/.output/public/_nuxt/{NlScC3GW.js → CO3hceDE.js} +1 -1
- package/.output/public/_nuxt/{ByfSJZV6.js → CQ3tAemj.js} +1 -1
- package/.output/public/_nuxt/{DMsHLHmB.js → CSHcfejh.js} +1 -1
- package/.output/public/_nuxt/{DAs574wU.js → CSjOaBKu.js} +1 -1
- package/.output/public/_nuxt/{DNpsjOxN.js → CVYcsqmL.js} +1 -1
- package/.output/public/_nuxt/{DfpSaqgV.js → CXTrUfQ5.js} +1 -1
- package/.output/public/_nuxt/{0LyRrTRM.js → CY7f553E.js} +1 -1
- package/.output/public/_nuxt/{A5lrd5_j.js → CYQP4zpi.js} +1 -1
- package/.output/public/_nuxt/CbvNJVrk.js +1 -0
- package/.output/public/_nuxt/CewcVxDS.js +1 -0
- package/.output/public/_nuxt/{1IuG3yiQ.js → CfY_bsV0.js} +1 -1
- package/.output/public/_nuxt/{4bC1z31I.js → ClGn48iq.js} +1 -1
- package/.output/public/_nuxt/{CwaMSU1O.js → CqFcWBkW.js} +1 -1
- package/.output/public/_nuxt/Cr0NfhPB.js +1 -0
- package/.output/public/_nuxt/{CXuKrnTA.js → CrmE-JGu.js} +1 -1
- package/.output/public/_nuxt/{CW8xtqwN.js → Cve4psva.js} +1 -1
- package/.output/public/_nuxt/{BsPj3ifk.js → CzAZpALW.js} +1 -1
- package/.output/public/_nuxt/{S4a_N6rD.js → D-5A6cMB.js} +1 -1
- package/.output/public/_nuxt/{HC3657Xq.js → D-Ge96eV.js} +1 -1
- package/.output/public/_nuxt/{fTEmwfo4.js → D04CyXmf.js} +1 -1
- package/.output/public/_nuxt/{B9Kd_0HK.js → D2kQkOaG.js} +1 -1
- package/.output/public/_nuxt/{jeu3Xx8e.js → D4Cizi4y.js} +1 -1
- package/.output/public/_nuxt/{B-5roYpk.js → D4X6ONPF.js} +1 -1
- package/.output/public/_nuxt/{_16_b82K.js → D4_89MZm.js} +1 -1
- package/.output/public/_nuxt/{Db5XIfWS.js → D79lbuWG.js} +1 -1
- package/.output/public/_nuxt/{DAFasgHH.js → D7pKT3IW.js} +1 -1
- package/.output/public/_nuxt/{DZdh7_lh.js → D887s9k9.js} +1 -1
- package/.output/public/_nuxt/{DImdNj-F.js → D9aYkNhQ.js} +1 -1
- package/.output/public/_nuxt/{BoPAYize.js → DJt7Rogf.js} +1 -1
- package/.output/public/_nuxt/{BZFXnEwe.js → DKKY8zWm.js} +1 -1
- package/.output/public/_nuxt/{BJi2ZHtT.js → DLUvsixu.js} +1 -1
- package/.output/public/_nuxt/{zBoPDS4z.js → DMb_1D81.js} +1 -1
- package/.output/public/_nuxt/{CzTTKfet.js → DX_9SfFb.js} +1 -1
- package/.output/public/_nuxt/{CpC3C9gj.js → DZEuR9ms.js} +1 -1
- package/.output/public/_nuxt/{DCco_rlV.js → D_O7SlHm.js} +1 -1
- package/.output/public/_nuxt/{DvgLoqaC.js → D_obX2Hj.js} +1 -1
- package/.output/public/_nuxt/{CeDxLTxX.js → DaBSQDif.js} +1 -1
- package/.output/public/_nuxt/{DB3y_21M.js → Dbfwn2zk.js} +1 -1
- package/.output/public/_nuxt/{-2wkydbj.js → DcbbfwCe.js} +1 -1
- package/.output/public/_nuxt/{MdebRWqA.js → DmDPSvxi.js} +1 -1
- package/.output/public/_nuxt/{CVr40yKH.js → DmOS3vFH.js} +1 -1
- package/.output/public/_nuxt/DmcMCO8x.js +1 -0
- package/.output/public/_nuxt/DmlZSBjF.js +1 -0
- package/.output/public/_nuxt/{CB8_A8N4.js → DqzomZoo.js} +1 -1
- package/.output/public/_nuxt/{0J8pJb0Z.js → Drxf7nJz.js} +1 -1
- package/.output/public/_nuxt/{CjYUi9c8.js → Dt5mOzXj.js} +1 -1
- package/.output/public/_nuxt/{Brqrl-cH.js → DtJnWtpL.js} +1 -1
- package/.output/public/_nuxt/{CwCEQ4Dw.js → DtyyytRx.js} +1 -1
- package/.output/public/_nuxt/{CphXSvBo.js → DwIYtFfA.js} +1 -1
- package/.output/public/_nuxt/{CLZS246x.js → GGcn5KPW.js} +1 -1
- package/.output/public/_nuxt/{pkbwpgSD.js → GYf-vnR6.js} +1 -1
- package/.output/public/_nuxt/{Bn8loaeQ.js → ImPsUDiH.js} +1 -1
- package/.output/public/_nuxt/{hqpqUuXS.js → JReYPlwF.js} +1 -1
- package/.output/public/_nuxt/{CgQKyBSS.js → KEeoKtq_.js} +1 -1
- package/.output/public/_nuxt/{Bf34lExB.js → LQNRVThr.js} +1 -1
- package/.output/public/_nuxt/{BhOIdu3Z.js → MWUW1sIF.js} +1 -1
- package/.output/public/_nuxt/{w3t8WD8v.js → Pn7VD6uQ.js} +1 -1
- package/.output/public/_nuxt/{BaJEGr8G.js → SfaNtyKS.js} +1 -1
- package/.output/public/_nuxt/{vM-wdhkZ.js → U3f6dy8i.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/410e449d-9fe8-43a0-ae07-80797693b9b8.json +1 -0
- package/.output/public/_nuxt/{BrICHPil.js → cPPThz84.js} +1 -1
- package/.output/public/_nuxt/{CxJr4mB0.js → dB7G4iIC.js} +1 -1
- package/.output/public/_nuxt/{EgYyfo1g.js → eE8TtXgC.js} +3 -3
- package/.output/public/_nuxt/iBaivqi8.js +1 -0
- package/.output/public/_nuxt/{BLL1JLwq.js → ijmD2cEW.js} +1 -1
- package/.output/public/_nuxt/{DpYns7cT.js → it8syoZI.js} +1 -1
- package/.output/public/_nuxt/mT7Mt2d7.js +1 -0
- package/.output/public/_nuxt/{Bb9LNSu_.js → mfAEx0Kz.js} +1 -1
- package/.output/public/_nuxt/{MzEmU9ER.js → nHSiDk8N.js} +1 -1
- package/.output/public/_nuxt/{CvMqUdkl.js → njnzCNrH.js} +3 -3
- package/.output/public/_nuxt/{atVSHCxP.js → pHCJ6lhw.js} +1 -1
- package/.output/public/_nuxt/{Cow1TrPj.js → vES4kgx7.js} +1 -1
- package/.output/public/_nuxt/{Zjvb5YJR.js → yJ9vRvHj.js} +1 -1
- package/.output/public/_nuxt/{B8Kve-DH.js → zO9MgHj2.js} +1 -1
- package/.output/public/_nuxt/{BaVaTug8.js → zXvvpsZj.js} +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/server.mjs +1 -1
- package/.output/server/chunks/build/{settings-DuT6LGJZ.mjs → settings-ByUXa46k.mjs} +1507 -218
- package/.output/server/chunks/build/settings-ByUXa46k.mjs.map +1 -0
- package/.output/server/chunks/build/styles.mjs +2 -2
- package/.output/server/chunks/nitro/nitro.mjs +872 -872
- package/.output/server/package.json +1 -1
- package/app/pages/settings.vue +441 -5
- package/package.json +1 -1
- package/server/api/skills/import.post.ts +1 -1
- package/server/bridge/adapters/telegram.ts +1 -1
- package/.output/public/_nuxt/B-YQztaH.js +0 -1
- package/.output/public/_nuxt/B1gFtqXK.js +0 -1
- package/.output/public/_nuxt/BTfZ7nek.js +0 -1
- package/.output/public/_nuxt/BbPnqQJ0.js +0 -1
- package/.output/public/_nuxt/BhSWIRpp.js +0 -1
- package/.output/public/_nuxt/By6kmkhJ.js +0 -1
- package/.output/public/_nuxt/C4XVJnNJ.js +0 -1
- package/.output/public/_nuxt/CkvyAKbu.js +0 -1
- package/.output/public/_nuxt/D2f7BlK2.js +0 -1
- package/.output/public/_nuxt/D2lmhTjQ.js +0 -1
- package/.output/public/_nuxt/D64-rCSQ.js +0 -1
- package/.output/public/_nuxt/DGP2JJt8.js +0 -1
- package/.output/public/_nuxt/builds/meta/9863fe43-d78c-4b29-a1e8-e6de61119507.json +0 -1
- package/.output/public/_nuxt/f7zDjk6q.js +0 -1
- package/.output/server/chunks/build/settings-DuT6LGJZ.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{N as rc,c as Oe,al as Ei,K as te,cg as ic,Q as oc,R as He,S as ac,a4 as oa,U as sc,C as cc,a3 as uc,h as lc,ch as Di,a as Un,aP as fc,e as $e,ah as hc,G as Vn,f as oe,y as dc,q as Xn,D as ur,a2 as qn,aA as Vr,k as Xr}from"./CvMqUdkl.js";import{a as Gn,t as pt,c as ae,n as gc,g as Oi,d as mc,f as aa,e as pc}from"./C8ut0f5H.js";import{g as vc}from"./CqkleIqs.js";const yc={base:"relative",variants:{size:{xs:"",sm:"",md:"",lg:"",xl:""},orientation:{horizontal:"inline-flex -space-x-px",vertical:"flex flex-col -space-y-px"}}},Bm={__name:"UFieldGroup",props:{as:{type:null,required:!1},size:{type:null,required:!1},orientation:{type:null,required:!1,default:"horizontal"},class:{type:null,required:!1},ui:{type:null,required:!1}},setup(t){const e=t,n=rc(),r=Oe(()=>Ei({extend:Ei(yc),...n.ui?.fieldGroup||{}}));return te(ic,Oe(()=>({orientation:e.orientation,size:e.size}))),(i,o)=>(He(),oc(cc(uc),{as:t.as,"data-orientation":t.orientation,class:sc(r.value({orientation:t.orientation,class:e.class}))},{default:ac(()=>[oa(i.$slots,"default")]),_:3},8,["as","data-orientation","class"]))}};function Ne(t,e){const n=Gn(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=pt(t,e?.in),o=i.getDay(),a=(o<r?7:0)+o-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function _n(t,e){return Ne(t,{...e,weekStartsOn:1})}function sa(t,e){const n=pt(t,e?.in),r=n.getFullYear(),i=ae(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=_n(i),a=ae(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=_n(a);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function $i(t,e){const n=pt(t,e?.in);return n.setHours(0,0,0,0),n}function xc(t,e,n){const[r,i]=gc(n?.in,t,e),o=$i(r),a=$i(i),s=+o-Oi(o),c=+a-Oi(a);return Math.round((s-c)/mc)}function wc(t,e){const n=sa(t,e),r=ae(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),_n(r)}function _c(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function bc(t){return!(!_c(t)&&typeof t!="number"||isNaN(+pt(t)))}function kc(t,e){const n=pt(t,e?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Tc(t,e){const n=pt(t,e?.in);return xc(n,kc(n))+1}function Sc(t,e){const n=pt(t,e?.in),r=+_n(n)-+wc(n);return Math.round(r/aa)+1}function ca(t,e){const n=pt(t,e?.in),r=n.getFullYear(),i=Gn(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=ae(e?.in||t,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=Ne(a,e),c=ae(e?.in||t,0);c.setFullYear(r,0,o),c.setHours(0,0,0,0);const u=Ne(c,e);return+n>=+s?r+1:+n>=+u?r:r-1}function Cc(t,e){const n=Gn(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=ca(t,e),o=ae(e?.in||t,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),Ne(o,e)}function Mc(t,e){const n=pt(t,e?.in),r=+Ne(n,e)-+Cc(n,e);return Math.round(r/aa)+1}function P(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const At={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return P(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):P(n+1,2)},d(t,e){return P(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(t,e){return P(t.getHours()%12||12,e.length)},H(t,e){return P(t.getHours(),e.length)},m(t,e){return P(t.getMinutes(),e.length)},s(t,e){return P(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return P(i,e.length)}},jt={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ni={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return At.y(t,e)},Y:function(t,e,n,r){const i=ca(t,r),o=i>0?i:1-i;if(e==="YY"){const a=o%100;return P(a,2)}return e==="Yo"?n.ordinalNumber(o,{unit:"year"}):P(o,e.length)},R:function(t,e){const n=sa(t);return P(n,e.length)},u:function(t,e){const n=t.getFullYear();return P(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return P(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return P(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return At.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return P(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const i=Mc(t,r);return e==="wo"?n.ordinalNumber(i,{unit:"week"}):P(i,e.length)},I:function(t,e,n){const r=Sc(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):P(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):At.d(t,e)},D:function(t,e,n){const r=Tc(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):P(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const i=t.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return P(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const i=t.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return P(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),i=r===0?7:r;switch(e){case"i":return String(i);case"ii":return P(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let i;switch(r===12?i=jt.noon:r===0?i=jt.midnight:i=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let i;switch(r>=17?i=jt.evening:r>=12?i=jt.afternoon:r>=4?i=jt.morning:i=jt.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return At.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):At.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):P(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):P(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):At.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):At.s(t,e)},S:function(t,e){return At.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return Fi(r);case"XXXX":case"XX":return Ft(r);default:return Ft(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return Fi(r);case"xxxx":case"xx":return Ft(r);default:return Ft(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Ri(r,":");default:return"GMT"+Ft(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Ri(r,":");default:return"GMT"+Ft(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return P(r,e.length)},T:function(t,e,n){return P(+t,e.length)}};function Ri(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+e+P(o,2)}function Fi(t,e){return t%60===0?(t>0?"-":"+")+P(Math.abs(t)/60,2):Ft(t,e)}function Ft(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),i=P(Math.trunc(r/60),2),o=P(r%60,2);return n+i+e+o}const Pi=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},ua=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Ac=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Pi(t,e);let o;switch(r){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",Pi(r,e)).replace("{{time}}",ua(i,e))},Ec={p:ua,P:Ac},Dc=/^D+$/,Oc=/^Y+$/,$c=["D","DD","YY","YYYY"];function Nc(t){return Dc.test(t)}function Rc(t){return Oc.test(t)}function Fc(t,e,n){const r=Pc(t,e,n);if(console.warn(r),$c.includes(t))throw new RangeError(r)}function Pc(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Ic=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Lc=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Bc=/^'([^]*?)'?$/,zc=/''/g,Wc=/[a-zA-Z]/;function zm(t,e,n){const r=Gn(),i=r.locale??pc,o=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=pt(t,n?.in);if(!bc(s))throw new RangeError("Invalid time value");let c=e.match(Lc).map(l=>{const f=l[0];if(f==="p"||f==="P"){const h=Ec[f];return h(l,i.formatLong)}return l}).join("").match(Ic).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const f=l[0];if(f==="'")return{isToken:!1,value:Hc(l)};if(Ni[f])return{isToken:!0,value:l};if(f.match(Wc))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:l}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));const u={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return c.map(l=>{if(!l.isToken)return l.value;const f=l.value;(Rc(f)||Nc(f))&&Fc(f,e,String(t));const h=Ni[f[0]];return h(s,f,i.localize,u)}).join("")}function Hc(t){const e=t.match(Bc);return e?e[1].replace(zc,"'"):t}var Tr="http://www.w3.org/1999/xhtml";const Ii={svg:"http://www.w3.org/2000/svg",xhtml:Tr,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Zn(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Ii.hasOwnProperty(e)?{space:Ii[e],local:t}:t}function Yc(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Tr&&e.documentElement.namespaceURI===Tr?e.createElement(t):e.createElementNS(n,t)}}function Uc(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function la(t){var e=Zn(t);return(e.local?Uc:Yc)(e)}function Vc(){}function qr(t){return t==null?Vc:function(){return this.querySelector(t)}}function Xc(t){typeof t!="function"&&(t=qr(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),c,u,l=0;l<a;++l)(c=o[l])&&(u=t.call(c,c.__data__,l,o))&&("__data__"in c&&(u.__data__=c.__data__),s[l]=u);return new rt(r,this._parents)}function qc(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Gc(){return[]}function fa(t){return t==null?Gc:function(){return this.querySelectorAll(t)}}function Zc(t){return function(){return qc(t.apply(this,arguments))}}function Qc(t){typeof t=="function"?t=Zc(t):t=fa(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,c,u=0;u<s;++u)(c=a[u])&&(r.push(t.call(c,c.__data__,u,a)),i.push(c));return new rt(r,i)}function ha(t){return function(){return this.matches(t)}}function da(t){return function(e){return e.matches(t)}}var Kc=Array.prototype.find;function jc(t){return function(){return Kc.call(this.children,t)}}function Jc(){return this.firstElementChild}function tu(t){return this.select(t==null?Jc:jc(typeof t=="function"?t:da(t)))}var eu=Array.prototype.filter;function nu(){return Array.from(this.children)}function ru(t){return function(){return eu.call(this.children,t)}}function iu(t){return this.selectAll(t==null?nu:ru(typeof t=="function"?t:da(t)))}function ou(t){typeof t!="function"&&(t=ha(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],c,u=0;u<a;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&s.push(c);return new rt(r,this._parents)}function ga(t){return new Array(t.length)}function au(){return new rt(this._enter||this._groups.map(ga),this._parents)}function bn(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}bn.prototype={constructor:bn,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function su(t){return function(){return t}}function cu(t,e,n,r,i,o){for(var a=0,s,c=e.length,u=o.length;a<u;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new bn(t,o[a]);for(;a<c;++a)(s=e[a])&&(i[a]=s)}function uu(t,e,n,r,i,o,a){var s,c,u=new Map,l=e.length,f=o.length,h=new Array(l),d;for(s=0;s<l;++s)(c=e[s])&&(h[s]=d=a.call(c,c.__data__,s,e)+"",u.has(d)?i[s]=c:u.set(d,c));for(s=0;s<f;++s)d=a.call(t,o[s],s,o)+"",(c=u.get(d))?(r[s]=c,c.__data__=o[s],u.delete(d)):n[s]=new bn(t,o[s]);for(s=0;s<l;++s)(c=e[s])&&u.get(h[s])===c&&(i[s]=c)}function lu(t){return t.__data__}function fu(t,e){if(!arguments.length)return Array.from(this,lu);var n=e?uu:cu,r=this._parents,i=this._groups;typeof t!="function"&&(t=su(t));for(var o=i.length,a=new Array(o),s=new Array(o),c=new Array(o),u=0;u<o;++u){var l=r[u],f=i[u],h=f.length,d=hu(t.call(l,l&&l.__data__,u,r)),m=d.length,g=s[u]=new Array(m),v=a[u]=new Array(m),y=c[u]=new Array(h);n(l,f,g,v,y,d,e);for(var w=0,_=0,T,k;w<m;++w)if(T=g[w]){for(w>=_&&(_=w+1);!(k=v[_])&&++_<m;);T._next=k||null}}return a=new rt(a,r),a._enter=s,a._exit=c,a}function hu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function du(){return new rt(this._exit||this._groups.map(ga),this._parents)}function gu(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function mu(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),c=0;c<a;++c)for(var u=n[c],l=r[c],f=u.length,h=s[c]=new Array(f),d,m=0;m<f;++m)(d=u[m]||l[m])&&(h[m]=d);for(;c<i;++c)s[c]=n[c];return new rt(s,this._parents)}function pu(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function vu(t){t||(t=yu);function e(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,c=i[o]=new Array(s),u,l=0;l<s;++l)(u=a[l])&&(c[l]=u);c.sort(e)}return new rt(i,this._parents).order()}function yu(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function xu(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function wu(){return Array.from(this)}function _u(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function bu(){let t=0;for(const e of this)++t;return t}function ku(){return!this.node()}function Tu(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function Su(t){return function(){this.removeAttribute(t)}}function Cu(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Mu(t,e){return function(){this.setAttribute(t,e)}}function Au(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Eu(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Du(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Ou(t,e){var n=Zn(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?Cu:Su:typeof e=="function"?n.local?Du:Eu:n.local?Au:Mu)(n,e))}function ma(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function $u(t){return function(){this.style.removeProperty(t)}}function Nu(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ru(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Fu(t,e,n){return arguments.length>1?this.each((e==null?$u:typeof e=="function"?Ru:Nu)(t,e,n??"")):se(this.node(),t)}function se(t,e){return t.style.getPropertyValue(e)||ma(t).getComputedStyle(t,null).getPropertyValue(e)}function Pu(t){return function(){delete this[t]}}function Iu(t,e){return function(){this[t]=e}}function Lu(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Bu(t,e){return arguments.length>1?this.each((e==null?Pu:typeof e=="function"?Lu:Iu)(t,e)):this.node()[t]}function pa(t){return t.trim().split(/^|\s+/)}function Gr(t){return t.classList||new va(t)}function va(t){this._node=t,this._names=pa(t.getAttribute("class")||"")}va.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function ya(t,e){for(var n=Gr(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function xa(t,e){for(var n=Gr(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function zu(t){return function(){ya(this,t)}}function Wu(t){return function(){xa(this,t)}}function Hu(t,e){return function(){(e.apply(this,arguments)?ya:xa)(this,t)}}function Yu(t,e){var n=pa(t+"");if(arguments.length<2){for(var r=Gr(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Hu:e?zu:Wu)(n,e))}function Uu(){this.textContent=""}function Vu(t){return function(){this.textContent=t}}function Xu(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function qu(t){return arguments.length?this.each(t==null?Uu:(typeof t=="function"?Xu:Vu)(t)):this.node().textContent}function Gu(){this.innerHTML=""}function Zu(t){return function(){this.innerHTML=t}}function Qu(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Ku(t){return arguments.length?this.each(t==null?Gu:(typeof t=="function"?Qu:Zu)(t)):this.node().innerHTML}function ju(){this.nextSibling&&this.parentNode.appendChild(this)}function Ju(){return this.each(ju)}function tl(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function el(){return this.each(tl)}function nl(t){var e=typeof t=="function"?t:la(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function rl(){return null}function il(t,e){var n=typeof t=="function"?t:la(t),r=e==null?rl:typeof e=="function"?e:qr(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function ol(){var t=this.parentNode;t&&t.removeChild(this)}function al(){return this.each(ol)}function sl(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function cl(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ul(t){return this.select(t?cl:sl)}function ll(t){return arguments.length?this.property("__data__",t):this.node().__data__}function fl(t){return function(e){t.call(this,e,this.__data__)}}function hl(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function dl(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function gl(t,e,n){return function(){var r=this.__on,i,o=fl(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function ml(t,e,n){var r=hl(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,u=s.length,l;c<u;++c)for(i=0,l=s[c];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=e?gl:dl,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function wa(t,e,n){var r=ma(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function pl(t,e){return function(){return wa(this,t,e)}}function vl(t,e){return function(){return wa(this,t,e.apply(this,arguments))}}function yl(t,e){return this.each((typeof e=="function"?vl:pl)(t,e))}function*xl(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var _a=[null];function rt(t,e){this._groups=t,this._parents=e}function Ye(){return new rt([[document.documentElement]],_a)}function wl(){return this}rt.prototype=Ye.prototype={constructor:rt,select:Xc,selectAll:Qc,selectChild:tu,selectChildren:iu,filter:ou,data:fu,enter:au,exit:du,join:gu,merge:mu,selection:wl,order:pu,sort:vu,call:xu,nodes:wu,node:_u,size:bu,empty:ku,each:Tu,attr:Ou,style:Fu,property:Bu,classed:Yu,text:qu,html:Ku,raise:Ju,lower:el,append:nl,insert:il,remove:al,clone:ul,datum:ll,on:ml,dispatch:yl,[Symbol.iterator]:xl};function kt(t){return typeof t=="string"?new rt([[document.querySelector(t)]],[document.documentElement]):new rt([[t]],_a)}function _l(t){let e;for(;e=t.sourceEvent;)t=e;return t}function kn(t,e){if(t=_l(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}var Me;(function(t){t[t.SVG=0]="SVG",t[t.HTML=1]="HTML"})(Me||(Me={}));var ce;(function(t){t.Fit="fit",t.Extend="extend",t.FitWidth="fit_width"})(ce||(ce={}));function Ae(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function bl(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Zr(t){let e,n,r;t.length!==2?(e=Ae,n=(s,c)=>Ae(t(s),c),r=(s,c)=>t(s)-c):(e=t===Ae||t===bl?t:kl,n=t,r=t);function i(s,c,u=0,l=s.length){if(u<l){if(e(c,c)!==0)return l;do{const f=u+l>>>1;n(s[f],c)<0?u=f+1:l=f}while(u<l)}return u}function o(s,c,u=0,l=s.length){if(u<l){if(e(c,c)!==0)return l;do{const f=u+l>>>1;n(s[f],c)<=0?u=f+1:l=f}while(u<l)}return u}function a(s,c,u=0,l=s.length){const f=i(s,c,u,l-1);return f>u&&r(s[f-1],c)>-r(s[f],c)?f-1:f}return{left:i,center:a,right:o}}function kl(){return 0}function ba(t){return t===null?NaN:+t}const ka=Zr(Ae),Ue=ka.right,Tl=ka.left;Zr(ba).center;function Sl(t,e){let n,r;for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));return[n,r]}class Li extends Map{constructor(e,n=Al){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(Bi(this,e))}has(e){return super.has(Bi(this,e))}set(e,n){return super.set(Cl(this,e),n)}delete(e){return super.delete(Ml(this,e))}}function Bi({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Cl({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Ml({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Al(t){return t!==null&&typeof t=="object"?t.valueOf():t}const El=Math.sqrt(50),Dl=Math.sqrt(10),Ol=Math.sqrt(2);function Tn(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=El?10:o>=Dl?5:o>=Ol?2:1;let s,c,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(t*u),c=Math.round(e*u),s/u<t&&++s,c/u>e&&--c,u=-u):(u=Math.pow(10,i)*a,s=Math.round(t/u),c=Math.round(e/u),s*u<t&&++s,c*u>e&&--c),c<s&&.5<=n&&n<2?Tn(t,e,n*2):[s,c,u]}function Sr(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?Tn(e,t,n):Tn(t,e,n);if(!(o>=i))return[];const s=o-i+1,c=new Array(s);if(r)if(a<0)for(let u=0;u<s;++u)c[u]=(o-u)/-a;else for(let u=0;u<s;++u)c[u]=(o-u)*a;else if(a<0)for(let u=0;u<s;++u)c[u]=(i+u)/-a;else for(let u=0;u<s;++u)c[u]=(i+u)*a;return c}function Cr(t,e,n){return e=+e,t=+t,n=+n,Tn(t,e,n)[2]}function Mr(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Cr(e,t,n):Cr(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function zi(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Wi(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function $l(t,e,n=ba){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t),s=+n(t[o+1],o+1,t);return a+(s-a)*(i-o)}}function Nl(t,e){let n=0,r=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function*Rl(t){for(const e of t)yield*e}function Fl(t){return Array.from(Rl(t))}function Pl(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function Il(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function Ll(t,e,n){var r={},i=r.noTrailing,o=i===void 0?!1:i,a=r.noLeading,s=a===void 0?!1:a,c=r.debounceMode,u=c===void 0?void 0:c,l,f=!1,h=0;function d(){l&&clearTimeout(l)}function m(v){var y=v||{},w=y.upcomingOnly,_=w===void 0?!1:w;d(),f=!_}function g(){for(var v=arguments.length,y=new Array(v),w=0;w<v;w++)y[w]=arguments[w];var _=this,T=Date.now()-h;if(f)return;function k(){h=Date.now(),e.apply(_,y)}function p(){l=void 0}!s&&u&&!l&&k(),d(),u===void 0&&T>t?s?(h=Date.now(),o||(l=setTimeout(u?p:k,t))):k():o!==!0&&(l=setTimeout(u?p:k,u===void 0?t-T:t))}return g.cancel=m,g}var wt;(function(t){t.Left="left",t.Right="right",t.Auto="auto"})(wt||(wt={}));const ee=t=>typeof t=="number",Qr=t=>typeof t=="function",Ve=t=>Array.isArray(t),Bl=t=>t instanceof Object,Sn=t=>t.constructor.name!=="Function"&&t.constructor.name!=="Object",Hi=t=>Bl(t)&&!Ve(t)&&!Qr(t)&&!Sn(t),Wm=t=>[Object,Array].includes((t||{}).constructor)&&!Object.entries(t||{}).length,Yt=(t,e,n=[],r=new Set)=>{if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;if(r.has(t))return!0;r.add(t);for(let i=0;i<t.length;i++)if(!Yt(t[i],e[i],n,r))return!1;return!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(typeof t=="object"&&t!==null&&e!==null){if(typeof e!="object")return!1;if(t===e)return!0;const i=Object.keys(t).filter(a=>!n.includes(a)),o=Object.keys(e).filter(a=>!n.includes(a));if(i.length!==o.length)return!1;if(r.has(t))return!0;r.add(t);for(const a of i)if(!Yt(t[a],e[a],n,r))return!1;return!0}return t===e},Ar=t=>t.flat(),Cn=(t,e=new Map)=>{if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){const n=[];e.set(t,n);for(const r of t)n.push(e.has(r)?e.get(r):Cn(r,e));return n}if(Sn(t))return t;if(t instanceof Object){const n={};e.set(t,n);const r=t;return Object.keys(t).reduce((i,o)=>(i[o]=e.has(r[o])?e.get(r[o]):Cn(r[o],e),i),n),n}return t},ue=(t,e,n=new Map)=>{if(!t||!e||t===e)return t;const r=Sn(t)?t:Cn(t);return n.has(e)?n.get(e):(n.set(e,r),Object.keys(e).forEach(i=>{i==="__proto__"||i==="constructor"||(Hi(t[i])&&Hi(e[i])?r[i]=ue(t[i],e[i],n):Sn(e)?r[i]=e:r[i]=Cn(e[i]))}),r)},Mn=(t,e,n)=>Ll(e,t);function Ta(t,e,n){return Qr(e)?e(t,n):e}function zl(t,e,n){return Ta(t,e,n)}function X(t,e,n){return Ta(t,e,n)}function ve(t){return t.filter(e=>e&&!ee(e))}function Ot(t,e,n){return Math.min(Math.max(t,e),n)}function Hm(t,...e){if(!t)return[void 0,void 0];if(Ve(e)){let n=0,r=0;return t.forEach((i,o)=>{let a=0,s=0;for(const c of e){const u=X(i,c,o)||0;u>=0?a+=u:s+=u}a>r&&(r=a),s<n&&(n=s)}),[n,r]}}function Wl(t,e,...n){const r=[];let i=0,o=0;for(const a of n){const s=X(t,a,e)||0;s>=0?r.push(i+=s):r.push(o+=s)}return r}function Ym(t,e,n,r){const i=t.map((s,c)=>X(s,e,c)||0),o=n.map((s,c)=>{const u=Nl(t,(l,f)=>X(l,s,f)||0);return u===0&&Array.isArray(r)?r[c]:u<0}),a=n.map(()=>[]);return t.forEach((s,c)=>{let u=i[c],l=i[c];n.forEach((f,h)=>{const d=X(s,f,c)||0;d>=0?a[h].push([u,u+=d]):a[h].push([l,l+=d])})}),a.forEach((s,c)=>{s.isMostlyNegative=o[c]}),a}function Hl(t,...e){return t?Wi(t,(r,i)=>Wi(e,o=>X(r,o,i))):void 0}function Yl(t,...e){return t?zi(t,(r,i)=>zi(e,o=>X(r,o,i))):void 0}function lr(t,...e){return[Hl(t,...e),Yl(t,...e)]}function An(t,e,n,r=wt.Auto){if(t.length<=1)return t[0];const o=t.map((c,u)=>[c,u]).sort(([c,u],[l,f])=>X(c,n,u)-X(l,n,f)),a=o.map(([c,u])=>X(c,n,u)),s=r===wt.Right?Tl(a,e,0,t.length-1):Ue(a,e,1,t.length);return r===wt.Right?o[s][0]:r===wt.Left?o[s-1][0]:e-a[s-1]>a[s]-e?o[s][0]:o[s-1][0]}function Ul(t,e,n,r=!1){if(!n)return[];const i=t.filter((o,a)=>{const s=X(o,n,a);return s>=e[0]&&s<=e[1]});if(r){if(i.length===0){const f=An(t,e[0],n,wt.Left),h=An(t,e[1],n,wt.Right);return[f,h].filter(Boolean)}const o=i[0],a=i[i.length-1],s=t.findIndex(f=>f===o),c=t.findIndex(f=>f===a),u=Math.max(0,s-1),l=Math.min(t.length-1,c+1);return t.slice(u,l+1)}return i}var Bt=[],Vl=function(){return Bt.some(function(t){return t.activeTargets.length>0})},Xl=function(){return Bt.some(function(t){return t.skippedTargets.length>0})},Yi="ResizeObserver loop completed with undelivered notifications.",ql=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:Yi}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=Yi),window.dispatchEvent(t)},Re;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Re||(Re={}));var zt=function(t){return Object.freeze(t)},Gl=(function(){function t(e,n){this.inlineSize=e,this.blockSize=n,zt(this)}return t})(),Sa=(function(){function t(e,n,r,i){return this.x=e,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,zt(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,o=e.right,a=e.bottom,s=e.left,c=e.width,u=e.height;return{x:n,y:r,top:i,right:o,bottom:a,left:s,width:c,height:u}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t})(),Kr=function(t){return t instanceof SVGElement&&"getBBox"in t},Ca=function(t){if(Kr(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||t.getClientRects().length)},Ui=function(t){var e;if(t instanceof Element)return!0;var n=(e=t?.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},Zl=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Ee=typeof window<"u"?window:{},Ke=new WeakMap,Vi=/auto|scroll/,Ql=/^tb|vertical/,Kl=/msie|trident/i.test(Ee.navigator&&Ee.navigator.userAgent),ht=function(t){return parseFloat(t||"0")},ne=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new Gl((n?e:t)||0,(n?t:e)||0)},Xi=zt({devicePixelContentBoxSize:ne(),borderBoxSize:ne(),contentBoxSize:ne(),contentRect:new Sa(0,0,0,0)}),Ma=function(t,e){if(e===void 0&&(e=!1),Ke.has(t)&&!e)return Ke.get(t);if(Ca(t))return Ke.set(t,Xi),Xi;var n=getComputedStyle(t),r=Kr(t)&&t.ownerSVGElement&&t.getBBox(),i=!Kl&&n.boxSizing==="border-box",o=Ql.test(n.writingMode||""),a=!r&&Vi.test(n.overflowY||""),s=!r&&Vi.test(n.overflowX||""),c=r?0:ht(n.paddingTop),u=r?0:ht(n.paddingRight),l=r?0:ht(n.paddingBottom),f=r?0:ht(n.paddingLeft),h=r?0:ht(n.borderTopWidth),d=r?0:ht(n.borderRightWidth),m=r?0:ht(n.borderBottomWidth),g=r?0:ht(n.borderLeftWidth),v=f+u,y=c+l,w=g+d,_=h+m,T=s?t.offsetHeight-_-t.clientHeight:0,k=a?t.offsetWidth-w-t.clientWidth:0,p=i?v+w:0,b=i?y+_:0,I=r?r.width:ht(n.width)-p-k,F=r?r.height:ht(n.height)-b-T,E=I+v+k+w,Y=F+y+T+_,M=zt({devicePixelContentBoxSize:ne(Math.round(I*devicePixelRatio),Math.round(F*devicePixelRatio),o),borderBoxSize:ne(E,Y,o),contentBoxSize:ne(I,F,o),contentRect:new Sa(f,c,I,F)});return Ke.set(t,M),M},Aa=function(t,e,n){var r=Ma(t,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(e){case Re.DEVICE_PIXEL_CONTENT_BOX:return a;case Re.BORDER_BOX:return i;default:return o}},jl=(function(){function t(e){var n=Ma(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=zt([n.borderBoxSize]),this.contentBoxSize=zt([n.contentBoxSize]),this.devicePixelContentBoxSize=zt([n.devicePixelContentBoxSize])}return t})(),Ea=function(t){if(Ca(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Jl=function(){var t=1/0,e=[];Bt.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var l=new jl(u.target),f=Ea(u.target);s.push(l),u.lastReportedSize=Aa(u.target,u.observedBox),f<t&&(t=f)}),e.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},qi=function(t){Bt.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Ea(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},tf=function(){var t=0;for(qi(t);Vl();)t=Jl(),qi(t);return Xl()&&ql(),t>0},fr,Da=[],ef=function(){return Da.splice(0).forEach(function(t){return t()})},nf=function(t){if(!fr){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return ef()}).observe(n,r),fr=function(){n.textContent="".concat(e?e--:e++)}}Da.push(t),fr()},rf=function(t){nf(function(){requestAnimationFrame(t)})},sn=0,of=function(){return!!sn},af=250,sf={attributes:!0,characterData:!0,childList:!0,subtree:!0},Gi=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Zi=function(t){return t===void 0&&(t=0),Date.now()+t},hr=!1,cf=(function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=af),!hr){hr=!0;var r=Zi(e);rf(function(){var i=!1;try{i=tf()}finally{if(hr=!1,e=r-Zi(),!of())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,sf)};document.body?n():Ee.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Gi.forEach(function(n){return Ee.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Gi.forEach(function(n){return Ee.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t})(),Er=new cf,Qi=function(t){!sn&&t>0&&Er.start(),sn+=t,!sn&&Er.stop()},uf=function(t){return!Kr(t)&&!Zl(t)&&getComputedStyle(t).display==="inline"},lf=(function(){function t(e,n){this.target=e,this.observedBox=n||Re.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Aa(this.target,this.observedBox,!0);return uf(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t})(),ff=(function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t})(),je=new WeakMap,Ki=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Je=(function(){function t(){}return t.connect=function(e,n){var r=new ff(e,n);je.set(e,r)},t.observe=function(e,n,r){var i=je.get(e),o=i.observationTargets.length===0;Ki(i.observationTargets,n)<0&&(o&&Bt.push(i),i.observationTargets.push(new lf(n,r&&r.box)),Qi(1),Er.schedule())},t.unobserve=function(e,n){var r=je.get(e),i=Ki(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&Bt.splice(Bt.indexOf(r),1),r.observationTargets.splice(i,1),Qi(-1))},t.disconnect=function(e){var n=this,r=je.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t})(),hf=(function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Je.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ui(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Je.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ui(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Je.unobserve(this,e)},t.prototype.disconnect=function(){Je.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t})();const df=globalThis.ResizeObserver||hf,Oa={duration:void 0,margin:{top:0,bottom:0,left:0,right:0},padding:{top:0,bottom:0,left:0,right:0},sizing:ce.Fit,width:void 0,height:void 0,svgDefs:void 0,ariaLabel:void 0};class Fe{constructor(e){this._defaultConfig=Oa,this._isFirstRender=!0,this._renderAnimationFrameId=null,this._container=e;const n=kt(this._container);n.attr("role","figure"),this.svg=n.append("svg").style("display","block").attr("xmlns","http://www.w3.org/2000/svg").attr("height",Fe.DEFAULT_CONTAINER_HEIGHT).attr("aria-hidden",!0),this._svgDefs=this.svg.append("defs"),this._svgDefsExternal=this.svg.append("defs"),this.element=this.svg.node()}updateContainer(e){var n;this.prevConfig=this.config,this.config=ue(this._defaultConfig,e),e?.svgDefs!==((n=this.prevConfig)===null||n===void 0?void 0:n.svgDefs)&&(this._svgDefsExternal.selectAll("*").remove(),this._svgDefsExternal.html(e.svgDefs))}_preRender(){}_render(e){const{config:n}=this;kt(this._container).attr("aria-label",n.ariaLabel),this._isFirstRender=!1}render(e=this.config.duration){const n=this.config.width||this.containerWidth,r=this.config.height||this.containerHeight;this.svg.attr("width",n).attr("height",r),this._resizeObserver||this._setUpResizeObserver(),cancelAnimationFrame(this._renderAnimationFrameId),this._renderAnimationFrameId=requestAnimationFrame(()=>{this._preRender(),this._render(e)})}get containerWidth(){return this.config.width?this.element.clientWidth:this._container.clientWidth||this._container.getBoundingClientRect().width}get containerHeight(){return this.config.height?this.element.clientHeight:this._container.clientHeight||this._container.getBoundingClientRect().height||Fe.DEFAULT_CONTAINER_HEIGHT}get width(){return Ot(this.containerWidth-this.config.margin.left-this.config.margin.right,0,Number.POSITIVE_INFINITY)}get height(){return Ot(this.containerHeight-this.config.margin.top-this.config.margin.bottom,0,Number.POSITIVE_INFINITY)}_removeAllChildren(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild)}_onResize(){const{config:e}=this;(e.sizing===ce.Fit||e.sizing===ce.FitWidth)&&this.render(0)}_setUpResizeObserver(){if(this._resizeObserver)return;const e=this._container.getBoundingClientRect();this._containerSize={width:e.width,height:e.height},this._resizeObserver=new df((n,r)=>{cancelAnimationFrame(this._resizeObserverAnimationFrameId),this._resizeObserverAnimationFrameId=requestAnimationFrame(()=>{const i=this._container.getBoundingClientRect(),o={width:i.width,height:i.height};!Yt(this._containerSize,o)&&o.width&&o.height&&(this._containerSize=o,this._onResize())})}),this._resizeObserver.observe(this._container)}destroy(){var e;cancelAnimationFrame(this._renderAnimationFrameId),cancelAnimationFrame(this._resizeObserverAnimationFrameId),(e=this._resizeObserver)===null||e===void 0||e.disconnect(),this.svg.remove()}}Fe.DEFAULT_CONTAINER_HEIGHT=300;function gf(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function mf(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var pf=(function(){function t(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(r){r.forEach(this._insertTag)},e.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(mf(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=gf(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},e.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},t})(),Z="-ms-",En="-moz-",N="-webkit-",$a="comm",jr="rule",Jr="decl",vf="@import",Na="@keyframes",yf="@layer",xf=Math.abs,Qn=String.fromCharCode,wf=Object.assign;function _f(t,e){return V(t,0)^45?(((e<<2^V(t,0))<<2^V(t,1))<<2^V(t,2))<<2^V(t,3):0}function Ra(t){return t.trim()}function bf(t,e){return(t=e.exec(t))?t[0]:t}function R(t,e,n){return t.replace(e,n)}function Dr(t,e){return t.indexOf(e)}function V(t,e){return t.charCodeAt(e)|0}function Pe(t,e,n){return t.slice(e,n)}function dt(t){return t.length}function ti(t){return t.length}function tn(t,e){return e.push(t),t}function kf(t,e){return t.map(e).join("")}var Kn=1,le=1,Fa=0,J=0,z=0,me="";function jn(t,e,n,r,i,o,a){return{value:t,root:e,parent:n,type:r,props:i,children:o,line:Kn,column:le,length:a,return:""}}function ye(t,e){return wf(jn("",null,null,"",null,null,0),t,{length:-t.length},e)}function Tf(){return z}function Sf(){return z=J>0?V(me,--J):0,le--,z===10&&(le=1,Kn--),z}function nt(){return z=J<Fa?V(me,J++):0,le++,z===10&&(le=1,Kn++),z}function gt(){return V(me,J)}function cn(){return J}function Xe(t,e){return Pe(me,t,e)}function Ie(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Pa(t){return Kn=le=1,Fa=dt(me=t),J=0,[]}function Ia(t){return me="",t}function un(t){return Ra(Xe(J-1,Or(t===91?t+2:t===40?t+1:t)))}function Cf(t){for(;(z=gt())&&z<33;)nt();return Ie(t)>2||Ie(z)>3?"":" "}function Mf(t,e){for(;--e&&nt()&&!(z<48||z>102||z>57&&z<65||z>70&&z<97););return Xe(t,cn()+(e<6&>()==32&&nt()==32))}function Or(t){for(;nt();)switch(z){case t:return J;case 34:case 39:t!==34&&t!==39&&Or(z);break;case 40:t===41&&Or(t);break;case 92:nt();break}return J}function Af(t,e){for(;nt()&&t+z!==57;)if(t+z===84&>()===47)break;return"/*"+Xe(e,J-1)+"*"+Qn(t===47?t:nt())}function Ef(t){for(;!Ie(gt());)nt();return Xe(t,J)}function Df(t){return Ia(ln("",null,null,null,[""],t=Pa(t),0,[0],t))}function ln(t,e,n,r,i,o,a,s,c){for(var u=0,l=0,f=a,h=0,d=0,m=0,g=1,v=1,y=1,w=0,_="",T=i,k=o,p=r,b=_;v;)switch(m=w,w=nt()){case 40:if(m!=108&&V(b,f-1)==58){Dr(b+=R(un(w),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:b+=un(w);break;case 9:case 10:case 13:case 32:b+=Cf(m);break;case 92:b+=Mf(cn()-1,7);continue;case 47:switch(gt()){case 42:case 47:tn(Of(Af(nt(),cn()),e,n),c);break;default:b+="/"}break;case 123*g:s[u++]=dt(b)*y;case 125*g:case 59:case 0:switch(w){case 0:case 125:v=0;case 59+l:y==-1&&(b=R(b,/\f/g,"")),d>0&&dt(b)-f&&tn(d>32?Ji(b+";",r,n,f-1):Ji(R(b," ","")+";",r,n,f-2),c);break;case 59:b+=";";default:if(tn(p=ji(b,e,n,u,l,i,s,_,T=[],k=[],f),o),w===123)if(l===0)ln(b,e,p,p,T,o,f,s,k);else switch(h===99&&V(b,3)===110?100:h){case 100:case 108:case 109:case 115:ln(t,p,p,r&&tn(ji(t,p,p,0,0,i,s,_,i,T=[],f),k),i,k,f,s,r?T:k);break;default:ln(b,p,p,p,[""],k,0,s,k)}}u=l=d=0,g=y=1,_=b="",f=a;break;case 58:f=1+dt(b),d=m;default:if(g<1){if(w==123)--g;else if(w==125&&g++==0&&Sf()==125)continue}switch(b+=Qn(w),w*g){case 38:y=l>0?1:(b+="\f",-1);break;case 44:s[u++]=(dt(b)-1)*y,y=1;break;case 64:gt()===45&&(b+=un(nt())),h=gt(),l=f=dt(_=b+=Ef(cn())),w++;break;case 45:m===45&&dt(b)==2&&(g=0)}}return o}function ji(t,e,n,r,i,o,a,s,c,u,l){for(var f=i-1,h=i===0?o:[""],d=ti(h),m=0,g=0,v=0;m<r;++m)for(var y=0,w=Pe(t,f+1,f=xf(g=a[m])),_=t;y<d;++y)(_=Ra(g>0?h[y]+" "+w:R(w,/&\f/g,h[y])))&&(c[v++]=_);return jn(t,e,n,i===0?jr:s,c,u,l)}function Of(t,e,n){return jn(t,e,n,$a,Qn(Tf()),Pe(t,2,-2),0)}function Ji(t,e,n,r){return jn(t,e,n,Jr,Pe(t,0,r),Pe(t,r+1,-1),r)}function re(t,e){for(var n="",r=ti(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function $f(t,e,n,r){switch(t.type){case yf:if(t.children.length)break;case vf:case Jr:return t.return=t.return||t.value;case $a:return"";case Na:return t.return=t.value+"{"+re(t.children,r)+"}";case jr:t.value=t.props.join(",")}return dt(n=re(t.children,r))?t.return=t.value+"{"+n+"}":""}function Nf(t){var e=ti(t);return function(n,r,i,o){for(var a="",s=0;s<e;s++)a+=t[s](n,r,i,o)||"";return a}}function Rf(t){return function(e){e.root||(e=e.return)&&t(e)}}function Ff(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var Pf=function(e,n,r){for(var i=0,o=0;i=o,o=gt(),i===38&&o===12&&(n[r]=1),!Ie(o);)nt();return Xe(e,J)},If=function(e,n){var r=-1,i=44;do switch(Ie(i)){case 0:i===38&>()===12&&(n[r]=1),e[r]+=Pf(J-1,n,r);break;case 2:e[r]+=un(i);break;case 4:if(i===44){e[++r]=gt()===58?"&\f":"",n[r]=e[r].length;break}default:e[r]+=Qn(i)}while(i=nt());return e},Lf=function(e,n){return Ia(If(Pa(e),n))},to=new WeakMap,Bf=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,r=e.parent,i=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!to.get(r))&&!i){to.set(e,!0);for(var o=[],a=Lf(n,o),s=r.props,c=0,u=0;c<a.length;c++)for(var l=0;l<s.length;l++,u++)e.props[u]=o[c]?a[c].replace(/&\f/g,s[l]):s[l]+" "+a[c]}}},zf=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function La(t,e){switch(_f(t,e)){case 5103:return N+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return N+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return N+t+En+t+Z+t+t;case 6828:case 4268:return N+t+Z+t+t;case 6165:return N+t+Z+"flex-"+t+t;case 5187:return N+t+R(t,/(\w+).+(:[^]+)/,N+"box-$1$2"+Z+"flex-$1$2")+t;case 5443:return N+t+Z+"flex-item-"+R(t,/flex-|-self/,"")+t;case 4675:return N+t+Z+"flex-line-pack"+R(t,/align-content|flex-|-self/,"")+t;case 5548:return N+t+Z+R(t,"shrink","negative")+t;case 5292:return N+t+Z+R(t,"basis","preferred-size")+t;case 6060:return N+"box-"+R(t,"-grow","")+N+t+Z+R(t,"grow","positive")+t;case 4554:return N+R(t,/([^-])(transform)/g,"$1"+N+"$2")+t;case 6187:return R(R(R(t,/(zoom-|grab)/,N+"$1"),/(image-set)/,N+"$1"),t,"")+t;case 5495:case 3959:return R(t,/(image-set\([^]*)/,N+"$1$`$1");case 4968:return R(R(t,/(.+:)(flex-)?(.*)/,N+"box-pack:$3"+Z+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+N+t+t;case 4095:case 3583:case 4068:case 2532:return R(t,/(.+)-inline(.+)/,N+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(dt(t)-1-e>6)switch(V(t,e+1)){case 109:if(V(t,e+4)!==45)break;case 102:return R(t,/(.+:)(.+)-([^]+)/,"$1"+N+"$2-$3$1"+En+(V(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Dr(t,"stretch")?La(R(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(V(t,e+1)!==115)break;case 6444:switch(V(t,dt(t)-3-(~Dr(t,"!important")&&10))){case 107:return R(t,":",":"+N)+t;case 101:return R(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+N+(V(t,14)===45?"inline-":"")+"box$3$1"+N+"$2$3$1"+Z+"$2box$3")+t}break;case 5936:switch(V(t,e+11)){case 114:return N+t+Z+R(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return N+t+Z+R(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return N+t+Z+R(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return N+t+Z+t+t}return t}var Wf=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case Jr:e.return=La(e.value,e.length);break;case Na:return re([ye(e,{value:R(e.value,"@","@"+N)})],i);case jr:if(e.length)return kf(e.props,function(o){switch(bf(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return re([ye(e,{props:[R(o,/:(read-\w+)/,":"+En+"$1")]})],i);case"::placeholder":return re([ye(e,{props:[R(o,/:(plac\w+)/,":"+N+"input-$1")]}),ye(e,{props:[R(o,/:(plac\w+)/,":"+En+"$1")]}),ye(e,{props:[R(o,/:(plac\w+)/,Z+"input-$1")]})],i)}return""})}},Hf=[Wf],Yf=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var v=g.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=e.stylisPlugins||Hf,o={},a,s=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var v=g.getAttribute("data-emotion").split(" "),y=1;y<v.length;y++)o[v[y]]=!0;s.push(g)});var c,u=[Bf,zf];{var l,f=[$f,Rf(function(g){l.insert(g)})],h=Nf(u.concat(i,f)),d=function(v){return re(Df(v),h)};c=function(v,y,w,_){l=w,d(v?v+"{"+y.styles+"}":y.styles),_&&(m.inserted[y.name]=!0)}}var m={key:n,sheet:new pf({key:n,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:c};return m.sheet.hydrate(s),m};function Uf(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Vf={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Xf=/[A-Z]|^ms/g,qf=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ba=function(e){return e.charCodeAt(1)===45},eo=function(e){return e!=null&&typeof e!="boolean"},dr=Ff(function(t){return Ba(t)?t:t.replace(Xf,"-$&").toLowerCase()}),no=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(qf,function(r,i,o){return $t={name:i,styles:o,next:$t},i})}return Vf[e]!==1&&!Ba(e)&&typeof n=="number"&&n!==0?n+"px":n};function Dn(t,e,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return $t={name:i.name,styles:i.styles,next:$t},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)$t={name:a.name,styles:a.styles,next:$t},a=a.next;var s=o.styles+";";return s}return Gf(t,e,n)}}var c=n;if(e==null)return c;var u=e[c];return u!==void 0?u:c}function Gf(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Dn(t,e,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var s=a;e!=null&&e[s]!==void 0?r+=o+"{"+e[s]+"}":eo(s)&&(r+=dr(o)+":"+no(o,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(e==null||e[a[0]]===void 0))for(var c=0;c<a.length;c++)eo(a[c])&&(r+=dr(o)+":"+no(o,a[c])+";");else{var u=Dn(t,e,a);switch(o){case"animation":case"animationName":{r+=dr(o)+":"+u+";";break}default:r+=o+"{"+u+"}"}}}return r}var ro=/label:\s*([^\s;{]+)\s*(;|$)/g,$t;function gr(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var r=!0,i="";$t=void 0;var o=t[0];if(o==null||o.raw===void 0)r=!1,i+=Dn(n,e,o);else{var a=o;i+=a[0]}for(var s=1;s<t.length;s++)if(i+=Dn(n,e,t[s]),r){var c=o;i+=c[s]}ro.lastIndex=0;for(var u="",l;(l=ro.exec(i))!==null;)u+="-"+l[1];var f=Uf(i)+u;return{name:f,styles:i,next:$t}}function za(t,e,n){var r="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):i&&(r+=i+" ")}),r}var Zf=function(e,n,r){var i=e.key+"-"+n.name;e.registered[i]===void 0&&(e.registered[i]=n.styles)},Qf=function(e,n,r){Zf(e,n);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+i:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function io(t,e){if(t.inserted[e.name]===void 0)return t.insert("",e,t.sheet,!0)}function oo(t,e,n){var r=[],i=za(t,r,n);return r.length<2?n:i+e(r)}var Kf=function(e){var n=Yf(e);n.sheet.speedy=function(s){this.isSpeedy=s},n.compat=!0;var r=function(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];var f=gr(u,n.registered,void 0);return Qf(n,f),n.key+"-"+f.name},i=function(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];var f=gr(u,n.registered),h="animation-"+f.name;return io(n,{name:f.name,styles:"@keyframes "+h+"{"+f.styles+"}"}),h},o=function(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];var f=gr(u,n.registered);io(n,f)},a=function(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];return oo(n.registered,r,jf(u))};return{css:r,cx:a,injectGlobal:o,keyframes:i,hydrate:function(c){c.forEach(function(u){n.inserted[u]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:za.bind(null,n.registered),merge:oo.bind(null,n.registered,r)}},jf=function t(e){for(var n="",r=0;r<e.length;r++){var i=e[r];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=t(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},Wa=Kf({key:"css"}),Jn=Wa.injectGlobal,W=Wa.css,mr,ao;function Jf(){return ao||(ao=1,mr=function(e,n){n||(n=[0,""]),e=String(e);var r=parseFloat(e,10);return n[0]=r,n[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",n}),mr}var pr,so;function th(){if(so)return pr;so=1;var t=Jf();pr=i;var e=r("in",document.body);function n(o,a){var s=t(getComputedStyle(o).getPropertyValue(a));return s[0]*i(s[1],o)}function r(o,a){var s=document.createElement("div");s.style.height="128"+o,a.appendChild(s);var c=n(s,"height")/128;return a.removeChild(s),c}function i(o,a){if(!o)return null;switch(a=a||document.body,o=(o+""||"px").trim().toLowerCase(),(a===window||a===document)&&(a=document.body),o){case"%":return a.clientHeight/100;case"ch":case"ex":return r(o,a);case"em":return n(a,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return e;case"cm":return e/2.54;case"mm":return e/25.4;case"pt":return e/72;case"pc":return e/6;case"px":return 1}var s=t(o);if(!isNaN(s[0])&&s[1]){var c=i(s[1],a);return typeof c=="number"?s[0]*c:null}return null}return pr}th();function Ha(){const t=()=>Math.floor((1+crypto.getRandomValues(new Uint32Array(1))[0])*65536).toString(16).substring(1);return`${t()+t()}-${t()}-${t()}-${t()}-${t()}${t()}${t()}`}function eh(t,e){const n=t.substr(4,t.length-5);return getComputedStyle(e).getPropertyValue(n)}function nh(t,e,n=0){const[r,i,o,a]=[t.x+n,t.y+t.height-2*n,t.x+t.width-2*n,t.y+n],[s,c,u,l]=[e.x+n,e.y+e.height-2*n,e.x+e.width-2*n,e.y+n];return!(i<l||c<a||o<s||u<r)}function ei(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ya(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function qe(){}var Le=.7,On=1/Le,ie="\\s*([+-]?\\d+)\\s*",Be="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",mt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rh=/^#([0-9a-f]{3,8})$/,ih=new RegExp(`^rgb\\(${ie},${ie},${ie}\\)$`),oh=new RegExp(`^rgb\\(${mt},${mt},${mt}\\)$`),ah=new RegExp(`^rgba\\(${ie},${ie},${ie},${Be}\\)$`),sh=new RegExp(`^rgba\\(${mt},${mt},${mt},${Be}\\)$`),ch=new RegExp(`^hsl\\(${Be},${mt},${mt}\\)$`),uh=new RegExp(`^hsla\\(${Be},${mt},${mt},${Be}\\)$`),co={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ei(qe,Ut,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:uo,formatHex:uo,formatHex8:lh,formatHsl:fh,formatRgb:lo,toString:lo});function uo(){return this.rgb().formatHex()}function lh(){return this.rgb().formatHex8()}function fh(){return Ua(this).formatHsl()}function lo(){return this.rgb().formatRgb()}function Ut(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=rh.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?fo(e):n===3?new K(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?en(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?en(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=ih.exec(t))?new K(e[1],e[2],e[3],1):(e=oh.exec(t))?new K(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=ah.exec(t))?en(e[1],e[2],e[3],e[4]):(e=sh.exec(t))?en(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=ch.exec(t))?mo(e[1],e[2]/100,e[3]/100,1):(e=uh.exec(t))?mo(e[1],e[2]/100,e[3]/100,e[4]):co.hasOwnProperty(t)?fo(co[t]):t==="transparent"?new K(NaN,NaN,NaN,0):null}function fo(t){return new K(t>>16&255,t>>8&255,t&255,1)}function en(t,e,n,r){return r<=0&&(t=e=n=NaN),new K(t,e,n,r)}function hh(t){return t instanceof qe||(t=Ut(t)),t?(t=t.rgb(),new K(t.r,t.g,t.b,t.opacity)):new K}function $r(t,e,n,r){return arguments.length===1?hh(t):new K(t,e,n,r??1)}function K(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}ei(K,$r,Ya(qe,{brighter(t){return t=t==null?On:Math.pow(On,t),new K(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Le:Math.pow(Le,t),new K(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new K(Wt(this.r),Wt(this.g),Wt(this.b),$n(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ho,formatHex:ho,formatHex8:dh,formatRgb:go,toString:go}));function ho(){return`#${Pt(this.r)}${Pt(this.g)}${Pt(this.b)}`}function dh(){return`#${Pt(this.r)}${Pt(this.g)}${Pt(this.b)}${Pt((isNaN(this.opacity)?1:this.opacity)*255)}`}function go(){const t=$n(this.opacity);return`${t===1?"rgb(":"rgba("}${Wt(this.r)}, ${Wt(this.g)}, ${Wt(this.b)}${t===1?")":`, ${t})`}`}function $n(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Wt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Pt(t){return t=Wt(t),(t<16?"0":"")+t.toString(16)}function mo(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new st(t,e,n,r)}function Ua(t){if(t instanceof st)return new st(t.h,t.s,t.l,t.opacity);if(t instanceof qe||(t=Ut(t)),!t)return new st;if(t instanceof st)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,c=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new st(a,s,c,t.opacity)}function ni(t,e,n,r){return arguments.length===1?Ua(t):new st(t,e,n,r??1)}function st(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}ei(st,ni,Ya(qe,{brighter(t){return t=t==null?On:Math.pow(On,t),new st(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Le:Math.pow(Le,t),new st(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new K(vr(t>=240?t-240:t+120,i,r),vr(t,i,r),vr(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new st(po(this.h),nn(this.s),nn(this.l),$n(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=$n(this.opacity);return`${t===1?"hsl(":"hsla("}${po(this.h)}, ${nn(this.s)*100}%, ${nn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function po(t){return t=(t||0)%360,t<0?t+360:t}function nn(t){return Math.max(0,Math.min(1,t||0))}function vr(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const ke=globalThis?.UNOVIS_COLORS||["#4D8CFD","#FF6B7E","#F4B83E","#A6CC74","#00C19A","#6859BE"],gh=globalThis?.UNOVIS_COLORS_DARK||["#4D8CFD","#FF6B7E","#FFC16D","#A6CC74","#00C19A","#7887E0"],Et=t=>`--vis-${ee(t)?`color${t%ke.length}`:t}`;function mh(t,e=.4){const n=ni(t);return n.l=n.l*(1+e),n.formatHex()}function ph(t,e=.4,n=.6){const r=ni(t);return r.s=r.s*(1-n),r.l=r.l*(1-e),r.formatHex()}const Nn=10,Nr=[{id:"stripes-diagonal",svg:'<path d="M-1,1 l2,-2 M0,10 l10,-10 M9,11 l2,-2" stroke="#000"/>'},{id:"dots",svg:'<path d="m0-1.5a1 1 0 010 3m10-3a1 1 0 000 3M5 3.5a1 1 0 010 3 1 1 0 010-3M0 8.5 a1 1 0 010 3m10-3a1 1 0 000 3" fill"#000"/>'},{id:"stripes-vertical",svg:'<path d="M 5,-1 L5,11" stroke="#000"/>'},{id:"crosshatch",svg:'<path d="M0 0L10 10ZM10 0L0 10Z" stroke="#000"/>'},{id:"waves",svg:'<path d="M0 4Q2.5 1 5 4 7.5 7 10 4v2Q7.5 9 5 6 2.5 3 0 6Z" fill="#000"/>'},{id:"circles",svg:'<circle cx="5" cy="5" r="3" stroke="#000" fill="#fff"/>'}],Rr=[{id:"circle",marker:'<circle cx="5" cy="5" r="5"/>',dashArray:[]},{id:"triangle",marker:'<path d="M5,0 L10,9 L0,9Z">',dashArray:[9,1]},{id:"diamond",marker:'<path d="M 0 5 L5 0 L 10 5 L 5 10 L 0 5Z">',dashArray:[2]},{id:"arrow",marker:'<path d="M4 0 0 0 6 5 0 10 4 10 10 5Z">',dashArray:[2,3,8,3]},{id:"square",marker:'<rect x="1" y="1" width="8" height="8"/>',dashArray:[6]},{id:"star",marker:'<path d="m2 9 3-9 3 9L0 3h10Z"/>',dashArray:[1,6]}];function Dt(t){return`vis-${`pattern-${t.svg?"fill":"marker"}`}-${t.id}`}const vh=t=>`<mask id="${Dt(t)}">
|
|
1
|
+
import{N as rc,c as Oe,am as Ei,K as te,cg as ic,Q as oc,R as He,S as ac,a4 as oa,U as sc,C as cc,a3 as uc,h as lc,ch as Di,a as Un,aP as fc,e as $e,ah as hc,G as Vn,f as oe,y as dc,q as Xn,D as ur,a2 as qn,aA as Vr,k as Xr}from"./njnzCNrH.js";import{a as Gn,t as pt,c as ae,n as gc,g as Oi,d as mc,f as aa,e as pc}from"./C8ut0f5H.js";import{g as vc}from"./CqkleIqs.js";const yc={base:"relative",variants:{size:{xs:"",sm:"",md:"",lg:"",xl:""},orientation:{horizontal:"inline-flex -space-x-px",vertical:"flex flex-col -space-y-px"}}},Bm={__name:"UFieldGroup",props:{as:{type:null,required:!1},size:{type:null,required:!1},orientation:{type:null,required:!1,default:"horizontal"},class:{type:null,required:!1},ui:{type:null,required:!1}},setup(t){const e=t,n=rc(),r=Oe(()=>Ei({extend:Ei(yc),...n.ui?.fieldGroup||{}}));return te(ic,Oe(()=>({orientation:e.orientation,size:e.size}))),(i,o)=>(He(),oc(cc(uc),{as:t.as,"data-orientation":t.orientation,class:sc(r.value({orientation:t.orientation,class:e.class}))},{default:ac(()=>[oa(i.$slots,"default")]),_:3},8,["as","data-orientation","class"]))}};function Ne(t,e){const n=Gn(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=pt(t,e?.in),o=i.getDay(),a=(o<r?7:0)+o-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function _n(t,e){return Ne(t,{...e,weekStartsOn:1})}function sa(t,e){const n=pt(t,e?.in),r=n.getFullYear(),i=ae(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=_n(i),a=ae(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=_n(a);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function $i(t,e){const n=pt(t,e?.in);return n.setHours(0,0,0,0),n}function xc(t,e,n){const[r,i]=gc(n?.in,t,e),o=$i(r),a=$i(i),s=+o-Oi(o),c=+a-Oi(a);return Math.round((s-c)/mc)}function wc(t,e){const n=sa(t,e),r=ae(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),_n(r)}function _c(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function bc(t){return!(!_c(t)&&typeof t!="number"||isNaN(+pt(t)))}function kc(t,e){const n=pt(t,e?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Tc(t,e){const n=pt(t,e?.in);return xc(n,kc(n))+1}function Sc(t,e){const n=pt(t,e?.in),r=+_n(n)-+wc(n);return Math.round(r/aa)+1}function ca(t,e){const n=pt(t,e?.in),r=n.getFullYear(),i=Gn(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=ae(e?.in||t,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=Ne(a,e),c=ae(e?.in||t,0);c.setFullYear(r,0,o),c.setHours(0,0,0,0);const u=Ne(c,e);return+n>=+s?r+1:+n>=+u?r:r-1}function Cc(t,e){const n=Gn(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=ca(t,e),o=ae(e?.in||t,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),Ne(o,e)}function Mc(t,e){const n=pt(t,e?.in),r=+Ne(n,e)-+Cc(n,e);return Math.round(r/aa)+1}function P(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const At={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return P(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):P(n+1,2)},d(t,e){return P(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(t,e){return P(t.getHours()%12||12,e.length)},H(t,e){return P(t.getHours(),e.length)},m(t,e){return P(t.getMinutes(),e.length)},s(t,e){return P(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return P(i,e.length)}},jt={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ni={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return At.y(t,e)},Y:function(t,e,n,r){const i=ca(t,r),o=i>0?i:1-i;if(e==="YY"){const a=o%100;return P(a,2)}return e==="Yo"?n.ordinalNumber(o,{unit:"year"}):P(o,e.length)},R:function(t,e){const n=sa(t);return P(n,e.length)},u:function(t,e){const n=t.getFullYear();return P(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return P(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return P(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return At.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return P(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const i=Mc(t,r);return e==="wo"?n.ordinalNumber(i,{unit:"week"}):P(i,e.length)},I:function(t,e,n){const r=Sc(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):P(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):At.d(t,e)},D:function(t,e,n){const r=Tc(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):P(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const i=t.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return P(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const i=t.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return P(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),i=r===0?7:r;switch(e){case"i":return String(i);case"ii":return P(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let i;switch(r===12?i=jt.noon:r===0?i=jt.midnight:i=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let i;switch(r>=17?i=jt.evening:r>=12?i=jt.afternoon:r>=4?i=jt.morning:i=jt.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return At.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):At.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):P(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):P(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):At.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):At.s(t,e)},S:function(t,e){return At.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return Fi(r);case"XXXX":case"XX":return Ft(r);default:return Ft(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return Fi(r);case"xxxx":case"xx":return Ft(r);default:return Ft(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Ri(r,":");default:return"GMT"+Ft(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Ri(r,":");default:return"GMT"+Ft(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return P(r,e.length)},T:function(t,e,n){return P(+t,e.length)}};function Ri(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+e+P(o,2)}function Fi(t,e){return t%60===0?(t>0?"-":"+")+P(Math.abs(t)/60,2):Ft(t,e)}function Ft(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),i=P(Math.trunc(r/60),2),o=P(r%60,2);return n+i+e+o}const Pi=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},ua=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Ac=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Pi(t,e);let o;switch(r){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",Pi(r,e)).replace("{{time}}",ua(i,e))},Ec={p:ua,P:Ac},Dc=/^D+$/,Oc=/^Y+$/,$c=["D","DD","YY","YYYY"];function Nc(t){return Dc.test(t)}function Rc(t){return Oc.test(t)}function Fc(t,e,n){const r=Pc(t,e,n);if(console.warn(r),$c.includes(t))throw new RangeError(r)}function Pc(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Ic=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Lc=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Bc=/^'([^]*?)'?$/,zc=/''/g,Wc=/[a-zA-Z]/;function zm(t,e,n){const r=Gn(),i=r.locale??pc,o=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=pt(t,n?.in);if(!bc(s))throw new RangeError("Invalid time value");let c=e.match(Lc).map(l=>{const f=l[0];if(f==="p"||f==="P"){const h=Ec[f];return h(l,i.formatLong)}return l}).join("").match(Ic).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const f=l[0];if(f==="'")return{isToken:!1,value:Hc(l)};if(Ni[f])return{isToken:!0,value:l};if(f.match(Wc))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:l}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));const u={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return c.map(l=>{if(!l.isToken)return l.value;const f=l.value;(Rc(f)||Nc(f))&&Fc(f,e,String(t));const h=Ni[f[0]];return h(s,f,i.localize,u)}).join("")}function Hc(t){const e=t.match(Bc);return e?e[1].replace(zc,"'"):t}var Tr="http://www.w3.org/1999/xhtml";const Ii={svg:"http://www.w3.org/2000/svg",xhtml:Tr,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Zn(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Ii.hasOwnProperty(e)?{space:Ii[e],local:t}:t}function Yc(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Tr&&e.documentElement.namespaceURI===Tr?e.createElement(t):e.createElementNS(n,t)}}function Uc(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function la(t){var e=Zn(t);return(e.local?Uc:Yc)(e)}function Vc(){}function qr(t){return t==null?Vc:function(){return this.querySelector(t)}}function Xc(t){typeof t!="function"&&(t=qr(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),c,u,l=0;l<a;++l)(c=o[l])&&(u=t.call(c,c.__data__,l,o))&&("__data__"in c&&(u.__data__=c.__data__),s[l]=u);return new rt(r,this._parents)}function qc(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Gc(){return[]}function fa(t){return t==null?Gc:function(){return this.querySelectorAll(t)}}function Zc(t){return function(){return qc(t.apply(this,arguments))}}function Qc(t){typeof t=="function"?t=Zc(t):t=fa(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,c,u=0;u<s;++u)(c=a[u])&&(r.push(t.call(c,c.__data__,u,a)),i.push(c));return new rt(r,i)}function ha(t){return function(){return this.matches(t)}}function da(t){return function(e){return e.matches(t)}}var Kc=Array.prototype.find;function jc(t){return function(){return Kc.call(this.children,t)}}function Jc(){return this.firstElementChild}function tu(t){return this.select(t==null?Jc:jc(typeof t=="function"?t:da(t)))}var eu=Array.prototype.filter;function nu(){return Array.from(this.children)}function ru(t){return function(){return eu.call(this.children,t)}}function iu(t){return this.selectAll(t==null?nu:ru(typeof t=="function"?t:da(t)))}function ou(t){typeof t!="function"&&(t=ha(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],c,u=0;u<a;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&s.push(c);return new rt(r,this._parents)}function ga(t){return new Array(t.length)}function au(){return new rt(this._enter||this._groups.map(ga),this._parents)}function bn(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}bn.prototype={constructor:bn,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function su(t){return function(){return t}}function cu(t,e,n,r,i,o){for(var a=0,s,c=e.length,u=o.length;a<u;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new bn(t,o[a]);for(;a<c;++a)(s=e[a])&&(i[a]=s)}function uu(t,e,n,r,i,o,a){var s,c,u=new Map,l=e.length,f=o.length,h=new Array(l),d;for(s=0;s<l;++s)(c=e[s])&&(h[s]=d=a.call(c,c.__data__,s,e)+"",u.has(d)?i[s]=c:u.set(d,c));for(s=0;s<f;++s)d=a.call(t,o[s],s,o)+"",(c=u.get(d))?(r[s]=c,c.__data__=o[s],u.delete(d)):n[s]=new bn(t,o[s]);for(s=0;s<l;++s)(c=e[s])&&u.get(h[s])===c&&(i[s]=c)}function lu(t){return t.__data__}function fu(t,e){if(!arguments.length)return Array.from(this,lu);var n=e?uu:cu,r=this._parents,i=this._groups;typeof t!="function"&&(t=su(t));for(var o=i.length,a=new Array(o),s=new Array(o),c=new Array(o),u=0;u<o;++u){var l=r[u],f=i[u],h=f.length,d=hu(t.call(l,l&&l.__data__,u,r)),m=d.length,g=s[u]=new Array(m),v=a[u]=new Array(m),y=c[u]=new Array(h);n(l,f,g,v,y,d,e);for(var w=0,_=0,T,k;w<m;++w)if(T=g[w]){for(w>=_&&(_=w+1);!(k=v[_])&&++_<m;);T._next=k||null}}return a=new rt(a,r),a._enter=s,a._exit=c,a}function hu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function du(){return new rt(this._exit||this._groups.map(ga),this._parents)}function gu(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function mu(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),c=0;c<a;++c)for(var u=n[c],l=r[c],f=u.length,h=s[c]=new Array(f),d,m=0;m<f;++m)(d=u[m]||l[m])&&(h[m]=d);for(;c<i;++c)s[c]=n[c];return new rt(s,this._parents)}function pu(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function vu(t){t||(t=yu);function e(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,c=i[o]=new Array(s),u,l=0;l<s;++l)(u=a[l])&&(c[l]=u);c.sort(e)}return new rt(i,this._parents).order()}function yu(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function xu(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function wu(){return Array.from(this)}function _u(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function bu(){let t=0;for(const e of this)++t;return t}function ku(){return!this.node()}function Tu(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function Su(t){return function(){this.removeAttribute(t)}}function Cu(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Mu(t,e){return function(){this.setAttribute(t,e)}}function Au(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Eu(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Du(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Ou(t,e){var n=Zn(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?Cu:Su:typeof e=="function"?n.local?Du:Eu:n.local?Au:Mu)(n,e))}function ma(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function $u(t){return function(){this.style.removeProperty(t)}}function Nu(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ru(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Fu(t,e,n){return arguments.length>1?this.each((e==null?$u:typeof e=="function"?Ru:Nu)(t,e,n??"")):se(this.node(),t)}function se(t,e){return t.style.getPropertyValue(e)||ma(t).getComputedStyle(t,null).getPropertyValue(e)}function Pu(t){return function(){delete this[t]}}function Iu(t,e){return function(){this[t]=e}}function Lu(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Bu(t,e){return arguments.length>1?this.each((e==null?Pu:typeof e=="function"?Lu:Iu)(t,e)):this.node()[t]}function pa(t){return t.trim().split(/^|\s+/)}function Gr(t){return t.classList||new va(t)}function va(t){this._node=t,this._names=pa(t.getAttribute("class")||"")}va.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function ya(t,e){for(var n=Gr(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function xa(t,e){for(var n=Gr(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function zu(t){return function(){ya(this,t)}}function Wu(t){return function(){xa(this,t)}}function Hu(t,e){return function(){(e.apply(this,arguments)?ya:xa)(this,t)}}function Yu(t,e){var n=pa(t+"");if(arguments.length<2){for(var r=Gr(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?Hu:e?zu:Wu)(n,e))}function Uu(){this.textContent=""}function Vu(t){return function(){this.textContent=t}}function Xu(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function qu(t){return arguments.length?this.each(t==null?Uu:(typeof t=="function"?Xu:Vu)(t)):this.node().textContent}function Gu(){this.innerHTML=""}function Zu(t){return function(){this.innerHTML=t}}function Qu(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Ku(t){return arguments.length?this.each(t==null?Gu:(typeof t=="function"?Qu:Zu)(t)):this.node().innerHTML}function ju(){this.nextSibling&&this.parentNode.appendChild(this)}function Ju(){return this.each(ju)}function tl(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function el(){return this.each(tl)}function nl(t){var e=typeof t=="function"?t:la(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function rl(){return null}function il(t,e){var n=typeof t=="function"?t:la(t),r=e==null?rl:typeof e=="function"?e:qr(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function ol(){var t=this.parentNode;t&&t.removeChild(this)}function al(){return this.each(ol)}function sl(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function cl(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ul(t){return this.select(t?cl:sl)}function ll(t){return arguments.length?this.property("__data__",t):this.node().__data__}function fl(t){return function(e){t.call(this,e,this.__data__)}}function hl(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function dl(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function gl(t,e,n){return function(){var r=this.__on,i,o=fl(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function ml(t,e,n){var r=hl(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,u=s.length,l;c<u;++c)for(i=0,l=s[c];i<o;++i)if((a=r[i]).type===l.type&&a.name===l.name)return l.value}return}for(s=e?gl:dl,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function wa(t,e,n){var r=ma(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function pl(t,e){return function(){return wa(this,t,e)}}function vl(t,e){return function(){return wa(this,t,e.apply(this,arguments))}}function yl(t,e){return this.each((typeof e=="function"?vl:pl)(t,e))}function*xl(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var _a=[null];function rt(t,e){this._groups=t,this._parents=e}function Ye(){return new rt([[document.documentElement]],_a)}function wl(){return this}rt.prototype=Ye.prototype={constructor:rt,select:Xc,selectAll:Qc,selectChild:tu,selectChildren:iu,filter:ou,data:fu,enter:au,exit:du,join:gu,merge:mu,selection:wl,order:pu,sort:vu,call:xu,nodes:wu,node:_u,size:bu,empty:ku,each:Tu,attr:Ou,style:Fu,property:Bu,classed:Yu,text:qu,html:Ku,raise:Ju,lower:el,append:nl,insert:il,remove:al,clone:ul,datum:ll,on:ml,dispatch:yl,[Symbol.iterator]:xl};function kt(t){return typeof t=="string"?new rt([[document.querySelector(t)]],[document.documentElement]):new rt([[t]],_a)}function _l(t){let e;for(;e=t.sourceEvent;)t=e;return t}function kn(t,e){if(t=_l(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}var Me;(function(t){t[t.SVG=0]="SVG",t[t.HTML=1]="HTML"})(Me||(Me={}));var ce;(function(t){t.Fit="fit",t.Extend="extend",t.FitWidth="fit_width"})(ce||(ce={}));function Ae(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function bl(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Zr(t){let e,n,r;t.length!==2?(e=Ae,n=(s,c)=>Ae(t(s),c),r=(s,c)=>t(s)-c):(e=t===Ae||t===bl?t:kl,n=t,r=t);function i(s,c,u=0,l=s.length){if(u<l){if(e(c,c)!==0)return l;do{const f=u+l>>>1;n(s[f],c)<0?u=f+1:l=f}while(u<l)}return u}function o(s,c,u=0,l=s.length){if(u<l){if(e(c,c)!==0)return l;do{const f=u+l>>>1;n(s[f],c)<=0?u=f+1:l=f}while(u<l)}return u}function a(s,c,u=0,l=s.length){const f=i(s,c,u,l-1);return f>u&&r(s[f-1],c)>-r(s[f],c)?f-1:f}return{left:i,center:a,right:o}}function kl(){return 0}function ba(t){return t===null?NaN:+t}const ka=Zr(Ae),Ue=ka.right,Tl=ka.left;Zr(ba).center;function Sl(t,e){let n,r;for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));return[n,r]}class Li extends Map{constructor(e,n=Al){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(Bi(this,e))}has(e){return super.has(Bi(this,e))}set(e,n){return super.set(Cl(this,e),n)}delete(e){return super.delete(Ml(this,e))}}function Bi({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function Cl({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Ml({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function Al(t){return t!==null&&typeof t=="object"?t.valueOf():t}const El=Math.sqrt(50),Dl=Math.sqrt(10),Ol=Math.sqrt(2);function Tn(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=El?10:o>=Dl?5:o>=Ol?2:1;let s,c,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(t*u),c=Math.round(e*u),s/u<t&&++s,c/u>e&&--c,u=-u):(u=Math.pow(10,i)*a,s=Math.round(t/u),c=Math.round(e/u),s*u<t&&++s,c*u>e&&--c),c<s&&.5<=n&&n<2?Tn(t,e,n*2):[s,c,u]}function Sr(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?Tn(e,t,n):Tn(t,e,n);if(!(o>=i))return[];const s=o-i+1,c=new Array(s);if(r)if(a<0)for(let u=0;u<s;++u)c[u]=(o-u)/-a;else for(let u=0;u<s;++u)c[u]=(o-u)*a;else if(a<0)for(let u=0;u<s;++u)c[u]=(i+u)/-a;else for(let u=0;u<s;++u)c[u]=(i+u)*a;return c}function Cr(t,e,n){return e=+e,t=+t,n=+n,Tn(t,e,n)[2]}function Mr(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Cr(e,t,n):Cr(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function zi(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Wi(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function $l(t,e,n=ba){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t),s=+n(t[o+1],o+1,t);return a+(s-a)*(i-o)}}function Nl(t,e){let n=0,r=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function*Rl(t){for(const e of t)yield*e}function Fl(t){return Array.from(Rl(t))}function Pl(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function Il(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function Ll(t,e,n){var r={},i=r.noTrailing,o=i===void 0?!1:i,a=r.noLeading,s=a===void 0?!1:a,c=r.debounceMode,u=c===void 0?void 0:c,l,f=!1,h=0;function d(){l&&clearTimeout(l)}function m(v){var y=v||{},w=y.upcomingOnly,_=w===void 0?!1:w;d(),f=!_}function g(){for(var v=arguments.length,y=new Array(v),w=0;w<v;w++)y[w]=arguments[w];var _=this,T=Date.now()-h;if(f)return;function k(){h=Date.now(),e.apply(_,y)}function p(){l=void 0}!s&&u&&!l&&k(),d(),u===void 0&&T>t?s?(h=Date.now(),o||(l=setTimeout(u?p:k,t))):k():o!==!0&&(l=setTimeout(u?p:k,u===void 0?t-T:t))}return g.cancel=m,g}var wt;(function(t){t.Left="left",t.Right="right",t.Auto="auto"})(wt||(wt={}));const ee=t=>typeof t=="number",Qr=t=>typeof t=="function",Ve=t=>Array.isArray(t),Bl=t=>t instanceof Object,Sn=t=>t.constructor.name!=="Function"&&t.constructor.name!=="Object",Hi=t=>Bl(t)&&!Ve(t)&&!Qr(t)&&!Sn(t),Wm=t=>[Object,Array].includes((t||{}).constructor)&&!Object.entries(t||{}).length,Yt=(t,e,n=[],r=new Set)=>{if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;if(r.has(t))return!0;r.add(t);for(let i=0;i<t.length;i++)if(!Yt(t[i],e[i],n,r))return!1;return!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(typeof t=="object"&&t!==null&&e!==null){if(typeof e!="object")return!1;if(t===e)return!0;const i=Object.keys(t).filter(a=>!n.includes(a)),o=Object.keys(e).filter(a=>!n.includes(a));if(i.length!==o.length)return!1;if(r.has(t))return!0;r.add(t);for(const a of i)if(!Yt(t[a],e[a],n,r))return!1;return!0}return t===e},Ar=t=>t.flat(),Cn=(t,e=new Map)=>{if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){const n=[];e.set(t,n);for(const r of t)n.push(e.has(r)?e.get(r):Cn(r,e));return n}if(Sn(t))return t;if(t instanceof Object){const n={};e.set(t,n);const r=t;return Object.keys(t).reduce((i,o)=>(i[o]=e.has(r[o])?e.get(r[o]):Cn(r[o],e),i),n),n}return t},ue=(t,e,n=new Map)=>{if(!t||!e||t===e)return t;const r=Sn(t)?t:Cn(t);return n.has(e)?n.get(e):(n.set(e,r),Object.keys(e).forEach(i=>{i==="__proto__"||i==="constructor"||(Hi(t[i])&&Hi(e[i])?r[i]=ue(t[i],e[i],n):Sn(e)?r[i]=e:r[i]=Cn(e[i]))}),r)},Mn=(t,e,n)=>Ll(e,t);function Ta(t,e,n){return Qr(e)?e(t,n):e}function zl(t,e,n){return Ta(t,e,n)}function X(t,e,n){return Ta(t,e,n)}function ve(t){return t.filter(e=>e&&!ee(e))}function Ot(t,e,n){return Math.min(Math.max(t,e),n)}function Hm(t,...e){if(!t)return[void 0,void 0];if(Ve(e)){let n=0,r=0;return t.forEach((i,o)=>{let a=0,s=0;for(const c of e){const u=X(i,c,o)||0;u>=0?a+=u:s+=u}a>r&&(r=a),s<n&&(n=s)}),[n,r]}}function Wl(t,e,...n){const r=[];let i=0,o=0;for(const a of n){const s=X(t,a,e)||0;s>=0?r.push(i+=s):r.push(o+=s)}return r}function Ym(t,e,n,r){const i=t.map((s,c)=>X(s,e,c)||0),o=n.map((s,c)=>{const u=Nl(t,(l,f)=>X(l,s,f)||0);return u===0&&Array.isArray(r)?r[c]:u<0}),a=n.map(()=>[]);return t.forEach((s,c)=>{let u=i[c],l=i[c];n.forEach((f,h)=>{const d=X(s,f,c)||0;d>=0?a[h].push([u,u+=d]):a[h].push([l,l+=d])})}),a.forEach((s,c)=>{s.isMostlyNegative=o[c]}),a}function Hl(t,...e){return t?Wi(t,(r,i)=>Wi(e,o=>X(r,o,i))):void 0}function Yl(t,...e){return t?zi(t,(r,i)=>zi(e,o=>X(r,o,i))):void 0}function lr(t,...e){return[Hl(t,...e),Yl(t,...e)]}function An(t,e,n,r=wt.Auto){if(t.length<=1)return t[0];const o=t.map((c,u)=>[c,u]).sort(([c,u],[l,f])=>X(c,n,u)-X(l,n,f)),a=o.map(([c,u])=>X(c,n,u)),s=r===wt.Right?Tl(a,e,0,t.length-1):Ue(a,e,1,t.length);return r===wt.Right?o[s][0]:r===wt.Left?o[s-1][0]:e-a[s-1]>a[s]-e?o[s][0]:o[s-1][0]}function Ul(t,e,n,r=!1){if(!n)return[];const i=t.filter((o,a)=>{const s=X(o,n,a);return s>=e[0]&&s<=e[1]});if(r){if(i.length===0){const f=An(t,e[0],n,wt.Left),h=An(t,e[1],n,wt.Right);return[f,h].filter(Boolean)}const o=i[0],a=i[i.length-1],s=t.findIndex(f=>f===o),c=t.findIndex(f=>f===a),u=Math.max(0,s-1),l=Math.min(t.length-1,c+1);return t.slice(u,l+1)}return i}var Bt=[],Vl=function(){return Bt.some(function(t){return t.activeTargets.length>0})},Xl=function(){return Bt.some(function(t){return t.skippedTargets.length>0})},Yi="ResizeObserver loop completed with undelivered notifications.",ql=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:Yi}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=Yi),window.dispatchEvent(t)},Re;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Re||(Re={}));var zt=function(t){return Object.freeze(t)},Gl=(function(){function t(e,n){this.inlineSize=e,this.blockSize=n,zt(this)}return t})(),Sa=(function(){function t(e,n,r,i){return this.x=e,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,zt(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,o=e.right,a=e.bottom,s=e.left,c=e.width,u=e.height;return{x:n,y:r,top:i,right:o,bottom:a,left:s,width:c,height:u}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t})(),Kr=function(t){return t instanceof SVGElement&&"getBBox"in t},Ca=function(t){if(Kr(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||t.getClientRects().length)},Ui=function(t){var e;if(t instanceof Element)return!0;var n=(e=t?.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},Zl=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Ee=typeof window<"u"?window:{},Ke=new WeakMap,Vi=/auto|scroll/,Ql=/^tb|vertical/,Kl=/msie|trident/i.test(Ee.navigator&&Ee.navigator.userAgent),ht=function(t){return parseFloat(t||"0")},ne=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new Gl((n?e:t)||0,(n?t:e)||0)},Xi=zt({devicePixelContentBoxSize:ne(),borderBoxSize:ne(),contentBoxSize:ne(),contentRect:new Sa(0,0,0,0)}),Ma=function(t,e){if(e===void 0&&(e=!1),Ke.has(t)&&!e)return Ke.get(t);if(Ca(t))return Ke.set(t,Xi),Xi;var n=getComputedStyle(t),r=Kr(t)&&t.ownerSVGElement&&t.getBBox(),i=!Kl&&n.boxSizing==="border-box",o=Ql.test(n.writingMode||""),a=!r&&Vi.test(n.overflowY||""),s=!r&&Vi.test(n.overflowX||""),c=r?0:ht(n.paddingTop),u=r?0:ht(n.paddingRight),l=r?0:ht(n.paddingBottom),f=r?0:ht(n.paddingLeft),h=r?0:ht(n.borderTopWidth),d=r?0:ht(n.borderRightWidth),m=r?0:ht(n.borderBottomWidth),g=r?0:ht(n.borderLeftWidth),v=f+u,y=c+l,w=g+d,_=h+m,T=s?t.offsetHeight-_-t.clientHeight:0,k=a?t.offsetWidth-w-t.clientWidth:0,p=i?v+w:0,b=i?y+_:0,I=r?r.width:ht(n.width)-p-k,F=r?r.height:ht(n.height)-b-T,E=I+v+k+w,Y=F+y+T+_,M=zt({devicePixelContentBoxSize:ne(Math.round(I*devicePixelRatio),Math.round(F*devicePixelRatio),o),borderBoxSize:ne(E,Y,o),contentBoxSize:ne(I,F,o),contentRect:new Sa(f,c,I,F)});return Ke.set(t,M),M},Aa=function(t,e,n){var r=Ma(t,n),i=r.borderBoxSize,o=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(e){case Re.DEVICE_PIXEL_CONTENT_BOX:return a;case Re.BORDER_BOX:return i;default:return o}},jl=(function(){function t(e){var n=Ma(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=zt([n.borderBoxSize]),this.contentBoxSize=zt([n.contentBoxSize]),this.devicePixelContentBoxSize=zt([n.devicePixelContentBoxSize])}return t})(),Ea=function(t){if(Ca(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Jl=function(){var t=1/0,e=[];Bt.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var l=new jl(u.target),f=Ea(u.target);s.push(l),u.lastReportedSize=Aa(u.target,u.observedBox),f<t&&(t=f)}),e.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},qi=function(t){Bt.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Ea(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},tf=function(){var t=0;for(qi(t);Vl();)t=Jl(),qi(t);return Xl()&&ql(),t>0},fr,Da=[],ef=function(){return Da.splice(0).forEach(function(t){return t()})},nf=function(t){if(!fr){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return ef()}).observe(n,r),fr=function(){n.textContent="".concat(e?e--:e++)}}Da.push(t),fr()},rf=function(t){nf(function(){requestAnimationFrame(t)})},sn=0,of=function(){return!!sn},af=250,sf={attributes:!0,characterData:!0,childList:!0,subtree:!0},Gi=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Zi=function(t){return t===void 0&&(t=0),Date.now()+t},hr=!1,cf=(function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=af),!hr){hr=!0;var r=Zi(e);rf(function(){var i=!1;try{i=tf()}finally{if(hr=!1,e=r-Zi(),!of())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,sf)};document.body?n():Ee.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Gi.forEach(function(n){return Ee.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Gi.forEach(function(n){return Ee.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t})(),Er=new cf,Qi=function(t){!sn&&t>0&&Er.start(),sn+=t,!sn&&Er.stop()},uf=function(t){return!Kr(t)&&!Zl(t)&&getComputedStyle(t).display==="inline"},lf=(function(){function t(e,n){this.target=e,this.observedBox=n||Re.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Aa(this.target,this.observedBox,!0);return uf(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t})(),ff=(function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t})(),je=new WeakMap,Ki=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Je=(function(){function t(){}return t.connect=function(e,n){var r=new ff(e,n);je.set(e,r)},t.observe=function(e,n,r){var i=je.get(e),o=i.observationTargets.length===0;Ki(i.observationTargets,n)<0&&(o&&Bt.push(i),i.observationTargets.push(new lf(n,r&&r.box)),Qi(1),Er.schedule())},t.unobserve=function(e,n){var r=je.get(e),i=Ki(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&Bt.splice(Bt.indexOf(r),1),r.observationTargets.splice(i,1),Qi(-1))},t.disconnect=function(e){var n=this,r=je.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t})(),hf=(function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Je.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ui(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Je.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ui(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Je.unobserve(this,e)},t.prototype.disconnect=function(){Je.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t})();const df=globalThis.ResizeObserver||hf,Oa={duration:void 0,margin:{top:0,bottom:0,left:0,right:0},padding:{top:0,bottom:0,left:0,right:0},sizing:ce.Fit,width:void 0,height:void 0,svgDefs:void 0,ariaLabel:void 0};class Fe{constructor(e){this._defaultConfig=Oa,this._isFirstRender=!0,this._renderAnimationFrameId=null,this._container=e;const n=kt(this._container);n.attr("role","figure"),this.svg=n.append("svg").style("display","block").attr("xmlns","http://www.w3.org/2000/svg").attr("height",Fe.DEFAULT_CONTAINER_HEIGHT).attr("aria-hidden",!0),this._svgDefs=this.svg.append("defs"),this._svgDefsExternal=this.svg.append("defs"),this.element=this.svg.node()}updateContainer(e){var n;this.prevConfig=this.config,this.config=ue(this._defaultConfig,e),e?.svgDefs!==((n=this.prevConfig)===null||n===void 0?void 0:n.svgDefs)&&(this._svgDefsExternal.selectAll("*").remove(),this._svgDefsExternal.html(e.svgDefs))}_preRender(){}_render(e){const{config:n}=this;kt(this._container).attr("aria-label",n.ariaLabel),this._isFirstRender=!1}render(e=this.config.duration){const n=this.config.width||this.containerWidth,r=this.config.height||this.containerHeight;this.svg.attr("width",n).attr("height",r),this._resizeObserver||this._setUpResizeObserver(),cancelAnimationFrame(this._renderAnimationFrameId),this._renderAnimationFrameId=requestAnimationFrame(()=>{this._preRender(),this._render(e)})}get containerWidth(){return this.config.width?this.element.clientWidth:this._container.clientWidth||this._container.getBoundingClientRect().width}get containerHeight(){return this.config.height?this.element.clientHeight:this._container.clientHeight||this._container.getBoundingClientRect().height||Fe.DEFAULT_CONTAINER_HEIGHT}get width(){return Ot(this.containerWidth-this.config.margin.left-this.config.margin.right,0,Number.POSITIVE_INFINITY)}get height(){return Ot(this.containerHeight-this.config.margin.top-this.config.margin.bottom,0,Number.POSITIVE_INFINITY)}_removeAllChildren(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild)}_onResize(){const{config:e}=this;(e.sizing===ce.Fit||e.sizing===ce.FitWidth)&&this.render(0)}_setUpResizeObserver(){if(this._resizeObserver)return;const e=this._container.getBoundingClientRect();this._containerSize={width:e.width,height:e.height},this._resizeObserver=new df((n,r)=>{cancelAnimationFrame(this._resizeObserverAnimationFrameId),this._resizeObserverAnimationFrameId=requestAnimationFrame(()=>{const i=this._container.getBoundingClientRect(),o={width:i.width,height:i.height};!Yt(this._containerSize,o)&&o.width&&o.height&&(this._containerSize=o,this._onResize())})}),this._resizeObserver.observe(this._container)}destroy(){var e;cancelAnimationFrame(this._renderAnimationFrameId),cancelAnimationFrame(this._resizeObserverAnimationFrameId),(e=this._resizeObserver)===null||e===void 0||e.disconnect(),this.svg.remove()}}Fe.DEFAULT_CONTAINER_HEIGHT=300;function gf(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function mf(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var pf=(function(){function t(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(r){r.forEach(this._insertTag)},e.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(mf(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=gf(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},e.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},t})(),Z="-ms-",En="-moz-",N="-webkit-",$a="comm",jr="rule",Jr="decl",vf="@import",Na="@keyframes",yf="@layer",xf=Math.abs,Qn=String.fromCharCode,wf=Object.assign;function _f(t,e){return V(t,0)^45?(((e<<2^V(t,0))<<2^V(t,1))<<2^V(t,2))<<2^V(t,3):0}function Ra(t){return t.trim()}function bf(t,e){return(t=e.exec(t))?t[0]:t}function R(t,e,n){return t.replace(e,n)}function Dr(t,e){return t.indexOf(e)}function V(t,e){return t.charCodeAt(e)|0}function Pe(t,e,n){return t.slice(e,n)}function dt(t){return t.length}function ti(t){return t.length}function tn(t,e){return e.push(t),t}function kf(t,e){return t.map(e).join("")}var Kn=1,le=1,Fa=0,J=0,z=0,me="";function jn(t,e,n,r,i,o,a){return{value:t,root:e,parent:n,type:r,props:i,children:o,line:Kn,column:le,length:a,return:""}}function ye(t,e){return wf(jn("",null,null,"",null,null,0),t,{length:-t.length},e)}function Tf(){return z}function Sf(){return z=J>0?V(me,--J):0,le--,z===10&&(le=1,Kn--),z}function nt(){return z=J<Fa?V(me,J++):0,le++,z===10&&(le=1,Kn++),z}function gt(){return V(me,J)}function cn(){return J}function Xe(t,e){return Pe(me,t,e)}function Ie(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Pa(t){return Kn=le=1,Fa=dt(me=t),J=0,[]}function Ia(t){return me="",t}function un(t){return Ra(Xe(J-1,Or(t===91?t+2:t===40?t+1:t)))}function Cf(t){for(;(z=gt())&&z<33;)nt();return Ie(t)>2||Ie(z)>3?"":" "}function Mf(t,e){for(;--e&&nt()&&!(z<48||z>102||z>57&&z<65||z>70&&z<97););return Xe(t,cn()+(e<6&>()==32&&nt()==32))}function Or(t){for(;nt();)switch(z){case t:return J;case 34:case 39:t!==34&&t!==39&&Or(z);break;case 40:t===41&&Or(t);break;case 92:nt();break}return J}function Af(t,e){for(;nt()&&t+z!==57;)if(t+z===84&>()===47)break;return"/*"+Xe(e,J-1)+"*"+Qn(t===47?t:nt())}function Ef(t){for(;!Ie(gt());)nt();return Xe(t,J)}function Df(t){return Ia(ln("",null,null,null,[""],t=Pa(t),0,[0],t))}function ln(t,e,n,r,i,o,a,s,c){for(var u=0,l=0,f=a,h=0,d=0,m=0,g=1,v=1,y=1,w=0,_="",T=i,k=o,p=r,b=_;v;)switch(m=w,w=nt()){case 40:if(m!=108&&V(b,f-1)==58){Dr(b+=R(un(w),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:b+=un(w);break;case 9:case 10:case 13:case 32:b+=Cf(m);break;case 92:b+=Mf(cn()-1,7);continue;case 47:switch(gt()){case 42:case 47:tn(Of(Af(nt(),cn()),e,n),c);break;default:b+="/"}break;case 123*g:s[u++]=dt(b)*y;case 125*g:case 59:case 0:switch(w){case 0:case 125:v=0;case 59+l:y==-1&&(b=R(b,/\f/g,"")),d>0&&dt(b)-f&&tn(d>32?Ji(b+";",r,n,f-1):Ji(R(b," ","")+";",r,n,f-2),c);break;case 59:b+=";";default:if(tn(p=ji(b,e,n,u,l,i,s,_,T=[],k=[],f),o),w===123)if(l===0)ln(b,e,p,p,T,o,f,s,k);else switch(h===99&&V(b,3)===110?100:h){case 100:case 108:case 109:case 115:ln(t,p,p,r&&tn(ji(t,p,p,0,0,i,s,_,i,T=[],f),k),i,k,f,s,r?T:k);break;default:ln(b,p,p,p,[""],k,0,s,k)}}u=l=d=0,g=y=1,_=b="",f=a;break;case 58:f=1+dt(b),d=m;default:if(g<1){if(w==123)--g;else if(w==125&&g++==0&&Sf()==125)continue}switch(b+=Qn(w),w*g){case 38:y=l>0?1:(b+="\f",-1);break;case 44:s[u++]=(dt(b)-1)*y,y=1;break;case 64:gt()===45&&(b+=un(nt())),h=gt(),l=f=dt(_=b+=Ef(cn())),w++;break;case 45:m===45&&dt(b)==2&&(g=0)}}return o}function ji(t,e,n,r,i,o,a,s,c,u,l){for(var f=i-1,h=i===0?o:[""],d=ti(h),m=0,g=0,v=0;m<r;++m)for(var y=0,w=Pe(t,f+1,f=xf(g=a[m])),_=t;y<d;++y)(_=Ra(g>0?h[y]+" "+w:R(w,/&\f/g,h[y])))&&(c[v++]=_);return jn(t,e,n,i===0?jr:s,c,u,l)}function Of(t,e,n){return jn(t,e,n,$a,Qn(Tf()),Pe(t,2,-2),0)}function Ji(t,e,n,r){return jn(t,e,n,Jr,Pe(t,0,r),Pe(t,r+1,-1),r)}function re(t,e){for(var n="",r=ti(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function $f(t,e,n,r){switch(t.type){case yf:if(t.children.length)break;case vf:case Jr:return t.return=t.return||t.value;case $a:return"";case Na:return t.return=t.value+"{"+re(t.children,r)+"}";case jr:t.value=t.props.join(",")}return dt(n=re(t.children,r))?t.return=t.value+"{"+n+"}":""}function Nf(t){var e=ti(t);return function(n,r,i,o){for(var a="",s=0;s<e;s++)a+=t[s](n,r,i,o)||"";return a}}function Rf(t){return function(e){e.root||(e=e.return)&&t(e)}}function Ff(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var Pf=function(e,n,r){for(var i=0,o=0;i=o,o=gt(),i===38&&o===12&&(n[r]=1),!Ie(o);)nt();return Xe(e,J)},If=function(e,n){var r=-1,i=44;do switch(Ie(i)){case 0:i===38&>()===12&&(n[r]=1),e[r]+=Pf(J-1,n,r);break;case 2:e[r]+=un(i);break;case 4:if(i===44){e[++r]=gt()===58?"&\f":"",n[r]=e[r].length;break}default:e[r]+=Qn(i)}while(i=nt());return e},Lf=function(e,n){return Ia(If(Pa(e),n))},to=new WeakMap,Bf=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,r=e.parent,i=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!to.get(r))&&!i){to.set(e,!0);for(var o=[],a=Lf(n,o),s=r.props,c=0,u=0;c<a.length;c++)for(var l=0;l<s.length;l++,u++)e.props[u]=o[c]?a[c].replace(/&\f/g,s[l]):s[l]+" "+a[c]}}},zf=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function La(t,e){switch(_f(t,e)){case 5103:return N+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return N+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return N+t+En+t+Z+t+t;case 6828:case 4268:return N+t+Z+t+t;case 6165:return N+t+Z+"flex-"+t+t;case 5187:return N+t+R(t,/(\w+).+(:[^]+)/,N+"box-$1$2"+Z+"flex-$1$2")+t;case 5443:return N+t+Z+"flex-item-"+R(t,/flex-|-self/,"")+t;case 4675:return N+t+Z+"flex-line-pack"+R(t,/align-content|flex-|-self/,"")+t;case 5548:return N+t+Z+R(t,"shrink","negative")+t;case 5292:return N+t+Z+R(t,"basis","preferred-size")+t;case 6060:return N+"box-"+R(t,"-grow","")+N+t+Z+R(t,"grow","positive")+t;case 4554:return N+R(t,/([^-])(transform)/g,"$1"+N+"$2")+t;case 6187:return R(R(R(t,/(zoom-|grab)/,N+"$1"),/(image-set)/,N+"$1"),t,"")+t;case 5495:case 3959:return R(t,/(image-set\([^]*)/,N+"$1$`$1");case 4968:return R(R(t,/(.+:)(flex-)?(.*)/,N+"box-pack:$3"+Z+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+N+t+t;case 4095:case 3583:case 4068:case 2532:return R(t,/(.+)-inline(.+)/,N+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(dt(t)-1-e>6)switch(V(t,e+1)){case 109:if(V(t,e+4)!==45)break;case 102:return R(t,/(.+:)(.+)-([^]+)/,"$1"+N+"$2-$3$1"+En+(V(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Dr(t,"stretch")?La(R(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(V(t,e+1)!==115)break;case 6444:switch(V(t,dt(t)-3-(~Dr(t,"!important")&&10))){case 107:return R(t,":",":"+N)+t;case 101:return R(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+N+(V(t,14)===45?"inline-":"")+"box$3$1"+N+"$2$3$1"+Z+"$2box$3")+t}break;case 5936:switch(V(t,e+11)){case 114:return N+t+Z+R(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return N+t+Z+R(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return N+t+Z+R(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return N+t+Z+t+t}return t}var Wf=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case Jr:e.return=La(e.value,e.length);break;case Na:return re([ye(e,{value:R(e.value,"@","@"+N)})],i);case jr:if(e.length)return kf(e.props,function(o){switch(bf(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return re([ye(e,{props:[R(o,/:(read-\w+)/,":"+En+"$1")]})],i);case"::placeholder":return re([ye(e,{props:[R(o,/:(plac\w+)/,":"+N+"input-$1")]}),ye(e,{props:[R(o,/:(plac\w+)/,":"+En+"$1")]}),ye(e,{props:[R(o,/:(plac\w+)/,Z+"input-$1")]})],i)}return""})}},Hf=[Wf],Yf=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var v=g.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=e.stylisPlugins||Hf,o={},a,s=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var v=g.getAttribute("data-emotion").split(" "),y=1;y<v.length;y++)o[v[y]]=!0;s.push(g)});var c,u=[Bf,zf];{var l,f=[$f,Rf(function(g){l.insert(g)})],h=Nf(u.concat(i,f)),d=function(v){return re(Df(v),h)};c=function(v,y,w,_){l=w,d(v?v+"{"+y.styles+"}":y.styles),_&&(m.inserted[y.name]=!0)}}var m={key:n,sheet:new pf({key:n,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:c};return m.sheet.hydrate(s),m};function Uf(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Vf={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Xf=/[A-Z]|^ms/g,qf=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ba=function(e){return e.charCodeAt(1)===45},eo=function(e){return e!=null&&typeof e!="boolean"},dr=Ff(function(t){return Ba(t)?t:t.replace(Xf,"-$&").toLowerCase()}),no=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(qf,function(r,i,o){return $t={name:i,styles:o,next:$t},i})}return Vf[e]!==1&&!Ba(e)&&typeof n=="number"&&n!==0?n+"px":n};function Dn(t,e,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return $t={name:i.name,styles:i.styles,next:$t},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)$t={name:a.name,styles:a.styles,next:$t},a=a.next;var s=o.styles+";";return s}return Gf(t,e,n)}}var c=n;if(e==null)return c;var u=e[c];return u!==void 0?u:c}function Gf(t,e,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Dn(t,e,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object"){var s=a;e!=null&&e[s]!==void 0?r+=o+"{"+e[s]+"}":eo(s)&&(r+=dr(o)+":"+no(o,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(e==null||e[a[0]]===void 0))for(var c=0;c<a.length;c++)eo(a[c])&&(r+=dr(o)+":"+no(o,a[c])+";");else{var u=Dn(t,e,a);switch(o){case"animation":case"animationName":{r+=dr(o)+":"+u+";";break}default:r+=o+"{"+u+"}"}}}return r}var ro=/label:\s*([^\s;{]+)\s*(;|$)/g,$t;function gr(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var r=!0,i="";$t=void 0;var o=t[0];if(o==null||o.raw===void 0)r=!1,i+=Dn(n,e,o);else{var a=o;i+=a[0]}for(var s=1;s<t.length;s++)if(i+=Dn(n,e,t[s]),r){var c=o;i+=c[s]}ro.lastIndex=0;for(var u="",l;(l=ro.exec(i))!==null;)u+="-"+l[1];var f=Uf(i)+u;return{name:f,styles:i,next:$t}}function za(t,e,n){var r="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):i&&(r+=i+" ")}),r}var Zf=function(e,n,r){var i=e.key+"-"+n.name;e.registered[i]===void 0&&(e.registered[i]=n.styles)},Qf=function(e,n,r){Zf(e,n);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+i:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function io(t,e){if(t.inserted[e.name]===void 0)return t.insert("",e,t.sheet,!0)}function oo(t,e,n){var r=[],i=za(t,r,n);return r.length<2?n:i+e(r)}var Kf=function(e){var n=Yf(e);n.sheet.speedy=function(s){this.isSpeedy=s},n.compat=!0;var r=function(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];var f=gr(u,n.registered,void 0);return Qf(n,f),n.key+"-"+f.name},i=function(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];var f=gr(u,n.registered),h="animation-"+f.name;return io(n,{name:f.name,styles:"@keyframes "+h+"{"+f.styles+"}"}),h},o=function(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];var f=gr(u,n.registered);io(n,f)},a=function(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];return oo(n.registered,r,jf(u))};return{css:r,cx:a,injectGlobal:o,keyframes:i,hydrate:function(c){c.forEach(function(u){n.inserted[u]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:za.bind(null,n.registered),merge:oo.bind(null,n.registered,r)}},jf=function t(e){for(var n="",r=0;r<e.length;r++){var i=e[r];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=t(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},Wa=Kf({key:"css"}),Jn=Wa.injectGlobal,W=Wa.css,mr,ao;function Jf(){return ao||(ao=1,mr=function(e,n){n||(n=[0,""]),e=String(e);var r=parseFloat(e,10);return n[0]=r,n[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",n}),mr}var pr,so;function th(){if(so)return pr;so=1;var t=Jf();pr=i;var e=r("in",document.body);function n(o,a){var s=t(getComputedStyle(o).getPropertyValue(a));return s[0]*i(s[1],o)}function r(o,a){var s=document.createElement("div");s.style.height="128"+o,a.appendChild(s);var c=n(s,"height")/128;return a.removeChild(s),c}function i(o,a){if(!o)return null;switch(a=a||document.body,o=(o+""||"px").trim().toLowerCase(),(a===window||a===document)&&(a=document.body),o){case"%":return a.clientHeight/100;case"ch":case"ex":return r(o,a);case"em":return n(a,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return e;case"cm":return e/2.54;case"mm":return e/25.4;case"pt":return e/72;case"pc":return e/6;case"px":return 1}var s=t(o);if(!isNaN(s[0])&&s[1]){var c=i(s[1],a);return typeof c=="number"?s[0]*c:null}return null}return pr}th();function Ha(){const t=()=>Math.floor((1+crypto.getRandomValues(new Uint32Array(1))[0])*65536).toString(16).substring(1);return`${t()+t()}-${t()}-${t()}-${t()}-${t()}${t()}${t()}`}function eh(t,e){const n=t.substr(4,t.length-5);return getComputedStyle(e).getPropertyValue(n)}function nh(t,e,n=0){const[r,i,o,a]=[t.x+n,t.y+t.height-2*n,t.x+t.width-2*n,t.y+n],[s,c,u,l]=[e.x+n,e.y+e.height-2*n,e.x+e.width-2*n,e.y+n];return!(i<l||c<a||o<s||u<r)}function ei(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ya(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function qe(){}var Le=.7,On=1/Le,ie="\\s*([+-]?\\d+)\\s*",Be="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",mt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rh=/^#([0-9a-f]{3,8})$/,ih=new RegExp(`^rgb\\(${ie},${ie},${ie}\\)$`),oh=new RegExp(`^rgb\\(${mt},${mt},${mt}\\)$`),ah=new RegExp(`^rgba\\(${ie},${ie},${ie},${Be}\\)$`),sh=new RegExp(`^rgba\\(${mt},${mt},${mt},${Be}\\)$`),ch=new RegExp(`^hsl\\(${Be},${mt},${mt}\\)$`),uh=new RegExp(`^hsla\\(${Be},${mt},${mt},${Be}\\)$`),co={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ei(qe,Ut,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:uo,formatHex:uo,formatHex8:lh,formatHsl:fh,formatRgb:lo,toString:lo});function uo(){return this.rgb().formatHex()}function lh(){return this.rgb().formatHex8()}function fh(){return Ua(this).formatHsl()}function lo(){return this.rgb().formatRgb()}function Ut(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=rh.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?fo(e):n===3?new K(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?en(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?en(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=ih.exec(t))?new K(e[1],e[2],e[3],1):(e=oh.exec(t))?new K(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=ah.exec(t))?en(e[1],e[2],e[3],e[4]):(e=sh.exec(t))?en(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=ch.exec(t))?mo(e[1],e[2]/100,e[3]/100,1):(e=uh.exec(t))?mo(e[1],e[2]/100,e[3]/100,e[4]):co.hasOwnProperty(t)?fo(co[t]):t==="transparent"?new K(NaN,NaN,NaN,0):null}function fo(t){return new K(t>>16&255,t>>8&255,t&255,1)}function en(t,e,n,r){return r<=0&&(t=e=n=NaN),new K(t,e,n,r)}function hh(t){return t instanceof qe||(t=Ut(t)),t?(t=t.rgb(),new K(t.r,t.g,t.b,t.opacity)):new K}function $r(t,e,n,r){return arguments.length===1?hh(t):new K(t,e,n,r??1)}function K(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}ei(K,$r,Ya(qe,{brighter(t){return t=t==null?On:Math.pow(On,t),new K(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Le:Math.pow(Le,t),new K(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new K(Wt(this.r),Wt(this.g),Wt(this.b),$n(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ho,formatHex:ho,formatHex8:dh,formatRgb:go,toString:go}));function ho(){return`#${Pt(this.r)}${Pt(this.g)}${Pt(this.b)}`}function dh(){return`#${Pt(this.r)}${Pt(this.g)}${Pt(this.b)}${Pt((isNaN(this.opacity)?1:this.opacity)*255)}`}function go(){const t=$n(this.opacity);return`${t===1?"rgb(":"rgba("}${Wt(this.r)}, ${Wt(this.g)}, ${Wt(this.b)}${t===1?")":`, ${t})`}`}function $n(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Wt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Pt(t){return t=Wt(t),(t<16?"0":"")+t.toString(16)}function mo(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new st(t,e,n,r)}function Ua(t){if(t instanceof st)return new st(t.h,t.s,t.l,t.opacity);if(t instanceof qe||(t=Ut(t)),!t)return new st;if(t instanceof st)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,c=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new st(a,s,c,t.opacity)}function ni(t,e,n,r){return arguments.length===1?Ua(t):new st(t,e,n,r??1)}function st(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}ei(st,ni,Ya(qe,{brighter(t){return t=t==null?On:Math.pow(On,t),new st(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Le:Math.pow(Le,t),new st(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new K(vr(t>=240?t-240:t+120,i,r),vr(t,i,r),vr(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new st(po(this.h),nn(this.s),nn(this.l),$n(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=$n(this.opacity);return`${t===1?"hsl(":"hsla("}${po(this.h)}, ${nn(this.s)*100}%, ${nn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function po(t){return t=(t||0)%360,t<0?t+360:t}function nn(t){return Math.max(0,Math.min(1,t||0))}function vr(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const ke=globalThis?.UNOVIS_COLORS||["#4D8CFD","#FF6B7E","#F4B83E","#A6CC74","#00C19A","#6859BE"],gh=globalThis?.UNOVIS_COLORS_DARK||["#4D8CFD","#FF6B7E","#FFC16D","#A6CC74","#00C19A","#7887E0"],Et=t=>`--vis-${ee(t)?`color${t%ke.length}`:t}`;function mh(t,e=.4){const n=ni(t);return n.l=n.l*(1+e),n.formatHex()}function ph(t,e=.4,n=.6){const r=ni(t);return r.s=r.s*(1-n),r.l=r.l*(1-e),r.formatHex()}const Nn=10,Nr=[{id:"stripes-diagonal",svg:'<path d="M-1,1 l2,-2 M0,10 l10,-10 M9,11 l2,-2" stroke="#000"/>'},{id:"dots",svg:'<path d="m0-1.5a1 1 0 010 3m10-3a1 1 0 000 3M5 3.5a1 1 0 010 3 1 1 0 010-3M0 8.5 a1 1 0 010 3m10-3a1 1 0 000 3" fill"#000"/>'},{id:"stripes-vertical",svg:'<path d="M 5,-1 L5,11" stroke="#000"/>'},{id:"crosshatch",svg:'<path d="M0 0L10 10ZM10 0L0 10Z" stroke="#000"/>'},{id:"waves",svg:'<path d="M0 4Q2.5 1 5 4 7.5 7 10 4v2Q7.5 9 5 6 2.5 3 0 6Z" fill="#000"/>'},{id:"circles",svg:'<circle cx="5" cy="5" r="3" stroke="#000" fill="#fff"/>'}],Rr=[{id:"circle",marker:'<circle cx="5" cy="5" r="5"/>',dashArray:[]},{id:"triangle",marker:'<path d="M5,0 L10,9 L0,9Z">',dashArray:[9,1]},{id:"diamond",marker:'<path d="M 0 5 L5 0 L 10 5 L 5 10 L 0 5Z">',dashArray:[2]},{id:"arrow",marker:'<path d="M4 0 0 0 6 5 0 10 4 10 10 5Z">',dashArray:[2,3,8,3]},{id:"square",marker:'<rect x="1" y="1" width="8" height="8"/>',dashArray:[6]},{id:"star",marker:'<path d="m2 9 3-9 3 9L0 3h10Z"/>',dashArray:[1,6]}];function Dt(t){return`vis-${`pattern-${t.svg?"fill":"marker"}`}-${t.id}`}const vh=t=>`<mask id="${Dt(t)}">
|
|
2
2
|
<pattern id="${t.id}" viewBox="0 0 10 10" width="${Nn}" height="${Nn}" patternUnits="userSpaceOnUse">
|
|
3
3
|
<rect width="100%" height="100%" fill="#fff"/>
|
|
4
4
|
${t.svg}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as fe}from"./BaJEGr8G.js";import{_ as ve}from"./BMLwzSDu.js";import{e as h,c as j,a as te,q as re,G as L,R as k,ab as n,T as l,ak as N,C as t,S as i,Q as A,_ as ae,U as Z,ae as X,bm as de,W as le,aa as O,a9 as J,O as ye,P as he,L as _e,N as be,al as ue,V as ge,bl as xe,a2 as we,ag as ke,aW as ce,bg as $e}from"./CvMqUdkl.js";import{_ as Ce,a as De}from"./0J8pJb0Z.js";import{_ as Se}from"./B8Kve-DH.js";import{_ as me}from"./pkbwpgSD.js";import{_ as Ue,a as Te}from"./1Hz98MKF.js";import{u as Fe}from"./sdvIKLwS.js";import{_ as je}from"./CrjKigv8.js";import{_ as Ve}from"./DgPiIWA2.js";import{_ as qe}from"./D-wVwRIx.js";import{_ as Ie}from"./DB3y_21M.js";import{_ as Pe}from"./S4a_N6rD.js";import{_ as ze}from"./1IuG3yiQ.js";import{_ as Me,a as Ee}from"./Db5XIfWS.js";import{c as Be,_ as Oe}from"./Bb1B0ntt.js";import{_ as Ne}from"./atVSHCxP.js";import{i as Le,d as Re,_ as Ae,u as Ke}from"./Dpp5cOwJ.js";import{u as He}from"./BvuV9uCn.js";import{u as pe}from"./DZ_azKLI.js";import"./HCCuOAgZ.js";import"./w3t8WD8v.js";import"./CSQ-nblB.js";import"./DxR8g9So.js";import"./D2lmhTjQ.js";import"./WWNeb45u.js";import"./Bn8loaeQ.js";import"./CqiOV9n1.js";import"./Dkzqkzki.js";import"./B9Kd_0HK.js";import"./BhOIdu3Z.js";import"./DfpSaqgV.js";import"./DImdNj-F.js";import"./D3V98LVR.js";import"./C6Y-ieo6.js";import"./BJi2ZHtT.js";import"./CXuKrnTA.js";import"./deSeNTOh.js";import"./CJ85o8FK.js";import"./BJ_GgKV0.js";import"./Cow1TrPj.js";import"./B1gFtqXK.js";import"./CxJr4mB0.js";import"./zBoPDS4z.js";import"./CW8xtqwN.js";import"./Vcq4gwWv.js";import"./B7-0ADn3.js";function Qe(){const d=h([]),m=h(null),c=h(!1),_=h(null),r=h("");function p(o,a=!1){const s=o.type==="directory"?void 0:b(o.name);return{id:o.path,label:o.name,icon:s,path:o.path,type:o.type,defaultExpanded:a,children:o.children?.map(U=>p(U))}}function b(o){switch(o.split(".").pop()?.toLowerCase()){case"md":return"i-lucide-file-text";case"ts":case"tsx":return"i-lucide-file-code";case"js":case"jsx":return"i-lucide-file-code";case"vue":return"i-lucide-file-code";case"json":return"i-lucide-file-json";case"css":case"scss":return"i-lucide-file-code";case"png":case"jpg":case"jpeg":case"gif":case"svg":return"i-lucide-file-image";default:return"i-lucide-file"}}async function v(o="/"){c.value=!0,_.value=null;try{const a=await $fetch("/api/fs/list",{query:{path:o,recursive:"true"}});d.value=a.data.map(s=>p(s,!0))}catch(a){_.value="Failed to load file tree",console.error("Failed to load file tree:",a)}finally{c.value=!1}}async function T(o){try{return(await $fetch("/api/fs/read",{method:"POST",body:{path:o}})).data}catch(a){throw console.error("Failed to read file:",a),a}}async function F(o,a){try{return(await $fetch("/api/fs/write",{method:"POST",body:{path:o,content:a}})).data}catch(s){throw console.error("Failed to write file:",s),s}}async function C(o,a){const s=o==="/"?`/${a}`:`${o}/${a}`;return await F(s,""),await v(),s}async function g(o,a){const s=o==="/"?`/${a}`:`${o}/${a}`;try{return await $fetch("/api/fs/mkdir",{method:"POST",body:{path:s}}),await v(),s}catch(U){throw console.error("Failed to create folder:",U),U}}async function M(o,a){const s=o.split("/");s.pop();const U=[...s,a].join("/");try{return await $fetch("/api/fs/rename",{method:"POST",body:{oldPath:o,newPath:U}}),await v(),U}catch(f){throw console.error("Failed to rename:",f),f}}async function w(o){try{await $fetch("/api/fs/delete",{method:"POST",body:{path:o}}),m.value===o&&(m.value=null),await v()}catch(a){throw console.error("Failed to delete:",a),a}}async function $(o,a){try{const s=await $fetch("/api/fs/move",{method:"POST",body:{sourcePath:o,destinationPath:a}});return await v(),s.data.newPath}catch(s){throw console.error("Failed to move:",s),s}}const q=j(()=>{if(!r.value)return d.value;const o=r.value.toLowerCase();function a(s){return s.reduce((U,f)=>{const I=f.label.toLowerCase().includes(o),V=f.children?a(f.children):[];return(I||V.length>0)&&U.push({...f,children:V.length>0?V:f.children,defaultExpanded:V.length>0||I}),U},[])}return a(d.value)});return{items:d,filteredItems:q,selectedFile:m,loading:c,error:_,searchQuery:r,loadTree:v,readFile:T,writeFile:F,createFile:C,createFolder:g,renameItem:M,deleteItem:w,moveItem:$}}const We={class:"h-full flex flex-col"},Ge={class:"-mt-1 pb-2"},Je={key:0,class:"flex items-center justify-center py-8"},Xe={key:1,class:"h-full min-h-32 flex flex-col items-center justify-center text-dimmed text-sm"},Ye=["onContextmenu","onDragstart","onDragover","onDrop"],Ze={class:"truncate"},et={class:"flex items-center gap-2"},tt={class:"flex justify-end gap-2"},at={class:"flex items-center gap-2"},lt={class:"flex justify-end gap-2"},ot={class:"flex items-center gap-2"},nt={class:"flex justify-end gap-2"},it={class:"flex items-center gap-2 text-error"},st={key:0,class:"text-sm text-dimmed mt-1"},dt={class:"flex justify-end gap-2"},rt=te({__name:"FileTree",emits:["select"],setup(d,{emit:m}){const c=m,{filteredItems:_,selectedFile:r,loading:p,searchQuery:b,loadTree:v,createFile:T,createFolder:F,renameItem:C,deleteItem:g,moveItem:M}=Qe(),w=h(null),$=h(null);function q(S,e){w.value=e,S.dataTransfer&&(S.dataTransfer.effectAllowed="move",S.dataTransfer.setData("text/plain",e.path))}function o(S,e){w.value&&e.type==="directory"&&w.value.path!==e.path&&(e.path.startsWith(w.value.path+"/")||(S.preventDefault(),$.value=e))}function a(){$.value=null}function s(){w.value=null,$.value=null}async function U(S,e){if(S.preventDefault(),!(!w.value||e.type!=="directory")){try{await M(w.value.path,e.path)}catch{}w.value=null,$.value=null}}const f=h(null),I=h(!1),V=h(!1),E=h(!1),P=h(!1),y=h(""),Y=j(()=>[[{label:"New File",icon:"i-lucide-file-plus",onSelect:()=>{y.value="",I.value=!0}},{label:"New Folder",icon:"i-lucide-folder-plus",onSelect:()=>{y.value="",V.value=!0}}],[{label:"Rename",icon:"i-lucide-pencil",onSelect:()=>{f.value&&(y.value=f.value.label,E.value=!0)}},{label:"Delete",icon:"i-lucide-trash-2",color:"error",onSelect:()=>{P.value=!0}}]]);function ee(S){S.type==="file"&&(r.value=S.path,c("select",S.path))}async function Q(){if(!y.value.trim())return;const S=f.value?.type==="directory"?f.value.path:"/";let e=y.value.trim();e.includes(".")||(e+=".md");try{const K=await T(S,e);r.value=K,c("select",K)}catch{}I.value=!1,y.value=""}async function D(){if(!y.value.trim())return;const S=f.value?.type==="directory"?f.value.path:"/";try{await F(S,y.value.trim())}catch{}V.value=!1,y.value=""}async function x(){if(!(!f.value||!y.value.trim())){try{await C(f.value.path,y.value.trim())}catch{}E.value=!1,y.value=""}}async function H(){if(f.value){try{await g(f.value.path)}catch{}P.value=!1}}return re(()=>{v()}),(S,e)=>{const K=fe,oe=ve,B=ae,ne=Ce,ie=De,R=le,W=Se,z=me;return k(),L("div",We,[n("div",Ge,[l(K,{modelValue:t(b),"onUpdate:modelValue":e[0]||(e[0]=u=>N(b)?b.value=u:null),placeholder:"Search files...",icon:"i-lucide-search",size:"sm",class:"w-full"},null,8,["modelValue"])]),l(oe,{class:"mt-2"}),l(ie,{items:t(Y),class:"flex-1 h-full overflow-auto p-2",onContextmenu:e[2]||(e[2]=u=>f.value=null)},{default:i(()=>[t(p)?(k(),L("div",Je,[l(B,{name:"i-lucide-loader-2",class:"size-6 animate-spin text-dimmed"})])):t(_).length===0?(k(),L("div",Xe,[l(B,{name:"i-lucide-folder-open",class:"size-8 mx-auto mb-2 opacity-50"}),e[14]||(e[14]=n("p",null,"No files found",-1)),e[15]||(e[15]=n("p",{class:"text-xs mt-1"}," Right-click to create a file ",-1))])):(k(),A(ne,{key:2,items:t(_),"get-key":u=>u.id,color:"primary","expanded-icon":"i-lucide-folder-open","collapsed-icon":"i-lucide-folder",onSelect:e[1]||(e[1]=(u,se)=>ee(se))},{item:i(({item:u,expanded:se})=>[n("div",{class:Z(["flex items-center gap-2 w-full",{"bg-primary/10 rounded":t($)?.path===u.path}]),draggable:"true",onContextmenu:G=>f.value=u,onDragstart:G=>q(G,u),onDragover:G=>o(G,u),onDragleave:a,onDragend:s,onDrop:G=>U(G,u)},[u.children?.length?(k(),A(B,{key:0,name:se?"i-lucide-folder-open":"i-lucide-folder",class:"size-4 shrink-0 text-dimmed"},null,8,["name"])):u.icon?(k(),A(B,{key:1,name:u.icon,class:"size-4 shrink-0 text-dimmed"},null,8,["name"])):(k(),A(B,{key:2,name:"i-lucide-file",class:"size-4 shrink-0 text-dimmed"})),n("span",Ze,X(u.label),1)],42,Ye)]),_:1},8,["items","get-key"]))]),_:1},8,["items"]),l(z,{open:t(I),"onUpdate:open":e[5]||(e[5]=u=>N(I)?I.value=u:null)},{content:i(()=>[l(W,null,{header:i(()=>[n("div",et,[l(B,{name:"i-lucide-file-plus",class:"size-5"}),e[16]||(e[16]=n("span",{class:"font-semibold"},"New File",-1))])]),footer:i(()=>[n("div",tt,[l(R,{color:"neutral",variant:"ghost",onClick:e[4]||(e[4]=u=>I.value=!1)},{default:i(()=>[...e[17]||(e[17]=[O(" Cancel ",-1)])]),_:1}),l(R,{onClick:Q},{default:i(()=>[...e[18]||(e[18]=[O(" Create ",-1)])]),_:1})])]),default:i(()=>[l(K,{modelValue:t(y),"onUpdate:modelValue":e[3]||(e[3]=u=>N(y)?y.value=u:null),placeholder:"filename.md",autofocus:"",onKeyup:de(Q,["enter"])},null,8,["modelValue"])]),_:1})]),_:1},8,["open"]),l(z,{open:t(V),"onUpdate:open":e[8]||(e[8]=u=>N(V)?V.value=u:null)},{content:i(()=>[l(W,null,{header:i(()=>[n("div",at,[l(B,{name:"i-lucide-folder-plus",class:"size-5"}),e[19]||(e[19]=n("span",{class:"font-semibold"},"New Folder",-1))])]),footer:i(()=>[n("div",lt,[l(R,{color:"neutral",variant:"ghost",onClick:e[7]||(e[7]=u=>V.value=!1)},{default:i(()=>[...e[20]||(e[20]=[O(" Cancel ",-1)])]),_:1}),l(R,{onClick:D},{default:i(()=>[...e[21]||(e[21]=[O(" Create ",-1)])]),_:1})])]),default:i(()=>[l(K,{modelValue:t(y),"onUpdate:modelValue":e[6]||(e[6]=u=>N(y)?y.value=u:null),placeholder:"folder-name",autofocus:"",onKeyup:de(D,["enter"])},null,8,["modelValue"])]),_:1})]),_:1},8,["open"]),l(z,{open:t(E),"onUpdate:open":e[11]||(e[11]=u=>N(E)?E.value=u:null)},{content:i(()=>[l(W,null,{header:i(()=>[n("div",ot,[l(B,{name:"i-lucide-pencil",class:"size-5"}),e[22]||(e[22]=n("span",{class:"font-semibold"},"Rename",-1))])]),footer:i(()=>[n("div",nt,[l(R,{color:"neutral",variant:"ghost",onClick:e[10]||(e[10]=u=>E.value=!1)},{default:i(()=>[...e[23]||(e[23]=[O(" Cancel ",-1)])]),_:1}),l(R,{onClick:x},{default:i(()=>[...e[24]||(e[24]=[O(" Rename ",-1)])]),_:1})])]),default:i(()=>[l(K,{modelValue:t(y),"onUpdate:modelValue":e[9]||(e[9]=u=>N(y)?y.value=u:null),placeholder:"new-name",autofocus:"",onKeyup:de(x,["enter"])},null,8,["modelValue"])]),_:1})]),_:1},8,["open"]),l(z,{open:t(P),"onUpdate:open":e[13]||(e[13]=u=>N(P)?P.value=u:null)},{content:i(()=>[l(W,null,{header:i(()=>[n("div",it,[l(B,{name:"i-lucide-trash-2",class:"size-5"}),e[25]||(e[25]=n("span",{class:"font-semibold"},"Delete",-1))])]),footer:i(()=>[n("div",dt,[l(R,{color:"neutral",variant:"ghost",onClick:e[12]||(e[12]=u=>P.value=!1)},{default:i(()=>[...e[28]||(e[28]=[O(" Cancel ",-1)])]),_:1}),l(R,{color:"error",onClick:H},{default:i(()=>[...e[29]||(e[29]=[O(" Delete ",-1)])]),_:1})])]),default:i(()=>[n("p",null,[e[26]||(e[26]=O(" Are you sure you want to delete ",-1)),n("strong",null,X(t(f)?.label),1),e[27]||(e[27]=O("? ",-1))]),t(f)?.type==="directory"?(k(),L("p",st," This will delete all files and folders inside. ")):J("",!0)]),_:1})]),_:1},8,["open"])])}}}),ut=Object.assign(rt,{__name:"FilesFileTree"}),ct={base:"hidden lg:flex",variants:{side:{left:"",right:""}}},mt={__name:"UDashboardSidebarCollapse",props:{color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1,default:"ghost"},side:{type:String,required:!1,default:"left"},label:{type:String,required:!1},activeColor:{type:null,required:!1},activeVariant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},block:{type:Boolean,required:!1},loadingAuto:{type:Boolean,required:!1},onClick:{type:[Function,Array],required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1},as:{type:null,required:!1},type:{type:null,required:!1},disabled:{type:Boolean,required:!1},exactActiveClass:{type:String,required:!1},viewTransition:{type:Boolean,required:!1}},setup(d){const m=d,c=ye(he(m,"icon","side","class")),{t:_}=_e(),r=be(),{sidebarCollapsed:p,collapseSidebar:b}=Fe({sidebarCollapsed:h(!1),collapseSidebar:()=>{}}),v=j(()=>ue({extend:ue(ct),...r.ui?.dashboardSidebarCollapse||{}}));return(T,F)=>(k(),A(le,ge({...t(c),icon:m.icon||(t(p)?t(r).ui.icons.panelOpen:t(r).ui.icons.panelClose),"aria-label":t(p)?t(_)("dashboardSidebarCollapse.expand"):t(_)("dashboardSidebarCollapse.collapse"),...T.$attrs},{class:v.value({class:m.class,side:m.side}),onClick:F[0]||(F[0]=C=>t(b)?.(!t(p)))}),null,16,["class"]))}},pt={class:"border-b border-default px-4 py-3 bg-elevated/50"},ft={class:"flex flex-wrap items-start gap-3"},vt={class:"flex items-start gap-2 py-0.5"},yt={class:"min-w-0"},ht={class:"font-medium"},_t={class:"text-xs text-dimmed truncate"},bt=te({__name:"DocumentMetadata",props:{metadata:{},projects:{}},emits:["update:metadata"],setup(d,{emit:m}){const c=d,_=m,r=[{label:"Hidden",value:"hidden",icon:"i-lucide-lock",description:"Hidden behind authentication and never viewable by the public"},{label:"Private",value:"private",icon:"i-lucide-eye-off",description:"Viewable by anyone with the link, but will not be indexed by search engines"},{label:"Public",value:"public",icon:"i-lucide-eye",description:"Viewable to the public and indexed by search engines"}],p=j(()=>c.metadata.shared?c.metadata.shareType||"private":"hidden"),b=j(()=>r.find(g=>g.value===p.value)),v=j({get:()=>c.metadata.tags||[],set:g=>_("update:metadata",{tags:g})});function T(g){_("update:metadata",{projectId:g||void 0})}function F(g){g==="hidden"?_("update:metadata",{shared:!1,shareType:void 0}):_("update:metadata",{shared:!0,shareType:g})}const C=j(()=>[{label:"None",value:void 0},...c.projects.map(g=>({label:g.name,value:g.id}))]);return(g,M)=>{const w=Ie,$=Pe,q=ae,o=ze;return k(),L("div",pt,[n("div",ft,[l($,{label:"Project",class:"w-40"},{default:i(()=>[l(w,{"model-value":d.metadata.projectId,items:t(C),"value-key":"value",placeholder:"None",class:"w-full","search-input":!1,"onUpdate:modelValue":T},null,8,["model-value","items"])]),_:1}),l($,{label:"Visibility",class:"w-44"},{default:i(()=>[l(w,{"model-value":t(p),items:r,"value-key":"value",class:"w-full","search-input":!1,"onUpdate:modelValue":F},{leading:i(()=>[t(b)?(k(),A(q,{key:0,name:t(b).icon,class:"size-4 text-dimmed"},null,8,["name"])):J("",!0)]),item:i(({item:a})=>[n("div",vt,[l(q,{name:a.icon,class:"size-4 mt-0.5 shrink-0"},null,8,["name"]),n("div",yt,[n("div",ht,X(a.label),1),n("div",_t,X(a.description),1)])])]),_:1},8,["model-value"])]),_:1}),l($,{label:"Tags",class:"flex-1 min-w-48"},{default:i(()=>[l(o,{modelValue:t(v),"onUpdate:modelValue":M[0]||(M[0]=a=>N(v)?v.value=a:null),placeholder:"Add tags...",class:"w-full"},null,8,["modelValue"])]),_:1})])])}}}),gt=Object.assign(bt,{__name:"EditorDocumentMetadata"}),xt=Be(Ne),wt={class:"h-full flex flex-col"},kt={class:"border-b border-default py-2 flex items-center justify-between"},$t={class:"flex items-center gap-2 text-sm text-dimmed min-w-0"},Ct={class:"truncate"},Dt={key:0,class:"w-40"},St={class:"flex items-center gap-3"},Ut={key:0,class:"flex items-center gap-1 text-sm text-dimmed"},Tt={class:"space-y-4"},Ft={class:"flex items-center gap-3"},jt={class:"flex items-center gap-3"},Vt={class:"flex items-center gap-3"},qt=te({__name:"DocumentEditor",props:{document:{},body:{},metadata:{},filePath:{},saveStatus:{},isDirty:{type:Boolean},metadataDirty:{type:Boolean}},emits:["update:body","update:metadata","save"],async setup(d,{emit:m}){let c,_;const r=d,p=m,{data:b}=([c,_]=xe(()=>He("/api/projects","$c96-63t_ij")),c=await c,_(),c),v=j(()=>b.value?.data||[]),T=h(!0),{editorMode:F}=pe(),C=j({get:()=>F.value==="editor",set:D=>F.value=D?"editor":"code"}),g=j(()=>r.document.fileType==="markdown"||Le(r.filePath)),M=j(()=>Re(r.filePath)),w=j(()=>g.value),$=[[{kind:"heading",level:1,icon:"i-lucide-heading-1"},{kind:"heading",level:2,icon:"i-lucide-heading-2"},{kind:"heading",level:3,icon:"i-lucide-heading-3"}],[{kind:"mark",mark:"bold",icon:"i-lucide-bold"},{kind:"mark",mark:"italic",icon:"i-lucide-italic"},{kind:"mark",mark:"code",icon:"i-lucide-code"}],[{kind:"bulletList",icon:"i-lucide-list"},{kind:"orderedList",icon:"i-lucide-list-ordered"},{kind:"blockquote",icon:"i-lucide-quote"}],[{kind:"link",icon:"i-lucide-link"},{kind:"codeBlock",icon:"i-lucide-file-code"},{kind:"horizontalRule",icon:"i-lucide-minus"}],[{kind:"undo",icon:"i-lucide-undo"},{kind:"redo",icon:"i-lucide-redo"}]],q=j(()=>{switch(r.saveStatus){case"saving":return"i-lucide-loader-2";case"saved":return"i-lucide-check";case"error":return"i-lucide-alert-circle";default:return r.isDirty||r.metadataDirty?"i-lucide-circle-dot":null}}),o=j(()=>{switch(r.saveStatus){case"saving":return"Saving...";case"saved":return"Saved";case"error":return"Error saving";default:return r.isDirty||r.metadataDirty?"Unsaved changes":""}}),a=j(()=>r.body||void 0);function s(D){p("update:body",D)}function U(D){p("update:metadata",D)}function f(D){(D.metaKey||D.ctrlKey)&&D.key==="s"&&(D.preventDefault(),p("save"))}re(()=>window.addEventListener("keydown",f)),we(()=>window.removeEventListener("keydown",f));const I=ke(),V=j(()=>r.document?.id?`${window.location.origin}/view/${r.document.id}`:""),E=h(!1),P=h(!1);function y(){r.metadata.shared?ee():P.value=!0}const{copy:Y}=Ke();async function ee(){await Y(V.value)?(E.value=!0,I.add({title:"Link copied!",icon:"i-lucide-check",color:"success"}),setTimeout(()=>{E.value=!1},2e3)):I.add({title:"Failed to copy link",icon:"i-lucide-x",color:"error"})}function Q(D,x){p("update:metadata",{shared:D,shareType:x??void 0}),P.value=!1,D&&setTimeout(()=>ee(),100)}return(D,x)=>{const H=ae,S=qe,e=le,K=gt,oe=Me,B=Ee,ne=xt,ie=Ae,R=Oe,W=me;return k(),L("div",wt,[n("div",kt,[n("div",$t,[l(H,{name:"i-lucide-file-text",class:"size-4 shrink-0"}),n("span",Ct,X(d.filePath),1)]),t(w)?(k(),L("div",Dt,[l(S,{modelValue:t(C),"onUpdate:modelValue":x[0]||(x[0]=z=>N(C)?C.value=z:null),"unchecked-icon":"i-lucide-code","checked-icon":"i-lucide-pencil",label:t(C)?"Editor Mode":"Code Mode",ui:{base:"data-[state=unchecked]:bg-info",icon:"group-data-[state=unchecked]:text-info"}},null,8,["modelValue","label"])])):J("",!0),n("div",St,[l(e,{icon:t(E)?"i-lucide-check":"i-lucide-share",size:"xs",variant:"ghost",class:"rounded-full",onClick:y},null,8,["icon"]),l(e,{icon:t(T)?"i-lucide-panel-top-close":"i-lucide-panel-top-open",size:"xs",variant:"ghost",class:"rounded-full",onClick:x[1]||(x[1]=z=>T.value=!t(T))},null,8,["icon"]),t(q)?(k(),L("div",Ut,[l(H,{name:t(q),class:Z(["size-4",d.saveStatus==="saving"&&"animate-spin",d.saveStatus==="error"&&"text-error"])},null,8,["name","class"]),n("span",null,X(t(o)),1)])):J("",!0)])]),t(T)?(k(),A(K,{key:0,metadata:d.metadata,projects:t(v),"onUpdate:metadata":U},null,8,["metadata","projects"])):J("",!0),t(g)&&t(C)?(k(),A(B,{key:1,"model-value":t(a),"content-type":"markdown",placeholder:"Start writing...",class:"markdown-editor w-full min-h-64 flex-1","onUpdate:modelValue":s},{default:i(({editor:z})=>[l(oe,{editor:z,items:$,class:"border-b border-default"},null,8,["editor"])]),_:1},8,["model-value"])):(k(),A(R,{key:2},{fallback:i(()=>[l(ie,{class:"flex-1"})]),default:i(()=>[l(ne,{"model-value":d.body,language:t(M),class:"flex-1","onUpdate:modelValue":s},null,8,["model-value","language"])]),_:1})),l(W,{open:t(P),"onUpdate:open":x[5]||(x[5]=z=>N(P)?P.value=z:null),title:"Share Document",description:"Choose how you want to share this document"},{body:i(()=>[n("div",Tt,[n("div",{class:Z(["p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors",{"border-primary bg-elevated":!d.metadata.shared}]),onClick:x[2]||(x[2]=z=>Q(!1,null))},[n("div",Ft,[l(H,{name:"i-lucide-eye-off",class:"size-5 text-dimmed"}),x[6]||(x[6]=n("div",null,[n("div",{class:"font-medium"}," Hidden "),n("div",{class:"text-sm text-dimmed"}," Only you can view this document. Not accessible via link. ")],-1))])],2),n("div",{class:Z(["p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors",{"border-primary bg-elevated":d.metadata.shared&&d.metadata.shareType==="private"}]),onClick:x[3]||(x[3]=z=>Q(!0,"private"))},[n("div",jt,[l(H,{name:"i-lucide-link",class:"size-5 text-dimmed"}),x[7]||(x[7]=n("div",null,[n("div",{class:"font-medium"}," Private (Link Only) "),n("div",{class:"text-sm text-dimmed"}," Anyone with the link can view. Not indexed by search engines. ")],-1))])],2),n("div",{class:Z(["p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors",{"border-primary bg-elevated":d.metadata.shared&&d.metadata.shareType==="public"}]),onClick:x[4]||(x[4]=z=>Q(!0,"public"))},[n("div",Vt,[l(H,{name:"i-lucide-globe",class:"size-5 text-dimmed"}),x[8]||(x[8]=n("div",null,[n("div",{class:"font-medium"}," Public "),n("div",{class:"text-sm text-dimmed"}," Visible to everyone. Indexed by search engines. ")],-1))])],2)])]),_:1},8,["open"])])}}}),It=Object.assign(qt,{__name:"EditorDocumentEditor"});function Pt(){const d=h(null),m=h(null),c=h(""),_=h(null),r=h(!1),p=h("idle"),b=h(!1),v=h(!1),T=ce(async()=>{!d.value||!b.value||await w({body:c.value})},2e3),F=ce(async()=>{!d.value||!v.value||await w()},500);async function C(o){r.value=!0,_.value=o,b.value=!1,v.value=!1,p.value="idle";try{const a=await $fetch("/api/documents/by-path",{method:"POST",body:{path:o}});d.value=a.data.document,m.value=a.data.metadata,c.value=a.data.body||""}catch(a){console.error("Failed to load document:",a),d.value=null,m.value=null,c.value=""}finally{r.value=!1}}function g(o){c.value!==o&&(c.value=o,b.value=!0,T())}function M(o){m.value&&(m.value={...m.value,...o},v.value=!0,F())}async function w(o={}){if(d.value){p.value="saving";try{const a={...o};v.value&&m.value&&(a.title=m.value.title,a.tags=m.value.tags,a.projectId=m.value.projectId,a.shared=m.value.shared,a.shareType=m.value.shareType),b.value&&o.body===void 0&&(a.body=c.value);const s=await $fetch(`/api/documents/${d.value.id}`,{method:"PUT",body:a});d.value=s.data.document,m.value=s.data.metadata,c.value=s.data.body||"",b.value=!1,v.value=!1,p.value="saved",setTimeout(()=>{p.value==="saved"&&(p.value="idle")},2e3)}catch(a){console.error("Failed to save document:",a),p.value="error"}}}async function $(){!b.value&&!v.value||await w({body:c.value})}function q(){d.value=null,m.value=null,c.value="",_.value=null,b.value=!1,v.value=!1,p.value="idle"}return{document:d,metadata:m,body:c,filePath:_,loading:r,saveStatus:p,isDirty:b,metadataDirty:v,loadDocument:C,updateBody:g,updateMetadata:M,saveDocument:w,saveNow:$,closeDocument:q}}const zt={class:"flex flex-1 min-w-0"},Mt={key:0,class:"flex-1 flex items-center justify-center h-full"},Et={key:1,class:"flex-1 flex items-center justify-center h-full text-dimmed"},Bt={class:"text-center"},qa=te({__name:"docs",setup(d){const m=$e(),{document:c,metadata:_,body:r,filePath:p,loading:b,saveStatus:v,isDirty:T,metadataDirty:F,loadDocument:C,updateBody:g,updateMetadata:M,saveNow:w}=Pt(),{lastDocumentPath:$}=pe();async function q(o){await C(o),$.value=o}return re(async()=>{const o=m.query.path;o?(await C(o),$.value=o):$.value&&await C($.value)}),(o,a)=>{const s=ut,U=Ue,f=mt,I=je,V=le,E=Ve,P=Te,y=ae,Y=It;return k(),L("div",zt,[l(U,{id:"docs-filetree",collapsible:"",resizable:"","min-size":12,"default-size":16,"max-size":24,class:"hidden lg:flex"},{body:i(()=>[l(s,{class:"h-full",onSelect:q})]),_:1}),l(U,{id:"docs-editor",grow:"",ui:{body:"sm:py-0"}},{header:i(()=>[l(P,null,{title:i(()=>[l(f),a[0]||(a[0]=O(" Editor ",-1))]),right:i(()=>[l(I),l(E,null,{content:i(()=>[l(s,{class:"h-full",onSelect:q})]),default:i(()=>[l(V,{icon:"i-lucide-folder-tree",class:"block lg:hidden"})]),_:1})]),_:1})]),body:i(()=>[t(b)?(k(),L("div",Mt,[l(y,{name:"i-lucide-loader-2",class:"size-6 animate-spin text-dimmed"})])):t(p)?t(_)&&t(c)?(k(),A(Y,{key:t(p),document:t(c),body:t(r),metadata:t(_),"file-path":t(p),"save-status":t(v),"is-dirty":t(T),"metadata-dirty":t(F),class:"h-full","onUpdate:body":t(g),"onUpdate:metadata":t(M),onSave:t(w)},null,8,["document","body","metadata","file-path","save-status","is-dirty","metadata-dirty","onUpdate:body","onUpdate:metadata","onSave"])):J("",!0):(k(),L("div",Et,[n("div",Bt,[l(y,{name:"i-lucide-file-text",class:"size-32 mx-auto mb-4 opacity-50"}),a[1]||(a[1]=n("p",null,"Select a file to edit",-1))])]))]),_:1})])}}});export{qa as default};
|
|
1
|
+
import{_ as fe}from"./SfaNtyKS.js";import{_ as ve}from"./Bhhg7oSf.js";import{e as h,c as j,a as te,q as re,G as L,R as k,ab as n,T as l,al as N,C as t,S as i,Q as A,_ as ae,U as Z,ae as X,bm as de,W as le,aa as O,a9 as J,O as ye,P as he,L as _e,N as be,am as ue,V as ge,bl as xe,a2 as we,ag as ke,aW as ce,bg as $e}from"./njnzCNrH.js";import{_ as Ce,a as De}from"./Drxf7nJz.js";import{_ as Se}from"./zO9MgHj2.js";import{_ as me}from"./GYf-vnR6.js";import{_ as Ue,a as Te}from"./B0xuHXvN.js";import{u as Fe}from"./C-Ygk9x5.js";import{_ as je}from"./BLm0UviR.js";import{_ as Ve}from"./BlsIfvSf.js";import{_ as qe}from"./BUC36BHp.js";import{_ as Ie}from"./Dbfwn2zk.js";import{_ as Pe}from"./D-5A6cMB.js";import{_ as ze}from"./CfY_bsV0.js";import{_ as Me,a as Ee}from"./D79lbuWG.js";import{c as Be,_ as Oe}from"./B5SnZL2l.js";import{_ as Ne}from"./pHCJ6lhw.js";import{i as Le,d as Re,_ as Ae,u as Ke}from"./BahXyh-A.js";import{u as He}from"./CF33v_m5.js";import{u as pe}from"./2QHXgMyi.js";import"./BHn8tRjg.js";import"./Pn7VD6uQ.js";import"./CAfyXyeo.js";import"./CClsKJ9A.js";import"./BIo-9u_O.js";import"./Bwn-CRYH.js";import"./ImPsUDiH.js";import"./BvstjGHC.js";import"./BCCYopTB.js";import"./D2kQkOaG.js";import"./MWUW1sIF.js";import"./CXTrUfQ5.js";import"./D9aYkNhQ.js";import"./B9zgEO8N.js";import"./C6Y-ieo6.js";import"./DLUvsixu.js";import"./CrmE-JGu.js";import"./BjnQ1pI1.js";import"./BZBNJD7U.js";import"./BYtVdUIW.js";import"./vES4kgx7.js";import"./iBaivqi8.js";import"./dB7G4iIC.js";import"./DMb_1D81.js";import"./Cve4psva.js";import"./Vcq4gwWv.js";import"./Buf1PAiO.js";function Qe(){const d=h([]),m=h(null),c=h(!1),_=h(null),r=h("");function p(o,a=!1){const s=o.type==="directory"?void 0:b(o.name);return{id:o.path,label:o.name,icon:s,path:o.path,type:o.type,defaultExpanded:a,children:o.children?.map(U=>p(U))}}function b(o){switch(o.split(".").pop()?.toLowerCase()){case"md":return"i-lucide-file-text";case"ts":case"tsx":return"i-lucide-file-code";case"js":case"jsx":return"i-lucide-file-code";case"vue":return"i-lucide-file-code";case"json":return"i-lucide-file-json";case"css":case"scss":return"i-lucide-file-code";case"png":case"jpg":case"jpeg":case"gif":case"svg":return"i-lucide-file-image";default:return"i-lucide-file"}}async function v(o="/"){c.value=!0,_.value=null;try{const a=await $fetch("/api/fs/list",{query:{path:o,recursive:"true"}});d.value=a.data.map(s=>p(s,!0))}catch(a){_.value="Failed to load file tree",console.error("Failed to load file tree:",a)}finally{c.value=!1}}async function T(o){try{return(await $fetch("/api/fs/read",{method:"POST",body:{path:o}})).data}catch(a){throw console.error("Failed to read file:",a),a}}async function F(o,a){try{return(await $fetch("/api/fs/write",{method:"POST",body:{path:o,content:a}})).data}catch(s){throw console.error("Failed to write file:",s),s}}async function C(o,a){const s=o==="/"?`/${a}`:`${o}/${a}`;return await F(s,""),await v(),s}async function g(o,a){const s=o==="/"?`/${a}`:`${o}/${a}`;try{return await $fetch("/api/fs/mkdir",{method:"POST",body:{path:s}}),await v(),s}catch(U){throw console.error("Failed to create folder:",U),U}}async function M(o,a){const s=o.split("/");s.pop();const U=[...s,a].join("/");try{return await $fetch("/api/fs/rename",{method:"POST",body:{oldPath:o,newPath:U}}),await v(),U}catch(f){throw console.error("Failed to rename:",f),f}}async function w(o){try{await $fetch("/api/fs/delete",{method:"POST",body:{path:o}}),m.value===o&&(m.value=null),await v()}catch(a){throw console.error("Failed to delete:",a),a}}async function $(o,a){try{const s=await $fetch("/api/fs/move",{method:"POST",body:{sourcePath:o,destinationPath:a}});return await v(),s.data.newPath}catch(s){throw console.error("Failed to move:",s),s}}const q=j(()=>{if(!r.value)return d.value;const o=r.value.toLowerCase();function a(s){return s.reduce((U,f)=>{const I=f.label.toLowerCase().includes(o),V=f.children?a(f.children):[];return(I||V.length>0)&&U.push({...f,children:V.length>0?V:f.children,defaultExpanded:V.length>0||I}),U},[])}return a(d.value)});return{items:d,filteredItems:q,selectedFile:m,loading:c,error:_,searchQuery:r,loadTree:v,readFile:T,writeFile:F,createFile:C,createFolder:g,renameItem:M,deleteItem:w,moveItem:$}}const We={class:"h-full flex flex-col"},Ge={class:"-mt-1 pb-2"},Je={key:0,class:"flex items-center justify-center py-8"},Xe={key:1,class:"h-full min-h-32 flex flex-col items-center justify-center text-dimmed text-sm"},Ye=["onContextmenu","onDragstart","onDragover","onDrop"],Ze={class:"truncate"},et={class:"flex items-center gap-2"},tt={class:"flex justify-end gap-2"},at={class:"flex items-center gap-2"},lt={class:"flex justify-end gap-2"},ot={class:"flex items-center gap-2"},nt={class:"flex justify-end gap-2"},it={class:"flex items-center gap-2 text-error"},st={key:0,class:"text-sm text-dimmed mt-1"},dt={class:"flex justify-end gap-2"},rt=te({__name:"FileTree",emits:["select"],setup(d,{emit:m}){const c=m,{filteredItems:_,selectedFile:r,loading:p,searchQuery:b,loadTree:v,createFile:T,createFolder:F,renameItem:C,deleteItem:g,moveItem:M}=Qe(),w=h(null),$=h(null);function q(S,e){w.value=e,S.dataTransfer&&(S.dataTransfer.effectAllowed="move",S.dataTransfer.setData("text/plain",e.path))}function o(S,e){w.value&&e.type==="directory"&&w.value.path!==e.path&&(e.path.startsWith(w.value.path+"/")||(S.preventDefault(),$.value=e))}function a(){$.value=null}function s(){w.value=null,$.value=null}async function U(S,e){if(S.preventDefault(),!(!w.value||e.type!=="directory")){try{await M(w.value.path,e.path)}catch{}w.value=null,$.value=null}}const f=h(null),I=h(!1),V=h(!1),E=h(!1),P=h(!1),y=h(""),Y=j(()=>[[{label:"New File",icon:"i-lucide-file-plus",onSelect:()=>{y.value="",I.value=!0}},{label:"New Folder",icon:"i-lucide-folder-plus",onSelect:()=>{y.value="",V.value=!0}}],[{label:"Rename",icon:"i-lucide-pencil",onSelect:()=>{f.value&&(y.value=f.value.label,E.value=!0)}},{label:"Delete",icon:"i-lucide-trash-2",color:"error",onSelect:()=>{P.value=!0}}]]);function ee(S){S.type==="file"&&(r.value=S.path,c("select",S.path))}async function Q(){if(!y.value.trim())return;const S=f.value?.type==="directory"?f.value.path:"/";let e=y.value.trim();e.includes(".")||(e+=".md");try{const K=await T(S,e);r.value=K,c("select",K)}catch{}I.value=!1,y.value=""}async function D(){if(!y.value.trim())return;const S=f.value?.type==="directory"?f.value.path:"/";try{await F(S,y.value.trim())}catch{}V.value=!1,y.value=""}async function x(){if(!(!f.value||!y.value.trim())){try{await C(f.value.path,y.value.trim())}catch{}E.value=!1,y.value=""}}async function H(){if(f.value){try{await g(f.value.path)}catch{}P.value=!1}}return re(()=>{v()}),(S,e)=>{const K=fe,oe=ve,B=ae,ne=Ce,ie=De,R=le,W=Se,z=me;return k(),L("div",We,[n("div",Ge,[l(K,{modelValue:t(b),"onUpdate:modelValue":e[0]||(e[0]=u=>N(b)?b.value=u:null),placeholder:"Search files...",icon:"i-lucide-search",size:"sm",class:"w-full"},null,8,["modelValue"])]),l(oe,{class:"mt-2"}),l(ie,{items:t(Y),class:"flex-1 h-full overflow-auto p-2",onContextmenu:e[2]||(e[2]=u=>f.value=null)},{default:i(()=>[t(p)?(k(),L("div",Je,[l(B,{name:"i-lucide-loader-2",class:"size-6 animate-spin text-dimmed"})])):t(_).length===0?(k(),L("div",Xe,[l(B,{name:"i-lucide-folder-open",class:"size-8 mx-auto mb-2 opacity-50"}),e[14]||(e[14]=n("p",null,"No files found",-1)),e[15]||(e[15]=n("p",{class:"text-xs mt-1"}," Right-click to create a file ",-1))])):(k(),A(ne,{key:2,items:t(_),"get-key":u=>u.id,color:"primary","expanded-icon":"i-lucide-folder-open","collapsed-icon":"i-lucide-folder",onSelect:e[1]||(e[1]=(u,se)=>ee(se))},{item:i(({item:u,expanded:se})=>[n("div",{class:Z(["flex items-center gap-2 w-full",{"bg-primary/10 rounded":t($)?.path===u.path}]),draggable:"true",onContextmenu:G=>f.value=u,onDragstart:G=>q(G,u),onDragover:G=>o(G,u),onDragleave:a,onDragend:s,onDrop:G=>U(G,u)},[u.children?.length?(k(),A(B,{key:0,name:se?"i-lucide-folder-open":"i-lucide-folder",class:"size-4 shrink-0 text-dimmed"},null,8,["name"])):u.icon?(k(),A(B,{key:1,name:u.icon,class:"size-4 shrink-0 text-dimmed"},null,8,["name"])):(k(),A(B,{key:2,name:"i-lucide-file",class:"size-4 shrink-0 text-dimmed"})),n("span",Ze,X(u.label),1)],42,Ye)]),_:1},8,["items","get-key"]))]),_:1},8,["items"]),l(z,{open:t(I),"onUpdate:open":e[5]||(e[5]=u=>N(I)?I.value=u:null)},{content:i(()=>[l(W,null,{header:i(()=>[n("div",et,[l(B,{name:"i-lucide-file-plus",class:"size-5"}),e[16]||(e[16]=n("span",{class:"font-semibold"},"New File",-1))])]),footer:i(()=>[n("div",tt,[l(R,{color:"neutral",variant:"ghost",onClick:e[4]||(e[4]=u=>I.value=!1)},{default:i(()=>[...e[17]||(e[17]=[O(" Cancel ",-1)])]),_:1}),l(R,{onClick:Q},{default:i(()=>[...e[18]||(e[18]=[O(" Create ",-1)])]),_:1})])]),default:i(()=>[l(K,{modelValue:t(y),"onUpdate:modelValue":e[3]||(e[3]=u=>N(y)?y.value=u:null),placeholder:"filename.md",autofocus:"",onKeyup:de(Q,["enter"])},null,8,["modelValue"])]),_:1})]),_:1},8,["open"]),l(z,{open:t(V),"onUpdate:open":e[8]||(e[8]=u=>N(V)?V.value=u:null)},{content:i(()=>[l(W,null,{header:i(()=>[n("div",at,[l(B,{name:"i-lucide-folder-plus",class:"size-5"}),e[19]||(e[19]=n("span",{class:"font-semibold"},"New Folder",-1))])]),footer:i(()=>[n("div",lt,[l(R,{color:"neutral",variant:"ghost",onClick:e[7]||(e[7]=u=>V.value=!1)},{default:i(()=>[...e[20]||(e[20]=[O(" Cancel ",-1)])]),_:1}),l(R,{onClick:D},{default:i(()=>[...e[21]||(e[21]=[O(" Create ",-1)])]),_:1})])]),default:i(()=>[l(K,{modelValue:t(y),"onUpdate:modelValue":e[6]||(e[6]=u=>N(y)?y.value=u:null),placeholder:"folder-name",autofocus:"",onKeyup:de(D,["enter"])},null,8,["modelValue"])]),_:1})]),_:1},8,["open"]),l(z,{open:t(E),"onUpdate:open":e[11]||(e[11]=u=>N(E)?E.value=u:null)},{content:i(()=>[l(W,null,{header:i(()=>[n("div",ot,[l(B,{name:"i-lucide-pencil",class:"size-5"}),e[22]||(e[22]=n("span",{class:"font-semibold"},"Rename",-1))])]),footer:i(()=>[n("div",nt,[l(R,{color:"neutral",variant:"ghost",onClick:e[10]||(e[10]=u=>E.value=!1)},{default:i(()=>[...e[23]||(e[23]=[O(" Cancel ",-1)])]),_:1}),l(R,{onClick:x},{default:i(()=>[...e[24]||(e[24]=[O(" Rename ",-1)])]),_:1})])]),default:i(()=>[l(K,{modelValue:t(y),"onUpdate:modelValue":e[9]||(e[9]=u=>N(y)?y.value=u:null),placeholder:"new-name",autofocus:"",onKeyup:de(x,["enter"])},null,8,["modelValue"])]),_:1})]),_:1},8,["open"]),l(z,{open:t(P),"onUpdate:open":e[13]||(e[13]=u=>N(P)?P.value=u:null)},{content:i(()=>[l(W,null,{header:i(()=>[n("div",it,[l(B,{name:"i-lucide-trash-2",class:"size-5"}),e[25]||(e[25]=n("span",{class:"font-semibold"},"Delete",-1))])]),footer:i(()=>[n("div",dt,[l(R,{color:"neutral",variant:"ghost",onClick:e[12]||(e[12]=u=>P.value=!1)},{default:i(()=>[...e[28]||(e[28]=[O(" Cancel ",-1)])]),_:1}),l(R,{color:"error",onClick:H},{default:i(()=>[...e[29]||(e[29]=[O(" Delete ",-1)])]),_:1})])]),default:i(()=>[n("p",null,[e[26]||(e[26]=O(" Are you sure you want to delete ",-1)),n("strong",null,X(t(f)?.label),1),e[27]||(e[27]=O("? ",-1))]),t(f)?.type==="directory"?(k(),L("p",st," This will delete all files and folders inside. ")):J("",!0)]),_:1})]),_:1},8,["open"])])}}}),ut=Object.assign(rt,{__name:"FilesFileTree"}),ct={base:"hidden lg:flex",variants:{side:{left:"",right:""}}},mt={__name:"UDashboardSidebarCollapse",props:{color:{type:null,required:!1,default:"neutral"},variant:{type:null,required:!1,default:"ghost"},side:{type:String,required:!1,default:"left"},label:{type:String,required:!1},activeColor:{type:null,required:!1},activeVariant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},block:{type:Boolean,required:!1},loadingAuto:{type:Boolean,required:!1},onClick:{type:[Function,Array],required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1},as:{type:null,required:!1},type:{type:null,required:!1},disabled:{type:Boolean,required:!1},exactActiveClass:{type:String,required:!1},viewTransition:{type:Boolean,required:!1}},setup(d){const m=d,c=ye(he(m,"icon","side","class")),{t:_}=_e(),r=be(),{sidebarCollapsed:p,collapseSidebar:b}=Fe({sidebarCollapsed:h(!1),collapseSidebar:()=>{}}),v=j(()=>ue({extend:ue(ct),...r.ui?.dashboardSidebarCollapse||{}}));return(T,F)=>(k(),A(le,ge({...t(c),icon:m.icon||(t(p)?t(r).ui.icons.panelOpen:t(r).ui.icons.panelClose),"aria-label":t(p)?t(_)("dashboardSidebarCollapse.expand"):t(_)("dashboardSidebarCollapse.collapse"),...T.$attrs},{class:v.value({class:m.class,side:m.side}),onClick:F[0]||(F[0]=C=>t(b)?.(!t(p)))}),null,16,["class"]))}},pt={class:"border-b border-default px-4 py-3 bg-elevated/50"},ft={class:"flex flex-wrap items-start gap-3"},vt={class:"flex items-start gap-2 py-0.5"},yt={class:"min-w-0"},ht={class:"font-medium"},_t={class:"text-xs text-dimmed truncate"},bt=te({__name:"DocumentMetadata",props:{metadata:{},projects:{}},emits:["update:metadata"],setup(d,{emit:m}){const c=d,_=m,r=[{label:"Hidden",value:"hidden",icon:"i-lucide-lock",description:"Hidden behind authentication and never viewable by the public"},{label:"Private",value:"private",icon:"i-lucide-eye-off",description:"Viewable by anyone with the link, but will not be indexed by search engines"},{label:"Public",value:"public",icon:"i-lucide-eye",description:"Viewable to the public and indexed by search engines"}],p=j(()=>c.metadata.shared?c.metadata.shareType||"private":"hidden"),b=j(()=>r.find(g=>g.value===p.value)),v=j({get:()=>c.metadata.tags||[],set:g=>_("update:metadata",{tags:g})});function T(g){_("update:metadata",{projectId:g||void 0})}function F(g){g==="hidden"?_("update:metadata",{shared:!1,shareType:void 0}):_("update:metadata",{shared:!0,shareType:g})}const C=j(()=>[{label:"None",value:void 0},...c.projects.map(g=>({label:g.name,value:g.id}))]);return(g,M)=>{const w=Ie,$=Pe,q=ae,o=ze;return k(),L("div",pt,[n("div",ft,[l($,{label:"Project",class:"w-40"},{default:i(()=>[l(w,{"model-value":d.metadata.projectId,items:t(C),"value-key":"value",placeholder:"None",class:"w-full","search-input":!1,"onUpdate:modelValue":T},null,8,["model-value","items"])]),_:1}),l($,{label:"Visibility",class:"w-44"},{default:i(()=>[l(w,{"model-value":t(p),items:r,"value-key":"value",class:"w-full","search-input":!1,"onUpdate:modelValue":F},{leading:i(()=>[t(b)?(k(),A(q,{key:0,name:t(b).icon,class:"size-4 text-dimmed"},null,8,["name"])):J("",!0)]),item:i(({item:a})=>[n("div",vt,[l(q,{name:a.icon,class:"size-4 mt-0.5 shrink-0"},null,8,["name"]),n("div",yt,[n("div",ht,X(a.label),1),n("div",_t,X(a.description),1)])])]),_:1},8,["model-value"])]),_:1}),l($,{label:"Tags",class:"flex-1 min-w-48"},{default:i(()=>[l(o,{modelValue:t(v),"onUpdate:modelValue":M[0]||(M[0]=a=>N(v)?v.value=a:null),placeholder:"Add tags...",class:"w-full"},null,8,["modelValue"])]),_:1})])])}}}),gt=Object.assign(bt,{__name:"EditorDocumentMetadata"}),xt=Be(Ne),wt={class:"h-full flex flex-col"},kt={class:"border-b border-default py-2 flex items-center justify-between"},$t={class:"flex items-center gap-2 text-sm text-dimmed min-w-0"},Ct={class:"truncate"},Dt={key:0,class:"w-40"},St={class:"flex items-center gap-3"},Ut={key:0,class:"flex items-center gap-1 text-sm text-dimmed"},Tt={class:"space-y-4"},Ft={class:"flex items-center gap-3"},jt={class:"flex items-center gap-3"},Vt={class:"flex items-center gap-3"},qt=te({__name:"DocumentEditor",props:{document:{},body:{},metadata:{},filePath:{},saveStatus:{},isDirty:{type:Boolean},metadataDirty:{type:Boolean}},emits:["update:body","update:metadata","save"],async setup(d,{emit:m}){let c,_;const r=d,p=m,{data:b}=([c,_]=xe(()=>He("/api/projects","$c96-63t_ij")),c=await c,_(),c),v=j(()=>b.value?.data||[]),T=h(!0),{editorMode:F}=pe(),C=j({get:()=>F.value==="editor",set:D=>F.value=D?"editor":"code"}),g=j(()=>r.document.fileType==="markdown"||Le(r.filePath)),M=j(()=>Re(r.filePath)),w=j(()=>g.value),$=[[{kind:"heading",level:1,icon:"i-lucide-heading-1"},{kind:"heading",level:2,icon:"i-lucide-heading-2"},{kind:"heading",level:3,icon:"i-lucide-heading-3"}],[{kind:"mark",mark:"bold",icon:"i-lucide-bold"},{kind:"mark",mark:"italic",icon:"i-lucide-italic"},{kind:"mark",mark:"code",icon:"i-lucide-code"}],[{kind:"bulletList",icon:"i-lucide-list"},{kind:"orderedList",icon:"i-lucide-list-ordered"},{kind:"blockquote",icon:"i-lucide-quote"}],[{kind:"link",icon:"i-lucide-link"},{kind:"codeBlock",icon:"i-lucide-file-code"},{kind:"horizontalRule",icon:"i-lucide-minus"}],[{kind:"undo",icon:"i-lucide-undo"},{kind:"redo",icon:"i-lucide-redo"}]],q=j(()=>{switch(r.saveStatus){case"saving":return"i-lucide-loader-2";case"saved":return"i-lucide-check";case"error":return"i-lucide-alert-circle";default:return r.isDirty||r.metadataDirty?"i-lucide-circle-dot":null}}),o=j(()=>{switch(r.saveStatus){case"saving":return"Saving...";case"saved":return"Saved";case"error":return"Error saving";default:return r.isDirty||r.metadataDirty?"Unsaved changes":""}}),a=j(()=>r.body||void 0);function s(D){p("update:body",D)}function U(D){p("update:metadata",D)}function f(D){(D.metaKey||D.ctrlKey)&&D.key==="s"&&(D.preventDefault(),p("save"))}re(()=>window.addEventListener("keydown",f)),we(()=>window.removeEventListener("keydown",f));const I=ke(),V=j(()=>r.document?.id?`${window.location.origin}/view/${r.document.id}`:""),E=h(!1),P=h(!1);function y(){r.metadata.shared?ee():P.value=!0}const{copy:Y}=Ke();async function ee(){await Y(V.value)?(E.value=!0,I.add({title:"Link copied!",icon:"i-lucide-check",color:"success"}),setTimeout(()=>{E.value=!1},2e3)):I.add({title:"Failed to copy link",icon:"i-lucide-x",color:"error"})}function Q(D,x){p("update:metadata",{shared:D,shareType:x??void 0}),P.value=!1,D&&setTimeout(()=>ee(),100)}return(D,x)=>{const H=ae,S=qe,e=le,K=gt,oe=Me,B=Ee,ne=xt,ie=Ae,R=Oe,W=me;return k(),L("div",wt,[n("div",kt,[n("div",$t,[l(H,{name:"i-lucide-file-text",class:"size-4 shrink-0"}),n("span",Ct,X(d.filePath),1)]),t(w)?(k(),L("div",Dt,[l(S,{modelValue:t(C),"onUpdate:modelValue":x[0]||(x[0]=z=>N(C)?C.value=z:null),"unchecked-icon":"i-lucide-code","checked-icon":"i-lucide-pencil",label:t(C)?"Editor Mode":"Code Mode",ui:{base:"data-[state=unchecked]:bg-info",icon:"group-data-[state=unchecked]:text-info"}},null,8,["modelValue","label"])])):J("",!0),n("div",St,[l(e,{icon:t(E)?"i-lucide-check":"i-lucide-share",size:"xs",variant:"ghost",class:"rounded-full",onClick:y},null,8,["icon"]),l(e,{icon:t(T)?"i-lucide-panel-top-close":"i-lucide-panel-top-open",size:"xs",variant:"ghost",class:"rounded-full",onClick:x[1]||(x[1]=z=>T.value=!t(T))},null,8,["icon"]),t(q)?(k(),L("div",Ut,[l(H,{name:t(q),class:Z(["size-4",d.saveStatus==="saving"&&"animate-spin",d.saveStatus==="error"&&"text-error"])},null,8,["name","class"]),n("span",null,X(t(o)),1)])):J("",!0)])]),t(T)?(k(),A(K,{key:0,metadata:d.metadata,projects:t(v),"onUpdate:metadata":U},null,8,["metadata","projects"])):J("",!0),t(g)&&t(C)?(k(),A(B,{key:1,"model-value":t(a),"content-type":"markdown",placeholder:"Start writing...",class:"markdown-editor w-full min-h-64 flex-1","onUpdate:modelValue":s},{default:i(({editor:z})=>[l(oe,{editor:z,items:$,class:"border-b border-default"},null,8,["editor"])]),_:1},8,["model-value"])):(k(),A(R,{key:2},{fallback:i(()=>[l(ie,{class:"flex-1"})]),default:i(()=>[l(ne,{"model-value":d.body,language:t(M),class:"flex-1","onUpdate:modelValue":s},null,8,["model-value","language"])]),_:1})),l(W,{open:t(P),"onUpdate:open":x[5]||(x[5]=z=>N(P)?P.value=z:null),title:"Share Document",description:"Choose how you want to share this document"},{body:i(()=>[n("div",Tt,[n("div",{class:Z(["p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors",{"border-primary bg-elevated":!d.metadata.shared}]),onClick:x[2]||(x[2]=z=>Q(!1,null))},[n("div",Ft,[l(H,{name:"i-lucide-eye-off",class:"size-5 text-dimmed"}),x[6]||(x[6]=n("div",null,[n("div",{class:"font-medium"}," Hidden "),n("div",{class:"text-sm text-dimmed"}," Only you can view this document. Not accessible via link. ")],-1))])],2),n("div",{class:Z(["p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors",{"border-primary bg-elevated":d.metadata.shared&&d.metadata.shareType==="private"}]),onClick:x[3]||(x[3]=z=>Q(!0,"private"))},[n("div",jt,[l(H,{name:"i-lucide-link",class:"size-5 text-dimmed"}),x[7]||(x[7]=n("div",null,[n("div",{class:"font-medium"}," Private (Link Only) "),n("div",{class:"text-sm text-dimmed"}," Anyone with the link can view. Not indexed by search engines. ")],-1))])],2),n("div",{class:Z(["p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors",{"border-primary bg-elevated":d.metadata.shared&&d.metadata.shareType==="public"}]),onClick:x[4]||(x[4]=z=>Q(!0,"public"))},[n("div",Vt,[l(H,{name:"i-lucide-globe",class:"size-5 text-dimmed"}),x[8]||(x[8]=n("div",null,[n("div",{class:"font-medium"}," Public "),n("div",{class:"text-sm text-dimmed"}," Visible to everyone. Indexed by search engines. ")],-1))])],2)])]),_:1},8,["open"])])}}}),It=Object.assign(qt,{__name:"EditorDocumentEditor"});function Pt(){const d=h(null),m=h(null),c=h(""),_=h(null),r=h(!1),p=h("idle"),b=h(!1),v=h(!1),T=ce(async()=>{!d.value||!b.value||await w({body:c.value})},2e3),F=ce(async()=>{!d.value||!v.value||await w()},500);async function C(o){r.value=!0,_.value=o,b.value=!1,v.value=!1,p.value="idle";try{const a=await $fetch("/api/documents/by-path",{method:"POST",body:{path:o}});d.value=a.data.document,m.value=a.data.metadata,c.value=a.data.body||""}catch(a){console.error("Failed to load document:",a),d.value=null,m.value=null,c.value=""}finally{r.value=!1}}function g(o){c.value!==o&&(c.value=o,b.value=!0,T())}function M(o){m.value&&(m.value={...m.value,...o},v.value=!0,F())}async function w(o={}){if(d.value){p.value="saving";try{const a={...o};v.value&&m.value&&(a.title=m.value.title,a.tags=m.value.tags,a.projectId=m.value.projectId,a.shared=m.value.shared,a.shareType=m.value.shareType),b.value&&o.body===void 0&&(a.body=c.value);const s=await $fetch(`/api/documents/${d.value.id}`,{method:"PUT",body:a});d.value=s.data.document,m.value=s.data.metadata,c.value=s.data.body||"",b.value=!1,v.value=!1,p.value="saved",setTimeout(()=>{p.value==="saved"&&(p.value="idle")},2e3)}catch(a){console.error("Failed to save document:",a),p.value="error"}}}async function $(){!b.value&&!v.value||await w({body:c.value})}function q(){d.value=null,m.value=null,c.value="",_.value=null,b.value=!1,v.value=!1,p.value="idle"}return{document:d,metadata:m,body:c,filePath:_,loading:r,saveStatus:p,isDirty:b,metadataDirty:v,loadDocument:C,updateBody:g,updateMetadata:M,saveDocument:w,saveNow:$,closeDocument:q}}const zt={class:"flex flex-1 min-w-0"},Mt={key:0,class:"flex-1 flex items-center justify-center h-full"},Et={key:1,class:"flex-1 flex items-center justify-center h-full text-dimmed"},Bt={class:"text-center"},qa=te({__name:"docs",setup(d){const m=$e(),{document:c,metadata:_,body:r,filePath:p,loading:b,saveStatus:v,isDirty:T,metadataDirty:F,loadDocument:C,updateBody:g,updateMetadata:M,saveNow:w}=Pt(),{lastDocumentPath:$}=pe();async function q(o){await C(o),$.value=o}return re(async()=>{const o=m.query.path;o?(await C(o),$.value=o):$.value&&await C($.value)}),(o,a)=>{const s=ut,U=Ue,f=mt,I=je,V=le,E=Ve,P=Te,y=ae,Y=It;return k(),L("div",zt,[l(U,{id:"docs-filetree",collapsible:"",resizable:"","min-size":12,"default-size":16,"max-size":24,class:"hidden lg:flex"},{body:i(()=>[l(s,{class:"h-full",onSelect:q})]),_:1}),l(U,{id:"docs-editor",grow:"",ui:{body:"sm:py-0"}},{header:i(()=>[l(P,null,{title:i(()=>[l(f),a[0]||(a[0]=O(" Editor ",-1))]),right:i(()=>[l(I),l(E,null,{content:i(()=>[l(s,{class:"h-full",onSelect:q})]),default:i(()=>[l(V,{icon:"i-lucide-folder-tree",class:"block lg:hidden"})]),_:1})]),_:1})]),body:i(()=>[t(b)?(k(),L("div",Mt,[l(y,{name:"i-lucide-loader-2",class:"size-6 animate-spin text-dimmed"})])):t(p)?t(_)&&t(c)?(k(),A(Y,{key:t(p),document:t(c),body:t(r),metadata:t(_),"file-path":t(p),"save-status":t(v),"is-dirty":t(T),"metadata-dirty":t(F),class:"h-full","onUpdate:body":t(g),"onUpdate:metadata":t(M),onSave:t(w)},null,8,["document","body","metadata","file-path","save-status","is-dirty","metadata-dirty","onUpdate:body","onUpdate:metadata","onSave"])):J("",!0):(k(),L("div",Et,[n("div",Bt,[l(y,{name:"i-lucide-file-text",class:"size-32 mx-auto mb-4 opacity-50"}),a[1]||(a[1]=n("p",null,"Select a file to edit",-1))])]))]),_:1})])}}});export{qa as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a8 as l,a6 as s}from"./
|
|
1
|
+
import{a8 as l,a6 as s}from"./njnzCNrH.js";function t(r,i){return l(r)?!1:Array.isArray(r)?r.some(a=>s(a,i)):s(r,i)}export{t as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as J}from"./
|
|
1
|
+
import{_ as J}from"./yJ9vRvHj.js";import{_ as X,a as Y}from"./B0xuHXvN.js";import{_ as Z}from"./DmDPSvxi.js";import{_ as ee}from"./SfaNtyKS.js";import{_ as te}from"./CqFcWBkW.js";import{_ as oe}from"./DqzomZoo.js";import{e as u,ah as ae,c as ne,a as re,ag as le,f as S,q as se,G as k,T as l,S as a,C as c,al as w,R as _,ab as s,Q as U,ai as ce,aj as ie,_ as ue,W as me,ae as y,aV as de,aa as M,a9 as pe,aW as fe}from"./njnzCNrH.js";import{_ as _e}from"./DMb_1D81.js";import{_ as ye}from"./BxShcW0K.js";import{_ as he}from"./DZEuR9ms.js";import{f as ve}from"./CWePHsZr.js";import"./C-Ygk9x5.js";import"./BHn8tRjg.js";import"./vES4kgx7.js";import"./ImPsUDiH.js";import"./iBaivqi8.js";import"./D9aYkNhQ.js";import"./DLUvsixu.js";import"./CrmE-JGu.js";import"./BCCYopTB.js";import"./B9zgEO8N.js";import"./BIo-9u_O.js";import"./CXTrUfQ5.js";import"./C6Y-ieo6.js";import"./Bwn-CRYH.js";import"./BjnQ1pI1.js";import"./88opOQSr.js";import"./D2kQkOaG.js";import"./GYf-vnR6.js";import"./BZBNJD7U.js";import"./BYtVdUIW.js";import"./C8ut0f5H.js";function ge(){const m=u([]),d=u(!0),p=u(null),g=ae({query:"",chunkType:"all",limit:50});async function b(i){d.value=!0,p.value=null;const e={...g,...i};try{const o={};e.query&&(o.query=e.query),e.chunkType&&e.chunkType!=="all"&&(o.chunkType=e.chunkType),e.projectPath&&(o.projectPath=e.projectPath),e.limit&&(o.limit=String(e.limit));const f=await $fetch("/api/memory/search",{query:o});return m.value=f.data,f.data}catch(o){throw p.value="Failed to load memories",console.error("Failed to load memories:",o),o}finally{d.value=!1}}async function T(i){try{await $fetch(`/api/memory/${i}`,{method:"DELETE"}),m.value=m.value.filter(e=>e.id!==i)}catch(e){throw console.error("Failed to delete memory:",e),e}}const h=ne(()=>{const i=m.value.reduce((e,o)=>(e[o.chunkType]=(e[o.chunkType]||0)+1,e),{});return{total:m.value.length,byType:i}});return{memories:m,loading:d,error:p,filters:g,stats:h,fetchMemories:b,deleteMemory:T}}const be={class:"contents"},Te={class:"p-4"},xe={key:0,class:"space-y-3"},ke={key:1,class:"flex flex-col items-center justify-center h-64 text-neutral-500"},we=["title"],De={class:"flex items-center gap-2"},$e={class:"w-16 h-1.5 bg-neutral-200 dark:bg-neutral-700 rounded-full overflow-hidden"},Ce={class:"text-xs text-muted"},Se={class:"text-sm text-muted"},Ue={class:"text-sm text-muted"},D="__all__",ct=re({__name:"memories",setup(m){const d=le(),{memories:p,loading:g,filters:b,stats:T,fetchMemories:h,deleteMemory:i}=ge(),e=u(!1),o=u(null),f=u(!1),V=[{value:D,label:"All Types"},{value:"decision",label:"Decisions"},{value:"fact",label:"Facts"},{value:"solution",label:"Solutions"},{value:"pattern",label:"Patterns"},{value:"preference",label:"Preferences"},{value:"summary",label:"Summaries"}],x=u(D),v=u("");S(x,n=>{b.chunkType=n===D?"all":n,h()});const F=fe(()=>{b.query=v.value||void 0,h()},300);S(v,F);function q(n){o.value=n,e.value=!0}async function A(){if(o.value){f.value=!0;try{await i(o.value),d.add({title:"Memory deleted",color:"success"}),e.value=!1}catch{d.add({title:"Failed to delete memory",color:"error"})}finally{f.value=!1,o.value=null}}}function N(n){switch(n){case"decision":return"primary";case"fact":return"info";case"solution":return"success";case"pattern":return"warning";case"preference":return"neutral";case"summary":return"neutral";default:return"neutral"}}function B(n){switch(n){case"decision":return"i-lucide-git-branch";case"fact":return"i-lucide-info";case"solution":return"i-lucide-check-circle";case"pattern":return"i-lucide-repeat";case"preference":return"i-lucide-settings";case"summary":return"i-lucide-file-text";default:return"i-lucide-circle"}}function K(n){return ve(new Date(n),{addSuffix:!0})}const L=[{accessorKey:"chunkType",header:"Type"},{accessorKey:"content",header:"Content"},{accessorKey:"relevanceScore",header:"Relevance"},{accessorKey:"accessCount",header:"Accessed"},{accessorKey:"createdAt",header:"Created"},{accessorKey:"actions",header:""}];function P(n){return[[{label:"Delete",icon:"i-lucide-trash-2",color:"error",onSelect:()=>q(n)}]]}return se(()=>{h()}),(n,r)=>{const $=J,j=Y,E=Z,z=ee,I=te,R=oe,C=ue,Q=me,W=_e,G=ye,O=X,H=he;return _(),k("div",be,[l(O,{id:"memories",grow:""},{header:a(()=>[l(j,{title:"Memories"},{leading:a(()=>[c(T).total>0?(_(),U($,{key:0,color:"neutral",variant:"subtle",class:"ml-2"},{default:a(()=>[M(y(c(T).total),1)]),_:1})):pe("",!0)]),_:1}),l(I,null,{left:a(()=>[l(E,{modelValue:c(x),"onUpdate:modelValue":r[0]||(r[0]=t=>w(x)?x.value=t:null),items:V,"value-key":"value",class:"w-40"},null,8,["modelValue"])]),right:a(()=>[l(z,{modelValue:c(v),"onUpdate:modelValue":r[1]||(r[1]=t=>w(v)?v.value=t:null),placeholder:"Search memories...",icon:"i-lucide-search",class:"w-64"},null,8,["modelValue"])]),_:1})]),body:a(()=>[s("div",Te,[c(g)?(_(),k("div",xe,[(_(),k(ce,null,ie(10,t=>l(R,{key:t,class:"h-12 w-full"})),64))])):c(p).length===0?(_(),k("div",ke,[l(C,{name:"i-lucide-brain",class:"w-12 h-12 mb-4"}),r[4]||(r[4]=s("p",{class:"text-lg font-medium"}," No memories yet ",-1)),r[5]||(r[5]=s("p",{class:"text-sm text-center max-w-md mt-2"}," Memories are automatically extracted from your Claude conversations. They will appear here once extraction hooks are triggered. ",-1))])):(_(),U(G,{key:2,data:c(p),columns:L},{"chunkType-cell":a(({row:t})=>[l($,{color:N(t.original.chunkType),variant:"subtle",size:"sm"},{default:a(()=>[l(C,{name:B(t.original.chunkType),class:"w-3 h-3 mr-1"},null,8,["name"]),M(" "+y(t.original.chunkType),1)]),_:2},1032,["color"])]),"content-cell":a(({row:t})=>[s("span",{class:"text-sm line-clamp-2",title:t.original.content},y(t.original.content),9,we)]),"relevanceScore-cell":a(({row:t})=>[s("div",De,[s("div",$e,[s("div",{class:"h-full bg-primary-500 rounded-full",style:de({width:`${t.original.relevanceScore*100}%`})},null,4)]),s("span",Ce,y((t.original.relevanceScore*100).toFixed(0))+"% ",1)])]),"accessCount-cell":a(({row:t})=>[s("span",Se,y(t.original.accessCount)+"x ",1)]),"createdAt-cell":a(({row:t})=>[s("span",Ue,y(K(t.original.createdAt)),1)]),"actions-cell":a(({row:t})=>[l(W,{items:P(t.original.id)},{default:a(()=>[l(Q,{icon:"i-lucide-more-horizontal",color:"neutral",variant:"ghost",size:"xs"})]),_:1},8,["items"])]),_:1},8,["data"]))])]),_:1}),l(H,{open:c(e),"onUpdate:open":r[2]||(r[2]=t=>w(e)?e.value=t:null),title:"Delete Memory",description:"Are you sure you want to delete this memory? This action cannot be undone.","confirm-label":"Delete","confirm-color":"error",icon:"i-lucide-trash-2",loading:c(f),onConfirm:A,onCancel:r[3]||(r[3]=t=>o.value=null)},null,8,["open","loading"])])}}});export{ct as default};
|