studiograph 1.3.48-next.210 → 1.3.48-next.211

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/core/embeds.js +16 -7
  2. package/dist/core/embeds.js.map +1 -1
  3. package/dist/web/_app/immutable/chunks/{D4UrtGC1.js → 2f1VclTm.js} +1 -1
  4. package/dist/web/_app/immutable/chunks/{D3F675fu2.js → 4xgUPoGj2.js} +2 -2
  5. package/dist/web/_app/immutable/chunks/{BrveeylZ.js → 5CYQk4xR.js} +1 -1
  6. package/dist/web/_app/immutable/chunks/{ON7Gta0d.js → B5Rb52QU.js} +1 -1
  7. package/dist/web/_app/immutable/chunks/{CQyBDccA.js → B6O-q2CN.js} +1 -1
  8. package/dist/web/_app/immutable/chunks/{DRPnwQAm.js → BB-RSeXQ.js} +1 -1
  9. package/dist/web/_app/immutable/chunks/{Cg-ND0cl.js → BGdzd-Tc.js} +1 -1
  10. package/dist/web/_app/immutable/chunks/{CK4z74w5.js → BT2C6q8n.js} +1 -1
  11. package/dist/web/_app/immutable/chunks/{CE1XZ5DE.js → BUesbLq2.js} +1 -1
  12. package/dist/web/_app/immutable/chunks/{7xJ91z7d.js → BUrnwOw4.js} +2 -2
  13. package/dist/web/_app/immutable/chunks/{3anKjXOb.js → BVCJtXyc.js} +1 -1
  14. package/dist/web/_app/immutable/chunks/{CkoeSJ8K.js → BY9a3GSt.js} +2 -2
  15. package/dist/web/_app/immutable/chunks/{nXReuy-5.js → BbsX1Slr.js} +3 -3
  16. package/dist/web/_app/immutable/chunks/{B-TGZnCt2.js → BcwjqHaZ2.js} +1 -1
  17. package/dist/web/_app/immutable/chunks/{BdWZJpmv.js → BizeEpTx.js} +2 -2
  18. package/dist/web/_app/immutable/chunks/{DE2TCESD2.js → BocSRgv12.js} +1 -1
  19. package/dist/web/_app/immutable/chunks/{Bxk27YWG.js → BojBYqc3.js} +1 -1
  20. package/dist/web/_app/immutable/chunks/{BF0vIqH9.js → BqvnBg_y.js} +1 -1
  21. package/dist/web/_app/immutable/chunks/{B4DG5QOL.js → BsT0J1QD.js} +1 -1
  22. package/dist/web/_app/immutable/chunks/{RG7IUVLn2.js → Bua97Had2.js} +1 -1
  23. package/dist/web/_app/immutable/chunks/{DdQVGKgM.js → CBQjdDZf.js} +1 -1
  24. package/dist/web/_app/immutable/chunks/{DiFfW--R2.js → CDeazMFW2.js} +2 -2
  25. package/dist/web/_app/immutable/chunks/{BFp1K70l.js → CGjVCd0e.js} +4 -4
  26. package/dist/web/_app/immutable/chunks/{Cp87MaaW.js → CICK9maP.js} +1 -1
  27. package/dist/web/_app/immutable/chunks/{o61aZZFZ2.js → CYyIP7kP2.js} +1 -1
  28. package/dist/web/_app/immutable/chunks/{BfnFtsiY.js → CcI9jYBV.js} +1 -1
  29. package/dist/web/_app/immutable/chunks/{CjiMLTwX2.js → CmSSN61R2.js} +1 -1
  30. package/dist/web/_app/immutable/chunks/CwAmWt6h.js +1 -0
  31. package/dist/web/_app/immutable/chunks/{CV5OSCJc.js → CwP3Oa7F.js} +1 -1
  32. package/dist/web/_app/immutable/chunks/{BFx32D20.js → CyTluew1.js} +2 -2
  33. package/dist/web/_app/immutable/chunks/{C70saxIl.js → D0IAituJ.js} +1 -1
  34. package/dist/web/_app/immutable/chunks/{B9VRF5aH2.js → DD9wj4ca2.js} +1 -1
  35. package/dist/web/_app/immutable/chunks/{DXmfl4Hq2.js → DJ1YeiJL2.js} +1 -1
  36. package/dist/web/_app/immutable/chunks/{BmgXvmIG.js → DKFZnpVC.js} +1 -1
  37. package/dist/web/_app/immutable/chunks/{Cuq8J2Td.js → DKJl40hl.js} +1 -1
  38. package/dist/web/_app/immutable/chunks/{D1BLcNJ7.js → DZcTwXBW.js} +1 -1
  39. package/dist/web/_app/immutable/chunks/{golz20La2.js → DdPO8kRu2.js} +1 -1
  40. package/dist/web/_app/immutable/chunks/{DN-gIRdd2.js → DeOXyJZw2.js} +1 -1
  41. package/dist/web/_app/immutable/chunks/{Ct1uesdW.js → DfufUFR1.js} +1 -1
  42. package/dist/web/_app/immutable/chunks/{COo3HgCZ.js → DiQg3ing.js} +1 -1
  43. package/dist/web/_app/immutable/chunks/{DsFEd8vL2.js → DkJ1dkxV2.js} +1 -1
  44. package/dist/web/_app/immutable/chunks/{B_PyL87x.js → DpVNDHXz.js} +2 -2
  45. package/dist/web/_app/immutable/chunks/{BFr7Funh.js → Dv3A3Wcj.js} +1 -1
  46. package/dist/web/_app/immutable/chunks/{CGkd0a-c2.js → KZY6ongq2.js} +2 -2
  47. package/dist/web/_app/immutable/chunks/{C4PZmGUQ.js → VsBngTf4.js} +2 -2
  48. package/dist/web/_app/immutable/chunks/{DPcejqKZ.js → hStvCHkX.js} +1 -1
  49. package/dist/web/_app/immutable/chunks/{C3F_NMTk.js → iJVY9p0y.js} +1 -1
  50. package/dist/web/_app/immutable/chunks/{Xkp5hSA1.js → pIXNe0C1.js} +1 -1
  51. package/dist/web/_app/immutable/chunks/{BRvMjAzW.js → pNSRq_1B.js} +2 -2
  52. package/dist/web/_app/immutable/chunks/{SnzlL4ZV.js → sg-T-FoN.js} +1 -1
  53. package/dist/web/_app/immutable/chunks/{DRPMJ-3M.js → ulshNz6x.js} +1 -1
  54. package/dist/web/_app/immutable/entry/{app.dqA31fjy.js → app.pNUW-q4U.js} +2 -2
  55. package/dist/web/_app/immutable/entry/start.DxGtIGG_.js +1 -0
  56. package/dist/web/_app/immutable/nodes/{0.dALEQAnu.js → 0.D6ZCY_R6.js} +2 -2
  57. package/dist/web/_app/immutable/nodes/{1.aFU32Ukj.js → 1.BryH3TNr.js} +1 -1
  58. package/dist/web/_app/immutable/nodes/{10.C2wB-OnW.js → 10.CMZMvR17.js} +1 -1
  59. package/dist/web/_app/immutable/nodes/{11.CI3a8Rj5.js → 11.QHx_JShx.js} +1 -1
  60. package/dist/web/_app/immutable/nodes/{12.CsTvsKzB.js → 12.CiRWbb4X.js} +1 -1
  61. package/dist/web/_app/immutable/nodes/{14.B31HrQ26.js → 14.K18eIE5Z.js} +1 -1
  62. package/dist/web/_app/immutable/nodes/{16.DAP8cwVb.js → 16.Dn6iuWIo.js} +1 -1
  63. package/dist/web/_app/immutable/nodes/{17.CmwXtCDY.js → 17.viwS7vTR.js} +1 -1
  64. package/dist/web/_app/immutable/nodes/{2.BuGXEIlN.js → 2.BQkQ_uUM.js} +4 -4
  65. package/dist/web/_app/immutable/nodes/{3.CmhZJWHE.js → 3.B4pqXsqq.js} +3 -3
  66. package/dist/web/_app/immutable/nodes/{4.BRfoPTm-.js → 4.CKXEgIAP.js} +3 -3
  67. package/dist/web/_app/immutable/nodes/{5.C7gPuZM_.js → 5.A2TASl4Q.js} +1 -1
  68. package/dist/web/_app/immutable/nodes/{6.qKODVbya.js → 6.DaIRO3SI.js} +2 -2
  69. package/dist/web/_app/immutable/nodes/{7.BZO37zAJ.js → 7.ga2UvFm-.js} +1 -1
  70. package/dist/web/_app/immutable/nodes/{8.xF_Dd1BO.js → 8.BTEWT81u.js} +1 -1
  71. package/dist/web/_app/immutable/nodes/{9.Bow4UyKV.js → 9.BVxo0E0c.js} +1 -1
  72. package/dist/web/_app/version.json +1 -1
  73. package/dist/web/index.html +13 -13
  74. package/package.json +1 -1
  75. package/dist/web/_app/immutable/chunks/C6wYiSz8.js +0 -1
  76. package/dist/web/_app/immutable/entry/start.BB1XrAea.js +0 -1
@@ -1 +1 @@
1
- import{$ as e,Ct as t,F as n,H as r,L as i,N as a,Nt as o,O as s,Pt as c,R as l,V as u,Vt as d,Wt as f,X as p,bt as m,ct as h,ft as g,g as _,ht as v,o as y,ot as b,pt as x,r as S,s as C,st as w,vt as T,z as E}from"./xY0c-UfG.js";import"./xihTtKlq.js";import{$ as D,At as O,Dt as ee,G as k,Nt as A,Ot as te,Q as ne,S as re,St as ie,T as ae,U as oe,X as se,Z as ce,a as le,bt as ue,dt as j,ft as de,kt as M,mt as fe,rt as pe,ut as N,vt as P,yt as me,z as F}from"./BmgXvmIG.js";import{V as he}from"./3anKjXOb.js";function ge(e,t){return e-t*Math.floor(e/t)}var _e=1721426;function ve(e,t,n,r){t=be(e,t);let i=t-1,a=-2;return n<=2?a=0:ye(t)&&(a=-1),_e-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function ye(e){return e%4==0&&(e%100!=0||e%400==0)}function be(e,t){return e===`BC`?1-t:t}function xe(e){let t=`AD`;return e<=0&&(t=`BC`,e=1-e),[t,e]}var Se={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},I=class{fromJulianDay(e){let t=e,n=t-_e,r=Math.floor(n/146097),i=ge(n,146097),a=Math.floor(i/36524),o=ge(i,36524),s=Math.floor(o/1461),c=ge(o,1461),l=Math.floor(c/365),[u,d]=xe(r*400+a*100+s*4+l+ +(a!==4&&l!==4)),f=t-ve(u,d,1,1),p=2;t<ve(u,d,3,1)?p=0:ye(d)&&(p=1);let m=Math.floor(((f+p)*12+373)/367);return new q(u,d,m,t-ve(u,d,m,1)+1)}toJulianDay(e){return ve(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return Se[ye(e.year)?`leapyear`:`standard`][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return ye(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return[`BC`,`AD`]}isInverseEra(e){return e.era===`BC`}balanceDate(e){e.year<=0&&(e.era=e.era===`BC`?`AD`:`BC`,e.year=1-e.year)}constructor(){this.identifier=`gregory`}},Ce={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function L(e,t){return t=U(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function we(e,t){return t=U(t,e.calendar),e=Le(e),t=Le(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function Te(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function Ee(e,t){return L(e,Ae(t))}var De={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Oe(e,t,n){let r=e.calendar.toJulianDay(e),i=n?De[n]:He(t),a=Math.ceil(r+1-i)%7;return a<0&&(a+=7),a}function ke(e){return V(Date.now(),e)}function Ae(e){return Qe(ke(e))}function je(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Me(e,t){return Ne(e)-Ne(t)}function Ne(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var Pe=null,Fe=!1;function R(){return Pe??=new Intl.DateTimeFormat().resolvedOptions().timeZone,Pe}function Ie(){return Fe}function Le(e){return e.subtract({days:e.day-1})}function Re(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var ze=new Map,Be=new Map;function Ve(e){if(Intl.Locale){let t=ze.get(e);return t||(t=new Intl.Locale(e).maximize().region,t&&ze.set(e,t)),t}let t=e.split(`-`)[1];return t===`u`?void 0:t}function He(e){let t=Be.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if(`getWeekInfo`in n&&(t=n.getWeekInfo(),t))return Be.set(e,t),t.firstDay}let n=Ve(e);if(e.includes(`-fw-`)){let n=e.split(`-fw-`)[1].split(`-`)[0];t=n===`mon`?{firstDay:1}:n===`tue`?{firstDay:2}:n===`wed`?{firstDay:3}:n===`thu`?{firstDay:4}:n===`fri`?{firstDay:5}:n===`sat`?{firstDay:6}:{firstDay:0}}else t=e.includes(`-ca-iso8601`)?{firstDay:1}:{firstDay:n&&Ce[n]||0};Be.set(e,t)}return t.firstDay}function z(e){return e=U(e,new I),Ue(be(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Ue(e,t,n,r,i,a,o){let s=new Date;return s.setUTCHours(r,i,a,o),s.setUTCFullYear(e,t-1,n),s.getTime()}function We(e,t){if(t===`UTC`)return 0;if(e>0&&t===R()&&!Ie())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:o,second:s}=Ke(e,t);return Ue(n,r,i,a,o,s,0)-Math.floor(e/1e3)*1e3}var Ge=new Map;function Ke(e,t){let n=Ge.get(t);n||(n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,hour12:!1,era:`short`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),Ge.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let e of r)e.type!==`literal`&&(i[e.type]=e.value);return{year:i.era===`BC`||i.era===`B`?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour===`24`?0:+i.hour,minute:+i.minute,second:+i.second}}var qe=864e5;function Je(e,t){let n=z(e);return Ye(e,t,n-We(n-qe,t),n-We(n+qe,t))}function Ye(e,t,n,r){return(n===r?[n]:[n,r]).filter(n=>Xe(e,t,n))}function Xe(e,t,n){let r=Ke(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function B(e,t,n=`compatible`){let r=H(e);if(t===`UTC`)return z(r);if(t===R()&&n===`compatible`&&!Ie()){r=U(r,new I);let e=new Date,t=be(r.era,r.year);return e.setFullYear(t,r.month-1,r.day),e.setHours(r.hour,r.minute,r.second,r.millisecond),e.getTime()}let i=z(r),a=We(i-qe,t),o=We(i+qe,t),s=Ye(r,t,i-a,i-o);if(s.length===1)return s[0];if(s.length>1)switch(n){case`compatible`:case`earlier`:return s[0];case`later`:return s[s.length-1];case`reject`:throw RangeError(`Multiple possible absolute times found`)}switch(n){case`earlier`:return Math.min(i-a,i-o);case`compatible`:case`later`:return Math.max(i-a,i-o);case`reject`:throw RangeError(`No such absolute time found`)}}function Ze(e,t,n=`compatible`){return new Date(B(e,t,n))}function V(e,t){let n=We(e,t),r=new Date(e+n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,o=r.getUTCDate(),s=r.getUTCHours(),c=r.getUTCMinutes(),l=r.getUTCSeconds(),u=r.getUTCMilliseconds();return new Y(i<1?`BC`:`AD`,i<1?-i+1:i,a,o,t,n,s,c,l,u)}function Qe(e){return new q(e.calendar,e.era,e.year,e.month,e.day)}function H(e,t){let n=0,r=0,i=0,a=0;if(`timeZone`in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if(`hour`in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new J(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function U(e,t){if(Te(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,W(r),r}function $e(e,t,n){return e instanceof Y?e.timeZone===t?e:tt(e,t):V(B(e,t,n),t)}function et(e){let t=z(e)-e.offset;return new Date(t)}function tt(e,t){return U(V(z(e)-e.offset,t),e.calendar)}var nt=36e5;function rt(e,t){let n=e.copy(),r=`hour`in n?ht(n,t):0;it(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,at(n),st(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,ot(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){let e=n.calendar.isInverseEra?.(n);n.year=i,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let a=n.calendar.getMonthsInYear(n);return n.month>a&&(n.month=a,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function it(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function at(e){for(;e.month<1;)it(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,it(e,1)}function ot(e){for(;e.day<1;)e.month--,at(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,at(e)}function st(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function W(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),st(e)}function ct(e){let t={};for(let n in e)typeof e[n]==`number`&&(t[n]=-e[n]);return t}function lt(e,t){return rt(e,ct(t))}function ut(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),W(n),n}function dt(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),pt(n),n}function ft(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=mt(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=mt(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=mt(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=mt(e.hour,24),t}function pt(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function mt(e,t){let n=e%t;return n<0&&(n+=t),n}function ht(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,ft(e)}function gt(e,t,n,r){let i=e.copy();switch(t){case`era`:{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error(`Invalid era: `+e.era);a=G(a,n,0,t.length-1,r?.round),i.era=t[a],W(i);break}case`year`:i.calendar.isInverseEra?.(i)&&(n=-n),i.year=G(e.year,n,-1/0,9999,r?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case`month`:i.month=G(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case`day`:i.day=G(e.day,n,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw Error(`Unsupported field `+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),W(i),i}function _t(e,t,n,r){let i=e.copy();switch(t){case`hour`:{let t=e.hour,a=0,o=23;if(r?.hourCycle===12){let e=t>=12;a=e?12:0,o=e?23:11}i.hour=G(t,n,a,o,r?.round);break}case`minute`:i.minute=G(e.minute,n,0,59,r?.round);break;case`second`:i.second=G(e.second,n,0,59,r?.round);break;case`millisecond`:i.millisecond=G(e.millisecond,n,0,999,r?.round);break;default:throw Error(`Unsupported field `+t)}return i}function G(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e<n&&(e=r);let i=Math.abs(t);e=t>0?Math.ceil(e/i)*i:Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,e<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function vt(e,t){let n;return n=t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0?B(rt(H(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):z(e)-e.offset,n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5,U(V(n,e.timeZone),e.calendar)}function yt(e,t){return vt(e,ct(t))}function bt(e,t,n,r){switch(t){case`hour`:{let t=0,i=23;if(r?.hourCycle===12){let n=e.hour>=12;t=n?12:0,i=n?23:11}let a=H(e),o=U(dt(a,{hour:t}),new I),s=[B(o,e.timeZone,`earlier`),B(o,e.timeZone,`later`)].filter(t=>V(t,e.timeZone).day===o.day)[0],c=U(dt(a,{hour:i}),new I),l=[B(c,e.timeZone,`earlier`),B(c,e.timeZone,`later`)].filter(t=>V(t,e.timeZone).day===c.day).pop(),u=z(e)-e.offset,d=Math.floor(u/nt),f=u%nt;return u=G(d,n,Math.floor(s/nt),Math.floor(l/nt),r?.round)*nt+f,U(V(u,e.timeZone),e.calendar)}case`minute`:case`second`:case`millisecond`:return _t(e,t,n,r);case`era`:case`year`:case`month`:case`day`:return U(V(B(gt(H(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error(`Unsupported field `+t)}}function xt(e,t,n){let r=H(e),i=dt(ut(r,t),t);return i.compare(r)===0?e:U(V(B(i,e.timeZone,n),e.timeZone),e.calendar)}var St=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,Ct=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,wt=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,Tt=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function Et(e){let t=e.match(St);if(!t)throw Tt.test(e)?Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):Error(`Invalid ISO 8601 date string: `+e);let n=new q(K(t[1],0,9999),K(t[2],1,12),1);return n.day=K(t[3],1,n.calendar.getDaysInMonth(n)),n}function Dt(e){let t=e.match(Ct);if(!t)throw Tt.test(e)?Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):Error(`Invalid ISO 8601 date time string: `+e);let n=K(t[1],-9999,9999),r=new J(n<1?`BC`:`AD`,n<1?-n+1:n,K(t[2],1,12),1,t[4]?K(t[4],0,23):0,t[5]?K(t[5],0,59):0,t[6]?K(t[6],0,59):0,t[7]?K(t[7],0,1/0)*1e3:0);return r.day=K(t[3],0,r.calendar.getDaysInMonth(r)),r}function Ot(e,t){let n=e.match(wt);if(!n)throw Error(`Invalid ISO 8601 date time string: `+e);let r=K(n[1],-9999,9999),i=new Y(r<1?`BC`:`AD`,r<1?-r+1:r,K(n[2],1,12),1,n[11],0,n[4]?K(n[4],0,23):0,n[5]?K(n[5],0,59):0,n[6]?K(n[6],0,59):0,n[7]?K(n[7],0,1/0)*1e3:0);i.day=K(n[3],0,i.calendar.getDaysInMonth(i));let a=H(i),o;if(n[8]){let e=K(n[8],-23,23);if(i.offset=Math.sign(e)*(Math.abs(e)*36e5+K(n[9]??`0`,0,59)*6e4+K(n[10]??`0`,0,59)*1e3),o=z(i)-i.offset,!Je(a,i.timeZone).includes(o))throw Error(`Offset ${Mt(i.offset)} is invalid for ${jt(i)} in ${i.timeZone}`)}else o=B(H(a),i.timeZone,t);return V(o,i.timeZone)}function K(e,t,n){let r=Number(e);if(r<t||r>n)throw RangeError(`Value out of range: ${t} <= ${r} <= ${n}`);return r}function kt(e){return`${String(e.hour).padStart(2,`0`)}:${String(e.minute).padStart(2,`0`)}:${String(e.second).padStart(2,`0`)}${e.millisecond?String(e.millisecond/1e3).slice(1):``}`}function At(e){let t=U(e,new I),n;return n=t.era===`BC`?t.year===1?`0000`:`-`+String(Math.abs(1-t.year)).padStart(6,`00`):String(t.year).padStart(4,`0`),`${n}-${String(t.month).padStart(2,`0`)}-${String(t.day).padStart(2,`0`)}`}function jt(e){return`${At(e)}T${kt(e)}`}function Mt(e){let t=Math.sign(e)<0?`-`:`+`;e=Math.abs(e);let n=Math.floor(e/36e5),r=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),a=`${t}${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`;return i!==0&&(a+=`:${String(i).padStart(2,`0`)}`),a}function Nt(e){return`${jt(e)}${Mt(e.offset)}[${e.timeZone}]`}function Pt(e){let t=typeof e[0]==`object`?e.shift():new I,n;if(typeof e[0]==`string`)n=e.shift();else{let e=t.getEras();n=e[e.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var q=class e{constructor(...e){let[t,n,r,i,a]=Pt(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,W(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day):new e(this.calendar,this.year,this.month,this.day)}add(e){return rt(this,e)}subtract(e){return lt(this,e)}set(e){return ut(this,e)}cycle(e,t,n){return gt(this,e,t,n)}toDate(e){return Ze(this,e)}toString(){return At(this)}compare(e){return je(this,e)}},J=class e{constructor(...e){let[t,n,r,i,a]=Pt(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,W(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return rt(this,e)}subtract(e){return lt(this,e)}set(e){return ut(dt(this,e),e)}cycle(e,t,n){switch(e){case`era`:case`year`:case`month`:case`day`:return gt(this,e,t,n);default:return _t(this,e,t,n)}}toDate(e,t){return Ze(this,e,t)}toString(){return jt(this)}compare(e){let t=je(this,e);return t===0?Me(this,H(e)):t}},Y=class e{constructor(...e){let[t,n,r,i,a]=Pt(e),o=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.timeZone=o,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,W(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return vt(this,e)}subtract(e){return yt(this,e)}set(e,t){return xt(this,e,t)}cycle(e,t,n){return bt(this,e,t,n)}toDate(){return et(this)}toString(){return Nt(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-$e(e,this.timeZone).toDate().getTime()}},Ft=new Map,X=class{constructor(e,t={}){this.formatter=Lt(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange==`function`)return this.formatter.formatRange(e,t);if(t<e)throw RangeError(`End date must be >= start date`);return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts==`function`)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError(`End date must be >= start date`);let n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return Vt()&&(this.resolvedHourCycle||=Ht(e.locale,this.options),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle===`h11`||this.resolvedHourCycle===`h12`),e.calendar===`ethiopic-amete-alem`&&(e.calendar=`ethioaa`),e}},It={true:{ja:`h11`},false:{}};function Lt(e,t={}){if(typeof t.hour12==`boolean`&&zt()){t={...t};let n=It[String(t.hour12)][e.split(`-`)[0]],r=t.hour12?`h12`:`h23`;t.hourCycle=n??r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(Ft.has(n))return Ft.get(n);let r=new Intl.DateTimeFormat(e,t);return Ft.set(n,r),r}var Rt=null;function zt(){return Rt??=new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,hour12:!1}).format(new Date(2020,2,3,0))===`24`,Rt}var Bt=null;function Vt(){return Bt??=new Intl.DateTimeFormat(`fr`,{hour:`numeric`,hour12:!1}).resolvedOptions().hourCycle===`h12`,Bt}function Ht(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,``),e+=(e.includes(`-u-`)?``:`-u`)+`-nu-latn`;let n=Lt(e,{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(e=>e.type===`hour`).value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>e.type===`hour`).value,10);if(r===0&&i===23)return`h23`;if(r===24&&i===23)return`h24`;if(r===0&&i===11)return`h11`;if(r===12&&i===11)return`h12`;throw Error(`Unexpected hour cycle result`)}function Ut(e){if(!oe||!e)return null;let t=e.querySelector(`[data-bits-announcer]`),n=t=>{let n=e.createElement(`div`);return n.role=`log`,n.ariaLive=t,n.setAttribute(`aria-relevant`,`additions`),n};if(!k(t)){let r=e.createElement(`div`);r.style.cssText=he,r.setAttribute(`data-bits-announcer`,``),r.appendChild(n(`assertive`)),r.appendChild(n(`polite`)),t=r,e.body.insertBefore(t,e.body.firstChild)}return{getLog:e=>{if(!k(t))return null;let n=t.querySelector(`[aria-live="${e}"]`);return k(n)?n:null}}}function Wt(e){let t=Ut(e);function n(n,r=`assertive`,i=7500){if(!t||!oe||!e)return;let a=t.getLog(r),o=e.createElement(`div`);return n=typeof n==`number`?n.toString():n===null?`Empty`:n.trim(),o.innerText=n,r===`assertive`?a?.replaceChildren(o):a?.appendChild(o),setTimeout(()=>{o.remove()},i)}return{announce:n}}var Gt={defaultValue:void 0,granularity:`day`};function Kt(e){let{defaultValue:t,granularity:n,minValue:r,maxValue:i}={...Gt,...e};if(Array.isArray(t)&&t.length)return t[t.length-1];if(t&&!Array.isArray(t))return t;{let e=new Date;r&&e<r.toDate(R())?e=r.toDate(R()):i&&e>i.toDate(R())&&(e=i.toDate(R()));let t=e.getFullYear(),a=e.getMonth()+1,o=e.getDate();return[`hour`,`minute`,`second`].includes(n??`day`)?new J(t,a,o,0,0,0):new q(t,a,o)}}function qt(e,t){let n;return n=t instanceof Y?Ot(e):t instanceof J?Dt(e):Et(e),n.calendar===t.calendar?n:U(n,t.calendar)}function Z(e,t=R()){return e instanceof Y?e.toDate():e.toDate(t)}function Jt(e){if(e instanceof q)return`date`;if(e instanceof J)return`datetime`;if(e instanceof Y)return`zoneddatetime`;throw Error(`Unknown date type`)}function Yt(e,t){switch(t){case`date`:return Et(e);case`datetime`:return Dt(e);case`zoneddatetime`:return Ot(e);default:throw Error(`Unknown date type: ${t}`)}}function Xt(e){return e instanceof J}function Zt(e){return e instanceof Y}function Qt(e){return Xt(e)||Zt(e)}function $t(e){if(e instanceof Date){let t=e.getFullYear(),n=e.getMonth()+1;return new Date(t,n,0).getDate()}else return e.set({day:100}).day}function Q(e,t){return e.compare(t)<0}function en(e,t){return e.compare(t)>0}function tn(e,t,n){let r=Oe(e,n);return t>r?e.subtract({days:r+7-t}):t===r?e:e.subtract({days:r-t})}function nn(e,t,n){let r=Oe(e,n),i=t===0?6:t-1;return r===i?e:r>i?e.add({days:7-r+i}):e.add({days:i-r})}var rn={year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`};function an(e){let t=e.initialLocale;function n(e){t=e}function r(){return t}function i(e,n){return new X(t,n).format(e)}function a(e,t=!0){return Qt(e)&&t?i(Z(e),{dateStyle:`long`,timeStyle:`long`}):i(Z(e),{dateStyle:`long`})}function o(n){return typeof e.monthFormat.current!=`function`&&typeof e.yearFormat.current!=`function`?new X(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(n):`${typeof e.monthFormat.current==`function`?e.monthFormat.current(n.getMonth()+1):new X(t,{month:e.monthFormat.current}).format(n)} ${typeof e.yearFormat.current==`function`?e.yearFormat.current(n.getFullYear()):new X(t,{year:e.yearFormat.current}).format(n)}`}function s(e){return new X(t,{month:`long`}).format(e)}function c(e){return new X(t,{year:`numeric`}).format(e)}function l(e,n){return Zt(e)?new X(t,{...n,timeZone:e.timeZone}).formatToParts(Z(e)):new X(t,n).formatToParts(Z(e))}function u(e,n=`narrow`){return new X(t,{weekday:n}).format(e)}function d(e,n=void 0){return new X(t,{hour:`numeric`,minute:`numeric`,hourCycle:n===24?`h23`:void 0}).formatToParts(e).find(e=>e.type===`dayPeriod`)?.value===`PM`?`PM`:`AM`}function f(e,t,n={}){let r=l(e,{...rn,...n}).find(e=>e.type===t);return r?r.value:``}return{setLocale:n,getLocale:r,fullMonth:s,fullYear:c,fullMonthAndYear:o,toParts:l,custom:i,part:f,dayPeriod:d,selectedDate:a,dayOfWeek:u}}function on(e){return!(!k(e)||!e.hasAttribute(`data-bits-day`))}function sn(e,t){let n=[],r=e.add({days:1}),i=t;for(;r.compare(i)<0;)n.push(r),r=r.add({days:1});return n}function cn(e){let{dateObj:t,weekStartsOn:n,fixedWeeks:r,locale:i}=e,a=$t(t),o=Array.from({length:a},(e,n)=>t.set({day:n+1})),s=Le(t),c=Re(t),l=n===void 0?tn(s,0,i):tn(s,n,`en-US`),u=n===void 0?nn(c,0,i):nn(c,n,`en-US`),d=sn(l.subtract({days:1}),s),f=sn(c,u.add({days:1})),p=d.length+o.length+f.length;if(r&&p<42){let e=42-p,n=f[f.length-1];n||=t.add({months:1}).set({day:1});let r=e;f.length===0&&(r=e-1,f.push(n));let i=Array.from({length:r},(e,t)=>{let r=t+1;return n.add({days:r})});f.push(...i)}let m=d.concat(o,f);return{value:t,dates:m,weeks:re(m,7)}}function ln(e){let{numberOfMonths:t,dateObj:n,...r}=e,i=[];if(!t||t===1)return i.push(cn({...r,dateObj:n})),i;i.push(cn({...r,dateObj:n}));for(let e=1;e<t;e++){let t=n.add({months:e});i.push(cn({...r,dateObj:t}))}return i}function un(e){return e?Array.from(e.querySelectorAll(`[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])`)).filter(e=>k(e)):[]}function dn(e,t){let n=e.getAttribute(`data-value`);n&&(t.current=qt(n,t.current))}function fn({node:e,add:t,placeholder:n,calendarNode:r,isPrevButtonDisabled:i,isNextButtonDisabled:a,months:o,numberOfMonths:s}){let c=un(r);if(!c.length)return;let l=c.indexOf(e)+t;if(ae(l,c)){let e=c[l];return dn(e,n),e.focus()}if(l<0){if(i)return;let e=o[0]?.value;if(!e)return;n.current=e.subtract({months:s}),ie(()=>{let e=un(r);if(!e.length)return;let t=e.length-Math.abs(l);if(ae(t,e)){let r=e[t];return dn(r,n),r.focus()}})}if(l>=c.length){if(a)return;let e=o[0]?.value;if(!e)return;n.current=e.add({months:s}),ie(()=>{let e=un(r);if(!e.length)return;let t=l-c.length;if(ae(t,e))return e[t].focus()})}}var pn=[se,D,ce,ne],mn=[pe,` `];function hn({event:e,handleCellClick:t,shiftFocus:n,placeholderValue:r}){let i=e.target;if(!on(i)||!pn.includes(e.key)&&!mn.includes(e.key))return;e.preventDefault();let a={[se]:7,[D]:-7,[ce]:-1,[ne]:1};if(pn.includes(e.key)){let t=a[e.key];t!==void 0&&n(i,t)}if(mn.includes(e.key)){let n=i.getAttribute(`data-value`);if(!n)return;t(e,qt(n,r))}}function gn({months:e,setMonths:t,numberOfMonths:n,pagedNavigation:r,weekStartsOn:i,locale:a,fixedWeeks:o,setPlaceholder:s}){let c=e[0]?.value;if(c)if(r)s(c.add({months:n}));else{let e=c.add({months:1}),r=ln({dateObj:e,weekStartsOn:i,locale:a,fixedWeeks:o,numberOfMonths:n});s(e),t(r)}}function _n({months:e,setMonths:t,numberOfMonths:n,pagedNavigation:r,weekStartsOn:i,locale:a,fixedWeeks:o,setPlaceholder:s}){let c=e[0]?.value;if(c)if(r)s(c.subtract({months:n}));else{let e=c.subtract({months:1}),r=ln({dateObj:e,weekStartsOn:i,locale:a,fixedWeeks:o,numberOfMonths:n});s(e),t(r)}}function vn({months:e,formatter:t,weekdayFormat:n}){if(!e.length)return[];let r=e[0].weeks[0];return r?r.map(e=>t.dayOfWeek(Z(e),n)):[]}function yn(t){w(()=>{let n=t.weekStartsOn.current,r=t.locale.current,i=t.fixedWeeks.current,a=t.numberOfMonths.current;e(()=>{let e=t.placeholder.current;if(!e)return;let o={weekStartsOn:n,locale:r,fixedWeeks:i,numberOfMonths:a};t.setMonths(ln({...o,dateObj:e}))})})}function bn({calendarNode:e,label:t,accessibleHeadingId:n}){let r=ue(e),i=r.createElement(`div`);i.style.cssText=O({border:`0px`,clip:`rect(0px, 0px, 0px, 0px)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0px`,position:`absolute`,whiteSpace:`nowrap`,width:`1px`});let a=r.createElement(`div`);return a.textContent=t,a.id=n,a.role=`heading`,a.ariaLevel=`2`,e.insertBefore(i,e.firstChild),i.appendChild(a),()=>{let e=r.getElementById(n);e&&(i.parentElement?.removeChild(i),e.remove())}}function xn({placeholder:t,getVisibleMonths:n,weekStartsOn:r,locale:i,fixedWeeks:a,numberOfMonths:o,setMonths:s}){w(()=>{t.current,e(()=>{n().some(e=>we(e,t.current))||s(ln({weekStartsOn:r.current,locale:i.current,fixedWeeks:a.current,numberOfMonths:o.current,dateObj:t.current}))})})}function Sn({maxValue:e,months:t,disabled:n}){if(!e||!t.length)return!1;if(n)return!0;let r=t[t.length-1]?.value;return r?en(r.add({months:1}).set({day:1}),e):!1}function Cn({minValue:e,months:t,disabled:n}){if(!e||!t.length)return!1;if(n)return!0;let r=t[0]?.value;return r?Q(r.subtract({months:1}).set({day:35}),e):!1}function wn({months:e,locale:t,formatter:n}){if(!e.length)return``;if(t!==n.getLocale()&&n.setLocale(t),e.length===1){let t=Z(e[0].value);return`${n.fullMonthAndYear(t)}`}let r=Z(e[0].value),i=Z(e[e.length-1].value),a=n.fullMonth(r),o=n.fullMonth(i),s=n.fullYear(r),c=n.fullYear(i);return s===c?`${a} - ${o} ${c}`:`${a} ${s} - ${o} ${c}`}function Tn({fullCalendarLabel:e,id:t,isInvalid:n,disabled:r,readonly:i}){return{id:t,role:`application`,"aria-label":e,"data-invalid":N(n),"data-disabled":N(r),"data-readonly":N(i)}}function En(e){let t=ue(e.target).querySelector(`[data-bits-day][data-focused]`);t&&(e.preventDefault(),t?.focus())}function Dn(e){if(!oe)return;let t=Array.from(e.querySelectorAll(`[data-bits-day]:not([aria-disabled=true])`));if(t.length===0)return;let n=t[0],r=n?.getAttribute(`data-value`),i=n?.getAttribute(`data-type`);if(!(!r||!i))return Yt(r,i)}function On({ref:e,placeholder:t,defaultPlaceholder:n,minValue:r,maxValue:i,isDateDisabled:a}){function o(e){return!!(a.current(e)||r.current&&Q(e,r.current)||i.current&&Q(i.current,e))}ee(()=>e.current,()=>{e.current&&t.current&&L(t.current,n)&&o(n)&&(t.current=Dn(e.current)??n)})}function kn(e,t){return!e||!t?e:Qt(e)&&Qt(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}var An=fe({component:`calendar`,parts:[`root`,`grid`,`cell`,`next-button`,`prev-button`,`day`,`grid-body`,`grid-head`,`grid-row`,`head-cell`,`header`,`heading`,`month-select`,`year-select`]});function jn(e){let t=new Date().getFullYear(),n=Math.max(e.placeholderYear,t),r,i;if(e.minValue)r=e.minValue.year;else{let t=n-100;r=e.placeholderYear<t?e.placeholderYear-10:t}i=e.maxValue?e.maxValue.year:n+10,r>i&&(r=i);let a=i-r+1;return Array.from({length:a},(e,t)=>r+t)}var $=new te(`Calendar.Root | RangeCalender.Root`),Mn=class n{static create(e){return $.set(new n(e))}opts;#e=t(()=>this.months.map(e=>e.value));get visibleMonths(){return p(this.#e)}set visibleMonths(e){T(this.#e,e)}formatter;accessibleHeadingId=le();domContext;attachment;#t=m(v([]));get months(){return p(this.#t)}set months(e){T(this.#t,e,!0)}announcer;constructor(e){this.opts=e,this.attachment=P(this.opts.ref),this.domContext=new me(e.ref),this.announcer=Wt(null),this.formatter=an({initialLocale:this.opts.locale.current,monthFormat:this.opts.monthFormat,yearFormat:this.opts.yearFormat}),this.setMonths=this.setMonths.bind(this),this.nextPage=this.nextPage.bind(this),this.prevPage=this.prevPage.bind(this),this.prevYear=this.prevYear.bind(this),this.nextYear=this.nextYear.bind(this),this.setYear=this.setYear.bind(this),this.setMonth=this.setMonth.bind(this),this.isOutsideVisibleMonths=this.isOutsideVisibleMonths.bind(this),this.isDateDisabled=this.isDateDisabled.bind(this),this.isDateSelected=this.isDateSelected.bind(this),this.shiftFocus=this.shiftFocus.bind(this),this.handleCellClick=this.handleCellClick.bind(this),this.handleMultipleUpdate=this.handleMultipleUpdate.bind(this),this.handleSingleUpdate=this.handleSingleUpdate.bind(this),this.onkeydown=this.onkeydown.bind(this),this.getBitsAttr=this.getBitsAttr.bind(this),S(()=>{this.announcer=Wt(this.domContext.getDocument())}),this.months=ln({dateObj:this.opts.placeholder.current,weekStartsOn:this.opts.weekStartsOn.current,locale:this.opts.locale.current,fixedWeeks:this.opts.fixedWeeks.current,numberOfMonths:this.opts.numberOfMonths.current}),this.#a(),this.#o(),this.#s(),xn({placeholder:this.opts.placeholder,getVisibleMonths:()=>this.visibleMonths,weekStartsOn:this.opts.weekStartsOn,locale:this.opts.locale,fixedWeeks:this.opts.fixedWeeks,numberOfMonths:this.opts.numberOfMonths,setMonths:e=>this.months=e}),yn({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),ee(()=>this.fullCalendarLabel,e=>{let t=this.domContext.getElementById(this.accessibleHeadingId);t&&(t.textContent=e)}),ee(()=>this.opts.value.current,()=>{let e=this.opts.value.current;if(Array.isArray(e)&&e.length){let t=e[e.length-1];t&&this.opts.placeholder.current!==t&&(this.opts.placeholder.current=t)}else !Array.isArray(e)&&e&&this.opts.placeholder.current!==e&&(this.opts.placeholder.current=e)}),On({placeholder:e.placeholder,defaultPlaceholder:e.defaultPlaceholder,isDateDisabled:e.isDateDisabled,maxValue:e.maxValue,minValue:e.minValue,ref:e.ref})}setMonths(e){this.months=e}#n=t(()=>vn({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return p(this.#n)}set weekdays(e){T(this.#n,e)}#r=t(()=>e(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return p(this.#r)}set initialPlaceholderYear(e){T(this.#r,e)}#i=t(()=>jn({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return p(this.#i)}set defaultYears(e){T(this.#i,e)}#a(){w(()=>{if(e(()=>this.opts.initialFocus.current)){let e=this.opts.ref.current?.querySelector(`[data-focused]`);e&&e.focus()}})}#o(){w(()=>{if(this.opts.ref.current)return bn({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId})})}#s(){h(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){gn({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:e=>this.opts.placeholder.current=e,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}prevPage(){_n({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:e=>this.opts.placeholder.current=e,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}nextYear(){this.opts.placeholder.current=this.opts.placeholder.current.add({years:1})}prevYear(){this.opts.placeholder.current=this.opts.placeholder.current.subtract({years:1})}setYear(e){this.opts.placeholder.current=this.opts.placeholder.current.set({year:e})}setMonth(e){this.opts.placeholder.current=this.opts.placeholder.current.set({month:e})}#c=t(()=>Sn({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return p(this.#c)}set isNextButtonDisabled(e){T(this.#c,e)}#l=t(()=>Cn({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return p(this.#l)}set isPrevButtonDisabled(e){T(this.#l,e)}#u=t(()=>{let e=this.opts.value.current,t=this.opts.isDateDisabled.current,n=this.opts.isDateUnavailable.current;if(Array.isArray(e)){if(!e.length)return!1;for(let r of e)if(t(r)||n(r))return!0}else{if(!e)return!1;if(t(e)||n(e))return!0}return!1});get isInvalid(){return p(this.#u)}set isInvalid(e){T(this.#u,e)}#d=t(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,wn({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return p(this.#d)}set headingValue(e){T(this.#d,e)}#f=t(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return p(this.#f)}set fullCalendarLabel(e){T(this.#f,e)}isOutsideVisibleMonths(e){return!this.visibleMonths.some(t=>we(e,t))}isDateDisabled(e){if(this.opts.isDateDisabled.current(e)||this.opts.disabled.current)return!0;let t=this.opts.minValue.current,n=this.opts.maxValue.current;return!!(t&&Q(e,t)||n&&Q(n,e))}isDateSelected(e){let t=this.opts.value.current;return Array.isArray(t)?t.some(t=>L(t,e)):t?L(t,e):!1}shiftFocus(e,t){return fn({node:e,add:t,placeholder:this.opts.placeholder,calendarNode:this.opts.ref.current,isPrevButtonDisabled:this.isPrevButtonDisabled,isNextButtonDisabled:this.isNextButtonDisabled,months:this.months,numberOfMonths:this.opts.numberOfMonths.current})}#p(e){if(this.opts.type.current!==`multiple`||!this.opts.maxDays.current)return!0;let t=e.length;return!(this.opts.maxDays.current&&t>this.opts.maxDays.current)}handleCellClick(e,t){if(this.opts.readonly.current||this.opts.isDateDisabled.current?.(t)||this.opts.isDateUnavailable.current?.(t))return;let n=this.opts.value.current;if(this.opts.type.current===`multiple`)(Array.isArray(n)||n===void 0)&&(this.opts.value.current=this.handleMultipleUpdate(n,t));else if(!Array.isArray(n)){let e=this.handleSingleUpdate(n,t);e?this.announcer.announce(`Selected Date: ${this.formatter.selectedDate(e,!1)}`,`polite`):this.announcer.announce(`Selected date is now empty.`,`polite`,5e3),this.opts.value.current=kn(e,n),e!==void 0&&this.opts.onDateSelect?.current?.()}}handleMultipleUpdate(e,t){if(!e){let e=[t];return this.#p(e)?e:[t]}if(!Array.isArray(e))return;let n=e.findIndex(e=>L(e,t)),r=this.opts.preventDeselect.current;if(n===-1){let n=[...e,t];return this.#p(n)?n:[t]}else if(r)return e;else{let n=e.filter(e=>!L(e,t));if(!n.length){this.opts.placeholder.current=t;return}return n}}handleSingleUpdate(e,t){if(!e)return t;if(!this.opts.preventDeselect.current&&L(e,t)){this.opts.placeholder.current=t;return}return t}onkeydown(e){hn({event:e,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#m=t(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return p(this.#m)}set snippetProps(e){T(this.#m,e)}getBitsAttr=e=>An.getAttr(e);#h=t(()=>({...Tn({fullCalendarLabel:this.fullCalendarLabel,id:this.opts.id.current,isInvalid:this.isInvalid,disabled:this.opts.disabled.current,readonly:this.opts.readonly.current}),[this.getBitsAttr(`root`)]:``,onkeydown:this.onkeydown,...this.attachment}));get props(){return p(this.#h)}set props(e){T(this.#h,e)}},Nn=class e{static create(t){return new e(t,$.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=P(this.opts.ref)}#e=t(()=>({id:this.opts.id.current,"aria-hidden":de(!0),"data-disabled":N(this.root.opts.disabled.current),"data-readonly":N(this.root.opts.readonly.current),[this.root.getBitsAttr(`heading`)]:``,...this.attachment}));get props(){return p(this.#e)}set props(e){T(this.#e,e)}},Pn=new te(`Calendar.Cell | RangeCalendar.Cell`),Fn=class e{static create(t){return Pn.set(new e(t,$.get()))}opts;root;#e=t(()=>Z(this.opts.date.current));get cellDate(){return p(this.#e)}set cellDate(e){T(this.#e,e)}#t=t(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return p(this.#t)}set isUnavailable(e){T(this.#t,e)}#n=t(()=>Ee(this.opts.date.current,R()));get isDateToday(){return p(this.#n)}set isDateToday(e){T(this.#n,e)}#r=t(()=>!we(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return p(this.#r)}set isOutsideMonth(e){T(this.#r,e)}#i=t(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return p(this.#i)}set isOutsideVisibleMonths(e){T(this.#i,e)}#a=t(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return p(this.#a)}set isDisabled(e){T(this.#a,e)}#o=t(()=>L(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return p(this.#o)}set isFocusedDate(e){T(this.#o,e)}#s=t(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return p(this.#s)}set isSelectedDate(e){T(this.#s,e)}#c=t(()=>this.root.formatter.custom(this.cellDate,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`}));get labelText(){return p(this.#c)}set labelText(e){T(this.#c,e)}attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=P(this.opts.ref)}#l=t(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return p(this.#l)}set snippetProps(e){T(this.#l,e)}#u=t(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return p(this.#u)}set ariaDisabled(e){T(this.#u,e)}#d=t(()=>({"data-unavailable":N(this.isUnavailable),"data-today":this.isDateToday?``:void 0,"data-outside-month":this.isOutsideMonth?``:void 0,"data-outside-visible-months":this.isOutsideVisibleMonths?``:void 0,"data-focused":this.isFocusedDate?``:void 0,"data-selected":N(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":Jt(this.opts.date.current),"data-disabled":N(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return p(this.#d)}set sharedDataAttrs(e){T(this.#d,e)}#f=t(()=>({id:this.opts.id.current,role:`gridcell`,"aria-selected":j(this.isSelectedDate),"aria-disabled":j(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr(`cell`)]:``,...this.attachment}));get props(){return p(this.#f)}set props(e){T(this.#f,e)}},In=class e{static create(t){return new e(t,Pn.get())}opts;cell;attachment;constructor(e,t){this.opts=e,this.cell=t,this.onclick=this.onclick.bind(this),this.attachment=P(this.opts.ref)}#e=t(()=>this.cell.isOutsideMonth&&this.cell.root.opts.disableDaysOutsideMonth.current||this.cell.isDisabled?void 0:this.cell.isFocusedDate?0:-1);onclick(e){this.cell.isDisabled||this.cell.root.handleCellClick(e,this.cell.opts.date.current)}#t=t(()=>({disabled:this.cell.isDisabled,unavailable:this.cell.isUnavailable,selected:this.cell.isSelectedDate,day:`${this.cell.opts.date.current.day}`}));get snippetProps(){return p(this.#t)}set snippetProps(e){T(this.#t,e)}#n=t(()=>({id:this.opts.id.current,role:`button`,"aria-label":this.cell.labelText,"aria-disabled":j(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:p(this.#e),[this.cell.root.getBitsAttr(`day`)]:``,"data-bits-day":``,onclick:this.onclick,...this.attachment}));get props(){return p(this.#n)}set props(e){T(this.#n,e)}},Ln=class e{static create(t){return new e(t,$.get())}opts;root;#e=t(()=>this.root.isNextButtonDisabled);get isDisabled(){return p(this.#e)}set isDisabled(e){T(this.#e,e)}attachment;constructor(e,t){this.opts=e,this.root=t,this.onclick=this.onclick.bind(this),this.attachment=P(this.opts.ref)}onclick(e){this.isDisabled||this.root.nextPage()}#t=t(()=>({id:this.opts.id.current,role:`button`,type:`button`,"aria-label":`Next`,"aria-disabled":j(this.isDisabled),"data-disabled":N(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr(`next-button`)]:``,onclick:this.onclick,...this.attachment}));get props(){return p(this.#t)}set props(e){T(this.#t,e)}},Rn=class e{static create(t){return new e(t,$.get())}opts;root;#e=t(()=>this.root.isPrevButtonDisabled);get isDisabled(){return p(this.#e)}set isDisabled(e){T(this.#e,e)}attachment;constructor(e,t){this.opts=e,this.root=t,this.onclick=this.onclick.bind(this),this.attachment=P(this.opts.ref)}onclick(e){this.isDisabled||this.root.prevPage()}#t=t(()=>({id:this.opts.id.current,role:`button`,type:`button`,"aria-label":`Previous`,"aria-disabled":j(this.isDisabled),"data-disabled":N(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr(`prev-button`)]:``,onclick:this.onclick,...this.attachment}));get props(){return p(this.#t)}set props(e){T(this.#t,e)}},zn=class e{static create(t){return new e(t,$.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=P(this.opts.ref)}#e=t(()=>({id:this.opts.id.current,tabindex:-1,role:`grid`,"aria-readonly":j(this.root.opts.readonly.current),"aria-disabled":j(this.root.opts.disabled.current),"data-readonly":N(this.root.opts.readonly.current),"data-disabled":N(this.root.opts.disabled.current),[this.root.getBitsAttr(`grid`)]:``,...this.attachment}));get props(){return p(this.#e)}set props(e){T(this.#e,e)}},Bn=class e{static create(t){return new e(t,$.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=P(this.opts.ref)}#e=t(()=>({id:this.opts.id.current,"data-disabled":N(this.root.opts.disabled.current),"data-readonly":N(this.root.opts.readonly.current),[this.root.getBitsAttr(`grid-body`)]:``,...this.attachment}));get props(){return p(this.#e)}set props(e){T(this.#e,e)}},Vn=class e{static create(t){return new e(t,$.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=P(this.opts.ref)}#e=t(()=>({id:this.opts.id.current,"data-disabled":N(this.root.opts.disabled.current),"data-readonly":N(this.root.opts.readonly.current),[this.root.getBitsAttr(`grid-head`)]:``,...this.attachment}));get props(){return p(this.#e)}set props(e){T(this.#e,e)}},Hn=class e{static create(t){return new e(t,$.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=P(this.opts.ref)}#e=t(()=>({id:this.opts.id.current,"data-disabled":N(this.root.opts.disabled.current),"data-readonly":N(this.root.opts.readonly.current),[this.root.getBitsAttr(`grid-row`)]:``,...this.attachment}));get props(){return p(this.#e)}set props(e){T(this.#e,e)}},Un=class e{static create(t){return new e(t,$.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=P(this.opts.ref)}#e=t(()=>({id:this.opts.id.current,"data-disabled":N(this.root.opts.disabled.current),"data-readonly":N(this.root.opts.readonly.current),[this.root.getBitsAttr(`head-cell`)]:``,...this.attachment}));get props(){return p(this.#e)}set props(e){T(this.#e,e)}},Wn=E(`<div><!></div>`);function Gn(e,m){let h=u();c(m,!0);let v=y(m,`ref`,15,null),S=y(m,`id`,19,()=>F(h)),w=C(m,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),T=In.create({id:A(()=>S()),ref:A(()=>v(),e=>v(e))}),E=t(()=>M(w,T.props));var D=l(),O=x(D),ee=e=>{var n=l(),r=x(n);{let e=t(()=>({props:p(E),...T.snippetProps}));s(r,()=>m.child,()=>p(e))}i(e,n)},k=e=>{var t=Wn();_(t,()=>({...p(E)}));var o=g(t),c=e=>{var t=l();s(x(t),()=>m.children??f,()=>T.snippetProps),i(e,t)},u=e=>{var t=r();b(()=>n(t,T.cell.opts.date.current.day)),i(e,t)};a(o,e=>{m.children?e(c):e(u,-1)}),d(t),i(e,t)};a(O,e=>{m.child?e(ee):e(k,-1)}),i(e,D),o()}var Kn=E(`<table><!></table>`);function qn(e,n){let r=u();c(n,!0);let m=y(n,`ref`,15,null),h=y(n,`id`,19,()=>F(r)),v=C(n,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),b=zn.create({id:A(()=>h()),ref:A(()=>m(),e=>m(e))}),S=t(()=>M(v,b.props));var w=l(),T=x(w),E=e=>{var t=l();s(x(t),()=>n.child,()=>({props:p(S)})),i(e,t)},D=e=>{var t=Kn();_(t,()=>({...p(S)})),s(g(t),()=>n.children??f),d(t),i(e,t)};a(T,e=>{n.child?e(E):e(D,-1)}),i(e,w),o()}var Jn=E(`<tbody><!></tbody>`);function Yn(e,n){let r=u();c(n,!0);let m=y(n,`ref`,15,null),h=y(n,`id`,19,()=>F(r)),v=C(n,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),b=Bn.create({id:A(()=>h()),ref:A(()=>m(),e=>m(e))}),S=t(()=>M(v,b.props));var w=l(),T=x(w),E=e=>{var t=l();s(x(t),()=>n.child,()=>({props:p(S)})),i(e,t)},D=e=>{var t=Jn();_(t,()=>({...p(S)})),s(g(t),()=>n.children??f),d(t),i(e,t)};a(T,e=>{n.child?e(E):e(D,-1)}),i(e,w),o()}var Xn=E(`<td><!></td>`);function Zn(e,n){let r=u();c(n,!0);let m=y(n,`ref`,15,null),h=y(n,`id`,19,()=>F(r)),v=C(n,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`,`date`,`month`]),b=Fn.create({id:A(()=>h()),ref:A(()=>m(),e=>m(e)),date:A(()=>n.date),month:A(()=>n.month)}),S=t(()=>M(v,b.props));var w=l(),T=x(w),E=e=>{var r=l(),a=x(r);{let e=t(()=>({props:p(S),...b.snippetProps}));s(a,()=>n.child,()=>p(e))}i(e,r)},D=e=>{var t=Xn();_(t,()=>({...p(S)})),s(g(t),()=>n.children??f,()=>b.snippetProps),d(t),i(e,t)};a(T,e=>{n.child?e(E):e(D,-1)}),i(e,w),o()}var Qn=E(`<thead><!></thead>`);function $n(e,n){let r=u();c(n,!0);let m=y(n,`ref`,15,null),h=y(n,`id`,19,()=>F(r)),v=C(n,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),b=Vn.create({id:A(()=>h()),ref:A(()=>m(),e=>m(e))}),S=t(()=>M(v,b.props));var w=l(),T=x(w),E=e=>{var t=l();s(x(t),()=>n.child,()=>({props:p(S)})),i(e,t)},D=e=>{var t=Qn();_(t,()=>({...p(S)})),s(g(t),()=>n.children??f),d(t),i(e,t)};a(T,e=>{n.child?e(E):e(D,-1)}),i(e,w),o()}var er=E(`<th><!></th>`);function tr(e,n){let r=u();c(n,!0);let m=y(n,`ref`,15,null),h=y(n,`id`,19,()=>F(r)),v=C(n,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),b=Un.create({id:A(()=>h()),ref:A(()=>m(),e=>m(e))}),S=t(()=>M(v,b.props));var w=l(),T=x(w),E=e=>{var t=l();s(x(t),()=>n.child,()=>({props:p(S)})),i(e,t)},D=e=>{var t=er();_(t,()=>({...p(S)})),s(g(t),()=>n.children??f),d(t),i(e,t)};a(T,e=>{n.child?e(E):e(D,-1)}),i(e,w),o()}var nr=E(`<tr><!></tr>`);function rr(e,n){let r=u();c(n,!0);let m=y(n,`ref`,15,null),h=y(n,`id`,19,()=>F(r)),v=C(n,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),b=Hn.create({id:A(()=>h()),ref:A(()=>m(),e=>m(e))}),S=t(()=>M(v,b.props));var w=l(),T=x(w),E=e=>{var t=l();s(x(t),()=>n.child,()=>({props:p(S)})),i(e,t)},D=e=>{var t=nr();_(t,()=>({...p(S)})),s(g(t),()=>n.children??f),d(t),i(e,t)};a(T,e=>{n.child?e(E):e(D,-1)}),i(e,w),o()}var ir=E(`<div><!></div>`);function ar(e,m){let h=u();c(m,!0);let v=y(m,`ref`,15,null),S=y(m,`id`,19,()=>F(h)),w=C(m,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),T=Nn.create({id:A(()=>S()),ref:A(()=>v(),e=>v(e))}),E=t(()=>M(w,T.props));var D=l(),O=x(D),ee=e=>{var t=l();s(x(t),()=>m.child,()=>({props:p(E),headingValue:T.root.headingValue})),i(e,t)},k=e=>{var t=ir();_(t,()=>({...p(E)}));var o=g(t),c=e=>{var t=l();s(x(t),()=>m.children??f,()=>({headingValue:T.root.headingValue})),i(e,t)},u=e=>{var t=r();b(()=>n(t,T.root.headingValue)),i(e,t)};a(o,e=>{m.children?e(c):e(u,-1)}),d(t),i(e,t)};a(O,e=>{m.child?e(ee):e(k,-1)}),i(e,D),o()}var or=E(`<button><!></button>`);function sr(e,n){let r=u();c(n,!0);let m=y(n,`id`,19,()=>F(r)),h=y(n,`ref`,15,null),v=y(n,`tabindex`,3,0),b=C(n,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`tabindex`]),S=Ln.create({id:A(()=>m()),ref:A(()=>h(),e=>h(e))}),w=t(()=>M(b,S.props,{tabindex:v()}));var T=l(),E=x(T),D=e=>{var t=l();s(x(t),()=>n.child,()=>({props:p(w)})),i(e,t)},O=e=>{var t=or();_(t,()=>({...p(w)})),s(g(t),()=>n.children??f),d(t),i(e,t)};a(E,e=>{n.child?e(D):e(O,-1)}),i(e,T),o()}var cr=E(`<button><!></button>`);function lr(e,n){let r=u();c(n,!0);let m=y(n,`id`,19,()=>F(r)),h=y(n,`ref`,15,null),v=y(n,`tabindex`,3,0),b=C(n,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`tabindex`]),S=Rn.create({id:A(()=>m()),ref:A(()=>h(),e=>h(e))}),w=t(()=>M(b,S.props,{tabindex:v()}));var T=l(),E=x(T),D=e=>{var t=l();s(x(t),()=>n.child,()=>({props:p(w)})),i(e,t)},O=e=>{var t=cr();_(t,()=>({...p(w)})),s(g(t),()=>n.children??f),d(t),i(e,t)};a(E,e=>{n.child?e(D):e(O,-1)}),i(e,T),o()}export{Et as S,Q as _,tr as a,Wt as b,Yn as c,Mn as d,En as f,Qt as g,Kt as h,rr as i,qn as l,$t as m,sr as n,$n as o,an as p,ar as r,Zn as s,lr as t,Gn as u,Zt as v,q as x,Z as y};
1
+ import{$ as e,Ct as t,F as n,H as r,L as i,N as a,Nt as o,O as s,Pt as c,R as l,V as u,Vt as d,Wt as f,X as p,bt as m,ct as h,ft as g,g as _,ht as v,o as y,ot as b,pt as x,r as S,s as C,st as w,vt as T,z as E}from"./xY0c-UfG.js";import"./xihTtKlq.js";import{$ as D,At as O,Dt as ee,G as k,Nt as A,Ot as te,Q as ne,S as re,St as ie,T as ae,U as oe,X as se,Z as ce,a as le,bt as ue,dt as j,ft as de,kt as M,mt as fe,rt as pe,ut as N,vt as P,yt as me,z as F}from"./DKFZnpVC.js";import{V as he}from"./BVCJtXyc.js";function ge(e,t){return e-t*Math.floor(e/t)}var _e=1721426;function ve(e,t,n,r){t=be(e,t);let i=t-1,a=-2;return n<=2?a=0:ye(t)&&(a=-1),_e-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function ye(e){return e%4==0&&(e%100!=0||e%400==0)}function be(e,t){return e===`BC`?1-t:t}function xe(e){let t=`AD`;return e<=0&&(t=`BC`,e=1-e),[t,e]}var Se={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},I=class{fromJulianDay(e){let t=e,n=t-_e,r=Math.floor(n/146097),i=ge(n,146097),a=Math.floor(i/36524),o=ge(i,36524),s=Math.floor(o/1461),c=ge(o,1461),l=Math.floor(c/365),[u,d]=xe(r*400+a*100+s*4+l+ +(a!==4&&l!==4)),f=t-ve(u,d,1,1),p=2;t<ve(u,d,3,1)?p=0:ye(d)&&(p=1);let m=Math.floor(((f+p)*12+373)/367);return new q(u,d,m,t-ve(u,d,m,1)+1)}toJulianDay(e){return ve(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return Se[ye(e.year)?`leapyear`:`standard`][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return ye(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return[`BC`,`AD`]}isInverseEra(e){return e.era===`BC`}balanceDate(e){e.year<=0&&(e.era=e.era===`BC`?`AD`:`BC`,e.year=1-e.year)}constructor(){this.identifier=`gregory`}},Ce={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function L(e,t){return t=U(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function we(e,t){return t=U(t,e.calendar),e=Le(e),t=Le(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function Te(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function Ee(e,t){return L(e,Ae(t))}var De={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Oe(e,t,n){let r=e.calendar.toJulianDay(e),i=n?De[n]:He(t),a=Math.ceil(r+1-i)%7;return a<0&&(a+=7),a}function ke(e){return V(Date.now(),e)}function Ae(e){return Qe(ke(e))}function je(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Me(e,t){return Ne(e)-Ne(t)}function Ne(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var Pe=null,Fe=!1;function R(){return Pe??=new Intl.DateTimeFormat().resolvedOptions().timeZone,Pe}function Ie(){return Fe}function Le(e){return e.subtract({days:e.day-1})}function Re(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}var ze=new Map,Be=new Map;function Ve(e){if(Intl.Locale){let t=ze.get(e);return t||(t=new Intl.Locale(e).maximize().region,t&&ze.set(e,t)),t}let t=e.split(`-`)[1];return t===`u`?void 0:t}function He(e){let t=Be.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if(`getWeekInfo`in n&&(t=n.getWeekInfo(),t))return Be.set(e,t),t.firstDay}let n=Ve(e);if(e.includes(`-fw-`)){let n=e.split(`-fw-`)[1].split(`-`)[0];t=n===`mon`?{firstDay:1}:n===`tue`?{firstDay:2}:n===`wed`?{firstDay:3}:n===`thu`?{firstDay:4}:n===`fri`?{firstDay:5}:n===`sat`?{firstDay:6}:{firstDay:0}}else t=e.includes(`-ca-iso8601`)?{firstDay:1}:{firstDay:n&&Ce[n]||0};Be.set(e,t)}return t.firstDay}function z(e){return e=U(e,new I),Ue(be(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Ue(e,t,n,r,i,a,o){let s=new Date;return s.setUTCHours(r,i,a,o),s.setUTCFullYear(e,t-1,n),s.getTime()}function We(e,t){if(t===`UTC`)return 0;if(e>0&&t===R()&&!Ie())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:o,second:s}=Ke(e,t);return Ue(n,r,i,a,o,s,0)-Math.floor(e/1e3)*1e3}var Ge=new Map;function Ke(e,t){let n=Ge.get(t);n||(n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,hour12:!1,era:`short`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),Ge.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let e of r)e.type!==`literal`&&(i[e.type]=e.value);return{year:i.era===`BC`||i.era===`B`?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour===`24`?0:+i.hour,minute:+i.minute,second:+i.second}}var qe=864e5;function Je(e,t){let n=z(e);return Ye(e,t,n-We(n-qe,t),n-We(n+qe,t))}function Ye(e,t,n,r){return(n===r?[n]:[n,r]).filter(n=>Xe(e,t,n))}function Xe(e,t,n){let r=Ke(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function B(e,t,n=`compatible`){let r=H(e);if(t===`UTC`)return z(r);if(t===R()&&n===`compatible`&&!Ie()){r=U(r,new I);let e=new Date,t=be(r.era,r.year);return e.setFullYear(t,r.month-1,r.day),e.setHours(r.hour,r.minute,r.second,r.millisecond),e.getTime()}let i=z(r),a=We(i-qe,t),o=We(i+qe,t),s=Ye(r,t,i-a,i-o);if(s.length===1)return s[0];if(s.length>1)switch(n){case`compatible`:case`earlier`:return s[0];case`later`:return s[s.length-1];case`reject`:throw RangeError(`Multiple possible absolute times found`)}switch(n){case`earlier`:return Math.min(i-a,i-o);case`compatible`:case`later`:return Math.max(i-a,i-o);case`reject`:throw RangeError(`No such absolute time found`)}}function Ze(e,t,n=`compatible`){return new Date(B(e,t,n))}function V(e,t){let n=We(e,t),r=new Date(e+n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,o=r.getUTCDate(),s=r.getUTCHours(),c=r.getUTCMinutes(),l=r.getUTCSeconds(),u=r.getUTCMilliseconds();return new Y(i<1?`BC`:`AD`,i<1?-i+1:i,a,o,t,n,s,c,l,u)}function Qe(e){return new q(e.calendar,e.era,e.year,e.month,e.day)}function H(e,t){let n=0,r=0,i=0,a=0;if(`timeZone`in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if(`hour`in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new J(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function U(e,t){if(Te(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,W(r),r}function $e(e,t,n){return e instanceof Y?e.timeZone===t?e:tt(e,t):V(B(e,t,n),t)}function et(e){let t=z(e)-e.offset;return new Date(t)}function tt(e,t){return U(V(z(e)-e.offset,t),e.calendar)}var nt=36e5;function rt(e,t){let n=e.copy(),r=`hour`in n?ht(n,t):0;it(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,at(n),st(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,ot(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){let e=n.calendar.isInverseEra?.(n);n.year=i,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let a=n.calendar.getMonthsInYear(n);return n.month>a&&(n.month=a,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function it(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function at(e){for(;e.month<1;)it(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,it(e,1)}function ot(e){for(;e.day<1;)e.month--,at(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,at(e)}function st(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function W(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),st(e)}function ct(e){let t={};for(let n in e)typeof e[n]==`number`&&(t[n]=-e[n]);return t}function lt(e,t){return rt(e,ct(t))}function ut(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),W(n),n}function dt(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),pt(n),n}function ft(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=mt(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=mt(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=mt(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=mt(e.hour,24),t}function pt(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function mt(e,t){let n=e%t;return n<0&&(n+=t),n}function ht(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,ft(e)}function gt(e,t,n,r){let i=e.copy();switch(t){case`era`:{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error(`Invalid era: `+e.era);a=G(a,n,0,t.length-1,r?.round),i.era=t[a],W(i);break}case`year`:i.calendar.isInverseEra?.(i)&&(n=-n),i.year=G(e.year,n,-1/0,9999,r?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case`month`:i.month=G(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case`day`:i.day=G(e.day,n,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw Error(`Unsupported field `+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),W(i),i}function _t(e,t,n,r){let i=e.copy();switch(t){case`hour`:{let t=e.hour,a=0,o=23;if(r?.hourCycle===12){let e=t>=12;a=e?12:0,o=e?23:11}i.hour=G(t,n,a,o,r?.round);break}case`minute`:i.minute=G(e.minute,n,0,59,r?.round);break;case`second`:i.second=G(e.second,n,0,59,r?.round);break;case`millisecond`:i.millisecond=G(e.millisecond,n,0,999,r?.round);break;default:throw Error(`Unsupported field `+t)}return i}function G(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e<n&&(e=r);let i=Math.abs(t);e=t>0?Math.ceil(e/i)*i:Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,e<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function vt(e,t){let n;return n=t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0?B(rt(H(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):z(e)-e.offset,n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5,U(V(n,e.timeZone),e.calendar)}function yt(e,t){return vt(e,ct(t))}function bt(e,t,n,r){switch(t){case`hour`:{let t=0,i=23;if(r?.hourCycle===12){let n=e.hour>=12;t=n?12:0,i=n?23:11}let a=H(e),o=U(dt(a,{hour:t}),new I),s=[B(o,e.timeZone,`earlier`),B(o,e.timeZone,`later`)].filter(t=>V(t,e.timeZone).day===o.day)[0],c=U(dt(a,{hour:i}),new I),l=[B(c,e.timeZone,`earlier`),B(c,e.timeZone,`later`)].filter(t=>V(t,e.timeZone).day===c.day).pop(),u=z(e)-e.offset,d=Math.floor(u/nt),f=u%nt;return u=G(d,n,Math.floor(s/nt),Math.floor(l/nt),r?.round)*nt+f,U(V(u,e.timeZone),e.calendar)}case`minute`:case`second`:case`millisecond`:return _t(e,t,n,r);case`era`:case`year`:case`month`:case`day`:return U(V(B(gt(H(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error(`Unsupported field `+t)}}function xt(e,t,n){let r=H(e),i=dt(ut(r,t),t);return i.compare(r)===0?e:U(V(B(i,e.timeZone,n),e.timeZone),e.calendar)}var St=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,Ct=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,wt=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,Tt=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function Et(e){let t=e.match(St);if(!t)throw Tt.test(e)?Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):Error(`Invalid ISO 8601 date string: `+e);let n=new q(K(t[1],0,9999),K(t[2],1,12),1);return n.day=K(t[3],1,n.calendar.getDaysInMonth(n)),n}function Dt(e){let t=e.match(Ct);if(!t)throw Tt.test(e)?Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):Error(`Invalid ISO 8601 date time string: `+e);let n=K(t[1],-9999,9999),r=new J(n<1?`BC`:`AD`,n<1?-n+1:n,K(t[2],1,12),1,t[4]?K(t[4],0,23):0,t[5]?K(t[5],0,59):0,t[6]?K(t[6],0,59):0,t[7]?K(t[7],0,1/0)*1e3:0);return r.day=K(t[3],0,r.calendar.getDaysInMonth(r)),r}function Ot(e,t){let n=e.match(wt);if(!n)throw Error(`Invalid ISO 8601 date time string: `+e);let r=K(n[1],-9999,9999),i=new Y(r<1?`BC`:`AD`,r<1?-r+1:r,K(n[2],1,12),1,n[11],0,n[4]?K(n[4],0,23):0,n[5]?K(n[5],0,59):0,n[6]?K(n[6],0,59):0,n[7]?K(n[7],0,1/0)*1e3:0);i.day=K(n[3],0,i.calendar.getDaysInMonth(i));let a=H(i),o;if(n[8]){let e=K(n[8],-23,23);if(i.offset=Math.sign(e)*(Math.abs(e)*36e5+K(n[9]??`0`,0,59)*6e4+K(n[10]??`0`,0,59)*1e3),o=z(i)-i.offset,!Je(a,i.timeZone).includes(o))throw Error(`Offset ${Mt(i.offset)} is invalid for ${jt(i)} in ${i.timeZone}`)}else o=B(H(a),i.timeZone,t);return V(o,i.timeZone)}function K(e,t,n){let r=Number(e);if(r<t||r>n)throw RangeError(`Value out of range: ${t} <= ${r} <= ${n}`);return r}function kt(e){return`${String(e.hour).padStart(2,`0`)}:${String(e.minute).padStart(2,`0`)}:${String(e.second).padStart(2,`0`)}${e.millisecond?String(e.millisecond/1e3).slice(1):``}`}function At(e){let t=U(e,new I),n;return n=t.era===`BC`?t.year===1?`0000`:`-`+String(Math.abs(1-t.year)).padStart(6,`00`):String(t.year).padStart(4,`0`),`${n}-${String(t.month).padStart(2,`0`)}-${String(t.day).padStart(2,`0`)}`}function jt(e){return`${At(e)}T${kt(e)}`}function Mt(e){let t=Math.sign(e)<0?`-`:`+`;e=Math.abs(e);let n=Math.floor(e/36e5),r=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),a=`${t}${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`;return i!==0&&(a+=`:${String(i).padStart(2,`0`)}`),a}function Nt(e){return`${jt(e)}${Mt(e.offset)}[${e.timeZone}]`}function Pt(e){let t=typeof e[0]==`object`?e.shift():new I,n;if(typeof e[0]==`string`)n=e.shift();else{let e=t.getEras();n=e[e.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var q=class e{constructor(...e){let[t,n,r,i,a]=Pt(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,W(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day):new e(this.calendar,this.year,this.month,this.day)}add(e){return rt(this,e)}subtract(e){return lt(this,e)}set(e){return ut(this,e)}cycle(e,t,n){return gt(this,e,t,n)}toDate(e){return Ze(this,e)}toString(){return At(this)}compare(e){return je(this,e)}},J=class e{constructor(...e){let[t,n,r,i,a]=Pt(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,W(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return rt(this,e)}subtract(e){return lt(this,e)}set(e){return ut(dt(this,e),e)}cycle(e,t,n){switch(e){case`era`:case`year`:case`month`:case`day`:return gt(this,e,t,n);default:return _t(this,e,t,n)}}toDate(e,t){return Ze(this,e,t)}toString(){return jt(this)}compare(e){let t=je(this,e);return t===0?Me(this,H(e)):t}},Y=class e{constructor(...e){let[t,n,r,i,a]=Pt(e),o=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.timeZone=o,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,W(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return vt(this,e)}subtract(e){return yt(this,e)}set(e,t){return xt(this,e,t)}cycle(e,t,n){return bt(this,e,t,n)}toDate(){return et(this)}toString(){return Nt(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-$e(e,this.timeZone).toDate().getTime()}},Ft=new Map,X=class{constructor(e,t={}){this.formatter=Lt(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange==`function`)return this.formatter.formatRange(e,t);if(t<e)throw RangeError(`End date must be >= start date`);return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts==`function`)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError(`End date must be >= start date`);let n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return Vt()&&(this.resolvedHourCycle||=Ht(e.locale,this.options),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle===`h11`||this.resolvedHourCycle===`h12`),e.calendar===`ethiopic-amete-alem`&&(e.calendar=`ethioaa`),e}},It={true:{ja:`h11`},false:{}};function Lt(e,t={}){if(typeof t.hour12==`boolean`&&zt()){t={...t};let n=It[String(t.hour12)][e.split(`-`)[0]],r=t.hour12?`h12`:`h23`;t.hourCycle=n??r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(Ft.has(n))return Ft.get(n);let r=new Intl.DateTimeFormat(e,t);return Ft.set(n,r),r}var Rt=null;function zt(){return Rt??=new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,hour12:!1}).format(new Date(2020,2,3,0))===`24`,Rt}var Bt=null;function Vt(){return Bt??=new Intl.DateTimeFormat(`fr`,{hour:`numeric`,hour12:!1}).resolvedOptions().hourCycle===`h12`,Bt}function Ht(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,``),e+=(e.includes(`-u-`)?``:`-u`)+`-nu-latn`;let n=Lt(e,{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(e=>e.type===`hour`).value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>e.type===`hour`).value,10);if(r===0&&i===23)return`h23`;if(r===24&&i===23)return`h24`;if(r===0&&i===11)return`h11`;if(r===12&&i===11)return`h12`;throw Error(`Unexpected hour cycle result`)}function Ut(e){if(!oe||!e)return null;let t=e.querySelector(`[data-bits-announcer]`),n=t=>{let n=e.createElement(`div`);return n.role=`log`,n.ariaLive=t,n.setAttribute(`aria-relevant`,`additions`),n};if(!k(t)){let r=e.createElement(`div`);r.style.cssText=he,r.setAttribute(`data-bits-announcer`,``),r.appendChild(n(`assertive`)),r.appendChild(n(`polite`)),t=r,e.body.insertBefore(t,e.body.firstChild)}return{getLog:e=>{if(!k(t))return null;let n=t.querySelector(`[aria-live="${e}"]`);return k(n)?n:null}}}function Wt(e){let t=Ut(e);function n(n,r=`assertive`,i=7500){if(!t||!oe||!e)return;let a=t.getLog(r),o=e.createElement(`div`);return n=typeof n==`number`?n.toString():n===null?`Empty`:n.trim(),o.innerText=n,r===`assertive`?a?.replaceChildren(o):a?.appendChild(o),setTimeout(()=>{o.remove()},i)}return{announce:n}}var Gt={defaultValue:void 0,granularity:`day`};function Kt(e){let{defaultValue:t,granularity:n,minValue:r,maxValue:i}={...Gt,...e};if(Array.isArray(t)&&t.length)return t[t.length-1];if(t&&!Array.isArray(t))return t;{let e=new Date;r&&e<r.toDate(R())?e=r.toDate(R()):i&&e>i.toDate(R())&&(e=i.toDate(R()));let t=e.getFullYear(),a=e.getMonth()+1,o=e.getDate();return[`hour`,`minute`,`second`].includes(n??`day`)?new J(t,a,o,0,0,0):new q(t,a,o)}}function qt(e,t){let n;return n=t instanceof Y?Ot(e):t instanceof J?Dt(e):Et(e),n.calendar===t.calendar?n:U(n,t.calendar)}function Z(e,t=R()){return e instanceof Y?e.toDate():e.toDate(t)}function Jt(e){if(e instanceof q)return`date`;if(e instanceof J)return`datetime`;if(e instanceof Y)return`zoneddatetime`;throw Error(`Unknown date type`)}function Yt(e,t){switch(t){case`date`:return Et(e);case`datetime`:return Dt(e);case`zoneddatetime`:return Ot(e);default:throw Error(`Unknown date type: ${t}`)}}function Xt(e){return e instanceof J}function Zt(e){return e instanceof Y}function Qt(e){return Xt(e)||Zt(e)}function $t(e){if(e instanceof Date){let t=e.getFullYear(),n=e.getMonth()+1;return new Date(t,n,0).getDate()}else return e.set({day:100}).day}function Q(e,t){return e.compare(t)<0}function en(e,t){return e.compare(t)>0}function tn(e,t,n){let r=Oe(e,n);return t>r?e.subtract({days:r+7-t}):t===r?e:e.subtract({days:r-t})}function nn(e,t,n){let r=Oe(e,n),i=t===0?6:t-1;return r===i?e:r>i?e.add({days:7-r+i}):e.add({days:i-r})}var rn={year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`};function an(e){let t=e.initialLocale;function n(e){t=e}function r(){return t}function i(e,n){return new X(t,n).format(e)}function a(e,t=!0){return Qt(e)&&t?i(Z(e),{dateStyle:`long`,timeStyle:`long`}):i(Z(e),{dateStyle:`long`})}function o(n){return typeof e.monthFormat.current!=`function`&&typeof e.yearFormat.current!=`function`?new X(t,{month:e.monthFormat.current,year:e.yearFormat.current}).format(n):`${typeof e.monthFormat.current==`function`?e.monthFormat.current(n.getMonth()+1):new X(t,{month:e.monthFormat.current}).format(n)} ${typeof e.yearFormat.current==`function`?e.yearFormat.current(n.getFullYear()):new X(t,{year:e.yearFormat.current}).format(n)}`}function s(e){return new X(t,{month:`long`}).format(e)}function c(e){return new X(t,{year:`numeric`}).format(e)}function l(e,n){return Zt(e)?new X(t,{...n,timeZone:e.timeZone}).formatToParts(Z(e)):new X(t,n).formatToParts(Z(e))}function u(e,n=`narrow`){return new X(t,{weekday:n}).format(e)}function d(e,n=void 0){return new X(t,{hour:`numeric`,minute:`numeric`,hourCycle:n===24?`h23`:void 0}).formatToParts(e).find(e=>e.type===`dayPeriod`)?.value===`PM`?`PM`:`AM`}function f(e,t,n={}){let r=l(e,{...rn,...n}).find(e=>e.type===t);return r?r.value:``}return{setLocale:n,getLocale:r,fullMonth:s,fullYear:c,fullMonthAndYear:o,toParts:l,custom:i,part:f,dayPeriod:d,selectedDate:a,dayOfWeek:u}}function on(e){return!(!k(e)||!e.hasAttribute(`data-bits-day`))}function sn(e,t){let n=[],r=e.add({days:1}),i=t;for(;r.compare(i)<0;)n.push(r),r=r.add({days:1});return n}function cn(e){let{dateObj:t,weekStartsOn:n,fixedWeeks:r,locale:i}=e,a=$t(t),o=Array.from({length:a},(e,n)=>t.set({day:n+1})),s=Le(t),c=Re(t),l=n===void 0?tn(s,0,i):tn(s,n,`en-US`),u=n===void 0?nn(c,0,i):nn(c,n,`en-US`),d=sn(l.subtract({days:1}),s),f=sn(c,u.add({days:1})),p=d.length+o.length+f.length;if(r&&p<42){let e=42-p,n=f[f.length-1];n||=t.add({months:1}).set({day:1});let r=e;f.length===0&&(r=e-1,f.push(n));let i=Array.from({length:r},(e,t)=>{let r=t+1;return n.add({days:r})});f.push(...i)}let m=d.concat(o,f);return{value:t,dates:m,weeks:re(m,7)}}function ln(e){let{numberOfMonths:t,dateObj:n,...r}=e,i=[];if(!t||t===1)return i.push(cn({...r,dateObj:n})),i;i.push(cn({...r,dateObj:n}));for(let e=1;e<t;e++){let t=n.add({months:e});i.push(cn({...r,dateObj:t}))}return i}function un(e){return e?Array.from(e.querySelectorAll(`[data-bits-day]:not([data-disabled]):not([data-outside-visible-months])`)).filter(e=>k(e)):[]}function dn(e,t){let n=e.getAttribute(`data-value`);n&&(t.current=qt(n,t.current))}function fn({node:e,add:t,placeholder:n,calendarNode:r,isPrevButtonDisabled:i,isNextButtonDisabled:a,months:o,numberOfMonths:s}){let c=un(r);if(!c.length)return;let l=c.indexOf(e)+t;if(ae(l,c)){let e=c[l];return dn(e,n),e.focus()}if(l<0){if(i)return;let e=o[0]?.value;if(!e)return;n.current=e.subtract({months:s}),ie(()=>{let e=un(r);if(!e.length)return;let t=e.length-Math.abs(l);if(ae(t,e)){let r=e[t];return dn(r,n),r.focus()}})}if(l>=c.length){if(a)return;let e=o[0]?.value;if(!e)return;n.current=e.add({months:s}),ie(()=>{let e=un(r);if(!e.length)return;let t=l-c.length;if(ae(t,e))return e[t].focus()})}}var pn=[se,D,ce,ne],mn=[pe,` `];function hn({event:e,handleCellClick:t,shiftFocus:n,placeholderValue:r}){let i=e.target;if(!on(i)||!pn.includes(e.key)&&!mn.includes(e.key))return;e.preventDefault();let a={[se]:7,[D]:-7,[ce]:-1,[ne]:1};if(pn.includes(e.key)){let t=a[e.key];t!==void 0&&n(i,t)}if(mn.includes(e.key)){let n=i.getAttribute(`data-value`);if(!n)return;t(e,qt(n,r))}}function gn({months:e,setMonths:t,numberOfMonths:n,pagedNavigation:r,weekStartsOn:i,locale:a,fixedWeeks:o,setPlaceholder:s}){let c=e[0]?.value;if(c)if(r)s(c.add({months:n}));else{let e=c.add({months:1}),r=ln({dateObj:e,weekStartsOn:i,locale:a,fixedWeeks:o,numberOfMonths:n});s(e),t(r)}}function _n({months:e,setMonths:t,numberOfMonths:n,pagedNavigation:r,weekStartsOn:i,locale:a,fixedWeeks:o,setPlaceholder:s}){let c=e[0]?.value;if(c)if(r)s(c.subtract({months:n}));else{let e=c.subtract({months:1}),r=ln({dateObj:e,weekStartsOn:i,locale:a,fixedWeeks:o,numberOfMonths:n});s(e),t(r)}}function vn({months:e,formatter:t,weekdayFormat:n}){if(!e.length)return[];let r=e[0].weeks[0];return r?r.map(e=>t.dayOfWeek(Z(e),n)):[]}function yn(t){w(()=>{let n=t.weekStartsOn.current,r=t.locale.current,i=t.fixedWeeks.current,a=t.numberOfMonths.current;e(()=>{let e=t.placeholder.current;if(!e)return;let o={weekStartsOn:n,locale:r,fixedWeeks:i,numberOfMonths:a};t.setMonths(ln({...o,dateObj:e}))})})}function bn({calendarNode:e,label:t,accessibleHeadingId:n}){let r=ue(e),i=r.createElement(`div`);i.style.cssText=O({border:`0px`,clip:`rect(0px, 0px, 0px, 0px)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0px`,position:`absolute`,whiteSpace:`nowrap`,width:`1px`});let a=r.createElement(`div`);return a.textContent=t,a.id=n,a.role=`heading`,a.ariaLevel=`2`,e.insertBefore(i,e.firstChild),i.appendChild(a),()=>{let e=r.getElementById(n);e&&(i.parentElement?.removeChild(i),e.remove())}}function xn({placeholder:t,getVisibleMonths:n,weekStartsOn:r,locale:i,fixedWeeks:a,numberOfMonths:o,setMonths:s}){w(()=>{t.current,e(()=>{n().some(e=>we(e,t.current))||s(ln({weekStartsOn:r.current,locale:i.current,fixedWeeks:a.current,numberOfMonths:o.current,dateObj:t.current}))})})}function Sn({maxValue:e,months:t,disabled:n}){if(!e||!t.length)return!1;if(n)return!0;let r=t[t.length-1]?.value;return r?en(r.add({months:1}).set({day:1}),e):!1}function Cn({minValue:e,months:t,disabled:n}){if(!e||!t.length)return!1;if(n)return!0;let r=t[0]?.value;return r?Q(r.subtract({months:1}).set({day:35}),e):!1}function wn({months:e,locale:t,formatter:n}){if(!e.length)return``;if(t!==n.getLocale()&&n.setLocale(t),e.length===1){let t=Z(e[0].value);return`${n.fullMonthAndYear(t)}`}let r=Z(e[0].value),i=Z(e[e.length-1].value),a=n.fullMonth(r),o=n.fullMonth(i),s=n.fullYear(r),c=n.fullYear(i);return s===c?`${a} - ${o} ${c}`:`${a} ${s} - ${o} ${c}`}function Tn({fullCalendarLabel:e,id:t,isInvalid:n,disabled:r,readonly:i}){return{id:t,role:`application`,"aria-label":e,"data-invalid":N(n),"data-disabled":N(r),"data-readonly":N(i)}}function En(e){let t=ue(e.target).querySelector(`[data-bits-day][data-focused]`);t&&(e.preventDefault(),t?.focus())}function Dn(e){if(!oe)return;let t=Array.from(e.querySelectorAll(`[data-bits-day]:not([aria-disabled=true])`));if(t.length===0)return;let n=t[0],r=n?.getAttribute(`data-value`),i=n?.getAttribute(`data-type`);if(!(!r||!i))return Yt(r,i)}function On({ref:e,placeholder:t,defaultPlaceholder:n,minValue:r,maxValue:i,isDateDisabled:a}){function o(e){return!!(a.current(e)||r.current&&Q(e,r.current)||i.current&&Q(i.current,e))}ee(()=>e.current,()=>{e.current&&t.current&&L(t.current,n)&&o(n)&&(t.current=Dn(e.current)??n)})}function kn(e,t){return!e||!t?e:Qt(e)&&Qt(t)?e.set({hour:t.hour,minute:t.minute,millisecond:t.millisecond,second:t.second}):e}var An=fe({component:`calendar`,parts:[`root`,`grid`,`cell`,`next-button`,`prev-button`,`day`,`grid-body`,`grid-head`,`grid-row`,`head-cell`,`header`,`heading`,`month-select`,`year-select`]});function jn(e){let t=new Date().getFullYear(),n=Math.max(e.placeholderYear,t),r,i;if(e.minValue)r=e.minValue.year;else{let t=n-100;r=e.placeholderYear<t?e.placeholderYear-10:t}i=e.maxValue?e.maxValue.year:n+10,r>i&&(r=i);let a=i-r+1;return Array.from({length:a},(e,t)=>r+t)}var $=new te(`Calendar.Root | RangeCalender.Root`),Mn=class n{static create(e){return $.set(new n(e))}opts;#e=t(()=>this.months.map(e=>e.value));get visibleMonths(){return p(this.#e)}set visibleMonths(e){T(this.#e,e)}formatter;accessibleHeadingId=le();domContext;attachment;#t=m(v([]));get months(){return p(this.#t)}set months(e){T(this.#t,e,!0)}announcer;constructor(e){this.opts=e,this.attachment=P(this.opts.ref),this.domContext=new me(e.ref),this.announcer=Wt(null),this.formatter=an({initialLocale:this.opts.locale.current,monthFormat:this.opts.monthFormat,yearFormat:this.opts.yearFormat}),this.setMonths=this.setMonths.bind(this),this.nextPage=this.nextPage.bind(this),this.prevPage=this.prevPage.bind(this),this.prevYear=this.prevYear.bind(this),this.nextYear=this.nextYear.bind(this),this.setYear=this.setYear.bind(this),this.setMonth=this.setMonth.bind(this),this.isOutsideVisibleMonths=this.isOutsideVisibleMonths.bind(this),this.isDateDisabled=this.isDateDisabled.bind(this),this.isDateSelected=this.isDateSelected.bind(this),this.shiftFocus=this.shiftFocus.bind(this),this.handleCellClick=this.handleCellClick.bind(this),this.handleMultipleUpdate=this.handleMultipleUpdate.bind(this),this.handleSingleUpdate=this.handleSingleUpdate.bind(this),this.onkeydown=this.onkeydown.bind(this),this.getBitsAttr=this.getBitsAttr.bind(this),S(()=>{this.announcer=Wt(this.domContext.getDocument())}),this.months=ln({dateObj:this.opts.placeholder.current,weekStartsOn:this.opts.weekStartsOn.current,locale:this.opts.locale.current,fixedWeeks:this.opts.fixedWeeks.current,numberOfMonths:this.opts.numberOfMonths.current}),this.#a(),this.#o(),this.#s(),xn({placeholder:this.opts.placeholder,getVisibleMonths:()=>this.visibleMonths,weekStartsOn:this.opts.weekStartsOn,locale:this.opts.locale,fixedWeeks:this.opts.fixedWeeks,numberOfMonths:this.opts.numberOfMonths,setMonths:e=>this.months=e}),yn({fixedWeeks:this.opts.fixedWeeks,locale:this.opts.locale,numberOfMonths:this.opts.numberOfMonths,placeholder:this.opts.placeholder,setMonths:this.setMonths,weekStartsOn:this.opts.weekStartsOn}),ee(()=>this.fullCalendarLabel,e=>{let t=this.domContext.getElementById(this.accessibleHeadingId);t&&(t.textContent=e)}),ee(()=>this.opts.value.current,()=>{let e=this.opts.value.current;if(Array.isArray(e)&&e.length){let t=e[e.length-1];t&&this.opts.placeholder.current!==t&&(this.opts.placeholder.current=t)}else !Array.isArray(e)&&e&&this.opts.placeholder.current!==e&&(this.opts.placeholder.current=e)}),On({placeholder:e.placeholder,defaultPlaceholder:e.defaultPlaceholder,isDateDisabled:e.isDateDisabled,maxValue:e.maxValue,minValue:e.minValue,ref:e.ref})}setMonths(e){this.months=e}#n=t(()=>vn({months:this.months,formatter:this.formatter,weekdayFormat:this.opts.weekdayFormat.current}));get weekdays(){return p(this.#n)}set weekdays(e){T(this.#n,e)}#r=t(()=>e(()=>this.opts.placeholder.current.year));get initialPlaceholderYear(){return p(this.#r)}set initialPlaceholderYear(e){T(this.#r,e)}#i=t(()=>jn({minValue:this.opts.minValue.current,maxValue:this.opts.maxValue.current,placeholderYear:this.initialPlaceholderYear}));get defaultYears(){return p(this.#i)}set defaultYears(e){T(this.#i,e)}#a(){w(()=>{if(e(()=>this.opts.initialFocus.current)){let e=this.opts.ref.current?.querySelector(`[data-focused]`);e&&e.focus()}})}#o(){w(()=>{if(this.opts.ref.current)return bn({calendarNode:this.opts.ref.current,label:this.fullCalendarLabel,accessibleHeadingId:this.accessibleHeadingId})})}#s(){h(()=>{this.formatter.getLocale()!==this.opts.locale.current&&this.formatter.setLocale(this.opts.locale.current)})}nextPage(){gn({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:e=>this.opts.placeholder.current=e,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}prevPage(){_n({fixedWeeks:this.opts.fixedWeeks.current,locale:this.opts.locale.current,numberOfMonths:this.opts.numberOfMonths.current,pagedNavigation:this.opts.pagedNavigation.current,setMonths:this.setMonths,setPlaceholder:e=>this.opts.placeholder.current=e,weekStartsOn:this.opts.weekStartsOn.current,months:this.months})}nextYear(){this.opts.placeholder.current=this.opts.placeholder.current.add({years:1})}prevYear(){this.opts.placeholder.current=this.opts.placeholder.current.subtract({years:1})}setYear(e){this.opts.placeholder.current=this.opts.placeholder.current.set({year:e})}setMonth(e){this.opts.placeholder.current=this.opts.placeholder.current.set({month:e})}#c=t(()=>Sn({maxValue:this.opts.maxValue.current,months:this.months,disabled:this.opts.disabled.current}));get isNextButtonDisabled(){return p(this.#c)}set isNextButtonDisabled(e){T(this.#c,e)}#l=t(()=>Cn({minValue:this.opts.minValue.current,months:this.months,disabled:this.opts.disabled.current}));get isPrevButtonDisabled(){return p(this.#l)}set isPrevButtonDisabled(e){T(this.#l,e)}#u=t(()=>{let e=this.opts.value.current,t=this.opts.isDateDisabled.current,n=this.opts.isDateUnavailable.current;if(Array.isArray(e)){if(!e.length)return!1;for(let r of e)if(t(r)||n(r))return!0}else{if(!e)return!1;if(t(e)||n(e))return!0}return!1});get isInvalid(){return p(this.#u)}set isInvalid(e){T(this.#u,e)}#d=t(()=>(this.opts.monthFormat.current,this.opts.yearFormat.current,wn({months:this.months,formatter:this.formatter,locale:this.opts.locale.current})));get headingValue(){return p(this.#d)}set headingValue(e){T(this.#d,e)}#f=t(()=>`${this.opts.calendarLabel.current} ${this.headingValue}`);get fullCalendarLabel(){return p(this.#f)}set fullCalendarLabel(e){T(this.#f,e)}isOutsideVisibleMonths(e){return!this.visibleMonths.some(t=>we(e,t))}isDateDisabled(e){if(this.opts.isDateDisabled.current(e)||this.opts.disabled.current)return!0;let t=this.opts.minValue.current,n=this.opts.maxValue.current;return!!(t&&Q(e,t)||n&&Q(n,e))}isDateSelected(e){let t=this.opts.value.current;return Array.isArray(t)?t.some(t=>L(t,e)):t?L(t,e):!1}shiftFocus(e,t){return fn({node:e,add:t,placeholder:this.opts.placeholder,calendarNode:this.opts.ref.current,isPrevButtonDisabled:this.isPrevButtonDisabled,isNextButtonDisabled:this.isNextButtonDisabled,months:this.months,numberOfMonths:this.opts.numberOfMonths.current})}#p(e){if(this.opts.type.current!==`multiple`||!this.opts.maxDays.current)return!0;let t=e.length;return!(this.opts.maxDays.current&&t>this.opts.maxDays.current)}handleCellClick(e,t){if(this.opts.readonly.current||this.opts.isDateDisabled.current?.(t)||this.opts.isDateUnavailable.current?.(t))return;let n=this.opts.value.current;if(this.opts.type.current===`multiple`)(Array.isArray(n)||n===void 0)&&(this.opts.value.current=this.handleMultipleUpdate(n,t));else if(!Array.isArray(n)){let e=this.handleSingleUpdate(n,t);e?this.announcer.announce(`Selected Date: ${this.formatter.selectedDate(e,!1)}`,`polite`):this.announcer.announce(`Selected date is now empty.`,`polite`,5e3),this.opts.value.current=kn(e,n),e!==void 0&&this.opts.onDateSelect?.current?.()}}handleMultipleUpdate(e,t){if(!e){let e=[t];return this.#p(e)?e:[t]}if(!Array.isArray(e))return;let n=e.findIndex(e=>L(e,t)),r=this.opts.preventDeselect.current;if(n===-1){let n=[...e,t];return this.#p(n)?n:[t]}else if(r)return e;else{let n=e.filter(e=>!L(e,t));if(!n.length){this.opts.placeholder.current=t;return}return n}}handleSingleUpdate(e,t){if(!e)return t;if(!this.opts.preventDeselect.current&&L(e,t)){this.opts.placeholder.current=t;return}return t}onkeydown(e){hn({event:e,handleCellClick:this.handleCellClick,shiftFocus:this.shiftFocus,placeholderValue:this.opts.placeholder.current})}#m=t(()=>({months:this.months,weekdays:this.weekdays}));get snippetProps(){return p(this.#m)}set snippetProps(e){T(this.#m,e)}getBitsAttr=e=>An.getAttr(e);#h=t(()=>({...Tn({fullCalendarLabel:this.fullCalendarLabel,id:this.opts.id.current,isInvalid:this.isInvalid,disabled:this.opts.disabled.current,readonly:this.opts.readonly.current}),[this.getBitsAttr(`root`)]:``,onkeydown:this.onkeydown,...this.attachment}));get props(){return p(this.#h)}set props(e){T(this.#h,e)}},Nn=class e{static create(t){return new e(t,$.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=P(this.opts.ref)}#e=t(()=>({id:this.opts.id.current,"aria-hidden":de(!0),"data-disabled":N(this.root.opts.disabled.current),"data-readonly":N(this.root.opts.readonly.current),[this.root.getBitsAttr(`heading`)]:``,...this.attachment}));get props(){return p(this.#e)}set props(e){T(this.#e,e)}},Pn=new te(`Calendar.Cell | RangeCalendar.Cell`),Fn=class e{static create(t){return Pn.set(new e(t,$.get()))}opts;root;#e=t(()=>Z(this.opts.date.current));get cellDate(){return p(this.#e)}set cellDate(e){T(this.#e,e)}#t=t(()=>this.root.opts.isDateUnavailable.current(this.opts.date.current));get isUnavailable(){return p(this.#t)}set isUnavailable(e){T(this.#t,e)}#n=t(()=>Ee(this.opts.date.current,R()));get isDateToday(){return p(this.#n)}set isDateToday(e){T(this.#n,e)}#r=t(()=>!we(this.opts.date.current,this.opts.month.current));get isOutsideMonth(){return p(this.#r)}set isOutsideMonth(e){T(this.#r,e)}#i=t(()=>this.root.isOutsideVisibleMonths(this.opts.date.current));get isOutsideVisibleMonths(){return p(this.#i)}set isOutsideVisibleMonths(e){T(this.#i,e)}#a=t(()=>this.root.isDateDisabled(this.opts.date.current)||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current);get isDisabled(){return p(this.#a)}set isDisabled(e){T(this.#a,e)}#o=t(()=>L(this.opts.date.current,this.root.opts.placeholder.current));get isFocusedDate(){return p(this.#o)}set isFocusedDate(e){T(this.#o,e)}#s=t(()=>this.root.isDateSelected(this.opts.date.current));get isSelectedDate(){return p(this.#s)}set isSelectedDate(e){T(this.#s,e)}#c=t(()=>this.root.formatter.custom(this.cellDate,{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`}));get labelText(){return p(this.#c)}set labelText(e){T(this.#c,e)}attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=P(this.opts.ref)}#l=t(()=>({disabled:this.isDisabled,unavailable:this.isUnavailable,selected:this.isSelectedDate,day:`${this.opts.date.current.day}`}));get snippetProps(){return p(this.#l)}set snippetProps(e){T(this.#l,e)}#u=t(()=>this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current||this.isUnavailable);get ariaDisabled(){return p(this.#u)}set ariaDisabled(e){T(this.#u,e)}#d=t(()=>({"data-unavailable":N(this.isUnavailable),"data-today":this.isDateToday?``:void 0,"data-outside-month":this.isOutsideMonth?``:void 0,"data-outside-visible-months":this.isOutsideVisibleMonths?``:void 0,"data-focused":this.isFocusedDate?``:void 0,"data-selected":N(this.isSelectedDate),"data-value":this.opts.date.current.toString(),"data-type":Jt(this.opts.date.current),"data-disabled":N(this.isDisabled||this.isOutsideMonth&&this.root.opts.disableDaysOutsideMonth.current)}));get sharedDataAttrs(){return p(this.#d)}set sharedDataAttrs(e){T(this.#d,e)}#f=t(()=>({id:this.opts.id.current,role:`gridcell`,"aria-selected":j(this.isSelectedDate),"aria-disabled":j(this.ariaDisabled),...this.sharedDataAttrs,[this.root.getBitsAttr(`cell`)]:``,...this.attachment}));get props(){return p(this.#f)}set props(e){T(this.#f,e)}},In=class e{static create(t){return new e(t,Pn.get())}opts;cell;attachment;constructor(e,t){this.opts=e,this.cell=t,this.onclick=this.onclick.bind(this),this.attachment=P(this.opts.ref)}#e=t(()=>this.cell.isOutsideMonth&&this.cell.root.opts.disableDaysOutsideMonth.current||this.cell.isDisabled?void 0:this.cell.isFocusedDate?0:-1);onclick(e){this.cell.isDisabled||this.cell.root.handleCellClick(e,this.cell.opts.date.current)}#t=t(()=>({disabled:this.cell.isDisabled,unavailable:this.cell.isUnavailable,selected:this.cell.isSelectedDate,day:`${this.cell.opts.date.current.day}`}));get snippetProps(){return p(this.#t)}set snippetProps(e){T(this.#t,e)}#n=t(()=>({id:this.opts.id.current,role:`button`,"aria-label":this.cell.labelText,"aria-disabled":j(this.cell.ariaDisabled),...this.cell.sharedDataAttrs,tabindex:p(this.#e),[this.cell.root.getBitsAttr(`day`)]:``,"data-bits-day":``,onclick:this.onclick,...this.attachment}));get props(){return p(this.#n)}set props(e){T(this.#n,e)}},Ln=class e{static create(t){return new e(t,$.get())}opts;root;#e=t(()=>this.root.isNextButtonDisabled);get isDisabled(){return p(this.#e)}set isDisabled(e){T(this.#e,e)}attachment;constructor(e,t){this.opts=e,this.root=t,this.onclick=this.onclick.bind(this),this.attachment=P(this.opts.ref)}onclick(e){this.isDisabled||this.root.nextPage()}#t=t(()=>({id:this.opts.id.current,role:`button`,type:`button`,"aria-label":`Next`,"aria-disabled":j(this.isDisabled),"data-disabled":N(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr(`next-button`)]:``,onclick:this.onclick,...this.attachment}));get props(){return p(this.#t)}set props(e){T(this.#t,e)}},Rn=class e{static create(t){return new e(t,$.get())}opts;root;#e=t(()=>this.root.isPrevButtonDisabled);get isDisabled(){return p(this.#e)}set isDisabled(e){T(this.#e,e)}attachment;constructor(e,t){this.opts=e,this.root=t,this.onclick=this.onclick.bind(this),this.attachment=P(this.opts.ref)}onclick(e){this.isDisabled||this.root.prevPage()}#t=t(()=>({id:this.opts.id.current,role:`button`,type:`button`,"aria-label":`Previous`,"aria-disabled":j(this.isDisabled),"data-disabled":N(this.isDisabled),disabled:this.isDisabled,[this.root.getBitsAttr(`prev-button`)]:``,onclick:this.onclick,...this.attachment}));get props(){return p(this.#t)}set props(e){T(this.#t,e)}},zn=class e{static create(t){return new e(t,$.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=P(this.opts.ref)}#e=t(()=>({id:this.opts.id.current,tabindex:-1,role:`grid`,"aria-readonly":j(this.root.opts.readonly.current),"aria-disabled":j(this.root.opts.disabled.current),"data-readonly":N(this.root.opts.readonly.current),"data-disabled":N(this.root.opts.disabled.current),[this.root.getBitsAttr(`grid`)]:``,...this.attachment}));get props(){return p(this.#e)}set props(e){T(this.#e,e)}},Bn=class e{static create(t){return new e(t,$.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=P(this.opts.ref)}#e=t(()=>({id:this.opts.id.current,"data-disabled":N(this.root.opts.disabled.current),"data-readonly":N(this.root.opts.readonly.current),[this.root.getBitsAttr(`grid-body`)]:``,...this.attachment}));get props(){return p(this.#e)}set props(e){T(this.#e,e)}},Vn=class e{static create(t){return new e(t,$.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=P(this.opts.ref)}#e=t(()=>({id:this.opts.id.current,"data-disabled":N(this.root.opts.disabled.current),"data-readonly":N(this.root.opts.readonly.current),[this.root.getBitsAttr(`grid-head`)]:``,...this.attachment}));get props(){return p(this.#e)}set props(e){T(this.#e,e)}},Hn=class e{static create(t){return new e(t,$.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=P(this.opts.ref)}#e=t(()=>({id:this.opts.id.current,"data-disabled":N(this.root.opts.disabled.current),"data-readonly":N(this.root.opts.readonly.current),[this.root.getBitsAttr(`grid-row`)]:``,...this.attachment}));get props(){return p(this.#e)}set props(e){T(this.#e,e)}},Un=class e{static create(t){return new e(t,$.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=P(this.opts.ref)}#e=t(()=>({id:this.opts.id.current,"data-disabled":N(this.root.opts.disabled.current),"data-readonly":N(this.root.opts.readonly.current),[this.root.getBitsAttr(`head-cell`)]:``,...this.attachment}));get props(){return p(this.#e)}set props(e){T(this.#e,e)}},Wn=E(`<div><!></div>`);function Gn(e,m){let h=u();c(m,!0);let v=y(m,`ref`,15,null),S=y(m,`id`,19,()=>F(h)),w=C(m,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),T=In.create({id:A(()=>S()),ref:A(()=>v(),e=>v(e))}),E=t(()=>M(w,T.props));var D=l(),O=x(D),ee=e=>{var n=l(),r=x(n);{let e=t(()=>({props:p(E),...T.snippetProps}));s(r,()=>m.child,()=>p(e))}i(e,n)},k=e=>{var t=Wn();_(t,()=>({...p(E)}));var o=g(t),c=e=>{var t=l();s(x(t),()=>m.children??f,()=>T.snippetProps),i(e,t)},u=e=>{var t=r();b(()=>n(t,T.cell.opts.date.current.day)),i(e,t)};a(o,e=>{m.children?e(c):e(u,-1)}),d(t),i(e,t)};a(O,e=>{m.child?e(ee):e(k,-1)}),i(e,D),o()}var Kn=E(`<table><!></table>`);function qn(e,n){let r=u();c(n,!0);let m=y(n,`ref`,15,null),h=y(n,`id`,19,()=>F(r)),v=C(n,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),b=zn.create({id:A(()=>h()),ref:A(()=>m(),e=>m(e))}),S=t(()=>M(v,b.props));var w=l(),T=x(w),E=e=>{var t=l();s(x(t),()=>n.child,()=>({props:p(S)})),i(e,t)},D=e=>{var t=Kn();_(t,()=>({...p(S)})),s(g(t),()=>n.children??f),d(t),i(e,t)};a(T,e=>{n.child?e(E):e(D,-1)}),i(e,w),o()}var Jn=E(`<tbody><!></tbody>`);function Yn(e,n){let r=u();c(n,!0);let m=y(n,`ref`,15,null),h=y(n,`id`,19,()=>F(r)),v=C(n,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),b=Bn.create({id:A(()=>h()),ref:A(()=>m(),e=>m(e))}),S=t(()=>M(v,b.props));var w=l(),T=x(w),E=e=>{var t=l();s(x(t),()=>n.child,()=>({props:p(S)})),i(e,t)},D=e=>{var t=Jn();_(t,()=>({...p(S)})),s(g(t),()=>n.children??f),d(t),i(e,t)};a(T,e=>{n.child?e(E):e(D,-1)}),i(e,w),o()}var Xn=E(`<td><!></td>`);function Zn(e,n){let r=u();c(n,!0);let m=y(n,`ref`,15,null),h=y(n,`id`,19,()=>F(r)),v=C(n,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`,`date`,`month`]),b=Fn.create({id:A(()=>h()),ref:A(()=>m(),e=>m(e)),date:A(()=>n.date),month:A(()=>n.month)}),S=t(()=>M(v,b.props));var w=l(),T=x(w),E=e=>{var r=l(),a=x(r);{let e=t(()=>({props:p(S),...b.snippetProps}));s(a,()=>n.child,()=>p(e))}i(e,r)},D=e=>{var t=Xn();_(t,()=>({...p(S)})),s(g(t),()=>n.children??f,()=>b.snippetProps),d(t),i(e,t)};a(T,e=>{n.child?e(E):e(D,-1)}),i(e,w),o()}var Qn=E(`<thead><!></thead>`);function $n(e,n){let r=u();c(n,!0);let m=y(n,`ref`,15,null),h=y(n,`id`,19,()=>F(r)),v=C(n,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),b=Vn.create({id:A(()=>h()),ref:A(()=>m(),e=>m(e))}),S=t(()=>M(v,b.props));var w=l(),T=x(w),E=e=>{var t=l();s(x(t),()=>n.child,()=>({props:p(S)})),i(e,t)},D=e=>{var t=Qn();_(t,()=>({...p(S)})),s(g(t),()=>n.children??f),d(t),i(e,t)};a(T,e=>{n.child?e(E):e(D,-1)}),i(e,w),o()}var er=E(`<th><!></th>`);function tr(e,n){let r=u();c(n,!0);let m=y(n,`ref`,15,null),h=y(n,`id`,19,()=>F(r)),v=C(n,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),b=Un.create({id:A(()=>h()),ref:A(()=>m(),e=>m(e))}),S=t(()=>M(v,b.props));var w=l(),T=x(w),E=e=>{var t=l();s(x(t),()=>n.child,()=>({props:p(S)})),i(e,t)},D=e=>{var t=er();_(t,()=>({...p(S)})),s(g(t),()=>n.children??f),d(t),i(e,t)};a(T,e=>{n.child?e(E):e(D,-1)}),i(e,w),o()}var nr=E(`<tr><!></tr>`);function rr(e,n){let r=u();c(n,!0);let m=y(n,`ref`,15,null),h=y(n,`id`,19,()=>F(r)),v=C(n,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),b=Hn.create({id:A(()=>h()),ref:A(()=>m(),e=>m(e))}),S=t(()=>M(v,b.props));var w=l(),T=x(w),E=e=>{var t=l();s(x(t),()=>n.child,()=>({props:p(S)})),i(e,t)},D=e=>{var t=nr();_(t,()=>({...p(S)})),s(g(t),()=>n.children??f),d(t),i(e,t)};a(T,e=>{n.child?e(E):e(D,-1)}),i(e,w),o()}var ir=E(`<div><!></div>`);function ar(e,m){let h=u();c(m,!0);let v=y(m,`ref`,15,null),S=y(m,`id`,19,()=>F(h)),w=C(m,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`ref`,`id`]),T=Nn.create({id:A(()=>S()),ref:A(()=>v(),e=>v(e))}),E=t(()=>M(w,T.props));var D=l(),O=x(D),ee=e=>{var t=l();s(x(t),()=>m.child,()=>({props:p(E),headingValue:T.root.headingValue})),i(e,t)},k=e=>{var t=ir();_(t,()=>({...p(E)}));var o=g(t),c=e=>{var t=l();s(x(t),()=>m.children??f,()=>({headingValue:T.root.headingValue})),i(e,t)},u=e=>{var t=r();b(()=>n(t,T.root.headingValue)),i(e,t)};a(o,e=>{m.children?e(c):e(u,-1)}),d(t),i(e,t)};a(O,e=>{m.child?e(ee):e(k,-1)}),i(e,D),o()}var or=E(`<button><!></button>`);function sr(e,n){let r=u();c(n,!0);let m=y(n,`id`,19,()=>F(r)),h=y(n,`ref`,15,null),v=y(n,`tabindex`,3,0),b=C(n,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`tabindex`]),S=Ln.create({id:A(()=>m()),ref:A(()=>h(),e=>h(e))}),w=t(()=>M(b,S.props,{tabindex:v()}));var T=l(),E=x(T),D=e=>{var t=l();s(x(t),()=>n.child,()=>({props:p(w)})),i(e,t)},O=e=>{var t=or();_(t,()=>({...p(w)})),s(g(t),()=>n.children??f),d(t),i(e,t)};a(E,e=>{n.child?e(D):e(O,-1)}),i(e,T),o()}var cr=E(`<button><!></button>`);function lr(e,n){let r=u();c(n,!0);let m=y(n,`id`,19,()=>F(r)),h=y(n,`ref`,15,null),v=y(n,`tabindex`,3,0),b=C(n,[`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`tabindex`]),S=Rn.create({id:A(()=>m()),ref:A(()=>h(),e=>h(e))}),w=t(()=>M(b,S.props,{tabindex:v()}));var T=l(),E=x(T),D=e=>{var t=l();s(x(t),()=>n.child,()=>({props:p(w)})),i(e,t)},O=e=>{var t=cr();_(t,()=>({...p(w)})),s(g(t),()=>n.children??f),d(t),i(e,t)};a(E,e=>{n.child?e(D):e(O,-1)}),i(e,T),o()}export{Et as S,Q as _,tr as a,Wt as b,Yn as c,Mn as d,En as f,Qt as g,Kt as h,rr as i,qn as l,$t as m,sr as n,$n as o,an as p,ar as r,Zn as s,lr as t,Gn as u,Zt as v,q as x,Z as y};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./XcWejFm_.js","./xY0c-UfG.js","./C1trcC8M.js","./Cuq8J2Td.js","./D8wZ2xul.js","./nXReuy-5.js","./D1BLcNJ7.js","./kNaey6uv.js","./C6wYiSz8.js","./xihTtKlq.js","./9K8VREGP.js","./al_nidE9.js","./DjIqa1_y.js","./COo3HgCZ.js","./DPUVu0T0.js","../assets/realtime.DDCWxn3B.css","./RK4gCWN0.js","./Cqm5wAin.js","./LYL8znYR2.js","./uBgoVlsx.js","./B6qeIQZz.js","./CQ1eQ93t2.js","./6S9WOky52.js","./BrveeylZ.js","./CjiMLTwX2.js","./CZqvCTCv.js","./DRPMJ-3M.js","./D25NMRpl.js","./CGkd0a-c2.js","../assets/list-columns.BgnafZ4K.css","./Izkulod7.js"])))=>i.map(i=>d[i]);
2
- import{A as e,F as t,L as n,N as r,Nt as i,Pt as a,R as o,Vt as s,X as c,b as l,bt as u,d,ft as f,ht as p,jt as m,mt as h,n as g,o as _,ot as v,pt as y,r as b,st as x,vt as S,x as C,xt as w,z as T}from"./xY0c-UfG.js";import{t as E}from"./kNaey6uv.js";import"./xihTtKlq.js";import{i as D}from"./DPUVu0T0.js";import{a as O,c as k,i as ee,l as A,m as j,n as te,o as ne,r as M,s as re,t as ie}from"./D3F675fu2.js";import{l as ae}from"./Bbqu2-5G2.js";import{n as N,t as P}from"./Cqm5wAin.js";import{r as F}from"./C1trcC8M.js";import{r as oe,t as se}from"./BrveeylZ.js";import{o as I}from"./B6qeIQZz.js";import{t as L}from"./uBgoVlsx.js";import{t as ce}from"./BfnFtsiY.js";import{n as R}from"./DdQVGKgM.js";async function le(e){let{EditorState:t,Compartment:n}=await E(async()=>{let{EditorState:e,Compartment:t}=await import(`./XcWejFm_.js`).then(e=>e.x);return{EditorState:e,Compartment:t}},__vite__mapDeps([0,1]),import.meta.url),{ViewPlugin:r,keymap:i}=await E(async()=>{let{ViewPlugin:e,keymap:t}=await import(`./C1trcC8M.js`).then(e=>e.s);return{ViewPlugin:e,keymap:t}},__vite__mapDeps([2,1,0]),import.meta.url),{createCollabSession:a}=await E(async()=>{let{createCollabSession:e}=await import(`./Cuq8J2Td.js`);return{createCollabSession:e}},__vite__mapDeps([3,1,4,5,6,7,8,9,10,11,12,13,14,15]),import.meta.url),{yCollab:o,yUndoManagerKeymap:s}=await E(async()=>{let{yCollab:e,yUndoManagerKeymap:t}=await import(`./RK4gCWN0.js`);return{yCollab:e,yUndoManagerKeymap:t}},__vite__mapDeps([16,0,1,2,4]),import.meta.url),c=await E(()=>import(`./D8wZ2xul.js`).then(e=>e.p),__vite__mapDeps([4,1]),import.meta.url),l=!1,u=!1,d=a(e.cursorDocName,{name:e.userDisplayName,color:e.accentColor,colorLight:e.accentColor+`33`},{onSync:()=>{l=!0,e.onSync()}}),f=new c.UndoManager(d.ytext,{captureTimeout:500,trackedOrigins:new Set}),p=()=>{try{e.onUndoRedo?.()}catch{}};f.on(`stack-item-popped`,p);let m=[o(d.ytext,null,{undoManager:f}),i.of(s)],h=new n;m.push(h.of(t.readOnly.of(!0))),m.push(r.define(e=>{let t=!1;function n(){let t=e.state.selection.main,n=d.ytext,r=c.createRelativePositionFromTypeIndex(n,t.anchor),i=c.createRelativePositionFromTypeIndex(n,t.head);d.awareness.setLocalStateField(`cursor`,{anchor:c.relativePositionToJSON(r),head:c.relativePositionToJSON(i)})}return{update(e){!t&&e.focusChanged&&e.view.hasFocus&&(t=!0),t&&(e.selectionSet||e.docChanged||e.focusChanged)&&n()}}}));let g=d.ydoc.clientID;function _(){let e=[];return d.awareness.getStates().forEach((t,n)=>{if(n===g)return;let r=t?.user?.name??`Anonymous`;e.push({name:r})}),e}let v=``;function y(){let t=_(),n=t.map(e=>e.name).sort().join(`|`);n!==v&&(v=n,e.onCollaboratorsChange(t))}function b({added:t,updated:n,removed:r}){[...t,...n,...r].some(e=>e!==g)&&e.onRemoteAwarenessChange(),(t.length>0||r.length>0)&&y()}return d.awareness.on(`change`,b),y(),m.push(r.define(()=>({update(t){(t.docChanged||t.geometryChanged||t.viewportChanged||t.selectionSet)&&e.onViewportChange()},destroy(){d.awareness.off(`change`,b)}}))),{extensions:m,session:d,syncGate:h,consumeEarlyUnlock:()=>!l||u?!1:(u=!0,!0),destroy:()=>{f.off(`stack-item-popped`,p),d.awareness.off(`change`,b),d.destroy()}}}function z(e,t){return j(A.current().formats,e,t)}function ue(e){let t=e.uploadFn??ae;A.load();async function n(n,r){let i=e.getView();if(!i)return;let a=e.cursorDocName.split(`/`);if(a.length<3)return;let[o,s,...c]=a,l=c.join(`/`);for(let e of n){let n=`![Uploading ${e.name}...]()`;i.dispatch({changes:{from:r,insert:n}});try{let r=await t(o,s,l,e),a=`![${e.name}](${r.url})`,c=i.state.doc.toString().indexOf(n);c>=0&&i.dispatch({changes:{from:c,to:c+n.length,insert:a}})}catch{let t=i.state.doc.toString().indexOf(n);t>=0&&i.dispatch({changes:{from:t,to:t+n.length,insert:`<!-- Upload failed: ${e.name} -->`}})}r+=n.length}}return F.domEventHandlers({drop(t){let r=e.getView(),i=t.dataTransfer?.files;if(!i?.length)return!1;let a=[...i].filter(e=>z(e.name,e.type));return a.length?(t.preventDefault(),n(a,r?.posAtCoords({x:t.clientX,y:t.clientY})??r?.state.selection.main.head??0),!0):!1},paste(t){let r=e.getView(),i=t.clipboardData?.items;if(!i)return!1;let a=[];for(let e of i)if(e.kind===`file`&&z(``,e.type)){let t=e.getAsFile();t&&a.push(t)}return a.length?(t.preventDefault(),n(a,r?.state.selection.main.head??0),!0):!1}})}async function de(){let{wrapSelection:e}=await E(async()=>{let{wrapSelection:e}=await import(`./Cqm5wAin.js`).then(e=>e.i);return{wrapSelection:e}},__vite__mapDeps([17,1]),import.meta.url),{Prec:t}=await E(async()=>{let{Prec:e}=await import(`./XcWejFm_.js`).then(e=>e.x);return{Prec:e}},__vite__mapDeps([0,1]),import.meta.url),{keymap:n}=await E(async()=>{let{keymap:e}=await import(`./C1trcC8M.js`).then(e=>e.s);return{keymap:e}},__vite__mapDeps([2,1,0]),import.meta.url);return t.high(n.of([{key:`Mod-b`,run:t=>(e(t,`**`,`**`),!0)},{key:`Mod-i`,run:t=>(e(t,`*`,`*`),!0)}]))}function fe(){return F.updateListener.of(e=>{if(k.view!==e.view)return;let t=e.state.selection.main.empty;k.selectionEmpty!==t&&(k.selectionEmpty=t)})}function pe(e,t,n){let r=()=>{if(k.view=e,k.canComment=n?.canComment??!1,k.selectionEmpty=e.state.selection.main.empty,t){let e=O(t);e&&(k.entity={repo:e.repo,type:e.entryType,id:e.entryId})}},i=()=>{k.view===e&&(k.view=null,k.entity=null,k.canComment=!1,k.selectionEmpty=!0)};return e.hasFocus&&r(),e.contentDOM.addEventListener(`focus`,r),e.contentDOM.addEventListener(`blur`,i),()=>{e.contentDOM.removeEventListener(`focus`,r),e.contentDOM.removeEventListener(`blur`,i),k.view===e&&(k.view=null,k.entity=null)}}var B=/(?:https?:\/\/|www\.)[^\s<>()[\]"']+$/i;function V(e,t=``){let n=e.state.selection.main;if(!n.empty)return!1;let r=n.head,i=e.state.doc.lineAt(r),a=i.text.slice(0,r-i.from),o=a.match(B);if(!o)return!1;let s=o[0],c=r-s.length,l=a.slice(0,a.length-s.length);if(/[([<]$/.test(l))return!1;let u=`[${s}](${N(s)})${t}`;return e.dispatch({changes:{from:c,to:r,insert:u},selection:{anchor:c+u.length},userEvent:`input.autolink`}),!0}async function me(){let{EditorView:e,keymap:t}=await E(async()=>{let{EditorView:e,keymap:t}=await import(`./C1trcC8M.js`).then(e=>e.s);return{EditorView:e,keymap:t}},__vite__mapDeps([2,1,0]),import.meta.url),{Prec:n}=await E(async()=>{let{Prec:e}=await import(`./XcWejFm_.js`).then(e=>e.x);return{Prec:e}},__vite__mapDeps([0,1]),import.meta.url);return[e.domEventHandlers({paste(e,t){let n=e.clipboardData?.getData(`text/plain`)?.trim();if(!n||!P.test(n))return!1;let{from:r,to:i}=t.state.selection.main,a=`[${t.state.doc.sliceString(r,i)||n}](${N(n)})`;return e.preventDefault(),t.dispatch({changes:{from:r,to:i,insert:a},selection:{anchor:r+a.length},userEvent:`input.paste`}),!0}}),n.highest(t.of([{key:` `,run:e=>V(e,` `)},{key:`Enter`,run:e=>(V(e),!1)}]))]}function he(e){return F.theme({"&":{backgroundColor:`transparent`,color:`var(--color-text-primary)`,fontSize:`var(--editor-font-size)`,fontFamily:`var(--font-sans)`},".cm-content":{padding:`32px 0`,fontSize:`var(--editor-font-size)`,fontFamily:`var(--font-sans)`,caretColor:`var(--color-accent-fg)`,lineHeight:`var(--editor-line-height)`},".cm-cursor":{borderLeftColor:`var(--color-accent-fg)`},".cm-placeholder":{color:`var(--color-text-tertiary)`},".cm-selectionBackground":{backgroundColor:`var(--color-selection) !important`},"&.cm-focused .cm-selectionBackground":{backgroundColor:`var(--color-selection) !important`},".cm-gutters":{background:`transparent`,border:`none`,color:`var(--color-text-tertiary)`},".cm-activeLine":{backgroundColor:`transparent`},"&:not(.cm-focused) .cm-cursor":{display:`none !important`},"&:not(.cm-focused) .cm-selectionBackground":{display:`none !important`},".cm-line":{padding:`0`},".cm-header-1":{fontSize:`var(--editor-h1-size)`,fontWeight:`600`},".cm-header-2":{fontSize:`var(--editor-h2-size)`,fontWeight:`600`},".cm-header-3":{fontSize:`var(--editor-h3-size)`,fontWeight:`600`},".cm-formatting":{color:`var(--color-text-tertiary)`,opacity:`0.5`},".cm-link":{color:`var(--color-link)`,textDecoration:`none`}},{dark:e})}var ge=L.define([{tag:I.processingInstruction,color:`var(--color-text-tertiary)`,opacity:`0.7`}]),H=T(`<div><span class="remote-cursor-label svelte-1cy63ac"> </span></div>`),U=T(`<div class="cursor-overlay svelte-1cy63ac"></div>`);function W(d,m){a(m,!0);let h=u(p([])),_=null;function b(){_&&cancelAnimationFrame(_),_=requestAnimationFrame(()=>{_=null,w()})}async function w(){let e=m.getView(),t=m.getEditorEl();if(!e||!t||!m.session){S(h,[],!0);return}let n=await E(()=>import(`./D8wZ2xul.js`).then(e=>e.p),__vite__mapDeps([4,1]),import.meta.url),r=m.session.awareness,i=m.session.ytext,a=i.doc;if(!a){S(h,[],!0);return}let o=a.clientID,s=t.getBoundingClientRect(),c=[];r.getStates().forEach((t,r)=>{if(r===o)return;let l=t.cursor;if(!l?.head)return;let{name:u=`Anonymous`,color:d=`#f04e4e`}=t.user||{},f;try{f=n.createRelativePositionFromJSON(l.head)}catch{return}let p=n.createAbsolutePositionFromRelativePosition(f,a);if(!p||p.type!==i)return;let m=e.coordsAtPos(Math.min(p.index,e.state.doc.length));if(m){let e=m.left-s.left;c.push({id:r,name:u,color:d,top:m.top-s.top,left:e,height:m.bottom-m.top,flipped:e>s.width*.65})}}),S(h,c,!0)}x(()=>{if(m.refreshKey,m.session,!m.session){S(h,[],!0);return}b()}),g(()=>{_&&cancelAnimationFrame(_)});var T=o(),D=y(T),O=r=>{var i=U();e(i,21,()=>c(h),e=>e.id,(e,r)=>{var i=H();let a;var o=f(i),u=f(o,!0);s(o),s(i),v(()=>{a=C(i,1,`remote-cursor svelte-1cy63ac`,null,a,{flipped:c(r).flipped}),l(i,`top: ${c(r).top??``}px; left: ${c(r).left??``}px; height: ${c(r).height??``}px; --cursor-color: ${c(r).color??``};`),l(o,`background-color: ${c(r).color??``};`),t(u,c(r).name)}),n(e,i)}),s(i),n(r,i)};r(D,e=>{c(h).length>0&&e(O)}),n(d,T),i()}var G=T(`<div class="editor-loader svelte-ok7wy5" role="status" aria-live="polite"><div class="editor-loader-spinner svelte-ok7wy5"></div> <span class="sr-only svelte-ok7wy5">Loading editor…</span></div>`),K=T(`<div><div class="cm-container svelte-ok7wy5"></div> <!> <!></div>`);function q(e,t){a(t,!0);let o=_(t,`placeholder`,3,`Add notes…`),l=_(t,`readonly`,3,!0),p=_(t,`resetKey`,3,0),y=_(t,`hoveredCommentThread`,3,null),T=_(t,`activeCommentThread`,3,null),k=_(t,`scrollRequest`,3,null),A=_(t,`pendingCommentDraft`,3,null),j=_(t,`selectionRequest`,3,null),ae=m(`theme`),N,P=null,F=u(null),I=u(``),L=null,z=u(!1),B=null,V=null,H=null,U=null;function q(e){let t=[V.readOnly.of(e),H.editable.of(!e)];return!e&&U&&t.push(U()),t}let J=null,Y=u(0),X=t.content;function _e(){P&&(P.focus(),P.dispatch({selection:{anchor:0,head:P.state.doc.length}}))}function Z(){return P?P.state.doc.toString():null}let ve=0,Q=[];function ye(){for(;Q.length;)try{Q.pop()()}catch{}}async function be(){let e=++ve,n=()=>e!==ve;S(z,!1),J?.(),J=null,ye(),P?.destroy(),P=null,c(F)?.destroy(),S(F,null),S(Y,0),t.oncollaboratorchange?.([]);let{EditorState:r,Transaction:i,Compartment:a,Prec:s}=await E(async()=>{let{EditorState:e,Transaction:t,Compartment:n,Prec:r}=await import(`./XcWejFm_.js`).then(e=>e.x);return{EditorState:e,Transaction:t,Compartment:n,Prec:r}},__vite__mapDeps([0,1]),import.meta.url);if(n())return;L=i,V=r;let{EditorView:u,keymap:d,drawSelection:f,placeholder:p}=await E(async()=>{let{EditorView:e,keymap:t,drawSelection:n,placeholder:r}=await import(`./C1trcC8M.js`).then(e=>e.s);return{EditorView:e,keymap:t,drawSelection:n,placeholder:r}},__vite__mapDeps([2,1,0]),import.meta.url);H=u,U=f;let{markdown:m,markdownLanguage:h,insertNewlineContinueMarkupCommand:g,deleteMarkupBackward:_}=await E(async()=>{let{markdown:e,markdownLanguage:t,insertNewlineContinueMarkupCommand:n,deleteMarkupBackward:r}=await import(`./LYL8znYR2.js`);return{markdown:e,markdownLanguage:t,insertNewlineContinueMarkupCommand:n,deleteMarkupBackward:r}},__vite__mapDeps([18,19,1,0,2,20,21]),import.meta.url),{TaskList:v}=await E(async()=>{let{TaskList:e}=await import(`./CQ1eQ93t2.js`);return{TaskList:e}},__vite__mapDeps([21,20,1]),import.meta.url),{syntaxHighlighting:y}=await E(async()=>{let{syntaxHighlighting:e}=await import(`./uBgoVlsx.js`).then(e=>e.f);return{syntaxHighlighting:e}},__vite__mapDeps([19,1,0,2,20]),import.meta.url),{history:b,defaultKeymap:x,historyKeymap:C}=await E(async()=>{let{history:e,defaultKeymap:t,historyKeymap:n}=await import(`./6S9WOky52.js`);return{history:e,defaultKeymap:t,historyKeymap:n}},__vite__mapDeps([22,19,1,0,2,20]),import.meta.url),{livePreviewPlugin:D,livePreviewTheme:O,imageKeymap:k}=await E(async()=>{let{livePreviewPlugin:e,livePreviewTheme:t,imageKeymap:n}=await import(`./BrveeylZ.js`).then(e=>e.n);return{livePreviewPlugin:e,livePreviewTheme:t,imageKeymap:n}},__vite__mapDeps([23,1,19,0,2,20,24,5,6,7,8,9,10,11,12,13,14,15,17]),import.meta.url),{mergeListItemBackward:ee}=await E(async()=>{let{mergeListItemBackward:e}=await import(`./CZqvCTCv.js`);return{mergeListItemBackward:e}},__vite__mapDeps([25,19,1,0,2,20]),import.meta.url),{listIndentMore:j,listIndentLess:ne}=await E(async()=>{let{listIndentMore:e,listIndentLess:t}=await import(`./B6Lt-qaJ.js`);return{listIndentMore:e,listIndentLess:t}},[],import.meta.url),{tablePreviewPlugin:ie,tablePreviewTheme:oe}=await E(async()=>{let{tablePreviewPlugin:e,tablePreviewTheme:t}=await import(`./DRPMJ-3M.js`);return{tablePreviewPlugin:e,tablePreviewTheme:t}},__vite__mapDeps([26,19,1,0,2,20,24,5,6,7,8,9,10,11,12,13,14,15]),import.meta.url),{tripleClickLine:ce}=await E(async()=>{let{tripleClickLine:e}=await import(`./D25NMRpl.js`);return{tripleClickLine:e}},__vite__mapDeps([27,0,1,2]),import.meta.url);if(n())return;let R=[m({base:h,extensions:[v]}),he(ae.current===`dark`),y(ge),D,O,se,k,ie,oe,ce,u.lineWrapping];B=new a,R.push(B.of(q(l()))),!l()&&o()&&R.push(p(o()));let W=!1,G=null;if(t.cursorDocName&&!l())try{let{auth:e}=await E(async()=>{let{auth:e}=await import(`./al_nidE9.js`).then(e=>e.n);return{auth:e}},__vite__mapDeps([11,1,12]),import.meta.url),{userColors:r}=await E(async()=>{let{userColors:e}=await import(`./CGkd0a-c2.js`).then(e=>e.v);return{userColors:e}},__vite__mapDeps([28,1,7,5,6,8,9,10,11,12,13,14,15,29]),import.meta.url);if(n())return;let i=e.user?.id,a=i==null?getComputedStyle(document.documentElement).getPropertyValue(`--color-accent`).trim()||`#f04e4e`:r.getColor(i);if(G=await le({cursorDocName:t.cursorDocName,accentColor:a,userDisplayName:e.user?.displayName??`Anonymous`,onSync:()=>{P&&G&&P.dispatch({effects:G.syncGate.reconfigure([])}),S(z,!0)},onCollaboratorsChange:e=>t.oncollaboratorchange?.(e),onRemoteAwarenessChange:()=>{w(Y)},onViewportChange:()=>{w(Y)},onUndoRedo:()=>{if(!P||!t.onchange)return;let e=P.state.doc.toString();e!==X&&(X=e,t.onchange(e))}}),n()){G.destroy();return}R.push(...G.extensions),S(F,G.session,!0),W=!0}catch(e){console.warn(`Yjs collab setup failed, falling back to solo editing:`,e)}let K=!1;if(W&&G&&t.cursorDocName&&t.oncommentopen&&t.oncommentnew){let e=await te({cursorDocName:t.cursorDocName,session:G.session,onCommentOpen:t.oncommentopen,onCommentClickAway:()=>t.oncommentclickaway?.(),onCommentNew:e=>{t.oncommentnew(e)},onCommentMarkers:e=>{N&&M(N,T()),t.oncommentmarkers?.(e)}});if(n()){G?.destroy();return}e&&(R.push(...e.extensions),K=!0)}if(!l()&&!W?(R.push(b({newGroupDelay:500})),R.push(d.of([...x,...C]))):!l()&&W&&R.push(d.of([...x])),!l()){let e=g({nonTightLists:!1});R.push(s.high(d.of([{key:`Enter`,run:e},{key:`Backspace`,run:ee},{key:`Backspace`,run:_},{key:`Tab`,run:j},{key:`Shift-Tab`,run:ne}])))}if(!l()){let{wikilinkPlugin:e,wikilinkKeymap:t}=await E(async()=>{let{wikilinkPlugin:e,wikilinkKeymap:t}=await import(`./Izkulod7.js`).then(e=>e.n);return{wikilinkPlugin:e,wikilinkKeymap:t}},__vite__mapDeps([30,1,2,0]),import.meta.url);if(n()){G?.destroy();return}R.push(e,s.highest(d.of([...t])))}if(R.push(u.updateListener.of(e=>{(e.viewportChanged||e.geometryChanged)&&N&&M(N,T())})),t.onchange){let e=Date.now(),n=[`input`,`delete`,`move`];R.push(u.updateListener.of(r=>{if(!r.docChanged||W&&(Date.now()-e<1e3||!r.transactions.some(e=>n.some(t=>e.isUserEvent(t)))))return;let i=r.state.doc.toString();X=i,t.onchange(i)}))}if(!l()&&t.cursorDocName&&R.push(ue({cursorDocName:t.cursorDocName,getView:()=>P})),R.push(u.domEventHandlers({click(e){let n=e.target;if(t.onwikilinkclick){let r=n.closest(`.cm-live-wikilink`);if(r){e.preventDefault();let n=r.dataset.entityId||r.textContent?.replace(/^\[{1,2}|\]{1,2}$/g,``).trim();return n&&t.onwikilinkclick(n),!0}}let r=n.closest(`.cm-live-link`)?.getAttribute(`data-href`);return r?(e.preventDefault(),window.open(r,`_blank`,`noopener,noreferrer`),!0):!1}})),t.onsave&&R.push(d.of([{key:`Mod-s`,run:()=>(t.onsave(),!0)}])),!l()){let e=await de(),t=await me();if(n()){G?.destroy();return}R.push(e),R.push(t),R.push(fe())}let _e=W?G&&G.session.ytext.length>0?G.session.ytext.toString():``:t.content;P=new u({state:r.create({doc:_e,extensions:R}),parent:N}),A()&&P.dispatch({effects:re.of(A())}),G?.consumeEarlyUnlock()&&P.dispatch({effects:G.syncGate.reconfigure([])}),l()||(J=pe(P,t.cursorDocName??null,{canComment:K}));let Z=N;if(t.onwikilinkclick&&Z){let e=e=>{e.detail&&t.onwikilinkclick(e.detail)};Z.addEventListener(`wikilink-click`,e),Q.push(()=>Z.removeEventListener(`wikilink-click`,e))}if(!l()&&Z){let e=e=>{if(!P||!e.detail)return;let{from:t,to:n,checked:r}=e.detail;t<0||n>P.state.doc.length||P.dispatch({changes:{from:t,to:n,insert:r?`[x]`:`[ ]`},userEvent:`input`})};Z.addEventListener(`task-toggle`,e),Q.push(()=>Z.removeEventListener(`task-toggle`,e))}if(t.oncommenthover&&Z){let e=e=>{let n=e.target?.closest?.(`.sg-comment-highlight`);n?.dataset.threadId&&t.oncommenthover(n.dataset.threadId)},n=e=>{e.target?.closest?.(`.sg-comment-highlight`)&&(e.relatedTarget?.closest?.(`.sg-comment-highlight`)||t.oncommenthover(null))};Z.addEventListener(`mouseover`,e),Z.addEventListener(`mouseout`,n),Q.push(()=>{Z.removeEventListener(`mouseover`,e),Z.removeEventListener(`mouseout`,n)})}X=W?``:t.content,S(I,t.cursorDocName??``,!0),!W||G?.session.synced?S(z,!0):setTimeout(()=>{c(z)||S(z,!0)},5e3),t.onready?.()}b(async()=>{await be()}),x(()=>{t.cursorDocName&&c(I)&&t.cursorDocName!==c(I)&&be()});let xe=u(``);x(()=>{let e=D.repos.map(e=>`${e.name}:${e.entities.length}`).join(`|`);!P||e===c(xe)||(S(xe,e,!0),P.dispatch({effects:oe.of()}))});let Se=u(``);x(()=>{if(!t.cursorDocName)return;let e=O(t.cursorDocName);if(!e)return;let n=ie(ce.getForEntry(e.repo,e.entryType,e.entryId));!P||n===c(Se)||(S(Se,n,!0),P.dispatch({effects:R.of()}))});let Ce=0;x(()=>{let e=k();if(!P||!e||e.tick===Ce)return;Ce=e.tick,ne(P,e.position);let t=T();requestAnimationFrame(()=>{N&&M(N,t)})});let we=0;x(()=>{let e=j();if(!P||!e||e.tick===we)return;we=e.tick;let t=P.state.doc.length,n=Math.max(0,Math.min(e.from,t)),r=Math.max(0,Math.min(e.to,t));P.dispatch({selection:{anchor:n,head:r}}),P.focus()}),x(()=>{N&&ee(N,y())}),x(()=>{N&&M(N,T())}),x(()=>{let e=A();P&&P.dispatch({effects:re.of(e)})}),x(()=>{P&&B&&V&&H&&P.dispatch({effects:B.reconfigure(q(l()))})}),x(()=>{if(p(),!P||t.content===X)return;if(c(F)){X=t.content;return}if(P.state.doc.toString()===t.content){X=t.content;return}X=t.content;let e=N.closest(`.document-scroll`),n=e?.scrollTop??0;P.dispatch({changes:{from:0,to:P.state.doc.length,insert:t.content},...L?{annotations:L.addToHistory.of(!1)}:{}}),e&&requestAnimationFrame(()=>{e.scrollTop=n})}),g(()=>{ve++,J?.(),ye(),c(F)?.destroy(),S(F,null),P?.destroy(),t.oncollaboratorchange?.([])});var Te={focusSelectAll:_e,getLiveContent:Z},$=K();let Ee;var De=f($);d(De,e=>N=e,()=>N);var Oe=h(De,2),ke=e=>{n(e,G())};return r(Oe,e=>{c(z)||e(ke)}),W(h(Oe,2),{get session(){return c(F)},getView:()=>P,getEditorEl:()=>N,get refreshKey(){return c(Y)}}),s($),v(()=>{Ee=C($,1,`editor-wrap svelte-ok7wy5`,null,Ee,{loading:!c(z)}),De.inert=!c(z)}),n(e,$),i(Te)}export{q as t};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./XcWejFm_.js","./xY0c-UfG.js","./C1trcC8M.js","./DKJl40hl.js","./D8wZ2xul.js","./BbsX1Slr.js","./DZcTwXBW.js","./kNaey6uv.js","./CwAmWt6h.js","./xihTtKlq.js","./9K8VREGP.js","./al_nidE9.js","./DjIqa1_y.js","./DiQg3ing.js","./DPUVu0T0.js","../assets/realtime.DDCWxn3B.css","./RK4gCWN0.js","./Cqm5wAin.js","./LYL8znYR2.js","./uBgoVlsx.js","./B6qeIQZz.js","./CQ1eQ93t2.js","./6S9WOky52.js","./5CYQk4xR.js","./CmSSN61R2.js","./CZqvCTCv.js","./ulshNz6x.js","./D25NMRpl.js","./KZY6ongq2.js","../assets/list-columns.BgnafZ4K.css","./Izkulod7.js"])))=>i.map(i=>d[i]);
2
+ import{A as e,F as t,L as n,N as r,Nt as i,Pt as a,R as o,Vt as s,X as c,b as l,bt as u,d,ft as f,ht as p,jt as m,mt as h,n as g,o as _,ot as v,pt as y,r as b,st as x,vt as S,x as C,xt as w,z as T}from"./xY0c-UfG.js";import{t as E}from"./kNaey6uv.js";import"./xihTtKlq.js";import{i as D}from"./DPUVu0T0.js";import{a as O,c as k,i as ee,l as A,m as j,n as te,o as ne,r as M,s as re,t as ie}from"./4xgUPoGj2.js";import{l as ae}from"./Bbqu2-5G2.js";import{n as N,t as P}from"./Cqm5wAin.js";import{r as F}from"./C1trcC8M.js";import{r as oe,t as se}from"./5CYQk4xR.js";import{o as I}from"./B6qeIQZz.js";import{t as L}from"./uBgoVlsx.js";import{t as ce}from"./CcI9jYBV.js";import{n as R}from"./CBQjdDZf.js";async function le(e){let{EditorState:t,Compartment:n}=await E(async()=>{let{EditorState:e,Compartment:t}=await import(`./XcWejFm_.js`).then(e=>e.x);return{EditorState:e,Compartment:t}},__vite__mapDeps([0,1]),import.meta.url),{ViewPlugin:r,keymap:i}=await E(async()=>{let{ViewPlugin:e,keymap:t}=await import(`./C1trcC8M.js`).then(e=>e.s);return{ViewPlugin:e,keymap:t}},__vite__mapDeps([2,1,0]),import.meta.url),{createCollabSession:a}=await E(async()=>{let{createCollabSession:e}=await import(`./DKJl40hl.js`);return{createCollabSession:e}},__vite__mapDeps([3,1,4,5,6,7,8,9,10,11,12,13,14,15]),import.meta.url),{yCollab:o,yUndoManagerKeymap:s}=await E(async()=>{let{yCollab:e,yUndoManagerKeymap:t}=await import(`./RK4gCWN0.js`);return{yCollab:e,yUndoManagerKeymap:t}},__vite__mapDeps([16,0,1,2,4]),import.meta.url),c=await E(()=>import(`./D8wZ2xul.js`).then(e=>e.p),__vite__mapDeps([4,1]),import.meta.url),l=!1,u=!1,d=a(e.cursorDocName,{name:e.userDisplayName,color:e.accentColor,colorLight:e.accentColor+`33`},{onSync:()=>{l=!0,e.onSync()}}),f=new c.UndoManager(d.ytext,{captureTimeout:500,trackedOrigins:new Set}),p=()=>{try{e.onUndoRedo?.()}catch{}};f.on(`stack-item-popped`,p);let m=[o(d.ytext,null,{undoManager:f}),i.of(s)],h=new n;m.push(h.of(t.readOnly.of(!0))),m.push(r.define(e=>{let t=!1;function n(){let t=e.state.selection.main,n=d.ytext,r=c.createRelativePositionFromTypeIndex(n,t.anchor),i=c.createRelativePositionFromTypeIndex(n,t.head);d.awareness.setLocalStateField(`cursor`,{anchor:c.relativePositionToJSON(r),head:c.relativePositionToJSON(i)})}return{update(e){!t&&e.focusChanged&&e.view.hasFocus&&(t=!0),t&&(e.selectionSet||e.docChanged||e.focusChanged)&&n()}}}));let g=d.ydoc.clientID;function _(){let e=[];return d.awareness.getStates().forEach((t,n)=>{if(n===g)return;let r=t?.user?.name??`Anonymous`;e.push({name:r})}),e}let v=``;function y(){let t=_(),n=t.map(e=>e.name).sort().join(`|`);n!==v&&(v=n,e.onCollaboratorsChange(t))}function b({added:t,updated:n,removed:r}){[...t,...n,...r].some(e=>e!==g)&&e.onRemoteAwarenessChange(),(t.length>0||r.length>0)&&y()}return d.awareness.on(`change`,b),y(),m.push(r.define(()=>({update(t){(t.docChanged||t.geometryChanged||t.viewportChanged||t.selectionSet)&&e.onViewportChange()},destroy(){d.awareness.off(`change`,b)}}))),{extensions:m,session:d,syncGate:h,consumeEarlyUnlock:()=>!l||u?!1:(u=!0,!0),destroy:()=>{f.off(`stack-item-popped`,p),d.awareness.off(`change`,b),d.destroy()}}}function z(e,t){return j(A.current().formats,e,t)}function ue(e){let t=e.uploadFn??ae;A.load();async function n(n,r){let i=e.getView();if(!i)return;let a=e.cursorDocName.split(`/`);if(a.length<3)return;let[o,s,...c]=a,l=c.join(`/`);for(let e of n){let n=`![Uploading ${e.name}...]()`;i.dispatch({changes:{from:r,insert:n}});try{let r=await t(o,s,l,e),a=`![${e.name}](${r.url})`,c=i.state.doc.toString().indexOf(n);c>=0&&i.dispatch({changes:{from:c,to:c+n.length,insert:a}})}catch{let t=i.state.doc.toString().indexOf(n);t>=0&&i.dispatch({changes:{from:t,to:t+n.length,insert:`<!-- Upload failed: ${e.name} -->`}})}r+=n.length}}return F.domEventHandlers({drop(t){let r=e.getView(),i=t.dataTransfer?.files;if(!i?.length)return!1;let a=[...i].filter(e=>z(e.name,e.type));return a.length?(t.preventDefault(),n(a,r?.posAtCoords({x:t.clientX,y:t.clientY})??r?.state.selection.main.head??0),!0):!1},paste(t){let r=e.getView(),i=t.clipboardData?.items;if(!i)return!1;let a=[];for(let e of i)if(e.kind===`file`&&z(``,e.type)){let t=e.getAsFile();t&&a.push(t)}return a.length?(t.preventDefault(),n(a,r?.state.selection.main.head??0),!0):!1}})}async function de(){let{wrapSelection:e}=await E(async()=>{let{wrapSelection:e}=await import(`./Cqm5wAin.js`).then(e=>e.i);return{wrapSelection:e}},__vite__mapDeps([17,1]),import.meta.url),{Prec:t}=await E(async()=>{let{Prec:e}=await import(`./XcWejFm_.js`).then(e=>e.x);return{Prec:e}},__vite__mapDeps([0,1]),import.meta.url),{keymap:n}=await E(async()=>{let{keymap:e}=await import(`./C1trcC8M.js`).then(e=>e.s);return{keymap:e}},__vite__mapDeps([2,1,0]),import.meta.url);return t.high(n.of([{key:`Mod-b`,run:t=>(e(t,`**`,`**`),!0)},{key:`Mod-i`,run:t=>(e(t,`*`,`*`),!0)}]))}function fe(){return F.updateListener.of(e=>{if(k.view!==e.view)return;let t=e.state.selection.main.empty;k.selectionEmpty!==t&&(k.selectionEmpty=t)})}function pe(e,t,n){let r=()=>{if(k.view=e,k.canComment=n?.canComment??!1,k.selectionEmpty=e.state.selection.main.empty,t){let e=O(t);e&&(k.entity={repo:e.repo,type:e.entryType,id:e.entryId})}},i=()=>{k.view===e&&(k.view=null,k.entity=null,k.canComment=!1,k.selectionEmpty=!0)};return e.hasFocus&&r(),e.contentDOM.addEventListener(`focus`,r),e.contentDOM.addEventListener(`blur`,i),()=>{e.contentDOM.removeEventListener(`focus`,r),e.contentDOM.removeEventListener(`blur`,i),k.view===e&&(k.view=null,k.entity=null)}}var B=/(?:https?:\/\/|www\.)[^\s<>()[\]"']+$/i;function V(e,t=``){let n=e.state.selection.main;if(!n.empty)return!1;let r=n.head,i=e.state.doc.lineAt(r),a=i.text.slice(0,r-i.from),o=a.match(B);if(!o)return!1;let s=o[0],c=r-s.length,l=a.slice(0,a.length-s.length);if(/[([<]$/.test(l))return!1;let u=`[${s}](${N(s)})${t}`;return e.dispatch({changes:{from:c,to:r,insert:u},selection:{anchor:c+u.length},userEvent:`input.autolink`}),!0}async function me(){let{EditorView:e,keymap:t}=await E(async()=>{let{EditorView:e,keymap:t}=await import(`./C1trcC8M.js`).then(e=>e.s);return{EditorView:e,keymap:t}},__vite__mapDeps([2,1,0]),import.meta.url),{Prec:n}=await E(async()=>{let{Prec:e}=await import(`./XcWejFm_.js`).then(e=>e.x);return{Prec:e}},__vite__mapDeps([0,1]),import.meta.url);return[e.domEventHandlers({paste(e,t){let n=e.clipboardData?.getData(`text/plain`)?.trim();if(!n||!P.test(n))return!1;let{from:r,to:i}=t.state.selection.main,a=`[${t.state.doc.sliceString(r,i)||n}](${N(n)})`;return e.preventDefault(),t.dispatch({changes:{from:r,to:i,insert:a},selection:{anchor:r+a.length},userEvent:`input.paste`}),!0}}),n.highest(t.of([{key:` `,run:e=>V(e,` `)},{key:`Enter`,run:e=>(V(e),!1)}]))]}function he(e){return F.theme({"&":{backgroundColor:`transparent`,color:`var(--color-text-primary)`,fontSize:`var(--editor-font-size)`,fontFamily:`var(--font-sans)`},".cm-content":{padding:`32px 0`,fontSize:`var(--editor-font-size)`,fontFamily:`var(--font-sans)`,caretColor:`var(--color-accent-fg)`,lineHeight:`var(--editor-line-height)`},".cm-cursor":{borderLeftColor:`var(--color-accent-fg)`},".cm-placeholder":{color:`var(--color-text-tertiary)`},".cm-selectionBackground":{backgroundColor:`var(--color-selection) !important`},"&.cm-focused .cm-selectionBackground":{backgroundColor:`var(--color-selection) !important`},".cm-gutters":{background:`transparent`,border:`none`,color:`var(--color-text-tertiary)`},".cm-activeLine":{backgroundColor:`transparent`},"&:not(.cm-focused) .cm-cursor":{display:`none !important`},"&:not(.cm-focused) .cm-selectionBackground":{display:`none !important`},".cm-line":{padding:`0`},".cm-header-1":{fontSize:`var(--editor-h1-size)`,fontWeight:`600`},".cm-header-2":{fontSize:`var(--editor-h2-size)`,fontWeight:`600`},".cm-header-3":{fontSize:`var(--editor-h3-size)`,fontWeight:`600`},".cm-formatting":{color:`var(--color-text-tertiary)`,opacity:`0.5`},".cm-link":{color:`var(--color-link)`,textDecoration:`none`}},{dark:e})}var ge=L.define([{tag:I.processingInstruction,color:`var(--color-text-tertiary)`,opacity:`0.7`}]),H=T(`<div><span class="remote-cursor-label svelte-1cy63ac"> </span></div>`),U=T(`<div class="cursor-overlay svelte-1cy63ac"></div>`);function W(d,m){a(m,!0);let h=u(p([])),_=null;function b(){_&&cancelAnimationFrame(_),_=requestAnimationFrame(()=>{_=null,w()})}async function w(){let e=m.getView(),t=m.getEditorEl();if(!e||!t||!m.session){S(h,[],!0);return}let n=await E(()=>import(`./D8wZ2xul.js`).then(e=>e.p),__vite__mapDeps([4,1]),import.meta.url),r=m.session.awareness,i=m.session.ytext,a=i.doc;if(!a){S(h,[],!0);return}let o=a.clientID,s=t.getBoundingClientRect(),c=[];r.getStates().forEach((t,r)=>{if(r===o)return;let l=t.cursor;if(!l?.head)return;let{name:u=`Anonymous`,color:d=`#f04e4e`}=t.user||{},f;try{f=n.createRelativePositionFromJSON(l.head)}catch{return}let p=n.createAbsolutePositionFromRelativePosition(f,a);if(!p||p.type!==i)return;let m=e.coordsAtPos(Math.min(p.index,e.state.doc.length));if(m){let e=m.left-s.left;c.push({id:r,name:u,color:d,top:m.top-s.top,left:e,height:m.bottom-m.top,flipped:e>s.width*.65})}}),S(h,c,!0)}x(()=>{if(m.refreshKey,m.session,!m.session){S(h,[],!0);return}b()}),g(()=>{_&&cancelAnimationFrame(_)});var T=o(),D=y(T),O=r=>{var i=U();e(i,21,()=>c(h),e=>e.id,(e,r)=>{var i=H();let a;var o=f(i),u=f(o,!0);s(o),s(i),v(()=>{a=C(i,1,`remote-cursor svelte-1cy63ac`,null,a,{flipped:c(r).flipped}),l(i,`top: ${c(r).top??``}px; left: ${c(r).left??``}px; height: ${c(r).height??``}px; --cursor-color: ${c(r).color??``};`),l(o,`background-color: ${c(r).color??``};`),t(u,c(r).name)}),n(e,i)}),s(i),n(r,i)};r(D,e=>{c(h).length>0&&e(O)}),n(d,T),i()}var G=T(`<div class="editor-loader svelte-ok7wy5" role="status" aria-live="polite"><div class="editor-loader-spinner svelte-ok7wy5"></div> <span class="sr-only svelte-ok7wy5">Loading editor…</span></div>`),K=T(`<div><div class="cm-container svelte-ok7wy5"></div> <!> <!></div>`);function q(e,t){a(t,!0);let o=_(t,`placeholder`,3,`Add notes…`),l=_(t,`readonly`,3,!0),p=_(t,`resetKey`,3,0),y=_(t,`hoveredCommentThread`,3,null),T=_(t,`activeCommentThread`,3,null),k=_(t,`scrollRequest`,3,null),A=_(t,`pendingCommentDraft`,3,null),j=_(t,`selectionRequest`,3,null),ae=m(`theme`),N,P=null,F=u(null),I=u(``),L=null,z=u(!1),B=null,V=null,H=null,U=null;function q(e){let t=[V.readOnly.of(e),H.editable.of(!e)];return!e&&U&&t.push(U()),t}let J=null,Y=u(0),X=t.content;function _e(){P&&(P.focus(),P.dispatch({selection:{anchor:0,head:P.state.doc.length}}))}function Z(){return P?P.state.doc.toString():null}let ve=0,Q=[];function ye(){for(;Q.length;)try{Q.pop()()}catch{}}async function be(){let e=++ve,n=()=>e!==ve;S(z,!1),J?.(),J=null,ye(),P?.destroy(),P=null,c(F)?.destroy(),S(F,null),S(Y,0),t.oncollaboratorchange?.([]);let{EditorState:r,Transaction:i,Compartment:a,Prec:s}=await E(async()=>{let{EditorState:e,Transaction:t,Compartment:n,Prec:r}=await import(`./XcWejFm_.js`).then(e=>e.x);return{EditorState:e,Transaction:t,Compartment:n,Prec:r}},__vite__mapDeps([0,1]),import.meta.url);if(n())return;L=i,V=r;let{EditorView:u,keymap:d,drawSelection:f,placeholder:p}=await E(async()=>{let{EditorView:e,keymap:t,drawSelection:n,placeholder:r}=await import(`./C1trcC8M.js`).then(e=>e.s);return{EditorView:e,keymap:t,drawSelection:n,placeholder:r}},__vite__mapDeps([2,1,0]),import.meta.url);H=u,U=f;let{markdown:m,markdownLanguage:h,insertNewlineContinueMarkupCommand:g,deleteMarkupBackward:_}=await E(async()=>{let{markdown:e,markdownLanguage:t,insertNewlineContinueMarkupCommand:n,deleteMarkupBackward:r}=await import(`./LYL8znYR2.js`);return{markdown:e,markdownLanguage:t,insertNewlineContinueMarkupCommand:n,deleteMarkupBackward:r}},__vite__mapDeps([18,19,1,0,2,20,21]),import.meta.url),{TaskList:v}=await E(async()=>{let{TaskList:e}=await import(`./CQ1eQ93t2.js`);return{TaskList:e}},__vite__mapDeps([21,20,1]),import.meta.url),{syntaxHighlighting:y}=await E(async()=>{let{syntaxHighlighting:e}=await import(`./uBgoVlsx.js`).then(e=>e.f);return{syntaxHighlighting:e}},__vite__mapDeps([19,1,0,2,20]),import.meta.url),{history:b,defaultKeymap:x,historyKeymap:C}=await E(async()=>{let{history:e,defaultKeymap:t,historyKeymap:n}=await import(`./6S9WOky52.js`);return{history:e,defaultKeymap:t,historyKeymap:n}},__vite__mapDeps([22,19,1,0,2,20]),import.meta.url),{livePreviewPlugin:D,livePreviewTheme:O,imageKeymap:k}=await E(async()=>{let{livePreviewPlugin:e,livePreviewTheme:t,imageKeymap:n}=await import(`./5CYQk4xR.js`).then(e=>e.n);return{livePreviewPlugin:e,livePreviewTheme:t,imageKeymap:n}},__vite__mapDeps([23,1,19,0,2,20,24,5,6,7,8,9,10,11,12,13,14,15,17]),import.meta.url),{mergeListItemBackward:ee}=await E(async()=>{let{mergeListItemBackward:e}=await import(`./CZqvCTCv.js`);return{mergeListItemBackward:e}},__vite__mapDeps([25,19,1,0,2,20]),import.meta.url),{listIndentMore:j,listIndentLess:ne}=await E(async()=>{let{listIndentMore:e,listIndentLess:t}=await import(`./B6Lt-qaJ.js`);return{listIndentMore:e,listIndentLess:t}},[],import.meta.url),{tablePreviewPlugin:ie,tablePreviewTheme:oe}=await E(async()=>{let{tablePreviewPlugin:e,tablePreviewTheme:t}=await import(`./ulshNz6x.js`);return{tablePreviewPlugin:e,tablePreviewTheme:t}},__vite__mapDeps([26,19,1,0,2,20,24,5,6,7,8,9,10,11,12,13,14,15]),import.meta.url),{tripleClickLine:ce}=await E(async()=>{let{tripleClickLine:e}=await import(`./D25NMRpl.js`);return{tripleClickLine:e}},__vite__mapDeps([27,0,1,2]),import.meta.url);if(n())return;let R=[m({base:h,extensions:[v]}),he(ae.current===`dark`),y(ge),D,O,se,k,ie,oe,ce,u.lineWrapping];B=new a,R.push(B.of(q(l()))),!l()&&o()&&R.push(p(o()));let W=!1,G=null;if(t.cursorDocName&&!l())try{let{auth:e}=await E(async()=>{let{auth:e}=await import(`./al_nidE9.js`).then(e=>e.n);return{auth:e}},__vite__mapDeps([11,1,12]),import.meta.url),{userColors:r}=await E(async()=>{let{userColors:e}=await import(`./KZY6ongq2.js`).then(e=>e.v);return{userColors:e}},__vite__mapDeps([28,1,7,5,6,8,9,10,11,12,13,14,15,29]),import.meta.url);if(n())return;let i=e.user?.id,a=i==null?getComputedStyle(document.documentElement).getPropertyValue(`--color-accent`).trim()||`#f04e4e`:r.getColor(i);if(G=await le({cursorDocName:t.cursorDocName,accentColor:a,userDisplayName:e.user?.displayName??`Anonymous`,onSync:()=>{P&&G&&P.dispatch({effects:G.syncGate.reconfigure([])}),S(z,!0)},onCollaboratorsChange:e=>t.oncollaboratorchange?.(e),onRemoteAwarenessChange:()=>{w(Y)},onViewportChange:()=>{w(Y)},onUndoRedo:()=>{if(!P||!t.onchange)return;let e=P.state.doc.toString();e!==X&&(X=e,t.onchange(e))}}),n()){G.destroy();return}R.push(...G.extensions),S(F,G.session,!0),W=!0}catch(e){console.warn(`Yjs collab setup failed, falling back to solo editing:`,e)}let K=!1;if(W&&G&&t.cursorDocName&&t.oncommentopen&&t.oncommentnew){let e=await te({cursorDocName:t.cursorDocName,session:G.session,onCommentOpen:t.oncommentopen,onCommentClickAway:()=>t.oncommentclickaway?.(),onCommentNew:e=>{t.oncommentnew(e)},onCommentMarkers:e=>{N&&M(N,T()),t.oncommentmarkers?.(e)}});if(n()){G?.destroy();return}e&&(R.push(...e.extensions),K=!0)}if(!l()&&!W?(R.push(b({newGroupDelay:500})),R.push(d.of([...x,...C]))):!l()&&W&&R.push(d.of([...x])),!l()){let e=g({nonTightLists:!1});R.push(s.high(d.of([{key:`Enter`,run:e},{key:`Backspace`,run:ee},{key:`Backspace`,run:_},{key:`Tab`,run:j},{key:`Shift-Tab`,run:ne}])))}if(!l()){let{wikilinkPlugin:e,wikilinkKeymap:t}=await E(async()=>{let{wikilinkPlugin:e,wikilinkKeymap:t}=await import(`./Izkulod7.js`).then(e=>e.n);return{wikilinkPlugin:e,wikilinkKeymap:t}},__vite__mapDeps([30,1,2,0]),import.meta.url);if(n()){G?.destroy();return}R.push(e,s.highest(d.of([...t])))}if(R.push(u.updateListener.of(e=>{(e.viewportChanged||e.geometryChanged)&&N&&M(N,T())})),t.onchange){let e=Date.now(),n=[`input`,`delete`,`move`];R.push(u.updateListener.of(r=>{if(!r.docChanged||W&&(Date.now()-e<1e3||!r.transactions.some(e=>n.some(t=>e.isUserEvent(t)))))return;let i=r.state.doc.toString();X=i,t.onchange(i)}))}if(!l()&&t.cursorDocName&&R.push(ue({cursorDocName:t.cursorDocName,getView:()=>P})),R.push(u.domEventHandlers({click(e){let n=e.target;if(t.onwikilinkclick){let r=n.closest(`.cm-live-wikilink`);if(r){e.preventDefault();let n=r.dataset.entityId||r.textContent?.replace(/^\[{1,2}|\]{1,2}$/g,``).trim();return n&&t.onwikilinkclick(n),!0}}let r=n.closest(`.cm-live-link`)?.getAttribute(`data-href`);return r?(e.preventDefault(),window.open(r,`_blank`,`noopener,noreferrer`),!0):!1}})),t.onsave&&R.push(d.of([{key:`Mod-s`,run:()=>(t.onsave(),!0)}])),!l()){let e=await de(),t=await me();if(n()){G?.destroy();return}R.push(e),R.push(t),R.push(fe())}let _e=W?G&&G.session.ytext.length>0?G.session.ytext.toString():``:t.content;P=new u({state:r.create({doc:_e,extensions:R}),parent:N}),A()&&P.dispatch({effects:re.of(A())}),G?.consumeEarlyUnlock()&&P.dispatch({effects:G.syncGate.reconfigure([])}),l()||(J=pe(P,t.cursorDocName??null,{canComment:K}));let Z=N;if(t.onwikilinkclick&&Z){let e=e=>{e.detail&&t.onwikilinkclick(e.detail)};Z.addEventListener(`wikilink-click`,e),Q.push(()=>Z.removeEventListener(`wikilink-click`,e))}if(!l()&&Z){let e=e=>{if(!P||!e.detail)return;let{from:t,to:n,checked:r}=e.detail;t<0||n>P.state.doc.length||P.dispatch({changes:{from:t,to:n,insert:r?`[x]`:`[ ]`},userEvent:`input`})};Z.addEventListener(`task-toggle`,e),Q.push(()=>Z.removeEventListener(`task-toggle`,e))}if(t.oncommenthover&&Z){let e=e=>{let n=e.target?.closest?.(`.sg-comment-highlight`);n?.dataset.threadId&&t.oncommenthover(n.dataset.threadId)},n=e=>{e.target?.closest?.(`.sg-comment-highlight`)&&(e.relatedTarget?.closest?.(`.sg-comment-highlight`)||t.oncommenthover(null))};Z.addEventListener(`mouseover`,e),Z.addEventListener(`mouseout`,n),Q.push(()=>{Z.removeEventListener(`mouseover`,e),Z.removeEventListener(`mouseout`,n)})}X=W?``:t.content,S(I,t.cursorDocName??``,!0),!W||G?.session.synced?S(z,!0):setTimeout(()=>{c(z)||S(z,!0)},5e3),t.onready?.()}b(async()=>{await be()}),x(()=>{t.cursorDocName&&c(I)&&t.cursorDocName!==c(I)&&be()});let xe=u(``);x(()=>{let e=D.repos.map(e=>`${e.name}:${e.entities.length}`).join(`|`);!P||e===c(xe)||(S(xe,e,!0),P.dispatch({effects:oe.of()}))});let Se=u(``);x(()=>{if(!t.cursorDocName)return;let e=O(t.cursorDocName);if(!e)return;let n=ie(ce.getForEntry(e.repo,e.entryType,e.entryId));!P||n===c(Se)||(S(Se,n,!0),P.dispatch({effects:R.of()}))});let Ce=0;x(()=>{let e=k();if(!P||!e||e.tick===Ce)return;Ce=e.tick,ne(P,e.position);let t=T();requestAnimationFrame(()=>{N&&M(N,t)})});let we=0;x(()=>{let e=j();if(!P||!e||e.tick===we)return;we=e.tick;let t=P.state.doc.length,n=Math.max(0,Math.min(e.from,t)),r=Math.max(0,Math.min(e.to,t));P.dispatch({selection:{anchor:n,head:r}}),P.focus()}),x(()=>{N&&ee(N,y())}),x(()=>{N&&M(N,T())}),x(()=>{let e=A();P&&P.dispatch({effects:re.of(e)})}),x(()=>{P&&B&&V&&H&&P.dispatch({effects:B.reconfigure(q(l()))})}),x(()=>{if(p(),!P||t.content===X)return;if(c(F)){X=t.content;return}if(P.state.doc.toString()===t.content){X=t.content;return}X=t.content;let e=N.closest(`.document-scroll`),n=e?.scrollTop??0;P.dispatch({changes:{from:0,to:P.state.doc.length,insert:t.content},...L?{annotations:L.addToHistory.of(!1)}:{}}),e&&requestAnimationFrame(()=>{e.scrollTop=n})}),g(()=>{ve++,J?.(),ye(),c(F)?.destroy(),S(F,null),P?.destroy(),t.oncollaboratorchange?.([])});var Te={focusSelectAll:_e,getLiveContent:Z},$=K();let Ee;var De=f($);d(De,e=>N=e,()=>N);var Oe=h(De,2),ke=e=>{n(e,G())};return r(Oe,e=>{c(z)||e(ke)}),W(h(Oe,2),{get session(){return c(F)},getView:()=>P,getEditorEl:()=>N,get refreshKey(){return c(Y)}}),s($),v(()=>{Ee=C($,1,`editor-wrap svelte-ok7wy5`,null,Ee,{loading:!c(z)}),De.inert=!c(z)}),n(e,$),i(Te)}export{q as t};